@ldo/solid-type-index 1.0.0-alpha.50 → 1.0.0-alpha.53

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 (93) hide show
  1. package/README.md +2 -2
  2. package/dist/_ldo/{profile.context.mjs → profile.context.js} +1 -1
  3. package/dist/_ldo/profile.context.js.map +1 -0
  4. package/dist/_ldo/{profile.schema.mjs → profile.schema.js} +1 -1
  5. package/dist/_ldo/profile.schema.js.map +1 -0
  6. package/dist/_ldo/{profile.shapeTypes.mjs → profile.shapeTypes.js} +3 -3
  7. package/dist/_ldo/profile.shapeTypes.js.map +1 -0
  8. package/dist/_ldo/{profile.typings.d.cts → profile.typings.d.ts} +1 -1
  9. package/dist/_ldo/profile.typings.d.ts.map +1 -0
  10. package/dist/_ldo/{typeIndex.context.mjs → typeIndex.context.js} +1 -1
  11. package/dist/_ldo/typeIndex.context.js.map +1 -0
  12. package/dist/_ldo/{typeIndex.schema.mjs → typeIndex.schema.js} +1 -1
  13. package/dist/_ldo/typeIndex.schema.js.map +1 -0
  14. package/dist/_ldo/{typeIndex.shapeTypes.mjs → typeIndex.shapeTypes.js} +3 -3
  15. package/dist/_ldo/typeIndex.shapeTypes.js.map +1 -0
  16. package/dist/_ldo/{typeIndex.typings.d.cts → typeIndex.typings.d.ts} +1 -1
  17. package/dist/_ldo/typeIndex.typings.d.ts.map +1 -0
  18. package/dist/{constants.mjs → constants.js} +1 -1
  19. package/dist/constants.js.map +1 -0
  20. package/dist/{getTypeIndex.d.cts → getTypeIndex.d.ts} +5 -5
  21. package/dist/getTypeIndex.d.ts.map +1 -0
  22. package/dist/{getTypeIndex.mjs → getTypeIndex.js} +5 -5
  23. package/dist/getTypeIndex.js.map +1 -0
  24. package/dist/{index.d.cts → index.d.ts} +4 -4
  25. package/dist/{index.mjs → index.js} +4 -4
  26. package/dist/react/{useInstanceUris.d.mts → useInstanceUris.d.ts} +1 -1
  27. package/dist/react/useInstanceUris.d.ts.map +1 -0
  28. package/dist/react/{useInstanceUris.mjs → useInstanceUris.js} +6 -6
  29. package/dist/react/useInstanceUris.js.map +1 -0
  30. package/dist/react/{useTypeIndexProfile.d.cts → useTypeIndexProfile.d.ts} +2 -2
  31. package/dist/react/useTypeIndexProfile.d.ts.map +1 -0
  32. package/dist/react/{useTypeIndexProfile.mjs → useTypeIndexProfile.js} +2 -2
  33. package/dist/react/useTypeIndexProfile.js.map +1 -0
  34. package/dist/react/util/{useSubscribeToUris.mjs → useSubscribeToUris.js} +1 -1
  35. package/dist/react/util/useSubscribeToUris.js.map +1 -0
  36. package/dist/{setTypeIndex.d.mts → setTypeIndex.d.ts} +3 -3
  37. package/dist/setTypeIndex.d.ts.map +1 -0
  38. package/dist/{setTypeIndex.mjs → setTypeIndex.js} +6 -6
  39. package/dist/setTypeIndex.js.map +1 -0
  40. package/dist/util/{Options.d.mts → Options.d.ts} +1 -1
  41. package/dist/util/Options.d.ts.map +1 -0
  42. package/dist/util/{Options.mjs → Options.js} +1 -1
  43. package/dist/util/Options.js.map +1 -0
  44. package/package.json +15 -19
  45. package/dist/_ldo/profile.context.cjs +0 -20
  46. package/dist/_ldo/profile.context.mjs.map +0 -1
  47. package/dist/_ldo/profile.schema.cjs +0 -50
  48. package/dist/_ldo/profile.schema.mjs.map +0 -1
  49. package/dist/_ldo/profile.shapeTypes.cjs +0 -18
  50. package/dist/_ldo/profile.shapeTypes.mjs.map +0 -1
  51. package/dist/_ldo/profile.typings.d.cts.map +0 -1
  52. package/dist/_ldo/profile.typings.d.mts +0 -30
  53. package/dist/_ldo/profile.typings.d.mts.map +0 -1
  54. package/dist/_ldo/typeIndex.context.cjs +0 -53
  55. package/dist/_ldo/typeIndex.context.mjs.map +0 -1
  56. package/dist/_ldo/typeIndex.schema.cjs +0 -115
  57. package/dist/_ldo/typeIndex.schema.mjs.map +0 -1
  58. package/dist/_ldo/typeIndex.shapeTypes.cjs +0 -27
  59. package/dist/_ldo/typeIndex.shapeTypes.mjs.map +0 -1
  60. package/dist/_ldo/typeIndex.typings.d.cts.map +0 -1
  61. package/dist/_ldo/typeIndex.typings.d.mts +0 -37
  62. package/dist/_ldo/typeIndex.typings.d.mts.map +0 -1
  63. package/dist/constants.cjs +0 -8
  64. package/dist/constants.mjs.map +0 -1
  65. package/dist/getTypeIndex.cjs +0 -52
  66. package/dist/getTypeIndex.d.cts.map +0 -1
  67. package/dist/getTypeIndex.d.mts +0 -14
  68. package/dist/getTypeIndex.d.mts.map +0 -1
  69. package/dist/getTypeIndex.mjs.map +0 -1
  70. package/dist/index.cjs +0 -16
  71. package/dist/index.d.mts +0 -5
  72. package/dist/react/useInstanceUris.cjs +0 -27
  73. package/dist/react/useInstanceUris.d.cts +0 -13
  74. package/dist/react/useInstanceUris.d.cts.map +0 -1
  75. package/dist/react/useInstanceUris.d.mts.map +0 -1
  76. package/dist/react/useInstanceUris.mjs.map +0 -1
  77. package/dist/react/useTypeIndexProfile.cjs +0 -10
  78. package/dist/react/useTypeIndexProfile.d.cts.map +0 -1
  79. package/dist/react/useTypeIndexProfile.d.mts +0 -7
  80. package/dist/react/useTypeIndexProfile.d.mts.map +0 -1
  81. package/dist/react/useTypeIndexProfile.mjs.map +0 -1
  82. package/dist/react/util/useSubscribeToUris.cjs +0 -24
  83. package/dist/react/util/useSubscribeToUris.mjs.map +0 -1
  84. package/dist/setTypeIndex.cjs +0 -125
  85. package/dist/setTypeIndex.d.cts +0 -56
  86. package/dist/setTypeIndex.d.cts.map +0 -1
  87. package/dist/setTypeIndex.d.mts.map +0 -1
  88. package/dist/setTypeIndex.mjs.map +0 -1
  89. package/dist/util/Options.cjs +0 -13
  90. package/dist/util/Options.d.cts +0 -11
  91. package/dist/util/Options.d.cts.map +0 -1
  92. package/dist/util/Options.d.mts.map +0 -1
  93. package/dist/util/Options.mjs.map +0 -1
package/README.md CHANGED
@@ -5,14 +5,14 @@ A library to handle [type indexes](https://solid.github.io/type-indexes/index.ht
5
5
  ## Installation
6
6
 
7
7
  ```
8
- npm i @ldo/solid-type-index @ldo/solid
8
+ npm i @ldo/solid-type-index @ldo/connected-solid
9
9
  ```
10
10
 
11
11
  ## Usage
12
12
 
13
13
  ```typescript
14
14
  import { initTypeIndex } from "@ldo/solid-type-index";
15
- import { createSolidLdoDataset } from "@ldo/solid";
15
+ import { createSolidLdoDataset } from "@ldo/connected-solid";
16
16
 
17
17
  async function main() {
18
18
  const myWebId = "https://example.com/profile/card#me";
@@ -19,4 +19,4 @@ const profileContext = {
19
19
  //#endregion
20
20
  export { profileContext };
21
21
 
22
- //# sourceMappingURL=profile.context.mjs.map
22
+ //# sourceMappingURL=profile.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.context.js","names":[],"sources":["../../src/_ldo/profile.context.ts"],"sourcesContent":["import type { LdoJsonldContext } from \"@ldo/ldo\";\n\n/**\n * =============================================================================\n * profileContext: JSONLD Context for profile\n * =============================================================================\n */\nexport const profileContext: LdoJsonldContext = {\n privateTypeIndex: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#privateTypeIndex\",\n \"@type\": \"@id\",\n \"@isCollection\": true,\n },\n publicTypeIndex: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#publicTypeIndex\",\n \"@type\": \"@id\",\n \"@isCollection\": true,\n },\n};\n"],"mappings":";;;;;;AAOA,MAAa,iBAAmC;CAC9C,kBAAkB;EAChB,OAAO;EACP,SAAS;EACT,iBAAiB;EAClB;CACD,iBAAiB;EACf,OAAO;EACP,SAAS;EACT,iBAAiB;EAClB;CACF"}
@@ -49,4 +49,4 @@ const profileSchema = {
49
49
  //#endregion
50
50
  export { profileSchema };
51
51
 
52
- //# sourceMappingURL=profile.schema.mjs.map
52
+ //# sourceMappingURL=profile.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.schema.js","names":[],"sources":["../../src/_ldo/profile.schema.ts"],"sourcesContent":["import type { Schema } from \"shexj\";\n\n/**\n * =============================================================================\n * profileSchema: ShexJ Schema for profile\n * =============================================================================\n */\nexport const profileSchema: Schema = {\n type: \"Schema\",\n shapes: [\n {\n id: \"https://shaperepo.com/schemas/solidProfile#TypeIndexProfile\",\n type: \"ShapeDecl\",\n shapeExpr: {\n type: \"Shape\",\n expression: {\n type: \"EachOf\",\n expressions: [\n {\n type: \"TripleConstraint\",\n predicate: \"http://www.w3.org/ns/solid/terms#privateTypeIndex\",\n valueExpr: {\n type: \"NodeConstraint\",\n nodeKind: \"iri\",\n },\n min: 0,\n max: -1,\n annotations: [\n {\n type: \"Annotation\",\n predicate: \"http://www.w3.org/2000/01/rdf-schema#comment\",\n object: {\n value:\n \"A registry of all types used on the user's Pod (for private access only)\",\n },\n },\n ],\n },\n {\n type: \"TripleConstraint\",\n predicate: \"http://www.w3.org/ns/solid/terms#publicTypeIndex\",\n valueExpr: {\n type: \"NodeConstraint\",\n nodeKind: \"iri\",\n },\n min: 0,\n max: -1,\n annotations: [\n {\n type: \"Annotation\",\n predicate: \"http://www.w3.org/2000/01/rdf-schema#comment\",\n object: {\n value:\n \"A registry of all types used on the user's Pod (for public access)\",\n },\n },\n ],\n },\n ],\n },\n },\n },\n ],\n};\n"],"mappings":";;;;;;AAOA,MAAa,gBAAwB;CACnC,MAAM;CACN,QAAQ,CACN;EACE,IAAI;EACJ,MAAM;EACN,WAAW;GACT,MAAM;GACN,YAAY;IACV,MAAM;IACN,aAAa,CACX;KACE,MAAM;KACN,WAAW;KACX,WAAW;MACT,MAAM;MACN,UAAU;MACX;KACD,KAAK;KACL,KAAK;KACL,aAAa,CACX;MACE,MAAM;MACN,WAAW;MACX,QAAQ,EACN,OACE,4EACH;MACF,CACF;KACF,EACD;KACE,MAAM;KACN,WAAW;KACX,WAAW;MACT,MAAM;MACN,UAAU;MACX;KACD,KAAK;KACL,KAAK;KACL,aAAa,CACX;MACE,MAAM;MACN,WAAW;MACX,QAAQ,EACN,OACE,sEACH;MACF,CACF;KACF,CACF;IACF;GACF;EACF,CACF;CACF"}
@@ -1,5 +1,5 @@
1
- import { profileSchema } from "./profile.schema.mjs";
2
- import { profileContext } from "./profile.context.mjs";
1
+ import { profileSchema } from "./profile.schema.js";
2
+ import { profileContext } from "./profile.context.js";
3
3
  //#region src/_ldo/profile.shapeTypes.ts
4
4
  /**
5
5
  * =============================================================================
@@ -17,4 +17,4 @@ const TypeIndexProfileShapeType = {
17
17
  //#endregion
18
18
  export { TypeIndexProfileShapeType };
19
19
 
20
- //# sourceMappingURL=profile.shapeTypes.mjs.map
20
+ //# sourceMappingURL=profile.shapeTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.shapeTypes.js","names":[],"sources":["../../src/_ldo/profile.shapeTypes.ts"],"sourcesContent":["import type { ShapeType } from \"@ldo/ldo\";\nimport { profileSchema } from \"./profile.schema\";\nimport { profileContext } from \"./profile.context\";\nimport type { TypeIndexProfile } from \"./profile.typings\";\n\n/**\n * =============================================================================\n * LDO ShapeTypes profile\n * =============================================================================\n */\n\n/**\n * TypeIndexProfile ShapeType\n */\nexport const TypeIndexProfileShapeType: ShapeType<TypeIndexProfile> = {\n schema: profileSchema,\n shape: \"https://shaperepo.com/schemas/solidProfile#TypeIndexProfile\",\n context: profileContext,\n};\n"],"mappings":";;;;;;;;;;;AAcA,MAAa,4BAAyD;CACpE,QAAQ;CACR,OAAO;CACP,SAAS;CACV"}
@@ -27,4 +27,4 @@ interface TypeIndexProfile {
27
27
  }
28
28
  //#endregion
29
29
  export { TypeIndexProfile };
30
- //# sourceMappingURL=profile.typings.d.cts.map
30
+ //# sourceMappingURL=profile.typings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.typings.d.ts","names":[],"sources":["../../src/_ldo/profile.typings.ts"],"mappings":";;;;;AAWA;;;;;;UAAiB,gBAAA;EACf,KAAA;EACA,UAAA,GAAa,gBAAA;EAAb;;;EAIA,gBAAA,GAAmB,KAAA;IACjB,KAAA;EAAA;EAKgB;;;EAAlB,eAAA,GAAkB,KAAA;IAChB,KAAA;EAAA;AAAA"}
@@ -52,4 +52,4 @@ const typeIndexContext = {
52
52
  //#endregion
53
53
  export { typeIndexContext };
54
54
 
55
- //# sourceMappingURL=typeIndex.context.mjs.map
55
+ //# sourceMappingURL=typeIndex.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeIndex.context.js","names":[],"sources":["../../src/_ldo/typeIndex.context.ts"],"sourcesContent":["import type { LdoJsonldContext } from \"@ldo/ldo\";\n\n/**\n * =============================================================================\n * typeIndexContext: JSONLD Context for typeIndex\n * =============================================================================\n */\nexport const typeIndexContext: LdoJsonldContext = {\n type: {\n \"@id\": \"@type\",\n },\n TypeIndex: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#TypeIndex\",\n \"@context\": {\n type: {\n \"@id\": \"@type\",\n },\n },\n },\n ListedDocument: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#ListedDocument\",\n \"@context\": {\n type: {\n \"@id\": \"@type\",\n },\n },\n },\n TypeRegistration: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#TypeRegistration\",\n \"@context\": {\n type: {\n \"@id\": \"@type\",\n },\n forClass: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#forClass\",\n \"@type\": \"@id\",\n },\n instance: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#instance\",\n \"@type\": \"@id\",\n \"@isCollection\": true,\n },\n instanceContainer: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#instanceContainer\",\n \"@type\": \"@id\",\n \"@isCollection\": true,\n },\n },\n },\n forClass: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#forClass\",\n \"@type\": \"@id\",\n },\n instance: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#instance\",\n \"@type\": \"@id\",\n \"@isCollection\": true,\n },\n instanceContainer: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#instanceContainer\",\n \"@type\": \"@id\",\n \"@isCollection\": true,\n },\n};\n"],"mappings":";;;;;;AAOA,MAAa,mBAAqC;CAChD,MAAM,EACJ,OAAO,SACR;CACD,WAAW;EACT,OAAO;EACP,YAAY,EACV,MAAM,EACJ,OAAO,SACR,EACF;EACF;CACD,gBAAgB;EACd,OAAO;EACP,YAAY,EACV,MAAM,EACJ,OAAO,SACR,EACF;EACF;CACD,kBAAkB;EAChB,OAAO;EACP,YAAY;GACV,MAAM,EACJ,OAAO,SACR;GACD,UAAU;IACR,OAAO;IACP,SAAS;IACV;GACD,UAAU;IACR,OAAO;IACP,SAAS;IACT,iBAAiB;IAClB;GACD,mBAAmB;IACjB,OAAO;IACP,SAAS;IACT,iBAAiB;IAClB;GACF;EACF;CACD,UAAU;EACR,OAAO;EACP,SAAS;EACV;CACD,UAAU;EACR,OAAO;EACP,SAAS;EACT,iBAAiB;EAClB;CACD,mBAAmB;EACjB,OAAO;EACP,SAAS;EACT,iBAAiB;EAClB;CACF"}
@@ -114,4 +114,4 @@ const typeIndexSchema = {
114
114
  //#endregion
115
115
  export { typeIndexSchema };
116
116
 
117
- //# sourceMappingURL=typeIndex.schema.mjs.map
117
+ //# sourceMappingURL=typeIndex.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeIndex.schema.js","names":[],"sources":["../../src/_ldo/typeIndex.schema.ts"],"sourcesContent":["import type { Schema } from \"shexj\";\n\n/**\n * =============================================================================\n * typeIndexSchema: ShexJ Schema for typeIndex\n * =============================================================================\n */\nexport const typeIndexSchema: Schema = {\n type: \"Schema\",\n shapes: [\n {\n id: \"https://shaperepo.com/schemas/solidProfile#TypeIndexDocument\",\n type: \"ShapeDecl\",\n shapeExpr: {\n type: \"Shape\",\n expression: {\n type: \"EachOf\",\n expressions: [\n {\n type: \"TripleConstraint\",\n predicate: \"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\",\n valueExpr: {\n type: \"NodeConstraint\",\n values: [\"http://www.w3.org/ns/solid/terms#TypeIndex\"],\n },\n annotations: [\n {\n type: \"Annotation\",\n predicate: \"http://www.w3.org/2000/01/rdf-schema#comment\",\n object: {\n value: \"Defines the node as a TypeIndex\",\n },\n },\n ],\n },\n {\n type: \"TripleConstraint\",\n predicate: \"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\",\n valueExpr: {\n type: \"NodeConstraint\",\n values: [\"http://www.w3.org/ns/solid/terms#ListedDocument\"],\n },\n annotations: [\n {\n type: \"Annotation\",\n predicate: \"http://www.w3.org/2000/01/rdf-schema#comment\",\n object: {\n value: \"Defines the node as a Listed Document\",\n },\n },\n ],\n },\n ],\n },\n extra: [\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\"],\n },\n },\n {\n id: \"https://shaperepo.com/schemas/solidProfile#TypeRegistration\",\n type: \"ShapeDecl\",\n shapeExpr: {\n type: \"Shape\",\n expression: {\n type: \"EachOf\",\n expressions: [\n {\n type: \"TripleConstraint\",\n predicate: \"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\",\n valueExpr: {\n type: \"NodeConstraint\",\n values: [\"http://www.w3.org/ns/solid/terms#TypeRegistration\"],\n },\n annotations: [\n {\n type: \"Annotation\",\n predicate: \"http://www.w3.org/2000/01/rdf-schema#comment\",\n object: {\n value: \"Defines this node as a Type Registration\",\n },\n },\n ],\n },\n {\n type: \"TripleConstraint\",\n predicate: \"http://www.w3.org/ns/solid/terms#forClass\",\n valueExpr: {\n type: \"NodeConstraint\",\n nodeKind: \"iri\",\n },\n annotations: [\n {\n type: \"Annotation\",\n predicate: \"http://www.w3.org/2000/01/rdf-schema#comment\",\n object: {\n value: \"The class of object at this type.\",\n },\n },\n ],\n },\n {\n type: \"TripleConstraint\",\n predicate: \"http://www.w3.org/ns/solid/terms#instance\",\n valueExpr: {\n type: \"NodeConstraint\",\n nodeKind: \"iri\",\n },\n min: 0,\n max: -1,\n annotations: [\n {\n type: \"Annotation\",\n predicate: \"http://www.w3.org/2000/01/rdf-schema#comment\",\n object: {\n value: \"A specific resource that contains the class.\",\n },\n },\n ],\n },\n {\n type: \"TripleConstraint\",\n predicate: \"http://www.w3.org/ns/solid/terms#instanceContainer\",\n valueExpr: {\n type: \"NodeConstraint\",\n nodeKind: \"iri\",\n },\n min: 0,\n max: -1,\n annotations: [\n {\n type: \"Annotation\",\n predicate: \"http://www.w3.org/2000/01/rdf-schema#comment\",\n object: {\n value: \"Containers that contain resources with the class.\",\n },\n },\n ],\n },\n ],\n },\n extra: [\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\"],\n },\n },\n ],\n};\n"],"mappings":";;;;;;AAOA,MAAa,kBAA0B;CACrC,MAAM;CACN,QAAQ,CACN;EACE,IAAI;EACJ,MAAM;EACN,WAAW;GACT,MAAM;GACN,YAAY;IACV,MAAM;IACN,aAAa,CACX;KACE,MAAM;KACN,WAAW;KACX,WAAW;MACT,MAAM;MACN,QAAQ,CAAC,6CAA6C;MACvD;KACD,aAAa,CACX;MACE,MAAM;MACN,WAAW;MACX,QAAQ,EACN,OAAO,mCACR;MACF,CACF;KACF,EACD;KACE,MAAM;KACN,WAAW;KACX,WAAW;MACT,MAAM;MACN,QAAQ,CAAC,kDAAkD;MAC5D;KACD,aAAa,CACX;MACE,MAAM;MACN,WAAW;MACX,QAAQ,EACN,OAAO,yCACR;MACF,CACF;KACF,CACF;IACF;GACD,OAAO,CAAC,kDAAkD;GAC3D;EACF,EACD;EACE,IAAI;EACJ,MAAM;EACN,WAAW;GACT,MAAM;GACN,YAAY;IACV,MAAM;IACN,aAAa;KACX;MACE,MAAM;MACN,WAAW;MACX,WAAW;OACT,MAAM;OACN,QAAQ,CAAC,oDAAoD;OAC9D;MACD,aAAa,CACX;OACE,MAAM;OACN,WAAW;OACX,QAAQ,EACN,OAAO,4CACR;OACF,CACF;MACF;KACD;MACE,MAAM;MACN,WAAW;MACX,WAAW;OACT,MAAM;OACN,UAAU;OACX;MACD,aAAa,CACX;OACE,MAAM;OACN,WAAW;OACX,QAAQ,EACN,OAAO,qCACR;OACF,CACF;MACF;KACD;MACE,MAAM;MACN,WAAW;MACX,WAAW;OACT,MAAM;OACN,UAAU;OACX;MACD,KAAK;MACL,KAAK;MACL,aAAa,CACX;OACE,MAAM;OACN,WAAW;OACX,QAAQ,EACN,OAAO,gDACR;OACF,CACF;MACF;KACD;MACE,MAAM;MACN,WAAW;MACX,WAAW;OACT,MAAM;OACN,UAAU;OACX;MACD,KAAK;MACL,KAAK;MACL,aAAa,CACX;OACE,MAAM;OACN,WAAW;OACX,QAAQ,EACN,OAAO,qDACR;OACF,CACF;MACF;KACF;IACF;GACD,OAAO,CAAC,kDAAkD;GAC3D;EACF,CACF;CACF"}
@@ -1,5 +1,5 @@
1
- import { typeIndexSchema } from "./typeIndex.schema.mjs";
2
- import { typeIndexContext } from "./typeIndex.context.mjs";
1
+ import { typeIndexSchema } from "./typeIndex.schema.js";
2
+ import { typeIndexContext } from "./typeIndex.context.js";
3
3
  //#region src/_ldo/typeIndex.shapeTypes.ts
4
4
  /**
5
5
  * =============================================================================
@@ -25,4 +25,4 @@ const TypeRegistrationShapeType = {
25
25
  //#endregion
26
26
  export { TypeIndexDocumentShapeType, TypeRegistrationShapeType };
27
27
 
28
- //# sourceMappingURL=typeIndex.shapeTypes.mjs.map
28
+ //# sourceMappingURL=typeIndex.shapeTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeIndex.shapeTypes.js","names":[],"sources":["../../src/_ldo/typeIndex.shapeTypes.ts"],"sourcesContent":["import type { ShapeType } from \"@ldo/ldo\";\nimport { typeIndexSchema } from \"./typeIndex.schema\";\nimport { typeIndexContext } from \"./typeIndex.context\";\nimport type { TypeIndexDocument, TypeRegistration } from \"./typeIndex.typings\";\n\n/**\n * =============================================================================\n * LDO ShapeTypes typeIndex\n * =============================================================================\n */\n\n/**\n * TypeIndexDocument ShapeType\n */\nexport const TypeIndexDocumentShapeType: ShapeType<TypeIndexDocument> = {\n schema: typeIndexSchema,\n shape: \"https://shaperepo.com/schemas/solidProfile#TypeIndexDocument\",\n context: typeIndexContext,\n};\n\n/**\n * TypeRegistration ShapeType\n */\nexport const TypeRegistrationShapeType: ShapeType<TypeRegistration> = {\n schema: typeIndexSchema,\n shape: \"https://shaperepo.com/schemas/solidProfile#TypeRegistration\",\n context: typeIndexContext,\n};\n"],"mappings":";;;;;;;;;;;AAcA,MAAa,6BAA2D;CACtE,QAAQ;CACR,OAAO;CACP,SAAS;CACV;;;;AAKD,MAAa,4BAAyD;CACpE,QAAQ;CACR,OAAO;CACP,SAAS;CACV"}
@@ -34,4 +34,4 @@ interface TypeRegistration {
34
34
  }
35
35
  //#endregion
36
36
  export { TypeRegistration };
37
- //# sourceMappingURL=typeIndex.typings.d.cts.map
37
+ //# sourceMappingURL=typeIndex.typings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeIndex.typings.d.ts","names":[],"sources":["../../src/_ldo/typeIndex.typings.ts"],"mappings":";;;;;;UA8BiB,gBAAA;EACf,KAAA;EACA,UAAA,GAAa,gBAAA;;;;EAIb,IAAA;IACE,KAAA;EAAA;;;;EAKF,QAAA;IACE,KAAA;EAAA;;;;EAKF,QAAA,GAAW,KAAA;IACT,KAAA;EAAA;;;;EAKF,iBAAA,GAAoB,KAAA;IAClB,KAAA;EAAA;AAAA"}
@@ -5,4 +5,4 @@ const FOR_CLASS = "http://www.w3.org/ns/solid/terms#forClass";
5
5
  //#endregion
6
6
  export { FOR_CLASS, RDF_TYPE, TYPE_REGISTRATION };
7
7
 
8
- //# sourceMappingURL=constants.mjs.map
8
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../src/constants.ts"],"sourcesContent":["export const RDF_TYPE = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\";\nexport const TYPE_REGISTRATION =\n \"http://www.w3.org/ns/solid/terms#TypeRegistration\";\nexport const FOR_CLASS = \"http://www.w3.org/ns/solid/terms#forClass\";\nexport const INSTANCE = \"http://www.w3.org/ns/solid/terms#instance\";\nexport const INSTANCE_CONTAINER =\n \"http://www.w3.org/ns/solid/terms#instanceContainer\";\n"],"mappings":";AAAA,MAAa,WAAW;AACxB,MAAa,oBACX;AACF,MAAa,YAAY"}
@@ -1,8 +1,8 @@
1
- import { TypeRegistration } from "./_ldo/typeIndex.typings.cjs";
2
- import { TypeIndexProfile } from "./_ldo/profile.typings.cjs";
3
- import { Options } from "./util/Options.cjs";
4
- import { LdSet } from "@ldo/ldo";
1
+ import { TypeRegistration } from "./_ldo/typeIndex.typings.js";
2
+ import { TypeIndexProfile } from "./_ldo/profile.typings.js";
3
+ import { Options } from "./util/Options.js";
5
4
  import { SolidLeafUri } from "@ldo/connected-solid";
5
+ import { LdSet } from "@ldo/ldo";
6
6
 
7
7
  //#region src/getTypeIndex.d.ts
8
8
  declare function getTypeRegistrations(webId: string, options?: Options): Promise<LdSet<TypeRegistration>>;
@@ -11,4 +11,4 @@ declare function getTypeIndexesUrisFromProfile(profile: TypeIndexProfile): Solid
11
11
  declare function getInstanceUris(classUri: string, typeRegistrations: TypeRegistration[], options?: Options): Promise<SolidLeafUri[]>;
12
12
  //#endregion
13
13
  export { getInstanceUris, getProfile, getTypeIndexesUrisFromProfile, getTypeRegistrations };
14
- //# sourceMappingURL=getTypeIndex.d.cts.map
14
+ //# sourceMappingURL=getTypeIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTypeIndex.d.ts","names":[],"sources":["../src/getTypeIndex.ts"],"mappings":";;;;;;;iBAUsB,oBAAA,CACpB,KAAA,UACA,OAAA,GAAU,OAAA,GACT,OAAA,CAAQ,KAAA,CAAM,gBAAA;AAAA,iBAwBK,UAAA,CACpB,KAAA,UACA,OAAA,GAAU,OAAA,GACT,OAAA,CAAQ,gBAAA;AAAA,iBAQK,6BAAA,CACd,OAAA,EAAS,gBAAA,GACR,YAAA;AAAA,iBAWmB,eAAA,CACpB,QAAA,UACA,iBAAA,EAAmB,gBAAA,IACnB,OAAA,GAAU,OAAA,GACT,OAAA,CAAQ,YAAA"}
@@ -1,7 +1,7 @@
1
- import { TypeIndexProfileShapeType } from "./_ldo/profile.shapeTypes.mjs";
2
- import { TypeRegistrationShapeType } from "./_ldo/typeIndex.shapeTypes.mjs";
3
- import { RDF_TYPE, TYPE_REGISTRATION } from "./constants.mjs";
4
- import { guaranteeOptions } from "./util/Options.mjs";
1
+ import { TypeIndexProfileShapeType } from "./_ldo/profile.shapeTypes.js";
2
+ import { TypeRegistrationShapeType } from "./_ldo/typeIndex.shapeTypes.js";
3
+ import { RDF_TYPE, TYPE_REGISTRATION } from "./constants.js";
4
+ import { guaranteeOptions } from "./util/Options.js";
5
5
  //#region src/getTypeIndex.ts
6
6
  async function getTypeRegistrations(webId, options) {
7
7
  const { dataset } = guaranteeOptions(options);
@@ -48,4 +48,4 @@ async function getInstanceUris(classUri, typeRegistrations, options) {
48
48
  //#endregion
49
49
  export { getInstanceUris, getProfile, getTypeIndexesUrisFromProfile, getTypeRegistrations };
50
50
 
51
- //# sourceMappingURL=getTypeIndex.mjs.map
51
+ //# sourceMappingURL=getTypeIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTypeIndex.js","names":[],"sources":["../src/getTypeIndex.ts"],"sourcesContent":["import type { TypeRegistration } from \"./_ldo/typeIndex.typings\";\nimport type { TypeIndexProfile } from \"./_ldo/profile.typings\";\nimport { TypeIndexProfileShapeType } from \"./_ldo/profile.shapeTypes\";\nimport { TypeRegistrationShapeType } from \"./_ldo/typeIndex.shapeTypes\";\nimport { RDF_TYPE, TYPE_REGISTRATION } from \"./constants\";\nimport type { Options } from \"./util/Options\";\nimport { guaranteeOptions } from \"./util/Options\";\nimport type { LdSet } from \"@ldo/ldo\";\nimport type { SolidContainerUri, SolidLeafUri } from \"@ldo/connected-solid\";\n\nexport async function getTypeRegistrations(\n webId: string,\n options?: Options,\n): Promise<LdSet<TypeRegistration>> {\n const { dataset } = guaranteeOptions(options);\n\n // Get Profile\n const profile = await getProfile(webId, options);\n\n // Get Type Indexes\n const typeIndexUris = getTypeIndexesUrisFromProfile(profile);\n\n // Fetch the type Indexes\n await Promise.all(\n typeIndexUris.map(async (typeIndexUri) => {\n const typeIndexResource = dataset.getResource(typeIndexUri);\n const readResult = await typeIndexResource.readIfUnfetched();\n if (readResult.isError) throw readResult;\n }),\n );\n\n // Get Type Registrations\n return dataset\n .usingType(TypeRegistrationShapeType)\n .matchSubject(RDF_TYPE, TYPE_REGISTRATION);\n}\n\nexport async function getProfile(\n webId: string,\n options?: Options,\n): Promise<TypeIndexProfile> {\n const { dataset } = guaranteeOptions(options);\n const profileResource = dataset.getResource(webId);\n const readResult = await profileResource.readIfUnfetched();\n if (readResult.isError) throw readResult;\n return dataset.usingType(TypeIndexProfileShapeType).fromSubject(webId);\n}\n\nexport function getTypeIndexesUrisFromProfile(\n profile: TypeIndexProfile,\n): SolidLeafUri[] {\n const uris: SolidLeafUri[] = [];\n profile.privateTypeIndex?.forEach((indexNode) => {\n uris.push(indexNode[\"@id\"] as SolidLeafUri);\n });\n profile.publicTypeIndex?.forEach((indexNode) => {\n uris.push(indexNode[\"@id\"] as SolidLeafUri);\n });\n return uris;\n}\n\nexport async function getInstanceUris(\n classUri: string,\n typeRegistrations: TypeRegistration[],\n options?: Options,\n): Promise<SolidLeafUri[]> {\n const { dataset } = guaranteeOptions(options);\n\n const leafUris = new Set<SolidLeafUri>();\n await Promise.all(\n typeRegistrations.map(async (registration) => {\n if (registration.forClass[\"@id\"] === classUri) {\n // Individual registrations\n registration.instance?.forEach((instance) =>\n leafUris.add(instance[\"@id\"] as SolidLeafUri),\n );\n // Container registrations\n await Promise.all(\n registration.instanceContainer?.map(async (instanceContainer) => {\n const containerResource = dataset.getResource(\n instanceContainer[\"@id\"] as SolidContainerUri,\n );\n await containerResource.readIfUnfetched();\n containerResource.children().forEach((child) => {\n if (child.type === \"SolidLeaf\") leafUris.add(child.uri);\n });\n }) ?? [],\n );\n }\n }),\n );\n return Array.from(leafUris);\n}\n"],"mappings":";;;;;AAUA,eAAsB,qBACpB,OACA,SACkC;CAClC,MAAM,EAAE,YAAY,iBAAiB,QAAQ;CAM7C,MAAM,gBAAgB,8BAA8B,MAH9B,WAAW,OAAO,QAAQ,CAGY;AAG5D,OAAM,QAAQ,IACZ,cAAc,IAAI,OAAO,iBAAiB;EAExC,MAAM,aAAa,MADO,QAAQ,YAAY,aACJ,CAAC,iBAAiB;AAC5D,MAAI,WAAW,QAAS,OAAM;GAC9B,CACH;AAGD,QAAO,QACJ,UAAU,0BAA0B,CACpC,aAAa,UAAU,kBAAkB;;AAG9C,eAAsB,WACpB,OACA,SAC2B;CAC3B,MAAM,EAAE,YAAY,iBAAiB,QAAQ;CAE7C,MAAM,aAAa,MADK,QAAQ,YAAY,MACJ,CAAC,iBAAiB;AAC1D,KAAI,WAAW,QAAS,OAAM;AAC9B,QAAO,QAAQ,UAAU,0BAA0B,CAAC,YAAY,MAAM;;AAGxE,SAAgB,8BACd,SACgB;CAChB,MAAM,OAAuB,EAAE;AAC/B,SAAQ,kBAAkB,SAAS,cAAc;AAC/C,OAAK,KAAK,UAAU,OAAuB;GAC3C;AACF,SAAQ,iBAAiB,SAAS,cAAc;AAC9C,OAAK,KAAK,UAAU,OAAuB;GAC3C;AACF,QAAO;;AAGT,eAAsB,gBACpB,UACA,mBACA,SACyB;CACzB,MAAM,EAAE,YAAY,iBAAiB,QAAQ;CAE7C,MAAM,2BAAW,IAAI,KAAmB;AACxC,OAAM,QAAQ,IACZ,kBAAkB,IAAI,OAAO,iBAAiB;AAC5C,MAAI,aAAa,SAAS,WAAW,UAAU;AAE7C,gBAAa,UAAU,SAAS,aAC9B,SAAS,IAAI,SAAS,OAAuB,CAC9C;AAED,SAAM,QAAQ,IACZ,aAAa,mBAAmB,IAAI,OAAO,sBAAsB;IAC/D,MAAM,oBAAoB,QAAQ,YAChC,kBAAkB,OACnB;AACD,UAAM,kBAAkB,iBAAiB;AACzC,sBAAkB,UAAU,CAAC,SAAS,UAAU;AAC9C,SAAI,MAAM,SAAS,YAAa,UAAS,IAAI,MAAM,IAAI;MACvD;KACF,IAAI,EAAE,CACT;;GAEH,CACH;AACD,QAAO,MAAM,KAAK,SAAS"}
@@ -1,5 +1,5 @@
1
- import { getInstanceUris, getProfile, getTypeIndexesUrisFromProfile, getTypeRegistrations } from "./getTypeIndex.cjs";
2
- import { addRegistration, createIndex, findAppropriateTypeRegistration, initTypeIndex, removeRegistration } from "./setTypeIndex.cjs";
3
- import { useInstanceUris } from "./react/useInstanceUris.cjs";
4
- import { useTypeIndexProfile } from "./react/useTypeIndexProfile.cjs";
1
+ import { getInstanceUris, getProfile, getTypeIndexesUrisFromProfile, getTypeRegistrations } from "./getTypeIndex.js";
2
+ import { addRegistration, createIndex, findAppropriateTypeRegistration, initTypeIndex, removeRegistration } from "./setTypeIndex.js";
3
+ import { useInstanceUris } from "./react/useInstanceUris.js";
4
+ import { useTypeIndexProfile } from "./react/useTypeIndexProfile.js";
5
5
  export { addRegistration, createIndex, findAppropriateTypeRegistration, getInstanceUris, getProfile, getTypeIndexesUrisFromProfile, getTypeRegistrations, initTypeIndex, removeRegistration, useInstanceUris, useTypeIndexProfile };
@@ -1,5 +1,5 @@
1
- import { getInstanceUris, getProfile, getTypeIndexesUrisFromProfile, getTypeRegistrations } from "./getTypeIndex.mjs";
2
- import { addRegistration, createIndex, findAppropriateTypeRegistration, initTypeIndex, removeRegistration } from "./setTypeIndex.mjs";
3
- import { useTypeIndexProfile } from "./react/useTypeIndexProfile.mjs";
4
- import { useInstanceUris } from "./react/useInstanceUris.mjs";
1
+ import { getInstanceUris, getProfile, getTypeIndexesUrisFromProfile, getTypeRegistrations } from "./getTypeIndex.js";
2
+ import { addRegistration, createIndex, findAppropriateTypeRegistration, initTypeIndex, removeRegistration } from "./setTypeIndex.js";
3
+ import { useTypeIndexProfile } from "./react/useTypeIndexProfile.js";
4
+ import { useInstanceUris } from "./react/useInstanceUris.js";
5
5
  export { addRegistration, createIndex, findAppropriateTypeRegistration, getInstanceUris, getProfile, getTypeIndexesUrisFromProfile, getTypeRegistrations, initTypeIndex, removeRegistration, useInstanceUris, useTypeIndexProfile };
@@ -10,4 +10,4 @@ import { SolidLeafUri } from "@ldo/connected-solid";
10
10
  declare function useInstanceUris(classUri: string): SolidLeafUri[];
11
11
  //#endregion
12
12
  export { useInstanceUris };
13
- //# sourceMappingURL=useInstanceUris.d.mts.map
13
+ //# sourceMappingURL=useInstanceUris.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInstanceUris.d.ts","names":[],"sources":["../../src/react/useInstanceUris.ts"],"mappings":";;;;;AAkBA;;;;iBAAgB,eAAA,CAAgB,QAAA,WAAmB,YAAA"}
@@ -1,8 +1,8 @@
1
- import { TypeRegistrationShapeType } from "../_ldo/typeIndex.shapeTypes.mjs";
2
- import { RDF_TYPE, TYPE_REGISTRATION } from "../constants.mjs";
3
- import { getInstanceUris, getTypeIndexesUrisFromProfile } from "../getTypeIndex.mjs";
4
- import { useTypeIndexProfile } from "./useTypeIndexProfile.mjs";
5
- import { useSubscribeToUris } from "./util/useSubscribeToUris.mjs";
1
+ import { TypeRegistrationShapeType } from "../_ldo/typeIndex.shapeTypes.js";
2
+ import { RDF_TYPE, TYPE_REGISTRATION } from "../constants.js";
3
+ import { getInstanceUris, getTypeIndexesUrisFromProfile } from "../getTypeIndex.js";
4
+ import { useTypeIndexProfile } from "./useTypeIndexProfile.js";
5
+ import { useSubscribeToUris } from "./util/useSubscribeToUris.js";
6
6
  import { useLdo, useMatchSubject } from "@ldo/solid-react";
7
7
  import { useEffect, useMemo, useState } from "react";
8
8
  //#region src/react/useInstanceUris.ts
@@ -26,4 +26,4 @@ function useInstanceUris(classUri) {
26
26
  //#endregion
27
27
  export { useInstanceUris };
28
28
 
29
- //# sourceMappingURL=useInstanceUris.mjs.map
29
+ //# sourceMappingURL=useInstanceUris.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInstanceUris.js","names":[],"sources":["../../src/react/useInstanceUris.ts"],"sourcesContent":["import { useTypeIndexProfile } from \"./useTypeIndexProfile\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { useSubscribeToUris } from \"./util/useSubscribeToUris\";\nimport { useLdo, useMatchSubject } from \"@ldo/solid-react\";\nimport { TypeRegistrationShapeType } from \"../_ldo/typeIndex.shapeTypes\";\nimport { RDF_TYPE, TYPE_REGISTRATION } from \"../constants\";\nimport {\n getInstanceUris,\n getTypeIndexesUrisFromProfile,\n} from \"../getTypeIndex\";\nimport type { SolidLeafUri } from \"@ldo/connected-solid\";\n\n/**\n * Provides the LeafUris of everything in a type node for a specific class uri\n *\n * @param classUri - the class uri\n * @returns - URIs of all resources registered with this node\n */\nexport function useInstanceUris(classUri: string): SolidLeafUri[] {\n const { dataset } = useLdo();\n const profile = useTypeIndexProfile();\n\n const typeIndexUris: string[] = useMemo(\n () => (profile ? getTypeIndexesUrisFromProfile(profile) : []),\n [profile],\n );\n\n useSubscribeToUris(typeIndexUris);\n\n const [leafUris, setLeafUris] = useState<SolidLeafUri[]>([]);\n\n const typeRegistrations = useMatchSubject(\n TypeRegistrationShapeType,\n RDF_TYPE,\n TYPE_REGISTRATION,\n );\n\n useEffect(() => {\n getInstanceUris(classUri, typeRegistrations.toArray(), {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore TODO: come back and see if we can fix this\n solidLdoDataset: dataset,\n }).then(setLeafUris);\n }, [typeRegistrations]);\n\n return leafUris;\n}\n"],"mappings":";;;;;;;;;;;;;;AAkBA,SAAgB,gBAAgB,UAAkC;CAChE,MAAM,EAAE,YAAY,QAAQ;CAC5B,MAAM,UAAU,qBAAqB;AAOrC,oBALgC,cACvB,UAAU,8BAA8B,QAAQ,GAAG,EAAE,EAC5D,CAAC,QAAQ,CAGqB,CAAC;CAEjC,MAAM,CAAC,UAAU,eAAe,SAAyB,EAAE,CAAC;CAE5D,MAAM,oBAAoB,gBACxB,2BACA,UACA,kBACD;AAED,iBAAgB;AACd,kBAAgB,UAAU,kBAAkB,SAAS,EAAE,EAGrD,iBAAiB,SAClB,CAAC,CAAC,KAAK,YAAY;IACnB,CAAC,kBAAkB,CAAC;AAEvB,QAAO"}
@@ -1,7 +1,7 @@
1
- import { TypeIndexProfile } from "../_ldo/profile.typings.cjs";
1
+ import { TypeIndexProfile } from "../_ldo/profile.typings.js";
2
2
 
3
3
  //#region src/react/useTypeIndexProfile.d.ts
4
4
  declare function useTypeIndexProfile(): TypeIndexProfile | undefined;
5
5
  //#endregion
6
6
  export { useTypeIndexProfile };
7
- //# sourceMappingURL=useTypeIndexProfile.d.cts.map
7
+ //# sourceMappingURL=useTypeIndexProfile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTypeIndexProfile.d.ts","names":[],"sources":["../../src/react/useTypeIndexProfile.ts"],"mappings":";;;iBAIgB,mBAAA,CAAA,GAAuB,gBAAA"}
@@ -1,4 +1,4 @@
1
- import { TypeIndexProfileShapeType } from "../_ldo/profile.shapeTypes.mjs";
1
+ import { TypeIndexProfileShapeType } from "../_ldo/profile.shapeTypes.js";
2
2
  import { useResource, useSolidAuth, useSubject } from "@ldo/solid-react";
3
3
  //#region src/react/useTypeIndexProfile.ts
4
4
  function useTypeIndexProfile() {
@@ -9,4 +9,4 @@ function useTypeIndexProfile() {
9
9
  //#endregion
10
10
  export { useTypeIndexProfile };
11
11
 
12
- //# sourceMappingURL=useTypeIndexProfile.mjs.map
12
+ //# sourceMappingURL=useTypeIndexProfile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTypeIndexProfile.js","names":[],"sources":["../../src/react/useTypeIndexProfile.ts"],"sourcesContent":["import { useResource, useSolidAuth, useSubject } from \"@ldo/solid-react\";\nimport type { TypeIndexProfile } from \"../_ldo/profile.typings\";\nimport { TypeIndexProfileShapeType } from \"../_ldo/profile.shapeTypes\";\n\nexport function useTypeIndexProfile(): TypeIndexProfile | undefined {\n const { session } = useSolidAuth();\n useResource(session.webId, { subscribe: true });\n const profile = useSubject(TypeIndexProfileShapeType, session.webId);\n return profile;\n}\n"],"mappings":";;;AAIA,SAAgB,sBAAoD;CAClE,MAAM,EAAE,YAAY,cAAc;AAClC,aAAY,QAAQ,OAAO,EAAE,WAAW,MAAM,CAAC;AAE/C,QADgB,WAAW,2BAA2B,QAAQ,MAChD"}
@@ -23,4 +23,4 @@ function useSubscribeToUris(uris) {
23
23
  //#endregion
24
24
  export { useSubscribeToUris };
25
25
 
26
- //# sourceMappingURL=useSubscribeToUris.mjs.map
26
+ //# sourceMappingURL=useSubscribeToUris.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSubscribeToUris.js","names":[],"sources":["../../../src/react/util/useSubscribeToUris.ts"],"sourcesContent":["import { useLdo } from \"@ldo/solid-react\";\nimport { useEffect, useRef } from \"react\";\n\nexport function useSubscribeToUris(uris: string[]) {\n const { dataset } = useLdo();\n const currentlySubscribed = useRef<Record<string, string>>({});\n useEffect(() => {\n const resources = uris.map((uri) => dataset.getResource(uri));\n const previousSubscriptions = { ...currentlySubscribed.current };\n Promise.all<void>(\n resources.map(async (resource) => {\n if (!previousSubscriptions[resource.uri]) {\n // Read and subscribe\n await resource.readIfUnfetched();\n currentlySubscribed.current[resource.uri] =\n await resource.subscribeToNotifications();\n } else {\n delete previousSubscriptions[resource.uri];\n }\n }),\n ).then(async () => {\n // Unsubscribe from all remaining previous subscriptions\n await Promise.all(\n Object.entries(previousSubscriptions).map(\n async ([resourceUri, subscriptionId]) => {\n // Unsubscribe\n delete currentlySubscribed.current[resourceUri];\n const resource = dataset.getResource(resourceUri);\n await resource.unsubscribeFromNotifications(subscriptionId);\n },\n ),\n );\n });\n }, [uris]);\n}\n"],"mappings":";;;AAGA,SAAgB,mBAAmB,MAAgB;CACjD,MAAM,EAAE,YAAY,QAAQ;CAC5B,MAAM,sBAAsB,OAA+B,EAAE,CAAC;AAC9D,iBAAgB;EACd,MAAM,YAAY,KAAK,KAAK,QAAQ,QAAQ,YAAY,IAAI,CAAC;EAC7D,MAAM,wBAAwB,EAAE,GAAG,oBAAoB,SAAS;AAChE,UAAQ,IACN,UAAU,IAAI,OAAO,aAAa;AAChC,OAAI,CAAC,sBAAsB,SAAS,MAAM;AAExC,UAAM,SAAS,iBAAiB;AAChC,wBAAoB,QAAQ,SAAS,OACnC,MAAM,SAAS,0BAA0B;SAE3C,QAAO,sBAAsB,SAAS;IAExC,CACH,CAAC,KAAK,YAAY;AAEjB,SAAM,QAAQ,IACZ,OAAO,QAAQ,sBAAsB,CAAC,IACpC,OAAO,CAAC,aAAa,oBAAoB;AAEvC,WAAO,oBAAoB,QAAQ;AAEnC,UADiB,QAAQ,YAAY,YACvB,CAAC,6BAA6B,eAAe;KAE9D,CACF;IACD;IACD,CAAC,KAAK,CAAC"}
@@ -1,5 +1,5 @@
1
- import { TypeRegistration } from "./_ldo/typeIndex.typings.mjs";
2
- import { Options } from "./util/Options.mjs";
1
+ import { TypeRegistration } from "./_ldo/typeIndex.typings.js";
2
+ import { Options } from "./util/Options.js";
3
3
  import { SolidConnectedPlugin, SolidContainer } from "@ldo/connected-solid";
4
4
  import { ConnectedLdoDataset, ConnectedPlugin } from "@ldo/connected";
5
5
 
@@ -53,4 +53,4 @@ declare function removeRegistration(indexUri: string, classUri: string, instance
53
53
  declare function findAppropriateTypeRegistration(indexUri: string, classUri: string, options?: Options): TypeRegistration;
54
54
  //#endregion
55
55
  export { addRegistration, createIndex, findAppropriateTypeRegistration, initTypeIndex, removeRegistration };
56
- //# sourceMappingURL=setTypeIndex.d.mts.map
56
+ //# sourceMappingURL=setTypeIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setTypeIndex.d.ts","names":[],"sources":["../src/setTypeIndex.ts"],"mappings":";;;;;;;;AA2BA;;;iBAAsB,aAAA,CACpB,KAAA,UACA,OAAA,GAAU,OAAA,GACT,OAAA;;;;;;;iBAyBmB,WAAA,CACpB,KAAA,OACA,aAAA,EAAe,cAAA,EACf,OAAA,EAAS,mBAAA,EACN,oBAAA,GAAuB,eAAA,0BAE1B,SAAA,YAAkB,OAAA;;;;;;UAmDV,SAAA;EACR,QAAA;EACA,iBAAA;AAAA;;;;;;;;iBAUc,eAAA,CACd,QAAA,UACA,QAAA,UACA,SAAA,EAAW,SAAA,EACX,OAAA,GAAU,OAAA;;;;AAvBX;;;;iBAgDqB,kBAAA,CACpB,QAAA,UACA,QAAA,UACA,SAAA,EAAW,SAAA,EACX,OAAA,GAAU,OAAA,GAAO,OAAA;AAjCnB;;;;;;;;AAAA,iBA2DgB,+BAAA,CACd,QAAA,UACA,QAAA,UACA,OAAA,GAAU,OAAA,GACT,gBAAA"}
@@ -1,8 +1,8 @@
1
- import { TypeIndexProfileShapeType } from "./_ldo/profile.shapeTypes.mjs";
2
- import { TypeIndexDocumentShapeType, TypeRegistrationShapeType } from "./_ldo/typeIndex.shapeTypes.mjs";
3
- import { FOR_CLASS, RDF_TYPE, TYPE_REGISTRATION } from "./constants.mjs";
4
- import { guaranteeOptions } from "./util/Options.mjs";
5
- import { getProfile } from "./getTypeIndex.mjs";
1
+ import { TypeIndexProfileShapeType } from "./_ldo/profile.shapeTypes.js";
2
+ import { TypeIndexDocumentShapeType, TypeRegistrationShapeType } from "./_ldo/typeIndex.shapeTypes.js";
3
+ import { FOR_CLASS, RDF_TYPE, TYPE_REGISTRATION } from "./constants.js";
4
+ import { guaranteeOptions } from "./util/Options.js";
5
+ import { getProfile } from "./getTypeIndex.js";
6
6
  import { v4 } from "uuid";
7
7
  import { namedNode, quad } from "@ldo/rdf-utils";
8
8
  import { set } from "@ldo/ldo";
@@ -120,4 +120,4 @@ function findAppropriateTypeRegistration(indexUri, classUri, options) {
120
120
  //#endregion
121
121
  export { addRegistration, createIndex, findAppropriateTypeRegistration, initTypeIndex, removeRegistration };
122
122
 
123
- //# sourceMappingURL=setTypeIndex.mjs.map
123
+ //# sourceMappingURL=setTypeIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setTypeIndex.js","names":[],"sources":["../src/setTypeIndex.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { v4 } from \"uuid\";\nimport { FOR_CLASS, RDF_TYPE, TYPE_REGISTRATION } from \"./constants\";\nimport { guaranteeOptions, type Options } from \"./util/Options\";\nimport { namedNode, quad } from \"@ldo/rdf-utils\";\nimport type { TypeRegistration } from \"./_ldo/typeIndex.typings\";\nimport { getProfile } from \"./getTypeIndex\";\nimport { TypeIndexProfileShapeType } from \"./_ldo/profile.shapeTypes\";\nimport type { NamedNode } from \"@rdfjs/types\";\nimport { set } from \"@ldo/ldo\";\nimport type {\n SolidConnectedPlugin,\n SolidContainer,\n SolidContainerUri,\n SolidLeafUri,\n} from \"@ldo/connected-solid\";\nimport type { ConnectedLdoDataset, ConnectedPlugin } from \"@ldo/connected\";\nimport {\n TypeIndexDocumentShapeType,\n TypeRegistrationShapeType,\n} from \"./_ldo/typeIndex.shapeTypes\";\n\n/**\n * =============================================================================\n * INITIALIZERS\n * =============================================================================\n */\nexport async function initTypeIndex(\n webId: string,\n options?: Options,\n): Promise<void> {\n const { dataset } = guaranteeOptions(options);\n const profile = await getProfile(webId, options);\n if (!profile.privateTypeIndex?.size || !profile.publicTypeIndex?.size) {\n const profileFolder = await dataset\n .getResource(webId as SolidLeafUri | SolidContainerUri)\n .getParentContainer();\n if (profileFolder?.isError) throw profileFolder;\n if (!profileFolder)\n throw new Error(\"No folder to save the type indexes to.\");\n if (!profile.privateTypeIndex?.size) {\n await createIndex(webId, profileFolder, dataset, true);\n }\n if (!profile.publicTypeIndex?.size) {\n await createIndex(webId, profileFolder, dataset, false);\n }\n }\n}\n\n/**\n * @internal\n * @param webId\n * @param profileFolder\n * @param dataset\n */\nexport async function createIndex(\n webId,\n profileFolder: SolidContainer,\n dataset: ConnectedLdoDataset<\n (SolidConnectedPlugin | ConnectedPlugin<any, any, any, any>)[]\n >,\n isPrivate: boolean,\n) {\n // Create a private type index\n const createResult = await profileFolder.createChildAndOverwrite(\n `${isPrivate ? \"private\" : \"public\"}_index_${v4()}`,\n );\n if (createResult.isError) throw createResult;\n const indexResource = createResult.resource;\n const wacResult = await indexResource.setWac({\n agent: {\n [webId]: { read: true, write: true, append: true, control: true },\n },\n public: {\n read: isPrivate ? false : true,\n write: true,\n append: true,\n control: true,\n },\n authenticated: {\n read: isPrivate ? false : true,\n write: true,\n append: true,\n control: true,\n },\n });\n if (wacResult.isError) throw wacResult;\n const transaction = dataset.startTransaction();\n const cProfile = transaction\n .usingType(TypeIndexProfileShapeType)\n .write(dataset.getResource(webId).uri)\n .fromSubject(webId);\n if (isPrivate) {\n cProfile.privateTypeIndex?.add({ \"@id\": indexResource.uri });\n } else {\n cProfile.publicTypeIndex?.add({ \"@id\": indexResource.uri });\n }\n const cTypeIndex = transaction\n .usingType(TypeIndexDocumentShapeType)\n .write(indexResource.uri)\n .fromSubject(indexResource.uri);\n\n cTypeIndex.type = set({ \"@id\": \"ListedDocument\" }, { \"@id\": \"TypeIndex\" });\n const commitResult = await transaction.commitToRemote();\n if (commitResult.isError) throw commitResult;\n}\n\n/**\n * =============================================================================\n * DATASET MODIFIERS\n * =============================================================================\n */\ninterface Instances {\n instance?: string[];\n instanceContainer?: string[];\n}\n\n/**\n * Adds an instance to a TypeRegistration\n * @param indexUri The URI of the TypeIndex\n * @param classUri The URI for the class the instance should be added to\n * @param instances Objects representing the instances to add\n * @param options Options\n */\nexport function addRegistration(\n indexUri: string,\n classUri: string,\n instances: Instances,\n options?: Options,\n): void {\n // Check to see if its already in the index\n const typeRegistration = findAppropriateTypeRegistration(\n indexUri,\n classUri,\n options,\n );\n\n // Add instances to type registration\n instances.instance?.forEach((instance) => {\n typeRegistration.instance?.add({ \"@id\": instance });\n });\n instances.instanceContainer?.forEach((instanceContainer) => {\n typeRegistration.instanceContainer?.add({ \"@id\": instanceContainer });\n });\n}\n\n/**\n * Removes instances from a TypeRegistration\n * @param indexUri The URI of the TypeIndex\n * @param classUri The URI for the class the instance should be removed from\n * @param instances Objects representing the instances to remove\n * @param options Options\n */\nexport async function removeRegistration(\n indexUri: string,\n classUri: string,\n instances: Instances,\n options?: Options,\n) {\n // Check to see if its already in the index\n const typeRegistration = findAppropriateTypeRegistration(\n indexUri,\n classUri,\n options,\n );\n\n // Add instances to type registration\n instances.instance?.forEach((instanceUri) => {\n typeRegistration.instance?.delete({ \"@id\": instanceUri });\n });\n instances.instanceContainer?.forEach((instanceContainerUri) => {\n typeRegistration.instanceContainer?.delete({ \"@id\": instanceContainerUri });\n });\n}\n\n/**\n * Finds a TypeRegistration inside of a type index. If it doesn't exist, it\n * creates one.\n * @param indexUri The URI of the typeIndex\n * @param classUri The URI of the class in question for the TypeRegistration\n * @param options\n * @returns The Type Index\n */\nexport function findAppropriateTypeRegistration(\n indexUri: string,\n classUri: string,\n options?: Options,\n): TypeRegistration {\n const { dataset } = guaranteeOptions(options);\n // Check to see if its already in the index\n const existingRegistrationsUris: NamedNode[] = dataset\n .match(\n null,\n namedNode(RDF_TYPE),\n namedNode(TYPE_REGISTRATION),\n namedNode(indexUri),\n )\n .toArray()\n .map((quad) => quad.subject) as NamedNode[];\n\n const existingRegistrationForClassUri = existingRegistrationsUris.find(\n (registrationUri) => {\n return dataset.has(\n quad(\n registrationUri,\n namedNode(FOR_CLASS),\n namedNode(classUri),\n namedNode(indexUri),\n ),\n );\n },\n )?.value;\n\n let typeRegistration: TypeRegistration;\n if (existingRegistrationForClassUri) {\n typeRegistration = dataset\n .usingType(TypeRegistrationShapeType)\n .write(indexUri)\n .fromSubject(existingRegistrationForClassUri);\n } else {\n typeRegistration = dataset\n .usingType(TypeRegistrationShapeType)\n .write(indexUri)\n .fromSubject(`${indexUri}#${v4()}`);\n typeRegistration.type = { \"@id\": \"TypeRegistration\" };\n typeRegistration.forClass = { \"@id\": classUri };\n }\n return typeRegistration;\n}\n"],"mappings":";;;;;;;;;;;;;;AA2BA,eAAsB,cACpB,OACA,SACe;CACf,MAAM,EAAE,YAAY,iBAAiB,QAAQ;CAC7C,MAAM,UAAU,MAAM,WAAW,OAAO,QAAQ;AAChD,KAAI,CAAC,QAAQ,kBAAkB,QAAQ,CAAC,QAAQ,iBAAiB,MAAM;EACrE,MAAM,gBAAgB,MAAM,QACzB,YAAY,MAA0C,CACtD,oBAAoB;AACvB,MAAI,eAAe,QAAS,OAAM;AAClC,MAAI,CAAC,cACH,OAAM,IAAI,MAAM,yCAAyC;AAC3D,MAAI,CAAC,QAAQ,kBAAkB,KAC7B,OAAM,YAAY,OAAO,eAAe,SAAS,KAAK;AAExD,MAAI,CAAC,QAAQ,iBAAiB,KAC5B,OAAM,YAAY,OAAO,eAAe,SAAS,MAAM;;;;;;;;;AAW7D,eAAsB,YACpB,OACA,eACA,SAGA,WACA;CAEA,MAAM,eAAe,MAAM,cAAc,wBACvC,GAAG,YAAY,YAAY,SAAS,SAAS,IAAI,GAClD;AACD,KAAI,aAAa,QAAS,OAAM;CAChC,MAAM,gBAAgB,aAAa;CACnC,MAAM,YAAY,MAAM,cAAc,OAAO;EAC3C,OAAO,GACJ,QAAQ;GAAE,MAAM;GAAM,OAAO;GAAM,QAAQ;GAAM,SAAS;GAAM,EAClE;EACD,QAAQ;GACN,MAAM,YAAY,QAAQ;GAC1B,OAAO;GACP,QAAQ;GACR,SAAS;GACV;EACD,eAAe;GACb,MAAM,YAAY,QAAQ;GAC1B,OAAO;GACP,QAAQ;GACR,SAAS;GACV;EACF,CAAC;AACF,KAAI,UAAU,QAAS,OAAM;CAC7B,MAAM,cAAc,QAAQ,kBAAkB;CAC9C,MAAM,WAAW,YACd,UAAU,0BAA0B,CACpC,MAAM,QAAQ,YAAY,MAAM,CAAC,IAAI,CACrC,YAAY,MAAM;AACrB,KAAI,UACF,UAAS,kBAAkB,IAAI,EAAE,OAAO,cAAc,KAAK,CAAC;KAE5D,UAAS,iBAAiB,IAAI,EAAE,OAAO,cAAc,KAAK,CAAC;CAE7D,MAAM,aAAa,YAChB,UAAU,2BAA2B,CACrC,MAAM,cAAc,IAAI,CACxB,YAAY,cAAc,IAAI;AAEjC,YAAW,OAAO,IAAI,EAAE,OAAO,kBAAkB,EAAE,EAAE,OAAO,aAAa,CAAC;CAC1E,MAAM,eAAe,MAAM,YAAY,gBAAgB;AACvD,KAAI,aAAa,QAAS,OAAM;;;;;;;;;AAoBlC,SAAgB,gBACd,UACA,UACA,WACA,SACM;CAEN,MAAM,mBAAmB,gCACvB,UACA,UACA,QACD;AAGD,WAAU,UAAU,SAAS,aAAa;AACxC,mBAAiB,UAAU,IAAI,EAAE,OAAO,UAAU,CAAC;GACnD;AACF,WAAU,mBAAmB,SAAS,sBAAsB;AAC1D,mBAAiB,mBAAmB,IAAI,EAAE,OAAO,mBAAmB,CAAC;GACrE;;;;;;;;;AAUJ,eAAsB,mBACpB,UACA,UACA,WACA,SACA;CAEA,MAAM,mBAAmB,gCACvB,UACA,UACA,QACD;AAGD,WAAU,UAAU,SAAS,gBAAgB;AAC3C,mBAAiB,UAAU,OAAO,EAAE,OAAO,aAAa,CAAC;GACzD;AACF,WAAU,mBAAmB,SAAS,yBAAyB;AAC7D,mBAAiB,mBAAmB,OAAO,EAAE,OAAO,sBAAsB,CAAC;GAC3E;;;;;;;;;;AAWJ,SAAgB,gCACd,UACA,UACA,SACkB;CAClB,MAAM,EAAE,YAAY,iBAAiB,QAAQ;CAY7C,MAAM,kCAVyC,QAC5C,MACC,MACA,UAAU,SAAS,EACnB,UAAU,kBAAkB,EAC5B,UAAU,SAAS,CACpB,CACA,SAAS,CACT,KAAK,SAAS,KAAK,QAE2C,CAAC,MAC/D,oBAAoB;AACnB,SAAO,QAAQ,IACb,KACE,iBACA,UAAU,UAAU,EACpB,UAAU,SAAS,EACnB,UAAU,SAAS,CACpB,CACF;GAEJ,EAAE;CAEH,IAAI;AACJ,KAAI,gCACF,oBAAmB,QAChB,UAAU,0BAA0B,CACpC,MAAM,SAAS,CACf,YAAY,gCAAgC;MAC1C;AACL,qBAAmB,QAChB,UAAU,0BAA0B,CACpC,MAAM,SAAS,CACf,YAAY,GAAG,SAAS,GAAG,IAAI,GAAG;AACrC,mBAAiB,OAAO,EAAE,OAAO,oBAAoB;AACrD,mBAAiB,WAAW,EAAE,OAAO,UAAU;;AAEjD,QAAO"}
@@ -8,4 +8,4 @@ interface Options {
8
8
  }
9
9
  //#endregion
10
10
  export { Options };
11
- //# sourceMappingURL=Options.d.mts.map
11
+ //# sourceMappingURL=Options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Options.d.ts","names":[],"sources":["../../src/util/Options.ts"],"mappings":";;;;UAKiB,OAAA;EACf,eAAA,GAAkB,oBAAA,CAAqB,oBAAA;EACvC,KAAA,UAAe,KAAA;AAAA"}
@@ -12,4 +12,4 @@ function guaranteeOptions(options) {
12
12
  //#endregion
13
13
  export { guaranteeOptions };
14
14
 
15
- //# sourceMappingURL=Options.mjs.map
15
+ //# sourceMappingURL=Options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Options.js","names":[],"sources":["../../src/util/Options.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { ConnectedLdoDataset, IConnectedLdoDataset } from \"@ldo/connected\";\nimport type { SolidConnectedPlugin } from \"@ldo/connected-solid\";\nimport { createSolidLdoDataset, guaranteeFetch } from \"@ldo/connected-solid\";\n\nexport interface Options {\n solidLdoDataset?: IConnectedLdoDataset<SolidConnectedPlugin[]>;\n fetch?: typeof fetch;\n}\n\nexport function guaranteeOptions(options?: Options) {\n const fetch = guaranteeFetch(options?.fetch);\n const dataset = (options?.solidLdoDataset ??\n createSolidLdoDataset()) as ConnectedLdoDataset<SolidConnectedPlugin[]>;\n dataset.setContext(\"solid\", { fetch });\n return { fetch, dataset };\n}\n"],"mappings":";;AAUA,SAAgB,iBAAiB,SAAmB;CAClD,MAAM,QAAQ,eAAe,SAAS,MAAM;CAC5C,MAAM,UAAW,SAAS,mBACxB,uBAAuB;AACzB,SAAQ,WAAW,SAAS,EAAE,OAAO,CAAC;AACtC,QAAO;EAAE;EAAO;EAAS"}
package/package.json CHANGED
@@ -1,21 +1,14 @@
1
1
  {
2
2
  "name": "@ldo/solid-type-index",
3
- "version": "1.0.0-alpha.50",
3
+ "version": "1.0.0-alpha.53",
4
4
  "description": "Solid Type Index support for LDO",
5
5
  "type": "module",
6
- "main": "./dist/index.cjs",
7
- "module": "./dist/index.mjs",
8
- "types": "./dist/index.d.mts",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
9
8
  "exports": {
10
9
  ".": {
11
- "import": {
12
- "types": "./dist/index.d.mts",
13
- "default": "./dist/index.mjs"
14
- },
15
- "require": {
16
- "types": "./dist/index.d.cts",
17
- "default": "./dist/index.cjs"
18
- }
10
+ "types": "./dist/index.d.ts",
11
+ "default": "./dist/index.js"
19
12
  },
20
13
  "./package.json": "./package.json"
21
14
  },
@@ -39,25 +32,28 @@
39
32
  },
40
33
  "homepage": "https://github.com/o-development/ldo/tree/main/packages/solid-react#readme",
41
34
  "devDependencies": {
42
- "@ldo/test-solid-server": "^1.0.0-alpha.50",
35
+ "@ldo/test-solid-server": "^1.0.0-alpha.53",
43
36
  "@testing-library/react": "^14.1.2",
44
37
  "start-server-and-test": "^2.0.3",
45
38
  "ts-node": "^10.9.2"
46
39
  },
47
40
  "dependencies": {
48
- "@ldo/connected": "^1.0.0-alpha.50",
49
- "@ldo/connected-solid": "^1.0.0-alpha.50",
50
- "@ldo/ldo": "^1.0.0-alpha.50",
51
- "@ldo/rdf-utils": "^1.0.0-alpha.50",
52
- "@ldo/solid-react": "^1.0.0-alpha.50",
41
+ "@ldo/connected": "^1.0.0-alpha.53",
42
+ "@ldo/connected-solid": "^1.0.0-alpha.53",
43
+ "@ldo/ldo": "^1.0.0-alpha.53",
44
+ "@ldo/rdf-utils": "^1.0.0-alpha.53",
45
+ "@ldo/solid-react": "^1.0.0-alpha.53",
53
46
  "@rdfjs/types": "^1.0.1"
54
47
  },
55
48
  "files": [
56
49
  "dist",
57
50
  "src"
58
51
  ],
52
+ "engines": {
53
+ "node": ">=20.19.0"
54
+ },
59
55
  "publishConfig": {
60
56
  "access": "public"
61
57
  },
62
- "gitHead": "7277a6694f01cdb776495a3028a625d8386c4887"
58
+ "gitHead": "4064165d9f3fbeadcb6b06b5e978771535bd3c56"
63
59
  }
@@ -1,20 +0,0 @@
1
- //#region src/_ldo/profile.context.ts
2
- /**
3
- * =============================================================================
4
- * profileContext: JSONLD Context for profile
5
- * =============================================================================
6
- */
7
- const profileContext = {
8
- privateTypeIndex: {
9
- "@id": "http://www.w3.org/ns/solid/terms#privateTypeIndex",
10
- "@type": "@id",
11
- "@isCollection": true
12
- },
13
- publicTypeIndex: {
14
- "@id": "http://www.w3.org/ns/solid/terms#publicTypeIndex",
15
- "@type": "@id",
16
- "@isCollection": true
17
- }
18
- };
19
- //#endregion
20
- exports.profileContext = profileContext;
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.context.mjs","names":[],"sources":["../../src/_ldo/profile.context.ts"],"sourcesContent":["import type { LdoJsonldContext } from \"@ldo/ldo\";\n\n/**\n * =============================================================================\n * profileContext: JSONLD Context for profile\n * =============================================================================\n */\nexport const profileContext: LdoJsonldContext = {\n privateTypeIndex: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#privateTypeIndex\",\n \"@type\": \"@id\",\n \"@isCollection\": true,\n },\n publicTypeIndex: {\n \"@id\": \"http://www.w3.org/ns/solid/terms#publicTypeIndex\",\n \"@type\": \"@id\",\n \"@isCollection\": true,\n },\n};\n"],"mappings":";;;;;;AAOA,MAAa,iBAAmC;CAC9C,kBAAkB;EAChB,OAAO;EACP,SAAS;EACT,iBAAiB;EAClB;CACD,iBAAiB;EACf,OAAO;EACP,SAAS;EACT,iBAAiB;EAClB;CACF"}
@@ -1,50 +0,0 @@
1
- //#region src/_ldo/profile.schema.ts
2
- /**
3
- * =============================================================================
4
- * profileSchema: ShexJ Schema for profile
5
- * =============================================================================
6
- */
7
- const profileSchema = {
8
- type: "Schema",
9
- shapes: [{
10
- id: "https://shaperepo.com/schemas/solidProfile#TypeIndexProfile",
11
- type: "ShapeDecl",
12
- shapeExpr: {
13
- type: "Shape",
14
- expression: {
15
- type: "EachOf",
16
- expressions: [{
17
- type: "TripleConstraint",
18
- predicate: "http://www.w3.org/ns/solid/terms#privateTypeIndex",
19
- valueExpr: {
20
- type: "NodeConstraint",
21
- nodeKind: "iri"
22
- },
23
- min: 0,
24
- max: -1,
25
- annotations: [{
26
- type: "Annotation",
27
- predicate: "http://www.w3.org/2000/01/rdf-schema#comment",
28
- object: { value: "A registry of all types used on the user's Pod (for private access only)" }
29
- }]
30
- }, {
31
- type: "TripleConstraint",
32
- predicate: "http://www.w3.org/ns/solid/terms#publicTypeIndex",
33
- valueExpr: {
34
- type: "NodeConstraint",
35
- nodeKind: "iri"
36
- },
37
- min: 0,
38
- max: -1,
39
- annotations: [{
40
- type: "Annotation",
41
- predicate: "http://www.w3.org/2000/01/rdf-schema#comment",
42
- object: { value: "A registry of all types used on the user's Pod (for public access)" }
43
- }]
44
- }]
45
- }
46
- }
47
- }]
48
- };
49
- //#endregion
50
- exports.profileSchema = profileSchema;
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.schema.mjs","names":[],"sources":["../../src/_ldo/profile.schema.ts"],"sourcesContent":["import type { Schema } from \"shexj\";\n\n/**\n * =============================================================================\n * profileSchema: ShexJ Schema for profile\n * =============================================================================\n */\nexport const profileSchema: Schema = {\n type: \"Schema\",\n shapes: [\n {\n id: \"https://shaperepo.com/schemas/solidProfile#TypeIndexProfile\",\n type: \"ShapeDecl\",\n shapeExpr: {\n type: \"Shape\",\n expression: {\n type: \"EachOf\",\n expressions: [\n {\n type: \"TripleConstraint\",\n predicate: \"http://www.w3.org/ns/solid/terms#privateTypeIndex\",\n valueExpr: {\n type: \"NodeConstraint\",\n nodeKind: \"iri\",\n },\n min: 0,\n max: -1,\n annotations: [\n {\n type: \"Annotation\",\n predicate: \"http://www.w3.org/2000/01/rdf-schema#comment\",\n object: {\n value:\n \"A registry of all types used on the user's Pod (for private access only)\",\n },\n },\n ],\n },\n {\n type: \"TripleConstraint\",\n predicate: \"http://www.w3.org/ns/solid/terms#publicTypeIndex\",\n valueExpr: {\n type: \"NodeConstraint\",\n nodeKind: \"iri\",\n },\n min: 0,\n max: -1,\n annotations: [\n {\n type: \"Annotation\",\n predicate: \"http://www.w3.org/2000/01/rdf-schema#comment\",\n object: {\n value:\n \"A registry of all types used on the user's Pod (for public access)\",\n },\n },\n ],\n },\n ],\n },\n },\n },\n ],\n};\n"],"mappings":";;;;;;AAOA,MAAa,gBAAwB;CACnC,MAAM;CACN,QAAQ,CACN;EACE,IAAI;EACJ,MAAM;EACN,WAAW;GACT,MAAM;GACN,YAAY;IACV,MAAM;IACN,aAAa,CACX;KACE,MAAM;KACN,WAAW;KACX,WAAW;MACT,MAAM;MACN,UAAU;MACX;KACD,KAAK;KACL,KAAK;KACL,aAAa,CACX;MACE,MAAM;MACN,WAAW;MACX,QAAQ,EACN,OACE,4EACH;MACF,CACF;KACF,EACD;KACE,MAAM;KACN,WAAW;KACX,WAAW;MACT,MAAM;MACN,UAAU;MACX;KACD,KAAK;KACL,KAAK;KACL,aAAa,CACX;MACE,MAAM;MACN,WAAW;MACX,QAAQ,EACN,OACE,sEACH;MACF,CACF;KACF,CACF;IACF;GACF;EACF,CACF;CACF"}
@@ -1,18 +0,0 @@
1
- const require_profile_schema = require("./profile.schema.cjs");
2
- const require_profile_context = require("./profile.context.cjs");
3
- //#region src/_ldo/profile.shapeTypes.ts
4
- /**
5
- * =============================================================================
6
- * LDO ShapeTypes profile
7
- * =============================================================================
8
- */
9
- /**
10
- * TypeIndexProfile ShapeType
11
- */
12
- const TypeIndexProfileShapeType = {
13
- schema: require_profile_schema.profileSchema,
14
- shape: "https://shaperepo.com/schemas/solidProfile#TypeIndexProfile",
15
- context: require_profile_context.profileContext
16
- };
17
- //#endregion
18
- exports.TypeIndexProfileShapeType = TypeIndexProfileShapeType;
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.shapeTypes.mjs","names":[],"sources":["../../src/_ldo/profile.shapeTypes.ts"],"sourcesContent":["import type { ShapeType } from \"@ldo/ldo\";\nimport { profileSchema } from \"./profile.schema\";\nimport { profileContext } from \"./profile.context\";\nimport type { TypeIndexProfile } from \"./profile.typings\";\n\n/**\n * =============================================================================\n * LDO ShapeTypes profile\n * =============================================================================\n */\n\n/**\n * TypeIndexProfile ShapeType\n */\nexport const TypeIndexProfileShapeType: ShapeType<TypeIndexProfile> = {\n schema: profileSchema,\n shape: \"https://shaperepo.com/schemas/solidProfile#TypeIndexProfile\",\n context: profileContext,\n};\n"],"mappings":";;;;;;;;;;;AAcA,MAAa,4BAAyD;CACpE,QAAQ;CACR,OAAO;CACP,SAAS;CACV"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"profile.typings.d.cts","names":[],"sources":["../../src/_ldo/profile.typings.ts"],"mappings":";;;;;AAWA;;;;;;UAAiB,gBAAA;EACf,KAAA;EACA,UAAA,GAAa,gBAAA;EAAb;;;EAIA,gBAAA,GAAmB,KAAA;IACjB,KAAA;EAAA;EAKgB;;;EAAlB,eAAA,GAAkB,KAAA;IAChB,KAAA;EAAA;AAAA"}