@ldo/solid-type-index 1.0.0-alpha.2 → 1.0.0-alpha.20

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 (136) hide show
  1. package/dist/{.ldo → cjs/.ldo}/profile.context.js +5 -0
  2. package/dist/cjs/.ldo/profile.context.js.map +1 -0
  3. package/dist/{.ldo → cjs/.ldo}/profile.schema.js +5 -0
  4. package/dist/cjs/.ldo/profile.schema.js.map +1 -0
  5. package/dist/cjs/.ldo/profile.shapeTypes.js +19 -0
  6. package/dist/cjs/.ldo/profile.shapeTypes.js.map +1 -0
  7. package/dist/cjs/.ldo/profile.typings.js.map +1 -0
  8. package/dist/{.ldo → cjs/.ldo}/typeIndex.context.js +5 -0
  9. package/dist/cjs/.ldo/typeIndex.context.js.map +1 -0
  10. package/dist/{.ldo → cjs/.ldo}/typeIndex.schema.js +5 -0
  11. package/dist/cjs/.ldo/typeIndex.schema.js.map +1 -0
  12. package/dist/cjs/.ldo/typeIndex.shapeTypes.js +27 -0
  13. package/dist/cjs/.ldo/typeIndex.shapeTypes.js.map +1 -0
  14. package/dist/cjs/.ldo/typeIndex.typings.js.map +1 -0
  15. package/dist/cjs/constants.js.map +1 -0
  16. package/dist/{getTypeIndex.js → cjs/getTypeIndex.js} +20 -15
  17. package/dist/cjs/getTypeIndex.js.map +1 -0
  18. package/dist/{index.js → cjs/index.js} +4 -4
  19. package/dist/cjs/index.js.map +1 -0
  20. package/dist/cjs/react/useInstanceUris.js +33 -0
  21. package/dist/cjs/react/useInstanceUris.js.map +1 -0
  22. package/dist/{react → cjs/react}/useTypeIndexProfile.js +3 -4
  23. package/dist/cjs/react/useTypeIndexProfile.js.map +1 -0
  24. package/dist/{react → cjs/react}/util/useSubscribeToUris.js +4 -2
  25. package/dist/cjs/react/util/useSubscribeToUris.js.map +1 -0
  26. package/dist/cjs/setTypeIndex.js +197 -0
  27. package/dist/cjs/setTypeIndex.js.map +1 -0
  28. package/dist/{util → cjs/util}/Options.js +1 -2
  29. package/dist/cjs/util/Options.js.map +1 -0
  30. package/dist/esm/.ldo/profile.context.js +18 -0
  31. package/dist/esm/.ldo/profile.context.js.map +1 -0
  32. package/dist/esm/.ldo/profile.schema.js +61 -0
  33. package/dist/esm/.ldo/profile.schema.js.map +1 -0
  34. package/dist/esm/.ldo/profile.shapeTypes.js +16 -0
  35. package/dist/esm/.ldo/profile.shapeTypes.js.map +1 -0
  36. package/dist/esm/.ldo/profile.typings.js +2 -0
  37. package/dist/esm/.ldo/profile.typings.js.map +1 -0
  38. package/dist/esm/.ldo/typeIndex.context.js +63 -0
  39. package/dist/esm/.ldo/typeIndex.context.js.map +1 -0
  40. package/dist/esm/.ldo/typeIndex.schema.js +143 -0
  41. package/dist/esm/.ldo/typeIndex.schema.js.map +1 -0
  42. package/dist/esm/.ldo/typeIndex.shapeTypes.js +24 -0
  43. package/dist/esm/.ldo/typeIndex.shapeTypes.js.map +1 -0
  44. package/dist/esm/.ldo/typeIndex.typings.js +2 -0
  45. package/dist/esm/.ldo/typeIndex.typings.js.map +1 -0
  46. package/dist/esm/constants.js +6 -0
  47. package/dist/esm/constants.js.map +1 -0
  48. package/dist/esm/getTypeIndex.js +61 -0
  49. package/dist/esm/getTypeIndex.js.map +1 -0
  50. package/dist/esm/index.js +5 -0
  51. package/dist/esm/index.js.map +1 -0
  52. package/dist/esm/react/useInstanceUris.js +30 -0
  53. package/dist/esm/react/useInstanceUris.js.map +1 -0
  54. package/dist/esm/react/useTypeIndexProfile.js +9 -0
  55. package/dist/esm/react/useTypeIndexProfile.js.map +1 -0
  56. package/dist/esm/react/util/useSubscribeToUris.js +30 -0
  57. package/dist/esm/react/util/useSubscribeToUris.js.map +1 -0
  58. package/dist/{setTypeIndex.js → esm/setTypeIndex.js} +66 -33
  59. package/dist/esm/setTypeIndex.js.map +1 -0
  60. package/dist/esm/util/Options.js +9 -0
  61. package/dist/esm/util/Options.js.map +1 -0
  62. package/dist/types/.ldo/profile.context.d.ts +8 -0
  63. package/dist/types/.ldo/profile.context.d.ts.map +1 -0
  64. package/dist/types/.ldo/profile.schema.d.ts +8 -0
  65. package/dist/types/.ldo/profile.schema.d.ts.map +1 -0
  66. package/dist/types/.ldo/profile.shapeTypes.d.ts +12 -0
  67. package/dist/types/.ldo/profile.shapeTypes.d.ts.map +1 -0
  68. package/dist/types/.ldo/profile.typings.d.ts +26 -0
  69. package/dist/types/.ldo/profile.typings.d.ts.map +1 -0
  70. package/dist/types/.ldo/typeIndex.context.d.ts +8 -0
  71. package/dist/types/.ldo/typeIndex.context.d.ts.map +1 -0
  72. package/dist/types/.ldo/typeIndex.schema.d.ts +8 -0
  73. package/dist/types/.ldo/typeIndex.schema.d.ts.map +1 -0
  74. package/dist/types/.ldo/typeIndex.shapeTypes.d.ts +16 -0
  75. package/dist/types/.ldo/typeIndex.shapeTypes.d.ts.map +1 -0
  76. package/dist/types/.ldo/typeIndex.typings.d.ts +53 -0
  77. package/dist/types/.ldo/typeIndex.typings.d.ts.map +1 -0
  78. package/dist/{constants.d.ts → types/constants.d.ts} +1 -0
  79. package/dist/types/constants.d.ts.map +1 -0
  80. package/dist/{getTypeIndex.d.ts → types/getTypeIndex.d.ts} +4 -3
  81. package/dist/types/getTypeIndex.d.ts.map +1 -0
  82. package/dist/types/index.d.ts +5 -0
  83. package/dist/types/index.d.ts.map +1 -0
  84. package/dist/types/react/useInstanceUris.d.ts +9 -0
  85. package/dist/types/react/useInstanceUris.d.ts.map +1 -0
  86. package/dist/types/react/useTypeIndexProfile.d.ts +3 -0
  87. package/dist/types/react/useTypeIndexProfile.d.ts.map +1 -0
  88. package/dist/{react → types/react}/util/useSubscribeToUris.d.ts +1 -0
  89. package/dist/types/react/util/useSubscribeToUris.d.ts.map +1 -0
  90. package/dist/types/setTypeIndex.d.ts +53 -0
  91. package/dist/types/setTypeIndex.d.ts.map +1 -0
  92. package/dist/{util → types/util}/Options.d.ts +1 -0
  93. package/dist/types/util/Options.d.ts.map +1 -0
  94. package/package.json +27 -18
  95. package/src/.ldo/profile.shapeTypes.ts +3 -3
  96. package/src/.ldo/typeIndex.shapeTypes.ts +3 -3
  97. package/src/getTypeIndex.ts +7 -7
  98. package/src/index.ts +4 -4
  99. package/src/react/useInstanceUris.ts +7 -5
  100. package/src/react/useTypeIndexProfile.ts +2 -2
  101. package/src/setTypeIndex.ts +12 -10
  102. package/src/util/Options.ts +0 -2
  103. package/dist/.ldo/profile.context.d.ts +0 -2
  104. package/dist/.ldo/profile.context.js.map +0 -1
  105. package/dist/.ldo/profile.schema.d.ts +0 -2
  106. package/dist/.ldo/profile.schema.js.map +0 -1
  107. package/dist/.ldo/profile.shapeTypes.d.ts +0 -3
  108. package/dist/.ldo/profile.shapeTypes.js +0 -11
  109. package/dist/.ldo/profile.shapeTypes.js.map +0 -1
  110. package/dist/.ldo/profile.typings.d.ts +0 -11
  111. package/dist/.ldo/profile.typings.js.map +0 -1
  112. package/dist/.ldo/typeIndex.context.d.ts +0 -2
  113. package/dist/.ldo/typeIndex.context.js.map +0 -1
  114. package/dist/.ldo/typeIndex.schema.d.ts +0 -2
  115. package/dist/.ldo/typeIndex.schema.js.map +0 -1
  116. package/dist/.ldo/typeIndex.shapeTypes.d.ts +0 -4
  117. package/dist/.ldo/typeIndex.shapeTypes.js +0 -16
  118. package/dist/.ldo/typeIndex.shapeTypes.js.map +0 -1
  119. package/dist/.ldo/typeIndex.typings.d.ts +0 -26
  120. package/dist/.ldo/typeIndex.typings.js.map +0 -1
  121. package/dist/constants.js.map +0 -1
  122. package/dist/getTypeIndex.js.map +0 -1
  123. package/dist/index.d.ts +0 -4
  124. package/dist/index.js.map +0 -1
  125. package/dist/react/useInstanceUris.d.ts +0 -2
  126. package/dist/react/useInstanceUris.js +0 -26
  127. package/dist/react/useInstanceUris.js.map +0 -1
  128. package/dist/react/useTypeIndexProfile.d.ts +0 -2
  129. package/dist/react/useTypeIndexProfile.js.map +0 -1
  130. package/dist/react/util/useSubscribeToUris.js.map +0 -1
  131. package/dist/setTypeIndex.d.ts +0 -14
  132. package/dist/setTypeIndex.js.map +0 -1
  133. package/dist/util/Options.js.map +0 -1
  134. /package/dist/{.ldo → cjs/.ldo}/profile.typings.js +0 -0
  135. /package/dist/{.ldo → cjs/.ldo}/typeIndex.typings.js +0 -0
  136. /package/dist/{constants.js → cjs/constants.js} +0 -0
@@ -1,17 +1,21 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findAppropriateTypeRegistration = exports.removeRegistration = exports.addRegistration = exports.createIndex = exports.initTypeIndex = void 0;
4
- const uuid_1 = require("uuid");
5
- const typeIndex_shapeTypes_1 = require("./.ldo/typeIndex.shapeTypes");
6
- const constants_1 = require("./constants");
7
- const Options_1 = require("./util/Options");
8
- const data_model_1 = require("@rdfjs/data-model");
9
- const getTypeIndex_1 = require("./getTypeIndex");
10
- const profile_shapeTypes_1 = require("./.ldo/profile.shapeTypes");
11
- const ldo_1 = require("@ldo/ldo");
12
- async function initTypeIndex(webId, options) {
13
- const { dataset } = (0, Options_1.guaranteeOptions)(options);
14
- const profile = await (0, getTypeIndex_1.getProfile)(webId, options);
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { v4 } from "uuid";
3
+ import { FOR_CLASS, RDF_TYPE, TYPE_REGISTRATION } from "./constants.js";
4
+ import { guaranteeOptions } from "./util/Options.js";
5
+ import * as rdfdm from "@rdfjs/data-model";
6
+ import { getProfile } from "./getTypeIndex.js";
7
+ import { TypeIndexProfileShapeType } from "./.ldo/profile.shapeTypes.js";
8
+ import { set } from "@ldo/ldo";
9
+ import { TypeIndexDocumentShapeType, TypeRegistrationShapeType, } from "./.ldo/typeIndex.shapeTypes.js";
10
+ const { namedNode, quad } = rdfdm;
11
+ /**
12
+ * =============================================================================
13
+ * INITIALIZERS
14
+ * =============================================================================
15
+ */
16
+ export async function initTypeIndex(webId, options) {
17
+ const { dataset } = guaranteeOptions(options);
18
+ const profile = await getProfile(webId, options);
15
19
  if (!profile.privateTypeIndex?.size || !profile.publicTypeIndex?.size) {
16
20
  const profileFolder = await dataset
17
21
  .getResource(webId)
@@ -28,9 +32,15 @@ async function initTypeIndex(webId, options) {
28
32
  }
29
33
  }
30
34
  }
31
- exports.initTypeIndex = initTypeIndex;
32
- async function createIndex(webId, profileFolder, dataset, isPrivate) {
33
- const createResult = await profileFolder.createChildAndOverwrite(`${isPrivate ? "private" : "public"}_index_${(0, uuid_1.v4)()}`);
35
+ /**
36
+ * @internal
37
+ * @param webId
38
+ * @param profileFolder
39
+ * @param dataset
40
+ */
41
+ export async function createIndex(webId, profileFolder, dataset, isPrivate) {
42
+ // Create a private type index
43
+ const createResult = await profileFolder.createChildAndOverwrite(`${isPrivate ? "private" : "public"}_index_${v4()}`);
34
44
  if (createResult.isError)
35
45
  throw createResult;
36
46
  const indexResource = createResult.resource;
@@ -55,7 +65,7 @@ async function createIndex(webId, profileFolder, dataset, isPrivate) {
55
65
  throw wacResult;
56
66
  const transaction = dataset.startTransaction();
57
67
  const cProfile = transaction
58
- .usingType(profile_shapeTypes_1.TypeIndexProfileShapeType)
68
+ .usingType(TypeIndexProfileShapeType)
59
69
  .write(dataset.getResource(webId).uri)
60
70
  .fromSubject(webId);
61
71
  if (isPrivate) {
@@ -65,17 +75,25 @@ async function createIndex(webId, profileFolder, dataset, isPrivate) {
65
75
  cProfile.publicTypeIndex?.add({ "@id": indexResource.uri });
66
76
  }
67
77
  const cTypeIndex = transaction
68
- .usingType(typeIndex_shapeTypes_1.TypeIndexDocumentShapeType)
78
+ .usingType(TypeIndexDocumentShapeType)
69
79
  .write(indexResource.uri)
70
80
  .fromSubject(indexResource.uri);
71
- cTypeIndex.type = (0, ldo_1.set)({ "@id": "ListedDocument" }, { "@id": "TypeIndex" });
81
+ cTypeIndex.type = set({ "@id": "ListedDocument" }, { "@id": "TypeIndex" });
72
82
  const commitResult = await transaction.commitToRemote();
73
83
  if (commitResult.isError)
74
84
  throw commitResult;
75
85
  }
76
- exports.createIndex = createIndex;
77
- function addRegistration(indexUri, classUri, instances, options) {
86
+ /**
87
+ * Adds an instance to a TypeRegistration
88
+ * @param indexUri The URI of the TypeIndex
89
+ * @param classUri The URI for the class the instance should be added to
90
+ * @param instances Objects representing the instances to add
91
+ * @param options Options
92
+ */
93
+ export function addRegistration(indexUri, classUri, instances, options) {
94
+ // Check to see if its already in the index
78
95
  const typeRegistration = findAppropriateTypeRegistration(indexUri, classUri, options);
96
+ // Add instances to type registration
79
97
  instances.instance?.forEach((instance) => {
80
98
  typeRegistration.instance?.add({ "@id": instance });
81
99
  });
@@ -83,9 +101,17 @@ function addRegistration(indexUri, classUri, instances, options) {
83
101
  typeRegistration.instanceContainer?.add({ "@id": instanceContainer });
84
102
  });
85
103
  }
86
- exports.addRegistration = addRegistration;
87
- async function removeRegistration(indexUri, classUri, instances, options) {
104
+ /**
105
+ * Removes instances from a TypeRegistration
106
+ * @param indexUri The URI of the TypeIndex
107
+ * @param classUri The URI for the class the instance should be removed from
108
+ * @param instances Objects representing the instances to remove
109
+ * @param options Options
110
+ */
111
+ export async function removeRegistration(indexUri, classUri, instances, options) {
112
+ // Check to see if its already in the index
88
113
  const typeRegistration = findAppropriateTypeRegistration(indexUri, classUri, options);
114
+ // Add instances to type registration
89
115
  instances.instance?.forEach((instanceUri) => {
90
116
  typeRegistration.instance?.delete({ "@id": instanceUri });
91
117
  });
@@ -93,32 +119,39 @@ async function removeRegistration(indexUri, classUri, instances, options) {
93
119
  typeRegistration.instanceContainer?.delete({ "@id": instanceContainerUri });
94
120
  });
95
121
  }
96
- exports.removeRegistration = removeRegistration;
97
- function findAppropriateTypeRegistration(indexUri, classUri, options) {
98
- const { dataset } = (0, Options_1.guaranteeOptions)(options);
122
+ /**
123
+ * Finds a TypeRegistration inside of a type index. If it doesn't exist, it
124
+ * creates one.
125
+ * @param indexUri The URI of the typeIndex
126
+ * @param classUri The URI of the class in question for the TypeRegistration
127
+ * @param options
128
+ * @returns The Type Index
129
+ */
130
+ export function findAppropriateTypeRegistration(indexUri, classUri, options) {
131
+ const { dataset } = guaranteeOptions(options);
132
+ // Check to see if its already in the index
99
133
  const existingRegistrationsUris = dataset
100
- .match(null, (0, data_model_1.namedNode)(constants_1.RDF_TYPE), (0, data_model_1.namedNode)(constants_1.TYPE_REGISTRATION), (0, data_model_1.namedNode)(indexUri))
134
+ .match(null, namedNode(RDF_TYPE), namedNode(TYPE_REGISTRATION), namedNode(indexUri))
101
135
  .toArray()
102
136
  .map((quad) => quad.subject);
103
137
  const existingRegistrationForClassUri = existingRegistrationsUris.find((registrationUri) => {
104
- return dataset.has((0, data_model_1.quad)(registrationUri, (0, data_model_1.namedNode)(constants_1.FOR_CLASS), (0, data_model_1.namedNode)(classUri), (0, data_model_1.namedNode)(indexUri)));
138
+ return dataset.has(quad(registrationUri, namedNode(FOR_CLASS), namedNode(classUri), namedNode(indexUri)));
105
139
  })?.value;
106
140
  let typeRegistration;
107
141
  if (existingRegistrationForClassUri) {
108
142
  typeRegistration = dataset
109
- .usingType(typeIndex_shapeTypes_1.TypeRegistrationShapeType)
143
+ .usingType(TypeRegistrationShapeType)
110
144
  .write(indexUri)
111
145
  .fromSubject(existingRegistrationForClassUri);
112
146
  }
113
147
  else {
114
148
  typeRegistration = dataset
115
- .usingType(typeIndex_shapeTypes_1.TypeRegistrationShapeType)
149
+ .usingType(TypeRegistrationShapeType)
116
150
  .write(indexUri)
117
- .fromSubject(`${indexUri}#${(0, uuid_1.v4)()}`);
151
+ .fromSubject(`${indexUri}#${v4()}`);
118
152
  typeRegistration.type = { "@id": "TypeRegistration" };
119
153
  typeRegistration.forClass = { "@id": classUri };
120
154
  }
121
155
  return typeRegistration;
122
156
  }
123
- exports.findAppropriateTypeRegistration = findAppropriateTypeRegistration;
124
157
  //# sourceMappingURL=setTypeIndex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setTypeIndex.js","sourceRoot":"","sources":["../../src/setTypeIndex.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,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eAAe,EAAE,EAAE;QAClB,OAAO,OAAO,CAAC,GAAG,CAChB,IAAI,CACF,eAAe,EACf,SAAS,CAAC,SAAS,CAAC,EACpB,SAAS,CAAC,QAAQ,CAAC,EACnB,SAAS,CAAC,QAAQ,CAAC,CACpB,CACF,CAAC;IACJ,CAAC,CACF,EAAE,KAAK,CAAC;IAET,IAAI,gBAAkC,CAAC;IACvC,IAAI,+BAA+B,EAAE,CAAC;QACpC,gBAAgB,GAAG,OAAO;aACvB,SAAS,CAAC,yBAAyB,CAAC;aACpC,KAAK,CAAC,QAAQ,CAAC;aACf,WAAW,CAAC,+BAA+B,CAAC,CAAC;IAClD,CAAC;SAAM,CAAC;QACN,gBAAgB,GAAG,OAAO;aACvB,SAAS,CAAC,yBAAyB,CAAC;aACpC,KAAK,CAAC,QAAQ,CAAC;aACf,WAAW,CAAC,GAAG,QAAQ,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACtC,gBAAgB,CAAC,IAAI,GAAG,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC;QACtD,gBAAgB,CAAC,QAAQ,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClD,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { createSolidLdoDataset, guaranteeFetch } from "@ldo/connected-solid";
2
+ export function guaranteeOptions(options) {
3
+ const fetch = guaranteeFetch(options?.fetch);
4
+ const dataset = (options?.solidLdoDataset ??
5
+ createSolidLdoDataset());
6
+ dataset.setContext("solid", { fetch });
7
+ return { fetch, dataset };
8
+ }
9
+ //# sourceMappingURL=Options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Options.js","sourceRoot":"","sources":["../../../src/util/Options.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAO7E,MAAM,UAAU,gBAAgB,CAAC,OAAiB;IAChD,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,eAAe;QACvC,qBAAqB,EAAE,CAAgD,CAAC;IAC1E,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IACvC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAC5B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { LdoJsonldContext } from "@ldo/ldo";
2
+ /**
3
+ * =============================================================================
4
+ * profileContext: JSONLD Context for profile
5
+ * =============================================================================
6
+ */
7
+ export declare const profileContext: LdoJsonldContext;
8
+ //# sourceMappingURL=profile.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.context.d.ts","sourceRoot":"","sources":["../../../src/.ldo/profile.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,gBAW5B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Schema } from "shexj";
2
+ /**
3
+ * =============================================================================
4
+ * profileSchema: ShexJ Schema for profile
5
+ * =============================================================================
6
+ */
7
+ export declare const profileSchema: Schema;
8
+ //# sourceMappingURL=profile.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.schema.d.ts","sourceRoot":"","sources":["../../../src/.ldo/profile.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAwD3B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { ShapeType } from "@ldo/ldo";
2
+ import { TypeIndexProfile } from "./profile.typings.js";
3
+ /**
4
+ * =============================================================================
5
+ * LDO ShapeTypes profile
6
+ * =============================================================================
7
+ */
8
+ /**
9
+ * TypeIndexProfile ShapeType
10
+ */
11
+ export declare const TypeIndexProfileShapeType: ShapeType<TypeIndexProfile>;
12
+ //# sourceMappingURL=profile.shapeTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.shapeTypes.d.ts","sourceRoot":"","sources":["../../../src/.ldo/profile.shapeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,CAAC,gBAAgB,CAIjE,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { LdoJsonldContext, LdSet } from "@ldo/ldo";
2
+ /**
3
+ * =============================================================================
4
+ * Typescript Typings for profile
5
+ * =============================================================================
6
+ */
7
+ /**
8
+ * TypeIndexProfile Type
9
+ */
10
+ export interface TypeIndexProfile {
11
+ "@id"?: string;
12
+ "@context"?: LdoJsonldContext;
13
+ /**
14
+ * A registry of all types used on the user's Pod (for private access only)
15
+ */
16
+ privateTypeIndex?: LdSet<{
17
+ "@id": string;
18
+ }>;
19
+ /**
20
+ * A registry of all types used on the user's Pod (for public access)
21
+ */
22
+ publicTypeIndex?: LdSet<{
23
+ "@id": string;
24
+ }>;
25
+ }
26
+ //# sourceMappingURL=profile.typings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.typings.d.ts","sourceRoot":"","sources":["../../../src/.ldo/profile.typings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEnD;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;IACH;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC;QACtB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;CACJ"}
@@ -0,0 +1,8 @@
1
+ import { LdoJsonldContext } from "@ldo/ldo";
2
+ /**
3
+ * =============================================================================
4
+ * typeIndexContext: JSONLD Context for typeIndex
5
+ * =============================================================================
6
+ */
7
+ export declare const typeIndexContext: LdoJsonldContext;
8
+ //# sourceMappingURL=typeIndex.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeIndex.context.d.ts","sourceRoot":"","sources":["../../../src/.ldo/typeIndex.context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBAwD9B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Schema } from "shexj";
2
+ /**
3
+ * =============================================================================
4
+ * typeIndexSchema: ShexJ Schema for typeIndex
5
+ * =============================================================================
6
+ */
7
+ export declare const typeIndexSchema: Schema;
8
+ //# sourceMappingURL=typeIndex.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeIndex.schema.d.ts","sourceRoot":"","sources":["../../../src/.ldo/typeIndex.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,MAwI7B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ShapeType } from "@ldo/ldo";
2
+ import { TypeIndexDocument, TypeRegistration } from "./typeIndex.typings.js";
3
+ /**
4
+ * =============================================================================
5
+ * LDO ShapeTypes typeIndex
6
+ * =============================================================================
7
+ */
8
+ /**
9
+ * TypeIndexDocument ShapeType
10
+ */
11
+ export declare const TypeIndexDocumentShapeType: ShapeType<TypeIndexDocument>;
12
+ /**
13
+ * TypeRegistration ShapeType
14
+ */
15
+ export declare const TypeRegistrationShapeType: ShapeType<TypeRegistration>;
16
+ //# sourceMappingURL=typeIndex.shapeTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeIndex.shapeTypes.d.ts","sourceRoot":"","sources":["../../../src/.ldo/typeIndex.shapeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE7E;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,CAAC,iBAAiB,CAInE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,CAAC,gBAAgB,CAIjE,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { LdoJsonldContext, LdSet } from "@ldo/ldo";
2
+ /**
3
+ * =============================================================================
4
+ * Typescript Typings for typeIndex
5
+ * =============================================================================
6
+ */
7
+ /**
8
+ * TypeIndexDocument Type
9
+ */
10
+ export interface TypeIndexDocument {
11
+ "@id"?: string;
12
+ "@context"?: LdoJsonldContext;
13
+ /**
14
+ * Defines the node as a TypeIndex | Defines the node as a Listed Document
15
+ */
16
+ type: LdSet<{
17
+ "@id": "TypeIndex";
18
+ } | {
19
+ "@id": "ListedDocument";
20
+ }>;
21
+ }
22
+ /**
23
+ * TypeRegistration Type
24
+ */
25
+ export interface TypeRegistration {
26
+ "@id"?: string;
27
+ "@context"?: LdoJsonldContext;
28
+ /**
29
+ * Defines this node as a Type Registration
30
+ */
31
+ type: {
32
+ "@id": "TypeRegistration";
33
+ };
34
+ /**
35
+ * The class of object at this type.
36
+ */
37
+ forClass: {
38
+ "@id": string;
39
+ };
40
+ /**
41
+ * A specific resource that contains the class.
42
+ */
43
+ instance?: LdSet<{
44
+ "@id": string;
45
+ }>;
46
+ /**
47
+ * Containers that contain resources with the class.
48
+ */
49
+ instanceContainer?: LdSet<{
50
+ "@id": string;
51
+ }>;
52
+ }
53
+ //# sourceMappingURL=typeIndex.typings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeIndex.typings.d.ts","sourceRoot":"","sources":["../../../src/.ldo/typeIndex.typings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEnD;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B;;OAEG;IACH,IAAI,EAAE,KAAK,CACP;QACE,KAAK,EAAE,WAAW,CAAC;KACpB,GACD;QACE,KAAK,EAAE,gBAAgB,CAAC;KACzB,CACJ,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B;;OAEG;IACH,IAAI,EAAE;QACJ,KAAK,EAAE,kBAAkB,CAAC;KAC3B,CAAC;IACF;;OAEG;IACH,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;IACH;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC;QACxB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC,CAAC;CACJ"}
@@ -3,3 +3,4 @@ export declare const TYPE_REGISTRATION = "http://www.w3.org/ns/solid/terms#TypeR
3
3
  export declare const FOR_CLASS = "http://www.w3.org/ns/solid/terms#forClass";
4
4
  export declare const INSTANCE = "http://www.w3.org/ns/solid/terms#instance";
5
5
  export declare const INSTANCE_CONTAINER = "http://www.w3.org/ns/solid/terms#instanceContainer";
6
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,oDAAoD,CAAC;AAC1E,eAAO,MAAM,iBAAiB,sDACuB,CAAC;AACtD,eAAO,MAAM,SAAS,8CAA8C,CAAC;AACrE,eAAO,MAAM,QAAQ,8CAA8C,CAAC;AACpE,eAAO,MAAM,kBAAkB,uDACuB,CAAC"}
@@ -1,9 +1,10 @@
1
- import type { TypeRegistration } from "./.ldo/typeIndex.typings";
2
- import type { TypeIndexProfile } from "./.ldo/profile.typings";
3
- import type { Options } from "./util/Options";
1
+ import type { TypeRegistration } from "./.ldo/typeIndex.typings.js";
2
+ import type { TypeIndexProfile } from "./.ldo/profile.typings.js";
3
+ import type { Options } from "./util/Options.js";
4
4
  import type { LdSet } from "@ldo/ldo";
5
5
  import type { SolidLeafUri } from "@ldo/connected-solid";
6
6
  export declare function getTypeRegistrations(webId: string, options?: Options): Promise<LdSet<TypeRegistration>>;
7
7
  export declare function getProfile(webId: string, options?: Options): Promise<TypeIndexProfile>;
8
8
  export declare function getTypeIndexesUrisFromProfile(profile: TypeIndexProfile): SolidLeafUri[];
9
9
  export declare function getInstanceUris(classUri: string, typeRegistrations: TypeRegistration[], options?: Options): Promise<SolidLeafUri[]>;
10
+ //# sourceMappingURL=getTypeIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getTypeIndex.d.ts","sourceRoot":"","sources":["../../src/getTypeIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAIlE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAqB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE5E,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAsBlC;AAED,wBAAsB,UAAU,CAC9B,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,gBAAgB,CAAC,CAM3B;AAED,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,gBAAgB,GACxB,YAAY,EAAE,CAShB;AAED,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,iBAAiB,EAAE,gBAAgB,EAAE,EACrC,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,YAAY,EAAE,CAAC,CA2BzB"}
@@ -0,0 +1,5 @@
1
+ export * from "./getTypeIndex.js";
2
+ export * from "./setTypeIndex.js";
3
+ export * from "./react/useInstanceUris.js";
4
+ export * from "./react/useTypeIndexProfile.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { SolidLeafUri } from "@ldo/connected-solid";
2
+ /**
3
+ * Provides the LeafUris of everything in a type node for a specific class uri
4
+ *
5
+ * @param classUri - the class uri
6
+ * @returns - URIs of all resources registered with this node
7
+ */
8
+ export declare function useInstanceUris(classUri: string): SolidLeafUri[];
9
+ //# sourceMappingURL=useInstanceUris.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInstanceUris.d.ts","sourceRoot":"","sources":["../../../src/react/useInstanceUris.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,EAAE,CA4BhE"}
@@ -0,0 +1,3 @@
1
+ import type { TypeIndexProfile } from "../.ldo/profile.typings.js";
2
+ export declare function useTypeIndexProfile(): TypeIndexProfile | undefined;
3
+ //# sourceMappingURL=useTypeIndexProfile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTypeIndexProfile.d.ts","sourceRoot":"","sources":["../../../src/react/useTypeIndexProfile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,wBAAgB,mBAAmB,IAAI,gBAAgB,GAAG,SAAS,CAKlE"}
@@ -1 +1,2 @@
1
1
  export declare function useSubscribeToUris(uris: string[]): void;
2
+ //# sourceMappingURL=useSubscribeToUris.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSubscribeToUris.d.ts","sourceRoot":"","sources":["../../../../src/react/util/useSubscribeToUris.ts"],"names":[],"mappings":"AAGA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QA+BhD"}
@@ -0,0 +1,53 @@
1
+ import { type Options } from "./util/Options.js";
2
+ import type { TypeRegistration } from "./.ldo/typeIndex.typings.js";
3
+ import type { SolidConnectedPlugin, SolidContainer } from "@ldo/connected-solid";
4
+ import type { ConnectedLdoDataset, ConnectedPlugin } from "@ldo/connected";
5
+ /**
6
+ * =============================================================================
7
+ * INITIALIZERS
8
+ * =============================================================================
9
+ */
10
+ export declare function initTypeIndex(webId: string, options?: Options): Promise<void>;
11
+ /**
12
+ * @internal
13
+ * @param webId
14
+ * @param profileFolder
15
+ * @param dataset
16
+ */
17
+ export declare function createIndex(webId: any, profileFolder: SolidContainer, dataset: ConnectedLdoDataset<(SolidConnectedPlugin | ConnectedPlugin<any, any, any, any>)[]>, isPrivate: boolean): Promise<void>;
18
+ /**
19
+ * =============================================================================
20
+ * DATASET MODIFIERS
21
+ * =============================================================================
22
+ */
23
+ interface Instances {
24
+ instance?: string[];
25
+ instanceContainer?: string[];
26
+ }
27
+ /**
28
+ * Adds an instance to a TypeRegistration
29
+ * @param indexUri The URI of the TypeIndex
30
+ * @param classUri The URI for the class the instance should be added to
31
+ * @param instances Objects representing the instances to add
32
+ * @param options Options
33
+ */
34
+ export declare function addRegistration(indexUri: string, classUri: string, instances: Instances, options?: Options): void;
35
+ /**
36
+ * Removes instances from a TypeRegistration
37
+ * @param indexUri The URI of the TypeIndex
38
+ * @param classUri The URI for the class the instance should be removed from
39
+ * @param instances Objects representing the instances to remove
40
+ * @param options Options
41
+ */
42
+ export declare function removeRegistration(indexUri: string, classUri: string, instances: Instances, options?: Options): Promise<void>;
43
+ /**
44
+ * Finds a TypeRegistration inside of a type index. If it doesn't exist, it
45
+ * creates one.
46
+ * @param indexUri The URI of the typeIndex
47
+ * @param classUri The URI of the class in question for the TypeRegistration
48
+ * @param options
49
+ * @returns The Type Index
50
+ */
51
+ export declare function findAppropriateTypeRegistration(indexUri: string, classUri: string, options?: Options): TypeRegistration;
52
+ export {};
53
+ //# sourceMappingURL=setTypeIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setTypeIndex.d.ts","sourceRoot":"","sources":["../../src/setTypeIndex.ts"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAKpE,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EAGf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAQ3E;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,IAAI,CAAC,CAiBf;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,KAAK,KAAA,EACL,aAAa,EAAE,cAAc,EAC7B,OAAO,EAAE,mBAAmB,CAC1B,CAAC,oBAAoB,GAAG,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,EAAE,CAC/D,EACD,SAAS,EAAE,OAAO,iBA4CnB;AAED;;;;GAIG;AACH,UAAU,SAAS;IACjB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,OAAO,GAChB,IAAI,CAeN;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,OAAO,iBAgBlB;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,OAAO,GAChB,gBAAgB,CAyClB"}
@@ -8,3 +8,4 @@ export declare function guaranteeOptions(options?: Options): {
8
8
  fetch: typeof globalThis.fetch;
9
9
  dataset: ConnectedLdoDataset<SolidConnectedPlugin[]>;
10
10
  };
11
+ //# sourceMappingURL=Options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Options.d.ts","sourceRoot":"","sources":["../../../src/util/Options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGjE,MAAM,WAAW,OAAO;IACtB,eAAe,CAAC,EAAE,oBAAoB,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC/D,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB;AAED,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,OAAO;;;EAMjD"}
package/package.json CHANGED
@@ -1,32 +1,41 @@
1
1
  {
2
2
  "name": "@ldo/solid-type-index",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.20",
4
4
  "description": "Solid Type Index support for LDO",
5
- "main": "dist/index.js",
5
+ "type": "module",
6
+ "main": "./dist/cjs/index.js",
7
+ "module": "./dist/esm/index.js",
8
+ "types": "./dist/types/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/types/index.d.ts",
12
+ "import": "./dist/esm/index.js",
13
+ "require": "./dist/cjs/index.js"
14
+ },
15
+ "./package.json": "./package.json"
16
+ },
6
17
  "scripts": {
7
- "build": "tsc --project tsconfig.build.json",
8
- "watch": "tsc --watch",
9
- "test": "npm run test:integration",
10
- "test:watch": "jest --watch",
11
- "prepublishOnly": "npm run test && npm run build",
18
+ "build": "rimraf dist && npm run build:cjs && npm run build:esm",
19
+ "build:cjs": "tsc --project tsconfig.cjs.json",
20
+ "build:esm": "tsc --project tsconfig.esm.json",
21
+ "test": "vitest run --coverage",
22
+ "prepublishOnly": " npm run build",
12
23
  "build:ldo": "ldo build --input src/.shapes --output src/.ldo",
13
- "lint": "eslint src/** --fix --no-error-on-unmatched-pattern",
14
- "test:integration": "start-server-and-test start-test-server http://localhost:3003 start-integration-test",
15
- "start-test-server": "ts-node ./test/test-server/runServer.ts",
16
- "start-integration-test": "jest --coverage"
24
+ "lint": "eslint src/** --fix --no-error-on-unmatched-pattern"
17
25
  },
18
26
  "repository": {
19
27
  "type": "git",
20
- "url": "git+https://github.com/o-development/ldobjects.git"
28
+ "url": "git+https://github.com/o-development/ldo.git"
21
29
  },
22
30
  "author": "Jackson Morgan",
23
31
  "license": "MIT",
24
32
  "bugs": {
25
- "url": "https://github.com/o-development/ldobjects/issues"
33
+ "url": "https://github.com/o-development/ldo/issues"
26
34
  },
27
- "homepage": "https://github.com/o-development/ldobjects/tree/main/packages/solid-react#readme",
35
+ "homepage": "https://github.com/o-development/ldo/tree/main/packages/solid-react#readme",
28
36
  "devDependencies": {
29
- "@ldo/rdf-utils": "^1.0.0-alpha.2",
37
+ "@ldo/rdf-utils": "^1.0.0-alpha.19",
38
+ "@ldo/test-solid-server": "^1.0.0-alpha.14",
30
39
  "@rdfjs/types": "^1.0.1",
31
40
  "@testing-library/react": "^14.1.2",
32
41
  "jest-environment-jsdom": "^29.7.0",
@@ -34,8 +43,8 @@
34
43
  "ts-node": "^10.9.2"
35
44
  },
36
45
  "dependencies": {
37
- "@ldo/connected-solid": "^1.0.0-alpha.2",
38
- "@ldo/solid-react": "^1.0.0-alpha.2"
46
+ "@ldo/connected-solid": "^1.0.0-alpha.20",
47
+ "@ldo/solid-react": "^1.0.0-alpha.20"
39
48
  },
40
49
  "files": [
41
50
  "dist",
@@ -44,5 +53,5 @@
44
53
  "publishConfig": {
45
54
  "access": "public"
46
55
  },
47
- "gitHead": "ba5cbcfa79af530258cad3b7ae1478a6673befea"
56
+ "gitHead": "a79dba9bc06c9d3cf8548981e423d45a1be2b52f"
48
57
  }
@@ -1,7 +1,7 @@
1
1
  import { ShapeType } from "@ldo/ldo";
2
- import { profileSchema } from "./profile.schema";
3
- import { profileContext } from "./profile.context";
4
- import { TypeIndexProfile } from "./profile.typings";
2
+ import { profileSchema } from "./profile.schema.js";
3
+ import { profileContext } from "./profile.context.js";
4
+ import { TypeIndexProfile } from "./profile.typings.js";
5
5
 
6
6
  /**
7
7
  * =============================================================================
@@ -1,7 +1,7 @@
1
1
  import { ShapeType } from "@ldo/ldo";
2
- import { typeIndexSchema } from "./typeIndex.schema";
3
- import { typeIndexContext } from "./typeIndex.context";
4
- import { TypeIndexDocument, TypeRegistration } from "./typeIndex.typings";
2
+ import { typeIndexSchema } from "./typeIndex.schema.js";
3
+ import { typeIndexContext } from "./typeIndex.context.js";
4
+ import { TypeIndexDocument, TypeRegistration } from "./typeIndex.typings.js";
5
5
 
6
6
  /**
7
7
  * =============================================================================