@lessonkit/core 1.4.0 → 1.5.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/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { p as CourseId, E as LessonId, C as CheckId, B as BlockId, t as IdentityIdPath, v as IdentityValidationResult, N as LessonkitUrn, h as AssessmentResumeState, a0 as StoragePort, a5 as TelemetryEventName, a7 as TelemetrySink, a1 as TelemetryBatchSink, aa as TrackingClient, a3 as TelemetryEvent, a8 as TelemetryUser, J as LessonkitPlugin, U as PluginRegistry, V as ProgressController, S as PluginHost, W as ProgressState, a2 as TelemetryDataFor, i as AssessmentScoreInput, j as AssessmentScoreResult, n as ClockPort, g as AssessmentPlugin, O as LifecyclePlugin, a6 as TelemetryPlugin, K as LessonkitPluginContext } from './testing-BhVGckZ5.cjs';
2
- export { A as AccordionSectionToggledData, a as AssessmentAnsweredData, b as AssessmentBaseProps, c as AssessmentBehaviour, d as AssessmentCompletedData, e as AssessmentHandle, f as AssessmentInteractionType, k as AssessmentXAPIData, l as BookPageViewedData, m as BuildTelemetryEventInput, o as CompoundPageViewedData, q as CourseLifecycleContext, r as CourseLifecycleDeps, F as FlashcardFlippedData, H as HotspotOpenedData, I as ID_MAX_LENGTH, s as ID_PATTERN, u as IdentityValidationIssue, w as ImageSliderChangedData, x as InformationWallSearchData, y as InteractionBlockRegistration, z as InteractionData, D as InteractionPlugin, L as LessonCompletionEmitter, G as LessonLifecycleData, M as LessonkitPluginKind, P as McqAssessmentProps, Q as MemoryCardFlippedData, R as ParallaxSlideViewedData, T as PluginIdentity, X as QuestionnaireSubmittedData, Y as QuizAnsweredData, Z as QuizCompletedData, _ as SESSION_STORAGE_KEY, $ as SlideViewedData, a4 as TelemetryEventBase, a9 as TimerPort, ab as VideoCueReachedData, ac as VideoSegmentCompletedData, ad as buildCourseStartedTelemetryEvent, ae as buildTelemetryEvent, af as completeCourseWithTelemetry, ag as completeLessonWithTelemetry, ah as createDefaultClock, ai as createGlobalTimer, aj as createNoopStorage, ak as createProgressController, al as createSessionStoragePort, am as getTabSessionId, an as hasCourseStarted, ao as hasCourseStartedEmittedToTracking, ap as hasCourseStartedPipelineDelivered, aq as markCourseStarted, ar as markCourseStartedEmittedToTracking, as as markCourseStartedPipelineDelivered, at as migrateCourseStartedMark, av as resetSharedVolatileSessionIdForTests, aw as resetStoragePortForTests, ax as resetTelemetryBuilderWarningsForTests, ay as resolveSessionId, az as tryBuildTelemetryEvent, aA as tryEmitCourseStarted } from './testing-BhVGckZ5.cjs';
1
+ import { C as CourseId, L as LessonId, a as CheckId, B as BlockId, I as IdentityIdPath, b as IdentityValidationResult, c as LessonkitUrn, A as AssessmentResumeState, S as StoragePort, T as TelemetryEventName, d as TelemetrySink, e as TelemetryBatchSink, f as TrackingClient, g as TelemetryEvent, h as TelemetryUser, i as LessonkitPlugin, P as PluginRegistry, j as ProgressController, k as PluginHost, l as ProgressState, m as TelemetryDataFor, n as AssessmentScoreInput, o as AssessmentScoreResult, p as ClockPort, q as AssessmentPlugin, r as LifecyclePlugin, s as TelemetryPlugin, t as LessonkitPluginContext } from './testing-BFr8oEfw.cjs';
2
+ export { u as AccordionSectionToggledData, v as AssessmentAnsweredData, w as AssessmentBaseProps, x as AssessmentBehaviour, y as AssessmentCompletedData, z as AssessmentHandle, D as AssessmentInteractionType, E as AssessmentXAPIData, F as BookPageViewedData, G as BranchNodeViewedData, H as BranchSelectedData, J as BuildTelemetryEventInput, K as CompoundPageViewedData, M as CourseLifecycleContext, N as CourseLifecycleDeps, O as FlashcardFlippedData, Q as HotspotOpenedData, R as ID_MAX_LENGTH, U as ID_PATTERN, V as IdentityValidationIssue, W as ImageSliderChangedData, X as InformationWallSearchData, Y as InteractionBlockRegistration, Z as InteractionData, _ as InteractionPlugin, $ as LessonCompletionEmitter, a0 as LessonLifecycleData, a1 as LessonkitPluginKind, a2 as McqAssessmentProps, a3 as MemoryCardFlippedData, a4 as ParallaxSlideViewedData, a5 as PluginIdentity, a6 as QuestionnaireSubmittedData, a7 as QuizAnsweredData, a8 as QuizCompletedData, a9 as SESSION_STORAGE_KEY, aa as SlideViewedData, ab as TelemetryEventBase, ac as TimerPort, ad as VideoCueReachedData, ae as VideoSegmentCompletedData, af as buildCourseStartedTelemetryEvent, ag as buildTelemetryEvent, ah as completeCourseWithTelemetry, ai as completeLessonWithTelemetry, aj as createDefaultClock, ak as createGlobalTimer, al as createNoopStorage, am as createProgressController, an as createSessionStoragePort, ao as getTabSessionId, ap as hasCourseStarted, aq as hasCourseStartedEmittedToTracking, ar as hasCourseStartedPipelineDelivered, as as hasCourseStartedXapiSent, at as markCourseStarted, au as markCourseStartedEmittedToTracking, av as markCourseStartedPipelineDelivered, aw as markCourseStartedXapiSent, ax as migrateCourseStartedMark, ay as resetSharedVolatileSessionIdForTests, az as resetStoragePortForTests, aA as resetTelemetryBuilderWarningsForTests, aB as resolveSessionId, aC as tryBuildTelemetryEvent, aD as tryEmitCourseStarted } from './testing-BFr8oEfw.cjs';
3
3
 
4
4
  /**
5
5
  * Exhaustiveness helper for switch/default branches.
@@ -28,6 +28,7 @@ type LessonkitUrnParts = {
28
28
  lessonId?: LessonId;
29
29
  checkId?: CheckId;
30
30
  blockId?: BlockId;
31
+ nodeId?: string;
31
32
  };
32
33
  /**
33
34
  * Build a stable LessonKit URN for courses, lessons, checks, and blocks.
@@ -55,7 +56,10 @@ type CompoundResumeInput = {
55
56
  declare function createCompoundResumeState(input?: CompoundResumeInput): CompoundResumeState;
56
57
  /** Clamp page index to valid range for a compound with `pageCount` pages. */
57
58
  declare function clampCompoundPageIndex(index: number, pageCount: number): number;
58
- declare function parseCompoundResumeState(raw: unknown): CompoundResumeState | null;
59
+ type ParseCompoundResumeStateOptions = {
60
+ onDroppedChildKeys?: (keys: string[]) => void;
61
+ };
62
+ declare function parseCompoundResumeState(raw: unknown, opts?: ParseCompoundResumeStateOptions): CompoundResumeState | null;
59
63
  /**
60
64
  * Imperative handle for compound containers (H5P compound analogue).
61
65
  * Parents aggregate child AssessmentHandle scores and persist navigation state.
@@ -74,20 +78,26 @@ type CompoundBaseProps = {
74
78
  };
75
79
 
76
80
  declare function compoundStateStorageKey(courseId: CourseId, compoundId: BlockId): string;
77
- declare function loadCompoundState(storage: StoragePort, courseId: CourseId, compoundId: BlockId): CompoundResumeState | null;
81
+ type LoadCompoundStateOptions = ParseCompoundResumeStateOptions & {
82
+ onCorrupt?: () => void;
83
+ };
84
+ declare function loadCompoundState(storage: StoragePort, courseId: CourseId, compoundId: BlockId, opts?: LoadCompoundStateOptions): CompoundResumeState | null;
78
85
  declare function saveCompoundState(storage: StoragePort, courseId: CourseId, compoundId: BlockId, state: CompoundResumeState): boolean;
79
86
  declare function clearCompoundState(storage: StoragePort, courseId: CourseId, compoundId: BlockId): void;
80
87
 
81
88
  /** Canonical compound child allowlists (H5P sub-content curation). */
82
- declare const PAGE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Video", "Scenario", "Reflection", "Quiz", "KnowledgeCheck", "TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz", "Accordion", "DialogCards", "Flashcards", "ImageHotspots", "FindHotspot", "FindMultipleHotspots", "ImageSlider", "ProgressTracker"];
89
+ declare const PAGE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Video", "Scenario", "Reflection", "Quiz", "KnowledgeCheck", "TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz", "Accordion", "DialogCards", "Flashcards", "ImageHotspots", "FindHotspot", "FindMultipleHotspots", "ImageSlider", "Embed", "Chart", "ProgressTracker"];
90
+ /** Branch node content (Page-like minus ProgressTracker). */
91
+ declare const BRANCH_NODE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Video", "Scenario", "Reflection", "Quiz", "KnowledgeCheck", "TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz", "Accordion", "DialogCards", "Flashcards", "ImageHotspots", "FindHotspot", "FindMultipleHotspots", "ImageSlider", "Embed", "Chart", "BranchChoice"];
92
+ declare const BRANCHING_SCENARIO_ALLOWED_CHILD_TYPES: readonly ["BranchNode"];
83
93
  declare const INTERACTIVE_BOOK_ALLOWED_CHILD_TYPES: readonly ["Page"];
84
94
  /** Per-slide content (H5P Course Presentation slide row). Excludes ProgressTracker. */
85
- declare const SLIDE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Video", "Scenario", "Reflection", "Quiz", "KnowledgeCheck", "TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz", "Accordion", "DialogCards", "Flashcards", "ImageHotspots", "FindHotspot", "FindMultipleHotspots", "ImageSlider"];
95
+ declare const SLIDE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Video", "Scenario", "Reflection", "Quiz", "KnowledgeCheck", "TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz", "Accordion", "DialogCards", "Flashcards", "ImageHotspots", "FindHotspot", "FindMultipleHotspots", "ImageSlider", "Embed", "Chart"];
86
96
  declare const SLIDE_DECK_ALLOWED_CHILD_TYPES: readonly ["Slide"];
87
97
  declare const TIMED_CUE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Quiz", "TrueFalse", "FillInTheBlanks", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "Questionnaire", "Essay", "ArithmeticQuiz"];
88
98
  declare const INTERACTIVE_VIDEO_ALLOWED_CHILD_TYPES: readonly ["TimedCue"];
89
99
  declare const ASSESSMENT_SEQUENCE_ALLOWED_CHILD_TYPES: readonly ["TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Quiz", "KnowledgeCheck", "FindHotspot", "FindMultipleHotspots", "Summary", "ImagePairing", "ImageSequencing", "ArithmeticQuiz", "Essay"];
90
- type CompoundParentType = "Page" | "InteractiveBook" | "Slide" | "SlideDeck" | "TimedCue" | "InteractiveVideo" | "AssessmentSequence";
100
+ type CompoundParentType = "Page" | "InteractiveBook" | "Slide" | "SlideDeck" | "TimedCue" | "InteractiveVideo" | "AssessmentSequence" | "BranchingScenario" | "BranchNode";
91
101
  declare const COMPOUND_MAX_NESTING_DEPTH: Record<CompoundParentType, number>;
92
102
  declare function getAllowedChildTypes(parent: CompoundParentType): readonly string[];
93
103
  declare function isChildTypeAllowed(parent: CompoundParentType, childType: string): boolean;
@@ -96,6 +106,24 @@ declare const ACCORDION_FORBIDDEN_CHILD_TYPES: readonly ["Accordion"];
96
106
  /** New 1.4 blocks added to Page and Slide allowlists (for docs/tests). */
97
107
  declare const BLOCKS_14_PAGE_SLIDE: readonly ["Video", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz"];
98
108
 
109
+ type BranchGraphNodeInput = {
110
+ nodeId: string;
111
+ choices: readonly {
112
+ targetNodeId: string;
113
+ }[];
114
+ };
115
+ type BranchGraphValidationIssue = {
116
+ code: "duplicate_node_id" | "start_not_found" | "start_no_choices" | "unknown_target" | "unreachable_node" | "empty_graph";
117
+ message: string;
118
+ nodeId?: string;
119
+ };
120
+ type BranchGraphValidationResult = {
121
+ ok: boolean;
122
+ issues: BranchGraphValidationIssue[];
123
+ reachableNodeIds: string[];
124
+ };
125
+ declare function validateBranchGraph(startNodeId: string, nodes: readonly BranchGraphNodeInput[]): BranchGraphValidationResult;
126
+
99
127
  declare const telemetryCatalogVersion: 1;
100
128
  type TelemetryCatalogEntry = {
101
129
  name: TelemetryEventName;
@@ -121,7 +149,7 @@ declare const TELEMETRY_EVENT_CATALOG_V2: TelemetryCatalogV2Entry[];
121
149
  declare function buildTelemetryCatalogV2(): TelemetryCatalogV2Entry[];
122
150
 
123
151
  declare const telemetryCatalogV3Version: 3;
124
- type TelemetryCatalogV3EventName = Extract<TelemetryEventName, "book_page_viewed" | "slide_viewed" | "compound_page_viewed" | "hotspot_opened" | "accordion_section_toggled" | "flashcard_flipped" | "image_slider_changed" | "video_cue_reached" | "video_segment_completed" | "memory_card_flipped" | "information_wall_search" | "parallax_slide_viewed" | "questionnaire_submitted">;
152
+ type TelemetryCatalogV3EventName = Extract<TelemetryEventName, "book_page_viewed" | "slide_viewed" | "compound_page_viewed" | "hotspot_opened" | "accordion_section_toggled" | "flashcard_flipped" | "image_slider_changed" | "video_cue_reached" | "video_segment_completed" | "memory_card_flipped" | "information_wall_search" | "parallax_slide_viewed" | "questionnaire_submitted" | "branch_node_viewed" | "branch_selected">;
125
153
  type TelemetryCatalogV3Entry = {
126
154
  name: TelemetryCatalogV3EventName;
127
155
  description: string;
@@ -133,6 +161,14 @@ type TelemetryCatalogV3Entry = {
133
161
  declare const TELEMETRY_EVENT_CATALOG_V3: TelemetryCatalogV3Entry[];
134
162
  declare function buildTelemetryCatalogV3(): TelemetryCatalogV3Entry[];
135
163
 
164
+ /**
165
+ * Creates a client that buffers telemetry and flushes in batches.
166
+ *
167
+ * **Delivery semantics:** batch mode is at-least-once. A failed flush re-queues the batch for
168
+ * retry; `flushOnExit` and periodic flushes may deliver the same events more than once unless
169
+ * the sink deduplicates. Events currently owned by an in-flight `batchSink` call are not included
170
+ * in `flushOnExit` to avoid duplicate delivery on page unload.
171
+ */
136
172
  declare function createTrackingClient(opts?: {
137
173
  sink?: TelemetrySink;
138
174
  batch?: {
@@ -165,6 +201,7 @@ type TelemetryPipeline = {
165
201
  readonly sinks: readonly TelemetryPipelineSink[];
166
202
  emit(event: TelemetryEvent, ctx?: EmitContext): void | Promise<void>;
167
203
  };
204
+ declare function isLifecycleTelemetryEvent(name: TelemetryEventName): boolean;
168
205
  declare function createTelemetryPipeline(sinks: TelemetryPipelineSink[]): TelemetryPipeline;
169
206
  declare function createTrackingPipelineSink(id: string, track: (event: TelemetryEvent) => void): TelemetryPipelineSink;
170
207
 
@@ -178,6 +215,8 @@ type HeadlessLessonkitConfig = {
178
215
  attemptId?: string;
179
216
  user?: TelemetryUser;
180
217
  };
218
+ /** When true (default), switching lessons auto-completes the previous in-progress lesson. */
219
+ autoCompleteOnLessonSwitch?: boolean;
181
220
  /** Plugin list or registry; hooks run on {@link HeadlessLessonkitRuntime.track} and lifecycle emits. */
182
221
  plugins?: HeadlessLessonkitPlugins;
183
222
  /** When true, skip initial {@link PluginHost.setupAll}; host caller runs setup (React v2 provider). */
@@ -187,9 +226,8 @@ type HeadlessRuntimePorts = {
187
226
  storage?: StoragePort;
188
227
  clock?: ClockPort;
189
228
  };
190
- type TelemetryEmitFn = {
191
- <N extends TelemetryEventName>(name: N, data?: TelemetryDataFor<N>, lessonId?: LessonId): void;
192
- };
229
+ /** Delivers a fully-built lifecycle telemetry event (plugins already applied). */
230
+ type TelemetryEmitFn = (event: TelemetryEvent) => void;
193
231
  type HeadlessLessonkitRuntime = {
194
232
  readonly config: HeadlessLessonkitConfig;
195
233
  readonly progress: ProgressController;
@@ -201,6 +239,8 @@ type HeadlessLessonkitRuntime = {
201
239
  user?: TelemetryUser;
202
240
  };
203
241
  updateConfig: (next: Partial<HeadlessLessonkitConfig>) => void;
242
+ /** Move course-started dedupe marks between session ids (e.g. LMS anonymous → authenticated handoff). */
243
+ migrateSessionMarks: (fromSessionId: string, toSessionId: string) => void;
204
244
  setActiveLesson: (lessonId: LessonId, emit: TelemetryEmitFn) => void;
205
245
  completeLesson: (lessonId: LessonId, emit: TelemetryEmitFn) => void;
206
246
  completeCourse: (emit: TelemetryEmitFn) => void;
@@ -209,6 +249,10 @@ type HeadlessLessonkitRuntime = {
209
249
  resetForCourseChange: (courseId: CourseId) => void;
210
250
  dispose: () => void;
211
251
  };
252
+ /**
253
+ * Create a headless LessonKit runtime for non-React tooling and tests.
254
+ * Powers `LessonkitProvider` from `@lessonkit/react` when `runtimeVersion` is `"v2"` (default).
255
+ */
212
256
  declare function createLessonkitRuntime(config: HeadlessLessonkitConfig, ports?: HeadlessRuntimePorts): HeadlessLessonkitRuntime;
213
257
 
214
258
  declare function createPluginRegistry(plugins?: readonly LessonkitPlugin[]): PluginRegistry;
@@ -227,4 +271,4 @@ declare function buildPluginContext(opts: {
227
271
  user?: TelemetryUser;
228
272
  }): LessonkitPluginContext;
229
273
 
230
- export { ACCORDION_FORBIDDEN_CHILD_TYPES, ASSESSMENT_SEQUENCE_ALLOWED_CHILD_TYPES, AssessmentPlugin, AssessmentResumeState, AssessmentScoreInput, AssessmentScoreResult, BLOCKS_14_PAGE_SLIDE, BlockId, COMPOUND_MAX_NESTING_DEPTH, COMPOUND_RESUME_SCHEMA_VERSION, CheckId, ClockPort, type CompoundBaseProps, type CompoundHandle, type CompoundParentType, type CompoundResumeInput, type CompoundResumeState, CourseId, type EmitContext, type HeadlessLessonkitConfig, type HeadlessLessonkitRuntime, type HeadlessRuntimePorts, INTERACTIVE_BOOK_ALLOWED_CHILD_TYPES, INTERACTIVE_VIDEO_ALLOWED_CHILD_TYPES, IdentityIdPath, IdentityValidationResult, LessonId, LessonkitPlugin, LessonkitPluginContext, type LessonkitRuntimeVersion, LessonkitUrn, type LessonkitUrnParts, LifecyclePlugin, type LmsBridgeMode, PAGE_ALLOWED_CHILD_TYPES, PluginHost, PluginRegistry, ProgressController, ProgressState, SLIDE_ALLOWED_CHILD_TYPES, SLIDE_DECK_ALLOWED_CHILD_TYPES, StoragePort, TELEMETRY_EVENT_CATALOG, TELEMETRY_EVENT_CATALOG_V2, TELEMETRY_EVENT_CATALOG_V3, TIMED_CUE_ALLOWED_CHILD_TYPES, TelemetryBatchSink, type TelemetryCatalogEntry, type TelemetryCatalogV2Entry, type TelemetryCatalogV3Entry, TelemetryDataFor, type TelemetryEmitFn, TelemetryEvent, TelemetryEventName, type TelemetryPipeline, type TelemetryPipelineSink, TelemetryPlugin, TelemetrySink, TelemetryUser, TrackingClient, assertNever, assertValidId, buildLessonkitUrn, buildPluginContext, buildTelemetryCatalog, buildTelemetryCatalogV2, buildTelemetryCatalogV3, clampCompoundPageIndex, clearCompoundState, compoundStateStorageKey, createCompoundResumeState, createLessonkitRuntime, createPluginRegistry, createSessionId, createTelemetryPipeline, createTrackingClient, createTrackingPipelineSink, defineAssessmentPlugin, defineLifecyclePlugin, defineTelemetryPlugin, deriveId, getAllowedChildTypes, isChildTypeAllowed, loadCompoundState, nowIso, parseBlockId, parseCheckId, parseCompoundResumeState, parseCourseId, parseLessonId, saveCompoundState, slugifyId, telemetryCatalogV2Version, telemetryCatalogV3Version, telemetryCatalogVersion, validateId };
274
+ export { ACCORDION_FORBIDDEN_CHILD_TYPES, ASSESSMENT_SEQUENCE_ALLOWED_CHILD_TYPES, AssessmentPlugin, AssessmentResumeState, AssessmentScoreInput, AssessmentScoreResult, BLOCKS_14_PAGE_SLIDE, BRANCHING_SCENARIO_ALLOWED_CHILD_TYPES, BRANCH_NODE_ALLOWED_CHILD_TYPES, BlockId, type BranchGraphNodeInput, type BranchGraphValidationIssue, type BranchGraphValidationResult, COMPOUND_MAX_NESTING_DEPTH, COMPOUND_RESUME_SCHEMA_VERSION, CheckId, ClockPort, type CompoundBaseProps, type CompoundHandle, type CompoundParentType, type CompoundResumeInput, type CompoundResumeState, CourseId, type EmitContext, type HeadlessLessonkitConfig, type HeadlessLessonkitRuntime, type HeadlessRuntimePorts, INTERACTIVE_BOOK_ALLOWED_CHILD_TYPES, INTERACTIVE_VIDEO_ALLOWED_CHILD_TYPES, IdentityIdPath, IdentityValidationResult, LessonId, LessonkitPlugin, LessonkitPluginContext, type LessonkitRuntimeVersion, LessonkitUrn, type LessonkitUrnParts, LifecyclePlugin, type LmsBridgeMode, type LoadCompoundStateOptions, PAGE_ALLOWED_CHILD_TYPES, type ParseCompoundResumeStateOptions, PluginHost, PluginRegistry, ProgressController, ProgressState, SLIDE_ALLOWED_CHILD_TYPES, SLIDE_DECK_ALLOWED_CHILD_TYPES, StoragePort, TELEMETRY_EVENT_CATALOG, TELEMETRY_EVENT_CATALOG_V2, TELEMETRY_EVENT_CATALOG_V3, TIMED_CUE_ALLOWED_CHILD_TYPES, TelemetryBatchSink, type TelemetryCatalogEntry, type TelemetryCatalogV2Entry, type TelemetryCatalogV3Entry, TelemetryDataFor, type TelemetryEmitFn, TelemetryEvent, TelemetryEventName, type TelemetryPipeline, type TelemetryPipelineSink, TelemetryPlugin, TelemetrySink, TelemetryUser, TrackingClient, assertNever, assertValidId, buildLessonkitUrn, buildPluginContext, buildTelemetryCatalog, buildTelemetryCatalogV2, buildTelemetryCatalogV3, clampCompoundPageIndex, clearCompoundState, compoundStateStorageKey, createCompoundResumeState, createLessonkitRuntime, createPluginRegistry, createSessionId, createTelemetryPipeline, createTrackingClient, createTrackingPipelineSink, defineAssessmentPlugin, defineLifecyclePlugin, defineTelemetryPlugin, deriveId, getAllowedChildTypes, isChildTypeAllowed, isLifecycleTelemetryEvent, loadCompoundState, nowIso, parseBlockId, parseCheckId, parseCompoundResumeState, parseCourseId, parseLessonId, saveCompoundState, slugifyId, telemetryCatalogV2Version, telemetryCatalogV3Version, telemetryCatalogVersion, validateBranchGraph, validateId };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { p as CourseId, E as LessonId, C as CheckId, B as BlockId, t as IdentityIdPath, v as IdentityValidationResult, N as LessonkitUrn, h as AssessmentResumeState, a0 as StoragePort, a5 as TelemetryEventName, a7 as TelemetrySink, a1 as TelemetryBatchSink, aa as TrackingClient, a3 as TelemetryEvent, a8 as TelemetryUser, J as LessonkitPlugin, U as PluginRegistry, V as ProgressController, S as PluginHost, W as ProgressState, a2 as TelemetryDataFor, i as AssessmentScoreInput, j as AssessmentScoreResult, n as ClockPort, g as AssessmentPlugin, O as LifecyclePlugin, a6 as TelemetryPlugin, K as LessonkitPluginContext } from './testing-BhVGckZ5.js';
2
- export { A as AccordionSectionToggledData, a as AssessmentAnsweredData, b as AssessmentBaseProps, c as AssessmentBehaviour, d as AssessmentCompletedData, e as AssessmentHandle, f as AssessmentInteractionType, k as AssessmentXAPIData, l as BookPageViewedData, m as BuildTelemetryEventInput, o as CompoundPageViewedData, q as CourseLifecycleContext, r as CourseLifecycleDeps, F as FlashcardFlippedData, H as HotspotOpenedData, I as ID_MAX_LENGTH, s as ID_PATTERN, u as IdentityValidationIssue, w as ImageSliderChangedData, x as InformationWallSearchData, y as InteractionBlockRegistration, z as InteractionData, D as InteractionPlugin, L as LessonCompletionEmitter, G as LessonLifecycleData, M as LessonkitPluginKind, P as McqAssessmentProps, Q as MemoryCardFlippedData, R as ParallaxSlideViewedData, T as PluginIdentity, X as QuestionnaireSubmittedData, Y as QuizAnsweredData, Z as QuizCompletedData, _ as SESSION_STORAGE_KEY, $ as SlideViewedData, a4 as TelemetryEventBase, a9 as TimerPort, ab as VideoCueReachedData, ac as VideoSegmentCompletedData, ad as buildCourseStartedTelemetryEvent, ae as buildTelemetryEvent, af as completeCourseWithTelemetry, ag as completeLessonWithTelemetry, ah as createDefaultClock, ai as createGlobalTimer, aj as createNoopStorage, ak as createProgressController, al as createSessionStoragePort, am as getTabSessionId, an as hasCourseStarted, ao as hasCourseStartedEmittedToTracking, ap as hasCourseStartedPipelineDelivered, aq as markCourseStarted, ar as markCourseStartedEmittedToTracking, as as markCourseStartedPipelineDelivered, at as migrateCourseStartedMark, av as resetSharedVolatileSessionIdForTests, aw as resetStoragePortForTests, ax as resetTelemetryBuilderWarningsForTests, ay as resolveSessionId, az as tryBuildTelemetryEvent, aA as tryEmitCourseStarted } from './testing-BhVGckZ5.js';
1
+ import { C as CourseId, L as LessonId, a as CheckId, B as BlockId, I as IdentityIdPath, b as IdentityValidationResult, c as LessonkitUrn, A as AssessmentResumeState, S as StoragePort, T as TelemetryEventName, d as TelemetrySink, e as TelemetryBatchSink, f as TrackingClient, g as TelemetryEvent, h as TelemetryUser, i as LessonkitPlugin, P as PluginRegistry, j as ProgressController, k as PluginHost, l as ProgressState, m as TelemetryDataFor, n as AssessmentScoreInput, o as AssessmentScoreResult, p as ClockPort, q as AssessmentPlugin, r as LifecyclePlugin, s as TelemetryPlugin, t as LessonkitPluginContext } from './testing-BFr8oEfw.js';
2
+ export { u as AccordionSectionToggledData, v as AssessmentAnsweredData, w as AssessmentBaseProps, x as AssessmentBehaviour, y as AssessmentCompletedData, z as AssessmentHandle, D as AssessmentInteractionType, E as AssessmentXAPIData, F as BookPageViewedData, G as BranchNodeViewedData, H as BranchSelectedData, J as BuildTelemetryEventInput, K as CompoundPageViewedData, M as CourseLifecycleContext, N as CourseLifecycleDeps, O as FlashcardFlippedData, Q as HotspotOpenedData, R as ID_MAX_LENGTH, U as ID_PATTERN, V as IdentityValidationIssue, W as ImageSliderChangedData, X as InformationWallSearchData, Y as InteractionBlockRegistration, Z as InteractionData, _ as InteractionPlugin, $ as LessonCompletionEmitter, a0 as LessonLifecycleData, a1 as LessonkitPluginKind, a2 as McqAssessmentProps, a3 as MemoryCardFlippedData, a4 as ParallaxSlideViewedData, a5 as PluginIdentity, a6 as QuestionnaireSubmittedData, a7 as QuizAnsweredData, a8 as QuizCompletedData, a9 as SESSION_STORAGE_KEY, aa as SlideViewedData, ab as TelemetryEventBase, ac as TimerPort, ad as VideoCueReachedData, ae as VideoSegmentCompletedData, af as buildCourseStartedTelemetryEvent, ag as buildTelemetryEvent, ah as completeCourseWithTelemetry, ai as completeLessonWithTelemetry, aj as createDefaultClock, ak as createGlobalTimer, al as createNoopStorage, am as createProgressController, an as createSessionStoragePort, ao as getTabSessionId, ap as hasCourseStarted, aq as hasCourseStartedEmittedToTracking, ar as hasCourseStartedPipelineDelivered, as as hasCourseStartedXapiSent, at as markCourseStarted, au as markCourseStartedEmittedToTracking, av as markCourseStartedPipelineDelivered, aw as markCourseStartedXapiSent, ax as migrateCourseStartedMark, ay as resetSharedVolatileSessionIdForTests, az as resetStoragePortForTests, aA as resetTelemetryBuilderWarningsForTests, aB as resolveSessionId, aC as tryBuildTelemetryEvent, aD as tryEmitCourseStarted } from './testing-BFr8oEfw.js';
3
3
 
4
4
  /**
5
5
  * Exhaustiveness helper for switch/default branches.
@@ -28,6 +28,7 @@ type LessonkitUrnParts = {
28
28
  lessonId?: LessonId;
29
29
  checkId?: CheckId;
30
30
  blockId?: BlockId;
31
+ nodeId?: string;
31
32
  };
32
33
  /**
33
34
  * Build a stable LessonKit URN for courses, lessons, checks, and blocks.
@@ -55,7 +56,10 @@ type CompoundResumeInput = {
55
56
  declare function createCompoundResumeState(input?: CompoundResumeInput): CompoundResumeState;
56
57
  /** Clamp page index to valid range for a compound with `pageCount` pages. */
57
58
  declare function clampCompoundPageIndex(index: number, pageCount: number): number;
58
- declare function parseCompoundResumeState(raw: unknown): CompoundResumeState | null;
59
+ type ParseCompoundResumeStateOptions = {
60
+ onDroppedChildKeys?: (keys: string[]) => void;
61
+ };
62
+ declare function parseCompoundResumeState(raw: unknown, opts?: ParseCompoundResumeStateOptions): CompoundResumeState | null;
59
63
  /**
60
64
  * Imperative handle for compound containers (H5P compound analogue).
61
65
  * Parents aggregate child AssessmentHandle scores and persist navigation state.
@@ -74,20 +78,26 @@ type CompoundBaseProps = {
74
78
  };
75
79
 
76
80
  declare function compoundStateStorageKey(courseId: CourseId, compoundId: BlockId): string;
77
- declare function loadCompoundState(storage: StoragePort, courseId: CourseId, compoundId: BlockId): CompoundResumeState | null;
81
+ type LoadCompoundStateOptions = ParseCompoundResumeStateOptions & {
82
+ onCorrupt?: () => void;
83
+ };
84
+ declare function loadCompoundState(storage: StoragePort, courseId: CourseId, compoundId: BlockId, opts?: LoadCompoundStateOptions): CompoundResumeState | null;
78
85
  declare function saveCompoundState(storage: StoragePort, courseId: CourseId, compoundId: BlockId, state: CompoundResumeState): boolean;
79
86
  declare function clearCompoundState(storage: StoragePort, courseId: CourseId, compoundId: BlockId): void;
80
87
 
81
88
  /** Canonical compound child allowlists (H5P sub-content curation). */
82
- declare const PAGE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Video", "Scenario", "Reflection", "Quiz", "KnowledgeCheck", "TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz", "Accordion", "DialogCards", "Flashcards", "ImageHotspots", "FindHotspot", "FindMultipleHotspots", "ImageSlider", "ProgressTracker"];
89
+ declare const PAGE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Video", "Scenario", "Reflection", "Quiz", "KnowledgeCheck", "TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz", "Accordion", "DialogCards", "Flashcards", "ImageHotspots", "FindHotspot", "FindMultipleHotspots", "ImageSlider", "Embed", "Chart", "ProgressTracker"];
90
+ /** Branch node content (Page-like minus ProgressTracker). */
91
+ declare const BRANCH_NODE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Video", "Scenario", "Reflection", "Quiz", "KnowledgeCheck", "TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz", "Accordion", "DialogCards", "Flashcards", "ImageHotspots", "FindHotspot", "FindMultipleHotspots", "ImageSlider", "Embed", "Chart", "BranchChoice"];
92
+ declare const BRANCHING_SCENARIO_ALLOWED_CHILD_TYPES: readonly ["BranchNode"];
83
93
  declare const INTERACTIVE_BOOK_ALLOWED_CHILD_TYPES: readonly ["Page"];
84
94
  /** Per-slide content (H5P Course Presentation slide row). Excludes ProgressTracker. */
85
- declare const SLIDE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Video", "Scenario", "Reflection", "Quiz", "KnowledgeCheck", "TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz", "Accordion", "DialogCards", "Flashcards", "ImageHotspots", "FindHotspot", "FindMultipleHotspots", "ImageSlider"];
95
+ declare const SLIDE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Video", "Scenario", "Reflection", "Quiz", "KnowledgeCheck", "TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz", "Accordion", "DialogCards", "Flashcards", "ImageHotspots", "FindHotspot", "FindMultipleHotspots", "ImageSlider", "Embed", "Chart"];
86
96
  declare const SLIDE_DECK_ALLOWED_CHILD_TYPES: readonly ["Slide"];
87
97
  declare const TIMED_CUE_ALLOWED_CHILD_TYPES: readonly ["Text", "Heading", "Image", "Quiz", "TrueFalse", "FillInTheBlanks", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "Questionnaire", "Essay", "ArithmeticQuiz"];
88
98
  declare const INTERACTIVE_VIDEO_ALLOWED_CHILD_TYPES: readonly ["TimedCue"];
89
99
  declare const ASSESSMENT_SEQUENCE_ALLOWED_CHILD_TYPES: readonly ["TrueFalse", "FillInTheBlanks", "DragAndDrop", "DragTheWords", "MarkTheWords", "Quiz", "KnowledgeCheck", "FindHotspot", "FindMultipleHotspots", "Summary", "ImagePairing", "ImageSequencing", "ArithmeticQuiz", "Essay"];
90
- type CompoundParentType = "Page" | "InteractiveBook" | "Slide" | "SlideDeck" | "TimedCue" | "InteractiveVideo" | "AssessmentSequence";
100
+ type CompoundParentType = "Page" | "InteractiveBook" | "Slide" | "SlideDeck" | "TimedCue" | "InteractiveVideo" | "AssessmentSequence" | "BranchingScenario" | "BranchNode";
91
101
  declare const COMPOUND_MAX_NESTING_DEPTH: Record<CompoundParentType, number>;
92
102
  declare function getAllowedChildTypes(parent: CompoundParentType): readonly string[];
93
103
  declare function isChildTypeAllowed(parent: CompoundParentType, childType: string): boolean;
@@ -96,6 +106,24 @@ declare const ACCORDION_FORBIDDEN_CHILD_TYPES: readonly ["Accordion"];
96
106
  /** New 1.4 blocks added to Page and Slide allowlists (for docs/tests). */
97
107
  declare const BLOCKS_14_PAGE_SLIDE: readonly ["Video", "Summary", "ImagePairing", "ImageSequencing", "MemoryGame", "InformationWall", "ParallaxSlideshow", "Questionnaire", "Essay", "ArithmeticQuiz"];
98
108
 
109
+ type BranchGraphNodeInput = {
110
+ nodeId: string;
111
+ choices: readonly {
112
+ targetNodeId: string;
113
+ }[];
114
+ };
115
+ type BranchGraphValidationIssue = {
116
+ code: "duplicate_node_id" | "start_not_found" | "start_no_choices" | "unknown_target" | "unreachable_node" | "empty_graph";
117
+ message: string;
118
+ nodeId?: string;
119
+ };
120
+ type BranchGraphValidationResult = {
121
+ ok: boolean;
122
+ issues: BranchGraphValidationIssue[];
123
+ reachableNodeIds: string[];
124
+ };
125
+ declare function validateBranchGraph(startNodeId: string, nodes: readonly BranchGraphNodeInput[]): BranchGraphValidationResult;
126
+
99
127
  declare const telemetryCatalogVersion: 1;
100
128
  type TelemetryCatalogEntry = {
101
129
  name: TelemetryEventName;
@@ -121,7 +149,7 @@ declare const TELEMETRY_EVENT_CATALOG_V2: TelemetryCatalogV2Entry[];
121
149
  declare function buildTelemetryCatalogV2(): TelemetryCatalogV2Entry[];
122
150
 
123
151
  declare const telemetryCatalogV3Version: 3;
124
- type TelemetryCatalogV3EventName = Extract<TelemetryEventName, "book_page_viewed" | "slide_viewed" | "compound_page_viewed" | "hotspot_opened" | "accordion_section_toggled" | "flashcard_flipped" | "image_slider_changed" | "video_cue_reached" | "video_segment_completed" | "memory_card_flipped" | "information_wall_search" | "parallax_slide_viewed" | "questionnaire_submitted">;
152
+ type TelemetryCatalogV3EventName = Extract<TelemetryEventName, "book_page_viewed" | "slide_viewed" | "compound_page_viewed" | "hotspot_opened" | "accordion_section_toggled" | "flashcard_flipped" | "image_slider_changed" | "video_cue_reached" | "video_segment_completed" | "memory_card_flipped" | "information_wall_search" | "parallax_slide_viewed" | "questionnaire_submitted" | "branch_node_viewed" | "branch_selected">;
125
153
  type TelemetryCatalogV3Entry = {
126
154
  name: TelemetryCatalogV3EventName;
127
155
  description: string;
@@ -133,6 +161,14 @@ type TelemetryCatalogV3Entry = {
133
161
  declare const TELEMETRY_EVENT_CATALOG_V3: TelemetryCatalogV3Entry[];
134
162
  declare function buildTelemetryCatalogV3(): TelemetryCatalogV3Entry[];
135
163
 
164
+ /**
165
+ * Creates a client that buffers telemetry and flushes in batches.
166
+ *
167
+ * **Delivery semantics:** batch mode is at-least-once. A failed flush re-queues the batch for
168
+ * retry; `flushOnExit` and periodic flushes may deliver the same events more than once unless
169
+ * the sink deduplicates. Events currently owned by an in-flight `batchSink` call are not included
170
+ * in `flushOnExit` to avoid duplicate delivery on page unload.
171
+ */
136
172
  declare function createTrackingClient(opts?: {
137
173
  sink?: TelemetrySink;
138
174
  batch?: {
@@ -165,6 +201,7 @@ type TelemetryPipeline = {
165
201
  readonly sinks: readonly TelemetryPipelineSink[];
166
202
  emit(event: TelemetryEvent, ctx?: EmitContext): void | Promise<void>;
167
203
  };
204
+ declare function isLifecycleTelemetryEvent(name: TelemetryEventName): boolean;
168
205
  declare function createTelemetryPipeline(sinks: TelemetryPipelineSink[]): TelemetryPipeline;
169
206
  declare function createTrackingPipelineSink(id: string, track: (event: TelemetryEvent) => void): TelemetryPipelineSink;
170
207
 
@@ -178,6 +215,8 @@ type HeadlessLessonkitConfig = {
178
215
  attemptId?: string;
179
216
  user?: TelemetryUser;
180
217
  };
218
+ /** When true (default), switching lessons auto-completes the previous in-progress lesson. */
219
+ autoCompleteOnLessonSwitch?: boolean;
181
220
  /** Plugin list or registry; hooks run on {@link HeadlessLessonkitRuntime.track} and lifecycle emits. */
182
221
  plugins?: HeadlessLessonkitPlugins;
183
222
  /** When true, skip initial {@link PluginHost.setupAll}; host caller runs setup (React v2 provider). */
@@ -187,9 +226,8 @@ type HeadlessRuntimePorts = {
187
226
  storage?: StoragePort;
188
227
  clock?: ClockPort;
189
228
  };
190
- type TelemetryEmitFn = {
191
- <N extends TelemetryEventName>(name: N, data?: TelemetryDataFor<N>, lessonId?: LessonId): void;
192
- };
229
+ /** Delivers a fully-built lifecycle telemetry event (plugins already applied). */
230
+ type TelemetryEmitFn = (event: TelemetryEvent) => void;
193
231
  type HeadlessLessonkitRuntime = {
194
232
  readonly config: HeadlessLessonkitConfig;
195
233
  readonly progress: ProgressController;
@@ -201,6 +239,8 @@ type HeadlessLessonkitRuntime = {
201
239
  user?: TelemetryUser;
202
240
  };
203
241
  updateConfig: (next: Partial<HeadlessLessonkitConfig>) => void;
242
+ /** Move course-started dedupe marks between session ids (e.g. LMS anonymous → authenticated handoff). */
243
+ migrateSessionMarks: (fromSessionId: string, toSessionId: string) => void;
204
244
  setActiveLesson: (lessonId: LessonId, emit: TelemetryEmitFn) => void;
205
245
  completeLesson: (lessonId: LessonId, emit: TelemetryEmitFn) => void;
206
246
  completeCourse: (emit: TelemetryEmitFn) => void;
@@ -209,6 +249,10 @@ type HeadlessLessonkitRuntime = {
209
249
  resetForCourseChange: (courseId: CourseId) => void;
210
250
  dispose: () => void;
211
251
  };
252
+ /**
253
+ * Create a headless LessonKit runtime for non-React tooling and tests.
254
+ * Powers `LessonkitProvider` from `@lessonkit/react` when `runtimeVersion` is `"v2"` (default).
255
+ */
212
256
  declare function createLessonkitRuntime(config: HeadlessLessonkitConfig, ports?: HeadlessRuntimePorts): HeadlessLessonkitRuntime;
213
257
 
214
258
  declare function createPluginRegistry(plugins?: readonly LessonkitPlugin[]): PluginRegistry;
@@ -227,4 +271,4 @@ declare function buildPluginContext(opts: {
227
271
  user?: TelemetryUser;
228
272
  }): LessonkitPluginContext;
229
273
 
230
- export { ACCORDION_FORBIDDEN_CHILD_TYPES, ASSESSMENT_SEQUENCE_ALLOWED_CHILD_TYPES, AssessmentPlugin, AssessmentResumeState, AssessmentScoreInput, AssessmentScoreResult, BLOCKS_14_PAGE_SLIDE, BlockId, COMPOUND_MAX_NESTING_DEPTH, COMPOUND_RESUME_SCHEMA_VERSION, CheckId, ClockPort, type CompoundBaseProps, type CompoundHandle, type CompoundParentType, type CompoundResumeInput, type CompoundResumeState, CourseId, type EmitContext, type HeadlessLessonkitConfig, type HeadlessLessonkitRuntime, type HeadlessRuntimePorts, INTERACTIVE_BOOK_ALLOWED_CHILD_TYPES, INTERACTIVE_VIDEO_ALLOWED_CHILD_TYPES, IdentityIdPath, IdentityValidationResult, LessonId, LessonkitPlugin, LessonkitPluginContext, type LessonkitRuntimeVersion, LessonkitUrn, type LessonkitUrnParts, LifecyclePlugin, type LmsBridgeMode, PAGE_ALLOWED_CHILD_TYPES, PluginHost, PluginRegistry, ProgressController, ProgressState, SLIDE_ALLOWED_CHILD_TYPES, SLIDE_DECK_ALLOWED_CHILD_TYPES, StoragePort, TELEMETRY_EVENT_CATALOG, TELEMETRY_EVENT_CATALOG_V2, TELEMETRY_EVENT_CATALOG_V3, TIMED_CUE_ALLOWED_CHILD_TYPES, TelemetryBatchSink, type TelemetryCatalogEntry, type TelemetryCatalogV2Entry, type TelemetryCatalogV3Entry, TelemetryDataFor, type TelemetryEmitFn, TelemetryEvent, TelemetryEventName, type TelemetryPipeline, type TelemetryPipelineSink, TelemetryPlugin, TelemetrySink, TelemetryUser, TrackingClient, assertNever, assertValidId, buildLessonkitUrn, buildPluginContext, buildTelemetryCatalog, buildTelemetryCatalogV2, buildTelemetryCatalogV3, clampCompoundPageIndex, clearCompoundState, compoundStateStorageKey, createCompoundResumeState, createLessonkitRuntime, createPluginRegistry, createSessionId, createTelemetryPipeline, createTrackingClient, createTrackingPipelineSink, defineAssessmentPlugin, defineLifecyclePlugin, defineTelemetryPlugin, deriveId, getAllowedChildTypes, isChildTypeAllowed, loadCompoundState, nowIso, parseBlockId, parseCheckId, parseCompoundResumeState, parseCourseId, parseLessonId, saveCompoundState, slugifyId, telemetryCatalogV2Version, telemetryCatalogV3Version, telemetryCatalogVersion, validateId };
274
+ export { ACCORDION_FORBIDDEN_CHILD_TYPES, ASSESSMENT_SEQUENCE_ALLOWED_CHILD_TYPES, AssessmentPlugin, AssessmentResumeState, AssessmentScoreInput, AssessmentScoreResult, BLOCKS_14_PAGE_SLIDE, BRANCHING_SCENARIO_ALLOWED_CHILD_TYPES, BRANCH_NODE_ALLOWED_CHILD_TYPES, BlockId, type BranchGraphNodeInput, type BranchGraphValidationIssue, type BranchGraphValidationResult, COMPOUND_MAX_NESTING_DEPTH, COMPOUND_RESUME_SCHEMA_VERSION, CheckId, ClockPort, type CompoundBaseProps, type CompoundHandle, type CompoundParentType, type CompoundResumeInput, type CompoundResumeState, CourseId, type EmitContext, type HeadlessLessonkitConfig, type HeadlessLessonkitRuntime, type HeadlessRuntimePorts, INTERACTIVE_BOOK_ALLOWED_CHILD_TYPES, INTERACTIVE_VIDEO_ALLOWED_CHILD_TYPES, IdentityIdPath, IdentityValidationResult, LessonId, LessonkitPlugin, LessonkitPluginContext, type LessonkitRuntimeVersion, LessonkitUrn, type LessonkitUrnParts, LifecyclePlugin, type LmsBridgeMode, type LoadCompoundStateOptions, PAGE_ALLOWED_CHILD_TYPES, type ParseCompoundResumeStateOptions, PluginHost, PluginRegistry, ProgressController, ProgressState, SLIDE_ALLOWED_CHILD_TYPES, SLIDE_DECK_ALLOWED_CHILD_TYPES, StoragePort, TELEMETRY_EVENT_CATALOG, TELEMETRY_EVENT_CATALOG_V2, TELEMETRY_EVENT_CATALOG_V3, TIMED_CUE_ALLOWED_CHILD_TYPES, TelemetryBatchSink, type TelemetryCatalogEntry, type TelemetryCatalogV2Entry, type TelemetryCatalogV3Entry, TelemetryDataFor, type TelemetryEmitFn, TelemetryEvent, TelemetryEventName, type TelemetryPipeline, type TelemetryPipelineSink, TelemetryPlugin, TelemetrySink, TelemetryUser, TrackingClient, assertNever, assertValidId, buildLessonkitUrn, buildPluginContext, buildTelemetryCatalog, buildTelemetryCatalogV2, buildTelemetryCatalogV3, clampCompoundPageIndex, clearCompoundState, compoundStateStorageKey, createCompoundResumeState, createLessonkitRuntime, createPluginRegistry, createSessionId, createTelemetryPipeline, createTrackingClient, createTrackingPipelineSink, defineAssessmentPlugin, defineLifecyclePlugin, defineTelemetryPlugin, deriveId, getAllowedChildTypes, isChildTypeAllowed, isLifecycleTelemetryEvent, loadCompoundState, nowIso, parseBlockId, parseCheckId, parseCompoundResumeState, parseCourseId, parseLessonId, saveCompoundState, slugifyId, telemetryCatalogV2Version, telemetryCatalogV3Version, telemetryCatalogVersion, validateBranchGraph, validateId };