@intellectif/lk-core 0.13.1 → 0.14.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 +23 -0
- package/README.md +1 -1
- package/dist/{activity-DfAmJ1sl.d.cts → activity-BVkg9VDo.d.cts} +153 -4
- package/dist/{activity-DfAmJ1sl.d.ts → activity-BVkg9VDo.d.ts} +153 -4
- package/dist/{chunk-DQKJUMUW.cjs → chunk-2NIALQEH.cjs} +24 -19
- package/dist/chunk-2NIALQEH.cjs.map +1 -0
- package/dist/{chunk-XKKKWKRH.js → chunk-6RND47QE.js} +694 -126
- package/dist/chunk-6RND47QE.js.map +1 -0
- package/dist/{chunk-FT7SAC3X.cjs → chunk-CZRUMHKW.cjs} +4 -4
- package/dist/{chunk-FT7SAC3X.cjs.map → chunk-CZRUMHKW.cjs.map} +1 -1
- package/dist/chunk-J5OIRIOW.cjs +1034 -0
- package/dist/chunk-J5OIRIOW.cjs.map +1 -0
- package/dist/{chunk-Y36S3X3L.js → chunk-NBADQ3JU.js} +7 -2
- package/dist/chunk-NBADQ3JU.js.map +1 -0
- package/dist/{chunk-PYP3HCRQ.js → chunk-R7PV3XIC.js} +2 -2
- package/dist/chunk-RTIR6R2U.js +1034 -0
- package/dist/chunk-RTIR6R2U.js.map +1 -0
- package/dist/{chunk-XONKWL6D.cjs → chunk-VCXIPLEW.cjs} +585 -17
- package/dist/chunk-VCXIPLEW.cjs.map +1 -0
- package/dist/{index-BefQ8FAS.d.cts → index-BE1bM2Wi.d.cts} +238 -16
- package/dist/{index-BiIvdASA.d.ts → index-v2_-Fyn3.d.ts} +238 -16
- package/dist/index.cjs +110 -80
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +45 -17
- package/dist/index.d.ts +45 -17
- package/dist/index.js +35 -5
- package/dist/index.js.map +1 -1
- package/dist/schemas.cjs +11 -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 +10 -2
- package/dist/scoring.cjs +23 -3
- package/dist/scoring.cjs.map +1 -1
- package/dist/scoring.d.cts +471 -16
- package/dist/scoring.d.ts +471 -16
- package/dist/scoring.js +24 -4
- 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/vectors/README.md +63 -3
- package/vectors/replay.d.mts +7 -2
- package/vectors/replay.mjs +83 -1
- package/vectors/scoring.json +10875 -2
- package/dist/chunk-DQKJUMUW.cjs.map +0 -1
- package/dist/chunk-FGN4LLSP.js +0 -387
- package/dist/chunk-FGN4LLSP.js.map +0 -1
- package/dist/chunk-UHQVIC3P.cjs +0 -387
- package/dist/chunk-UHQVIC3P.cjs.map +0 -1
- package/dist/chunk-XKKKWKRH.js.map +0 -1
- package/dist/chunk-XONKWL6D.cjs.map +0 -1
- package/dist/chunk-Y36S3X3L.js.map +0 -1
- /package/dist/{chunk-PYP3HCRQ.js.map → chunk-R7PV3XIC.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ActivityData, c as ActivityMedia,
|
|
1
|
+
import { A as ActivityData, c as ActivityMedia, _ as ValidationResult, e as ActivityType, a as ActivityDataMap } from './activity-BVkg9VDo.cjs';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
|
|
4
4
|
/** What a stimulus primarily is. Drives validation and layout, never scoring. */
|
|
@@ -219,7 +219,7 @@ declare const DictationDataSchema: z.ZodObject<{
|
|
|
219
219
|
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
220
220
|
locale: z.ZodOptional<z.ZodString>;
|
|
221
221
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
222
|
-
difficultyLevel: z.ZodOptional<z.ZodLiteral<
|
|
222
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
223
223
|
}, z.core.$loose>;
|
|
224
224
|
|
|
225
225
|
/**
|
|
@@ -318,8 +318,8 @@ declare const FillInTheBlanksDataSchema: z.ZodObject<{
|
|
|
318
318
|
feedback: z.ZodOptional<z.ZodString>;
|
|
319
319
|
}, z.core.$loose>>;
|
|
320
320
|
scoringStrategy: z.ZodEnum<{
|
|
321
|
-
partial: "partial";
|
|
322
321
|
"all-or-nothing": "all-or-nothing";
|
|
322
|
+
partial: "partial";
|
|
323
323
|
}>;
|
|
324
324
|
media: z.ZodOptional<z.ZodObject<{
|
|
325
325
|
type: z.ZodEnum<{
|
|
@@ -358,7 +358,7 @@ declare const FillInTheBlanksDataSchema: z.ZodObject<{
|
|
|
358
358
|
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
359
359
|
locale: z.ZodOptional<z.ZodString>;
|
|
360
360
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
361
|
-
difficultyLevel: z.ZodOptional<z.ZodLiteral<
|
|
361
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
362
362
|
}, z.core.$loose>;
|
|
363
363
|
|
|
364
364
|
/**
|
|
@@ -435,8 +435,8 @@ declare const GapSelectDataSchema: z.ZodObject<{
|
|
|
435
435
|
}, z.core.$loose>>;
|
|
436
436
|
}, z.core.$loose>>>;
|
|
437
437
|
scoringStrategy: z.ZodEnum<{
|
|
438
|
-
partial: "partial";
|
|
439
438
|
"all-or-nothing": "all-or-nothing";
|
|
439
|
+
partial: "partial";
|
|
440
440
|
}>;
|
|
441
441
|
presentation: z.ZodOptional<z.ZodLiteral<"dropdown">>;
|
|
442
442
|
shuffleChoices: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -477,7 +477,7 @@ declare const GapSelectDataSchema: z.ZodObject<{
|
|
|
477
477
|
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
478
478
|
locale: z.ZodOptional<z.ZodString>;
|
|
479
479
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
480
|
-
difficultyLevel: z.ZodOptional<z.ZodLiteral<
|
|
480
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
481
481
|
}, z.core.$loose>;
|
|
482
482
|
|
|
483
483
|
/**
|
|
@@ -771,6 +771,16 @@ declare const gapSelectJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
|
771
771
|
* Zod-only, as they are for the other types.
|
|
772
772
|
*/
|
|
773
773
|
declare const dictationJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
774
|
+
/**
|
|
775
|
+
* JSON Schema (Draft 7) representation of the Read Aloud activity data
|
|
776
|
+
* contract. Structural contract, plus the raw cap JSON Schema can state in code
|
|
777
|
+
* points as zod counts them — `maxLength` 2000 on the reference text — and the
|
|
778
|
+
* canonical locale pattern. The ten semantic guards — the cap after
|
|
779
|
+
* normalisation, a text that survives it, the spaced-script rule, the
|
|
780
|
+
* model-recording rules, unique dimensions, a weight above 0, and the take
|
|
781
|
+
* bounds — are Zod-only, as they are for the other types.
|
|
782
|
+
*/
|
|
783
|
+
declare const readAloudJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
774
784
|
declare const multipleChoiceJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
775
785
|
/**
|
|
776
786
|
* JSON Schema (Draft 7) representation of the Fill-in-the-Blanks activity data
|
|
@@ -1072,8 +1082,8 @@ declare const MultipleChoiceDataSchema: z.ZodObject<{
|
|
|
1072
1082
|
}, z.core.$loose>>;
|
|
1073
1083
|
}, z.core.$loose>>;
|
|
1074
1084
|
scoringStrategy: z.ZodEnum<{
|
|
1075
|
-
partial: "partial";
|
|
1076
1085
|
"all-or-nothing": "all-or-nothing";
|
|
1086
|
+
partial: "partial";
|
|
1077
1087
|
}>;
|
|
1078
1088
|
media: z.ZodOptional<z.ZodObject<{
|
|
1079
1089
|
type: z.ZodEnum<{
|
|
@@ -1113,7 +1123,131 @@ declare const MultipleChoiceDataSchema: z.ZodObject<{
|
|
|
1113
1123
|
shuffle: z.ZodOptional<z.ZodBoolean>;
|
|
1114
1124
|
locale: z.ZodOptional<z.ZodString>;
|
|
1115
1125
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1116
|
-
difficultyLevel: z.ZodOptional<z.ZodLiteral<
|
|
1126
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1127
|
+
}, z.core.$loose>;
|
|
1128
|
+
|
|
1129
|
+
/**
|
|
1130
|
+
* Zod schema for the slower model recording of a read-aloud item.
|
|
1131
|
+
*
|
|
1132
|
+
* STRICT, where every other content schema is loose: these three fields are the
|
|
1133
|
+
* whole contract, so the two keys an author reaches for — a `playback` policy
|
|
1134
|
+
* and a `captionsUrl` — are refused here rather than by guards of their own. The
|
|
1135
|
+
* policy belongs on `media`, which this recording follows; a captions track
|
|
1136
|
+
* belongs on `media` too, where it is allowed, because the text being read is
|
|
1137
|
+
* public and captions of it give nothing away.
|
|
1138
|
+
*/
|
|
1139
|
+
declare const ReadAloudSlowMediaSchema: z.ZodObject<{
|
|
1140
|
+
type: z.ZodLiteral<"audio">;
|
|
1141
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1142
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1143
|
+
}, z.core.$strict>;
|
|
1144
|
+
/**
|
|
1145
|
+
* Zod schema validating the full Read Aloud data contract.
|
|
1146
|
+
*
|
|
1147
|
+
* Ten semantic guards, none expressible in JSON Schema, each an authoring
|
|
1148
|
+
* error that would otherwise reach a learner or a grade:
|
|
1149
|
+
*
|
|
1150
|
+
* 1. **The text is bounded**, before and after normalisation (NFC composition
|
|
1151
|
+
* can lengthen it), because it is tokenised as a dictation transcript is and
|
|
1152
|
+
* the normaliser cuts a longer one without saying so — so a grade would be
|
|
1153
|
+
* computed against words the item had silently lost.
|
|
1154
|
+
* 2. **The text is written in a script that separates its words with spaces.**
|
|
1155
|
+
* The tokeniser splits on spaces alone, so a run of Han, kana, Thai, Lao,
|
|
1156
|
+
* Khmer or Myanmar letters is one word however many it holds, and every
|
|
1157
|
+
* per-word mark for it would be one mark for the whole sentence.
|
|
1158
|
+
* 3. **The model recording is audio.** A read-aloud model is read aloud.
|
|
1159
|
+
* 4. **A slow model recording accompanies a recording** — never a stand-in for
|
|
1160
|
+
* it.
|
|
1161
|
+
* 5. **The slow recording is a different file.**
|
|
1162
|
+
* 6. **A slow recording never sits beside a play budget** — a budget on one
|
|
1163
|
+
* file and a free second file of the same content is no budget.
|
|
1164
|
+
* 7. **No dimension is weighed twice**: two entries for one name hide which
|
|
1165
|
+
* weight the grade used.
|
|
1166
|
+
* 8. **Some dimension carries a weight above 0**, or there is no weighted total
|
|
1167
|
+
* to compute and every take would be unscorable.
|
|
1168
|
+
* 9. **The shortest take is shorter than the longest.**
|
|
1169
|
+
* 10. **Something survives normalisation of the text**: a text of nothing but
|
|
1170
|
+
* punctuation is tokenised into no word at all, so a silent take would
|
|
1171
|
+
* record no omission and a perfect reading would align as one insertion
|
|
1172
|
+
* after another — which is what a feedback component renders.
|
|
1173
|
+
*
|
|
1174
|
+
* The guards run even when an unrelated field was refused, but a guard that
|
|
1175
|
+
* reads a field zod refused waits until that field parses: zod leaves a refused
|
|
1176
|
+
* optional field — a recording, a slow recording — out of the value the guards
|
|
1177
|
+
* read, and a refused required field is kept as it was given, which need not be
|
|
1178
|
+
* of the type the guard expects.
|
|
1179
|
+
*
|
|
1180
|
+
* Guard 4 reports at `media`, where the recording it asks for belongs and where
|
|
1181
|
+
* the dictation schema reports the same rule. Guard 10 is checked beside guards
|
|
1182
|
+
* 1 and 2, which read the same text, and numbered after them so that every
|
|
1183
|
+
* other guard keeps the number it was given.
|
|
1184
|
+
*/
|
|
1185
|
+
declare const ReadAloudDataSchema: z.ZodObject<{
|
|
1186
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
1187
|
+
type: z.ZodLiteral<"read-aloud">;
|
|
1188
|
+
id: z.ZodString;
|
|
1189
|
+
title: z.ZodString;
|
|
1190
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
1191
|
+
referenceText: z.ZodString;
|
|
1192
|
+
locale: z.ZodString;
|
|
1193
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
1194
|
+
type: z.ZodEnum<{
|
|
1195
|
+
image: "image";
|
|
1196
|
+
audio: "audio";
|
|
1197
|
+
video: "video";
|
|
1198
|
+
embed: "embed";
|
|
1199
|
+
}>;
|
|
1200
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1201
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1202
|
+
captionsUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodString]>>;
|
|
1203
|
+
playback: z.ZodOptional<z.ZodObject<{
|
|
1204
|
+
controls: z.ZodOptional<z.ZodEnum<{
|
|
1205
|
+
native: "native";
|
|
1206
|
+
minimal: "minimal";
|
|
1207
|
+
}>>;
|
|
1208
|
+
maxPlays: z.ZodOptional<z.ZodNumber>;
|
|
1209
|
+
seek: z.ZodOptional<z.ZodEnum<{
|
|
1210
|
+
none: "none";
|
|
1211
|
+
allow: "allow";
|
|
1212
|
+
}>>;
|
|
1213
|
+
rate: z.ZodOptional<z.ZodEnum<{
|
|
1214
|
+
allow: "allow";
|
|
1215
|
+
fixed: "fixed";
|
|
1216
|
+
}>>;
|
|
1217
|
+
nativeControlHints: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1218
|
+
"hide-download": "hide-download";
|
|
1219
|
+
"hide-rate": "hide-rate";
|
|
1220
|
+
}>>>;
|
|
1221
|
+
}, z.core.$strict>>;
|
|
1222
|
+
}, z.core.$loose>>;
|
|
1223
|
+
slowMedia: z.ZodOptional<z.ZodObject<{
|
|
1224
|
+
type: z.ZodLiteral<"audio">;
|
|
1225
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1226
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1227
|
+
}, z.core.$strict>>;
|
|
1228
|
+
recording: z.ZodObject<{
|
|
1229
|
+
maxSeconds: z.ZodNumber;
|
|
1230
|
+
minSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1231
|
+
maxTakes: z.ZodOptional<z.ZodNumber>;
|
|
1232
|
+
}, z.core.$loose>;
|
|
1233
|
+
scoring: z.ZodObject<{
|
|
1234
|
+
dimensions: z.ZodArray<z.ZodObject<{
|
|
1235
|
+
name: z.ZodEnum<{
|
|
1236
|
+
accuracy: "accuracy";
|
|
1237
|
+
fluency: "fluency";
|
|
1238
|
+
completeness: "completeness";
|
|
1239
|
+
prosody: "prosody";
|
|
1240
|
+
}>;
|
|
1241
|
+
weight: z.ZodNumber;
|
|
1242
|
+
}, z.core.$loose>>;
|
|
1243
|
+
}, z.core.$loose>;
|
|
1244
|
+
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
1245
|
+
feedback: z.ZodOptional<z.ZodObject<{
|
|
1246
|
+
correct: z.ZodOptional<z.ZodString>;
|
|
1247
|
+
incorrect: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
}, z.core.$loose>>;
|
|
1249
|
+
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1250
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1117
1251
|
}, z.core.$loose>;
|
|
1118
1252
|
|
|
1119
1253
|
/** A redacted Multiple Choice option: id and display text only — no `isCorrect`, no feedback. */
|
|
@@ -1217,7 +1351,7 @@ declare const RedactedMultipleChoiceDataSchema: z.ZodObject<{
|
|
|
1217
1351
|
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
1218
1352
|
locale: z.ZodOptional<z.ZodString>;
|
|
1219
1353
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1220
|
-
difficultyLevel: z.ZodOptional<z.ZodLiteral<
|
|
1354
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1221
1355
|
}, z.core.$strict>;
|
|
1222
1356
|
/** A redacted blank: id and hint only — no accepted answers, no matching rules, no feedback. */
|
|
1223
1357
|
declare const RedactedBlankConfigSchema: z.ZodObject<{
|
|
@@ -1273,7 +1407,7 @@ declare const RedactedFillInTheBlanksDataSchema: z.ZodObject<{
|
|
|
1273
1407
|
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
1274
1408
|
locale: z.ZodOptional<z.ZodString>;
|
|
1275
1409
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1276
|
-
difficultyLevel: z.ZodOptional<z.ZodLiteral<
|
|
1410
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1277
1411
|
}, z.core.$strict>;
|
|
1278
1412
|
/** A redacted choice: exactly what it always was. Which one is correct was never stored here. */
|
|
1279
1413
|
declare const RedactedGapSelectChoiceSchema: z.ZodObject<{
|
|
@@ -1373,7 +1507,7 @@ declare const RedactedGapSelectDataSchema: z.ZodObject<{
|
|
|
1373
1507
|
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
1374
1508
|
locale: z.ZodOptional<z.ZodString>;
|
|
1375
1509
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1376
|
-
difficultyLevel: z.ZodOptional<z.ZodLiteral<
|
|
1510
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1377
1511
|
}, z.core.$strict>;
|
|
1378
1512
|
/**
|
|
1379
1513
|
* Redacted Written Response data: the prompt, word bounds and rubric are
|
|
@@ -1435,7 +1569,7 @@ declare const RedactedWrittenResponseDataSchema: z.ZodObject<{
|
|
|
1435
1569
|
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
1436
1570
|
locale: z.ZodOptional<z.ZodString>;
|
|
1437
1571
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1438
|
-
difficultyLevel: z.ZodOptional<z.ZodLiteral<
|
|
1572
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1439
1573
|
}, z.core.$strict>;
|
|
1440
1574
|
/** A redacted slow recording: unchanged — it is public, and it never carried captions or a policy. */
|
|
1441
1575
|
declare const RedactedDictationSlowMediaSchema: z.ZodObject<{
|
|
@@ -1506,7 +1640,89 @@ declare const RedactedDictationDataSchema: z.ZodObject<{
|
|
|
1506
1640
|
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
1507
1641
|
locale: z.ZodOptional<z.ZodString>;
|
|
1508
1642
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1509
|
-
difficultyLevel: z.ZodOptional<z.ZodLiteral<
|
|
1643
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1644
|
+
}, z.core.$strict>;
|
|
1645
|
+
/**
|
|
1646
|
+
* Redacted Read Aloud data: everything survives, because a read-aloud item has
|
|
1647
|
+
* no answer key — the learner is shown the very text they are asked to read.
|
|
1648
|
+
* What redaction removes is the authored pass/fail feedback, which is written
|
|
1649
|
+
* about a grade that does not exist yet.
|
|
1650
|
+
*
|
|
1651
|
+
* `locale` is REQUIRED here, overriding the optional one on the shared base: it
|
|
1652
|
+
* decides the grade (an assessment made for another locale is unscorable), so a
|
|
1653
|
+
* projection that dropped it would send an exam client an item no assessor could
|
|
1654
|
+
* be asked for. Four rules of the content schema are repeated, because a
|
|
1655
|
+
* projection built by hand never passed through it: the recording is audio, a
|
|
1656
|
+
* slow recording accompanies a recording, is a different file, and never sits
|
|
1657
|
+
* beside a play budget — the last two being how an unbudgeted copy of budgeted
|
|
1658
|
+
* content would reach a learner.
|
|
1659
|
+
*/
|
|
1660
|
+
declare const RedactedReadAloudDataSchema: z.ZodObject<{
|
|
1661
|
+
type: z.ZodLiteral<"read-aloud">;
|
|
1662
|
+
locale: z.ZodString;
|
|
1663
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
1664
|
+
referenceText: z.ZodString;
|
|
1665
|
+
slowMedia: z.ZodOptional<z.ZodObject<{
|
|
1666
|
+
type: z.ZodLiteral<"audio">;
|
|
1667
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1668
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1669
|
+
}, z.core.$strict>>;
|
|
1670
|
+
recording: z.ZodObject<{
|
|
1671
|
+
maxSeconds: z.ZodNumber;
|
|
1672
|
+
minSeconds: z.ZodOptional<z.ZodNumber>;
|
|
1673
|
+
maxTakes: z.ZodOptional<z.ZodNumber>;
|
|
1674
|
+
}, z.core.$strict>;
|
|
1675
|
+
scoring: z.ZodObject<{
|
|
1676
|
+
dimensions: z.ZodArray<z.ZodObject<{
|
|
1677
|
+
name: z.ZodEnum<{
|
|
1678
|
+
accuracy: "accuracy";
|
|
1679
|
+
fluency: "fluency";
|
|
1680
|
+
completeness: "completeness";
|
|
1681
|
+
prosody: "prosody";
|
|
1682
|
+
}>;
|
|
1683
|
+
weight: z.ZodNumber;
|
|
1684
|
+
}, z.core.$strict>>;
|
|
1685
|
+
}, z.core.$strict>;
|
|
1686
|
+
/** Marker distinguishing a redacted projection from full activity data. */
|
|
1687
|
+
redacted: z.ZodLiteral<true>;
|
|
1688
|
+
/** Slot identity, carried through redaction so the client and the plan agree. */
|
|
1689
|
+
slotKey: z.ZodOptional<z.ZodString>;
|
|
1690
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
1691
|
+
id: z.ZodString;
|
|
1692
|
+
title: z.ZodString;
|
|
1693
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
1694
|
+
type: z.ZodEnum<{
|
|
1695
|
+
image: "image";
|
|
1696
|
+
audio: "audio";
|
|
1697
|
+
video: "video";
|
|
1698
|
+
embed: "embed";
|
|
1699
|
+
}>;
|
|
1700
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1701
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1702
|
+
captionsUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodString]>>;
|
|
1703
|
+
playback: z.ZodOptional<z.ZodObject<{
|
|
1704
|
+
controls: z.ZodOptional<z.ZodEnum<{
|
|
1705
|
+
native: "native";
|
|
1706
|
+
minimal: "minimal";
|
|
1707
|
+
}>>;
|
|
1708
|
+
maxPlays: z.ZodOptional<z.ZodNumber>;
|
|
1709
|
+
seek: z.ZodOptional<z.ZodEnum<{
|
|
1710
|
+
none: "none";
|
|
1711
|
+
allow: "allow";
|
|
1712
|
+
}>>;
|
|
1713
|
+
rate: z.ZodOptional<z.ZodEnum<{
|
|
1714
|
+
allow: "allow";
|
|
1715
|
+
fixed: "fixed";
|
|
1716
|
+
}>>;
|
|
1717
|
+
nativeControlHints: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1718
|
+
"hide-download": "hide-download";
|
|
1719
|
+
"hide-rate": "hide-rate";
|
|
1720
|
+
}>>>;
|
|
1721
|
+
}, z.core.$strict>>;
|
|
1722
|
+
}, z.core.$strict>>;
|
|
1723
|
+
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
1724
|
+
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1725
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1510
1726
|
}, z.core.$strict>;
|
|
1511
1727
|
/**
|
|
1512
1728
|
* The learner-safe SHAPE of each built-in type, derived from the strict schema
|
|
@@ -1546,6 +1762,12 @@ type RedactedGapSelectData = z.infer<typeof RedactedGapSelectDataSchema>;
|
|
|
1546
1762
|
type RedactedDictationSlowMedia = z.infer<typeof RedactedDictationSlowMediaSchema>;
|
|
1547
1763
|
/** A Dictation item with its transcript, accepted alternatives and tolerances removed. */
|
|
1548
1764
|
type RedactedDictationData = z.infer<typeof RedactedDictationDataSchema>;
|
|
1765
|
+
/**
|
|
1766
|
+
* A Read Aloud item, which keeps everything but the authored feedback: the text
|
|
1767
|
+
* to read is what the learner is asked to read. The slow recording needs no
|
|
1768
|
+
* redacted counterpart of its own — the content schema for it is already strict.
|
|
1769
|
+
*/
|
|
1770
|
+
type RedactedReadAloudData = z.infer<typeof RedactedReadAloudDataSchema>;
|
|
1549
1771
|
/**
|
|
1550
1772
|
* Discriminated union of every built-in redacted activity. Narrow it on
|
|
1551
1773
|
* `type`, exactly as you would {@link ActivityData}:
|
|
@@ -1558,7 +1780,7 @@ type RedactedDictationData = z.infer<typeof RedactedDictationDataSchema>;
|
|
|
1558
1780
|
* }
|
|
1559
1781
|
* ```
|
|
1560
1782
|
*/
|
|
1561
|
-
type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData | RedactedWrittenResponseData | RedactedGapSelectData | RedactedDictationData;
|
|
1783
|
+
type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData | RedactedWrittenResponseData | RedactedGapSelectData | RedactedDictationData | RedactedReadAloudData;
|
|
1562
1784
|
|
|
1563
1785
|
/** Zod schema for a single rubric criterion. Loose: unknown keys preserved. */
|
|
1564
1786
|
declare const WrittenResponseRubricCriterionSchema: z.ZodObject<{
|
|
@@ -1638,7 +1860,7 @@ declare const WrittenResponseDataSchema: z.ZodObject<{
|
|
|
1638
1860
|
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
1639
1861
|
locale: z.ZodOptional<z.ZodString>;
|
|
1640
1862
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1641
|
-
difficultyLevel: z.ZodOptional<z.ZodLiteral<
|
|
1863
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1642
1864
|
}, z.core.$loose>;
|
|
1643
1865
|
|
|
1644
1866
|
/**
|
|
@@ -1655,4 +1877,4 @@ declare const WrittenResponseDataSchema: z.ZodObject<{
|
|
|
1655
1877
|
*/
|
|
1656
1878
|
declare function validateActivity<T extends ActivityType>(type: T, data: unknown): ValidationResult<ActivityDataMap[T]>;
|
|
1657
1879
|
|
|
1658
|
-
export { type
|
|
1880
|
+
export { type SequenceEntry as $, RedactedGapSelectChoiceSchema as A, BlankConfigSchema as B, type RedactedGapSelectData as C, DictationDataSchema as D, RedactedGapSelectDataSchema as E, FeedbackSchema as F, GapSelectBankSchema as G, type RedactedGapSelectGap as H, type ItemGroup as I, RedactedGapSelectGapSchema as J, RedactedItemGroupSchema as K, RedactedMediaSchema as L, MediaPlaybackSchema as M, NativeControlHintSchema as N, type RedactedMultipleChoiceData as O, RedactedMultipleChoiceDataSchema as P, type RedactedMultipleChoiceOption as Q, ReadAloudDataSchema as R, type RedactedMultipleChoiceOptionMedia as S, RedactedMultipleChoiceOptionMediaSchema as T, RedactedMultipleChoiceOptionSchema as U, type RedactedReadAloudData as V, RedactedReadAloudDataSchema as W, type RedactedStimulus as X, RedactedStimulusSchema as Y, type RedactedWrittenResponseData as Z, RedactedWrittenResponseDataSchema as _, DictationEquivalenceSchema as a, type SequenceSlot as a0, type SequenceSlotGroup as a1, type Stimulus as a2, type StimulusKind as a3, StimulusSchema as a4, TextMatchPolicySchema as a5, WrittenResponseDataSchema as a6, WrittenResponseRubricCriterionSchema as a7, WrittenResponseRubricSchema as a8, dictationJsonSchema as a9, fillInTheBlanksJsonSchema as aa, gapSelectJsonSchema as ab, itemGroupJsonSchema as ac, jsonSchemaFor as ad, multipleChoiceJsonSchema as ae, readAloudJsonSchema as af, stimulusJsonSchema as ag, validateActivity as ah, validateItemGroup as ai, writtenResponseJsonSchema as aj, DictationSlowMediaSchema as b, DictationToleranceSchema as c, FillInTheBlanksDataSchema as d, GapSelectChoiceSchema as e, GapSelectDataSchema as f, GapSelectGapSchema as g, ItemGroupSchema as h, MediaSchema as i, MediaUrlSchema as j, MultipleChoiceDataSchema as k, MultipleChoiceOptionMediaSchema as l, MultipleChoiceOptionSchema as m, ReadAloudSlowMediaSchema as n, type RedactedActivity as o, type RedactedBlankConfig as p, RedactedBlankConfigSchema as q, type RedactedDictationData as r, RedactedDictationDataSchema as s, type RedactedDictationSlowMedia as t, RedactedDictationSlowMediaSchema as u, type RedactedFillInTheBlanksData as v, RedactedFillInTheBlanksDataSchema as w, type RedactedGapSelectBank as x, RedactedGapSelectBankSchema as y, type RedactedGapSelectChoice as z };
|