@riebeckite/plugin-dataview 0.0.16 → 0.0.18

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
@@ -20,8 +20,9 @@ LIMIT 10
20
20
  ```
21
21
  ````
22
22
 
23
- and renders them from the manifest (every note's frontmatter, tags, links, and
24
- permalink). DataviewJS (`dataviewjs`) is **not** supported: those blocks stay
23
+ and renders them from the manifest using each public note's frontmatter, tags,
24
+ links, and permalink. Unlisted, draft, and scheduled notes are excluded from
25
+ queries. DataviewJS (`dataviewjs`) is **not** supported: those blocks stay
25
26
  code blocks and produce a diagnostic.
26
27
 
27
28
  ## Usage
@@ -224,5 +225,5 @@ with `hideFallback`.
224
225
 
225
226
  ## See also
226
227
 
227
- - [Plugin guide](../../../docs/en/docs/reference/plugin-api.md)
228
+ - [Plugin guide](../../../docs/docs/reference/plugin-api.en.md)
228
229
 
package/README_ja.md CHANGED
@@ -18,7 +18,7 @@ LIMIT 10
18
18
  ```
19
19
  ````
20
20
 
21
- ブロックはマニフェスト(全ノートの frontmatter・タグ・リンク・パーマリンク)を使って描画されます。DataviewJS(`dataviewjs`)には対応しません。そのブロックはコードブロックのまま残り、診断を 1 件出します。
21
+ ブロックはマニフェストの公開ノート(`public`)の frontmatter・タグ・リンク・パーマリンクを使って描画されます。`unlisted`・`draft`・`scheduled` のノートは照合対象になりません。DataviewJS(`dataviewjs`)には対応しません。そのブロックはコードブロックのまま残り、診断を 1 件出します。
22
22
 
23
23
  ## 設定
24
24
 
@@ -188,5 +188,5 @@ SORT priority desc, file.name asc
188
188
 
189
189
  ## 関連資料
190
190
 
191
- - [プラグインシステム](../../../docs/ja/docs/reference/plugin-api.md)
191
+ - [プラグインシステム](../../../docs/docs/reference/plugin-api.md)
192
192
 
package/dist/index.js CHANGED
@@ -1136,16 +1136,15 @@ function createDataviewRuntime(options = {}) {
1136
1136
  const resolved = resolveDataviewOptions(options);
1137
1137
  return {
1138
1138
  resolve(manifest, diagnostics) {
1139
+ const view = {
1140
+ ...manifest,
1141
+ entries: manifest.discoverableEntries
1142
+ };
1139
1143
  for (const entry of manifest.entries) {
1140
1144
  if (!entry.html.includes(DATAVIEW_ATTRIBUTE) && !entry.html.includes(DATAVIEWJS_MARKER)) {
1141
1145
  continue;
1142
1146
  }
1143
- const html = replacePlaceholders(
1144
- entry,
1145
- manifest,
1146
- resolved,
1147
- diagnostics
1148
- );
1147
+ const html = replacePlaceholders(entry, view, resolved, diagnostics);
1149
1148
  if (html === entry.html) continue;
1150
1149
  entry.html = html;
1151
1150
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-dataview",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,7 +17,10 @@
17
17
  "dependencies": {
18
18
  "@types/mdast": "^4.0.4",
19
19
  "unist-util-visit": "^5.1.0",
20
- "@riebeckite/core": "0.0.16"
20
+ "@riebeckite/core": "0.0.18"
21
+ },
22
+ "devDependencies": {
23
+ "tsx": "^4.22.4"
21
24
  },
22
25
  "publishConfig": {
23
26
  "access": "public"
@@ -52,6 +55,7 @@
52
55
  "./style.css"
53
56
  ],
54
57
  "scripts": {
55
- "build": "node ../../../scripts/build_package.mjs"
58
+ "build": "node ../../../scripts/build_package.mjs",
59
+ "test": "node --import tsx --test \"test/*.test.ts\""
56
60
  }
57
61
  }