@lincs.project/webannotation-schema 1.0.0
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/LICENSE +661 -0
- package/README.md +155 -0
- package/dist/context.jsonld +24 -0
- package/dist/defs.jsonld +949 -0
- package/dist/schema.jsonld +621 -0
- package/dist/validate.js +1 -0
- package/lib/index.d.ts +145 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +13 -0
- package/lib/index.js.map +1 -0
- package/lib/schema/config.d.ts +4 -0
- package/lib/schema/config.d.ts.map +1 -0
- package/lib/schema/config.js +4 -0
- package/lib/schema/config.js.map +1 -0
- package/lib/schema/context.d.ts +25 -0
- package/lib/schema/context.d.ts.map +1 -0
- package/lib/schema/context.js +25 -0
- package/lib/schema/context.js.map +1 -0
- package/lib/schema/definitions/agent.d.ts +36 -0
- package/lib/schema/definitions/agent.d.ts.map +1 -0
- package/lib/schema/definitions/agent.js +82 -0
- package/lib/schema/definitions/agent.js.map +1 -0
- package/lib/schema/definitions/body/citation.d.ts +27 -0
- package/lib/schema/definitions/body/citation.d.ts.map +1 -0
- package/lib/schema/definitions/body/citation.js +53 -0
- package/lib/schema/definitions/body/citation.js.map +1 -0
- package/lib/schema/definitions/body/common.d.ts +17 -0
- package/lib/schema/definitions/body/common.d.ts.map +1 -0
- package/lib/schema/definitions/body/common.js +46 -0
- package/lib/schema/definitions/body/common.js.map +1 -0
- package/lib/schema/definitions/body/conceptualObject.d.ts +27 -0
- package/lib/schema/definitions/body/conceptualObject.d.ts.map +1 -0
- package/lib/schema/definitions/body/conceptualObject.js +61 -0
- package/lib/schema/definitions/body/conceptualObject.js.map +1 -0
- package/lib/schema/definitions/body/correction.d.ts +24 -0
- package/lib/schema/definitions/body/correction.d.ts.map +1 -0
- package/lib/schema/definitions/body/correction.js +54 -0
- package/lib/schema/definitions/body/correction.js.map +1 -0
- package/lib/schema/definitions/body/date.d.ts +30 -0
- package/lib/schema/definitions/body/date.d.ts.map +1 -0
- package/lib/schema/definitions/body/date.js +61 -0
- package/lib/schema/definitions/body/date.js.map +1 -0
- package/lib/schema/definitions/body/index.d.ts +37 -0
- package/lib/schema/definitions/body/index.d.ts.map +1 -0
- package/lib/schema/definitions/body/index.js +220 -0
- package/lib/schema/definitions/body/index.js.map +1 -0
- package/lib/schema/definitions/body/keyword.d.ts +48 -0
- package/lib/schema/definitions/body/keyword.d.ts.map +1 -0
- package/lib/schema/definitions/body/keyword.js +100 -0
- package/lib/schema/definitions/body/keyword.js.map +1 -0
- package/lib/schema/definitions/body/link.d.ts +21 -0
- package/lib/schema/definitions/body/link.d.ts.map +1 -0
- package/lib/schema/definitions/body/link.js +37 -0
- package/lib/schema/definitions/body/link.js.map +1 -0
- package/lib/schema/definitions/body/note.d.ts +27 -0
- package/lib/schema/definitions/body/note.d.ts.map +1 -0
- package/lib/schema/definitions/body/note.js +54 -0
- package/lib/schema/definitions/body/note.js.map +1 -0
- package/lib/schema/definitions/body/organization.d.ts +27 -0
- package/lib/schema/definitions/body/organization.d.ts.map +1 -0
- package/lib/schema/definitions/body/organization.js +65 -0
- package/lib/schema/definitions/body/organization.js.map +1 -0
- package/lib/schema/definitions/body/person.d.ts +27 -0
- package/lib/schema/definitions/body/person.d.ts.map +1 -0
- package/lib/schema/definitions/body/person.js +61 -0
- package/lib/schema/definitions/body/person.js.map +1 -0
- package/lib/schema/definitions/body/physicalThing.d.ts +27 -0
- package/lib/schema/definitions/body/physicalThing.d.ts.map +1 -0
- package/lib/schema/definitions/body/physicalThing.js +61 -0
- package/lib/schema/definitions/body/physicalThing.js.map +1 -0
- package/lib/schema/definitions/body/place.d.ts +30 -0
- package/lib/schema/definitions/body/place.d.ts.map +1 -0
- package/lib/schema/definitions/body/place.js +64 -0
- package/lib/schema/definitions/body/place.js.map +1 -0
- package/lib/schema/definitions/body/work.d.ts +27 -0
- package/lib/schema/definitions/body/work.d.ts.map +1 -0
- package/lib/schema/definitions/body/work.js +61 -0
- package/lib/schema/definitions/body/work.js.map +1 -0
- package/lib/schema/definitions/index.d.ts +22 -0
- package/lib/schema/definitions/index.d.ts.map +1 -0
- package/lib/schema/definitions/index.js +24 -0
- package/lib/schema/definitions/index.js.map +1 -0
- package/lib/schema/definitions/target/index.d.ts +710 -0
- package/lib/schema/definitions/target/index.d.ts.map +1 -0
- package/lib/schema/definitions/target/index.js +231 -0
- package/lib/schema/definitions/target/index.js.map +1 -0
- package/lib/schema/definitions/target/selector/index.d.ts +5 -0
- package/lib/schema/definitions/target/selector/index.d.ts.map +1 -0
- package/lib/schema/definitions/target/selector/index.js +5 -0
- package/lib/schema/definitions/target/selector/index.js.map +1 -0
- package/lib/schema/definitions/target/selector/range.d.ts +141 -0
- package/lib/schema/definitions/target/selector/range.d.ts.map +1 -0
- package/lib/schema/definitions/target/selector/range.js +44 -0
- package/lib/schema/definitions/target/selector/range.js.map +1 -0
- package/lib/schema/definitions/target/selector/textPosition.d.ts +21 -0
- package/lib/schema/definitions/target/selector/textPosition.d.ts.map +1 -0
- package/lib/schema/definitions/target/selector/textPosition.js +57 -0
- package/lib/schema/definitions/target/selector/textPosition.js.map +1 -0
- package/lib/schema/definitions/target/selector/textQuote.d.ts +297 -0
- package/lib/schema/definitions/target/selector/textQuote.d.ts.map +1 -0
- package/lib/schema/definitions/target/selector/textQuote.js +78 -0
- package/lib/schema/definitions/target/selector/textQuote.js.map +1 -0
- package/lib/schema/definitions/target/selector/xpath.d.ts +46 -0
- package/lib/schema/definitions/target/selector/xpath.d.ts.map +1 -0
- package/lib/schema/definitions/target/selector/xpath.js +51 -0
- package/lib/schema/definitions/target/selector/xpath.js.map +1 -0
- package/lib/schema/index.d.ts +5 -0
- package/lib/schema/index.d.ts.map +1 -0
- package/lib/schema/index.js +5 -0
- package/lib/schema/index.js.map +1 -0
- package/lib/schema/root.d.ts +1076 -0
- package/lib/schema/root.d.ts.map +1 -0
- package/lib/schema/root.js +408 -0
- package/lib/schema/root.js.map +1 -0
- package/lib/validation.d.ts +25 -0
- package/lib/validation.d.ts.map +1 -0
- package/lib/validation.js +35 -0
- package/lib/validation.js.map +1 -0
- package/package.json +68 -0
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { JSONSchemaType } from 'ajv';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const TextQuoteSelector: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
type: z.ZodTuple<[z.ZodLiteral<"TextQuoteSelector">, z.ZodLiteral<"crm:E33_Linguistic_Object">], null>;
|
|
6
|
+
exact: z.ZodString;
|
|
7
|
+
prefix: z.ZodOptional<z.ZodString>;
|
|
8
|
+
sufix: z.ZodOptional<z.ZodString>;
|
|
9
|
+
refinedBy: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
type: z.ZodTuple<[z.ZodLiteral<"RangeSelector">, z.ZodLiteral<"crm:E73_Information_Object">], null>;
|
|
12
|
+
startSelector: z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
type: z.ZodTuple<[z.ZodLiteral<"XPathSelector">, z.ZodLiteral<"crm:E73_Information_Object">], null>;
|
|
15
|
+
value: z.ZodString;
|
|
16
|
+
refinedBy: z.ZodOptional<z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
type: z.ZodTuple<[z.ZodLiteral<"TextPositionSelector">, z.ZodLiteral<"crm:E73_Information_Object">], null>;
|
|
19
|
+
start: z.ZodNumber;
|
|
20
|
+
end: z.ZodNumber;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
23
|
+
id: string;
|
|
24
|
+
start: number;
|
|
25
|
+
end: number;
|
|
26
|
+
}, {
|
|
27
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
28
|
+
id: string;
|
|
29
|
+
start: number;
|
|
30
|
+
end: number;
|
|
31
|
+
}>>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
value: string;
|
|
34
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
35
|
+
id: string;
|
|
36
|
+
refinedBy?: {
|
|
37
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
38
|
+
id: string;
|
|
39
|
+
start: number;
|
|
40
|
+
end: number;
|
|
41
|
+
} | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
value: string;
|
|
44
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
45
|
+
id: string;
|
|
46
|
+
refinedBy?: {
|
|
47
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
48
|
+
id: string;
|
|
49
|
+
start: number;
|
|
50
|
+
end: number;
|
|
51
|
+
} | undefined;
|
|
52
|
+
}>;
|
|
53
|
+
endSelector: z.ZodObject<{
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
type: z.ZodTuple<[z.ZodLiteral<"XPathSelector">, z.ZodLiteral<"crm:E73_Information_Object">], null>;
|
|
56
|
+
value: z.ZodString;
|
|
57
|
+
refinedBy: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
type: z.ZodTuple<[z.ZodLiteral<"TextPositionSelector">, z.ZodLiteral<"crm:E73_Information_Object">], null>;
|
|
60
|
+
start: z.ZodNumber;
|
|
61
|
+
end: z.ZodNumber;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
64
|
+
id: string;
|
|
65
|
+
start: number;
|
|
66
|
+
end: number;
|
|
67
|
+
}, {
|
|
68
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
69
|
+
id: string;
|
|
70
|
+
start: number;
|
|
71
|
+
end: number;
|
|
72
|
+
}>>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
value: string;
|
|
75
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
76
|
+
id: string;
|
|
77
|
+
refinedBy?: {
|
|
78
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
79
|
+
id: string;
|
|
80
|
+
start: number;
|
|
81
|
+
end: number;
|
|
82
|
+
} | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
value: string;
|
|
85
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
86
|
+
id: string;
|
|
87
|
+
refinedBy?: {
|
|
88
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
89
|
+
id: string;
|
|
90
|
+
start: number;
|
|
91
|
+
end: number;
|
|
92
|
+
} | undefined;
|
|
93
|
+
}>;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
type: ["RangeSelector", "crm:E73_Information_Object"];
|
|
96
|
+
id: string;
|
|
97
|
+
startSelector: {
|
|
98
|
+
value: string;
|
|
99
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
100
|
+
id: string;
|
|
101
|
+
refinedBy?: {
|
|
102
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
103
|
+
id: string;
|
|
104
|
+
start: number;
|
|
105
|
+
end: number;
|
|
106
|
+
} | undefined;
|
|
107
|
+
};
|
|
108
|
+
endSelector: {
|
|
109
|
+
value: string;
|
|
110
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
111
|
+
id: string;
|
|
112
|
+
refinedBy?: {
|
|
113
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
114
|
+
id: string;
|
|
115
|
+
start: number;
|
|
116
|
+
end: number;
|
|
117
|
+
} | undefined;
|
|
118
|
+
};
|
|
119
|
+
}, {
|
|
120
|
+
type: ["RangeSelector", "crm:E73_Information_Object"];
|
|
121
|
+
id: string;
|
|
122
|
+
startSelector: {
|
|
123
|
+
value: string;
|
|
124
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
125
|
+
id: string;
|
|
126
|
+
refinedBy?: {
|
|
127
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
128
|
+
id: string;
|
|
129
|
+
start: number;
|
|
130
|
+
end: number;
|
|
131
|
+
} | undefined;
|
|
132
|
+
};
|
|
133
|
+
endSelector: {
|
|
134
|
+
value: string;
|
|
135
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
136
|
+
id: string;
|
|
137
|
+
refinedBy?: {
|
|
138
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
139
|
+
id: string;
|
|
140
|
+
start: number;
|
|
141
|
+
end: number;
|
|
142
|
+
} | undefined;
|
|
143
|
+
};
|
|
144
|
+
}>, z.ZodObject<{
|
|
145
|
+
id: z.ZodString;
|
|
146
|
+
type: z.ZodTuple<[z.ZodLiteral<"XPathSelector">, z.ZodLiteral<"crm:E73_Information_Object">], null>;
|
|
147
|
+
value: z.ZodString;
|
|
148
|
+
refinedBy: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
type: z.ZodTuple<[z.ZodLiteral<"TextPositionSelector">, z.ZodLiteral<"crm:E73_Information_Object">], null>;
|
|
151
|
+
start: z.ZodNumber;
|
|
152
|
+
end: z.ZodNumber;
|
|
153
|
+
}, "strip", z.ZodTypeAny, {
|
|
154
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
155
|
+
id: string;
|
|
156
|
+
start: number;
|
|
157
|
+
end: number;
|
|
158
|
+
}, {
|
|
159
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
160
|
+
id: string;
|
|
161
|
+
start: number;
|
|
162
|
+
end: number;
|
|
163
|
+
}>>;
|
|
164
|
+
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
value: string;
|
|
166
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
167
|
+
id: string;
|
|
168
|
+
refinedBy?: {
|
|
169
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
170
|
+
id: string;
|
|
171
|
+
start: number;
|
|
172
|
+
end: number;
|
|
173
|
+
} | undefined;
|
|
174
|
+
}, {
|
|
175
|
+
value: string;
|
|
176
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
177
|
+
id: string;
|
|
178
|
+
refinedBy?: {
|
|
179
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
180
|
+
id: string;
|
|
181
|
+
start: number;
|
|
182
|
+
end: number;
|
|
183
|
+
} | undefined;
|
|
184
|
+
}>, z.ZodObject<{
|
|
185
|
+
id: z.ZodString;
|
|
186
|
+
type: z.ZodTuple<[z.ZodLiteral<"TextPositionSelector">, z.ZodLiteral<"crm:E73_Information_Object">], null>;
|
|
187
|
+
start: z.ZodNumber;
|
|
188
|
+
end: z.ZodNumber;
|
|
189
|
+
}, "strip", z.ZodTypeAny, {
|
|
190
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
191
|
+
id: string;
|
|
192
|
+
start: number;
|
|
193
|
+
end: number;
|
|
194
|
+
}, {
|
|
195
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
196
|
+
id: string;
|
|
197
|
+
start: number;
|
|
198
|
+
end: number;
|
|
199
|
+
}>]>>;
|
|
200
|
+
}, "strip", z.ZodTypeAny, {
|
|
201
|
+
exact: string;
|
|
202
|
+
type: ["TextQuoteSelector", "crm:E33_Linguistic_Object"];
|
|
203
|
+
id: string;
|
|
204
|
+
prefix?: string | undefined;
|
|
205
|
+
sufix?: string | undefined;
|
|
206
|
+
refinedBy?: {
|
|
207
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
208
|
+
id: string;
|
|
209
|
+
start: number;
|
|
210
|
+
end: number;
|
|
211
|
+
} | {
|
|
212
|
+
value: string;
|
|
213
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
214
|
+
id: string;
|
|
215
|
+
refinedBy?: {
|
|
216
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
217
|
+
id: string;
|
|
218
|
+
start: number;
|
|
219
|
+
end: number;
|
|
220
|
+
} | undefined;
|
|
221
|
+
} | {
|
|
222
|
+
type: ["RangeSelector", "crm:E73_Information_Object"];
|
|
223
|
+
id: string;
|
|
224
|
+
startSelector: {
|
|
225
|
+
value: string;
|
|
226
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
227
|
+
id: string;
|
|
228
|
+
refinedBy?: {
|
|
229
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
230
|
+
id: string;
|
|
231
|
+
start: number;
|
|
232
|
+
end: number;
|
|
233
|
+
} | undefined;
|
|
234
|
+
};
|
|
235
|
+
endSelector: {
|
|
236
|
+
value: string;
|
|
237
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
238
|
+
id: string;
|
|
239
|
+
refinedBy?: {
|
|
240
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
241
|
+
id: string;
|
|
242
|
+
start: number;
|
|
243
|
+
end: number;
|
|
244
|
+
} | undefined;
|
|
245
|
+
};
|
|
246
|
+
} | undefined;
|
|
247
|
+
}, {
|
|
248
|
+
exact: string;
|
|
249
|
+
type: ["TextQuoteSelector", "crm:E33_Linguistic_Object"];
|
|
250
|
+
id: string;
|
|
251
|
+
prefix?: string | undefined;
|
|
252
|
+
sufix?: string | undefined;
|
|
253
|
+
refinedBy?: {
|
|
254
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
255
|
+
id: string;
|
|
256
|
+
start: number;
|
|
257
|
+
end: number;
|
|
258
|
+
} | {
|
|
259
|
+
value: string;
|
|
260
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
261
|
+
id: string;
|
|
262
|
+
refinedBy?: {
|
|
263
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
264
|
+
id: string;
|
|
265
|
+
start: number;
|
|
266
|
+
end: number;
|
|
267
|
+
} | undefined;
|
|
268
|
+
} | {
|
|
269
|
+
type: ["RangeSelector", "crm:E73_Information_Object"];
|
|
270
|
+
id: string;
|
|
271
|
+
startSelector: {
|
|
272
|
+
value: string;
|
|
273
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
274
|
+
id: string;
|
|
275
|
+
refinedBy?: {
|
|
276
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
277
|
+
id: string;
|
|
278
|
+
start: number;
|
|
279
|
+
end: number;
|
|
280
|
+
} | undefined;
|
|
281
|
+
};
|
|
282
|
+
endSelector: {
|
|
283
|
+
value: string;
|
|
284
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
285
|
+
id: string;
|
|
286
|
+
refinedBy?: {
|
|
287
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
288
|
+
id: string;
|
|
289
|
+
start: number;
|
|
290
|
+
end: number;
|
|
291
|
+
} | undefined;
|
|
292
|
+
};
|
|
293
|
+
} | undefined;
|
|
294
|
+
}>;
|
|
295
|
+
export type TextQuoteSelector = z.infer<typeof TextQuoteSelector>;
|
|
296
|
+
export declare const textQuoteSelectorSchema: JSONSchemaType<Required<TextQuoteSelector>>;
|
|
297
|
+
//# sourceMappingURL=textQuote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textQuote.d.ts","sourceRoot":"","sources":["../../../../../src/schema/definitions/target/selector/textQuote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgBxB,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBD,CAAC;AAE9B,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAIlE,eAAO,MAAM,uBAAuB,EAAE,cAAc,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CA+C/E,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { RangeSelector, TextPositionSelector, XpathSelector } from './';
|
|
3
|
+
// * Pure Typescript Type - Just for reference
|
|
4
|
+
// export interface TextQuoteSelector {
|
|
5
|
+
// id: string;
|
|
6
|
+
// type: ['TextQuoteSelector', 'crm:E33_Linguistic_Object'];
|
|
7
|
+
// exact: string;
|
|
8
|
+
// prefix?: string;
|
|
9
|
+
// sufix?: string;
|
|
10
|
+
// refinedBy?: RangeSelector | XpathSelector | TextPositionSelector;
|
|
11
|
+
// }
|
|
12
|
+
// * Type using Zod & Inference
|
|
13
|
+
export const TextQuoteSelector = z
|
|
14
|
+
.object({
|
|
15
|
+
id: z.string().uuid().describe('UUID that identifies the selector.'),
|
|
16
|
+
type: z.tuple([z.literal('TextQuoteSelector'), z.literal('crm:E33_Linguistic_Object')]),
|
|
17
|
+
exact: z.string().describe('A copy of the text which is being selected, after normalization.'),
|
|
18
|
+
prefix: z
|
|
19
|
+
.string()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('The snippet of text that occurs immediately before the text which is being selected.'),
|
|
22
|
+
sufix: z
|
|
23
|
+
.string()
|
|
24
|
+
.optional()
|
|
25
|
+
.describe('The snippet of text that occurs immediately after the text which is being selected.'),
|
|
26
|
+
refinedBy: z
|
|
27
|
+
.union([RangeSelector, XpathSelector, TextPositionSelector])
|
|
28
|
+
.optional()
|
|
29
|
+
.describe('The relationship between a broader selector and the more specific selector that should be applied to the results of the first.'),
|
|
30
|
+
})
|
|
31
|
+
.describe('Quote Selector');
|
|
32
|
+
// * JSONSchema
|
|
33
|
+
export const textQuoteSelectorSchema = {
|
|
34
|
+
type: 'object',
|
|
35
|
+
description: 'Quote Selector',
|
|
36
|
+
properties: {
|
|
37
|
+
id: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
format: 'uuid',
|
|
40
|
+
description: 'UUID that identifies the selector.',
|
|
41
|
+
},
|
|
42
|
+
type: {
|
|
43
|
+
type: 'array',
|
|
44
|
+
minItems: 2,
|
|
45
|
+
maxItems: 2,
|
|
46
|
+
items: [
|
|
47
|
+
{ type: 'string', const: 'TextQuoteSelector' },
|
|
48
|
+
{ type: 'string', const: 'crm:E33_Linguistic_Object' },
|
|
49
|
+
],
|
|
50
|
+
description: 'The class of the Selector',
|
|
51
|
+
},
|
|
52
|
+
exact: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: 'A copy of the text which is being selected, after normalization.',
|
|
55
|
+
},
|
|
56
|
+
prefix: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'The snippet of text that occurs immediately before the text which is being selected.',
|
|
59
|
+
},
|
|
60
|
+
sufix: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'The snippet of text that occurs immediately after the text which is being selected.',
|
|
63
|
+
},
|
|
64
|
+
refinedBy: {
|
|
65
|
+
type: 'object',
|
|
66
|
+
description: 'The relationship between a broader selector and the more specific selector that should be applied to the results of the first.',
|
|
67
|
+
oneOf: [
|
|
68
|
+
{ $ref: 'defs.jsonld#/definitions/rangeSelector' },
|
|
69
|
+
{ $ref: 'defs.jsonld#/definitions/xpathSelector' },
|
|
70
|
+
{ $ref: 'defs.jsonld#/definitions/textPositionSelector' },
|
|
71
|
+
],
|
|
72
|
+
required: [],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
required: ['id', 'type', 'exact'],
|
|
76
|
+
// errorMessage: { properties: { id: 'Must be an URI' } },
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=textQuote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textQuote.js","sourceRoot":"","sources":["../../../../../src/schema/definitions/target/selector/textQuote.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAExE,8CAA8C;AAE9C,uCAAuC;AACvC,gBAAgB;AAChB,8DAA8D;AAC9D,mBAAmB;AACnB,qBAAqB;AACrB,oBAAoB;AACpB,sEAAsE;AACtE,IAAI;AAEJ,+BAA+B;AAE/B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACpE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAAC;IACvF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kEAAkE,CAAC;IAC9F,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,sFAAsF,CACvF;IACH,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,qFAAqF,CACtF;IACH,SAAS,EAAE,CAAC;SACT,KAAK,CAAC,CAAC,aAAa,EAAE,aAAa,EAAE,oBAAoB,CAAC,CAAC;SAC3D,QAAQ,EAAE;SACV,QAAQ,CACP,gIAAgI,CACjI;CACJ,CAAC;KACD,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAI9B,eAAe;AAEf,MAAM,CAAC,MAAM,uBAAuB,GAAgD;IAClF,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,gBAAgB;IAC7B,UAAU,EAAE;QACV,EAAE,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,WAAW,EAAE,oCAAoC;SAClD;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE;gBACL,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,mBAAmB,EAAE;gBAC9C,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,2BAA2B,EAAE;aACvD;YACD,WAAW,EAAE,2BAA2B;SACzC;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,kEAAkE;SAChF;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,sFAAsF;SACzF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,qFAAqF;SACxF;QACD,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,gIAAgI;YAClI,KAAK,EAAE;gBACL,EAAE,IAAI,EAAE,wCAAwC,EAAE;gBAClD,EAAE,IAAI,EAAE,wCAAwC,EAAE;gBAClD,EAAE,IAAI,EAAE,+CAA+C,EAAE;aAC1D;YACD,QAAQ,EAAE,EAAE;SACb;KACF;IACD,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC;IACjC,0DAA0D;CAC3D,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { JSONSchemaType } from 'ajv';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const XpathSelector: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
type: z.ZodTuple<[z.ZodLiteral<"XPathSelector">, z.ZodLiteral<"crm:E73_Information_Object">], null>;
|
|
6
|
+
value: z.ZodString;
|
|
7
|
+
refinedBy: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
type: z.ZodTuple<[z.ZodLiteral<"TextPositionSelector">, z.ZodLiteral<"crm:E73_Information_Object">], null>;
|
|
10
|
+
start: z.ZodNumber;
|
|
11
|
+
end: z.ZodNumber;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
14
|
+
id: string;
|
|
15
|
+
start: number;
|
|
16
|
+
end: number;
|
|
17
|
+
}, {
|
|
18
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
19
|
+
id: string;
|
|
20
|
+
start: number;
|
|
21
|
+
end: number;
|
|
22
|
+
}>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
value: string;
|
|
25
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
26
|
+
id: string;
|
|
27
|
+
refinedBy?: {
|
|
28
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
29
|
+
id: string;
|
|
30
|
+
start: number;
|
|
31
|
+
end: number;
|
|
32
|
+
} | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
value: string;
|
|
35
|
+
type: ["XPathSelector", "crm:E73_Information_Object"];
|
|
36
|
+
id: string;
|
|
37
|
+
refinedBy?: {
|
|
38
|
+
type: ["TextPositionSelector", "crm:E73_Information_Object"];
|
|
39
|
+
id: string;
|
|
40
|
+
start: number;
|
|
41
|
+
end: number;
|
|
42
|
+
} | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
export type XpathSelector = z.infer<typeof XpathSelector>;
|
|
45
|
+
export declare const xpathSelectorSchema: JSONSchemaType<XpathSelector>;
|
|
46
|
+
//# sourceMappingURL=xpath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xpath.d.ts","sourceRoot":"","sources":["../../../../../src/schema/definitions/target/selector/xpath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASG,CAAC;AAE9B,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAI1D,eAAO,MAAM,mBAAmB,EAAE,cAAc,CAAC,aAAa,CA+B7D,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TextPositionSelector } from './textPosition';
|
|
3
|
+
// * Pure Typescript Type - Just for reference
|
|
4
|
+
// export interface XpathSelector {
|
|
5
|
+
// id: string;
|
|
6
|
+
// type: ['XPathSelector', 'crm:E73_Information_Object'];
|
|
7
|
+
// value: string;
|
|
8
|
+
// refinedBy?: TextPositionSelector;
|
|
9
|
+
// }
|
|
10
|
+
// * Type using Zod & Inference
|
|
11
|
+
export const XpathSelector = z
|
|
12
|
+
.object({
|
|
13
|
+
id: z.string().uuid().describe('UUID that identifies the selector.'),
|
|
14
|
+
type: z.tuple([z.literal('XPathSelector'), z.literal('crm:E73_Information_Object')]),
|
|
15
|
+
value: z.string().nonempty().describe('The xpath to the selected segment.'),
|
|
16
|
+
refinedBy: TextPositionSelector.optional().describe('The relationship between a broader selector and the more specific selector that should be applied to the results of the first.'),
|
|
17
|
+
})
|
|
18
|
+
.describe('Xpath Selector');
|
|
19
|
+
// * JSONSchema
|
|
20
|
+
export const xpathSelectorSchema = {
|
|
21
|
+
type: 'object',
|
|
22
|
+
description: 'Xpath Selector',
|
|
23
|
+
properties: {
|
|
24
|
+
id: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
format: 'uuid',
|
|
27
|
+
description: 'UUID that identifies the selector.',
|
|
28
|
+
},
|
|
29
|
+
type: {
|
|
30
|
+
type: 'array',
|
|
31
|
+
minItems: 2,
|
|
32
|
+
maxItems: 2,
|
|
33
|
+
items: [
|
|
34
|
+
{ type: 'string', const: 'XPathSelector' },
|
|
35
|
+
{ type: 'string', const: 'crm:E73_Information_Object' },
|
|
36
|
+
],
|
|
37
|
+
description: 'The class of the Selector,',
|
|
38
|
+
},
|
|
39
|
+
value: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'Web Annotation Target Select Xpath',
|
|
42
|
+
},
|
|
43
|
+
refinedBy: {
|
|
44
|
+
$ref: 'defs.jsonld#/definitions/textPositionSelector',
|
|
45
|
+
description: 'The relationship between a broader selector and the more specific selector that should be applied to the results of the first.',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
required: ['id', 'type', 'value'],
|
|
49
|
+
// errorMessage: { properties: { id: 'Must be an URI' } },
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=xpath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xpath.js","sourceRoot":"","sources":["../../../../../src/schema/definitions/target/selector/xpath.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,8CAA8C;AAE9C,mCAAmC;AACnC,gBAAgB;AAChB,2DAA2D;AAC3D,mBAAmB;AACnB,sCAAsC;AACtC,IAAI;AAEJ,+BAA+B;AAE/B,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC3B,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACpE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC,CAAC;IACpF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IAC3E,SAAS,EAAE,oBAAoB,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACjD,gIAAgI,CACjI;CACF,CAAC;KACD,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAI9B,eAAe;AAEf,MAAM,CAAC,MAAM,mBAAmB,GAAkC;IAChE,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,gBAAgB;IAC7B,UAAU,EAAE;QACV,EAAE,EAAE;YACF,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,MAAM;YACd,WAAW,EAAE,oCAAoC;SAClD;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE;gBACL,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE;gBAC1C,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,4BAA4B,EAAE;aACxD;YACD,WAAW,EAAE,4BAA4B;SAC1C;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oCAAoC;SAClD;QACD,SAAS,EAAE;YACT,IAAI,EAAE,+CAA+C;YACrD,WAAW,EACT,gIAAgI;SACnI;KACF;IACD,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC;IACjC,0DAA0D;CAC3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
|