ontologyviewer 0.1.0

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.
Files changed (43) hide show
  1. package/LICENSE +21 -0
  2. package/README.ja.md +166 -0
  3. package/README.md +169 -0
  4. package/THIRD_PARTY_NOTICES.md +49 -0
  5. package/dist/index.d.ts +14 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/locale.d.ts +34 -0
  8. package/dist/locale.d.ts.map +1 -0
  9. package/dist/meta.json +7246 -0
  10. package/dist/ontologyviewer.css +211 -0
  11. package/dist/ontologyviewer.esm.min.mjs +221 -0
  12. package/dist/ontologyviewer.esm.min.mjs.LEGAL.txt +31 -0
  13. package/dist/ontologyviewer.esm.min.mjs.map +7 -0
  14. package/dist/ontologyviewer.esm.mjs +47748 -0
  15. package/dist/ontologyviewer.esm.mjs.LEGAL.txt +31 -0
  16. package/dist/ontologyviewer.esm.mjs.map +7 -0
  17. package/dist/persistence.d.ts +18 -0
  18. package/dist/persistence.d.ts.map +1 -0
  19. package/dist/rdf/appearance.d.ts +23 -0
  20. package/dist/rdf/appearance.d.ts.map +1 -0
  21. package/dist/rdf/graphModel.d.ts +25 -0
  22. package/dist/rdf/graphModel.d.ts.map +1 -0
  23. package/dist/rdf/opExtensions.d.ts +9 -0
  24. package/dist/rdf/opExtensions.d.ts.map +1 -0
  25. package/dist/rdf/parser.d.ts +22 -0
  26. package/dist/rdf/parser.d.ts.map +1 -0
  27. package/dist/rdf/rdfList.d.ts +6 -0
  28. package/dist/rdf/rdfList.d.ts.map +1 -0
  29. package/dist/rdf/schemaModel.d.ts +63 -0
  30. package/dist/rdf/schemaModel.d.ts.map +1 -0
  31. package/dist/rdf/vocabulary.d.ts +82 -0
  32. package/dist/rdf/vocabulary.d.ts.map +1 -0
  33. package/dist/search.d.ts +11 -0
  34. package/dist/search.d.ts.map +1 -0
  35. package/dist/theme.d.ts +6 -0
  36. package/dist/theme.d.ts.map +1 -0
  37. package/dist/types.d.ts +64 -0
  38. package/dist/types.d.ts.map +1 -0
  39. package/dist/viewer.d.ts +3 -0
  40. package/dist/viewer.d.ts.map +1 -0
  41. package/dist/viewport.d.ts +8 -0
  42. package/dist/viewport.d.ts.map +1 -0
  43. package/package.json +91 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ontology Viewer contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.ja.md ADDED
@@ -0,0 +1,166 @@
1
+ # ontologyviewer
2
+
3
+ [English](README.md) · [API](docs/API.md) · [npm公開手順](docs/PUBLISHING.md)
4
+
5
+ Webページ内のTurtleを、読み取り専用の **Schema** 図と **Triples** グラフとして表示する独立ライブラリです。Cytoscapeを同梱し、サーバー、アカウント、テレメトリ、外部Ontology取得を必要としません。
6
+
7
+ ## クイックスタート
8
+
9
+ ```html
10
+ <script type="text/turtle" class="ontologyviewer">
11
+ @prefix : <https://example.org/harbor#> .
12
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
13
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
14
+
15
+ :Vendor a owl:Class ; rdfs:label "Vendor" .
16
+ :Stall a owl:Class ; rdfs:label "Stall" .
17
+ :operates a owl:ObjectProperty ;
18
+ rdfs:label "operates" ; rdfs:domain :Vendor ; rdfs:range :Stall .
19
+ </script>
20
+
21
+ <script type="module">
22
+ import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.esm.min.mjs";
23
+ ontologyviewer.initialize({ startOnLoad: true });
24
+ </script>
25
+ ```
26
+
27
+ 実行されない `text/turtle` の `<script>` はDOM内に保持され、Viewer稼働中は非表示です。この形式ならTurtleの `<...>` IRIをHTML entityへ変換せず、そのまま記述できます。ただし、Turtle内にリテラルな `</script>` があるとHTMLがsource要素の終了タグとして扱うため避けてください。従来の `<pre class="ontologyviewer">` も利用できますが、HTMLソース内の `<` は `&lt;` と書く必要があります。`destroy()` はどちらのsource要素も元の状態へ戻します。
28
+
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
+
31
+ 再現性を重視するページでは完全なバージョン(`@0.1.0`)を固定してください。`@10` のようなmajor指定は互換更新に追従できますが、配信内容は将来変化します。
32
+
33
+ ## npmから利用
34
+
35
+ ```bash
36
+ npm install --save-exact ontologyviewer@0.1.0
37
+ ```
38
+
39
+ ```ts
40
+ import ontologyviewer from "ontologyviewer";
41
+
42
+ const manager = ontologyviewer.initialize({
43
+ startOnLoad: true,
44
+ theme: "auto",
45
+ locale: "auto",
46
+ });
47
+ await manager.ready;
48
+ ```
49
+
50
+ ## 機能
51
+
52
+ - datatype property、アイコン、色指定、cardinality、推論関係、統計、凡例、読み取り専用Inspectorを備えたSchemaカード。
53
+ - Triples表示、検索、近傍focus、pan、zoom、fit、fCoSE/Dagre、node移動、PNG出力。
54
+ - 1ページ内の複数Viewerを完全に分離。
55
+ - 英語・日本語UIとlight/darkテーマの自動追従。
56
+ - `storageKey` を指定した場合だけ、有効値を検査してレイアウトを `localStorage` に保存。
57
+ - Turtleエラーを行・列付きで安全に表示し、`update()` で復旧可能。
58
+ - 通常はCSSを自動注入し、制限の強いCSP向けには外部CSSモードを提供。
59
+ - 編集機能、ネットワーク通信、telemetry、cookie、アカウントはありません。
60
+
61
+ ## HTML属性
62
+
63
+ ```html
64
+ <script
65
+ type="text/turtle"
66
+ class="ontologyviewer"
67
+ data-height="600px"
68
+ data-theme="dark"
69
+ data-locale="ja"
70
+ data-layout="dagre"
71
+ data-default-view="schema"
72
+ data-base-iri="https://example.org/base/"
73
+ data-storage-key="harbor-market"
74
+ >...</script>
75
+ ```
76
+
77
+ API optionは `data-*` より優先されます。高さには数値付きの `px`、`rem`、`em`、`vh`、`vw`、`%` を指定できます。不正値は安全に `600px` へ戻します。
78
+
79
+ ## プログラムAPI
80
+
81
+ ```ts
82
+ const source = document.querySelector<HTMLElement>("#ontology")!;
83
+ const instance = ontologyviewer.render(source, {
84
+ baseIri: "https://example.org/base/",
85
+ defaultView: "schema",
86
+ layout: "fcose",
87
+ storageKey: "example-layout", // 省略すると保存しない
88
+ onError(error) {
89
+ console.error(error.line, error.column, error.message);
90
+ },
91
+ });
92
+
93
+ await instance.update(nextTurtle);
94
+ instance.fit();
95
+ instance.runLayout("dagre");
96
+ const png: Blob = await instance.exportPng();
97
+ instance.destroy();
98
+ ```
99
+
100
+ `initialize()` は `MutationObserver` を登録しません。後から追加した要素は `manager.scan(container)` または `render(element)` で明示的に初期化してください。
101
+
102
+ 完全な型とライフサイクルは [API.md](docs/API.md) を参照してください。
103
+
104
+ ## 厳格なCSPと外部CSS
105
+
106
+ inline `<style>` が許可されない場合は自動注入を止め、CSSを明示的に読み込みます。
107
+
108
+ ```html
109
+ <link rel="stylesheet"
110
+ href="https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.css"
111
+ data-ontologyviewer-styles>
112
+ <script type="module" src="/assets/start-ontologyviewer.mjs"></script>
113
+ ```
114
+
115
+ ```js
116
+ import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.esm.min.mjs";
117
+ ontologyviewer.initialize({ startOnLoad: true, injectStyles: false });
118
+ ```
119
+
120
+ Cytoscapeはcanvas配置にstyle属性を使用するため、style要素は外部化したままstyle属性のみ許可します。
121
+
122
+ ```http
123
+ Content-Security-Policy: default-src 'none'; script-src 'self' https://cdn.jsdelivr.net; style-src 'self' https://cdn.jsdelivr.net; style-src-attr 'unsafe-inline'; img-src data: blob:
124
+ ```
125
+
126
+ 外部CSSモードの既定高さは600pxです。このモードで高さを変更する場合は、信頼できるサイト側CSSで `.ontologyviewer-root` を指定してください。
127
+
128
+ ## ベースIRI
129
+
130
+ 相対IRIは次の順で解決します。
131
+
132
+ 1. `options.baseIri`(非推奨alias `baseIRI` も利用可能)
133
+ 2. `data-base-iri`
134
+ 3. Turtle内の `@base`
135
+ 4. `document.baseURI`
136
+
137
+ 0.1.xが直接解析する形式はTurtleだけです。RDF/XML、JSON-LD、TriG、N-Triples、Notation3は自動判定しません。
138
+
139
+ ## 対応ブラウザ
140
+
141
+ ESM bundleはES2020をtargetとし、CIでPlaywright Chromium、Firefox、WebKitを実行します。Chrome/Edge、Firefox、Safariの最新2安定版をsupport対象とします。
142
+
143
+ ## 開発・公開
144
+
145
+ `webplugin/` は自己完結しています。内容を新しいrepositoryのrootへコピーしても、次の手順で検証できます。
146
+
147
+ ```bash
148
+ npm ci
149
+ npx playwright install chromium firefox webkit
150
+ npm run verify
151
+ npm run test:e2e
152
+ npm pack
153
+ ```
154
+
155
+ - [導入](docs/GETTING_STARTED.md)
156
+ - [API](docs/API.md)
157
+ - [カスタマイズとCSP](docs/CUSTOMIZATION.md)
158
+ - [トラブルシューティング](docs/TROUBLESHOOTING.md)
159
+ - [開発](docs/DEVELOPMENT.md)
160
+ - [npm/jsDelivr公開](docs/PUBLISHING.md)
161
+ - [Security](docs/SECURITY.md) · [Privacy](docs/PRIVACY.md)
162
+ - [Contribution](CONTRIBUTING.md) · [変更履歴](CHANGELOG.md)
163
+
164
+ ## ライセンス
165
+
166
+ MITです。同梱依存のnoticeは [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) にあります。
package/README.md ADDED
@@ -0,0 +1,169 @@
1
+ # ontologyviewer
2
+
3
+ [日本語](README.ja.md) · [API](docs/API.md) · [Publishing](docs/PUBLISHING.md)
4
+
5
+ A standalone, read-only Turtle ontology viewer for web pages. It renders class-focused **Schema** diagrams and raw **Triples** graphs with Cytoscape, without a server, account, telemetry, or ontology network requests.
6
+
7
+ ## Quick start
8
+
9
+ ```html
10
+ <script type="text/turtle" class="ontologyviewer">
11
+ @prefix : <https://example.org/harbor#> .
12
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
13
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
14
+
15
+ :Vendor a owl:Class ; rdfs:label "Vendor" .
16
+ :Stall a owl:Class ; rdfs:label "Stall" .
17
+ :operates a owl:ObjectProperty ;
18
+ rdfs:label "operates" ; rdfs:domain :Vendor ; rdfs:range :Stall .
19
+ </script>
20
+
21
+ <script type="module">
22
+ import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.esm.min.mjs";
23
+ ontologyviewer.initialize({ startOnLoad: true });
24
+ </script>
25
+ ```
26
+
27
+ The inert `text/turtle` script is retained in the DOM and hidden while its viewer is active. It accepts ordinary Turtle `<...>` IRIs without HTML entity escaping. Avoid a literal `</script>` sequence in that Turtle because HTML treats it as the closing tag. A `<pre class="ontologyviewer">` remains supported, but literal HTML source must write `<` as `&lt;`; `destroy()` restores either source element.
28
+
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
+
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.
32
+
33
+ ## Install from npm
34
+
35
+ ```bash
36
+ npm install --save-exact ontologyviewer@0.1.0
37
+ ```
38
+
39
+ ```ts
40
+ import ontologyviewer, { render, getInstance } from "ontologyviewer";
41
+
42
+ const manager = ontologyviewer.initialize({
43
+ startOnLoad: true,
44
+ theme: "auto",
45
+ locale: "auto",
46
+ });
47
+ await manager.ready;
48
+ ```
49
+
50
+ ## Features
51
+
52
+ - Schema cards with datatype properties, icons, color hints, cardinality, inferred-relation styling, statistics, legend, and read-only Inspector.
53
+ - Raw Triples view, search, neighborhood focus, pan, zoom, fit, fCoSE/Dagre layouts, node dragging, and PNG export.
54
+ - Multiple isolated viewers in one document.
55
+ - English and Japanese UI; automatic light/dark theme tracking.
56
+ - Optional, validated `localStorage` layout persistence.
57
+ - Safe parse failures with line/column information and recovery through `update()`.
58
+ - One-import CSS injection, plus an external-CSS mode for restrictive CSPs.
59
+ - No editor controls, remote imports, fetch/XHR, telemetry, cookies, or accounts.
60
+
61
+ ## HTML configuration
62
+
63
+ ```html
64
+ <script
65
+ type="text/turtle"
66
+ class="ontologyviewer"
67
+ data-height="600px"
68
+ data-theme="dark"
69
+ data-locale="ja"
70
+ data-layout="dagre"
71
+ data-default-view="schema"
72
+ data-base-iri="https://example.org/base/"
73
+ data-storage-key="harbor-market"
74
+ >...</script>
75
+ ```
76
+
77
+ API options take precedence over `data-*` values. Accepted heights are numeric `px`, `rem`, `em`, `vh`, `vw`, or `%` lengths. Invalid values fall back safely to `600px`.
78
+
79
+ ## Programmatic API
80
+
81
+ ```ts
82
+ const source = document.querySelector<HTMLElement>("#ontology")!;
83
+ const instance = ontologyviewer.render(source, {
84
+ baseIri: "https://example.org/base/",
85
+ defaultView: "schema",
86
+ layout: "fcose",
87
+ storageKey: "example-layout", // omit to disable persistence
88
+ onError(error) {
89
+ console.error(error.line, error.column, error.message);
90
+ },
91
+ });
92
+
93
+ await instance.update(nextTurtle);
94
+ instance.fit();
95
+ instance.runLayout("dagre");
96
+ const png: Blob = await instance.exportPng();
97
+ instance.destroy();
98
+
99
+ ontologyviewer.getInstance(source); // undefined after destroy()
100
+ ```
101
+
102
+ `initialize()` does not install a `MutationObserver`. For dynamically inserted source elements, call `manager.scan(container)` or `render(element)` explicitly.
103
+
104
+ See [API.md](docs/API.md) for the complete contracts and lifecycle states.
105
+
106
+ ## Strict CSP / external CSS
107
+
108
+ Automatic style injection is convenient but requires an inline `<style>`. Disable it and load the published stylesheet when your policy does not allow inline style elements:
109
+
110
+ ```html
111
+ <link rel="stylesheet"
112
+ href="https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.css"
113
+ data-ontologyviewer-styles>
114
+ <script type="module" src="/assets/start-ontologyviewer.mjs"></script>
115
+ ```
116
+
117
+ ```js
118
+ // /assets/start-ontologyviewer.mjs
119
+ import ontologyviewer from "https://cdn.jsdelivr.net/npm/ontologyviewer@0.1.0/dist/ontologyviewer.esm.min.mjs";
120
+ ontologyviewer.initialize({ startOnLoad: true, injectStyles: false });
121
+ ```
122
+
123
+ Cytoscape positions its canvases with style attributes, so a compatible strict policy permits style attributes while keeping style elements external, for example:
124
+
125
+ ```http
126
+ Content-Security-Policy: default-src 'none'; script-src 'self' https://cdn.jsdelivr.net; style-src 'self' https://cdn.jsdelivr.net; style-src-attr 'unsafe-inline'; img-src data: blob:
127
+ ```
128
+
129
+ In external-CSS mode the stylesheet's default height is 600px. Set a different height in trusted site CSS rather than `data-height`, because the library deliberately avoids setting a style attribute in this mode.
130
+
131
+ ## Base IRI resolution
132
+
133
+ The parser resolves relative IRIs using:
134
+
135
+ 1. `options.baseIri` (the deprecated `baseIRI` alias is also accepted)
136
+ 2. `data-base-iri`
137
+ 3. a Turtle `@base` directive, interpreted by N3
138
+ 4. `document.baseURI`
139
+
140
+ Only Turtle is accepted in version 0.1.x. RDF/XML, JSON-LD, TriG, N-Triples, and Notation3 are not auto-detected.
141
+
142
+ ## Browser support
143
+
144
+ The ESM bundle targets ES2020 and is tested in CI with current Playwright Chromium, Firefox, and WebKit. The support policy is the latest two stable releases of Chrome/Edge, Firefox, and Safari.
145
+
146
+ ## Development and publishing
147
+
148
+ `webplugin/` is self-contained. Copy its contents to a repository root without the parent VS Code extension and run:
149
+
150
+ ```bash
151
+ npm ci
152
+ npx playwright install chromium firefox webkit
153
+ npm run verify
154
+ npm run test:e2e
155
+ npm pack
156
+ ```
157
+
158
+ - [Getting started](docs/GETTING_STARTED.md)
159
+ - [API reference](docs/API.md)
160
+ - [Customization and CSP](docs/CUSTOMIZATION.md)
161
+ - [Troubleshooting](docs/TROUBLESHOOTING.md)
162
+ - [Development](docs/DEVELOPMENT.md)
163
+ - [Publishing to npm/jsDelivr](docs/PUBLISHING.md)
164
+ - [Security](docs/SECURITY.md) · [Privacy](docs/PRIVACY.md)
165
+ - [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md)
166
+
167
+ ## License
168
+
169
+ MIT. Bundled dependency notices are in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
@@ -0,0 +1,49 @@
1
+ # Third-Party Notices — ontologyviewer
2
+
3
+ This file lists the third-party dependencies bundled with ontologyviewer and their respective licenses.
4
+
5
+ ---
6
+
7
+ ## Cytoscape.js
8
+
9
+ - **Version:** 3.30.4
10
+ - **License:** MIT
11
+ - **Homepage:** https://js.cytoscape.org/
12
+ - **Repository:** https://github.com/cytoscape/cytoscape.js
13
+
14
+ Copyright (c) The Cytoscape Consortium
15
+
16
+ ---
17
+
18
+ ## cytoscape-dagre
19
+
20
+ - **Version:** 2.5.0
21
+ - **License:** MIT
22
+ - **Homepage:** https://github.com/cytoscape/cytoscape.js-dagre
23
+ - **Repository:** https://github.com/cytoscape/cytoscape.js-dagre
24
+
25
+ ---
26
+
27
+ ## cytoscape-fcose
28
+
29
+ - **Version:** 2.2.0
30
+ - **License:** MIT
31
+ - **Homepage:** https://github.com/iVis-at-Bilkent/cytoscape.js-fcose
32
+ - **Repository:** https://github.com/iVis-at-Bilkent/cytoscape.js-fcose
33
+
34
+ Copyright (c) iVis-at-Bilkent
35
+
36
+ ---
37
+
38
+ ## N3.js
39
+
40
+ - **Version:** 1.22.3
41
+ - **License:** MIT
42
+ - **Homepage:** https://github.com/rdfjs/N3.js
43
+ - **Repository:** https://github.com/rdfjs/N3.js
44
+
45
+ Copyright (c) Ruben Verborgh
46
+
47
+ ---
48
+
49
+ All bundled dependencies are licensed under the MIT License, which is compatible with ontologyviewer's MIT License.
@@ -0,0 +1,14 @@
1
+ import type { InitializeOptions, OntologyViewerInstance, OntologyViewerManager, OntologyViewerOptions } from "./types";
2
+ export type { InitializeOptions, LayoutName, OntologyViewerError, OntologyViewerInstance, OntologyViewerManager, OntologyViewerOptions, ViewerStatus, ViewMode, } from "./types";
3
+ export type { Locale } from "./locale";
4
+ export type { Theme } from "./theme";
5
+ export declare function render(element: HTMLElement, options?: OntologyViewerOptions): OntologyViewerInstance;
6
+ export declare function initialize(options?: InitializeOptions): OntologyViewerManager;
7
+ export declare function getInstance(element: HTMLElement): OntologyViewerInstance | undefined;
8
+ declare const ontologyviewer: {
9
+ initialize: typeof initialize;
10
+ render: typeof render;
11
+ getInstance: typeof getInstance;
12
+ };
13
+ export default ontologyviewer;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EAEjB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EAEtB,MAAM,SAAS,CAAC;AAIjB,YAAY,EACV,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,YAAY,EACZ,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AASrC,wBAAgB,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,GAAE,qBAA0B,GAAG,sBAAsB,CAgCxG;AAED,wBAAgB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,qBAAqB,CA+BjF;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,sBAAsB,GAAG,SAAS,CAGpF;AA2ED,QAAA,MAAM,cAAc;;;;CAAsC,CAAC;AAC3D,eAAe,cAAc,CAAC"}
@@ -0,0 +1,34 @@
1
+ export type Locale = "auto" | "en" | "ja";
2
+ export interface Messages {
3
+ schemaView: string;
4
+ triplesView: string;
5
+ searchPlaceholder: string;
6
+ noResults: string;
7
+ properties: string;
8
+ instances: string;
9
+ relations: string;
10
+ entities: string;
11
+ triples: string;
12
+ legend: string;
13
+ inspector: string;
14
+ statistics: string;
15
+ zoomIn: string;
16
+ zoomOut: string;
17
+ resetZoom: string;
18
+ fitToScreen: string;
19
+ exportPng: string;
20
+ layout: string;
21
+ close: string;
22
+ parseError: string;
23
+ emptyOntology: string;
24
+ description: string;
25
+ type: string;
26
+ domain: string;
27
+ range: string;
28
+ colorGroup: string;
29
+ declared: string;
30
+ inferred: string;
31
+ }
32
+ export declare function resolveLocale(locale: Locale): "en" | "ja";
33
+ export declare function getMessages(locale: Locale): Messages;
34
+ //# sourceMappingURL=locale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../src/locale.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1C,MAAM,WAAW,QAAQ;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAgED,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAOzD;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAEpD"}