@twin.org/data-json-ld 0.0.2-next.3 → 0.0.3-next.1
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/dist/es/dataTypes/jsonLdDataTypes.js +171 -0
- package/dist/es/dataTypes/jsonLdDataTypes.js.map +1 -0
- package/dist/es/index.js +33 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IJsonLdContainerType.js +4 -0
- package/dist/es/models/IJsonLdContainerType.js.map +1 -0
- package/dist/es/models/IJsonLdContainerTypeArray.js +2 -0
- package/dist/es/models/IJsonLdContainerTypeArray.js.map +1 -0
- package/dist/es/models/IJsonLdContextDefinition.js +2 -0
- package/dist/es/models/IJsonLdContextDefinition.js.map +1 -0
- package/dist/es/models/IJsonLdContextDefinitionElement.js +2 -0
- package/dist/es/models/IJsonLdContextDefinitionElement.js.map +1 -0
- package/dist/es/models/IJsonLdContextDefinitionRoot.js +2 -0
- package/dist/es/models/IJsonLdContextDefinitionRoot.js.map +1 -0
- package/dist/es/models/IJsonLdDocument.js +2 -0
- package/dist/es/models/IJsonLdDocument.js.map +1 -0
- package/dist/es/models/IJsonLdExpandedTermDefinition.js +2 -0
- package/dist/es/models/IJsonLdExpandedTermDefinition.js.map +1 -0
- package/dist/es/models/IJsonLdGraphObject.js +2 -0
- package/dist/es/models/IJsonLdGraphObject.js.map +1 -0
- package/dist/es/models/IJsonLdIdMap.js +2 -0
- package/dist/es/models/IJsonLdIdMap.js.map +1 -0
- package/dist/es/models/IJsonLdIncludedBlock.js +2 -0
- package/dist/es/models/IJsonLdIncludedBlock.js.map +1 -0
- package/dist/es/models/IJsonLdIndexMap.js +2 -0
- package/dist/es/models/IJsonLdIndexMap.js.map +1 -0
- package/dist/es/models/IJsonLdIndexMapItem.js +2 -0
- package/dist/es/models/IJsonLdIndexMapItem.js.map +1 -0
- package/dist/es/models/IJsonLdJsonArray.js +2 -0
- package/dist/es/models/IJsonLdJsonArray.js.map +1 -0
- package/dist/es/models/IJsonLdJsonObject.js +2 -0
- package/dist/es/models/IJsonLdJsonObject.js.map +1 -0
- package/dist/es/models/IJsonLdJsonPrimitive.js +4 -0
- package/dist/es/models/IJsonLdJsonPrimitive.js.map +1 -0
- package/dist/es/models/IJsonLdJsonValue.js +2 -0
- package/dist/es/models/IJsonLdJsonValue.js.map +1 -0
- package/dist/es/models/IJsonLdLanguageMap.js +4 -0
- package/dist/es/models/IJsonLdLanguageMap.js.map +1 -0
- package/dist/es/models/IJsonLdListObject.js +2 -0
- package/dist/es/models/IJsonLdListObject.js.map +1 -0
- package/dist/es/models/IJsonLdListOrSetItem.js +2 -0
- package/dist/es/models/IJsonLdListOrSetItem.js.map +1 -0
- package/dist/es/models/IJsonLdNodeObject.js +2 -0
- package/dist/es/models/IJsonLdNodeObject.js.map +1 -0
- package/dist/es/models/IJsonLdNodePrimitive.js +2 -0
- package/dist/es/models/IJsonLdNodePrimitive.js.map +1 -0
- package/dist/es/models/IJsonLdObject.js +2 -0
- package/dist/es/models/IJsonLdObject.js.map +1 -0
- package/dist/es/models/IJsonLdSetObject.js +2 -0
- package/dist/es/models/IJsonLdSetObject.js.map +1 -0
- package/dist/es/models/IJsonLdTypeMap.js +2 -0
- package/dist/es/models/IJsonLdTypeMap.js.map +1 -0
- package/dist/es/models/IJsonLdValueObject.js +2 -0
- package/dist/es/models/IJsonLdValueObject.js.map +1 -0
- package/dist/es/models/jsonLdContexts.js +13 -0
- package/dist/es/models/jsonLdContexts.js.map +1 -0
- package/dist/es/models/jsonLdTypes.js +113 -0
- package/dist/es/models/jsonLdTypes.js.map +1 -0
- package/dist/es/schemas/JsonLdContainerType.json +13 -0
- package/dist/es/schemas/JsonLdContainerTypeArray.json +179 -0
- package/dist/es/schemas/JsonLdContextDefinition.json +76 -0
- package/dist/es/schemas/JsonLdContextDefinitionElement.json +16 -0
- package/dist/es/schemas/JsonLdContextDefinitionRoot.json +16 -0
- package/dist/es/schemas/JsonLdDocument.json +48 -0
- package/dist/es/schemas/JsonLdExpandedTermDefinition.json +136 -0
- package/dist/es/schemas/JsonLdGraphObject.json +44 -0
- package/dist/es/schemas/JsonLdIdMap.json +9 -0
- package/dist/es/schemas/JsonLdIncludedBlock.json +16 -0
- package/dist/es/schemas/JsonLdIndexMap.json +19 -0
- package/dist/es/schemas/JsonLdIndexMapItem.json +31 -0
- package/dist/es/schemas/JsonLdJsonArray.json +9 -0
- package/dist/es/schemas/JsonLdJsonObject.json +16 -0
- package/dist/es/schemas/JsonLdJsonPrimitive.json +11 -0
- package/dist/es/schemas/JsonLdJsonValue.json +16 -0
- package/dist/es/schemas/JsonLdLanguageMap.json +22 -0
- package/dist/es/schemas/JsonLdListObject.json +28 -0
- package/dist/es/schemas/JsonLdListOrSetItem.json +25 -0
- package/dist/es/schemas/JsonLdNodeObject.json +100 -0
- package/dist/es/schemas/JsonLdNodePrimitive.json +34 -0
- package/dist/es/schemas/JsonLdObject.json +76 -0
- package/dist/es/schemas/JsonLdSetObject.json +28 -0
- package/dist/es/schemas/JsonLdTypeMap.json +16 -0
- package/dist/es/schemas/JsonLdValueObject.json +113 -0
- package/dist/es/utils/jsonLdHelper.js +79 -0
- package/dist/es/utils/jsonLdHelper.js.map +1 -0
- package/dist/es/utils/jsonLdProcessor.js +375 -0
- package/dist/es/utils/jsonLdProcessor.js.map +1 -0
- package/dist/types/index.d.ts +30 -30
- package/dist/types/models/IJsonLdContainerTypeArray.d.ts +1 -1
- package/dist/types/models/IJsonLdContextDefinition.d.ts +1 -1
- package/dist/types/models/IJsonLdContextDefinitionElement.d.ts +1 -1
- package/dist/types/models/IJsonLdContextDefinitionRoot.d.ts +1 -1
- package/dist/types/models/IJsonLdDocument.d.ts +3 -3
- package/dist/types/models/IJsonLdExpandedTermDefinition.d.ts +3 -3
- package/dist/types/models/IJsonLdGraphObject.d.ts +2 -2
- package/dist/types/models/IJsonLdIdMap.d.ts +1 -1
- package/dist/types/models/IJsonLdIncludedBlock.d.ts +1 -1
- package/dist/types/models/IJsonLdIndexMap.d.ts +1 -1
- package/dist/types/models/IJsonLdIndexMapItem.d.ts +4 -4
- package/dist/types/models/IJsonLdJsonArray.d.ts +1 -1
- package/dist/types/models/IJsonLdJsonObject.d.ts +1 -1
- package/dist/types/models/IJsonLdJsonValue.d.ts +3 -3
- package/dist/types/models/IJsonLdListObject.d.ts +1 -1
- package/dist/types/models/IJsonLdListOrSetItem.d.ts +2 -2
- package/dist/types/models/IJsonLdNodeObject.d.ts +7 -7
- package/dist/types/models/IJsonLdNodePrimitive.d.ts +5 -5
- package/dist/types/models/IJsonLdObject.d.ts +4 -4
- package/dist/types/models/IJsonLdSetObject.d.ts +1 -1
- package/dist/types/models/IJsonLdTypeMap.d.ts +1 -1
- package/dist/types/models/IJsonLdValueObject.d.ts +3 -3
- package/dist/types/utils/jsonLdHelper.d.ts +8 -1
- package/dist/types/utils/jsonLdProcessor.d.ts +4 -4
- package/docs/changelog.md +45 -0
- package/docs/reference/classes/JsonLdHelper.md +28 -0
- package/docs/reference/classes/JsonLdProcessor.md +9 -9
- package/docs/reference/interfaces/IJsonLdContextDefinition.md +4 -4
- package/docs/reference/interfaces/IJsonLdJsonObject.md +1 -1
- package/docs/reference/interfaces/IJsonLdLanguageMap.md +1 -1
- package/docs/reference/interfaces/IJsonLdNodeObject.md +1 -1
- package/locales/.validate-ignore +1 -0
- package/package.json +19 -9
- package/dist/cjs/index.cjs +0 -2017
- package/dist/esm/index.mjs +0 -2011
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { IJsonLdIdMap } from "./IJsonLdIdMap";
|
|
2
|
-
import type { IJsonLdIncludedBlock } from "./IJsonLdIncludedBlock";
|
|
3
|
-
import type { IJsonLdIndexMap } from "./IJsonLdIndexMap";
|
|
4
|
-
import type { IJsonLdLanguageMap } from "./IJsonLdLanguageMap";
|
|
5
|
-
import type { IJsonLdNodePrimitive } from "./IJsonLdNodePrimitive";
|
|
6
|
-
import type { IJsonLdObject } from "./IJsonLdObject";
|
|
7
|
-
import type { IJsonLdTypeMap } from "./IJsonLdTypeMap";
|
|
1
|
+
import type { IJsonLdIdMap } from "./IJsonLdIdMap.js";
|
|
2
|
+
import type { IJsonLdIncludedBlock } from "./IJsonLdIncludedBlock.js";
|
|
3
|
+
import type { IJsonLdIndexMap } from "./IJsonLdIndexMap.js";
|
|
4
|
+
import type { IJsonLdLanguageMap } from "./IJsonLdLanguageMap.js";
|
|
5
|
+
import type { IJsonLdNodePrimitive } from "./IJsonLdNodePrimitive.js";
|
|
6
|
+
import type { IJsonLdObject } from "./IJsonLdObject.js";
|
|
7
|
+
import type { IJsonLdTypeMap } from "./IJsonLdTypeMap.js";
|
|
8
8
|
/**
|
|
9
9
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
10
10
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IJsonLdGraphObject } from "./IJsonLdGraphObject";
|
|
2
|
-
import type { IJsonLdListObject } from "./IJsonLdListObject";
|
|
3
|
-
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
|
|
4
|
-
import type { IJsonLdSetObject } from "./IJsonLdSetObject";
|
|
5
|
-
import type { IJsonLdValueObject } from "./IJsonLdValueObject";
|
|
1
|
+
import type { IJsonLdGraphObject } from "./IJsonLdGraphObject.js";
|
|
2
|
+
import type { IJsonLdListObject } from "./IJsonLdListObject.js";
|
|
3
|
+
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject.js";
|
|
4
|
+
import type { IJsonLdSetObject } from "./IJsonLdSetObject.js";
|
|
5
|
+
import type { IJsonLdValueObject } from "./IJsonLdValueObject.js";
|
|
6
6
|
/**
|
|
7
7
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
8
8
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
|
|
2
|
-
import type { IJsonLdIncludedBlock } from "./IJsonLdIncludedBlock";
|
|
3
|
-
import type { IJsonLdJsonObject } from "./IJsonLdJsonObject";
|
|
4
|
-
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
|
|
1
|
+
import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot.js";
|
|
2
|
+
import type { IJsonLdIncludedBlock } from "./IJsonLdIncludedBlock.js";
|
|
3
|
+
import type { IJsonLdJsonObject } from "./IJsonLdJsonObject.js";
|
|
4
|
+
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject.js";
|
|
5
5
|
/**
|
|
6
6
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
7
7
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IJsonLdListOrSetItem } from "./IJsonLdListOrSetItem";
|
|
1
|
+
import type { IJsonLdListOrSetItem } from "./IJsonLdListOrSetItem.js";
|
|
2
2
|
/**
|
|
3
3
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
4
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
|
|
1
|
+
import type { IJsonLdNodeObject } from "./IJsonLdNodeObject.js";
|
|
2
2
|
/**
|
|
3
3
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
4
4
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
|
|
2
|
-
import type { IJsonLdJsonArray } from "./IJsonLdJsonArray";
|
|
3
|
-
import type { IJsonLdJsonObject } from "./IJsonLdJsonObject";
|
|
1
|
+
import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot.js";
|
|
2
|
+
import type { IJsonLdJsonArray } from "./IJsonLdJsonArray.js";
|
|
3
|
+
import type { IJsonLdJsonObject } from "./IJsonLdJsonObject.js";
|
|
4
4
|
/**
|
|
5
5
|
* This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
|
|
6
6
|
* that are used in other packages cannot understand some of the types e.g. OrArray
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type IValidationFailure } from "@twin.org/core";
|
|
2
2
|
import { type ValidationMode } from "@twin.org/data-core";
|
|
3
|
-
import type { IJsonLdDocument } from "../models/IJsonLdDocument";
|
|
3
|
+
import type { IJsonLdDocument } from "../models/IJsonLdDocument.js";
|
|
4
4
|
/**
|
|
5
5
|
* Class to help with JSON LD.
|
|
6
6
|
*/
|
|
@@ -18,4 +18,11 @@ export declare class JsonLdHelper {
|
|
|
18
18
|
validationMode?: ValidationMode;
|
|
19
19
|
failOnMissingType?: boolean;
|
|
20
20
|
}): Promise<boolean>;
|
|
21
|
+
/**
|
|
22
|
+
* Expand the JSON-LD document and check if it is of a specific type.
|
|
23
|
+
* @param document The JSON-LD document to check.
|
|
24
|
+
* @param type The type to check for.
|
|
25
|
+
* @returns True if the document is of the specified type.
|
|
26
|
+
*/
|
|
27
|
+
static isType(document: IJsonLdDocument, type: string[]): Promise<boolean>;
|
|
21
28
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { RemoteDocument, Url } from "jsonld/jsonld-spec";
|
|
2
|
-
import type { IJsonLdContextDefinitionElement } from "../models/IJsonLdContextDefinitionElement";
|
|
3
|
-
import type { IJsonLdContextDefinitionRoot } from "../models/IJsonLdContextDefinitionRoot";
|
|
4
|
-
import type { IJsonLdNodeObject } from "../models/IJsonLdNodeObject";
|
|
1
|
+
import type { RemoteDocument, Url } from "jsonld/jsonld-spec.js";
|
|
2
|
+
import type { IJsonLdContextDefinitionElement } from "../models/IJsonLdContextDefinitionElement.js";
|
|
3
|
+
import type { IJsonLdContextDefinitionRoot } from "../models/IJsonLdContextDefinitionRoot.js";
|
|
4
|
+
import type { IJsonLdNodeObject } from "../models/IJsonLdNodeObject.js";
|
|
5
5
|
/**
|
|
6
6
|
* JSON-LD Processor.
|
|
7
7
|
*/
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @twin.org/data-json-ld - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.1](https://github.com/twinfoundation/data/compare/data-json-ld-v0.0.3-next.0...data-json-ld-v0.0.3-next.1) (2025-11-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add context id features ([#25](https://github.com/twinfoundation/data/issues/25)) ([6592f2e](https://github.com/twinfoundation/data/commit/6592f2e4e59021cc42a079a4f46242758a54313d))
|
|
9
|
+
* add document cache access methods ([dbf1e36](https://github.com/twinfoundation/data/commit/dbf1e36d176c5f428f8c52628fb5a1ff7a6a174a))
|
|
10
|
+
* add fail on missing type option and both mode ([e8b9702](https://github.com/twinfoundation/data/commit/e8b97029a04b646497ff0e55b9610291e58ae92a))
|
|
11
|
+
* add validate-locales ([cf9b761](https://github.com/twinfoundation/data/commit/cf9b76160820fe0b13b4fe56ed241c1d5511b7c1))
|
|
12
|
+
* eslint migration to flat config ([b0db6e6](https://github.com/twinfoundation/data/commit/b0db6e69a90046fc60d29e4273fcdfee13c16088))
|
|
13
|
+
* expand Json LD Keyword ([70632d1](https://github.com/twinfoundation/data/commit/70632d1e11ad85cf3c57e118476b125a673f1681))
|
|
14
|
+
* support multiple type JSON-LD ([8f0d530](https://github.com/twinfoundation/data/commit/8f0d530f66302ab19413ecf968f170f97456e31e))
|
|
15
|
+
* update framework core ([c077b8c](https://github.com/twinfoundation/data/commit/c077b8c07e7ee66b5482254eab6f2a52cd911270))
|
|
16
|
+
* update ts-to-schema ([8c3cd91](https://github.com/twinfoundation/data/commit/8c3cd9131113f2d609f6e709562402e5c7766c1a))
|
|
17
|
+
* use fully qualified names for data type lookups ([b7b5c74](https://github.com/twinfoundation/data/commit/b7b5c746b0180a87baa976f6a7a76cedd53d8ff7))
|
|
18
|
+
* use shared store mechanism ([#3](https://github.com/twinfoundation/data/issues/3)) ([33eb221](https://github.com/twinfoundation/data/commit/33eb221ccec2b4a79549c06e9a04225009b93a46))
|
|
19
|
+
* use updated Is.function ([46a4715](https://github.com/twinfoundation/data/commit/46a4715f995aea34f2011138662fe003c9727d07))
|
|
20
|
+
* use updated JSON schema specs ([465223a](https://github.com/twinfoundation/data/commit/465223a9e9c24af546480ef084327a78fa366eaa))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* itemListElement compaction override ([d908a10](https://github.com/twinfoundation/data/commit/d908a1043d7792e31b3101221d17850757b6c2a6))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Dependencies
|
|
29
|
+
|
|
30
|
+
* The following workspace dependencies were updated
|
|
31
|
+
* dependencies
|
|
32
|
+
* @twin.org/data-core bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
33
|
+
|
|
34
|
+
## [0.0.2-next.4](https://github.com/twinfoundation/data/compare/data-json-ld-v0.0.2-next.3...data-json-ld-v0.0.2-next.4) (2025-10-09)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* add validate-locales ([cf9b761](https://github.com/twinfoundation/data/commit/cf9b76160820fe0b13b4fe56ed241c1d5511b7c1))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
### Dependencies
|
|
43
|
+
|
|
44
|
+
* The following workspace dependencies were updated
|
|
45
|
+
* dependencies
|
|
46
|
+
* @twin.org/data-core bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
47
|
+
|
|
3
48
|
## [0.0.2-next.3](https://github.com/twinfoundation/data/compare/data-json-ld-v0.0.2-next.2...data-json-ld-v0.0.2-next.3) (2025-09-29)
|
|
4
49
|
|
|
5
50
|
|
|
@@ -61,3 +61,31 @@ If true, will fail validation if the data type is missing, defaults to false.
|
|
|
61
61
|
`Promise`\<`boolean`\>
|
|
62
62
|
|
|
63
63
|
True if the document was valid.
|
|
64
|
+
|
|
65
|
+
***
|
|
66
|
+
|
|
67
|
+
### isType()
|
|
68
|
+
|
|
69
|
+
> `static` **isType**(`document`, `type`): `Promise`\<`boolean`\>
|
|
70
|
+
|
|
71
|
+
Expand the JSON-LD document and check if it is of a specific type.
|
|
72
|
+
|
|
73
|
+
#### Parameters
|
|
74
|
+
|
|
75
|
+
##### document
|
|
76
|
+
|
|
77
|
+
[`IJsonLdDocument`](../type-aliases/IJsonLdDocument.md)
|
|
78
|
+
|
|
79
|
+
The JSON-LD document to check.
|
|
80
|
+
|
|
81
|
+
##### type
|
|
82
|
+
|
|
83
|
+
`string`[]
|
|
84
|
+
|
|
85
|
+
The type to check for.
|
|
86
|
+
|
|
87
|
+
#### Returns
|
|
88
|
+
|
|
89
|
+
`Promise`\<`boolean`\>
|
|
90
|
+
|
|
91
|
+
True if the document is of the specified type.
|
|
@@ -264,7 +264,7 @@ The URL to redirect to.
|
|
|
264
264
|
|
|
265
265
|
### combineContexts()
|
|
266
266
|
|
|
267
|
-
> `static` **combineContexts**(`context1`, `context2`):
|
|
267
|
+
> `static` **combineContexts**(`context1`, `context2`): [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md) \| `undefined`
|
|
268
268
|
|
|
269
269
|
Combine contexts.
|
|
270
270
|
|
|
@@ -274,17 +274,17 @@ Combine contexts.
|
|
|
274
274
|
|
|
275
275
|
The first JSON-LD context to combine.
|
|
276
276
|
|
|
277
|
-
|
|
277
|
+
[`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md) | `undefined`
|
|
278
278
|
|
|
279
279
|
##### context2
|
|
280
280
|
|
|
281
281
|
The second JSON-LD context to combine.
|
|
282
282
|
|
|
283
|
-
|
|
283
|
+
[`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md) | `undefined`
|
|
284
284
|
|
|
285
285
|
#### Returns
|
|
286
286
|
|
|
287
|
-
|
|
287
|
+
[`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md) \| `undefined`
|
|
288
288
|
|
|
289
289
|
The combined context.
|
|
290
290
|
|
|
@@ -292,7 +292,7 @@ The combined context.
|
|
|
292
292
|
|
|
293
293
|
### gatherContexts()
|
|
294
294
|
|
|
295
|
-
> `static` **gatherContexts**\<`T`\>(`element`, `initial?`):
|
|
295
|
+
> `static` **gatherContexts**\<`T`\>(`element`, `initial?`): [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md) \| `undefined`
|
|
296
296
|
|
|
297
297
|
Gather all the contexts from the element and it's children.
|
|
298
298
|
|
|
@@ -318,7 +318,7 @@ The initial context.
|
|
|
318
318
|
|
|
319
319
|
#### Returns
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
[`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md) \| `undefined`
|
|
322
322
|
|
|
323
323
|
The combined contexts.
|
|
324
324
|
|
|
@@ -326,7 +326,7 @@ The combined contexts.
|
|
|
326
326
|
|
|
327
327
|
### removeContexts()
|
|
328
328
|
|
|
329
|
-
> `static` **removeContexts**(`context`, `match?`):
|
|
329
|
+
> `static` **removeContexts**(`context`, `match?`): [`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md) \| `undefined`
|
|
330
330
|
|
|
331
331
|
Remove all the contexts that match the pattern.
|
|
332
332
|
|
|
@@ -336,7 +336,7 @@ Remove all the contexts that match the pattern.
|
|
|
336
336
|
|
|
337
337
|
The context to remove the entries from.
|
|
338
338
|
|
|
339
|
-
|
|
339
|
+
[`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md) | `undefined`
|
|
340
340
|
|
|
341
341
|
##### match?
|
|
342
342
|
|
|
@@ -346,7 +346,7 @@ The element to try and match.
|
|
|
346
346
|
|
|
347
347
|
#### Returns
|
|
348
348
|
|
|
349
|
-
|
|
349
|
+
[`IJsonLdContextDefinitionRoot`](../type-aliases/IJsonLdContextDefinitionRoot.md) \| `undefined`
|
|
350
350
|
|
|
351
351
|
The updated contexts.
|
|
352
352
|
|
|
@@ -8,19 +8,19 @@ https://www.w3.org/TR/json-ld11/#context-definitions
|
|
|
8
8
|
|
|
9
9
|
## Indexable
|
|
10
10
|
|
|
11
|
-
\[`key`: `string`\]: `
|
|
11
|
+
\[`key`: `string`\]: `string` \| `boolean` \| [`IJsonLdExpandedTermDefinition`](../type-aliases/IJsonLdExpandedTermDefinition.md) \| \{ `@container`: `"@set"`; `@protected?`: `boolean`; \} \| `null` \| `undefined`
|
|
12
12
|
|
|
13
13
|
## Properties
|
|
14
14
|
|
|
15
15
|
### @base?
|
|
16
16
|
|
|
17
|
-
> `optional` **@base**: `
|
|
17
|
+
> `optional` **@base**: `string` \| `null`
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
21
|
### @direction?
|
|
22
22
|
|
|
23
|
-
> `optional` **@direction**: `
|
|
23
|
+
> `optional` **@direction**: `"ltr"` \| `"rtl"` \| `null`
|
|
24
24
|
|
|
25
25
|
***
|
|
26
26
|
|
|
@@ -70,4 +70,4 @@ https://www.w3.org/TR/json-ld11/#context-definitions
|
|
|
70
70
|
|
|
71
71
|
### @vocab?
|
|
72
72
|
|
|
73
|
-
> `optional` **@vocab**: `
|
|
73
|
+
> `optional` **@vocab**: `string` \| `null`
|
|
@@ -13,7 +13,7 @@ https://www.w3.org/TR/json-ld11/#node-objects
|
|
|
13
13
|
|
|
14
14
|
## Indexable
|
|
15
15
|
|
|
16
|
-
\[`key`: `string`\]: `
|
|
16
|
+
\[`key`: `string`\]: `string` \| `number` \| `boolean` \| `string`[] \| [`IJsonLdContextDefinition`](IJsonLdContextDefinition.md) \| [`IJsonLdContextDefinitionElement`](../type-aliases/IJsonLdContextDefinitionElement.md)[] \| [`IJsonLdIdMap`](IJsonLdIdMap.md) \| `IJsonLdNodeObject` \| `IJsonLdNodeObject`[] \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md) \| `object` & `object` \| `object` & `object` \| `object` & `object` \| [`IJsonLdListObject`](IJsonLdListObject.md) \| [`IJsonLdSetObject`](IJsonLdSetObject.md) \| [`IJsonLdIndexMap`](IJsonLdIndexMap.md) \| [`IJsonLdLanguageMap`](IJsonLdLanguageMap.md) \| [`IJsonLdGraphObject`](IJsonLdGraphObject.md) \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md)[] \| \{\[`key`: `string`\]: `string`; \} \| [`IJsonLdTypeMap`](IJsonLdTypeMap.md) \| [`IJsonLdNodePrimitive`](../type-aliases/IJsonLdNodePrimitive.md)[] \| `null` \| `undefined`
|
|
17
17
|
|
|
18
18
|
## Properties
|
|
19
19
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
^jsonld.InvalidUrl$
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/data-json-ld",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3-next.1",
|
|
4
4
|
"description": "Models which define the structure of JSON LD",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,29 +15,39 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/core": "next",
|
|
18
|
-
"@twin.org/data-core": "0.0.
|
|
18
|
+
"@twin.org/data-core": "0.0.3-next.1",
|
|
19
19
|
"@twin.org/entity": "next",
|
|
20
20
|
"@twin.org/nameof": "next",
|
|
21
21
|
"@twin.org/web": "next",
|
|
22
22
|
"@types/jsonld": "1.5.15",
|
|
23
23
|
"jsonld": "8.3.3"
|
|
24
24
|
},
|
|
25
|
-
"main": "./dist/
|
|
26
|
-
"module": "./dist/esm/index.mjs",
|
|
25
|
+
"main": "./dist/es/index.js",
|
|
27
26
|
"types": "./dist/types/index.d.ts",
|
|
28
27
|
"exports": {
|
|
29
28
|
".": {
|
|
30
29
|
"types": "./dist/types/index.d.ts",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
30
|
+
"import": "./dist/es/index.js",
|
|
31
|
+
"default": "./dist/es/index.js"
|
|
33
32
|
},
|
|
34
33
|
"./locales/*.json": "./locales/*.json"
|
|
35
34
|
},
|
|
36
35
|
"files": [
|
|
37
|
-
"dist/
|
|
38
|
-
"dist/esm",
|
|
36
|
+
"dist/es",
|
|
39
37
|
"dist/types",
|
|
40
38
|
"locales",
|
|
41
39
|
"docs"
|
|
42
|
-
]
|
|
40
|
+
],
|
|
41
|
+
"keywords": [
|
|
42
|
+
"twin",
|
|
43
|
+
"trade",
|
|
44
|
+
"iota",
|
|
45
|
+
"framework",
|
|
46
|
+
"blockchain",
|
|
47
|
+
"data"
|
|
48
|
+
],
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "git+https://github.com/twinfoundation/data/issues"
|
|
51
|
+
},
|
|
52
|
+
"homepage": "https://twindev.org"
|
|
43
53
|
}
|