@riebeckite/plugin-excalidraw 0.0.27 → 0.0.28
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 +5 -5
- package/README_ja.md +7 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Excalidraw drawing rendering for Obsidian wikilinks.
|
|
|
10
10
|
|
|
11
11
|
`excalidraw()` provides the `renderAttachment` hook that
|
|
12
12
|
`@riebeckite/plugin-obsidian-markdown` uses when an embedded wikilink
|
|
13
|
-
(``) resolves to an Excalidraw file. The plugin emits a
|
|
14
14
|
placeholder figure carrying the drawing payload, and the client entry renders
|
|
15
15
|
it to SVG.
|
|
16
16
|
|
|
@@ -47,13 +47,13 @@ fenced code block is extracted and supports both `json` and lz-string
|
|
|
47
47
|
|
|
48
48
|
### Build (`renderAttachment`)
|
|
49
49
|
|
|
50
|
-
- Only handles embedded wikilinks (``) to paths ending in
|
|
51
51
|
`.excalidraw` or `.excalidraw.md`; everything else returns `null` and falls
|
|
52
52
|
through to the attachment plugin
|
|
53
53
|
- Reads the file under `config.content.directory` (path-traversal safe)
|
|
54
54
|
- Parses the scene before rendering it.
|
|
55
|
-
- Wikilink aliases can set a size: `` (width) or
|
|
56
|
+
`` (width x height)
|
|
57
57
|
- Missing files, invalid scenes, or out-of-directory paths render an error
|
|
58
58
|
placeholder and log to the console
|
|
59
59
|
|
|
@@ -65,7 +65,7 @@ The following source is rendered as an SVG drawing on this page.
|
|
|
65
65
|
![[HW]]
|
|
66
66
|
````
|
|
67
67
|
|
|
68
|
-

|
|
69
69
|
|
|
70
70
|
### Client (`initExcalidraw`)
|
|
71
71
|
|
package/README_ja.md
CHANGED
|
@@ -8,7 +8,7 @@ Obsidian の Excalidraw 埋め込みを SVG として表示するプラグイン
|
|
|
8
8
|
|
|
9
9
|
## できること
|
|
10
10
|
|
|
11
|
-
`` のような埋め込みウィキリンクを検出し、図のデータを含むプレースホルダーを出力します。ブラウザ側の `initExcalidraw` が、そのプレースホルダーを SVG に置き換えます。通常のリンクや対象外のファイルは処理せず、添付ファイル用のレンダラーに任せます。
|
|
12
12
|
|
|
13
13
|
## 設定
|
|
14
14
|
|
|
@@ -25,10 +25,10 @@ export default defineConfig({
|
|
|
25
25
|
|
|
26
26
|
## 読み込めるファイル
|
|
27
27
|
|
|
28
|
-
- `*.excalidraw
|
|
29
|
-
- `*.excalidraw.md
|
|
28
|
+
- `*.excalidraw`:`elements`、任意の `appState` と `files` を持つ JSON シーン
|
|
29
|
+
- `*.excalidraw.md`:Obsidian Excalidraw が保存する Markdown。`## Drawing` 内の `json` と `compressed-json` を読み取ります。
|
|
30
30
|
|
|
31
|
-
`` なら幅を、`` なら幅と高さを指定できます。ファイルがない、内容が不正、またはコンテンツディレクトリ外を指す場合は、エラー用プレースホルダーを表示します。
|
|
32
32
|
|
|
33
33
|
## 実行例
|
|
34
34
|
|
|
@@ -38,7 +38,7 @@ export default defineConfig({
|
|
|
38
38
|
![[HW]]
|
|
39
39
|
````
|
|
40
40
|
|
|
41
|
-

|
|
42
42
|
|
|
43
43
|
## 描画のタイミング
|
|
44
44
|
|
|
@@ -60,8 +60,8 @@ Excalidraw の描画である Markdown エントリは、通常の Markdown ペ
|
|
|
60
60
|
|
|
61
61
|
## 公開 API
|
|
62
62
|
|
|
63
|
-
- `excalidraw(options?)` / `excalidrawPlugin
|
|
64
|
-
- `ExcalidrawOptions
|
|
63
|
+
- `excalidraw(options?)` / `excalidrawPlugin`:プラグインファクトリ
|
|
64
|
+
- `ExcalidrawOptions`:オプションの型
|
|
65
65
|
|
|
66
66
|
## 関連資料
|
|
67
67
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-excalidraw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.28",
|
|
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.
|
|
27
|
+
"@riebeckite/core": "0.0.28"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/mdast": "^4.0.4",
|