@riebeckite/plugin-plantuml 0.0.20 → 0.0.22
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 +30 -23
- package/README_ja.md +30 -18
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @riebeckite/plugin-plantuml
|
|
2
2
|
|
|
3
|
+
<!-- Generated from docs/docs/plugins/plantuml.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
|
|
4
|
+
|
|
3
5
|
PlantUML diagram rendering for ` ```plantuml ` code blocks. Diagrams are turned into
|
|
4
6
|
a PlantUML server image URL at build time; the build itself never talks to the
|
|
5
7
|
network and no client JavaScript is shipped.
|
|
@@ -20,29 +22,35 @@ export default defineConfig({
|
|
|
20
22
|
|
|
21
23
|
`plantuml` is also exported under the alias `plantumlPlugin`.
|
|
22
24
|
|
|
23
|
-
##
|
|
24
|
-
|
|
25
|
-
Each ` ```plantuml ` code block is
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<pre><code>...</code></pre>
|
|
36
|
-
</details>
|
|
37
|
-
<figcaption class="rb-plantuml__caption">...</figcaption>
|
|
38
|
-
</figure>
|
|
25
|
+
## Live example
|
|
26
|
+
|
|
27
|
+
Each ` ```plantuml ` code block is rendered as a diagram on this page.
|
|
28
|
+
|
|
29
|
+
#### Source
|
|
30
|
+
|
|
31
|
+
````md
|
|
32
|
+
```plantuml
|
|
33
|
+
@startuml
|
|
34
|
+
Alice -> Bob: Hello
|
|
35
|
+
Bob --> Alice: Hi
|
|
36
|
+
@enduml
|
|
39
37
|
```
|
|
38
|
+
````
|
|
40
39
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
#### Rendered
|
|
41
|
+
|
|
42
|
+
```plantuml
|
|
43
|
+
@startuml
|
|
44
|
+
Alice -> Bob: Hello
|
|
45
|
+
Bob --> Alice: Hi
|
|
46
|
+
@enduml
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The caption comes from the code block `title` or from a `%% caption: ...` line
|
|
50
|
+
in the source. Because `%%` is not PlantUML comment syntax, the `%% caption:`
|
|
51
|
+
line is removed from the diagram source before it is encoded. When there is no
|
|
52
|
+
caption, the image alternative text is `PlantUML diagram`. With `fallback`
|
|
53
|
+
enabled the original PlantUML source is kept in a collapsible details element.
|
|
46
54
|
|
|
47
55
|
## URL encoding
|
|
48
56
|
|
|
@@ -97,5 +105,4 @@ Encoding failures are reported with `file.message(...)`. Diagnostics use
|
|
|
97
105
|
|
|
98
106
|
## See also
|
|
99
107
|
|
|
100
|
-
- [Plugin guide](
|
|
101
|
-
|
|
108
|
+
- [Plugin guide](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/plugin-api.md)
|
package/README_ja.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @riebeckite/plugin-plantuml
|
|
2
2
|
|
|
3
|
+
<!-- Generated from docs/docs/plugins/plantuml.ja.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
|
|
4
|
+
|
|
3
5
|
`plantuml` コードブロックを PlantUML の図として表示するプラグインです。ビルド時に PlantUML サーバーの画像 URL を組み立てるだけで、ビルド中にネットワークへアクセスしません。クライアント用の JavaScript も配布しません。
|
|
4
6
|
|
|
5
7
|
[English](./README.md)
|
|
@@ -18,24 +20,35 @@ export default defineConfig({
|
|
|
18
20
|
|
|
19
21
|
`plantuml` は `plantumlPlugin` という別名でもエクスポートしています。
|
|
20
22
|
|
|
21
|
-
##
|
|
22
|
-
|
|
23
|
-
` ```plantuml `
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</details>
|
|
34
|
-
<figcaption class="rb-plantuml__caption">...</figcaption>
|
|
35
|
-
</figure>
|
|
23
|
+
## 実行例
|
|
24
|
+
|
|
25
|
+
` ```plantuml ` のコードブロックは、このページ上で図として実際に描画されます。
|
|
26
|
+
|
|
27
|
+
#### ソース
|
|
28
|
+
|
|
29
|
+
````md
|
|
30
|
+
```plantuml
|
|
31
|
+
@startuml
|
|
32
|
+
Alice -> Bob: Hello
|
|
33
|
+
Bob --> Alice: Hi
|
|
34
|
+
@enduml
|
|
36
35
|
```
|
|
36
|
+
````
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
#### 実行例
|
|
39
|
+
|
|
40
|
+
```plantuml
|
|
41
|
+
@startuml
|
|
42
|
+
Alice -> Bob: Hello
|
|
43
|
+
Bob --> Alice: Hi
|
|
44
|
+
@enduml
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
キャプションはコードブロックの `title`、またはソース中の `%% caption: ...` 行から取得
|
|
48
|
+
します。`%%` は PlantUML のコメント記法ではないため、`%% caption:` 行は図のソースから
|
|
49
|
+
取り除いてからエンコードします。キャプションがない場合、画像の代替テキストは
|
|
50
|
+
`PlantUML diagram` になります。`fallback` を有効にすると、元の PlantUML ソースを
|
|
51
|
+
折りたたみ表示で残します。
|
|
39
52
|
|
|
40
53
|
## URL のエンコード
|
|
41
54
|
|
|
@@ -78,5 +91,4 @@ export default defineConfig({
|
|
|
78
91
|
|
|
79
92
|
## 関連資料
|
|
80
93
|
|
|
81
|
-
- [プラグインシステム](
|
|
82
|
-
|
|
94
|
+
- [プラグインシステム](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/plugin-api.ja.md)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-plantuml",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"./style.css": "./style.css"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@riebeckite/core": "0.0.
|
|
18
|
+
"@riebeckite/core": "0.0.22"
|
|
19
19
|
},
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"access": "public"
|