@intellectif/lk-react 13.0.0 → 14.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/README.md +11 -3
- package/dist/{WrittenResponse-B5p_-RnJ.d.ts → WrittenResponse-DrzI89Wg.d.ts} +1 -1
- package/dist/{WrittenResponse-DWtS4tOL.d.cts → WrittenResponse-rRpOr9W1.d.cts} +1 -1
- package/dist/{chunk-UU2NV6SU.cjs → chunk-4Y5TELVU.cjs} +14 -13
- package/dist/chunk-4Y5TELVU.cjs.map +1 -0
- package/dist/{chunk-XAGWBVK3.js → chunk-5CP2Z6IS.js} +6 -5
- package/dist/chunk-5CP2Z6IS.js.map +1 -0
- package/dist/{chunk-NVUFEMPZ.cjs → chunk-5JCTJFQU.cjs} +30 -16
- package/dist/chunk-5JCTJFQU.cjs.map +1 -0
- package/dist/chunk-5JFMXBH7.js +888 -0
- package/dist/chunk-5JFMXBH7.js.map +1 -0
- package/dist/{chunk-NVP6UEQQ.js → chunk-AS2QGND5.js} +4 -4
- package/dist/{chunk-NVP6UEQQ.js.map → chunk-AS2QGND5.js.map} +1 -1
- package/dist/{chunk-3Q4I4KT6.js → chunk-AWQ53DON.js} +78 -2
- package/dist/chunk-AWQ53DON.js.map +1 -0
- package/dist/{chunk-DQERNAWI.js → chunk-B4BCEQNO.js} +26 -31
- package/dist/chunk-B4BCEQNO.js.map +1 -0
- package/dist/chunk-BRPEB43C.cjs +13 -0
- package/dist/chunk-BRPEB43C.cjs.map +1 -0
- package/dist/{chunk-74QXBWCI.cjs → chunk-CTW3G3EH.cjs} +6 -6
- package/dist/{chunk-74QXBWCI.cjs.map → chunk-CTW3G3EH.cjs.map} +1 -1
- package/dist/{chunk-AMGK7DDM.cjs → chunk-D4DQFTA7.cjs} +2 -2
- package/dist/chunk-D4DQFTA7.cjs.map +1 -0
- package/dist/{chunk-R7DI5UMU.js → chunk-DB4DLHN6.js} +22 -4
- package/dist/chunk-DB4DLHN6.js.map +1 -0
- package/dist/{chunk-K3EA547J.cjs → chunk-DPEY7DSE.cjs} +27 -33
- package/dist/chunk-DPEY7DSE.cjs.map +1 -0
- package/dist/{chunk-W4MXRZAB.js → chunk-IDYZ2FA2.js} +6 -5
- package/dist/chunk-IDYZ2FA2.js.map +1 -0
- package/dist/{chunk-K7NMNOPI.cjs → chunk-JG4DWAUJ.cjs} +15 -14
- package/dist/chunk-JG4DWAUJ.cjs.map +1 -0
- package/dist/chunk-KIO6QXGT.cjs +894 -0
- package/dist/chunk-KIO6QXGT.cjs.map +1 -0
- package/dist/chunk-MCO52PV5.js +520 -0
- package/dist/chunk-MCO52PV5.js.map +1 -0
- package/dist/{chunk-HT4FFZZQ.cjs → chunk-MZITNWZ2.cjs} +233 -38
- package/dist/chunk-MZITNWZ2.cjs.map +1 -0
- package/dist/{chunk-Z63JRG4M.cjs → chunk-N536RUCZ.cjs} +15 -14
- package/dist/chunk-N536RUCZ.cjs.map +1 -0
- package/dist/{chunk-PSHNTDKG.js → chunk-NJAF34GN.js} +13 -161
- package/dist/chunk-NJAF34GN.js.map +1 -0
- package/dist/chunk-OD65OZIW.cjs +159 -0
- package/dist/chunk-OD65OZIW.cjs.map +1 -0
- package/dist/{chunk-2GXSA322.cjs → chunk-PSUKWVKU.cjs} +15 -14
- package/dist/chunk-PSUKWVKU.cjs.map +1 -0
- package/dist/chunk-RCMYEWBE.js +11 -0
- package/dist/chunk-RCMYEWBE.js.map +1 -0
- package/dist/{chunk-PY53ABWC.js → chunk-RCPW6HVY.js} +23 -9
- package/dist/chunk-RCPW6HVY.js.map +1 -0
- package/dist/{chunk-DQNVAXG6.js → chunk-RXS455MR.js} +2 -2
- package/dist/chunk-RXS455MR.js.map +1 -0
- package/dist/chunk-TUVEJLOT.js +537 -0
- package/dist/chunk-TUVEJLOT.js.map +1 -0
- package/dist/{chunk-YZWXVZB3.js → chunk-U432HTUW.js} +6 -5
- package/dist/chunk-U432HTUW.js.map +1 -0
- package/dist/chunk-UDCQTOVU.cjs +523 -0
- package/dist/chunk-UDCQTOVU.cjs.map +1 -0
- package/dist/{chunk-5N7OLFHB.js → chunk-UDQS5INQ.js} +6 -5
- package/dist/chunk-UDQS5INQ.js.map +1 -0
- package/dist/{chunk-YILH4ETT.js → chunk-UDZWYHDV.js} +226 -31
- package/dist/chunk-UDZWYHDV.js.map +1 -0
- package/dist/{chunk-SBIJJ374.cjs → chunk-UMDWVMB5.cjs} +24 -6
- package/dist/chunk-UMDWVMB5.cjs.map +1 -0
- package/dist/{chunk-MA7GXUWC.cjs → chunk-VSFHJ7FB.cjs} +78 -2
- package/dist/chunk-VSFHJ7FB.cjs.map +1 -0
- package/dist/{chunk-J73TDY7J.cjs → chunk-WC4OD3EE.cjs} +25 -173
- package/dist/chunk-WC4OD3EE.cjs.map +1 -0
- package/dist/chunk-YM64MS4G.cjs +547 -0
- package/dist/chunk-YM64MS4G.cjs.map +1 -0
- package/dist/chunk-YORQQXGO.js +155 -0
- package/dist/chunk-YORQQXGO.js.map +1 -0
- package/dist/components/ActivityPreview.cjs +15 -10
- package/dist/components/ActivityPreview.d.cts +9 -3
- package/dist/components/ActivityPreview.d.ts +9 -3
- package/dist/components/ActivityPreview.js +14 -9
- package/dist/components/ActivitySequence.cjs +16 -11
- package/dist/components/ActivitySequence.d.cts +115 -4
- package/dist/components/ActivitySequence.d.ts +115 -4
- package/dist/components/ActivitySequence.js +15 -10
- package/dist/components/Dictation.cjs +7 -5
- package/dist/components/Dictation.d.cts +2 -1
- package/dist/components/Dictation.d.ts +2 -1
- package/dist/components/Dictation.js +6 -4
- package/dist/components/FillInTheBlanks.cjs +6 -5
- package/dist/components/FillInTheBlanks.d.cts +2 -1
- package/dist/components/FillInTheBlanks.d.ts +2 -1
- package/dist/components/FillInTheBlanks.js +5 -4
- package/dist/components/GapSelect.cjs +6 -5
- package/dist/components/GapSelect.d.cts +2 -1
- package/dist/components/GapSelect.d.ts +2 -1
- package/dist/components/GapSelect.js +5 -4
- package/dist/components/MultipleChoice.cjs +6 -5
- package/dist/components/MultipleChoice.d.cts +2 -1
- package/dist/components/MultipleChoice.d.ts +2 -1
- package/dist/components/MultipleChoice.js +5 -4
- package/dist/components/PronunciationFeedback.cjs +16 -0
- package/dist/components/PronunciationFeedback.cjs.map +1 -0
- package/dist/components/PronunciationFeedback.d.cts +67 -0
- package/dist/components/PronunciationFeedback.d.ts +67 -0
- package/dist/components/PronunciationFeedback.js +7 -0
- package/dist/components/PronunciationFeedback.js.map +1 -0
- package/dist/components/ReadAloud.cjs +21 -0
- package/dist/components/ReadAloud.cjs.map +1 -0
- package/dist/components/ReadAloud.d.cts +15 -0
- package/dist/components/ReadAloud.d.ts +15 -0
- package/dist/components/ReadAloud.js +12 -0
- package/dist/components/ReadAloud.js.map +1 -0
- package/dist/components/StimulusPanel.cjs +4 -4
- package/dist/components/StimulusPanel.d.cts +2 -1
- package/dist/components/StimulusPanel.d.ts +2 -1
- package/dist/components/StimulusPanel.js +3 -3
- package/dist/components/WrittenResponse.cjs +6 -5
- package/dist/components/WrittenResponse.d.cts +4 -3
- package/dist/components/WrittenResponse.d.ts +4 -3
- package/dist/components/WrittenResponse.js +5 -4
- package/dist/hooks/useSpeechRecorder.cjs +17 -0
- package/dist/hooks/useSpeechRecorder.cjs.map +1 -0
- package/dist/hooks/useSpeechRecorder.d.cts +127 -0
- package/dist/hooks/useSpeechRecorder.d.ts +127 -0
- package/dist/hooks/useSpeechRecorder.js +4 -0
- package/dist/hooks/useSpeechRecorder.js.map +1 -0
- package/dist/i18n/LkIntlProvider.cjs +7 -7
- package/dist/i18n/LkIntlProvider.d.cts +3 -2
- package/dist/i18n/LkIntlProvider.d.ts +3 -2
- package/dist/i18n/LkIntlProvider.js +1 -1
- package/dist/index.cjs +53 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +17 -12
- package/dist/index.js.map +1 -1
- package/dist/machine-CuwKqWXC.d.cts +26 -0
- package/dist/machine-CuwKqWXC.d.ts +26 -0
- package/dist/{strings-DPTyLpHt.d.cts → strings-l8Wv1Xax.d.ts} +230 -4
- package/dist/{strings-DPTyLpHt.d.ts → strings-wjAF2ONm.d.cts} +230 -4
- package/dist/theme/ThemeProvider.cjs +6 -6
- package/dist/theme/ThemeProvider.d.cts +4 -4
- package/dist/theme/ThemeProvider.d.ts +4 -4
- package/dist/theme/ThemeProvider.js +1 -1
- package/dist/theme/skin.css +612 -3
- package/package.json +33 -3
- package/dist/chunk-2GXSA322.cjs.map +0 -1
- package/dist/chunk-3Q4I4KT6.js.map +0 -1
- package/dist/chunk-5N7OLFHB.js.map +0 -1
- package/dist/chunk-AMGK7DDM.cjs.map +0 -1
- package/dist/chunk-DQERNAWI.js.map +0 -1
- package/dist/chunk-DQNVAXG6.js.map +0 -1
- package/dist/chunk-HT4FFZZQ.cjs.map +0 -1
- package/dist/chunk-J73TDY7J.cjs.map +0 -1
- package/dist/chunk-K3EA547J.cjs.map +0 -1
- package/dist/chunk-K7NMNOPI.cjs.map +0 -1
- package/dist/chunk-MA7GXUWC.cjs.map +0 -1
- package/dist/chunk-NVUFEMPZ.cjs.map +0 -1
- package/dist/chunk-PSHNTDKG.js.map +0 -1
- package/dist/chunk-PY53ABWC.js.map +0 -1
- package/dist/chunk-R7DI5UMU.js.map +0 -1
- package/dist/chunk-SBIJJ374.cjs.map +0 -1
- package/dist/chunk-UU2NV6SU.cjs.map +0 -1
- package/dist/chunk-W4MXRZAB.js.map +0 -1
- package/dist/chunk-XAGWBVK3.js.map +0 -1
- package/dist/chunk-YILH4ETT.js.map +0 -1
- package/dist/chunk-YZWXVZB3.js.map +0 -1
- package/dist/chunk-Z63JRG4M.cjs.map +0 -1
|
@@ -1,4 +1,83 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SpeechAssessment, GradeRecord, ReadAloudData, RecordingRef, LearnerResponse, ActivityData, ActivityResult, ItemOutcome, MediaPlayLedgerEntry, MediaPlayClaim, MediaPlayGrant, InteractionEvent, ThemeTokens, RedactedActivityData, ItemGroup, SequenceEntry, ReadAloudDimension, ReadAloudWordState, Stimulus } from '@intellectif/lk-core';
|
|
2
|
+
import { R as RecordedTake, S as SpeechRecorderError } from './machine-CuwKqWXC.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What an application's assessor came back with.
|
|
6
|
+
*
|
|
7
|
+
* `code` is a plain `string` and not `SpeechUnscorableCode`: an application's
|
|
8
|
+
* own assessor may refuse a take for a reason the SDK has no name for, and a
|
|
9
|
+
* narrower type would make it unreportable. This component classifies the two
|
|
10
|
+
* codes that mean "nothing was heard" and treats every other one the same way.
|
|
11
|
+
*/
|
|
12
|
+
type ReadAloudAssessResult = {
|
|
13
|
+
status: 'graded';
|
|
14
|
+
assessment: SpeechAssessment;
|
|
15
|
+
grade: GradeRecord;
|
|
16
|
+
} | {
|
|
17
|
+
status: 'unscorable';
|
|
18
|
+
code: string;
|
|
19
|
+
assessment?: SpeechAssessment;
|
|
20
|
+
} | {
|
|
21
|
+
status: 'failed';
|
|
22
|
+
retryable: boolean;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* How a take reaches the application, and how a judgement comes back.
|
|
26
|
+
*
|
|
27
|
+
* Named `recordingBinding` rather than `recording` because both
|
|
28
|
+
* `ReadAloudData.recording` (the bounds) and `ReadAloudLearnerResponse.recording`
|
|
29
|
+
* (the stored take) already exist: the plain name would read as one of those.
|
|
30
|
+
*/
|
|
31
|
+
interface RecordingBinding {
|
|
32
|
+
/**
|
|
33
|
+
* Puts the take in your storage and returns its key. **Required** outside
|
|
34
|
+
* `review`: without it a learner can speak into a control that submits
|
|
35
|
+
* nothing. Settle it — a promise that never does leaves the submit pending
|
|
36
|
+
* for ever.
|
|
37
|
+
*/
|
|
38
|
+
upload(take: RecordedTake): Promise<RecordingRef>;
|
|
39
|
+
/**
|
|
40
|
+
* Judges the stored take. `practice` only — an exam never assesses on the
|
|
41
|
+
* client. Optional: a binding without it records, uploads and submits, and
|
|
42
|
+
* the feedback is replaced by a notice.
|
|
43
|
+
*/
|
|
44
|
+
assess?(ref: RecordingRef): Promise<ReadAloudAssessResult>;
|
|
45
|
+
/** A playable link to a stored take. `review` only. */
|
|
46
|
+
playbackUrl?(ref: RecordingRef): Promise<string>;
|
|
47
|
+
}
|
|
48
|
+
interface ReadAloudProps extends ActivityProps<ReadAloudData> {
|
|
49
|
+
/** How a take is stored and judged. See {@link RecordingBinding}. */
|
|
50
|
+
recordingBinding?: RecordingBinding;
|
|
51
|
+
/**
|
|
52
|
+
* The evidence behind a stored grade, for `review`. Without it a graded
|
|
53
|
+
* outcome still shows its marks, rebuilt from `outcome.grade.details`; with
|
|
54
|
+
* neither, the score is shown and no marks are.
|
|
55
|
+
*/
|
|
56
|
+
assessment?: SpeechAssessment;
|
|
57
|
+
/**
|
|
58
|
+
* Confidence above which a break note is shown, 0..1, forwarded to
|
|
59
|
+
* {@link PronunciationFeedback}. No default — see its own prop.
|
|
60
|
+
*/
|
|
61
|
+
breakThreshold?: number;
|
|
62
|
+
/** The same, for the monotone note. */
|
|
63
|
+
monotoneThreshold?: number;
|
|
64
|
+
/**
|
|
65
|
+
* The URL of a self-hosted copy of `CAPTURE_PROCESSOR_SOURCE`, handed to the
|
|
66
|
+
* recorder, for a Content-Security-Policy whose `script-src` does not allow
|
|
67
|
+
* `blob:`. Without it the capture module is loaded from a `blob:` URL, and a
|
|
68
|
+
* policy that refuses one sends every take through the deprecated
|
|
69
|
+
* main-thread `ScriptProcessorNode` — a take that still records, so nothing
|
|
70
|
+
* says so. See `useSpeechRecorder`'s option of the same name.
|
|
71
|
+
*/
|
|
72
|
+
workletUrl?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Never called. A read-aloud answer is a key in your storage, and there is
|
|
75
|
+
* none until the take has been uploaded — so there is no intermediate
|
|
76
|
+
* response to report, and reporting the take itself would offer a host a
|
|
77
|
+
* recording it has nowhere to put. `onSubmit` carries the response, once.
|
|
78
|
+
*/
|
|
79
|
+
onChange?: (response: LearnerResponse) => void;
|
|
80
|
+
}
|
|
2
81
|
|
|
3
82
|
/**
|
|
4
83
|
* How an activity is being presented. This is the single switch that decides
|
|
@@ -191,11 +270,17 @@ declare function asRenderable<TData extends ActivityData>(redacted: RedactedActi
|
|
|
191
270
|
* ```
|
|
192
271
|
*
|
|
193
272
|
* Pass `renderMode="exam"` (or `"review"`). Redacted data has no answer key, and
|
|
194
|
-
* every built-in activity throws at render in the default `practice`
|
|
195
|
-
* rather than fail later: `<MultipleChoice>`, `<FillInTheBlanks>`,
|
|
273
|
+
* almost every built-in activity throws at render in the default `practice`
|
|
274
|
+
* mode rather than fail later: `<MultipleChoice>`, `<FillInTheBlanks>`,
|
|
196
275
|
* `<GapSelect>` and `<Dictation>` because they grade locally, and
|
|
197
276
|
* `<WrittenResponse>` because `practice` still runs its local submit path and
|
|
198
277
|
* emits a practice-mode xAPI statement.
|
|
278
|
+
*
|
|
279
|
+
* `<ReadAloud>` is the exception and renders a projection in every mode: a
|
|
280
|
+
* read-aloud item has no answer key to withhold, so `redact()` removes only the
|
|
281
|
+
* authored feedback and leaves the reading, its language and its bounds — which
|
|
282
|
+
* is everything the component puts on screen. It grades nothing locally either;
|
|
283
|
+
* the grade comes back from whatever the application asked to judge the take.
|
|
199
284
|
*/
|
|
200
285
|
declare function asRenderableSequence(entries: readonly (RedactedActivityData | RedactedItemGroupData)[]): readonly SequenceEntry<RenderableActivity>[];
|
|
201
286
|
/** Structural shape of a `redactItemGroup()` projection, as it arrives from a server. */
|
|
@@ -331,6 +416,47 @@ interface SequenceMediaBudget {
|
|
|
331
416
|
/** Translations for the transport chrome. Defaults are English. */
|
|
332
417
|
strings?: Partial<MediaTransportStrings>;
|
|
333
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* Which slot a recording belongs to, stamped on every call the pager makes.
|
|
421
|
+
*
|
|
422
|
+
* Exactly the shape {@link ActivitySequenceProps.onSubmit} already passes, so
|
|
423
|
+
* one identity travels with the answer and with the take that answer points at
|
|
424
|
+
* — and a consumer writes `slotId` in both places rather than reconciling two
|
|
425
|
+
* spellings of "which question was this".
|
|
426
|
+
*/
|
|
427
|
+
interface SequenceRecordingSlot {
|
|
428
|
+
/** Identity from `flattenSequence` — stable under shuffling. Store against THIS. */
|
|
429
|
+
slotId: string;
|
|
430
|
+
/** Presented position, which moves under shuffling. */
|
|
431
|
+
index: number;
|
|
432
|
+
activityId: string;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* The pager-level half of a read-aloud recording binding: where every take in
|
|
436
|
+
* this sequence is stored, and how a judgement comes back.
|
|
437
|
+
*
|
|
438
|
+
* One prop at both levels, because it is one concept — the media-budget
|
|
439
|
+
* precedent ({@link SequenceMediaBudget} beside {@link MediaBudgetBinding}).
|
|
440
|
+
* The difference is the second argument: a per-slot binding knows which slot it
|
|
441
|
+
* belongs to, so a sequence-level one is told.
|
|
442
|
+
*
|
|
443
|
+
* The SDK records and hands over; it never judges. `assess` is `practice` only
|
|
444
|
+
* and optional — a sequence that only stores takes gets the "assessment is not
|
|
445
|
+
* available" notice rather than a throw — and `playbackUrl` is `review` only.
|
|
446
|
+
* A slot whose activity is not a read-aloud never calls any of them.
|
|
447
|
+
*/
|
|
448
|
+
interface SequenceRecordingBinding {
|
|
449
|
+
/**
|
|
450
|
+
* Puts the take in your storage and returns its key. **Required** outside
|
|
451
|
+
* `review`: without it a learner can speak into a control that submits
|
|
452
|
+
* nothing, which the component refuses to render. Settle it.
|
|
453
|
+
*/
|
|
454
|
+
upload(take: RecordedTake, slot: SequenceRecordingSlot): Promise<RecordingRef>;
|
|
455
|
+
/** Judges the stored take. `practice` only; an exam never assesses on the client. */
|
|
456
|
+
assess?(ref: RecordingRef, slot: SequenceRecordingSlot): Promise<ReadAloudAssessResult>;
|
|
457
|
+
/** A playable link to a stored take. `review` only. */
|
|
458
|
+
playbackUrl?(ref: RecordingRef, slot: SequenceRecordingSlot): Promise<string>;
|
|
459
|
+
}
|
|
334
460
|
|
|
335
461
|
/**
|
|
336
462
|
* Every string the SDK's own chrome renders.
|
|
@@ -460,6 +586,106 @@ interface LkStrings {
|
|
|
460
586
|
* sentence, because authored feedback may follow it.
|
|
461
587
|
*/
|
|
462
588
|
dictationWordsSummary: (correct: number, total: number) => string;
|
|
589
|
+
/** Accessible name of the group holding the model recording. */
|
|
590
|
+
readAloudModelRecording: string;
|
|
591
|
+
/** Accessible name of the group holding the slower model recording, and its default `alt`. */
|
|
592
|
+
readAloudSlowRecording: string;
|
|
593
|
+
/** Starts a take. */
|
|
594
|
+
readAloudRecord: string;
|
|
595
|
+
/** Ends the take in progress. */
|
|
596
|
+
readAloudStop: string;
|
|
597
|
+
/** Throws the take away so the learner can start over. */
|
|
598
|
+
readAloudRerecord: string;
|
|
599
|
+
/** Accessible name of the player for the take the learner just made. */
|
|
600
|
+
readAloudYourRecording: string;
|
|
601
|
+
/**
|
|
602
|
+
* In place of the player for the learner's own take, and of the buttons that
|
|
603
|
+
* play one word of it, when the page refuses to play it — most often a
|
|
604
|
+
* Content-Security-Policy whose `media-src` does not allow `blob:`. Said
|
|
605
|
+
* rather than left as controls that do nothing when pressed.
|
|
606
|
+
*/
|
|
607
|
+
readAloudPlaybackUnavailable: string;
|
|
608
|
+
/**
|
|
609
|
+
* Live progress while recording. Whole seconds, not a `m:ss` clock: a
|
|
610
|
+
* recording is bounded in seconds by the item, and a translation should not
|
|
611
|
+
* have to reimplement a clock to change the word around it.
|
|
612
|
+
*
|
|
613
|
+
* Shown on screen and hidden from assistive technology: it changes every
|
|
614
|
+
* second, and a screen reader that spoke each change would speak into the
|
|
615
|
+
* take being assessed. The two sentences below are what is announced instead.
|
|
616
|
+
*/
|
|
617
|
+
readAloudRecordingProgress: (seconds: number, maxSeconds: number) => string;
|
|
618
|
+
/** Announced once when a capture begins. */
|
|
619
|
+
readAloudRecordingStarted: string;
|
|
620
|
+
/**
|
|
621
|
+
* Announced once when a capture ends, by the learner or at its own bound.
|
|
622
|
+
* Carries the length because the progress counter is not announced: a take
|
|
623
|
+
* that reads back as "20 of 20 seconds" is one that stopped itself.
|
|
624
|
+
*/
|
|
625
|
+
readAloudRecordingStopped: (seconds: number, maxSeconds: number) => string;
|
|
626
|
+
/** How many takes are left. Called with 0 as well, so the wording is one translation's. */
|
|
627
|
+
readAloudTakesRemaining: (remaining: number, max: number) => string;
|
|
628
|
+
/** `exam` only: hands the item in with no recording at all, deliberately. */
|
|
629
|
+
readAloudSubmitWithoutRecording: string;
|
|
630
|
+
/** Pending, while the take travels to the application's storage. */
|
|
631
|
+
readAloudUploading: string;
|
|
632
|
+
/** The take never reached storage, so nothing was submitted. */
|
|
633
|
+
readAloudUploadFailed: string;
|
|
634
|
+
/** Retries whichever step just failed. */
|
|
635
|
+
readAloudTryAgain: string;
|
|
636
|
+
/** Pending, while the assessor judges the take. */
|
|
637
|
+
readAloudAssessing: string;
|
|
638
|
+
/** The binding stores recordings but judges none, so there is no feedback to show. */
|
|
639
|
+
readAloudAssessmentUnavailable: string;
|
|
640
|
+
/** The assessor found no speech, or too little of it, in the take. */
|
|
641
|
+
readAloudNotHeard: string;
|
|
642
|
+
/** The assessor produced no grade for any other reason. The code itself is never shown. */
|
|
643
|
+
readAloudNotAssessed: string;
|
|
644
|
+
/** The assessment could not be run at all — a failure of the call, not of the reading. */
|
|
645
|
+
readAloudAssessmentFailed: string;
|
|
646
|
+
/**
|
|
647
|
+
* What went wrong with the microphone or with the take. One function rather
|
|
648
|
+
* than five keys, so a translation keeps the five sentences together and the
|
|
649
|
+
* SDK keeps one name for the concept.
|
|
650
|
+
*/
|
|
651
|
+
readAloudRecorderError: (reason: SpeechRecorderError) => string;
|
|
652
|
+
/** Accessible name of the whole feedback region. */
|
|
653
|
+
pronunciationFeedbackLabel: string;
|
|
654
|
+
/** Name of one scored dimension, as a learner reads it. */
|
|
655
|
+
pronunciationDimension: (dimension: ReadAloudDimension) => string;
|
|
656
|
+
/** A dimension or a word the engine did not measure. NEVER rendered as 0%. */
|
|
657
|
+
pronunciationNotAssessed: string;
|
|
658
|
+
/** Accessible name of the word-by-word marks. */
|
|
659
|
+
pronunciationWordsLabel: string;
|
|
660
|
+
/** One legend row per marking state — the same four states the marks carry. */
|
|
661
|
+
pronunciationLegend: (state: ReadAloudWordState) => string;
|
|
662
|
+
/**
|
|
663
|
+
* The four sentences a screen reader hears for a marked word: the only
|
|
664
|
+
* channel the marks have for assistive technology, since the glyph and the
|
|
665
|
+
* decoration are both hidden from it.
|
|
666
|
+
*/
|
|
667
|
+
pronunciationWordCorrect: (word: string) => string;
|
|
668
|
+
pronunciationWordMispronounced: (word: string) => string;
|
|
669
|
+
pronunciationWordOmitted: (word: string) => string;
|
|
670
|
+
pronunciationWordInserted: (word: string) => string;
|
|
671
|
+
/** Opens one word's syllables, sounds and timings. */
|
|
672
|
+
pronunciationWordDetails: (word: string) => string;
|
|
673
|
+
pronunciationSyllables: string;
|
|
674
|
+
pronunciationPhonemes: string;
|
|
675
|
+
/** A syllable the engine also spelled out, e.g. `('ˈhæ', 'ha')`. */
|
|
676
|
+
pronunciationSyllableSpelling: (syllable: string, grapheme: string) => string;
|
|
677
|
+
/** A sound the engine named no symbol for; `ordinal` is 1-based. */
|
|
678
|
+
pronunciationPhonemePosition: (ordinal: number) => string;
|
|
679
|
+
/** Introduces the sounds the engine thought it heard in a sound's place. */
|
|
680
|
+
pronunciationHeardAs: string;
|
|
681
|
+
/** Plays one word out of the learner's own take. */
|
|
682
|
+
pronunciationPlayWord: (word: string) => string;
|
|
683
|
+
pronunciationBreakUnexpected: string;
|
|
684
|
+
pronunciationBreakMissing: string;
|
|
685
|
+
/** Shown only past the caller's own monotone threshold; the SDK sets none. */
|
|
686
|
+
pronunciationMonotone: string;
|
|
687
|
+
/** Names the alphabet the phoneme symbols are written in. */
|
|
688
|
+
pronunciationIpaNote: string;
|
|
463
689
|
/**
|
|
464
690
|
* `<ActivityPreview>`, in place of a draft that still has something missing.
|
|
465
691
|
* Author-facing, not learner-facing — but an editor is translated too.
|
|
@@ -518,4 +744,4 @@ declare const DEFAULT_STRINGS: LkStrings;
|
|
|
518
744
|
*/
|
|
519
745
|
declare function mergeStrings(base: LkStrings, override?: LkStringsOverride): LkStrings;
|
|
520
746
|
|
|
521
|
-
export { type ActivityProps as A, DEFAULT_STRINGS as D, type HtmlSanitizer as H, type LkStrings as L, type MediaBudgetBinding as M, type
|
|
747
|
+
export { type ActivityProps as A, DEFAULT_STRINGS as D, type HtmlSanitizer as H, type LkStrings as L, type MediaBudgetBinding as M, type ReadAloudAssessResult as R, type SequenceMediaBudget as S, type LkStringsOverride as a, type MediaTransportStrings as b, type ReadAloudProps as c, type RecordingBinding as d, type RenderMode as e, type Renderable as f, type RenderableActivity as g, type SequenceRecordingBinding as h, type SequenceRecordingSlot as i, asRenderable as j, asRenderableSequence as k, mergeStrings as m };
|
|
@@ -1,4 +1,83 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SpeechAssessment, GradeRecord, ReadAloudData, RecordingRef, LearnerResponse, ActivityData, ActivityResult, ItemOutcome, MediaPlayLedgerEntry, MediaPlayClaim, MediaPlayGrant, InteractionEvent, ThemeTokens, RedactedActivityData, ItemGroup, SequenceEntry, ReadAloudDimension, ReadAloudWordState, Stimulus } from '@intellectif/lk-core';
|
|
2
|
+
import { R as RecordedTake, S as SpeechRecorderError } from './machine-CuwKqWXC.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What an application's assessor came back with.
|
|
6
|
+
*
|
|
7
|
+
* `code` is a plain `string` and not `SpeechUnscorableCode`: an application's
|
|
8
|
+
* own assessor may refuse a take for a reason the SDK has no name for, and a
|
|
9
|
+
* narrower type would make it unreportable. This component classifies the two
|
|
10
|
+
* codes that mean "nothing was heard" and treats every other one the same way.
|
|
11
|
+
*/
|
|
12
|
+
type ReadAloudAssessResult = {
|
|
13
|
+
status: 'graded';
|
|
14
|
+
assessment: SpeechAssessment;
|
|
15
|
+
grade: GradeRecord;
|
|
16
|
+
} | {
|
|
17
|
+
status: 'unscorable';
|
|
18
|
+
code: string;
|
|
19
|
+
assessment?: SpeechAssessment;
|
|
20
|
+
} | {
|
|
21
|
+
status: 'failed';
|
|
22
|
+
retryable: boolean;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* How a take reaches the application, and how a judgement comes back.
|
|
26
|
+
*
|
|
27
|
+
* Named `recordingBinding` rather than `recording` because both
|
|
28
|
+
* `ReadAloudData.recording` (the bounds) and `ReadAloudLearnerResponse.recording`
|
|
29
|
+
* (the stored take) already exist: the plain name would read as one of those.
|
|
30
|
+
*/
|
|
31
|
+
interface RecordingBinding {
|
|
32
|
+
/**
|
|
33
|
+
* Puts the take in your storage and returns its key. **Required** outside
|
|
34
|
+
* `review`: without it a learner can speak into a control that submits
|
|
35
|
+
* nothing. Settle it — a promise that never does leaves the submit pending
|
|
36
|
+
* for ever.
|
|
37
|
+
*/
|
|
38
|
+
upload(take: RecordedTake): Promise<RecordingRef>;
|
|
39
|
+
/**
|
|
40
|
+
* Judges the stored take. `practice` only — an exam never assesses on the
|
|
41
|
+
* client. Optional: a binding without it records, uploads and submits, and
|
|
42
|
+
* the feedback is replaced by a notice.
|
|
43
|
+
*/
|
|
44
|
+
assess?(ref: RecordingRef): Promise<ReadAloudAssessResult>;
|
|
45
|
+
/** A playable link to a stored take. `review` only. */
|
|
46
|
+
playbackUrl?(ref: RecordingRef): Promise<string>;
|
|
47
|
+
}
|
|
48
|
+
interface ReadAloudProps extends ActivityProps<ReadAloudData> {
|
|
49
|
+
/** How a take is stored and judged. See {@link RecordingBinding}. */
|
|
50
|
+
recordingBinding?: RecordingBinding;
|
|
51
|
+
/**
|
|
52
|
+
* The evidence behind a stored grade, for `review`. Without it a graded
|
|
53
|
+
* outcome still shows its marks, rebuilt from `outcome.grade.details`; with
|
|
54
|
+
* neither, the score is shown and no marks are.
|
|
55
|
+
*/
|
|
56
|
+
assessment?: SpeechAssessment;
|
|
57
|
+
/**
|
|
58
|
+
* Confidence above which a break note is shown, 0..1, forwarded to
|
|
59
|
+
* {@link PronunciationFeedback}. No default — see its own prop.
|
|
60
|
+
*/
|
|
61
|
+
breakThreshold?: number;
|
|
62
|
+
/** The same, for the monotone note. */
|
|
63
|
+
monotoneThreshold?: number;
|
|
64
|
+
/**
|
|
65
|
+
* The URL of a self-hosted copy of `CAPTURE_PROCESSOR_SOURCE`, handed to the
|
|
66
|
+
* recorder, for a Content-Security-Policy whose `script-src` does not allow
|
|
67
|
+
* `blob:`. Without it the capture module is loaded from a `blob:` URL, and a
|
|
68
|
+
* policy that refuses one sends every take through the deprecated
|
|
69
|
+
* main-thread `ScriptProcessorNode` — a take that still records, so nothing
|
|
70
|
+
* says so. See `useSpeechRecorder`'s option of the same name.
|
|
71
|
+
*/
|
|
72
|
+
workletUrl?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Never called. A read-aloud answer is a key in your storage, and there is
|
|
75
|
+
* none until the take has been uploaded — so there is no intermediate
|
|
76
|
+
* response to report, and reporting the take itself would offer a host a
|
|
77
|
+
* recording it has nowhere to put. `onSubmit` carries the response, once.
|
|
78
|
+
*/
|
|
79
|
+
onChange?: (response: LearnerResponse) => void;
|
|
80
|
+
}
|
|
2
81
|
|
|
3
82
|
/**
|
|
4
83
|
* How an activity is being presented. This is the single switch that decides
|
|
@@ -191,11 +270,17 @@ declare function asRenderable<TData extends ActivityData>(redacted: RedactedActi
|
|
|
191
270
|
* ```
|
|
192
271
|
*
|
|
193
272
|
* Pass `renderMode="exam"` (or `"review"`). Redacted data has no answer key, and
|
|
194
|
-
* every built-in activity throws at render in the default `practice`
|
|
195
|
-
* rather than fail later: `<MultipleChoice>`, `<FillInTheBlanks>`,
|
|
273
|
+
* almost every built-in activity throws at render in the default `practice`
|
|
274
|
+
* mode rather than fail later: `<MultipleChoice>`, `<FillInTheBlanks>`,
|
|
196
275
|
* `<GapSelect>` and `<Dictation>` because they grade locally, and
|
|
197
276
|
* `<WrittenResponse>` because `practice` still runs its local submit path and
|
|
198
277
|
* emits a practice-mode xAPI statement.
|
|
278
|
+
*
|
|
279
|
+
* `<ReadAloud>` is the exception and renders a projection in every mode: a
|
|
280
|
+
* read-aloud item has no answer key to withhold, so `redact()` removes only the
|
|
281
|
+
* authored feedback and leaves the reading, its language and its bounds — which
|
|
282
|
+
* is everything the component puts on screen. It grades nothing locally either;
|
|
283
|
+
* the grade comes back from whatever the application asked to judge the take.
|
|
199
284
|
*/
|
|
200
285
|
declare function asRenderableSequence(entries: readonly (RedactedActivityData | RedactedItemGroupData)[]): readonly SequenceEntry<RenderableActivity>[];
|
|
201
286
|
/** Structural shape of a `redactItemGroup()` projection, as it arrives from a server. */
|
|
@@ -331,6 +416,47 @@ interface SequenceMediaBudget {
|
|
|
331
416
|
/** Translations for the transport chrome. Defaults are English. */
|
|
332
417
|
strings?: Partial<MediaTransportStrings>;
|
|
333
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* Which slot a recording belongs to, stamped on every call the pager makes.
|
|
421
|
+
*
|
|
422
|
+
* Exactly the shape {@link ActivitySequenceProps.onSubmit} already passes, so
|
|
423
|
+
* one identity travels with the answer and with the take that answer points at
|
|
424
|
+
* — and a consumer writes `slotId` in both places rather than reconciling two
|
|
425
|
+
* spellings of "which question was this".
|
|
426
|
+
*/
|
|
427
|
+
interface SequenceRecordingSlot {
|
|
428
|
+
/** Identity from `flattenSequence` — stable under shuffling. Store against THIS. */
|
|
429
|
+
slotId: string;
|
|
430
|
+
/** Presented position, which moves under shuffling. */
|
|
431
|
+
index: number;
|
|
432
|
+
activityId: string;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* The pager-level half of a read-aloud recording binding: where every take in
|
|
436
|
+
* this sequence is stored, and how a judgement comes back.
|
|
437
|
+
*
|
|
438
|
+
* One prop at both levels, because it is one concept — the media-budget
|
|
439
|
+
* precedent ({@link SequenceMediaBudget} beside {@link MediaBudgetBinding}).
|
|
440
|
+
* The difference is the second argument: a per-slot binding knows which slot it
|
|
441
|
+
* belongs to, so a sequence-level one is told.
|
|
442
|
+
*
|
|
443
|
+
* The SDK records and hands over; it never judges. `assess` is `practice` only
|
|
444
|
+
* and optional — a sequence that only stores takes gets the "assessment is not
|
|
445
|
+
* available" notice rather than a throw — and `playbackUrl` is `review` only.
|
|
446
|
+
* A slot whose activity is not a read-aloud never calls any of them.
|
|
447
|
+
*/
|
|
448
|
+
interface SequenceRecordingBinding {
|
|
449
|
+
/**
|
|
450
|
+
* Puts the take in your storage and returns its key. **Required** outside
|
|
451
|
+
* `review`: without it a learner can speak into a control that submits
|
|
452
|
+
* nothing, which the component refuses to render. Settle it.
|
|
453
|
+
*/
|
|
454
|
+
upload(take: RecordedTake, slot: SequenceRecordingSlot): Promise<RecordingRef>;
|
|
455
|
+
/** Judges the stored take. `practice` only; an exam never assesses on the client. */
|
|
456
|
+
assess?(ref: RecordingRef, slot: SequenceRecordingSlot): Promise<ReadAloudAssessResult>;
|
|
457
|
+
/** A playable link to a stored take. `review` only. */
|
|
458
|
+
playbackUrl?(ref: RecordingRef, slot: SequenceRecordingSlot): Promise<string>;
|
|
459
|
+
}
|
|
334
460
|
|
|
335
461
|
/**
|
|
336
462
|
* Every string the SDK's own chrome renders.
|
|
@@ -460,6 +586,106 @@ interface LkStrings {
|
|
|
460
586
|
* sentence, because authored feedback may follow it.
|
|
461
587
|
*/
|
|
462
588
|
dictationWordsSummary: (correct: number, total: number) => string;
|
|
589
|
+
/** Accessible name of the group holding the model recording. */
|
|
590
|
+
readAloudModelRecording: string;
|
|
591
|
+
/** Accessible name of the group holding the slower model recording, and its default `alt`. */
|
|
592
|
+
readAloudSlowRecording: string;
|
|
593
|
+
/** Starts a take. */
|
|
594
|
+
readAloudRecord: string;
|
|
595
|
+
/** Ends the take in progress. */
|
|
596
|
+
readAloudStop: string;
|
|
597
|
+
/** Throws the take away so the learner can start over. */
|
|
598
|
+
readAloudRerecord: string;
|
|
599
|
+
/** Accessible name of the player for the take the learner just made. */
|
|
600
|
+
readAloudYourRecording: string;
|
|
601
|
+
/**
|
|
602
|
+
* In place of the player for the learner's own take, and of the buttons that
|
|
603
|
+
* play one word of it, when the page refuses to play it — most often a
|
|
604
|
+
* Content-Security-Policy whose `media-src` does not allow `blob:`. Said
|
|
605
|
+
* rather than left as controls that do nothing when pressed.
|
|
606
|
+
*/
|
|
607
|
+
readAloudPlaybackUnavailable: string;
|
|
608
|
+
/**
|
|
609
|
+
* Live progress while recording. Whole seconds, not a `m:ss` clock: a
|
|
610
|
+
* recording is bounded in seconds by the item, and a translation should not
|
|
611
|
+
* have to reimplement a clock to change the word around it.
|
|
612
|
+
*
|
|
613
|
+
* Shown on screen and hidden from assistive technology: it changes every
|
|
614
|
+
* second, and a screen reader that spoke each change would speak into the
|
|
615
|
+
* take being assessed. The two sentences below are what is announced instead.
|
|
616
|
+
*/
|
|
617
|
+
readAloudRecordingProgress: (seconds: number, maxSeconds: number) => string;
|
|
618
|
+
/** Announced once when a capture begins. */
|
|
619
|
+
readAloudRecordingStarted: string;
|
|
620
|
+
/**
|
|
621
|
+
* Announced once when a capture ends, by the learner or at its own bound.
|
|
622
|
+
* Carries the length because the progress counter is not announced: a take
|
|
623
|
+
* that reads back as "20 of 20 seconds" is one that stopped itself.
|
|
624
|
+
*/
|
|
625
|
+
readAloudRecordingStopped: (seconds: number, maxSeconds: number) => string;
|
|
626
|
+
/** How many takes are left. Called with 0 as well, so the wording is one translation's. */
|
|
627
|
+
readAloudTakesRemaining: (remaining: number, max: number) => string;
|
|
628
|
+
/** `exam` only: hands the item in with no recording at all, deliberately. */
|
|
629
|
+
readAloudSubmitWithoutRecording: string;
|
|
630
|
+
/** Pending, while the take travels to the application's storage. */
|
|
631
|
+
readAloudUploading: string;
|
|
632
|
+
/** The take never reached storage, so nothing was submitted. */
|
|
633
|
+
readAloudUploadFailed: string;
|
|
634
|
+
/** Retries whichever step just failed. */
|
|
635
|
+
readAloudTryAgain: string;
|
|
636
|
+
/** Pending, while the assessor judges the take. */
|
|
637
|
+
readAloudAssessing: string;
|
|
638
|
+
/** The binding stores recordings but judges none, so there is no feedback to show. */
|
|
639
|
+
readAloudAssessmentUnavailable: string;
|
|
640
|
+
/** The assessor found no speech, or too little of it, in the take. */
|
|
641
|
+
readAloudNotHeard: string;
|
|
642
|
+
/** The assessor produced no grade for any other reason. The code itself is never shown. */
|
|
643
|
+
readAloudNotAssessed: string;
|
|
644
|
+
/** The assessment could not be run at all — a failure of the call, not of the reading. */
|
|
645
|
+
readAloudAssessmentFailed: string;
|
|
646
|
+
/**
|
|
647
|
+
* What went wrong with the microphone or with the take. One function rather
|
|
648
|
+
* than five keys, so a translation keeps the five sentences together and the
|
|
649
|
+
* SDK keeps one name for the concept.
|
|
650
|
+
*/
|
|
651
|
+
readAloudRecorderError: (reason: SpeechRecorderError) => string;
|
|
652
|
+
/** Accessible name of the whole feedback region. */
|
|
653
|
+
pronunciationFeedbackLabel: string;
|
|
654
|
+
/** Name of one scored dimension, as a learner reads it. */
|
|
655
|
+
pronunciationDimension: (dimension: ReadAloudDimension) => string;
|
|
656
|
+
/** A dimension or a word the engine did not measure. NEVER rendered as 0%. */
|
|
657
|
+
pronunciationNotAssessed: string;
|
|
658
|
+
/** Accessible name of the word-by-word marks. */
|
|
659
|
+
pronunciationWordsLabel: string;
|
|
660
|
+
/** One legend row per marking state — the same four states the marks carry. */
|
|
661
|
+
pronunciationLegend: (state: ReadAloudWordState) => string;
|
|
662
|
+
/**
|
|
663
|
+
* The four sentences a screen reader hears for a marked word: the only
|
|
664
|
+
* channel the marks have for assistive technology, since the glyph and the
|
|
665
|
+
* decoration are both hidden from it.
|
|
666
|
+
*/
|
|
667
|
+
pronunciationWordCorrect: (word: string) => string;
|
|
668
|
+
pronunciationWordMispronounced: (word: string) => string;
|
|
669
|
+
pronunciationWordOmitted: (word: string) => string;
|
|
670
|
+
pronunciationWordInserted: (word: string) => string;
|
|
671
|
+
/** Opens one word's syllables, sounds and timings. */
|
|
672
|
+
pronunciationWordDetails: (word: string) => string;
|
|
673
|
+
pronunciationSyllables: string;
|
|
674
|
+
pronunciationPhonemes: string;
|
|
675
|
+
/** A syllable the engine also spelled out, e.g. `('ˈhæ', 'ha')`. */
|
|
676
|
+
pronunciationSyllableSpelling: (syllable: string, grapheme: string) => string;
|
|
677
|
+
/** A sound the engine named no symbol for; `ordinal` is 1-based. */
|
|
678
|
+
pronunciationPhonemePosition: (ordinal: number) => string;
|
|
679
|
+
/** Introduces the sounds the engine thought it heard in a sound's place. */
|
|
680
|
+
pronunciationHeardAs: string;
|
|
681
|
+
/** Plays one word out of the learner's own take. */
|
|
682
|
+
pronunciationPlayWord: (word: string) => string;
|
|
683
|
+
pronunciationBreakUnexpected: string;
|
|
684
|
+
pronunciationBreakMissing: string;
|
|
685
|
+
/** Shown only past the caller's own monotone threshold; the SDK sets none. */
|
|
686
|
+
pronunciationMonotone: string;
|
|
687
|
+
/** Names the alphabet the phoneme symbols are written in. */
|
|
688
|
+
pronunciationIpaNote: string;
|
|
463
689
|
/**
|
|
464
690
|
* `<ActivityPreview>`, in place of a draft that still has something missing.
|
|
465
691
|
* Author-facing, not learner-facing — but an editor is translated too.
|
|
@@ -518,4 +744,4 @@ declare const DEFAULT_STRINGS: LkStrings;
|
|
|
518
744
|
*/
|
|
519
745
|
declare function mergeStrings(base: LkStrings, override?: LkStringsOverride): LkStrings;
|
|
520
746
|
|
|
521
|
-
export { type ActivityProps as A, DEFAULT_STRINGS as D, type HtmlSanitizer as H, type LkStrings as L, type MediaBudgetBinding as M, type
|
|
747
|
+
export { type ActivityProps as A, DEFAULT_STRINGS as D, type HtmlSanitizer as H, type LkStrings as L, type MediaBudgetBinding as M, type ReadAloudAssessResult as R, type SequenceMediaBudget as S, type LkStringsOverride as a, type MediaTransportStrings as b, type ReadAloudProps as c, type RecordingBinding as d, type RenderMode as e, type Renderable as f, type RenderableActivity as g, type SequenceRecordingBinding as h, type SequenceRecordingSlot as i, asRenderable as j, asRenderableSequence as k, mergeStrings as m };
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkD4DQFTA7_cjs = require('../chunk-D4DQFTA7.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "ThemeProvider", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkD4DQFTA7_cjs.ThemeProvider; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "createTailwindTheme", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkD4DQFTA7_cjs.createTailwindTheme; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "darkTheme", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkD4DQFTA7_cjs.darkTheme; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "defaultTheme", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkD4DQFTA7_cjs.defaultTheme; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "useTheme", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkD4DQFTA7_cjs.useTheme; }
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=ThemeProvider.cjs.map
|
|
29
29
|
//# sourceMappingURL=ThemeProvider.cjs.map
|
|
@@ -31,10 +31,10 @@ declare function createTailwindTheme(theme: Partial<ThemeTokens>): TailwindTheme
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Canonical default theme token values. `defaults.css` mirrors these exactly.
|
|
34
|
-
* Palette is a neutral monochrome
|
|
35
|
-
* out of the box; consumers rebrand via `ThemeProvider`. All
|
|
36
|
-
* verified to meet WCAG 2.2 AA: 4.5:1 for normal text, 3:1 for
|
|
37
|
-
* (see theme/__tests__/contrast.test.ts).
|
|
34
|
+
* Palette is a neutral monochrome, deliberately unbranded, so the SDK carries
|
|
35
|
+
* nobody's look out of the box; consumers rebrand via `ThemeProvider`. All
|
|
36
|
+
* colour pairs are verified to meet WCAG 2.2 AA: 4.5:1 for normal text, 3:1 for
|
|
37
|
+
* UI / focus ring (see theme/__tests__/contrast.test.ts).
|
|
38
38
|
*/
|
|
39
39
|
declare const defaultTheme: ThemeTokens;
|
|
40
40
|
|
|
@@ -31,10 +31,10 @@ declare function createTailwindTheme(theme: Partial<ThemeTokens>): TailwindTheme
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Canonical default theme token values. `defaults.css` mirrors these exactly.
|
|
34
|
-
* Palette is a neutral monochrome
|
|
35
|
-
* out of the box; consumers rebrand via `ThemeProvider`. All
|
|
36
|
-
* verified to meet WCAG 2.2 AA: 4.5:1 for normal text, 3:1 for
|
|
37
|
-
* (see theme/__tests__/contrast.test.ts).
|
|
34
|
+
* Palette is a neutral monochrome, deliberately unbranded, so the SDK carries
|
|
35
|
+
* nobody's look out of the box; consumers rebrand via `ThemeProvider`. All
|
|
36
|
+
* colour pairs are verified to meet WCAG 2.2 AA: 4.5:1 for normal text, 3:1 for
|
|
37
|
+
* UI / focus ring (see theme/__tests__/contrast.test.ts).
|
|
38
38
|
*/
|
|
39
39
|
declare const defaultTheme: ThemeTokens;
|
|
40
40
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { ThemeProvider, createTailwindTheme, darkTheme, defaultTheme, useTheme } from '../chunk-
|
|
2
|
+
export { ThemeProvider, createTailwindTheme, darkTheme, defaultTheme, useTheme } from '../chunk-RXS455MR.js';
|
|
3
3
|
//# sourceMappingURL=ThemeProvider.js.map
|
|
4
4
|
//# sourceMappingURL=ThemeProvider.js.map
|