@riebeckite/plugin-excalidraw 0.0.21 → 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.
Files changed (3) hide show
  1. package/README.md +14 -10
  2. package/README_ja.md +13 -2
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @riebeckite/plugin-excalidraw
2
2
 
3
+ <!-- Generated from docs/docs/plugins/excalidraw.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
4
+
3
5
  Excalidraw drawing rendering for Obsidian wikilinks.
4
6
 
5
7
  [日本語](./README_ja.md)
@@ -49,20 +51,22 @@ fenced code block is extracted and supports both `json` and lz-string
49
51
  `.excalidraw` or `.excalidraw.md`; everything else returns `null` and falls
50
52
  through to the attachment plugin
51
53
  - Reads the file under `config.content.directory` (path-traversal safe)
52
- - Parses the scene and emits
53
-
54
- ```html
55
- <figure class="rr-excalidraw" data-excalidraw="pending" data-excalidraw-lazy="true">
56
- <div class="rr-excalidraw__canvas" role="img" aria-label="drawing.excalidraw"></div>
57
- <script type="application/json" class="rr-excalidraw__payload">{"elements":[...],"appState":{...},"files":{...}}</script>
58
- </figure>
59
- ```
60
-
54
+ - Parses the scene before rendering it.
61
55
  - Wikilink aliases can set a size: `![[drawing.excalidraw|800]]` (width) or
62
56
  `![[drawing.excalidraw|800x600]]` (width x height)
63
57
  - Missing files, invalid scenes, or out-of-directory paths render an error
64
58
  placeholder and log to the console
65
59
 
60
+ #### Live example
61
+
62
+ The following source is rendered as an SVG drawing on this page.
63
+
64
+ ````md
65
+ ![[HW]]
66
+ ````
67
+
68
+ ![[HW]]
69
+
66
70
  ### Client (`initExcalidraw`)
67
71
 
68
72
  - Renders pending figures to SVG with `exportToSvg` from
@@ -85,6 +89,6 @@ fenced code block is extracted and supports both `json` and lz-string
85
89
 
86
90
  ## See also
87
91
 
88
- - [Plugin guide](../../../docs/docs/reference/plugin-api.md)
92
+ - [Plugin guide](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/plugin-api.md)
89
93
  - [`@riebeckite/plugin-obsidian-markdown`](../obsidian-markdown/README.md)
90
94
  - [`@riebeckite/plugin-attachment`](../attachment/README.md)
package/README_ja.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @riebeckite/plugin-excalidraw
2
2
 
3
+ <!-- Generated from docs/docs/plugins/excalidraw.ja.md. Edit the canonical documentation in docs/docs/plugins and run `pnpm docs:sync`. -->
4
+
3
5
  Obsidian の Excalidraw 埋め込みを SVG として表示するプラグインです。
4
6
 
5
7
  [English](./README.md)
@@ -28,6 +30,16 @@ export default defineConfig({
28
30
 
29
31
  `![[drawing.excalidraw|800]]` なら幅を、`![[drawing.excalidraw|800x600]]` なら幅と高さを指定できます。ファイルがない、内容が不正、またはコンテンツディレクトリ外を指す場合は、エラー用プレースホルダーを表示します。
30
32
 
33
+ ## 実行例
34
+
35
+ 以下のソースは、このページ上で SVG の図として実際に描画されます。
36
+
37
+ ````md
38
+ ![[HW]]
39
+ ````
40
+
41
+ ![[HW]]
42
+
31
43
  ## 描画のタイミング
32
44
 
33
45
  既定では、図が表示領域の近くに入ってから描画します。`IntersectionObserver` が使えない環境を含め、描画に失敗した要素は `data-excalidraw="error"` になり、エラー表示へ切り替わります。
@@ -43,7 +55,6 @@ export default defineConfig({
43
55
 
44
56
  ## 関連資料
45
57
 
46
- - [プラグインシステム](../../../docs/docs/reference/plugin-api.ja.md)
58
+ - [プラグインシステム](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/reference/plugin-api.ja.md)
47
59
  - [`@riebeckite/plugin-obsidian-markdown`](../obsidian-markdown/README_ja.md)
48
60
  - [`@riebeckite/plugin-attachment`](../attachment/README_ja.md)
49
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-excalidraw",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "@excalidraw/excalidraw": "^0.18.0",
25
25
  "lz-string": "^1.5.0",
26
26
  "unist-util-visit": "^5.0.0",
27
- "@riebeckite/core": "0.0.21"
27
+ "@riebeckite/core": "0.0.22"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/mdast": "^4.0.4"