2020-08-16 08:45:44 +02:00
|
|
|
<html>
|
|
|
|
<head>
|
2022-09-05 00:48:36 +05:30
|
|
|
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet" />
|
|
|
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
|
2020-08-16 08:45:44 +02:00
|
|
|
<link
|
2022-09-05 00:48:36 +05:30
|
|
|
rel="stylesheet"
|
|
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
|
|
|
|
/>
|
2022-10-03 10:05:12 +02:00
|
|
|
<link
|
|
|
|
href="https://cdn.jsdelivr.net/npm/@mdi/font@6.9.96/css/materialdesignicons.min.css"
|
|
|
|
rel="stylesheet"
|
|
|
|
/>
|
2022-09-05 00:48:36 +05:30
|
|
|
<link
|
|
|
|
href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap"
|
2020-08-16 08:45:44 +02:00
|
|
|
rel="stylesheet"
|
|
|
|
/>
|
|
|
|
<style>
|
|
|
|
body {
|
|
|
|
/* background: rgb(221, 208, 208); */
|
2021-09-16 20:43:10 +02:00
|
|
|
/* background:#333; */
|
2020-08-16 08:45:44 +02:00
|
|
|
font-family: 'Arial';
|
2021-04-26 19:08:16 +02:00
|
|
|
/* font-size: 18px !important; */
|
2021-09-18 08:03:34 +02:00
|
|
|
width: 100%;
|
2022-02-03 19:54:24 +01:00
|
|
|
display: flex;
|
2022-08-18 19:11:33 +02:00
|
|
|
flex-direction: column;
|
|
|
|
margin-left: 20px;
|
2022-09-05 00:48:36 +05:30
|
|
|
}
|
|
|
|
h1 {
|
|
|
|
color: grey;
|
|
|
|
}
|
|
|
|
.mermaid2,
|
|
|
|
.mermaid3 {
|
2020-08-16 08:45:44 +02:00
|
|
|
display: none;
|
|
|
|
}
|
2022-08-27 12:32:33 +02:00
|
|
|
.mermaid {
|
|
|
|
}
|
2021-01-21 21:20:35 +01:00
|
|
|
.mermaid svg {
|
2022-08-27 15:03:29 +02:00
|
|
|
border: 1px solid purple;
|
2021-04-26 19:08:16 +02:00
|
|
|
/* font-size: 18px !important; */
|
2022-09-05 00:48:36 +05:30
|
|
|
fontfamily: 'courier';
|
2021-01-21 21:20:35 +01:00
|
|
|
}
|
2020-08-16 08:45:44 +02:00
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2023-05-24 11:27:17 +02:00
|
|
|
<pre class="mermaid" style="width: 50%">
|
|
|
|
sequenceDiagram
|
|
|
|
Alice->>Bob: Extremely utterly long line of longness which had previously overflown the actor box as it is much longer than what it should be
|
|
|
|
loop Loopy
|
|
|
|
Bob->>Alice: Pasten
|
|
|
|
end
|
|
|
|
</pre>
|
|
|
|
<pre class="mermaid" style="width: 50%">
|
|
|
|
sequenceDiagram
|
|
|
|
participant Alice
|
|
|
|
participant Bob
|
|
|
|
participant John as John<br/>Second Line
|
|
|
|
Alice ->> Bob: Hello Bob, how are you?
|
|
|
|
Bob-->>John: How about you John?
|
|
|
|
Bob--x Alice: I am good thanks!
|
|
|
|
Bob-x John: I am good thanks!
|
|
|
|
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
|
|
|
|
Bob-->Alice: Checking with John...
|
|
|
|
alt either this
|
|
|
|
Alice->>John: Yes
|
|
|
|
else or this
|
|
|
|
Alice->>John: No
|
|
|
|
else or this will happen
|
|
|
|
Alice->John: Maybe
|
|
|
|
end
|
|
|
|
par this happens in parallel
|
|
|
|
Alice -->> Bob: Parallel message 1
|
|
|
|
and
|
|
|
|
Alice -->> John: Parallel message 2
|
2022-01-21 17:17:31 +01:00
|
|
|
end
|
2022-09-05 00:48:36 +05:30
|
|
|
</pre>
|
2023-05-24 11:27:17 +02:00
|
|
|
<script type="module">
|
|
|
|
// import mindmap from '../../packages/mermaid-mindmap/src/detector';
|
|
|
|
// import example from '../../packages/mermaid-example-diagram/src/mermaid-example-diagram.core.mjs';
|
|
|
|
import mermaid from './mermaid.esm.mjs';
|
|
|
|
// await mermaid.registerExternalDiagrams([example]);
|
2020-08-16 08:45:44 +02:00
|
|
|
mermaid.parseError = function (err, hash) {
|
2021-12-04 15:28:40 -08:00
|
|
|
// console.error('Mermaid error: ', err);
|
|
|
|
};
|
2020-08-16 08:45:44 +02:00
|
|
|
mermaid.initialize({
|
2023-05-24 11:27:17 +02:00
|
|
|
// theme: 'forest',
|
2022-08-18 19:11:33 +02:00
|
|
|
startOnLoad: true,
|
|
|
|
logLevel: 0,
|
2022-01-21 17:17:31 +01:00
|
|
|
flowchart: {
|
2023-05-24 11:27:17 +02:00
|
|
|
// defaultRenderer: 'elk',
|
|
|
|
useMaxWidth: false,
|
|
|
|
// htmlLabels: false,
|
|
|
|
htmlLabels: true,
|
2021-04-30 13:50:21 +02:00
|
|
|
},
|
2023-05-24 11:27:17 +02:00
|
|
|
// htmlLabels: false,
|
|
|
|
gantt: {
|
|
|
|
useMaxWidth: false,
|
|
|
|
},
|
|
|
|
sequence: {
|
|
|
|
wrap: true,
|
|
|
|
},
|
|
|
|
useMaxWidth: false,
|
2020-08-16 08:45:44 +02:00
|
|
|
});
|
2021-12-04 15:28:40 -08:00
|
|
|
function callback() {
|
2022-09-05 00:48:36 +05:30
|
|
|
alert('It worked');
|
|
|
|
}
|
2022-09-14 11:11:12 +05:30
|
|
|
mermaid.parseError = function (err, hash) {
|
|
|
|
console.error('In parse error:');
|
|
|
|
console.error(err);
|
|
|
|
};
|
2023-05-24 11:27:17 +02:00
|
|
|
// mermaid.test1('first_slow', 1200).then((r) => console.info(r));
|
|
|
|
// mermaid.test1('second_fast', 200).then((r) => console.info(r));
|
|
|
|
// mermaid.test1('third_fast', 200).then((r) => console.info(r));
|
|
|
|
// mermaid.test1('forth_slow', 1200).then((r) => console.info(r));
|
2020-08-16 08:45:44 +02:00
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|