paseo-plugin-mermaid 0.2.3 → 0.3.0
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/OVERVIEW.md +1 -1
- package/README.md +36 -17
- package/assets/icon.png +0 -0
- package/package.json +2 -1
- package/paseo-plugin.json +2 -1
package/OVERVIEW.md
CHANGED
|
@@ -4,4 +4,4 @@ Diagrams are drawn from the message text when the message renders, and drawing s
|
|
|
4
4
|
|
|
5
5
|
Each diagram has a toolbar to zoom, fit to view, pop out to a larger view, and show the code. Zoom matches Paseo's own diagram viewer: 100% is the drawing fitted to the row.
|
|
6
6
|
|
|
7
|
-
The plugin runs entirely in the Paseo app on desktop and mobile, works with Paseo 0.
|
|
7
|
+
The plugin runs entirely in the Paseo app on desktop and mobile, works with Paseo 0.11 to 0.13, has no settings, and needs no additional setup.
|
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<p align="center"><img src="assets/icon.png" width="88" alt=""></p>
|
|
2
|
+
|
|
1
3
|
<h1 align="center">paseo-plugin-mermaid</h1>
|
|
2
4
|
|
|
3
5
|
<p align="center">
|
|
@@ -6,19 +8,27 @@
|
|
|
6
8
|
</p>
|
|
7
9
|
|
|
8
10
|
<p align="center">
|
|
9
|
-
<
|
|
10
|
-
<img src="https://img.shields.io/
|
|
11
|
+
<a href="https://github.com/dutchakdev/paseo-plugin-mermaid/actions/workflows/ci.yml"><img src="https://github.com/dutchakdev/paseo-plugin-mermaid/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/paseo-plugin-mermaid"><img src="https://img.shields.io/npm/v/paseo-plugin-mermaid" alt="npm"></a>
|
|
13
|
+
<img src="https://img.shields.io/badge/Paseo-0.11.x%20%E2%80%93%200.13.x-3987e5" alt="Supports Paseo 0.11.x through 0.13.x, including betas">
|
|
11
14
|
<img src="https://img.shields.io/badge/dependencies-none-c98500" alt="No runtime dependencies">
|
|
12
15
|
<img src="https://img.shields.io/badge/license-MIT-9aa1a6" alt="MIT licensed">
|
|
13
16
|
</p>
|
|
14
17
|
|
|
15
18
|
<p align="center">
|
|
16
|
-
<img src="docs/preview.
|
|
19
|
+
<img src="docs/preview.png" alt="A flowchart and a sequence diagram rendered in a Paseo transcript" width="920">
|
|
17
20
|
</p>
|
|
18
21
|
|
|
19
22
|
<p align="center"><sub>Generated by <code>npm run preview</code>: the diagram above comes from the plugin's own parser and layout, so the picture cannot drift from the code.</sub></p>
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
Listed in the [Paseo plugin directory](https://paseo.sh/plugins/dutchakdev/mermaid).
|
|
25
|
+
|
|
26
|
+
- **Inline, from the first streamed line.** The diagram is drawn in the message at the
|
|
27
|
+
width of the chat while the agent is still writing it.
|
|
28
|
+
- **Flowcharts and sequence diagrams**, with the usual node shapes, edge styles and labels.
|
|
29
|
+
- **A toolbar on every diagram:** zoom, fit to view, pop out, and the source on demand.
|
|
30
|
+
- **Nothing leaves the app.** The plugin has no server half, no settings and no network
|
|
31
|
+
access; it reads the message text it is given and draws it with React Native views.
|
|
22
32
|
|
|
23
33
|
Paseo draws Mermaid itself too, in an iframe inside a zoomable box with a
|
|
24
34
|
fullscreen viewer. This plugin draws it inline instead: readable at the width of
|
|
@@ -28,21 +38,31 @@ source on demand.
|
|
|
28
38
|
|
|
29
39
|
## Install
|
|
30
40
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
paseo plugin ls # expect: running
|
|
34
|
-
```
|
|
41
|
+
Plugins must be enabled daemon-wide first, under **Settings → Plugins → Enable
|
|
42
|
+
plugins**. Then pick the source that matches your Paseo:
|
|
35
43
|
|
|
36
|
-
Paseo
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
| Paseo | Source | Command |
|
|
45
|
+
| ----- | ------ | ------- |
|
|
46
|
+
| 0.11 and newer | [Plugin directory](https://paseo.sh/plugins/dutchakdev/mermaid), the reviewed version | `paseo plugin add dutchakdev/mermaid` |
|
|
47
|
+
| 0.11 and newer | npm, the newest release before the directory approves it | `paseo plugin install npm:paseo-plugin-mermaid` |
|
|
48
|
+
| 0.8 to 0.10, 0.11.0 betas | GitHub, release 0.2.4, the last one for these versions | `paseo plugin add dutchakdev/paseo-plugin-mermaid --ref v0.2.4` |
|
|
49
|
+
|
|
50
|
+
`paseo plugin ls` should then show `mermaid` as `running`, and `paseo plugin update mermaid`
|
|
51
|
+
pulls later releases from the same source. From Paseo 0.11 a bare `owner/name` names a
|
|
52
|
+
directory entry, so a GitHub source there needs the `git:` prefix:
|
|
53
|
+
`git:dutchakdev/paseo-plugin-mermaid`.
|
|
54
|
+
|
|
55
|
+
The plugin supports **Paseo 0.11.x through 0.13.x, including betas**, on both
|
|
39
56
|
sides: the daemon compiles it, and the app checks its declared version range.
|
|
40
57
|
It has no server entry, so it starts no daemon process.
|
|
41
58
|
|
|
42
|
-
The manifest
|
|
43
|
-
|
|
59
|
+
The manifest asks for `>=0.11.0` because it declares the icon shown in the plugin
|
|
60
|
+
directory, and Paseo 0.8 to 0.10 refuse a manifest with a field they do not know.
|
|
61
|
+
Paseo also checks a prerelease's stable version core, so `0.13.0-beta.1` satisfies
|
|
62
|
+
this range. The 0.11.0 betas pass that check but predate the `icon` field, so they
|
|
63
|
+
refuse the manifest as well and need the release named in the install table; see
|
|
44
64
|
[version requirements](https://paseo.sh/docs/plugins/reference#requirements).
|
|
45
|
-
The development SDK stays pinned to 0.8.0; Paseo supplies the runtime modules.
|
|
65
|
+
The development SDK stays pinned to 0.8.0, an API every supported release still provides; Paseo supplies the runtime modules.
|
|
46
66
|
|
|
47
67
|
To work on it locally instead:
|
|
48
68
|
|
|
@@ -54,9 +74,6 @@ npm run typecheck && npm test
|
|
|
54
74
|
paseo plugin install "$PWD"
|
|
55
75
|
```
|
|
56
76
|
|
|
57
|
-
Plugins must be enabled daemon-wide first, under **Settings → Plugins → Enable
|
|
58
|
-
plugins**.
|
|
59
|
-
|
|
60
77
|
## What it draws
|
|
61
78
|
|
|
62
79
|
| Diagram | Supported |
|
|
@@ -149,6 +166,8 @@ multiplies that fit, which is why 100% is the fit itself and not the natural siz
|
|
|
149
166
|
|
|
150
167
|
```sh
|
|
151
168
|
npm run check # typecheck, then the tests
|
|
169
|
+
npm run preview # regenerates docs/preview.svg from the parser and layout
|
|
170
|
+
./scripts/preview-png.sh # renders it to docs/preview.png for the plugin directory
|
|
152
171
|
paseo plugin reload mermaid
|
|
153
172
|
```
|
|
154
173
|
|
package/assets/icon.png
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-plugin-mermaid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Render Mermaid diagrams inside the Paseo chat timeline",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "dutchakdev",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"files": [
|
|
42
42
|
"paseo-plugin.json",
|
|
43
43
|
"OVERVIEW.md",
|
|
44
|
+
"assets/icon.png",
|
|
44
45
|
"index.client.tsx",
|
|
45
46
|
"client/",
|
|
46
47
|
"shared/"
|
package/paseo-plugin.json
CHANGED