@podlite/diagram 0.0.39 → 0.0.41

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.
Files changed (2) hide show
  1. package/README.md +7 -191
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,200 +1,16 @@
1
- # =Mermaid block
1
+ # @podlite/diagram
2
2
 
3
- ### `=Mermaid` - use diagrams
3
+ embed Mermaid diagrams in Podlite documents — renders to SVG
4
4
 
5
- To render beautiful graphs, sequence and Gantt diagrams and flowcharts, one can use the `=Mermaid` blocks.
6
-
7
- ```
8
- =begin Mermaid
9
- graph LR
10
- A-->B
11
- B-->C
12
- C-->A
13
- D-->C
14
- =end Mermaid
15
- ```
16
-
17
- ![sample1](./doc/diagram-sample1.png)
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
- ![Flowchart](./doc/diagram-sample2.png)
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
- ![Flowchart](./doc/diagram-sample6.png)
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
64
- ```
65
-
66
- ![Flowchart](./doc/diagram-sample3.png)
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
- }
5
+ ```sh
6
+ npm install @podlite/diagram
100
7
  ```
101
8
 
102
- ![Flowchart](./doc/diagram-sample4.png)
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
- ![Flowchart](./doc/diagram-sample5.png)
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
- <div align="center">
134
- <table border=0><tr><td valign=top><div align="center">
135
-
136
- ##### specification
137
-
138
- </div>
139
-
140
- - [Source](https://github.com/podlite/podlite-specs)
141
- - [in HTML](https://podlite.org/specification)
142
- - [Discussions](https://github.com/podlite/podlite-specs/discussions)
143
-
144
- <div align="center">
145
-
146
- ##### implementation
147
-
148
- </div>
149
-
150
- - [Source](https://github.com/podlite/podlite)
151
- - [Changelog](https://github.com/podlite/podlite/releases)
152
- - [Issues](https://github.com/podlite/podlite/issues)
153
-
154
- </td><td valign=top><div align="center">
155
-
156
- ##### publishing system
157
-
158
- </div>
159
-
160
- - [Podlite-web](https://github.com/podlite/podlite-web)
161
- - [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
- - [Changelog](https://github.com/podlite/podlite-web/releases)
164
- - [Practical case: Raku knowledge base ](https://raku-knowledge-base.podlite.org/)
165
-
166
- </td><td valign=top><div align="center">
167
-
168
- ##### desktop viewer/editor
169
-
170
- </div>
171
-
172
- - [Podlite-desktop](https://github.com/podlite/podlite-desktop)
173
- - [Releases](https://github.com/podlite/podlite-desktop/releases)
174
- - [Issues](https://github.com/podlite/podlite-desktop/issues)
175
- - Stores:
176
- - [Linux](https://snapcraft.io/podlite)
177
- - [Windows](https://www.microsoft.com/store/apps/9NVNT9SNQJM8)
178
- - [Mac App](https://apps.apple.com/us/app/podlite/id1526511053)
179
- </td><td valign=top><div align="center">
180
-
181
- ##### online resurces
182
-
183
- </div>
184
-
185
- - [Roadmap](https://podlite.org/#Roadmap)
186
- - [github.com/podlite](https://github.com/podlite/)&nbsp;🤩
187
- - [podlite.org](https://podlite.org)
188
- - [pod6.in](https://pod6.in/)
189
- - [Podlite project updates](https://podlite.org/contents)
190
- - [Funding the ongoing development](https://opencollective.com/podlite)
191
-
192
- </td></tr></table>
193
- </div>
9
+ Part of the [Podlite](https://podlite.org) ecosystem — [source](https://github.com/podlite/podlite) · [specification](https://podlite.org/specification) · [online editor](https://pod6.in/)
194
10
 
195
- ## AUTHOR
11
+ ## Author
196
12
 
197
- Copyright (c) 2021-2025 Aliaksandr Zahatski
13
+ Copyright (c) 2021–2026 Aliaksandr Zahatski
198
14
 
199
15
  ## License
200
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podlite/diagram",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
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.35",
52
+ "@podlite/schema": "0.0.37",
53
53
  "mermaid": "8.12.1",
54
54
  "react-is": "^18.0.0"
55
55
  },