@twin.org/data-json-ld 0.0.1-next.14 → 0.0.1-next.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/data-json-ld - Changelog
2
2
 
3
- ## v0.0.1-next.14
3
+ ## v0.0.1-next.15
4
4
 
5
5
  - Initial Release
@@ -26,15 +26,21 @@ Validate a JSON-LD document.
26
26
 
27
27
  #### Parameters
28
28
 
29
- **document**: `T`
29
+ ##### document
30
+
31
+ `T`
30
32
 
31
33
  The JSON-LD document to validate.
32
34
 
33
- **validationFailures**: `IValidationFailure`[]
35
+ ##### validationFailures
36
+
37
+ `IValidationFailure`[]
34
38
 
35
39
  The list of validation failures to add to.
36
40
 
37
- **validationMode?**: `ValidationMode`
41
+ ##### validationMode?
42
+
43
+ `ValidationMode`
38
44
 
39
45
  The validation mode to use, defaults to either.
40
46
 
@@ -22,7 +22,9 @@ The document loader to use.
22
22
 
23
23
  #### Parameters
24
24
 
25
- **url**: `string`
25
+ ##### url
26
+
27
+ `string`
26
28
 
27
29
  #### Returns
28
30
 
@@ -38,11 +40,15 @@ Compact a document according to a particular context.
38
40
 
39
41
  #### Parameters
40
42
 
41
- **document**: [`IJsonLdDocument`](../type-aliases/IJsonLdDocument.md)
43
+ ##### document
44
+
45
+ [`IJsonLdDocument`](../type-aliases/IJsonLdDocument.md)
42
46
 
43
47
  The JSON-LD document to compact.
44
48
 
45
- **context?**: [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
49
+ ##### context?
50
+
51
+ [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
46
52
 
47
53
  The context to compact the document to, if not provided will try and gather from the object.
48
54
 
@@ -62,7 +68,9 @@ Expand a document, removing its context.
62
68
 
63
69
  #### Parameters
64
70
 
65
- **compacted**: [`IJsonLdDocument`](../type-aliases/IJsonLdDocument.md)
71
+ ##### compacted
72
+
73
+ [`IJsonLdDocument`](../type-aliases/IJsonLdDocument.md)
66
74
 
67
75
  The compacted JSON-LD document to expand.
68
76
 
@@ -82,11 +90,15 @@ Add a redirect to use during document resolution.
82
90
 
83
91
  #### Parameters
84
92
 
85
- **from**: `RegExp`
93
+ ##### from
94
+
95
+ `RegExp`
86
96
 
87
97
  The URL to redirect from.
88
98
 
89
- **to**: `string`
99
+ ##### to
100
+
101
+ `string`
90
102
 
91
103
  The URL to redirect to.
92
104
 
@@ -104,14 +116,18 @@ Combine contexts.
104
116
 
105
117
  #### Parameters
106
118
 
107
- **context1**: `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
119
+ ##### context1
108
120
 
109
121
  The first JSON-LD context to combine.
110
122
 
111
- • **context2**: `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
123
+ `undefined` | [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
124
+
125
+ ##### context2
112
126
 
113
127
  The second JSON-LD context to combine.
114
128
 
129
+ `undefined` | [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
130
+
115
131
  #### Returns
116
132
 
117
133
  `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
@@ -128,11 +144,13 @@ Gather all the contexts from the element and it's children.
128
144
 
129
145
  #### Parameters
130
146
 
131
- **element**
147
+ ##### element
132
148
 
133
149
  The element to gather the contexts from.
134
150
 
135
- **initial?**: [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
151
+ ##### initial?
152
+
153
+ [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
136
154
 
137
155
  The initial context.
138
156
 
@@ -152,11 +170,15 @@ Remove all the contexts that match the pattern.
152
170
 
153
171
  #### Parameters
154
172
 
155
- **context**: `undefined` \| [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
173
+ ##### context
156
174
 
157
175
  The context to remove the entries from.
158
176
 
159
- **match?**: [`IJsonLdContextDefinitionElement`](../type-aliases/IJsonLdContextDefinitionElement.md)[]
177
+ `undefined` | [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md)
178
+
179
+ ##### match?
180
+
181
+ [`IJsonLdContextDefinitionElement`](../type-aliases/IJsonLdContextDefinitionElement.md)[]
160
182
 
161
183
  The element to try and match.
162
184
 
@@ -8,7 +8,7 @@ https://www.w3.org/TR/json-ld11/#context-definitions
8
8
 
9
9
  ## Indexable
10
10
 
11
- \[`key`: `string`\]: `null` \| `string` \| [`IJsonLdExpandedTermDefinition`](../type-aliases/IJsonLdExpandedTermDefinition.md) \| [`IJsonLdContextDefinition`](IJsonLdContextDefinition.md)\[keyof [`IJsonLdContextDefinition`](IJsonLdContextDefinition.md)\]
11
+ \[`key`: `string`\]: `undefined` \| `null` \| `string` \| `boolean` \| [`IJsonLdExpandedTermDefinition`](../type-aliases/IJsonLdExpandedTermDefinition.md) \| \{ `@container`: `"@set"`; `@protected`: `boolean`; \}
12
12
 
13
13
  ## Properties
14
14
 
@@ -8,4 +8,4 @@ https://www.w3.org/TR/json-ld11/#id-maps
8
8
 
9
9
  ## Indexable
10
10
 
11
- \[`key`: `string`\]: [`IJsonLdNodeObject`](IJsonLdNodeObject.md)
11
+ \[`key`: `string`\]: [`IJsonLdNodeObject`](IJsonLdNodeObject.md)
@@ -9,4 +9,4 @@ https://www.w3.org/TR/json-ld11/#index-maps
9
9
 
10
10
  ## Indexable
11
11
 
12
- \[`key`: `string`\]: [`IJsonLdIndexMapItem`](../type-aliases/IJsonLdIndexMapItem.md) \| [`IJsonLdIndexMapItem`](../type-aliases/IJsonLdIndexMapItem.md)[]
12
+ \[`key`: `string`\]: [`IJsonLdIndexMapItem`](../type-aliases/IJsonLdIndexMapItem.md) \| [`IJsonLdIndexMapItem`](../type-aliases/IJsonLdIndexMapItem.md)[]
@@ -2,4 +2,4 @@
2
2
 
3
3
  ## Indexable
4
4
 
5
- \[`key`: `string`\]: [`IJsonLdJsonValue`](../type-aliases/IJsonLdJsonValue.md) \| `undefined`
5
+ \[`key`: `string`\]: `undefined` \| [`IJsonLdJsonValue`](../type-aliases/IJsonLdJsonValue.md)
@@ -8,4 +8,4 @@ https://www.w3.org/TR/json-ld11/#language-maps
8
8
 
9
9
  ## Indexable
10
10
 
11
- \[`key`: `string`\]: `null` \| `string` \| `string`[]
11
+ \[`key`: `string`\]: `null` \| `string` \| `string`[]
@@ -13,7 +13,7 @@ https://www.w3.org/TR/json-ld11/#node-objects
13
13
 
14
14
  ## Indexable
15
15
 
16
- \[`key`: `string`\]: [`IJsonLdNodePrimitive`](../type-aliases/IJsonLdNodePrimitive.md) \| [`IJsonLdNodePrimitive`](../type-aliases/IJsonLdNodePrimitive.md)[] \| [`IJsonLdLanguageMap`](IJsonLdLanguageMap.md) \| [`IJsonLdIndexMap`](IJsonLdIndexMap.md) \| [`IJsonLdIncludedBlock`](../type-aliases/IJsonLdIncludedBlock.md) \| [`IJsonLdIdMap`](IJsonLdIdMap.md) \| [`IJsonLdTypeMap`](IJsonLdTypeMap.md) \| [`IJsonLdNodeObject`](IJsonLdNodeObject.md)\[keyof [`IJsonLdNodeObject`](IJsonLdNodeObject.md)\]
16
+ \[`key`: `string`\]: `undefined` \| `null` \| `string` \| `number` \| `boolean` \| `string`[] \| [`IJsonLdNodeObject`](IJsonLdNodeObject.md) \| [`IJsonLdContextDefinition`](IJsonLdContextDefinition.md) \| [`IJsonLdContextDefinitionElement`](../type-aliases/IJsonLdContextDefinitionElement.md)[] \| `object` & `object` \| `object` & `object` \| `object` & `object` \| [`IJsonLdNodeObject`](IJsonLdNodeObject.md)[] \| [`IJsonLdGraphObject`](IJsonLdGraphObject.md) \| [`IJsonLdListObject`](IJsonLdListObject.md) \| [`IJsonLdSetObject`](IJsonLdSetObject.md) \| [`IJsonLdNodePrimitive`](../type-aliases/IJsonLdNodePrimitive.md)[] \| [`IJsonLdLanguageMap`](IJsonLdLanguageMap.md) \| [`IJsonLdIndexMap`](IJsonLdIndexMap.md) \| [`IJsonLdIdMap`](IJsonLdIdMap.md) \| [`IJsonLdTypeMap`](IJsonLdTypeMap.md) \| \{\} \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md) \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md)[]
17
17
 
18
18
  ## Properties
19
19
 
@@ -83,7 +83,7 @@ https://www.w3.org/TR/json-ld11/#node-objects
83
83
 
84
84
  #### Index Signature
85
85
 
86
- \[`key`: `string`\]: [`IJsonLdKeyword`](../type-aliases/IJsonLdKeyword.md)\[`"@reverse"`\]
86
+ \[`key`: `string`\]: `string`
87
87
 
88
88
  #### Inherited from
89
89
 
@@ -55,7 +55,7 @@ https://www.w3.org/TR/json-ld11/#node-objects
55
55
 
56
56
  #### Index Signature
57
57
 
58
- \[`key`: `string`\]: [`IJsonLdKeyword`](../type-aliases/IJsonLdKeyword.md)\[`"@reverse"`\]
58
+ \[`key`: `string`\]: `string`
59
59
 
60
60
  ***
61
61
 
@@ -8,4 +8,4 @@ https://www.w3.org/TR/json-ld11/#type-maps
8
8
 
9
9
  ## Indexable
10
10
 
11
- \[`key`: `string`\]: `string` \| [`IJsonLdNodeObject`](IJsonLdNodeObject.md)
11
+ \[`key`: `string`\]: `string` \| [`IJsonLdNodeObject`](IJsonLdNodeObject.md)
@@ -1,3 +1,3 @@
1
1
  # Type Alias: IJsonLdContainerTypeArray
2
2
 
3
- > **IJsonLdContainerTypeArray**: [`"@graph"`, `"@id"`] \| [`"@id"`, `"@graph"`] \| [`"@set"`, `"@graph"`, `"@id"`] \| [`"@set"`, `"@id"`, `"@graph"`] \| [`"@graph"`, `"@set"`, `"@id"`] \| [`"@id"`, `"@set"`, `"@graph"`] \| [`"@graph"`, `"@id"`, `"@set"`] \| [`"@id"`, `"@graph"`, `"@set"`] \| [`"@set"`, [`IJsonLdContainerType`](IJsonLdContainerType.md)] \| [[`IJsonLdContainerType`](IJsonLdContainerType.md), `"@set"`]
3
+ > **IJsonLdContainerTypeArray**: \[`"@graph"`, `"@id"`\] \| \[`"@id"`, `"@graph"`\] \| \[`"@set"`, `"@graph"`, `"@id"`\] \| \[`"@set"`, `"@id"`, `"@graph"`\] \| \[`"@graph"`, `"@set"`, `"@id"`\] \| \[`"@id"`, `"@set"`, `"@graph"`\] \| \[`"@graph"`, `"@id"`, `"@set"`\] \| \[`"@id"`, `"@graph"`, `"@set"`\] \| \[`"@set"`, [`IJsonLdContainerType`](IJsonLdContainerType.md)\] \| \[[`IJsonLdContainerType`](IJsonLdContainerType.md), `"@set"`\]
@@ -1,6 +1,6 @@
1
1
  # Type Alias: IJsonLdDocument
2
2
 
3
- > **IJsonLdDocument**: [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md)[] \| `object`
3
+ > **IJsonLdDocument**: [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md)[] \| \{ `@context`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@context"`\]; `@graph`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@graph"`\]; \}
4
4
 
5
5
  A JSON-LD document MUST be valid JSON text as described in [RFC8259],
6
6
  or some format that can be represented in the JSON-LD internal representation
@@ -1,6 +1,6 @@
1
1
  # Type Alias: IJsonLdExpandedTermDefinition
2
2
 
3
- > **IJsonLdExpandedTermDefinition**: `object` & `object` \| `object`
3
+ > **IJsonLdExpandedTermDefinition**: `object` & \{ `@id`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@id"`\] \| `null`; `@nest`: `"@nest"` \| `string`; `@container`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@container"`\]; \} \| \{ `@reverse`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@reverse"`\]; `@container`: `"@set"` \| `"@index"` \| `null`; \}
4
4
 
5
5
  An expanded term definition is used to describe the mapping between a term
6
6
  and its expanded identifier, as well as other properties of the value
@@ -1,6 +1,6 @@
1
1
  # Type Alias: IJsonLdValueObject
2
2
 
3
- > **IJsonLdValueObject**: `object` & `object` \| `object` \| `object`
3
+ > **IJsonLdValueObject**: `object` & \{ `@value`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@value"`\]; `@language`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@language"`\]; `@direction`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@direction"`\]; \} \| \{ `@value`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@value"`\]; `@type`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@type"`\]; \} \| \{ `@value`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@value"`\] \| [`IJsonLdJsonObject`](../interfaces/IJsonLdJsonObject.md) \| [`IJsonLdJsonArray`](IJsonLdJsonArray.md); `@type`: `"@json"`; \}
4
4
 
5
5
  A value object is used to explicitly associate a type or a language with a value
6
6
  to create a typed value or a language-tagged string and possibly associate a base direction.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/data-json-ld",
3
- "version": "0.0.1-next.14",
3
+ "version": "0.0.1-next.15",
4
4
  "description": "Models which define the structure of JSON LD",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,13 +15,13 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@twin.org/core": "next",
18
- "@twin.org/data-core": "0.0.1-next.14",
18
+ "@twin.org/data-core": "0.0.1-next.15",
19
19
  "@twin.org/entity": "next",
20
20
  "@twin.org/nameof": "next",
21
21
  "@twin.org/web": "next",
22
22
  "@types/json-schema": "7.0.15",
23
23
  "@types/jsonld": "1.5.15",
24
- "jsonld": "8.3.2"
24
+ "jsonld": "8.3.3"
25
25
  },
26
26
  "main": "./dist/cjs/index.cjs",
27
27
  "module": "./dist/esm/index.mjs",