@riebeckite/plugin-attachment 0.0.32 → 0.0.33

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 CHANGED
@@ -61,7 +61,7 @@ Styles ship in `style.css` (inline attachment links also get a `↓` suffix).
61
61
 
62
62
  ## Exports
63
63
 
64
- - `attachment(options?)` / `attachmentPlugin` — plugin factory
64
+ - `attachment(options?)` / `attachment` — plugin factory
65
65
  - Type: `AttachmentOptions`
66
66
 
67
67
  ## See also
package/README_ja.md CHANGED
@@ -6,9 +6,9 @@ Obsidian 形式の添付ファイルリンクを、ダウンロードリンク
6
6
 
7
7
  [English](./README.md)
8
8
 
9
- ## まず何を解決するか
9
+ ## 概要
10
10
 
11
- `[report.pdf](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/report.pdf.ja.md)` や `![report.pdf](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/report.pdf.ja.md)` のような画像以外のウィキリンクを扱います。`@riebeckite/plugin-obsidian-markdown` がリンク先を添付ファイルとして解決したとき、このプラグインが表示を引き受けます。未登録でも通常のダウンロードリンクにはなりますが、埋め込み用のカードは作られません。
11
+ `[report.pdf](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/report.pdf.ja.md)` や `![report.pdf](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/report.pdf.ja.md)` のような画像以外のウィキリンクを扱います。`@riebeckite/plugin-obsidian-markdown` がリンク先を添付ファイルとして解決したとき、このプラグインが表示を引き受けます。プラグインを登録しない場合も通常のダウンロードリンクにはなりますが、埋め込み用のカードは作られません。
12
12
 
13
13
  ## 設定
14
14
 
@@ -25,7 +25,7 @@ export default defineConfig({
25
25
  });
26
26
  ```
27
27
 
28
- ## リンクと埋め込みで表示を分ける
28
+ ## リンクと埋め込みの表示
29
29
 
30
30
  - `[attachment-example.txt](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/attachment-example.txt.ja.md)` は、`download` 属性を持つ通常のリンクになります。
31
31
  - `![attachment-example.txt](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/attachment-example.txt.ja.md)` は、拡張子、ファイル名、ダウンロードリンクを含む添付カードになります。
@@ -46,12 +46,12 @@ export default defineConfig({
46
46
 
47
47
  ![attachment-example.txt](https://github.com/Rerurate514/riebeckite/blob/main/docs/docs/attachment-example.txt.ja.md)
48
48
 
49
- - 形式は大文字にした拡張子です。
49
+ - 形式は拡張子を大文字にしたものです。
50
50
  - カードのファイルサイズは `config.content.directory` 配下から読み取ります。パスは
51
51
  コンテンツディレクトリの外へ出られないよう検査され、読めないファイルのサイズは表示しません。
52
- - 埋め込みカードには Theme が対象にできる安定した `rr-attachment` ルート Hook が付き、インライン添付リンクには `rr-attachment-link` を使用します。
52
+ - 埋め込みカードには、テーマが対象にできる安定した `rr-attachment` ルートフックが付きます。インラインの添付リンクには `rr-attachment-link` を使います。
53
53
 
54
- スタイルは `style.css` に同梱されます(インラインの添付リンクには `↓` 接尾辞も付きます)。
54
+ スタイルは `style.css` に含まれます(インラインの添付リンクには `↓` の接尾辞も付きます)。
55
55
 
56
56
  ## オプション
57
57
 
@@ -61,7 +61,7 @@ export default defineConfig({
61
61
 
62
62
  ## 公開 API
63
63
 
64
- - `attachment(options?)` / `attachmentPlugin`:プラグインファクトリ
64
+ - `attachment(options?)` / `attachment`:プラグインファクトリ
65
65
  - `AttachmentOptions`:オプションの型
66
66
 
67
67
  ## 関連資料
package/dist/index.d.ts CHANGED
@@ -2,4 +2,3 @@ export type AttachmentOptions = {
2
2
  showSize?: boolean;
3
3
  };
4
4
  export declare function attachment(options?: AttachmentOptions): import("@riebeckite/core").RiebeckitePlugin<AttachmentOptions>;
5
- export declare const attachmentPlugin: typeof attachment;
package/dist/index.js CHANGED
@@ -30,7 +30,6 @@ function attachment(options = {}) {
30
30
  ]
31
31
  });
32
32
  }
33
- var attachmentPlugin = attachment;
34
33
  async function renderAttachment(context, options) {
35
34
  if (context.kind !== "attachment") return null;
36
35
  const fileName = getFileName(context.path);
@@ -74,6 +73,5 @@ function formatBytes(bytes) {
74
73
  return `${value.toFixed(digits)} ${units[unitIndex]}`;
75
74
  }
76
75
  export {
77
- attachment,
78
- attachmentPlugin
76
+ attachment
79
77
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-attachment",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
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.32"
18
+ "@riebeckite/core": "0.0.33"
19
19
  },
20
20
  "devDependencies": {
21
21
  "tsx": "^4.22.4"