@intellectif/lk-core 0.12.0 → 0.13.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 +24 -0
- package/README.md +2 -1
- package/dist/{activity-B2QxK15j.d.cts → activity-DfAmJ1sl.d.cts} +134 -7
- package/dist/{activity-B2QxK15j.d.ts → activity-DfAmJ1sl.d.ts} +134 -7
- package/dist/{chunk-VYE6BYON.cjs → chunk-DQKJUMUW.cjs} +38 -15
- package/dist/chunk-DQKJUMUW.cjs.map +1 -0
- package/dist/{chunk-RK2NVTHZ.js → chunk-FGN4LLSP.js} +50 -6
- package/dist/chunk-FGN4LLSP.js.map +1 -0
- package/dist/{chunk-O2IVKTHV.cjs → chunk-FT7SAC3X.cjs} +4 -4
- package/dist/{chunk-O2IVKTHV.cjs.map → chunk-FT7SAC3X.cjs.map} +1 -1
- package/dist/{chunk-UQPNJP2O.js → chunk-PYP3HCRQ.js} +2 -2
- package/dist/{chunk-4OHWLCI6.cjs → chunk-UHQVIC3P.cjs} +58 -14
- package/dist/chunk-UHQVIC3P.cjs.map +1 -0
- package/dist/{chunk-FVN37GIH.js → chunk-XKKKWKRH.js} +1944 -177
- package/dist/chunk-XKKKWKRH.js.map +1 -0
- package/dist/{chunk-J6POE4HL.cjs → chunk-XONKWL6D.cjs} +1785 -18
- package/dist/chunk-XONKWL6D.cjs.map +1 -0
- package/dist/{chunk-7JMMPE7O.js → chunk-Y36S3X3L.js} +26 -3
- package/dist/chunk-Y36S3X3L.js.map +1 -0
- package/dist/{index-B_scInLM.d.cts → index-Bz9wUigA.d.cts} +181 -4
- package/dist/{index-CRKtWP5G.d.ts → index-CJbbVE9o.d.ts} +181 -4
- package/dist/index.cjs +128 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -6
- package/dist/index.d.ts +14 -6
- package/dist/index.js +60 -5
- package/dist/index.js.map +1 -1
- package/dist/schemas.cjs +17 -3
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +2 -2
- package/dist/schemas.d.ts +2 -2
- package/dist/schemas.js +16 -2
- package/dist/scoring.cjs +19 -3
- package/dist/scoring.cjs.map +1 -1
- package/dist/scoring.d.cts +150 -5
- package/dist/scoring.d.ts +150 -5
- package/dist/scoring.js +18 -2
- package/dist/xapi.cjs +3 -3
- package/dist/xapi.d.cts +1 -1
- package/dist/xapi.d.ts +1 -1
- package/dist/xapi.js +2 -2
- package/package.json +1 -1
- package/vectors/README.md +9 -1
- package/vectors/scoring.json +12023 -1
- package/dist/chunk-4OHWLCI6.cjs.map +0 -1
- package/dist/chunk-7JMMPE7O.js.map +0 -1
- package/dist/chunk-FVN37GIH.js.map +0 -1
- package/dist/chunk-J6POE4HL.cjs.map +0 -1
- package/dist/chunk-RK2NVTHZ.js.map +0 -1
- package/dist/chunk-VYE6BYON.cjs.map +0 -1
- /package/dist/{chunk-UQPNJP2O.js.map → chunk-PYP3HCRQ.js.map} +0 -0
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DictationDataSchema,
|
|
2
3
|
FillInTheBlanksDataSchema,
|
|
4
|
+
GROUP_CAPTIONS_REVEAL_DICTATION,
|
|
3
5
|
GapSelectDataSchema,
|
|
4
6
|
MediaSchema,
|
|
5
7
|
MultipleChoiceDataSchema,
|
|
6
8
|
RedactedMediaSchema,
|
|
7
9
|
UnknownActivityTypeError,
|
|
8
10
|
WrittenResponseDataSchema,
|
|
9
|
-
getActivityTypeDescriptor
|
|
10
|
-
|
|
11
|
+
getActivityTypeDescriptor,
|
|
12
|
+
groupCaptionsRevealDictation
|
|
13
|
+
} from "./chunk-XKKKWKRH.js";
|
|
11
14
|
|
|
12
15
|
// src/schemas/item-group.ts
|
|
13
16
|
import { z } from "zod/v4";
|
|
@@ -99,6 +102,15 @@ var RedactedItemGroupSchema = z.strictObject({
|
|
|
99
102
|
stimulus: RedactedStimulusSchema,
|
|
100
103
|
items: z.array(z.unknown()).min(1),
|
|
101
104
|
shuffle: z.enum(["none", "within-group"]).optional()
|
|
105
|
+
}).check((ctx) => {
|
|
106
|
+
if (groupCaptionsRevealDictation(ctx.value)) {
|
|
107
|
+
ctx.issues.push({
|
|
108
|
+
code: "custom",
|
|
109
|
+
input: ctx.value.stimulus.media?.captionsUrl,
|
|
110
|
+
message: GROUP_CAPTIONS_REVEAL_DICTATION,
|
|
111
|
+
path: ["stimulus", "media", "captionsUrl"]
|
|
112
|
+
});
|
|
113
|
+
}
|
|
102
114
|
});
|
|
103
115
|
function toValidationErrors(issues, prefix) {
|
|
104
116
|
return issues.map((issue) => ({
|
|
@@ -131,6 +143,13 @@ function validateItemGroup(data) {
|
|
|
131
143
|
}
|
|
132
144
|
items.push(parsed.data);
|
|
133
145
|
});
|
|
146
|
+
if (groupCaptionsRevealDictation(container.data)) {
|
|
147
|
+
errors.push({
|
|
148
|
+
path: ["stimulus", "media", "captionsUrl"],
|
|
149
|
+
message: GROUP_CAPTIONS_REVEAL_DICTATION,
|
|
150
|
+
code: "custom"
|
|
151
|
+
});
|
|
152
|
+
}
|
|
134
153
|
if (errors.length > 0) {
|
|
135
154
|
return { success: false, errors };
|
|
136
155
|
}
|
|
@@ -144,6 +163,9 @@ var itemGroupJsonSchema = z2.toJSONSchema(ItemGroupSchema, { target: "draft-7" }
|
|
|
144
163
|
var gapSelectJsonSchema = z2.toJSONSchema(GapSelectDataSchema, {
|
|
145
164
|
target: "draft-7"
|
|
146
165
|
});
|
|
166
|
+
var dictationJsonSchema = z2.toJSONSchema(DictationDataSchema, {
|
|
167
|
+
target: "draft-7"
|
|
168
|
+
});
|
|
147
169
|
var multipleChoiceJsonSchema = z2.toJSONSchema(MultipleChoiceDataSchema, {
|
|
148
170
|
target: "draft-7"
|
|
149
171
|
});
|
|
@@ -190,10 +212,11 @@ export {
|
|
|
190
212
|
stimulusJsonSchema,
|
|
191
213
|
itemGroupJsonSchema,
|
|
192
214
|
gapSelectJsonSchema,
|
|
215
|
+
dictationJsonSchema,
|
|
193
216
|
multipleChoiceJsonSchema,
|
|
194
217
|
fillInTheBlanksJsonSchema,
|
|
195
218
|
writtenResponseJsonSchema,
|
|
196
219
|
jsonSchemaFor,
|
|
197
220
|
validateActivity
|
|
198
221
|
};
|
|
199
|
-
//# sourceMappingURL=chunk-
|
|
222
|
+
//# sourceMappingURL=chunk-Y36S3X3L.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/item-group.ts","../src/schemas/json-schema.ts","../src/schemas/index.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { getActivityTypeDescriptor } from '../registry/index.js';\nimport type { ActivityData, ValidationError, ValidationResult } from '../types/activity.js';\nimport type { ItemGroup, StimulusKind } from '../types/item-group.js';\nimport { GROUP_CAPTIONS_REVEAL_DICTATION, groupCaptionsRevealDictation } from './dictation.js';\nimport { MediaSchema, RedactedMediaSchema } from './media.js';\n\n/**\n * An authored slot key.\n *\n * A `.` is rejected here, not at render time: `flattenSequence` uses the first\n * `.` to separate a group from its item, so a key containing one would produce\n * an ambiguous slot id. `keyOf` already threw on it — this moves the rejection\n * to `validateItemGroup`, where an author finds it, instead of leaving it to\n * surface when a learner opens the paper. Content that would newly fail\n * validation already threw at flatten time, so it can never have been sat.\n */\nconst SlotKeySchema = z\n .string()\n .min(1)\n .refine((key) => !key.includes('.'), {\n error:\n 'slotKey must not contain \".\" — that character separates a group from its item in a slot id, so a key containing one would make the slot ambiguous.',\n });\n\nfunction hasBody(stimulus: { body?: string | undefined }): boolean {\n return typeof stimulus.body === 'string' && stimulus.body.trim().length > 0;\n}\n\n/** Which media types can carry a stimulus of each kind. `text`/`mixed` accept any. */\nfunction mediaFits(kind: StimulusKind, mediaType: string | undefined): boolean {\n switch (kind) {\n case 'audio':\n return mediaType === 'audio';\n case 'video':\n return mediaType === 'video' || mediaType === 'embed';\n case 'image':\n return mediaType === 'image';\n default:\n return true;\n }\n}\n\n/**\n * Zod schema for a {@link Stimulus}. Loose: unknown keys preserved.\n *\n * The semantic guards exist because a stimulus that does not carry what its\n * `kind` promises is an authoring error that must not reach an exam: an\n * \"audio\" stimulus with no recording renders as a blank panel above six\n * listening questions. Unrepresentable in JSON Schema; dropped from\n * `stimulusJsonSchema` by design.\n */\nexport const StimulusSchema = z\n .looseObject({\n id: z.string().min(1),\n kind: z.enum(['text', 'audio', 'video', 'image', 'mixed']),\n title: z.string().optional(),\n body: z.string().optional(),\n bodyHtml: z.string().optional(),\n media: MediaSchema.optional(),\n transcript: z.string().optional(),\n locale: z.string().optional(),\n attribution: z.string().optional(),\n })\n .refine((stimulus) => stimulus.bodyHtml === undefined || hasBody(stimulus), {\n error:\n 'bodyHtml requires a plain-text body: it is the accessible fallback rendered when no sanitiser is supplied.',\n path: ['body'],\n })\n .refine(\n (stimulus) => (stimulus.kind !== 'text' && stimulus.kind !== 'mixed') || hasBody(stimulus),\n {\n error: 'A text or mixed stimulus needs a non-empty body.',\n path: ['body'],\n },\n )\n .refine((stimulus) => stimulus.kind === 'text' || stimulus.media !== undefined, {\n error: 'An audio, video, image or mixed stimulus needs media.',\n path: ['media'],\n })\n .refine(\n (stimulus) => stimulus.media === undefined || mediaFits(stimulus.kind, stimulus.media.type),\n {\n error:\n 'media.type does not fit the stimulus kind: audio needs audio; video needs video or embed; image needs image.',\n path: ['media', 'type'],\n },\n );\n\n/**\n * The structural minimum of an item as seen by the CONTAINER schema. Each\n * item's own contract is checked against its registered schema by\n * {@link validateItemGroup} — a zod schema cannot dispatch on a registry\n * that consumers extend at runtime.\n */\nconst ItemShapeSchema = z.looseObject({\n type: z.string().min(1),\n id: z.string().min(1),\n slotKey: SlotKeySchema.optional(),\n});\n\n/**\n * Zod schema for an {@link ItemGroup} CONTAINER. Loose: unknown keys\n * preserved. Validates the group's own fields and the stimulus in full, and\n * each item only structurally (`type` and `id`); use {@link validateItemGroup}\n * to validate the items against their registered schemas as well.\n */\nexport const ItemGroupSchema = z\n .looseObject({\n schemaVersion: z.literal('1.0'),\n type: z.literal('item-group'),\n id: z.string().min(1),\n title: z.string().optional(),\n slotKey: SlotKeySchema.optional(),\n stimulus: StimulusSchema,\n items: z.array(ItemShapeSchema).min(1),\n shuffle: z.enum(['none', 'within-group']).optional(),\n })\n .refine((group) => group.items.every((item) => item.type !== 'item-group'), {\n error: 'Item groups do not nest: every item must be an activity.',\n path: ['items'],\n })\n .refine((group) => new Set(group.items.map((item) => item.id)).size === group.items.length, {\n error: 'Item ids must be unique within a group.',\n path: ['items'],\n });\n\n/** The learner-safe shape of a stimulus, derived from the strict schema below. */\nexport type RedactedStimulus = z.infer<typeof RedactedStimulusSchema>;\n\n/** Strict learner-safe stimulus: everything but the author-only `transcript`. */\nexport const RedactedStimulusSchema = z.strictObject({\n id: z.string().min(1),\n kind: z.enum(['text', 'audio', 'video', 'image', 'mixed']),\n title: z.string().optional(),\n body: z.string().optional(),\n bodyHtml: z.string().optional(),\n media: RedactedMediaSchema.optional(),\n locale: z.string().optional(),\n attribution: z.string().optional(),\n});\n\n/**\n * Strict learner-safe item group. Items are left opaque here — each is proven\n * learner-safe by `assertRedacted` against its OWN type's redacted schema,\n * which is the only place that knowledge lives. The one exception is the one\n * rule that spans the container and an item: a captioned stimulus recording\n * played to a dictation is not learner-safe, because the captions are the\n * dictation's answer.\n */\nexport const RedactedItemGroupSchema = z\n .strictObject({\n redacted: z.literal(true),\n schemaVersion: z.literal('1.0'),\n type: z.literal('item-group'),\n id: z.string().min(1),\n title: z.string().optional(),\n slotKey: SlotKeySchema.optional(),\n stimulus: RedactedStimulusSchema,\n items: z.array(z.unknown()).min(1),\n shuffle: z.enum(['none', 'within-group']).optional(),\n })\n .check((ctx) => {\n if (groupCaptionsRevealDictation(ctx.value)) {\n ctx.issues.push({\n code: 'custom',\n input: ctx.value.stimulus.media?.captionsUrl,\n message: GROUP_CAPTIONS_REVEAL_DICTATION,\n path: ['stimulus', 'media', 'captionsUrl'],\n });\n }\n });\n\nfunction toValidationErrors(\n issues: readonly { path: PropertyKey[]; message: string; code: string }[],\n prefix: string[],\n): ValidationError[] {\n return issues.map((issue) => ({\n path: [...prefix, ...issue.path.map(String)],\n message: issue.message,\n code: issue.code,\n }));\n}\n\n/**\n * Validates an item group in full: the container and stimulus against\n * {@link ItemGroupSchema}, then every item against the schema registered for\n * its `type`. Errors from items are reported at `items.<index>.…`.\n *\n * Unlike `validateActivity`, an item whose type is not registered is REPORTED\n * (code `unknown_activity_type`) rather than thrown: a group is validated as\n * a whole, and an author fixing a six-item group wants every problem listed,\n * not the first one that happened to throw.\n */\nexport function validateItemGroup(data: unknown): ValidationResult<ItemGroup> {\n const container = ItemGroupSchema.safeParse(data);\n if (!container.success) {\n return { success: false, errors: toValidationErrors(container.error.issues, []) };\n }\n\n const errors: ValidationError[] = [];\n const items: ActivityData[] = [];\n container.data.items.forEach((item, index) => {\n const descriptor = getActivityTypeDescriptor(item.type);\n if (descriptor === undefined) {\n errors.push({\n path: ['items', String(index), 'type'],\n message: `Activity type \"${item.type}\" is not registered`,\n code: 'unknown_activity_type',\n });\n return;\n }\n const parsed = descriptor.schema.safeParse(item);\n if (!parsed.success) {\n errors.push(...toValidationErrors(parsed.error.issues, ['items', String(index)]));\n return;\n }\n items.push(parsed.data as ActivityData);\n });\n if (groupCaptionsRevealDictation(container.data)) {\n errors.push({\n path: ['stimulus', 'media', 'captionsUrl'],\n message: GROUP_CAPTIONS_REVEAL_DICTATION,\n code: 'custom',\n });\n }\n\n if (errors.length > 0) {\n return { success: false, errors };\n }\n // zod4 optional outputs are `T | undefined`; the wire type uses exact\n // optionals. Structurally identical at runtime — the cast is type-level.\n return { success: true, data: { ...container.data, items } as unknown as ItemGroup };\n}\n","import { z } from 'zod/v4';\nimport { UnknownActivityTypeError } from '../errors.js';\nimport { getActivityTypeDescriptor } from '../registry/index.js';\nimport { DictationDataSchema } from './dictation.js';\nimport { FillInTheBlanksDataSchema } from './fill-in-the-blanks.js';\nimport { GapSelectDataSchema } from './gap-select.js';\nimport { ItemGroupSchema, StimulusSchema } from './item-group.js';\nimport { MultipleChoiceDataSchema } from './multiple-choice.js';\nimport { WrittenResponseDataSchema } from './written-response.js';\n\n/**\n * JSON Schema (Draft 7) for a `Stimulus`. Structural contract only — the\n * kind/media/body consistency guards are Zod-only.\n */\nexport const stimulusJsonSchema = z.toJSONSchema(StimulusSchema, { target: 'draft-7' });\n\n/**\n * JSON Schema (Draft 7) for an `ItemGroup` CONTAINER. Items appear as objects\n * with `type` and `id` only; each item's own contract is `jsonSchemaFor(type)`.\n * For an AI generation pipeline, ask for the group and each item separately\n * rather than a single nested schema — that keeps the per-type schema the\n * registry's, not a copy.\n */\nexport const itemGroupJsonSchema = z.toJSONSchema(ItemGroupSchema, { target: 'draft-7' });\n\n/**\n * JSON Schema (Draft 7) representation of the Multiple Choice activity data\n * contract, generated natively by Zod 4. Draft 7 is mandated by Requirement\n * 2.2 for the widest AI-prompt / OpenAPI tooling compatibility. The semantic\n * `.refine()` guards are not representable in JSON Schema and are\n * intentionally omitted — the export captures the *structural* contract only.\n * Since v0.3 the source schemas are loose, so these no longer emit\n * `additionalProperties: false` — the JSON Schema and `validateActivity` now\n * agree on unknown-key handling.\n */\n/**\n * JSON Schema (Draft 7) representation of the Gap Select activity data\n * contract. Structural contract only: the six semantic guards — the\n * passage/gap bijection, id uniqueness, the one-choice-source rule, and an\n * answer key that names a choice the gap offers — are Zod-only, as they are\n * for the other types.\n */\nexport const gapSelectJsonSchema = z.toJSONSchema(GapSelectDataSchema, {\n target: 'draft-7',\n});\n\n/**\n * JSON Schema (Draft 7) representation of the Dictation activity data\n * contract. Structural contract, plus the raw length caps JSON Schema can\n * state in code points as zod counts them — `maxLength` 2000 on a transcript\n * and an accepted transcript, 200 on a rule's `from` and `to`. The twelve\n * semantic guards — a transcript that survives normalisation, the caps after\n * equivalences are applied, distinct candidates, audio only, the\n * slow-recording rules, no captions, no transcript in the title — are\n * Zod-only, as they are for the other types.\n */\nexport const dictationJsonSchema = z.toJSONSchema(DictationDataSchema, {\n target: 'draft-7',\n});\n\nexport const multipleChoiceJsonSchema = z.toJSONSchema(MultipleChoiceDataSchema, {\n target: 'draft-7',\n});\n\n/**\n * JSON Schema (Draft 7) representation of the Fill-in-the-Blanks activity data\n * contract, generated natively by Zod 4. Structural contract only (semantic\n * `.refine()` guards are Zod-only and not representable in JSON Schema).\n */\nexport const fillInTheBlanksJsonSchema = z.toJSONSchema(FillInTheBlanksDataSchema, {\n target: 'draft-7',\n});\n\n/**\n * JSON Schema (Draft 7) representation of the Written Response activity data\n * contract. Structural contract only.\n */\nexport const writtenResponseJsonSchema = z.toJSONSchema(WrittenResponseDataSchema, {\n target: 'draft-7',\n});\n\n/**\n * Derives the JSON Schema (Draft 7) for any REGISTERED activity type — the\n * live, registry-backed replacement for the static per-type exports above,\n * and the building block for AI generation pipelines (R6.1): pass the result\n * as a structured-output schema so a model can only emit valid items.\n *\n * @throws UnknownActivityTypeError when `type` has no registered descriptor.\n */\nexport function jsonSchemaFor(type: string): Record<string, unknown> {\n const descriptor = getActivityTypeDescriptor(type);\n if (descriptor === undefined) {\n throw new UnknownActivityTypeError(type);\n }\n return z.toJSONSchema(descriptor.schema as never, { target: 'draft-7' }) as Record<\n string,\n unknown\n >;\n}\n","import { UnknownActivityTypeError } from '../errors.js';\nimport { getActivityTypeDescriptor } from '../registry/index.js';\nimport type { ActivityDataMap, ActivityType, ValidationResult } from '../types/activity.js';\n\nexport {\n DictationDataSchema,\n DictationEquivalenceSchema,\n DictationSlowMediaSchema,\n DictationToleranceSchema,\n} from './dictation.js';\nexport { FeedbackSchema } from './feedback.js';\nexport {\n BlankConfigSchema,\n FillInTheBlanksDataSchema,\n TextMatchPolicySchema,\n} from './fill-in-the-blanks.js';\nexport {\n GapSelectBankSchema,\n GapSelectChoiceSchema,\n GapSelectDataSchema,\n GapSelectGapSchema,\n} from './gap-select.js';\nexport type { RedactedStimulus } from './item-group.js';\nexport {\n ItemGroupSchema,\n RedactedItemGroupSchema,\n RedactedStimulusSchema,\n StimulusSchema,\n validateItemGroup,\n} from './item-group.js';\nexport {\n dictationJsonSchema,\n fillInTheBlanksJsonSchema,\n gapSelectJsonSchema,\n itemGroupJsonSchema,\n jsonSchemaFor,\n multipleChoiceJsonSchema,\n stimulusJsonSchema,\n writtenResponseJsonSchema,\n} from './json-schema.js';\nexport {\n MediaPlaybackSchema,\n MediaSchema,\n MediaUrlSchema,\n NativeControlHintSchema,\n RedactedMediaSchema,\n} from './media.js';\nexport {\n MultipleChoiceDataSchema,\n MultipleChoiceOptionMediaSchema,\n MultipleChoiceOptionSchema,\n} from './multiple-choice.js';\nexport type {\n RedactedActivity,\n RedactedBlankConfig,\n RedactedDictationData,\n RedactedDictationSlowMedia,\n RedactedFillInTheBlanksData,\n RedactedGapSelectBank,\n RedactedGapSelectChoice,\n RedactedGapSelectData,\n RedactedGapSelectGap,\n RedactedMultipleChoiceData,\n RedactedMultipleChoiceOption,\n RedactedMultipleChoiceOptionMedia,\n RedactedWrittenResponseData,\n} from './redacted.js';\nexport {\n RedactedBlankConfigSchema,\n RedactedDictationDataSchema,\n RedactedDictationSlowMediaSchema,\n RedactedFillInTheBlanksDataSchema,\n RedactedGapSelectBankSchema,\n RedactedGapSelectChoiceSchema,\n RedactedGapSelectDataSchema,\n RedactedGapSelectGapSchema,\n RedactedMultipleChoiceDataSchema,\n RedactedMultipleChoiceOptionMediaSchema,\n RedactedMultipleChoiceOptionSchema,\n RedactedWrittenResponseDataSchema,\n} from './redacted.js';\nexport {\n WrittenResponseDataSchema,\n WrittenResponseRubricCriterionSchema,\n WrittenResponseRubricSchema,\n} from './written-response.js';\n\n/**\n * Validates raw activity data against the schema registered for the given\n * activity type (built-in or consumer-registered via `registerActivityType`).\n *\n * Unknown keys are PRESERVED, not stripped: every built-in schema is loose,\n * so consumer sidecar fields and forward-version fields survive validation\n * verbatim in the returned `data`.\n *\n * @returns `{ success: true, data }` with the typed, validated data, or\n * `{ success: false, errors }` with one entry per failed constraint.\n * @throws UnknownActivityTypeError when `type` has no registered descriptor.\n */\nexport function validateActivity<T extends ActivityType>(\n type: T,\n data: unknown,\n): ValidationResult<ActivityDataMap[T]> {\n const descriptor = getActivityTypeDescriptor(type);\n if (descriptor === undefined) {\n throw new UnknownActivityTypeError(String(type));\n }\n\n const result = descriptor.schema.safeParse(data);\n\n if (result.success) {\n return { success: true, data: result.data as ActivityDataMap[T] };\n }\n\n return {\n success: false,\n errors: result.error.issues.map((issue) => ({\n path: issue.path.map(String),\n message: issue.message,\n code: issue.code,\n })),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,SAAS;AAiBlB,IAAM,gBAAgB,EACnB,OAAO,EACP,IAAI,CAAC,EACL,OAAO,CAAC,QAAQ,CAAC,IAAI,SAAS,GAAG,GAAG;AAAA,EACnC,OACE;AACJ,CAAC;AAEH,SAAS,QAAQ,UAAkD;AACjE,SAAO,OAAO,SAAS,SAAS,YAAY,SAAS,KAAK,KAAK,EAAE,SAAS;AAC5E;AAGA,SAAS,UAAU,MAAoB,WAAwC;AAC7E,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO,cAAc;AAAA,IACvB,KAAK;AACH,aAAO,cAAc,WAAW,cAAc;AAAA,IAChD,KAAK;AACH,aAAO,cAAc;AAAA,IACvB;AACE,aAAO;AAAA,EACX;AACF;AAWO,IAAM,iBAAiB,EAC3B,YAAY;AAAA,EACX,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACpB,MAAM,EAAE,KAAK,CAAC,QAAQ,SAAS,SAAS,SAAS,OAAO,CAAC;AAAA,EACzD,OAAO,EAAE,OAAO,EAAE,SAAS;AAAA,EAC3B,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,OAAO,YAAY,SAAS;AAAA,EAC5B,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,aAAa,EAAE,OA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AAI,MAAM;AAAA,MAC3B,SAAS,MAAM;AAAA,MACf,MAAM,MAAM;AAAA,IACd,EAAE;AAAA,EACJ;AACF;","names":["z","z"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ActivityData, c as ActivityMedia,
|
|
1
|
+
import { A as ActivityData, c as ActivityMedia, P as ValidationResult, e as ActivityType, a as ActivityDataMap } from './activity-DfAmJ1sl.cjs';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
|
|
4
4
|
/** What a stimulus primarily is. Drives validation and layout, never scoring. */
|
|
@@ -134,6 +134,94 @@ interface SequenceSlot<TItem = ActivityData> {
|
|
|
134
134
|
group?: SequenceSlotGroup;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* Zod schema for the slower second recording of a dictation. Loose like every
|
|
139
|
+
* content schema (a sidecar survives), audio only, and — deliberately — with no
|
|
140
|
+
* `captionsUrl` and no `playback` of its own; the activity-level guards below
|
|
141
|
+
* refuse both if an author writes them anyway.
|
|
142
|
+
*/
|
|
143
|
+
declare const DictationSlowMediaSchema: z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"audio">;
|
|
145
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
146
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$loose>;
|
|
148
|
+
/**
|
|
149
|
+
* Zod schema for one whole-word rewrite rule. Both halves are bounded: `to`
|
|
150
|
+
* because a rule expands text, `from` because it is compiled into the pattern
|
|
151
|
+
* every attempt is searched with.
|
|
152
|
+
*/
|
|
153
|
+
declare const DictationEquivalenceSchema: z.ZodObject<{
|
|
154
|
+
from: z.ZodString;
|
|
155
|
+
to: z.ZodString;
|
|
156
|
+
}, z.core.$loose>;
|
|
157
|
+
/** Zod schema for a dictation's grading tolerances. At most `DICTATION_MAX_EQUIVALENCES` rules. */
|
|
158
|
+
declare const DictationToleranceSchema: z.ZodObject<{
|
|
159
|
+
equivalences: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
160
|
+
from: z.ZodString;
|
|
161
|
+
to: z.ZodString;
|
|
162
|
+
}, z.core.$loose>>>;
|
|
163
|
+
}, z.core.$loose>;
|
|
164
|
+
declare const DictationDataSchema: z.ZodObject<{
|
|
165
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
166
|
+
type: z.ZodLiteral<"dictation">;
|
|
167
|
+
id: z.ZodString;
|
|
168
|
+
title: z.ZodString;
|
|
169
|
+
transcript: z.ZodString;
|
|
170
|
+
acceptedTranscripts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
171
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
172
|
+
type: z.ZodEnum<{
|
|
173
|
+
image: "image";
|
|
174
|
+
audio: "audio";
|
|
175
|
+
video: "video";
|
|
176
|
+
embed: "embed";
|
|
177
|
+
}>;
|
|
178
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
179
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
180
|
+
captionsUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodString]>>;
|
|
181
|
+
playback: z.ZodOptional<z.ZodObject<{
|
|
182
|
+
controls: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
native: "native";
|
|
184
|
+
minimal: "minimal";
|
|
185
|
+
}>>;
|
|
186
|
+
maxPlays: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
seek: z.ZodOptional<z.ZodEnum<{
|
|
188
|
+
none: "none";
|
|
189
|
+
allow: "allow";
|
|
190
|
+
}>>;
|
|
191
|
+
rate: z.ZodOptional<z.ZodEnum<{
|
|
192
|
+
allow: "allow";
|
|
193
|
+
fixed: "fixed";
|
|
194
|
+
}>>;
|
|
195
|
+
nativeControlHints: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
196
|
+
"hide-download": "hide-download";
|
|
197
|
+
"hide-rate": "hide-rate";
|
|
198
|
+
}>>>;
|
|
199
|
+
}, z.core.$strict>>;
|
|
200
|
+
}, z.core.$loose>>;
|
|
201
|
+
slowMedia: z.ZodOptional<z.ZodObject<{
|
|
202
|
+
type: z.ZodLiteral<"audio">;
|
|
203
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
204
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
205
|
+
}, z.core.$loose>>;
|
|
206
|
+
hints: z.ZodOptional<z.ZodObject<{
|
|
207
|
+
mode: z.ZodLiteral<"progressive-words">;
|
|
208
|
+
}, z.core.$loose>>;
|
|
209
|
+
tolerance: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
equivalences: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
211
|
+
from: z.ZodString;
|
|
212
|
+
to: z.ZodString;
|
|
213
|
+
}, z.core.$loose>>>;
|
|
214
|
+
}, z.core.$loose>>;
|
|
215
|
+
feedback: z.ZodOptional<z.ZodObject<{
|
|
216
|
+
correct: z.ZodOptional<z.ZodString>;
|
|
217
|
+
incorrect: z.ZodOptional<z.ZodString>;
|
|
218
|
+
}, z.core.$loose>>;
|
|
219
|
+
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
220
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
221
|
+
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
222
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
223
|
+
}, z.core.$loose>;
|
|
224
|
+
|
|
137
225
|
/**
|
|
138
226
|
* Optional authored "overall feedback" shown after submission, selected by
|
|
139
227
|
* whether the learner passed (h5p-style overall feedback). Both fields are
|
|
@@ -566,7 +654,10 @@ declare const RedactedStimulusSchema: z.ZodObject<{
|
|
|
566
654
|
/**
|
|
567
655
|
* Strict learner-safe item group. Items are left opaque here — each is proven
|
|
568
656
|
* learner-safe by `assertRedacted` against its OWN type's redacted schema,
|
|
569
|
-
* which is the only place that knowledge lives.
|
|
657
|
+
* which is the only place that knowledge lives. The one exception is the one
|
|
658
|
+
* rule that spans the container and an item: a captioned stimulus recording
|
|
659
|
+
* played to a dictation is not learner-safe, because the captions are the
|
|
660
|
+
* dictation's answer.
|
|
570
661
|
*/
|
|
571
662
|
declare const RedactedItemGroupSchema: z.ZodObject<{
|
|
572
663
|
redacted: z.ZodLiteral<true>;
|
|
@@ -669,6 +760,17 @@ declare const itemGroupJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
|
669
760
|
* for the other types.
|
|
670
761
|
*/
|
|
671
762
|
declare const gapSelectJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
763
|
+
/**
|
|
764
|
+
* JSON Schema (Draft 7) representation of the Dictation activity data
|
|
765
|
+
* contract. Structural contract, plus the raw length caps JSON Schema can
|
|
766
|
+
* state in code points as zod counts them — `maxLength` 2000 on a transcript
|
|
767
|
+
* and an accepted transcript, 200 on a rule's `from` and `to`. The twelve
|
|
768
|
+
* semantic guards — a transcript that survives normalisation, the caps after
|
|
769
|
+
* equivalences are applied, distinct candidates, audio only, the
|
|
770
|
+
* slow-recording rules, no captions, no transcript in the title — are
|
|
771
|
+
* Zod-only, as they are for the other types.
|
|
772
|
+
*/
|
|
773
|
+
declare const dictationJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
672
774
|
declare const multipleChoiceJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
673
775
|
/**
|
|
674
776
|
* JSON Schema (Draft 7) representation of the Fill-in-the-Blanks activity data
|
|
@@ -1335,6 +1437,77 @@ declare const RedactedWrittenResponseDataSchema: z.ZodObject<{
|
|
|
1335
1437
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1336
1438
|
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1337
1439
|
}, z.core.$strict>;
|
|
1440
|
+
/** A redacted slow recording: unchanged — it is public, and it never carried captions or a policy. */
|
|
1441
|
+
declare const RedactedDictationSlowMediaSchema: z.ZodObject<{
|
|
1442
|
+
type: z.ZodLiteral<"audio">;
|
|
1443
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1444
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1445
|
+
}, z.core.$strict>;
|
|
1446
|
+
/**
|
|
1447
|
+
* Redacted Dictation data: the recording(s) and the hint mode survive; the
|
|
1448
|
+
* transcript, the accepted alternatives and the tolerance — the whole answer
|
|
1449
|
+
* key — do not. A `progressive-words` hint mode reveals nothing by itself: the
|
|
1450
|
+
* words it would reveal are the transcript, and that is gone.
|
|
1451
|
+
*
|
|
1452
|
+
* Three rules of the content schema are repeated here, because a projection
|
|
1453
|
+
* built by hand never passed through it: captions on the recording ARE the
|
|
1454
|
+
* answer, so a payload carrying them is not learner-safe; a slow recording
|
|
1455
|
+
* beside a play budget is an unbudgeted copy of the budgeted content; and so is
|
|
1456
|
+
* a slow recording with no recording beside it, which in a group sits beside a
|
|
1457
|
+
* stimulus recording that may be budgeted.
|
|
1458
|
+
*/
|
|
1459
|
+
declare const RedactedDictationDataSchema: z.ZodObject<{
|
|
1460
|
+
type: z.ZodLiteral<"dictation">;
|
|
1461
|
+
slowMedia: z.ZodOptional<z.ZodObject<{
|
|
1462
|
+
type: z.ZodLiteral<"audio">;
|
|
1463
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1464
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1465
|
+
}, z.core.$strict>>;
|
|
1466
|
+
hints: z.ZodOptional<z.ZodObject<{
|
|
1467
|
+
mode: z.ZodLiteral<"progressive-words">;
|
|
1468
|
+
}, z.core.$strict>>;
|
|
1469
|
+
/** Marker distinguishing a redacted projection from full activity data. */
|
|
1470
|
+
redacted: z.ZodLiteral<true>;
|
|
1471
|
+
/** Slot identity, carried through redaction so the client and the plan agree. */
|
|
1472
|
+
slotKey: z.ZodOptional<z.ZodString>;
|
|
1473
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
1474
|
+
id: z.ZodString;
|
|
1475
|
+
title: z.ZodString;
|
|
1476
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
1477
|
+
type: z.ZodEnum<{
|
|
1478
|
+
image: "image";
|
|
1479
|
+
audio: "audio";
|
|
1480
|
+
video: "video";
|
|
1481
|
+
embed: "embed";
|
|
1482
|
+
}>;
|
|
1483
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1484
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1485
|
+
captionsUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodString]>>;
|
|
1486
|
+
playback: z.ZodOptional<z.ZodObject<{
|
|
1487
|
+
controls: z.ZodOptional<z.ZodEnum<{
|
|
1488
|
+
native: "native";
|
|
1489
|
+
minimal: "minimal";
|
|
1490
|
+
}>>;
|
|
1491
|
+
maxPlays: z.ZodOptional<z.ZodNumber>;
|
|
1492
|
+
seek: z.ZodOptional<z.ZodEnum<{
|
|
1493
|
+
none: "none";
|
|
1494
|
+
allow: "allow";
|
|
1495
|
+
}>>;
|
|
1496
|
+
rate: z.ZodOptional<z.ZodEnum<{
|
|
1497
|
+
allow: "allow";
|
|
1498
|
+
fixed: "fixed";
|
|
1499
|
+
}>>;
|
|
1500
|
+
nativeControlHints: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1501
|
+
"hide-download": "hide-download";
|
|
1502
|
+
"hide-rate": "hide-rate";
|
|
1503
|
+
}>>>;
|
|
1504
|
+
}, z.core.$strict>>;
|
|
1505
|
+
}, z.core.$strict>>;
|
|
1506
|
+
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
1507
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
1508
|
+
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1509
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1510
|
+
}, z.core.$strict>;
|
|
1338
1511
|
/**
|
|
1339
1512
|
* The learner-safe SHAPE of each built-in type, derived from the strict schema
|
|
1340
1513
|
* above rather than hand-written beside it.
|
|
@@ -1369,6 +1542,10 @@ type RedactedGapSelectBank = z.infer<typeof RedactedGapSelectBankSchema>;
|
|
|
1369
1542
|
type RedactedGapSelectGap = z.infer<typeof RedactedGapSelectGapSchema>;
|
|
1370
1543
|
/** A Gap Select item the learner can still answer: choices intact, answer key gone. */
|
|
1371
1544
|
type RedactedGapSelectData = z.infer<typeof RedactedGapSelectDataSchema>;
|
|
1545
|
+
/** The slower recording of a dictation, unchanged by redaction. */
|
|
1546
|
+
type RedactedDictationSlowMedia = z.infer<typeof RedactedDictationSlowMediaSchema>;
|
|
1547
|
+
/** A Dictation item with its transcript, accepted alternatives and tolerances removed. */
|
|
1548
|
+
type RedactedDictationData = z.infer<typeof RedactedDictationDataSchema>;
|
|
1372
1549
|
/**
|
|
1373
1550
|
* Discriminated union of every built-in redacted activity. Narrow it on
|
|
1374
1551
|
* `type`, exactly as you would {@link ActivityData}:
|
|
@@ -1381,7 +1558,7 @@ type RedactedGapSelectData = z.infer<typeof RedactedGapSelectDataSchema>;
|
|
|
1381
1558
|
* }
|
|
1382
1559
|
* ```
|
|
1383
1560
|
*/
|
|
1384
|
-
type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData | RedactedWrittenResponseData | RedactedGapSelectData;
|
|
1561
|
+
type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData | RedactedWrittenResponseData | RedactedGapSelectData | RedactedDictationData;
|
|
1385
1562
|
|
|
1386
1563
|
/** Zod schema for a single rubric criterion. Loose: unknown keys preserved. */
|
|
1387
1564
|
declare const WrittenResponseRubricCriterionSchema: z.ZodObject<{
|
|
@@ -1478,4 +1655,4 @@ declare const WrittenResponseDataSchema: z.ZodObject<{
|
|
|
1478
1655
|
*/
|
|
1479
1656
|
declare function validateActivity<T extends ActivityType>(type: T, data: unknown): ValidationResult<ActivityDataMap[T]>;
|
|
1480
1657
|
|
|
1481
|
-
export {
|
|
1658
|
+
export { type StimulusKind as $, RedactedGapSelectDataSchema as A, BlankConfigSchema as B, type RedactedGapSelectGap as C, DictationDataSchema as D, RedactedGapSelectGapSchema as E, FeedbackSchema as F, GapSelectBankSchema as G, RedactedItemGroupSchema as H, type ItemGroup as I, RedactedMediaSchema as J, type RedactedMultipleChoiceData as K, RedactedMultipleChoiceDataSchema as L, MediaPlaybackSchema as M, NativeControlHintSchema as N, type RedactedMultipleChoiceOption as O, type RedactedMultipleChoiceOptionMedia as P, RedactedMultipleChoiceOptionMediaSchema as Q, type RedactedActivity as R, RedactedMultipleChoiceOptionSchema as S, type RedactedStimulus as T, RedactedStimulusSchema as U, type RedactedWrittenResponseData as V, RedactedWrittenResponseDataSchema as W, type SequenceEntry as X, type SequenceSlot as Y, type SequenceSlotGroup as Z, type Stimulus as _, DictationEquivalenceSchema as a, StimulusSchema as a0, TextMatchPolicySchema as a1, WrittenResponseDataSchema as a2, WrittenResponseRubricCriterionSchema as a3, WrittenResponseRubricSchema as a4, dictationJsonSchema as a5, fillInTheBlanksJsonSchema as a6, gapSelectJsonSchema as a7, itemGroupJsonSchema as a8, jsonSchemaFor as a9, multipleChoiceJsonSchema as aa, stimulusJsonSchema as ab, validateActivity as ac, validateItemGroup as ad, writtenResponseJsonSchema as ae, DictationSlowMediaSchema as b, DictationToleranceSchema as c, FillInTheBlanksDataSchema as d, GapSelectChoiceSchema as e, GapSelectDataSchema as f, GapSelectGapSchema as g, ItemGroupSchema as h, MediaSchema as i, MediaUrlSchema as j, MultipleChoiceDataSchema as k, MultipleChoiceOptionMediaSchema as l, MultipleChoiceOptionSchema as m, type RedactedBlankConfig as n, RedactedBlankConfigSchema as o, type RedactedDictationData as p, RedactedDictationDataSchema as q, type RedactedDictationSlowMedia as r, RedactedDictationSlowMediaSchema as s, type RedactedFillInTheBlanksData as t, RedactedFillInTheBlanksDataSchema as u, type RedactedGapSelectBank as v, RedactedGapSelectBankSchema as w, type RedactedGapSelectChoice as x, RedactedGapSelectChoiceSchema as y, type RedactedGapSelectData as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ActivityData, c as ActivityMedia,
|
|
1
|
+
import { A as ActivityData, c as ActivityMedia, P as ValidationResult, e as ActivityType, a as ActivityDataMap } from './activity-DfAmJ1sl.js';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
|
|
4
4
|
/** What a stimulus primarily is. Drives validation and layout, never scoring. */
|
|
@@ -134,6 +134,94 @@ interface SequenceSlot<TItem = ActivityData> {
|
|
|
134
134
|
group?: SequenceSlotGroup;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
+
/**
|
|
138
|
+
* Zod schema for the slower second recording of a dictation. Loose like every
|
|
139
|
+
* content schema (a sidecar survives), audio only, and — deliberately — with no
|
|
140
|
+
* `captionsUrl` and no `playback` of its own; the activity-level guards below
|
|
141
|
+
* refuse both if an author writes them anyway.
|
|
142
|
+
*/
|
|
143
|
+
declare const DictationSlowMediaSchema: z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"audio">;
|
|
145
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
146
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$loose>;
|
|
148
|
+
/**
|
|
149
|
+
* Zod schema for one whole-word rewrite rule. Both halves are bounded: `to`
|
|
150
|
+
* because a rule expands text, `from` because it is compiled into the pattern
|
|
151
|
+
* every attempt is searched with.
|
|
152
|
+
*/
|
|
153
|
+
declare const DictationEquivalenceSchema: z.ZodObject<{
|
|
154
|
+
from: z.ZodString;
|
|
155
|
+
to: z.ZodString;
|
|
156
|
+
}, z.core.$loose>;
|
|
157
|
+
/** Zod schema for a dictation's grading tolerances. At most `DICTATION_MAX_EQUIVALENCES` rules. */
|
|
158
|
+
declare const DictationToleranceSchema: z.ZodObject<{
|
|
159
|
+
equivalences: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
160
|
+
from: z.ZodString;
|
|
161
|
+
to: z.ZodString;
|
|
162
|
+
}, z.core.$loose>>>;
|
|
163
|
+
}, z.core.$loose>;
|
|
164
|
+
declare const DictationDataSchema: z.ZodObject<{
|
|
165
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
166
|
+
type: z.ZodLiteral<"dictation">;
|
|
167
|
+
id: z.ZodString;
|
|
168
|
+
title: z.ZodString;
|
|
169
|
+
transcript: z.ZodString;
|
|
170
|
+
acceptedTranscripts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
171
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
172
|
+
type: z.ZodEnum<{
|
|
173
|
+
image: "image";
|
|
174
|
+
audio: "audio";
|
|
175
|
+
video: "video";
|
|
176
|
+
embed: "embed";
|
|
177
|
+
}>;
|
|
178
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
179
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
180
|
+
captionsUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodString]>>;
|
|
181
|
+
playback: z.ZodOptional<z.ZodObject<{
|
|
182
|
+
controls: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
native: "native";
|
|
184
|
+
minimal: "minimal";
|
|
185
|
+
}>>;
|
|
186
|
+
maxPlays: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
seek: z.ZodOptional<z.ZodEnum<{
|
|
188
|
+
none: "none";
|
|
189
|
+
allow: "allow";
|
|
190
|
+
}>>;
|
|
191
|
+
rate: z.ZodOptional<z.ZodEnum<{
|
|
192
|
+
allow: "allow";
|
|
193
|
+
fixed: "fixed";
|
|
194
|
+
}>>;
|
|
195
|
+
nativeControlHints: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
196
|
+
"hide-download": "hide-download";
|
|
197
|
+
"hide-rate": "hide-rate";
|
|
198
|
+
}>>>;
|
|
199
|
+
}, z.core.$strict>>;
|
|
200
|
+
}, z.core.$loose>>;
|
|
201
|
+
slowMedia: z.ZodOptional<z.ZodObject<{
|
|
202
|
+
type: z.ZodLiteral<"audio">;
|
|
203
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
204
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
205
|
+
}, z.core.$loose>>;
|
|
206
|
+
hints: z.ZodOptional<z.ZodObject<{
|
|
207
|
+
mode: z.ZodLiteral<"progressive-words">;
|
|
208
|
+
}, z.core.$loose>>;
|
|
209
|
+
tolerance: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
equivalences: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
211
|
+
from: z.ZodString;
|
|
212
|
+
to: z.ZodString;
|
|
213
|
+
}, z.core.$loose>>>;
|
|
214
|
+
}, z.core.$loose>>;
|
|
215
|
+
feedback: z.ZodOptional<z.ZodObject<{
|
|
216
|
+
correct: z.ZodOptional<z.ZodString>;
|
|
217
|
+
incorrect: z.ZodOptional<z.ZodString>;
|
|
218
|
+
}, z.core.$loose>>;
|
|
219
|
+
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
220
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
221
|
+
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
222
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
223
|
+
}, z.core.$loose>;
|
|
224
|
+
|
|
137
225
|
/**
|
|
138
226
|
* Optional authored "overall feedback" shown after submission, selected by
|
|
139
227
|
* whether the learner passed (h5p-style overall feedback). Both fields are
|
|
@@ -566,7 +654,10 @@ declare const RedactedStimulusSchema: z.ZodObject<{
|
|
|
566
654
|
/**
|
|
567
655
|
* Strict learner-safe item group. Items are left opaque here — each is proven
|
|
568
656
|
* learner-safe by `assertRedacted` against its OWN type's redacted schema,
|
|
569
|
-
* which is the only place that knowledge lives.
|
|
657
|
+
* which is the only place that knowledge lives. The one exception is the one
|
|
658
|
+
* rule that spans the container and an item: a captioned stimulus recording
|
|
659
|
+
* played to a dictation is not learner-safe, because the captions are the
|
|
660
|
+
* dictation's answer.
|
|
570
661
|
*/
|
|
571
662
|
declare const RedactedItemGroupSchema: z.ZodObject<{
|
|
572
663
|
redacted: z.ZodLiteral<true>;
|
|
@@ -669,6 +760,17 @@ declare const itemGroupJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
|
669
760
|
* for the other types.
|
|
670
761
|
*/
|
|
671
762
|
declare const gapSelectJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
763
|
+
/**
|
|
764
|
+
* JSON Schema (Draft 7) representation of the Dictation activity data
|
|
765
|
+
* contract. Structural contract, plus the raw length caps JSON Schema can
|
|
766
|
+
* state in code points as zod counts them — `maxLength` 2000 on a transcript
|
|
767
|
+
* and an accepted transcript, 200 on a rule's `from` and `to`. The twelve
|
|
768
|
+
* semantic guards — a transcript that survives normalisation, the caps after
|
|
769
|
+
* equivalences are applied, distinct candidates, audio only, the
|
|
770
|
+
* slow-recording rules, no captions, no transcript in the title — are
|
|
771
|
+
* Zod-only, as they are for the other types.
|
|
772
|
+
*/
|
|
773
|
+
declare const dictationJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
672
774
|
declare const multipleChoiceJsonSchema: z.core.JSONSchema.JSONSchema;
|
|
673
775
|
/**
|
|
674
776
|
* JSON Schema (Draft 7) representation of the Fill-in-the-Blanks activity data
|
|
@@ -1335,6 +1437,77 @@ declare const RedactedWrittenResponseDataSchema: z.ZodObject<{
|
|
|
1335
1437
|
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1336
1438
|
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1337
1439
|
}, z.core.$strict>;
|
|
1440
|
+
/** A redacted slow recording: unchanged — it is public, and it never carried captions or a policy. */
|
|
1441
|
+
declare const RedactedDictationSlowMediaSchema: z.ZodObject<{
|
|
1442
|
+
type: z.ZodLiteral<"audio">;
|
|
1443
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1444
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1445
|
+
}, z.core.$strict>;
|
|
1446
|
+
/**
|
|
1447
|
+
* Redacted Dictation data: the recording(s) and the hint mode survive; the
|
|
1448
|
+
* transcript, the accepted alternatives and the tolerance — the whole answer
|
|
1449
|
+
* key — do not. A `progressive-words` hint mode reveals nothing by itself: the
|
|
1450
|
+
* words it would reveal are the transcript, and that is gone.
|
|
1451
|
+
*
|
|
1452
|
+
* Three rules of the content schema are repeated here, because a projection
|
|
1453
|
+
* built by hand never passed through it: captions on the recording ARE the
|
|
1454
|
+
* answer, so a payload carrying them is not learner-safe; a slow recording
|
|
1455
|
+
* beside a play budget is an unbudgeted copy of the budgeted content; and so is
|
|
1456
|
+
* a slow recording with no recording beside it, which in a group sits beside a
|
|
1457
|
+
* stimulus recording that may be budgeted.
|
|
1458
|
+
*/
|
|
1459
|
+
declare const RedactedDictationDataSchema: z.ZodObject<{
|
|
1460
|
+
type: z.ZodLiteral<"dictation">;
|
|
1461
|
+
slowMedia: z.ZodOptional<z.ZodObject<{
|
|
1462
|
+
type: z.ZodLiteral<"audio">;
|
|
1463
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1464
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1465
|
+
}, z.core.$strict>>;
|
|
1466
|
+
hints: z.ZodOptional<z.ZodObject<{
|
|
1467
|
+
mode: z.ZodLiteral<"progressive-words">;
|
|
1468
|
+
}, z.core.$strict>>;
|
|
1469
|
+
/** Marker distinguishing a redacted projection from full activity data. */
|
|
1470
|
+
redacted: z.ZodLiteral<true>;
|
|
1471
|
+
/** Slot identity, carried through redaction so the client and the plan agree. */
|
|
1472
|
+
slotKey: z.ZodOptional<z.ZodString>;
|
|
1473
|
+
schemaVersion: z.ZodLiteral<"1.0">;
|
|
1474
|
+
id: z.ZodString;
|
|
1475
|
+
title: z.ZodString;
|
|
1476
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
1477
|
+
type: z.ZodEnum<{
|
|
1478
|
+
image: "image";
|
|
1479
|
+
audio: "audio";
|
|
1480
|
+
video: "video";
|
|
1481
|
+
embed: "embed";
|
|
1482
|
+
}>;
|
|
1483
|
+
url: z.ZodUnion<readonly [z.ZodURL, z.ZodString]>;
|
|
1484
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
1485
|
+
captionsUrl: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodString]>>;
|
|
1486
|
+
playback: z.ZodOptional<z.ZodObject<{
|
|
1487
|
+
controls: z.ZodOptional<z.ZodEnum<{
|
|
1488
|
+
native: "native";
|
|
1489
|
+
minimal: "minimal";
|
|
1490
|
+
}>>;
|
|
1491
|
+
maxPlays: z.ZodOptional<z.ZodNumber>;
|
|
1492
|
+
seek: z.ZodOptional<z.ZodEnum<{
|
|
1493
|
+
none: "none";
|
|
1494
|
+
allow: "allow";
|
|
1495
|
+
}>>;
|
|
1496
|
+
rate: z.ZodOptional<z.ZodEnum<{
|
|
1497
|
+
allow: "allow";
|
|
1498
|
+
fixed: "fixed";
|
|
1499
|
+
}>>;
|
|
1500
|
+
nativeControlHints: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1501
|
+
"hide-download": "hide-download";
|
|
1502
|
+
"hide-rate": "hide-rate";
|
|
1503
|
+
}>>>;
|
|
1504
|
+
}, z.core.$strict>>;
|
|
1505
|
+
}, z.core.$strict>>;
|
|
1506
|
+
passThreshold: z.ZodOptional<z.ZodNumber>;
|
|
1507
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
1508
|
+
learningObjectives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1509
|
+
difficultyLevel: z.ZodOptional<z.ZodLiteral<2 | 1 | 3 | 4 | 5>>;
|
|
1510
|
+
}, z.core.$strict>;
|
|
1338
1511
|
/**
|
|
1339
1512
|
* The learner-safe SHAPE of each built-in type, derived from the strict schema
|
|
1340
1513
|
* above rather than hand-written beside it.
|
|
@@ -1369,6 +1542,10 @@ type RedactedGapSelectBank = z.infer<typeof RedactedGapSelectBankSchema>;
|
|
|
1369
1542
|
type RedactedGapSelectGap = z.infer<typeof RedactedGapSelectGapSchema>;
|
|
1370
1543
|
/** A Gap Select item the learner can still answer: choices intact, answer key gone. */
|
|
1371
1544
|
type RedactedGapSelectData = z.infer<typeof RedactedGapSelectDataSchema>;
|
|
1545
|
+
/** The slower recording of a dictation, unchanged by redaction. */
|
|
1546
|
+
type RedactedDictationSlowMedia = z.infer<typeof RedactedDictationSlowMediaSchema>;
|
|
1547
|
+
/** A Dictation item with its transcript, accepted alternatives and tolerances removed. */
|
|
1548
|
+
type RedactedDictationData = z.infer<typeof RedactedDictationDataSchema>;
|
|
1372
1549
|
/**
|
|
1373
1550
|
* Discriminated union of every built-in redacted activity. Narrow it on
|
|
1374
1551
|
* `type`, exactly as you would {@link ActivityData}:
|
|
@@ -1381,7 +1558,7 @@ type RedactedGapSelectData = z.infer<typeof RedactedGapSelectDataSchema>;
|
|
|
1381
1558
|
* }
|
|
1382
1559
|
* ```
|
|
1383
1560
|
*/
|
|
1384
|
-
type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData | RedactedWrittenResponseData | RedactedGapSelectData;
|
|
1561
|
+
type RedactedActivity = RedactedMultipleChoiceData | RedactedFillInTheBlanksData | RedactedWrittenResponseData | RedactedGapSelectData | RedactedDictationData;
|
|
1385
1562
|
|
|
1386
1563
|
/** Zod schema for a single rubric criterion. Loose: unknown keys preserved. */
|
|
1387
1564
|
declare const WrittenResponseRubricCriterionSchema: z.ZodObject<{
|
|
@@ -1478,4 +1655,4 @@ declare const WrittenResponseDataSchema: z.ZodObject<{
|
|
|
1478
1655
|
*/
|
|
1479
1656
|
declare function validateActivity<T extends ActivityType>(type: T, data: unknown): ValidationResult<ActivityDataMap[T]>;
|
|
1480
1657
|
|
|
1481
|
-
export {
|
|
1658
|
+
export { type StimulusKind as $, RedactedGapSelectDataSchema as A, BlankConfigSchema as B, type RedactedGapSelectGap as C, DictationDataSchema as D, RedactedGapSelectGapSchema as E, FeedbackSchema as F, GapSelectBankSchema as G, RedactedItemGroupSchema as H, type ItemGroup as I, RedactedMediaSchema as J, type RedactedMultipleChoiceData as K, RedactedMultipleChoiceDataSchema as L, MediaPlaybackSchema as M, NativeControlHintSchema as N, type RedactedMultipleChoiceOption as O, type RedactedMultipleChoiceOptionMedia as P, RedactedMultipleChoiceOptionMediaSchema as Q, type RedactedActivity as R, RedactedMultipleChoiceOptionSchema as S, type RedactedStimulus as T, RedactedStimulusSchema as U, type RedactedWrittenResponseData as V, RedactedWrittenResponseDataSchema as W, type SequenceEntry as X, type SequenceSlot as Y, type SequenceSlotGroup as Z, type Stimulus as _, DictationEquivalenceSchema as a, StimulusSchema as a0, TextMatchPolicySchema as a1, WrittenResponseDataSchema as a2, WrittenResponseRubricCriterionSchema as a3, WrittenResponseRubricSchema as a4, dictationJsonSchema as a5, fillInTheBlanksJsonSchema as a6, gapSelectJsonSchema as a7, itemGroupJsonSchema as a8, jsonSchemaFor as a9, multipleChoiceJsonSchema as aa, stimulusJsonSchema as ab, validateActivity as ac, validateItemGroup as ad, writtenResponseJsonSchema as ae, DictationSlowMediaSchema as b, DictationToleranceSchema as c, FillInTheBlanksDataSchema as d, GapSelectChoiceSchema as e, GapSelectDataSchema as f, GapSelectGapSchema as g, ItemGroupSchema as h, MediaSchema as i, MediaUrlSchema as j, MultipleChoiceDataSchema as k, MultipleChoiceOptionMediaSchema as l, MultipleChoiceOptionSchema as m, type RedactedBlankConfig as n, RedactedBlankConfigSchema as o, type RedactedDictationData as p, RedactedDictationDataSchema as q, type RedactedDictationSlowMedia as r, RedactedDictationSlowMediaSchema as s, type RedactedFillInTheBlanksData as t, RedactedFillInTheBlanksDataSchema as u, type RedactedGapSelectBank as v, RedactedGapSelectBankSchema as w, type RedactedGapSelectChoice as x, RedactedGapSelectChoiceSchema as y, type RedactedGapSelectData as z };
|