@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
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
import { DataTypeHandlerFactory } from "@twin.org/data-core";
|
|
4
|
+
import { JsonLdContexts } from "../models/jsonLdContexts.js";
|
|
5
|
+
import { JsonLdTypes } from "../models/jsonLdTypes.js";
|
|
6
|
+
import JsonLdContainerTypeSchema from "../schemas/JsonLdContainerType.json" with { type: "json" };
|
|
7
|
+
import JsonLdContainerTypeArraySchema from "../schemas/JsonLdContainerTypeArray.json" with { type: "json" };
|
|
8
|
+
import JsonLdContextDefinitionSchema from "../schemas/JsonLdContextDefinition.json" with { type: "json" };
|
|
9
|
+
import JsonLdContextDefinitionElementSchema from "../schemas/JsonLdContextDefinitionElement.json" with { type: "json" };
|
|
10
|
+
import JsonLdContextDefinitionRootSchema from "../schemas/JsonLdContextDefinitionRoot.json" with { type: "json" };
|
|
11
|
+
import JsonLdDocumentSchema from "../schemas/JsonLdDocument.json" with { type: "json" };
|
|
12
|
+
import JsonLdExpandedTermDefinitionSchema from "../schemas/JsonLdExpandedTermDefinition.json" with { type: "json" };
|
|
13
|
+
import JsonLdGraphObjectSchema from "../schemas/JsonLdGraphObject.json" with { type: "json" };
|
|
14
|
+
import JsonLdIdMapSchema from "../schemas/JsonLdIdMap.json" with { type: "json" };
|
|
15
|
+
import JsonLdIncludedBlockSchema from "../schemas/JsonLdIncludedBlock.json" with { type: "json" };
|
|
16
|
+
import JsonLdIndexMapSchema from "../schemas/JsonLdIndexMap.json" with { type: "json" };
|
|
17
|
+
import JsonLdIndexMapItemSchema from "../schemas/JsonLdIndexMapItem.json" with { type: "json" };
|
|
18
|
+
import JsonLdJsonArraySchema from "../schemas/JsonLdJsonArray.json" with { type: "json" };
|
|
19
|
+
import JsonLdJsonObjectSchema from "../schemas/JsonLdJsonObject.json" with { type: "json" };
|
|
20
|
+
import JsonLdJsonPrimitiveSchema from "../schemas/JsonLdJsonPrimitive.json" with { type: "json" };
|
|
21
|
+
import JsonLdJsonValueSchema from "../schemas/JsonLdJsonValue.json" with { type: "json" };
|
|
22
|
+
import JsonLdLanguageMapSchema from "../schemas/JsonLdLanguageMap.json" with { type: "json" };
|
|
23
|
+
import JsonLdListObjectSchema from "../schemas/JsonLdListObject.json" with { type: "json" };
|
|
24
|
+
import JsonLdListOrSetItemSchema from "../schemas/JsonLdListOrSetItem.json" with { type: "json" };
|
|
25
|
+
import JsonLdNodeObjectSchema from "../schemas/JsonLdNodeObject.json" with { type: "json" };
|
|
26
|
+
import JsonLdNodePrimitiveSchema from "../schemas/JsonLdNodePrimitive.json" with { type: "json" };
|
|
27
|
+
import JsonLdObjectSchema from "../schemas/JsonLdObject.json" with { type: "json" };
|
|
28
|
+
import JsonLdSetObjectSchema from "../schemas/JsonLdSetObject.json" with { type: "json" };
|
|
29
|
+
import JsonLdTypeMapSchema from "../schemas/JsonLdTypeMap.json" with { type: "json" };
|
|
30
|
+
import JsonLdValueObjectSchema from "../schemas/JsonLdValueObject.json" with { type: "json" };
|
|
31
|
+
/**
|
|
32
|
+
* Handle all the data types for JSON-LD.
|
|
33
|
+
*/
|
|
34
|
+
export class JsonLdDataTypes {
|
|
35
|
+
/**
|
|
36
|
+
* Register all the data types.
|
|
37
|
+
*/
|
|
38
|
+
static registerTypes() {
|
|
39
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.Document}`, () => ({
|
|
40
|
+
context: JsonLdContexts.ContextRoot,
|
|
41
|
+
type: JsonLdTypes.Document,
|
|
42
|
+
jsonSchema: async () => JsonLdDocumentSchema
|
|
43
|
+
}));
|
|
44
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.Object}`, () => ({
|
|
45
|
+
context: JsonLdContexts.ContextRoot,
|
|
46
|
+
type: JsonLdTypes.Object,
|
|
47
|
+
jsonSchema: async () => JsonLdObjectSchema
|
|
48
|
+
}));
|
|
49
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.NodeObject}`, () => ({
|
|
50
|
+
context: JsonLdContexts.ContextRoot,
|
|
51
|
+
type: JsonLdTypes.NodeObject,
|
|
52
|
+
jsonSchema: async () => JsonLdNodeObjectSchema
|
|
53
|
+
}));
|
|
54
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.NodePrimitive}`, () => ({
|
|
55
|
+
context: JsonLdContexts.ContextRoot,
|
|
56
|
+
type: JsonLdTypes.NodePrimitive,
|
|
57
|
+
jsonSchema: async () => JsonLdNodePrimitiveSchema
|
|
58
|
+
}));
|
|
59
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.GraphObject}`, () => ({
|
|
60
|
+
context: JsonLdContexts.ContextRoot,
|
|
61
|
+
type: JsonLdTypes.GraphObject,
|
|
62
|
+
jsonSchema: async () => JsonLdGraphObjectSchema
|
|
63
|
+
}));
|
|
64
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.ValueObject}`, () => ({
|
|
65
|
+
context: JsonLdContexts.ContextRoot,
|
|
66
|
+
type: JsonLdTypes.ValueObject,
|
|
67
|
+
jsonSchema: async () => JsonLdValueObjectSchema
|
|
68
|
+
}));
|
|
69
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.ListObject}`, () => ({
|
|
70
|
+
context: JsonLdContexts.ContextRoot,
|
|
71
|
+
type: JsonLdTypes.ListObject,
|
|
72
|
+
jsonSchema: async () => JsonLdListObjectSchema
|
|
73
|
+
}));
|
|
74
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.ListObject}`, () => ({
|
|
75
|
+
context: JsonLdContexts.ContextRoot,
|
|
76
|
+
type: JsonLdTypes.ListObject,
|
|
77
|
+
jsonSchema: async () => JsonLdListObjectSchema
|
|
78
|
+
}));
|
|
79
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.SetObject}`, () => ({
|
|
80
|
+
context: JsonLdContexts.ContextRoot,
|
|
81
|
+
type: JsonLdTypes.SetObject,
|
|
82
|
+
jsonSchema: async () => JsonLdSetObjectSchema
|
|
83
|
+
}));
|
|
84
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.LanguageMap}`, () => ({
|
|
85
|
+
context: JsonLdContexts.ContextRoot,
|
|
86
|
+
type: JsonLdTypes.LanguageMap,
|
|
87
|
+
jsonSchema: async () => JsonLdLanguageMapSchema
|
|
88
|
+
}));
|
|
89
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.IndexMap}`, () => ({
|
|
90
|
+
context: JsonLdContexts.ContextRoot,
|
|
91
|
+
type: JsonLdTypes.IndexMap,
|
|
92
|
+
jsonSchema: async () => JsonLdIndexMapSchema
|
|
93
|
+
}));
|
|
94
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.IndexMapItem}`, () => ({
|
|
95
|
+
context: JsonLdContexts.ContextRoot,
|
|
96
|
+
type: JsonLdTypes.IndexMapItem,
|
|
97
|
+
jsonSchema: async () => JsonLdIndexMapItemSchema
|
|
98
|
+
}));
|
|
99
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.IdMap}`, () => ({
|
|
100
|
+
context: JsonLdContexts.ContextRoot,
|
|
101
|
+
type: JsonLdTypes.IdMap,
|
|
102
|
+
jsonSchema: async () => JsonLdIdMapSchema
|
|
103
|
+
}));
|
|
104
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.TypeMap}`, () => ({
|
|
105
|
+
context: JsonLdContexts.ContextRoot,
|
|
106
|
+
type: JsonLdTypes.TypeMap,
|
|
107
|
+
jsonSchema: async () => JsonLdTypeMapSchema
|
|
108
|
+
}));
|
|
109
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.IncludedBlock}`, () => ({
|
|
110
|
+
context: JsonLdContexts.ContextRoot,
|
|
111
|
+
type: JsonLdTypes.IncludedBlock,
|
|
112
|
+
jsonSchema: async () => JsonLdIncludedBlockSchema
|
|
113
|
+
}));
|
|
114
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.ContextDefinition}`, () => ({
|
|
115
|
+
context: JsonLdContexts.ContextRoot,
|
|
116
|
+
type: JsonLdTypes.ContextDefinition,
|
|
117
|
+
jsonSchema: async () => JsonLdContextDefinitionSchema
|
|
118
|
+
}));
|
|
119
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.ContextDefinitionElement}`, () => ({
|
|
120
|
+
context: JsonLdContexts.ContextRoot,
|
|
121
|
+
type: JsonLdTypes.ContextDefinitionElement,
|
|
122
|
+
jsonSchema: async () => JsonLdContextDefinitionElementSchema
|
|
123
|
+
}));
|
|
124
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.ContextDefinitionRoot}`, () => ({
|
|
125
|
+
context: JsonLdContexts.ContextRoot,
|
|
126
|
+
type: JsonLdTypes.ContextDefinitionRoot,
|
|
127
|
+
jsonSchema: async () => JsonLdContextDefinitionRootSchema
|
|
128
|
+
}));
|
|
129
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.ExpandedTermDefinition}`, () => ({
|
|
130
|
+
context: JsonLdContexts.ContextRoot,
|
|
131
|
+
type: JsonLdTypes.ExpandedTermDefinition,
|
|
132
|
+
jsonSchema: async () => JsonLdExpandedTermDefinitionSchema
|
|
133
|
+
}));
|
|
134
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.ListOrSetItem}`, () => ({
|
|
135
|
+
context: JsonLdContexts.ContextRoot,
|
|
136
|
+
type: JsonLdTypes.ListOrSetItem,
|
|
137
|
+
jsonSchema: async () => JsonLdListOrSetItemSchema
|
|
138
|
+
}));
|
|
139
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.ContainerType}`, () => ({
|
|
140
|
+
context: JsonLdContexts.ContextRoot,
|
|
141
|
+
type: JsonLdTypes.ContainerType,
|
|
142
|
+
jsonSchema: async () => JsonLdContainerTypeSchema
|
|
143
|
+
}));
|
|
144
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.ContainerTypeArray}`, () => ({
|
|
145
|
+
context: JsonLdContexts.ContextRoot,
|
|
146
|
+
type: JsonLdTypes.ContainerTypeArray,
|
|
147
|
+
jsonSchema: async () => JsonLdContainerTypeArraySchema
|
|
148
|
+
}));
|
|
149
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.JsonPrimitive}`, () => ({
|
|
150
|
+
context: JsonLdContexts.ContextRoot,
|
|
151
|
+
type: JsonLdTypes.JsonPrimitive,
|
|
152
|
+
jsonSchema: async () => JsonLdJsonPrimitiveSchema
|
|
153
|
+
}));
|
|
154
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.JsonArray}`, () => ({
|
|
155
|
+
context: JsonLdContexts.ContextRoot,
|
|
156
|
+
type: JsonLdTypes.JsonArray,
|
|
157
|
+
jsonSchema: async () => JsonLdJsonArraySchema
|
|
158
|
+
}));
|
|
159
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.JsonObject}`, () => ({
|
|
160
|
+
context: JsonLdContexts.ContextRoot,
|
|
161
|
+
type: JsonLdTypes.JsonObject,
|
|
162
|
+
jsonSchema: async () => JsonLdJsonObjectSchema
|
|
163
|
+
}));
|
|
164
|
+
DataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.JsonValue}`, () => ({
|
|
165
|
+
context: JsonLdContexts.ContextRoot,
|
|
166
|
+
type: JsonLdTypes.JsonValue,
|
|
167
|
+
jsonSchema: async () => JsonLdJsonValueSchema
|
|
168
|
+
}));
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=jsonLdDataTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdDataTypes.js","sourceRoot":"","sources":["../../../src/dataTypes/jsonLdDataTypes.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,sBAA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xD,GAAG,EAAE,CAAC,CAAC;YACN,OAAO,EAAE,cAAc,CAAC,WAAW;YACnC,IAAI,EAAE,WAAW,CAAC,UAAU;YAC5B,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,sBAAqC;SAC7D,CAAC,CACF,CAAC;QACF,sBAAsB,CAAC,QAAQ,CAC9B,GAAG,cAAc,CAAC,WAAW,GAAG,WAAW,CAAC,SAAS,EAAE,EACvD,GAAG,EAAE,CAAC,CAAC;YACN,OAAO,EAAE,cAAc,CAAC,WAAW;YACnC,IAAI,EAAE,WAAW,CAAC,SAAS;YAC3B,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,qBAAoC;SAC5D,CAAC,CACF,CAAC;IACH,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { DataTypeHandlerFactory, type IJsonSchema } from \"@twin.org/data-core\";\nimport { JsonLdContexts } from \"../models/jsonLdContexts.js\";\nimport { JsonLdTypes } from \"../models/jsonLdTypes.js\";\nimport JsonLdContainerTypeSchema from \"../schemas/JsonLdContainerType.json\" with { type: \"json\" };\nimport JsonLdContainerTypeArraySchema from \"../schemas/JsonLdContainerTypeArray.json\" with { type: \"json\" };\nimport JsonLdContextDefinitionSchema from \"../schemas/JsonLdContextDefinition.json\" with { type: \"json\" };\nimport JsonLdContextDefinitionElementSchema from \"../schemas/JsonLdContextDefinitionElement.json\" with { type: \"json\" };\nimport JsonLdContextDefinitionRootSchema from \"../schemas/JsonLdContextDefinitionRoot.json\" with { type: \"json\" };\nimport JsonLdDocumentSchema from \"../schemas/JsonLdDocument.json\" with { type: \"json\" };\nimport JsonLdExpandedTermDefinitionSchema from \"../schemas/JsonLdExpandedTermDefinition.json\" with { type: \"json\" };\nimport JsonLdGraphObjectSchema from \"../schemas/JsonLdGraphObject.json\" with { type: \"json\" };\nimport JsonLdIdMapSchema from \"../schemas/JsonLdIdMap.json\" with { type: \"json\" };\nimport JsonLdIncludedBlockSchema from \"../schemas/JsonLdIncludedBlock.json\" with { type: \"json\" };\nimport JsonLdIndexMapSchema from \"../schemas/JsonLdIndexMap.json\" with { type: \"json\" };\nimport JsonLdIndexMapItemSchema from \"../schemas/JsonLdIndexMapItem.json\" with { type: \"json\" };\nimport JsonLdJsonArraySchema from \"../schemas/JsonLdJsonArray.json\" with { type: \"json\" };\nimport JsonLdJsonObjectSchema from \"../schemas/JsonLdJsonObject.json\" with { type: \"json\" };\nimport JsonLdJsonPrimitiveSchema from \"../schemas/JsonLdJsonPrimitive.json\" with { type: \"json\" };\nimport JsonLdJsonValueSchema from \"../schemas/JsonLdJsonValue.json\" with { type: \"json\" };\nimport JsonLdLanguageMapSchema from \"../schemas/JsonLdLanguageMap.json\" with { type: \"json\" };\nimport JsonLdListObjectSchema from \"../schemas/JsonLdListObject.json\" with { type: \"json\" };\nimport JsonLdListOrSetItemSchema from \"../schemas/JsonLdListOrSetItem.json\" with { type: \"json\" };\nimport JsonLdNodeObjectSchema from \"../schemas/JsonLdNodeObject.json\" with { type: \"json\" };\nimport JsonLdNodePrimitiveSchema from \"../schemas/JsonLdNodePrimitive.json\" with { type: \"json\" };\nimport JsonLdObjectSchema from \"../schemas/JsonLdObject.json\" with { type: \"json\" };\nimport JsonLdSetObjectSchema from \"../schemas/JsonLdSetObject.json\" with { type: \"json\" };\nimport JsonLdTypeMapSchema from \"../schemas/JsonLdTypeMap.json\" with { type: \"json\" };\nimport JsonLdValueObjectSchema from \"../schemas/JsonLdValueObject.json\" with { type: \"json\" };\n\n/**\n * Handle all the data types for JSON-LD.\n */\nexport class JsonLdDataTypes {\n\t/**\n\t * Register all the data types.\n\t */\n\tpublic static registerTypes(): void {\n\t\tDataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.Document}`, () => ({\n\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\ttype: JsonLdTypes.Document,\n\t\t\tjsonSchema: async () => JsonLdDocumentSchema as IJsonSchema\n\t\t}));\n\t\tDataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.Object}`, () => ({\n\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\ttype: JsonLdTypes.Object,\n\t\t\tjsonSchema: async () => JsonLdObjectSchema as IJsonSchema\n\t\t}));\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.NodeObject}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.NodeObject,\n\t\t\t\tjsonSchema: async () => JsonLdNodeObjectSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.NodePrimitive}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.NodePrimitive,\n\t\t\t\tjsonSchema: async () => JsonLdNodePrimitiveSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.GraphObject}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.GraphObject,\n\t\t\t\tjsonSchema: async () => JsonLdGraphObjectSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.ValueObject}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.ValueObject,\n\t\t\t\tjsonSchema: async () => JsonLdValueObjectSchema as unknown as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.ListObject}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.ListObject,\n\t\t\t\tjsonSchema: async () => JsonLdListObjectSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.ListObject}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.ListObject,\n\t\t\t\tjsonSchema: async () => JsonLdListObjectSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.SetObject}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.SetObject,\n\t\t\t\tjsonSchema: async () => JsonLdSetObjectSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.LanguageMap}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.LanguageMap,\n\t\t\t\tjsonSchema: async () => JsonLdLanguageMapSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.IndexMap}`, () => ({\n\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\ttype: JsonLdTypes.IndexMap,\n\t\t\tjsonSchema: async () => JsonLdIndexMapSchema as IJsonSchema\n\t\t}));\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.IndexMapItem}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.IndexMapItem,\n\t\t\t\tjsonSchema: async () => JsonLdIndexMapItemSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.IdMap}`, () => ({\n\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\ttype: JsonLdTypes.IdMap,\n\t\t\tjsonSchema: async () => JsonLdIdMapSchema as IJsonSchema\n\t\t}));\n\t\tDataTypeHandlerFactory.register(`${JsonLdContexts.ContextRoot}${JsonLdTypes.TypeMap}`, () => ({\n\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\ttype: JsonLdTypes.TypeMap,\n\t\t\tjsonSchema: async () => JsonLdTypeMapSchema as IJsonSchema\n\t\t}));\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.IncludedBlock}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.IncludedBlock,\n\t\t\t\tjsonSchema: async () => JsonLdIncludedBlockSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.ContextDefinition}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.ContextDefinition,\n\t\t\t\tjsonSchema: async () => JsonLdContextDefinitionSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.ContextDefinitionElement}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.ContextDefinitionElement,\n\t\t\t\tjsonSchema: async () => JsonLdContextDefinitionElementSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.ContextDefinitionRoot}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.ContextDefinitionRoot,\n\t\t\t\tjsonSchema: async () => JsonLdContextDefinitionRootSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.ExpandedTermDefinition}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.ExpandedTermDefinition,\n\t\t\t\tjsonSchema: async () => JsonLdExpandedTermDefinitionSchema as unknown as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.ListOrSetItem}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.ListOrSetItem,\n\t\t\t\tjsonSchema: async () => JsonLdListOrSetItemSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.ContainerType}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.ContainerType,\n\t\t\t\tjsonSchema: async () => JsonLdContainerTypeSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.ContainerTypeArray}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.ContainerTypeArray,\n\t\t\t\tjsonSchema: async () => JsonLdContainerTypeArraySchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.JsonPrimitive}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.JsonPrimitive,\n\t\t\t\tjsonSchema: async () => JsonLdJsonPrimitiveSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.JsonArray}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.JsonArray,\n\t\t\t\tjsonSchema: async () => JsonLdJsonArraySchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.JsonObject}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.JsonObject,\n\t\t\t\tjsonSchema: async () => JsonLdJsonObjectSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t\tDataTypeHandlerFactory.register(\n\t\t\t`${JsonLdContexts.ContextRoot}${JsonLdTypes.JsonValue}`,\n\t\t\t() => ({\n\t\t\t\tcontext: JsonLdContexts.ContextRoot,\n\t\t\t\ttype: JsonLdTypes.JsonValue,\n\t\t\t\tjsonSchema: async () => JsonLdJsonValueSchema as IJsonSchema\n\t\t\t})\n\t\t);\n\t}\n}\n"]}
|
package/dist/es/index.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
export * from "./dataTypes/jsonLdDataTypes.js";
|
|
4
|
+
export * from "./models/IJsonLdContainerType.js";
|
|
5
|
+
export * from "./models/IJsonLdContainerTypeArray.js";
|
|
6
|
+
export * from "./models/IJsonLdContextDefinition.js";
|
|
7
|
+
export * from "./models/IJsonLdContextDefinitionElement.js";
|
|
8
|
+
export * from "./models/IJsonLdContextDefinitionRoot.js";
|
|
9
|
+
export * from "./models/IJsonLdDocument.js";
|
|
10
|
+
export * from "./models/IJsonLdExpandedTermDefinition.js";
|
|
11
|
+
export * from "./models/IJsonLdGraphObject.js";
|
|
12
|
+
export * from "./models/IJsonLdIdMap.js";
|
|
13
|
+
export * from "./models/IJsonLdIncludedBlock.js";
|
|
14
|
+
export * from "./models/IJsonLdIndexMap.js";
|
|
15
|
+
export * from "./models/IJsonLdIndexMapItem.js";
|
|
16
|
+
export * from "./models/IJsonLdJsonArray.js";
|
|
17
|
+
export * from "./models/IJsonLdJsonObject.js";
|
|
18
|
+
export * from "./models/IJsonLdJsonPrimitive.js";
|
|
19
|
+
export * from "./models/IJsonLdJsonValue.js";
|
|
20
|
+
export * from "./models/IJsonLdLanguageMap.js";
|
|
21
|
+
export * from "./models/IJsonLdListObject.js";
|
|
22
|
+
export * from "./models/IJsonLdListOrSetItem.js";
|
|
23
|
+
export * from "./models/IJsonLdNodeObject.js";
|
|
24
|
+
export * from "./models/IJsonLdNodePrimitive.js";
|
|
25
|
+
export * from "./models/IJsonLdObject.js";
|
|
26
|
+
export * from "./models/IJsonLdSetObject.js";
|
|
27
|
+
export * from "./models/IJsonLdTypeMap.js";
|
|
28
|
+
export * from "./models/IJsonLdValueObject.js";
|
|
29
|
+
export * from "./models/jsonLdContexts.js";
|
|
30
|
+
export * from "./models/jsonLdTypes.js";
|
|
31
|
+
export * from "./utils/jsonLdHelper.js";
|
|
32
|
+
export * from "./utils/jsonLdProcessor.js";
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./dataTypes/jsonLdDataTypes.js\";\nexport * from \"./models/IJsonLdContainerType.js\";\nexport * from \"./models/IJsonLdContainerTypeArray.js\";\nexport * from \"./models/IJsonLdContextDefinition.js\";\nexport * from \"./models/IJsonLdContextDefinitionElement.js\";\nexport * from \"./models/IJsonLdContextDefinitionRoot.js\";\nexport * from \"./models/IJsonLdDocument.js\";\nexport * from \"./models/IJsonLdExpandedTermDefinition.js\";\nexport * from \"./models/IJsonLdGraphObject.js\";\nexport * from \"./models/IJsonLdIdMap.js\";\nexport * from \"./models/IJsonLdIncludedBlock.js\";\nexport * from \"./models/IJsonLdIndexMap.js\";\nexport * from \"./models/IJsonLdIndexMapItem.js\";\nexport * from \"./models/IJsonLdJsonArray.js\";\nexport * from \"./models/IJsonLdJsonObject.js\";\nexport * from \"./models/IJsonLdJsonPrimitive.js\";\nexport * from \"./models/IJsonLdJsonValue.js\";\nexport * from \"./models/IJsonLdLanguageMap.js\";\nexport * from \"./models/IJsonLdListObject.js\";\nexport * from \"./models/IJsonLdListOrSetItem.js\";\nexport * from \"./models/IJsonLdNodeObject.js\";\nexport * from \"./models/IJsonLdNodePrimitive.js\";\nexport * from \"./models/IJsonLdObject.js\";\nexport * from \"./models/IJsonLdSetObject.js\";\nexport * from \"./models/IJsonLdTypeMap.js\";\nexport * from \"./models/IJsonLdValueObject.js\";\nexport * from \"./models/jsonLdContexts.js\";\nexport * from \"./models/jsonLdTypes.js\";\nexport * from \"./utils/jsonLdHelper.js\";\nexport * from \"./utils/jsonLdProcessor.js\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdContainerType.js","sourceRoot":"","sources":["../../../src/models/IJsonLdContainerType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * JSON-LD container types.\n */\nexport type IJsonLdContainerType = \"@language\" | \"@index\" | \"@id\" | \"@graph\" | \"@type\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdContainerTypeArray.js","sourceRoot":"","sources":["../../../src/models/IJsonLdContainerTypeArray.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContainerType } from \"./IJsonLdContainerType.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * JSON-LD container type array.\n */\nexport type IJsonLdContainerTypeArray =\n\t| [\"@graph\", \"@id\"]\n\t| [\"@id\", \"@graph\"]\n\t| [\"@set\", \"@graph\", \"@id\"]\n\t| [\"@set\", \"@id\", \"@graph\"]\n\t| [\"@graph\", \"@set\", \"@id\"]\n\t| [\"@id\", \"@set\", \"@graph\"]\n\t| [\"@graph\", \"@id\", \"@set\"]\n\t| [\"@id\", \"@graph\", \"@set\"]\n\t| [\"@set\", IJsonLdContainerType]\n\t| [IJsonLdContainerType, \"@set\"];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdContextDefinition.js","sourceRoot":"","sources":["../../../src/models/IJsonLdContextDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n/* eslint-disable jsdoc/require-jsdoc */\nimport type { IJsonLdExpandedTermDefinition } from \"./IJsonLdExpandedTermDefinition.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A context definition defines a local context in a node object.\n * @see https://www.w3.org/TR/json-ld11/#context-definitions\n */\nexport interface IJsonLdContextDefinition {\n\t[key: string]:\n\t\t| null\n\t\t| string\n\t\t| IJsonLdExpandedTermDefinition\n\t\t| IJsonLdContextDefinition[keyof IJsonLdContextDefinition];\n\n\t\"@base\"?: string | null | undefined;\n\t\"@direction\"?: \"ltr\" | \"rtl\" | null | undefined;\n\t\"@import\"?: string | undefined;\n\t\"@language\"?: string | undefined;\n\t\"@propagate\"?: boolean | undefined;\n\t\"@protected\"?: boolean | undefined;\n\t\"@type\"?:\n\t\t| {\n\t\t\t\t\"@container\": \"@set\";\n\t\t\t\t\"@protected\"?: boolean | undefined;\n\t\t }\n\t\t| undefined;\n\t\"@version\"?: \"1.1\" | undefined;\n\t\"@vocab\"?: string | null | undefined;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdContextDefinitionElement.js","sourceRoot":"","sources":["../../../src/models/IJsonLdContextDefinitionElement.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinition } from \"./IJsonLdContextDefinition.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A context definition element is used to define the types of a context definition.\n */\nexport type IJsonLdContextDefinitionElement = null | string | IJsonLdContextDefinition;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdContextDefinitionRoot.js","sourceRoot":"","sources":["../../../src/models/IJsonLdContextDefinitionRoot.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionElement } from \"./IJsonLdContextDefinitionElement.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A context definition root is used to define the root of a context definition.\n */\nexport type IJsonLdContextDefinitionRoot =\n\t| IJsonLdContextDefinitionElement\n\t| IJsonLdContextDefinitionElement[];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdDocument.js","sourceRoot":"","sources":["../../../src/models/IJsonLdDocument.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionRoot } from \"./IJsonLdContextDefinitionRoot.js\";\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\nimport type { IJsonLdValueObject } from \"./IJsonLdValueObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * Types from the jsonld Specification:\n * https://www.w3.org/TR/json-ld11/\n */\n\n/**\n * A JSON-LD document MUST be valid JSON text as described in [RFC8259],\n * or some format that can be represented in the JSON-LD internal representation\n * that is equivalent to valid JSON text.\n * @see https://www.w3.org/TR/json-ld11/#json-ld-grammar\n */\nexport type IJsonLdDocument =\n\t| IJsonLdNodeObject\n\t| IJsonLdNodeObject[]\n\t| {\n\t\t\t\"@context\"?: IJsonLdContextDefinitionRoot | undefined;\n\t\t\t\"@graph\"?:\n\t\t\t\t| IJsonLdValueObject\n\t\t\t\t| IJsonLdNodeObject\n\t\t\t\t| (IJsonLdValueObject | IJsonLdNodeObject)[]\n\t\t\t\t| undefined;\n\t };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdExpandedTermDefinition.js","sourceRoot":"","sources":["../../../src/models/IJsonLdExpandedTermDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContainerType } from \"./IJsonLdContainerType.js\";\nimport type { IJsonLdContainerTypeArray } from \"./IJsonLdContainerTypeArray.js\";\nimport type { IJsonLdContextDefinition } from \"./IJsonLdContextDefinition.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * An expanded term definition is used to describe the mapping between a term\n * and its expanded identifier, as well as other properties of the value\n * associated with the term when it is used as key in a node object.\n * @see https://www.w3.org/TR/json-ld11/#expanded-term-definition\n */\nexport type IJsonLdExpandedTermDefinition = {\n\t\"@type\"?: \"@id\" | \"@json\" | \"@none\" | \"@vocab\" | string | undefined;\n\t\"@language\"?: string | undefined;\n\t\"@index\"?: string | undefined;\n\t\"@context\"?: IJsonLdContextDefinition | undefined;\n\t\"@prefix\"?: boolean | undefined;\n\t\"@propagate\"?: boolean | undefined;\n\t\"@protected\"?: boolean | undefined;\n} & (\n\t| {\n\t\t\t\"@id\"?: string | string[] | null | undefined;\n\t\t\t\"@nest\"?: \"@nest\" | string | undefined;\n\t\t\t\"@container\"?:\n\t\t\t\t| (\"@list\" | \"@set\" | IJsonLdContainerType)\n\t\t\t\t| (\"@list\" | \"@set\" | IJsonLdContainerType)[]\n\t\t\t\t| IJsonLdContainerTypeArray\n\t\t\t\t| null\n\t\t\t\t| undefined;\n\t }\n\t| {\n\t\t\t\"@reverse\": string;\n\t\t\t\"@container\"?: \"@set\" | \"@index\" | null | undefined;\n\t }\n);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdGraphObject.js","sourceRoot":"","sources":["../../../src/models/IJsonLdGraphObject.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n/* eslint-disable jsdoc/require-jsdoc */\nimport type { IJsonLdContextDefinitionRoot } from \"./IJsonLdContextDefinitionRoot.js\";\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A graph object represents a named graph, which MAY include an explicit graph name.\n * @see https://www.w3.org/TR/json-ld11/#graph-objects\n */\nexport interface IJsonLdGraphObject {\n\t\"@graph\": IJsonLdNodeObject | IJsonLdNodeObject[];\n\t\"@index\"?: string | undefined;\n\t\"@id\"?: string | string[] | undefined;\n\t\"@context\"?: IJsonLdContextDefinitionRoot | undefined;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdIdMap.js","sourceRoot":"","sources":["../../../src/models/IJsonLdIdMap.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * An id map is used to associate an IRI with a value that allows easy programmatic access.\n * @see https://www.w3.org/TR/json-ld11/#id-maps\n */\nexport interface IJsonLdIdMap {\n\t[key: string]: IJsonLdNodeObject;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdIncludedBlock.js","sourceRoot":"","sources":["../../../src/models/IJsonLdIncludedBlock.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * An included block is used to provide a set of node objects.\n * @see https://www.w3.org/TR/json-ld11/#included-blocks\n */\nexport type IJsonLdIncludedBlock = IJsonLdNodeObject | IJsonLdNodeObject[];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdIndexMap.js","sourceRoot":"","sources":["../../../src/models/IJsonLdIndexMap.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdIndexMapItem } from \"./IJsonLdIndexMapItem.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * An index map allows keys that have no semantic meaning, but should be preserved regardless,\n * to be used in JSON-LD documents.\n * @see https://www.w3.org/TR/json-ld11/#index-maps\n */\nexport interface IJsonLdIndexMap {\n\t[key: string]: IJsonLdIndexMapItem | IJsonLdIndexMapItem[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdIndexMapItem.js","sourceRoot":"","sources":["../../../src/models/IJsonLdIndexMapItem.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdListObject } from \"./IJsonLdListObject.js\";\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\nimport type { IJsonLdSetObject } from \"./IJsonLdSetObject.js\";\nimport type { IJsonLdValueObject } from \"./IJsonLdValueObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * The items that can be stored in an index map.\n */\nexport type IJsonLdIndexMapItem =\n\t| null\n\t| boolean\n\t| number\n\t| string\n\t| IJsonLdNodeObject\n\t| IJsonLdValueObject\n\t| IJsonLdListObject\n\t| IJsonLdSetObject;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdJsonArray.js","sourceRoot":"","sources":["../../../src/models/IJsonLdJsonArray.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdJsonValue } from \"./IJsonLdJsonValue.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * JSON Type for array.\n */\nexport type IJsonLdJsonArray = IJsonLdJsonValue[];\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdJsonObject.js","sourceRoot":"","sources":["../../../src/models/IJsonLdJsonObject.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdJsonValue } from \"./IJsonLdJsonValue.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * JSON Type for object.\n */\nexport interface IJsonLdJsonObject {\n\t[key: string]: IJsonLdJsonValue | undefined;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdJsonPrimitive.js","sourceRoot":"","sources":["../../../src/models/IJsonLdJsonPrimitive.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * JSON Primitive.\n */\nexport type IJsonLdJsonPrimitive = string | number | boolean | null;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdJsonValue.js","sourceRoot":"","sources":["../../../src/models/IJsonLdJsonValue.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdJsonArray } from \"./IJsonLdJsonArray.js\";\nimport type { IJsonLdJsonObject } from \"./IJsonLdJsonObject.js\";\nimport type { IJsonLdJsonPrimitive } from \"./IJsonLdJsonPrimitive.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * JSON Value.\n */\nexport type IJsonLdJsonValue = IJsonLdJsonPrimitive | IJsonLdJsonArray | IJsonLdJsonObject;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdLanguageMap.js","sourceRoot":"","sources":["../../../src/models/IJsonLdLanguageMap.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A language map is used to associate a language with a value in a way that allows easy programmatic access.\n * @see https://www.w3.org/TR/json-ld11/#language-maps\n */\nexport interface IJsonLdLanguageMap {\n\t[key: string]: null | string | string[];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdListObject.js","sourceRoot":"","sources":["../../../src/models/IJsonLdListObject.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n/* eslint-disable jsdoc/require-jsdoc */\nimport type { IJsonLdListOrSetItem } from \"./IJsonLdListOrSetItem.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A list represents an ordered set of values.\n * @see https://www.w3.org/TR/json-ld11/#lists-and-sets\n */\nexport interface IJsonLdListObject {\n\t\"@list\": IJsonLdListOrSetItem | IJsonLdListOrSetItem[];\n\t\"@index\"?: string | undefined;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdListOrSetItem.js","sourceRoot":"","sources":["../../../src/models/IJsonLdListOrSetItem.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\nimport type { IJsonLdValueObject } from \"./IJsonLdValueObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A list or set item can be a null, boolean, number, string, node object, or value object.\n */\nexport type IJsonLdListOrSetItem =\n\t| null\n\t| boolean\n\t| number\n\t| string\n\t| IJsonLdNodeObject\n\t| IJsonLdValueObject;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdNodeObject.js","sourceRoot":"","sources":["../../../src/models/IJsonLdNodeObject.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdIdMap } from \"./IJsonLdIdMap.js\";\nimport type { IJsonLdIncludedBlock } from \"./IJsonLdIncludedBlock.js\";\nimport type { IJsonLdIndexMap } from \"./IJsonLdIndexMap.js\";\nimport type { IJsonLdLanguageMap } from \"./IJsonLdLanguageMap.js\";\nimport type { IJsonLdNodePrimitive } from \"./IJsonLdNodePrimitive.js\";\nimport type { IJsonLdObject } from \"./IJsonLdObject.js\";\nimport type { IJsonLdTypeMap } from \"./IJsonLdTypeMap.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A node object represents zero or more properties of a node\n * in the graph serialized by the JSON-LD document.\n * @see https://www.w3.org/TR/json-ld11/#node-objects\n */\nexport interface IJsonLdNodeObject extends IJsonLdObject {\n\t[key: string]:\n\t\t| IJsonLdNodePrimitive\n\t\t| IJsonLdNodePrimitive[]\n\t\t| IJsonLdLanguageMap\n\t\t| IJsonLdIndexMap\n\t\t| IJsonLdIncludedBlock\n\t\t| IJsonLdIdMap\n\t\t| IJsonLdTypeMap\n\t\t| IJsonLdNodeObject[keyof IJsonLdNodeObject];\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdNodePrimitive.js","sourceRoot":"","sources":["../../../src/models/IJsonLdNodePrimitive.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdGraphObject } from \"./IJsonLdGraphObject.js\";\nimport type { IJsonLdListObject } from \"./IJsonLdListObject.js\";\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\nimport type { IJsonLdSetObject } from \"./IJsonLdSetObject.js\";\nimport type { IJsonLdValueObject } from \"./IJsonLdValueObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A node primitive is a JSON-LD value which is not one of the defined NodeObject properties.\n */\nexport type IJsonLdNodePrimitive =\n\t| null\n\t| boolean\n\t| number\n\t| string\n\t| IJsonLdNodeObject\n\t| IJsonLdGraphObject\n\t| IJsonLdValueObject\n\t| IJsonLdListObject\n\t| IJsonLdSetObject;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdObject.js","sourceRoot":"","sources":["../../../src/models/IJsonLdObject.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n/* eslint-disable jsdoc/require-jsdoc */\nimport type { IJsonLdContextDefinitionRoot } from \"./IJsonLdContextDefinitionRoot.js\";\nimport type { IJsonLdIncludedBlock } from \"./IJsonLdIncludedBlock.js\";\nimport type { IJsonLdJsonObject } from \"./IJsonLdJsonObject.js\";\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * An object represents the pre-defined properties of the node object\n * in the graph serialized by the JSON-LD document.\n * @see https://www.w3.org/TR/json-ld11/#node-objects\n */\nexport interface IJsonLdObject {\n\t\"@context\"?: IJsonLdContextDefinitionRoot | undefined;\n\t\"@id\"?: string | string[] | undefined;\n\t\"@included\"?: IJsonLdIncludedBlock | undefined;\n\t\"@graph\"?: IJsonLdNodeObject | IJsonLdNodeObject[] | undefined;\n\t\"@nest\"?: IJsonLdJsonObject | IJsonLdJsonObject[] | undefined;\n\t\"@type\"?: string | string[] | undefined;\n\t\"@reverse\"?: { [key: string]: string } | undefined;\n\t\"@index\"?: string | undefined;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdSetObject.js","sourceRoot":"","sources":["../../../src/models/IJsonLdSetObject.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n/* eslint-disable jsdoc/require-jsdoc */\nimport type { IJsonLdListOrSetItem } from \"./IJsonLdListOrSetItem.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A set represents an unordered set of values.\n * @see https://www.w3.org/TR/json-ld11/#lists-and-sets\n */\nexport interface IJsonLdSetObject {\n\t\"@set\": IJsonLdListOrSetItem | IJsonLdListOrSetItem[];\n\t\"@index\"?: string | undefined;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdTypeMap.js","sourceRoot":"","sources":["../../../src/models/IJsonLdTypeMap.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdNodeObject } from \"./IJsonLdNodeObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A type map is used to associate an IRI with a value that allows easy programmatic access.\n * @see https://www.w3.org/TR/json-ld11/#type-maps\n */\nexport interface IJsonLdTypeMap {\n\t[key: string]: string | IJsonLdNodeObject;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJsonLdValueObject.js","sourceRoot":"","sources":["../../../src/models/IJsonLdValueObject.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IJsonLdContextDefinitionRoot } from \"./IJsonLdContextDefinitionRoot.js\";\nimport type { IJsonLdJsonArray } from \"./IJsonLdJsonArray.js\";\nimport type { IJsonLdJsonObject } from \"./IJsonLdJsonObject.js\";\n\n/**\n * This is a copy of the types from the npm jsonld package. This is necessary as the JSON schema generators\n * that are used in other packages cannot understand some of the types e.g. OrArray\n */\n\n/**\n * A value object is used to explicitly associate a type or a language with a value\n * to create a typed value or a language-tagged string and possibly associate a base direction.\n * @see https://www.w3.org/TR/json-ld11/#value-objects\n */\nexport type IJsonLdValueObject = {\n\t\"@index\"?: string | undefined;\n\t\"@context\"?: IJsonLdContextDefinitionRoot | undefined;\n} & (\n\t| {\n\t\t\t\"@value\": null | boolean | number | string;\n\t\t\t\"@language\"?: string | undefined;\n\t\t\t\"@direction\"?: \"ltr\" | \"rtl\" | null | undefined;\n\t }\n\t| {\n\t\t\t\"@value\": null | boolean | number | string;\n\t\t\t\"@type\": string;\n\t }\n\t| {\n\t\t\t\"@value\": null | boolean | number | string | IJsonLdJsonObject | IJsonLdJsonArray;\n\t\t\t\"@type\": \"@json\";\n\t }\n);\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2024 IOTA Stiftung.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0.
|
|
3
|
+
/**
|
|
4
|
+
* The contexts of JSON-LD data.
|
|
5
|
+
*/
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
7
|
+
export const JsonLdContexts = {
|
|
8
|
+
/**
|
|
9
|
+
* Context Root.
|
|
10
|
+
*/
|
|
11
|
+
ContextRoot: "https://schema.twindev.org/json-ld/"
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=jsonLdContexts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsonLdContexts.js","sourceRoot":"","sources":["../../../src/models/jsonLdContexts.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B;;OAEG;IACH,WAAW,EAAE,qCAAqC;CACzC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The contexts of JSON-LD data.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const JsonLdContexts = {\n\t/**\n\t * Context Root.\n\t */\n\tContextRoot: \"https://schema.twindev.org/json-ld/\"\n} as const;\n\n/**\n * The contexts of JSON-LD data.\n */\nexport type JsonLdContexts = (typeof JsonLdContexts)[keyof typeof JsonLdContexts];\n"]}
|