mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
config redirect
This commit is contained in:
+346
@@ -0,0 +1,346 @@
|
||||
# mermaid
|
||||
|
||||
[](https://github.com/mermaid-js/mermaid/actions/workflows/build.yml) [](https://www.npmjs.com/package/mermaid) [](https://bundlephobia.com/package/mermaid) [](https://coveralls.io/github/mermaid-js/mermaid?branch=master) [](https://www.jsdelivr.com/package/npm/mermaid) [](https://www.npmjs.com/package/mermaid) [](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) [](https://twitter.com/mermaidjs_)
|
||||
|
||||
English | [简体中文](./README.zh-CN.md)
|
||||
|
||||
<img src="./img/header.png" alt="" />
|
||||
|
||||
:trophy: **Mermaid was nominated and won the [JS Open Source Awards (2019)](https://osawards.com/javascript/2019) in the category "The most exciting use of technology"!!!**
|
||||
|
||||
**Thanks to all involved, people committing pull requests, people answering questions! 🙏**
|
||||
|
||||
<a href="https://mermaid-js.github.io/mermaid/landing/"><img src="https://github.com/mermaid-js/mermaid/blob/master/docs/img/book-banner-post-release.jpg" alt="Explore Mermaid.js in depth, with real-world examples, tips & tricks from the creator... The first official book on Mermaid is available for purchase. Check it out!"></a>
|
||||
|
||||
## About
|
||||
|
||||
<!-- <Main description> -->
|
||||
|
||||
Mermaid is a JavaScript-based diagramming and charting tool that uses Markdown-inspired text definitions and a renderer to create and modify complex diagrams. The main purpose of Mermaid is to help documentation catch up with development.
|
||||
|
||||
> Doc-Rot is a Catch-22 that Mermaid helps to solve.
|
||||
|
||||
Diagramming and documentation costs precious developer time and gets outdated quickly.
|
||||
But not having diagrams or docs ruins productivity and hurts organizational learning.<br/>
|
||||
Mermaid addresses this problem by enabling users to create easily modifiable diagrams. It can also be made part of production scripts (and other pieces of code).<br/>
|
||||
<br/>
|
||||
|
||||
Mermaid allows even non-programmers to easily create detailed diagrams through the [Mermaid Live Editor](https://mermaid.live/).<br/>
|
||||
[Tutorials](./docs/Tutorials.md) has video tutorials.
|
||||
Use Mermaid with your favorite applications, check out the list of [Integrations and Usages of Mermaid](./docs/integrations.md).
|
||||
|
||||
You can also use Mermaid within [GitHub](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) as well many of your other favorite applications—check out the list of [Integrations and Usages of Mermaid](./docs/integrations.md).
|
||||
|
||||
For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](./docs/n00b-overview.md), [Usage](./docs/usage.md) and [Tutorials](./docs/Tutorials.md).
|
||||
|
||||
🌐 [CDN](https://unpkg.com/mermaid/) | 📖 [Documentation](https://mermaidjs.github.io) | 🙌 [Contribution](https://github.com/mermaid-js/mermaid/blob/develop/CONTRIBUTING.md) | 📜 [Changelog](./docs/CHANGELOG.md)
|
||||
|
||||
In our release process we rely heavily on visual regression tests using [applitools](https://applitools.com/). Applitools is a great service which has been easy to use and integrate with our tests.
|
||||
|
||||
<a href="https://applitools.com/">
|
||||
<svg width="170" height="32" viewBox="0 0 170 32" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="a" maskUnits="userSpaceOnUse" x="27" y="0" width="143" height="32"><path fill-rule="evenodd" clip-rule="evenodd" d="M27.732.227h141.391v31.19H27.733V.227z" fill="#fff"></path></mask><g mask="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M153.851 22.562l1.971-3.298c1.291 1.219 3.837 2.402 5.988 2.402 1.971 0 2.903-.753 2.903-1.829 0-2.832-10.253-.502-10.253-7.313 0-2.904 2.51-5.45 7.099-5.45 2.904 0 5.234 1.004 6.955 2.367l-1.829 3.226c-1.039-1.075-3.011-2.008-5.126-2.008-1.65 0-2.725.717-2.725 1.685 0 2.546 10.289.395 10.289 7.386 0 3.19-2.724 5.52-7.528 5.52-3.012 0-5.916-1.003-7.744-2.688zm-5.7 2.259h4.553V.908h-4.553v23.913zm-6.273-8.676c0-2.689-1.578-5.02-4.446-5.02-2.832 0-4.409 2.331-4.409 5.02 0 2.724 1.577 5.055 4.409 5.055 2.868 0 4.446-2.33 4.446-5.055zm-13.588 0c0-4.912 3.442-9.07 9.142-9.07 5.736 0 9.178 4.158 9.178 9.07 0 4.911-3.442 9.106-9.178 9.106-5.7 0-9.142-4.195-9.142-9.106zm-5.628 0c0-2.689-1.577-5.02-4.445-5.02-2.832 0-4.41 2.331-4.41 5.02 0 2.724 1.578 5.055 4.41 5.055 2.868 0 4.445-2.33 4.445-5.055zm-13.587 0c0-4.912 3.441-9.07 9.142-9.07 5.736 0 9.178 4.158 9.178 9.07 0 4.911-3.442 9.106-9.178 9.106-5.701 0-9.142-4.195-9.142-9.106zm-8.425 4.338v-8.999h-2.868v-3.98h2.868V2.773h4.553v4.733h3.514v3.979h-3.514v7.78c0 1.111.574 1.936 1.578 1.936.681 0 1.326-.251 1.577-.538l.968 3.478c-.681.609-1.9 1.11-3.8 1.11-3.191 0-4.876-1.648-4.876-4.767zm-8.962 4.338h4.553V7.505h-4.553V24.82zm-.43-21.905a2.685 2.685 0 012.688-2.69c1.506 0 2.725 1.184 2.725 2.69a2.724 2.724 0 01-2.725 2.724c-1.47 0-2.688-1.219-2.688-2.724zM84.482 24.82h4.553V.908h-4.553v23.913zm-6.165-8.676c0-2.976-1.793-5.02-4.41-5.02-1.47 0-3.119.825-3.908 1.973v6.094c.753 1.111 2.438 2.008 3.908 2.008 2.617 0 4.41-2.044 4.41-5.055zm-8.318 6.453v8.82h-4.553V7.504H70v2.187c1.327-1.685 3.227-2.618 5.342-2.618 4.446 0 7.672 3.299 7.672 9.07 0 5.773-3.226 9.107-7.672 9.107-2.043 0-3.907-.86-5.342-2.653zm-10.718-6.453c0-2.976-1.793-5.02-4.41-5.02-1.47 0-3.119.825-3.908 1.973v6.094c.753 1.111 2.438 2.008 3.908 2.008 2.617 0 4.41-2.044 4.41-5.055zm-8.318 6.453v8.82H46.41V7.504h4.553v2.187c1.327-1.685 3.227-2.618 5.342-2.618 4.446 0 7.672 3.299 7.672 9.07 0 5.773-3.226 9.107-7.672 9.107-2.043 0-3.908-.86-5.342-2.653zm-11.758-1.936V18.51c-.753-1.004-2.187-1.542-3.657-1.542-1.793 0-3.263.968-3.263 2.617 0 1.65 1.47 2.582 3.263 2.582 1.47 0 2.904-.502 3.657-1.506zm0 4.159v-1.829c-1.183 1.434-3.227 2.259-5.485 2.259-2.761 0-5.988-1.864-5.988-5.736 0-4.087 3.227-5.593 5.988-5.593 2.33 0 4.337.753 5.485 2.115V13.85c0-1.756-1.506-2.904-3.8-2.904-1.829 0-3.55.717-4.984 2.044L28.63 9.8c2.115-1.901 4.84-2.726 7.564-2.726 3.98 0 7.6 1.578 7.6 6.561v11.186h-4.588z" fill="#00A298"></path></g><path fill-rule="evenodd" clip-rule="evenodd" d="M14.934 16.177c0 1.287-.136 2.541-.391 3.752-1.666-1.039-3.87-2.288-6.777-3.752 2.907-1.465 5.11-2.714 6.777-3.753.255 1.211.39 2.466.39 3.753m4.6-7.666V4.486a78.064 78.064 0 01-4.336 3.567c-1.551-2.367-3.533-4.038-6.14-5.207C11.1 4.658 12.504 6.7 13.564 9.262 5.35 15.155 0 16.177 0 16.177s5.35 1.021 13.564 6.915c-1.06 2.563-2.463 4.603-4.507 6.415 2.607-1.169 4.589-2.84 6.14-5.207a77.978 77.978 0 014.336 3.568v-4.025s-.492-.82-2.846-2.492c.6-1.611.93-3.354.93-5.174a14.8 14.8 0 00-.93-5.174c2.354-1.673 2.846-2.492 2.846-2.492" fill="#00A298"></path></svg>
|
||||
</a>
|
||||
|
||||
<!-- </Main description> -->
|
||||
|
||||
## Examples
|
||||
|
||||
**The following are some examples of the diagrams, charts and graphs that can be made using Mermaid. Click here to jump into the [text syntax](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference).**
|
||||
|
||||
<!-- <Flowchart> -->
|
||||
|
||||
### Flowchart [<a href="https://mermaid-js.github.io/mermaid/#/flowchart">docs</a> - <a href="https://mermaid.live/edit#pako:eNpNkMtqwzAQRX9FzKqFJK7t1km8KDQP6KJQSLOLvZhIY1tgS0GWmgbb_165IaFaiXvOFTPqgGtBkEJR6zOv0Fj2scsU8-ft8I5G5Gw6fe339GN7tnrYaafE45WvRsLW3Ya4bKVWwzVe_xU-FfVsc9hR62rLwvw_2591z7Y3FuUwgYZMg1L4ObrRzMBW1FAGqb8KKtCLGWRq8Ko7CbS0FdJqA2mBdUsTQGf110VxSK1xdJM2EkuDzd2qNQrypQ7s5TQuXcrW-ie5VoUsx9yZ2seVtac2DYIRz0ppK3eccd0ErRTjD1XfyyRIomSBUUzJPMaXOBb8GC4XRfQcFmL-FEYIwzD8AggvcHE">live editor</a>]
|
||||
|
||||
```
|
||||
flowchart LR
|
||||
|
||||
A[Hard] -->|Text| B(Round)
|
||||
B --> C{Decision}
|
||||
C -->|One| D[Result 1]
|
||||
C -->|Two| E[Result 2]
|
||||
```
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
|
||||
A[Hard] -->|Text| B(Round)
|
||||
B --> C{Decision}
|
||||
C -->|One| D[Result 1]
|
||||
C -->|Two| E[Result 2]
|
||||
```
|
||||
|
||||
### Sequence diagram [<a href="https://mermaid-js.github.io/mermaid/#/sequenceDiagram">docs</a> - <a href="https://mermaid.live/edit#pako:eNo9kMluwjAQhl_F-AykQMuSA1WrbuLQQ3v1ZbAnsVXHkzrjVhHi3etQwKfRv4w-z0FqMihL2eF3wqDxyUEdoVHhwTuNk-12RzaU4g29JzHMY2HpV0BE0VO6V8ETtdkGz1Zb1F8qiPyG5LX84mrLAmpwoWNh-5a0pWCiAxUwGBXeiVHEU4oq8V_6AHYUwAu2lLLTjVQ4bc1rT2yleI0IfJG320faZ9ABbk-Jz3hZnFxBduR9L2oiM5Jj2WBswJn8-cMArSRbbFDJMo8GK0ielVThmKOpNcD4bBxTlGUFvsOxhMT02QctS44JL6HzAS-iJzCYOwfJfTscunYd542aQuXqQU_RZ9kyt11ZFIM9rR3btJ9qaorOGQuR7c9mWSznyzXMF7hcLeBusTB6P9usq_ntrDKrm9kc5PF4_AMJE56Z">live editor</a>]
|
||||
|
||||
```
|
||||
sequenceDiagram
|
||||
Alice->>John: Hello John, how are you?
|
||||
loop Healthcheck
|
||||
John->>John: Fight against hypochondria
|
||||
end
|
||||
Note right of John: Rational thoughts!
|
||||
John-->>Alice: Great!
|
||||
John->>Bob: How about you?
|
||||
Bob-->>John: Jolly good!
|
||||
```
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
Alice->>John: Hello John, how are you?
|
||||
loop Healthcheck
|
||||
John->>John: Fight against hypochondria
|
||||
end
|
||||
Note right of John: Rational thoughts!
|
||||
John-->>Alice: Great!
|
||||
John->>Bob: How about you?
|
||||
Bob-->>John: Jolly good!
|
||||
```
|
||||
|
||||
### Gantt chart [<a href="https://mermaid-js.github.io/mermaid/#/gantt">docs</a> - <a href="https://mermaid.live/edit#pako:eNp90cGOgyAQBuBXIZxtFbG29bbZ3fsmvXKZylhJEAyOTZrGd1_sto3xsHMBhu-HBO689hp5xS_giJQbsCbjHTv9jcp9-q63SKhZpb3DhMXSOIiE5ZkoNpnYZGXynh6U-4jBK7JnVfBYJo9QvgjtEya1cj8QwFq0TMz4lZqxTBg0hOF5m1jifI2Lf7Bc490CyxUu1rhc4GLGPOEdhg6Mjq92V44xxanFDhWv4lRjA6MlxZWbIh17DYTf2pAPvGrADphwGMmfbq7mFYURX-jLwCVA91bWg8YYunO69Y8vMgPFI2vvGnOZ-2Owsd0S9UOVpvP29mKoHc_b2nfpYHQLgdrrsUzLvDxALrHcS9hJqeuzOB6avBCN3mciBz5N0y_wxZ0J">live editor</a>]
|
||||
|
||||
```
|
||||
gantt
|
||||
section Section
|
||||
Completed :done, des1, 2014-01-06,2014-01-08
|
||||
Active :active, des2, 2014-01-07, 3d
|
||||
Parallel 1 : des3, after des1, 1d
|
||||
Parallel 2 : des4, after des1, 1d
|
||||
Parallel 3 : des5, after des3, 1d
|
||||
Parallel 4 : des6, after des4, 1d
|
||||
```
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
section Section
|
||||
Completed :done, des1, 2014-01-06,2014-01-08
|
||||
Active :active, des2, 2014-01-07, 3d
|
||||
Parallel 1 : des3, after des1, 1d
|
||||
Parallel 2 : des4, after des1, 1d
|
||||
Parallel 3 : des5, after des3, 1d
|
||||
Parallel 4 : des6, after des4, 1d
|
||||
```
|
||||
|
||||
### Class diagram [<a href="https://mermaid-js.github.io/mermaid/#/classDiagram">docs</a> - <a href="https://mermaid.live/edit#pako:eNpdkTFPwzAQhf-K5QlQ2zQJJG1UBaGWDYmBgYEwXO1LYuTEwXYqlZL_jt02asXm--690zvfgTLFkWaUSTBmI6DS0BTt2lfzkKx-p1PytEO9f1FtdaQkI2ulZNGuVqK1qEtgmOfk7BitSzKdOhg59XuNGgk0RDxed-_IOr6uf8cZ6UhTZ8bvHqS5ub1mr9svZPbjk6DEBlu7AQuXyBkx4gcvDk9cUMJq0XT_YaW0kNK5j-ufAoRzcihaQvLcoN4Jv50vvVxw_xrnD3RCG9QNCO4-8OgpqK1dpoJm7smxhF7agp6kfcfB4jMXVmmalW4tnFDorXrbt4xmVvc4is53GKFUwNF5DtTuO3-sShjrJjLVlqLyvNfS4drazmRB4NuzSti6386YagIjeA3a1rtlEiRRsoAoxiSN4SGOOduGy0UZ3YclT-dhBHQYhj8dc6_I">live editor</a>]
|
||||
|
||||
```
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
<<Interface>> Class01
|
||||
Class09 --> C2 : Where am I?
|
||||
Class09 --* C3
|
||||
Class09 --|> Class07
|
||||
Class07 : equals()
|
||||
Class07 : Object[] elementData
|
||||
Class01 : size()
|
||||
Class01 : int chimp
|
||||
Class01 : int gorilla
|
||||
class Class10 {
|
||||
<<service>>
|
||||
int id
|
||||
size()
|
||||
}
|
||||
```
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
<<Interface>> Class01
|
||||
Class09 --> C2 : Where am I?
|
||||
Class09 --* C3
|
||||
Class09 --|> Class07
|
||||
Class07 : equals()
|
||||
Class07 : Object[] elementData
|
||||
Class01 : size()
|
||||
Class01 : int chimp
|
||||
Class01 : int gorilla
|
||||
class Class10 {
|
||||
<<service>>
|
||||
int id
|
||||
size()
|
||||
}
|
||||
```
|
||||
|
||||
### State diagram [<a href="https://mermaid-js.github.io/mermaid/#/stateDiagram">docs</a> - <a href="https://mermaid.live/edit#pako:eNpdkEFvgzAMhf8K8nEqpYSNthx22Xbcqcexg0sCiZQQlDhIFeK_L8A6TfXp6fOz9ewJGssFVOAJSbwr7ByadGR1n8T6evpO0vQ1uZDSekOrXGFsPqJPO6q-2-imH8f_0TeHXm50lfelsAMjnEHFY6xpMdRAUhhRQxUlFy0GTTXU_RytYeAx-AdXZB1ULWovdoCB7OXWN1CRC-Ju-r3uz6UtchGHJqDbsPygU57iysb2reoWHpyOWBINvsqypb3vFMlw3TfWZF5xiY7keC6zkpUnZIUojwW-FAVvrvn51LLnvOXHQ84Q5nn-AVtLcwk">live editor</a>]
|
||||
|
||||
```
|
||||
stateDiagram-v2
|
||||
[*] --> Still
|
||||
Still --> [*]
|
||||
Still --> Moving
|
||||
Moving --> Still
|
||||
Moving --> Crash
|
||||
Crash --> [*]
|
||||
```
|
||||
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
[*] --> Still
|
||||
Still --> [*]
|
||||
Still --> Moving
|
||||
Moving --> Still
|
||||
Moving --> Crash
|
||||
Crash --> [*]
|
||||
```
|
||||
|
||||
### Pie chart [<a href="https://mermaid-js.github.io/mermaid/#/pie">docs</a> - <a href="https://mermaid.live/edit#pako:eNo9jsFugzAMhl8F-VzBgEEh13Uv0F1zcYkTIpEEBadShXj3BU3dzf_n77e8wxQUgYDVkvQSbsFsEgpRtEN_5i_kvzx05XiC-xvUHVzAUXRoVe7v0heFBJ7JkQSRR0Ua08ISpD-ymlaFTN_KcoggNC4bXQATh5-Xn0BwTPSWbhZNRPdvLQEV5dIO_FrPZ43dOJ-cgtfWnDzFJeOZed1EVZ3r0lie06Ocgqs2q2aMPD_HvuqbfsCmpf7aYte2anrU46Cbz1qr60fdIBzH8QvW9lkl">live editor</a>]
|
||||
|
||||
```
|
||||
pie
|
||||
"Dogs" : 386
|
||||
"Cats" : 85.9
|
||||
"Rats" : 15
|
||||
```
|
||||
|
||||
```mermaid
|
||||
pie
|
||||
"Dogs" : 386
|
||||
"Cats" : 85.9
|
||||
"Rats" : 15
|
||||
```
|
||||
|
||||
### Git graph [experimental - <a href="https://mermaid.live/edit#pako:eNqNkMFugzAMhl8F-VyVAR1tOW_aA-zKxSSGRCMJCk6lCvHuNZPKZdM0n-zf3_8r8QIqaIIGMqnB8kfEybQ--y4VnLP8-9RF9Mpkmm40hmlnDKmvkPiH_kfS7nFo_VN0FAf6XwocQGgxa_nGsm1bYEOOWmik1dRjGrmF1q-Cpkkj07u2HCI0PY4zHQATh8-7V9BwTPSE3iwOEd1OjQE1iWkBvk_bzQY7s0Sq4Hs7bHqKo8iGeZqbPN_WR7mpSd1RHpvPVhuMbG7XOq_L-oJlRfW5wteq0qorrpe-PBW9Pr8UJcK6rg-BLYPQ">live editor</a>]
|
||||
|
||||
### User Journey diagram [<a href="https://mermaid-js.github.io/mermaid/#/user-journey">docs</a> - <a href="https://mermaid.live/edit#pako:eNplkMFuwjAQRH9l5TMiTVIC-FqqnjhxzWWJN4khsSN7XRSh_HsdKBVt97R6Mzsj-yoqq0hIAXCywRkaSwNxWHNHsB_hYt1ZmwYUfiueKtbWwIcFtjf5zgH2eCZgQgkrCXt64GgMg2fUzkvIn5Xd_V5COtMFvCH_62ht_5yk7MU8sn61HDTfxD8VYiF6cj1qFd94nWkpuKWYKWRcFdUYOi5FaaZoDYNCpnel2Toha-w8LQQGtofRVEKyC_Qw7TQ2DvsfV2dRUTy6Ch6H-UMb7TlGVtbUupl5cF3ELfPgZZLM8rLR3IbjsrJ94rVq0XH7uS2SIis2mOVUrHNc5bmqjul2U2evaa3WL2mGYpqmL2BGiho">live editor</a>]
|
||||
|
||||
```
|
||||
journey
|
||||
title My working day
|
||||
section Go to work
|
||||
Make tea: 5: Me
|
||||
Go upstairs: 3: Me
|
||||
Do work: 1: Me, Cat
|
||||
section Go home
|
||||
Go downstairs: 5: Me
|
||||
Sit down: 3: Me
|
||||
```
|
||||
|
||||
```mermaid
|
||||
journey
|
||||
title My working day
|
||||
section Go to work
|
||||
Make tea: 5: Me
|
||||
Go upstairs: 3: Me
|
||||
Do work: 1: Me, Cat
|
||||
section Go home
|
||||
Go downstairs: 5: Me
|
||||
Sit down: 3: Me
|
||||
```
|
||||
|
||||
### C4 diagram [<a href="https://mermaid-js.github.io/mermaid/#/c4c">docs</a>]
|
||||
|
||||
```
|
||||
C4Context
|
||||
title System Context diagram for Internet Banking System
|
||||
|
||||
Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.")
|
||||
Person(customerB, "Banking Customer B")
|
||||
Person_Ext(customerC, "Banking Customer C")
|
||||
System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.")
|
||||
|
||||
Person(customerD, "Banking Customer D", "A customer of the bank, <br/> with personal bank accounts.")
|
||||
|
||||
Enterprise_Boundary(b1, "BankBoundary") {
|
||||
|
||||
SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
|
||||
|
||||
System_Boundary(b2, "BankBoundary2") {
|
||||
System(SystemA, "Banking System A")
|
||||
System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.")
|
||||
}
|
||||
|
||||
System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.")
|
||||
SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.")
|
||||
|
||||
Boundary(b3, "BankBoundary3", "boundary") {
|
||||
SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.")
|
||||
SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.")
|
||||
}
|
||||
}
|
||||
|
||||
BiRel(customerA, SystemAA, "Uses")
|
||||
BiRel(SystemAA, SystemE, "Uses")
|
||||
Rel(SystemAA, SystemC, "Sends e-mails", "SMTP")
|
||||
Rel(SystemC, customerA, "Sends e-mails to")
|
||||
```
|
||||
|
||||
```mermaid
|
||||
C4Context
|
||||
title System Context diagram for Internet Banking System
|
||||
|
||||
Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.")
|
||||
Person(customerB, "Banking Customer B")
|
||||
Person_Ext(customerC, "Banking Customer C")
|
||||
System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.")
|
||||
|
||||
Person(customerD, "Banking Customer D", "A customer of the bank, <br/> with personal bank accounts.")
|
||||
|
||||
Enterprise_Boundary(b1, "BankBoundary") {
|
||||
|
||||
SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
|
||||
|
||||
System_Boundary(b2, "BankBoundary2") {
|
||||
System(SystemA, "Banking System A")
|
||||
System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.")
|
||||
}
|
||||
|
||||
System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.")
|
||||
SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.")
|
||||
|
||||
Boundary(b3, "BankBoundary3", "boundary") {
|
||||
SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.")
|
||||
SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.")
|
||||
}
|
||||
}
|
||||
|
||||
BiRel(customerA, SystemAA, "Uses")
|
||||
BiRel(SystemAA, SystemE, "Uses")
|
||||
Rel(SystemAA, SystemC, "Sends e-mails", "SMTP")
|
||||
Rel(SystemC, customerA, "Sends e-mails to")
|
||||
```
|
||||
|
||||
## Release
|
||||
|
||||
For those who have the permission to do so:
|
||||
|
||||
Update version number in `package.json`.
|
||||
|
||||
```sh
|
||||
npm publish
|
||||
```
|
||||
|
||||
The above command generates files into the `dist` folder and publishes them to npmjs.org.
|
||||
|
||||
## Related projects
|
||||
|
||||
- [Command Line Interface](https://github.com/mermaid-js/mermaid-cli)
|
||||
- [Live Editor](https://github.com/mermaid-js/mermaid-live-editor)
|
||||
- [HTTP Server](https://github.com/TomWright/mermaid-server)
|
||||
|
||||
## Contributors [](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%21%22) [](https://github.com/mermaid-js/mermaid/graphs/contributors) [](https://github.com/mermaid-js/mermaid/graphs/contributors)
|
||||
|
||||
Mermaid is a growing community and is always accepting new contributors. There's a lot of different ways to help out and we're always looking for extra hands! Look at [this issue](https://github.com/mermaid-js/mermaid/issues/866) if you want to know where to start helping out.
|
||||
|
||||
Detailed information about how to contribute can be found in the [contribution guide](CONTRIBUTING.md)
|
||||
|
||||
## Security and safe diagrams
|
||||
|
||||
For public sites, it can be precarious to retrieve text from users on the internet, storing that content for presentation in a browser at a later stage. The reason is that the user content can contain embedded malicious scripts that will run when the data is presented. For Mermaid this is a risk, specially as mermaid diagrams contain many characters that are used in html which makes the standard sanitation unusable as it also breaks the diagrams. We still make an effort to sanitise the incoming code and keep refining the process but it is hard to guarantee that there are no loop holes.
|
||||
|
||||
As an extra level of security for sites with external users we are happy to introduce a new security level in which the diagram is rendered in a sandboxed iframe preventing javascript in the code from being executed. This is a great step forward for better security.
|
||||
|
||||
_Unfortunately you can not have a cake and eat it at the same time which in this case means that some of the interactive functionality gets blocked along with the possible malicious code._
|
||||
|
||||
## Reporting vulnerabilities
|
||||
|
||||
To report a vulnerability, please e-mail security@mermaid.live with a description of the issue, the steps you took to create the issue, affected versions, and if known, mitigations for the issue.
|
||||
|
||||
## Appreciation
|
||||
|
||||
A quick note from Knut Sveidqvist:
|
||||
|
||||
> _Many thanks to the [d3](https://d3js.org/) and [dagre-d3](https://github.com/cpettitt/dagre-d3) projects for providing the graphical layout and drawing libraries!_ >_Thanks also to the [js-sequence-diagram](https://bramp.github.io/js-sequence-diagrams) project for usage of the grammar for the sequence diagrams. Thanks to Jessica Peter for inspiration and starting point for gantt rendering._ >_Thank you to [Tyler Long](https://github.com/tylerlong) who has been a collaborator since April 2017._
|
||||
>
|
||||
> _Thank you to the ever-growing list of [contributors](https://github.com/knsv/mermaid/graphs/contributors) that brought the project this far!_
|
||||
|
||||
---
|
||||
|
||||
_Mermaid was created by Knut Sveidqvist for easier documentation._
|
||||
+334
@@ -0,0 +1,334 @@
|
||||
# mermaid
|
||||
|
||||
[](https://github.com/mermaid-js/mermaid/actions/workflows/build.yml) [](https://www.npmjs.com/package/mermaid) [](https://bundlephobia.com/package/mermaid) [](https://coveralls.io/github/mermaid-js/mermaid?branch=master) [](https://www.jsdelivr.com/package/npm/mermaid) [](https://www.npmjs.com/package/mermaid) [](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE) [](https://twitter.com/mermaidjs_)
|
||||
|
||||
[English](./README.md) | 简体中文
|
||||
|
||||
<img src="./img/header.png" alt="" />
|
||||
|
||||
:trophy: **Mermaid 被提名并获得了 [JS Open Source Awards (2019)](https://osawards.com/javascript/2019) 的 "The most exciting use of technology" 奖项!!!**
|
||||
|
||||
**感谢所有参与进来提交 PR,解答疑问的人们! 🙏**
|
||||
|
||||
<a href="https://mermaid-js.github.io/mermaid/landing/"><img src="https://github.com/mermaid-js/mermaid/blob/master/docs/img/book-banner-pre-release.jpg" alt="Explore Mermaid.js in depth, with real-world examples, tips & tricks from the creator... The first official book on Mermaid is available for purchase. Check it out!"></a>
|
||||
|
||||
## 关于 Mermaid
|
||||
|
||||
<!-- <Main description> -->
|
||||
|
||||
Mermaid 是一个基于 Javascript 的图表绘制工具,通过解析类 Markdown 的文本语法来实现图表的创建和动态修改。Mermaid 诞生的主要目的是让文档的更新能够及时跟上开发进度。
|
||||
|
||||
> Doc-Rot 是 Mermaid 致力于解决的一个难题。
|
||||
|
||||
绘图和编写文档花费了开发者宝贵的开发时间,而且随着业务的变更,它很快就会过期。 但是如果缺少了图表或文档,对于生产力和团队新人的业务学习都会产生巨大的阻碍。 <br/>
|
||||
Mermaid 通过允许用户创建便于修改的图表来解决这一难题,它也可以作为生产脚本(或其他代码)的一部分。<br/>
|
||||
<br/>
|
||||
Mermaid 甚至能让非程序员也能通过 [Mermaid Live Editor](https://mermaid.live/) 轻松创建详细的图表。<br/>
|
||||
你可以访问 [教程](./docs/Tutorials.md) 来查看 Live Editor 的视频教程,也可以查看 [Mermaid 的集成和使用](./docs/integrations.md) 这个清单来检查你的文档工具是否已经集成了 Mermaid 支持。
|
||||
|
||||
如果想要查看关于 Mermaid 更详细的介绍及基础使用方式,可以查看 [入门指引](./docs/n00b-overview.md), [用法](./docs/usage.md) 和 [教程](./docs/Tutorials.md).
|
||||
|
||||
🌐 [CDN](https://unpkg.com/mermaid/) | 📖 [文档](https://mermaidjs.github.io) | 🙌 [贡献](https://github.com/mermaid-js/mermaid/blob/develop/CONTRIBUTING.md) | 📜 [更新日志](./docs/CHANGELOG.md)
|
||||
|
||||
<!-- </Main description> -->
|
||||
|
||||
## 示例
|
||||
|
||||
**下面是一些可以使用 Mermaid 创建的图表示例。点击 [语法](https://mermaid-js.github.io/mermaid/#/n00b-syntaxReference) 查看详情。**
|
||||
|
||||
<table>
|
||||
<!-- <Flowchart> -->
|
||||
|
||||
### 流程图 [<a href="https://mermaid-js.github.io/mermaid/#/flowchart">文档</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ3JhcGggVERcbiAgICBBW0hhcmRdIC0tPnxUZXh0fCBCKFJvdW5kKVxuICAgIEIgLS0-IEN7RGVjaXNpb259XG4gICAgQyAtLT58T25lfCBEW1Jlc3VsdCAxXVxuICAgIEMgLS0-fFR3b3wgRVtSZXN1bHQgMl0iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ">live editor</a>]
|
||||
|
||||
```
|
||||
flowchart LR
|
||||
A[Hard] -->|Text| B(Round)
|
||||
B --> C{Decision}
|
||||
C -->|One| D[Result 1]
|
||||
C -->|Two| E[Result 2]
|
||||
```
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
A[Hard] -->|Text| B(Round)
|
||||
B --> C{Decision}
|
||||
C -->|One| D[Result 1]
|
||||
C -->|Two| E[Result 2]
|
||||
```
|
||||
|
||||
### 时序图 [<a href="https://mermaid-js.github.io/mermaid/#/sequenceDiagram">文档</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG5BbGljZS0-PkpvaG46IEhlbGxvIEpvaG4sIGhvdyBhcmUgeW91P1xubG9vcCBIZWFsdGhjaGVja1xuICAgIEpvaG4tPj5Kb2huOiBGaWdodCBhZ2FpbnN0IGh5cG9jaG9uZHJpYVxuZW5kXG5Ob3RlIHJpZ2h0IG9mIEpvaG46IFJhdGlvbmFsIHRob3VnaHRzIVxuSm9obi0tPj5BbGljZTogR3JlYXQhXG5Kb2huLT4-Qm9iOiBIb3cgYWJvdXQgeW91P1xuQm9iLS0-PkpvaG46IEpvbGx5IGdvb2QhIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0">live editor</a>]
|
||||
|
||||
```
|
||||
sequenceDiagram
|
||||
Alice->>John: Hello John, how are you?
|
||||
loop Healthcheck
|
||||
John->>John: Fight against hypochondria
|
||||
end
|
||||
Note right of John: Rational thoughts!
|
||||
John-->>Alice: Great!
|
||||
John->>Bob: How about you?
|
||||
Bob-->>John: Jolly good!
|
||||
```
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
Alice->>John: Hello John, how are you?
|
||||
loop Healthcheck
|
||||
John->>John: Fight against hypochondria
|
||||
end
|
||||
Note right of John: Rational thoughts!
|
||||
John-->>Alice: Great!
|
||||
John->>Bob: How about you?
|
||||
Bob-->>John: Jolly good!
|
||||
```
|
||||
|
||||
### 甘特图 [<a href="https://mermaid-js.github.io/mermaid/#/gantt">文档</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ2FudHRcbnNlY3Rpb24gU2VjdGlvblxuQ29tcGxldGVkIDpkb25lLCAgICBkZXMxLCAyMDE0LTAxLTA2LDIwMTQtMDEtMDhcbkFjdGl2ZSAgICAgICAgOmFjdGl2ZSwgIGRlczIsIDIwMTQtMDEtMDcsIDNkXG5QYXJhbGxlbCAxICAgOiAgICAgICAgIGRlczMsIGFmdGVyIGRlczEsIDFkXG5QYXJhbGxlbCAyICAgOiAgICAgICAgIGRlczQsIGFmdGVyIGRlczEsIDFkXG5QYXJhbGxlbCAzICAgOiAgICAgICAgIGRlczUsIGFmdGVyIGRlczMsIDFkXG5QYXJhbGxlbCA0ICAgOiAgICAgICAgIGRlczYsIGFmdGVyIGRlczQsIDFkIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0">live editor</a>]
|
||||
|
||||
```
|
||||
gantt
|
||||
section Section
|
||||
Completed :done, des1, 2014-01-06,2014-01-08
|
||||
Active :active, des2, 2014-01-07, 3d
|
||||
Parallel 1 : des3, after des1, 1d
|
||||
Parallel 2 : des4, after des1, 1d
|
||||
Parallel 3 : des5, after des3, 1d
|
||||
Parallel 4 : des6, after des4, 1d
|
||||
```
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
section Section
|
||||
Completed :done, des1, 2014-01-06,2014-01-08
|
||||
Active :active, des2, 2014-01-07, 3d
|
||||
Parallel 1 : des3, after des1, 1d
|
||||
Parallel 2 : des4, after des1, 1d
|
||||
Parallel 3 : des5, after des3, 1d
|
||||
Parallel 4 : des6, after des4, 1d
|
||||
```
|
||||
|
||||
### 类图 [<a href="https://mermaid-js.github.io/mermaid/#/classDiagram">文档</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiY2xhc3NEaWFncmFtXG5DbGFzczAxIDx8LS0gQXZlcnlMb25nQ2xhc3MgOiBDb29sXG48PGludGVyZmFjZT4-IENsYXNzMDFcbkNsYXNzMDkgLS0-IEMyIDogV2hlcmUgYW0gaT9cbkNsYXNzMDkgLS0qIEMzXG5DbGFzczA5IC0tfD4gQ2xhc3MwN1xuQ2xhc3MwNyA6IGVxdWFscygpXG5DbGFzczA3IDogT2JqZWN0W10gZWxlbWVudERhdGFcbkNsYXNzMDEgOiBzaXplKClcbkNsYXNzMDEgOiBpbnQgY2hpbXBcbkNsYXNzMDEgOiBpbnQgZ29yaWxsYVxuY2xhc3MgQ2xhc3MxMCB7XG4gID4-c2VydmljZT4-XG4gIGludCBpZFxuICBzaXplKClcbn0iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ">live editor</a>]
|
||||
|
||||
```
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
<<Interface>> Class01
|
||||
Class09 --> C2 : Where am I?
|
||||
Class09 --* C3
|
||||
Class09 --|> Class07
|
||||
Class07 : equals()
|
||||
Class07 : Object[] elementData
|
||||
Class01 : size()
|
||||
Class01 : int chimp
|
||||
Class01 : int gorilla
|
||||
class Class10 {
|
||||
<<service>>
|
||||
int id
|
||||
size()
|
||||
}
|
||||
```
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
<<Interface>> Class01
|
||||
Class09 --> C2 : Where am I?
|
||||
Class09 --* C3
|
||||
Class09 --|> Class07
|
||||
Class07 : equals()
|
||||
Class07 : Object[] elementData
|
||||
Class01 : size()
|
||||
Class01 : int chimp
|
||||
Class01 : int gorilla
|
||||
class Class10 {
|
||||
<<service>>
|
||||
int id
|
||||
size()
|
||||
}
|
||||
```
|
||||
|
||||
### 状态图 [[<a href="https://mermaid-js.github.io/mermaid/#/stateDiagram">docs</a> - <a href="https://mermaid.live/#/edit/eyJjb2RlIjoic3RhdGVEaWFncmFtLXYyXG4gICAgWypdIC0tPiBTdGlsbFxuICAgIFN0aWxsIC0tPiBbKl1cbiAgICBTdGlsbCAtLT4gTW92aW5nXG4gICAgTW92aW5nIC0tPiBTdGlsbFxuICAgIE1vdmluZyAtLT4gQ3Jhc2hcbiAgICBDcmFzaCAtLT4gWypdIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQiLCJ0aGVtZVZhcmlhYmxlcyI6eyJiYWNrZ3JvdW5kIjoid2hpdGUiLCJwcmltYXJ5Q29sb3IiOiIjRUNFQ0ZGIiwic2Vjb25kYXJ5Q29sb3IiOiIjZmZmZmRlIiwidGVydGlhcnlDb2xvciI6ImhzbCg4MCwgMTAwJSwgOTYuMjc0NTA5ODAzOSUpIiwicHJpbWFyeUJvcmRlckNvbG9yIjoiaHNsKDI0MCwgNjAlLCA4Ni4yNzQ1MDk4MDM5JSkiLCJzZWNvbmRhcnlCb3JkZXJDb2xvciI6ImhzbCg2MCwgNjAlLCA4My41Mjk0MTE3NjQ3JSkiLCJ0ZXJ0aWFyeUJvcmRlckNvbG9yIjoiaHNsKDgwLCA2MCUsIDg2LjI3NDUwOTgwMzklKSIsInByaW1hcnlUZXh0Q29sb3IiOiIjMTMxMzAwIiwic2Vjb25kYXJ5VGV4dENvbG9yIjoiIzAwMDAyMSIsInRlcnRpYXJ5VGV4dENvbG9yIjoicmdiKDkuNTAwMDAwMDAwMSwgOS41MDAwMDAwMDAxLCA5LjUwMDAwMDAwMDEpIiwibGluZUNvbG9yIjoiIzMzMzMzMyIsInRleHRDb2xvciI6IiMzMzMiLCJtYWluQmtnIjoiI0VDRUNGRiIsInNlY29uZEJrZyI6IiNmZmZmZGUiLCJib3JkZXIxIjoiIzkzNzBEQiIsImJvcmRlcjIiOiIjYWFhYTMzIiwiYXJyb3doZWFkQ29sb3IiOiIjMzMzMzMzIiwiZm9udEZhbWlseSI6IlwidHJlYnVjaGV0IG1zXCIsIHZlcmRhbmEsIGFyaWFsIiwiZm9udFNpemUiOiIxNnB4IiwibGFiZWxCYWNrZ3JvdW5kIjoiI2U4ZThlOCIsIm5vZGVCa2ciOiIjRUNFQ0ZGIiwibm9kZUJvcmRlciI6IiM5MzcwREIiLCJjbHVzdGVyQmtnIjoiI2ZmZmZkZSIsImNsdXN0ZXJCb3JkZXIiOiIjYWFhYTMzIiwiZGVmYXVsdExpbmtDb2xvciI6IiMzMzMzMzMiLCJ0aXRsZUNvbG9yIjoiIzMzMyIsImVkZ2VMYWJlbEJhY2tncm91bmQiOiIjZThlOGU4IiwiYWN0b3JCb3JkZXIiOiJoc2woMjU5LjYyNjE2ODIyNDMsIDU5Ljc3NjUzNjMxMjglLCA4Ny45MDE5NjA3ODQzJSkiLCJhY3RvckJrZyI6IiNFQ0VDRkYiLCJhY3RvclRleHRDb2xvciI6ImJsYWNrIiwiYWN0b3JMaW5lQ29sb3IiOiJncmV5Iiwic2lnbmFsQ29sb3IiOiIjMzMzIiwic2lnbmFsVGV4dENvbG9yIjoiIzMzMyIsImxhYmVsQm94QmtnQ29sb3IiOiIjRUNFQ0ZGIiwibGFiZWxCb3hCb3JkZXJDb2xvciI6ImhzbCgyNTkuNjI2MTY4MjI0MywgNTkuNzc2NTM2MzEyOCUsIDg3LjkwMTk2MDc4NDMlKSIsImxhYmVsVGV4dENvbG9yIjoiYmxhY2siLCJsb29wVGV4dENvbG9yIjoiYmxhY2siLCJub3RlQm9yZGVyQ29sb3IiOiIjYWFhYTMzIiwibm90ZUJrZ0NvbG9yIjoiI2ZmZjVhZCIsIm5vdGVUZXh0Q29sb3IiOiJibGFjayIsImFjdGl2YXRpb25Cb3JkZXJDb2xvciI6IiM2NjYiLCJhY3RpdmF0aW9uQmtnQ29sb3IiOiIjZjRmNGY0Iiwic2VxdWVuY2VOdW1iZXJDb2xvciI6IndoaXRlIiwic2VjdGlvbkJrZ0NvbG9yIjoicmdiYSgxMDIsIDEwMiwgMjU1LCAwLjQ5KSIsImFsdFNlY3Rpb25Ca2dDb2xvciI6IndoaXRlIiwic2VjdGlvbkJrZ0NvbG9yMiI6IiNmZmY0MDAiLCJ0YXNrQm9yZGVyQ29sb3IiOiIjNTM0ZmJjIiwidGFza0JrZ0NvbG9yIjoiIzhhOTBkZCIsInRhc2tUZXh0TGlnaHRDb2xvciI6IndoaXRlIiwidGFza1RleHRDb2xvciI6IndoaXRlIiwidGFza1RleHREYXJrQ29sb3IiOiJibGFjayIsInRhc2tUZXh0T3V0c2lkZUNvbG9yIjoiYmxhY2siLCJ0YXNrVGV4dENsaWNrYWJsZUNvbG9yIjoiIzAwMzE2MyIsImFjdGl2ZVRhc2tCb3JkZXJDb2xvciI6IiM1MzRmYmMiLCJhY3RpdmVUYXNrQmtnQ29sb3IiOiIjYmZjN2ZmIiwiZ3JpZENvbG9yIjoibGlnaHRncmV5IiwiZG9uZVRhc2tCa2dDb2xvciI6ImxpZ2h0Z3JleSIsImRvbmVUYXNrQm9yZGVyQ29sb3IiOiJncmV5IiwiY3JpdEJvcmRlckNvbG9yIjoiI2ZmODg4OCIsImNyaXRCa2dDb2xvciI6InJlZCIsInRvZGF5TGluZUNvbG9yIjoicmVkIiwibGFiZWxDb2xvciI6ImJsYWNrIiwiZXJyb3JCa2dDb2xvciI6IiM1NTIyMjIiLCJlcnJvclRleHRDb2xvciI6IiM1NTIyMjIiLCJjbGFzc1RleHQiOiIjMTMxMzAwIiwiZmlsbFR5cGUwIjoiI0VDRUNGRiIsImZpbGxUeXBlMSI6IiNmZmZmZGUiLCJmaWxsVHlwZTIiOiJoc2woMzA0LCAxMDAlLCA5Ni4yNzQ1MDk4MDM5JSkiLCJmaWxsVHlwZTMiOiJoc2woMTI0LCAxMDAlLCA5My41Mjk0MTE3NjQ3JSkiLCJmaWxsVHlwZTQiOiJoc2woMTc2LCAxMDAlLCA5Ni4yNzQ1MDk4MDM5JSkiLCJmaWxsVHlwZTUiOiJoc2woLTQsIDEwMCUsIDkzLjUyOTQxMTc2NDclKSIsImZpbGxUeXBlNiI6ImhzbCg4LCAxMDAlLCA5Ni4yNzQ1MDk4MDM5JSkiLCJmaWxsVHlwZTciOiJoc2woMTg4LCAxMDAlLCA5My41Mjk0MTE3NjQ3JSkifX0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9">live editor</a>]
|
||||
|
||||
```
|
||||
stateDiagram-v2
|
||||
[*] --> Still
|
||||
Still --> [*]
|
||||
Still --> Moving
|
||||
Moving --> Still
|
||||
Moving --> Crash
|
||||
Crash --> [*]
|
||||
```
|
||||
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
[*] --> Still
|
||||
Still --> [*]
|
||||
Still --> Moving
|
||||
Moving --> Still
|
||||
Moving --> Crash
|
||||
Crash --> [*]
|
||||
```
|
||||
|
||||
### 饼图 [<a href="https://mermaid-js.github.io/mermaid/#/pie">文档</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoicGllXG5cIkRvZ3NcIiA6IDQyLjk2XG5cIkNhdHNcIiA6IDUwLjA1XG5cIlJhdHNcIiA6IDEwLjAxIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0">live editor</a>]
|
||||
|
||||
```
|
||||
pie
|
||||
"Dogs" : 386
|
||||
"Cats" : 85
|
||||
"Rats" : 15
|
||||
```
|
||||
|
||||
```mermaid
|
||||
pie
|
||||
"Dogs" : 386
|
||||
"Cats" : 85
|
||||
"Rats" : 15
|
||||
```
|
||||
|
||||
### Git 图 [实验特性 - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZ2l0R3JhcGg6XG5vcHRpb25zXG57XG4gICAgXCJub2RlU3BhY2luZ1wiOiAxNTAsXG4gICAgXCJub2RlUmFkaXVzXCI6IDEwXG59XG5lbmRcbmNvbW1pdFxuYnJhbmNoIG5ld2JyYW5jaFxuY2hlY2tvdXQgbmV3YnJhbmNoXG5jb21taXRcbmNvbW1pdFxuY2hlY2tvdXQgbWFzdGVyXG5jb21taXRcbmNvbW1pdFxubWVyZ2UgbmV3YnJhbmNoXG4iLCJtZXJtYWlkIjp7InRoZW1lIjoiZGVmYXVsdCJ9fQ">live editor</a>]
|
||||
|
||||
### 用户体验旅程图 [<a href="https://mermaid-js.github.io/mermaid/#/user-journey">文档</a> - <a href="https://mermaidjs.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoic3RhdGVEaWFncmFtXG4gICAgWypdIC0tPiBTdGlsbFxuICAgIFN0aWxsIC0tPiBbKl1cbiAgICBTdGlsbCAtLT4gTW92aW5nXG4gICAgTW92aW5nIC0tPiBTdGlsbFxuICAgIE1vdmluZyAtLT4gQ3Jhc2hcbiAgICBDcmFzaCAtLT4gWypdIiwibWVybWFpZCI6eyJ0aGVtZSI6ImRlZmF1bHQifX0">live editor</a>]
|
||||
|
||||
```
|
||||
journey
|
||||
title My working day
|
||||
section Go to work
|
||||
Make tea: 5: Me
|
||||
Go upstairs: 3: Me
|
||||
Do work: 1: Me, Cat
|
||||
section Go home
|
||||
Go downstairs: 5: Me
|
||||
Sit down: 3: Me
|
||||
```
|
||||
|
||||
```mermaid
|
||||
journey
|
||||
title My working day
|
||||
section Go to work
|
||||
Make tea: 5: Me
|
||||
Go upstairs: 3: Me
|
||||
Do work: 1: Me, Cat
|
||||
section Go home
|
||||
Go downstairs: 5: Me
|
||||
Sit down: 3: Me
|
||||
```
|
||||
|
||||
### C4 图 [<a href="https://mermaid-js.github.io/mermaid/#/c4c">文档</a>]
|
||||
|
||||
```
|
||||
C4Context
|
||||
title System Context diagram for Internet Banking System
|
||||
|
||||
Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.")
|
||||
Person(customerB, "Banking Customer B")
|
||||
Person_Ext(customerC, "Banking Customer C")
|
||||
System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.")
|
||||
|
||||
Person(customerD, "Banking Customer D", "A customer of the bank, <br/> with personal bank accounts.")
|
||||
|
||||
Enterprise_Boundary(b1, "BankBoundary") {
|
||||
|
||||
SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
|
||||
|
||||
System_Boundary(b2, "BankBoundary2") {
|
||||
System(SystemA, "Banking System A")
|
||||
System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.")
|
||||
}
|
||||
|
||||
System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.")
|
||||
SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.")
|
||||
|
||||
Boundary(b3, "BankBoundary3", "boundary") {
|
||||
SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.")
|
||||
SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.")
|
||||
}
|
||||
}
|
||||
|
||||
BiRel(customerA, SystemAA, "Uses")
|
||||
BiRel(SystemAA, SystemE, "Uses")
|
||||
Rel(SystemAA, SystemC, "Sends e-mails", "SMTP")
|
||||
Rel(SystemC, customerA, "Sends e-mails to")
|
||||
```
|
||||
|
||||
```mermaid
|
||||
C4Context
|
||||
title System Context diagram for Internet Banking System
|
||||
|
||||
Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.")
|
||||
Person(customerB, "Banking Customer B")
|
||||
Person_Ext(customerC, "Banking Customer C")
|
||||
System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.")
|
||||
|
||||
Person(customerD, "Banking Customer D", "A customer of the bank, <br/> with personal bank accounts.")
|
||||
|
||||
Enterprise_Boundary(b1, "BankBoundary") {
|
||||
|
||||
SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
|
||||
|
||||
System_Boundary(b2, "BankBoundary2") {
|
||||
System(SystemA, "Banking System A")
|
||||
System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.")
|
||||
}
|
||||
|
||||
System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.")
|
||||
SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.")
|
||||
|
||||
Boundary(b3, "BankBoundary3", "boundary") {
|
||||
SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.")
|
||||
SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.")
|
||||
}
|
||||
}
|
||||
|
||||
BiRel(customerA, SystemAA, "Uses")
|
||||
BiRel(SystemAA, SystemE, "Uses")
|
||||
Rel(SystemAA, SystemC, "Sends e-mails", "SMTP")
|
||||
Rel(SystemC, customerA, "Sends e-mails to")
|
||||
```
|
||||
|
||||
## 发布
|
||||
|
||||
对于有权限的同学来说,你可以通过以下步骤来完成发布操作:
|
||||
|
||||
更新 `package.json` 中的版本号,然后执行如下命令:
|
||||
|
||||
```sh
|
||||
npm publish
|
||||
```
|
||||
|
||||
以上的命令会将文件打包到 `dist` 目录并发布至 npmjs.org.
|
||||
|
||||
## 相关项目
|
||||
|
||||
- [Command Line Interface](https://github.com/mermaid-js/mermaid-cli)
|
||||
- [Live Editor](https://github.com/mermaid-js/mermaid-live-editor)
|
||||
- [HTTP Server](https://github.com/TomWright/mermaid-server)
|
||||
|
||||
## 贡献者 [](https://github.com/mermaid-js/mermaid/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+first+issue%21%22) [](https://github.com/mermaid-js/mermaid/graphs/contributors) [](https://github.com/mermaid-js/mermaid/graphs/contributors)
|
||||
|
||||
Mermaid 是一个不断发展中的社区,并且还在接收新的贡献者。有很多不同的方式可以参与进来,而且我们还在寻找额外的帮助。如果你想知道如何开始贡献,请查看 [这个 issue](https://github.com/mermaid-js/mermaid/issues/866)。
|
||||
|
||||
关于如何贡献的详细信息可以在 [贡献指南](CONTRIBUTING.md) 中找到。
|
||||
|
||||
## 安全
|
||||
|
||||
对于公开网站来说,从互联网上的用户处检索文本、存储供后续在浏览器中展示的内容可能是不安全的,理由是用户的内容可能嵌入一些数据加载完成之后就会运行的恶意脚本,这些对于 Mermaid 来说毫无疑问是一个风险,尤其是 mermaid 图表还包含了许多在 html 中使用的字符,这意味着我们难以使用常规的手段来过滤不安全代码,因为这些常规手段会造成图表损坏。我们仍然在努力对获取到的代码进行安全过滤并不断完善我们的程序,但很难保证没有漏洞。
|
||||
|
||||
作为拥有外部用户的网站的额外安全级别,我们很高兴推出一个新的安全级别,其中的图表在沙盒 iframe 中渲染,防止代码中的 javascript 被执行,这是在安全性方面迈出的一大步。
|
||||
|
||||
_很不幸的是,鱼与熊掌不可兼得,在这个场景下它意味着在可能的恶意代码被阻止时,也会损失部分交互能力_。
|
||||
|
||||
## 报告漏洞
|
||||
|
||||
如果想要报告漏洞,请发送邮件到 security@mermaid.live, 并附上问题的描述、复现问题的步骤、受影响的版本,以及解决问题的方案(如果有的话)。
|
||||
|
||||
## 鸣谢
|
||||
|
||||
来自 Knut Sveidqvist:
|
||||
|
||||
> _特别感谢 [d3](https://d3js.org/) 和 [dagre-d3](https://github.com/cpettitt/dagre-d3) 这两个优秀的项目,它们提供了图形布局和绘图工具库! _ >_同样感谢 [js-sequence-diagram](https://bramp.github.io/js-sequence-diagrams) 提供了时序图语法的使用。 感谢 Jessica Peter 提供了甘特图渲染的灵感。_ >_感谢 [Tyler Long](https://github.com/tylerlong) 从 2017 年四月开始成为了项目的合作者。_
|
||||
>
|
||||
> _感谢越来越多的 [贡献者们](https://github.com/knsv/mermaid/graphs/contributors),没有你们,就没有这个项目的今天!_
|
||||
|
||||
---
|
||||
|
||||
_Mermaid 是由 Knut Sveidqvist 创建,它为了更简单的文档编写而生。_
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import { type DetailedError } from './utils';
|
||||
export declare type ParseErrorFunction = (err: string | DetailedError, hash?: any) => void;
|
||||
export declare class Diagram {
|
||||
txt: string;
|
||||
type: string;
|
||||
parser: any;
|
||||
renderer: any;
|
||||
db: import("./diagram-api/types").DiagramDb;
|
||||
private detectTypeFailed;
|
||||
constructor(txt: string, parseError?: ParseErrorFunction);
|
||||
parse(text: string, parseError?: ParseErrorFunction): boolean;
|
||||
handleError(error: unknown, parseError?: ParseErrorFunction): void;
|
||||
getParser(): any;
|
||||
getType(): string;
|
||||
}
|
||||
export declare const getDiagramFromText: (txt: string, parseError?: ParseErrorFunction) => Diagram | Promise<Diagram>;
|
||||
export default Diagram;
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import { type ParseErrorFunction } from '../Diagram';
|
||||
/** {@inheritDoc mermaidAPI.parse} */
|
||||
declare function parse(text: string, parseError?: ParseErrorFunction): boolean;
|
||||
export declare const mermaidAPI: {
|
||||
render: import("vitest/dist/index-9f5bc072").x<any[], any>;
|
||||
renderAsync: import("vitest/dist/index-9f5bc072").x<any[], any>;
|
||||
parse: typeof parse;
|
||||
parseDirective: import("vitest/dist/index-9f5bc072").x<any[], any>;
|
||||
initialize: import("vitest/dist/index-9f5bc072").x<any[], any>;
|
||||
getConfig: () => import("../config.type").MermaidConfig;
|
||||
setConfig: (conf: import("../config.type").MermaidConfig) => import("../config.type").MermaidConfig;
|
||||
getSiteConfig: () => import("../config.type").MermaidConfig;
|
||||
updateSiteConfig: (conf: import("../config.type").MermaidConfig) => import("../config.type").MermaidConfig;
|
||||
reset: () => void;
|
||||
globalReset: () => void;
|
||||
defaultConfig: import("../config.type").MermaidConfig;
|
||||
};
|
||||
export default mermaidAPI;
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Accessibility (a11y) functions, types, helpers
|
||||
*
|
||||
*/
|
||||
import { D3Element } from './mermaidAPI';
|
||||
/**
|
||||
* Add aria-roledescription to the svg element to the diagramType
|
||||
*
|
||||
* @param svg - d3 object that contains the SVG HTML element
|
||||
* @param diagramType - diagram name for to the aria-roledescription
|
||||
*/
|
||||
export declare function setA11yDiagramInfo(svg: D3Element, diagramType: string | null | undefined): void;
|
||||
/**
|
||||
* Add an accessible title and/or description element to a chart.
|
||||
* The title is usually not displayed and the description is never displayed.
|
||||
*
|
||||
* The following charts display their title as a visual and accessibility element: gantt
|
||||
*
|
||||
* @param svg - d3 node to insert the a11y title and desc info
|
||||
* @param a11yTitle - a11y title. null and undefined are meaningful: means to skip it
|
||||
* @param a11yDesc - a11y description. null and undefined are meaningful: means to skip it
|
||||
* @param baseId - id used to construct the a11y title and description id
|
||||
*/
|
||||
export declare function addSVGa11yTitleDescription(svg: D3Element, a11yTitle: string | null | undefined, a11yDesc: string | null | undefined, baseId: string): void;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
export default assignWithDepth;
|
||||
/**
|
||||
* @function assignWithDepth Extends the functionality of {@link ObjectConstructor.assign} with the
|
||||
* ability to merge arbitrary-depth objects For each key in src with path `k` (recursively)
|
||||
* performs an Object.assign(dst[`k`], src[`k`]) with a slight change from the typical handling of
|
||||
* undefined for dst[`k`]: instead of raising an error, dst[`k`] is auto-initialized to {} and
|
||||
* effectively merged with src[`k`]<p> Additionally, dissimilar types will not clobber unless the
|
||||
* config.clobber parameter === true. Example:
|
||||
*
|
||||
* ```js
|
||||
* let config_0 = { foo: { bar: 'bar' }, bar: 'foo' };
|
||||
* let config_1 = { foo: 'foo', bar: 'bar' };
|
||||
* let result = assignWithDepth(config_0, config_1);
|
||||
* console.log(result);
|
||||
* //-> result: { foo: { bar: 'bar' }, bar: 'bar' }
|
||||
* ```
|
||||
*
|
||||
* Traditional Object.assign would have clobbered foo in config_0 with foo in config_1. If src is a
|
||||
* destructured array of objects and dst is not an array, assignWithDepth will apply each element
|
||||
* of src to dst in order.
|
||||
* @param {any} dst - The destination of the merge
|
||||
* @param {any} src - The source object(s) to merge into destination
|
||||
* @param {{ depth: number; clobber: boolean }} [config={ depth: 2, clobber: false }] - Depth: depth
|
||||
* to traverse within src and dst for merging - clobber: should dissimilar types clobber (default:
|
||||
* { depth: 2, clobber: false }). Default is `{ depth: 2, clobber: false }`
|
||||
* @returns {any}
|
||||
*/
|
||||
declare function assignWithDepth(dst: any, src: any, config?: {
|
||||
depth: number;
|
||||
clobber: boolean;
|
||||
} | undefined): any;
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
export declare const clear: () => void;
|
||||
export declare const setAccTitle: (txt: string) => void;
|
||||
export declare const getAccTitle: () => string;
|
||||
export declare const setAccDescription: (txt: string) => void;
|
||||
export declare const getAccDescription: () => string;
|
||||
export declare const setDiagramTitle: (txt: string) => void;
|
||||
export declare const getDiagramTitle: () => string;
|
||||
declare const _default: {
|
||||
setAccTitle: (txt: string) => void;
|
||||
getAccTitle: () => string;
|
||||
setDiagramTitle: (txt: string) => void;
|
||||
getDiagramTitle: () => string;
|
||||
getAccDescription: () => string;
|
||||
setAccDescription: (txt: string) => void;
|
||||
clear: () => void;
|
||||
};
|
||||
export default _default;
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
import type { MermaidConfig } from './config.type';
|
||||
export declare const defaultConfig: MermaidConfig;
|
||||
export declare const updateCurrentConfig: (siteCfg: MermaidConfig, _directives: any[]) => MermaidConfig;
|
||||
/**
|
||||
* ## setSiteConfig
|
||||
*
|
||||
* | Function | Description | Type | Values |
|
||||
* | ------------- | ------------------------------------- | ----------- | --------------------------------------- |
|
||||
* | setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |
|
||||
*
|
||||
* **Notes:** Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls
|
||||
* to reset() will reset the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig)
|
||||
* will reset siteConfig and currentConfig to the defaultConfig Note: currentConfig is set in this
|
||||
* function _Default value: At default, will mirror Global Config_
|
||||
*
|
||||
* @param conf - The base currentConfig to use as siteConfig
|
||||
* @returns The new siteConfig
|
||||
*/
|
||||
export declare const setSiteConfig: (conf: MermaidConfig) => MermaidConfig;
|
||||
export declare const saveConfigFromInitialize: (conf: MermaidConfig) => void;
|
||||
export declare const updateSiteConfig: (conf: MermaidConfig) => MermaidConfig;
|
||||
/**
|
||||
* ## getSiteConfig
|
||||
*
|
||||
* | Function | Description | Type | Values |
|
||||
* | ------------- | ------------------------------------------------- | ----------- | -------------------------------- |
|
||||
* | setSiteConfig | Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig |
|
||||
*
|
||||
* **Notes**: Returns **any** values in siteConfig.
|
||||
*
|
||||
* @returns The siteConfig
|
||||
*/
|
||||
export declare const getSiteConfig: () => MermaidConfig;
|
||||
/**
|
||||
* ## setConfig
|
||||
*
|
||||
* | Function | Description | Type | Values |
|
||||
* | ------------- | ------------------------------------- | ----------- | --------------------------------------- |
|
||||
* | setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |
|
||||
*
|
||||
* **Notes**: Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure
|
||||
* keys. Any values found in conf with key found in siteConfig.secure will be replaced with the
|
||||
* corresponding siteConfig value.
|
||||
*
|
||||
* @param conf - The potential currentConfig
|
||||
* @returns The currentConfig merged with the sanitized conf
|
||||
*/
|
||||
export declare const setConfig: (conf: MermaidConfig) => MermaidConfig;
|
||||
/**
|
||||
* ## getConfig
|
||||
*
|
||||
* | Function | Description | Type | Return Values |
|
||||
* | --------- | ------------------------- | ----------- | ------------------------------ |
|
||||
* | getConfig | Obtains the currentConfig | Get Request | Any Values from current Config |
|
||||
*
|
||||
* **Notes**: Returns **any** the currentConfig
|
||||
*
|
||||
* @returns The currentConfig
|
||||
*/
|
||||
export declare const getConfig: () => MermaidConfig;
|
||||
/**
|
||||
* ## sanitize
|
||||
*
|
||||
* | Function | Description | Type | Values |
|
||||
* | -------- | -------------------------------------- | ----------- | ------ |
|
||||
* | sanitize | Sets the siteConfig to desired values. | Put Request | None |
|
||||
*
|
||||
* Ensures options parameter does not attempt to override siteConfig secure keys **Notes**: modifies
|
||||
* options in-place
|
||||
*
|
||||
* @param options - The potential setConfig parameter
|
||||
*/
|
||||
export declare const sanitize: (options: any) => void;
|
||||
/**
|
||||
* Pushes in a directive to the configuration
|
||||
*
|
||||
* @param directive - The directive to push in
|
||||
*/
|
||||
export declare const addDirective: (directive: any) => void;
|
||||
/**
|
||||
* ## reset
|
||||
*
|
||||
* | Function | Description | Type | Required | Values |
|
||||
* | -------- | ---------------------------- | ----------- | -------- | ------ |
|
||||
* | reset | Resets currentConfig to conf | Put Request | Required | None |
|
||||
*
|
||||
* ## conf
|
||||
*
|
||||
* | Parameter | Description | Type | Required | Values |
|
||||
* | --------- | -------------------------------------------------------------- | ---------- | -------- | -------------------------------------------- |
|
||||
* | conf | base set of values, which currentConfig could be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array |
|
||||
*
|
||||
* **Notes**: (default: current siteConfig ) (optional, default `getSiteConfig()`)
|
||||
*
|
||||
* @param config - base set of values, which currentConfig could be **reset** to.
|
||||
* Defaults to the current siteConfig (e.g returned by {@link getSiteConfig}).
|
||||
*/
|
||||
export declare const reset: (config?: MermaidConfig) => void;
|
||||
+348
@@ -0,0 +1,348 @@
|
||||
import DOMPurify from 'dompurify';
|
||||
export interface MermaidConfig {
|
||||
/** @deprecated use mermaid.registerLazyDiagrams instead */
|
||||
lazyLoadedDiagrams?: string[];
|
||||
/** @deprecated use mermaid.registerLazyDiagrams instead */
|
||||
loadExternalDiagramsAtStartup?: boolean;
|
||||
theme?: string;
|
||||
themeVariables?: any;
|
||||
themeCSS?: string;
|
||||
maxTextSize?: number;
|
||||
darkMode?: boolean;
|
||||
htmlLabels?: boolean;
|
||||
fontFamily?: string;
|
||||
altFontFamily?: string;
|
||||
logLevel?: number;
|
||||
securityLevel?: string;
|
||||
startOnLoad?: boolean;
|
||||
arrowMarkerAbsolute?: boolean;
|
||||
secure?: string[];
|
||||
deterministicIds?: boolean;
|
||||
deterministicIDSeed?: string;
|
||||
flowchart?: FlowchartDiagramConfig;
|
||||
sequence?: SequenceDiagramConfig;
|
||||
gantt?: GanttDiagramConfig;
|
||||
journey?: JourneyDiagramConfig;
|
||||
class?: ClassDiagramConfig;
|
||||
state?: StateDiagramConfig;
|
||||
er?: ErDiagramConfig;
|
||||
pie?: PieDiagramConfig;
|
||||
requirement?: RequirementDiagramConfig;
|
||||
mindmap?: MindmapDiagramConfig;
|
||||
gitGraph?: GitGraphDiagramConfig;
|
||||
c4?: C4DiagramConfig;
|
||||
dompurifyConfig?: DOMPurify.Config;
|
||||
wrap?: boolean;
|
||||
fontSize?: number;
|
||||
}
|
||||
export interface BaseDiagramConfig {
|
||||
useWidth?: number;
|
||||
useMaxWidth?: boolean;
|
||||
}
|
||||
export interface C4DiagramConfig extends BaseDiagramConfig {
|
||||
diagramMarginX?: number;
|
||||
diagramMarginY?: number;
|
||||
c4ShapeMargin?: number;
|
||||
c4ShapePadding?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
boxMargin?: number;
|
||||
c4ShapeInRow?: number;
|
||||
nextLinePaddingX?: number;
|
||||
c4BoundaryInRow?: number;
|
||||
personFontSize?: string | number;
|
||||
personFontFamily?: string;
|
||||
personFontWeight?: string | number;
|
||||
external_personFontSize?: string | number;
|
||||
external_personFontFamily?: string;
|
||||
external_personFontWeight?: string | number;
|
||||
systemFontSize?: string | number;
|
||||
systemFontFamily?: string;
|
||||
systemFontWeight?: string | number;
|
||||
external_systemFontSize?: string | number;
|
||||
external_systemFontFamily?: string;
|
||||
external_systemFontWeight?: string | number;
|
||||
system_dbFontSize?: string | number;
|
||||
system_dbFontFamily?: string;
|
||||
system_dbFontWeight?: string | number;
|
||||
external_system_dbFontSize?: string | number;
|
||||
external_system_dbFontFamily?: string;
|
||||
external_system_dbFontWeight?: string | number;
|
||||
system_queueFontSize?: string | number;
|
||||
system_queueFontFamily?: string;
|
||||
system_queueFontWeight?: string | number;
|
||||
external_system_queueFontSize?: string | number;
|
||||
external_system_queueFontFamily?: string;
|
||||
external_system_queueFontWeight?: string | number;
|
||||
boundaryFontSize?: string | number;
|
||||
boundaryFontFamily?: string;
|
||||
boundaryFontWeight?: string | number;
|
||||
messageFontSize?: string | number;
|
||||
messageFontFamily?: string;
|
||||
messageFontWeight?: string | number;
|
||||
containerFontSize?: string | number;
|
||||
containerFontFamily?: string;
|
||||
containerFontWeight?: string | number;
|
||||
external_containerFontSize?: string | number;
|
||||
external_containerFontFamily?: string;
|
||||
external_containerFontWeight?: string | number;
|
||||
container_dbFontSize?: string | number;
|
||||
container_dbFontFamily?: string;
|
||||
container_dbFontWeight?: string | number;
|
||||
external_container_dbFontSize?: string | number;
|
||||
external_container_dbFontFamily?: string;
|
||||
external_container_dbFontWeight?: string | number;
|
||||
container_queueFontSize?: string | number;
|
||||
container_queueFontFamily?: string;
|
||||
container_queueFontWeight?: string | number;
|
||||
external_container_queueFontSize?: string | number;
|
||||
external_container_queueFontFamily?: string;
|
||||
external_container_queueFontWeight?: string | number;
|
||||
componentFontSize?: string | number;
|
||||
componentFontFamily?: string;
|
||||
componentFontWeight?: string | number;
|
||||
external_componentFontSize?: string | number;
|
||||
external_componentFontFamily?: string;
|
||||
external_componentFontWeight?: string | number;
|
||||
component_dbFontSize?: string | number;
|
||||
component_dbFontFamily?: string;
|
||||
component_dbFontWeight?: string | number;
|
||||
external_component_dbFontSize?: string | number;
|
||||
external_component_dbFontFamily?: string;
|
||||
external_component_dbFontWeight?: string | number;
|
||||
component_queueFontSize?: string | number;
|
||||
component_queueFontFamily?: string;
|
||||
component_queueFontWeight?: string | number;
|
||||
external_component_queueFontSize?: string | number;
|
||||
external_component_queueFontFamily?: string;
|
||||
external_component_queueFontWeight?: string | number;
|
||||
wrap?: boolean;
|
||||
wrapPadding?: number;
|
||||
person_bg_color?: string;
|
||||
person_border_color?: string;
|
||||
external_person_bg_color?: string;
|
||||
external_person_border_color?: string;
|
||||
system_bg_color?: string;
|
||||
system_border_color?: string;
|
||||
system_db_bg_color?: string;
|
||||
system_db_border_color?: string;
|
||||
system_queue_bg_color?: string;
|
||||
system_queue_border_color?: string;
|
||||
external_system_bg_color?: string;
|
||||
external_system_border_color?: string;
|
||||
external_system_db_bg_color?: string;
|
||||
external_system_db_border_color?: string;
|
||||
external_system_queue_bg_color?: string;
|
||||
external_system_queue_border_color?: string;
|
||||
container_bg_color?: string;
|
||||
container_border_color?: string;
|
||||
container_db_bg_color?: string;
|
||||
container_db_border_color?: string;
|
||||
container_queue_bg_color?: string;
|
||||
container_queue_border_color?: string;
|
||||
external_container_bg_color?: string;
|
||||
external_container_border_color?: string;
|
||||
external_container_db_bg_color?: string;
|
||||
external_container_db_border_color?: string;
|
||||
external_container_queue_bg_color?: string;
|
||||
external_container_queue_border_color?: string;
|
||||
component_bg_color?: string;
|
||||
component_border_color?: string;
|
||||
component_db_bg_color?: string;
|
||||
component_db_border_color?: string;
|
||||
component_queue_bg_color?: string;
|
||||
component_queue_border_color?: string;
|
||||
external_component_bg_color?: string;
|
||||
external_component_border_color?: string;
|
||||
external_component_db_bg_color?: string;
|
||||
external_component_db_border_color?: string;
|
||||
external_component_queue_bg_color?: string;
|
||||
external_component_queue_border_color?: string;
|
||||
personFont?: FontCalculator;
|
||||
external_personFont?: FontCalculator;
|
||||
systemFont?: FontCalculator;
|
||||
external_systemFont?: FontCalculator;
|
||||
system_dbFont?: FontCalculator;
|
||||
external_system_dbFont?: FontCalculator;
|
||||
system_queueFont?: FontCalculator;
|
||||
external_system_queueFont?: FontCalculator;
|
||||
containerFont?: FontCalculator;
|
||||
external_containerFont?: FontCalculator;
|
||||
container_dbFont?: FontCalculator;
|
||||
external_container_dbFont?: FontCalculator;
|
||||
container_queueFont?: FontCalculator;
|
||||
external_container_queueFont?: FontCalculator;
|
||||
componentFont?: FontCalculator;
|
||||
external_componentFont?: FontCalculator;
|
||||
component_dbFont?: FontCalculator;
|
||||
external_component_dbFont?: FontCalculator;
|
||||
component_queueFont?: FontCalculator;
|
||||
external_component_queueFont?: FontCalculator;
|
||||
boundaryFont?: FontCalculator;
|
||||
messageFont?: FontCalculator;
|
||||
}
|
||||
export interface GitGraphDiagramConfig extends BaseDiagramConfig {
|
||||
titleTopMargin?: number;
|
||||
diagramPadding?: number;
|
||||
nodeLabel?: NodeLabel;
|
||||
mainBranchName?: string;
|
||||
mainBranchOrder?: number;
|
||||
showCommitLabel?: boolean;
|
||||
showBranches?: boolean;
|
||||
rotateCommitLabel?: boolean;
|
||||
arrowMarkerAbsolute?: boolean;
|
||||
}
|
||||
export interface NodeLabel {
|
||||
width?: number;
|
||||
height?: number;
|
||||
x?: number;
|
||||
y?: number;
|
||||
}
|
||||
export interface RequirementDiagramConfig extends BaseDiagramConfig {
|
||||
rect_fill?: string;
|
||||
text_color?: string;
|
||||
rect_border_size?: string;
|
||||
rect_border_color?: string;
|
||||
rect_min_width?: number;
|
||||
rect_min_height?: number;
|
||||
fontSize?: number;
|
||||
rect_padding?: number;
|
||||
line_height?: number;
|
||||
}
|
||||
export interface MindmapDiagramConfig extends BaseDiagramConfig {
|
||||
useMaxWidth: boolean;
|
||||
padding: number;
|
||||
maxNodeWidth: number;
|
||||
}
|
||||
export declare type PieDiagramConfig = BaseDiagramConfig;
|
||||
export interface ErDiagramConfig extends BaseDiagramConfig {
|
||||
titleTopMargin?: number;
|
||||
diagramPadding?: number;
|
||||
layoutDirection?: string;
|
||||
minEntityWidth?: number;
|
||||
minEntityHeight?: number;
|
||||
entityPadding?: number;
|
||||
stroke?: string;
|
||||
fill?: string;
|
||||
fontSize?: number;
|
||||
}
|
||||
export interface StateDiagramConfig extends BaseDiagramConfig {
|
||||
titleTopMargin?: number;
|
||||
arrowMarkerAbsolute?: boolean;
|
||||
dividerMargin?: number;
|
||||
sizeUnit?: number;
|
||||
padding?: number;
|
||||
textHeight?: number;
|
||||
titleShift?: number;
|
||||
noteMargin?: number;
|
||||
forkWidth?: number;
|
||||
forkHeight?: number;
|
||||
miniPadding?: number;
|
||||
fontSizeFactor?: number;
|
||||
fontSize?: number;
|
||||
labelHeight?: number;
|
||||
edgeLengthFactor?: string;
|
||||
compositTitleSize?: number;
|
||||
radius?: number;
|
||||
defaultRenderer?: string;
|
||||
}
|
||||
export interface ClassDiagramConfig extends BaseDiagramConfig {
|
||||
titleTopMargin?: number;
|
||||
arrowMarkerAbsolute?: boolean;
|
||||
dividerMargin?: number;
|
||||
padding?: number;
|
||||
textHeight?: number;
|
||||
defaultRenderer?: string;
|
||||
}
|
||||
export interface JourneyDiagramConfig extends BaseDiagramConfig {
|
||||
diagramMarginX?: number;
|
||||
diagramMarginY?: number;
|
||||
leftMargin?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
boxMargin?: number;
|
||||
boxTextMargin?: number;
|
||||
noteMargin?: number;
|
||||
messageMargin?: number;
|
||||
messageAlign?: string;
|
||||
bottomMarginAdj?: number;
|
||||
rightAngles?: boolean;
|
||||
taskFontSize?: string | number;
|
||||
taskFontFamily?: string;
|
||||
taskMargin?: number;
|
||||
activationWidth?: number;
|
||||
textPlacement?: string;
|
||||
actorColours?: string[];
|
||||
sectionFills?: string[];
|
||||
sectionColours?: string[];
|
||||
}
|
||||
export interface GanttDiagramConfig extends BaseDiagramConfig {
|
||||
titleTopMargin?: number;
|
||||
barHeight?: number;
|
||||
barGap?: number;
|
||||
topPadding?: number;
|
||||
rightPadding?: number;
|
||||
leftPadding?: number;
|
||||
gridLineStartPadding?: number;
|
||||
fontSize?: number;
|
||||
sectionFontSize?: string | number;
|
||||
numberSectionStyles?: number;
|
||||
axisFormat?: string;
|
||||
tickInterval?: string;
|
||||
topAxis?: boolean;
|
||||
}
|
||||
export interface SequenceDiagramConfig extends BaseDiagramConfig {
|
||||
arrowMarkerAbsolute?: boolean;
|
||||
hideUnusedParticipants?: boolean;
|
||||
activationWidth?: number;
|
||||
diagramMarginX?: number;
|
||||
diagramMarginY?: number;
|
||||
actorMargin?: number;
|
||||
width?: number;
|
||||
height?: number;
|
||||
boxMargin?: number;
|
||||
boxTextMargin?: number;
|
||||
noteMargin?: number;
|
||||
messageMargin?: number;
|
||||
messageAlign?: string;
|
||||
mirrorActors?: boolean;
|
||||
forceMenus?: boolean;
|
||||
bottomMarginAdj?: number;
|
||||
rightAngles?: boolean;
|
||||
showSequenceNumbers?: boolean;
|
||||
actorFontSize?: string | number;
|
||||
actorFontFamily?: string;
|
||||
actorFontWeight?: string | number;
|
||||
noteFontSize?: string | number;
|
||||
noteFontFamily?: string;
|
||||
noteFontWeight?: string | number;
|
||||
noteAlign?: string;
|
||||
messageFontSize?: string | number;
|
||||
messageFontFamily?: string;
|
||||
messageFontWeight?: string | number;
|
||||
wrap?: boolean;
|
||||
wrapPadding?: number;
|
||||
labelBoxWidth?: number;
|
||||
labelBoxHeight?: number;
|
||||
messageFont?: FontCalculator;
|
||||
noteFont?: FontCalculator;
|
||||
actorFont?: FontCalculator;
|
||||
}
|
||||
export interface FlowchartDiagramConfig extends BaseDiagramConfig {
|
||||
titleTopMargin?: number;
|
||||
arrowMarkerAbsolute?: boolean;
|
||||
diagramPadding?: number;
|
||||
htmlLabels?: boolean;
|
||||
nodeSpacing?: number;
|
||||
rankSpacing?: number;
|
||||
curve?: string;
|
||||
padding?: number;
|
||||
defaultRenderer?: string;
|
||||
}
|
||||
export interface FontConfig {
|
||||
fontSize?: string | number;
|
||||
fontFamily?: string;
|
||||
fontWeight?: string | number;
|
||||
}
|
||||
export declare type FontCalculator = () => Partial<FontConfig>;
|
||||
export {};
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
export function insertCluster(elem: any, node: any): void;
|
||||
export function getClusterTitleWidth(elem: any, node: any): number;
|
||||
export function clear(): void;
|
||||
export function positionCluster(node: any): void;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default createLabel;
|
||||
declare function createLabel(_vertexText: any, style: any, isTitle: any, isNode: any): SVGTextElement | SVGForeignObjectElement;
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
export function clear(): void;
|
||||
export function insertEdgeLabel(elem: any, edge: any): void;
|
||||
export function positionEdgeLabel(edge: any, paths: any): void;
|
||||
export function intersection(node: any, outsidePoint: any, insidePoint: any): {
|
||||
x: any;
|
||||
y: number;
|
||||
} | {
|
||||
x: number;
|
||||
y: any;
|
||||
};
|
||||
export function insertEdge(elem: any, e: any, edge: any, clusterDb: any, diagramType: any, graph: any): {
|
||||
updatedPath: any;
|
||||
originalPath: any;
|
||||
};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export function render(elem: any, graph: any, markers: any, diagramtype: any, id: any): void;
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
declare namespace _default {
|
||||
export { node };
|
||||
export { circle };
|
||||
export { ellipse };
|
||||
export { polygon };
|
||||
export { rect };
|
||||
}
|
||||
export default _default;
|
||||
import node from "./intersect-node.js";
|
||||
import circle from "./intersect-circle.js";
|
||||
import ellipse from "./intersect-ellipse.js";
|
||||
import polygon from "./intersect-polygon.js";
|
||||
import rect from "./intersect-rect.js";
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
export default intersectCircle;
|
||||
/**
|
||||
* @param node
|
||||
* @param rx
|
||||
* @param point
|
||||
*/
|
||||
declare function intersectCircle(node: any, rx: any, point: any): {
|
||||
x: any;
|
||||
y: any;
|
||||
};
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
export default intersectEllipse;
|
||||
/**
|
||||
* @param node
|
||||
* @param rx
|
||||
* @param ry
|
||||
* @param point
|
||||
*/
|
||||
declare function intersectEllipse(node: any, rx: any, ry: any, point: any): {
|
||||
x: any;
|
||||
y: any;
|
||||
};
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
export default intersectLine;
|
||||
/**
|
||||
* Returns the point at which two lines, p and q, intersect or returns undefined if they do not intersect.
|
||||
*
|
||||
* @param p1
|
||||
* @param p2
|
||||
* @param q1
|
||||
* @param q2
|
||||
*/
|
||||
declare function intersectLine(p1: any, p2: any, q1: any, q2: any): {
|
||||
x: number;
|
||||
y: number;
|
||||
} | undefined;
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
export default intersectNode;
|
||||
/**
|
||||
* @param node
|
||||
* @param point
|
||||
*/
|
||||
declare function intersectNode(node: any, point: any): any;
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
export default intersectPolygon;
|
||||
/**
|
||||
* Returns the point ({x, y}) at which the point argument intersects with the node argument assuming
|
||||
* that it has the shape specified by polygon.
|
||||
*
|
||||
* @param node
|
||||
* @param polyPoints
|
||||
* @param point
|
||||
*/
|
||||
declare function intersectPolygon(node: any, polyPoints: any, point: any): any;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
export default intersectRect;
|
||||
declare function intersectRect(node: any, point: any): {
|
||||
x: any;
|
||||
y: any;
|
||||
};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default insertMarkers;
|
||||
declare function insertMarkers(elem: any, markerArray: any, type: any, id: any): void;
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
export let clusterDb: {};
|
||||
export function clear(): void;
|
||||
export function extractDescendants(id: any, graph: any): any[];
|
||||
export function validate(graph: any): boolean;
|
||||
export function findNonClusterChild(id: any, graph: any): any;
|
||||
export function adjustClustersAndEdges(graph: any, depth: any): void;
|
||||
export function extractor(graph: any, depth: any): void;
|
||||
export function sortNodesByHierarchy(graph: any): any;
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
export function insertNode(elem: any, node: any, dir: any): void;
|
||||
export function setNodeElem(elem: any, node: any): void;
|
||||
export function clear(): void;
|
||||
export function positionNode(node: any): any;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default note;
|
||||
declare function note(parent: any, node: any): any;
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* @param parent
|
||||
* @param w
|
||||
* @param h
|
||||
* @param points
|
||||
*/
|
||||
export function insertPolygonShape(parent: any, w: any, h: any, points: any): any;
|
||||
export function labelHelper(parent: any, node: any, _classes: any, isNode: any): {
|
||||
shapeSvg: any;
|
||||
bbox: any;
|
||||
halfPadding: number;
|
||||
label: any;
|
||||
};
|
||||
export function updateNodeBounds(node: any, element: any): void;
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
import { MermaidConfig } from './config.type';
|
||||
/**
|
||||
* **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more[[click
|
||||
* here](8.6.0_docs.md)].**
|
||||
*
|
||||
* ## **What follows are config instructions for older versions**
|
||||
*
|
||||
* These are the default options which can be overridden with the initialization call like so:
|
||||
*
|
||||
* **Example 1:**
|
||||
*
|
||||
* ```js
|
||||
* mermaid.initialize({ flowchart:{ htmlLabels: false } });
|
||||
* ```
|
||||
*
|
||||
* **Example 2:**
|
||||
*
|
||||
* ```html
|
||||
* <script>
|
||||
* const config = {
|
||||
* startOnLoad:true,
|
||||
* flowchart:{ useMaxWidth:true, htmlLabels:true, curve:'cardinal'},
|
||||
* securityLevel:'loose',
|
||||
* };
|
||||
* mermaid.initialize(config);
|
||||
* </script>
|
||||
* ```
|
||||
*
|
||||
* A summary of all options and their defaults is found [here](#mermaidapi-configuration-defaults).
|
||||
* A description of each option follows below.
|
||||
*/
|
||||
declare const config: Partial<MermaidConfig>;
|
||||
export declare const configKeys: string[];
|
||||
export default config;
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
import { MermaidConfig } from '../config.type';
|
||||
import { DiagramDetector, DiagramLoader } from './types';
|
||||
/**
|
||||
* Detects the type of the graph text.
|
||||
*
|
||||
* Takes into consideration the possible existence of an `%%init` directive
|
||||
*
|
||||
* @param text - The text defining the graph. For example:
|
||||
*
|
||||
* ```mermaid
|
||||
* %%{initialize: {"startOnLoad": true, logLevel: "fatal" }}%%
|
||||
* graph LR
|
||||
* a-->b
|
||||
* b-->c
|
||||
* c-->d
|
||||
* d-->e
|
||||
* e-->f
|
||||
* f-->g
|
||||
* g-->h
|
||||
* ```
|
||||
*
|
||||
* @param config - The mermaid config.
|
||||
* @returns A graph definition key
|
||||
*/
|
||||
export declare const detectType: (text: string, config?: MermaidConfig) => string;
|
||||
export declare const addDetector: (key: string, detector: DiagramDetector, loader?: DiagramLoader) => void;
|
||||
export declare const getDiagramLoader: (key: string) => DiagramLoader | undefined;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export declare const addDiagrams: () => void;
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
import { DiagramDefinition, DiagramDetector } from './types';
|
||||
export declare const log: Record<import("../logger").LogLevel, {
|
||||
(...data: any[]): void;
|
||||
(message?: any, ...optionalParams: any[]): void;
|
||||
}>;
|
||||
export declare const setLogLevel: (level?: string | number) => void;
|
||||
export declare const getConfig: () => import("../config.type").MermaidConfig;
|
||||
export declare const sanitizeText: (text: string) => string;
|
||||
export declare const setupGraphViewbox: (graph: any, svgElem: any, padding: any, useMaxWidth: any) => void;
|
||||
export interface Detectors {
|
||||
[key: string]: DiagramDetector;
|
||||
}
|
||||
/**
|
||||
* Registers the given diagram with Mermaid.
|
||||
*
|
||||
* Can be used for third-party custom diagrams.
|
||||
*
|
||||
* @param id - A unique ID for the given diagram.
|
||||
* @param diagram - The diagram definition.
|
||||
* @param detector - Function that returns `true` if a given mermaid text is this diagram definition.
|
||||
*/
|
||||
export declare const registerDiagram: (id: string, diagram: DiagramDefinition, detector?: DiagramDetector) => void;
|
||||
export declare const getDiagram: (name: string) => DiagramDefinition;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { DiagramDb } from './types';
|
||||
export declare const frontMatterRegex: RegExp;
|
||||
/**
|
||||
* Extract and parse frontmatter from text, if present, and sets appropriate
|
||||
* properties in the provided db.
|
||||
* @param text - The text that may have a YAML frontmatter.
|
||||
* @param db - Diagram database, could be of any diagram.
|
||||
* @returns text with frontmatter stripped out
|
||||
*/
|
||||
export declare function extractFrontMatter(text: string, db: DiagramDb): string;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
import { MermaidConfig } from '../config.type';
|
||||
export interface InjectUtils {
|
||||
_log: any;
|
||||
_setLogLevel: any;
|
||||
_getConfig: any;
|
||||
_sanitizeText: any;
|
||||
_setupGraphViewbox: any;
|
||||
}
|
||||
/**
|
||||
* Generic Diagram DB that may apply to any diagram type.
|
||||
*/
|
||||
export interface DiagramDb {
|
||||
clear?: () => void;
|
||||
setDiagramTitle?: (title: string) => void;
|
||||
getAccTitle?: () => string;
|
||||
getAccDescription?: () => string;
|
||||
}
|
||||
export interface DiagramDefinition {
|
||||
db: DiagramDb;
|
||||
renderer: any;
|
||||
parser: any;
|
||||
styles: any;
|
||||
init?: (config: MermaidConfig) => void;
|
||||
injectUtils?: (_log: InjectUtils['_log'], _setLogLevel: InjectUtils['_setLogLevel'], _getConfig: InjectUtils['_getConfig'], _sanitizeText: InjectUtils['_sanitizeText'], _setupGraphViewbox: InjectUtils['_setupGraphViewbox']) => void;
|
||||
}
|
||||
export interface DetectorRecord {
|
||||
detector: DiagramDetector;
|
||||
loader?: DiagramLoader;
|
||||
}
|
||||
export interface ExternalDiagramDefinition {
|
||||
id: string;
|
||||
detector: DiagramDetector;
|
||||
loader: DiagramLoader;
|
||||
}
|
||||
export declare type DiagramDetector = (text: string, config?: MermaidConfig) => boolean;
|
||||
export declare type DiagramLoader = () => Promise<{
|
||||
id: string;
|
||||
diagram: DiagramDefinition;
|
||||
}>;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
export function getC4Type(): any;
|
||||
export function setC4Type(c4TypeParam: any): void;
|
||||
export function parseDirective(statement: any, context: any, type: any): void;
|
||||
export function addRel(type: any, from: any, to: any, label: any, techn: any, descr: any, sprite: any, tags: any, link: any): void;
|
||||
export function addPersonOrSystem(typeC4Shape: any, alias: any, label: any, descr: any, sprite: any, tags: any, link: any): void;
|
||||
export function addContainer(typeC4Shape: any, alias: any, label: any, techn: any, descr: any, sprite: any, tags: any, link: any): void;
|
||||
export function addComponent(typeC4Shape: any, alias: any, label: any, techn: any, descr: any, sprite: any, tags: any, link: any): void;
|
||||
export function addPersonOrSystemBoundary(alias: any, label: any, type: any, tags: any, link: any): void;
|
||||
export function addContainerBoundary(alias: any, label: any, type: any, tags: any, link: any): void;
|
||||
export function addDeploymentNode(nodeType: any, alias: any, label: any, type: any, descr: any, sprite: any, tags: any, link: any): void;
|
||||
export function popBoundaryParseStack(): void;
|
||||
export function updateElStyle(typeC4Shape: any, elementName: any, bgColor: any, fontColor: any, borderColor: any, shadowing: any, shape: any, sprite: any, techn: any, legendText: any, legendSprite: any): void;
|
||||
export function updateRelStyle(typeC4Shape: any, from: any, to: any, textColor: any, lineColor: any, offsetX: any, offsetY: any): void;
|
||||
export function updateLayoutConfig(typeC4Shape: any, c4ShapeInRowParam: any, c4BoundaryInRowParam: any): void;
|
||||
export function getC4ShapeInRow(): number;
|
||||
export function getC4BoundaryInRow(): number;
|
||||
export function getCurrentBoundaryParse(): string;
|
||||
export function getParentBoundaryParse(): string;
|
||||
export function getC4ShapeArray(parentBoundary: any): any[];
|
||||
export function getC4Shape(alias: any): any;
|
||||
export function getC4ShapeKeys(parentBoundary: any): string[];
|
||||
export function getBoundarys(parentBoundary: any): {
|
||||
alias: string;
|
||||
label: {
|
||||
text: string;
|
||||
};
|
||||
type: {
|
||||
text: string;
|
||||
};
|
||||
tags: null;
|
||||
link: null;
|
||||
parentBoundary: string;
|
||||
}[];
|
||||
export function getRels(): any[];
|
||||
export function getTitle(): string;
|
||||
export function setWrap(wrapSetting: any): void;
|
||||
export function autoWrap(): boolean;
|
||||
export function clear(): void;
|
||||
export namespace LINETYPE {
|
||||
const SOLID: number;
|
||||
const DOTTED: number;
|
||||
const NOTE: number;
|
||||
const SOLID_CROSS: number;
|
||||
const DOTTED_CROSS: number;
|
||||
const SOLID_OPEN: number;
|
||||
const DOTTED_OPEN: number;
|
||||
const LOOP_START: number;
|
||||
const LOOP_END: number;
|
||||
const ALT_START: number;
|
||||
const ALT_ELSE: number;
|
||||
const ALT_END: number;
|
||||
const OPT_START: number;
|
||||
const OPT_END: number;
|
||||
const ACTIVE_START: number;
|
||||
const ACTIVE_END: number;
|
||||
const PAR_START: number;
|
||||
const PAR_AND: number;
|
||||
const PAR_END: number;
|
||||
const RECT_START: number;
|
||||
const RECT_END: number;
|
||||
const SOLID_POINT: number;
|
||||
const DOTTED_POINT: number;
|
||||
}
|
||||
export namespace ARROWTYPE {
|
||||
const FILLED: number;
|
||||
const OPEN: number;
|
||||
}
|
||||
export namespace PLACEMENT {
|
||||
const LEFTOF: number;
|
||||
const RIGHTOF: number;
|
||||
const OVER: number;
|
||||
}
|
||||
export function setTitle(txt: any): void;
|
||||
declare namespace _default {
|
||||
export { addPersonOrSystem };
|
||||
export { addPersonOrSystemBoundary };
|
||||
export { addContainer };
|
||||
export { addContainerBoundary };
|
||||
export { addComponent };
|
||||
export { addDeploymentNode };
|
||||
export { popBoundaryParseStack };
|
||||
export { addRel };
|
||||
export { updateElStyle };
|
||||
export { updateRelStyle };
|
||||
export { updateLayoutConfig };
|
||||
export { autoWrap };
|
||||
export { setWrap };
|
||||
export { getC4ShapeArray };
|
||||
export { getC4Shape };
|
||||
export { getC4ShapeKeys };
|
||||
export { getBoundarys };
|
||||
export { getCurrentBoundaryParse };
|
||||
export { getParentBoundaryParse };
|
||||
export { getRels };
|
||||
export { getTitle };
|
||||
export { getC4Type };
|
||||
export { getC4ShapeInRow };
|
||||
export { getC4BoundaryInRow };
|
||||
export { setAccTitle };
|
||||
export { getAccTitle };
|
||||
export { getAccDescription };
|
||||
export { setAccDescription };
|
||||
export { parseDirective };
|
||||
export function getConfig(): import("../../config.type").C4DiagramConfig | undefined;
|
||||
export { clear };
|
||||
export { LINETYPE };
|
||||
export { ARROWTYPE };
|
||||
export { PLACEMENT };
|
||||
export { setTitle };
|
||||
export { setC4Type };
|
||||
}
|
||||
export default _default;
|
||||
import { setAccTitle } from "../../commonDb";
|
||||
import { getAccTitle } from "../../commonDb";
|
||||
import { getAccDescription } from "../../commonDb";
|
||||
import { setAccDescription } from "../../commonDb";
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const c4Detector: DiagramDetector;
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
export function setConf(cnf: any): void;
|
||||
export function drawBoundary(diagram: any, boundary: any, bounds: any): void;
|
||||
export function drawC4ShapeArray(currentBounds: any, diagram: any, c4ShapeArray: any, c4ShapeKeys: any): void;
|
||||
export function drawRels(diagram: any, rels: any, getC4ShapeObj: any, diagObj: any): void;
|
||||
export function draw(_text: any, id: any, _version: any, diagObj: any): void;
|
||||
declare namespace _default {
|
||||
export { drawC4ShapeArray as drawPersonOrSystemArray };
|
||||
export { drawBoundary };
|
||||
export { setConf };
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(options: any): string;
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
export function drawRect(elem: any, rectData: any): any;
|
||||
export function drawImage(elem: any, width: any, height: any, x: any, y: any, link: any): void;
|
||||
export function drawRels(elem: any, rels: any, conf: any): void;
|
||||
export function drawC4Shape(elem: any, c4Shape: any, conf: any): any;
|
||||
export function insertDatabaseIcon(elem: any): void;
|
||||
export function insertComputerIcon(elem: any): void;
|
||||
export function insertClockIcon(elem: any): void;
|
||||
export function insertArrowHead(elem: any): void;
|
||||
export function insertArrowEnd(elem: any): void;
|
||||
export function insertArrowFilledHead(elem: any): void;
|
||||
export function insertDynamicNumber(elem: any): void;
|
||||
export function insertArrowCrossHead(elem: any): void;
|
||||
export function getNoteRect(): {
|
||||
x: number;
|
||||
y: number;
|
||||
fill: string;
|
||||
stroke: string;
|
||||
width: number;
|
||||
anchor: string;
|
||||
height: number;
|
||||
rx: number;
|
||||
ry: number;
|
||||
};
|
||||
declare namespace _default {
|
||||
export { drawRect };
|
||||
export { drawBoundary };
|
||||
export { drawC4Shape };
|
||||
export { drawRels };
|
||||
export { drawImage };
|
||||
export { insertArrowHead };
|
||||
export { insertArrowEnd };
|
||||
export { insertArrowFilledHead };
|
||||
export { insertDynamicNumber };
|
||||
export { insertArrowCrossHead };
|
||||
export { insertDatabaseIcon };
|
||||
export { insertComputerIcon };
|
||||
export { insertClockIcon };
|
||||
export { getNoteRect };
|
||||
export { sanitizeUrl };
|
||||
}
|
||||
export default _default;
|
||||
/**
|
||||
* Draws an boundary in the diagram
|
||||
*
|
||||
* @param {any} elem - The diagram we'll draw to.
|
||||
* @param {any} boundary - The boundary to draw.
|
||||
* @param {any} conf - DrawText implementation discriminator object
|
||||
*/
|
||||
declare function drawBoundary(elem: any, boundary: any, conf: any): void;
|
||||
import { sanitizeUrl } from "@braintree/sanitize-url";
|
||||
+79
@@ -0,0 +1,79 @@
|
||||
export function parseDirective(statement: any, context: any, type: any): void;
|
||||
export function addClass(id: any): void;
|
||||
export function lookUpDomId(id: any): any;
|
||||
export function clear(): void;
|
||||
export function getClass(id: any): any;
|
||||
export function getClasses(): {};
|
||||
export function getRelations(): any[];
|
||||
export function getNotes(): any[];
|
||||
export function addRelation(relation: any): void;
|
||||
export function addAnnotation(className: any, annotation: any): void;
|
||||
export function addMember(className: any, member: any): void;
|
||||
export function addMembers(className: any, members: any): void;
|
||||
export function addNote(text: any, className: any): void;
|
||||
export function cleanupLabel(label: any): string;
|
||||
export function setCssClass(ids: any, className: any): void;
|
||||
export function getTooltip(id: any): any;
|
||||
export function setLink(ids: any, linkStr: any, target: any): void;
|
||||
export function setClickEvent(ids: any, functionName: any, functionArgs: any): void;
|
||||
export function bindFunctions(element: any): void;
|
||||
export namespace lineType {
|
||||
const LINE: number;
|
||||
const DOTTED_LINE: number;
|
||||
}
|
||||
export namespace relationType {
|
||||
const AGGREGATION: number;
|
||||
const EXTENSION: number;
|
||||
const COMPOSITION: number;
|
||||
const DEPENDENCY: number;
|
||||
const LOLLIPOP: number;
|
||||
}
|
||||
declare namespace _default {
|
||||
export { parseDirective };
|
||||
export { setAccTitle };
|
||||
export { getAccTitle };
|
||||
export { getAccDescription };
|
||||
export { setAccDescription };
|
||||
export function getConfig(): import("../../config.type").ClassDiagramConfig | undefined;
|
||||
export { addClass };
|
||||
export { bindFunctions };
|
||||
export { clear };
|
||||
export { getClass };
|
||||
export { getClasses };
|
||||
export { getNotes };
|
||||
export { addAnnotation };
|
||||
export { addNote };
|
||||
export { getRelations };
|
||||
export { addRelation };
|
||||
export { getDirection };
|
||||
export { setDirection };
|
||||
export { addMember };
|
||||
export { addMembers };
|
||||
export { cleanupLabel };
|
||||
export { lineType };
|
||||
export { relationType };
|
||||
export { setClickEvent };
|
||||
export { setCssClass };
|
||||
export { setLink };
|
||||
export { getTooltip };
|
||||
export { setTooltip };
|
||||
export { lookUpDomId };
|
||||
export { setDiagramTitle };
|
||||
export { getDiagramTitle };
|
||||
}
|
||||
export default _default;
|
||||
import { setAccTitle } from "../../commonDb";
|
||||
import { getAccTitle } from "../../commonDb";
|
||||
import { getAccDescription } from "../../commonDb";
|
||||
import { setAccDescription } from "../../commonDb";
|
||||
declare function getDirection(): string;
|
||||
declare function setDirection(dir: any): void;
|
||||
/**
|
||||
* Called by parser when a tooltip is found, e.g. a clickable element.
|
||||
*
|
||||
* @param ids Comma separated list of ids
|
||||
* @param tooltip Tooltip to add
|
||||
*/
|
||||
declare function setTooltip(ids: any, tooltip: any): void;
|
||||
import { setDiagramTitle } from "../../commonDb";
|
||||
import { getDiagramTitle } from "../../commonDb";
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const classDetectorV2: DiagramDetector;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const classDetector: DiagramDetector;
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
export function addClasses(classes: {
|
||||
[x: string]: {
|
||||
cssClasses: string[];
|
||||
text: string;
|
||||
id: string;
|
||||
type: string;
|
||||
domId: string;
|
||||
};
|
||||
}, g: SVGGElement, _id: any, diagObj: any): void;
|
||||
export function addNotes(notes: {
|
||||
text: string;
|
||||
class: string;
|
||||
placement: number;
|
||||
}[], g: SVGGElement, startEdgeId: number, classes: any): void;
|
||||
export function addRelations(relations: any, g: object): void;
|
||||
export function setConf(cnf: object): void;
|
||||
export function draw(text: string, id: string, _version: any, diagObj: any): void;
|
||||
declare namespace _default {
|
||||
export { setConf };
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
export function draw(text: string, id: string, _version: any, diagObj: any): void;
|
||||
declare namespace _default {
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(options: any): string;
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
export function drawEdge(elem: any, path: any, relation: any, conf: any, diagObj: any): void;
|
||||
export function drawClass(elem: SVGSVGElement, classDef: any, conf: any, diagObj: any): {
|
||||
id: any;
|
||||
label: any;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
export function drawNote(elem: SVGSVGElement, note: {
|
||||
id: string;
|
||||
text: string;
|
||||
class: string;
|
||||
}, conf: any, diagObj: any): {
|
||||
id: string;
|
||||
text: string;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
export function parseMember(text: any): {
|
||||
displayText: string;
|
||||
cssStyle: string;
|
||||
};
|
||||
declare namespace _default {
|
||||
export { drawClass };
|
||||
export { drawEdge };
|
||||
export { drawNote };
|
||||
export { parseMember };
|
||||
}
|
||||
export default _default;
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
import { MermaidConfig } from '../../config.type';
|
||||
/**
|
||||
* Gets the rows of lines in a string
|
||||
*
|
||||
* @param s - The string to check the lines for
|
||||
* @returns The rows in that string
|
||||
*/
|
||||
export declare const getRows: (s?: string) => string[];
|
||||
/**
|
||||
* Removes script tags from a text
|
||||
*
|
||||
* @param txt - The text to sanitize
|
||||
* @returns The safer text
|
||||
*/
|
||||
export declare const removeScript: (txt: string) => string;
|
||||
export declare const sanitizeText: (text: string, config: MermaidConfig) => string;
|
||||
export declare const sanitizeTextOrArray: (a: string | string[] | string[][], config: MermaidConfig) => string | string[];
|
||||
export declare const lineBreakRegex: RegExp;
|
||||
/**
|
||||
* Whether or not a text has any line breaks
|
||||
*
|
||||
* @param text - The text to test
|
||||
* @returns Whether or not the text has breaks
|
||||
*/
|
||||
export declare const hasBreaks: (text: string) => boolean;
|
||||
/**
|
||||
* Splits on <br> tags
|
||||
*
|
||||
* @param text - Text to split
|
||||
* @returns List of lines as strings
|
||||
*/
|
||||
export declare const splitBreaks: (text: string) => string[];
|
||||
/**
|
||||
* Converts a string/boolean into a boolean
|
||||
*
|
||||
* @param val - String or boolean to convert
|
||||
* @returns The result from the input
|
||||
*/
|
||||
export declare const evaluate: (val?: string | boolean) => boolean;
|
||||
/**
|
||||
* Makes generics in typescript syntax
|
||||
*
|
||||
* @example
|
||||
* Array of array of strings in typescript syntax
|
||||
*
|
||||
* ```js
|
||||
* // returns "Array<Array<string>>"
|
||||
* parseGenericTypes('Array~Array~string~~');
|
||||
* ```
|
||||
* @param text - The text to convert
|
||||
* @returns The converted string
|
||||
*/
|
||||
export declare const parseGenericTypes: (text: string) => string;
|
||||
declare const _default: {
|
||||
getRows: (s?: string | undefined) => string[];
|
||||
sanitizeText: (text: string, config: MermaidConfig) => string;
|
||||
sanitizeTextOrArray: (a: string | string[] | string[][], config: MermaidConfig) => string | string[];
|
||||
hasBreaks: (text: string) => boolean;
|
||||
splitBreaks: (text: string) => string[];
|
||||
lineBreakRegex: RegExp;
|
||||
removeScript: (txt: string) => string;
|
||||
getUrl: (useAbsolute: boolean) => string;
|
||||
evaluate: (val?: string | boolean | undefined) => boolean;
|
||||
};
|
||||
export default _default;
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
export function parseDirective(statement: any, context: any, type: any): void;
|
||||
declare namespace _default {
|
||||
export { Cardinality };
|
||||
export { Identification };
|
||||
export { parseDirective };
|
||||
export function getConfig(): import("../../config.type").ErDiagramConfig | undefined;
|
||||
export { addEntity };
|
||||
export { addAttributes };
|
||||
export { getEntities };
|
||||
export { addRelationship };
|
||||
export { getRelationships };
|
||||
export { clear };
|
||||
export { setAccTitle };
|
||||
export { getAccTitle };
|
||||
export { setAccDescription };
|
||||
export { getAccDescription };
|
||||
export { setDiagramTitle };
|
||||
export { getDiagramTitle };
|
||||
}
|
||||
export default _default;
|
||||
declare namespace Cardinality {
|
||||
const ZERO_OR_ONE: string;
|
||||
const ZERO_OR_MORE: string;
|
||||
const ONE_OR_MORE: string;
|
||||
const ONLY_ONE: string;
|
||||
}
|
||||
declare namespace Identification {
|
||||
const NON_IDENTIFYING: string;
|
||||
const IDENTIFYING: string;
|
||||
}
|
||||
declare function addEntity(name: any): any;
|
||||
declare function addAttributes(entityName: any, attribs: any): void;
|
||||
declare function getEntities(): {};
|
||||
/**
|
||||
* Add a relationship
|
||||
*
|
||||
* @param entA The first entity in the relationship
|
||||
* @param rolA The role played by the first entity in relation to the second
|
||||
* @param entB The second entity in the relationship
|
||||
* @param rSpec The details of the relationship between the two entities
|
||||
*/
|
||||
declare function addRelationship(entA: any, rolA: any, entB: any, rSpec: any): void;
|
||||
declare function getRelationships(): any[];
|
||||
declare function clear(): void;
|
||||
import { setAccTitle } from "../../commonDb";
|
||||
import { getAccTitle } from "../../commonDb";
|
||||
import { setAccDescription } from "../../commonDb";
|
||||
import { getAccDescription } from "../../commonDb";
|
||||
import { setDiagramTitle } from "../../commonDb";
|
||||
import { getDiagramTitle } from "../../commonDb";
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const erDetector: DiagramDetector;
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
declare namespace _default {
|
||||
export { ERMarkers };
|
||||
export { insertMarkers };
|
||||
}
|
||||
export default _default;
|
||||
declare namespace ERMarkers {
|
||||
const ONLY_ONE_START: string;
|
||||
const ONLY_ONE_END: string;
|
||||
const ZERO_OR_ONE_START: string;
|
||||
const ZERO_OR_ONE_END: string;
|
||||
const ONE_OR_MORE_START: string;
|
||||
const ONE_OR_MORE_END: string;
|
||||
const ZERO_OR_MORE_START: string;
|
||||
const ZERO_OR_MORE_END: string;
|
||||
}
|
||||
/**
|
||||
* Put the markers into the svg DOM for later use with edge paths
|
||||
*
|
||||
* @param elem
|
||||
* @param conf
|
||||
*/
|
||||
declare function insertMarkers(elem: any, conf: any): void;
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Return a unique id based on the given string. Start with the prefix, then a hyphen, then the
|
||||
* simplified str, then a hyphen, then a unique uuid. (Hyphens are only included if needed.)
|
||||
* Although the official XML standard for ids says that many more characters are valid in the id,
|
||||
* this keeps things simple by accepting only A-Za-z0-9.
|
||||
*
|
||||
* @param {string} str Given string to use as the basis for the id. Default is `''`
|
||||
* @param {string} prefix String to put at the start, followed by '-'. Default is `''`
|
||||
* @returns {string}
|
||||
* @see https://www.w3.org/TR/xml/#NT-Name
|
||||
*/
|
||||
export function generateId(str?: string, prefix?: string): string;
|
||||
export function setConf(cnf: any): void;
|
||||
export function draw(text: any, id: any, _version: any, diagObj: any): void;
|
||||
declare namespace _default {
|
||||
export { setConf };
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(options: any): string;
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Merges the value of `conf` with the passed `cnf`
|
||||
*
|
||||
* @param cnf - Config to merge
|
||||
*/
|
||||
export declare const setConf: (cnf: any) => void;
|
||||
/**
|
||||
* Draws a an info picture in the tag with id: id based on the graph definition in text.
|
||||
*
|
||||
* @param _text - Mermaid graph definition.
|
||||
* @param id - The text for the error
|
||||
* @param mermaidVersion - The version
|
||||
*/
|
||||
export declare const draw: (_text: string, id: string, mermaidVersion: string) => void;
|
||||
declare const _default: {
|
||||
setConf: (cnf: any) => void;
|
||||
draw: (_text: string, id: string, mermaidVersion: string) => void;
|
||||
};
|
||||
export default _default;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(): string;
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
/** @param render */
|
||||
export function addToRender(render: any): void;
|
||||
/** @param addShape */
|
||||
export function addToRenderV2(addShape: any): void;
|
||||
declare namespace _default {
|
||||
export { addToRender };
|
||||
export { addToRenderV2 };
|
||||
}
|
||||
export default _default;
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
export function parseDirective(statement: any, context: any, type: any): void;
|
||||
export function lookUpDomId(id: any): any;
|
||||
export function addVertex(_id: any, text: any, type: any, style: any, classes: any, dir: any, props?: {}): void;
|
||||
export function addSingleLink(_start: any, _end: any, type: any, linkText: any): void;
|
||||
export function addLink(_start: any, _end: any, type: any, linktext: any): void;
|
||||
export function updateLinkInterpolate(positions: any, interp: any): void;
|
||||
export function updateLink(positions: any, style: any): void;
|
||||
export function addClass(id: any, style: any): void;
|
||||
export function setDirection(dir: any): void;
|
||||
export function setClass(ids: any, className: any): void;
|
||||
export function setLink(ids: any, linkStr: any, target: any): void;
|
||||
export function getTooltip(id: any): any;
|
||||
export function setClickEvent(ids: any, functionName: any, functionArgs: any): void;
|
||||
export function bindFunctions(element: any): void;
|
||||
export function getDirection(): any;
|
||||
export function getVertices(): {} | any | any;
|
||||
export function getEdges(): {} | any | any[];
|
||||
export function getClasses(): {} | any | any;
|
||||
export function clear(ver?: string): void;
|
||||
export function setGen(ver: any): void;
|
||||
export function defaultStyle(): string;
|
||||
export function addSubGraph(_id: any, list: any, _title: any): any;
|
||||
export function getDepthFirstPos(pos: any): any;
|
||||
export function indexNodes(): void;
|
||||
export function getSubGraphs(): any[];
|
||||
export function firstGraph(): boolean;
|
||||
declare namespace _default {
|
||||
export { parseDirective };
|
||||
export function defaultConfig(): import("../../config.type").FlowchartDiagramConfig | undefined;
|
||||
export { setAccTitle };
|
||||
export { getAccTitle };
|
||||
export { getAccDescription };
|
||||
export { setAccDescription };
|
||||
export { addVertex };
|
||||
export { lookUpDomId };
|
||||
export { addLink };
|
||||
export { updateLinkInterpolate };
|
||||
export { updateLink };
|
||||
export { addClass };
|
||||
export { setDirection };
|
||||
export { setClass };
|
||||
export { setTooltip };
|
||||
export { getTooltip };
|
||||
export { setClickEvent };
|
||||
export { setLink };
|
||||
export { bindFunctions };
|
||||
export { getDirection };
|
||||
export { getVertices };
|
||||
export { getEdges };
|
||||
export { getClasses };
|
||||
export { clear };
|
||||
export { setGen };
|
||||
export { defaultStyle };
|
||||
export { addSubGraph };
|
||||
export { getDepthFirstPos };
|
||||
export { indexNodes };
|
||||
export { getSubGraphs };
|
||||
export { destructLink };
|
||||
export namespace lex {
|
||||
export { firstGraph };
|
||||
}
|
||||
export { exists };
|
||||
export { makeUniq };
|
||||
export { setDiagramTitle };
|
||||
export { getDiagramTitle };
|
||||
}
|
||||
export default _default;
|
||||
import { setAccTitle } from "../../commonDb";
|
||||
import { getAccTitle } from "../../commonDb";
|
||||
import { getAccDescription } from "../../commonDb";
|
||||
import { setAccDescription } from "../../commonDb";
|
||||
declare function setTooltip(ids: any, tooltip: any): void;
|
||||
declare function destructLink(_str: any, _startStr: any): {
|
||||
type: string;
|
||||
stroke: string;
|
||||
};
|
||||
declare function exists(allSgs: any, _id: any): boolean;
|
||||
/**
|
||||
* Deletes an id from all subgraphs
|
||||
*
|
||||
* @param sg
|
||||
* @param allSubgraphs
|
||||
*/
|
||||
declare function makeUniq(sg: any, allSubgraphs: any): {
|
||||
nodes: any[];
|
||||
};
|
||||
import { setDiagramTitle } from "../../commonDb";
|
||||
import { getDiagramTitle } from "../../commonDb";
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const flowDetectorV2: DiagramDetector;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const flowDetector: DiagramDetector;
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
export function setConf(cnf: any): void;
|
||||
export function addVertices(vert: any, g: any, svgId: any, root: any, doc: any, diagObj: any): void;
|
||||
export function addEdges(edges: object, g: object, diagObj: any): void;
|
||||
export function getClasses(text: any, diagObj: any): object;
|
||||
export function draw(text: any, id: any, _version: any, diagObj: any): void;
|
||||
declare namespace _default {
|
||||
export { setConf };
|
||||
export { addVertices };
|
||||
export { addEdges };
|
||||
export { getClasses };
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
export function setConf(cnf: any): void;
|
||||
export function addVertices(vert: any, g: any, svgId: any, root: any, _doc: any, diagObj: any): void;
|
||||
export function addEdges(edges: object, g: object, diagObj: any): void;
|
||||
export function getClasses(text: any, diagObj: any): object;
|
||||
export function draw(text: any, id: any, _version: any, diagObj: any): void;
|
||||
declare namespace _default {
|
||||
export { setConf };
|
||||
export { addVertices };
|
||||
export { addEdges };
|
||||
export { getClasses };
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
/** Returns the styles given options */
|
||||
export interface FlowChartStyleOptions {
|
||||
arrowheadColor: string;
|
||||
border2: string;
|
||||
clusterBkg: string;
|
||||
clusterBorder: string;
|
||||
edgeLabelBackground: string;
|
||||
fontFamily: string;
|
||||
lineColor: string;
|
||||
mainBkg: string;
|
||||
nodeBorder: string;
|
||||
nodeTextColor: string;
|
||||
tertiaryColor: string;
|
||||
textColor: string;
|
||||
titleColor: string;
|
||||
}
|
||||
declare const getStyles: (options: FlowChartStyleOptions) => string;
|
||||
export default getStyles;
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
export function parseDirective(statement: any, context: any, type: any): void;
|
||||
export function clear(): void;
|
||||
export function setAxisFormat(txt: any): void;
|
||||
export function getAxisFormat(): string;
|
||||
export function setTickInterval(txt: any): void;
|
||||
export function getTickInterval(): any;
|
||||
export function setTodayMarker(txt: any): void;
|
||||
export function getTodayMarker(): string;
|
||||
export function setDateFormat(txt: any): void;
|
||||
export function enableInclusiveEndDates(): void;
|
||||
export function endDatesAreInclusive(): boolean;
|
||||
export function enableTopAxis(): void;
|
||||
export function topAxisEnabled(): boolean;
|
||||
export function getDateFormat(): string;
|
||||
export function setIncludes(txt: any): void;
|
||||
export function getIncludes(): any[];
|
||||
export function setExcludes(txt: any): void;
|
||||
export function getExcludes(): any[];
|
||||
export function getLinks(): {};
|
||||
export function addSection(txt: any): void;
|
||||
export function getSections(): any[];
|
||||
export function getTasks(): any[];
|
||||
export function isInvalidDate(date: any, dateFormat: any, excludes: any, includes: any): any;
|
||||
export function addTask(descr: any, data: any): void;
|
||||
export function findTaskById(id: any): any;
|
||||
export function addTaskOrg(descr: any, data: any): void;
|
||||
export function setLink(ids: any, _linkStr: any): void;
|
||||
export function setClass(ids: any, className: any): void;
|
||||
export function setClickEvent(ids: any, functionName: any, functionArgs: any): void;
|
||||
export function bindFunctions(element: any): void;
|
||||
declare namespace _default {
|
||||
export { parseDirective };
|
||||
export function getConfig(): import("../../config.type").GanttDiagramConfig | undefined;
|
||||
export { clear };
|
||||
export { setDateFormat };
|
||||
export { getDateFormat };
|
||||
export { enableInclusiveEndDates };
|
||||
export { endDatesAreInclusive };
|
||||
export { enableTopAxis };
|
||||
export { topAxisEnabled };
|
||||
export { setAxisFormat };
|
||||
export { getAxisFormat };
|
||||
export { setTickInterval };
|
||||
export { getTickInterval };
|
||||
export { setTodayMarker };
|
||||
export { getTodayMarker };
|
||||
export { setAccTitle };
|
||||
export { getAccTitle };
|
||||
export { setDiagramTitle };
|
||||
export { getDiagramTitle };
|
||||
export { setAccDescription };
|
||||
export { getAccDescription };
|
||||
export { addSection };
|
||||
export { getSections };
|
||||
export { getTasks };
|
||||
export { addTask };
|
||||
export { findTaskById };
|
||||
export { addTaskOrg };
|
||||
export { setIncludes };
|
||||
export { getIncludes };
|
||||
export { setExcludes };
|
||||
export { getExcludes };
|
||||
export { setClickEvent };
|
||||
export { setLink };
|
||||
export { getLinks };
|
||||
export { bindFunctions };
|
||||
export { parseDuration };
|
||||
export { isInvalidDate };
|
||||
}
|
||||
export default _default;
|
||||
import { setAccTitle } from "../../commonDb";
|
||||
import { getAccTitle } from "../../commonDb";
|
||||
import { setDiagramTitle } from "../../commonDb";
|
||||
import { getDiagramTitle } from "../../commonDb";
|
||||
import { setAccDescription } from "../../commonDb";
|
||||
import { getAccDescription } from "../../commonDb";
|
||||
/**
|
||||
* Parse a string as a moment duration.
|
||||
*
|
||||
* The string have to be compound by a value and a shorthand duration unit. For example `5d`
|
||||
* represents 5 days.
|
||||
*
|
||||
* Shorthand unit supported are:
|
||||
*
|
||||
* - `y` for years
|
||||
* - `M` for months
|
||||
* - `w` for weeks
|
||||
* - `d` for days
|
||||
* - `h` for hours
|
||||
* - `s` for seconds
|
||||
* - `ms` for milliseconds
|
||||
*
|
||||
* @param {string} str - A string representing the duration.
|
||||
* @returns {moment.Duration} A moment duration, including an invalid moment for invalid input
|
||||
* string.
|
||||
*/
|
||||
declare function parseDuration(str: string): moment.Duration;
|
||||
import moment from "moment-mini";
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const ganttDetector: DiagramDetector;
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
export function setConf(): void;
|
||||
export function draw(text: any, id: any, version: any, diagObj: any): void;
|
||||
declare namespace _default {
|
||||
export { setConf };
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(options: any): string;
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
export function parseDirective(statement: any, context: any, type: any): void;
|
||||
export function setDirection(dir: any): void;
|
||||
export function setOptions(rawOptString: any): void;
|
||||
export function getOptions(): {};
|
||||
export function commit(msg: any, id: any, type: any, tag: any): void;
|
||||
export function branch(name: any, order: any): void;
|
||||
export function merge(otherBranch: any, custom_id: any, override_type: any, custom_tag: any): void;
|
||||
export function cherryPick(sourceId: any, targetId: any, tag: any): void;
|
||||
export function checkout(branch: any): void;
|
||||
export function prettyPrint(): void;
|
||||
export function clear(): void;
|
||||
export function getBranchesAsObjArray(): {
|
||||
name: any;
|
||||
}[];
|
||||
export function getBranches(): typeof branches;
|
||||
export function getCommits(): {};
|
||||
export function getCommitsArray(): any[];
|
||||
export function getCurrentBranch(): string | undefined;
|
||||
export function getDirection(): string;
|
||||
export function getHead(): any;
|
||||
export namespace commitType {
|
||||
const NORMAL: number;
|
||||
const REVERSE: number;
|
||||
const HIGHLIGHT: number;
|
||||
const MERGE: number;
|
||||
const CHERRY_PICK: number;
|
||||
}
|
||||
declare namespace _default {
|
||||
export { parseDirective };
|
||||
export function getConfig(): import("../../config.type").GitGraphDiagramConfig | undefined;
|
||||
export { setDirection };
|
||||
export { setOptions };
|
||||
export { getOptions };
|
||||
export { commit };
|
||||
export { branch };
|
||||
export { merge };
|
||||
export { cherryPick };
|
||||
export { checkout };
|
||||
export { prettyPrint };
|
||||
export { clear };
|
||||
export { getBranchesAsObjArray };
|
||||
export { getBranches };
|
||||
export { getCommits };
|
||||
export { getCommitsArray };
|
||||
export { getCurrentBranch };
|
||||
export { getDirection };
|
||||
export { getHead };
|
||||
export { setAccTitle };
|
||||
export { getAccTitle };
|
||||
export { getAccDescription };
|
||||
export { setAccDescription };
|
||||
export { setDiagramTitle };
|
||||
export { getDiagramTitle };
|
||||
export { commitType };
|
||||
}
|
||||
export default _default;
|
||||
declare let branches: typeof branches;
|
||||
import { setAccTitle } from "../../commonDb";
|
||||
import { getAccTitle } from "../../commonDb";
|
||||
import { getAccDescription } from "../../commonDb";
|
||||
import { setAccDescription } from "../../commonDb";
|
||||
import { setDiagramTitle } from "../../commonDb";
|
||||
import { getDiagramTitle } from "../../commonDb";
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const gitGraphDetector: DiagramDetector;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
export function draw(txt: any, id: any, ver: any, diagObj: any): void;
|
||||
declare namespace _default {
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(options: any): string;
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
export function setMessage(txt: any): void;
|
||||
export function getMessage(): string;
|
||||
export function setInfo(inf: any): void;
|
||||
export function getInfo(): boolean;
|
||||
declare namespace _default {
|
||||
export { setMessage };
|
||||
export { getMessage };
|
||||
export { setInfo };
|
||||
export { getInfo };
|
||||
export { clear };
|
||||
}
|
||||
export default _default;
|
||||
import { clear } from "../../commonDb";
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const infoDetector: DiagramDetector;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
export function draw(text: any, id: any, version: any): void;
|
||||
declare namespace _default {
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(): string;
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
export function parseDirective(statement: any, context: any, type: any): void;
|
||||
declare namespace _default {
|
||||
export { parseDirective };
|
||||
export function getConfig(): import("../../config.type").BaseDiagramConfig | undefined;
|
||||
export { addSection };
|
||||
export { getSections };
|
||||
export { cleanupValue };
|
||||
export { clear };
|
||||
export { setAccTitle };
|
||||
export { getAccTitle };
|
||||
export { setDiagramTitle };
|
||||
export { getDiagramTitle };
|
||||
export { setShowData };
|
||||
export { getShowData };
|
||||
export { getAccDescription };
|
||||
export { setAccDescription };
|
||||
}
|
||||
export default _default;
|
||||
declare function addSection(id: any, value: any): void;
|
||||
declare function getSections(): {};
|
||||
declare function cleanupValue(value: any): number;
|
||||
declare function clear(): void;
|
||||
import { setAccTitle } from "../../commonDb";
|
||||
import { getAccTitle } from "../../commonDb";
|
||||
import { setDiagramTitle } from "../../commonDb";
|
||||
import { getDiagramTitle } from "../../commonDb";
|
||||
declare function setShowData(toggle: any): void;
|
||||
declare function getShowData(): boolean;
|
||||
import { getAccDescription } from "../../commonDb";
|
||||
import { setAccDescription } from "../../commonDb";
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const pieDetector: DiagramDetector;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
export function draw(txt: any, id: any, _version: any, diagObj: any): void;
|
||||
declare namespace _default {
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(options: any): string;
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
export function parseDirective(statement: any, context: any, type: any): void;
|
||||
declare namespace _default {
|
||||
export { RequirementType };
|
||||
export { RiskLevel };
|
||||
export { VerifyType };
|
||||
export { Relationships };
|
||||
export { parseDirective };
|
||||
export function getConfig(): any;
|
||||
export { addRequirement };
|
||||
export { getRequirements };
|
||||
export { setNewReqId };
|
||||
export { setNewReqText };
|
||||
export { setNewReqRisk };
|
||||
export { setNewReqVerifyMethod };
|
||||
export { setAccTitle };
|
||||
export { getAccTitle };
|
||||
export { setAccDescription };
|
||||
export { getAccDescription };
|
||||
export { addElement };
|
||||
export { getElements };
|
||||
export { setNewElementType };
|
||||
export { setNewElementDocRef };
|
||||
export { addRelationship };
|
||||
export { getRelationships };
|
||||
export { clear };
|
||||
}
|
||||
export default _default;
|
||||
declare namespace RequirementType {
|
||||
const REQUIREMENT: string;
|
||||
const FUNCTIONAL_REQUIREMENT: string;
|
||||
const INTERFACE_REQUIREMENT: string;
|
||||
const PERFORMANCE_REQUIREMENT: string;
|
||||
const PHYSICAL_REQUIREMENT: string;
|
||||
const DESIGN_CONSTRAINT: string;
|
||||
}
|
||||
declare namespace RiskLevel {
|
||||
const LOW_RISK: string;
|
||||
const MED_RISK: string;
|
||||
const HIGH_RISK: string;
|
||||
}
|
||||
declare namespace VerifyType {
|
||||
const VERIFY_ANALYSIS: string;
|
||||
const VERIFY_DEMONSTRATION: string;
|
||||
const VERIFY_INSPECTION: string;
|
||||
const VERIFY_TEST: string;
|
||||
}
|
||||
declare namespace Relationships {
|
||||
const CONTAINS: string;
|
||||
const COPIES: string;
|
||||
const DERIVES: string;
|
||||
const SATISFIES: string;
|
||||
const VERIFIES: string;
|
||||
const REFINES: string;
|
||||
const TRACES: string;
|
||||
}
|
||||
declare function addRequirement(name: any, type: any): any;
|
||||
declare function getRequirements(): {};
|
||||
declare function setNewReqId(id: any): void;
|
||||
declare function setNewReqText(text: any): void;
|
||||
declare function setNewReqRisk(risk: any): void;
|
||||
declare function setNewReqVerifyMethod(verifyMethod: any): void;
|
||||
import { setAccTitle } from "../../commonDb";
|
||||
import { getAccTitle } from "../../commonDb";
|
||||
import { setAccDescription } from "../../commonDb";
|
||||
import { getAccDescription } from "../../commonDb";
|
||||
declare function addElement(name: any): any;
|
||||
declare function getElements(): {};
|
||||
declare function setNewElementType(type: any): void;
|
||||
declare function setNewElementDocRef(docRef: any): void;
|
||||
declare function addRelationship(type: any, src: any, dst: any): void;
|
||||
declare function getRelationships(): any[];
|
||||
declare function clear(): void;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const requirementDetector: DiagramDetector;
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
declare namespace _default {
|
||||
export { ReqMarkers };
|
||||
export { insertLineEndings };
|
||||
}
|
||||
export default _default;
|
||||
declare namespace ReqMarkers {
|
||||
const CONTAINS: string;
|
||||
const ARROW: string;
|
||||
}
|
||||
declare function insertLineEndings(parentNode: any, conf: any): void;
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
export function drawReqs(reqs: any, graph: any, svgNode: any): void;
|
||||
export function drawElements(els: any, graph: any, svgNode: any): void;
|
||||
export function draw(text: any, id: any, _version: any, diagObj: any): void;
|
||||
declare namespace _default {
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(options: any): string;
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
export function parseDirective(statement: any, context: any, type: any): void;
|
||||
export function addActor(id: any, name: any, description: any, type: any): void;
|
||||
export function addMessage(idFrom: any, idTo: any, message: any, answer: any): void;
|
||||
export function addSignal(idFrom: any, idTo: any, message: {
|
||||
text: undefined;
|
||||
wrap: undefined;
|
||||
} | undefined, messageType: any): boolean;
|
||||
export function getMessages(): any[];
|
||||
export function getActors(): {};
|
||||
export function getActor(id: any): any;
|
||||
export function getActorKeys(): string[];
|
||||
export function enableSequenceNumbers(): void;
|
||||
export function disableSequenceNumbers(): void;
|
||||
export function showSequenceNumbers(): boolean;
|
||||
export function setWrap(wrapSetting: any): void;
|
||||
export function autoWrap(): any;
|
||||
export function clear(): void;
|
||||
export function parseMessage(str: any): {
|
||||
text: any;
|
||||
wrap: boolean | undefined;
|
||||
};
|
||||
export namespace LINETYPE {
|
||||
const SOLID: number;
|
||||
const DOTTED: number;
|
||||
const NOTE: number;
|
||||
const SOLID_CROSS: number;
|
||||
const DOTTED_CROSS: number;
|
||||
const SOLID_OPEN: number;
|
||||
const DOTTED_OPEN: number;
|
||||
const LOOP_START: number;
|
||||
const LOOP_END: number;
|
||||
const ALT_START: number;
|
||||
const ALT_ELSE: number;
|
||||
const ALT_END: number;
|
||||
const OPT_START: number;
|
||||
const OPT_END: number;
|
||||
const ACTIVE_START: number;
|
||||
const ACTIVE_END: number;
|
||||
const PAR_START: number;
|
||||
const PAR_AND: number;
|
||||
const PAR_END: number;
|
||||
const RECT_START: number;
|
||||
const RECT_END: number;
|
||||
const SOLID_POINT: number;
|
||||
const DOTTED_POINT: number;
|
||||
const AUTONUMBER: number;
|
||||
const CRITICAL_START: number;
|
||||
const CRITICAL_OPTION: number;
|
||||
const CRITICAL_END: number;
|
||||
const BREAK_START: number;
|
||||
const BREAK_END: number;
|
||||
}
|
||||
export namespace ARROWTYPE {
|
||||
const FILLED: number;
|
||||
const OPEN: number;
|
||||
}
|
||||
export namespace PLACEMENT {
|
||||
const LEFTOF: number;
|
||||
const RIGHTOF: number;
|
||||
const OVER: number;
|
||||
}
|
||||
export function addNote(actor: any, placement: any, message: any): void;
|
||||
export function addLinks(actorId: any, text: any): void;
|
||||
export function addALink(actorId: any, text: any): void;
|
||||
export function addProperties(actorId: any, text: any): void;
|
||||
export function addDetails(actorId: any, text: any): void;
|
||||
export function getActorProperty(actor: any, key: any): any;
|
||||
export function apply(param: any): void;
|
||||
declare namespace _default {
|
||||
export { addActor };
|
||||
export { addMessage };
|
||||
export { addSignal };
|
||||
export { addLinks };
|
||||
export { addDetails };
|
||||
export { addProperties };
|
||||
export { autoWrap };
|
||||
export { setWrap };
|
||||
export { enableSequenceNumbers };
|
||||
export { disableSequenceNumbers };
|
||||
export { showSequenceNumbers };
|
||||
export { getMessages };
|
||||
export { getActors };
|
||||
export { getActor };
|
||||
export { getActorKeys };
|
||||
export { getActorProperty };
|
||||
export { getAccTitle };
|
||||
export { getDiagramTitle };
|
||||
export { setDiagramTitle };
|
||||
export { parseDirective };
|
||||
export function getConfig(): import("../../config.type").SequenceDiagramConfig | undefined;
|
||||
export { clear };
|
||||
export { parseMessage };
|
||||
export { LINETYPE };
|
||||
export { ARROWTYPE };
|
||||
export { PLACEMENT };
|
||||
export { addNote };
|
||||
export { setAccTitle };
|
||||
export { apply };
|
||||
export { setAccDescription };
|
||||
export { getAccDescription };
|
||||
}
|
||||
export default _default;
|
||||
import { getAccTitle } from "../../commonDb";
|
||||
import { getDiagramTitle } from "../../commonDb";
|
||||
import { setDiagramTitle } from "../../commonDb";
|
||||
import { setAccTitle } from "../../commonDb";
|
||||
import { setAccDescription } from "../../commonDb";
|
||||
import { getAccDescription } from "../../commonDb";
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const sequenceDetector: DiagramDetector;
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
import Diagram from '../../Diagram';
|
||||
export declare const bounds: {
|
||||
data: {
|
||||
startx: undefined;
|
||||
stopx: undefined;
|
||||
starty: undefined;
|
||||
stopy: undefined;
|
||||
};
|
||||
verticalPos: number;
|
||||
sequenceItems: never[];
|
||||
activations: never[];
|
||||
models: {
|
||||
getHeight: () => any;
|
||||
clear: () => void;
|
||||
addActor: (actorModel: any) => void;
|
||||
addLoop: (loopModel: any) => void;
|
||||
addMessage: (msgModel: any) => void;
|
||||
addNote: (noteModel: any) => void;
|
||||
lastActor: () => never;
|
||||
lastLoop: () => never;
|
||||
lastMessage: () => never;
|
||||
lastNote: () => never;
|
||||
actors: never[];
|
||||
loops: never[];
|
||||
messages: never[];
|
||||
notes: never[];
|
||||
};
|
||||
init: () => void;
|
||||
updateVal: (obj: any, key: any, val: any, fun: any) => void;
|
||||
updateBounds: (startx: any, starty: any, stopx: any, stopy: any) => void;
|
||||
insert: (startx: any, starty: any, stopx: any, stopy: any) => void;
|
||||
newActivation: (message: any, diagram: any, actors: any) => void;
|
||||
endActivation: (message: any) => never;
|
||||
createLoop: (title: {
|
||||
message: undefined;
|
||||
wrap: boolean;
|
||||
width: undefined;
|
||||
} | undefined, fill: any) => {
|
||||
startx: undefined;
|
||||
starty: number;
|
||||
stopx: undefined;
|
||||
stopy: undefined;
|
||||
title: undefined;
|
||||
wrap: boolean;
|
||||
width: undefined;
|
||||
height: number;
|
||||
fill: any;
|
||||
};
|
||||
newLoop: (title: {
|
||||
message: undefined;
|
||||
wrap: boolean;
|
||||
width: undefined;
|
||||
} | undefined, fill: any) => void;
|
||||
endLoop: () => undefined;
|
||||
addSectionToLoop: (message: any) => void;
|
||||
bumpVerticalPos: (bump: any) => void;
|
||||
getVerticalPos: () => number;
|
||||
getBounds: () => {
|
||||
bounds: {
|
||||
startx: undefined;
|
||||
stopx: undefined;
|
||||
starty: undefined;
|
||||
stopy: undefined;
|
||||
};
|
||||
models: {
|
||||
getHeight: () => any;
|
||||
clear: () => void;
|
||||
addActor: (actorModel: any) => void;
|
||||
addLoop: (loopModel: any) => void;
|
||||
addMessage: (msgModel: any) => void;
|
||||
addNote: (noteModel: any) => void;
|
||||
lastActor: () => never;
|
||||
lastLoop: () => never;
|
||||
lastMessage: () => never;
|
||||
lastNote: () => never;
|
||||
actors: never[];
|
||||
loops: never[];
|
||||
messages: never[];
|
||||
notes: never[];
|
||||
};
|
||||
};
|
||||
};
|
||||
export declare const drawActors: (diagram: any, actors: any, actorKeys: any, verticalPos: any, configuration: any, messages: any) => void;
|
||||
export declare const drawActorsPopup: (diagram: any, actors: any, actorKeys: any, doc: any) => {
|
||||
maxHeight: number;
|
||||
maxWidth: number;
|
||||
};
|
||||
export declare const setConf: (cnf: any) => void;
|
||||
/**
|
||||
* Draws a sequenceDiagram in the tag with id: id based on the graph definition in text.
|
||||
*
|
||||
* @param _text - The text of the diagram
|
||||
* @param id - The id of the diagram which will be used as a DOM element id¨
|
||||
* @param _version - Mermaid version from package.json
|
||||
* @param diagObj - A standard diagram containing the db and the text and type etc of the diagram
|
||||
*/
|
||||
export declare const draw: (_text: string, id: string, _version: string, diagObj: Diagram) => void;
|
||||
declare const _default: {
|
||||
bounds: {
|
||||
data: {
|
||||
startx: undefined;
|
||||
stopx: undefined;
|
||||
starty: undefined;
|
||||
stopy: undefined;
|
||||
};
|
||||
verticalPos: number;
|
||||
sequenceItems: never[];
|
||||
activations: never[];
|
||||
models: {
|
||||
getHeight: () => any;
|
||||
clear: () => void;
|
||||
addActor: (actorModel: any) => void;
|
||||
addLoop: (loopModel: any) => void;
|
||||
addMessage: (msgModel: any) => void;
|
||||
addNote: (noteModel: any) => void;
|
||||
lastActor: () => never;
|
||||
lastLoop: () => never;
|
||||
lastMessage: () => never;
|
||||
lastNote: () => never;
|
||||
actors: never[];
|
||||
loops: never[];
|
||||
messages: never[];
|
||||
notes: never[];
|
||||
};
|
||||
init: () => void;
|
||||
updateVal: (obj: any, key: any, val: any, fun: any) => void;
|
||||
updateBounds: (startx: any, starty: any, stopx: any, stopy: any) => void;
|
||||
insert: (startx: any, starty: any, stopx: any, stopy: any) => void;
|
||||
newActivation: (message: any, diagram: any, actors: any) => void;
|
||||
endActivation: (message: any) => never;
|
||||
createLoop: (title: {
|
||||
message: undefined;
|
||||
wrap: boolean;
|
||||
width: undefined;
|
||||
} | undefined, fill: any) => {
|
||||
startx: undefined;
|
||||
starty: number;
|
||||
stopx: undefined;
|
||||
stopy: undefined;
|
||||
title: undefined;
|
||||
wrap: boolean;
|
||||
width: undefined;
|
||||
height: number;
|
||||
fill: any;
|
||||
};
|
||||
newLoop: (title: {
|
||||
message: undefined;
|
||||
wrap: boolean;
|
||||
width: undefined;
|
||||
} | undefined, fill: any) => void;
|
||||
endLoop: () => undefined;
|
||||
addSectionToLoop: (message: any) => void;
|
||||
bumpVerticalPos: (bump: any) => void;
|
||||
getVerticalPos: () => number;
|
||||
getBounds: () => {
|
||||
bounds: {
|
||||
startx: undefined;
|
||||
stopx: undefined;
|
||||
starty: undefined;
|
||||
stopy: undefined;
|
||||
};
|
||||
models: {
|
||||
getHeight: () => any;
|
||||
clear: () => void;
|
||||
addActor: (actorModel: any) => void;
|
||||
addLoop: (loopModel: any) => void;
|
||||
addMessage: (msgModel: any) => void;
|
||||
addNote: (noteModel: any) => void;
|
||||
lastActor: () => never;
|
||||
lastLoop: () => never;
|
||||
lastMessage: () => never;
|
||||
lastNote: () => never;
|
||||
actors: never[];
|
||||
loops: never[];
|
||||
messages: never[];
|
||||
notes: never[];
|
||||
};
|
||||
};
|
||||
};
|
||||
drawActors: (diagram: any, actors: any, actorKeys: any, verticalPos: any, configuration: any, messages: any) => void;
|
||||
drawActorsPopup: (diagram: any, actors: any, actorKeys: any, doc: any) => {
|
||||
maxHeight: number;
|
||||
maxWidth: number;
|
||||
};
|
||||
setConf: (cnf: any) => void;
|
||||
draw: (_text: string, id: string, _version: string, diagObj: Diagram) => void;
|
||||
};
|
||||
export default _default;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(options: any): string;
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
export function drawRect(elem: any, rectData: any): any;
|
||||
export function drawPopup(elem: any, actor: any, minMenuWidth: any, textAttrs: any, forceMenus: any): {
|
||||
height: any;
|
||||
width: any;
|
||||
};
|
||||
export function drawImage(elem: any, x: any, y: any, link: any): void;
|
||||
export function drawEmbeddedImage(elem: any, x: any, y: any, link: any): void;
|
||||
export function popupMenu(popid: any): string;
|
||||
export function popdownMenu(popid: any): string;
|
||||
export function drawText(elem: any, textData: any): any[];
|
||||
export function drawLabel(elem: any, txtObject: any): any;
|
||||
export function fixLifeLineHeights(diagram: any, bounds: any): void;
|
||||
export function drawActor(elem: any, actor: any, conf: any): any;
|
||||
export function anchorElement(elem: any): any;
|
||||
export function drawActivation(elem: any, bounds: any, verticalPos: any, conf: any, actorActivations: any): void;
|
||||
export function drawLoop(elem: any, loopModel: any, labelText: any, conf: any): any;
|
||||
export function drawBackgroundRect(elem: any, bounds: any): void;
|
||||
export function insertDatabaseIcon(elem: any): void;
|
||||
export function insertComputerIcon(elem: any): void;
|
||||
export function insertClockIcon(elem: any): void;
|
||||
export function insertArrowHead(elem: any): void;
|
||||
export function insertArrowFilledHead(elem: any): void;
|
||||
export function insertSequenceNumber(elem: any): void;
|
||||
export function insertArrowCrossHead(elem: any): void;
|
||||
export function getTextObj(): {
|
||||
x: number;
|
||||
y: number;
|
||||
fill: undefined;
|
||||
anchor: undefined;
|
||||
style: string;
|
||||
width: undefined;
|
||||
height: undefined;
|
||||
textMargin: number;
|
||||
rx: number;
|
||||
ry: number;
|
||||
tspan: boolean;
|
||||
valign: undefined;
|
||||
};
|
||||
export function getNoteRect(): {
|
||||
x: number;
|
||||
y: number;
|
||||
fill: string;
|
||||
stroke: string;
|
||||
width: number;
|
||||
anchor: string;
|
||||
height: number;
|
||||
rx: number;
|
||||
ry: number;
|
||||
};
|
||||
declare namespace _default {
|
||||
export { drawRect };
|
||||
export { drawText };
|
||||
export { drawLabel };
|
||||
export { drawActor };
|
||||
export { drawPopup };
|
||||
export { drawImage };
|
||||
export { drawEmbeddedImage };
|
||||
export { anchorElement };
|
||||
export { drawActivation };
|
||||
export { drawLoop };
|
||||
export { drawBackgroundRect };
|
||||
export { insertArrowHead };
|
||||
export { insertArrowFilledHead };
|
||||
export { insertSequenceNumber };
|
||||
export { insertArrowCrossHead };
|
||||
export { insertDatabaseIcon };
|
||||
export { insertComputerIcon };
|
||||
export { insertClockIcon };
|
||||
export { getTextObj };
|
||||
export { getNoteRect };
|
||||
export { popupMenu };
|
||||
export { popdownMenu };
|
||||
export { fixLifeLineHeights };
|
||||
export { sanitizeUrl };
|
||||
}
|
||||
export default _default;
|
||||
import { sanitizeUrl } from "@braintree/sanitize-url";
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
export function set(key: any, val: any): void;
|
||||
export function get(k: any): any;
|
||||
export function keys(): string[];
|
||||
export function size(): number;
|
||||
declare namespace _default {
|
||||
export { get };
|
||||
export { set };
|
||||
export { keys };
|
||||
export { size };
|
||||
}
|
||||
export default _default;
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
export function drawStartState(g: any): any;
|
||||
export function drawDivider(g: any): any;
|
||||
export function drawSimpleState(g: any, stateDef: any): any;
|
||||
export function drawDescrState(g: any, stateDef: any): any;
|
||||
export function addTitleAndBox(g: any, stateDef: any, altBkg: any): any;
|
||||
export function drawText(elem: any, textData: any): any;
|
||||
export function drawNote(text: any, g: any): any;
|
||||
export function drawState(elem: any, stateDef: any): {
|
||||
id: any;
|
||||
label: any;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
export function drawEdge(elem: any, path: any, relation: any): void;
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* Constants common to all State Diagram code
|
||||
*/
|
||||
export declare const DEFAULT_DIAGRAM_DIRECTION = "LR";
|
||||
export declare const DEFAULT_NESTED_DOC_DIR = "TB";
|
||||
export declare const STMT_STATE = "state";
|
||||
export declare const STMT_RELATION = "relation";
|
||||
export declare const STMT_CLASSDEF = "classDef";
|
||||
export declare const STMT_APPLYCLASS = "applyClass";
|
||||
export declare const DEFAULT_STATE_TYPE = "default";
|
||||
export declare const DIVIDER_TYPE = "divider";
|
||||
declare const _default: {
|
||||
DEFAULT_DIAGRAM_DIRECTION: string;
|
||||
DEFAULT_NESTED_DOC_DIR: string;
|
||||
STMT_STATE: string;
|
||||
STMT_RELATION: string;
|
||||
STMT_CLASSDEF: string;
|
||||
STMT_APPLYCLASS: string;
|
||||
DEFAULT_STATE_TYPE: string;
|
||||
DIVIDER_TYPE: string;
|
||||
};
|
||||
export default _default;
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
*
|
||||
* @param item1
|
||||
* @param item2
|
||||
* @param relationTitle
|
||||
*/
|
||||
export function addRelationObjs(item1: any, item2: any, relationTitle: any): void;
|
||||
export namespace lineType {
|
||||
const LINE: number;
|
||||
const DOTTED_LINE: number;
|
||||
}
|
||||
export namespace relationType {
|
||||
const AGGREGATION: number;
|
||||
const EXTENSION: number;
|
||||
const COMPOSITION: number;
|
||||
const DEPENDENCY: number;
|
||||
}
|
||||
export function parseDirective(statement: any, context: any, type: any): void;
|
||||
export function addState(id: null | string, type?: null | string, doc?: null | string, descr?: null | string | string[], note?: null | string, classes?: null | string | string[], styles?: null | string | string[], textStyles?: null | string | string[]): void;
|
||||
export function clear(saveCommon: any): void;
|
||||
export function getState(id: any): any;
|
||||
export function getStates(): {};
|
||||
export function logDocuments(): void;
|
||||
export function getRelations(): never[];
|
||||
export function addRelation(item1: string | object, item2: string | object, title: string): void;
|
||||
export function addDescription(id: any, descr: any): void;
|
||||
export function cleanupLabel(label: any): any;
|
||||
export function addStyleClass(id: string, styleAttributes?: string | null): void;
|
||||
export function getClasses(): {} | any | {};
|
||||
export function setCssClass(itemIds: string | string[], cssClassName: string): void;
|
||||
export function setStyle(itemId: any, styleText: any): void;
|
||||
export function setTextStyle(itemId: any, cssClassName: any): void;
|
||||
declare namespace _default {
|
||||
export { parseDirective };
|
||||
export function getConfig(): import("../../config.type").StateDiagramConfig | undefined;
|
||||
export { addState };
|
||||
export { clear };
|
||||
export { getState };
|
||||
export { getStates };
|
||||
export { getRelations };
|
||||
export { getClasses };
|
||||
export { getDirection };
|
||||
export { addRelation };
|
||||
export { getDividerId };
|
||||
export { setDirection };
|
||||
export { cleanupLabel };
|
||||
export { lineType };
|
||||
export { relationType };
|
||||
export { logDocuments };
|
||||
export { getRootDoc };
|
||||
export { setRootDoc };
|
||||
export { getRootDocV2 };
|
||||
export { extract };
|
||||
export { trimColon };
|
||||
export { getAccTitle };
|
||||
export { setAccTitle };
|
||||
export { getAccDescription };
|
||||
export { setAccDescription };
|
||||
export { addStyleClass };
|
||||
export { setCssClass };
|
||||
export { addDescription };
|
||||
export { setDiagramTitle };
|
||||
export { getDiagramTitle };
|
||||
}
|
||||
export default _default;
|
||||
declare function getDirection(): string;
|
||||
declare function getDividerId(): string;
|
||||
declare function setDirection(dir: any): void;
|
||||
declare function getRootDoc(): any[];
|
||||
declare function setRootDoc(o: any): void;
|
||||
declare function getRootDocV2(): {
|
||||
id: string;
|
||||
doc: any[];
|
||||
};
|
||||
/**
|
||||
* Convert all of the statements (stmts) that were parsed into states and relationships.
|
||||
* This is done because a state diagram may have nested sections,
|
||||
* where each section is a 'document' and has its own set of statements.
|
||||
* Ex: the section within a fork has its own statements, and incoming and outgoing statements
|
||||
* refer to the fork as a whole (document).
|
||||
* See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.
|
||||
* This will push the statement into the the list of statements for the current document.
|
||||
*
|
||||
* @param _doc
|
||||
*/
|
||||
declare function extract(_doc: any): void;
|
||||
declare function trimColon(str: any): any;
|
||||
import { getAccTitle } from "../../commonDb";
|
||||
import { setAccTitle } from "../../commonDb";
|
||||
import { getAccDescription } from "../../commonDb";
|
||||
import { setAccDescription } from "../../commonDb";
|
||||
import { setDiagramTitle } from "../../commonDb";
|
||||
import { getDiagramTitle } from "../../commonDb";
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const stateDetectorV2: DiagramDetector;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const stateDetector: DiagramDetector;
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Create a standard string for the dom ID of an item.
|
||||
* If a type is given, insert that before the counter, preceded by the type spacer
|
||||
*
|
||||
* @param itemId
|
||||
* @param counter
|
||||
* @param {string | null} type
|
||||
* @param typeSpacer
|
||||
* @returns {string}
|
||||
*/
|
||||
export function stateDomId(itemId?: string, counter?: number, type?: string | null, typeSpacer?: string): string;
|
||||
export function setConf(cnf: any): void;
|
||||
export function getClasses(text: string, diagramObj: any): object;
|
||||
export function draw(text: any, id: any, _version: any, diag: any): void;
|
||||
declare namespace _default {
|
||||
export { setConf };
|
||||
export { getClasses };
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
export function setConf(): void;
|
||||
export function draw(text: any, id: any, _version: any, diagObj: any): void;
|
||||
declare namespace _default {
|
||||
export { setConf };
|
||||
export { draw };
|
||||
}
|
||||
export default _default;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export default getStyles;
|
||||
declare function getStyles(options: any): string;
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
export function parseDirective(statement: any, context: any, type: any): void;
|
||||
export function clear(): void;
|
||||
export function addSection(txt: any): void;
|
||||
export function getSections(): any[];
|
||||
export function getTasks(): any[];
|
||||
export function addTask(descr: any, taskData: any): void;
|
||||
export function addTaskOrg(descr: any): void;
|
||||
declare namespace _default {
|
||||
export { parseDirective };
|
||||
export function getConfig(): import("../../config.type").JourneyDiagramConfig | undefined;
|
||||
export { clear };
|
||||
export { setDiagramTitle };
|
||||
export { getDiagramTitle };
|
||||
export { setAccTitle };
|
||||
export { getAccTitle };
|
||||
export { setAccDescription };
|
||||
export { getAccDescription };
|
||||
export { addSection };
|
||||
export { getSections };
|
||||
export { getTasks };
|
||||
export { addTask };
|
||||
export { addTaskOrg };
|
||||
export { getActors };
|
||||
}
|
||||
export default _default;
|
||||
import { setDiagramTitle } from "../../commonDb";
|
||||
import { getDiagramTitle } from "../../commonDb";
|
||||
import { setAccTitle } from "../../commonDb";
|
||||
import { getAccTitle } from "../../commonDb";
|
||||
import { setAccDescription } from "../../commonDb";
|
||||
import { getAccDescription } from "../../commonDb";
|
||||
declare function getActors(): any[];
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/types';
|
||||
export declare const journeyDetector: DiagramDetector;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user