ontologyviewer 0.1.0 → 0.1.1

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.ja.md CHANGED
@@ -19,7 +19,7 @@ Webページ内のTurtleを、読み取り専用の **Schema** 図と **Triples*
19
19
  </script>
20
20
 
21
21
  <script type="module">
22
- import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.esm.min.mjs";
22
+ import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.1/dist/ontologyviewer.esm.min.mjs";
23
23
  ontologyviewer.initialize({ startOnLoad: true });
24
24
  </script>
25
25
  ```
@@ -28,12 +28,12 @@ Webページ内のTurtleを、読み取り専用の **Schema** 図と **Triples*
28
28
 
29
29
  `examples/` のHTMLをFinderなどから直接開かないでください。ブラウザのES Moduleは `file:` URLでCORSブロックされます。`webplugin/` で `npm run examples` を実行し、`http://127.0.0.1:4173/examples/index.html` を開いてください。直開きや `dist/` 未生成時には、example画面に起動手順が表示されます。
30
30
 
31
- 再現性を重視するページでは完全なバージョン(`@0.1.0`)を固定してください。`@10` のようなmajor指定は互換更新に追従できますが、配信内容は将来変化します。
31
+ 再現性を重視するページでは完全なバージョン(`@0.1.1`)を固定してください。`@10` のようなmajor指定は互換更新に追従できますが、配信内容は将来変化します。
32
32
 
33
33
  ## npmから利用
34
34
 
35
35
  ```bash
36
- npm install --save-exact ontologyviewer@0.1.0
36
+ npm install --save-exact ontologyviewer@0.1.1
37
37
  ```
38
38
 
39
39
  ```ts
@@ -97,7 +97,7 @@ const png: Blob = await instance.exportPng();
97
97
  instance.destroy();
98
98
  ```
99
99
 
100
- `initialize()` は `MutationObserver` を登録しません。後から追加した要素は `manager.scan(container)` または `render(element)` で明示的に初期化してください。
100
+ `initialize()` は `MutationObserver` を登録しません。後から追加した要素は `manager.scan(container)` または `render(element)` で明示的に初期化してください。`startOnLoad: true` の初回scanは、documentが既にcompleteでない限り `window.load` まで待つため、Gatsby/Reactのhydrationがserver-rendered DOMを置換する処理と競合しません。
101
101
 
102
102
  完全な型とライフサイクルは [API.md](docs/API.md) を参照してください。
103
103
 
@@ -107,13 +107,13 @@ inline `<style>` が許可されない場合は自動注入を止め、CSSを明
107
107
 
108
108
  ```html
109
109
  <link rel="stylesheet"
110
- href="https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.css"
110
+ href="https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.1/dist/ontologyviewer.css"
111
111
  data-ontologyviewer-styles>
112
112
  <script type="module" src="/assets/start-ontologyviewer.mjs"></script>
113
113
  ```
114
114
 
115
115
  ```js
116
- import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.esm.min.mjs";
116
+ import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.1/dist/ontologyviewer.esm.min.mjs";
117
117
  ontologyviewer.initialize({ startOnLoad: true, injectStyles: false });
118
118
  ```
119
119
 
package/README.md CHANGED
@@ -19,7 +19,7 @@ A standalone, read-only Turtle ontology viewer for web pages. It renders class-f
19
19
  </script>
20
20
 
21
21
  <script type="module">
22
- import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.esm.min.mjs";
22
+ import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.1/dist/ontologyviewer.esm.min.mjs";
23
23
  ontologyviewer.initialize({ startOnLoad: true });
24
24
  </script>
25
25
  ```
@@ -28,12 +28,12 @@ The inert `text/turtle` script is retained in the DOM and hidden while its viewe
28
28
 
29
29
  Do not double-click the files under `examples/`: browser ES Modules are commonly blocked on `file:` URLs. From `webplugin/`, run `npm run examples` and open `http://127.0.0.1:4173/examples/index.html`. The example page now keeps an actionable message visible when it is opened incorrectly or when `dist/` has not been built.
30
30
 
31
- For reproducible pages, pin a complete version (`@0.1.0`). A major selector such as `@10` follows compatible releases but can change the delivered bytes.
31
+ For reproducible pages, pin a complete version (`@0.1.1`). A major selector such as `@10` follows compatible releases but can change the delivered bytes.
32
32
 
33
33
  ## Install from npm
34
34
 
35
35
  ```bash
36
- npm install --save-exact ontologyviewer@0.1.0
36
+ npm install --save-exact ontologyviewer@0.1.1
37
37
  ```
38
38
 
39
39
  ```ts
@@ -99,7 +99,7 @@ instance.destroy();
99
99
  ontologyviewer.getInstance(source); // undefined after destroy()
100
100
  ```
101
101
 
102
- `initialize()` does not install a `MutationObserver`. For dynamically inserted source elements, call `manager.scan(container)` or `render(element)` explicitly.
102
+ `initialize()` does not install a `MutationObserver`. For dynamically inserted source elements, call `manager.scan(container)` or `render(element)` explicitly. With `startOnLoad: true`, the initial scan waits for `window.load` unless the document is already complete, avoiding races with Gatsby/React hydration that can replace server-rendered DOM.
103
103
 
104
104
  See [API.md](docs/API.md) for the complete contracts and lifecycle states.
105
105
 
@@ -109,14 +109,14 @@ Automatic style injection is convenient but requires an inline `<style>`. Disabl
109
109
 
110
110
  ```html
111
111
  <link rel="stylesheet"
112
- href="https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.css"
112
+ href="https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.1/dist/ontologyviewer.css"
113
113
  data-ontologyviewer-styles>
114
114
  <script type="module" src="/assets/start-ontologyviewer.mjs"></script>
115
115
  ```
116
116
 
117
117
  ```js
118
118
  // /assets/start-ontologyviewer.mjs
119
- import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.esm.min.mjs";
119
+ import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.1/dist/ontologyviewer.esm.min.mjs";
120
120
  ontologyviewer.initialize({ startOnLoad: true, injectStyles: false });
121
121
  ```
122
122
 
package/dist/meta.json CHANGED
@@ -6191,7 +6191,7 @@
6191
6191
  "format": "esm"
6192
6192
  },
6193
6193
  "src/viewer.ts": {
6194
- "bytes": 33470,
6194
+ "bytes": 33440,
6195
6195
  "imports": [
6196
6196
  {
6197
6197
  "path": "node_modules/cytoscape/dist/cytoscape.esm.mjs",
@@ -6257,7 +6257,7 @@
6257
6257
  "format": "esm"
6258
6258
  },
6259
6259
  "src/index.ts": {
6260
- "bytes": 6532,
6260
+ "bytes": 6519,
6261
6261
  "imports": [
6262
6262
  {
6263
6263
  "path": "src/viewer.ts",
@@ -6279,7 +6279,7 @@
6279
6279
  "imports": [],
6280
6280
  "exports": [],
6281
6281
  "inputs": {},
6282
- "bytes": 3043700
6282
+ "bytes": 3043641
6283
6283
  },
6284
6284
  "dist/ontologyviewer.esm.min.mjs": {
6285
6285
  "imports": [],
@@ -7189,7 +7189,7 @@
7189
7189
  "bytesInOutput": 379045
7190
7190
  },
7191
7191
  "src/viewer.ts": {
7192
- "bytesInOutput": 16807
7192
+ "bytesInOutput": 16786
7193
7193
  },
7194
7194
  "node_modules/n3/src/N3Lexer.js": {
7195
7195
  "bytesInOutput": 8895
@@ -7237,10 +7237,10 @@
7237
7237
  "bytesInOutput": 828
7238
7238
  },
7239
7239
  "src/index.ts": {
7240
- "bytesInOutput": 9696
7240
+ "bytesInOutput": 9683
7241
7241
  }
7242
7242
  },
7243
- "bytes": 702015
7243
+ "bytes": 701981
7244
7244
  }
7245
7245
  }
7246
7246
  }