@superbuilders/primer-tives 4.0.1 → 4.0.2

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.
@@ -1,29 +1,101 @@
1
- import { z } from "zod";
2
- declare const FractionInputPropsSchema: z.ZodObject<{
3
- form: z.ZodEnum<{
4
- whole: "whole";
5
- proper: "proper";
6
- improper: "improper";
7
- mixed: "mixed";
8
- }>;
9
- requireSimplified: z.ZodBoolean;
10
- }, z.core.$strip>;
11
- declare const FractionInputSubmissionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
12
- form: z.ZodLiteral<"whole">;
13
- whole: z.ZodString;
14
- }, z.core.$strip>, z.ZodObject<{
15
- form: z.ZodLiteral<"proper">;
16
- numerator: z.ZodString;
17
- denominator: z.ZodString;
18
- }, z.core.$strip>, z.ZodObject<{
19
- form: z.ZodLiteral<"improper">;
20
- numerator: z.ZodString;
21
- denominator: z.ZodString;
22
- }, z.core.$strip>, z.ZodObject<{
23
- form: z.ZodLiteral<"mixed">;
24
- whole: z.ZodString;
25
- numerator: z.ZodString;
26
- denominator: z.ZodString;
27
- }, z.core.$strip>], "form">;
28
- export { FractionInputPropsSchema, FractionInputSubmissionSchema };
1
+ import * as validate from "@superbuilders/validate";
2
+ declare const FractionInputPropsDraft07Schema: {
3
+ readonly type: "object";
4
+ readonly additionalProperties: false;
5
+ readonly required: readonly ["form", "requireSimplified"];
6
+ readonly properties: {
7
+ readonly form: {
8
+ readonly type: "string";
9
+ readonly enum: readonly ["whole", "proper", "improper", "mixed"];
10
+ };
11
+ readonly requireSimplified: {
12
+ readonly type: "boolean";
13
+ };
14
+ };
15
+ };
16
+ declare const FractionInputSubmissionDraft07Schema: {
17
+ readonly oneOf: readonly [{
18
+ readonly type: "object";
19
+ readonly additionalProperties: false;
20
+ readonly required: readonly ["form", "whole"];
21
+ readonly properties: {
22
+ readonly form: {
23
+ readonly const: "whole";
24
+ };
25
+ readonly whole: {
26
+ readonly type: "string";
27
+ };
28
+ };
29
+ }, {
30
+ readonly type: "object";
31
+ readonly additionalProperties: false;
32
+ readonly required: readonly ["form", "numerator", "denominator"];
33
+ readonly properties: {
34
+ readonly form: {
35
+ readonly const: "proper";
36
+ };
37
+ readonly numerator: {
38
+ readonly type: "string";
39
+ };
40
+ readonly denominator: {
41
+ readonly type: "string";
42
+ };
43
+ };
44
+ }, {
45
+ readonly type: "object";
46
+ readonly additionalProperties: false;
47
+ readonly required: readonly ["form", "numerator", "denominator"];
48
+ readonly properties: {
49
+ readonly form: {
50
+ readonly const: "improper";
51
+ };
52
+ readonly numerator: {
53
+ readonly type: "string";
54
+ };
55
+ readonly denominator: {
56
+ readonly type: "string";
57
+ };
58
+ };
59
+ }, {
60
+ readonly type: "object";
61
+ readonly additionalProperties: false;
62
+ readonly required: readonly ["form", "whole", "numerator", "denominator"];
63
+ readonly properties: {
64
+ readonly form: {
65
+ readonly const: "mixed";
66
+ };
67
+ readonly whole: {
68
+ readonly type: "string";
69
+ };
70
+ readonly numerator: {
71
+ readonly type: "string";
72
+ };
73
+ readonly denominator: {
74
+ readonly type: "string";
75
+ };
76
+ };
77
+ }];
78
+ };
79
+ declare const FractionInputPropsSchema: validate.Validator<{
80
+ form: "whole" | "proper" | "improper" | "mixed";
81
+ requireSimplified: boolean;
82
+ }>;
83
+ declare const FractionInputSubmissionSchema: validate.Validator<{
84
+ whole: string;
85
+ form: "whole";
86
+ } | {
87
+ form: "proper";
88
+ numerator: string;
89
+ denominator: string;
90
+ } | {
91
+ form: "improper";
92
+ numerator: string;
93
+ denominator: string;
94
+ } | {
95
+ whole: string;
96
+ form: "mixed";
97
+ numerator: string;
98
+ denominator: string;
99
+ }>;
100
+ export { FractionInputPropsDraft07Schema, FractionInputPropsSchema, FractionInputSubmissionDraft07Schema, FractionInputSubmissionSchema };
29
101
  //# sourceMappingURL=pci-schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pci-schemas.d.ts","sourceRoot":"","sources":["../../src/contracts/pci-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,QAAA,MAAM,wBAAwB;;;;;;;;iBAG5B,CAAA;AAEF,QAAA,MAAM,6BAA6B;;;;;;;;;;;;;;;;2BAkBjC,CAAA;AAEF,OAAO,EAAE,wBAAwB,EAAE,6BAA6B,EAAE,CAAA"}
1
+ {"version":3,"file":"pci-schemas.d.ts","sourceRoot":"","sources":["../../src/contracts/pci-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAA;AAEnD,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;CAQU,CAAA;AAE/C,QAAA,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCK,CAAA;AAE/C,QAAA,MAAM,wBAAwB;;;EAAoD,CAAA;AAClF,QAAA,MAAM,6BAA6B;;;;;;;;;;;;;;;;EAAyD,CAAA;AAE5F,OAAO,EACN,+BAA+B,EAC/B,wBAAwB,EACxB,oCAAoC,EACpC,6BAA6B,EAC7B,CAAA"}
@@ -8,6 +8,7 @@ interface ImageStimulus {
8
8
  kind: "image";
9
9
  alt: ContentInline[];
10
10
  src: string;
11
+ mime: "image/png" | "image/jpeg" | "image/webp";
11
12
  }
12
13
  type RendererStimulus = ImageStimulus;
13
14
  interface RendererChoice {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/contracts/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAA;AAClF,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAA;AAE1F,UAAU,SAAS;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACd;AAED,UAAU,aAAa;IACtB,IAAI,EAA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E,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,SAAS,EAAE,CAAA;CAAE,GACrC,aAAa,CAAC,IAAI,CAAC,CAAA;AAEtB,YAAY,EACX,aAAa,EACb,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,CAAA"}
@@ -1,92 +1,382 @@
1
- import { z } from "zod";
1
+ import * as validate from "@superbuilders/validate";
2
2
  import type { RendererInteraction, RendererSubmission } from "./types";
3
- declare const MatchPairSchema: z.ZodObject<{
4
- source: z.ZodString;
5
- target: z.ZodString;
6
- }, z.core.$strip>;
7
- declare const ChoiceSubmissionSchema: z.ZodObject<{
8
- type: z.ZodLiteral<"choice">;
9
- selectedKeys: z.ZodArray<z.ZodString>;
10
- }, z.core.$strip>;
11
- declare const TextEntrySubmissionSchema: z.ZodObject<{
12
- type: z.ZodLiteral<"text-entry">;
13
- value: z.ZodString;
14
- }, z.core.$strip>;
15
- declare const ExtendedTextSubmissionSchema: z.ZodObject<{
16
- type: z.ZodLiteral<"extended-text">;
17
- values: z.ZodArray<z.ZodString>;
18
- }, z.core.$strip>;
19
- declare const OrderSubmissionSchema: z.ZodObject<{
20
- type: z.ZodLiteral<"order">;
21
- orderedKeys: z.ZodArray<z.ZodString>;
22
- }, z.core.$strip>;
23
- declare const MatchSubmissionSchema: z.ZodObject<{
24
- type: z.ZodLiteral<"match">;
25
- pairs: z.ZodArray<z.ZodObject<{
26
- source: z.ZodString;
27
- target: z.ZodString;
28
- }, z.core.$strip>>;
29
- }, z.core.$strip>;
30
- declare const FractionInputPciSubmissionSchema: z.ZodObject<{
31
- type: z.ZodLiteral<"portable-custom">;
32
- pciId: z.ZodLiteral<"urn:primer:pci:fraction-input">;
33
- value: z.ZodDiscriminatedUnion<[z.ZodObject<{
34
- form: z.ZodLiteral<"whole">;
35
- whole: z.ZodString;
36
- }, z.core.$strip>, z.ZodObject<{
37
- form: z.ZodLiteral<"proper">;
38
- numerator: z.ZodString;
39
- denominator: z.ZodString;
40
- }, z.core.$strip>, z.ZodObject<{
41
- form: z.ZodLiteral<"improper">;
42
- numerator: z.ZodString;
43
- denominator: z.ZodString;
44
- }, z.core.$strip>, z.ZodObject<{
45
- form: z.ZodLiteral<"mixed">;
46
- whole: z.ZodString;
47
- numerator: z.ZodString;
48
- denominator: z.ZodString;
49
- }, z.core.$strip>], "form">;
50
- }, z.core.$strip>;
51
- declare const RendererSubmissionSchema: z.ZodUnion<readonly [z.ZodObject<{
52
- type: z.ZodLiteral<"choice">;
53
- selectedKeys: z.ZodArray<z.ZodString>;
54
- }, z.core.$strip>, z.ZodObject<{
55
- type: z.ZodLiteral<"text-entry">;
56
- value: z.ZodString;
57
- }, z.core.$strip>, z.ZodObject<{
58
- type: z.ZodLiteral<"extended-text">;
59
- values: z.ZodArray<z.ZodString>;
60
- }, z.core.$strip>, z.ZodObject<{
61
- type: z.ZodLiteral<"order">;
62
- orderedKeys: z.ZodArray<z.ZodString>;
63
- }, z.core.$strip>, z.ZodObject<{
64
- type: z.ZodLiteral<"match">;
65
- pairs: z.ZodArray<z.ZodObject<{
66
- source: z.ZodString;
67
- target: z.ZodString;
68
- }, z.core.$strip>>;
69
- }, z.core.$strip>, z.ZodObject<{
70
- type: z.ZodLiteral<"portable-custom">;
71
- pciId: z.ZodLiteral<"urn:primer:pci:fraction-input">;
72
- value: z.ZodDiscriminatedUnion<[z.ZodObject<{
73
- form: z.ZodLiteral<"whole">;
74
- whole: z.ZodString;
75
- }, z.core.$strip>, z.ZodObject<{
76
- form: z.ZodLiteral<"proper">;
77
- numerator: z.ZodString;
78
- denominator: z.ZodString;
79
- }, z.core.$strip>, z.ZodObject<{
80
- form: z.ZodLiteral<"improper">;
81
- numerator: z.ZodString;
82
- denominator: z.ZodString;
83
- }, z.core.$strip>, z.ZodObject<{
84
- form: z.ZodLiteral<"mixed">;
85
- whole: z.ZodString;
86
- numerator: z.ZodString;
87
- denominator: z.ZodString;
88
- }, z.core.$strip>], "form">;
89
- }, z.core.$strip>]>;
3
+ declare const MatchPairSchema: {
4
+ readonly type: "object";
5
+ readonly additionalProperties: false;
6
+ readonly required: readonly ["source", "target"];
7
+ readonly properties: {
8
+ readonly source: {
9
+ readonly type: "string";
10
+ };
11
+ readonly target: {
12
+ readonly type: "string";
13
+ };
14
+ };
15
+ };
16
+ declare const ChoiceSubmissionSchema: {
17
+ readonly type: "object";
18
+ readonly additionalProperties: false;
19
+ readonly required: readonly ["type", "selectedKeys"];
20
+ readonly properties: {
21
+ readonly type: {
22
+ readonly const: "choice";
23
+ };
24
+ readonly selectedKeys: {
25
+ readonly type: "array";
26
+ readonly items: {
27
+ readonly type: "string";
28
+ };
29
+ };
30
+ };
31
+ };
32
+ declare const TextEntrySubmissionSchema: {
33
+ readonly type: "object";
34
+ readonly additionalProperties: false;
35
+ readonly required: readonly ["type", "value"];
36
+ readonly properties: {
37
+ readonly type: {
38
+ readonly const: "text-entry";
39
+ };
40
+ readonly value: {
41
+ readonly type: "string";
42
+ };
43
+ };
44
+ };
45
+ declare const ExtendedTextSubmissionSchema: {
46
+ readonly type: "object";
47
+ readonly additionalProperties: false;
48
+ readonly required: readonly ["type", "values"];
49
+ readonly properties: {
50
+ readonly type: {
51
+ readonly const: "extended-text";
52
+ };
53
+ readonly values: {
54
+ readonly type: "array";
55
+ readonly minItems: 1;
56
+ readonly items: {
57
+ readonly type: "string";
58
+ };
59
+ };
60
+ };
61
+ };
62
+ declare const OrderSubmissionSchema: {
63
+ readonly type: "object";
64
+ readonly additionalProperties: false;
65
+ readonly required: readonly ["type", "orderedKeys"];
66
+ readonly properties: {
67
+ readonly type: {
68
+ readonly const: "order";
69
+ };
70
+ readonly orderedKeys: {
71
+ readonly type: "array";
72
+ readonly items: {
73
+ readonly type: "string";
74
+ };
75
+ };
76
+ };
77
+ };
78
+ declare const MatchSubmissionSchema: {
79
+ readonly type: "object";
80
+ readonly additionalProperties: false;
81
+ readonly required: readonly ["type", "pairs"];
82
+ readonly properties: {
83
+ readonly type: {
84
+ readonly const: "match";
85
+ };
86
+ readonly pairs: {
87
+ readonly type: "array";
88
+ readonly items: {
89
+ readonly type: "object";
90
+ readonly additionalProperties: false;
91
+ readonly required: readonly ["source", "target"];
92
+ readonly properties: {
93
+ readonly source: {
94
+ readonly type: "string";
95
+ };
96
+ readonly target: {
97
+ readonly type: "string";
98
+ };
99
+ };
100
+ };
101
+ };
102
+ };
103
+ };
104
+ declare const FractionInputPciSubmissionSchema: {
105
+ readonly type: "object";
106
+ readonly additionalProperties: false;
107
+ readonly required: readonly ["type", "pciId", "value"];
108
+ readonly properties: {
109
+ readonly type: {
110
+ readonly const: "portable-custom";
111
+ };
112
+ readonly pciId: {
113
+ readonly const: "urn:primer:pci:fraction-input";
114
+ };
115
+ readonly value: {
116
+ readonly oneOf: readonly [{
117
+ readonly type: "object";
118
+ readonly additionalProperties: false;
119
+ readonly required: readonly ["form", "whole"];
120
+ readonly properties: {
121
+ readonly form: {
122
+ readonly const: "whole";
123
+ };
124
+ readonly whole: {
125
+ readonly type: "string";
126
+ };
127
+ };
128
+ }, {
129
+ readonly type: "object";
130
+ readonly additionalProperties: false;
131
+ readonly required: readonly ["form", "numerator", "denominator"];
132
+ readonly properties: {
133
+ readonly form: {
134
+ readonly const: "proper";
135
+ };
136
+ readonly numerator: {
137
+ readonly type: "string";
138
+ };
139
+ readonly denominator: {
140
+ readonly type: "string";
141
+ };
142
+ };
143
+ }, {
144
+ readonly type: "object";
145
+ readonly additionalProperties: false;
146
+ readonly required: readonly ["form", "numerator", "denominator"];
147
+ readonly properties: {
148
+ readonly form: {
149
+ readonly const: "improper";
150
+ };
151
+ readonly numerator: {
152
+ readonly type: "string";
153
+ };
154
+ readonly denominator: {
155
+ readonly type: "string";
156
+ };
157
+ };
158
+ }, {
159
+ readonly type: "object";
160
+ readonly additionalProperties: false;
161
+ readonly required: readonly ["form", "whole", "numerator", "denominator"];
162
+ readonly properties: {
163
+ readonly form: {
164
+ readonly const: "mixed";
165
+ };
166
+ readonly whole: {
167
+ readonly type: "string";
168
+ };
169
+ readonly numerator: {
170
+ readonly type: "string";
171
+ };
172
+ readonly denominator: {
173
+ readonly type: "string";
174
+ };
175
+ };
176
+ }];
177
+ };
178
+ };
179
+ };
180
+ declare const RendererSubmissionDraft07Schema: {
181
+ readonly oneOf: readonly [{
182
+ readonly type: "object";
183
+ readonly additionalProperties: false;
184
+ readonly required: readonly ["type", "selectedKeys"];
185
+ readonly properties: {
186
+ readonly type: {
187
+ readonly const: "choice";
188
+ };
189
+ readonly selectedKeys: {
190
+ readonly type: "array";
191
+ readonly items: {
192
+ readonly type: "string";
193
+ };
194
+ };
195
+ };
196
+ }, {
197
+ readonly type: "object";
198
+ readonly additionalProperties: false;
199
+ readonly required: readonly ["type", "value"];
200
+ readonly properties: {
201
+ readonly type: {
202
+ readonly const: "text-entry";
203
+ };
204
+ readonly value: {
205
+ readonly type: "string";
206
+ };
207
+ };
208
+ }, {
209
+ readonly type: "object";
210
+ readonly additionalProperties: false;
211
+ readonly required: readonly ["type", "values"];
212
+ readonly properties: {
213
+ readonly type: {
214
+ readonly const: "extended-text";
215
+ };
216
+ readonly values: {
217
+ readonly type: "array";
218
+ readonly minItems: 1;
219
+ readonly items: {
220
+ readonly type: "string";
221
+ };
222
+ };
223
+ };
224
+ }, {
225
+ readonly type: "object";
226
+ readonly additionalProperties: false;
227
+ readonly required: readonly ["type", "orderedKeys"];
228
+ readonly properties: {
229
+ readonly type: {
230
+ readonly const: "order";
231
+ };
232
+ readonly orderedKeys: {
233
+ readonly type: "array";
234
+ readonly items: {
235
+ readonly type: "string";
236
+ };
237
+ };
238
+ };
239
+ }, {
240
+ readonly type: "object";
241
+ readonly additionalProperties: false;
242
+ readonly required: readonly ["type", "pairs"];
243
+ readonly properties: {
244
+ readonly type: {
245
+ readonly const: "match";
246
+ };
247
+ readonly pairs: {
248
+ readonly type: "array";
249
+ readonly items: {
250
+ readonly type: "object";
251
+ readonly additionalProperties: false;
252
+ readonly required: readonly ["source", "target"];
253
+ readonly properties: {
254
+ readonly source: {
255
+ readonly type: "string";
256
+ };
257
+ readonly target: {
258
+ readonly type: "string";
259
+ };
260
+ };
261
+ };
262
+ };
263
+ };
264
+ }, {
265
+ readonly type: "object";
266
+ readonly additionalProperties: false;
267
+ readonly required: readonly ["type", "pciId", "value"];
268
+ readonly properties: {
269
+ readonly type: {
270
+ readonly const: "portable-custom";
271
+ };
272
+ readonly pciId: {
273
+ readonly const: "urn:primer:pci:fraction-input";
274
+ };
275
+ readonly value: {
276
+ readonly oneOf: readonly [{
277
+ readonly type: "object";
278
+ readonly additionalProperties: false;
279
+ readonly required: readonly ["form", "whole"];
280
+ readonly properties: {
281
+ readonly form: {
282
+ readonly const: "whole";
283
+ };
284
+ readonly whole: {
285
+ readonly type: "string";
286
+ };
287
+ };
288
+ }, {
289
+ readonly type: "object";
290
+ readonly additionalProperties: false;
291
+ readonly required: readonly ["form", "numerator", "denominator"];
292
+ readonly properties: {
293
+ readonly form: {
294
+ readonly const: "proper";
295
+ };
296
+ readonly numerator: {
297
+ readonly type: "string";
298
+ };
299
+ readonly denominator: {
300
+ readonly type: "string";
301
+ };
302
+ };
303
+ }, {
304
+ readonly type: "object";
305
+ readonly additionalProperties: false;
306
+ readonly required: readonly ["form", "numerator", "denominator"];
307
+ readonly properties: {
308
+ readonly form: {
309
+ readonly const: "improper";
310
+ };
311
+ readonly numerator: {
312
+ readonly type: "string";
313
+ };
314
+ readonly denominator: {
315
+ readonly type: "string";
316
+ };
317
+ };
318
+ }, {
319
+ readonly type: "object";
320
+ readonly additionalProperties: false;
321
+ readonly required: readonly ["form", "whole", "numerator", "denominator"];
322
+ readonly properties: {
323
+ readonly form: {
324
+ readonly const: "mixed";
325
+ };
326
+ readonly whole: {
327
+ readonly type: "string";
328
+ };
329
+ readonly numerator: {
330
+ readonly type: "string";
331
+ };
332
+ readonly denominator: {
333
+ readonly type: "string";
334
+ };
335
+ };
336
+ }];
337
+ };
338
+ };
339
+ }];
340
+ };
341
+ declare const RendererSubmissionSchema: validate.Validator<{
342
+ type: "choice";
343
+ selectedKeys: string[];
344
+ } | {
345
+ value: string;
346
+ type: "text-entry";
347
+ } | {
348
+ values: string[];
349
+ type: "extended-text";
350
+ } | {
351
+ type: "order";
352
+ orderedKeys: string[];
353
+ } | {
354
+ type: "match";
355
+ pairs: {
356
+ source: string;
357
+ target: string;
358
+ }[];
359
+ } | {
360
+ value: {
361
+ whole: string;
362
+ form: "whole";
363
+ } | {
364
+ form: "proper";
365
+ numerator: string;
366
+ denominator: string;
367
+ } | {
368
+ form: "improper";
369
+ numerator: string;
370
+ denominator: string;
371
+ } | {
372
+ whole: string;
373
+ form: "mixed";
374
+ numerator: string;
375
+ denominator: string;
376
+ };
377
+ type: "portable-custom";
378
+ pciId: "urn:primer:pci:fraction-input";
379
+ }>;
90
380
  type SubmissionValidationSuccess = {
91
381
  ok: true;
92
382
  value: RendererSubmission;
@@ -98,6 +388,6 @@ type SubmissionValidationFailure = {
98
388
  type SubmissionValidationResult = SubmissionValidationSuccess | SubmissionValidationFailure;
99
389
  declare function validateSubmissionForInteraction(interaction: RendererInteraction, submission: RendererSubmission): SubmissionValidationResult;
100
390
  declare function submissionValidationMessage(result: SubmissionValidationFailure): string;
101
- export { ChoiceSubmissionSchema, ExtendedTextSubmissionSchema, FractionInputPciSubmissionSchema, MatchPairSchema, MatchSubmissionSchema, OrderSubmissionSchema, RendererSubmissionSchema, TextEntrySubmissionSchema, submissionValidationMessage, validateSubmissionForInteraction };
391
+ export { ChoiceSubmissionSchema, ExtendedTextSubmissionSchema, FractionInputPciSubmissionSchema, MatchPairSchema, MatchSubmissionSchema, OrderSubmissionSchema, RendererSubmissionDraft07Schema, RendererSubmissionSchema, TextEntrySubmissionSchema, submissionValidationMessage, validateSubmissionForInteraction };
102
392
  export type { SubmissionValidationFailure, SubmissionValidationResult, SubmissionValidationSuccess };
103
393
  //# sourceMappingURL=validation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/contracts/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,OAAO,KAAK,EAGX,mBAAmB,EAEnB,kBAAkB,EAClB,MAAM,6CAA6C,CAAA;AAEpD,QAAA,MAAM,eAAe;;;iBAGnB,CAAA;AAEF,QAAA,MAAM,sBAAsB;;;iBAG1B,CAAA;AAEF,QAAA,MAAM,yBAAyB;;;iBAG7B,CAAA;AAEF,QAAA,MAAM,4BAA4B;;;iBAGhC,CAAA;AAEF,QAAA,MAAM,qBAAqB;;;iBAGzB,CAAA;AAEF,QAAA,MAAM,qBAAqB;;;;;;iBAGzB,CAAA;AAEF,QAAA,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;iBAIpC,CAAA;AAEF,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAO5B,CAAA;AAqEF,KAAK,2BAA2B,GAAG;IAClC,EAAE,EAAE,IAAI,CAAA;IACR,KAAK,EAAE,kBAAkB,CAAA;CACzB,CAAA;AAED,KAAK,2BAA2B,GAAG;IAClC,EAAE,EAAE,KAAK,CAAA;IACT,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CACzB,CAAA;AAED,KAAK,0BAA0B,GAAG,2BAA2B,GAAG,2BAA2B,CAAA;AAuJ3F,iBAAS,gCAAgC,CACxC,WAAW,EAAE,mBAAmB,EAChC,UAAU,EAAE,kBAAkB,G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