@podlite/diagram 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -149
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,135 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
B-->C
|
|
12
|
-
C-->A
|
|
13
|
-
D-->C
|
|
14
|
-
=end Mermaid
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-

|
|
18
|
-
|
|
19
|
-
[Open this example in pod6.in](https://pod6.in/#p=%3Dbegin+Mermaid%0Agraph+LR%0A++++++++A-->B%0A++++++++B-->C%0A++++++++C-->A%0A++++++++D-->C%0A%3Dend+Mermaid)
|
|
20
|
-
|
|
21
|
-
#### Flowchart
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
=Mermaid
|
|
25
|
-
graph LR
|
|
26
|
-
A[Square Rect] -- Link text --> B((Circle))
|
|
27
|
-
A --> C(Round Rect)
|
|
28
|
-
B --> D{Rhombus}
|
|
29
|
-
C --> D
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-

|
|
33
|
-
|
|
34
|
-
[Open this example in pod6.in](https://pod6.in/#p=%3DMermaid%0Agraph+LR%0A++++A%5BSquare+Rect%5D+--+Link+text+-->+B%28%28Circle%29%29%0A++++A+-->+C%28Round+Rect%29%0A++++B+-->+D%7BRhombus%7D%0A++++C+-->+D)
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
=Mermaid
|
|
38
|
-
graph TD
|
|
39
|
-
A(Coffee machine <br>not working) --> B{Machine has power?}
|
|
40
|
-
B -->|No| H(Plug in and turn on)
|
|
41
|
-
B -->|Yes| C{Out of beans or water?} -->|Yes| G(Refill beans and water)
|
|
42
|
-
C -->|No| D{Filter warning?} -->|Yes| I(Replace or clean filter)
|
|
43
|
-
D -->|No| F(Send for repair)
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-

|
|
47
|
-
|
|
48
|
-
[Open this example in pod6.in](https://pod6.in/#p=%3DMermaid%0Agraph+TD%0A+++A%28Coffee+machine+<br>not+working%29+-->+B%7BMachine+has+power%3F%7D%0A+++B+-->%7CNo%7C+H%28Plug+in+and+turn+on%29%0A+++B+-->%7CYes%7C+C%7BOut+of+beans+or+water%3F%7D+-->%7CYes%7C+G%28Refill+beans+and+water%29%0A+++C+-->%7CNo%7C+D%7BFilter+warning%3F%7D+-->%7CYes%7C+I%28Replace+or+clean+filter%29%0A+++D+-->%7CNo%7C+F%28Send+for+repair%29)
|
|
49
|
-
|
|
50
|
-
#### UML sequence diagram
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
=Mermaid
|
|
54
|
-
sequenceDiagram
|
|
55
|
-
autonumber
|
|
56
|
-
Student->>Admin: Can I enrol this semester?
|
|
57
|
-
loop enrolmentCheck
|
|
58
|
-
Admin->>Admin: Check previous results
|
|
59
|
-
end
|
|
60
|
-
Note right of Admin: Exam results may <br> be delayed
|
|
61
|
-
Admin-->>Student: Enrolment success
|
|
62
|
-
Admin->>Professor: Assign student to tutor
|
|
63
|
-
Professor-->>Admin: Student is assigned
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/podlite/podlite/main/assets/podlite-mark-core-dark.svg">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/podlite/podlite/main/assets/podlite-mark-core.svg" width="350" alt="@podlite/diagram">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
<p align="center"><em>embed Mermaid diagrams in Podlite documents — renders to SVG</em></p>
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @podlite/diagram
|
|
64
11
|
```
|
|
65
12
|
|
|
66
|
-

|
|
67
|
-
|
|
68
|
-
[Open this example in pod6.in](https://pod6.in/#p=%3DMermaid%0AsequenceDiagram%0A++++autonumber%0A++++Student->>Admin%3A+Can+I+enrol+this+semester%3F%0A++++loop+enrolmentCheck%0A++++++++Admin->>Admin%3A+Check+previous+results%0A++++end%0A++++Note+right+of+Admin%3A+Exam+results+may+<br>+be+delayed%0A++++Admin-->>Student%3A+Enrolment+success%0A++++Admin->>Professor%3A+Assign+student+to+tutor%0A++++Professor-->>Admin%3A+Student+is+assigned)
|
|
69
|
-
|
|
70
|
-
#### UML class diagram
|
|
71
|
-
|
|
72
|
-
```
|
|
73
|
-
=Mermaid
|
|
74
|
-
classDiagram
|
|
75
|
-
Person <|-- Student
|
|
76
|
-
Person <|-- Professor
|
|
77
|
-
Person : +String name
|
|
78
|
-
Person : +String phoneNumber
|
|
79
|
-
Person : +String emailAddress
|
|
80
|
-
Person: +purchaseParkingPass()
|
|
81
|
-
Address "1" <-- "0..1" Person:lives at
|
|
82
|
-
class Student{
|
|
83
|
-
+int studentNumber
|
|
84
|
-
+int averageMark
|
|
85
|
-
+isEligibleToEnrol()
|
|
86
|
-
+getSeminarsTaken()
|
|
87
|
-
}
|
|
88
|
-
class Professor{
|
|
89
|
-
+int salary
|
|
90
|
-
}
|
|
91
|
-
class Address{
|
|
92
|
-
+String street
|
|
93
|
-
+String city
|
|
94
|
-
+String state
|
|
95
|
-
+int postalCode
|
|
96
|
-
+String country
|
|
97
|
-
-validate()
|
|
98
|
-
+outputAsLabel()
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-

|
|
103
|
-
|
|
104
|
-
[Open this example in pod6.in](https://pod6.in/#p=%3DMermaid%0AclassDiagram%0A+++Person+<%7C--+Student%0A+++Person+<%7C--+Professor%0A+++Person+%3A+%2BString+name%0A+++Person+%3A+%2BString+phoneNumber%0A+++Person+%3A+%2BString+emailAddress%0A+++Person%3A+%2BpurchaseParkingPass%28%29%0A+++Address+"1"+<--+"0..1"+Person%3Alives+at%0A+++class+Student%7B%0A++++++%2Bint+studentNumber%0A++++++%2Bint+averageMark%0A++++++%2BisEligibleToEnrol%28%29%0A++++++%2BgetSeminarsTaken%28%29%0A++++%7D%0A++++class+Professor%7B%0A++++++%2Bint+salary%0A++++%7D%0A++++class+Address%7B%0A++++++%2BString+street%0A++++++%2BString+city%0A++++++%2BString+state%0A++++++%2Bint+postalCode%0A++++++%2BString+country%0A++++++-validate%28%29%0A++++++%2BoutputAsLabel%28%29%0A++++%7D)
|
|
105
|
-
|
|
106
|
-
#### Gantt diagram
|
|
107
|
-
|
|
108
|
-
```
|
|
109
|
-
=Mermaid
|
|
110
|
-
gantt
|
|
111
|
-
title Example Gantt diagram
|
|
112
|
-
dateFormat YYYY-MM-DD
|
|
113
|
-
section Team 1
|
|
114
|
-
Research & requirements :done, a1, 2021-04-08, 2021-04-10
|
|
115
|
-
Review & documentation : after a1, 20d
|
|
116
|
-
section Team 2
|
|
117
|
-
Implementation :crit, active, 2021-04-25 , 20d
|
|
118
|
-
Testing :crit, 20d
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-

|
|
122
|
-
|
|
123
|
-
[Open this example in pod6.in](https://pod6.in/#p=+%3DMermaid%0A+gantt%0A+title+Example+Gantt+diagram%0A++++dateFormat++YYYY-MM-DD%0A++++section+Team+1%0A++++Research+%26+requirements+%3Adone%2C+a1%2C+2021-04-08%2C+2021-04-10%0A++++Review+%26+documentation+%3A+after+a1%2C+20d%0A++++section+Team+2%0A++++Implementation++++++%3Acrit%2C+active%2C+2021-04-25++%2C+20d%0A++++Testing++++++%3Acrit%2C+20d)
|
|
124
|
-
|
|
125
|
-
## Contributing
|
|
126
|
-
|
|
127
|
-
This is an open source program. Feel free to fork and contribute.
|
|
128
|
-
|
|
129
|
-
In order to keep the match between this documentation and the last release, please contribute and pull requests on the dedicated develop branch.
|
|
130
|
-
|
|
131
|
-
## Useful links
|
|
132
|
-
|
|
133
13
|
<div align="center">
|
|
134
14
|
<table border=0><tr><td valign=top><div align="center">
|
|
135
15
|
|
|
@@ -138,7 +18,7 @@ In order to keep the match between this documentation and the last release, plea
|
|
|
138
18
|
</div>
|
|
139
19
|
|
|
140
20
|
- [Source](https://github.com/podlite/podlite-specs)
|
|
141
|
-
- [
|
|
21
|
+
- [HTML](https://podlite.org/specification)
|
|
142
22
|
- [Discussions](https://github.com/podlite/podlite-specs/discussions)
|
|
143
23
|
|
|
144
24
|
<div align="center">
|
|
@@ -153,48 +33,41 @@ In order to keep the match between this documentation and the last release, plea
|
|
|
153
33
|
|
|
154
34
|
</td><td valign=top><div align="center">
|
|
155
35
|
|
|
156
|
-
##### publishing
|
|
36
|
+
##### publishing
|
|
157
37
|
|
|
158
38
|
</div>
|
|
159
39
|
|
|
160
40
|
- [Podlite-web](https://github.com/podlite/podlite-web)
|
|
161
41
|
- [How-to article](https://zahatski.com/2022/8/23/1/start-you-own-blog-site-with-podlite-for-web)
|
|
162
|
-
- [Issues](https://github.com/podlite/podlite-specs/issues)
|
|
163
42
|
- [Changelog](https://github.com/podlite/podlite-web/releases)
|
|
164
|
-
- [Practical case: Raku knowledge base ](https://raku-knowledge-base.podlite.org/)
|
|
165
43
|
|
|
166
44
|
</td><td valign=top><div align="center">
|
|
167
|
-
|
|
168
|
-
##### desktop
|
|
45
|
+
|
|
46
|
+
##### desktop editor
|
|
169
47
|
|
|
170
48
|
</div>
|
|
171
49
|
|
|
172
|
-
- [Podlite-desktop](https://github.com/podlite/podlite-desktop)
|
|
173
50
|
- [Releases](https://github.com/podlite/podlite-desktop/releases)
|
|
174
51
|
- [Issues](https://github.com/podlite/podlite-desktop/issues)
|
|
175
|
-
- Stores:
|
|
176
|
-
|
|
177
|
-
- [Windows](https://www.microsoft.com/store/apps/9NVNT9SNQJM8)
|
|
178
|
-
- [Mac App](https://apps.apple.com/us/app/podlite/id1526511053)
|
|
52
|
+
- Stores: [Mac](https://apps.apple.com/us/app/podlite/id1526511053) · [Windows](https://www.microsoft.com/store/apps/9NVNT9SNQJM8) · [Linux](https://snapcraft.io/podlite)
|
|
53
|
+
|
|
179
54
|
</td><td valign=top><div align="center">
|
|
180
55
|
|
|
181
|
-
#####
|
|
56
|
+
##### resources
|
|
182
57
|
|
|
183
|
-
|
|
58
|
+
</div>
|
|
184
59
|
|
|
185
|
-
- [Roadmap](https://podlite.org/#Roadmap)
|
|
186
|
-
- [github.com/podlite](https://github.com/podlite/) 🤩
|
|
187
60
|
- [podlite.org](https://podlite.org)
|
|
188
61
|
- [pod6.in](https://pod6.in/)
|
|
189
|
-
- [
|
|
190
|
-
- [Funding
|
|
62
|
+
- [github.com/podlite](https://github.com/podlite/)
|
|
63
|
+
- [Funding](https://opencollective.com/podlite)
|
|
191
64
|
|
|
192
65
|
</td></tr></table>
|
|
193
66
|
</div>
|
|
194
67
|
|
|
195
|
-
##
|
|
68
|
+
## Author
|
|
196
69
|
|
|
197
|
-
Copyright (c) 2021
|
|
70
|
+
Copyright (c) 2021–2026 Aliaksandr Zahatski
|
|
198
71
|
|
|
199
72
|
## License
|
|
200
73
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podlite/diagram",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
4
|
"description": "Embed Mermaid diagrams in Podlite documents — renders to SVG",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"homepage": "https://podlite.org",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"module": "./esm/index.js"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@podlite/schema": "0.0.
|
|
52
|
+
"@podlite/schema": "0.0.38",
|
|
53
53
|
"mermaid": "8.12.1",
|
|
54
54
|
"react-is": "^18.0.0"
|
|
55
55
|
},
|