@pie-element/graphing 11.0.4-next.20261011174919 → 11.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 +84 -93
- package/dist/author/correct-response.d.ts +2 -0
- package/dist/author/correct-response.js +2 -0
- package/dist/author/defaults.d.ts +196 -80
- package/dist/author/graphing-config.d.ts +2 -0
- package/dist/author/graphing-config.js +2 -0
- package/dist/author/index.d.ts +18 -46
- package/dist/author/index.js +7 -2
- package/dist/browser/author/index.js +17 -19
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +125 -135
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +17 -19
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js +125 -135
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +18 -17
- package/dist/controller/index.d.ts +56 -16
- package/dist/controller/index.js +23 -20
- package/dist/controller/utils.d.ts +24 -28
- package/dist/controller/utils.js +77 -90
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +757 -0
- package/dist/schemas/model.schema.json +702 -0
- package/dist/schemas/session.schema.json +127 -0
- package/dist/types.d.ts +346 -0
- package/package.json +20 -16
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/graphing@11.0.4/dist/schemas/model.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Identifier to identify the Pie Element in html markup, Must be unique within a pie item config."
|
|
9
|
+
},
|
|
10
|
+
"element": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The html Element tag name: the key in the item config's `elements` map, e.g. \"multiple-choice\""
|
|
13
|
+
},
|
|
14
|
+
"accessibilityCatalogs": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"$ref": "#/definitions/AccessibilityCatalog"
|
|
18
|
+
},
|
|
19
|
+
"description": "QTI-aligned accessibility catalogs whose cards dock to content nodes by `data-catalog-idref`"
|
|
20
|
+
},
|
|
21
|
+
"answers": {
|
|
22
|
+
"$ref": "#/definitions/GraphingAnswers",
|
|
23
|
+
"description": "Indicates marks that are set as answers; alternates are keyed `alternate<N>`"
|
|
24
|
+
},
|
|
25
|
+
"arrows": {
|
|
26
|
+
"anyOf": [
|
|
27
|
+
{
|
|
28
|
+
"$ref": "#/definitions/Arrows"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "boolean"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"description": "Indicates if arrows are enabled; a boolean sets all four arrows (older models)"
|
|
35
|
+
},
|
|
36
|
+
"backgroundMarks": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"items": {
|
|
39
|
+
"$ref": "#/definitions/Mark"
|
|
40
|
+
},
|
|
41
|
+
"description": "Indicates marks that have to be displayed in background"
|
|
42
|
+
},
|
|
43
|
+
"coordinatesOnHover": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"description": "Indicates if coordinates of a point are displayed on hover",
|
|
46
|
+
"default": false
|
|
47
|
+
},
|
|
48
|
+
"defaultGridConfiguration": {
|
|
49
|
+
"type": "number",
|
|
50
|
+
"description": "Indicates the default grid configuration: an index into the configuration's `gridConfigurations`",
|
|
51
|
+
"default": 0,
|
|
52
|
+
"minimum": 0
|
|
53
|
+
},
|
|
54
|
+
"defaultTool": {
|
|
55
|
+
"anyOf": [
|
|
56
|
+
{
|
|
57
|
+
"$ref": "#/definitions/MarkType"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"type": "string",
|
|
61
|
+
"const": ""
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"description": "Indicates the default selected tool for the graph; empty means the first toolbar tool"
|
|
65
|
+
},
|
|
66
|
+
"dimensionsEnabled": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"description": "Indicates if the graph dimensions are displayed"
|
|
69
|
+
},
|
|
70
|
+
"domain": {
|
|
71
|
+
"$ref": "#/definitions/GraphSettings",
|
|
72
|
+
"description": "Indicates domain settings for the graph"
|
|
73
|
+
},
|
|
74
|
+
"extraCSSRules": {
|
|
75
|
+
"$ref": "#/definitions/ExtraCSSRules",
|
|
76
|
+
"description": "Host-supplied CSS scoped to the element"
|
|
77
|
+
},
|
|
78
|
+
"graph": {
|
|
79
|
+
"$ref": "#/definitions/Graph",
|
|
80
|
+
"description": "Indicates the graph line model"
|
|
81
|
+
},
|
|
82
|
+
"includeAxes": {
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"description": "Indicates if the graph axes and labels are enabled",
|
|
85
|
+
"default": true
|
|
86
|
+
},
|
|
87
|
+
"label": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"description": "Not read: the author copies it from the selected grid configuration."
|
|
90
|
+
},
|
|
91
|
+
"labels": {
|
|
92
|
+
"$ref": "#/definitions/Labels",
|
|
93
|
+
"description": "Indicates labels"
|
|
94
|
+
},
|
|
95
|
+
"labelsEnabled": {
|
|
96
|
+
"type": "boolean",
|
|
97
|
+
"description": "Indicates if the graph labels are displayed",
|
|
98
|
+
"default": true
|
|
99
|
+
},
|
|
100
|
+
"language": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"description": "Indicates the language of the component Supported options: en, es, en_US, en-US, es_ES, es-ES, es_MX, es-MX"
|
|
103
|
+
},
|
|
104
|
+
"padding": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"description": "Not read by this element; the author's padding toggle writes it."
|
|
107
|
+
},
|
|
108
|
+
"prompt": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "Indicates prompt value"
|
|
111
|
+
},
|
|
112
|
+
"promptEnabled": {
|
|
113
|
+
"type": "boolean",
|
|
114
|
+
"description": "Indicates if the prompt is enabled",
|
|
115
|
+
"default": true
|
|
116
|
+
},
|
|
117
|
+
"range": {
|
|
118
|
+
"$ref": "#/definitions/GraphSettings",
|
|
119
|
+
"description": "Indicates range settings for the graph"
|
|
120
|
+
},
|
|
121
|
+
"rationale": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"description": "Indicates rationale for the answer"
|
|
124
|
+
},
|
|
125
|
+
"rationaleEnabled": {
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"description": "Indicates if Rationale are enabled",
|
|
128
|
+
"default": true
|
|
129
|
+
},
|
|
130
|
+
"rubricEnabled": {
|
|
131
|
+
"type": "boolean",
|
|
132
|
+
"description": "Indicates if Rubric is enabled"
|
|
133
|
+
},
|
|
134
|
+
"scoringType": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"enum": [
|
|
137
|
+
"dichotomous",
|
|
138
|
+
"partial scoring"
|
|
139
|
+
],
|
|
140
|
+
"description": "Indicates scoring type"
|
|
141
|
+
},
|
|
142
|
+
"spellCheckEnabled": {
|
|
143
|
+
"type": "boolean",
|
|
144
|
+
"description": "Indicates if spellcheck is enabled for the author. Default value is true"
|
|
145
|
+
},
|
|
146
|
+
"standardGrid": {
|
|
147
|
+
"type": "boolean",
|
|
148
|
+
"description": "Indicates if some domain values will be synched to the range values",
|
|
149
|
+
"default": false
|
|
150
|
+
},
|
|
151
|
+
"studentInstructions": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"description": "Not read by this element."
|
|
154
|
+
},
|
|
155
|
+
"studentInstructionsEnabled": {
|
|
156
|
+
"type": "boolean",
|
|
157
|
+
"description": "Indicates if Student Instructions are enabled",
|
|
158
|
+
"default": true
|
|
159
|
+
},
|
|
160
|
+
"teacherInstructions": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"description": "Indicates teacher instructions"
|
|
163
|
+
},
|
|
164
|
+
"teacherInstructionsEnabled": {
|
|
165
|
+
"type": "boolean",
|
|
166
|
+
"description": "Indicates if Teacher Instructions are enabled",
|
|
167
|
+
"default": true
|
|
168
|
+
},
|
|
169
|
+
"title": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"description": "Indicates graph title"
|
|
172
|
+
},
|
|
173
|
+
"titleEnabled": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"description": "Indicates if the graph title is displayed",
|
|
176
|
+
"default": true
|
|
177
|
+
},
|
|
178
|
+
"toolbarTools": {
|
|
179
|
+
"type": "array",
|
|
180
|
+
"items": {
|
|
181
|
+
"$ref": "#/definitions/GraphingTool"
|
|
182
|
+
},
|
|
183
|
+
"description": "Indicates the tools that have to be displayed in toolbar"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"required": [
|
|
187
|
+
"answers",
|
|
188
|
+
"element",
|
|
189
|
+
"id"
|
|
190
|
+
],
|
|
191
|
+
"description": "Model for the Graphing Interaction",
|
|
192
|
+
"definitions": {
|
|
193
|
+
"AccessibilityCatalog": {
|
|
194
|
+
"type": "object",
|
|
195
|
+
"properties": {
|
|
196
|
+
"identifier": {
|
|
197
|
+
"type": "string"
|
|
198
|
+
},
|
|
199
|
+
"cards": {
|
|
200
|
+
"type": "array",
|
|
201
|
+
"items": {
|
|
202
|
+
"$ref": "#/definitions/CatalogCard"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"required": [
|
|
207
|
+
"identifier",
|
|
208
|
+
"cards"
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
"CatalogCard": {
|
|
212
|
+
"type": "object",
|
|
213
|
+
"properties": {
|
|
214
|
+
"catalog": {
|
|
215
|
+
"type": "string"
|
|
216
|
+
},
|
|
217
|
+
"language": {
|
|
218
|
+
"type": "string"
|
|
219
|
+
},
|
|
220
|
+
"content": {
|
|
221
|
+
"type": "string"
|
|
222
|
+
},
|
|
223
|
+
"payload": {
|
|
224
|
+
"$ref": "#/definitions/CatalogCardPayload"
|
|
225
|
+
}
|
|
226
|
+
},
|
|
227
|
+
"required": [
|
|
228
|
+
"catalog"
|
|
229
|
+
],
|
|
230
|
+
"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`."
|
|
231
|
+
},
|
|
232
|
+
"CatalogCardPayload": {
|
|
233
|
+
"anyOf": [
|
|
234
|
+
{
|
|
235
|
+
"$ref": "#/definitions/SignLanguageCardPayload"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"$ref": "#/definitions/SpokenAudioCardPayload"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"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."
|
|
242
|
+
},
|
|
243
|
+
"SignLanguageCardPayload": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"properties": {
|
|
246
|
+
"signLang": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"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."
|
|
249
|
+
},
|
|
250
|
+
"media": {
|
|
251
|
+
"$ref": "#/definitions/MediaAssetRef"
|
|
252
|
+
},
|
|
253
|
+
"fragment": {
|
|
254
|
+
"$ref": "#/definitions/MediaFragmentRange"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"required": [
|
|
258
|
+
"media"
|
|
259
|
+
],
|
|
260
|
+
"description": "Payload for a `sign-language` catalog card: a signed translation of the content node the card is docked to."
|
|
261
|
+
},
|
|
262
|
+
"MediaAssetRef": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"properties": {
|
|
265
|
+
"version": {
|
|
266
|
+
"type": "number",
|
|
267
|
+
"const": 1
|
|
268
|
+
},
|
|
269
|
+
"id": {
|
|
270
|
+
"type": "string"
|
|
271
|
+
},
|
|
272
|
+
"kind": {
|
|
273
|
+
"$ref": "#/definitions/MediaKind"
|
|
274
|
+
},
|
|
275
|
+
"sources": {
|
|
276
|
+
"type": "array",
|
|
277
|
+
"items": {
|
|
278
|
+
"$ref": "#/definitions/MediaSource"
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"poster": {
|
|
282
|
+
"type": "string"
|
|
283
|
+
},
|
|
284
|
+
"thumbnail": {
|
|
285
|
+
"type": "string"
|
|
286
|
+
},
|
|
287
|
+
"durationSeconds": {
|
|
288
|
+
"type": "number"
|
|
289
|
+
},
|
|
290
|
+
"tracks": {
|
|
291
|
+
"type": "array",
|
|
292
|
+
"items": {
|
|
293
|
+
"$ref": "#/definitions/TextTrackRef"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"transcript": {
|
|
297
|
+
"$ref": "#/definitions/TranscriptRef"
|
|
298
|
+
},
|
|
299
|
+
"label": {
|
|
300
|
+
"type": "string"
|
|
301
|
+
},
|
|
302
|
+
"description": {
|
|
303
|
+
"type": "string"
|
|
304
|
+
},
|
|
305
|
+
"lang": {
|
|
306
|
+
"type": "string",
|
|
307
|
+
"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."
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"required": [
|
|
311
|
+
"version",
|
|
312
|
+
"id",
|
|
313
|
+
"kind",
|
|
314
|
+
"sources"
|
|
315
|
+
],
|
|
316
|
+
"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."
|
|
317
|
+
},
|
|
318
|
+
"MediaKind": {
|
|
319
|
+
"type": "string",
|
|
320
|
+
"enum": [
|
|
321
|
+
"image",
|
|
322
|
+
"audio",
|
|
323
|
+
"video",
|
|
324
|
+
"other"
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
"MediaSource": {
|
|
328
|
+
"type": "object",
|
|
329
|
+
"properties": {
|
|
330
|
+
"src": {
|
|
331
|
+
"type": "string"
|
|
332
|
+
},
|
|
333
|
+
"type": {
|
|
334
|
+
"type": "string",
|
|
335
|
+
"description": "MIME type, e.g. \"video/mp4\"."
|
|
336
|
+
},
|
|
337
|
+
"width": {
|
|
338
|
+
"type": "number"
|
|
339
|
+
},
|
|
340
|
+
"height": {
|
|
341
|
+
"type": "number"
|
|
342
|
+
},
|
|
343
|
+
"bitrate": {
|
|
344
|
+
"type": "number"
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
"required": [
|
|
348
|
+
"src"
|
|
349
|
+
],
|
|
350
|
+
"description": "One playable encoding of a media asset."
|
|
351
|
+
},
|
|
352
|
+
"TextTrackRef": {
|
|
353
|
+
"type": "object",
|
|
354
|
+
"properties": {
|
|
355
|
+
"src": {
|
|
356
|
+
"type": "string"
|
|
357
|
+
},
|
|
358
|
+
"kind": {
|
|
359
|
+
"type": "string",
|
|
360
|
+
"enum": [
|
|
361
|
+
"captions",
|
|
362
|
+
"subtitles",
|
|
363
|
+
"descriptions",
|
|
364
|
+
"chapters",
|
|
365
|
+
"metadata"
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
"lang": {
|
|
369
|
+
"type": "string"
|
|
370
|
+
},
|
|
371
|
+
"label": {
|
|
372
|
+
"type": "string"
|
|
373
|
+
},
|
|
374
|
+
"default": {
|
|
375
|
+
"type": "boolean"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"required": [
|
|
379
|
+
"src",
|
|
380
|
+
"kind",
|
|
381
|
+
"lang",
|
|
382
|
+
"label"
|
|
383
|
+
],
|
|
384
|
+
"description": "One authored text track associated with an audio or video asset."
|
|
385
|
+
},
|
|
386
|
+
"TranscriptRef": {
|
|
387
|
+
"type": "object",
|
|
388
|
+
"properties": {
|
|
389
|
+
"src": {
|
|
390
|
+
"type": "string"
|
|
391
|
+
},
|
|
392
|
+
"html": {
|
|
393
|
+
"type": "string"
|
|
394
|
+
},
|
|
395
|
+
"plainText": {
|
|
396
|
+
"type": "string"
|
|
397
|
+
},
|
|
398
|
+
"lang": {
|
|
399
|
+
"type": "string"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"description": "Inline or externally hosted transcript content for a media asset."
|
|
403
|
+
},
|
|
404
|
+
"MediaFragmentRange": {
|
|
405
|
+
"type": "object",
|
|
406
|
+
"properties": {
|
|
407
|
+
"startSeconds": {
|
|
408
|
+
"type": "number"
|
|
409
|
+
},
|
|
410
|
+
"endSeconds": {
|
|
411
|
+
"type": "number"
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"required": [
|
|
415
|
+
"startSeconds"
|
|
416
|
+
],
|
|
417
|
+
"description": "A time slice within a media asset, so one recording can serve several content nodes. Mirrors QTI 3's Media Fragments URI usage."
|
|
418
|
+
},
|
|
419
|
+
"SpokenAudioCardPayload": {
|
|
420
|
+
"type": "object",
|
|
421
|
+
"properties": {
|
|
422
|
+
"media": {
|
|
423
|
+
"$ref": "#/definitions/MediaAssetRef"
|
|
424
|
+
},
|
|
425
|
+
"fragment": {
|
|
426
|
+
"$ref": "#/definitions/MediaFragmentRange"
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"required": [
|
|
430
|
+
"media"
|
|
431
|
+
],
|
|
432
|
+
"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."
|
|
433
|
+
},
|
|
434
|
+
"GraphingAnswers": {
|
|
435
|
+
"type": "object",
|
|
436
|
+
"properties": {
|
|
437
|
+
"correctAnswer": {
|
|
438
|
+
"$ref": "#/definitions/Answer",
|
|
439
|
+
"description": "The correct answer"
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"required": [
|
|
443
|
+
"correctAnswer"
|
|
444
|
+
],
|
|
445
|
+
"additionalProperties": {
|
|
446
|
+
"$ref": "#/definitions/Answer"
|
|
447
|
+
},
|
|
448
|
+
"description": "The correct answer, plus alternates keyed `alternate<N>`, e.g. `alternate1`."
|
|
449
|
+
},
|
|
450
|
+
"Answer": {
|
|
451
|
+
"type": "object",
|
|
452
|
+
"properties": {
|
|
453
|
+
"name": {
|
|
454
|
+
"type": "string",
|
|
455
|
+
"description": "Indicates name of answer"
|
|
456
|
+
},
|
|
457
|
+
"marks": {
|
|
458
|
+
"type": "array",
|
|
459
|
+
"items": {
|
|
460
|
+
"$ref": "#/definitions/Mark"
|
|
461
|
+
},
|
|
462
|
+
"description": "Indicates marks for the answer"
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"required": [
|
|
466
|
+
"name",
|
|
467
|
+
"marks"
|
|
468
|
+
]
|
|
469
|
+
},
|
|
470
|
+
"Mark": {
|
|
471
|
+
"type": "object",
|
|
472
|
+
"properties": {
|
|
473
|
+
"type": {
|
|
474
|
+
"$ref": "#/definitions/MarkType",
|
|
475
|
+
"description": "Indicates type of mark"
|
|
476
|
+
},
|
|
477
|
+
"building": {
|
|
478
|
+
"type": "boolean",
|
|
479
|
+
"description": "Indicates if mark is in build process"
|
|
480
|
+
},
|
|
481
|
+
"x": {
|
|
482
|
+
"type": "number",
|
|
483
|
+
"description": "Indicates x coordinate if type is point"
|
|
484
|
+
},
|
|
485
|
+
"y": {
|
|
486
|
+
"type": "number",
|
|
487
|
+
"description": "Indicates y coordinate if type is point"
|
|
488
|
+
},
|
|
489
|
+
"label": {
|
|
490
|
+
"type": "string",
|
|
491
|
+
"description": "Indicates label value for mark"
|
|
492
|
+
},
|
|
493
|
+
"showLabel": {
|
|
494
|
+
"type": "boolean",
|
|
495
|
+
"description": "Not read by this element or `@pie-lib/graphing`."
|
|
496
|
+
},
|
|
497
|
+
"from": {
|
|
498
|
+
"$ref": "#/definitions/MarkPoint",
|
|
499
|
+
"description": "Indicates where starts the mark if type is line, segment, ray, vector"
|
|
500
|
+
},
|
|
501
|
+
"to": {
|
|
502
|
+
"$ref": "#/definitions/MarkPoint",
|
|
503
|
+
"description": "Indicates where ends the mark if type is line, segment, ray, vector"
|
|
504
|
+
},
|
|
505
|
+
"middle": {
|
|
506
|
+
"$ref": "#/definitions/MarkPoint",
|
|
507
|
+
"description": "Labelled midpoint of a line, ray, segment, vector, circle or polygon mark"
|
|
508
|
+
},
|
|
509
|
+
"root": {
|
|
510
|
+
"$ref": "#/definitions/MarkPoint",
|
|
511
|
+
"description": "Indicated the root of mark if type is sine, parabola, absolute, exponential or circle"
|
|
512
|
+
},
|
|
513
|
+
"edge": {
|
|
514
|
+
"$ref": "#/definitions/MarkPoint",
|
|
515
|
+
"description": "Indicated the edge of mark if type is sine, parabola, absolute, exponential or circle"
|
|
516
|
+
},
|
|
517
|
+
"closed": {
|
|
518
|
+
"type": "boolean",
|
|
519
|
+
"description": "Indicates if mark is closed if type is polygon, sine"
|
|
520
|
+
},
|
|
521
|
+
"points": {
|
|
522
|
+
"type": "array",
|
|
523
|
+
"items": {
|
|
524
|
+
"$ref": "#/definitions/MarkPoint"
|
|
525
|
+
},
|
|
526
|
+
"description": "Indicates all mark's points if type is polygon"
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
"required": [
|
|
530
|
+
"type"
|
|
531
|
+
]
|
|
532
|
+
},
|
|
533
|
+
"MarkType": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"enum": [
|
|
536
|
+
"point",
|
|
537
|
+
"segment",
|
|
538
|
+
"line",
|
|
539
|
+
"vector",
|
|
540
|
+
"circle",
|
|
541
|
+
"sine",
|
|
542
|
+
"polygon",
|
|
543
|
+
"ray",
|
|
544
|
+
"parabola",
|
|
545
|
+
"absolute",
|
|
546
|
+
"exponential"
|
|
547
|
+
],
|
|
548
|
+
"description": "Kind of mark a graphing tool draws."
|
|
549
|
+
},
|
|
550
|
+
"MarkPoint": {
|
|
551
|
+
"type": "object",
|
|
552
|
+
"properties": {
|
|
553
|
+
"x": {
|
|
554
|
+
"type": "number",
|
|
555
|
+
"description": "Indicates x coordinate"
|
|
556
|
+
},
|
|
557
|
+
"y": {
|
|
558
|
+
"type": "number",
|
|
559
|
+
"description": "Indicates y coordinate"
|
|
560
|
+
},
|
|
561
|
+
"label": {
|
|
562
|
+
"type": "string",
|
|
563
|
+
"description": "Label shown next to the point"
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
"required": [
|
|
567
|
+
"x",
|
|
568
|
+
"y"
|
|
569
|
+
],
|
|
570
|
+
"description": "A point of a mark, labelled with the label tool."
|
|
571
|
+
},
|
|
572
|
+
"Arrows": {
|
|
573
|
+
"type": "object",
|
|
574
|
+
"properties": {
|
|
575
|
+
"left": {
|
|
576
|
+
"type": "boolean",
|
|
577
|
+
"description": "Indicates if left arrow is enabled"
|
|
578
|
+
},
|
|
579
|
+
"right": {
|
|
580
|
+
"type": "boolean",
|
|
581
|
+
"description": "Indicates if right arrow is enabled"
|
|
582
|
+
},
|
|
583
|
+
"up": {
|
|
584
|
+
"type": "boolean",
|
|
585
|
+
"description": "Indicates if up arrow is enabled"
|
|
586
|
+
},
|
|
587
|
+
"down": {
|
|
588
|
+
"type": "boolean",
|
|
589
|
+
"description": "Indicates if down arrow is enabled"
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
"required": [
|
|
593
|
+
"left",
|
|
594
|
+
"right",
|
|
595
|
+
"up",
|
|
596
|
+
"down"
|
|
597
|
+
]
|
|
598
|
+
},
|
|
599
|
+
"GraphSettings": {
|
|
600
|
+
"type": "object",
|
|
601
|
+
"properties": {
|
|
602
|
+
"min": {
|
|
603
|
+
"type": "number",
|
|
604
|
+
"description": "Min value"
|
|
605
|
+
},
|
|
606
|
+
"max": {
|
|
607
|
+
"type": "number",
|
|
608
|
+
"description": "Max value"
|
|
609
|
+
},
|
|
610
|
+
"padding": {
|
|
611
|
+
"type": "number",
|
|
612
|
+
"description": "Padding value"
|
|
613
|
+
},
|
|
614
|
+
"step": {
|
|
615
|
+
"type": "number",
|
|
616
|
+
"description": "Step value"
|
|
617
|
+
},
|
|
618
|
+
"labelStep": {
|
|
619
|
+
"type": "number",
|
|
620
|
+
"description": "Label step value"
|
|
621
|
+
},
|
|
622
|
+
"axisLabel": {
|
|
623
|
+
"type": "string",
|
|
624
|
+
"description": "Axis Label"
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
"required": [
|
|
628
|
+
"min",
|
|
629
|
+
"max",
|
|
630
|
+
"step",
|
|
631
|
+
"labelStep",
|
|
632
|
+
"axisLabel"
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
"ExtraCSSRules": {
|
|
636
|
+
"type": "object",
|
|
637
|
+
"properties": {
|
|
638
|
+
"names": {
|
|
639
|
+
"type": "array",
|
|
640
|
+
"items": {
|
|
641
|
+
"type": "string"
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
"rules": {
|
|
645
|
+
"type": "string"
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
"description": "Host-supplied CSS scoped to the element: `rules` is a stylesheet whose class names are listed in `names`."
|
|
649
|
+
},
|
|
650
|
+
"Graph": {
|
|
651
|
+
"type": "object",
|
|
652
|
+
"properties": {
|
|
653
|
+
"width": {
|
|
654
|
+
"type": "number",
|
|
655
|
+
"description": "Width for graph representation"
|
|
656
|
+
},
|
|
657
|
+
"height": {
|
|
658
|
+
"type": "number",
|
|
659
|
+
"description": "Height for graph representation"
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
"required": [
|
|
663
|
+
"width",
|
|
664
|
+
"height"
|
|
665
|
+
]
|
|
666
|
+
},
|
|
667
|
+
"Labels": {
|
|
668
|
+
"type": "object",
|
|
669
|
+
"properties": {
|
|
670
|
+
"top": {
|
|
671
|
+
"type": "string",
|
|
672
|
+
"description": "Label for top side of the graph"
|
|
673
|
+
},
|
|
674
|
+
"bottom": {
|
|
675
|
+
"type": "string",
|
|
676
|
+
"description": "Label for bottom side of the graph"
|
|
677
|
+
},
|
|
678
|
+
"left": {
|
|
679
|
+
"type": "string",
|
|
680
|
+
"description": "Label for left side of the graph"
|
|
681
|
+
},
|
|
682
|
+
"right": {
|
|
683
|
+
"type": "string",
|
|
684
|
+
"description": "Label for right side of the graph"
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
"GraphingTool": {
|
|
689
|
+
"anyOf": [
|
|
690
|
+
{
|
|
691
|
+
"$ref": "#/definitions/MarkType"
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"type": "string",
|
|
695
|
+
"const": "label"
|
|
696
|
+
}
|
|
697
|
+
],
|
|
698
|
+
"description": "A toolbar tool: a mark type, or `label`, which labels existing points instead of drawing a mark."
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
"additionalProperties": false
|
|
702
|
+
}
|