@intellectif/lk-core 0.8.2 → 0.10.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/CHANGELOG.md +40 -0
- package/README.md +5 -4
- package/dist/{activity-CPtJUBek.d.cts → activity-B0zbvu18.d.cts} +177 -2
- package/dist/{activity-CPtJUBek.d.ts → activity-B0zbvu18.d.ts} +177 -2
- package/dist/{chunk-FVLKIL6W.cjs → chunk-3FEAEO3D.cjs} +18 -13
- package/dist/chunk-3FEAEO3D.cjs.map +1 -0
- package/dist/chunk-7ODQRNR4.cjs +2009 -0
- package/dist/chunk-7ODQRNR4.cjs.map +1 -0
- package/dist/chunk-FIS5KBCE.js +2009 -0
- package/dist/chunk-FIS5KBCE.js.map +1 -0
- package/dist/{chunk-NHGXOOZ2.js → chunk-IXXMYJI7.js} +2 -2
- package/dist/{chunk-YJZY5TPY.cjs → chunk-VBM5H6P5.cjs} +8 -8
- package/dist/{chunk-YJZY5TPY.cjs.map → chunk-VBM5H6P5.cjs.map} +1 -1
- package/dist/{chunk-7ACNBDSF.cjs → chunk-VTTRXGDD.cjs} +4 -4
- package/dist/{chunk-7ACNBDSF.cjs.map → chunk-VTTRXGDD.cjs.map} +1 -1
- package/dist/{chunk-2M76F32Y.js → chunk-XGCTAQSS.js} +7 -2
- package/dist/chunk-XGCTAQSS.js.map +1 -0
- package/dist/{chunk-LNA33IK7.js → chunk-ZTY4UIUD.js} +2 -2
- package/dist/{index-BvrA8nIV.d.ts → index-DSfETm4b.d.ts} +321 -3
- package/dist/{index-gIN564mV.d.cts → index-u_rBLkuc.d.cts} +321 -3
- package/dist/index.cjs +156 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +159 -8
- package/dist/index.d.ts +159 -8
- package/dist/index.js +137 -23
- package/dist/index.js.map +1 -1
- package/dist/schemas.cjs +25 -3
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +2 -2
- package/dist/schemas.d.ts +2 -2
- package/dist/schemas.js +24 -2
- package/dist/scoring.cjs +3 -3
- package/dist/scoring.d.cts +2 -2
- package/dist/scoring.d.ts +2 -2
- package/dist/scoring.js +2 -2
- package/dist/xapi.cjs +3 -3
- package/dist/xapi.d.cts +1 -1
- package/dist/xapi.d.ts +1 -1
- package/dist/xapi.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-2M76F32Y.js.map +0 -1
- package/dist/chunk-FKH4YT5X.cjs +0 -748
- package/dist/chunk-FKH4YT5X.cjs.map +0 -1
- package/dist/chunk-FVLKIL6W.cjs.map +0 -1
- package/dist/chunk-HCOWSGEZ.js +0 -748
- package/dist/chunk-HCOWSGEZ.js.map +0 -1
- /package/dist/{chunk-NHGXOOZ2.js.map → chunk-IXXMYJI7.js.map} +0 -0
- /package/dist/{chunk-LNA33IK7.js.map → chunk-ZTY4UIUD.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ActivityData, c as ActivityMedia,
|
|
1
|
+
import { A as ActivityData, c as ActivityMedia, u as ValidationResult, e as ActivityType, a as ActivityDataMap } from './activity-B0zbvu18.js';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
|
|
4
4
|
/** What a stimulus primarily is. Drives validation and layout, never scoring. */
|
|
@@ -273,6 +273,125 @@ declare const FillInTheBlanksDataSchema: z.ZodObject<{
|
|
|
273
273
|
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
274
274
|
}, z.core.$loose>;
|
|
275
275
|
|
|
276
|
+
/**
|
|
277
|
+
* Zod schema for one selectable choice. Loose, like every other schema here:
|
|
278
|
+
* unknown keys are preserved so a consumer sidecar survives validation.
|
|
279
|
+
*/
|
|
280
|
+
declare const GapSelectChoiceSchema: z.ZodObject<{
|
|
281
|
+
id: z.ZodString;
|
|
282
|
+
text: z.ZodString;
|
|
283
|
+
}, z.core.$loose>;
|
|
284
|
+
/** Zod schema for a shared word bank. */
|
|
285
|
+
declare const GapSelectBankSchema: z.ZodObject<{
|
|
286
|
+
id: z.ZodString;
|
|
287
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
288
|
+
id: z.ZodString;
|
|
289
|
+
text: z.ZodString;
|
|
290
|
+
}, z.core.$loose>>;
|
|
291
|
+
}, z.core.$loose>;
|
|
292
|
+
/** Zod schema for one gap. The `choices` / `bankId` exclusivity is checked on the activity. */
|
|
293
|
+
declare const GapSelectGapSchema: z.ZodObject<{
|
|
294
|
+
id: z.ZodString;
|
|
295
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
296
|
+
id: z.ZodString;
|
|
297
|
+
text: z.ZodString;
|
|
298
|
+
}, z.core.$loose>>>;
|
|
299
|
+
bankId: z.ZodOptional<z.ZodString>;
|
|
300
|
+
correctChoiceId: z.ZodString;
|
|
301
|
+
feedback: z.ZodOptional<z.ZodString>;
|
|
302
|
+
}, z.core.$loose>;
|
|
303
|
+
/**
|
|
304
|
+
* Zod schema validating the full Gap Select data contract.
|
|
305
|
+
*
|
|
306
|
+
* Six semantic guards, none of them expressible in JSON Schema and all of them
|
|
307
|
+
* authoring errors that would otherwise reach a learner:
|
|
308
|
+
*
|
|
309
|
+
* 1. **Bank ids are unique** — two banks sharing an id makes which one a gap
|
|
310
|
+
* draws from a matter of array order.
|
|
311
|
+
* 2. **Gap ids are unique** — the scorer looks a gap's selection up by id, so a
|
|
312
|
+
* duplicate makes one gap unscoreable (the same defect the Multiple Choice
|
|
313
|
+
* option-id guard exists for).
|
|
314
|
+
* 3. **Passage placeholders and gaps pair one to one**, each `{{id}}` appearing
|
|
315
|
+
* exactly once — the Fill-in-the-Blanks bijection, for the same reason: a
|
|
316
|
+
* gap with nowhere to render is a question the learner never sees, and a
|
|
317
|
+
* placeholder with no gap renders as literal `{{id}}` text.
|
|
318
|
+
* 4. **Exactly one choice source per gap** — `choices` or `bankId`, never both
|
|
319
|
+
* and never neither.
|
|
320
|
+
* 5. **A `bankId` names a bank that exists.**
|
|
321
|
+
* 6. **`correctChoiceId` is one of the choices the gap actually offers**, and
|
|
322
|
+
* choice ids within a resolved set are unique. An answer key pointing at a
|
|
323
|
+
* choice nobody can pick is an item that cannot be passed.
|
|
324
|
+
*/
|
|
325
|
+
declare const GapSelectDataSchema: z.ZodObject<{
|
|
326
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
327
|
+
type: z.ZodLiteral<"gap-select">;
|
|
328
|
+
id: z.ZodString;
|
|
329
|
+
title: z.ZodString;
|
|
330
|
+
passage: z.ZodString;
|
|
331
|
+
passageHtml: z.ZodOptional<z.ZodString>;
|
|
332
|
+
gaps: z.ZodArray<z.ZodObject<{
|
|
333
|
+
id: z.ZodString;
|
|
334
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
335
|
+
id: z.ZodString;
|
|
336
|
+
text: z.ZodString;
|
|
337
|
+
}, z.core.$loose>>>;
|
|
338
|
+
bankId: z.ZodOptional<z.ZodString>;
|
|
339
|
+
correctChoiceId: z.ZodString;
|
|
340
|
+
feedback: z.ZodOptional<z.ZodString>;
|
|
341
|
+
}, z.core.$loose>>;
|
|
342
|
+
banks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
343
|
+
id: z.ZodString;
|
|
344
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
345
|
+
id: z.ZodString;
|
|
346
|
+
text: z.ZodString;
|
|
347
|
+
}, z.core.$loose>>;
|
|
348
|
+
}, z.core.$loose>>>;
|
|
349
|
+
scoringStrategy: z.ZodEnum<{
|
|
350
|
+
"all-or-nothing": "all-or-nothing";
|
|
351
|
+
partial: "partial";
|
|
352
|
+
}>;
|
|
353
|
+
presentation: z.ZodOptional<z.ZodLiteral<"dropdown">>;
|
|
354
|
+
shuffleChoices: z.ZodOptional<z.ZodBoolean>;
|
|
355
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
356
|
+
type: z.ZodEnum<{
|
|
357
|
+
image: "image";
|
|
358
|
+
audio: "audio";
|
|
359
|
+
video: "video";
|
|
360
|
+
embed: "embed";
|
|
361
|
+
}>;
|
|
362
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
363
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
364
|
+
captionsUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodString]>>;
|
|
365
|
+
playback: z.ZodOptional<z.ZodObject<{
|
|
366
|
+
controls: z.ZodOptional<z.ZodEnum<{
|
|
367
|
+
native: "native";
|
|
368
|
+
minimal: "minimal";
|
|
369
|
+
}>>;
|
|
370
|
+
maxPlays: z.ZodOptional<z.ZodNumber>;
|
|
371
|
+
seek: z.ZodOptional<z.ZodEnum<{
|
|
372
|
+
none: "none";
|
|
373
|
+
allow: "allow";
|
|
374
|
+
}>>;
|
|
375
|
+
rate: z.ZodOptional<z.ZodEnum<{
|
|
376
|
+
allow: "allow";
|
|
377
|
+
fixed: "fixed";
|
|
378
|
+
}>>;
|
|
379
|
+
nativeControlHints: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
380
|
+
"hide-download": "hide-download";
|
|
381
|
+
"hide-rate": "hide-rate";
|
|
382
|
+
}>>>;
|
|
383
|
+
}, z.core.$strict>>;
|
|
384
|
+
}, z.core.$loose>>;
|
|
385
|
+
feedback: z.ZodOptional<z.ZodObject<{
|
|
386
|
+
correct: z.ZodOptional<z.ZodString>;
|
|
387
|
+
incorrect: z.ZodOptional<z.ZodString>;
|
|
388
|
+
}, z.core.$loose>>;
|
|
389
|
+
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
390
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
391
|
+
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
392
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
393
|
+
}, z.core.$loose>;
|
|
394
|
+
|
|
276
395
|
/**
|
|
277
396
|
* Zod schema for a {@link Stimulus}. Loose: unknown keys preserved.
|
|
278
397
|
*
|
|
@@ -542,6 +661,14 @@ declare const itemGroupJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
|
542
661
|
* `additionalProperties: false` — the JSON Schema and `validateActivity` now
|
|
543
662
|
* agree on unknown-key handling.
|
|
544
663
|
*/
|
|
664
|
+
/**
|
|
665
|
+
* JSON Schema (Draft 7) representation of the Gap Select activity data
|
|
666
|
+
* contract. Structural contract only: the six semantic guards — the
|
|
667
|
+
* passage/gap bijection, id uniqueness, the one-choice-source rule, and an
|
|
668
|
+
* answer key that names a choice the gap offers — are Zod-only, as they are
|
|
669
|
+
* for the other types.
|
|
670
|
+
*/
|
|
671
|
+
declare const gapSelectJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
545
672
|
declare const multipleChoiceJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
546
673
|
/**
|
|
547
674
|
* JSON Schema (Draft 7) representation of the Fill-in-the-Blanks activity data
|
|
@@ -759,11 +886,47 @@ declare const RedactedMediaSchema: z.ZodObject<{
|
|
|
759
886
|
* Zod schema for a single Multiple Choice option. Loose: unknown keys are
|
|
760
887
|
* preserved through validation (forward-compat / consumer sidecars — B7).
|
|
761
888
|
*/
|
|
889
|
+
/**
|
|
890
|
+
* A picture or recording carried by one option.
|
|
891
|
+
*
|
|
892
|
+
* LOOSE, like `MediaSchema` and every other content schema: a consumer's own
|
|
893
|
+
* fields — an asset id, a CDN key — ride along and survive validation (B7).
|
|
894
|
+
* Making it strict to catch a typo would reject exactly the sidecars the SDK
|
|
895
|
+
* promises to preserve, and an invariant test guards that promise by counting
|
|
896
|
+
* the closed objects in the exported JSON Schema.
|
|
897
|
+
*
|
|
898
|
+
* The two things that must NOT be swallowed are named explicitly instead. The
|
|
899
|
+
* `type` enum refuses the kinds that cannot be an option, and a refinement
|
|
900
|
+
* refuses `playback`, which would otherwise sit there looking like an enforced
|
|
901
|
+
* budget while nothing read it.
|
|
902
|
+
*
|
|
903
|
+
* The URL goes through `MediaUrlSchema`, the same security-reviewed allow-list
|
|
904
|
+
* activity media uses — `javascript:`, `file:` and `ftp:` are stored-XSS
|
|
905
|
+
* vectors wherever the value lands in a `src`, and that list is not forked.
|
|
906
|
+
*/
|
|
907
|
+
declare const MultipleChoiceOptionMediaSchema: z.ZodObject<{
|
|
908
|
+
type: z.ZodEnum<{
|
|
909
|
+
image: "image";
|
|
910
|
+
audio: "audio";
|
|
911
|
+
}>;
|
|
912
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
913
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
914
|
+
captionsUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodString]>>;
|
|
915
|
+
}, z.core.$loose>;
|
|
762
916
|
declare const MultipleChoiceOptionSchema: z.ZodObject<{
|
|
763
917
|
id: z.ZodString;
|
|
764
918
|
text: z.ZodString;
|
|
765
919
|
isCorrect: z.ZodBoolean;
|
|
766
920
|
feedback: z.ZodOptional<z.ZodString>;
|
|
921
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
922
|
+
type: z.ZodEnum<{
|
|
923
|
+
image: "image";
|
|
924
|
+
audio: "audio";
|
|
925
|
+
}>;
|
|
926
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
927
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
928
|
+
captionsUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodString]>>;
|
|
929
|
+
}, z.core.$loose>>;
|
|
767
930
|
}, z.core.$loose>;
|
|
768
931
|
/**
|
|
769
932
|
* Zod schema validating the full Multiple Choice activity data contract.
|
|
@@ -796,6 +959,15 @@ declare const MultipleChoiceDataSchema: z.ZodObject<{
|
|
|
796
959
|
text: z.ZodString;
|
|
797
960
|
isCorrect: z.ZodBoolean;
|
|
798
961
|
feedback: z.ZodOptional<z.ZodString>;
|
|
962
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
963
|
+
type: z.ZodEnum<{
|
|
964
|
+
image: "image";
|
|
965
|
+
audio: "audio";
|
|
966
|
+
}>;
|
|
967
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
968
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
969
|
+
captionsUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodString]>>;
|
|
970
|
+
}, z.core.$loose>>;
|
|
799
971
|
}, z.core.$loose>>;
|
|
800
972
|
scoringStrategy: z.ZodEnum<{
|
|
801
973
|
"all-or-nothing": "all-or-nothing";
|
|
@@ -843,9 +1015,36 @@ declare const MultipleChoiceDataSchema: z.ZodObject<{
|
|
|
843
1015
|
}, z.core.$loose>;
|
|
844
1016
|
|
|
845
1017
|
/** A redacted Multiple Choice option: id and display text only — no `isCorrect`, no feedback. */
|
|
1018
|
+
declare const RedactedMultipleChoiceOptionMediaSchema: z.ZodObject<{
|
|
1019
|
+
type: z.ZodEnum<{
|
|
1020
|
+
image: "image";
|
|
1021
|
+
audio: "audio";
|
|
1022
|
+
}>;
|
|
1023
|
+
url: z.ZodString;
|
|
1024
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1025
|
+
captionsUrl: z.ZodOptional<z.ZodString>;
|
|
1026
|
+
}, z.core.$strict>;
|
|
1027
|
+
/**
|
|
1028
|
+
* A redacted Multiple Choice option: id, display text and its picture or
|
|
1029
|
+
* recording — no `isCorrect`, no feedback.
|
|
1030
|
+
*
|
|
1031
|
+
* The media survives intact for the reason a gap-select choice does: it is the
|
|
1032
|
+
* option the learner is being asked to pick, and an exam that stripped it would
|
|
1033
|
+
* show a row of blanks. Nothing in it is an answer key — the key is `isCorrect`,
|
|
1034
|
+
* which is gone.
|
|
1035
|
+
*/
|
|
846
1036
|
declare const RedactedMultipleChoiceOptionSchema: z.ZodObject<{
|
|
847
1037
|
id: z.ZodString;
|
|
848
1038
|
text: z.ZodString;
|
|
1039
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
1040
|
+
type: z.ZodEnum<{
|
|
1041
|
+
image: "image";
|
|
1042
|
+
audio: "audio";
|
|
1043
|
+
}>;
|
|
1044
|
+
url: z.ZodString;
|
|
1045
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1046
|
+
captionsUrl: z.ZodOptional<z.ZodString>;
|
|
1047
|
+
}, z.core.$strict>>;
|
|
849
1048
|
}, z.core.$strict>;
|
|
850
1049
|
/**
|
|
851
1050
|
* Redacted Multiple Choice data: renderable (question, mode, options to pick
|
|
@@ -865,6 +1064,15 @@ declare const RedactedMultipleChoiceDataSchema: z.ZodObject<{
|
|
|
865
1064
|
options: z.ZodArray<z.ZodObject<{
|
|
866
1065
|
id: z.ZodString;
|
|
867
1066
|
text: z.ZodString;
|
|
1067
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
1068
|
+
type: z.ZodEnum<{
|
|
1069
|
+
image: "image";
|
|
1070
|
+
audio: "audio";
|
|
1071
|
+
}>;
|
|
1072
|
+
url: z.ZodString;
|
|
1073
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1074
|
+
captionsUrl: z.ZodOptional<z.ZodString>;
|
|
1075
|
+
}, z.core.$strict>>;
|
|
868
1076
|
}, z.core.$strict>>;
|
|
869
1077
|
shuffle: z.ZodOptional<z.ZodBoolean>;
|
|
870
1078
|
/** Marker distinguishing a redacted projection from full activity data. */
|
|
@@ -965,6 +1173,106 @@ declare const RedactedFillInTheBlanksDataSchema: z.ZodObject<{
|
|
|
965
1173
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
966
1174
|
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
967
1175
|
}, z.core.$strict>;
|
|
1176
|
+
/** A redacted choice: exactly what it always was. Which one is correct was never stored here. */
|
|
1177
|
+
declare const RedactedGapSelectChoiceSchema: z.ZodObject<{
|
|
1178
|
+
id: z.ZodString;
|
|
1179
|
+
text: z.ZodString;
|
|
1180
|
+
}, z.core.$strict>;
|
|
1181
|
+
/** A redacted word bank: every choice survives, because the learner picks from them. */
|
|
1182
|
+
declare const RedactedGapSelectBankSchema: z.ZodObject<{
|
|
1183
|
+
id: z.ZodString;
|
|
1184
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
1185
|
+
id: z.ZodString;
|
|
1186
|
+
text: z.ZodString;
|
|
1187
|
+
}, z.core.$strict>>;
|
|
1188
|
+
}, z.core.$strict>;
|
|
1189
|
+
/** A redacted gap: its choice source survives; `correctChoiceId` and feedback do not. */
|
|
1190
|
+
declare const RedactedGapSelectGapSchema: z.ZodObject<{
|
|
1191
|
+
id: z.ZodString;
|
|
1192
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1193
|
+
id: z.ZodString;
|
|
1194
|
+
text: z.ZodString;
|
|
1195
|
+
}, z.core.$strict>>>;
|
|
1196
|
+
bankId: z.ZodOptional<z.ZodString>;
|
|
1197
|
+
}, z.core.$strict>;
|
|
1198
|
+
/**
|
|
1199
|
+
* Redacted Gap Select data — the type where redaction **inverts** the
|
|
1200
|
+
* Fill-in-the-Blanks rule, and the reason this is a separate schema rather than
|
|
1201
|
+
* a variant of it.
|
|
1202
|
+
*
|
|
1203
|
+
* In Fill-in-the-Blanks the candidate answers ARE the key, so `acceptedAnswers`
|
|
1204
|
+
* is stripped. Here the learner cannot answer at all without seeing every
|
|
1205
|
+
* choice, so `choices` and `banks` must survive in full and `correctChoiceId`
|
|
1206
|
+
* is the only field withheld. A policy that treated "the list of candidate
|
|
1207
|
+
* answers" as answer-key for both types would ship an unanswerable exam.
|
|
1208
|
+
*
|
|
1209
|
+
* `scoringStrategy` stays answer-key for the same reason it does on the other
|
|
1210
|
+
* two: knowing whether marking is partial tells a learner whether guessing at a
|
|
1211
|
+
* gap is free.
|
|
1212
|
+
*/
|
|
1213
|
+
declare const RedactedGapSelectDataSchema: z.ZodObject<{
|
|
1214
|
+
type: z.ZodLiteral<"gap-select">;
|
|
1215
|
+
passage: z.ZodString;
|
|
1216
|
+
passageHtml: z.ZodOptional<z.ZodString>;
|
|
1217
|
+
gaps: z.ZodArray<z.ZodObject<{
|
|
1218
|
+
id: z.ZodString;
|
|
1219
|
+
choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1220
|
+
id: z.ZodString;
|
|
1221
|
+
text: z.ZodString;
|
|
1222
|
+
}, z.core.$strict>>>;
|
|
1223
|
+
bankId: z.ZodOptional<z.ZodString>;
|
|
1224
|
+
}, z.core.$strict>>;
|
|
1225
|
+
banks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1226
|
+
id: z.ZodString;
|
|
1227
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
1228
|
+
id: z.ZodString;
|
|
1229
|
+
text: z.ZodString;
|
|
1230
|
+
}, z.core.$strict>>;
|
|
1231
|
+
}, z.core.$strict>>>;
|
|
1232
|
+
presentation: z.ZodOptional<z.ZodLiteral<"dropdown">>;
|
|
1233
|
+
shuffleChoices: z.ZodOptional<z.ZodBoolean>;
|
|
1234
|
+
/** Marker distinguishing a redacted projection from full activity data. */
|
|
1235
|
+
redacted: z.ZodLiteral<true>;
|
|
1236
|
+
/** Slot identity, carried through redaction so the client and the plan agree. */
|
|
1237
|
+
slotKey: z.ZodOptional<z.ZodString>;
|
|
1238
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
1239
|
+
id: z.ZodString;
|
|
1240
|
+
title: z.ZodString;
|
|
1241
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
1242
|
+
type: z.ZodEnum<{
|
|
1243
|
+
image: "image";
|
|
1244
|
+
audio: "audio";
|
|
1245
|
+
video: "video";
|
|
1246
|
+
embed: "embed";
|
|
1247
|
+
}>;
|
|
1248
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1249
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1250
|
+
captionsUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodString]>>;
|
|
1251
|
+
playback: z.ZodOptional<z.ZodObject<{
|
|
1252
|
+
controls: z.ZodOptional<z.ZodEnum<{
|
|
1253
|
+
native: "native";
|
|
1254
|
+
minimal: "minimal";
|
|
1255
|
+
}>>;
|
|
1256
|
+
maxPlays: z.ZodOptional<z.ZodNumber>;
|
|
1257
|
+
seek: z.ZodOptional<z.ZodEnum<{
|
|
1258
|
+
none: "none";
|
|
1259
|
+
allow: "allow";
|
|
1260
|
+
}>>;
|
|
1261
|
+
rate: z.ZodOptional<z.ZodEnum<{
|
|
1262
|
+
allow: "allow";
|
|
1263
|
+
fixed: "fixed";
|
|
1264
|
+
}>>;
|
|
1265
|
+
nativeControlHints: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1266
|
+
"hide-download": "hide-download";
|
|
1267
|
+
"hide-rate": "hide-rate";
|
|
1268
|
+
}>>>;
|
|
1269
|
+
}, z.core.$strict>>;
|
|
1270
|
+
}, z.core.$strict>>;
|
|
1271
|
+
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
1272
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
1273
|
+
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1274
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1275
|
+
}, z.core.$strict>;
|
|
968
1276
|
/**
|
|
969
1277
|
* Redacted Written Response data: the prompt, word bounds and rubric are
|
|
970
1278
|
* learner-visible (a rubric tells the learner what they are graded on);
|
|
@@ -1043,6 +1351,8 @@ declare const RedactedWrittenResponseDataSchema: z.ZodObject<{
|
|
|
1043
1351
|
* a renderer that must never see an answer key.
|
|
1044
1352
|
*/
|
|
1045
1353
|
type RedactedMultipleChoiceOption = z.infer<typeof RedactedMultipleChoiceOptionSchema>;
|
|
1354
|
+
/** An option's picture or recording, unchanged by redaction — it is what the learner picks. */
|
|
1355
|
+
type RedactedMultipleChoiceOptionMedia = z.infer<typeof RedactedMultipleChoiceOptionMediaSchema>;
|
|
1046
1356
|
/** A Multiple Choice item with the answer key, feedback and strategy removed. */
|
|
1047
1357
|
type RedactedMultipleChoiceData = z.infer<typeof RedactedMultipleChoiceDataSchema>;
|
|
1048
1358
|
/** A blank with its accepted answers and matching rules removed; the hint survives. */
|
|
@@ -1051,6 +1361,14 @@ type RedactedBlankConfig = z.infer<typeof RedactedBlankConfigSchema>;
|
|
|
1051
1361
|
type RedactedFillInTheBlanksData = z.infer<typeof RedactedFillInTheBlanksDataSchema>;
|
|
1052
1362
|
/** A Written Response item; the rubric survives, because it tells the learner what is assessed. */
|
|
1053
1363
|
type RedactedWrittenResponseData = z.infer<typeof RedactedWrittenResponseDataSchema>;
|
|
1364
|
+
/** A selectable choice, unchanged by redaction. */
|
|
1365
|
+
type RedactedGapSelectChoice = z.infer<typeof RedactedGapSelectChoiceSchema>;
|
|
1366
|
+
/** A word bank, unchanged by redaction — the learner picks from it. */
|
|
1367
|
+
type RedactedGapSelectBank = z.infer<typeof RedactedGapSelectBankSchema>;
|
|
1368
|
+
/** A gap with its `correctChoiceId` removed; every choice it offers survives. */
|
|
1369
|
+
type RedactedGapSelectGap = z.infer<typeof RedactedGapSelectGapSchema>;
|
|
1370
|
+
/** A Gap Select item the learner can still answer: choices intact, answer key gone. */
|
|
1371
|
+
type RedactedGapSelectData = z.infer<typeof RedactedGapSelectDataSchema>;
|
|
1054
1372
|
/**
|
|
1055
1373
|
* Discriminated union of every built-in redacted activity. Narrow it on
|
|
1056
1374
|
* `type`, exactly as you would {@link ActivityData}:
|
|
@@ -1063,7 +1381,7 @@ type RedactedWrittenResponseData = z.infer<typeof RedactedWrittenResponseDataSch
|
|
|
1063
1381
|
* }
|
|
1064
1382
|
* ```
|
|
1065
1383
|
*/
|
|
1066
|
-
type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData | RedactedWrittenResponseData;
|
|
1384
|
+
type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData | RedactedWrittenResponseData | RedactedGapSelectData;
|
|
1067
1385
|
|
|
1068
1386
|
/** Zod schema for a single rubric criterion. Loose: unknown keys preserved. */
|
|
1069
1387
|
declare const WrittenResponseRubricCriterionSchema: z.ZodObject<{
|
|
@@ -1160,4 +1478,4 @@ declare const WrittenResponseDataSchema: z.ZodObject<{
|
|
|
1160
1478
|
*/
|
|
1161
1479
|
declare function validateActivity<T extends ActivityType>(type: T, data: unknown): ValidationResult<ActivityDataMap[T]>;
|
|
1162
1480
|
|
|
1163
|
-
export {
|
|
1481
|
+
export { itemGroupJsonSchema as $, type RedactedMultipleChoiceOption as A, BlankConfigSchema as B, type RedactedMultipleChoiceOptionMedia as C, RedactedMultipleChoiceOptionMediaSchema as D, RedactedMultipleChoiceOptionSchema as E, FeedbackSchema as F, GapSelectBankSchema as G, type RedactedStimulus as H, type ItemGroup as I, RedactedStimulusSchema as J, type RedactedWrittenResponseData as K, RedactedWrittenResponseDataSchema as L, MediaPlaybackSchema as M, NativeControlHintSchema as N, type SequenceSlot as O, type SequenceSlotGroup as P, type Stimulus as Q, type RedactedActivity as R, type SequenceEntry as S, type StimulusKind as T, StimulusSchema as U, TextMatchPolicySchema as V, WrittenResponseDataSchema as W, WrittenResponseRubricCriterionSchema as X, WrittenResponseRubricSchema as Y, fillInTheBlanksJsonSchema as Z, gapSelectJsonSchema as _, FillInTheBlanksDataSchema as a, jsonSchemaFor as a0, multipleChoiceJsonSchema as a1, stimulusJsonSchema as a2, validateActivity as a3, validateItemGroup as a4, writtenResponseJsonSchema as a5, GapSelectChoiceSchema as b, GapSelectDataSchema as c, GapSelectGapSchema as d, ItemGroupSchema as e, MediaSchema as f, MediaUrlSchema as g, MultipleChoiceDataSchema as h, MultipleChoiceOptionMediaSchema as i, MultipleChoiceOptionSchema as j, type RedactedBlankConfig as k, RedactedBlankConfigSchema as l, type RedactedFillInTheBlanksData as m, RedactedFillInTheBlanksDataSchema as n, type RedactedGapSelectBank as o, RedactedGapSelectBankSchema as p, type RedactedGapSelectChoice as q, RedactedGapSelectChoiceSchema as r, type RedactedGapSelectData as s, RedactedGapSelectDataSchema as t, type RedactedGapSelectGap as u, RedactedGapSelectGapSchema as v, RedactedItemGroupSchema as w, RedactedMediaSchema as x, type RedactedMultipleChoiceData as y, RedactedMultipleChoiceDataSchema as z };
|