@pie-element/math-inline 13.0.4-next.20261011174919 → 13.0.4
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/dist/author/configure.d.ts +23 -13
- package/dist/author/configure.js +37 -47
- package/dist/author/defaults.d.ts +60 -58
- package/dist/author/index.d.ts +15 -43
- package/dist/author/index.js +12 -4
- package/dist/author/utils.d.ts +35 -4
- package/dist/browser/author/index.js +19 -23
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +13 -13
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +19 -23
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js +13 -13
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +19 -18
- package/dist/controller/index.d.ts +102 -7
- package/dist/controller/index.js +13 -13
- package/dist/controller/utils.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +385 -0
- package/dist/schemas/model.schema.json +719 -0
- package/dist/schemas/session.schema.json +44 -0
- package/dist/types.d.ts +236 -0
- package/package.json +21 -17
|
@@ -0,0 +1,719 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-inline@13.0.4/dist/schemas/model.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"responseType": {
|
|
7
|
+
"$ref": "#/definitions/MathInlineResponseType",
|
|
8
|
+
"description": "Indicates the mode of the question",
|
|
9
|
+
"default": "Advanced Multi"
|
|
10
|
+
},
|
|
11
|
+
"prompt": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The item stem for the question"
|
|
14
|
+
},
|
|
15
|
+
"promptEnabled": {
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"description": "Determines if prompt should show"
|
|
18
|
+
},
|
|
19
|
+
"expression": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Indicates the expression for advanced mode; each `{{response}}` is a response area"
|
|
22
|
+
},
|
|
23
|
+
"equationEditor": {
|
|
24
|
+
"$ref": "#/definitions/EquationEditor",
|
|
25
|
+
"description": "Indicates what type of editor should be displayed for all the possible responses",
|
|
26
|
+
"default": "8"
|
|
27
|
+
},
|
|
28
|
+
"promptEquationEditor": {
|
|
29
|
+
"$ref": "#/definitions/EquationEditor",
|
|
30
|
+
"description": "Indicates the editor the author uses for the response template in advanced mode",
|
|
31
|
+
"default": "8"
|
|
32
|
+
},
|
|
33
|
+
"feedback": {
|
|
34
|
+
"$ref": "#/definitions/ComplexFeedback",
|
|
35
|
+
"description": "Feedback configuration for the responses"
|
|
36
|
+
},
|
|
37
|
+
"responses": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": {
|
|
40
|
+
"$ref": "#/definitions/MathInlineResponse"
|
|
41
|
+
},
|
|
42
|
+
"description": "Array of all correct responses; if responseType is Simple, only first element in array is used"
|
|
43
|
+
},
|
|
44
|
+
"defaultResponse": {
|
|
45
|
+
"$ref": "#/definitions/MathInlineResponse",
|
|
46
|
+
"description": "Not read by the element: the first of `responses` is the default correct response"
|
|
47
|
+
},
|
|
48
|
+
"partialScoring": {
|
|
49
|
+
"type": "boolean",
|
|
50
|
+
"description": "Not read by the element"
|
|
51
|
+
},
|
|
52
|
+
"validationDefault": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"enum": [
|
|
55
|
+
"literal",
|
|
56
|
+
"symbolic"
|
|
57
|
+
],
|
|
58
|
+
"description": "Indicates the default value for validation, in case that it's not set on a response",
|
|
59
|
+
"default": "literal"
|
|
60
|
+
},
|
|
61
|
+
"ignoreOrderDefault": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"description": "Indicates the default value for ignoreOrder, in case that it's not set",
|
|
64
|
+
"default": false
|
|
65
|
+
},
|
|
66
|
+
"allowTrailingZerosDefault": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"description": "Indicates the default value for allowTrailingZeros, in case that it's not set",
|
|
69
|
+
"default": false
|
|
70
|
+
},
|
|
71
|
+
"rationale": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"description": "Indicates the value for rationale"
|
|
74
|
+
},
|
|
75
|
+
"scoringType": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"enum": [
|
|
78
|
+
"auto",
|
|
79
|
+
"rubric"
|
|
80
|
+
],
|
|
81
|
+
"description": "Indicates scoring type"
|
|
82
|
+
},
|
|
83
|
+
"studentInstructions": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "Not read by the element"
|
|
86
|
+
},
|
|
87
|
+
"teacherInstructions": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"description": "Indicates teacher instructions"
|
|
90
|
+
},
|
|
91
|
+
"customKeys": {
|
|
92
|
+
"type": "array",
|
|
93
|
+
"items": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"description": "Extra buttons defined by user"
|
|
97
|
+
},
|
|
98
|
+
"feedbackEnabled": {
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"description": "Indicates if Feedback is enabled"
|
|
101
|
+
},
|
|
102
|
+
"rationaleEnabled": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"description": "Indicates if Rationale are enabled"
|
|
105
|
+
},
|
|
106
|
+
"spellCheckEnabled": {
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"description": "Indicates if spellcheck is enabled for the author. Default value is true"
|
|
109
|
+
},
|
|
110
|
+
"studentInstructionsEnabled": {
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"description": "Indicates if Student Instructions are enabled"
|
|
113
|
+
},
|
|
114
|
+
"teacherInstructionsEnabled": {
|
|
115
|
+
"type": "boolean",
|
|
116
|
+
"description": "Indicates if Teacher Instructions are enabled"
|
|
117
|
+
},
|
|
118
|
+
"note": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "Indicates the note for the answer; a translated default note applies when it is not set"
|
|
121
|
+
},
|
|
122
|
+
"toolbarEditorPosition": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"enum": [
|
|
125
|
+
"bottom",
|
|
126
|
+
"top"
|
|
127
|
+
],
|
|
128
|
+
"description": "Indicates the editor's toolbar position which can be 'bottom' or 'top'",
|
|
129
|
+
"default": "bottom"
|
|
130
|
+
},
|
|
131
|
+
"rubricEnabled": {
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"description": "Indicates if Rubric is enabled"
|
|
134
|
+
},
|
|
135
|
+
"language": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"description": "Indicates the language of the component Supported options: en, es, en_US, en-US, es_ES, es-ES, es_MX, es-MX"
|
|
138
|
+
},
|
|
139
|
+
"extraCSSRules": {
|
|
140
|
+
"$ref": "#/definitions/ExtraCSSRules",
|
|
141
|
+
"description": "Host-supplied CSS scoped to the element"
|
|
142
|
+
},
|
|
143
|
+
"ignoreOrder": {
|
|
144
|
+
"$ref": "#/definitions/MathInlineToggle",
|
|
145
|
+
"description": "Not read by the element: the settings panel's Ignore Order toggle writes it, and the response editor reads `configuration.ignoreOrder.enabled` instead"
|
|
146
|
+
},
|
|
147
|
+
"allowTrailingZeros": {
|
|
148
|
+
"$ref": "#/definitions/MathInlineToggle",
|
|
149
|
+
"description": "Not read by the element: the settings panel's Allow Trailing Zeros toggle writes it, and the response editor reads `configuration.allowTrailingZeros.enabled` instead"
|
|
150
|
+
},
|
|
151
|
+
"id": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"description": "Identifier to identify the Pie Element in html markup, Must be unique within a pie item config."
|
|
154
|
+
},
|
|
155
|
+
"element": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"description": "The html Element tag name: the key in the item config's `elements` map, e.g. \"multiple-choice\""
|
|
158
|
+
},
|
|
159
|
+
"accessibilityCatalogs": {
|
|
160
|
+
"type": "array",
|
|
161
|
+
"items": {
|
|
162
|
+
"$ref": "#/definitions/AccessibilityCatalog"
|
|
163
|
+
},
|
|
164
|
+
"description": "QTI-aligned accessibility catalogs whose cards dock to content nodes by `data-catalog-idref`"
|
|
165
|
+
},
|
|
166
|
+
"config": {
|
|
167
|
+
"$ref": "#/definitions/MathInlineModelSettings",
|
|
168
|
+
"description": "Not read by the element: the controller's `createDefaultModel()` nests the default model under `config`, as legacy does"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"required": [
|
|
172
|
+
"element",
|
|
173
|
+
"id"
|
|
174
|
+
],
|
|
175
|
+
"description": "Model for the `@pie-element/math-inline`\n\nNOTE: teacherInstructions, studentInstructions, rationale & scoringType functionalities are not defined yet - the value for those can belong to model or to configure (to be moved when the functionality is defined)",
|
|
176
|
+
"definitions": {
|
|
177
|
+
"MathInlineResponseType": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"enum": [
|
|
180
|
+
"Advanced Multi",
|
|
181
|
+
"Simple"
|
|
182
|
+
],
|
|
183
|
+
"description": "Indicates the mode of the question: `Advanced Multi` fills response areas in `expression`, `Simple` takes one answer"
|
|
184
|
+
},
|
|
185
|
+
"EquationEditor": {
|
|
186
|
+
"type": [
|
|
187
|
+
"number",
|
|
188
|
+
"string"
|
|
189
|
+
],
|
|
190
|
+
"enum": [
|
|
191
|
+
1,
|
|
192
|
+
3,
|
|
193
|
+
6,
|
|
194
|
+
8,
|
|
195
|
+
"1",
|
|
196
|
+
"3",
|
|
197
|
+
"6",
|
|
198
|
+
"8",
|
|
199
|
+
"non-negative-integers",
|
|
200
|
+
"integers",
|
|
201
|
+
"decimals",
|
|
202
|
+
"fractions",
|
|
203
|
+
"geometry",
|
|
204
|
+
"advanced-algebra",
|
|
205
|
+
"statistics",
|
|
206
|
+
"item-authoring"
|
|
207
|
+
],
|
|
208
|
+
"description": "Keypad of an equation editor: a grade band, as a number or a numeric string (1 for Grade 1 - 2, 3 for Grade 3 - 5, 6 for Grade 6 - 7, 8 for Grade 8 - HS), or a named keypad"
|
|
209
|
+
},
|
|
210
|
+
"ComplexFeedback": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"properties": {
|
|
213
|
+
"correct": {
|
|
214
|
+
"$ref": "#/definitions/FeedbackLevel",
|
|
215
|
+
"description": "Indicates the configuration for feedback when answer is correct"
|
|
216
|
+
},
|
|
217
|
+
"incorrect": {
|
|
218
|
+
"$ref": "#/definitions/FeedbackLevel",
|
|
219
|
+
"description": "Indicates the configuration for feedback when answer is incorrect"
|
|
220
|
+
},
|
|
221
|
+
"partial": {
|
|
222
|
+
"$ref": "#/definitions/FeedbackLevel",
|
|
223
|
+
"description": "Indicates the configuration for feedback when answer is partially correct"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"required": [
|
|
227
|
+
"correct",
|
|
228
|
+
"incorrect"
|
|
229
|
+
],
|
|
230
|
+
"description": "Feedback per level of correctness"
|
|
231
|
+
},
|
|
232
|
+
"FeedbackLevel": {
|
|
233
|
+
"type": "object",
|
|
234
|
+
"properties": {
|
|
235
|
+
"type": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"enum": [
|
|
238
|
+
"default",
|
|
239
|
+
"custom",
|
|
240
|
+
"none"
|
|
241
|
+
],
|
|
242
|
+
"description": "Indicates the feedback type"
|
|
243
|
+
},
|
|
244
|
+
"default": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "Indicates the feedback value"
|
|
247
|
+
},
|
|
248
|
+
"custom": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"description": "Indicates the feedback custom value"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"required": [
|
|
254
|
+
"type"
|
|
255
|
+
],
|
|
256
|
+
"description": "Feedback for one level of correctness"
|
|
257
|
+
},
|
|
258
|
+
"MathInlineResponse": {
|
|
259
|
+
"type": "object",
|
|
260
|
+
"properties": {
|
|
261
|
+
"id": {
|
|
262
|
+
"type": [
|
|
263
|
+
"number",
|
|
264
|
+
"string"
|
|
265
|
+
],
|
|
266
|
+
"description": "The id of the response"
|
|
267
|
+
},
|
|
268
|
+
"validation": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"enum": [
|
|
271
|
+
"literal",
|
|
272
|
+
"symbolic"
|
|
273
|
+
],
|
|
274
|
+
"description": "Indicates what type of validation should be applied on the response; the model's `validationDefault` applies when it is not set"
|
|
275
|
+
},
|
|
276
|
+
"ignoreOrder": {
|
|
277
|
+
"type": "boolean",
|
|
278
|
+
"description": "Indicates if the order of expression elements in literal validation can be ignore - whilst the expression is still mathematically correct; the model's `ignoreOrderDefault` applies when it is not set"
|
|
279
|
+
},
|
|
280
|
+
"allowTrailingZeros": {
|
|
281
|
+
"type": "boolean",
|
|
282
|
+
"description": "Indicates the allowance of trailing zeros in expressions - whilst the expression is still mathematically correct; the model's `allowTrailingZerosDefault` applies when it is not set"
|
|
283
|
+
},
|
|
284
|
+
"answer": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"description": "The answer for the question"
|
|
287
|
+
},
|
|
288
|
+
"alternates": {
|
|
289
|
+
"type": "object",
|
|
290
|
+
"additionalProperties": {
|
|
291
|
+
"type": "string"
|
|
292
|
+
},
|
|
293
|
+
"description": "Alternative correct answers, keyed by alternate id"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"required": [
|
|
297
|
+
"id",
|
|
298
|
+
"answer"
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
"ExtraCSSRules": {
|
|
302
|
+
"type": "object",
|
|
303
|
+
"properties": {
|
|
304
|
+
"names": {
|
|
305
|
+
"type": "array",
|
|
306
|
+
"items": {
|
|
307
|
+
"type": "string"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"rules": {
|
|
311
|
+
"type": "string"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"description": "Host-supplied CSS scoped to the element: `rules` is a stylesheet whose class names are listed in `names`."
|
|
315
|
+
},
|
|
316
|
+
"MathInlineToggle": {
|
|
317
|
+
"type": "object",
|
|
318
|
+
"properties": {
|
|
319
|
+
"enabled": {
|
|
320
|
+
"type": "boolean"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"description": "A settings-panel toggle the author writes into the model"
|
|
324
|
+
},
|
|
325
|
+
"AccessibilityCatalog": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"properties": {
|
|
328
|
+
"identifier": {
|
|
329
|
+
"type": "string"
|
|
330
|
+
},
|
|
331
|
+
"cards": {
|
|
332
|
+
"type": "array",
|
|
333
|
+
"items": {
|
|
334
|
+
"$ref": "#/definitions/CatalogCard"
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"required": [
|
|
339
|
+
"identifier",
|
|
340
|
+
"cards"
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
"CatalogCard": {
|
|
344
|
+
"type": "object",
|
|
345
|
+
"properties": {
|
|
346
|
+
"catalog": {
|
|
347
|
+
"type": "string"
|
|
348
|
+
},
|
|
349
|
+
"language": {
|
|
350
|
+
"type": "string"
|
|
351
|
+
},
|
|
352
|
+
"content": {
|
|
353
|
+
"type": "string"
|
|
354
|
+
},
|
|
355
|
+
"payload": {
|
|
356
|
+
"$ref": "#/definitions/CatalogCardPayload"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"required": [
|
|
360
|
+
"catalog"
|
|
361
|
+
],
|
|
362
|
+
"description": "QTI-aligned accessibility catalog entry: one alternate representation of a content node, docked to it by `data-catalog-idref`.\n\nMaps onto QTI 3's `qti-card`. `catalog` is QTI's `@support` and is the only discriminant — there is deliberately no second `kind` field. `language` is the card entry's `xml:lang`. QTI's single content slot is represented by exactly one of two fields, never both, with nothing mirrored between them:\n\n- `content` — the string form, for alternates a string can express: SSML for `spoken`, plain text for `simplified-language`.\n- `payload` — the structured form, for what a string cannot express. Today only a signing video.\n\nOne generic payload slot rather than a field per accommodation (`signLanguage`, `braille`, …), which is the shape pie-players canonicalises and the shape this repo now follows. A field per accommodation makes every new structured alternate a breaking widening of this type in every consumer that reads cards, and it gives the same fact two names across repos — which produced a real bug: a card carrying `signLanguage` rendered its video in the player and was simultaneously reported as carrying no payload by the player's \"what alternates exist\" path, because only one of the two read paths knew about the alias.\n\n`catalog` is a bare `string` because the vocabulary is open-ended and unknown tokens must be ignored rather than rejected. TypeScript therefore cannot express \"a `sign-language` card must carry a payload\", so a `{ catalog: 'sign-language', content: '<url>' }` object still satisfies this type. That legacy bare-URL form is not supported: runtime validation on the consuming side must reject it rather than render the URL as visible text. Narrow with `isSignLanguageCard`."
|
|
363
|
+
},
|
|
364
|
+
"CatalogCardPayload": {
|
|
365
|
+
"anyOf": [
|
|
366
|
+
{
|
|
367
|
+
"$ref": "#/definitions/SignLanguageCardPayload"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"$ref": "#/definitions/SpokenAudioCardPayload"
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
"description": "The structured forms a card's `payload` may take.\n\nWhich one applies is decided by the card's `catalog`, so this union carries no discriminant of its own — a second discriminant could contradict the first. Consumers select a card by catalog type and then validate the payload structurally, which they must do regardless: catalog data is authored, wire-facing and untrusted."
|
|
374
|
+
},
|
|
375
|
+
"SignLanguageCardPayload": {
|
|
376
|
+
"type": "object",
|
|
377
|
+
"properties": {
|
|
378
|
+
"signLang": {
|
|
379
|
+
"type": "string",
|
|
380
|
+
"description": "Language tag for the signed translation — BCP 47, which admits ISO 639-3 subtags for languages with no 639-1/2 code. \"ase\" is ASL, matching QTI 3 `xml:lang`.\n\nThis is the language of the *adaptation*, not the item's base content language (AfA/PNP's `languageOfAdaptation`). The distinction is load bearing: a Spanish item's signed alternate is LSM, not ASL, so `signLang` must never be inferred from the item or assessment content language.\n\nOptional, and redundant on almost every card. The card's `language` states the same code and is the only field pie-players resolves a card on — resolution runs before anything knows the card is a signing card, so it can only key on the generic field — and the player falls back to it when this is absent. Author it only where the two differ: a card tagged with the item's content language (`language: 'en-US'`, `signLang: 'ase'`) so resolution reaches it by the default-language rung. The pie-api-aws importer emits `language` alone."
|
|
381
|
+
},
|
|
382
|
+
"media": {
|
|
383
|
+
"$ref": "#/definitions/MediaAssetRef"
|
|
384
|
+
},
|
|
385
|
+
"fragment": {
|
|
386
|
+
"$ref": "#/definitions/MediaFragmentRange"
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"required": [
|
|
390
|
+
"media"
|
|
391
|
+
],
|
|
392
|
+
"description": "Payload for a `sign-language` catalog card: a signed translation of the content node the card is docked to."
|
|
393
|
+
},
|
|
394
|
+
"MediaAssetRef": {
|
|
395
|
+
"type": "object",
|
|
396
|
+
"properties": {
|
|
397
|
+
"version": {
|
|
398
|
+
"type": "number",
|
|
399
|
+
"const": 1
|
|
400
|
+
},
|
|
401
|
+
"id": {
|
|
402
|
+
"type": "string"
|
|
403
|
+
},
|
|
404
|
+
"kind": {
|
|
405
|
+
"$ref": "#/definitions/MediaKind"
|
|
406
|
+
},
|
|
407
|
+
"sources": {
|
|
408
|
+
"type": "array",
|
|
409
|
+
"items": {
|
|
410
|
+
"$ref": "#/definitions/MediaSource"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"poster": {
|
|
414
|
+
"type": "string"
|
|
415
|
+
},
|
|
416
|
+
"thumbnail": {
|
|
417
|
+
"type": "string"
|
|
418
|
+
},
|
|
419
|
+
"durationSeconds": {
|
|
420
|
+
"type": "number"
|
|
421
|
+
},
|
|
422
|
+
"tracks": {
|
|
423
|
+
"type": "array",
|
|
424
|
+
"items": {
|
|
425
|
+
"$ref": "#/definitions/TextTrackRef"
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
"transcript": {
|
|
429
|
+
"$ref": "#/definitions/TranscriptRef"
|
|
430
|
+
},
|
|
431
|
+
"label": {
|
|
432
|
+
"type": "string"
|
|
433
|
+
},
|
|
434
|
+
"description": {
|
|
435
|
+
"type": "string"
|
|
436
|
+
},
|
|
437
|
+
"lang": {
|
|
438
|
+
"type": "string",
|
|
439
|
+
"description": "Language of the asset itself, as authored metadata. Sign-language cards leave it unset: the card's `language` already states the adaptation language, and a second copy is a second thing to keep in agreement."
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"required": [
|
|
443
|
+
"version",
|
|
444
|
+
"id",
|
|
445
|
+
"kind",
|
|
446
|
+
"sources"
|
|
447
|
+
],
|
|
448
|
+
"description": "Reference to a media asset and its playable encodings.\n\nStructurally mirrors the `MediaAssetRef` in the pie-players `media-asset-contract` PRD. The two definitions are deliberately kept as separate declarations rather than a shared package dependency: this repo owns the item-model side of the contract, pie-players owns the player side, and both read the same authored JSON, so structural typing is sufficient for interop. Fixture parity — not a package edge — is what pins them together.\n\nSign-language catalog cards were the first consumer and use only the core source fields. The optional presentation, track, and transcript metadata is declared for broader consumers such as video stimuli; it remains meaningless for a signing clip, where captions would duplicate the text already on screen."
|
|
449
|
+
},
|
|
450
|
+
"MediaKind": {
|
|
451
|
+
"type": "string",
|
|
452
|
+
"enum": [
|
|
453
|
+
"image",
|
|
454
|
+
"audio",
|
|
455
|
+
"video",
|
|
456
|
+
"other"
|
|
457
|
+
]
|
|
458
|
+
},
|
|
459
|
+
"MediaSource": {
|
|
460
|
+
"type": "object",
|
|
461
|
+
"properties": {
|
|
462
|
+
"src": {
|
|
463
|
+
"type": "string"
|
|
464
|
+
},
|
|
465
|
+
"type": {
|
|
466
|
+
"type": "string",
|
|
467
|
+
"description": "MIME type, e.g. \"video/mp4\"."
|
|
468
|
+
},
|
|
469
|
+
"width": {
|
|
470
|
+
"type": "number"
|
|
471
|
+
},
|
|
472
|
+
"height": {
|
|
473
|
+
"type": "number"
|
|
474
|
+
},
|
|
475
|
+
"bitrate": {
|
|
476
|
+
"type": "number"
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"required": [
|
|
480
|
+
"src"
|
|
481
|
+
],
|
|
482
|
+
"description": "One playable encoding of a media asset."
|
|
483
|
+
},
|
|
484
|
+
"TextTrackRef": {
|
|
485
|
+
"type": "object",
|
|
486
|
+
"properties": {
|
|
487
|
+
"src": {
|
|
488
|
+
"type": "string"
|
|
489
|
+
},
|
|
490
|
+
"kind": {
|
|
491
|
+
"type": "string",
|
|
492
|
+
"enum": [
|
|
493
|
+
"captions",
|
|
494
|
+
"subtitles",
|
|
495
|
+
"descriptions",
|
|
496
|
+
"chapters",
|
|
497
|
+
"metadata"
|
|
498
|
+
]
|
|
499
|
+
},
|
|
500
|
+
"lang": {
|
|
501
|
+
"type": "string"
|
|
502
|
+
},
|
|
503
|
+
"label": {
|
|
504
|
+
"type": "string"
|
|
505
|
+
},
|
|
506
|
+
"default": {
|
|
507
|
+
"type": "boolean"
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"required": [
|
|
511
|
+
"src",
|
|
512
|
+
"kind",
|
|
513
|
+
"lang",
|
|
514
|
+
"label"
|
|
515
|
+
],
|
|
516
|
+
"description": "One authored text track associated with an audio or video asset."
|
|
517
|
+
},
|
|
518
|
+
"TranscriptRef": {
|
|
519
|
+
"type": "object",
|
|
520
|
+
"properties": {
|
|
521
|
+
"src": {
|
|
522
|
+
"type": "string"
|
|
523
|
+
},
|
|
524
|
+
"html": {
|
|
525
|
+
"type": "string"
|
|
526
|
+
},
|
|
527
|
+
"plainText": {
|
|
528
|
+
"type": "string"
|
|
529
|
+
},
|
|
530
|
+
"lang": {
|
|
531
|
+
"type": "string"
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"description": "Inline or externally hosted transcript content for a media asset."
|
|
535
|
+
},
|
|
536
|
+
"MediaFragmentRange": {
|
|
537
|
+
"type": "object",
|
|
538
|
+
"properties": {
|
|
539
|
+
"startSeconds": {
|
|
540
|
+
"type": "number"
|
|
541
|
+
},
|
|
542
|
+
"endSeconds": {
|
|
543
|
+
"type": "number"
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
"required": [
|
|
547
|
+
"startSeconds"
|
|
548
|
+
],
|
|
549
|
+
"description": "A time slice within a media asset, so one recording can serve several content nodes. Mirrors QTI 3's Media Fragments URI usage."
|
|
550
|
+
},
|
|
551
|
+
"SpokenAudioCardPayload": {
|
|
552
|
+
"type": "object",
|
|
553
|
+
"properties": {
|
|
554
|
+
"media": {
|
|
555
|
+
"$ref": "#/definitions/MediaAssetRef"
|
|
556
|
+
},
|
|
557
|
+
"fragment": {
|
|
558
|
+
"$ref": "#/definitions/MediaFragmentRange"
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
"required": [
|
|
562
|
+
"media"
|
|
563
|
+
],
|
|
564
|
+
"description": "Payload for a `spoken` catalog card that is a recording rather than a script.\n\nQTI 3 treats recorded audio and synthesized speech as the same support: both are `spoken`, so this is not a new accommodation, it is the other form the existing one can take. A node commonly carries both this and a `content` card in the same language — the script is both what the audio was generated from and the fallback for when the audio cannot play; pie-players resolves between them with `CatalogLookupOptions.form`.\n\nNo `kind` discriminant, for the same reason `SignLanguageCardPayload` has none: the card's `catalog` already says what this is."
|
|
565
|
+
},
|
|
566
|
+
"MathInlineModelSettings": {
|
|
567
|
+
"type": "object",
|
|
568
|
+
"properties": {
|
|
569
|
+
"responseType": {
|
|
570
|
+
"$ref": "#/definitions/MathInlineResponseType",
|
|
571
|
+
"description": "Indicates the mode of the question",
|
|
572
|
+
"default": "Advanced Multi"
|
|
573
|
+
},
|
|
574
|
+
"prompt": {
|
|
575
|
+
"type": "string",
|
|
576
|
+
"description": "The item stem for the question"
|
|
577
|
+
},
|
|
578
|
+
"promptEnabled": {
|
|
579
|
+
"type": "boolean",
|
|
580
|
+
"description": "Determines if prompt should show"
|
|
581
|
+
},
|
|
582
|
+
"expression": {
|
|
583
|
+
"type": "string",
|
|
584
|
+
"description": "Indicates the expression for advanced mode; each `{{response}}` is a response area"
|
|
585
|
+
},
|
|
586
|
+
"equationEditor": {
|
|
587
|
+
"$ref": "#/definitions/EquationEditor",
|
|
588
|
+
"description": "Indicates what type of editor should be displayed for all the possible responses",
|
|
589
|
+
"default": "8"
|
|
590
|
+
},
|
|
591
|
+
"promptEquationEditor": {
|
|
592
|
+
"$ref": "#/definitions/EquationEditor",
|
|
593
|
+
"description": "Indicates the editor the author uses for the response template in advanced mode",
|
|
594
|
+
"default": "8"
|
|
595
|
+
},
|
|
596
|
+
"feedback": {
|
|
597
|
+
"$ref": "#/definitions/ComplexFeedback",
|
|
598
|
+
"description": "Feedback configuration for the responses"
|
|
599
|
+
},
|
|
600
|
+
"responses": {
|
|
601
|
+
"type": "array",
|
|
602
|
+
"items": {
|
|
603
|
+
"$ref": "#/definitions/MathInlineResponse"
|
|
604
|
+
},
|
|
605
|
+
"description": "Array of all correct responses; if responseType is Simple, only first element in array is used"
|
|
606
|
+
},
|
|
607
|
+
"defaultResponse": {
|
|
608
|
+
"$ref": "#/definitions/MathInlineResponse",
|
|
609
|
+
"description": "Not read by the element: the first of `responses` is the default correct response"
|
|
610
|
+
},
|
|
611
|
+
"partialScoring": {
|
|
612
|
+
"type": "boolean",
|
|
613
|
+
"description": "Not read by the element"
|
|
614
|
+
},
|
|
615
|
+
"validationDefault": {
|
|
616
|
+
"type": "string",
|
|
617
|
+
"enum": [
|
|
618
|
+
"literal",
|
|
619
|
+
"symbolic"
|
|
620
|
+
],
|
|
621
|
+
"description": "Indicates the default value for validation, in case that it's not set on a response",
|
|
622
|
+
"default": "literal"
|
|
623
|
+
},
|
|
624
|
+
"ignoreOrderDefault": {
|
|
625
|
+
"type": "boolean",
|
|
626
|
+
"description": "Indicates the default value for ignoreOrder, in case that it's not set",
|
|
627
|
+
"default": false
|
|
628
|
+
},
|
|
629
|
+
"allowTrailingZerosDefault": {
|
|
630
|
+
"type": "boolean",
|
|
631
|
+
"description": "Indicates the default value for allowTrailingZeros, in case that it's not set",
|
|
632
|
+
"default": false
|
|
633
|
+
},
|
|
634
|
+
"rationale": {
|
|
635
|
+
"type": "string",
|
|
636
|
+
"description": "Indicates the value for rationale"
|
|
637
|
+
},
|
|
638
|
+
"scoringType": {
|
|
639
|
+
"type": "string",
|
|
640
|
+
"enum": [
|
|
641
|
+
"auto",
|
|
642
|
+
"rubric"
|
|
643
|
+
],
|
|
644
|
+
"description": "Indicates scoring type"
|
|
645
|
+
},
|
|
646
|
+
"studentInstructions": {
|
|
647
|
+
"type": "string",
|
|
648
|
+
"description": "Not read by the element"
|
|
649
|
+
},
|
|
650
|
+
"teacherInstructions": {
|
|
651
|
+
"type": "string",
|
|
652
|
+
"description": "Indicates teacher instructions"
|
|
653
|
+
},
|
|
654
|
+
"customKeys": {
|
|
655
|
+
"type": "array",
|
|
656
|
+
"items": {
|
|
657
|
+
"type": "string"
|
|
658
|
+
},
|
|
659
|
+
"description": "Extra buttons defined by user"
|
|
660
|
+
},
|
|
661
|
+
"feedbackEnabled": {
|
|
662
|
+
"type": "boolean",
|
|
663
|
+
"description": "Indicates if Feedback is enabled"
|
|
664
|
+
},
|
|
665
|
+
"rationaleEnabled": {
|
|
666
|
+
"type": "boolean",
|
|
667
|
+
"description": "Indicates if Rationale are enabled"
|
|
668
|
+
},
|
|
669
|
+
"spellCheckEnabled": {
|
|
670
|
+
"type": "boolean",
|
|
671
|
+
"description": "Indicates if spellcheck is enabled for the author. Default value is true"
|
|
672
|
+
},
|
|
673
|
+
"studentInstructionsEnabled": {
|
|
674
|
+
"type": "boolean",
|
|
675
|
+
"description": "Indicates if Student Instructions are enabled"
|
|
676
|
+
},
|
|
677
|
+
"teacherInstructionsEnabled": {
|
|
678
|
+
"type": "boolean",
|
|
679
|
+
"description": "Indicates if Teacher Instructions are enabled"
|
|
680
|
+
},
|
|
681
|
+
"note": {
|
|
682
|
+
"type": "string",
|
|
683
|
+
"description": "Indicates the note for the answer; a translated default note applies when it is not set"
|
|
684
|
+
},
|
|
685
|
+
"toolbarEditorPosition": {
|
|
686
|
+
"type": "string",
|
|
687
|
+
"enum": [
|
|
688
|
+
"bottom",
|
|
689
|
+
"top"
|
|
690
|
+
],
|
|
691
|
+
"description": "Indicates the editor's toolbar position which can be 'bottom' or 'top'",
|
|
692
|
+
"default": "bottom"
|
|
693
|
+
},
|
|
694
|
+
"rubricEnabled": {
|
|
695
|
+
"type": "boolean",
|
|
696
|
+
"description": "Indicates if Rubric is enabled"
|
|
697
|
+
},
|
|
698
|
+
"language": {
|
|
699
|
+
"type": "string",
|
|
700
|
+
"description": "Indicates the language of the component Supported options: en, es, en_US, en-US, es_ES, es-ES, es_MX, es-MX"
|
|
701
|
+
},
|
|
702
|
+
"extraCSSRules": {
|
|
703
|
+
"$ref": "#/definitions/ExtraCSSRules",
|
|
704
|
+
"description": "Host-supplied CSS scoped to the element"
|
|
705
|
+
},
|
|
706
|
+
"ignoreOrder": {
|
|
707
|
+
"$ref": "#/definitions/MathInlineToggle",
|
|
708
|
+
"description": "Not read by the element: the settings panel's Ignore Order toggle writes it, and the response editor reads `configuration.ignoreOrder.enabled` instead"
|
|
709
|
+
},
|
|
710
|
+
"allowTrailingZeros": {
|
|
711
|
+
"$ref": "#/definitions/MathInlineToggle",
|
|
712
|
+
"description": "Not read by the element: the settings panel's Allow Trailing Zeros toggle writes it, and the response editor reads `configuration.allowTrailingZeros.enabled` instead"
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
"description": "The authored settings of a math-inline model: every model key besides `id`, `element` and `config`"
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
"additionalProperties": false
|
|
719
|
+
}
|