@ng-org/shex-orm 0.1.2-alpha.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.
Files changed (47) hide show
  1. package/README.md +236 -0
  2. package/dist/ShexJTypes.d.ts +542 -0
  3. package/dist/ShexJTypes.d.ts.map +1 -0
  4. package/dist/ShexJTypes.js +10 -0
  5. package/dist/build.d.ts +8 -0
  6. package/dist/build.d.ts.map +1 -0
  7. package/dist/build.js +72 -0
  8. package/dist/cli.d.ts +3 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +15 -0
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +1 -0
  14. package/dist/schema-converter/__tests__/typingTransformer.test.d.ts +2 -0
  15. package/dist/schema-converter/__tests__/typingTransformer.test.d.ts.map +1 -0
  16. package/dist/schema-converter/__tests__/typingTransformer.test.js +76 -0
  17. package/dist/schema-converter/converter.d.ts +12 -0
  18. package/dist/schema-converter/converter.d.ts.map +1 -0
  19. package/dist/schema-converter/converter.js +79 -0
  20. package/dist/schema-converter/templates/schema.ejs +8 -0
  21. package/dist/schema-converter/templates/shapeTypes.ejs +14 -0
  22. package/dist/schema-converter/templates/typings.ejs +14 -0
  23. package/dist/schema-converter/transformers/ShexJSchemaTransformer.d.ts +348 -0
  24. package/dist/schema-converter/transformers/ShexJSchemaTransformer.d.ts.map +1 -0
  25. package/dist/schema-converter/transformers/ShexJSchemaTransformer.js +239 -0
  26. package/dist/schema-converter/transformers/ShexJTypingTransformer.d.ts +366 -0
  27. package/dist/schema-converter/transformers/ShexJTypingTransformer.d.ts.map +1 -0
  28. package/dist/schema-converter/transformers/ShexJTypingTransformer.js +623 -0
  29. package/dist/schema-converter/util/ShapeInterfaceDeclaration.d.ts +5 -0
  30. package/dist/schema-converter/util/ShapeInterfaceDeclaration.d.ts.map +1 -0
  31. package/dist/schema-converter/util/ShapeInterfaceDeclaration.js +1 -0
  32. package/dist/schema-converter/util/annotateReadablePredicates.d.ts +8 -0
  33. package/dist/schema-converter/util/annotateReadablePredicates.d.ts.map +1 -0
  34. package/dist/schema-converter/util/annotateReadablePredicates.js +148 -0
  35. package/dist/schema-converter/util/dedupeObjectTypeMembers.d.ts +3 -0
  36. package/dist/schema-converter/util/dedupeObjectTypeMembers.d.ts.map +1 -0
  37. package/dist/schema-converter/util/dedupeObjectTypeMembers.js +47 -0
  38. package/dist/schema-converter/util/getRdfTypesForTripleConstraint.d.ts +4 -0
  39. package/dist/schema-converter/util/getRdfTypesForTripleConstraint.d.ts.map +1 -0
  40. package/dist/schema-converter/util/getRdfTypesForTripleConstraint.js +98 -0
  41. package/dist/types.d.ts +37 -0
  42. package/dist/types.d.ts.map +1 -0
  43. package/dist/types.js +10 -0
  44. package/dist/util/forAllShapes.d.ts +2 -0
  45. package/dist/util/forAllShapes.d.ts.map +1 -0
  46. package/dist/util/forAllShapes.js +25 -0
  47. package/package.json +61 -0
package/dist/cli.js ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import { program } from "commander";
3
+ import { build } from "./build.js";
4
+ program
5
+ .name("NG-ORM")
6
+ .description("CLI to some JavaScript string utilities")
7
+ .version("0.1.0");
8
+ program
9
+ .command("build")
10
+ .description("Build contents of a shex folder into Shape Types")
11
+ .option("-i, --input <inputPath>", "Provide the input path", "./.shapes")
12
+ .option("-o, --output <outputPath>", "Provide the output path", "./.orm")
13
+ .option("-b, --baseIRI <baseIri>", "The base IRI for anonymous shapes", "https://nextgraph.org/shapes#")
14
+ .action(build);
15
+ program.parse();
@@ -0,0 +1,2 @@
1
+ export * from "./types.ts";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from "./types.js";
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=typingTransformer.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typingTransformer.test.d.ts","sourceRoot":"","sources":["../../../src/schema-converter/__tests__/typingTransformer.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,76 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import annotateReadablePredicates from "../util/annotateReadablePredicates.js";
3
+ import { shexJConverter } from "../converter.js";
4
+ const TYPE_IRI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type";
5
+ function buildSchema() {
6
+ return {
7
+ type: "Schema",
8
+ shapes: [
9
+ {
10
+ type: "ShapeDecl",
11
+ id: "http://example.org/Expense",
12
+ shapeExpr: {
13
+ type: "Shape",
14
+ expression: {
15
+ type: "EachOf",
16
+ expressions: [
17
+ {
18
+ type: "TripleConstraint",
19
+ predicate: TYPE_IRI,
20
+ valueExpr: {
21
+ type: "NodeConstraint",
22
+ values: [
23
+ {
24
+ value: "http://example.org/Expense",
25
+ },
26
+ ],
27
+ },
28
+ },
29
+ ],
30
+ },
31
+ },
32
+ },
33
+ {
34
+ type: "ShapeDecl",
35
+ id: "http://example.org/ExpenseCategory",
36
+ shapeExpr: {
37
+ type: "Shape",
38
+ extra: [TYPE_IRI],
39
+ expression: {
40
+ type: "EachOf",
41
+ expressions: [
42
+ {
43
+ type: "TripleConstraint",
44
+ predicate: TYPE_IRI,
45
+ valueExpr: {
46
+ type: "NodeConstraint",
47
+ values: [
48
+ {
49
+ value: "http://example.org/ExpenseCategory",
50
+ },
51
+ ],
52
+ },
53
+ },
54
+ ],
55
+ },
56
+ },
57
+ },
58
+ ],
59
+ };
60
+ }
61
+ async function buildTypingsText() {
62
+ const schema = buildSchema();
63
+ annotateReadablePredicates(schema);
64
+ const [typings] = await shexJConverter(schema);
65
+ return typings.typingsString;
66
+ }
67
+ describe("ShexJTypingTransformer", () => {
68
+ it("emits literal unions for rdf:type constraints", async () => {
69
+ const typings = await buildTypingsText();
70
+ expect(typings).toMatch(/interface Expense[\s\S]*?"@type": "http:\/\/example\.org\/Expense";/);
71
+ });
72
+ it("treats EXTRA rdf:type predicates as plural", async () => {
73
+ const typings = await buildTypingsText();
74
+ expect(typings).toMatch(/interface ExpenseCategory[\s\S]*?"@type": Set<"http:\/\/example\.org\/ExpenseCategory" \|[\s]*\(?string[\s]*&[\s]*\{[\s]*\}\)?>;/);
75
+ });
76
+ });
@@ -0,0 +1,12 @@
1
+ import type { Schema } from "@ldo/traverser-shexj";
2
+ import * as dom from "dts-dom";
3
+ import type { Schema as ShapeSchema } from "../types.ts";
4
+ export interface TypingReturn {
5
+ typingsString: string;
6
+ typings: {
7
+ typingString: string;
8
+ dts: dom.TopLevelDeclaration;
9
+ }[];
10
+ }
11
+ export declare function shexJConverter(shexj: Schema): Promise<[TypingReturn, ShapeSchema]>;
12
+ //# sourceMappingURL=converter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../src/schema-converter/converter.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAM/B,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAS,MAAM,aAAa,CAAC;AAEhE,MAAM,WAAW,YAAY;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE;QACL,YAAY,EAAE,MAAM,CAAC;QACrB,GAAG,EAAE,GAAG,CAAC,mBAAmB,CAAC;KAChC,EAAE,CAAC;CACP;AAED,wBAAsB,cAAc,CAChC,KAAK,EAAE,MAAM,GACd,OAAO,CAAC,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,CAkDtC"}
@@ -0,0 +1,79 @@
1
+ // Copyright (c) 2025 Laurin Weger, Par le Peuple, NextGraph.org developers
2
+ // All rights reserved.
3
+ // Copyright (c) 2023 Jackson Morgan
4
+ // Licensed under the Apache License, Version 2.0
5
+ // <LICENSE-APACHE2 or http://www.apache.org/licenses/LICENSE-2.0>
6
+ // or the MIT license <LICENSE-MIT or http://opensource.org/licenses/MIT>,
7
+ // at your option. All files in the project carrying such
8
+ // notice may not be copied, modified, or distributed except
9
+ // according to those terms.
10
+ // SPDX-License-Identifier: Apache-2.0 OR MIT
11
+ import { jsonld2graphobject } from "jsonld2graphobject";
12
+ import * as dom from "dts-dom";
13
+ import { ShexJTypingTransformerCompact, additionalCompactEnumAliases, } from "./transformers/ShexJTypingTransformer.js";
14
+ import { ShexJSchemaTransformerCompact } from "./transformers/ShexJSchemaTransformer.js";
15
+ export async function shexJConverter(shexj) {
16
+ // Prepare processed schema (names still rely on context visitor)
17
+ const processedShexj = (await jsonld2graphobject({
18
+ ...shexj,
19
+ "@id": "SCHEMA",
20
+ "@context": "http://www.w3.org/ns/shex.jsonld",
21
+ }, "SCHEMA"));
22
+ additionalCompactEnumAliases.clear();
23
+ const declarations = await ShexJTypingTransformerCompact.transform(processedShexj, "Schema", null);
24
+ const compactSchemaShapesUnflattened = await ShexJSchemaTransformerCompact.transform(processedShexj, "Schema", null);
25
+ const compactSchema = flattenSchema(compactSchemaShapesUnflattened);
26
+ // Append only enum aliases (no interface Id aliases in compact format now)
27
+ const hasName = (d) => typeof d.name === "string";
28
+ additionalCompactEnumAliases.forEach((alias) => {
29
+ const exists = declarations.some((d) => hasName(d) && d.name === alias);
30
+ if (!exists)
31
+ declarations.push(dom.create.alias(alias, dom.create.namedTypeReference("IRI")));
32
+ });
33
+ const typings = declarations.map((declaration) => ({
34
+ typingString: dom
35
+ .emit(declaration, {
36
+ rootFlags: dom.ContextFlags.InAmbientNamespace,
37
+ })
38
+ .replace(/\r\n/g, "\n"),
39
+ dts: declaration,
40
+ }));
41
+ const header = `export type IRI = string;\n\n`;
42
+ const typingsString = header + typings.map((t) => `export ${t.typingString}`).join("");
43
+ return [{ typingsString, typings }, compactSchema];
44
+ }
45
+ /** Shapes may be nested. Put all to their root and give nested ones ids. */
46
+ function flattenSchema(shapes) {
47
+ let schema = {};
48
+ for (const shape of shapes) {
49
+ schema[shape.iri] = shape;
50
+ // Find nested, unflattened (i.e. anonymous) schemas in predicates' dataTypes.
51
+ for (const pred of shape.predicates) {
52
+ for (let i = 0; i < pred.dataTypes.length; i++) {
53
+ const dt = pred.dataTypes[i];
54
+ if (dt.valType === "shape" &&
55
+ typeof dt.shape === "object" &&
56
+ dt.shape !== null) {
57
+ // create a deterministic id for the nested shape; include index if multiple shape entries exist
58
+ const shapeCount = pred.dataTypes.filter((d) => d.valType === "shape").length;
59
+ const newId = shape.iri +
60
+ "||" +
61
+ pred.iri +
62
+ (shapeCount > 1 ? `||${i}` : "");
63
+ // Recurse
64
+ const flattened = flattenSchema([
65
+ {
66
+ ...dt.shape,
67
+ iri: newId,
68
+ },
69
+ ]);
70
+ // Replace the nested schema with its new id.
71
+ dt.shape = newId;
72
+ schema = { ...schema, ...flattened };
73
+ }
74
+ }
75
+ }
76
+ // Flatten / Recurse
77
+ }
78
+ return schema;
79
+ }
@@ -0,0 +1,8 @@
1
+ import type { Schema } from "@ng-org/shex-orm";
2
+
3
+ /**
4
+ * =============================================================================
5
+ * <%- fileName %>Schema: Schema for <%- fileName %>
6
+ * =============================================================================
7
+ */
8
+ export const <%- fileName %>Schema: Schema = <%- compactSchema %>;
@@ -0,0 +1,14 @@
1
+ import type { ShapeType } from "@ng-org/shex-orm";
2
+ import { <%- fileName %>Schema } from "./<%- fileName %>.schema";
3
+ import type {
4
+ <% typings.forEach((typing)=> { if (!/Id$/.test(typing.dts.name)) { -%>
5
+ <%- typing.dts.name %>,
6
+ <% } }); -%>} from "./<%- fileName %>.typings";
7
+
8
+ // ShapeTypes for <%- fileName %>
9
+ <% typings.forEach((typing)=> { if (!/Id$/.test(typing.dts.name)) { -%>
10
+ export const <%- typing.dts.name %>ShapeType: ShapeType<<%- typing.dts.name %>> = {
11
+ schema: <%- fileName %>Schema,
12
+ shape: "<%- typing.dts.shapeId %>",
13
+ };
14
+ <% } }); -%>
@@ -0,0 +1,14 @@
1
+ export type IRI = string;
2
+
3
+ /**
4
+ * =============================================================================
5
+ * Typescript Typings for <%- fileName %>
6
+ * =============================================================================
7
+ */
8
+
9
+ <% typings.forEach((typing)=> { -%>
10
+ /**
11
+ * <%- typing.dts.name %> Type
12
+ */
13
+ export <%- typing.typingString -%>
14
+ <% }); -%>
@@ -0,0 +1,348 @@
1
+ import type { Predicate, DataType, Shape } from "../../types.ts";
2
+ export declare const ShexJSchemaTransformerCompact: import("@ldo/type-traverser").Transformer<{
3
+ Schema: {
4
+ kind: "interface";
5
+ type: import("@ldo/traverser-shexj").Schema;
6
+ properties: {
7
+ startActs: "SemAct";
8
+ start: "shapeExprOrRef";
9
+ imports: "IRIREF";
10
+ shapes: "ShapeDecl";
11
+ };
12
+ };
13
+ ShapeDecl: {
14
+ kind: "interface";
15
+ type: import("@ldo/traverser-shexj").ShapeDecl;
16
+ properties: {
17
+ id: "shapeDeclLabel";
18
+ abstract: "BOOL";
19
+ restricts: "shapeExprOrRef";
20
+ shapeExpr: "shapeExpr";
21
+ };
22
+ };
23
+ shapeExpr: {
24
+ kind: "union";
25
+ type: import("@ldo/traverser-shexj").shapeExpr;
26
+ typeNames: "ShapeOr" | "ShapeAnd" | "ShapeNot" | "NodeConstraint" | "Shape" | "ShapeExternal";
27
+ };
28
+ shapeExprOrRef: {
29
+ kind: "union";
30
+ type: import("@ldo/traverser-shexj").shapeExprOrRef;
31
+ typeNames: "shapeExpr" | "shapeDeclRef";
32
+ };
33
+ ShapeOr: {
34
+ kind: "interface";
35
+ type: import("@ldo/traverser-shexj").ShapeOr;
36
+ properties: {
37
+ shapeExprs: "shapeExprOrRef";
38
+ };
39
+ };
40
+ ShapeAnd: {
41
+ kind: "interface";
42
+ type: import("@ldo/traverser-shexj").ShapeAnd;
43
+ properties: {
44
+ shapeExprs: "shapeExprOrRef";
45
+ };
46
+ };
47
+ ShapeNot: {
48
+ kind: "interface";
49
+ type: import("@ldo/traverser-shexj").ShapeNot;
50
+ properties: {
51
+ shapeExpr: "shapeExprOrRef";
52
+ };
53
+ };
54
+ ShapeExternal: {
55
+ kind: "interface";
56
+ type: import("@ldo/traverser-shexj").ShapeExternal;
57
+ properties: Record<string, never>;
58
+ };
59
+ shapeDeclRef: {
60
+ kind: "union";
61
+ type: import("@ldo/traverser-shexj").shapeDeclRef;
62
+ typeNames: "shapeDeclLabel" | "ShapeDecl";
63
+ };
64
+ shapeDeclLabel: {
65
+ kind: "union";
66
+ type: import("@ldo/traverser-shexj").shapeDeclLabel;
67
+ typeNames: "IRIREF" | "BNODE";
68
+ };
69
+ NodeConstraint: {
70
+ kind: "interface";
71
+ type: import("@ldo/traverser-shexj").NodeConstraint;
72
+ properties: {
73
+ datatype: "IRIREF";
74
+ values: "valueSetValue";
75
+ length: "INTEGER";
76
+ minlength: "INTEGER";
77
+ maxlength: "INTEGER";
78
+ pattern: "STRING";
79
+ flags: "STRING";
80
+ mininclusive: "numericLiteral";
81
+ minexclusive: "numericLiteral";
82
+ totaldigits: "INTEGER";
83
+ fractiondigits: "INTEGER";
84
+ semActs: "SemAct";
85
+ annotations: "Annotation";
86
+ };
87
+ };
88
+ numericLiteral: {
89
+ kind: "union";
90
+ type: import("@ldo/traverser-shexj").numericLiteral;
91
+ typeNames: "INTEGER" | "DECIMAL" | "DOUBLE";
92
+ };
93
+ valueSetValue: {
94
+ kind: "union";
95
+ type: import("@ldo/traverser-shexj").valueSetValue;
96
+ typeNames: "objectValue" | "IriStem" | "IriStemRange" | "LiteralStem" | "LiteralStemRange" | "Language" | "LanguageStem" | "LanguageStemRange";
97
+ };
98
+ objectValue: {
99
+ kind: "union";
100
+ type: import("@ldo/traverser-shexj").objectValue;
101
+ typeNames: "IRIREF" | "ObjectLiteral";
102
+ };
103
+ ObjectLiteral: {
104
+ kind: "interface";
105
+ type: import("@ldo/traverser-shexj").ObjectLiteral;
106
+ properties: {
107
+ value: "STRING";
108
+ language: "STRING";
109
+ type: "STRING";
110
+ };
111
+ };
112
+ IriStem: {
113
+ kind: "interface";
114
+ type: import("@ldo/traverser-shexj").IriStem;
115
+ properties: {
116
+ stem: "IRIREF";
117
+ };
118
+ };
119
+ IriStemRange: {
120
+ kind: "interface";
121
+ type: import("@ldo/traverser-shexj").IriStemRange;
122
+ properties: {
123
+ stem: "IRIREF";
124
+ exclusions: "IriStemRangeExclusions";
125
+ };
126
+ };
127
+ IriStemRangeExclusions: {
128
+ kind: "union";
129
+ type: import("@ldo/traverser-shexj").IRIREF | import("@ldo/traverser-shexj").IriStem;
130
+ typeNames: "IRIREF" | "IriStem";
131
+ };
132
+ LiteralStem: {
133
+ kind: "interface";
134
+ type: import("@ldo/traverser-shexj").LiteralStem;
135
+ properties: {
136
+ stem: "STRING";
137
+ };
138
+ };
139
+ LiteralStemRange: {
140
+ kind: "interface";
141
+ type: import("@ldo/traverser-shexj").LiteralStemRange;
142
+ properties: {
143
+ stem: "LiteralStemRangeStem";
144
+ exclusions: "LiteralStemRangeExclusions";
145
+ };
146
+ };
147
+ LiteralStemRangeStem: {
148
+ kind: "union";
149
+ type: import("@ldo/traverser-shexj").STRING | import("@ldo/traverser-shexj").Wildcard;
150
+ typeNames: "STRING" | "Wildcard";
151
+ };
152
+ LiteralStemRangeExclusions: {
153
+ kind: "union";
154
+ type: import("@ldo/traverser-shexj").STRING | import("@ldo/traverser-shexj").LiteralStem;
155
+ typeNames: "STRING" | "LiteralStem";
156
+ };
157
+ Language: {
158
+ kind: "interface";
159
+ type: import("@ldo/traverser-shexj").Language;
160
+ properties: {
161
+ languageTag: "LANGTAG";
162
+ };
163
+ };
164
+ LanguageStem: {
165
+ kind: "interface";
166
+ type: import("@ldo/traverser-shexj").LanguageStem;
167
+ properties: {
168
+ stem: "LANGTAG";
169
+ };
170
+ };
171
+ LanguageStemRange: {
172
+ kind: "interface";
173
+ type: import("@ldo/traverser-shexj").LanguageStemRange;
174
+ properties: {
175
+ stem: "LanguageStemRangeStem";
176
+ exclusions: "LanguageStemRangeExclusions";
177
+ };
178
+ };
179
+ LanguageStemRangeStem: {
180
+ kind: "union";
181
+ type: import("@ldo/traverser-shexj").LANGTAG | import("@ldo/traverser-shexj").Wildcard;
182
+ typeNames: "LANGTAG" | "Wildcard";
183
+ };
184
+ LanguageStemRangeExclusions: {
185
+ kind: "union";
186
+ type: import("@ldo/traverser-shexj").LANGTAG | import("@ldo/traverser-shexj").LanguageStem;
187
+ typeNames: "LANGTAG" | "LanguageStem";
188
+ };
189
+ Wildcard: {
190
+ kind: "interface";
191
+ type: import("@ldo/traverser-shexj").Wildcard;
192
+ properties: Record<string, never>;
193
+ };
194
+ Shape: {
195
+ kind: "interface";
196
+ type: import("@ldo/traverser-shexj").Shape;
197
+ properties: {
198
+ closed: "BOOL";
199
+ extra: "IRIREF";
200
+ extends: "shapeExprOrRef";
201
+ expression: "tripleExprOrRef";
202
+ semActs: "SemAct";
203
+ annotations: "Annotation";
204
+ };
205
+ };
206
+ tripleExpr: {
207
+ kind: "union";
208
+ type: import("@ldo/traverser-shexj").tripleExpr;
209
+ typeNames: "EachOf" | "OneOf" | "TripleConstraint";
210
+ };
211
+ tripleExprOrRef: {
212
+ kind: "union";
213
+ type: import("@ldo/traverser-shexj").tripleExprOrRef;
214
+ typeNames: "tripleExpr" | "tripleExprRef";
215
+ };
216
+ EachOf: {
217
+ kind: "interface";
218
+ type: import("@ldo/traverser-shexj").EachOf;
219
+ properties: {
220
+ id: "tripleExprLabel";
221
+ min: "INTEGER";
222
+ max: "INTEGER";
223
+ expressions: "tripleExprOrRef";
224
+ semActs: "SemAct";
225
+ annotations: "Annotation";
226
+ };
227
+ };
228
+ OneOf: {
229
+ kind: "interface";
230
+ type: import("@ldo/traverser-shexj").OneOf;
231
+ properties: {
232
+ id: "tripleExprLabel";
233
+ min: "INTEGER";
234
+ max: "INTEGER";
235
+ expressions: "tripleExprOrRef";
236
+ semActs: "SemAct";
237
+ annotations: "Annotation";
238
+ };
239
+ };
240
+ TripleConstraint: {
241
+ kind: "interface";
242
+ type: import("@ldo/traverser-shexj").TripleConstraint;
243
+ properties: {
244
+ id: "tripleExprLabel";
245
+ min: "INTEGER";
246
+ max: "INTEGER";
247
+ inverse: "BOOL";
248
+ predicate: "IRIREF";
249
+ valueExpr: "shapeExprOrRef";
250
+ semActs: "SemAct";
251
+ annotations: "Annotation";
252
+ };
253
+ };
254
+ tripleExprRef: {
255
+ kind: "union";
256
+ type: import("@ldo/traverser-shexj").tripleExprRef;
257
+ typeNames: "tripleExprLabel";
258
+ };
259
+ tripleExprLabel: {
260
+ kind: "union";
261
+ type: import("@ldo/traverser-shexj").tripleExprLabel;
262
+ typeNames: "IRIREF" | "BNODE";
263
+ };
264
+ SemAct: {
265
+ kind: "interface";
266
+ type: import("@ldo/traverser-shexj").SemAct;
267
+ properties: {
268
+ name: "IRIREF";
269
+ code: "STRING";
270
+ };
271
+ };
272
+ Annotation: {
273
+ kind: "interface";
274
+ type: import("@ldo/traverser-shexj").Annotation;
275
+ properties: {
276
+ predicate: "IRI";
277
+ object: "objectValue";
278
+ };
279
+ };
280
+ IRIREF: {
281
+ kind: "primitive";
282
+ type: import("@ldo/traverser-shexj").IRIREF;
283
+ };
284
+ BNODE: {
285
+ kind: "primitive";
286
+ type: import("@ldo/traverser-shexj").BNODE;
287
+ };
288
+ INTEGER: {
289
+ kind: "primitive";
290
+ type: import("@ldo/traverser-shexj").INTEGER;
291
+ };
292
+ STRING: {
293
+ kind: "primitive";
294
+ type: import("@ldo/traverser-shexj").STRING;
295
+ };
296
+ DECIMAL: {
297
+ kind: "primitive";
298
+ type: import("@ldo/traverser-shexj").DECIMAL;
299
+ };
300
+ DOUBLE: {
301
+ kind: "primitive";
302
+ type: import("@ldo/traverser-shexj").DOUBLE;
303
+ };
304
+ LANGTAG: {
305
+ kind: "primitive";
306
+ type: import("@ldo/traverser-shexj").LANGTAG;
307
+ };
308
+ BOOL: {
309
+ kind: "primitive";
310
+ type: import("@ldo/traverser-shexj").BOOL;
311
+ };
312
+ IRI: {
313
+ kind: "primitive";
314
+ type: import("@ldo/traverser-shexj").IRI;
315
+ };
316
+ }, {
317
+ Schema: {
318
+ return: Shape[];
319
+ };
320
+ ShapeDecl: {
321
+ return: Shape;
322
+ };
323
+ Shape: {
324
+ return: Shape;
325
+ };
326
+ EachOf: {
327
+ return: Shape;
328
+ };
329
+ TripleConstraint: {
330
+ return: Predicate;
331
+ };
332
+ NodeConstraint: {
333
+ return: DataType;
334
+ };
335
+ ShapeOr: {
336
+ return: DataType[];
337
+ };
338
+ ShapeAnd: {
339
+ return: never;
340
+ };
341
+ ShapeNot: {
342
+ return: never;
343
+ };
344
+ ShapeExternal: {
345
+ return: never;
346
+ };
347
+ }, null>;
348
+ //# sourceMappingURL=ShexJSchemaTransformer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ShexJSchemaTransformer.d.ts","sourceRoot":"","sources":["../../../src/schema-converter/transformers/ShexJSchemaTransformer.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AA0DjE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAE1B;QAAE,MAAM,EAAE,KAAK,EAAE,CAAA;KAAE;eAChB;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE;WACrB;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE;YAChB;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE;sBACP;QAAE,MAAM,EAAE,SAAS,CAAA;KAAE;oBACvB;QAAE,MAAM,EAAE,QAAQ,CAAA;KAAE;aAC3B;QAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;KAAE;cACrB;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE;cACjB;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE;mBACZ;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE;QA2MtC,CAAC"}