@twin.org/data-json-ld 0.0.1-next.35 → 0.0.1-next.37

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.
@@ -15,7 +15,6 @@ export * from "./models/IJsonLdJsonArray";
15
15
  export * from "./models/IJsonLdJsonObject";
16
16
  export * from "./models/IJsonLdJsonPrimitive";
17
17
  export * from "./models/IJsonLdJsonValue";
18
- export * from "./models/IJsonLdKeyword";
19
18
  export * from "./models/IJsonLdLanguageMap";
20
19
  export * from "./models/IJsonLdListObject";
21
20
  export * from "./models/IJsonLdListOrSetItem";
@@ -3,6 +3,6 @@
3
3
  * that are used in other packages cannot understand some of the types e.g. OrArray
4
4
  */
5
5
  /**
6
- * Helper Types
6
+ * JSON-LD container types.
7
7
  */
8
8
  export type IJsonLdContainerType = "@language" | "@index" | "@id" | "@graph" | "@type";
@@ -4,6 +4,6 @@ import type { IJsonLdContainerType } from "./IJsonLdContainerType";
4
4
  * that are used in other packages cannot understand some of the types e.g. OrArray
5
5
  */
6
6
  /**
7
- * Helper Types.
7
+ * JSON-LD container type array.
8
8
  */
9
9
  export type 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, "@set"];
@@ -1,5 +1,4 @@
1
1
  import type { IJsonLdExpandedTermDefinition } from "./IJsonLdExpandedTermDefinition";
2
- import type { IJsonLdKeyword } from "./IJsonLdKeyword";
3
2
  /**
4
3
  * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
5
4
  * that are used in other packages cannot understand some of the types e.g. OrArray
@@ -10,16 +9,16 @@ import type { IJsonLdKeyword } from "./IJsonLdKeyword";
10
9
  */
11
10
  export interface IJsonLdContextDefinition {
12
11
  [key: string]: null | string | IJsonLdExpandedTermDefinition | IJsonLdContextDefinition[keyof IJsonLdContextDefinition];
13
- "@base"?: IJsonLdKeyword["@base"] | undefined;
14
- "@direction"?: IJsonLdKeyword["@direction"] | undefined;
15
- "@import"?: IJsonLdKeyword["@import"] | undefined;
16
- "@language"?: IJsonLdKeyword["@language"] | undefined;
17
- "@propagate"?: IJsonLdKeyword["@propagate"] | undefined;
18
- "@protected"?: IJsonLdKeyword["@protected"] | undefined;
12
+ "@base"?: string | null | undefined;
13
+ "@direction"?: "ltr" | "rtl" | null | undefined;
14
+ "@import"?: string | undefined;
15
+ "@language"?: string | undefined;
16
+ "@propagate"?: boolean | undefined;
17
+ "@protected"?: boolean | undefined;
19
18
  "@type"?: {
20
19
  "@container": "@set";
21
- "@protected"?: IJsonLdKeyword["@protected"] | undefined;
20
+ "@protected"?: boolean | undefined;
22
21
  } | undefined;
23
- "@version"?: IJsonLdKeyword["@version"] | undefined;
24
- "@vocab"?: IJsonLdKeyword["@vocab"] | undefined;
22
+ "@version"?: "1.1" | undefined;
23
+ "@vocab"?: string | null | undefined;
25
24
  }
@@ -1,5 +1,6 @@
1
- import type { IJsonLdKeyword } from "./IJsonLdKeyword";
1
+ import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
2
2
  import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
3
+ import type { IJsonLdValueObject } from "./IJsonLdValueObject";
3
4
  /**
4
5
  * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
5
6
  * that are used in other packages cannot understand some of the types e.g. OrArray
@@ -15,6 +16,6 @@ import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
15
16
  * @see https://www.w3.org/TR/json-ld11/#json-ld-grammar
16
17
  */
17
18
  export type IJsonLdDocument = IJsonLdNodeObject | IJsonLdNodeObject[] | {
18
- "@context"?: IJsonLdKeyword["@context"] | undefined;
19
- "@graph"?: IJsonLdKeyword["@graph"] | undefined;
19
+ "@context"?: IJsonLdContextDefinitionRoot | undefined;
20
+ "@graph"?: IJsonLdValueObject | IJsonLdNodeObject | (IJsonLdValueObject | IJsonLdNodeObject)[] | undefined;
20
21
  };
@@ -1,5 +1,6 @@
1
+ import type { IJsonLdContainerType } from "./IJsonLdContainerType";
2
+ import type { IJsonLdContainerTypeArray } from "./IJsonLdContainerTypeArray";
1
3
  import type { IJsonLdContextDefinition } from "./IJsonLdContextDefinition";
2
- import type { IJsonLdKeyword } from "./IJsonLdKeyword";
3
4
  /**
4
5
  * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
5
6
  * that are used in other packages cannot understand some of the types e.g. OrArray
@@ -12,17 +13,17 @@ import type { IJsonLdKeyword } from "./IJsonLdKeyword";
12
13
  */
13
14
  export type IJsonLdExpandedTermDefinition = {
14
15
  "@type"?: "@id" | "@json" | "@none" | "@vocab" | string | undefined;
15
- "@language"?: IJsonLdKeyword["@language"] | undefined;
16
- "@index"?: IJsonLdKeyword["@index"] | undefined;
16
+ "@language"?: string | undefined;
17
+ "@index"?: string | undefined;
17
18
  "@context"?: IJsonLdContextDefinition | undefined;
18
- "@prefix"?: IJsonLdKeyword["@prefix"] | undefined;
19
- "@propagate"?: IJsonLdKeyword["@propagate"] | undefined;
20
- "@protected"?: IJsonLdKeyword["@protected"] | undefined;
19
+ "@prefix"?: boolean | undefined;
20
+ "@propagate"?: boolean | undefined;
21
+ "@protected"?: boolean | undefined;
21
22
  } & ({
22
- "@id"?: IJsonLdKeyword["@id"] | null | undefined;
23
+ "@id"?: string | string[] | null | undefined;
23
24
  "@nest"?: "@nest" | string | undefined;
24
- "@container"?: IJsonLdKeyword["@container"] | undefined;
25
+ "@container"?: ("@list" | "@set" | IJsonLdContainerType) | ("@list" | "@set" | IJsonLdContainerType)[] | IJsonLdContainerTypeArray | null | undefined;
25
26
  } | {
26
- "@reverse": IJsonLdKeyword["@reverse"];
27
+ "@reverse": string;
27
28
  "@container"?: "@set" | "@index" | null | undefined;
28
29
  });
@@ -1,4 +1,4 @@
1
- import type { IJsonLdKeyword } from "./IJsonLdKeyword";
1
+ import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
2
2
  import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
3
3
  /**
4
4
  * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
@@ -10,7 +10,7 @@ import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
10
10
  */
11
11
  export interface IJsonLdGraphObject {
12
12
  "@graph": IJsonLdNodeObject | IJsonLdNodeObject[];
13
- "@index"?: IJsonLdKeyword["@index"] | undefined;
14
- "@id"?: IJsonLdKeyword["@id"] | undefined;
15
- "@context"?: IJsonLdKeyword["@context"] | undefined;
13
+ "@index"?: string | undefined;
14
+ "@id"?: string | string[] | undefined;
15
+ "@context"?: IJsonLdContextDefinitionRoot | undefined;
16
16
  }
@@ -1,4 +1,4 @@
1
- import type { IJsonLdKeyword } from "./IJsonLdKeyword";
1
+ import type { IJsonLdListOrSetItem } from "./IJsonLdListOrSetItem";
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
@@ -8,6 +8,6 @@ import type { IJsonLdKeyword } from "./IJsonLdKeyword";
8
8
  * @see https://www.w3.org/TR/json-ld11/#lists-and-sets
9
9
  */
10
10
  export interface IJsonLdListObject {
11
- "@list": IJsonLdKeyword["@list"];
12
- "@index"?: IJsonLdKeyword["@index"] | undefined;
11
+ "@list": IJsonLdListOrSetItem | IJsonLdListOrSetItem[];
12
+ "@index"?: string | undefined;
13
13
  }
@@ -1,5 +1,6 @@
1
+ import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
2
+ import type { IJsonLdIncludedBlock } from "./IJsonLdIncludedBlock";
1
3
  import type { IJsonLdJsonObject } from "./IJsonLdJsonObject";
2
- import type { IJsonLdKeyword } from "./IJsonLdKeyword";
3
4
  import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
4
5
  /**
5
6
  * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
@@ -11,14 +12,14 @@ import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
11
12
  * @see https://www.w3.org/TR/json-ld11/#node-objects
12
13
  */
13
14
  export interface IJsonLdObject {
14
- "@context"?: IJsonLdKeyword["@context"] | undefined;
15
- "@id"?: IJsonLdKeyword["@id"] | undefined;
16
- "@included"?: IJsonLdKeyword["@included"] | undefined;
15
+ "@context"?: IJsonLdContextDefinitionRoot | undefined;
16
+ "@id"?: string | string[] | undefined;
17
+ "@included"?: IJsonLdIncludedBlock | undefined;
17
18
  "@graph"?: IJsonLdNodeObject | IJsonLdNodeObject[] | undefined;
18
19
  "@nest"?: IJsonLdJsonObject | IJsonLdJsonObject[] | undefined;
19
- "@type"?: IJsonLdKeyword["@type"] | IJsonLdKeyword["@type"][] | undefined;
20
+ "@type"?: string | string[] | undefined;
20
21
  "@reverse"?: {
21
- [key: string]: IJsonLdKeyword["@reverse"];
22
+ [key: string]: string;
22
23
  } | undefined;
23
- "@index"?: IJsonLdKeyword["@index"] | undefined;
24
+ "@index"?: string | undefined;
24
25
  }
@@ -1,4 +1,4 @@
1
- import type { IJsonLdKeyword } from "./IJsonLdKeyword";
1
+ import type { IJsonLdListOrSetItem } from "./IJsonLdListOrSetItem";
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
@@ -8,6 +8,6 @@ import type { IJsonLdKeyword } from "./IJsonLdKeyword";
8
8
  * @see https://www.w3.org/TR/json-ld11/#lists-and-sets
9
9
  */
10
10
  export interface IJsonLdSetObject {
11
- "@set": IJsonLdKeyword["@set"];
12
- "@index"?: IJsonLdKeyword["@index"] | undefined;
11
+ "@set": IJsonLdListOrSetItem | IJsonLdListOrSetItem[];
12
+ "@index"?: string | undefined;
13
13
  }
@@ -1,6 +1,6 @@
1
+ import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
1
2
  import type { IJsonLdJsonArray } from "./IJsonLdJsonArray";
2
3
  import type { IJsonLdJsonObject } from "./IJsonLdJsonObject";
3
- import type { IJsonLdKeyword } from "./IJsonLdKeyword";
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
@@ -11,16 +11,16 @@ import type { IJsonLdKeyword } from "./IJsonLdKeyword";
11
11
  * @see https://www.w3.org/TR/json-ld11/#value-objects
12
12
  */
13
13
  export type IJsonLdValueObject = {
14
- "@index"?: IJsonLdKeyword["@index"] | undefined;
15
- "@context"?: IJsonLdKeyword["@context"] | undefined;
14
+ "@index"?: string | undefined;
15
+ "@context"?: IJsonLdContextDefinitionRoot | undefined;
16
16
  } & ({
17
- "@value": IJsonLdKeyword["@value"];
18
- "@language"?: IJsonLdKeyword["@language"] | undefined;
19
- "@direction"?: IJsonLdKeyword["@direction"] | undefined;
17
+ "@value": null | boolean | number | string;
18
+ "@language"?: string | undefined;
19
+ "@direction"?: "ltr" | "rtl" | null | undefined;
20
20
  } | {
21
- "@value": IJsonLdKeyword["@value"];
22
- "@type": IJsonLdKeyword["@type"];
21
+ "@value": null | boolean | number | string;
22
+ "@type": string;
23
23
  } | {
24
- "@value": IJsonLdKeyword["@value"] | IJsonLdJsonObject | IJsonLdJsonArray;
24
+ "@value": null | boolean | number | string | IJsonLdJsonObject | IJsonLdJsonArray;
25
25
  "@type": "@json";
26
26
  });
package/docs/changelog.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @twin.org/data-json-ld - Changelog
2
2
 
3
+ ## [0.0.1-next.37](https://github.com/twinfoundation/data/compare/data-json-ld-v0.0.1-next.36...data-json-ld-v0.0.1-next.37) (2025-06-11)
4
+
5
+
6
+ ### Features
7
+
8
+ * use updated JSON schema specs ([465223a](https://github.com/twinfoundation/data/commit/465223a9e9c24af546480ef084327a78fa366eaa))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/data-core bumped from 0.0.1-next.36 to 0.0.1-next.37
16
+
17
+ ## [0.0.1-next.36](https://github.com/twinfoundation/data/compare/data-json-ld-v0.0.1-next.35...data-json-ld-v0.0.1-next.36) (2025-06-10)
18
+
19
+
20
+ ### Features
21
+
22
+ * expand Json LD Keyword ([70632d1](https://github.com/twinfoundation/data/commit/70632d1e11ad85cf3c57e118476b125a673f1681))
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * The following workspace dependencies were updated
28
+ * dependencies
29
+ * @twin.org/data-core bumped from 0.0.1-next.35 to 0.0.1-next.36
30
+
3
31
  ## [0.0.1-next.35](https://github.com/twinfoundation/data/compare/data-json-ld-v0.0.1-next.34...data-json-ld-v0.0.1-next.35) (2025-06-03)
4
32
 
5
33
 
@@ -33,7 +33,6 @@
33
33
  - [IJsonLdJsonArray](type-aliases/IJsonLdJsonArray.md)
34
34
  - [IJsonLdJsonPrimitive](type-aliases/IJsonLdJsonPrimitive.md)
35
35
  - [IJsonLdJsonValue](type-aliases/IJsonLdJsonValue.md)
36
- - [IJsonLdKeyword](type-aliases/IJsonLdKeyword.md)
37
36
  - [IJsonLdListOrSetItem](type-aliases/IJsonLdListOrSetItem.md)
38
37
  - [IJsonLdNodePrimitive](type-aliases/IJsonLdNodePrimitive.md)
39
38
  - [IJsonLdValueObject](type-aliases/IJsonLdValueObject.md)
@@ -8,7 +8,7 @@ https://www.w3.org/TR/json-ld11/#context-definitions
8
8
 
9
9
  ## Indexable
10
10
 
11
- \[`key`: `string`\]: `undefined` \| `null` \| `string` \| `boolean` \| [`IJsonLdExpandedTermDefinition`](../type-aliases/IJsonLdExpandedTermDefinition.md) \| \{ `@container`: `"@set"`; `@protected`: `boolean`; \}
11
+ \[`key`: `string`\]: `undefined` \| `null` \| `string` \| `boolean` \| [`IJsonLdExpandedTermDefinition`](../type-aliases/IJsonLdExpandedTermDefinition.md) \| \{ `@container`: `"@set"`; `@protected?`: `boolean`; \}
12
12
 
13
13
  ## Properties
14
14
 
@@ -13,7 +13,7 @@ https://www.w3.org/TR/json-ld11/#node-objects
13
13
 
14
14
  ## Indexable
15
15
 
16
- \[`key`: `string`\]: `undefined` \| `null` \| `string` \| `number` \| `boolean` \| `string`[] \| [`IJsonLdContextDefinition`](IJsonLdContextDefinition.md) \| [`IJsonLdContextDefinitionElement`](../type-aliases/IJsonLdContextDefinitionElement.md)[] \| [`IJsonLdIdMap`](IJsonLdIdMap.md) \| `IJsonLdNodeObject` \| [`IJsonLdListObject`](IJsonLdListObject.md) \| `object` & `object` \| `object` & `object` \| `object` & `object` \| [`IJsonLdSetObject`](IJsonLdSetObject.md) \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md) \| [`IJsonLdIndexMap`](IJsonLdIndexMap.md) \| [`IJsonLdLanguageMap`](IJsonLdLanguageMap.md) \| [`IJsonLdGraphObject`](IJsonLdGraphObject.md) \| `IJsonLdNodeObject`[] \| [`IJsonLdJsonObject`](IJsonLdJsonObject.md)[] \| \{[`key`: `string`]: `string`; \} \| [`IJsonLdTypeMap`](IJsonLdTypeMap.md) \| [`IJsonLdNodePrimitive`](../type-aliases/IJsonLdNodePrimitive.md)[]
16
+ \[`key`: `string`\]: `undefined` \| `null` \| `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)[]
17
17
 
18
18
  ## Properties
19
19
 
@@ -2,4 +2,4 @@
2
2
 
3
3
  > **IJsonLdContainerType** = `"@language"` \| `"@index"` \| `"@id"` \| `"@graph"` \| `"@type"`
4
4
 
5
- Helper Types
5
+ JSON-LD container types.
@@ -2,4 +2,4 @@
2
2
 
3
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"`\]
4
4
 
5
- Helper Types.
5
+ JSON-LD container type array.
@@ -1,6 +1,6 @@
1
1
  # Type Alias: IJsonLdDocument
2
2
 
3
- > **IJsonLdDocument** = [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md)[] \| \{ `@context`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@context"`\]; `@graph`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@graph"`\]; \}
3
+ > **IJsonLdDocument** = [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md)[] \| \{ `@context?`: [`IJsonLdContextDefinitionRoot`](IJsonLdContextDefinitionRoot.md); `@graph?`: [`IJsonLdValueObject`](IJsonLdValueObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md) \| ([`IJsonLdValueObject`](IJsonLdValueObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md))[]; \}
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` & \{ `@id`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@id"`\] \| `null`; `@nest`: `"@nest"` \| `string`; `@container`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@container"`\]; \} \| \{ `@reverse`: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@reverse"`\]; `@container`: `"@set"` \| `"@index"` \| `null`; \}
3
+ > **IJsonLdExpandedTermDefinition** = `object` & \{ `@id?`: `string` \| `string`[] \| `null`; `@nest?`: `"@nest"` \| `string`; `@container?`: `"@list"` \| `"@set"` \| [`IJsonLdContainerType`](IJsonLdContainerType.md) \| (`"@list"` \| `"@set"` \| [`IJsonLdContainerType`](IJsonLdContainerType.md))[] \| [`IJsonLdContainerTypeArray`](IJsonLdContainerTypeArray.md) \| `null`; \} \| \{ `@reverse`: `string`; `@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
@@ -14,11 +14,11 @@ associated with the term when it is used as key in a node object.
14
14
 
15
15
  ### @language?
16
16
 
17
- > `optional` **@language**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@language"`\]
17
+ > `optional` **@language**: `string`
18
18
 
19
19
  ### @index?
20
20
 
21
- > `optional` **@index**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@index"`\]
21
+ > `optional` **@index**: `string`
22
22
 
23
23
  ### @context?
24
24
 
@@ -26,15 +26,15 @@ associated with the term when it is used as key in a node object.
26
26
 
27
27
  ### @prefix?
28
28
 
29
- > `optional` **@prefix**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@prefix"`\]
29
+ > `optional` **@prefix**: `boolean`
30
30
 
31
31
  ### @propagate?
32
32
 
33
- > `optional` **@propagate**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@propagate"`\]
33
+ > `optional` **@propagate**: `boolean`
34
34
 
35
35
  ### @protected?
36
36
 
37
- > `optional` **@protected**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@protected"`\]
37
+ > `optional` **@protected**: `boolean`
38
38
 
39
39
  ## See
40
40
 
@@ -1,6 +1,6 @@
1
1
  # Type Alias: IJsonLdValueObject
2
2
 
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"`; \}
3
+ > **IJsonLdValueObject** = `object` & \{ `@value`: `null` \| `boolean` \| `number` \| `string`; `@language?`: `string`; `@direction?`: `"ltr"` \| `"rtl"` \| `null`; \} \| \{ `@value`: `null` \| `boolean` \| `number` \| `string`; `@type`: `string`; \} \| \{ `@value`: `null` \| `boolean` \| `number` \| `string` \| [`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.
@@ -9,11 +9,11 @@ to create a typed value or a language-tagged string and possibly associate a bas
9
9
 
10
10
  ### @index?
11
11
 
12
- > `optional` **@index**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@index"`\]
12
+ > `optional` **@index**: `string`
13
13
 
14
14
  ### @context?
15
15
 
16
- > `optional` **@context**: [`IJsonLdKeyword`](IJsonLdKeyword.md)\[`"@context"`\]
16
+ > `optional` **@context**: [`IJsonLdContextDefinitionRoot`](IJsonLdContextDefinitionRoot.md)
17
17
 
18
18
  ## See
19
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/data-json-ld",
3
- "version": "0.0.1-next.35",
3
+ "version": "0.0.1-next.37",
4
4
  "description": "Models which define the structure of JSON LD",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,11 +15,10 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@twin.org/core": "next",
18
- "@twin.org/data-core": "0.0.1-next.35",
18
+ "@twin.org/data-core": "0.0.1-next.37",
19
19
  "@twin.org/entity": "next",
20
20
  "@twin.org/nameof": "next",
21
21
  "@twin.org/web": "next",
22
- "@types/json-schema": "7.0.15",
23
22
  "@types/jsonld": "1.5.15",
24
23
  "jsonld": "8.3.3"
25
24
  },
@@ -1,42 +0,0 @@
1
- import type { IJsonLdContainerType } from "./IJsonLdContainerType";
2
- import type { IJsonLdContainerTypeArray } from "./IJsonLdContainerTypeArray";
3
- import type { IJsonLdContextDefinitionRoot } from "./IJsonLdContextDefinitionRoot";
4
- import type { IJsonLdIncludedBlock } from "./IJsonLdIncludedBlock";
5
- import type { IJsonLdListOrSetItem } from "./IJsonLdListOrSetItem";
6
- import type { IJsonLdNodeObject } from "./IJsonLdNodeObject";
7
- import type { IJsonLdValueObject } from "./IJsonLdValueObject";
8
- /**
9
- * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators
10
- * that are used in other packages cannot understand some of the types e.g. OrArray
11
- */
12
- /**
13
- * A list of keywords and their types.
14
- * Only used for internal reference; not an actual interface.
15
- * Not for export.
16
- * @see https://www.w3.org/TR/json-ld/#keywords
17
- */
18
- export type IJsonLdKeyword = {
19
- "@base": string | null;
20
- "@container": ("@list" | "@set" | IJsonLdContainerType) | ("@list" | "@set" | IJsonLdContainerType)[] | IJsonLdContainerTypeArray | null;
21
- "@context": IJsonLdContextDefinitionRoot;
22
- "@direction": "ltr" | "rtl" | null;
23
- "@graph": IJsonLdValueObject | IJsonLdNodeObject | (IJsonLdValueObject | IJsonLdNodeObject)[];
24
- "@id": string | string[];
25
- "@import": string;
26
- "@included": IJsonLdIncludedBlock;
27
- "@index": string;
28
- "@json": "@json";
29
- "@language": string;
30
- "@list": IJsonLdListOrSetItem | IJsonLdListOrSetItem[];
31
- "@nest": object;
32
- "@none": "@none";
33
- "@prefix": boolean;
34
- "@propagate": boolean;
35
- "@protected": boolean;
36
- "@reverse": string;
37
- "@set": IJsonLdListOrSetItem | IJsonLdListOrSetItem[];
38
- "@type": string;
39
- "@value": null | boolean | number | string;
40
- "@version": "1.1";
41
- "@vocab": string | null;
42
- };
@@ -1,149 +0,0 @@
1
- # Type Alias: IJsonLdKeyword
2
-
3
- > **IJsonLdKeyword** = `object`
4
-
5
- A list of keywords and their types.
6
- Only used for internal reference; not an actual interface.
7
- Not for export.
8
-
9
- ## See
10
-
11
- https://www.w3.org/TR/json-ld/#keywords
12
-
13
- ## Properties
14
-
15
- ### @base
16
-
17
- > **@base**: `string` \| `null`
18
-
19
- ***
20
-
21
- ### @container
22
-
23
- > **@container**: `"@list"` \| `"@set"` \| [`IJsonLdContainerType`](IJsonLdContainerType.md) \| (`"@list"` \| `"@set"` \| [`IJsonLdContainerType`](IJsonLdContainerType.md))[] \| [`IJsonLdContainerTypeArray`](IJsonLdContainerTypeArray.md) \| `null`
24
-
25
- ***
26
-
27
- ### @context
28
-
29
- > **@context**: [`IJsonLdContextDefinitionRoot`](IJsonLdContextDefinitionRoot.md)
30
-
31
- ***
32
-
33
- ### @direction
34
-
35
- > **@direction**: `"ltr"` \| `"rtl"` \| `null`
36
-
37
- ***
38
-
39
- ### @graph
40
-
41
- > **@graph**: [`IJsonLdValueObject`](IJsonLdValueObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md) \| ([`IJsonLdValueObject`](IJsonLdValueObject.md) \| [`IJsonLdNodeObject`](../interfaces/IJsonLdNodeObject.md))[]
42
-
43
- ***
44
-
45
- ### @id
46
-
47
- > **@id**: `string` \| `string`[]
48
-
49
- ***
50
-
51
- ### @import
52
-
53
- > **@import**: `string`
54
-
55
- ***
56
-
57
- ### @included
58
-
59
- > **@included**: [`IJsonLdIncludedBlock`](IJsonLdIncludedBlock.md)
60
-
61
- ***
62
-
63
- ### @index
64
-
65
- > **@index**: `string`
66
-
67
- ***
68
-
69
- ### @json
70
-
71
- > **@json**: `"@json"`
72
-
73
- ***
74
-
75
- ### @language
76
-
77
- > **@language**: `string`
78
-
79
- ***
80
-
81
- ### @list
82
-
83
- > **@list**: [`IJsonLdListOrSetItem`](IJsonLdListOrSetItem.md) \| [`IJsonLdListOrSetItem`](IJsonLdListOrSetItem.md)[]
84
-
85
- ***
86
-
87
- ### @nest
88
-
89
- > **@nest**: `object`
90
-
91
- ***
92
-
93
- ### @none
94
-
95
- > **@none**: `"@none"`
96
-
97
- ***
98
-
99
- ### @prefix
100
-
101
- > **@prefix**: `boolean`
102
-
103
- ***
104
-
105
- ### @propagate
106
-
107
- > **@propagate**: `boolean`
108
-
109
- ***
110
-
111
- ### @protected
112
-
113
- > **@protected**: `boolean`
114
-
115
- ***
116
-
117
- ### @reverse
118
-
119
- > **@reverse**: `string`
120
-
121
- ***
122
-
123
- ### @set
124
-
125
- > **@set**: [`IJsonLdListOrSetItem`](IJsonLdListOrSetItem.md) \| [`IJsonLdListOrSetItem`](IJsonLdListOrSetItem.md)[]
126
-
127
- ***
128
-
129
- ### @type
130
-
131
- > **@type**: `string`
132
-
133
- ***
134
-
135
- ### @value
136
-
137
- > **@value**: `null` \| `boolean` \| `number` \| `string`
138
-
139
- ***
140
-
141
- ### @version
142
-
143
- > **@version**: `"1.1"`
144
-
145
- ***
146
-
147
- ### @vocab
148
-
149
- > **@vocab**: `string` \| `null`