@intellectif/lk-core 0.14.0 → 0.15.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 (49) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +1 -0
  3. package/dist/{activity-BVkg9VDo.d.cts → activity-C7cR8U9n.d.cts} +35 -2
  4. package/dist/{activity-BVkg9VDo.d.ts → activity-C7cR8U9n.d.ts} +35 -2
  5. package/dist/{chunk-R7PV3XIC.js → chunk-54XYQ3CS.js} +7 -4
  6. package/dist/chunk-54XYQ3CS.js.map +1 -0
  7. package/dist/{chunk-J5OIRIOW.cjs → chunk-5KWF34LJ.cjs} +31 -31
  8. package/dist/{chunk-J5OIRIOW.cjs.map → chunk-5KWF34LJ.cjs.map} +1 -1
  9. package/dist/{chunk-CZRUMHKW.cjs → chunk-7ETU6EXQ.cjs} +13 -10
  10. package/dist/chunk-7ETU6EXQ.cjs.map +1 -0
  11. package/dist/{chunk-6RND47QE.js → chunk-DPHX4E7X.js} +62 -3
  12. package/dist/chunk-DPHX4E7X.js.map +1 -0
  13. package/dist/{chunk-NBADQ3JU.js → chunk-EEMVWBPP.js} +195 -4
  14. package/dist/chunk-EEMVWBPP.js.map +1 -0
  15. package/dist/{chunk-RTIR6R2U.js → chunk-L6YBQXSB.js} +2 -2
  16. package/dist/{chunk-VCXIPLEW.cjs → chunk-QFWEF5ST.cjs} +63 -4
  17. package/dist/chunk-QFWEF5ST.cjs.map +1 -0
  18. package/dist/chunk-W7AQP6AV.cjs +418 -0
  19. package/dist/chunk-W7AQP6AV.cjs.map +1 -0
  20. package/dist/{index-v2_-Fyn3.d.ts → index-BWyMDlUS.d.cts} +367 -2
  21. package/dist/{index-BE1bM2Wi.d.cts → index-D10NaztZ.d.ts} +367 -2
  22. package/dist/index.cjs +397 -96
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +103 -7
  25. package/dist/index.d.ts +103 -7
  26. package/dist/index.js +310 -9
  27. package/dist/index.js.map +1 -1
  28. package/dist/schemas.cjs +11 -3
  29. package/dist/schemas.cjs.map +1 -1
  30. package/dist/schemas.d.cts +2 -2
  31. package/dist/schemas.d.ts +2 -2
  32. package/dist/schemas.js +10 -2
  33. package/dist/scoring.cjs +3 -3
  34. package/dist/scoring.d.cts +2 -2
  35. package/dist/scoring.d.ts +2 -2
  36. package/dist/scoring.js +2 -2
  37. package/dist/xapi.cjs +3 -3
  38. package/dist/xapi.d.cts +1 -1
  39. package/dist/xapi.d.ts +1 -1
  40. package/dist/xapi.js +2 -2
  41. package/package.json +1 -1
  42. package/dist/chunk-2NIALQEH.cjs +0 -227
  43. package/dist/chunk-2NIALQEH.cjs.map +0 -1
  44. package/dist/chunk-6RND47QE.js.map +0 -1
  45. package/dist/chunk-CZRUMHKW.cjs.map +0 -1
  46. package/dist/chunk-NBADQ3JU.js.map +0 -1
  47. package/dist/chunk-R7PV3XIC.js.map +0 -1
  48. package/dist/chunk-VCXIPLEW.cjs.map +0 -1
  49. /package/dist/{chunk-RTIR6R2U.js.map → chunk-L6YBQXSB.js.map} +0 -0
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
- import { ScoredItem, RoundingPolicy } from './scoring.cjs';
2
- export { AssessmentScore, AssessmentSectionInput, Band, CompositionPolicy, DEFAULT_PASS_THRESHOLD, DICTATION_MAX_ACCEPTED_TRANSCRIPTS, DICTATION_MAX_EQUIVALENCES, DICTATION_MAX_EQUIVALENCE_LENGTH, DICTATION_MAX_TEXT_LENGTH, DICTATION_MAX_TRANSCRIPT_LENGTH, DictationAlignment, DictationCharOp, DictationReference, DictationWordAlignment, GradeReadAloudOptions, PassFailureReason, READ_ALOUD_MAX_DIMENSION_WEIGHT, READ_ALOUD_MAX_REFERENCE_LENGTH, READ_ALOUD_MAX_SECONDS, READ_ALOUD_MAX_TAKES, ReadAloudWordAlignment, ReadAloudWordState, RoundingMode, SPEECH_ASSESSMENT_MAX_WORDS, ScoringOptions, SectionScore, SpeechAssessment, SpeechMeasurement, SpeechPhoneme, SpeechPhonemeCandidate, SpeechPlausibilityPolicy, SpeechSyllable, SpeechUnscorable, SpeechUnscorableCode, SpeechWord, SpeechWordError, WavInspection, WavInspectionPolicy, alignDictation, alignReadAloud, classifyBand, composeAssessmentScore, computePassThreshold, dictationReferenceWords, diffDictationChars, evaluate, gradeReadAloud, gte, inspectWav, outcomeFromUnscorable, roundGrade, score, validateSpeechAssessment } from './scoring.cjs';
3
- import { x as ItemOutcome, A as ActivityData, L as LearnerResponse, Z as ValidationError, e as ActivityType, a as ActivityDataMap, C as CriterionScore, q as GradeRecord, N as NativeControlHint, c as ActivityMedia, W as ScoringResult, f as DeferredScoringPartial, g as DictationData, i as DictationLearnerResponse, F as FillInTheBlanksData, l as FillInTheBlanksLearnerResponse, n as GapSelectData, p as GapSelectLearnerResponse, z as MultipleChoiceData, E as MultipleChoiceLearnerResponse, R as ReadAloudData, P as ReadAloudLearnerResponse, $ as WrittenResponseData, a0 as WrittenResponseLearnerResponse } from './activity-BVkg9VDo.cjs';
4
- export { b as ActivityFeedback, d as ActivityResult, B as BlankConfig, D as DeferredReason, h as DictationEquivalence, j as DictationSlowMedia, k as DictationTolerance, G as GapSelectBank, m as GapSelectChoice, o as GapSelectGap, r as Grader, s as GraderKind, t as GraderUsage, u as GradingState, I as InlineCorrection, v as InteractionEvent, w as InteractionKind, y as LearnerResponseMap, M as MediaPlaybackPolicy, H as MultipleChoiceOption, J as MultipleChoiceOptionMedia, K as ReadAloudDimension, O as ReadAloudDimensionWeight, Q as ReadAloudSlowMedia, S as RecordingBounds, T as RecordingRef, U as ScoringDetail, V as ScoringOutcome, X as TextMatchPolicy, Y as TextMatchResult, _ as ValidationResult, a1 as WrittenResponseRubric, a2 as WrittenResponseRubricCriterion, a3 as XAPIActor, a4 as XAPIConfig, a5 as XAPIContext, a6 as XAPIContextActivities, a7 as XAPIError, a8 as XAPIObject, a9 as XAPIResult, aa as XAPIScore, ab as XAPIStatement, ac as XAPIVerbObject, ad as levenshteinDistance, ae as matchText } from './activity-BVkg9VDo.cjs';
5
- import { a0 as SequenceSlot, $ as SequenceEntry, I as ItemGroup } from './index-BE1bM2Wi.cjs';
6
- export { B as BlankConfigSchema, D as DictationDataSchema, a as DictationEquivalenceSchema, b as DictationSlowMediaSchema, c as DictationToleranceSchema, F as FeedbackSchema, d as FillInTheBlanksDataSchema, G as GapSelectBankSchema, e as GapSelectChoiceSchema, f as GapSelectDataSchema, g as GapSelectGapSchema, h as ItemGroupSchema, M as MediaPlaybackSchema, i as MediaSchema, j as MediaUrlSchema, k as MultipleChoiceDataSchema, l as MultipleChoiceOptionMediaSchema, m as MultipleChoiceOptionSchema, N as NativeControlHintSchema, R as ReadAloudDataSchema, n as ReadAloudSlowMediaSchema, o as RedactedActivity, p as RedactedBlankConfig, q as RedactedBlankConfigSchema, r as RedactedDictationData, s as RedactedDictationDataSchema, t as RedactedDictationSlowMedia, u as RedactedDictationSlowMediaSchema, v as RedactedFillInTheBlanksData, w as RedactedFillInTheBlanksDataSchema, x as RedactedGapSelectBank, y as RedactedGapSelectBankSchema, z as RedactedGapSelectChoice, A as RedactedGapSelectChoiceSchema, C as RedactedGapSelectData, E as RedactedGapSelectDataSchema, H as RedactedGapSelectGap, J as RedactedGapSelectGapSchema, K as RedactedItemGroupSchema, L as RedactedMediaSchema, O as RedactedMultipleChoiceData, P as RedactedMultipleChoiceDataSchema, Q as RedactedMultipleChoiceOption, S as RedactedMultipleChoiceOptionMedia, T as RedactedMultipleChoiceOptionMediaSchema, U as RedactedMultipleChoiceOptionSchema, V as RedactedReadAloudData, W as RedactedReadAloudDataSchema, X as RedactedStimulus, Y as RedactedStimulusSchema, Z as RedactedWrittenResponseData, _ as RedactedWrittenResponseDataSchema, a1 as SequenceSlotGroup, a2 as Stimulus, a3 as StimulusKind, a4 as StimulusSchema, a5 as TextMatchPolicySchema, a6 as WrittenResponseDataSchema, a7 as WrittenResponseRubricCriterionSchema, a8 as WrittenResponseRubricSchema, a9 as dictationJsonSchema, aa as fillInTheBlanksJsonSchema, ab as gapSelectJsonSchema, ac as itemGroupJsonSchema, ad as jsonSchemaFor, ae as multipleChoiceJsonSchema, af as readAloudJsonSchema, ag as stimulusJsonSchema, ah as validateActivity, ai as validateItemGroup, aj as writtenResponseJsonSchema } from './index-BE1bM2Wi.cjs';
1
+ import { ScoredItem, RoundingPolicy, CompositionPolicy, AssessmentScore } from './scoring.cjs';
2
+ export { AssessmentSectionInput, Band, DEFAULT_PASS_THRESHOLD, DICTATION_MAX_ACCEPTED_TRANSCRIPTS, DICTATION_MAX_EQUIVALENCES, DICTATION_MAX_EQUIVALENCE_LENGTH, DICTATION_MAX_TEXT_LENGTH, DICTATION_MAX_TRANSCRIPT_LENGTH, DictationAlignment, DictationCharOp, DictationReference, DictationWordAlignment, GradeReadAloudOptions, PassFailureReason, READ_ALOUD_MAX_DIMENSION_WEIGHT, READ_ALOUD_MAX_REFERENCE_LENGTH, READ_ALOUD_MAX_SECONDS, READ_ALOUD_MAX_TAKES, ReadAloudWordAlignment, ReadAloudWordState, RoundingMode, SPEECH_ASSESSMENT_MAX_WORDS, ScoringOptions, SectionScore, SpeechAssessment, SpeechMeasurement, SpeechPhoneme, SpeechPhonemeCandidate, SpeechPlausibilityPolicy, SpeechSyllable, SpeechUnscorable, SpeechUnscorableCode, SpeechWord, SpeechWordError, WavInspection, WavInspectionPolicy, alignDictation, alignReadAloud, classifyBand, composeAssessmentScore, computePassThreshold, dictationReferenceWords, diffDictationChars, evaluate, gradeReadAloud, gte, inspectWav, outcomeFromUnscorable, roundGrade, score, validateSpeechAssessment } from './scoring.cjs';
3
+ import { x as ItemOutcome, A as ActivityData, L as LearnerResponse, _ as ValidationError, e as ActivityType, a as ActivityDataMap, C as CriterionScore, q as GradeRecord, N as NativeControlHint, c as ActivityMedia, X as ScoringResult, f as DeferredScoringPartial, g as DictationData, i as DictationLearnerResponse, F as FillInTheBlanksData, l as FillInTheBlanksLearnerResponse, n as GapSelectData, p as GapSelectLearnerResponse, E as MultipleChoiceData, H as MultipleChoiceLearnerResponse, R as ReadAloudData, Q as ReadAloudLearnerResponse, a0 as WrittenResponseData, a1 as WrittenResponseLearnerResponse } from './activity-C7cR8U9n.cjs';
4
+ export { b as ActivityFeedback, d as ActivityResult, B as BlankConfig, D as DeferredReason, h as DictationEquivalence, j as DictationSlowMedia, k as DictationTolerance, G as GapSelectBank, m as GapSelectChoice, o as GapSelectGap, r as Grader, s as GraderKind, t as GraderUsage, u as GradingState, I as InlineCorrection, v as InteractionEvent, w as InteractionKind, y as LearnerResponseMap, M as MediaPlaybackPolicy, z as MediaTrack, J as MultipleChoiceOption, K as MultipleChoiceOptionMedia, O as ReadAloudDimension, P as ReadAloudDimensionWeight, S as ReadAloudSlowMedia, T as RecordingBounds, U as RecordingRef, V as ScoringDetail, W as ScoringOutcome, Y as TextMatchPolicy, Z as TextMatchResult, $ as ValidationResult, a2 as WrittenResponseRubric, a3 as WrittenResponseRubricCriterion, a4 as XAPIActor, a5 as XAPIConfig, a6 as XAPIContext, a7 as XAPIContextActivities, a8 as XAPIError, a9 as XAPIObject, aa as XAPIResult, ab as XAPIScore, ac as XAPIStatement, ad as XAPIVerbObject, ae as levenshteinDistance, af as matchText } from './activity-C7cR8U9n.cjs';
5
+ import { a4 as SequenceSlot, a3 as SequenceEntry, I as ItemGroup, i as MediaProgress } from './index-BWyMDlUS.cjs';
6
+ export { B as BlankConfigSchema, D as DictationDataSchema, a as DictationEquivalenceSchema, b as DictationSlowMediaSchema, c as DictationToleranceSchema, F as FeedbackSchema, d as FillInTheBlanksDataSchema, G as GapSelectBankSchema, e as GapSelectChoiceSchema, f as GapSelectDataSchema, g as GapSelectGapSchema, h as ItemGroupSchema, M as MediaPlaybackSchema, j as MediaSchema, k as MediaTimeline, l as MediaTimelineSchema, m as MediaTrackSchema, n as MediaUrlSchema, o as MultipleChoiceDataSchema, p as MultipleChoiceOptionMediaSchema, q as MultipleChoiceOptionSchema, N as NativeControlHintSchema, R as ReadAloudDataSchema, r as ReadAloudSlowMediaSchema, s as RedactedActivity, t as RedactedBlankConfig, u as RedactedBlankConfigSchema, v as RedactedDictationData, w as RedactedDictationDataSchema, x as RedactedDictationSlowMedia, y as RedactedDictationSlowMediaSchema, z as RedactedFillInTheBlanksData, A as RedactedFillInTheBlanksDataSchema, C as RedactedGapSelectBank, E as RedactedGapSelectBankSchema, H as RedactedGapSelectChoice, J as RedactedGapSelectChoiceSchema, K as RedactedGapSelectData, L as RedactedGapSelectDataSchema, O as RedactedGapSelectGap, P as RedactedGapSelectGapSchema, Q as RedactedItemGroupSchema, S as RedactedMediaSchema, T as RedactedMultipleChoiceData, U as RedactedMultipleChoiceDataSchema, V as RedactedMultipleChoiceOption, W as RedactedMultipleChoiceOptionMedia, X as RedactedMultipleChoiceOptionMediaSchema, Y as RedactedMultipleChoiceOptionSchema, Z as RedactedReadAloudData, _ as RedactedReadAloudDataSchema, $ as RedactedStimulus, a0 as RedactedStimulusSchema, a1 as RedactedWrittenResponseData, a2 as RedactedWrittenResponseDataSchema, a5 as SequenceSlotGroup, a6 as Stimulus, a7 as StimulusKind, a8 as StimulusSchema, a9 as TextMatchPolicySchema, aa as TimelineChapter, ab as TimelineChapterSchema, ac as TimelineCue, ad as TimelineCueSchema, ae as WrittenResponseDataSchema, af as WrittenResponseRubricCriterionSchema, ag as WrittenResponseRubricSchema, ah as dictationJsonSchema, ai as fillInTheBlanksJsonSchema, aj as gapSelectJsonSchema, ak as itemGroupJsonSchema, al as jsonSchemaFor, am as multipleChoiceJsonSchema, an as readAloudJsonSchema, ao as stimulusJsonSchema, ap as validateActivity, aq as validateItemGroup, ar as writtenResponseJsonSchema } from './index-BWyMDlUS.cjs';
7
7
  import { z } from 'zod/v4';
8
8
  export { AnsweredStatementParams, CompletedStatementParams, SubmittedStatementParams, XAPIObjectParams, XAPIStatementParams, XAPIVerb, XAPIVerbKey, XAPI_VERB_DISPLAY, validateXAPIStatement, xAPIBuilder, xapiDefinitionFor } from './xapi.cjs';
9
9
 
@@ -52,6 +52,17 @@ interface AttemptPlanSlot {
52
52
  title?: string;
53
53
  /** Fingerprint of the stimulus as served — a corrected passage changes the question. */
54
54
  stimulusHash: string;
55
+ /**
56
+ * The quiz this slot's question sat in, when the group is an interactive
57
+ * video. Frozen because WHEN a question is asked is part of what is asked:
58
+ * moved from before the passage it is about to after it, the same item is
59
+ * a different question.
60
+ */
61
+ cue?: {
62
+ id: string;
63
+ at: number;
64
+ required?: boolean;
65
+ };
55
66
  };
56
67
  /**
57
68
  * Play budgets in force for this slot when the attempt was planned.
@@ -111,6 +122,12 @@ interface AttemptPlanDrift {
111
122
  changedSlotIds: string[];
112
123
  /** Slots whose item group's stimulus has been edited since the attempt. */
113
124
  changedStimulusSlotIds: string[];
125
+ /**
126
+ * Slots of an interactive video whose question now sits in a different quiz,
127
+ * at a different moment, or under a different `required` — or that gained or
128
+ * lost a quiz altogether. Always empty for content without a timeline.
129
+ */
130
+ changedCueSlotIds: string[];
114
131
  /**
115
132
  * Slots now worth a different number of points. A reweight is a paper
116
133
  * change — it moves the grade without touching a single question — so it
@@ -394,6 +411,19 @@ interface DraftContext {
394
411
  * @throws Error when `newId` returns an empty or repeated id.
395
412
  */
396
413
  declare function createItemGroupDraft(context: DraftContext): ItemGroup;
414
+ /**
415
+ * A new, empty interactive video for an editor to start from: an item group
416
+ * whose stimulus is a video with no file yet, no questions, and a timeline with
417
+ * no quizzes.
418
+ *
419
+ * It is an ordinary item group — {@link validateItemGroupDraft} checks it, and
420
+ * everything that reads groups reads it — because that is what keeps each
421
+ * question its own slot. Like every new draft it is `incomplete`: an untouched
422
+ * draft must never read as finished.
423
+ *
424
+ * @throws Error when `newId` returns an empty or repeated id.
425
+ */
426
+ declare function createInteractiveVideoDraft(context: DraftContext): ItemGroup;
397
427
  /**
398
428
  * Tells an unfinished testlet from a broken one — {@link validateDraft} for the
399
429
  * container that holds several questions around one passage or recording.
@@ -1187,6 +1217,65 @@ interface SeededShuffleOptions {
1187
1217
  */
1188
1218
  declare function seededShuffle<T>(items: readonly T[], seed: string, options?: SeededShuffleOptions): T[];
1189
1219
 
1220
+ /**
1221
+ * Reads a stored {@link MediaProgress}. Never throws: anything that is not one
1222
+ * — a string, a stale shape, an object whose getters throw — answers `null`,
1223
+ * and the player starts from the beginning.
1224
+ *
1225
+ * What it keeps, it clamps. A stored position is host storage, which is input
1226
+ * from a stranger by the time it is read back: a negative `at`, a `furthest`
1227
+ * behind `at`, or a position past the end of a video that has since been
1228
+ * re-cut must not put the playhead somewhere it cannot be. Give `duration`
1229
+ * once the video's metadata is known, and both positions are held inside it.
1230
+ */
1231
+ declare function readMediaProgress(value: unknown, duration?: number): MediaProgress | null;
1232
+ /**
1233
+ * One interactive video's composed result: the scored items whose slot belongs
1234
+ * to the entry, composed as one section of weight 1. A slot belongs when
1235
+ * `entryKeyOf(item.slotId) === entryKey`, so a host can pass a whole attempt's
1236
+ * items and get the video's share of it.
1237
+ *
1238
+ * `entryKey` is the group's `slotKey` when it has one — which every published
1239
+ * video should — or its position in the sequence otherwise. A group object
1240
+ * alone cannot know its position, which is why this takes the key.
1241
+ *
1242
+ * @throws Error when no item belongs to the entry. A mistyped key would
1243
+ * otherwise compose nothing into a `final` result, and a refusal must
1244
+ * never read as a grade.
1245
+ */
1246
+ declare function composeTimelineScore(entryKey: string, items: readonly ScoredItem[], policy: CompositionPolicy): AssessmentScore;
1247
+
1248
+ /**
1249
+ * The bounds of an interactive video — an item group with a `timeline`.
1250
+ *
1251
+ * A leaf module on purpose: the schemas, the authoring checks and the timeline
1252
+ * helpers all read these, and nothing here may import any of them back.
1253
+ */
1254
+ /**
1255
+ * The item types an interactive video may present. CLOSED on purpose: a type
1256
+ * added to the SDK later, or a custom type a host registers, is not silently
1257
+ * embeddable. Each one here was chosen, and each works inside a paused video —
1258
+ * a read-aloud's microphone included, because every quiz pauses the video
1259
+ * first.
1260
+ */
1261
+ declare const INTERACTIVE_VIDEO_ITEM_TYPES: readonly ["multiple-choice", "fill-in-the-blanks", "gap-select", "dictation", "read-aloud"];
1262
+ /** One of {@link INTERACTIVE_VIDEO_ITEM_TYPES}. */
1263
+ type InteractiveVideoItemType = (typeof INTERACTIVE_VIDEO_ITEM_TYPES)[number];
1264
+ /** Whether `type` is one of the item types an interactive video may present. */
1265
+ declare function isInteractiveVideoItemType(type: unknown): type is InteractiveVideoItemType;
1266
+ /** The most quizzes one video may hold. */
1267
+ declare const TIMELINE_MAX_QUIZZES = 100;
1268
+ /**
1269
+ * The most questions one interactive video may hold, across all its quizzes.
1270
+ * The player keeps every one of them mounted, so an answer survives the
1271
+ * learner rewinding past its quiz.
1272
+ */
1273
+ declare const TIMELINE_MAX_ITEMS = 200;
1274
+ /** The most chapters one video may hold. */
1275
+ declare const TIMELINE_MAX_CHAPTERS = 100;
1276
+ /** The longest quiz or chapter title, in UTF-16 units. A title sits on one line of the player. */
1277
+ declare const TIMELINE_MAX_TITLE_LENGTH = 120;
1278
+
1190
1279
  /**
1191
1280
  * All CSS custom property tokens consumed by learning-kit components.
1192
1281
  * Every key maps to a `--lk-*` CSS variable name; every value is a CSS value string.
@@ -1204,6 +1293,13 @@ interface ThemeTokens {
1204
1293
  '--lk-color-error': string;
1205
1294
  '--lk-color-warning': string;
1206
1295
  '--lk-color-focus-ring': string;
1296
+ /**
1297
+ * The accent a video player draws on its own dark chrome: the played part
1298
+ * of the progress bar, quiz markers, the centre play button. Optional, so a
1299
+ * theme written before it existed still type-checks; the default is white,
1300
+ * which reads on any video. Set it to a brand colour to match a product.
1301
+ */
1302
+ '--lk-color-media-accent'?: string;
1207
1303
  '--lk-spacing-xs': string;
1208
1304
  '--lk-spacing-sm': string;
1209
1305
  '--lk-spacing-md': string;
@@ -1223,4 +1319,4 @@ interface ThemeTokens {
1223
1319
  '--lk-transition-base': string;
1224
1320
  }
1225
1321
 
1226
- export { ActivityData, ActivityDataMap, ActivityMedia, ActivitySchemaError, ActivityType, type ActivityTypeAuthoring, type ActivityTypeDescriptor, type ActivityTypeInterop, type ActivityTypeScoring, type AttemptPlan, type AttemptPlanDrift, type AttemptPlanSlot, type AttemptProgress, type AttemptState, CriterionScore, DeferredScoringError, DeferredScoringPartial, DictationData, DictationLearnerResponse, type DraftComplete, type DraftContext, type DraftIssue, type DraftNotComplete, type DraftSeverity, type DraftValidationResult, type FieldPolicy, FillInTheBlanksData, FillInTheBlanksLearnerResponse, type FlattenSequenceOptions, GapSelectData, GapSelectLearnerResponse, type GradeFromRubricOptions, GradeRecord, ItemGroup, ItemOutcome, LearnerResponse, type MediaBudgetRef, type MediaPlayClaim, type MediaPlayGrant, type MediaPlayLedger, type MediaPlayLedgerEntry, type MissingOutcomePolicy, MultipleChoiceData, MultipleChoiceLearnerResponse, NativeControlHint, type PartialScoringResult, type PlanAttemptOptions, type PlannableEntry, ReadAloudData, ReadAloudLearnerResponse, type RedactOptions, type RedactedActivityData, type RedactedItemGroup, RedactedScoringError, type RegisteredActivityTypeDescriptor, type ResolvedPlaybackPolicy, type ResponseDiffEntry, RoundingPolicy, ScoredItem, ScoringResult, type SeededShuffleOptions, type Sensitivity, SequenceEntry, SequenceSlot, type ShuffleVersion, type ThemeTokens, UnknownActivityTypeError, ValidationError, WrittenResponseData, WrittenResponseLearnerResponse, type XAPIInteractionType, assertRedacted, assertRedactedItemGroup, canonicalJson, contentHash, countWords, createDraft, createItemGroupDraft, defineActivityType, dictationType, diffResponses, entryKeyOf, fillInTheBlanksType, fingerprint, flattenSequence, gapSelectType, getActivityTypeDescriptor, gradeFromRubric, hasGrade, hashSeed, isItemGroup, multipleChoiceType, outcomeFromGrade, planAttempt, planMediaBudgets, readAloudType, redact, redactItemGroup, registerActivityType, registeredActivityTypes, resolvePlaybackPolicy, restoreAttemptState, restoreMediaPlayLedger, scoredItemsFromPlan, seededShuffle, serializeAttemptState, serializeMediaPlayLedger, slotMediaKey, stimulusMediaKey, validateDraft, validateItemGroupDraft, verifyAttemptPlan, writtenResponseType };
1322
+ export { ActivityData, ActivityDataMap, ActivityMedia, ActivitySchemaError, ActivityType, type ActivityTypeAuthoring, type ActivityTypeDescriptor, type ActivityTypeInterop, type ActivityTypeScoring, AssessmentScore, type AttemptPlan, type AttemptPlanDrift, type AttemptPlanSlot, type AttemptProgress, type AttemptState, CompositionPolicy, CriterionScore, DeferredScoringError, DeferredScoringPartial, DictationData, DictationLearnerResponse, type DraftComplete, type DraftContext, type DraftIssue, type DraftNotComplete, type DraftSeverity, type DraftValidationResult, type FieldPolicy, FillInTheBlanksData, FillInTheBlanksLearnerResponse, type FlattenSequenceOptions, GapSelectData, GapSelectLearnerResponse, type GradeFromRubricOptions, GradeRecord, INTERACTIVE_VIDEO_ITEM_TYPES, type InteractiveVideoItemType, ItemGroup, ItemOutcome, LearnerResponse, type MediaBudgetRef, type MediaPlayClaim, type MediaPlayGrant, type MediaPlayLedger, type MediaPlayLedgerEntry, MediaProgress, type MissingOutcomePolicy, MultipleChoiceData, MultipleChoiceLearnerResponse, NativeControlHint, type PartialScoringResult, type PlanAttemptOptions, type PlannableEntry, ReadAloudData, ReadAloudLearnerResponse, type RedactOptions, type RedactedActivityData, type RedactedItemGroup, RedactedScoringError, type RegisteredActivityTypeDescriptor, type ResolvedPlaybackPolicy, type ResponseDiffEntry, RoundingPolicy, ScoredItem, ScoringResult, type SeededShuffleOptions, type Sensitivity, SequenceEntry, SequenceSlot, type ShuffleVersion, TIMELINE_MAX_CHAPTERS, TIMELINE_MAX_ITEMS, TIMELINE_MAX_QUIZZES, TIMELINE_MAX_TITLE_LENGTH, type ThemeTokens, UnknownActivityTypeError, ValidationError, WrittenResponseData, WrittenResponseLearnerResponse, type XAPIInteractionType, assertRedacted, assertRedactedItemGroup, canonicalJson, composeTimelineScore, contentHash, countWords, createDraft, createInteractiveVideoDraft, createItemGroupDraft, defineActivityType, dictationType, diffResponses, entryKeyOf, fillInTheBlanksType, fingerprint, flattenSequence, gapSelectType, getActivityTypeDescriptor, gradeFromRubric, hasGrade, hashSeed, isInteractiveVideoItemType, isItemGroup, multipleChoiceType, outcomeFromGrade, planAttempt, planMediaBudgets, readAloudType, readMediaProgress, redact, redactItemGroup, registerActivityType, registeredActivityTypes, resolvePlaybackPolicy, restoreAttemptState, restoreMediaPlayLedger, scoredItemsFromPlan, seededShuffle, serializeAttemptState, serializeMediaPlayLedger, slotMediaKey, stimulusMediaKey, validateDraft, validateItemGroupDraft, verifyAttemptPlan, writtenResponseType };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { ScoredItem, RoundingPolicy } from './scoring.js';
2
- export { AssessmentScore, AssessmentSectionInput, Band, CompositionPolicy, DEFAULT_PASS_THRESHOLD, DICTATION_MAX_ACCEPTED_TRANSCRIPTS, DICTATION_MAX_EQUIVALENCES, DICTATION_MAX_EQUIVALENCE_LENGTH, DICTATION_MAX_TEXT_LENGTH, DICTATION_MAX_TRANSCRIPT_LENGTH, DictationAlignment, DictationCharOp, DictationReference, DictationWordAlignment, GradeReadAloudOptions, PassFailureReason, READ_ALOUD_MAX_DIMENSION_WEIGHT, READ_ALOUD_MAX_REFERENCE_LENGTH, READ_ALOUD_MAX_SECONDS, READ_ALOUD_MAX_TAKES, ReadAloudWordAlignment, ReadAloudWordState, RoundingMode, SPEECH_ASSESSMENT_MAX_WORDS, ScoringOptions, SectionScore, SpeechAssessment, SpeechMeasurement, SpeechPhoneme, SpeechPhonemeCandidate, SpeechPlausibilityPolicy, SpeechSyllable, SpeechUnscorable, SpeechUnscorableCode, SpeechWord, SpeechWordError, WavInspection, WavInspectionPolicy, alignDictation, alignReadAloud, classifyBand, composeAssessmentScore, computePassThreshold, dictationReferenceWords, diffDictationChars, evaluate, gradeReadAloud, gte, inspectWav, outcomeFromUnscorable, roundGrade, score, validateSpeechAssessment } from './scoring.js';
3
- import { x as ItemOutcome, A as ActivityData, L as LearnerResponse, Z as ValidationError, e as ActivityType, a as ActivityDataMap, C as CriterionScore, q as GradeRecord, N as NativeControlHint, c as ActivityMedia, W as ScoringResult, f as DeferredScoringPartial, g as DictationData, i as DictationLearnerResponse, F as FillInTheBlanksData, l as FillInTheBlanksLearnerResponse, n as GapSelectData, p as GapSelectLearnerResponse, z as MultipleChoiceData, E as MultipleChoiceLearnerResponse, R as ReadAloudData, P as ReadAloudLearnerResponse, $ as WrittenResponseData, a0 as WrittenResponseLearnerResponse } from './activity-BVkg9VDo.js';
4
- export { b as ActivityFeedback, d as ActivityResult, B as BlankConfig, D as DeferredReason, h as DictationEquivalence, j as DictationSlowMedia, k as DictationTolerance, G as GapSelectBank, m as GapSelectChoice, o as GapSelectGap, r as Grader, s as GraderKind, t as GraderUsage, u as GradingState, I as InlineCorrection, v as InteractionEvent, w as InteractionKind, y as LearnerResponseMap, M as MediaPlaybackPolicy, H as MultipleChoiceOption, J as MultipleChoiceOptionMedia, K as ReadAloudDimension, O as ReadAloudDimensionWeight, Q as ReadAloudSlowMedia, S as RecordingBounds, T as RecordingRef, U as ScoringDetail, V as ScoringOutcome, X as TextMatchPolicy, Y as TextMatchResult, _ as ValidationResult, a1 as WrittenResponseRubric, a2 as WrittenResponseRubricCriterion, a3 as XAPIActor, a4 as XAPIConfig, a5 as XAPIContext, a6 as XAPIContextActivities, a7 as XAPIError, a8 as XAPIObject, a9 as XAPIResult, aa as XAPIScore, ab as XAPIStatement, ac as XAPIVerbObject, ad as levenshteinDistance, ae as matchText } from './activity-BVkg9VDo.js';
5
- import { a0 as SequenceSlot, $ as SequenceEntry, I as ItemGroup } from './index-v2_-Fyn3.js';
6
- export { B as BlankConfigSchema, D as DictationDataSchema, a as DictationEquivalenceSchema, b as DictationSlowMediaSchema, c as DictationToleranceSchema, F as FeedbackSchema, d as FillInTheBlanksDataSchema, G as GapSelectBankSchema, e as GapSelectChoiceSchema, f as GapSelectDataSchema, g as GapSelectGapSchema, h as ItemGroupSchema, M as MediaPlaybackSchema, i as MediaSchema, j as MediaUrlSchema, k as MultipleChoiceDataSchema, l as MultipleChoiceOptionMediaSchema, m as MultipleChoiceOptionSchema, N as NativeControlHintSchema, R as ReadAloudDataSchema, n as ReadAloudSlowMediaSchema, o as RedactedActivity, p as RedactedBlankConfig, q as RedactedBlankConfigSchema, r as RedactedDictationData, s as RedactedDictationDataSchema, t as RedactedDictationSlowMedia, u as RedactedDictationSlowMediaSchema, v as RedactedFillInTheBlanksData, w as RedactedFillInTheBlanksDataSchema, x as RedactedGapSelectBank, y as RedactedGapSelectBankSchema, z as RedactedGapSelectChoice, A as RedactedGapSelectChoiceSchema, C as RedactedGapSelectData, E as RedactedGapSelectDataSchema, H as RedactedGapSelectGap, J as RedactedGapSelectGapSchema, K as RedactedItemGroupSchema, L as RedactedMediaSchema, O as RedactedMultipleChoiceData, P as RedactedMultipleChoiceDataSchema, Q as RedactedMultipleChoiceOption, S as RedactedMultipleChoiceOptionMedia, T as RedactedMultipleChoiceOptionMediaSchema, U as RedactedMultipleChoiceOptionSchema, V as RedactedReadAloudData, W as RedactedReadAloudDataSchema, X as RedactedStimulus, Y as RedactedStimulusSchema, Z as RedactedWrittenResponseData, _ as RedactedWrittenResponseDataSchema, a1 as SequenceSlotGroup, a2 as Stimulus, a3 as StimulusKind, a4 as StimulusSchema, a5 as TextMatchPolicySchema, a6 as WrittenResponseDataSchema, a7 as WrittenResponseRubricCriterionSchema, a8 as WrittenResponseRubricSchema, a9 as dictationJsonSchema, aa as fillInTheBlanksJsonSchema, ab as gapSelectJsonSchema, ac as itemGroupJsonSchema, ad as jsonSchemaFor, ae as multipleChoiceJsonSchema, af as readAloudJsonSchema, ag as stimulusJsonSchema, ah as validateActivity, ai as validateItemGroup, aj as writtenResponseJsonSchema } from './index-v2_-Fyn3.js';
1
+ import { ScoredItem, RoundingPolicy, CompositionPolicy, AssessmentScore } from './scoring.js';
2
+ export { AssessmentSectionInput, Band, DEFAULT_PASS_THRESHOLD, DICTATION_MAX_ACCEPTED_TRANSCRIPTS, DICTATION_MAX_EQUIVALENCES, DICTATION_MAX_EQUIVALENCE_LENGTH, DICTATION_MAX_TEXT_LENGTH, DICTATION_MAX_TRANSCRIPT_LENGTH, DictationAlignment, DictationCharOp, DictationReference, DictationWordAlignment, GradeReadAloudOptions, PassFailureReason, READ_ALOUD_MAX_DIMENSION_WEIGHT, READ_ALOUD_MAX_REFERENCE_LENGTH, READ_ALOUD_MAX_SECONDS, READ_ALOUD_MAX_TAKES, ReadAloudWordAlignment, ReadAloudWordState, RoundingMode, SPEECH_ASSESSMENT_MAX_WORDS, ScoringOptions, SectionScore, SpeechAssessment, SpeechMeasurement, SpeechPhoneme, SpeechPhonemeCandidate, SpeechPlausibilityPolicy, SpeechSyllable, SpeechUnscorable, SpeechUnscorableCode, SpeechWord, SpeechWordError, WavInspection, WavInspectionPolicy, alignDictation, alignReadAloud, classifyBand, composeAssessmentScore, computePassThreshold, dictationReferenceWords, diffDictationChars, evaluate, gradeReadAloud, gte, inspectWav, outcomeFromUnscorable, roundGrade, score, validateSpeechAssessment } from './scoring.js';
3
+ import { x as ItemOutcome, A as ActivityData, L as LearnerResponse, _ as ValidationError, e as ActivityType, a as ActivityDataMap, C as CriterionScore, q as GradeRecord, N as NativeControlHint, c as ActivityMedia, X as ScoringResult, f as DeferredScoringPartial, g as DictationData, i as DictationLearnerResponse, F as FillInTheBlanksData, l as FillInTheBlanksLearnerResponse, n as GapSelectData, p as GapSelectLearnerResponse, E as MultipleChoiceData, H as MultipleChoiceLearnerResponse, R as ReadAloudData, Q as ReadAloudLearnerResponse, a0 as WrittenResponseData, a1 as WrittenResponseLearnerResponse } from './activity-C7cR8U9n.js';
4
+ export { b as ActivityFeedback, d as ActivityResult, B as BlankConfig, D as DeferredReason, h as DictationEquivalence, j as DictationSlowMedia, k as DictationTolerance, G as GapSelectBank, m as GapSelectChoice, o as GapSelectGap, r as Grader, s as GraderKind, t as GraderUsage, u as GradingState, I as InlineCorrection, v as InteractionEvent, w as InteractionKind, y as LearnerResponseMap, M as MediaPlaybackPolicy, z as MediaTrack, J as MultipleChoiceOption, K as MultipleChoiceOptionMedia, O as ReadAloudDimension, P as ReadAloudDimensionWeight, S as ReadAloudSlowMedia, T as RecordingBounds, U as RecordingRef, V as ScoringDetail, W as ScoringOutcome, Y as TextMatchPolicy, Z as TextMatchResult, $ as ValidationResult, a2 as WrittenResponseRubric, a3 as WrittenResponseRubricCriterion, a4 as XAPIActor, a5 as XAPIConfig, a6 as XAPIContext, a7 as XAPIContextActivities, a8 as XAPIError, a9 as XAPIObject, aa as XAPIResult, ab as XAPIScore, ac as XAPIStatement, ad as XAPIVerbObject, ae as levenshteinDistance, af as matchText } from './activity-C7cR8U9n.js';
5
+ import { a4 as SequenceSlot, a3 as SequenceEntry, I as ItemGroup, i as MediaProgress } from './index-D10NaztZ.js';
6
+ export { B as BlankConfigSchema, D as DictationDataSchema, a as DictationEquivalenceSchema, b as DictationSlowMediaSchema, c as DictationToleranceSchema, F as FeedbackSchema, d as FillInTheBlanksDataSchema, G as GapSelectBankSchema, e as GapSelectChoiceSchema, f as GapSelectDataSchema, g as GapSelectGapSchema, h as ItemGroupSchema, M as MediaPlaybackSchema, j as MediaSchema, k as MediaTimeline, l as MediaTimelineSchema, m as MediaTrackSchema, n as MediaUrlSchema, o as MultipleChoiceDataSchema, p as MultipleChoiceOptionMediaSchema, q as MultipleChoiceOptionSchema, N as NativeControlHintSchema, R as ReadAloudDataSchema, r as ReadAloudSlowMediaSchema, s as RedactedActivity, t as RedactedBlankConfig, u as RedactedBlankConfigSchema, v as RedactedDictationData, w as RedactedDictationDataSchema, x as RedactedDictationSlowMedia, y as RedactedDictationSlowMediaSchema, z as RedactedFillInTheBlanksData, A as RedactedFillInTheBlanksDataSchema, C as RedactedGapSelectBank, E as RedactedGapSelectBankSchema, H as RedactedGapSelectChoice, J as RedactedGapSelectChoiceSchema, K as RedactedGapSelectData, L as RedactedGapSelectDataSchema, O as RedactedGapSelectGap, P as RedactedGapSelectGapSchema, Q as RedactedItemGroupSchema, S as RedactedMediaSchema, T as RedactedMultipleChoiceData, U as RedactedMultipleChoiceDataSchema, V as RedactedMultipleChoiceOption, W as RedactedMultipleChoiceOptionMedia, X as RedactedMultipleChoiceOptionMediaSchema, Y as RedactedMultipleChoiceOptionSchema, Z as RedactedReadAloudData, _ as RedactedReadAloudDataSchema, $ as RedactedStimulus, a0 as RedactedStimulusSchema, a1 as RedactedWrittenResponseData, a2 as RedactedWrittenResponseDataSchema, a5 as SequenceSlotGroup, a6 as Stimulus, a7 as StimulusKind, a8 as StimulusSchema, a9 as TextMatchPolicySchema, aa as TimelineChapter, ab as TimelineChapterSchema, ac as TimelineCue, ad as TimelineCueSchema, ae as WrittenResponseDataSchema, af as WrittenResponseRubricCriterionSchema, ag as WrittenResponseRubricSchema, ah as dictationJsonSchema, ai as fillInTheBlanksJsonSchema, aj as gapSelectJsonSchema, ak as itemGroupJsonSchema, al as jsonSchemaFor, am as multipleChoiceJsonSchema, an as readAloudJsonSchema, ao as stimulusJsonSchema, ap as validateActivity, aq as validateItemGroup, ar as writtenResponseJsonSchema } from './index-D10NaztZ.js';
7
7
  import { z } from 'zod/v4';
8
8
  export { AnsweredStatementParams, CompletedStatementParams, SubmittedStatementParams, XAPIObjectParams, XAPIStatementParams, XAPIVerb, XAPIVerbKey, XAPI_VERB_DISPLAY, validateXAPIStatement, xAPIBuilder, xapiDefinitionFor } from './xapi.js';
9
9
 
@@ -52,6 +52,17 @@ interface AttemptPlanSlot {
52
52
  title?: string;
53
53
  /** Fingerprint of the stimulus as served — a corrected passage changes the question. */
54
54
  stimulusHash: string;
55
+ /**
56
+ * The quiz this slot's question sat in, when the group is an interactive
57
+ * video. Frozen because WHEN a question is asked is part of what is asked:
58
+ * moved from before the passage it is about to after it, the same item is
59
+ * a different question.
60
+ */
61
+ cue?: {
62
+ id: string;
63
+ at: number;
64
+ required?: boolean;
65
+ };
55
66
  };
56
67
  /**
57
68
  * Play budgets in force for this slot when the attempt was planned.
@@ -111,6 +122,12 @@ interface AttemptPlanDrift {
111
122
  changedSlotIds: string[];
112
123
  /** Slots whose item group's stimulus has been edited since the attempt. */
113
124
  changedStimulusSlotIds: string[];
125
+ /**
126
+ * Slots of an interactive video whose question now sits in a different quiz,
127
+ * at a different moment, or under a different `required` — or that gained or
128
+ * lost a quiz altogether. Always empty for content without a timeline.
129
+ */
130
+ changedCueSlotIds: string[];
114
131
  /**
115
132
  * Slots now worth a different number of points. A reweight is a paper
116
133
  * change — it moves the grade without touching a single question — so it
@@ -394,6 +411,19 @@ interface DraftContext {
394
411
  * @throws Error when `newId` returns an empty or repeated id.
395
412
  */
396
413
  declare function createItemGroupDraft(context: DraftContext): ItemGroup;
414
+ /**
415
+ * A new, empty interactive video for an editor to start from: an item group
416
+ * whose stimulus is a video with no file yet, no questions, and a timeline with
417
+ * no quizzes.
418
+ *
419
+ * It is an ordinary item group — {@link validateItemGroupDraft} checks it, and
420
+ * everything that reads groups reads it — because that is what keeps each
421
+ * question its own slot. Like every new draft it is `incomplete`: an untouched
422
+ * draft must never read as finished.
423
+ *
424
+ * @throws Error when `newId` returns an empty or repeated id.
425
+ */
426
+ declare function createInteractiveVideoDraft(context: DraftContext): ItemGroup;
397
427
  /**
398
428
  * Tells an unfinished testlet from a broken one — {@link validateDraft} for the
399
429
  * container that holds several questions around one passage or recording.
@@ -1187,6 +1217,65 @@ interface SeededShuffleOptions {
1187
1217
  */
1188
1218
  declare function seededShuffle<T>(items: readonly T[], seed: string, options?: SeededShuffleOptions): T[];
1189
1219
 
1220
+ /**
1221
+ * Reads a stored {@link MediaProgress}. Never throws: anything that is not one
1222
+ * — a string, a stale shape, an object whose getters throw — answers `null`,
1223
+ * and the player starts from the beginning.
1224
+ *
1225
+ * What it keeps, it clamps. A stored position is host storage, which is input
1226
+ * from a stranger by the time it is read back: a negative `at`, a `furthest`
1227
+ * behind `at`, or a position past the end of a video that has since been
1228
+ * re-cut must not put the playhead somewhere it cannot be. Give `duration`
1229
+ * once the video's metadata is known, and both positions are held inside it.
1230
+ */
1231
+ declare function readMediaProgress(value: unknown, duration?: number): MediaProgress | null;
1232
+ /**
1233
+ * One interactive video's composed result: the scored items whose slot belongs
1234
+ * to the entry, composed as one section of weight 1. A slot belongs when
1235
+ * `entryKeyOf(item.slotId) === entryKey`, so a host can pass a whole attempt's
1236
+ * items and get the video's share of it.
1237
+ *
1238
+ * `entryKey` is the group's `slotKey` when it has one — which every published
1239
+ * video should — or its position in the sequence otherwise. A group object
1240
+ * alone cannot know its position, which is why this takes the key.
1241
+ *
1242
+ * @throws Error when no item belongs to the entry. A mistyped key would
1243
+ * otherwise compose nothing into a `final` result, and a refusal must
1244
+ * never read as a grade.
1245
+ */
1246
+ declare function composeTimelineScore(entryKey: string, items: readonly ScoredItem[], policy: CompositionPolicy): AssessmentScore;
1247
+
1248
+ /**
1249
+ * The bounds of an interactive video — an item group with a `timeline`.
1250
+ *
1251
+ * A leaf module on purpose: the schemas, the authoring checks and the timeline
1252
+ * helpers all read these, and nothing here may import any of them back.
1253
+ */
1254
+ /**
1255
+ * The item types an interactive video may present. CLOSED on purpose: a type
1256
+ * added to the SDK later, or a custom type a host registers, is not silently
1257
+ * embeddable. Each one here was chosen, and each works inside a paused video —
1258
+ * a read-aloud's microphone included, because every quiz pauses the video
1259
+ * first.
1260
+ */
1261
+ declare const INTERACTIVE_VIDEO_ITEM_TYPES: readonly ["multiple-choice", "fill-in-the-blanks", "gap-select", "dictation", "read-aloud"];
1262
+ /** One of {@link INTERACTIVE_VIDEO_ITEM_TYPES}. */
1263
+ type InteractiveVideoItemType = (typeof INTERACTIVE_VIDEO_ITEM_TYPES)[number];
1264
+ /** Whether `type` is one of the item types an interactive video may present. */
1265
+ declare function isInteractiveVideoItemType(type: unknown): type is InteractiveVideoItemType;
1266
+ /** The most quizzes one video may hold. */
1267
+ declare const TIMELINE_MAX_QUIZZES = 100;
1268
+ /**
1269
+ * The most questions one interactive video may hold, across all its quizzes.
1270
+ * The player keeps every one of them mounted, so an answer survives the
1271
+ * learner rewinding past its quiz.
1272
+ */
1273
+ declare const TIMELINE_MAX_ITEMS = 200;
1274
+ /** The most chapters one video may hold. */
1275
+ declare const TIMELINE_MAX_CHAPTERS = 100;
1276
+ /** The longest quiz or chapter title, in UTF-16 units. A title sits on one line of the player. */
1277
+ declare const TIMELINE_MAX_TITLE_LENGTH = 120;
1278
+
1190
1279
  /**
1191
1280
  * All CSS custom property tokens consumed by learning-kit components.
1192
1281
  * Every key maps to a `--lk-*` CSS variable name; every value is a CSS value string.
@@ -1204,6 +1293,13 @@ interface ThemeTokens {
1204
1293
  '--lk-color-error': string;
1205
1294
  '--lk-color-warning': string;
1206
1295
  '--lk-color-focus-ring': string;
1296
+ /**
1297
+ * The accent a video player draws on its own dark chrome: the played part
1298
+ * of the progress bar, quiz markers, the centre play button. Optional, so a
1299
+ * theme written before it existed still type-checks; the default is white,
1300
+ * which reads on any video. Set it to a brand colour to match a product.
1301
+ */
1302
+ '--lk-color-media-accent'?: string;
1207
1303
  '--lk-spacing-xs': string;
1208
1304
  '--lk-spacing-sm': string;
1209
1305
  '--lk-spacing-md': string;
@@ -1223,4 +1319,4 @@ interface ThemeTokens {
1223
1319
  '--lk-transition-base': string;
1224
1320
  }
1225
1321
 
1226
- export { ActivityData, ActivityDataMap, ActivityMedia, ActivitySchemaError, ActivityType, type ActivityTypeAuthoring, type ActivityTypeDescriptor, type ActivityTypeInterop, type ActivityTypeScoring, type AttemptPlan, type AttemptPlanDrift, type AttemptPlanSlot, type AttemptProgress, type AttemptState, CriterionScore, DeferredScoringError, DeferredScoringPartial, DictationData, DictationLearnerResponse, type DraftComplete, type DraftContext, type DraftIssue, type DraftNotComplete, type DraftSeverity, type DraftValidationResult, type FieldPolicy, FillInTheBlanksData, FillInTheBlanksLearnerResponse, type FlattenSequenceOptions, GapSelectData, GapSelectLearnerResponse, type GradeFromRubricOptions, GradeRecord, ItemGroup, ItemOutcome, LearnerResponse, type MediaBudgetRef, type MediaPlayClaim, type MediaPlayGrant, type MediaPlayLedger, type MediaPlayLedgerEntry, type MissingOutcomePolicy, MultipleChoiceData, MultipleChoiceLearnerResponse, NativeControlHint, type PartialScoringResult, type PlanAttemptOptions, type PlannableEntry, ReadAloudData, ReadAloudLearnerResponse, type RedactOptions, type RedactedActivityData, type RedactedItemGroup, RedactedScoringError, type RegisteredActivityTypeDescriptor, type ResolvedPlaybackPolicy, type ResponseDiffEntry, RoundingPolicy, ScoredItem, ScoringResult, type SeededShuffleOptions, type Sensitivity, SequenceEntry, SequenceSlot, type ShuffleVersion, type ThemeTokens, UnknownActivityTypeError, ValidationError, WrittenResponseData, WrittenResponseLearnerResponse, type XAPIInteractionType, assertRedacted, assertRedactedItemGroup, canonicalJson, contentHash, countWords, createDraft, createItemGroupDraft, defineActivityType, dictationType, diffResponses, entryKeyOf, fillInTheBlanksType, fingerprint, flattenSequence, gapSelectType, getActivityTypeDescriptor, gradeFromRubric, hasGrade, hashSeed, isItemGroup, multipleChoiceType, outcomeFromGrade, planAttempt, planMediaBudgets, readAloudType, redact, redactItemGroup, registerActivityType, registeredActivityTypes, resolvePlaybackPolicy, restoreAttemptState, restoreMediaPlayLedger, scoredItemsFromPlan, seededShuffle, serializeAttemptState, serializeMediaPlayLedger, slotMediaKey, stimulusMediaKey, validateDraft, validateItemGroupDraft, verifyAttemptPlan, writtenResponseType };
1322
+ export { ActivityData, ActivityDataMap, ActivityMedia, ActivitySchemaError, ActivityType, type ActivityTypeAuthoring, type ActivityTypeDescriptor, type ActivityTypeInterop, type ActivityTypeScoring, AssessmentScore, type AttemptPlan, type AttemptPlanDrift, type AttemptPlanSlot, type AttemptProgress, type AttemptState, CompositionPolicy, CriterionScore, DeferredScoringError, DeferredScoringPartial, DictationData, DictationLearnerResponse, type DraftComplete, type DraftContext, type DraftIssue, type DraftNotComplete, type DraftSeverity, type DraftValidationResult, type FieldPolicy, FillInTheBlanksData, FillInTheBlanksLearnerResponse, type FlattenSequenceOptions, GapSelectData, GapSelectLearnerResponse, type GradeFromRubricOptions, GradeRecord, INTERACTIVE_VIDEO_ITEM_TYPES, type InteractiveVideoItemType, ItemGroup, ItemOutcome, LearnerResponse, type MediaBudgetRef, type MediaPlayClaim, type MediaPlayGrant, type MediaPlayLedger, type MediaPlayLedgerEntry, MediaProgress, type MissingOutcomePolicy, MultipleChoiceData, MultipleChoiceLearnerResponse, NativeControlHint, type PartialScoringResult, type PlanAttemptOptions, type PlannableEntry, ReadAloudData, ReadAloudLearnerResponse, type RedactOptions, type RedactedActivityData, type RedactedItemGroup, RedactedScoringError, type RegisteredActivityTypeDescriptor, type ResolvedPlaybackPolicy, type ResponseDiffEntry, RoundingPolicy, ScoredItem, ScoringResult, type SeededShuffleOptions, type Sensitivity, SequenceEntry, SequenceSlot, type ShuffleVersion, TIMELINE_MAX_CHAPTERS, TIMELINE_MAX_ITEMS, TIMELINE_MAX_QUIZZES, TIMELINE_MAX_TITLE_LENGTH, type ThemeTokens, UnknownActivityTypeError, ValidationError, WrittenResponseData, WrittenResponseLearnerResponse, type XAPIInteractionType, assertRedacted, assertRedactedItemGroup, canonicalJson, composeTimelineScore, contentHash, countWords, createDraft, createInteractiveVideoDraft, createItemGroupDraft, defineActivityType, dictationType, diffResponses, entryKeyOf, fillInTheBlanksType, fingerprint, flattenSequence, gapSelectType, getActivityTypeDescriptor, gradeFromRubric, hasGrade, hashSeed, isInteractiveVideoItemType, isItemGroup, multipleChoiceType, outcomeFromGrade, planAttempt, planMediaBudgets, readAloudType, readMediaProgress, redact, redactItemGroup, registerActivityType, registeredActivityTypes, resolvePlaybackPolicy, restoreAttemptState, restoreMediaPlayLedger, scoredItemsFromPlan, seededShuffle, serializeAttemptState, serializeMediaPlayLedger, slotMediaKey, stimulusMediaKey, validateDraft, validateItemGroupDraft, verifyAttemptPlan, writtenResponseType };