@ldo/solid-type-index 0.0.1-1.0.0-alpha.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.
- package/LICENSE.txt +21 -0
- package/README.md +49 -0
- package/dist/.ldo/profile.context.d.ts +2 -0
- package/dist/.ldo/profile.context.js +16 -0
- package/dist/.ldo/profile.context.js.map +1 -0
- package/dist/.ldo/profile.schema.d.ts +2 -0
- package/dist/.ldo/profile.schema.js +59 -0
- package/dist/.ldo/profile.schema.js.map +1 -0
- package/dist/.ldo/profile.shapeTypes.d.ts +3 -0
- package/dist/.ldo/profile.shapeTypes.js +11 -0
- package/dist/.ldo/profile.shapeTypes.js.map +1 -0
- package/dist/.ldo/profile.typings.d.ts +11 -0
- package/dist/.ldo/profile.typings.js +3 -0
- package/dist/.ldo/profile.typings.js.map +1 -0
- package/dist/.ldo/typeIndex.context.d.ts +2 -0
- package/dist/.ldo/typeIndex.context.js +61 -0
- package/dist/.ldo/typeIndex.context.js.map +1 -0
- package/dist/.ldo/typeIndex.schema.d.ts +2 -0
- package/dist/.ldo/typeIndex.schema.js +141 -0
- package/dist/.ldo/typeIndex.schema.js.map +1 -0
- package/dist/.ldo/typeIndex.shapeTypes.d.ts +4 -0
- package/dist/.ldo/typeIndex.shapeTypes.js +16 -0
- package/dist/.ldo/typeIndex.shapeTypes.js.map +1 -0
- package/dist/.ldo/typeIndex.typings.d.ts +26 -0
- package/dist/.ldo/typeIndex.typings.js +3 -0
- package/dist/.ldo/typeIndex.typings.js.map +1 -0
- package/dist/constants.d.ts +5 -0
- package/dist/constants.js +9 -0
- package/dist/constants.js.map +1 -0
- package/dist/getTypeIndex.d.ts +9 -0
- package/dist/getTypeIndex.js +62 -0
- package/dist/getTypeIndex.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/react/useInstanceUris.d.ts +2 -0
- package/dist/react/useInstanceUris.js +26 -0
- package/dist/react/useInstanceUris.js.map +1 -0
- package/dist/react/useTypeIndexProfile.d.ts +2 -0
- package/dist/react/useTypeIndexProfile.js +13 -0
- package/dist/react/useTypeIndexProfile.js.map +1 -0
- package/dist/react/util/useSubscribeToUris.d.ts +1 -0
- package/dist/react/util/useSubscribeToUris.js +31 -0
- package/dist/react/util/useSubscribeToUris.js.map +1 -0
- package/dist/setTypeIndex.d.ts +14 -0
- package/dist/setTypeIndex.js +122 -0
- package/dist/setTypeIndex.js.map +1 -0
- package/dist/util/Options.d.ts +9 -0
- package/dist/util/Options.js +12 -0
- package/dist/util/Options.js.map +1 -0
- package/package.json +50 -0
- package/src/.ldo/profile.context.ts +19 -0
- package/src/.ldo/profile.schema.ts +64 -0
- package/src/.ldo/profile.shapeTypes.ts +19 -0
- package/src/.ldo/profile.typings.ts +27 -0
- package/src/.ldo/typeIndex.context.ts +64 -0
- package/src/.ldo/typeIndex.schema.ts +144 -0
- package/src/.ldo/typeIndex.shapeTypes.ts +28 -0
- package/src/.ldo/typeIndex.typings.ts +58 -0
- package/src/.shapes/profile.shex +10 -0
- package/src/.shapes/typeIndex.shex +23 -0
- package/src/constants.ts +7 -0
- package/src/getTypeIndex.ts +93 -0
- package/src/index.ts +4 -0
- package/src/react/useInstanceUris.ts +45 -0
- package/src/react/useTypeIndexProfile.ts +10 -0
- package/src/react/util/useSubscribeToUris.ts +35 -0
- package/src/setTypeIndex.ts +219 -0
- package/src/util/Options.ts +14 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Jackson Morgan
|
|
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.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# @ldo/solid-type-index
|
|
2
|
+
|
|
3
|
+
A library to handle [type indexes](https://solid.github.io/type-indexes/index.html) with [LDO](https://ldo.js.org).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
npm i @ldo/solid-type-index @ldo/solid
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { initTypeIndex } from "@ldo/solid-type-index";
|
|
16
|
+
import { createSolidLdoDataset } from "@ldo/solid";
|
|
17
|
+
|
|
18
|
+
async function main() {
|
|
19
|
+
const myWebId = "https://example.com/profile/card#me";
|
|
20
|
+
const solidLdoDataset = createSolidLodDataset();
|
|
21
|
+
|
|
22
|
+
// Initialize a type index for a webId in case it isn't initialized
|
|
23
|
+
await initTypeIndex(myWebId, { solidLdoDataset });
|
|
24
|
+
|
|
25
|
+
// Get Type Registrations
|
|
26
|
+
const typeRegistrations = await getTypeRegistrations(WEB_ID, {
|
|
27
|
+
solidLdoDataset,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Get Instance Uris (the URIs for resources that contain an instance of a
|
|
31
|
+
// class)
|
|
32
|
+
const bookmarkUris: string[] = await getInstanceUris(
|
|
33
|
+
"http://www.w3.org/2002/01/bookmark#Bookmark",
|
|
34
|
+
typeRegistrations,
|
|
35
|
+
{ solidLdoDataset }
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
main();
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Sponsorship
|
|
43
|
+
This project was made possible by a grant from NGI Zero Entrust via nlnet. Learn more on the [NLnet project page](https://nlnet.nl/project/SolidUsableApps/).
|
|
44
|
+
|
|
45
|
+
[<img src="https://nlnet.nl/logo/banner.png" alt="nlnet foundation logo" width="300" />](https://nlnet.nl/)
|
|
46
|
+
[<img src="https://nlnet.nl/image/logos/NGI0Entrust_tag.svg" alt="NGI Zero Entrust Logo" width="300" />](https://nlnet.nl/)
|
|
47
|
+
|
|
48
|
+
## Liscense
|
|
49
|
+
MIT
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.profileContext = void 0;
|
|
4
|
+
exports.profileContext = {
|
|
5
|
+
privateTypeIndex: {
|
|
6
|
+
"@id": "http://www.w3.org/ns/solid/terms#privateTypeIndex",
|
|
7
|
+
"@type": "@id",
|
|
8
|
+
"@isCollection": true,
|
|
9
|
+
},
|
|
10
|
+
publicTypeIndex: {
|
|
11
|
+
"@id": "http://www.w3.org/ns/solid/terms#publicTypeIndex",
|
|
12
|
+
"@type": "@id",
|
|
13
|
+
"@isCollection": true,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=profile.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.context.js","sourceRoot":"","sources":["../../src/.ldo/profile.context.ts"],"names":[],"mappings":";;;AAOa,QAAA,cAAc,GAAqB;IAC9C,gBAAgB,EAAE;QAChB,KAAK,EAAE,mDAAmD;QAC1D,OAAO,EAAE,KAAK;QACd,eAAe,EAAE,IAAI;KACtB;IACD,eAAe,EAAE;QACf,KAAK,EAAE,kDAAkD;QACzD,OAAO,EAAE,KAAK;QACd,eAAe,EAAE,IAAI;KACtB;CACF,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.profileSchema = void 0;
|
|
4
|
+
exports.profileSchema = {
|
|
5
|
+
type: "Schema",
|
|
6
|
+
shapes: [
|
|
7
|
+
{
|
|
8
|
+
id: "https://shaperepo.com/schemas/solidProfile#TypeIndexProfile",
|
|
9
|
+
type: "ShapeDecl",
|
|
10
|
+
shapeExpr: {
|
|
11
|
+
type: "Shape",
|
|
12
|
+
expression: {
|
|
13
|
+
type: "EachOf",
|
|
14
|
+
expressions: [
|
|
15
|
+
{
|
|
16
|
+
type: "TripleConstraint",
|
|
17
|
+
predicate: "http://www.w3.org/ns/solid/terms#privateTypeIndex",
|
|
18
|
+
valueExpr: {
|
|
19
|
+
type: "NodeConstraint",
|
|
20
|
+
nodeKind: "iri",
|
|
21
|
+
},
|
|
22
|
+
min: 0,
|
|
23
|
+
max: -1,
|
|
24
|
+
annotations: [
|
|
25
|
+
{
|
|
26
|
+
type: "Annotation",
|
|
27
|
+
predicate: "http://www.w3.org/2000/01/rdf-schema#comment",
|
|
28
|
+
object: {
|
|
29
|
+
value: "A registry of all types used on the user's Pod (for private access only)",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: "TripleConstraint",
|
|
36
|
+
predicate: "http://www.w3.org/ns/solid/terms#publicTypeIndex",
|
|
37
|
+
valueExpr: {
|
|
38
|
+
type: "NodeConstraint",
|
|
39
|
+
nodeKind: "iri",
|
|
40
|
+
},
|
|
41
|
+
min: 0,
|
|
42
|
+
max: -1,
|
|
43
|
+
annotations: [
|
|
44
|
+
{
|
|
45
|
+
type: "Annotation",
|
|
46
|
+
predicate: "http://www.w3.org/2000/01/rdf-schema#comment",
|
|
47
|
+
object: {
|
|
48
|
+
value: "A registry of all types used on the user's Pod (for public access)",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=profile.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.schema.js","sourceRoot":"","sources":["../../src/.ldo/profile.schema.ts"],"names":[],"mappings":";;;AAOa,QAAA,aAAa,GAAW;IACnC,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE;QACN;YACE,EAAE,EAAE,6DAA6D;YACjE,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE;wBACX;4BACE,IAAI,EAAE,kBAAkB;4BACxB,SAAS,EAAE,mDAAmD;4BAC9D,SAAS,EAAE;gCACT,IAAI,EAAE,gBAAgB;gCACtB,QAAQ,EAAE,KAAK;6BAChB;4BACD,GAAG,EAAE,CAAC;4BACN,GAAG,EAAE,CAAC,CAAC;4BACP,WAAW,EAAE;gCACX;oCACE,IAAI,EAAE,YAAY;oCAClB,SAAS,EAAE,8CAA8C;oCACzD,MAAM,EAAE;wCACN,KAAK,EACH,0EAA0E;qCAC7E;iCACF;6BACF;yBACF;wBACD;4BACE,IAAI,EAAE,kBAAkB;4BACxB,SAAS,EAAE,kDAAkD;4BAC7D,SAAS,EAAE;gCACT,IAAI,EAAE,gBAAgB;gCACtB,QAAQ,EAAE,KAAK;6BAChB;4BACD,GAAG,EAAE,CAAC;4BACN,GAAG,EAAE,CAAC,CAAC;4BACP,WAAW,EAAE;gCACX;oCACE,IAAI,EAAE,YAAY;oCAClB,SAAS,EAAE,8CAA8C;oCACzD,MAAM,EAAE;wCACN,KAAK,EACH,oEAAoE;qCACvE;iCACF;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeIndexProfileShapeType = void 0;
|
|
4
|
+
const profile_schema_1 = require("./profile.schema");
|
|
5
|
+
const profile_context_1 = require("./profile.context");
|
|
6
|
+
exports.TypeIndexProfileShapeType = {
|
|
7
|
+
schema: profile_schema_1.profileSchema,
|
|
8
|
+
shape: "https://shaperepo.com/schemas/solidProfile#TypeIndexProfile",
|
|
9
|
+
context: profile_context_1.profileContext,
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=profile.shapeTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.shapeTypes.js","sourceRoot":"","sources":["../../src/.ldo/profile.shapeTypes.ts"],"names":[],"mappings":";;;AACA,qDAAiD;AACjD,uDAAmD;AAYtC,QAAA,yBAAyB,GAAgC;IACpE,MAAM,EAAE,8BAAa;IACrB,KAAK,EAAE,6DAA6D;IACpE,OAAO,EAAE,gCAAc;CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.typings.js","sourceRoot":"","sources":["../../src/.ldo/profile.typings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typeIndexContext = void 0;
|
|
4
|
+
exports.typeIndexContext = {
|
|
5
|
+
type: {
|
|
6
|
+
"@id": "@type",
|
|
7
|
+
},
|
|
8
|
+
TypeIndex: {
|
|
9
|
+
"@id": "http://www.w3.org/ns/solid/terms#TypeIndex",
|
|
10
|
+
"@context": {
|
|
11
|
+
type: {
|
|
12
|
+
"@id": "@type",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
ListedDocument: {
|
|
17
|
+
"@id": "http://www.w3.org/ns/solid/terms#ListedDocument",
|
|
18
|
+
"@context": {
|
|
19
|
+
type: {
|
|
20
|
+
"@id": "@type",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
TypeRegistration: {
|
|
25
|
+
"@id": "http://www.w3.org/ns/solid/terms#TypeRegistration",
|
|
26
|
+
"@context": {
|
|
27
|
+
type: {
|
|
28
|
+
"@id": "@type",
|
|
29
|
+
},
|
|
30
|
+
forClass: {
|
|
31
|
+
"@id": "http://www.w3.org/ns/solid/terms#forClass",
|
|
32
|
+
"@type": "@id",
|
|
33
|
+
},
|
|
34
|
+
instance: {
|
|
35
|
+
"@id": "http://www.w3.org/ns/solid/terms#instance",
|
|
36
|
+
"@type": "@id",
|
|
37
|
+
"@isCollection": true,
|
|
38
|
+
},
|
|
39
|
+
instanceContainer: {
|
|
40
|
+
"@id": "http://www.w3.org/ns/solid/terms#instanceContainer",
|
|
41
|
+
"@type": "@id",
|
|
42
|
+
"@isCollection": true,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
forClass: {
|
|
47
|
+
"@id": "http://www.w3.org/ns/solid/terms#forClass",
|
|
48
|
+
"@type": "@id",
|
|
49
|
+
},
|
|
50
|
+
instance: {
|
|
51
|
+
"@id": "http://www.w3.org/ns/solid/terms#instance",
|
|
52
|
+
"@type": "@id",
|
|
53
|
+
"@isCollection": true,
|
|
54
|
+
},
|
|
55
|
+
instanceContainer: {
|
|
56
|
+
"@id": "http://www.w3.org/ns/solid/terms#instanceContainer",
|
|
57
|
+
"@type": "@id",
|
|
58
|
+
"@isCollection": true,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=typeIndex.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeIndex.context.js","sourceRoot":"","sources":["../../src/.ldo/typeIndex.context.ts"],"names":[],"mappings":";;;AAOa,QAAA,gBAAgB,GAAqB;IAChD,IAAI,EAAE;QACJ,KAAK,EAAE,OAAO;KACf;IACD,SAAS,EAAE;QACT,KAAK,EAAE,4CAA4C;QACnD,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,KAAK,EAAE,OAAO;aACf;SACF;KACF;IACD,cAAc,EAAE;QACd,KAAK,EAAE,iDAAiD;QACxD,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,KAAK,EAAE,OAAO;aACf;SACF;KACF;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,mDAAmD;QAC1D,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,KAAK,EAAE,OAAO;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,2CAA2C;gBAClD,OAAO,EAAE,KAAK;aACf;YACD,QAAQ,EAAE;gBACR,KAAK,EAAE,2CAA2C;gBAClD,OAAO,EAAE,KAAK;gBACd,eAAe,EAAE,IAAI;aACtB;YACD,iBAAiB,EAAE;gBACjB,KAAK,EAAE,oDAAoD;gBAC3D,OAAO,EAAE,KAAK;gBACd,eAAe,EAAE,IAAI;aACtB;SACF;KACF;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,2CAA2C;QAClD,OAAO,EAAE,KAAK;KACf;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,2CAA2C;QAClD,OAAO,EAAE,KAAK;QACd,eAAe,EAAE,IAAI;KACtB;IACD,iBAAiB,EAAE;QACjB,KAAK,EAAE,oDAAoD;QAC3D,OAAO,EAAE,KAAK;QACd,eAAe,EAAE,IAAI;KACtB;CACF,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typeIndexSchema = void 0;
|
|
4
|
+
exports.typeIndexSchema = {
|
|
5
|
+
type: "Schema",
|
|
6
|
+
shapes: [
|
|
7
|
+
{
|
|
8
|
+
id: "https://shaperepo.com/schemas/solidProfile#TypeIndexDocument",
|
|
9
|
+
type: "ShapeDecl",
|
|
10
|
+
shapeExpr: {
|
|
11
|
+
type: "Shape",
|
|
12
|
+
expression: {
|
|
13
|
+
type: "EachOf",
|
|
14
|
+
expressions: [
|
|
15
|
+
{
|
|
16
|
+
type: "TripleConstraint",
|
|
17
|
+
predicate: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
|
|
18
|
+
valueExpr: {
|
|
19
|
+
type: "NodeConstraint",
|
|
20
|
+
values: ["http://www.w3.org/ns/solid/terms#TypeIndex"],
|
|
21
|
+
},
|
|
22
|
+
annotations: [
|
|
23
|
+
{
|
|
24
|
+
type: "Annotation",
|
|
25
|
+
predicate: "http://www.w3.org/2000/01/rdf-schema#comment",
|
|
26
|
+
object: {
|
|
27
|
+
value: "Defines the node as a TypeIndex",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: "TripleConstraint",
|
|
34
|
+
predicate: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
|
|
35
|
+
valueExpr: {
|
|
36
|
+
type: "NodeConstraint",
|
|
37
|
+
values: ["http://www.w3.org/ns/solid/terms#ListedDocument"],
|
|
38
|
+
},
|
|
39
|
+
annotations: [
|
|
40
|
+
{
|
|
41
|
+
type: "Annotation",
|
|
42
|
+
predicate: "http://www.w3.org/2000/01/rdf-schema#comment",
|
|
43
|
+
object: {
|
|
44
|
+
value: "Defines the node as a Listed Document",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
extra: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "https://shaperepo.com/schemas/solidProfile#TypeRegistration",
|
|
56
|
+
type: "ShapeDecl",
|
|
57
|
+
shapeExpr: {
|
|
58
|
+
type: "Shape",
|
|
59
|
+
expression: {
|
|
60
|
+
type: "EachOf",
|
|
61
|
+
expressions: [
|
|
62
|
+
{
|
|
63
|
+
type: "TripleConstraint",
|
|
64
|
+
predicate: "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
|
|
65
|
+
valueExpr: {
|
|
66
|
+
type: "NodeConstraint",
|
|
67
|
+
values: ["http://www.w3.org/ns/solid/terms#TypeRegistration"],
|
|
68
|
+
},
|
|
69
|
+
annotations: [
|
|
70
|
+
{
|
|
71
|
+
type: "Annotation",
|
|
72
|
+
predicate: "http://www.w3.org/2000/01/rdf-schema#comment",
|
|
73
|
+
object: {
|
|
74
|
+
value: "Defines this node as a Type Registration",
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: "TripleConstraint",
|
|
81
|
+
predicate: "http://www.w3.org/ns/solid/terms#forClass",
|
|
82
|
+
valueExpr: {
|
|
83
|
+
type: "NodeConstraint",
|
|
84
|
+
nodeKind: "iri",
|
|
85
|
+
},
|
|
86
|
+
annotations: [
|
|
87
|
+
{
|
|
88
|
+
type: "Annotation",
|
|
89
|
+
predicate: "http://www.w3.org/2000/01/rdf-schema#comment",
|
|
90
|
+
object: {
|
|
91
|
+
value: "The class of object at this type.",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: "TripleConstraint",
|
|
98
|
+
predicate: "http://www.w3.org/ns/solid/terms#instance",
|
|
99
|
+
valueExpr: {
|
|
100
|
+
type: "NodeConstraint",
|
|
101
|
+
nodeKind: "iri",
|
|
102
|
+
},
|
|
103
|
+
min: 0,
|
|
104
|
+
max: -1,
|
|
105
|
+
annotations: [
|
|
106
|
+
{
|
|
107
|
+
type: "Annotation",
|
|
108
|
+
predicate: "http://www.w3.org/2000/01/rdf-schema#comment",
|
|
109
|
+
object: {
|
|
110
|
+
value: "A specific resource that contains the class.",
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: "TripleConstraint",
|
|
117
|
+
predicate: "http://www.w3.org/ns/solid/terms#instanceContainer",
|
|
118
|
+
valueExpr: {
|
|
119
|
+
type: "NodeConstraint",
|
|
120
|
+
nodeKind: "iri",
|
|
121
|
+
},
|
|
122
|
+
min: 0,
|
|
123
|
+
max: -1,
|
|
124
|
+
annotations: [
|
|
125
|
+
{
|
|
126
|
+
type: "Annotation",
|
|
127
|
+
predicate: "http://www.w3.org/2000/01/rdf-schema#comment",
|
|
128
|
+
object: {
|
|
129
|
+
value: "Containers that contain resources with the class.",
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
extra: ["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"],
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
};
|
|
141
|
+
//# sourceMappingURL=typeIndex.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeIndex.schema.js","sourceRoot":"","sources":["../../src/.ldo/typeIndex.schema.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ShapeType } from "@ldo/ldo";
|
|
2
|
+
import { TypeIndexDocument, TypeRegistration } from "./typeIndex.typings";
|
|
3
|
+
export declare const TypeIndexDocumentShapeType: ShapeType<TypeIndexDocument>;
|
|
4
|
+
export declare const TypeRegistrationShapeType: ShapeType<TypeRegistration>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeRegistrationShapeType = exports.TypeIndexDocumentShapeType = void 0;
|
|
4
|
+
const typeIndex_schema_1 = require("./typeIndex.schema");
|
|
5
|
+
const typeIndex_context_1 = require("./typeIndex.context");
|
|
6
|
+
exports.TypeIndexDocumentShapeType = {
|
|
7
|
+
schema: typeIndex_schema_1.typeIndexSchema,
|
|
8
|
+
shape: "https://shaperepo.com/schemas/solidProfile#TypeIndexDocument",
|
|
9
|
+
context: typeIndex_context_1.typeIndexContext,
|
|
10
|
+
};
|
|
11
|
+
exports.TypeRegistrationShapeType = {
|
|
12
|
+
schema: typeIndex_schema_1.typeIndexSchema,
|
|
13
|
+
shape: "https://shaperepo.com/schemas/solidProfile#TypeRegistration",
|
|
14
|
+
context: typeIndex_context_1.typeIndexContext,
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=typeIndex.shapeTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeIndex.shapeTypes.js","sourceRoot":"","sources":["../../src/.ldo/typeIndex.shapeTypes.ts"],"names":[],"mappings":";;;AACA,yDAAqD;AACrD,2DAAuD;AAY1C,QAAA,0BAA0B,GAAiC;IACtE,MAAM,EAAE,kCAAe;IACvB,KAAK,EAAE,8DAA8D;IACrE,OAAO,EAAE,oCAAgB;CAC1B,CAAC;AAKW,QAAA,yBAAyB,GAAgC;IACpE,MAAM,EAAE,kCAAe;IACvB,KAAK,EAAE,6DAA6D;IACpE,OAAO,EAAE,oCAAgB;CAC1B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LdoJsonldContext, LdSet } from "@ldo/ldo";
|
|
2
|
+
export interface TypeIndexDocument {
|
|
3
|
+
"@id"?: string;
|
|
4
|
+
"@context"?: LdoJsonldContext;
|
|
5
|
+
type: LdSet<{
|
|
6
|
+
"@id": "TypeIndex";
|
|
7
|
+
} | {
|
|
8
|
+
"@id": "ListedDocument";
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export interface TypeRegistration {
|
|
12
|
+
"@id"?: string;
|
|
13
|
+
"@context"?: LdoJsonldContext;
|
|
14
|
+
type: {
|
|
15
|
+
"@id": "TypeRegistration";
|
|
16
|
+
};
|
|
17
|
+
forClass: {
|
|
18
|
+
"@id": string;
|
|
19
|
+
};
|
|
20
|
+
instance?: LdSet<{
|
|
21
|
+
"@id": string;
|
|
22
|
+
}>;
|
|
23
|
+
instanceContainer?: LdSet<{
|
|
24
|
+
"@id": string;
|
|
25
|
+
}>;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeIndex.typings.js","sourceRoot":"","sources":["../../src/.ldo/typeIndex.typings.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const RDF_TYPE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
|
|
2
|
+
export declare const TYPE_REGISTRATION = "http://www.w3.org/ns/solid/terms#TypeRegistration";
|
|
3
|
+
export declare const FOR_CLASS = "http://www.w3.org/ns/solid/terms#forClass";
|
|
4
|
+
export declare const INSTANCE = "http://www.w3.org/ns/solid/terms#instance";
|
|
5
|
+
export declare const INSTANCE_CONTAINER = "http://www.w3.org/ns/solid/terms#instanceContainer";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.INSTANCE_CONTAINER = exports.INSTANCE = exports.FOR_CLASS = exports.TYPE_REGISTRATION = exports.RDF_TYPE = void 0;
|
|
4
|
+
exports.RDF_TYPE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
|
|
5
|
+
exports.TYPE_REGISTRATION = "http://www.w3.org/ns/solid/terms#TypeRegistration";
|
|
6
|
+
exports.FOR_CLASS = "http://www.w3.org/ns/solid/terms#forClass";
|
|
7
|
+
exports.INSTANCE = "http://www.w3.org/ns/solid/terms#instance";
|
|
8
|
+
exports.INSTANCE_CONTAINER = "http://www.w3.org/ns/solid/terms#instanceContainer";
|
|
9
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,QAAQ,GAAG,iDAAiD,CAAC;AAC7D,QAAA,iBAAiB,GAC5B,mDAAmD,CAAC;AACzC,QAAA,SAAS,GAAG,2CAA2C,CAAC;AACxD,QAAA,QAAQ,GAAG,2CAA2C,CAAC;AACvD,QAAA,kBAAkB,GAC7B,oDAAoD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LeafUri } from "@ldo/solid";
|
|
2
|
+
import type { TypeRegistration } from "./.ldo/typeIndex.typings";
|
|
3
|
+
import type { TypeIndexProfile } from "./.ldo/profile.typings";
|
|
4
|
+
import type { Options } from "./util/Options";
|
|
5
|
+
import type { LdSet } from "@ldo/ldo";
|
|
6
|
+
export declare function getTypeRegistrations(webId: string, options?: Options): Promise<LdSet<TypeRegistration>>;
|
|
7
|
+
export declare function getProfile(webId: string, options?: Options): Promise<TypeIndexProfile>;
|
|
8
|
+
export declare function getTypeIndexesUrisFromProfile(profile: TypeIndexProfile): LeafUri[];
|
|
9
|
+
export declare function getInstanceUris(classUri: string, typeRegistrations: TypeRegistration[], options?: Options): Promise<LeafUri[]>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInstanceUris = exports.getTypeIndexesUrisFromProfile = exports.getProfile = exports.getTypeRegistrations = void 0;
|
|
4
|
+
const profile_shapeTypes_1 = require("./.ldo/profile.shapeTypes");
|
|
5
|
+
const typeIndex_shapeTypes_1 = require("./.ldo/typeIndex.shapeTypes");
|
|
6
|
+
const constants_1 = require("./constants");
|
|
7
|
+
const Options_1 = require("./util/Options");
|
|
8
|
+
async function getTypeRegistrations(webId, options) {
|
|
9
|
+
const { dataset } = (0, Options_1.guaranteeOptions)(options);
|
|
10
|
+
const profile = await getProfile(webId, options);
|
|
11
|
+
const typeIndexUris = getTypeIndexesUrisFromProfile(profile);
|
|
12
|
+
await Promise.all(typeIndexUris.map(async (typeIndexUri) => {
|
|
13
|
+
const typeIndexResource = dataset.getResource(typeIndexUri);
|
|
14
|
+
const readResult = await typeIndexResource.readIfUnfetched();
|
|
15
|
+
if (readResult.isError)
|
|
16
|
+
throw readResult;
|
|
17
|
+
}));
|
|
18
|
+
return dataset
|
|
19
|
+
.usingType(typeIndex_shapeTypes_1.TypeRegistrationShapeType)
|
|
20
|
+
.matchSubject(constants_1.RDF_TYPE, constants_1.TYPE_REGISTRATION);
|
|
21
|
+
}
|
|
22
|
+
exports.getTypeRegistrations = getTypeRegistrations;
|
|
23
|
+
async function getProfile(webId, options) {
|
|
24
|
+
const { dataset } = (0, Options_1.guaranteeOptions)(options);
|
|
25
|
+
const profileResource = dataset.getResource(webId);
|
|
26
|
+
const readResult = await profileResource.readIfUnfetched();
|
|
27
|
+
if (readResult.isError)
|
|
28
|
+
throw readResult;
|
|
29
|
+
return dataset.usingType(profile_shapeTypes_1.TypeIndexProfileShapeType).fromSubject(webId);
|
|
30
|
+
}
|
|
31
|
+
exports.getProfile = getProfile;
|
|
32
|
+
function getTypeIndexesUrisFromProfile(profile) {
|
|
33
|
+
const uris = [];
|
|
34
|
+
profile.privateTypeIndex?.forEach((indexNode) => {
|
|
35
|
+
uris.push(indexNode["@id"]);
|
|
36
|
+
});
|
|
37
|
+
profile.publicTypeIndex?.forEach((indexNode) => {
|
|
38
|
+
uris.push(indexNode["@id"]);
|
|
39
|
+
});
|
|
40
|
+
return uris;
|
|
41
|
+
}
|
|
42
|
+
exports.getTypeIndexesUrisFromProfile = getTypeIndexesUrisFromProfile;
|
|
43
|
+
async function getInstanceUris(classUri, typeRegistrations, options) {
|
|
44
|
+
const { dataset } = (0, Options_1.guaranteeOptions)(options);
|
|
45
|
+
const leafUris = new Set();
|
|
46
|
+
await Promise.all(typeRegistrations.map(async (registration) => {
|
|
47
|
+
if (registration.forClass["@id"] === classUri) {
|
|
48
|
+
registration.instance?.forEach((instance) => leafUris.add(instance["@id"]));
|
|
49
|
+
await Promise.all(registration.instanceContainer?.map(async (instanceContainer) => {
|
|
50
|
+
const containerResource = dataset.getResource(instanceContainer["@id"]);
|
|
51
|
+
await containerResource.readIfUnfetched();
|
|
52
|
+
containerResource.children().forEach((child) => {
|
|
53
|
+
if (child.type === "leaf")
|
|
54
|
+
leafUris.add(child.uri);
|
|
55
|
+
});
|
|
56
|
+
}) ?? []);
|
|
57
|
+
}
|
|
58
|
+
}));
|
|
59
|
+
return Array.from(leafUris);
|
|
60
|
+
}
|
|
61
|
+
exports.getInstanceUris = getInstanceUris;
|
|
62
|
+
//# sourceMappingURL=getTypeIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTypeIndex.js","sourceRoot":"","sources":["../src/getTypeIndex.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./getTypeIndex"), exports);
|
|
18
|
+
__exportStar(require("./setTypeIndex"), exports);
|
|
19
|
+
__exportStar(require("./react/useInstanceUris"), exports);
|
|
20
|
+
__exportStar(require("./react/useTypeIndexProfile"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,iDAA+B;AAC/B,0DAAwC;AACxC,8DAA4C"}
|