@lessonkit/react 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -4
- package/block-catalog.v3.json +1679 -0
- package/block-contract.v3.json +110 -0
- package/dist/index.cjs +2981 -746
- package/dist/index.d.cts +220 -28
- package/dist/index.d.ts +220 -28
- package/dist/index.js +3063 -828
- package/package.json +13 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React$1 from 'react';
|
|
3
3
|
import * as _lessonkit_core from '@lessonkit/core';
|
|
4
|
-
import { CourseId, TelemetryUser, TrackingClient, LessonkitPlugin, ProgressState, LessonId, TelemetryEventName, TelemetryDataFor, PluginHost,
|
|
5
|
-
export { AssessmentAnsweredData, AssessmentBaseProps, AssessmentBehaviour, AssessmentCompletedData, AssessmentHandle, AssessmentInteractionType, AssessmentScoreInput, AssessmentScoreResult, AssessmentXAPIData, InteractionBlockRegistration, LessonkitPlugin, LessonkitPluginContext, LessonkitPluginKind, PluginHost, PluginRegistry, TelemetryPipelineSink, buildTelemetryEvent, createLessonkitRuntime, createPluginRegistry, createTelemetryPipeline, defineAssessmentPlugin, defineLifecyclePlugin, defineTelemetryPlugin } from '@lessonkit/core';
|
|
4
|
+
import { TelemetryEvent, CourseId, TelemetryUser, TrackingClient, LessonkitPlugin, ProgressState, StoragePort, LessonId, TelemetryEventName, TelemetryDataFor, PluginHost, AssessmentHandle, BlockId, AssessmentBaseProps, AssessmentBehaviour, CompoundHandle, AssessmentAnsweredData, AssessmentCompletedData, CheckId } from '@lessonkit/core';
|
|
5
|
+
export { AssessmentAnsweredData, AssessmentBaseProps, AssessmentBehaviour, AssessmentCompletedData, AssessmentHandle, AssessmentInteractionType, AssessmentScoreInput, AssessmentScoreResult, AssessmentXAPIData, CompoundBaseProps, CompoundHandle, CompoundResumeState, InteractionBlockRegistration, LessonkitPlugin, LessonkitPluginContext, LessonkitPluginKind, PluginHost, PluginRegistry, TelemetryPipelineSink, buildTelemetryEvent, createLessonkitRuntime, createPluginRegistry, createTelemetryPipeline, defineAssessmentPlugin, defineLifecyclePlugin, defineTelemetryPlugin } from '@lessonkit/core';
|
|
6
6
|
import { McqAssessmentDescriptor } from '@lessonkit/lxpack';
|
|
7
7
|
import { XAPITransport, XAPIClient } from '@lessonkit/xapi';
|
|
8
8
|
import { LxpackBridgeMode } from '@lessonkit/lxpack/bridge';
|
|
9
9
|
import { LessonkitThemeV1, ThemePresetName, PartialLessonkitThemeV1 } from '@lessonkit/themes';
|
|
10
10
|
export { ThemePresetName } from '@lessonkit/themes';
|
|
11
11
|
|
|
12
|
+
type LessonkitObservabilityConfig = {
|
|
13
|
+
/** Tracking or pipeline sink failure (sync or async). */
|
|
14
|
+
onTelemetrySinkError?: (err: unknown, ctx: {
|
|
15
|
+
sinkId?: string;
|
|
16
|
+
}) => void;
|
|
17
|
+
/** Current xAPI queue depth after enqueue or flush. */
|
|
18
|
+
onXapiQueueDepth?: (depth: number) => void;
|
|
19
|
+
/** Oldest xAPI statement dropped because the queue reached max size. */
|
|
20
|
+
onXapiQueueCap?: () => void;
|
|
21
|
+
/** Telemetry batch buffer dropped an event because the cap (1000) was reached. */
|
|
22
|
+
onTelemetryBufferDrop?: () => void;
|
|
23
|
+
/** LMS bridge missing for a completion-related telemetry event (`bridge: auto`). */
|
|
24
|
+
onLxpackBridgeMiss?: (event: TelemetryEvent) => void;
|
|
25
|
+
};
|
|
26
|
+
|
|
12
27
|
type LessonkitConfig = {
|
|
13
28
|
courseId: CourseId;
|
|
14
29
|
session?: {
|
|
15
30
|
sessionId?: string;
|
|
16
31
|
attemptId?: string;
|
|
17
32
|
user?: TelemetryUser;
|
|
33
|
+
/** Persist compound navigation and child state in session storage (default true). */
|
|
34
|
+
persistCompoundState?: boolean;
|
|
18
35
|
};
|
|
19
36
|
tracking?: {
|
|
20
37
|
enabled?: boolean;
|
|
@@ -41,17 +58,20 @@ type LessonkitConfig = {
|
|
|
41
58
|
runtimeVersion?: "v1" | "v2";
|
|
42
59
|
/** Optional custom telemetry pipeline sinks (used alongside tracking/xapi). */
|
|
43
60
|
sinks?: _lessonkit_core.TelemetryPipelineSink[];
|
|
61
|
+
/** Production hooks for sink failures, xAPI queue depth, and LMS bridge misses. */
|
|
62
|
+
observability?: LessonkitObservabilityConfig;
|
|
44
63
|
};
|
|
45
64
|
|
|
46
65
|
type LessonkitProviderProps = {
|
|
47
66
|
config: LessonkitConfig;
|
|
48
|
-
children: React.ReactNode;
|
|
67
|
+
children: React$1.ReactNode;
|
|
49
68
|
};
|
|
50
69
|
type LessonkitRuntime = {
|
|
51
70
|
config: LessonkitConfig;
|
|
52
71
|
tracking: TrackingClient;
|
|
53
72
|
xapi: XAPIClient | null;
|
|
54
73
|
progress: ProgressState;
|
|
74
|
+
storage: StoragePort;
|
|
55
75
|
session: {
|
|
56
76
|
sessionId: string;
|
|
57
77
|
attemptId?: string;
|
|
@@ -69,24 +89,28 @@ type LessonkitRuntime = {
|
|
|
69
89
|
};
|
|
70
90
|
declare function LessonkitProvider(props: LessonkitProviderProps): react_jsx_runtime.JSX.Element;
|
|
71
91
|
|
|
92
|
+
type QuizProps = McqAssessmentDescriptor;
|
|
93
|
+
declare const Quiz: React$1.ForwardRefExoticComponent<McqAssessmentDescriptor & React$1.RefAttributes<AssessmentHandle>>;
|
|
94
|
+
declare function KnowledgeCheck(props: QuizProps): react_jsx_runtime.JSX.Element;
|
|
72
95
|
/** @internal Reset module warnings between tests. */
|
|
73
96
|
declare function resetQuizWarningsForTests(): void;
|
|
97
|
+
|
|
74
98
|
type CourseProps = {
|
|
75
99
|
title: string;
|
|
76
100
|
courseId: CourseId;
|
|
77
101
|
config?: Omit<LessonkitConfig, "courseId">;
|
|
78
|
-
children: React.ReactNode;
|
|
102
|
+
children: React$1.ReactNode;
|
|
79
103
|
};
|
|
80
104
|
type LessonProps = {
|
|
81
105
|
title: string;
|
|
82
106
|
lessonId: LessonId;
|
|
83
107
|
/** When false, unmount does not emit lesson_completed (for routed multi-pane layouts). Default true. */
|
|
84
108
|
autoCompleteOnUnmount?: boolean;
|
|
85
|
-
children: React.ReactNode;
|
|
109
|
+
children: React$1.ReactNode;
|
|
86
110
|
};
|
|
87
111
|
type ScenarioProps = {
|
|
88
112
|
blockId?: BlockId;
|
|
89
|
-
children: React.ReactNode;
|
|
113
|
+
children: React$1.ReactNode;
|
|
90
114
|
};
|
|
91
115
|
type ReflectionProps = {
|
|
92
116
|
blockId?: BlockId;
|
|
@@ -94,9 +118,8 @@ type ReflectionProps = {
|
|
|
94
118
|
hint?: string;
|
|
95
119
|
value?: string;
|
|
96
120
|
onChange?: (value: string) => void;
|
|
97
|
-
children?: React.ReactNode;
|
|
121
|
+
children?: React$1.ReactNode;
|
|
98
122
|
};
|
|
99
|
-
type QuizProps = McqAssessmentDescriptor;
|
|
100
123
|
type KnowledgeCheckProps = McqAssessmentDescriptor;
|
|
101
124
|
type ProgressTrackerProps = {
|
|
102
125
|
totalLessons?: number;
|
|
@@ -105,35 +128,33 @@ declare function Course(props: CourseProps): react_jsx_runtime.JSX.Element;
|
|
|
105
128
|
declare function Lesson(props: LessonProps): react_jsx_runtime.JSX.Element;
|
|
106
129
|
declare function Scenario(props: ScenarioProps): react_jsx_runtime.JSX.Element;
|
|
107
130
|
declare function Reflection(props: ReflectionProps): react_jsx_runtime.JSX.Element;
|
|
108
|
-
declare function KnowledgeCheck(props: KnowledgeCheckProps): react_jsx_runtime.JSX.Element;
|
|
109
|
-
declare function Quiz(props: QuizProps): react_jsx_runtime.JSX.Element;
|
|
110
131
|
declare function ProgressTracker(props: ProgressTrackerProps): react_jsx_runtime.JSX.Element;
|
|
111
132
|
|
|
112
133
|
type TrueFalseProps = AssessmentBaseProps & {
|
|
113
134
|
question: string;
|
|
114
135
|
answer: boolean;
|
|
115
136
|
};
|
|
116
|
-
declare const TrueFalse: React.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
137
|
+
declare const TrueFalse: React$1.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
117
138
|
checkId: _lessonkit_core.CheckId;
|
|
118
139
|
passingScore?: number;
|
|
119
140
|
} & {
|
|
120
141
|
question: string;
|
|
121
142
|
answer: boolean;
|
|
122
|
-
} & React.RefAttributes<AssessmentHandle>>;
|
|
143
|
+
} & React$1.RefAttributes<AssessmentHandle>>;
|
|
123
144
|
|
|
124
145
|
type MarkTheWordsProps = AssessmentBaseProps & {
|
|
125
146
|
/** Plain text; words listed in `correctWords` are selectable targets. */
|
|
126
147
|
text: string;
|
|
127
148
|
correctWords: string[];
|
|
128
149
|
};
|
|
129
|
-
declare const MarkTheWords: React.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
150
|
+
declare const MarkTheWords: React$1.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
130
151
|
checkId: _lessonkit_core.CheckId;
|
|
131
152
|
passingScore?: number;
|
|
132
153
|
} & {
|
|
133
154
|
/** Plain text; words listed in `correctWords` are selectable targets. */
|
|
134
155
|
text: string;
|
|
135
156
|
correctWords: string[];
|
|
136
|
-
} & React.RefAttributes<AssessmentHandle>>;
|
|
157
|
+
} & React$1.RefAttributes<AssessmentHandle>>;
|
|
137
158
|
|
|
138
159
|
type FillInBlankSpec = {
|
|
139
160
|
id: string;
|
|
@@ -145,7 +166,7 @@ type FillInTheBlanksProps = AssessmentBaseProps & {
|
|
|
145
166
|
/** Optional explicit blanks (overrides parsing from template). */
|
|
146
167
|
blanks?: FillInBlankSpec[];
|
|
147
168
|
};
|
|
148
|
-
declare const FillInTheBlanks: React.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
169
|
+
declare const FillInTheBlanks: React$1.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
149
170
|
checkId: _lessonkit_core.CheckId;
|
|
150
171
|
passingScore?: number;
|
|
151
172
|
} & {
|
|
@@ -153,21 +174,21 @@ declare const FillInTheBlanks: React.ForwardRefExoticComponent<_lessonkit_core.A
|
|
|
153
174
|
template: string;
|
|
154
175
|
/** Optional explicit blanks (overrides parsing from template). */
|
|
155
176
|
blanks?: FillInBlankSpec[];
|
|
156
|
-
} & React.RefAttributes<AssessmentHandle>>;
|
|
177
|
+
} & React$1.RefAttributes<AssessmentHandle>>;
|
|
157
178
|
|
|
158
179
|
type DragTheWordsProps = AssessmentBaseProps & {
|
|
159
180
|
/** Sentence with `*` around drop zones; `words` are draggable options. */
|
|
160
181
|
template: string;
|
|
161
182
|
words: string[];
|
|
162
183
|
};
|
|
163
|
-
declare const DragTheWords: React.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
184
|
+
declare const DragTheWords: React$1.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
164
185
|
checkId: _lessonkit_core.CheckId;
|
|
165
186
|
passingScore?: number;
|
|
166
187
|
} & {
|
|
167
188
|
/** Sentence with `*` around drop zones; `words` are draggable options. */
|
|
168
189
|
template: string;
|
|
169
190
|
words: string[];
|
|
170
|
-
} & React.RefAttributes<AssessmentHandle>>;
|
|
191
|
+
} & React$1.RefAttributes<AssessmentHandle>>;
|
|
171
192
|
|
|
172
193
|
type DragItem = {
|
|
173
194
|
id: string;
|
|
@@ -182,20 +203,185 @@ type DragAndDropProps = AssessmentBaseProps & {
|
|
|
182
203
|
items: DragItem[];
|
|
183
204
|
targets: DropTarget[];
|
|
184
205
|
};
|
|
185
|
-
declare const DragAndDrop: React.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
206
|
+
declare const DragAndDrop: React$1.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
186
207
|
checkId: _lessonkit_core.CheckId;
|
|
187
208
|
passingScore?: number;
|
|
188
209
|
} & {
|
|
189
210
|
items: DragItem[];
|
|
190
211
|
targets: DropTarget[];
|
|
191
|
-
} & React.RefAttributes<AssessmentHandle>>;
|
|
212
|
+
} & React$1.RefAttributes<AssessmentHandle>>;
|
|
192
213
|
|
|
193
214
|
type AssessmentSequenceProps = AssessmentBehaviour & {
|
|
194
|
-
children: React.ReactNode;
|
|
215
|
+
children: React$1.ReactNode;
|
|
216
|
+
/** Show one child assessment at a time (Question Set). */
|
|
217
|
+
sequential?: boolean;
|
|
218
|
+
blockId?: BlockId;
|
|
219
|
+
};
|
|
220
|
+
declare const AssessmentSequence: React$1.ForwardRefExoticComponent<AssessmentBehaviour & {
|
|
221
|
+
children: React$1.ReactNode;
|
|
195
222
|
/** Show one child assessment at a time (Question Set). */
|
|
196
223
|
sequential?: boolean;
|
|
224
|
+
blockId?: BlockId;
|
|
225
|
+
} & React$1.RefAttributes<CompoundHandle>>;
|
|
226
|
+
|
|
227
|
+
type TextProps = {
|
|
228
|
+
blockId?: BlockId;
|
|
229
|
+
children: React$1.ReactNode;
|
|
230
|
+
};
|
|
231
|
+
declare function Text(props: TextProps): react_jsx_runtime.JSX.Element;
|
|
232
|
+
|
|
233
|
+
type HeadingProps = {
|
|
234
|
+
blockId?: BlockId;
|
|
235
|
+
level: 1 | 2 | 3;
|
|
236
|
+
children: React.ReactNode;
|
|
237
|
+
};
|
|
238
|
+
declare function Heading(props: HeadingProps): react_jsx_runtime.JSX.Element;
|
|
239
|
+
|
|
240
|
+
type ImageProps = {
|
|
241
|
+
blockId?: BlockId;
|
|
242
|
+
src: string;
|
|
243
|
+
alt: string;
|
|
244
|
+
};
|
|
245
|
+
declare function Image(props: ImageProps): react_jsx_runtime.JSX.Element;
|
|
246
|
+
|
|
247
|
+
type PageProps = {
|
|
248
|
+
blockId: BlockId;
|
|
249
|
+
title?: string;
|
|
250
|
+
/** When true, page is used as a book chapter but hidden until navigated (InteractiveBook). */
|
|
251
|
+
hidden?: boolean;
|
|
252
|
+
/** Index within a compound parent (set by InteractiveBook). */
|
|
253
|
+
pageIndex?: number;
|
|
254
|
+
/** Compound parent type for telemetry (e.g. InteractiveBook). */
|
|
255
|
+
parentType?: string;
|
|
256
|
+
children: React$1.ReactNode;
|
|
257
|
+
};
|
|
258
|
+
declare function Page(props: PageProps): react_jsx_runtime.JSX.Element;
|
|
259
|
+
|
|
260
|
+
type InteractiveBookProps = {
|
|
261
|
+
blockId: BlockId;
|
|
262
|
+
title: string;
|
|
263
|
+
showBookScore?: boolean;
|
|
264
|
+
children: React$1.ReactElement<PageProps> | React$1.ReactElement<PageProps>[];
|
|
265
|
+
};
|
|
266
|
+
declare const InteractiveBook: React$1.ForwardRefExoticComponent<InteractiveBookProps & React$1.RefAttributes<CompoundHandle>>;
|
|
267
|
+
|
|
268
|
+
type SlideProps = {
|
|
269
|
+
blockId: BlockId;
|
|
270
|
+
title?: string;
|
|
271
|
+
/** When true, slide is used in a deck but hidden until navigated (SlideDeck). */
|
|
272
|
+
hidden?: boolean;
|
|
273
|
+
/** Index within a compound parent (set by SlideDeck). */
|
|
274
|
+
slideIndex?: number;
|
|
275
|
+
/** Compound parent type for telemetry (e.g. SlideDeck). */
|
|
276
|
+
parentType?: string;
|
|
277
|
+
children: React$1.ReactNode;
|
|
278
|
+
};
|
|
279
|
+
declare function Slide(props: SlideProps): react_jsx_runtime.JSX.Element;
|
|
280
|
+
|
|
281
|
+
type SlideDeckProps = {
|
|
282
|
+
blockId: BlockId;
|
|
283
|
+
title: string;
|
|
284
|
+
showDeckScore?: boolean;
|
|
285
|
+
children: React$1.ReactElement<SlideProps> | React$1.ReactElement<SlideProps>[];
|
|
286
|
+
};
|
|
287
|
+
declare const SlideDeck: React$1.ForwardRefExoticComponent<SlideDeckProps & React$1.RefAttributes<CompoundHandle>>;
|
|
288
|
+
|
|
289
|
+
type AccordionSection = {
|
|
290
|
+
id: string;
|
|
291
|
+
title: string;
|
|
292
|
+
content: React$1.ReactNode;
|
|
293
|
+
};
|
|
294
|
+
type AccordionProps = {
|
|
295
|
+
blockId: BlockId;
|
|
296
|
+
sections: AccordionSection[];
|
|
297
|
+
};
|
|
298
|
+
declare function Accordion(props: AccordionProps): react_jsx_runtime.JSX.Element;
|
|
299
|
+
|
|
300
|
+
type DialogCard = {
|
|
301
|
+
front: string;
|
|
302
|
+
back: string;
|
|
303
|
+
};
|
|
304
|
+
type DialogCardsProps = {
|
|
305
|
+
blockId: BlockId;
|
|
306
|
+
cards: DialogCard[];
|
|
307
|
+
};
|
|
308
|
+
declare function DialogCards(props: DialogCardsProps): react_jsx_runtime.JSX.Element | null;
|
|
309
|
+
|
|
310
|
+
type Flashcard = {
|
|
311
|
+
front: string;
|
|
312
|
+
back: string;
|
|
313
|
+
};
|
|
314
|
+
type FlashcardsProps = {
|
|
315
|
+
blockId: BlockId;
|
|
316
|
+
cards: Flashcard[];
|
|
317
|
+
/** Optional self-score mode (not LMS-scored). */
|
|
318
|
+
selfScore?: boolean;
|
|
319
|
+
};
|
|
320
|
+
declare function Flashcards(props: FlashcardsProps): react_jsx_runtime.JSX.Element | null;
|
|
321
|
+
|
|
322
|
+
type HotspotSpec = {
|
|
323
|
+
id: string;
|
|
324
|
+
label: string;
|
|
325
|
+
x: number;
|
|
326
|
+
y: number;
|
|
327
|
+
content: React$1.ReactNode;
|
|
328
|
+
};
|
|
329
|
+
type ImageHotspotsProps = {
|
|
330
|
+
blockId: BlockId;
|
|
331
|
+
src: string;
|
|
332
|
+
alt: string;
|
|
333
|
+
hotspots: HotspotSpec[];
|
|
197
334
|
};
|
|
198
|
-
declare function
|
|
335
|
+
declare function ImageHotspots(props: ImageHotspotsProps): react_jsx_runtime.JSX.Element;
|
|
336
|
+
|
|
337
|
+
type ImageSlide = {
|
|
338
|
+
src: string;
|
|
339
|
+
alt: string;
|
|
340
|
+
caption?: string;
|
|
341
|
+
};
|
|
342
|
+
type ImageSliderProps = {
|
|
343
|
+
blockId: BlockId;
|
|
344
|
+
slides: ImageSlide[];
|
|
345
|
+
};
|
|
346
|
+
declare function ImageSlider(props: ImageSliderProps): react_jsx_runtime.JSX.Element | null;
|
|
347
|
+
|
|
348
|
+
type HotspotTarget = {
|
|
349
|
+
id: string;
|
|
350
|
+
label: string;
|
|
351
|
+
x: number;
|
|
352
|
+
y: number;
|
|
353
|
+
};
|
|
354
|
+
type FindHotspotProps = AssessmentBaseProps & {
|
|
355
|
+
src: string;
|
|
356
|
+
alt: string;
|
|
357
|
+
targets: HotspotTarget[];
|
|
358
|
+
correctTargetId: string;
|
|
359
|
+
};
|
|
360
|
+
declare const FindHotspot: React$1.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
361
|
+
checkId: _lessonkit_core.CheckId;
|
|
362
|
+
passingScore?: number;
|
|
363
|
+
} & {
|
|
364
|
+
src: string;
|
|
365
|
+
alt: string;
|
|
366
|
+
targets: HotspotTarget[];
|
|
367
|
+
correctTargetId: string;
|
|
368
|
+
} & React$1.RefAttributes<AssessmentHandle>>;
|
|
369
|
+
|
|
370
|
+
type FindMultipleHotspotsProps = AssessmentBaseProps & {
|
|
371
|
+
src: string;
|
|
372
|
+
alt: string;
|
|
373
|
+
targets: HotspotTarget[];
|
|
374
|
+
correctTargetIds: string[];
|
|
375
|
+
};
|
|
376
|
+
declare const FindMultipleHotspots: React$1.ForwardRefExoticComponent<_lessonkit_core.AssessmentBehaviour & {
|
|
377
|
+
checkId: _lessonkit_core.CheckId;
|
|
378
|
+
passingScore?: number;
|
|
379
|
+
} & {
|
|
380
|
+
src: string;
|
|
381
|
+
alt: string;
|
|
382
|
+
targets: HotspotTarget[];
|
|
383
|
+
correctTargetIds: string[];
|
|
384
|
+
} & React$1.RefAttributes<AssessmentHandle>>;
|
|
199
385
|
|
|
200
386
|
declare function useAssessmentState(enclosingLessonId?: LessonId): {
|
|
201
387
|
answer: (data: AssessmentAnsweredData) => void;
|
|
@@ -236,7 +422,7 @@ declare function resetAssessmentWarningsForTests(): void;
|
|
|
236
422
|
type ThemeMode = "light" | "dark" | "system";
|
|
237
423
|
type ThemeResolvedMode = "light" | "dark";
|
|
238
424
|
type ThemeProviderProps = {
|
|
239
|
-
children: React.ReactNode;
|
|
425
|
+
children: React$1.ReactNode;
|
|
240
426
|
/** Partial theme merged on top of the resolved preset (last writer wins). */
|
|
241
427
|
theme?: PartialLessonkitThemeV1;
|
|
242
428
|
preset?: ThemePresetName;
|
|
@@ -255,6 +441,7 @@ declare function useTheme(): ThemeContextValue;
|
|
|
255
441
|
|
|
256
442
|
declare const blockCatalogVersion: 1;
|
|
257
443
|
declare const blockCatalogV2Version: 2;
|
|
444
|
+
declare const blockCatalogV3Version: 3;
|
|
258
445
|
type BlockPropSpec = {
|
|
259
446
|
name: string;
|
|
260
447
|
type: string;
|
|
@@ -291,9 +478,13 @@ type BlockCatalogEntryBase = {
|
|
|
291
478
|
type BlockCatalogEntry = BlockCatalogEntryBase;
|
|
292
479
|
type BlockCatalogEntryV2 = BlockCatalogEntryBase & {
|
|
293
480
|
assessmentContract?: true;
|
|
481
|
+
compoundContract?: true;
|
|
294
482
|
h5pMachineName?: string;
|
|
295
483
|
h5pAlias?: string;
|
|
484
|
+
allowedChildTypes?: readonly string[];
|
|
485
|
+
maxNestingDepth?: number;
|
|
296
486
|
};
|
|
487
|
+
type BlockCatalogEntryV3 = BlockCatalogEntryV2;
|
|
297
488
|
declare const BLOCK_CATALOG: ({
|
|
298
489
|
type: string;
|
|
299
490
|
category: "container";
|
|
@@ -502,10 +693,11 @@ declare const BLOCK_CATALOG: ({
|
|
|
502
693
|
aliases?: undefined;
|
|
503
694
|
})[];
|
|
504
695
|
declare const BLOCK_CATALOG_V2: BlockCatalogEntryV2[];
|
|
696
|
+
declare const BLOCK_CATALOG_V3: BlockCatalogEntryV3[];
|
|
505
697
|
type BuildBlockCatalogOptions = {
|
|
506
|
-
version?: 1 | 2;
|
|
698
|
+
version?: 1 | 2 | 3;
|
|
507
699
|
};
|
|
508
|
-
declare function buildBlockCatalog(opts?: BuildBlockCatalogOptions): BlockCatalogEntry[] | BlockCatalogEntryV2[];
|
|
509
|
-
declare function getBlockCatalogEntry(type: string, opts?: BuildBlockCatalogOptions): BlockCatalogEntry | BlockCatalogEntryV2 | undefined;
|
|
700
|
+
declare function buildBlockCatalog(opts?: BuildBlockCatalogOptions): BlockCatalogEntry[] | BlockCatalogEntryV2[] | BlockCatalogEntryV3[];
|
|
701
|
+
declare function getBlockCatalogEntry(type: string, opts?: BuildBlockCatalogOptions): BlockCatalogEntry | BlockCatalogEntryV2 | BlockCatalogEntryV3 | undefined;
|
|
510
702
|
|
|
511
|
-
export { AssessmentSequence, type AssessmentSequenceProps, BLOCK_CATALOG, BLOCK_CATALOG_V2, type BlockCatalogEntry, type BlockCatalogEntryV2, type BlockPropSpec, Course, type CourseProps, DragAndDrop, type DragAndDropProps, type DragItem, DragTheWords, type DragTheWordsProps, type DropTarget, type FillInBlankSpec, FillInTheBlanks, type FillInTheBlanksProps, KnowledgeCheck, type KnowledgeCheckProps, Lesson, type LessonProps, type LessonkitConfig, LessonkitProvider, type LessonkitProviderProps, type LessonkitRuntime, MarkTheWords, type MarkTheWordsProps, ProgressTracker, type ProgressTrackerProps, Quiz, type QuizProps, Reflection, type ReflectionProps, Scenario, type ScenarioProps, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, type ThemeResolvedMode, TrueFalse, type TrueFalseProps, blockCatalogV2Version, blockCatalogVersion, buildBlockCatalog, getBlockCatalogEntry, resetAssessmentWarningsForTests, resetQuizWarningsForTests, useAssessmentState, useCompletion, useLessonkit, useProgress, useQuizState, useTheme, useTracking };
|
|
703
|
+
export { Accordion, type AccordionProps, type AccordionSection, AssessmentSequence, type AssessmentSequenceProps, BLOCK_CATALOG, BLOCK_CATALOG_V2, BLOCK_CATALOG_V3, type BlockCatalogEntry, type BlockCatalogEntryV2, type BlockCatalogEntryV3, type BlockPropSpec, Course, type CourseProps, type DialogCard, DialogCards, type DialogCardsProps, DragAndDrop, type DragAndDropProps, type DragItem, DragTheWords, type DragTheWordsProps, type DropTarget, type FillInBlankSpec, FillInTheBlanks, type FillInTheBlanksProps, FindHotspot, type FindHotspotProps, FindMultipleHotspots, type FindMultipleHotspotsProps, type Flashcard, Flashcards, type FlashcardsProps, Heading, type HeadingProps, type HotspotSpec, type HotspotTarget, Image, ImageHotspots, type ImageHotspotsProps, type ImageProps, type ImageSlide, ImageSlider, type ImageSliderProps, InteractiveBook, type InteractiveBookProps, KnowledgeCheck, type KnowledgeCheckProps, Lesson, type LessonProps, type LessonkitConfig, type LessonkitObservabilityConfig, LessonkitProvider, type LessonkitProviderProps, type LessonkitRuntime, MarkTheWords, type MarkTheWordsProps, Page, type PageProps, ProgressTracker, type ProgressTrackerProps, Quiz, type QuizProps, Reflection, type ReflectionProps, Scenario, type ScenarioProps, Slide, SlideDeck, type SlideDeckProps, type SlideProps, Text, type TextProps, type ThemeContextValue, type ThemeMode, ThemeProvider, type ThemeProviderProps, type ThemeResolvedMode, TrueFalse, type TrueFalseProps, blockCatalogV2Version, blockCatalogV3Version, blockCatalogVersion, buildBlockCatalog, getBlockCatalogEntry, resetAssessmentWarningsForTests, resetQuizWarningsForTests, useAssessmentState, useCompletion, useLessonkit, useProgress, useQuizState, useTheme, useTracking };
|