@intellectif/lk-react 7.0.1 → 7.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 +79 -0
- package/README.md +5 -2
- package/dist/{WrittenResponse-BJL4dGsR.d.ts → WrittenResponse-BdD1-2tQ.d.ts} +3 -1
- package/dist/{WrittenResponse-zWT-Go1g.d.cts → WrittenResponse-Cb_Fg4fc.d.cts} +3 -1
- package/dist/{chunk-C3HR55JD.js → chunk-365FW4BO.js} +24 -13
- package/dist/chunk-365FW4BO.js.map +1 -0
- package/dist/{chunk-VHULVDPG.js → chunk-4WLZONV6.js} +29 -14
- package/dist/chunk-4WLZONV6.js.map +1 -0
- package/dist/{chunk-6F4X2NKL.js → chunk-6DYGQKYD.js} +5 -5
- package/dist/chunk-6DYGQKYD.js.map +1 -0
- package/dist/chunk-7CQ7NUMX.js +113 -0
- package/dist/chunk-7CQ7NUMX.js.map +1 -0
- package/dist/{chunk-6DSA75TA.cjs → chunk-7RLLJHCI.cjs} +35 -20
- package/dist/chunk-7RLLJHCI.cjs.map +1 -0
- package/dist/{chunk-FB6XKQFV.cjs → chunk-B4OR4LPL.cjs} +23 -23
- package/dist/chunk-B4OR4LPL.cjs.map +1 -0
- package/dist/{chunk-UFWF3BKA.cjs → chunk-CKATY6WH.cjs} +13 -24
- package/dist/chunk-CKATY6WH.cjs.map +1 -0
- package/dist/{chunk-52A5UNCH.js → chunk-F3EBTOOH.js} +13 -24
- package/dist/chunk-F3EBTOOH.js.map +1 -0
- package/dist/{chunk-PPJ47THY.cjs → chunk-GMPSLHGL.cjs} +27 -29
- package/dist/chunk-GMPSLHGL.cjs.map +1 -0
- package/dist/{chunk-XS2SZINH.js → chunk-GTX4IWIT.js} +10 -13
- package/dist/chunk-GTX4IWIT.js.map +1 -0
- package/dist/{chunk-3VQV7ICQ.js → chunk-MU5WELLJ.js} +18 -18
- package/dist/chunk-MU5WELLJ.js.map +1 -0
- package/dist/{chunk-ABHJW4LC.cjs → chunk-MVJQ3KVE.cjs} +11 -14
- package/dist/chunk-MVJQ3KVE.cjs.map +1 -0
- package/dist/{chunk-XGQKID2P.cjs → chunk-RWR77BOV.cjs} +29 -18
- package/dist/chunk-RWR77BOV.cjs.map +1 -0
- package/dist/chunk-UGLMKKNA.cjs +120 -0
- package/dist/chunk-UGLMKKNA.cjs.map +1 -0
- package/dist/{chunk-PGEG7UZJ.cjs → chunk-YDSFFFR4.cjs} +5 -5
- package/dist/chunk-YDSFFFR4.cjs.map +1 -0
- package/dist/{chunk-7YLY3G3E.js → chunk-ZCQXFIB3.js} +23 -25
- package/dist/chunk-ZCQXFIB3.js.map +1 -0
- package/dist/components/ActivitySequence.cjs +9 -8
- package/dist/components/ActivitySequence.d.cts +16 -3
- package/dist/components/ActivitySequence.d.ts +16 -3
- package/dist/components/ActivitySequence.js +8 -7
- package/dist/components/FillInTheBlanks.cjs +5 -4
- package/dist/components/FillInTheBlanks.d.cts +1 -1
- package/dist/components/FillInTheBlanks.d.ts +1 -1
- package/dist/components/FillInTheBlanks.js +4 -3
- package/dist/components/MultipleChoice.cjs +5 -4
- package/dist/components/MultipleChoice.d.cts +1 -1
- package/dist/components/MultipleChoice.d.ts +1 -1
- package/dist/components/MultipleChoice.js +4 -3
- package/dist/components/StimulusPanel.cjs +4 -3
- package/dist/components/StimulusPanel.d.cts +4 -2
- package/dist/components/StimulusPanel.d.ts +4 -2
- package/dist/components/StimulusPanel.js +3 -2
- package/dist/components/WrittenResponse.cjs +5 -4
- package/dist/components/WrittenResponse.d.cts +3 -3
- package/dist/components/WrittenResponse.d.ts +3 -3
- package/dist/components/WrittenResponse.js +4 -3
- package/dist/i18n/LkIntlProvider.cjs +33 -0
- package/dist/i18n/LkIntlProvider.cjs.map +1 -0
- package/dist/i18n/LkIntlProvider.d.cts +71 -0
- package/dist/i18n/LkIntlProvider.d.ts +71 -0
- package/dist/i18n/LkIntlProvider.js +4 -0
- package/dist/i18n/LkIntlProvider.js.map +1 -0
- package/dist/index.cjs +40 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/{types-eXX4hzSj.d.cts → strings-CfgmSQzU.d.cts} +163 -3
- package/dist/{types-eXX4hzSj.d.ts → strings-CfgmSQzU.d.ts} +163 -3
- package/dist/theme/skin.css +4 -4
- package/package.json +13 -3
- package/dist/chunk-3VQV7ICQ.js.map +0 -1
- package/dist/chunk-52A5UNCH.js.map +0 -1
- package/dist/chunk-6DSA75TA.cjs.map +0 -1
- package/dist/chunk-6F4X2NKL.js.map +0 -1
- package/dist/chunk-7YLY3G3E.js.map +0 -1
- package/dist/chunk-ABHJW4LC.cjs.map +0 -1
- package/dist/chunk-C3HR55JD.js.map +0 -1
- package/dist/chunk-FB6XKQFV.cjs.map +0 -1
- package/dist/chunk-PGEG7UZJ.cjs.map +0 -1
- package/dist/chunk-PPJ47THY.cjs.map +0 -1
- package/dist/chunk-UFWF3BKA.cjs.map +0 -1
- package/dist/chunk-VHULVDPG.js.map +0 -1
- package/dist/chunk-XGQKID2P.cjs.map +0 -1
- package/dist/chunk-XS2SZINH.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/WrittenResponse/WrittenResponse.tsx","../src/components/WrittenResponse/index.tsx"],"names":["WrittenResponse","jsx"],"mappings":";;;;;;;;AAsIA,SAAS,OAAO,QAAA,EAA+C;AAC7D,EAAA,OAAO,aAAa,MAAA,IAAa,QAAA,CAAS,IAAA,KAAS,kBAAA,GAAqB,SAAS,IAAA,GAAO,EAAA;AAC1F;AAaA,SAAS,iBAAiB,SAAA,EAAmC;AAC3D,EAAA,MAAM,GAAA,GAAM,UAAU,QAAA,KAAa,MAAA,IAAa,UAAU,QAAA,GAAW,CAAA,GAAI,UAAU,QAAA,GAAW,CAAA;AAC9F,EAAA,OAAO,GAAG,IAAA,CAAK,K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AAAA,YACV,QAAA,EAAU,QAAA,IAAY,IAAA,CAAK,IAAA,GAAO,MAAA,KAAW,CAAA;AAAA,YAE5C,QAAA,EAAA,CAAA,CAAE;AAAA;AAAA,SACL;AAAA,wBAEF,GAAA,CAAC,cAAA,EAAA,EAAe,EAAA,EAAI,CAAA,EAAG,KAAK,EAAE,CAAA,SAAA,CAAA,EAC3B,QAAA,EAAA,QAAA,GAAW,OAAA,uBAAW,cAAA,EAAA,EAAe,OAAA,EAAkB,CAAA,EAAM,CAAA,GAAK,OAAO,OAAA,EAC5E;AAAA;AAAA;AAAA,GACF;AAEJ;ACtfO,SAASA,iBAAgB,KAAA,EAA6B;AAG3D,EAAA,MAAM,OAAA,GAAU,YAAA,CAAa,KAAA,CAAM,OAAO,CAAA;AAC1C,EAAA,uBACEC,GAAAA,CAAC,qBAAA,EAAA,EAAsB,aAAA,EAAe,KAAA,CAAM,IAAA,EAAM,KAAA,EAAO,OAAA,EACvD,QAAA,kBAAAA,GAAAA,CAAC,eAAA,EAAA,EAAqB,GAAG,OAAO,CAAA,EAClC,CAAA;AAEJ","file":"chunk-ZCQXFIB3.js","sourcesContent":["'use client';\n\nimport {\n ActivitySchemaError,\n type CriterionScore,\n countWords,\n evaluate,\n type GradeRecord,\n type InteractionEvent,\n type ItemOutcome,\n type LearnerResponse,\n type ThemeTokens,\n validateActivity,\n type WrittenResponseData,\n type XAPIStatement,\n xAPIBuilder,\n} from '@intellectif/lk-core';\nimport { type CSSProperties, useEffect, useMemo, useRef, useState } from 'react';\nimport { useActivityState } from '../../hooks/useActivityState.js';\nimport { useLkStrings } from '../../i18n/LkIntlProvider.js';\nimport type { LkStrings, LkStringsOverride } from '../../i18n/strings.js';\nimport { ANONYMOUS_ACTOR, isDevelopment, objectIdFor } from '../_internal.js';\nimport { ActivityMedia } from '../shared/ActivityMedia.js';\nimport { FeedbackRegion } from '../shared/FeedbackRegion.js';\nimport type {\n HtmlSanitizer,\n MediaBudgetBinding,\n MediaTransportStrings,\n Renderable,\n RenderMode,\n} from '../types.js';\n\n/**\n * Payload delivered when the learner submits a written response. Grading is\n * DEFERRED (asynchronous AI/human grading), so there is no score here — and\n * deliberately no fake one: an ungraded submission must never be shown or\n * stored as a 0. The consumer persists `text` and grades it out-of-band.\n */\nexport interface WrittenResponseSubmission {\n /** The submitted text, verbatim. */\n text: string;\n /** Word count of `text`, recomputed with the canonical `countWords()`. */\n wordCount: number;\n /** Whether `wordCount` falls within the activity's `[minWords, maxWords]`. */\n withinWordBounds: boolean;\n /** Time in milliseconds from first interaction to submission. */\n timeSpent: number;\n /** The SUBMITTED-verb xAPI statement built for this submission (no score fields). */\n xapiStatement: XAPIStatement;\n}\n\n/**\n * Props for {@link WrittenResponse}. Mirrors `ActivityProps` except for the\n * completion callback: a deferred-grading activity completes with a\n * {@link WrittenResponseSubmission} (`onSubmitted`), not a scored\n * `ActivityResult` (`onComplete`) — deviation from Req 22.8 recorded in the\n * roadmap (§3.1): fabricating a score of 0 for ungraded work is the exact\n * bug this type exists to fix. Everything else — controlled value, render\n * mode, server outcome, rich text — follows the shared `ActivityProps`\n * contract verbatim.\n */\nexport interface WrittenResponseProps {\n /** Activity content. Accepts a `redact()` projection in `exam` mode. */\n data: Renderable<WrittenResponseData>;\n /**\n * Called on submit with the ungraded submission (text, recomputed word\n * count, bounds flag, timing, xAPI statement). Fires in `practice` and\n * `exam` mode, after `onSubmit`; never in `review`.\n *\n * Optional since lk-react 2.1.0 so a `review`-mode render (which has no submit\n * control) and an exam runner that only wants the raw response through\n * `onSubmit` do not have to pass a no-op. Supply it in `practice`/`exam`\n * unless `onSubmit` already captures everything you persist.\n */\n onSubmitted?: (submission: WrittenResponseSubmission) => void;\n /**\n * Called on submit with the raw learner response and no grade, BEFORE\n * `onSubmitted`. This is the only submit callback an exam runner needs:\n * the server grades the text and returns an {@link ItemOutcome} later.\n */\n onSubmit?: (response: LearnerResponse) => void;\n /**\n * Controlled value: the learner's current response. When present the\n * textarea renders from it (never from internal state) and every keystroke\n * goes out through `onChange` — restore an in-progress attempt, autosave a\n * delta, or drive a review render with it.\n */\n value?: LearnerResponse;\n /** Initial response for an uncontrolled component (ignored when `value` is set). */\n defaultValue?: LearnerResponse;\n /**\n * Mount as already submitted — read at mount only. Without it a resumed\n * attempt reopens an essay the learner had already submitted as editable\n * and re-submittable.\n */\n defaultSubmitted?: boolean;\n /** Fires on every change to the learner's response. Required for a controlled component. */\n onChange?: (response: LearnerResponse) => void;\n /**\n * Presentation mode, default `practice`. `practice` and `exam` are nearly\n * identical here — a written response is never graded client-side, so\n * there is no local score to withhold; `exam` additionally never calls\n * `evaluate()` and renders happily from a `redact()` projection.\n * `review` is read-only and shows the server's `outcome`.\n */\n renderMode?: RenderMode;\n /**\n * Server-computed outcome, rendered by `review` mode: `deferred` shows a\n * \"not graded yet\" affordance, `scored` shows the returned grade and\n * feedback. Ignored in other modes — this component never manufactures an\n * outcome of its own.\n */\n outcome?: ItemOutcome;\n /** Renders `data.promptHtml` when provided. See `HtmlSanitizer`. */\n sanitizeHtml?: HtmlSanitizer;\n /** Binds this activity's own `data.media` to a play budget. See {@link MediaBudgetBinding}. */\n mediaBudget?: MediaBudgetBinding;\n /** Translations for the audio transport chrome. See {@link MediaTransportStrings}. */\n mediaStrings?: Partial<MediaTransportStrings>;\n /** Overrides the SDK's chrome text for this activity. See {@link LkIntlProvider}. */\n strings?: LkStringsOverride;\n onInteraction?: (event: InteractionEvent) => void;\n /** Per-instance token overrides, applied as inline CSS vars on the root. */\n theme?: Partial<ThemeTokens>;\n locale?: string;\n disabled?: boolean;\n}\n\n/**\n * Reads the text out of a learner response. Another activity type's response\n * shape (the `value`/`defaultValue` props take the `LearnerResponse` union,\n * so a generic runner can hand any of them over) reads as empty rather than\n * throwing mid-exam.\n */\nfunction textOf(response: LearnerResponse | undefined): string {\n return response !== undefined && response.type === 'written-response' ? response.text : '';\n}\n\n/**\n * One criterion's score as a percentage of its OWN maximum.\n *\n * `CriterionScore.maxScore` defaults to 1 — the SDK's scaled convention — but\n * a grader may work out of 100, or out of 9 for a CEFR band, and\n * `gradeFromRubric` deliberately stores those judgements verbatim so a grade\n * stays auditable in the units the grader actually used. It normalises when it\n * computes the total; anything DISPLAYING a criterion has to normalise too, or\n * a perfectly ordinary 82/100 renders as \"8200%\". This is the same guard the\n * overall score already applies against `outcome.maxScore`.\n */\nfunction criterionPercent(criterion: CriterionScore): string {\n const max = criterion.maxScore !== undefined && criterion.maxScore > 0 ? criterion.maxScore : 1;\n return `${Math.round(((criterion.score as number) / max) * 100)}%`;\n}\n\n/**\n * Renders the server-computed outcome in `review` mode. The grade shown here\n * always came back from the asynchronous grader — nothing on this path scores,\n * infers, or defaults a grade. A `written-response` outcome carries no\n * per-item `details` (there are no options or blanks to mark), so the render\n * is the scaled score, the pass state, and the grader's feedback.\n */\nfunction GradeBody({ grade, s }: { grade: GradeRecord; s: LkStrings }) {\n return (\n <>\n {grade.feedback ? <p className=\"lk-wr-grade-feedback\">{grade.feedback}</p> : null}\n {grade.criteria && grade.criteria.length > 0 ? (\n <ul className=\"lk-wr-criteria\">\n {grade.criteria.map((criterion) => (\n <li\n className=\"lk-wr-criterion\"\n key={criterion.name}\n data-na={String(criterion.notApplicable === true)}\n >\n <span className=\"lk-wr-criterion-name\">{criterion.name}</span>\n {criterion.notApplicable === true ? (\n <span className=\"lk-wr-criterion-score\">{s.notApplicable}</span>\n ) : (\n <span className=\"lk-wr-criterion-score\">\n {criterion.band ??\n (typeof criterion.score === 'number' ? criterionPercent(criterion) : '')}\n </span>\n )}\n {criterion.comment ? (\n <span className=\"lk-wr-criterion-comment\">{criterion.comment}</span>\n ) : null}\n </li>\n ))}\n </ul>\n ) : null}\n {grade.corrections && grade.corrections.length > 0 ? (\n <ul className=\"lk-wr-corrections\">\n {grade.corrections.map((correction) => (\n <li className=\"lk-wr-correction\" key={`${correction.original}:${correction.corrected}`}>\n <del className=\"lk-wr-correction-original\">{correction.original}</del>{' '}\n <ins className=\"lk-wr-correction-corrected\">{correction.corrected}</ins>\n {correction.explanation ? (\n <span className=\"lk-wr-correction-explanation\">{correction.explanation}</span>\n ) : null}\n </li>\n ))}\n </ul>\n ) : null}\n {grade.requiresHumanReview === true ? (\n <p className=\"lk-wr-review-flag\">{s.awaitingHumanReview}</p>\n ) : null}\n </>\n );\n}\n\n/**\n * Renders the server-computed outcome in `review` mode. The grade shown here\n * always came back from the grader — nothing on this path scores, infers, or\n * defaults a grade.\n */\nfunction OutcomeSummary({ outcome, s }: { outcome: ItemOutcome; s: LkStrings }) {\n if (outcome.status === 'scored' || outcome.status === 'graded') {\n // `score` is scaled [0–1] against `maxScore`; normalising by `maxScore`\n // is a no-op for the canonical maxScore of 1 and keeps an unscaled\n // grader payload (8.5 / 10) from rendering as 850%.\n const percent =\n outcome.maxScore > 0\n ? Math.round((outcome.score / outcome.maxScore) * 100)\n : Math.round(outcome.score * 100);\n return (\n <div\n className=\"lk-wr-outcome\"\n data-status={outcome.status}\n data-passed={String(outcome.passed)}\n >\n <p className=\"lk-wr-grade\">{s.scoreAnnouncement(percent, outcome.passed)}</p>\n {outcome.status === 'graded' ? (\n <GradeBody grade={outcome.grade} s={s} />\n ) : outcome.feedback ? (\n <p className=\"lk-wr-grade-feedback\">{outcome.feedback}</p>\n ) : null}\n </div>\n );\n }\n if (outcome.status === 'deferred') {\n return (\n <div className=\"lk-wr-outcome\" data-status=\"deferred\">\n <p className=\"lk-wr-grade\">{s.awaitingGrade}</p>\n </div>\n );\n }\n // `unscorable` reasons are developer-facing strings; surface the state, not\n // the reason, and leave it on the element for diagnostics.\n return (\n <div className=\"lk-wr-outcome\" data-status=\"unscorable\" data-reason={outcome.reason}>\n <p className=\"lk-wr-grade\">{s.couldNotBeGraded}</p>\n </div>\n );\n}\n\nexport function WrittenResponse({\n data,\n onSubmitted,\n onSubmit,\n value,\n defaultValue,\n defaultSubmitted,\n onChange,\n renderMode = 'practice',\n outcome,\n sanitizeHtml,\n mediaBudget,\n mediaStrings,\n strings,\n onInteraction,\n theme,\n locale,\n disabled,\n}: WrittenResponseProps) {\n // Dev-only boundary validation (Req 2.3), same convention as MC/FIB. The\n // content schema is loose, so a `redact()` projection validates too.\n const s = useLkStrings(strings);\n\n const devError = useMemo(() => {\n if (!isDevelopment()) {\n return null;\n }\n const result = validateActivity('written-response', data);\n return result.success ? null : new ActivitySchemaError('written-response', result.errors);\n }, [data]);\n\n const { state, start, complete, getTimeSpent, reset } = useActivityState(\n defaultSubmitted === true ? 'completed' : 'idle',\n );\n const isControlled = value !== undefined;\n const [innerText, setInnerText] = useState<string>(() => textOf(defaultValue));\n const [summary, setSummary] = useState<string | null>(null);\n\n /**\n * Rich text is rendered ONLY through a caller-supplied sanitiser, and only\n * when the author actually shipped the HTML sidecar. Without both, the\n * plain-text prompt is rendered as an escaped React child.\n */\n const promptHtml = useMemo(() => {\n if (sanitizeHtml === undefined || typeof data.promptHtml !== 'string') {\n return null;\n }\n return sanitizeHtml(data.promptHtml);\n }, [data.promptHtml, sanitizeHtml]);\n\n // Latest seed text, kept in a ref so `defaultValue` is NOT a reset trigger:\n // callers pass an object literal, whose identity changes every render.\n const defaultTextRef = useRef<string>(textOf(defaultValue));\n useEffect(() => {\n defaultTextRef.current = textOf(defaultValue);\n }, [defaultValue]);\n\n // Reset on data-prop change (Req 3.7): back to the seed (empty when there\n // is none — the v1 behaviour), never the previous activity's draft.\n // biome-ignore lint/correctness/useExhaustiveDependencies: data is the reset trigger (Req 3.7)\n // Mirror `defaultSubmitted` so the reset below returns to the SEEDED state.\n // Resetting unconditionally to idle unlocked an item the learner had already\n // committed — which made `defaultSubmitted` a no-op here, since this effect\n // runs right after the first paint.\n const defaultSubmittedRef = useRef(defaultSubmitted);\n useEffect(() => {\n defaultSubmittedRef.current = defaultSubmitted;\n }, [defaultSubmitted]);\n\n // Identity guard so the MOUNT run is a no-op. Without it this effect fires\n // after the first paint and undoes every seed it was just given; with it,\n // only a real `data` change resets. A parent that rebuilds structurally\n // identical entries in render (`activities={raw.map(redact)}`) must not\n // unlock or revert a restored answer — the pager already remounts a slot\n // whose activity actually changed, via its key.\n const lastDataRef = useRef(data);\n useEffect(() => {\n if (lastDataRef.current === data) {\n return;\n }\n lastDataRef.current = data;\n setInnerText(defaultTextRef.current);\n setSummary(null);\n reset(defaultSubmittedRef.current === true ? 'completed' : 'idle');\n }, [data, reset]);\n\n if (devError) {\n throw devError;\n }\n\n const isExam = renderMode === 'exam';\n const isReview = renderMode === 'review';\n\n const text = isControlled ? textOf(value) : innerText;\n const submitted = state === 'completed';\n const inactive = disabled === true || submitted || isReview;\n const wordCount = countWords(text);\n const withinBounds = wordCount >= data.minWords && wordCount <= data.maxWords;\n\n const handleChange = (next: string): void => {\n if (inactive) {\n return;\n }\n if (state === 'idle') {\n start();\n }\n // A controlled component renders from `props.value` only; the caller's\n // state is the single source of truth for the text.\n if (!isControlled) {\n setInnerText(next);\n }\n const nextWordCount = countWords(next);\n onChange?.({ type: 'written-response', text: next, wordCount: nextWordCount });\n onInteraction?.({\n type: 'text-changed',\n activityId: data.id,\n timestamp: Date.now(),\n payload: { wordCount: nextWordCount },\n });\n };\n\n // Practice reveals nothing an essay could leak, but it DOES run the local\n // submit path and emit a practice xAPI statement for work the server is\n // supposed to grade. MultipleChoice and FillInTheBlanks have refused\n // redacted data in `practice` since 0.5.0; this component silently accepted\n // it, so an all-essay redacted paper mounted without `renderMode` looked\n // entirely healthy end to end. Fail at render, like its siblings.\n if (data.redacted === true && renderMode === 'practice') {\n throw new Error(\n `Written Response \"${data.id}\" received redacted activity data in renderMode \"practice\". ` +\n 'Practice runs the local submit path and emits a practice-mode xAPI statement, so an ' +\n 'exam item wired this way is graded nowhere and looks fine while it happens. ' +\n 'Render redacted data with renderMode=\"exam\" (server grades) or \"review\" (pass `outcome`).',\n );\n }\n\n const handleSubmit = (event: React.FormEvent): void => {\n event.preventDefault();\n if (inactive || text.trim().length === 0) {\n return;\n }\n let finalWordCount = wordCount;\n let finalWithinBounds = withinBounds;\n // `exam` mode must not call evaluate(): the component does not grade, and\n // a redacted projection carries no scoring input anyway. The two facts\n // evaluate() returns for a deferred type (recomputed word count, bounds)\n // are exactly what is computed above, so the payload is identical either\n // way; practice keeps going through core so the numbers stay canonical.\n if (!isExam) {\n const itemOutcome = evaluate(data, { type: 'written-response', text, wordCount });\n const partial = itemOutcome.status === 'deferred' ? itemOutcome.partial : undefined;\n if (typeof partial?.wordCount === 'number') {\n finalWordCount = partial.wordCount;\n }\n if (typeof partial?.withinWordBounds === 'boolean') {\n finalWithinBounds = partial.withinWordBounds;\n }\n }\n complete();\n const timeSpent = getTimeSpent();\n const xapiStatement = xAPIBuilder.buildSubmittedStatement({\n actor: ANONYMOUS_ACTOR,\n object: {\n id: objectIdFor(data.id),\n name: { [data.locale ?? 'en-US']: data.title },\n type: 'http://adlnet.gov/expapi/activities/cmi.interaction',\n interactionType: 'long-fill-in',\n },\n timeSpentMs: timeSpent,\n response: text,\n resultExtensions: {\n 'urn:learning-kit:extension:word-count': finalWordCount,\n 'urn:learning-kit:extension:within-word-bounds': finalWithinBounds,\n },\n });\n // Raw response first (an exam runner persists this), then the fuller\n // ungraded submission — mirroring `onSubmit` before `onComplete`.\n onSubmit?.({ type: 'written-response', text, wordCount: finalWordCount });\n onSubmitted?.({\n text,\n wordCount: finalWordCount,\n withinWordBounds: finalWithinBounds,\n timeSpent,\n xapiStatement,\n });\n setSummary(s.responseSubmitted);\n onInteraction?.({\n type: 'submitted',\n activityId: data.id,\n timestamp: Date.now(),\n payload: { wordCount: finalWordCount, withinWordBounds: finalWithinBounds },\n });\n };\n\n const promptId = `${data.id}-prompt`;\n const counterId = `${data.id}-counter`;\n const boundsLabel = s.wordBounds(data.minWords, data.maxWords);\n\n return (\n <form\n className=\"lk-wr\"\n aria-label={data.title}\n lang={locale}\n data-render-mode={renderMode}\n style={theme as CSSProperties | undefined}\n onSubmit={handleSubmit}\n >\n {data.media ? (\n <ActivityMedia\n media={data.media}\n renderMode={renderMode}\n {...(mediaBudget !== undefined ? { mediaBudget } : {})}\n {...(mediaStrings !== undefined ? { mediaStrings } : {})}\n {...(strings !== undefined ? { strings } : {})}\n {...(onInteraction !== undefined ? { onInteraction } : {})}\n {...(locale !== undefined ? { locale } : {})}\n />\n ) : null}\n {promptHtml === null ? (\n <p className=\"lk-wr-prompt\" id={promptId}>\n {data.prompt}\n </p>\n ) : (\n // A div, not a p: sanitised author HTML may contain block content.\n <div\n className=\"lk-wr-prompt\"\n id={promptId}\n // biome-ignore lint/security/noDangerouslySetInnerHtml: rendered only through the caller-supplied HtmlSanitizer — the SDK never injects unsanitised markup\n dangerouslySetInnerHTML={{ __html: promptHtml }}\n />\n )}\n <textarea\n className=\"lk-wr-textarea\"\n aria-labelledby={promptId}\n aria-describedby={counterId}\n value={text}\n onChange={(event) => handleChange(event.target.value)}\n // `review` uses readOnly rather than disabled: the submitted essay\n // must stay focusable, selectable and scrollable for a screen reader\n // and a keyboard, while remaining uneditable.\n disabled={!isReview && inactive}\n readOnly={isReview}\n rows={8}\n />\n <div\n className=\"lk-wr-counter\"\n id={counterId}\n aria-live=\"polite\"\n data-within-bounds={withinBounds}\n >\n {s.wordCount(wordCount)} ({boundsLabel})\n </div>\n {isReview ? null : (\n <button\n type=\"submit\"\n className=\"lk-wr-submit\"\n disabled={inactive || text.trim().length === 0}\n >\n {s.submit}\n </button>\n )}\n <FeedbackRegion id={`${data.id}-feedback`}>\n {isReview ? outcome ? <OutcomeSummary outcome={outcome} s={s} /> : null : summary}\n </FeedbackRegion>\n </form>\n );\n}\n","'use client';\n\nimport { useLkStrings } from '../../i18n/LkIntlProvider.js';\nimport { ActivityErrorBoundary } from '../ActivityErrorBoundary.js';\nimport {\n WrittenResponse as WrittenResponseCore,\n type WrittenResponseProps,\n} from './WrittenResponse.js';\n\nexport type { HtmlSanitizer, Renderable, RenderMode } from '../types.js';\nexport type { WrittenResponseProps, WrittenResponseSubmission } from './WrittenResponse.js';\n\n/**\n * Public Written Response activity: a labelled textarea with a live word\n * counter for free-text writing graded asynchronously (AI or human). The core\n * is wrapped in `ActivityErrorBoundary` so a render failure (incl. the dev\n * schema-validation throw) degrades to an accessible fallback.\n */\nexport function WrittenResponse(props: WrittenResponseProps) {\n // Read here rather than in the boundary: a class component cannot call a\n // hook, and the fallback it renders is learner-facing text like any other.\n const strings = useLkStrings(props.strings);\n return (\n <ActivityErrorBoundary activityTitle={props.data?.title} strings={strings}>\n <WrittenResponseCore {...props} />\n </ActivityErrorBoundary>\n );\n}\n"]}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
4
|
+
var chunkB4OR4LPL_cjs = require('../chunk-B4OR4LPL.cjs');
|
|
5
|
+
require('../chunk-RWR77BOV.cjs');
|
|
6
|
+
require('../chunk-7RLLJHCI.cjs');
|
|
7
|
+
require('../chunk-GMPSLHGL.cjs');
|
|
8
|
+
require('../chunk-YDSFFFR4.cjs');
|
|
9
|
+
require('../chunk-MVJQ3KVE.cjs');
|
|
10
|
+
require('../chunk-CKATY6WH.cjs');
|
|
11
11
|
require('../chunk-XOR4MPEN.cjs');
|
|
12
|
+
require('../chunk-UGLMKKNA.cjs');
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
Object.defineProperty(exports, "ActivitySequence", {
|
|
16
17
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkB4OR4LPL_cjs.ActivitySequence; }
|
|
18
19
|
});
|
|
19
20
|
//# sourceMappingURL=ActivitySequence.cjs.map
|
|
20
21
|
//# sourceMappingURL=ActivitySequence.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SequenceEntry, ActivityResult, LearnerResponse, InteractionEvent, ItemOutcome, ThemeTokens } from '@intellectif/lk-core';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
|
-
import { A as ActivityProps,
|
|
4
|
-
import { a as WrittenResponseSubmission } from '../WrittenResponse-
|
|
3
|
+
import { A as ActivityProps, d as RenderableActivity, R as RenderMode, S as SequenceMediaBudget, a as LkStringsOverride, H as HtmlSanitizer } from '../strings-CfgmSQzU.cjs';
|
|
4
|
+
import { a as WrittenResponseSubmission } from '../WrittenResponse-Cb_Fg4fc.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* What one finished slot in a sequence produced. Two kinds, because two kinds
|
|
@@ -127,6 +127,8 @@ interface ActivitySequenceProps {
|
|
|
127
127
|
* {@link SequenceMediaBudget}.
|
|
128
128
|
*/
|
|
129
129
|
mediaBudget?: SequenceMediaBudget;
|
|
130
|
+
/** Overrides the SDK's chrome text for this sequence. See {@link LkIntlProvider}. */
|
|
131
|
+
strings?: LkStringsOverride;
|
|
130
132
|
/**
|
|
131
133
|
* `entries` shuffles the top-level entries; a group moves as one block, and
|
|
132
134
|
* the order INSIDE a group follows the group's own `shuffle` setting.
|
|
@@ -195,9 +197,20 @@ interface ActivitySequenceProps {
|
|
|
195
197
|
/** Renders author-supplied rich text; forwarded to the stimulus panel and every activity. */
|
|
196
198
|
sanitizeHtml?: HtmlSanitizer;
|
|
197
199
|
theme?: Partial<ThemeTokens>;
|
|
200
|
+
/**
|
|
201
|
+
* BCP 47 tag stamped as `lang` on this component's root. This is the
|
|
202
|
+
* INTERFACE language — the SDK's own chrome renders inside that element — so
|
|
203
|
+
* it should carry the same value you give `<LkIntlProvider locale>`. Passing
|
|
204
|
+
* a different one re-declares the language of every SDK string in this
|
|
205
|
+
* subtree without changing the words.
|
|
206
|
+
*
|
|
207
|
+
* It is NOT `data.locale`, which labels xAPI statements only. Authored
|
|
208
|
+
* content in another language belongs on `stimulus.locale`, which
|
|
209
|
+
* `<StimulusPanel>` puts on the passage alone.
|
|
210
|
+
*/
|
|
198
211
|
locale?: string;
|
|
199
212
|
disabled?: boolean;
|
|
200
213
|
}
|
|
201
|
-
declare function ActivitySequence({ activities, renderers, onActivityComplete, onComplete, onFinished, onSubmit, onInteraction, renderMode, shuffle, shuffleSeed, defaultIndex, onIndexChange, responses, submittedSlotIds, outcomes, sanitizeHtml, theme, locale, disabled, mediaBudget, }: ActivitySequenceProps): React.JSX.Element;
|
|
214
|
+
declare function ActivitySequence({ activities, renderers, onActivityComplete, onComplete, onFinished, onSubmit, onInteraction, renderMode, shuffle, shuffleSeed, defaultIndex, onIndexChange, responses, submittedSlotIds, outcomes, sanitizeHtml, theme, locale, disabled, mediaBudget, strings, }: ActivitySequenceProps): React.JSX.Element;
|
|
202
215
|
|
|
203
216
|
export { type ActivityRenderer, ActivitySequence, type ActivitySequenceProps, type SequenceItemOutcome };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SequenceEntry, ActivityResult, LearnerResponse, InteractionEvent, ItemOutcome, ThemeTokens } from '@intellectif/lk-core';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
|
-
import { A as ActivityProps,
|
|
4
|
-
import { a as WrittenResponseSubmission } from '../WrittenResponse-
|
|
3
|
+
import { A as ActivityProps, d as RenderableActivity, R as RenderMode, S as SequenceMediaBudget, a as LkStringsOverride, H as HtmlSanitizer } from '../strings-CfgmSQzU.js';
|
|
4
|
+
import { a as WrittenResponseSubmission } from '../WrittenResponse-BdD1-2tQ.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* What one finished slot in a sequence produced. Two kinds, because two kinds
|
|
@@ -127,6 +127,8 @@ interface ActivitySequenceProps {
|
|
|
127
127
|
* {@link SequenceMediaBudget}.
|
|
128
128
|
*/
|
|
129
129
|
mediaBudget?: SequenceMediaBudget;
|
|
130
|
+
/** Overrides the SDK's chrome text for this sequence. See {@link LkIntlProvider}. */
|
|
131
|
+
strings?: LkStringsOverride;
|
|
130
132
|
/**
|
|
131
133
|
* `entries` shuffles the top-level entries; a group moves as one block, and
|
|
132
134
|
* the order INSIDE a group follows the group's own `shuffle` setting.
|
|
@@ -195,9 +197,20 @@ interface ActivitySequenceProps {
|
|
|
195
197
|
/** Renders author-supplied rich text; forwarded to the stimulus panel and every activity. */
|
|
196
198
|
sanitizeHtml?: HtmlSanitizer;
|
|
197
199
|
theme?: Partial<ThemeTokens>;
|
|
200
|
+
/**
|
|
201
|
+
* BCP 47 tag stamped as `lang` on this component's root. This is the
|
|
202
|
+
* INTERFACE language — the SDK's own chrome renders inside that element — so
|
|
203
|
+
* it should carry the same value you give `<LkIntlProvider locale>`. Passing
|
|
204
|
+
* a different one re-declares the language of every SDK string in this
|
|
205
|
+
* subtree without changing the words.
|
|
206
|
+
*
|
|
207
|
+
* It is NOT `data.locale`, which labels xAPI statements only. Authored
|
|
208
|
+
* content in another language belongs on `stimulus.locale`, which
|
|
209
|
+
* `<StimulusPanel>` puts on the passage alone.
|
|
210
|
+
*/
|
|
198
211
|
locale?: string;
|
|
199
212
|
disabled?: boolean;
|
|
200
213
|
}
|
|
201
|
-
declare function ActivitySequence({ activities, renderers, onActivityComplete, onComplete, onFinished, onSubmit, onInteraction, renderMode, shuffle, shuffleSeed, defaultIndex, onIndexChange, responses, submittedSlotIds, outcomes, sanitizeHtml, theme, locale, disabled, mediaBudget, }: ActivitySequenceProps): React.JSX.Element;
|
|
214
|
+
declare function ActivitySequence({ activities, renderers, onActivityComplete, onComplete, onFinished, onSubmit, onInteraction, renderMode, shuffle, shuffleSeed, defaultIndex, onIndexChange, responses, submittedSlotIds, outcomes, sanitizeHtml, theme, locale, disabled, mediaBudget, strings, }: ActivitySequenceProps): React.JSX.Element;
|
|
202
215
|
|
|
203
216
|
export { type ActivityRenderer, ActivitySequence, type ActivitySequenceProps, type SequenceItemOutcome };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { ActivitySequence } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
2
|
+
export { ActivitySequence } from '../chunk-MU5WELLJ.js';
|
|
3
|
+
import '../chunk-365FW4BO.js';
|
|
4
|
+
import '../chunk-4WLZONV6.js';
|
|
5
|
+
import '../chunk-ZCQXFIB3.js';
|
|
6
|
+
import '../chunk-6DYGQKYD.js';
|
|
7
|
+
import '../chunk-GTX4IWIT.js';
|
|
8
|
+
import '../chunk-F3EBTOOH.js';
|
|
9
9
|
import '../chunk-6N43WDVG.js';
|
|
10
|
+
import '../chunk-7CQ7NUMX.js';
|
|
10
11
|
//# sourceMappingURL=ActivitySequence.js.map
|
|
11
12
|
//# sourceMappingURL=ActivitySequence.js.map
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
4
|
+
var chunk7RLLJHCI_cjs = require('../chunk-7RLLJHCI.cjs');
|
|
5
|
+
require('../chunk-YDSFFFR4.cjs');
|
|
6
|
+
require('../chunk-CKATY6WH.cjs');
|
|
7
7
|
require('../chunk-XOR4MPEN.cjs');
|
|
8
|
+
require('../chunk-UGLMKKNA.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
Object.defineProperty(exports, "FillInTheBlanks", {
|
|
12
13
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunk7RLLJHCI_cjs.FillInTheBlanks; }
|
|
14
15
|
});
|
|
15
16
|
//# sourceMappingURL=FillInTheBlanks.cjs.map
|
|
16
17
|
//# sourceMappingURL=FillInTheBlanks.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { FillInTheBlanksData } from '@intellectif/lk-core';
|
|
3
|
-
import { A as ActivityProps } from '../
|
|
3
|
+
import { A as ActivityProps } from '../strings-CfgmSQzU.cjs';
|
|
4
4
|
|
|
5
5
|
interface FillInTheBlanksProps extends ActivityProps<FillInTheBlanksData> {
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { FillInTheBlanksData } from '@intellectif/lk-core';
|
|
3
|
-
import { A as ActivityProps } from '../
|
|
3
|
+
import { A as ActivityProps } from '../strings-CfgmSQzU.js';
|
|
4
4
|
|
|
5
5
|
interface FillInTheBlanksProps extends ActivityProps<FillInTheBlanksData> {
|
|
6
6
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { FillInTheBlanks } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
2
|
+
export { FillInTheBlanks } from '../chunk-4WLZONV6.js';
|
|
3
|
+
import '../chunk-6DYGQKYD.js';
|
|
4
|
+
import '../chunk-F3EBTOOH.js';
|
|
5
5
|
import '../chunk-6N43WDVG.js';
|
|
6
|
+
import '../chunk-7CQ7NUMX.js';
|
|
6
7
|
//# sourceMappingURL=FillInTheBlanks.js.map
|
|
7
8
|
//# sourceMappingURL=FillInTheBlanks.js.map
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
4
|
+
var chunkRWR77BOV_cjs = require('../chunk-RWR77BOV.cjs');
|
|
5
|
+
require('../chunk-YDSFFFR4.cjs');
|
|
6
|
+
require('../chunk-CKATY6WH.cjs');
|
|
7
7
|
require('../chunk-XOR4MPEN.cjs');
|
|
8
|
+
require('../chunk-UGLMKKNA.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
Object.defineProperty(exports, "MultipleChoice", {
|
|
12
13
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkRWR77BOV_cjs.MultipleChoice; }
|
|
14
15
|
});
|
|
15
16
|
//# sourceMappingURL=MultipleChoice.cjs.map
|
|
16
17
|
//# sourceMappingURL=MultipleChoice.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { MultipleChoiceData } from '@intellectif/lk-core';
|
|
3
|
-
import { A as ActivityProps } from '../
|
|
3
|
+
import { A as ActivityProps } from '../strings-CfgmSQzU.cjs';
|
|
4
4
|
|
|
5
5
|
interface MultipleChoiceProps extends ActivityProps<MultipleChoiceData> {
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { MultipleChoiceData } from '@intellectif/lk-core';
|
|
3
|
-
import { A as ActivityProps } from '../
|
|
3
|
+
import { A as ActivityProps } from '../strings-CfgmSQzU.js';
|
|
4
4
|
|
|
5
5
|
interface MultipleChoiceProps extends ActivityProps<MultipleChoiceData> {
|
|
6
6
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { MultipleChoice } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
2
|
+
export { MultipleChoice } from '../chunk-365FW4BO.js';
|
|
3
|
+
import '../chunk-6DYGQKYD.js';
|
|
4
|
+
import '../chunk-F3EBTOOH.js';
|
|
5
5
|
import '../chunk-6N43WDVG.js';
|
|
6
|
+
import '../chunk-7CQ7NUMX.js';
|
|
6
7
|
//# sourceMappingURL=MultipleChoice.js.map
|
|
7
8
|
//# sourceMappingURL=MultipleChoice.js.map
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var chunkMVJQ3KVE_cjs = require('../chunk-MVJQ3KVE.cjs');
|
|
5
|
+
require('../chunk-CKATY6WH.cjs');
|
|
6
|
+
require('../chunk-UGLMKKNA.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
Object.defineProperty(exports, "StimulusPanel", {
|
|
10
11
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkMVJQ3KVE_cjs.StimulusPanel; }
|
|
12
13
|
});
|
|
13
14
|
//# sourceMappingURL=StimulusPanel.cjs.map
|
|
14
15
|
//# sourceMappingURL=StimulusPanel.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Stimulus, InteractionEvent } from '@intellectif/lk-core';
|
|
2
|
-
import { H as HtmlSanitizer, R as RenderMode, M as MediaBudgetBinding,
|
|
2
|
+
import { H as HtmlSanitizer, R as RenderMode, M as MediaBudgetBinding, b as MediaTransportStrings, a as LkStringsOverride } from '../strings-CfgmSQzU.cjs';
|
|
3
3
|
|
|
4
4
|
interface StimulusPanelProps {
|
|
5
5
|
stimulus: Stimulus;
|
|
@@ -31,6 +31,8 @@ interface StimulusPanelProps {
|
|
|
31
31
|
mediaStrings?: Partial<MediaTransportStrings>;
|
|
32
32
|
onInteraction?: (event: InteractionEvent) => void;
|
|
33
33
|
disabled?: boolean;
|
|
34
|
+
/** Overrides the SDK's chrome text for this panel. See {@link LkIntlProvider}. */
|
|
35
|
+
strings?: LkStringsOverride;
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
36
38
|
* Presents a shared stimulus — the passage, recording or image an item group's
|
|
@@ -41,6 +43,6 @@ interface StimulusPanelProps {
|
|
|
41
43
|
* caller-supplied sanitiser, and the plain `body` is the fallback — which the
|
|
42
44
|
* schema guarantees exists whenever `bodyHtml` does.
|
|
43
45
|
*/
|
|
44
|
-
declare function StimulusPanel({ stimulus, range, sanitizeHtml, locale, renderMode, mediaBudget, mediaStrings, onInteraction, disabled, }: StimulusPanelProps): React.JSX.Element;
|
|
46
|
+
declare function StimulusPanel({ stimulus, range, sanitizeHtml, locale, renderMode, mediaBudget, mediaStrings, onInteraction, disabled, strings, }: StimulusPanelProps): React.JSX.Element;
|
|
45
47
|
|
|
46
48
|
export { StimulusPanel, type StimulusPanelProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Stimulus, InteractionEvent } from '@intellectif/lk-core';
|
|
2
|
-
import { H as HtmlSanitizer, R as RenderMode, M as MediaBudgetBinding,
|
|
2
|
+
import { H as HtmlSanitizer, R as RenderMode, M as MediaBudgetBinding, b as MediaTransportStrings, a as LkStringsOverride } from '../strings-CfgmSQzU.js';
|
|
3
3
|
|
|
4
4
|
interface StimulusPanelProps {
|
|
5
5
|
stimulus: Stimulus;
|
|
@@ -31,6 +31,8 @@ interface StimulusPanelProps {
|
|
|
31
31
|
mediaStrings?: Partial<MediaTransportStrings>;
|
|
32
32
|
onInteraction?: (event: InteractionEvent) => void;
|
|
33
33
|
disabled?: boolean;
|
|
34
|
+
/** Overrides the SDK's chrome text for this panel. See {@link LkIntlProvider}. */
|
|
35
|
+
strings?: LkStringsOverride;
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
36
38
|
* Presents a shared stimulus — the passage, recording or image an item group's
|
|
@@ -41,6 +43,6 @@ interface StimulusPanelProps {
|
|
|
41
43
|
* caller-supplied sanitiser, and the plain `body` is the fallback — which the
|
|
42
44
|
* schema guarantees exists whenever `bodyHtml` does.
|
|
43
45
|
*/
|
|
44
|
-
declare function StimulusPanel({ stimulus, range, sanitizeHtml, locale, renderMode, mediaBudget, mediaStrings, onInteraction, disabled, }: StimulusPanelProps): React.JSX.Element;
|
|
46
|
+
declare function StimulusPanel({ stimulus, range, sanitizeHtml, locale, renderMode, mediaBudget, mediaStrings, onInteraction, disabled, strings, }: StimulusPanelProps): React.JSX.Element;
|
|
45
47
|
|
|
46
48
|
export { StimulusPanel, type StimulusPanelProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { StimulusPanel } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
export { StimulusPanel } from '../chunk-GTX4IWIT.js';
|
|
3
|
+
import '../chunk-F3EBTOOH.js';
|
|
4
|
+
import '../chunk-7CQ7NUMX.js';
|
|
4
5
|
//# sourceMappingURL=StimulusPanel.js.map
|
|
5
6
|
//# sourceMappingURL=StimulusPanel.js.map
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
4
|
+
var chunkGMPSLHGL_cjs = require('../chunk-GMPSLHGL.cjs');
|
|
5
|
+
require('../chunk-YDSFFFR4.cjs');
|
|
6
|
+
require('../chunk-CKATY6WH.cjs');
|
|
7
7
|
require('../chunk-XOR4MPEN.cjs');
|
|
8
|
+
require('../chunk-UGLMKKNA.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
Object.defineProperty(exports, "WrittenResponse", {
|
|
12
13
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkGMPSLHGL_cjs.WrittenResponse; }
|
|
14
15
|
});
|
|
15
16
|
//# sourceMappingURL=WrittenResponse.cjs.map
|
|
16
17
|
//# sourceMappingURL=WrittenResponse.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { W as WrittenResponseProps } from '../WrittenResponse-
|
|
3
|
-
export { a as WrittenResponseSubmission } from '../WrittenResponse-
|
|
4
|
-
export { H as HtmlSanitizer, R as RenderMode,
|
|
2
|
+
import { W as WrittenResponseProps } from '../WrittenResponse-Cb_Fg4fc.cjs';
|
|
3
|
+
export { a as WrittenResponseSubmission } from '../WrittenResponse-Cb_Fg4fc.cjs';
|
|
4
|
+
export { H as HtmlSanitizer, R as RenderMode, c as Renderable } from '../strings-CfgmSQzU.cjs';
|
|
5
5
|
import '@intellectif/lk-core';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { W as WrittenResponseProps } from '../WrittenResponse-
|
|
3
|
-
export { a as WrittenResponseSubmission } from '../WrittenResponse-
|
|
4
|
-
export { H as HtmlSanitizer, R as RenderMode,
|
|
2
|
+
import { W as WrittenResponseProps } from '../WrittenResponse-BdD1-2tQ.js';
|
|
3
|
+
export { a as WrittenResponseSubmission } from '../WrittenResponse-BdD1-2tQ.js';
|
|
4
|
+
export { H as HtmlSanitizer, R as RenderMode, c as Renderable } from '../strings-CfgmSQzU.js';
|
|
5
5
|
import '@intellectif/lk-core';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { WrittenResponse } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
2
|
+
export { WrittenResponse } from '../chunk-ZCQXFIB3.js';
|
|
3
|
+
import '../chunk-6DYGQKYD.js';
|
|
4
|
+
import '../chunk-F3EBTOOH.js';
|
|
5
5
|
import '../chunk-6N43WDVG.js';
|
|
6
|
+
import '../chunk-7CQ7NUMX.js';
|
|
6
7
|
//# sourceMappingURL=WrittenResponse.js.map
|
|
7
8
|
//# sourceMappingURL=WrittenResponse.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkUGLMKKNA_cjs = require('../chunk-UGLMKKNA.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "DEFAULT_STRINGS", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkUGLMKKNA_cjs.DEFAULT_STRINGS; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "LkIntlProvider", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkUGLMKKNA_cjs.LkIntlProvider; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "directionForLocale", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkUGLMKKNA_cjs.directionForLocale; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "mergeStrings", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkUGLMKKNA_cjs.mergeStrings; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "useLkDirection", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkUGLMKKNA_cjs.useLkDirection; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "useLkStrings", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkUGLMKKNA_cjs.useLkStrings; }
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=LkIntlProvider.cjs.map
|
|
33
|
+
//# sourceMappingURL=LkIntlProvider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"LkIntlProvider.cjs"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { a as LkStringsOverride, L as LkStrings } from '../strings-CfgmSQzU.cjs';
|
|
2
|
+
export { D as DEFAULT_STRINGS, m as mergeStrings } from '../strings-CfgmSQzU.cjs';
|
|
3
|
+
import '@intellectif/lk-core';
|
|
4
|
+
|
|
5
|
+
/** Writing direction of the surrounding UI. `auto` defers to the locale. */
|
|
6
|
+
type LkDirection = 'ltr' | 'rtl' | 'auto';
|
|
7
|
+
/** Resolves a BCP 47 tag to a writing direction. */
|
|
8
|
+
declare function directionForLocale(locale: string | undefined): 'ltr' | 'rtl';
|
|
9
|
+
interface LkIntlProviderProps {
|
|
10
|
+
/**
|
|
11
|
+
* Replaces the SDK's own chrome text. Anything omitted keeps its English
|
|
12
|
+
* default, so a partial translation degrades to mixed rather than to blank.
|
|
13
|
+
*
|
|
14
|
+
* A nested provider REPLACES the one above it rather than layering onto it —
|
|
15
|
+
* as a nested `ThemeProvider` restarts from `defaultTheme`. To layer, use a
|
|
16
|
+
* component's own `strings` prop, or compose with `mergeStrings`.
|
|
17
|
+
*/
|
|
18
|
+
strings?: LkStringsOverride;
|
|
19
|
+
/**
|
|
20
|
+
* BCP 47 tag for the SDK's chrome — NOT for the authored content, which
|
|
21
|
+
* carries its own `locale`. Sets `lang` on the wrapper so a screen reader
|
|
22
|
+
* reads "Question 3 of 10" in the interface language rather than in the
|
|
23
|
+
* language of the passage beside it (WCAG 3.1.2).
|
|
24
|
+
*/
|
|
25
|
+
locale?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Writing direction. Defaults to `auto`, which derives it from `locale`.
|
|
28
|
+
* Set it explicitly when the surrounding application already manages `dir`
|
|
29
|
+
* and you do not want a second element declaring one.
|
|
30
|
+
*/
|
|
31
|
+
direction?: LkDirection;
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Supplies the SDK's chrome text and writing direction to everything beneath.
|
|
36
|
+
*
|
|
37
|
+
* Mirrors `ThemeProvider`: a provider for the whole tree, and a per-component
|
|
38
|
+
* prop for the exceptions. The component prop wins, so a single activity can
|
|
39
|
+
* be relabelled without a second provider.
|
|
40
|
+
*
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <LkIntlProvider locale="es" strings={{
|
|
43
|
+
* submit: 'Enviar',
|
|
44
|
+
* checkAnswers: 'Comprobar respuestas',
|
|
45
|
+
* questionProgress: (i, total) => `Pregunta ${i} de ${total}`,
|
|
46
|
+
* wordCount: (n) => `${n} ${n === 1 ? 'palabra' : 'palabras'}`,
|
|
47
|
+
* media: { noPlaysRemaining: 'No quedan reproducciones' },
|
|
48
|
+
* }}>
|
|
49
|
+
* <ActivitySequence … />
|
|
50
|
+
* </LkIntlProvider>
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* The SDK ships **English only**. Bundling Spanish, Portuguese or Arabic would
|
|
54
|
+
* mean shipping translations nobody in this repo can review, and a wrong
|
|
55
|
+
* "No plays remaining" on a listening exam is worse than an English one that a
|
|
56
|
+
* teacher can see is untranslated. The mechanism is the deliverable; the words
|
|
57
|
+
* belong to whoever speaks the language.
|
|
58
|
+
*/
|
|
59
|
+
declare function LkIntlProvider({ strings, locale, direction, children, }: LkIntlProviderProps): React.JSX.Element;
|
|
60
|
+
/**
|
|
61
|
+
* The strings in force, with an optional per-component override layered on top.
|
|
62
|
+
*
|
|
63
|
+
* Usable without a provider: every component calls this, and one rendered
|
|
64
|
+
* standalone still needs its labels. Falling back to the English defaults is
|
|
65
|
+
* what keeps `<MultipleChoice>` working with no setup at all.
|
|
66
|
+
*/
|
|
67
|
+
declare function useLkStrings(override?: LkStringsOverride): LkStrings;
|
|
68
|
+
/** The direction in force. `ltr` with no provider. */
|
|
69
|
+
declare function useLkDirection(): 'ltr' | 'rtl';
|
|
70
|
+
|
|
71
|
+
export { type LkDirection, LkIntlProvider, type LkIntlProviderProps, LkStrings, LkStringsOverride, directionForLocale, useLkDirection, useLkStrings };
|