@intellectif/lk-react 3.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/{WrittenResponse-BHhP936i.d.ts → WrittenResponse-Dkg7FUt-.d.ts} +1 -1
- package/dist/{WrittenResponse-B50EjVR0.d.cts → WrittenResponse-DqQ0NjPK.d.cts} +1 -1
- package/dist/{chunk-3X7MYAFT.js → chunk-3DNJDP73.js} +11 -9
- package/dist/chunk-3DNJDP73.js.map +1 -0
- package/dist/chunk-4HZ7LQIH.cjs +40 -0
- package/dist/chunk-4HZ7LQIH.cjs.map +1 -0
- package/dist/chunk-525EWDUT.cjs +249 -0
- package/dist/chunk-525EWDUT.cjs.map +1 -0
- package/dist/{chunk-ZVFWJTT4.js → chunk-5SYL5CJ2.js} +10 -28
- package/dist/chunk-5SYL5CJ2.js.map +1 -0
- package/dist/{chunk-UXO6KYSZ.cjs → chunk-67RIIDZX.cjs} +17 -15
- package/dist/chunk-67RIIDZX.cjs.map +1 -0
- package/dist/chunk-6F4X2NKL.js +54 -0
- package/dist/chunk-6F4X2NKL.js.map +1 -0
- package/dist/chunk-GB5URWM4.js +38 -0
- package/dist/chunk-GB5URWM4.js.map +1 -0
- package/dist/chunk-GMU77L52.js +247 -0
- package/dist/chunk-GMU77L52.js.map +1 -0
- package/dist/chunk-NEWGUDA5.cjs +49 -0
- package/dist/chunk-NEWGUDA5.cjs.map +1 -0
- package/dist/{chunk-QHOV2A6M.cjs → chunk-PGEG7UZJ.cjs} +2 -34
- package/dist/chunk-PGEG7UZJ.cjs.map +1 -0
- package/dist/{chunk-AEQQ7VPF.js → chunk-SWZRB3VY.js} +4 -3
- package/dist/chunk-SWZRB3VY.js.map +1 -0
- package/dist/chunk-UQ3BBEIT.js +47 -0
- package/dist/chunk-UQ3BBEIT.js.map +1 -0
- package/dist/{chunk-W6BH2YMZ.cjs → chunk-WCVD5LVG.cjs} +16 -34
- package/dist/chunk-WCVD5LVG.cjs.map +1 -0
- package/dist/{chunk-7MW7HGOA.cjs → chunk-XQJFLAMD.cjs} +10 -9
- package/dist/chunk-XQJFLAMD.cjs.map +1 -0
- package/dist/components/ActivitySequence.cjs +8 -6
- package/dist/components/ActivitySequence.d.cts +87 -9
- package/dist/components/ActivitySequence.d.ts +87 -9
- package/dist/components/ActivitySequence.js +7 -5
- package/dist/components/FillInTheBlanks.cjs +4 -3
- package/dist/components/FillInTheBlanks.d.cts +1 -1
- package/dist/components/FillInTheBlanks.d.ts +1 -1
- package/dist/components/FillInTheBlanks.js +3 -2
- package/dist/components/MultipleChoice.cjs +4 -3
- package/dist/components/MultipleChoice.d.cts +1 -1
- package/dist/components/MultipleChoice.d.ts +1 -1
- package/dist/components/MultipleChoice.js +3 -2
- package/dist/components/StimulusPanel.cjs +13 -0
- package/dist/components/StimulusPanel.cjs.map +1 -0
- package/dist/components/StimulusPanel.d.cts +30 -0
- package/dist/components/StimulusPanel.d.ts +30 -0
- package/dist/components/StimulusPanel.js +4 -0
- package/dist/components/StimulusPanel.js.map +1 -0
- package/dist/components/WrittenResponse.cjs +4 -3
- package/dist/components/WrittenResponse.d.cts +3 -3
- package/dist/components/WrittenResponse.d.ts +3 -3
- package/dist/components/WrittenResponse.js +3 -2
- package/dist/index.cjs +36 -26
- 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 +12 -7
- package/dist/index.js.map +1 -1
- package/dist/theme/skin.css +49 -0
- package/dist/{types-CNmjqD6M.d.cts → types-CrURyd9-.d.cts} +51 -3
- package/dist/{types-CNmjqD6M.d.ts → types-CrURyd9-.d.ts} +51 -3
- package/package.json +15 -4
- package/dist/chunk-3X7MYAFT.js.map +0 -1
- package/dist/chunk-7MW7HGOA.cjs.map +0 -1
- package/dist/chunk-AEQQ7VPF.js.map +0 -1
- package/dist/chunk-BGWXN44S.js +0 -152
- package/dist/chunk-BGWXN44S.js.map +0 -1
- package/dist/chunk-HO3AC3WQ.cjs +0 -154
- package/dist/chunk-HO3AC3WQ.cjs.map +0 -1
- package/dist/chunk-QHOV2A6M.cjs.map +0 -1
- package/dist/chunk-UIGIYYGY.js +0 -85
- package/dist/chunk-UIGIYYGY.js.map +0 -1
- package/dist/chunk-UXO6KYSZ.cjs.map +0 -1
- package/dist/chunk-W6BH2YMZ.cjs.map +0 -1
- package/dist/chunk-ZVFWJTT4.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/WrittenResponse/WrittenResponse.tsx","../src/components/WrittenResponse/index.tsx"],"names":["jsxs","Fragment","jsx","useMemo","isDevelopment","validateActivity","ActivitySchemaError","useActivityState","useState","useRef","useEffect","countWords","evaluate","xAPIBuilder","ANONYMOUS_ACTOR","objectIdFor","ActivityMedia","FeedbackRegion","WrittenResponse","ActivityErrorBoundary"],"mappings":";;;;;;;;;AAiHA,SAAS,OAAO,QAAA,EAA+C;AAC7D,EAAA,OAAO,aAAa,MAAA,IAAa,QAAA,CAAS,IAAA,KAAS,kBAAA,GAAqB,SAAS,IAAA,GAAO,EAAA;AAC1F;AASA,SAAS,SAAA,CAAU,EAAE,KAAA,EAAM,EAA2B;AACpD,EAAA,uBACEA,eAAA,CAAAC,mBAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,KAAA,CAAM,2BAAWC,cAAA,CAAC,GAAA,EAAA,EAAE,WAAU,sBAAA,EAAwB,QAAA,EAAA,KAAA,CAAM,UAAS,CAAA,GAAO,IAAA;AAAA,IAC5E,KAAA,CAAM,QAAA,IAAY,KAAA,CAAM,QAAA,CAAS,SAAS,CAAA,mBACzCA,cAAA,CAAC,IAAA,EAAA,EAAG,SAAA,EAAU,gBAAA,EACX,QAAA,EAAA,KAAA,CAAM,QAAA,CAAS,GAAA,CAAI,CAAC,SAAA,qBACnBF,eAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAU,iBAAA;AAAA,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EAC3B,QAAA,EAAA,QAAA,GAAW,OAAA,mBAAUf,cAAA,CAAC,cAAA,EAAA,EAAe,OAAA,EAAkB,CAAA,GAAK,OAAO,OAAA,EACtE;AAAA;AAAA;AAAA,GACF;AAEJ;AClaO,SAASgB,iBAAgB,KAAA,EAA6B;AAC3D,EAAA,uBACEhB,cAAAA,CAACiB,uCAAA,EAAA,EAAsB,aAAA,EAAe,KAAA,CAAM,IAAA,EAAM,KAAA,EAChD,QAAA,kBAAAjB,cAAAA,CAAC,eAAA,EAAA,EAAqB,GAAG,KAAA,EAAO,CAAA,EAClC,CAAA;AAEJ","file":"chunk-XQJFLAMD.cjs","sourcesContent":["'use client';\n\nimport {\n ActivitySchemaError,\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 { ANONYMOUS_ACTOR, isDevelopment, objectIdFor } from '../_internal.js';\nimport { ActivityMedia } from '../shared/ActivityMedia.js';\nimport { FeedbackRegion } from '../shared/FeedbackRegion.js';\nimport type { HtmlSanitizer, Renderable, RenderMode } 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 v0.4 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 /** 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 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 * 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 }: { grade: GradeRecord }) {\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\">Not applicable</span>\n ) : (\n <span className=\"lk-wr-criterion-score\">\n {criterion.band ??\n (typeof criterion.score === 'number'\n ? `${Math.round(criterion.score * 100)}%`\n : '')}\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\">This grade is awaiting review by a teacher.</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 }: { outcome: ItemOutcome }) {\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\">\n Score {percent}%. {outcome.passed ? 'Passed.' : 'Not passed.'}\n </p>\n {outcome.status === 'graded' ? (\n <GradeBody grade={outcome.grade} />\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\">Not graded yet. This response is waiting for its grade.</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\">This response could not be graded.</p>\n </div>\n );\n}\n\nexport function WrittenResponse({\n data,\n onSubmitted,\n onSubmit,\n value,\n defaultValue,\n onChange,\n renderMode = 'practice',\n outcome,\n sanitizeHtml,\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 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 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 useEffect(() => {\n setInnerText(defaultTextRef.current);\n setSummary(null);\n reset();\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 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('Response submitted. It will be graded and your result will appear here later.');\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 =\n data.minWords > 0 ? `${data.minWords}–${data.maxWords} words` : `up to ${data.maxWords} words`;\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 ? <ActivityMedia media={data.media} /> : 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 {wordCount} {wordCount === 1 ? 'word' : 'words'} ({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 Submit\n </button>\n )}\n <FeedbackRegion id={`${data.id}-feedback`}>\n {isReview ? outcome ? <OutcomeSummary outcome={outcome} /> : null : summary}\n </FeedbackRegion>\n </form>\n );\n}\n","'use client';\n\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 return (\n <ActivityErrorBoundary activityTitle={props.data?.title}>\n <WrittenResponseCore {...props} />\n </ActivityErrorBoundary>\n );\n}\n"]}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
7
|
-
require('../chunk-
|
|
3
|
+
var chunk525EWDUT_cjs = require('../chunk-525EWDUT.cjs');
|
|
4
|
+
require('../chunk-WCVD5LVG.cjs');
|
|
5
|
+
require('../chunk-67RIIDZX.cjs');
|
|
6
|
+
require('../chunk-XQJFLAMD.cjs');
|
|
7
|
+
require('../chunk-PGEG7UZJ.cjs');
|
|
8
|
+
require('../chunk-NEWGUDA5.cjs');
|
|
9
|
+
require('../chunk-4HZ7LQIH.cjs');
|
|
8
10
|
require('../chunk-HD2AIQRD.cjs');
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
Object.defineProperty(exports, "ActivitySequence", {
|
|
13
15
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunk525EWDUT_cjs.ActivitySequence; }
|
|
15
17
|
});
|
|
16
18
|
//# sourceMappingURL=ActivitySequence.cjs.map
|
|
17
19
|
//# sourceMappingURL=ActivitySequence.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SequenceEntry, ActivityResult, LearnerResponse, InteractionEvent, ThemeTokens } from '@intellectif/lk-core';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
|
-
import { A as ActivityProps, R as RenderMode } from '../types-
|
|
4
|
-
import { a as WrittenResponseSubmission } from '../WrittenResponse-
|
|
3
|
+
import { A as ActivityProps, b as RenderableActivity, R as RenderMode, H as HtmlSanitizer } from '../types-CrURyd9-.cjs';
|
|
4
|
+
import { a as WrittenResponseSubmission } from '../WrittenResponse-DqQ0NjPK.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* What one finished slot in a sequence produced. Two kinds, because two kinds
|
|
@@ -11,15 +11,30 @@ import { a as WrittenResponseSubmission } from '../WrittenResponse-B50EjVR0.cjs'
|
|
|
11
11
|
*/
|
|
12
12
|
type SequenceItemOutcome = {
|
|
13
13
|
kind: 'scored';
|
|
14
|
+
/** Presented position. */
|
|
14
15
|
index: number;
|
|
16
|
+
/** Slot identity from `flattenSequence` — stable under shuffling; the `slotId` to score with. */
|
|
17
|
+
slotId: string;
|
|
15
18
|
activityId: string;
|
|
16
19
|
result: ActivityResult;
|
|
17
20
|
} | {
|
|
18
21
|
kind: 'submitted';
|
|
19
22
|
index: number;
|
|
23
|
+
slotId: string;
|
|
20
24
|
activityId: string;
|
|
21
25
|
/** Ungraded submission; the grade arrives asynchronously. */
|
|
22
26
|
submission: WrittenResponseSubmission;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'responded';
|
|
29
|
+
index: number;
|
|
30
|
+
slotId: string;
|
|
31
|
+
activityId: string;
|
|
32
|
+
/**
|
|
33
|
+
* The raw answer, with no grade of any kind. This is what an `exam` slot
|
|
34
|
+
* produces: the client is forbidden to score, so a response is all there
|
|
35
|
+
* is until the server grades it.
|
|
36
|
+
*/
|
|
37
|
+
response: LearnerResponse;
|
|
23
38
|
};
|
|
24
39
|
/**
|
|
25
40
|
* A component that can render one activity inside a sequence. Register one per
|
|
@@ -28,23 +43,57 @@ type SequenceItemOutcome = {
|
|
|
28
43
|
*/
|
|
29
44
|
type ActivityRenderer = ComponentType<ActivityProps>;
|
|
30
45
|
interface ActivitySequenceProps {
|
|
31
|
-
/**
|
|
32
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The ordered set of entries to present, one question at a time: loose
|
|
48
|
+
* activities, and item groups — a shared passage, recording or image with
|
|
49
|
+
* the questions that refer to it. A group's stimulus stays on screen
|
|
50
|
+
* alongside each of its questions.
|
|
51
|
+
*
|
|
52
|
+
* Accepts `redact()` projections. For data straight off a server, pass it
|
|
53
|
+
* through `asRenderableSequence()` — see that helper for why a cast is
|
|
54
|
+
* unavoidable there — and set `renderMode="exam"`.
|
|
55
|
+
*/
|
|
56
|
+
activities: readonly SequenceEntry<RenderableActivity>[];
|
|
33
57
|
/**
|
|
34
58
|
* Renderers for activity types beyond the built-ins, keyed by `data.type`.
|
|
35
59
|
* A key matching a built-in overrides it, so a consumer can replace the
|
|
36
60
|
* bundled renderer without forking the sequencer.
|
|
37
61
|
*/
|
|
38
62
|
renderers?: Readonly<Record<string, ActivityRenderer>>;
|
|
39
|
-
/**
|
|
40
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Called whenever an individual activity is scored at submit time — the
|
|
65
|
+
* incremental persist hook.
|
|
66
|
+
*
|
|
67
|
+
* `slotId` is the identity to store the result against, NOT `index`.
|
|
68
|
+
* `index` is where the question was PRESENTED, which is not stable: it moves
|
|
69
|
+
* under shuffling, and it already differs from the slot identity whenever a
|
|
70
|
+
* group is present (the second entry of a sequence is presented at index 1
|
|
71
|
+
* but is slot `"1.0"` if it is a group's first question). `composeAssessmentScore`
|
|
72
|
+
* scores by `slotId`, so persisting `index` cannot be reconciled with it.
|
|
73
|
+
*/
|
|
74
|
+
onActivityComplete?: (result: ActivityResult, index: number, slotId: string) => void;
|
|
75
|
+
/**
|
|
76
|
+
* Called on every submit with the learner's raw response and the identity of
|
|
77
|
+
* the slot that produced it — before any grading, in every render mode.
|
|
78
|
+
*
|
|
79
|
+
* **This is the only response channel an `exam` sequence has.** In `exam`
|
|
80
|
+
* mode the components never grade, so `onActivityComplete` cannot fire and
|
|
81
|
+
* `onComplete` never will; without this prop nothing a learner submitted
|
|
82
|
+
* would reach the consumer at all. Persist `response` against `slotId`.
|
|
83
|
+
*/
|
|
84
|
+
onSubmit?: (response: LearnerResponse, slot: {
|
|
85
|
+
slotId: string;
|
|
86
|
+
index: number;
|
|
87
|
+
activityId: string;
|
|
88
|
+
}) => void;
|
|
41
89
|
/**
|
|
42
90
|
* Called once every activity has been completed, with the scored results.
|
|
43
91
|
*
|
|
44
92
|
* Fires only when EVERY item produced a score. A set containing a
|
|
45
93
|
* deferred-graded activity (a written response) can never satisfy that, so
|
|
46
94
|
* use `onFinished` for mixed sets — it is the general completion signal and
|
|
47
|
-
* reports both kinds of outcome.
|
|
95
|
+
* reports both kinds of outcome. It also carries `slotId` per item, which
|
|
96
|
+
* this callback's bare array cannot.
|
|
48
97
|
*/
|
|
49
98
|
onComplete?: (results: ActivityResult[]) => void;
|
|
50
99
|
/**
|
|
@@ -57,6 +106,30 @@ interface ActivitySequenceProps {
|
|
|
57
106
|
onInteraction?: (event: InteractionEvent) => void;
|
|
58
107
|
/** Forwarded to each activity. `exam` and `review` disable local scoring. */
|
|
59
108
|
renderMode?: RenderMode;
|
|
109
|
+
/**
|
|
110
|
+
* `entries` shuffles the top-level entries; a group moves as one block, and
|
|
111
|
+
* the order INSIDE a group follows the group's own `shuffle` setting.
|
|
112
|
+
* Default `none`: authored order.
|
|
113
|
+
*/
|
|
114
|
+
shuffle?: 'none' | 'entries';
|
|
115
|
+
/**
|
|
116
|
+
* Seed for every shuffle in this sequence (`shuffle: 'entries'` and any
|
|
117
|
+
* group with `shuffle: 'within-group'`). Supply the attempt id, so the
|
|
118
|
+
* server's `flattenSequence(entries, { seed })` derives the same order this
|
|
119
|
+
* pager shows.
|
|
120
|
+
*
|
|
121
|
+
* **Required in `exam` and `review` mode** — omitting it throws. An order
|
|
122
|
+
* nobody can reproduce cannot be reconciled with a recorded attempt, and
|
|
123
|
+
* failing at render is the only way that mistake surfaces before a learner
|
|
124
|
+
* sits the paper. In `practice` mode it stays optional: a random per-mount
|
|
125
|
+
* seed is used, which is stable within the mount and deliberately not
|
|
126
|
+
* reproducible. That fallback is also not SSR-safe (server and client would
|
|
127
|
+
* invent different orders and hydration would mismatch), so supply a seed
|
|
128
|
+
* for any server-rendered sequence regardless of mode.
|
|
129
|
+
*/
|
|
130
|
+
shuffleSeed?: string;
|
|
131
|
+
/** Renders author-supplied rich text; forwarded to the stimulus panel and every activity. */
|
|
132
|
+
sanitizeHtml?: HtmlSanitizer;
|
|
60
133
|
theme?: Partial<ThemeTokens>;
|
|
61
134
|
locale?: string;
|
|
62
135
|
disabled?: boolean;
|
|
@@ -67,7 +140,12 @@ interface ActivitySequenceProps {
|
|
|
67
140
|
* the learner may move back and forth; activities keep their own submit and
|
|
68
141
|
* scoring. On navigation, focus moves to the question region and the position
|
|
69
142
|
* is announced via an aria-live region.
|
|
143
|
+
*
|
|
144
|
+
* Item groups are flattened into consecutive questions; the group's stimulus
|
|
145
|
+
* is mounted ONCE, beside the question region rather than inside it, and shown
|
|
146
|
+
* alongside every question in the group — so a passage stays put, and a
|
|
147
|
+
* recording keeps its position, as the learner moves between its questions.
|
|
70
148
|
*/
|
|
71
|
-
declare function ActivitySequence({ activities, renderers, onActivityComplete, onComplete, onFinished, onInteraction, renderMode, theme, locale, disabled, }: ActivitySequenceProps): React.JSX.Element;
|
|
149
|
+
declare function ActivitySequence({ activities, renderers, onActivityComplete, onComplete, onFinished, onSubmit, onInteraction, renderMode, shuffle, shuffleSeed, sanitizeHtml, theme, locale, disabled, }: ActivitySequenceProps): React.JSX.Element;
|
|
72
150
|
|
|
73
151
|
export { type ActivityRenderer, ActivitySequence, type ActivitySequenceProps, type SequenceItemOutcome };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SequenceEntry, ActivityResult, LearnerResponse, InteractionEvent, ThemeTokens } from '@intellectif/lk-core';
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
|
-
import { A as ActivityProps, R as RenderMode } from '../types-
|
|
4
|
-
import { a as WrittenResponseSubmission } from '../WrittenResponse-
|
|
3
|
+
import { A as ActivityProps, b as RenderableActivity, R as RenderMode, H as HtmlSanitizer } from '../types-CrURyd9-.js';
|
|
4
|
+
import { a as WrittenResponseSubmission } from '../WrittenResponse-Dkg7FUt-.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* What one finished slot in a sequence produced. Two kinds, because two kinds
|
|
@@ -11,15 +11,30 @@ import { a as WrittenResponseSubmission } from '../WrittenResponse-BHhP936i.js';
|
|
|
11
11
|
*/
|
|
12
12
|
type SequenceItemOutcome = {
|
|
13
13
|
kind: 'scored';
|
|
14
|
+
/** Presented position. */
|
|
14
15
|
index: number;
|
|
16
|
+
/** Slot identity from `flattenSequence` — stable under shuffling; the `slotId` to score with. */
|
|
17
|
+
slotId: string;
|
|
15
18
|
activityId: string;
|
|
16
19
|
result: ActivityResult;
|
|
17
20
|
} | {
|
|
18
21
|
kind: 'submitted';
|
|
19
22
|
index: number;
|
|
23
|
+
slotId: string;
|
|
20
24
|
activityId: string;
|
|
21
25
|
/** Ungraded submission; the grade arrives asynchronously. */
|
|
22
26
|
submission: WrittenResponseSubmission;
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'responded';
|
|
29
|
+
index: number;
|
|
30
|
+
slotId: string;
|
|
31
|
+
activityId: string;
|
|
32
|
+
/**
|
|
33
|
+
* The raw answer, with no grade of any kind. This is what an `exam` slot
|
|
34
|
+
* produces: the client is forbidden to score, so a response is all there
|
|
35
|
+
* is until the server grades it.
|
|
36
|
+
*/
|
|
37
|
+
response: LearnerResponse;
|
|
23
38
|
};
|
|
24
39
|
/**
|
|
25
40
|
* A component that can render one activity inside a sequence. Register one per
|
|
@@ -28,23 +43,57 @@ type SequenceItemOutcome = {
|
|
|
28
43
|
*/
|
|
29
44
|
type ActivityRenderer = ComponentType<ActivityProps>;
|
|
30
45
|
interface ActivitySequenceProps {
|
|
31
|
-
/**
|
|
32
|
-
|
|
46
|
+
/**
|
|
47
|
+
* The ordered set of entries to present, one question at a time: loose
|
|
48
|
+
* activities, and item groups — a shared passage, recording or image with
|
|
49
|
+
* the questions that refer to it. A group's stimulus stays on screen
|
|
50
|
+
* alongside each of its questions.
|
|
51
|
+
*
|
|
52
|
+
* Accepts `redact()` projections. For data straight off a server, pass it
|
|
53
|
+
* through `asRenderableSequence()` — see that helper for why a cast is
|
|
54
|
+
* unavoidable there — and set `renderMode="exam"`.
|
|
55
|
+
*/
|
|
56
|
+
activities: readonly SequenceEntry<RenderableActivity>[];
|
|
33
57
|
/**
|
|
34
58
|
* Renderers for activity types beyond the built-ins, keyed by `data.type`.
|
|
35
59
|
* A key matching a built-in overrides it, so a consumer can replace the
|
|
36
60
|
* bundled renderer without forking the sequencer.
|
|
37
61
|
*/
|
|
38
62
|
renderers?: Readonly<Record<string, ActivityRenderer>>;
|
|
39
|
-
/**
|
|
40
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Called whenever an individual activity is scored at submit time — the
|
|
65
|
+
* incremental persist hook.
|
|
66
|
+
*
|
|
67
|
+
* `slotId` is the identity to store the result against, NOT `index`.
|
|
68
|
+
* `index` is where the question was PRESENTED, which is not stable: it moves
|
|
69
|
+
* under shuffling, and it already differs from the slot identity whenever a
|
|
70
|
+
* group is present (the second entry of a sequence is presented at index 1
|
|
71
|
+
* but is slot `"1.0"` if it is a group's first question). `composeAssessmentScore`
|
|
72
|
+
* scores by `slotId`, so persisting `index` cannot be reconciled with it.
|
|
73
|
+
*/
|
|
74
|
+
onActivityComplete?: (result: ActivityResult, index: number, slotId: string) => void;
|
|
75
|
+
/**
|
|
76
|
+
* Called on every submit with the learner's raw response and the identity of
|
|
77
|
+
* the slot that produced it — before any grading, in every render mode.
|
|
78
|
+
*
|
|
79
|
+
* **This is the only response channel an `exam` sequence has.** In `exam`
|
|
80
|
+
* mode the components never grade, so `onActivityComplete` cannot fire and
|
|
81
|
+
* `onComplete` never will; without this prop nothing a learner submitted
|
|
82
|
+
* would reach the consumer at all. Persist `response` against `slotId`.
|
|
83
|
+
*/
|
|
84
|
+
onSubmit?: (response: LearnerResponse, slot: {
|
|
85
|
+
slotId: string;
|
|
86
|
+
index: number;
|
|
87
|
+
activityId: string;
|
|
88
|
+
}) => void;
|
|
41
89
|
/**
|
|
42
90
|
* Called once every activity has been completed, with the scored results.
|
|
43
91
|
*
|
|
44
92
|
* Fires only when EVERY item produced a score. A set containing a
|
|
45
93
|
* deferred-graded activity (a written response) can never satisfy that, so
|
|
46
94
|
* use `onFinished` for mixed sets — it is the general completion signal and
|
|
47
|
-
* reports both kinds of outcome.
|
|
95
|
+
* reports both kinds of outcome. It also carries `slotId` per item, which
|
|
96
|
+
* this callback's bare array cannot.
|
|
48
97
|
*/
|
|
49
98
|
onComplete?: (results: ActivityResult[]) => void;
|
|
50
99
|
/**
|
|
@@ -57,6 +106,30 @@ interface ActivitySequenceProps {
|
|
|
57
106
|
onInteraction?: (event: InteractionEvent) => void;
|
|
58
107
|
/** Forwarded to each activity. `exam` and `review` disable local scoring. */
|
|
59
108
|
renderMode?: RenderMode;
|
|
109
|
+
/**
|
|
110
|
+
* `entries` shuffles the top-level entries; a group moves as one block, and
|
|
111
|
+
* the order INSIDE a group follows the group's own `shuffle` setting.
|
|
112
|
+
* Default `none`: authored order.
|
|
113
|
+
*/
|
|
114
|
+
shuffle?: 'none' | 'entries';
|
|
115
|
+
/**
|
|
116
|
+
* Seed for every shuffle in this sequence (`shuffle: 'entries'` and any
|
|
117
|
+
* group with `shuffle: 'within-group'`). Supply the attempt id, so the
|
|
118
|
+
* server's `flattenSequence(entries, { seed })` derives the same order this
|
|
119
|
+
* pager shows.
|
|
120
|
+
*
|
|
121
|
+
* **Required in `exam` and `review` mode** — omitting it throws. An order
|
|
122
|
+
* nobody can reproduce cannot be reconciled with a recorded attempt, and
|
|
123
|
+
* failing at render is the only way that mistake surfaces before a learner
|
|
124
|
+
* sits the paper. In `practice` mode it stays optional: a random per-mount
|
|
125
|
+
* seed is used, which is stable within the mount and deliberately not
|
|
126
|
+
* reproducible. That fallback is also not SSR-safe (server and client would
|
|
127
|
+
* invent different orders and hydration would mismatch), so supply a seed
|
|
128
|
+
* for any server-rendered sequence regardless of mode.
|
|
129
|
+
*/
|
|
130
|
+
shuffleSeed?: string;
|
|
131
|
+
/** Renders author-supplied rich text; forwarded to the stimulus panel and every activity. */
|
|
132
|
+
sanitizeHtml?: HtmlSanitizer;
|
|
60
133
|
theme?: Partial<ThemeTokens>;
|
|
61
134
|
locale?: string;
|
|
62
135
|
disabled?: boolean;
|
|
@@ -67,7 +140,12 @@ interface ActivitySequenceProps {
|
|
|
67
140
|
* the learner may move back and forth; activities keep their own submit and
|
|
68
141
|
* scoring. On navigation, focus moves to the question region and the position
|
|
69
142
|
* is announced via an aria-live region.
|
|
143
|
+
*
|
|
144
|
+
* Item groups are flattened into consecutive questions; the group's stimulus
|
|
145
|
+
* is mounted ONCE, beside the question region rather than inside it, and shown
|
|
146
|
+
* alongside every question in the group — so a passage stays put, and a
|
|
147
|
+
* recording keeps its position, as the learner moves between its questions.
|
|
70
148
|
*/
|
|
71
|
-
declare function ActivitySequence({ activities, renderers, onActivityComplete, onComplete, onFinished, onInteraction, renderMode, theme, locale, disabled, }: ActivitySequenceProps): React.JSX.Element;
|
|
149
|
+
declare function ActivitySequence({ activities, renderers, onActivityComplete, onComplete, onFinished, onSubmit, onInteraction, renderMode, shuffle, shuffleSeed, sanitizeHtml, theme, locale, disabled, }: ActivitySequenceProps): React.JSX.Element;
|
|
72
150
|
|
|
73
151
|
export { type ActivityRenderer, ActivitySequence, type ActivitySequenceProps, type SequenceItemOutcome };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export { ActivitySequence } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
export { ActivitySequence } from '../chunk-GMU77L52.js';
|
|
2
|
+
import '../chunk-5SYL5CJ2.js';
|
|
3
|
+
import '../chunk-3DNJDP73.js';
|
|
4
|
+
import '../chunk-SWZRB3VY.js';
|
|
5
|
+
import '../chunk-6F4X2NKL.js';
|
|
6
|
+
import '../chunk-UQ3BBEIT.js';
|
|
7
|
+
import '../chunk-GB5URWM4.js';
|
|
6
8
|
import '../chunk-5HVUKXF3.js';
|
|
7
9
|
//# sourceMappingURL=ActivitySequence.js.map
|
|
8
10
|
//# sourceMappingURL=ActivitySequence.js.map
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunk67RIIDZX_cjs = require('../chunk-67RIIDZX.cjs');
|
|
4
|
+
require('../chunk-PGEG7UZJ.cjs');
|
|
5
|
+
require('../chunk-4HZ7LQIH.cjs');
|
|
5
6
|
require('../chunk-HD2AIQRD.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
Object.defineProperty(exports, "FillInTheBlanks", {
|
|
10
11
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk67RIIDZX_cjs.FillInTheBlanks; }
|
|
12
13
|
});
|
|
13
14
|
//# sourceMappingURL=FillInTheBlanks.cjs.map
|
|
14
15
|
//# 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 '../types-
|
|
3
|
+
import { A as ActivityProps } from '../types-CrURyd9-.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 '../types-
|
|
3
|
+
import { A as ActivityProps } from '../types-CrURyd9-.js';
|
|
4
4
|
|
|
5
5
|
interface FillInTheBlanksProps extends ActivityProps<FillInTheBlanksData> {
|
|
6
6
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { FillInTheBlanks } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { FillInTheBlanks } from '../chunk-3DNJDP73.js';
|
|
2
|
+
import '../chunk-6F4X2NKL.js';
|
|
3
|
+
import '../chunk-GB5URWM4.js';
|
|
3
4
|
import '../chunk-5HVUKXF3.js';
|
|
4
5
|
//# sourceMappingURL=FillInTheBlanks.js.map
|
|
5
6
|
//# sourceMappingURL=FillInTheBlanks.js.map
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkWCVD5LVG_cjs = require('../chunk-WCVD5LVG.cjs');
|
|
4
|
+
require('../chunk-PGEG7UZJ.cjs');
|
|
5
|
+
require('../chunk-4HZ7LQIH.cjs');
|
|
5
6
|
require('../chunk-HD2AIQRD.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
Object.defineProperty(exports, "MultipleChoice", {
|
|
10
11
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkWCVD5LVG_cjs.MultipleChoice; }
|
|
12
13
|
});
|
|
13
14
|
//# sourceMappingURL=MultipleChoice.cjs.map
|
|
14
15
|
//# 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 '../types-
|
|
3
|
+
import { A as ActivityProps } from '../types-CrURyd9-.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 '../types-
|
|
3
|
+
import { A as ActivityProps } from '../types-CrURyd9-.js';
|
|
4
4
|
|
|
5
5
|
interface MultipleChoiceProps extends ActivityProps<MultipleChoiceData> {
|
|
6
6
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { MultipleChoice } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { MultipleChoice } from '../chunk-5SYL5CJ2.js';
|
|
2
|
+
import '../chunk-6F4X2NKL.js';
|
|
3
|
+
import '../chunk-GB5URWM4.js';
|
|
3
4
|
import '../chunk-5HVUKXF3.js';
|
|
4
5
|
//# sourceMappingURL=MultipleChoice.js.map
|
|
5
6
|
//# sourceMappingURL=MultipleChoice.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkNEWGUDA5_cjs = require('../chunk-NEWGUDA5.cjs');
|
|
4
|
+
require('../chunk-4HZ7LQIH.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "StimulusPanel", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkNEWGUDA5_cjs.StimulusPanel; }
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=StimulusPanel.cjs.map
|
|
13
|
+
//# sourceMappingURL=StimulusPanel.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"StimulusPanel.cjs"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Stimulus } from '@intellectif/lk-core';
|
|
2
|
+
import { H as HtmlSanitizer } from '../types-CrURyd9-.cjs';
|
|
3
|
+
|
|
4
|
+
interface StimulusPanelProps {
|
|
5
|
+
stimulus: Stimulus;
|
|
6
|
+
/**
|
|
7
|
+
* 1-based presented positions of the first and last question this material
|
|
8
|
+
* serves, rendered as "Questions 3–8" so a learner knows how far the
|
|
9
|
+
* passage carries.
|
|
10
|
+
*/
|
|
11
|
+
range?: {
|
|
12
|
+
first: number;
|
|
13
|
+
last: number;
|
|
14
|
+
};
|
|
15
|
+
/** Renders `stimulus.bodyHtml` when provided. See `HtmlSanitizer`. */
|
|
16
|
+
sanitizeHtml?: HtmlSanitizer;
|
|
17
|
+
locale?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Presents a shared stimulus — the passage, recording or image an item group's
|
|
21
|
+
* questions refer to. A landmark region named by its title (or by its kind),
|
|
22
|
+
* so a screen-reader user can jump back to the material from any question.
|
|
23
|
+
*
|
|
24
|
+
* Rich text follows the SDK-wide rule: `bodyHtml` is rendered only through a
|
|
25
|
+
* caller-supplied sanitiser, and the plain `body` is the fallback — which the
|
|
26
|
+
* schema guarantees exists whenever `bodyHtml` does.
|
|
27
|
+
*/
|
|
28
|
+
declare function StimulusPanel({ stimulus, range, sanitizeHtml, locale, }: StimulusPanelProps): React.JSX.Element;
|
|
29
|
+
|
|
30
|
+
export { StimulusPanel, type StimulusPanelProps };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Stimulus } from '@intellectif/lk-core';
|
|
2
|
+
import { H as HtmlSanitizer } from '../types-CrURyd9-.js';
|
|
3
|
+
|
|
4
|
+
interface StimulusPanelProps {
|
|
5
|
+
stimulus: Stimulus;
|
|
6
|
+
/**
|
|
7
|
+
* 1-based presented positions of the first and last question this material
|
|
8
|
+
* serves, rendered as "Questions 3–8" so a learner knows how far the
|
|
9
|
+
* passage carries.
|
|
10
|
+
*/
|
|
11
|
+
range?: {
|
|
12
|
+
first: number;
|
|
13
|
+
last: number;
|
|
14
|
+
};
|
|
15
|
+
/** Renders `stimulus.bodyHtml` when provided. See `HtmlSanitizer`. */
|
|
16
|
+
sanitizeHtml?: HtmlSanitizer;
|
|
17
|
+
locale?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Presents a shared stimulus — the passage, recording or image an item group's
|
|
21
|
+
* questions refer to. A landmark region named by its title (or by its kind),
|
|
22
|
+
* so a screen-reader user can jump back to the material from any question.
|
|
23
|
+
*
|
|
24
|
+
* Rich text follows the SDK-wide rule: `bodyHtml` is rendered only through a
|
|
25
|
+
* caller-supplied sanitiser, and the plain `body` is the fallback — which the
|
|
26
|
+
* schema guarantees exists whenever `bodyHtml` does.
|
|
27
|
+
*/
|
|
28
|
+
declare function StimulusPanel({ stimulus, range, sanitizeHtml, locale, }: StimulusPanelProps): React.JSX.Element;
|
|
29
|
+
|
|
30
|
+
export { StimulusPanel, type StimulusPanelProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"StimulusPanel.js"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkXQJFLAMD_cjs = require('../chunk-XQJFLAMD.cjs');
|
|
4
|
+
require('../chunk-PGEG7UZJ.cjs');
|
|
5
|
+
require('../chunk-4HZ7LQIH.cjs');
|
|
5
6
|
require('../chunk-HD2AIQRD.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
Object.defineProperty(exports, "WrittenResponse", {
|
|
10
11
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkXQJFLAMD_cjs.WrittenResponse; }
|
|
12
13
|
});
|
|
13
14
|
//# sourceMappingURL=WrittenResponse.cjs.map
|
|
14
15
|
//# 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, a as Renderable } from '../types-
|
|
2
|
+
import { W as WrittenResponseProps } from '../WrittenResponse-DqQ0NjPK.cjs';
|
|
3
|
+
export { a as WrittenResponseSubmission } from '../WrittenResponse-DqQ0NjPK.cjs';
|
|
4
|
+
export { H as HtmlSanitizer, R as RenderMode, a as Renderable } from '../types-CrURyd9-.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, a as Renderable } from '../types-
|
|
2
|
+
import { W as WrittenResponseProps } from '../WrittenResponse-Dkg7FUt-.js';
|
|
3
|
+
export { a as WrittenResponseSubmission } from '../WrittenResponse-Dkg7FUt-.js';
|
|
4
|
+
export { H as HtmlSanitizer, R as RenderMode, a as Renderable } from '../types-CrURyd9-.js';
|
|
5
5
|
import '@intellectif/lk-core';
|
|
6
6
|
|
|
7
7
|
/**
|