@pie-element/select-text 14.0.4-next.20261011174919 → 14.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/defaultConfiguration.d.ts +54 -52
- package/dist/author/design.d.ts +36 -24
- package/dist/author/design.js +66 -78
- package/dist/author/index.d.ts +15 -9
- package/dist/author/index.js +6 -3
- package/dist/browser/author/index.js +12 -23
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +2 -2
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +12 -23
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/controller/index.js +2 -2
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +12 -11
- package/dist/controller/index.d.ts +84 -10
- package/dist/controller/index.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +410 -0
- package/dist/schemas/model.schema.json +487 -0
- package/dist/schemas/session.schema.json +58 -0
- package/dist/types.d.ts +203 -0
- package/package.json +21 -17
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/select-text@14.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
|
+
"maxSelections": {
|
|
22
|
+
"type": "number",
|
|
23
|
+
"description": "The maximum number of token selections a user can make when responding; 0 allows any number",
|
|
24
|
+
"default": 0
|
|
25
|
+
},
|
|
26
|
+
"mode": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"enum": [
|
|
29
|
+
"sentence",
|
|
30
|
+
"words",
|
|
31
|
+
"paragraphs",
|
|
32
|
+
"word",
|
|
33
|
+
"paragraph",
|
|
34
|
+
""
|
|
35
|
+
],
|
|
36
|
+
"description": "The selected mode for tokenizing the text. This is only used in the config UI to present the mode by which text has been tokenized for selection. The tokenizer writes `sentence`, `words` or `paragraphs`, and an empty string after a token edit in a newly opened author; `word` and `paragraph` are accepted for content written to the legacy contract.",
|
|
37
|
+
"default": "sentence"
|
|
38
|
+
},
|
|
39
|
+
"partialScoring": {
|
|
40
|
+
"type": "boolean",
|
|
41
|
+
"description": "Indicates if partial scoring should be used. Scoring treats an absent value as enabled, while the default models set false."
|
|
42
|
+
},
|
|
43
|
+
"feedback": {
|
|
44
|
+
"$ref": "#/definitions/ComplexFeedbackType",
|
|
45
|
+
"description": "Feedback for student responses"
|
|
46
|
+
},
|
|
47
|
+
"tokens": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": {
|
|
50
|
+
"$ref": "#/definitions/TextToken"
|
|
51
|
+
},
|
|
52
|
+
"description": "The selectable text tokens in the main text content"
|
|
53
|
+
},
|
|
54
|
+
"text": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "The passage of text from which user may select responses"
|
|
57
|
+
},
|
|
58
|
+
"prompt": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "The user prompt/item stem"
|
|
61
|
+
},
|
|
62
|
+
"promptEnabled": {
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"description": "Determines if prompt should show",
|
|
65
|
+
"default": true
|
|
66
|
+
},
|
|
67
|
+
"highlightChoices": {
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"description": "Indicates if the parts of text that are choosable, should be highligned when presented to student.",
|
|
70
|
+
"default": false
|
|
71
|
+
},
|
|
72
|
+
"rationale": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "Indicates rationale for correct answer"
|
|
75
|
+
},
|
|
76
|
+
"scoringType": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"enum": [
|
|
79
|
+
"auto",
|
|
80
|
+
"rubric"
|
|
81
|
+
],
|
|
82
|
+
"description": "Indicates scoring type",
|
|
83
|
+
"default": "auto"
|
|
84
|
+
},
|
|
85
|
+
"studentInstructions": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"description": "Not read by this element: it renders no student instructions"
|
|
88
|
+
},
|
|
89
|
+
"teacherInstructions": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"description": "Indicates teacher instructions"
|
|
92
|
+
},
|
|
93
|
+
"feedbackEnabled": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"description": "Indicates if Feedback is enabled",
|
|
96
|
+
"default": false
|
|
97
|
+
},
|
|
98
|
+
"rationaleEnabled": {
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"description": "Indicates if Rationale are enabled",
|
|
101
|
+
"default": true
|
|
102
|
+
},
|
|
103
|
+
"studentInstructionsEnabled": {
|
|
104
|
+
"type": "boolean",
|
|
105
|
+
"description": "Indicates if Student Instructions are enabled; the author shows the toggle, and nothing renders them",
|
|
106
|
+
"default": true
|
|
107
|
+
},
|
|
108
|
+
"teacherInstructionsEnabled": {
|
|
109
|
+
"type": "boolean",
|
|
110
|
+
"description": "Indicates if Teacher Instructions are enabled",
|
|
111
|
+
"default": true
|
|
112
|
+
},
|
|
113
|
+
"spellCheckEnabled": {
|
|
114
|
+
"type": "boolean",
|
|
115
|
+
"description": "Indicates if spellcheck is enabled"
|
|
116
|
+
},
|
|
117
|
+
"toolbarEditorPosition": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"enum": [
|
|
120
|
+
"bottom",
|
|
121
|
+
"top"
|
|
122
|
+
],
|
|
123
|
+
"description": "Indicates the editor's toolbar position which can be 'bottom' or 'top'",
|
|
124
|
+
"default": "bottom"
|
|
125
|
+
},
|
|
126
|
+
"rubricEnabled": {
|
|
127
|
+
"type": "boolean",
|
|
128
|
+
"description": "Indicates if Rubric is enabled"
|
|
129
|
+
},
|
|
130
|
+
"language": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"description": "Indicates the language of the component Supported options: en, es, en_US, en-US, es_ES, es-ES, es_MX, es-MX"
|
|
133
|
+
},
|
|
134
|
+
"extraCSSRules": {
|
|
135
|
+
"$ref": "#/definitions/ExtraCSSRules",
|
|
136
|
+
"description": "Host-supplied CSS scoped to the element"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"required": [
|
|
140
|
+
"element",
|
|
141
|
+
"id",
|
|
142
|
+
"text",
|
|
143
|
+
"tokens"
|
|
144
|
+
],
|
|
145
|
+
"description": "Pie Model Object for `@pie-element/select-text`",
|
|
146
|
+
"definitions": {
|
|
147
|
+
"AccessibilityCatalog": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"properties": {
|
|
150
|
+
"identifier": {
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
"cards": {
|
|
154
|
+
"type": "array",
|
|
155
|
+
"items": {
|
|
156
|
+
"$ref": "#/definitions/CatalogCard"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"required": [
|
|
161
|
+
"identifier",
|
|
162
|
+
"cards"
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"CatalogCard": {
|
|
166
|
+
"type": "object",
|
|
167
|
+
"properties": {
|
|
168
|
+
"catalog": {
|
|
169
|
+
"type": "string"
|
|
170
|
+
},
|
|
171
|
+
"language": {
|
|
172
|
+
"type": "string"
|
|
173
|
+
},
|
|
174
|
+
"content": {
|
|
175
|
+
"type": "string"
|
|
176
|
+
},
|
|
177
|
+
"payload": {
|
|
178
|
+
"$ref": "#/definitions/CatalogCardPayload"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"required": [
|
|
182
|
+
"catalog"
|
|
183
|
+
],
|
|
184
|
+
"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`."
|
|
185
|
+
},
|
|
186
|
+
"CatalogCardPayload": {
|
|
187
|
+
"anyOf": [
|
|
188
|
+
{
|
|
189
|
+
"$ref": "#/definitions/SignLanguageCardPayload"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"$ref": "#/definitions/SpokenAudioCardPayload"
|
|
193
|
+
}
|
|
194
|
+
],
|
|
195
|
+
"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."
|
|
196
|
+
},
|
|
197
|
+
"SignLanguageCardPayload": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"properties": {
|
|
200
|
+
"signLang": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"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."
|
|
203
|
+
},
|
|
204
|
+
"media": {
|
|
205
|
+
"$ref": "#/definitions/MediaAssetRef"
|
|
206
|
+
},
|
|
207
|
+
"fragment": {
|
|
208
|
+
"$ref": "#/definitions/MediaFragmentRange"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"required": [
|
|
212
|
+
"media"
|
|
213
|
+
],
|
|
214
|
+
"description": "Payload for a `sign-language` catalog card: a signed translation of the content node the card is docked to."
|
|
215
|
+
},
|
|
216
|
+
"MediaAssetRef": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"properties": {
|
|
219
|
+
"version": {
|
|
220
|
+
"type": "number",
|
|
221
|
+
"const": 1
|
|
222
|
+
},
|
|
223
|
+
"id": {
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
"kind": {
|
|
227
|
+
"$ref": "#/definitions/MediaKind"
|
|
228
|
+
},
|
|
229
|
+
"sources": {
|
|
230
|
+
"type": "array",
|
|
231
|
+
"items": {
|
|
232
|
+
"$ref": "#/definitions/MediaSource"
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"poster": {
|
|
236
|
+
"type": "string"
|
|
237
|
+
},
|
|
238
|
+
"thumbnail": {
|
|
239
|
+
"type": "string"
|
|
240
|
+
},
|
|
241
|
+
"durationSeconds": {
|
|
242
|
+
"type": "number"
|
|
243
|
+
},
|
|
244
|
+
"tracks": {
|
|
245
|
+
"type": "array",
|
|
246
|
+
"items": {
|
|
247
|
+
"$ref": "#/definitions/TextTrackRef"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"transcript": {
|
|
251
|
+
"$ref": "#/definitions/TranscriptRef"
|
|
252
|
+
},
|
|
253
|
+
"label": {
|
|
254
|
+
"type": "string"
|
|
255
|
+
},
|
|
256
|
+
"description": {
|
|
257
|
+
"type": "string"
|
|
258
|
+
},
|
|
259
|
+
"lang": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"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."
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"required": [
|
|
265
|
+
"version",
|
|
266
|
+
"id",
|
|
267
|
+
"kind",
|
|
268
|
+
"sources"
|
|
269
|
+
],
|
|
270
|
+
"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."
|
|
271
|
+
},
|
|
272
|
+
"MediaKind": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"enum": [
|
|
275
|
+
"image",
|
|
276
|
+
"audio",
|
|
277
|
+
"video",
|
|
278
|
+
"other"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"MediaSource": {
|
|
282
|
+
"type": "object",
|
|
283
|
+
"properties": {
|
|
284
|
+
"src": {
|
|
285
|
+
"type": "string"
|
|
286
|
+
},
|
|
287
|
+
"type": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"description": "MIME type, e.g. \"video/mp4\"."
|
|
290
|
+
},
|
|
291
|
+
"width": {
|
|
292
|
+
"type": "number"
|
|
293
|
+
},
|
|
294
|
+
"height": {
|
|
295
|
+
"type": "number"
|
|
296
|
+
},
|
|
297
|
+
"bitrate": {
|
|
298
|
+
"type": "number"
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"required": [
|
|
302
|
+
"src"
|
|
303
|
+
],
|
|
304
|
+
"description": "One playable encoding of a media asset."
|
|
305
|
+
},
|
|
306
|
+
"TextTrackRef": {
|
|
307
|
+
"type": "object",
|
|
308
|
+
"properties": {
|
|
309
|
+
"src": {
|
|
310
|
+
"type": "string"
|
|
311
|
+
},
|
|
312
|
+
"kind": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"enum": [
|
|
315
|
+
"captions",
|
|
316
|
+
"subtitles",
|
|
317
|
+
"descriptions",
|
|
318
|
+
"chapters",
|
|
319
|
+
"metadata"
|
|
320
|
+
]
|
|
321
|
+
},
|
|
322
|
+
"lang": {
|
|
323
|
+
"type": "string"
|
|
324
|
+
},
|
|
325
|
+
"label": {
|
|
326
|
+
"type": "string"
|
|
327
|
+
},
|
|
328
|
+
"default": {
|
|
329
|
+
"type": "boolean"
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
"required": [
|
|
333
|
+
"src",
|
|
334
|
+
"kind",
|
|
335
|
+
"lang",
|
|
336
|
+
"label"
|
|
337
|
+
],
|
|
338
|
+
"description": "One authored text track associated with an audio or video asset."
|
|
339
|
+
},
|
|
340
|
+
"TranscriptRef": {
|
|
341
|
+
"type": "object",
|
|
342
|
+
"properties": {
|
|
343
|
+
"src": {
|
|
344
|
+
"type": "string"
|
|
345
|
+
},
|
|
346
|
+
"html": {
|
|
347
|
+
"type": "string"
|
|
348
|
+
},
|
|
349
|
+
"plainText": {
|
|
350
|
+
"type": "string"
|
|
351
|
+
},
|
|
352
|
+
"lang": {
|
|
353
|
+
"type": "string"
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"description": "Inline or externally hosted transcript content for a media asset."
|
|
357
|
+
},
|
|
358
|
+
"MediaFragmentRange": {
|
|
359
|
+
"type": "object",
|
|
360
|
+
"properties": {
|
|
361
|
+
"startSeconds": {
|
|
362
|
+
"type": "number"
|
|
363
|
+
},
|
|
364
|
+
"endSeconds": {
|
|
365
|
+
"type": "number"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"required": [
|
|
369
|
+
"startSeconds"
|
|
370
|
+
],
|
|
371
|
+
"description": "A time slice within a media asset, so one recording can serve several content nodes. Mirrors QTI 3's Media Fragments URI usage."
|
|
372
|
+
},
|
|
373
|
+
"SpokenAudioCardPayload": {
|
|
374
|
+
"type": "object",
|
|
375
|
+
"properties": {
|
|
376
|
+
"media": {
|
|
377
|
+
"$ref": "#/definitions/MediaAssetRef"
|
|
378
|
+
},
|
|
379
|
+
"fragment": {
|
|
380
|
+
"$ref": "#/definitions/MediaFragmentRange"
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"required": [
|
|
384
|
+
"media"
|
|
385
|
+
],
|
|
386
|
+
"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."
|
|
387
|
+
},
|
|
388
|
+
"ComplexFeedbackType": {
|
|
389
|
+
"type": "object",
|
|
390
|
+
"properties": {
|
|
391
|
+
"correct": {
|
|
392
|
+
"$ref": "#/definitions/FeedbackType",
|
|
393
|
+
"description": "Indicates the configuration for feedback when answer is correct"
|
|
394
|
+
},
|
|
395
|
+
"incorrect": {
|
|
396
|
+
"$ref": "#/definitions/FeedbackType",
|
|
397
|
+
"description": "Indicates the configuration for feedback when answer is incorrect"
|
|
398
|
+
},
|
|
399
|
+
"partial": {
|
|
400
|
+
"$ref": "#/definitions/FeedbackType",
|
|
401
|
+
"description": "Indicates the configuration for feedback when answer is partially correct"
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
"required": [
|
|
405
|
+
"correct",
|
|
406
|
+
"incorrect"
|
|
407
|
+
],
|
|
408
|
+
"description": "Feedback for each correctness level"
|
|
409
|
+
},
|
|
410
|
+
"FeedbackType": {
|
|
411
|
+
"type": "object",
|
|
412
|
+
"properties": {
|
|
413
|
+
"type": {
|
|
414
|
+
"type": "string",
|
|
415
|
+
"enum": [
|
|
416
|
+
"default",
|
|
417
|
+
"none",
|
|
418
|
+
"custom"
|
|
419
|
+
],
|
|
420
|
+
"description": "Indicates the feedback type"
|
|
421
|
+
},
|
|
422
|
+
"default": {
|
|
423
|
+
"type": "string",
|
|
424
|
+
"description": "Indicates the feedback value"
|
|
425
|
+
},
|
|
426
|
+
"custom": {
|
|
427
|
+
"type": "string",
|
|
428
|
+
"description": "Indicates the feedback custom value"
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"required": [
|
|
432
|
+
"type"
|
|
433
|
+
],
|
|
434
|
+
"description": "Feedback for one correctness level. The author's feedback selector changes `type` and keeps the other message, so a `custom` type can arrive without `custom` text, and then the default message shows."
|
|
435
|
+
},
|
|
436
|
+
"TextToken": {
|
|
437
|
+
"type": "object",
|
|
438
|
+
"properties": {
|
|
439
|
+
"text": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"description": "The token text"
|
|
442
|
+
},
|
|
443
|
+
"start": {
|
|
444
|
+
"type": "number",
|
|
445
|
+
"description": "The start point in the main text for this token"
|
|
446
|
+
},
|
|
447
|
+
"end": {
|
|
448
|
+
"type": "number",
|
|
449
|
+
"description": "The end point in the main text for this token"
|
|
450
|
+
},
|
|
451
|
+
"correct": {
|
|
452
|
+
"type": "boolean",
|
|
453
|
+
"description": "Is selected does the token represent a correct response"
|
|
454
|
+
},
|
|
455
|
+
"oldStart": {
|
|
456
|
+
"type": "number",
|
|
457
|
+
"description": "The start point before the author re-parsed the text; scoring matches a selection on either position"
|
|
458
|
+
},
|
|
459
|
+
"oldEnd": {
|
|
460
|
+
"type": "number",
|
|
461
|
+
"description": "The end point before the author re-parsed the text; scoring matches a selection on either position"
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"required": [
|
|
465
|
+
"start",
|
|
466
|
+
"end"
|
|
467
|
+
],
|
|
468
|
+
"description": "A selectable span of the main text"
|
|
469
|
+
},
|
|
470
|
+
"ExtraCSSRules": {
|
|
471
|
+
"type": "object",
|
|
472
|
+
"properties": {
|
|
473
|
+
"names": {
|
|
474
|
+
"type": "array",
|
|
475
|
+
"items": {
|
|
476
|
+
"type": "string"
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"rules": {
|
|
480
|
+
"type": "string"
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"description": "Host-supplied CSS scoped to the element: `rules` is a stylesheet whose class names are listed in `names`."
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
"additionalProperties": false
|
|
487
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/select-text@14.0.4/dist/schemas/session.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "Identifier of the session"
|
|
9
|
+
},
|
|
10
|
+
"element": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "The element the session belongs to"
|
|
13
|
+
},
|
|
14
|
+
"selectedTokens": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"items": {
|
|
17
|
+
"$ref": "#/definitions/TextToken"
|
|
18
|
+
},
|
|
19
|
+
"description": "The tokens the student selected"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"definitions": {
|
|
23
|
+
"TextToken": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"text": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "The token text"
|
|
29
|
+
},
|
|
30
|
+
"start": {
|
|
31
|
+
"type": "number",
|
|
32
|
+
"description": "The start point in the main text for this token"
|
|
33
|
+
},
|
|
34
|
+
"end": {
|
|
35
|
+
"type": "number",
|
|
36
|
+
"description": "The end point in the main text for this token"
|
|
37
|
+
},
|
|
38
|
+
"correct": {
|
|
39
|
+
"type": "boolean",
|
|
40
|
+
"description": "Is selected does the token represent a correct response"
|
|
41
|
+
},
|
|
42
|
+
"oldStart": {
|
|
43
|
+
"type": "number",
|
|
44
|
+
"description": "The start point before the author re-parsed the text; scoring matches a selection on either position"
|
|
45
|
+
},
|
|
46
|
+
"oldEnd": {
|
|
47
|
+
"type": "number",
|
|
48
|
+
"description": "The end point before the author re-parsed the text; scoring matches a selection on either position"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"required": [
|
|
52
|
+
"start",
|
|
53
|
+
"end"
|
|
54
|
+
],
|
|
55
|
+
"description": "A selectable span of the main text"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|