@ldo/traverser-shexj 1.0.0-alpha.28 → 1.0.0-alpha.34
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/ShexJTraverser.cjs +9 -0
- package/dist/ShexJTraverser.d.cts +9 -0
- package/dist/ShexJTraverser.d.cts.map +1 -0
- package/dist/ShexJTraverser.d.ts +9 -0
- package/dist/ShexJTraverser.d.ts.map +1 -0
- package/dist/ShexJTraverser.js +9 -0
- package/dist/ShexJTraverser.js.map +1 -0
- package/dist/ShexJTraverserDefinition.cjs +253 -0
- package/dist/ShexJTraverserDefinition.d.cts +10 -0
- package/dist/ShexJTraverserDefinition.d.cts.map +1 -0
- package/dist/ShexJTraverserDefinition.d.ts +10 -0
- package/dist/ShexJTraverserDefinition.d.ts.map +1 -0
- package/dist/ShexJTraverserDefinition.js +253 -0
- package/dist/ShexJTraverserDefinition.js.map +1 -0
- package/dist/ShexJTraverserTypes.d.cts +323 -0
- package/dist/ShexJTraverserTypes.d.cts.map +1 -0
- package/dist/ShexJTraverserTypes.d.ts +323 -0
- package/dist/ShexJTraverserTypes.d.ts.map +1 -0
- package/dist/ShexJTypes.d.cts +540 -0
- package/dist/ShexJTypes.d.cts.map +1 -0
- package/dist/ShexJTypes.d.ts +540 -0
- package/dist/ShexJTypes.d.ts.map +1 -0
- package/dist/_virtual/rolldown_runtime.cjs +30 -0
- package/dist/index.cjs +10 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/package.json +17 -14
- package/src/ShexJTraverser.ts +2 -2
- package/src/ShexJTraverserDefinition.ts +2 -2
- package/src/ShexJTraverserTypes.ts +1 -1
- package/src/index.ts +4 -4
- package/dist/cjs/ShexJTraverser.cjs +0 -7
- package/dist/cjs/ShexJTraverser.js.map +0 -1
- package/dist/cjs/ShexJTraverserDefinition.cjs +0 -293
- package/dist/cjs/ShexJTraverserDefinition.js.map +0 -1
- package/dist/cjs/ShexJTraverserTypes.cjs +0 -3
- package/dist/cjs/ShexJTraverserTypes.js.map +0 -1
- package/dist/cjs/ShexJTypes.cjs +0 -4
- package/dist/cjs/ShexJTypes.js.map +0 -1
- package/dist/cjs/index.cjs +0 -22
- package/dist/cjs/index.js.map +0 -1
- package/dist/esm/ShexJTraverser.js +0 -4
- package/dist/esm/ShexJTraverser.js.map +0 -1
- package/dist/esm/ShexJTraverserDefinition.js +0 -290
- package/dist/esm/ShexJTraverserDefinition.js.map +0 -1
- package/dist/esm/ShexJTraverserTypes.js +0 -2
- package/dist/esm/ShexJTraverserTypes.js.map +0 -1
- package/dist/esm/ShexJTypes.js +0 -3
- package/dist/esm/ShexJTypes.js.map +0 -1
- package/dist/esm/index.js +0 -6
- package/dist/esm/index.js.map +0 -1
- package/dist/types/ShexJTraverser.d.ts +0 -317
- package/dist/types/ShexJTraverser.d.ts.map +0 -1
- package/dist/types/ShexJTraverserDefinition.d.ts +0 -4
- package/dist/types/ShexJTraverserDefinition.d.ts.map +0 -1
- package/dist/types/ShexJTraverserTypes.d.ts +0 -318
- package/dist/types/ShexJTraverserTypes.d.ts.map +0 -1
- package/dist/types/ShexJTypes.d.ts +0 -538
- package/dist/types/ShexJTypes.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -6
- package/dist/types/index.d.ts.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require__Users_jacksonmorgan_O_ldo_packages_traverser_shexj_src_ShexJTraverserDefinition = require('./ShexJTraverserDefinition.cjs');
|
|
3
|
+
const __ldo_type_traverser = require_rolldown_runtime.__toESM(require("@ldo/type-traverser"));
|
|
4
|
+
|
|
5
|
+
//#region src/ShexJTraverser.ts
|
|
6
|
+
const ShexJTraverser = new __ldo_type_traverser.Traverser(require__Users_jacksonmorgan_O_ldo_packages_traverser_shexj_src_ShexJTraverserDefinition.ShexJTraverserDefinition);
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
exports.ShexJTraverser = ShexJTraverser;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Traverser } from "@ldo/type-traverser";
|
|
2
|
+
|
|
3
|
+
//#region src/ShexJTraverser.d.ts
|
|
4
|
+
declare const ShexJTraverser: Traverser<ShexJTraverserTypes>;
|
|
5
|
+
//# sourceMappingURL=ShexJTraverser.d.ts.map
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ShexJTraverser };
|
|
9
|
+
//# sourceMappingURL=ShexJTraverser.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShexJTraverser.d.cts","names":[],"sources":["../../src/ShexJTraverser.ts"],"sourcesContent":[],"mappings":";;;cAIa,gBAAc,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Traverser } from "@ldo/type-traverser";
|
|
2
|
+
|
|
3
|
+
//#region src/ShexJTraverser.d.ts
|
|
4
|
+
declare const ShexJTraverser: Traverser<ShexJTraverserTypes>;
|
|
5
|
+
//# sourceMappingURL=ShexJTraverser.d.ts.map
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ShexJTraverser as ShexJTraverser$1 };
|
|
9
|
+
//# sourceMappingURL=ShexJTraverser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShexJTraverser.d.ts","names":[],"sources":["../../src/ShexJTraverser.ts"],"sourcesContent":[],"mappings":";;;cAIa,gBAAc,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ShexJTraverserDefinition } from "./ShexJTraverserDefinition.js";
|
|
2
|
+
import { Traverser } from "@ldo/type-traverser";
|
|
3
|
+
|
|
4
|
+
//#region src/ShexJTraverser.ts
|
|
5
|
+
const ShexJTraverser = new Traverser(ShexJTraverserDefinition);
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ShexJTraverser };
|
|
9
|
+
//# sourceMappingURL=ShexJTraverser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShexJTraverser.js","names":[],"sources":["../src/ShexJTraverser.ts"],"sourcesContent":["import { ShexJTraverserDefinition } from \"./ShexJTraverserDefinition\";\nimport type { ShexJTraverserTypes } from \"./ShexJTraverserTypes\";\nimport { Traverser } from \"@ldo/type-traverser\";\n\nexport const ShexJTraverser = new Traverser<ShexJTraverserTypes>(\n ShexJTraverserDefinition,\n);\n"],"mappings":";;;;AAIA,MAAa,iBAAiB,IAAI,UAChC"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/ShexJTraverserDefinition.ts
|
|
3
|
+
const ShexJTraverserDefinition = {
|
|
4
|
+
Schema: {
|
|
5
|
+
kind: "interface",
|
|
6
|
+
properties: {
|
|
7
|
+
startActs: "SemAct",
|
|
8
|
+
start: "shapeExprOrRef",
|
|
9
|
+
imports: "IRIREF",
|
|
10
|
+
shapes: "ShapeDecl"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
ShapeDecl: {
|
|
14
|
+
kind: "interface",
|
|
15
|
+
properties: {
|
|
16
|
+
id: "shapeDeclLabel",
|
|
17
|
+
abstract: "BOOL",
|
|
18
|
+
restricts: "shapeExprOrRef",
|
|
19
|
+
shapeExpr: "shapeExpr"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
shapeExpr: {
|
|
23
|
+
kind: "union",
|
|
24
|
+
selector: (item) => item.type
|
|
25
|
+
},
|
|
26
|
+
shapeExprOrRef: {
|
|
27
|
+
kind: "union",
|
|
28
|
+
selector: (item) => typeof item === "string" || item.type === "ShapeDecl" ? "shapeDeclRef" : "shapeExpr"
|
|
29
|
+
},
|
|
30
|
+
ShapeOr: {
|
|
31
|
+
kind: "interface",
|
|
32
|
+
properties: { shapeExprs: "shapeExprOrRef" }
|
|
33
|
+
},
|
|
34
|
+
ShapeAnd: {
|
|
35
|
+
kind: "interface",
|
|
36
|
+
properties: { shapeExprs: "shapeExprOrRef" }
|
|
37
|
+
},
|
|
38
|
+
ShapeNot: {
|
|
39
|
+
kind: "interface",
|
|
40
|
+
properties: { shapeExpr: "shapeExprOrRef" }
|
|
41
|
+
},
|
|
42
|
+
ShapeExternal: {
|
|
43
|
+
kind: "interface",
|
|
44
|
+
properties: {}
|
|
45
|
+
},
|
|
46
|
+
shapeDeclRef: {
|
|
47
|
+
kind: "union",
|
|
48
|
+
selector: (value) => typeof value === "string" ? "shapeDeclLabel" : "ShapeDecl"
|
|
49
|
+
},
|
|
50
|
+
shapeDeclLabel: {
|
|
51
|
+
kind: "union",
|
|
52
|
+
selector: () => "IRIREF"
|
|
53
|
+
},
|
|
54
|
+
NodeConstraint: {
|
|
55
|
+
kind: "interface",
|
|
56
|
+
properties: {
|
|
57
|
+
datatype: "IRIREF",
|
|
58
|
+
values: "valueSetValue",
|
|
59
|
+
length: "INTEGER",
|
|
60
|
+
minlength: "INTEGER",
|
|
61
|
+
maxlength: "INTEGER",
|
|
62
|
+
pattern: "STRING",
|
|
63
|
+
flags: "STRING",
|
|
64
|
+
mininclusive: "numericLiteral",
|
|
65
|
+
minexclusive: "numericLiteral",
|
|
66
|
+
totaldigits: "INTEGER",
|
|
67
|
+
fractiondigits: "INTEGER",
|
|
68
|
+
semActs: "SemAct",
|
|
69
|
+
annotations: "Annotation"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
numericLiteral: {
|
|
73
|
+
kind: "union",
|
|
74
|
+
selector: () => "DOUBLE"
|
|
75
|
+
},
|
|
76
|
+
valueSetValue: {
|
|
77
|
+
kind: "union",
|
|
78
|
+
selector: (item) => {
|
|
79
|
+
if (typeof item === "string") return "objectValue";
|
|
80
|
+
else if (item.type && [
|
|
81
|
+
"IriStem",
|
|
82
|
+
"IriStemRange",
|
|
83
|
+
"LiteralStem",
|
|
84
|
+
"LiteralStemRange",
|
|
85
|
+
"Language",
|
|
86
|
+
"LanguageStem",
|
|
87
|
+
"LanguageStemRange"
|
|
88
|
+
].includes(item.type)) return item.type;
|
|
89
|
+
else return "objectValue";
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
objectValue: {
|
|
93
|
+
kind: "union",
|
|
94
|
+
selector: (item) => typeof item === "string" ? "IRIREF" : "ObjectLiteral"
|
|
95
|
+
},
|
|
96
|
+
ObjectLiteral: {
|
|
97
|
+
kind: "interface",
|
|
98
|
+
properties: {
|
|
99
|
+
value: "STRING",
|
|
100
|
+
language: "STRING",
|
|
101
|
+
type: "STRING"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
IriStem: {
|
|
105
|
+
kind: "interface",
|
|
106
|
+
properties: { stem: "IRIREF" }
|
|
107
|
+
},
|
|
108
|
+
IriStemRange: {
|
|
109
|
+
kind: "interface",
|
|
110
|
+
properties: {
|
|
111
|
+
stem: "IRIREF",
|
|
112
|
+
exclusions: "IriStemRangeExclusions"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
IriStemRangeExclusions: {
|
|
116
|
+
kind: "union",
|
|
117
|
+
selector: (item) => typeof item === "string" ? "IRIREF" : "IriStem"
|
|
118
|
+
},
|
|
119
|
+
LiteralStem: {
|
|
120
|
+
kind: "interface",
|
|
121
|
+
properties: { stem: "STRING" }
|
|
122
|
+
},
|
|
123
|
+
LiteralStemRange: {
|
|
124
|
+
kind: "interface",
|
|
125
|
+
properties: {
|
|
126
|
+
stem: "LiteralStemRangeStem",
|
|
127
|
+
exclusions: "LiteralStemRangeExclusions"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
LiteralStemRangeStem: {
|
|
131
|
+
kind: "union",
|
|
132
|
+
selector: (item) => typeof item === "string" ? "STRING" : "Wildcard"
|
|
133
|
+
},
|
|
134
|
+
LiteralStemRangeExclusions: {
|
|
135
|
+
kind: "union",
|
|
136
|
+
selector: (item) => typeof item === "string" ? "STRING" : "LiteralStem"
|
|
137
|
+
},
|
|
138
|
+
Language: {
|
|
139
|
+
kind: "interface",
|
|
140
|
+
properties: { languageTag: "LANGTAG" }
|
|
141
|
+
},
|
|
142
|
+
LanguageStem: {
|
|
143
|
+
kind: "interface",
|
|
144
|
+
properties: { stem: "LANGTAG" }
|
|
145
|
+
},
|
|
146
|
+
LanguageStemRange: {
|
|
147
|
+
kind: "interface",
|
|
148
|
+
properties: {
|
|
149
|
+
stem: "LanguageStemRangeStem",
|
|
150
|
+
exclusions: "LanguageStemRangeExclusions"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
LanguageStemRangeStem: {
|
|
154
|
+
kind: "union",
|
|
155
|
+
selector: (item) => typeof item === "string" ? "LANGTAG" : "Wildcard"
|
|
156
|
+
},
|
|
157
|
+
LanguageStemRangeExclusions: {
|
|
158
|
+
kind: "union",
|
|
159
|
+
selector: (item) => typeof item === "string" ? "LANGTAG" : "LanguageStem"
|
|
160
|
+
},
|
|
161
|
+
Wildcard: {
|
|
162
|
+
kind: "interface",
|
|
163
|
+
properties: {}
|
|
164
|
+
},
|
|
165
|
+
Shape: {
|
|
166
|
+
kind: "interface",
|
|
167
|
+
properties: {
|
|
168
|
+
closed: "BOOL",
|
|
169
|
+
extra: "IRIREF",
|
|
170
|
+
extends: "shapeExprOrRef",
|
|
171
|
+
expression: "tripleExprOrRef",
|
|
172
|
+
semActs: "SemAct",
|
|
173
|
+
annotations: "Annotation"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
tripleExpr: {
|
|
177
|
+
kind: "union",
|
|
178
|
+
selector: (item) => item.type
|
|
179
|
+
},
|
|
180
|
+
tripleExprOrRef: {
|
|
181
|
+
kind: "union",
|
|
182
|
+
selector: (item) => typeof item === "string" ? "tripleExprRef" : "tripleExpr"
|
|
183
|
+
},
|
|
184
|
+
EachOf: {
|
|
185
|
+
kind: "interface",
|
|
186
|
+
properties: {
|
|
187
|
+
id: "tripleExprLabel",
|
|
188
|
+
min: "INTEGER",
|
|
189
|
+
max: "INTEGER",
|
|
190
|
+
expressions: "tripleExprOrRef",
|
|
191
|
+
semActs: "SemAct",
|
|
192
|
+
annotations: "Annotation"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
OneOf: {
|
|
196
|
+
kind: "interface",
|
|
197
|
+
properties: {
|
|
198
|
+
id: "tripleExprLabel",
|
|
199
|
+
min: "INTEGER",
|
|
200
|
+
max: "INTEGER",
|
|
201
|
+
expressions: "tripleExprOrRef",
|
|
202
|
+
semActs: "SemAct",
|
|
203
|
+
annotations: "Annotation"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
TripleConstraint: {
|
|
207
|
+
kind: "interface",
|
|
208
|
+
properties: {
|
|
209
|
+
id: "tripleExprLabel",
|
|
210
|
+
min: "INTEGER",
|
|
211
|
+
max: "INTEGER",
|
|
212
|
+
inverse: "BOOL",
|
|
213
|
+
predicate: "IRIREF",
|
|
214
|
+
valueExpr: "shapeExprOrRef",
|
|
215
|
+
semActs: "SemAct",
|
|
216
|
+
annotations: "Annotation"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
tripleExprRef: {
|
|
220
|
+
kind: "union",
|
|
221
|
+
selector: () => "tripleExprLabel"
|
|
222
|
+
},
|
|
223
|
+
tripleExprLabel: {
|
|
224
|
+
kind: "union",
|
|
225
|
+
selector: () => "IRIREF"
|
|
226
|
+
},
|
|
227
|
+
SemAct: {
|
|
228
|
+
kind: "interface",
|
|
229
|
+
properties: {
|
|
230
|
+
name: "IRIREF",
|
|
231
|
+
code: "STRING"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
Annotation: {
|
|
235
|
+
kind: "interface",
|
|
236
|
+
properties: {
|
|
237
|
+
predicate: "IRI",
|
|
238
|
+
object: "objectValue"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
IRIREF: { kind: "primitive" },
|
|
242
|
+
BNODE: { kind: "primitive" },
|
|
243
|
+
INTEGER: { kind: "primitive" },
|
|
244
|
+
STRING: { kind: "primitive" },
|
|
245
|
+
DECIMAL: { kind: "primitive" },
|
|
246
|
+
DOUBLE: { kind: "primitive" },
|
|
247
|
+
LANGTAG: { kind: "primitive" },
|
|
248
|
+
BOOL: { kind: "primitive" },
|
|
249
|
+
IRI: { kind: "primitive" }
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
//#endregion
|
|
253
|
+
exports.ShexJTraverserDefinition = ShexJTraverserDefinition;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ShexJTraverserTypes } from "./ShexJTraverserTypes.cjs";
|
|
2
|
+
import { TraverserDefinitions } from "@ldo/type-traverser";
|
|
3
|
+
|
|
4
|
+
//#region src/ShexJTraverserDefinition.d.ts
|
|
5
|
+
declare const ShexJTraverserDefinition: TraverserDefinitions<ShexJTraverserTypes>;
|
|
6
|
+
//# sourceMappingURL=ShexJTraverserDefinition.d.ts.map
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ShexJTraverserDefinition };
|
|
10
|
+
//# sourceMappingURL=ShexJTraverserDefinition.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShexJTraverserDefinition.d.cts","names":[],"sources":["../../src/ShexJTraverserDefinition.ts"],"sourcesContent":[],"mappings":";;;;cAIa,0BAA0B,qBAAqB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ShexJTraverserTypes } from "./ShexJTraverserTypes.js";
|
|
2
|
+
import { TraverserDefinitions } from "@ldo/type-traverser";
|
|
3
|
+
|
|
4
|
+
//#region src/ShexJTraverserDefinition.d.ts
|
|
5
|
+
declare const ShexJTraverserDefinition: TraverserDefinitions<ShexJTraverserTypes>;
|
|
6
|
+
//# sourceMappingURL=ShexJTraverserDefinition.d.ts.map
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ShexJTraverserDefinition as ShexJTraverserDefinition$1 };
|
|
10
|
+
//# sourceMappingURL=ShexJTraverserDefinition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShexJTraverserDefinition.d.ts","names":[],"sources":["../../src/ShexJTraverserDefinition.ts"],"sourcesContent":[],"mappings":";;;;cAIa,0BAA0B,qBAAqB"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
//#region src/ShexJTraverserDefinition.ts
|
|
2
|
+
const ShexJTraverserDefinition = {
|
|
3
|
+
Schema: {
|
|
4
|
+
kind: "interface",
|
|
5
|
+
properties: {
|
|
6
|
+
startActs: "SemAct",
|
|
7
|
+
start: "shapeExprOrRef",
|
|
8
|
+
imports: "IRIREF",
|
|
9
|
+
shapes: "ShapeDecl"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
ShapeDecl: {
|
|
13
|
+
kind: "interface",
|
|
14
|
+
properties: {
|
|
15
|
+
id: "shapeDeclLabel",
|
|
16
|
+
abstract: "BOOL",
|
|
17
|
+
restricts: "shapeExprOrRef",
|
|
18
|
+
shapeExpr: "shapeExpr"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
shapeExpr: {
|
|
22
|
+
kind: "union",
|
|
23
|
+
selector: (item) => item.type
|
|
24
|
+
},
|
|
25
|
+
shapeExprOrRef: {
|
|
26
|
+
kind: "union",
|
|
27
|
+
selector: (item) => typeof item === "string" || item.type === "ShapeDecl" ? "shapeDeclRef" : "shapeExpr"
|
|
28
|
+
},
|
|
29
|
+
ShapeOr: {
|
|
30
|
+
kind: "interface",
|
|
31
|
+
properties: { shapeExprs: "shapeExprOrRef" }
|
|
32
|
+
},
|
|
33
|
+
ShapeAnd: {
|
|
34
|
+
kind: "interface",
|
|
35
|
+
properties: { shapeExprs: "shapeExprOrRef" }
|
|
36
|
+
},
|
|
37
|
+
ShapeNot: {
|
|
38
|
+
kind: "interface",
|
|
39
|
+
properties: { shapeExpr: "shapeExprOrRef" }
|
|
40
|
+
},
|
|
41
|
+
ShapeExternal: {
|
|
42
|
+
kind: "interface",
|
|
43
|
+
properties: {}
|
|
44
|
+
},
|
|
45
|
+
shapeDeclRef: {
|
|
46
|
+
kind: "union",
|
|
47
|
+
selector: (value) => typeof value === "string" ? "shapeDeclLabel" : "ShapeDecl"
|
|
48
|
+
},
|
|
49
|
+
shapeDeclLabel: {
|
|
50
|
+
kind: "union",
|
|
51
|
+
selector: () => "IRIREF"
|
|
52
|
+
},
|
|
53
|
+
NodeConstraint: {
|
|
54
|
+
kind: "interface",
|
|
55
|
+
properties: {
|
|
56
|
+
datatype: "IRIREF",
|
|
57
|
+
values: "valueSetValue",
|
|
58
|
+
length: "INTEGER",
|
|
59
|
+
minlength: "INTEGER",
|
|
60
|
+
maxlength: "INTEGER",
|
|
61
|
+
pattern: "STRING",
|
|
62
|
+
flags: "STRING",
|
|
63
|
+
mininclusive: "numericLiteral",
|
|
64
|
+
minexclusive: "numericLiteral",
|
|
65
|
+
totaldigits: "INTEGER",
|
|
66
|
+
fractiondigits: "INTEGER",
|
|
67
|
+
semActs: "SemAct",
|
|
68
|
+
annotations: "Annotation"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
numericLiteral: {
|
|
72
|
+
kind: "union",
|
|
73
|
+
selector: () => "DOUBLE"
|
|
74
|
+
},
|
|
75
|
+
valueSetValue: {
|
|
76
|
+
kind: "union",
|
|
77
|
+
selector: (item) => {
|
|
78
|
+
if (typeof item === "string") return "objectValue";
|
|
79
|
+
else if (item.type && [
|
|
80
|
+
"IriStem",
|
|
81
|
+
"IriStemRange",
|
|
82
|
+
"LiteralStem",
|
|
83
|
+
"LiteralStemRange",
|
|
84
|
+
"Language",
|
|
85
|
+
"LanguageStem",
|
|
86
|
+
"LanguageStemRange"
|
|
87
|
+
].includes(item.type)) return item.type;
|
|
88
|
+
else return "objectValue";
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
objectValue: {
|
|
92
|
+
kind: "union",
|
|
93
|
+
selector: (item) => typeof item === "string" ? "IRIREF" : "ObjectLiteral"
|
|
94
|
+
},
|
|
95
|
+
ObjectLiteral: {
|
|
96
|
+
kind: "interface",
|
|
97
|
+
properties: {
|
|
98
|
+
value: "STRING",
|
|
99
|
+
language: "STRING",
|
|
100
|
+
type: "STRING"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
IriStem: {
|
|
104
|
+
kind: "interface",
|
|
105
|
+
properties: { stem: "IRIREF" }
|
|
106
|
+
},
|
|
107
|
+
IriStemRange: {
|
|
108
|
+
kind: "interface",
|
|
109
|
+
properties: {
|
|
110
|
+
stem: "IRIREF",
|
|
111
|
+
exclusions: "IriStemRangeExclusions"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
IriStemRangeExclusions: {
|
|
115
|
+
kind: "union",
|
|
116
|
+
selector: (item) => typeof item === "string" ? "IRIREF" : "IriStem"
|
|
117
|
+
},
|
|
118
|
+
LiteralStem: {
|
|
119
|
+
kind: "interface",
|
|
120
|
+
properties: { stem: "STRING" }
|
|
121
|
+
},
|
|
122
|
+
LiteralStemRange: {
|
|
123
|
+
kind: "interface",
|
|
124
|
+
properties: {
|
|
125
|
+
stem: "LiteralStemRangeStem",
|
|
126
|
+
exclusions: "LiteralStemRangeExclusions"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
LiteralStemRangeStem: {
|
|
130
|
+
kind: "union",
|
|
131
|
+
selector: (item) => typeof item === "string" ? "STRING" : "Wildcard"
|
|
132
|
+
},
|
|
133
|
+
LiteralStemRangeExclusions: {
|
|
134
|
+
kind: "union",
|
|
135
|
+
selector: (item) => typeof item === "string" ? "STRING" : "LiteralStem"
|
|
136
|
+
},
|
|
137
|
+
Language: {
|
|
138
|
+
kind: "interface",
|
|
139
|
+
properties: { languageTag: "LANGTAG" }
|
|
140
|
+
},
|
|
141
|
+
LanguageStem: {
|
|
142
|
+
kind: "interface",
|
|
143
|
+
properties: { stem: "LANGTAG" }
|
|
144
|
+
},
|
|
145
|
+
LanguageStemRange: {
|
|
146
|
+
kind: "interface",
|
|
147
|
+
properties: {
|
|
148
|
+
stem: "LanguageStemRangeStem",
|
|
149
|
+
exclusions: "LanguageStemRangeExclusions"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
LanguageStemRangeStem: {
|
|
153
|
+
kind: "union",
|
|
154
|
+
selector: (item) => typeof item === "string" ? "LANGTAG" : "Wildcard"
|
|
155
|
+
},
|
|
156
|
+
LanguageStemRangeExclusions: {
|
|
157
|
+
kind: "union",
|
|
158
|
+
selector: (item) => typeof item === "string" ? "LANGTAG" : "LanguageStem"
|
|
159
|
+
},
|
|
160
|
+
Wildcard: {
|
|
161
|
+
kind: "interface",
|
|
162
|
+
properties: {}
|
|
163
|
+
},
|
|
164
|
+
Shape: {
|
|
165
|
+
kind: "interface",
|
|
166
|
+
properties: {
|
|
167
|
+
closed: "BOOL",
|
|
168
|
+
extra: "IRIREF",
|
|
169
|
+
extends: "shapeExprOrRef",
|
|
170
|
+
expression: "tripleExprOrRef",
|
|
171
|
+
semActs: "SemAct",
|
|
172
|
+
annotations: "Annotation"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
tripleExpr: {
|
|
176
|
+
kind: "union",
|
|
177
|
+
selector: (item) => item.type
|
|
178
|
+
},
|
|
179
|
+
tripleExprOrRef: {
|
|
180
|
+
kind: "union",
|
|
181
|
+
selector: (item) => typeof item === "string" ? "tripleExprRef" : "tripleExpr"
|
|
182
|
+
},
|
|
183
|
+
EachOf: {
|
|
184
|
+
kind: "interface",
|
|
185
|
+
properties: {
|
|
186
|
+
id: "tripleExprLabel",
|
|
187
|
+
min: "INTEGER",
|
|
188
|
+
max: "INTEGER",
|
|
189
|
+
expressions: "tripleExprOrRef",
|
|
190
|
+
semActs: "SemAct",
|
|
191
|
+
annotations: "Annotation"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
OneOf: {
|
|
195
|
+
kind: "interface",
|
|
196
|
+
properties: {
|
|
197
|
+
id: "tripleExprLabel",
|
|
198
|
+
min: "INTEGER",
|
|
199
|
+
max: "INTEGER",
|
|
200
|
+
expressions: "tripleExprOrRef",
|
|
201
|
+
semActs: "SemAct",
|
|
202
|
+
annotations: "Annotation"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
TripleConstraint: {
|
|
206
|
+
kind: "interface",
|
|
207
|
+
properties: {
|
|
208
|
+
id: "tripleExprLabel",
|
|
209
|
+
min: "INTEGER",
|
|
210
|
+
max: "INTEGER",
|
|
211
|
+
inverse: "BOOL",
|
|
212
|
+
predicate: "IRIREF",
|
|
213
|
+
valueExpr: "shapeExprOrRef",
|
|
214
|
+
semActs: "SemAct",
|
|
215
|
+
annotations: "Annotation"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
tripleExprRef: {
|
|
219
|
+
kind: "union",
|
|
220
|
+
selector: () => "tripleExprLabel"
|
|
221
|
+
},
|
|
222
|
+
tripleExprLabel: {
|
|
223
|
+
kind: "union",
|
|
224
|
+
selector: () => "IRIREF"
|
|
225
|
+
},
|
|
226
|
+
SemAct: {
|
|
227
|
+
kind: "interface",
|
|
228
|
+
properties: {
|
|
229
|
+
name: "IRIREF",
|
|
230
|
+
code: "STRING"
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
Annotation: {
|
|
234
|
+
kind: "interface",
|
|
235
|
+
properties: {
|
|
236
|
+
predicate: "IRI",
|
|
237
|
+
object: "objectValue"
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
IRIREF: { kind: "primitive" },
|
|
241
|
+
BNODE: { kind: "primitive" },
|
|
242
|
+
INTEGER: { kind: "primitive" },
|
|
243
|
+
STRING: { kind: "primitive" },
|
|
244
|
+
DECIMAL: { kind: "primitive" },
|
|
245
|
+
DOUBLE: { kind: "primitive" },
|
|
246
|
+
LANGTAG: { kind: "primitive" },
|
|
247
|
+
BOOL: { kind: "primitive" },
|
|
248
|
+
IRI: { kind: "primitive" }
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
//#endregion
|
|
252
|
+
export { ShexJTraverserDefinition };
|
|
253
|
+
//# sourceMappingURL=ShexJTraverserDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShexJTraverserDefinition.js","names":["ShexJTraverserDefinition: TraverserDefinitions<ShexJTraverserTypes>","item: shapeExpr","item: valueSetValue"],"sources":["../src/ShexJTraverserDefinition.ts"],"sourcesContent":["import type { ShexJTraverserTypes } from \"./ShexJTraverserTypes\";\nimport type { TraverserDefinitions } from \"@ldo/type-traverser\";\nimport type { shapeExpr, valueSetValue } from \"./ShexJTypes\";\n\nexport const ShexJTraverserDefinition: TraverserDefinitions<ShexJTraverserTypes> =\n {\n Schema: {\n kind: \"interface\",\n properties: {\n startActs: \"SemAct\",\n start: \"shapeExprOrRef\",\n imports: \"IRIREF\",\n shapes: \"ShapeDecl\",\n },\n },\n ShapeDecl: {\n kind: \"interface\",\n properties: {\n id: \"shapeDeclLabel\",\n abstract: \"BOOL\",\n restricts: \"shapeExprOrRef\",\n shapeExpr: \"shapeExpr\",\n },\n },\n shapeExpr: {\n kind: \"union\",\n selector: (item: shapeExpr) => item.type,\n },\n shapeExprOrRef: {\n kind: \"union\",\n selector: (item) =>\n typeof item === \"string\" || item.type === \"ShapeDecl\"\n ? \"shapeDeclRef\"\n : \"shapeExpr\",\n },\n ShapeOr: {\n kind: \"interface\",\n properties: {\n shapeExprs: \"shapeExprOrRef\",\n },\n },\n ShapeAnd: {\n kind: \"interface\",\n properties: {\n shapeExprs: \"shapeExprOrRef\",\n },\n },\n ShapeNot: {\n kind: \"interface\",\n properties: {\n shapeExpr: \"shapeExprOrRef\",\n },\n },\n ShapeExternal: {\n kind: \"interface\",\n properties: {},\n },\n shapeDeclRef: {\n kind: \"union\",\n selector: (value) =>\n typeof value === \"string\" ? \"shapeDeclLabel\" : \"ShapeDecl\",\n },\n shapeDeclLabel: {\n kind: \"union\",\n selector: () => \"IRIREF\",\n },\n NodeConstraint: {\n kind: \"interface\",\n properties: {\n datatype: \"IRIREF\",\n values: \"valueSetValue\",\n length: \"INTEGER\",\n minlength: \"INTEGER\",\n maxlength: \"INTEGER\",\n pattern: \"STRING\",\n flags: \"STRING\",\n mininclusive: \"numericLiteral\",\n minexclusive: \"numericLiteral\",\n totaldigits: \"INTEGER\",\n fractiondigits: \"INTEGER\",\n semActs: \"SemAct\",\n annotations: \"Annotation\",\n },\n },\n numericLiteral: {\n kind: \"union\",\n selector: () => \"DOUBLE\",\n },\n valueSetValue: {\n kind: \"union\",\n selector: (item: valueSetValue) => {\n if (typeof item === \"string\") {\n return \"objectValue\";\n } else if (\n item.type &&\n [\n \"IriStem\",\n \"IriStemRange\",\n \"LiteralStem\",\n \"LiteralStemRange\",\n \"Language\",\n \"LanguageStem\",\n \"LanguageStemRange\",\n ].includes(item.type)\n ) {\n return item.type as\n | \"IriStem\"\n | \"IriStemRange\"\n | \"LiteralStem\"\n | \"LiteralStemRange\"\n | \"Language\"\n | \"LanguageStem\"\n | \"LanguageStemRange\";\n } else {\n return \"objectValue\";\n }\n },\n },\n objectValue: {\n kind: \"union\",\n selector: (item) =>\n typeof item === \"string\" ? \"IRIREF\" : \"ObjectLiteral\",\n },\n ObjectLiteral: {\n kind: \"interface\",\n properties: {\n value: \"STRING\",\n language: \"STRING\",\n type: \"STRING\",\n },\n },\n IriStem: {\n kind: \"interface\",\n properties: {\n stem: \"IRIREF\",\n },\n },\n IriStemRange: {\n kind: \"interface\",\n properties: {\n stem: \"IRIREF\",\n exclusions: \"IriStemRangeExclusions\",\n },\n },\n IriStemRangeExclusions: {\n kind: \"union\",\n selector: (item) => (typeof item === \"string\" ? \"IRIREF\" : \"IriStem\"),\n },\n LiteralStem: {\n kind: \"interface\",\n properties: {\n stem: \"STRING\",\n },\n },\n LiteralStemRange: {\n kind: \"interface\",\n properties: {\n stem: \"LiteralStemRangeStem\",\n exclusions: \"LiteralStemRangeExclusions\",\n },\n },\n LiteralStemRangeStem: {\n kind: \"union\",\n selector: (item) => (typeof item === \"string\" ? \"STRING\" : \"Wildcard\"),\n },\n LiteralStemRangeExclusions: {\n kind: \"union\",\n selector: (item) => (typeof item === \"string\" ? \"STRING\" : \"LiteralStem\"),\n },\n Language: {\n kind: \"interface\",\n properties: {\n languageTag: \"LANGTAG\",\n },\n },\n LanguageStem: {\n kind: \"interface\",\n properties: {\n stem: \"LANGTAG\",\n },\n },\n LanguageStemRange: {\n kind: \"interface\",\n properties: {\n stem: \"LanguageStemRangeStem\",\n exclusions: \"LanguageStemRangeExclusions\",\n },\n },\n LanguageStemRangeStem: {\n kind: \"union\",\n selector: (item) => (typeof item === \"string\" ? \"LANGTAG\" : \"Wildcard\"),\n },\n LanguageStemRangeExclusions: {\n kind: \"union\",\n selector: (item) =>\n typeof item === \"string\" ? \"LANGTAG\" : \"LanguageStem\",\n },\n Wildcard: {\n kind: \"interface\",\n properties: {},\n },\n Shape: {\n kind: \"interface\",\n properties: {\n closed: \"BOOL\",\n extra: \"IRIREF\",\n extends: \"shapeExprOrRef\",\n expression: \"tripleExprOrRef\",\n semActs: \"SemAct\",\n annotations: \"Annotation\",\n },\n },\n tripleExpr: {\n kind: \"union\",\n selector: (item) => item.type,\n },\n tripleExprOrRef: {\n kind: \"union\",\n selector: (item) =>\n typeof item === \"string\" ? \"tripleExprRef\" : \"tripleExpr\",\n },\n EachOf: {\n kind: \"interface\",\n properties: {\n id: \"tripleExprLabel\",\n min: \"INTEGER\",\n max: \"INTEGER\",\n expressions: \"tripleExprOrRef\",\n semActs: \"SemAct\",\n annotations: \"Annotation\",\n },\n },\n OneOf: {\n kind: \"interface\",\n properties: {\n id: \"tripleExprLabel\",\n min: \"INTEGER\",\n max: \"INTEGER\",\n expressions: \"tripleExprOrRef\",\n semActs: \"SemAct\",\n annotations: \"Annotation\",\n },\n },\n TripleConstraint: {\n kind: \"interface\",\n properties: {\n id: \"tripleExprLabel\",\n min: \"INTEGER\",\n max: \"INTEGER\",\n inverse: \"BOOL\",\n predicate: \"IRIREF\",\n valueExpr: \"shapeExprOrRef\",\n semActs: \"SemAct\",\n annotations: \"Annotation\",\n },\n },\n tripleExprRef: {\n kind: \"union\",\n selector: () => \"tripleExprLabel\",\n },\n tripleExprLabel: {\n kind: \"union\",\n selector: () => \"IRIREF\",\n },\n SemAct: {\n kind: \"interface\",\n properties: {\n name: \"IRIREF\",\n code: \"STRING\",\n },\n },\n Annotation: {\n kind: \"interface\",\n properties: {\n predicate: \"IRI\",\n object: \"objectValue\",\n },\n },\n IRIREF: {\n kind: \"primitive\",\n },\n BNODE: {\n kind: \"primitive\",\n },\n INTEGER: {\n kind: \"primitive\",\n },\n STRING: {\n kind: \"primitive\",\n },\n DECIMAL: {\n kind: \"primitive\",\n },\n DOUBLE: {\n kind: \"primitive\",\n },\n LANGTAG: {\n kind: \"primitive\",\n },\n BOOL: {\n kind: \"primitive\",\n },\n IRI: {\n kind: \"primitive\",\n },\n };\n"],"mappings":";AAIA,MAAaA,2BACX;CACE,QAAQ;EACN,MAAM;EACN,YAAY;GACV,WAAW;GACX,OAAO;GACP,SAAS;GACT,QAAQ;EACT;CACF;CACD,WAAW;EACT,MAAM;EACN,YAAY;GACV,IAAI;GACJ,UAAU;GACV,WAAW;GACX,WAAW;EACZ;CACF;CACD,WAAW;EACT,MAAM;EACN,UAAU,CAACC,SAAoB,KAAK;CACrC;CACD,gBAAgB;EACd,MAAM;EACN,UAAU,CAAC,gBACF,SAAS,YAAY,KAAK,SAAS,cACtC,iBACA;CACP;CACD,SAAS;EACP,MAAM;EACN,YAAY,EACV,YAAY,iBACb;CACF;CACD,UAAU;EACR,MAAM;EACN,YAAY,EACV,YAAY,iBACb;CACF;CACD,UAAU;EACR,MAAM;EACN,YAAY,EACV,WAAW,iBACZ;CACF;CACD,eAAe;EACb,MAAM;EACN,YAAY,CAAE;CACf;CACD,cAAc;EACZ,MAAM;EACN,UAAU,CAAC,iBACF,UAAU,WAAW,mBAAmB;CAClD;CACD,gBAAgB;EACd,MAAM;EACN,UAAU,MAAM;CACjB;CACD,gBAAgB;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