@intellectif/lk-core 1.1.0 → 1.3.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 +30 -0
- package/README.md +4 -3
- package/dist/ai-B222dtHH.d.cts +2154 -0
- package/dist/ai-B222dtHH.d.cts.map +1 -0
- package/dist/ai-B222dtHH.d.ts +2154 -0
- package/dist/ai-B222dtHH.d.ts.map +1 -0
- package/dist/ai-check.cjs +758 -464
- package/dist/ai-check.cjs.map +1 -1
- package/dist/ai-check.d.cts +82 -68
- package/dist/ai-check.d.cts.map +1 -0
- package/dist/ai-check.d.ts +82 -68
- package/dist/ai-check.d.ts.map +1 -0
- package/dist/ai-check.js +756 -465
- package/dist/ai-check.js.map +1 -1
- package/dist/ai-writing-CCBjTOM3.js +2496 -0
- package/dist/ai-writing-CCBjTOM3.js.map +1 -0
- package/dist/ai-writing-DCVkv4Zj.cjs +2735 -0
- package/dist/ai-writing-DCVkv4Zj.cjs.map +1 -0
- package/dist/{index-DlcqkM_L.d.ts → index-BWPRPIXL.d.ts} +263 -258
- package/dist/index-BWPRPIXL.d.ts.map +1 -0
- package/dist/index-CXyOV8sm.d.cts +153 -0
- package/dist/index-CXyOV8sm.d.cts.map +1 -0
- package/dist/index-CegM8o15.d.ts +153 -0
- package/dist/index-CegM8o15.d.ts.map +1 -0
- package/dist/index-Dyu66R4-.d.cts +1071 -0
- package/dist/index-Dyu66R4-.d.cts.map +1 -0
- package/dist/{index-DlCW0XaQ.d.cts → index-O4_ExlAD.d.cts} +263 -258
- package/dist/index-O4_ExlAD.d.cts.map +1 -0
- package/dist/index-UGxRSopE.d.ts +1071 -0
- package/dist/index-UGxRSopE.d.ts.map +1 -0
- package/dist/index.cjs +1210 -1671
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1090 -853
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +1090 -853
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1063 -1672
- package/dist/index.js.map +1 -1
- package/dist/item-group-DXiR8nOr.js +445 -0
- package/dist/item-group-DXiR8nOr.js.map +1 -0
- package/dist/item-group-DroFXgLb.cjs +505 -0
- package/dist/item-group-DroFXgLb.cjs.map +1 -0
- package/dist/registry-DVi0LR_i.cjs +5915 -0
- package/dist/registry-DVi0LR_i.cjs.map +1 -0
- package/dist/registry-Dsx9mNsS.js +5449 -0
- package/dist/registry-Dsx9mNsS.js.map +1 -0
- package/dist/schemas-Bdw0nGPo.js +152 -0
- package/dist/schemas-Bdw0nGPo.js.map +1 -0
- package/dist/schemas-DVbAOrtd.cjs +224 -0
- package/dist/schemas-DVbAOrtd.cjs.map +1 -0
- package/dist/schemas.cjs +16 -32
- package/dist/schemas.d.cts +2 -2
- package/dist/schemas.d.ts +2 -2
- package/dist/schemas.js +3 -32
- package/dist/scoring-B2_HEhMT.cjs +1748 -0
- package/dist/scoring-B2_HEhMT.cjs.map +1 -0
- package/dist/scoring-BZqUkuDF.js +1604 -0
- package/dist/scoring-BZqUkuDF.js.map +1 -0
- package/dist/scoring.cjs +37 -75
- package/dist/scoring.d.cts +3 -1103
- package/dist/scoring.d.ts +3 -1103
- package/dist/scoring.js +3 -75
- package/dist/xapi-CMTph7wG.js +332 -0
- package/dist/xapi-CMTph7wG.js.map +1 -0
- package/dist/xapi-DNzkSJ0S.cjs +362 -0
- package/dist/xapi-DNzkSJ0S.cjs.map +1 -0
- package/dist/xapi.cjs +7 -16
- package/dist/xapi.d.cts +2 -150
- package/dist/xapi.d.ts +2 -150
- package/dist/xapi.js +2 -16
- package/package.json +4 -4
- package/dist/activity-MBOYLBjR.d.cts +0 -1840
- package/dist/activity-MBOYLBjR.d.ts +0 -1840
- package/dist/chunk-2JT2WUQ2.cjs +0 -458
- package/dist/chunk-2JT2WUQ2.cjs.map +0 -1
- package/dist/chunk-DSDXL3JO.cjs +0 -4597
- package/dist/chunk-DSDXL3JO.cjs.map +0 -1
- package/dist/chunk-FBKTION6.js +0 -4597
- package/dist/chunk-FBKTION6.js.map +0 -1
- package/dist/chunk-IARLJ5MW.js +0 -1256
- package/dist/chunk-IARLJ5MW.js.map +0 -1
- package/dist/chunk-LDFQUZII.cjs +0 -950
- package/dist/chunk-LDFQUZII.cjs.map +0 -1
- package/dist/chunk-NQHETFDA.js +0 -950
- package/dist/chunk-NQHETFDA.js.map +0 -1
- package/dist/chunk-SJVRUPJT.js +0 -272
- package/dist/chunk-SJVRUPJT.js.map +0 -1
- package/dist/chunk-TJJFKKH2.cjs +0 -272
- package/dist/chunk-TJJFKKH2.cjs.map +0 -1
- package/dist/chunk-VSH7ECQL.cjs +0 -1256
- package/dist/chunk-VSH7ECQL.cjs.map +0 -1
- package/dist/chunk-XS6U2ARZ.js +0 -458
- package/dist/chunk-XS6U2ARZ.js.map +0 -1
- package/dist/schemas.cjs.map +0 -1
- package/dist/schemas.js.map +0 -1
- package/dist/scoring.cjs.map +0 -1
- package/dist/scoring.js.map +0 -1
- package/dist/xapi.cjs.map +0 -1
- package/dist/xapi.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Rt as MultipleChoiceOptionMedia, Zt as ValidationResult, ct as ActivityDataMap, ft as ActivityType, st as ActivityData, ut as ActivityMedia } from "./ai-B222dtHH.cjs";
|
|
2
|
+
//#region src/types/item-group.d.ts
|
|
3
3
|
/** What a stimulus primarily is. Drives validation and layout, never scoring. */
|
|
4
4
|
type StimulusKind = 'text' | 'audio' | 'video' | 'image' | 'mixed';
|
|
5
5
|
/**
|
|
@@ -13,31 +13,31 @@ type StimulusKind = 'text' | 'audio' | 'video' | 'image' | 'mixed';
|
|
|
13
13
|
* `redactItemGroup` removes.
|
|
14
14
|
*/
|
|
15
15
|
interface Stimulus {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
16
|
+
id: string;
|
|
17
|
+
kind: StimulusKind;
|
|
18
|
+
/** Optional heading (a passage title). */
|
|
19
|
+
title?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Plain-text body: the passage itself, or short instructions above media.
|
|
22
|
+
* Required for `text` and `mixed`.
|
|
23
|
+
*/
|
|
24
|
+
body?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Optional sanitised rich-HTML sidecar of `body`. Requires `body`, which is
|
|
27
|
+
* the accessible fallback rendered when no sanitiser is supplied.
|
|
28
|
+
*/
|
|
29
|
+
bodyHtml?: string;
|
|
30
|
+
/** The recording, video or image. Required for `audio`, `video`, `image` and `mixed`. */
|
|
31
|
+
media?: ActivityMedia;
|
|
32
|
+
/**
|
|
33
|
+
* Author-only transcript of `media` — for item generation and grading,
|
|
34
|
+
* never shown to the learner. Removed by `redactItemGroup`.
|
|
35
|
+
*/
|
|
36
|
+
transcript?: string;
|
|
37
|
+
/** BCP 47 language tag of the material, when it differs from the items'. */
|
|
38
|
+
locale?: string;
|
|
39
|
+
/** Source credit, shown to the learner after the material. */
|
|
40
|
+
attribution?: string;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* A quiz inside an interactive video: one moment of the video, and the
|
|
@@ -45,33 +45,33 @@ interface Stimulus {
|
|
|
45
45
|
* questions are shown one at a time, in `itemIds` order.
|
|
46
46
|
*/
|
|
47
47
|
interface TimelineCue {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
48
|
+
/** Unique within the timeline. Names the quiz in events, the contents panel and drafts. */
|
|
49
|
+
id: string;
|
|
50
|
+
/**
|
|
51
|
+
* Seconds from the start of the video: finite and 0 or more. The SDK never
|
|
52
|
+
* reads the video, so it cannot check this against the duration: a quiz at
|
|
53
|
+
* or past the end opens when the video ends.
|
|
54
|
+
*/
|
|
55
|
+
at: number;
|
|
56
|
+
/**
|
|
57
|
+
* `id`s of items in this group, in the order the quiz shows them. Non-empty.
|
|
58
|
+
* Every item of the group belongs to exactly one quiz.
|
|
59
|
+
*/
|
|
60
|
+
itemIds: string[];
|
|
61
|
+
/** Optional heading shown above the questions. At most 120 characters. */
|
|
62
|
+
title?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Every question must be answered (practice) or submitted (exam) before
|
|
65
|
+
* playback may pass `at`. Default false.
|
|
66
|
+
*/
|
|
67
|
+
required?: boolean;
|
|
68
68
|
}
|
|
69
69
|
/** A titled section of the video. */
|
|
70
70
|
interface TimelineChapter {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
/** Seconds from the start: finite, 0 or more, strictly increasing across the list. */
|
|
72
|
+
at: number;
|
|
73
|
+
/** Non-empty after trimming; at most 120 characters. */
|
|
74
|
+
title: string;
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
77
|
* The arrangement that turns an item group with a video stimulus into an
|
|
@@ -82,14 +82,14 @@ interface TimelineChapter {
|
|
|
82
82
|
* how THESE questions are arranged over the material, not the material itself.
|
|
83
83
|
*/
|
|
84
84
|
interface MediaTimeline {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
cues: TimelineCue[];
|
|
86
|
+
chapters?: TimelineChapter[];
|
|
87
|
+
/**
|
|
88
|
+
* `free` (default): seek anywhere. `no-skip-ahead`: rewind freely, never past
|
|
89
|
+
* the furthest point reached. Either way, playback never passes a `required`
|
|
90
|
+
* quiz that is not finished.
|
|
91
|
+
*/
|
|
92
|
+
navigation?: 'free' | 'no-skip-ahead';
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
95
|
* Where a learner stands in an interactive video, stored by the host so the
|
|
@@ -98,14 +98,14 @@ interface MediaTimeline {
|
|
|
98
98
|
* `readMediaProgress`, never directly.
|
|
99
99
|
*/
|
|
100
100
|
interface MediaProgress {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
101
|
+
progressVersion: '1.0';
|
|
102
|
+
/** Seconds: where playback last stood. */
|
|
103
|
+
at: number;
|
|
104
|
+
/**
|
|
105
|
+
* Seconds: the furthest point reached. Decides how far `no-skip-ahead` lets
|
|
106
|
+
* the learner seek, and how much of the transcript it shows.
|
|
107
|
+
*/
|
|
108
|
+
furthest: number;
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
111
|
* One stimulus serving several items. Two rules, both taken from observed
|
|
@@ -119,44 +119,44 @@ interface MediaProgress {
|
|
|
119
119
|
* without a cast at every boundary.
|
|
120
120
|
*/
|
|
121
121
|
interface ItemGroup<TItem = ActivityData> {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
122
|
+
schemaVersion: '1.0';
|
|
123
|
+
type: 'item-group';
|
|
124
|
+
id: string;
|
|
125
|
+
title?: string;
|
|
126
|
+
/**
|
|
127
|
+
* Stable identity for this entry's slots, independent of where it sits in
|
|
128
|
+
* the array. See {@link SequenceSlot.slotId}: without one, inserting a
|
|
129
|
+
* question above this group re-maps every slot id beneath it, and stored
|
|
130
|
+
* grades quietly start naming different questions.
|
|
131
|
+
*/
|
|
132
|
+
slotKey?: string;
|
|
133
|
+
stimulus: Stimulus;
|
|
134
|
+
/**
|
|
135
|
+
* The items, in authored order. Non-empty; ids unique within the group; no
|
|
136
|
+
* nested groups.
|
|
137
|
+
*
|
|
138
|
+
* An item may declare its own `slotKey`, for the same reason an entry can:
|
|
139
|
+
* it pins the item's identity within the group (`"reading.q1"` rather than
|
|
140
|
+
* `"reading.0"`), so inserting a question into a published group does not
|
|
141
|
+
* re-map the ones after it.
|
|
142
|
+
*/
|
|
143
|
+
items: (TItem & {
|
|
132
144
|
slotKey?: string;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
* among themselves under the sequence seed. Either way the group stays one
|
|
149
|
-
* contiguous block.
|
|
150
|
-
*/
|
|
151
|
-
shuffle?: 'none' | 'within-group';
|
|
152
|
-
/**
|
|
153
|
-
* Makes the group an interactive video: the stimulus must be a video, every
|
|
154
|
-
* item must be one of `INTERACTIVE_VIDEO_ITEM_TYPES`, and every item belongs
|
|
155
|
-
* to exactly one quiz. Items are then presented in quiz order, never
|
|
156
|
-
* shuffled. An older lk-core that does not know this field presents the same
|
|
157
|
-
* items as an ordinary video testlet, with the same slots and grades.
|
|
158
|
-
*/
|
|
159
|
-
timeline?: MediaTimeline;
|
|
145
|
+
})[];
|
|
146
|
+
/**
|
|
147
|
+
* `none` (default) keeps authored order; `within-group` shuffles the items
|
|
148
|
+
* among themselves under the sequence seed. Either way the group stays one
|
|
149
|
+
* contiguous block.
|
|
150
|
+
*/
|
|
151
|
+
shuffle?: 'none' | 'within-group';
|
|
152
|
+
/**
|
|
153
|
+
* Makes the group an interactive video: the stimulus must be a video, every
|
|
154
|
+
* item must be one of `INTERACTIVE_VIDEO_ITEM_TYPES`, and every item belongs
|
|
155
|
+
* to exactly one quiz. Items are then presented in quiz order, never
|
|
156
|
+
* shuffled. An older lk-core that does not know this field presents the same
|
|
157
|
+
* items as an ordinary video testlet, with the same slots and grades.
|
|
158
|
+
*/
|
|
159
|
+
timeline?: MediaTimeline;
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
162
|
* What a sequence is made of: loose activities and item groups, in authored
|
|
@@ -170,49 +170,50 @@ interface ItemGroup<TItem = ActivityData> {
|
|
|
170
170
|
* assembly. See {@link SequenceSlot.slotId}.
|
|
171
171
|
*/
|
|
172
172
|
type SequenceEntry<TItem = ActivityData> = (TItem & {
|
|
173
|
-
|
|
173
|
+
slotKey?: string;
|
|
174
174
|
}) | ItemGroup<TItem>;
|
|
175
175
|
/** The group a presented slot belongs to. */
|
|
176
176
|
interface SequenceSlotGroup {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
177
|
+
id: string;
|
|
178
|
+
title?: string;
|
|
179
|
+
stimulus: Stimulus;
|
|
180
|
+
/** 0-based position of this slot within the group's PRESENTED order. */
|
|
181
|
+
position: number;
|
|
182
|
+
/** Number of slots in the group. */
|
|
183
|
+
size: number;
|
|
184
|
+
/** The group's timeline, when the group is an interactive video. */
|
|
185
|
+
timeline?: MediaTimeline;
|
|
186
|
+
/** The quiz this slot's item sits in, when the group is an interactive video. */
|
|
187
|
+
cue?: TimelineCue;
|
|
188
188
|
}
|
|
189
189
|
/** One presented position in a flattened sequence. */
|
|
190
190
|
interface SequenceSlot<TItem = ActivityData> {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Identity of the slot within the sequence definition — unique, and stable
|
|
193
|
+
* under shuffling. Feed it to `composeAssessmentScore` as `slotId`.
|
|
194
|
+
*
|
|
195
|
+
* By default it is derived from the AUTHORED position (`"2"` for the third
|
|
196
|
+
* top-level entry; `"2.1"` for the second item of that entry when it is a
|
|
197
|
+
* group), so the same activity can appear in two entries and still be two
|
|
198
|
+
* slots.
|
|
199
|
+
*
|
|
200
|
+
* **A positional id is only valid against one version of the entries
|
|
201
|
+
* array.** Insert a question at the top of a published paper and every id
|
|
202
|
+
* below it shifts: rows stored as `"3"` now name what used to be entry 2,
|
|
203
|
+
* and a re-grade or a review render pairs each response with the wrong
|
|
204
|
+
* question — silently, because the ids still look valid. For any content
|
|
205
|
+
* whose slot ids you persist, give the entries an explicit `slotKey`; it is
|
|
206
|
+
* used verbatim here and survives insertion, deletion and re-ordering.
|
|
207
|
+
*/
|
|
208
|
+
slotId: string;
|
|
209
|
+
/** 0-based PRESENTED position, after shuffling. */
|
|
210
|
+
index: number;
|
|
211
|
+
activity: TItem;
|
|
212
|
+
/** Present when the slot comes from an item group. */
|
|
213
|
+
group?: SequenceSlotGroup;
|
|
214
214
|
}
|
|
215
|
-
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/types/redacted.d.ts
|
|
216
217
|
/**
|
|
217
218
|
* The learner-safe SHAPE of each built-in type.
|
|
218
219
|
*
|
|
@@ -233,143 +234,143 @@ interface SequenceSlot<TItem = ActivityData> {
|
|
|
233
234
|
*/
|
|
234
235
|
/** A caption or subtitle track, unchanged by redaction. */
|
|
235
236
|
interface Track {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
237
|
+
kind: 'captions' | 'subtitles';
|
|
238
|
+
src: string;
|
|
239
|
+
srclang: string;
|
|
240
|
+
label: string;
|
|
241
|
+
default?: boolean | undefined;
|
|
241
242
|
}
|
|
242
243
|
/** A recording's playback policy, unchanged by redaction. */
|
|
243
244
|
interface Playback {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
245
|
+
controls?: 'native' | 'minimal' | undefined;
|
|
246
|
+
maxPlays?: number | undefined;
|
|
247
|
+
seek?: 'allow' | 'none' | undefined;
|
|
248
|
+
rate?: 'allow' | 'fixed' | undefined;
|
|
249
|
+
nativeControlHints?: ('hide-download' | 'hide-rate')[] | undefined;
|
|
249
250
|
}
|
|
250
251
|
/** An item's or a stimulus's media, unchanged by redaction. */
|
|
251
252
|
interface Media {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
253
|
+
type: 'image' | 'audio' | 'video' | 'embed';
|
|
254
|
+
url: string;
|
|
255
|
+
alt?: string | undefined;
|
|
256
|
+
captionsUrl?: string | undefined;
|
|
257
|
+
tracks?: Track[] | undefined;
|
|
258
|
+
poster?: string | undefined;
|
|
259
|
+
playback?: Playback | undefined;
|
|
259
260
|
}
|
|
260
261
|
/** The author's switches for AI help, unchanged by redaction. */
|
|
261
262
|
interface AiSwitches {
|
|
262
|
-
|
|
263
|
-
|
|
263
|
+
explanations?: boolean | undefined;
|
|
264
|
+
hints?: boolean | undefined;
|
|
264
265
|
}
|
|
265
266
|
/** What every redacted item carries, whatever its type. */
|
|
266
267
|
interface RedactedItem {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
268
|
+
redacted: true;
|
|
269
|
+
schemaVersion: '1.0';
|
|
270
|
+
id: string;
|
|
271
|
+
title: string;
|
|
272
|
+
slotKey?: string | undefined;
|
|
273
|
+
media?: Media | undefined;
|
|
274
|
+
passThreshold?: number | undefined;
|
|
275
|
+
learningObjectives?: string[] | undefined;
|
|
276
|
+
difficultyLevel?: 1 | 2 | 3 | 4 | 5 | undefined;
|
|
277
|
+
ai?: AiSwitches | undefined;
|
|
277
278
|
}
|
|
278
279
|
/** An option's picture or recording, unchanged by redaction — it is what the learner picks. */
|
|
279
280
|
interface RedactedMultipleChoiceOptionMedia {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
281
|
+
type: 'image' | 'audio';
|
|
282
|
+
url: string;
|
|
283
|
+
alt?: string | undefined;
|
|
284
|
+
captionsUrl?: string | undefined;
|
|
284
285
|
}
|
|
285
286
|
/** An option with `isCorrect` and its feedback removed. */
|
|
286
287
|
interface RedactedMultipleChoiceOption {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
288
|
+
id: string;
|
|
289
|
+
text: string;
|
|
290
|
+
media?: RedactedMultipleChoiceOptionMedia | undefined;
|
|
290
291
|
}
|
|
291
292
|
/** A Multiple Choice item with the answer key, feedback and strategy removed. */
|
|
292
293
|
interface RedactedMultipleChoiceData extends RedactedItem {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
294
|
+
type: 'multiple-choice';
|
|
295
|
+
question: string;
|
|
296
|
+
questionHtml?: string | undefined;
|
|
297
|
+
mode: 'single' | 'multi';
|
|
298
|
+
options: RedactedMultipleChoiceOption[];
|
|
299
|
+
shuffle?: boolean | undefined;
|
|
300
|
+
locale?: string | undefined;
|
|
300
301
|
}
|
|
301
302
|
/** A blank with its accepted answers and matching rules removed; the hint survives. */
|
|
302
303
|
interface RedactedBlankConfig {
|
|
303
|
-
|
|
304
|
-
|
|
304
|
+
id: string;
|
|
305
|
+
hint?: string | undefined;
|
|
305
306
|
}
|
|
306
307
|
/** A Fill-in-the-Blanks item with every accepted answer removed. */
|
|
307
308
|
interface RedactedFillInTheBlanksData extends RedactedItem {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
309
|
+
type: 'fill-in-the-blanks';
|
|
310
|
+
passage: string;
|
|
311
|
+
passageHtml?: string | undefined;
|
|
312
|
+
blanks: RedactedBlankConfig[];
|
|
313
|
+
locale?: string | undefined;
|
|
313
314
|
}
|
|
314
315
|
/** A Written Response item; the rubric survives, because it tells the learner what is assessed. */
|
|
315
316
|
interface RedactedWrittenResponseData extends RedactedItem {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
317
|
+
type: 'written-response';
|
|
318
|
+
prompt: string;
|
|
319
|
+
promptHtml?: string | undefined;
|
|
320
|
+
minWords: number;
|
|
321
|
+
maxWords: number;
|
|
322
|
+
rubric?: {
|
|
323
|
+
criteria: {
|
|
324
|
+
name: string;
|
|
325
|
+
weight: number;
|
|
326
|
+
description?: string | undefined;
|
|
327
|
+
}[];
|
|
328
|
+
label?: string | undefined;
|
|
329
|
+
} | undefined;
|
|
330
|
+
languageTarget?: string | undefined;
|
|
331
|
+
locale?: string | undefined;
|
|
331
332
|
}
|
|
332
333
|
/** A selectable choice, unchanged by redaction. */
|
|
333
334
|
interface RedactedGapSelectChoice {
|
|
334
|
-
|
|
335
|
-
|
|
335
|
+
id: string;
|
|
336
|
+
text: string;
|
|
336
337
|
}
|
|
337
338
|
/** A word bank, unchanged by redaction — the learner picks from it. */
|
|
338
339
|
interface RedactedGapSelectBank {
|
|
339
|
-
|
|
340
|
-
|
|
340
|
+
id: string;
|
|
341
|
+
choices: RedactedGapSelectChoice[];
|
|
341
342
|
}
|
|
342
343
|
/** A gap with its `correctChoiceId` removed; every choice it offers survives. */
|
|
343
344
|
interface RedactedGapSelectGap {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
id: string;
|
|
346
|
+
choices?: RedactedGapSelectChoice[] | undefined;
|
|
347
|
+
bankId?: string | undefined;
|
|
347
348
|
}
|
|
348
349
|
/** A Gap Select item the learner can still answer: choices intact, answer key gone. */
|
|
349
350
|
interface RedactedGapSelectData extends RedactedItem {
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
351
|
+
type: 'gap-select';
|
|
352
|
+
passage: string;
|
|
353
|
+
passageHtml?: string | undefined;
|
|
354
|
+
gaps: RedactedGapSelectGap[];
|
|
355
|
+
banks?: RedactedGapSelectBank[] | undefined;
|
|
356
|
+
presentation?: 'dropdown' | undefined;
|
|
357
|
+
shuffleChoices?: boolean | undefined;
|
|
358
|
+
locale?: string | undefined;
|
|
358
359
|
}
|
|
359
360
|
/** The slower recording of a dictation, unchanged by redaction. */
|
|
360
361
|
interface RedactedDictationSlowMedia {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
362
|
+
type: 'audio';
|
|
363
|
+
url: string;
|
|
364
|
+
alt?: string | undefined;
|
|
364
365
|
}
|
|
365
366
|
/** A Dictation item with its transcript, accepted alternatives and tolerances removed. */
|
|
366
367
|
interface RedactedDictationData extends RedactedItem {
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
368
|
+
type: 'dictation';
|
|
369
|
+
slowMedia?: RedactedDictationSlowMedia | undefined;
|
|
370
|
+
hints?: {
|
|
371
|
+
mode: 'progressive-words';
|
|
372
|
+
} | undefined;
|
|
373
|
+
locale?: string | undefined;
|
|
373
374
|
}
|
|
374
375
|
/**
|
|
375
376
|
* A Read Aloud item, which keeps everything but the authored feedback: the text
|
|
@@ -377,33 +378,33 @@ interface RedactedDictationData extends RedactedItem {
|
|
|
377
378
|
* redacted counterpart of its own — the content schema for it is already strict.
|
|
378
379
|
*/
|
|
379
380
|
interface RedactedReadAloudData extends RedactedItem {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
381
|
+
type: 'read-aloud';
|
|
382
|
+
instructions?: string | undefined;
|
|
383
|
+
referenceText: string;
|
|
384
|
+
locale: string;
|
|
385
|
+
slowMedia?: RedactedDictationSlowMedia | undefined;
|
|
386
|
+
recording: {
|
|
387
|
+
maxSeconds: number;
|
|
388
|
+
minSeconds?: number | undefined;
|
|
389
|
+
maxTakes?: number | undefined;
|
|
390
|
+
};
|
|
391
|
+
scoring: {
|
|
392
|
+
dimensions: {
|
|
393
|
+
name: 'accuracy' | 'fluency' | 'completeness' | 'prosody';
|
|
394
|
+
weight: number;
|
|
395
|
+
}[];
|
|
396
|
+
};
|
|
396
397
|
}
|
|
397
398
|
/** A stimulus as a learner receives it: everything but the author-only `transcript`. */
|
|
398
399
|
interface RedactedStimulus {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
400
|
+
id: string;
|
|
401
|
+
kind: 'text' | 'image' | 'audio' | 'video' | 'mixed';
|
|
402
|
+
title?: string | undefined;
|
|
403
|
+
body?: string | undefined;
|
|
404
|
+
bodyHtml?: string | undefined;
|
|
405
|
+
media?: Media | undefined;
|
|
406
|
+
locale?: string | undefined;
|
|
407
|
+
attribution?: string | undefined;
|
|
407
408
|
}
|
|
408
409
|
/**
|
|
409
410
|
* Discriminated union of every built-in redacted activity. Narrow it on
|
|
@@ -418,7 +419,8 @@ interface RedactedStimulus {
|
|
|
418
419
|
* ```
|
|
419
420
|
*/
|
|
420
421
|
type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData | RedactedWrittenResponseData | RedactedGapSelectData | RedactedDictationData | RedactedReadAloudData;
|
|
421
|
-
|
|
422
|
+
//#endregion
|
|
423
|
+
//#region src/schemas/item-group.d.ts
|
|
422
424
|
/**
|
|
423
425
|
* Validates an item group in full: the container and stimulus against
|
|
424
426
|
* {@link ItemGroupSchema}, then every item against the schema registered for
|
|
@@ -430,7 +432,8 @@ type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData
|
|
|
430
432
|
* not the first one that happened to throw.
|
|
431
433
|
*/
|
|
432
434
|
declare function validateItemGroup(data: unknown): ValidationResult<ItemGroup>;
|
|
433
|
-
|
|
435
|
+
//#endregion
|
|
436
|
+
//#region src/schemas/json-schema.d.ts
|
|
434
437
|
/**
|
|
435
438
|
* JSON Schema (Draft 7) for a `Stimulus`. Structural contract only — the
|
|
436
439
|
* kind/media/body consistency guards are Zod-only.
|
|
@@ -511,7 +514,8 @@ declare const writtenResponseJsonSchema: Record<string, unknown>;
|
|
|
511
514
|
* that can produce one.
|
|
512
515
|
*/
|
|
513
516
|
declare function jsonSchemaFor(type: string): Record<string, unknown>;
|
|
514
|
-
|
|
517
|
+
//#endregion
|
|
518
|
+
//#region src/schemas/index.d.ts
|
|
515
519
|
/**
|
|
516
520
|
* Checks a piece of activity media — an item's `media`, a stimulus's, a
|
|
517
521
|
* dictation's `slowMedia` — on its own, the way `validateActivity` checks it
|
|
@@ -544,5 +548,6 @@ declare function validateOptionMedia(value: unknown): ValidationResult<MultipleC
|
|
|
544
548
|
* @throws UnknownActivityTypeError when `type` has no registered descriptor.
|
|
545
549
|
*/
|
|
546
550
|
declare function validateActivity<T extends ActivityType>(type: T, data: unknown): ValidationResult<ActivityDataMap[T]>;
|
|
547
|
-
|
|
548
|
-
export {
|
|
551
|
+
//#endregion
|
|
552
|
+
export { MediaProgress as A, RedactedMultipleChoiceData as C, RedactedStimulus as D, RedactedReadAloudData as E, Stimulus as F, StimulusKind as I, TimelineChapter as L, SequenceEntry as M, SequenceSlot as N, RedactedWrittenResponseData as O, SequenceSlotGroup as P, TimelineCue as R, RedactedGapSelectGap as S, RedactedMultipleChoiceOptionMedia as T, RedactedDictationSlowMedia as _, fillInTheBlanksJsonSchema as a, RedactedGapSelectChoice as b, jsonSchemaFor as c, stimulusJsonSchema as d, writtenResponseJsonSchema as f, RedactedDictationData as g, RedactedBlankConfig as h, dictationJsonSchema as i, MediaTimeline as j, ItemGroup as k, multipleChoiceJsonSchema as l, RedactedActivity as m, validateMedia as n, gapSelectJsonSchema as o, validateItemGroup as p, validateOptionMedia as r, itemGroupJsonSchema as s, validateActivity as t, readAloudJsonSchema as u, RedactedFillInTheBlanksData as v, RedactedMultipleChoiceOption as w, RedactedGapSelectData as x, RedactedGapSelectBank as y };
|
|
553
|
+
//# sourceMappingURL=index-O4_ExlAD.d.cts.map
|