@riebeckite/plugin-attachment 0.0.18 → 0.0.20

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
@@ -36,13 +36,13 @@ export default defineConfig({
36
36
  ### Embed (`![[file]]`)
37
37
 
38
38
  ```html
39
- <aside class="attachment-card rr-attachment" data-attachment-path="...">
40
- <div class="attachment-card__meta">
41
- <span class="attachment-card__format">PDF</span>
42
- <span class="attachment-card__size">1.2 MB</span>
39
+ <aside class="rr-attachment" data-attachment-path="...">
40
+ <div class="rr-attachment__meta">
41
+ <span class="rr-attachment__format">PDF</span>
42
+ <span class="rr-attachment__size">1.2 MB</span>
43
43
  </div>
44
- <div class="attachment-card__name">report.pdf</div>
45
- <a class="attachment-card__download" href="..." download>label</a>
44
+ <div class="rr-attachment__name">report.pdf</div>
45
+ <a class="rr-attachment__download" href="..." download>label</a>
46
46
  </aside>
47
47
  ```
48
48
 
@@ -67,6 +67,5 @@ Styles ship in `style.css` (inline attachment links also get a `↓` suffix).
67
67
 
68
68
  ## See also
69
69
 
70
- - [Plugin guide](../../../docs/docs/reference/plugin-api.en.md)
70
+ - [Plugin guide](../../../docs/docs/reference/plugin-api.md)
71
71
  - [`@riebeckite/plugin-obsidian-markdown`](../obsidian-markdown/README.md)
72
-
package/README_ja.md CHANGED
@@ -43,6 +43,6 @@ export default defineConfig({
43
43
 
44
44
  ## 関連資料
45
45
 
46
- - [プラグインシステム](../../../docs/docs/reference/plugin-api.md)
46
+ - [プラグインシステム](../../../docs/docs/reference/plugin-api.ja.md)
47
47
  - [`@riebeckite/plugin-obsidian-markdown`](../obsidian-markdown/README_ja.md)
48
48
 
package/dist/index.js CHANGED
@@ -39,14 +39,14 @@ async function renderAttachment(context, options) {
39
39
  if (!context.embed) {
40
40
  return `<a class="wikilink wikilink-attachment" href="${escapeHtmlAttribute(context.url)}" download>${escapeHtml(context.label || fileName)}</a>`;
41
41
  }
42
- const sizeHtml = size ? `<span class="attachment-card__size">${escapeHtml(size)}</span>` : "";
43
- return `<aside class="attachment-card rr-attachment" data-attachment-path="${escapeHtmlAttribute(context.path)}">
44
- <div class="attachment-card__meta">
45
- <span class="attachment-card__format">${escapeHtml(extension)}</span>
42
+ const sizeHtml = size ? `<span class="rr-attachment__size">${escapeHtml(size)}</span>` : "";
43
+ return `<aside class="rr-attachment" data-attachment-path="${escapeHtmlAttribute(context.path)}">
44
+ <div class="rr-attachment__meta">
45
+ <span class="rr-attachment__format">${escapeHtml(extension)}</span>
46
46
  ${sizeHtml}
47
47
  </div>
48
- <div class="attachment-card__name">${escapeHtml(fileName)}</div>
49
- <a class="attachment-card__download" href="${escapeHtmlAttribute(context.url)}" download>${escapeHtml(context.label || "Download")}</a>
48
+ <div class="rr-attachment__name">${escapeHtml(fileName)}</div>
49
+ <a class="rr-attachment__download" href="${escapeHtmlAttribute(context.url)}" download>${escapeHtml(context.label || "Download")}</a>
50
50
  </aside>`;
51
51
  }
52
52
  async function getAttachmentSize(context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-attachment",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
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"
18
+ "@riebeckite/core": "0.0.20"
19
19
  },
20
20
  "devDependencies": {
21
21
  "tsx": "^4.22.4"
package/style.css CHANGED
@@ -1,4 +1,4 @@
1
- .attachment-card {
1
+ .rr-attachment {
2
2
  display: grid;
3
3
  gap: 0.5rem;
4
4
  margin: 1.25rem 0;
@@ -7,7 +7,7 @@
7
7
  border-radius: 0.5rem;
8
8
  }
9
9
 
10
- .attachment-card__meta {
10
+ .rr-attachment__meta {
11
11
  display: flex;
12
12
  gap: 0.75rem;
13
13
  font-size: 0.75rem;
@@ -15,15 +15,15 @@
15
15
  opacity: 0.72;
16
16
  }
17
17
 
18
- .attachment-card__format {
18
+ .rr-attachment__format {
19
19
  font-weight: 700;
20
20
  }
21
21
 
22
- .attachment-card__name {
22
+ .rr-attachment__name {
23
23
  font-weight: 700;
24
24
  }
25
25
 
26
- .attachment-card__download {
26
+ .rr-attachment__download {
27
27
  width: fit-content;
28
28
  }
29
29