@intellectif/lk-core 1.2.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.
Files changed (103) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +2 -2
  3. package/dist/ai-B222dtHH.d.cts +2154 -0
  4. package/dist/ai-B222dtHH.d.cts.map +1 -0
  5. package/dist/ai-B222dtHH.d.ts +2154 -0
  6. package/dist/ai-B222dtHH.d.ts.map +1 -0
  7. package/dist/ai-check.cjs +749 -617
  8. package/dist/ai-check.cjs.map +1 -1
  9. package/dist/ai-check.d.cts +82 -80
  10. package/dist/ai-check.d.cts.map +1 -0
  11. package/dist/ai-check.d.ts +82 -80
  12. package/dist/ai-check.d.ts.map +1 -0
  13. package/dist/ai-check.js +747 -618
  14. package/dist/ai-check.js.map +1 -1
  15. package/dist/ai-writing-CCBjTOM3.js +2496 -0
  16. package/dist/ai-writing-CCBjTOM3.js.map +1 -0
  17. package/dist/ai-writing-DCVkv4Zj.cjs +2735 -0
  18. package/dist/ai-writing-DCVkv4Zj.cjs.map +1 -0
  19. package/dist/{index-BChYtrEe.d.ts → index-BWPRPIXL.d.ts} +263 -258
  20. package/dist/index-BWPRPIXL.d.ts.map +1 -0
  21. package/dist/index-CXyOV8sm.d.cts +153 -0
  22. package/dist/index-CXyOV8sm.d.cts.map +1 -0
  23. package/dist/index-CegM8o15.d.ts +153 -0
  24. package/dist/index-CegM8o15.d.ts.map +1 -0
  25. package/dist/index-Dyu66R4-.d.cts +1071 -0
  26. package/dist/index-Dyu66R4-.d.cts.map +1 -0
  27. package/dist/{index-VXt_v3YI.d.cts → index-O4_ExlAD.d.cts} +263 -258
  28. package/dist/index-O4_ExlAD.d.cts.map +1 -0
  29. package/dist/index-UGxRSopE.d.ts +1071 -0
  30. package/dist/index-UGxRSopE.d.ts.map +1 -0
  31. package/dist/index.cjs +1210 -1146
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +909 -857
  34. package/dist/index.d.cts.map +1 -0
  35. package/dist/index.d.ts +909 -857
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +1063 -1147
  38. package/dist/index.js.map +1 -1
  39. package/dist/item-group-DXiR8nOr.js +445 -0
  40. package/dist/item-group-DXiR8nOr.js.map +1 -0
  41. package/dist/item-group-DroFXgLb.cjs +505 -0
  42. package/dist/item-group-DroFXgLb.cjs.map +1 -0
  43. package/dist/registry-DVi0LR_i.cjs +5915 -0
  44. package/dist/registry-DVi0LR_i.cjs.map +1 -0
  45. package/dist/registry-Dsx9mNsS.js +5449 -0
  46. package/dist/registry-Dsx9mNsS.js.map +1 -0
  47. package/dist/schemas-Bdw0nGPo.js +152 -0
  48. package/dist/schemas-Bdw0nGPo.js.map +1 -0
  49. package/dist/schemas-DVbAOrtd.cjs +224 -0
  50. package/dist/schemas-DVbAOrtd.cjs.map +1 -0
  51. package/dist/schemas.cjs +16 -34
  52. package/dist/schemas.d.cts +2 -2
  53. package/dist/schemas.d.ts +2 -2
  54. package/dist/schemas.js +3 -34
  55. package/dist/scoring-B2_HEhMT.cjs +1748 -0
  56. package/dist/scoring-B2_HEhMT.cjs.map +1 -0
  57. package/dist/scoring-BZqUkuDF.js +1604 -0
  58. package/dist/scoring-BZqUkuDF.js.map +1 -0
  59. package/dist/scoring.cjs +37 -75
  60. package/dist/scoring.d.cts +3 -1103
  61. package/dist/scoring.d.ts +3 -1103
  62. package/dist/scoring.js +3 -75
  63. package/dist/xapi-CMTph7wG.js +332 -0
  64. package/dist/xapi-CMTph7wG.js.map +1 -0
  65. package/dist/xapi-DNzkSJ0S.cjs +362 -0
  66. package/dist/xapi-DNzkSJ0S.cjs.map +1 -0
  67. package/dist/xapi.cjs +7 -16
  68. package/dist/xapi.d.cts +2 -150
  69. package/dist/xapi.d.ts +2 -150
  70. package/dist/xapi.js +2 -16
  71. package/package.json +4 -4
  72. package/dist/activity-D705CXng.d.cts +0 -2162
  73. package/dist/activity-D705CXng.d.ts +0 -2162
  74. package/dist/chunk-46BXIGLG.cjs +0 -272
  75. package/dist/chunk-46BXIGLG.cjs.map +0 -1
  76. package/dist/chunk-4YANYTFN.cjs +0 -1256
  77. package/dist/chunk-4YANYTFN.cjs.map +0 -1
  78. package/dist/chunk-7KOWU4RO.js +0 -2207
  79. package/dist/chunk-7KOWU4RO.js.map +0 -1
  80. package/dist/chunk-7THXD7AN.cjs +0 -5057
  81. package/dist/chunk-7THXD7AN.cjs.map +0 -1
  82. package/dist/chunk-CYCTIXUN.cjs +0 -118
  83. package/dist/chunk-CYCTIXUN.cjs.map +0 -1
  84. package/dist/chunk-CYPA5BW5.js +0 -118
  85. package/dist/chunk-CYPA5BW5.js.map +0 -1
  86. package/dist/chunk-JTNDIBZO.js +0 -272
  87. package/dist/chunk-JTNDIBZO.js.map +0 -1
  88. package/dist/chunk-MV2N2WNS.js +0 -352
  89. package/dist/chunk-MV2N2WNS.js.map +0 -1
  90. package/dist/chunk-MXI26H62.cjs +0 -2207
  91. package/dist/chunk-MXI26H62.cjs.map +0 -1
  92. package/dist/chunk-QS7B42ZR.js +0 -5057
  93. package/dist/chunk-QS7B42ZR.js.map +0 -1
  94. package/dist/chunk-QX2ERL72.js +0 -1256
  95. package/dist/chunk-QX2ERL72.js.map +0 -1
  96. package/dist/chunk-ZWXQSKCX.cjs +0 -352
  97. package/dist/chunk-ZWXQSKCX.cjs.map +0 -1
  98. package/dist/schemas.cjs.map +0 -1
  99. package/dist/schemas.js.map +0 -1
  100. package/dist/scoring.cjs.map +0 -1
  101. package/dist/scoring.js.map +0 -1
  102. package/dist/xapi.cjs.map +0 -1
  103. package/dist/xapi.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { a as ActivityData, d as ActivityMedia, aX as ValidationResult, f as ActivityType, b as ActivityDataMap, aI as MultipleChoiceOptionMedia } from './activity-D705CXng.cjs';
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
- 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;
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
- /** 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;
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
- /** 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;
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
- 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';
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
- 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;
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
- 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
- */
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
- 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 & {
144
- slotKey?: string;
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;
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
- slotKey?: string;
173
+ slotKey?: string;
174
174
  }) | ItemGroup<TItem>;
175
175
  /** The group a presented slot belongs to. */
176
176
  interface SequenceSlotGroup {
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;
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
- * 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;
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
- kind: 'captions' | 'subtitles';
237
- src: string;
238
- srclang: string;
239
- label: string;
240
- default?: boolean | undefined;
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
- controls?: 'native' | 'minimal' | undefined;
245
- maxPlays?: number | undefined;
246
- seek?: 'allow' | 'none' | undefined;
247
- rate?: 'allow' | 'fixed' | undefined;
248
- nativeControlHints?: ('hide-download' | 'hide-rate')[] | undefined;
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
- type: 'image' | 'audio' | 'video' | 'embed';
253
- url: string;
254
- alt?: string | undefined;
255
- captionsUrl?: string | undefined;
256
- tracks?: Track[] | undefined;
257
- poster?: string | undefined;
258
- playback?: Playback | undefined;
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
- explanations?: boolean | undefined;
263
- hints?: boolean | undefined;
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
- redacted: true;
268
- schemaVersion: '1.0';
269
- id: string;
270
- title: string;
271
- slotKey?: string | undefined;
272
- media?: Media | undefined;
273
- passThreshold?: number | undefined;
274
- learningObjectives?: string[] | undefined;
275
- difficultyLevel?: 1 | 2 | 3 | 4 | 5 | undefined;
276
- ai?: AiSwitches | undefined;
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
- type: 'image' | 'audio';
281
- url: string;
282
- alt?: string | undefined;
283
- captionsUrl?: string | undefined;
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
- id: string;
288
- text: string;
289
- media?: RedactedMultipleChoiceOptionMedia | undefined;
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
- type: 'multiple-choice';
294
- question: string;
295
- questionHtml?: string | undefined;
296
- mode: 'single' | 'multi';
297
- options: RedactedMultipleChoiceOption[];
298
- shuffle?: boolean | undefined;
299
- locale?: string | undefined;
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
- id: string;
304
- hint?: string | undefined;
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
- type: 'fill-in-the-blanks';
309
- passage: string;
310
- passageHtml?: string | undefined;
311
- blanks: RedactedBlankConfig[];
312
- locale?: string | undefined;
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
- type: 'written-response';
317
- prompt: string;
318
- promptHtml?: string | undefined;
319
- minWords: number;
320
- maxWords: number;
321
- rubric?: {
322
- criteria: {
323
- name: string;
324
- weight: number;
325
- description?: string | undefined;
326
- }[];
327
- label?: string | undefined;
328
- } | undefined;
329
- languageTarget?: string | undefined;
330
- locale?: string | undefined;
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
- id: string;
335
- text: string;
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
- id: string;
340
- choices: RedactedGapSelectChoice[];
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
- id: string;
345
- choices?: RedactedGapSelectChoice[] | undefined;
346
- bankId?: string | undefined;
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
- type: 'gap-select';
351
- passage: string;
352
- passageHtml?: string | undefined;
353
- gaps: RedactedGapSelectGap[];
354
- banks?: RedactedGapSelectBank[] | undefined;
355
- presentation?: 'dropdown' | undefined;
356
- shuffleChoices?: boolean | undefined;
357
- locale?: string | undefined;
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
- type: 'audio';
362
- url: string;
363
- alt?: string | undefined;
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
- type: 'dictation';
368
- slowMedia?: RedactedDictationSlowMedia | undefined;
369
- hints?: {
370
- mode: 'progressive-words';
371
- } | undefined;
372
- locale?: string | undefined;
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
- type: 'read-aloud';
381
- instructions?: string | undefined;
382
- referenceText: string;
383
- locale: string;
384
- slowMedia?: RedactedDictationSlowMedia | undefined;
385
- recording: {
386
- maxSeconds: number;
387
- minSeconds?: number | undefined;
388
- maxTakes?: number | undefined;
389
- };
390
- scoring: {
391
- dimensions: {
392
- name: 'accuracy' | 'fluency' | 'completeness' | 'prosody';
393
- weight: number;
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
- id: string;
400
- kind: 'text' | 'image' | 'audio' | 'video' | 'mixed';
401
- title?: string | undefined;
402
- body?: string | undefined;
403
- bodyHtml?: string | undefined;
404
- media?: Media | undefined;
405
- locale?: string | undefined;
406
- attribution?: string | undefined;
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 { readAloudJsonSchema as A, stimulusJsonSchema as B, validateActivity as C, validateItemGroup as D, validateMedia as E, validateOptionMedia as F, writtenResponseJsonSchema as G, type ItemGroup as I, type MediaProgress as M, type RedactedActivity as R, type SequenceEntry as S, type TimelineChapter as T, type MediaTimeline as a, type RedactedBlankConfig as b, type RedactedDictationData as c, type RedactedDictationSlowMedia as d, type RedactedFillInTheBlanksData as e, type RedactedGapSelectBank as f, type RedactedGapSelectChoice as g, type RedactedGapSelectData as h, type RedactedGapSelectGap as i, type RedactedMultipleChoiceData as j, type RedactedMultipleChoiceOption as k, type RedactedMultipleChoiceOptionMedia as l, type RedactedReadAloudData as m, type RedactedStimulus as n, type RedactedWrittenResponseData as o, type SequenceSlot as p, type SequenceSlotGroup as q, type Stimulus as r, type StimulusKind as s, type TimelineCue as t, dictationJsonSchema as u, fillInTheBlanksJsonSchema as v, gapSelectJsonSchema as w, itemGroupJsonSchema as x, jsonSchemaFor as y, multipleChoiceJsonSchema as z };
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