lit-rdf 0.3.1 → 0.3.3
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/CHANGELOG.md +16 -0
- package/custom-elements.json +0 -10
- package/package.json +20 -15
- package/src/components/rdf-graph.d.ts +0 -2
- package/src/components/rdf-graph.js +6 -8
- package/src/custom-elements.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# lit-rdf
|
|
2
2
|
|
|
3
|
+
## 0.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3b452a8: Remove unused direct dependency `rdf-canonize`
|
|
8
|
+
- 3b452a8: Update `@zazuko/env` to `^3.0.4`.
|
|
9
|
+
- 5a504bc: Made `@zazuko/prefixes` a peer dependency
|
|
10
|
+
- 3b452a8: Add a repository AI skill demonstrating lit-rdf data binding, filtering, sorting, and custom component patterns, with an interactive example and contributor guidance.
|
|
11
|
+
|
|
12
|
+
## 0.3.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- ee852da: Allow both `[id]` and `[data-attribute]` to select the graph from `window.graphs`
|
|
17
|
+
- ee852da: `rdf-graph` should not rely on RDF environment so that populating data from `window.graphs` is as fast as possible
|
|
18
|
+
|
|
3
19
|
## 0.3.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/custom-elements.json
CHANGED
|
@@ -348,16 +348,6 @@
|
|
|
348
348
|
"description": "Custom element (`<rdf-graph>`) that contributes an RDF graph dataset to an ancestor\n`DatasetProvider` (such as `<rdf-dataset>`).",
|
|
349
349
|
"name": "RdfGraph",
|
|
350
350
|
"members": [
|
|
351
|
-
{
|
|
352
|
-
"kind": "field",
|
|
353
|
-
"name": "env",
|
|
354
|
-
"type": {
|
|
355
|
-
"text": "Environment"
|
|
356
|
-
},
|
|
357
|
-
"privacy": "private",
|
|
358
|
-
"readonly": true,
|
|
359
|
-
"default": "new Environment(this)"
|
|
360
|
-
},
|
|
361
351
|
{
|
|
362
352
|
"kind": "field",
|
|
363
353
|
"name": "value",
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lit-rdf",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"prepare": "husky && patch-package",
|
|
6
|
+
"prepare": "husky && patch-package && skills experimental_sync -y",
|
|
7
7
|
"lint": "eslint . --quiet",
|
|
8
8
|
"storybook": "storybook dev -p 6006",
|
|
9
9
|
"build-storybook": "storybook build",
|
|
@@ -39,39 +39,43 @@
|
|
|
39
39
|
"@lit/context": "^1.1.6",
|
|
40
40
|
"@rdfjs-elements/lit-helpers": "^0.3.13",
|
|
41
41
|
"@rdfjs/data-model": "^2.1.1",
|
|
42
|
+
"@rdfjs/dataset": "^2.0.3",
|
|
42
43
|
"@rdfjs/types": "^2",
|
|
43
|
-
"@zazuko/env": "^3.0.
|
|
44
|
-
"@zazuko/prefixes": "^2.6.1",
|
|
44
|
+
"@zazuko/env": "^3.0.4",
|
|
45
45
|
"clownface": "^2.0.3",
|
|
46
46
|
"clownface-shacl-path": "^2.4.0",
|
|
47
47
|
"is-url": "^1.2.4",
|
|
48
48
|
"lit": "^3",
|
|
49
|
-
"rdf-canonize": "^3.4.0",
|
|
50
49
|
"rdf-literal": "^2.0.0",
|
|
51
50
|
"sparql-path-parser": "^0.1.1"
|
|
52
51
|
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@zazuko/prefixes": ">=2.6.1"
|
|
54
|
+
},
|
|
53
55
|
"devDependencies": {
|
|
54
|
-
"@changesets/cli": "^3.0.
|
|
56
|
+
"@changesets/cli": "^3.0.3",
|
|
55
57
|
"@chromatic-com/storybook": "^5.3.0",
|
|
56
58
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
57
59
|
"@eslint/config-helpers": "^0.7.0",
|
|
58
60
|
"@eslint/js": "^10",
|
|
61
|
+
"@lit-labs/ssr": "^4.1.0",
|
|
59
62
|
"@open-wc/testing": "^5.0.0",
|
|
60
|
-
"@rollup/plugin-commonjs": "^
|
|
63
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
61
64
|
"@rolldown/plugin-node-polyfills": "^1.0.3",
|
|
62
|
-
"@storybook/addon-docs": "^10.6.
|
|
63
|
-
"@storybook/addon-vitest": "^10.6.
|
|
64
|
-
"@storybook/web-components-vite": "^10.6.
|
|
65
|
+
"@storybook/addon-docs": "^10.6.6",
|
|
66
|
+
"@storybook/addon-vitest": "^10.6.6",
|
|
67
|
+
"@storybook/web-components-vite": "^10.6.6",
|
|
65
68
|
"@tpluscode/eslint-config": "^4.0.2",
|
|
66
69
|
"@types/clownface": "^2.0.10",
|
|
67
70
|
"@types/is-url": "^1.2.32",
|
|
68
71
|
"@types/rdfjs__data-model": "^2.0.9",
|
|
72
|
+
"@types/rdfjs__dataset": "^2.0.7",
|
|
69
73
|
"@types/readable-stream": "^4.0.24",
|
|
70
74
|
"@types/sinon": "^22.0.0",
|
|
71
75
|
"@typescript-eslint/eslint-plugin": "^8.66.0",
|
|
72
76
|
"@typescript-eslint/parser": "^8.66.0",
|
|
73
|
-
"@vitest/browser-playwright": "^4.1.
|
|
74
|
-
"@vitest/coverage-v8": "^4.1.
|
|
77
|
+
"@vitest/browser-playwright": "^4.1.12",
|
|
78
|
+
"@vitest/coverage-v8": "^4.1.12",
|
|
75
79
|
"@vocabulary/rdfs": "^1.0.6",
|
|
76
80
|
"@web/dev-server-esbuild": "^2.0.0",
|
|
77
81
|
"@web/dev-server-rollup": "^1.0.0",
|
|
@@ -82,14 +86,15 @@
|
|
|
82
86
|
"eslint-plugin-storybook": "^10.5.7",
|
|
83
87
|
"husky": "^9.1.7",
|
|
84
88
|
"lint-staged": "^17.3.0",
|
|
89
|
+
"skills": "^1.7.6",
|
|
85
90
|
"patch-package": "^8.0.1",
|
|
86
|
-
"playwright": "^1.
|
|
91
|
+
"playwright": "^1.65.0",
|
|
87
92
|
"sinon": "^22.1.0",
|
|
88
|
-
"storybook": "^10.6.
|
|
93
|
+
"storybook": "^10.6.6",
|
|
89
94
|
"string-to-stream": "^3.0.1",
|
|
90
95
|
"typescript": "^5",
|
|
91
96
|
"util": "^0.12.5",
|
|
92
|
-
"vitest": "^4.1.
|
|
97
|
+
"vitest": "^4.1.12"
|
|
93
98
|
},
|
|
94
99
|
"lint-staged": {
|
|
95
100
|
"*.{js,ts}": [
|
|
@@ -14,7 +14,6 @@ declare global {
|
|
|
14
14
|
* @element rdf-graph
|
|
15
15
|
*/
|
|
16
16
|
export default class RdfGraph extends LitElement {
|
|
17
|
-
private readonly env;
|
|
18
17
|
/**
|
|
19
18
|
* The RDF/JS dataset containing the graph triples to contribute to the parent dataset provider.
|
|
20
19
|
*/
|
|
@@ -24,7 +23,6 @@ export default class RdfGraph extends LitElement {
|
|
|
24
23
|
*/
|
|
25
24
|
graph: NamedNode | undefined;
|
|
26
25
|
private datasetProvider;
|
|
27
|
-
constructor();
|
|
28
26
|
protected updated(properties: Map<string, unknown>): void;
|
|
29
27
|
connectedCallback(): void;
|
|
30
28
|
disconnectedCallback(): void;
|
|
@@ -7,8 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { LitElement, nothing } from 'lit';
|
|
8
8
|
import { customElement, property, state } from 'lit/decorators.js';
|
|
9
9
|
import { consume } from '@lit/context';
|
|
10
|
+
import Dataset from '@rdfjs/dataset';
|
|
11
|
+
import factory from '@rdfjs/data-model';
|
|
10
12
|
import { datasetProvider } from '../context.js';
|
|
11
|
-
import { Environment } from '../controllers/Environment.js';
|
|
12
13
|
import { toNamedNode } from '../converter.js';
|
|
13
14
|
/**
|
|
14
15
|
* Custom element (`<rdf-graph>`) that contributes an RDF graph dataset to an ancestor
|
|
@@ -17,10 +18,6 @@ import { toNamedNode } from '../converter.js';
|
|
|
17
18
|
* @element rdf-graph
|
|
18
19
|
*/
|
|
19
20
|
let RdfGraph = class RdfGraph extends LitElement {
|
|
20
|
-
constructor() {
|
|
21
|
-
super();
|
|
22
|
-
this.env = new Environment(this);
|
|
23
|
-
}
|
|
24
21
|
updated(properties) {
|
|
25
22
|
if (properties.has('value')) {
|
|
26
23
|
if (this.value) {
|
|
@@ -32,10 +29,11 @@ let RdfGraph = class RdfGraph extends LitElement {
|
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
31
|
connectedCallback() {
|
|
35
|
-
|
|
36
|
-
if (!this.value &&
|
|
37
|
-
this.value =
|
|
32
|
+
const graphId = this.getAttribute('data-graph') || this.id;
|
|
33
|
+
if (!this.value && graphId && window.graphs?.[graphId]) {
|
|
34
|
+
this.value = Dataset.dataset(window.graphs[graphId]({ factory }));
|
|
38
35
|
}
|
|
36
|
+
super.connectedCallback();
|
|
39
37
|
if (this.value) {
|
|
40
38
|
this.datasetProvider?.updateGraph(this, this.value, this.graph);
|
|
41
39
|
}
|
package/src/custom-elements.d.ts
CHANGED