@pie-element/match 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 +45 -31
- package/dist/author/configure.js +37 -51
- package/dist/author/defaults.d.ts +59 -57
- package/dist/author/index.d.ts +18 -27
- package/dist/author/index.js +15 -4
- package/dist/author/utils.d.ts +33 -2
- package/dist/browser/author/index.js +24 -29
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +24 -29
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- 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 +73 -7
- package/dist/index.d.ts +1 -0
- package/dist/schemas/configuration.schema.json +437 -0
- package/dist/schemas/model.schema.json +478 -0
- package/dist/schemas/session.schema.json +36 -0
- package/dist/types.d.ts +183 -0
- package/package.json +21 -17
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/match@13.0.4/dist/schemas/configuration.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"baseInputConfiguration": {
|
|
7
|
+
"$ref": "#/definitions/EditableHtmlConfigureProp",
|
|
8
|
+
"description": "Base editable html input configuration regarding plugins that are enabled/disabled E.g. audio, video, image"
|
|
9
|
+
},
|
|
10
|
+
"rows": {
|
|
11
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigure",
|
|
12
|
+
"description": "Configuration for html input configuration regarding plugins that are enabled/disabled on each question row E.g. audio, video, image"
|
|
13
|
+
},
|
|
14
|
+
"feedback": {
|
|
15
|
+
"$ref": "#/definitions/ConfigurePropWithEnabled",
|
|
16
|
+
"description": "Configuration for feedback; `enabled` is not read"
|
|
17
|
+
},
|
|
18
|
+
"headers": {
|
|
19
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigure",
|
|
20
|
+
"description": "Configuration for headers"
|
|
21
|
+
},
|
|
22
|
+
"layout": {
|
|
23
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
24
|
+
"description": "Configuration for layout"
|
|
25
|
+
},
|
|
26
|
+
"lockChoiceOrder": {
|
|
27
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
28
|
+
"description": "Configuration for lock choice order"
|
|
29
|
+
},
|
|
30
|
+
"partialScoring": {
|
|
31
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
32
|
+
"description": "Configuration for partial scoring"
|
|
33
|
+
},
|
|
34
|
+
"choiceMode": {
|
|
35
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
36
|
+
"description": "Configuration for choice mode"
|
|
37
|
+
},
|
|
38
|
+
"prompt": {
|
|
39
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
|
|
40
|
+
"description": "Configuration for the prompt"
|
|
41
|
+
},
|
|
42
|
+
"settingsPanelDisabled": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"description": "Indicates if the settings panel is not available"
|
|
45
|
+
},
|
|
46
|
+
"spellCheck": {
|
|
47
|
+
"$ref": "#/definitions/ConfigurePropWithEnabled",
|
|
48
|
+
"description": "Configuration for the author's spellcheck; `enabled` is not read, the model's `spellCheckEnabled` turns it on"
|
|
49
|
+
},
|
|
50
|
+
"rationale": {
|
|
51
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
|
|
52
|
+
"description": "Rationale configuration"
|
|
53
|
+
},
|
|
54
|
+
"scoringType": {
|
|
55
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
56
|
+
"description": "Scoring Type configuration"
|
|
57
|
+
},
|
|
58
|
+
"studentInstructions": {
|
|
59
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
60
|
+
"description": "Student Instructions configuration"
|
|
61
|
+
},
|
|
62
|
+
"teacherInstructions": {
|
|
63
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
|
|
64
|
+
"description": "Teacher Instructions configuration"
|
|
65
|
+
},
|
|
66
|
+
"maxImageWidth": {
|
|
67
|
+
"$ref": "#/definitions/MatchMaxImageDimensions",
|
|
68
|
+
"description": "Maximum image width for input fields"
|
|
69
|
+
},
|
|
70
|
+
"maxImageHeight": {
|
|
71
|
+
"$ref": "#/definitions/MatchMaxImageDimensions",
|
|
72
|
+
"description": "Maximum image height for input fields"
|
|
73
|
+
},
|
|
74
|
+
"withRubric": {
|
|
75
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
76
|
+
"description": "Rubric configuration - only relevant in environments that use pie-player-components"
|
|
77
|
+
},
|
|
78
|
+
"minQuestions": {
|
|
79
|
+
"type": "number",
|
|
80
|
+
"description": "Indicates the minimum number of question rows"
|
|
81
|
+
},
|
|
82
|
+
"maxQuestions": {
|
|
83
|
+
"type": "number",
|
|
84
|
+
"description": "Indicates the maximum number of question rows"
|
|
85
|
+
},
|
|
86
|
+
"maxLengthQuestionsHeading": {
|
|
87
|
+
"type": "number",
|
|
88
|
+
"description": "Indicates the maximum length of question rows headings"
|
|
89
|
+
},
|
|
90
|
+
"maxAnswers": {
|
|
91
|
+
"type": "number",
|
|
92
|
+
"description": "Indicates the maximum number of answer columns"
|
|
93
|
+
},
|
|
94
|
+
"maxLengthAnswers": {
|
|
95
|
+
"type": "number",
|
|
96
|
+
"description": "Indicates the maximum length of answer columns headings"
|
|
97
|
+
},
|
|
98
|
+
"maxLengthFirstColumnHeading": {
|
|
99
|
+
"type": "number",
|
|
100
|
+
"description": "Indicates the maximum length of first column headings"
|
|
101
|
+
},
|
|
102
|
+
"width": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"description": "Width of the authoring rows table, as a CSS length; the table scrolls when set"
|
|
105
|
+
},
|
|
106
|
+
"mathMlOptions": {
|
|
107
|
+
"$ref": "#/definitions/ConfigureMathMLProp",
|
|
108
|
+
"description": "Configuration for editable-html"
|
|
109
|
+
},
|
|
110
|
+
"language": {
|
|
111
|
+
"$ref": "#/definitions/ConfigurePropWithEnabled",
|
|
112
|
+
"description": "Language configuration"
|
|
113
|
+
},
|
|
114
|
+
"languageChoices": {
|
|
115
|
+
"$ref": "#/definitions/ConfigureLanguageOptions",
|
|
116
|
+
"description": "Language choices configuration Only available if language is enabled"
|
|
117
|
+
},
|
|
118
|
+
"contentDimensions": {
|
|
119
|
+
"$ref": "#/definitions/ContentDimensions",
|
|
120
|
+
"description": "Dimensions of the authoring container"
|
|
121
|
+
},
|
|
122
|
+
"showPrompt": {
|
|
123
|
+
"type": "boolean",
|
|
124
|
+
"description": "Not read by this element: the model's `promptEnabled` shows the prompt"
|
|
125
|
+
},
|
|
126
|
+
"promptLabel": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"description": "Not read by this element: `prompt.label` labels the prompt"
|
|
129
|
+
},
|
|
130
|
+
"settingsPartialScoring": {
|
|
131
|
+
"type": "boolean",
|
|
132
|
+
"description": "Not read by this element: `partialScoring.settings` shows the partial scoring control"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"description": "Config Object for `@pie-element/match`",
|
|
136
|
+
"definitions": {
|
|
137
|
+
"EditableHtmlConfigureProp": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"properties": {
|
|
140
|
+
"math": {
|
|
141
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
142
|
+
},
|
|
143
|
+
"audio": {
|
|
144
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
145
|
+
},
|
|
146
|
+
"video": {
|
|
147
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
148
|
+
},
|
|
149
|
+
"image": {
|
|
150
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
151
|
+
},
|
|
152
|
+
"customPlugins": {
|
|
153
|
+
"type": "array",
|
|
154
|
+
"items": {
|
|
155
|
+
"$ref": "#/definitions/CustomPlugin"
|
|
156
|
+
},
|
|
157
|
+
"description": "An array of objects that determine custom plugins. A custom plugin is an object which determines how the button will look like (icon) and the event name that will be triggered when the button gets pressed (event)."
|
|
158
|
+
},
|
|
159
|
+
"blockquote": {
|
|
160
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
161
|
+
},
|
|
162
|
+
"h3": {
|
|
163
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
164
|
+
},
|
|
165
|
+
"characters": {
|
|
166
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
167
|
+
},
|
|
168
|
+
"bold": {
|
|
169
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
170
|
+
},
|
|
171
|
+
"html": {
|
|
172
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
173
|
+
},
|
|
174
|
+
"italic": {
|
|
175
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
176
|
+
},
|
|
177
|
+
"ol_list": {
|
|
178
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
179
|
+
},
|
|
180
|
+
"redo": {
|
|
181
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
182
|
+
},
|
|
183
|
+
"strikethrough": {
|
|
184
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
185
|
+
},
|
|
186
|
+
"sub": {
|
|
187
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
188
|
+
},
|
|
189
|
+
"sup": {
|
|
190
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
191
|
+
},
|
|
192
|
+
"table": {
|
|
193
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
194
|
+
},
|
|
195
|
+
"ul_list": {
|
|
196
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
197
|
+
},
|
|
198
|
+
"underline": {
|
|
199
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
200
|
+
},
|
|
201
|
+
"undo": {
|
|
202
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
203
|
+
},
|
|
204
|
+
"textAlign": {
|
|
205
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
206
|
+
},
|
|
207
|
+
"showParagraphs": {
|
|
208
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
209
|
+
},
|
|
210
|
+
"separateParagraphs": {
|
|
211
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
212
|
+
},
|
|
213
|
+
"pasteFormatting": {
|
|
214
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
215
|
+
},
|
|
216
|
+
"superscript": {
|
|
217
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
218
|
+
},
|
|
219
|
+
"subscript": {
|
|
220
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
221
|
+
},
|
|
222
|
+
"languageCharacters": {
|
|
223
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
224
|
+
},
|
|
225
|
+
"responseArea": {
|
|
226
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"description": "Toolbar plugins of an editable-html field, keyed by plugin name."
|
|
230
|
+
},
|
|
231
|
+
"EditableHtmlButtonConfigure": {
|
|
232
|
+
"type": "object",
|
|
233
|
+
"properties": {
|
|
234
|
+
"disabled": {
|
|
235
|
+
"type": "boolean",
|
|
236
|
+
"description": "Indicates if the plugin is disabled or not"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"CustomPlugin": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"properties": {
|
|
243
|
+
"event": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"description": "The name of the custom event. It needs to be valid (only letters, numbers and \"_\" can be used). The event is emitted with the \"PIE-\" prefix."
|
|
246
|
+
},
|
|
247
|
+
"iconAlt": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"description": "The alt for the custom button icon"
|
|
250
|
+
},
|
|
251
|
+
"iconType": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"description": "The icon type. Currently, only \"SVG\" is supported."
|
|
254
|
+
},
|
|
255
|
+
"icon": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"description": "The icon string. Currently, only SVG is supported, so it needs to be a valid svg."
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"required": [
|
|
261
|
+
"event",
|
|
262
|
+
"iconAlt",
|
|
263
|
+
"iconType",
|
|
264
|
+
"icon"
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
"EditableHtmlPluginConfigure": {
|
|
268
|
+
"type": "object",
|
|
269
|
+
"properties": {
|
|
270
|
+
"settings": {
|
|
271
|
+
"type": "boolean",
|
|
272
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel"
|
|
273
|
+
},
|
|
274
|
+
"label": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel"
|
|
277
|
+
},
|
|
278
|
+
"inputConfiguration": {
|
|
279
|
+
"$ref": "#/definitions/EditableHtmlConfigureProp",
|
|
280
|
+
"description": "Configuration for editable-html"
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"ConfigurePropWithEnabled": {
|
|
285
|
+
"type": "object",
|
|
286
|
+
"properties": {
|
|
287
|
+
"settings": {
|
|
288
|
+
"type": "boolean",
|
|
289
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel"
|
|
290
|
+
},
|
|
291
|
+
"label": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel"
|
|
294
|
+
},
|
|
295
|
+
"enabled": {
|
|
296
|
+
"type": "boolean",
|
|
297
|
+
"description": "Indicates the value of the item if it affects config-ui (eg.: if item is a switch and displaying an input on the config-ui depends on the switch value: on/off)"
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"ConfigureProp": {
|
|
302
|
+
"type": "object",
|
|
303
|
+
"properties": {
|
|
304
|
+
"settings": {
|
|
305
|
+
"type": "boolean",
|
|
306
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel"
|
|
307
|
+
},
|
|
308
|
+
"label": {
|
|
309
|
+
"type": "string",
|
|
310
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel"
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"description": "Building blocks of an element's authoring configuration: the object a host passes to the `<tag>-config` custom element to decide which settings the author sees and how editors behave.\n\nEach element declares its own `<Name>Configuration` interface from these, and its JSON Schema is generated from that interface. Descriptions are carried over from the legacy `pie-elements` config schemas, so they appear in the generated schemas unchanged."
|
|
314
|
+
},
|
|
315
|
+
"EditableHtmlPluginConfigureRequired": {
|
|
316
|
+
"type": "object",
|
|
317
|
+
"properties": {
|
|
318
|
+
"settings": {
|
|
319
|
+
"type": "boolean",
|
|
320
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel"
|
|
321
|
+
},
|
|
322
|
+
"label": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel"
|
|
325
|
+
},
|
|
326
|
+
"inputConfiguration": {
|
|
327
|
+
"$ref": "#/definitions/EditableHtmlConfigureProp",
|
|
328
|
+
"description": "Configuration for editable-html"
|
|
329
|
+
},
|
|
330
|
+
"required": {
|
|
331
|
+
"type": "boolean",
|
|
332
|
+
"description": "Indicates if the item is required and the value cannot be empty"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"MatchMaxImageDimensions": {
|
|
337
|
+
"type": "object",
|
|
338
|
+
"properties": {
|
|
339
|
+
"teacherInstructions": {
|
|
340
|
+
"type": "number",
|
|
341
|
+
"description": "Indicates the max dimension for images in teacher instructions"
|
|
342
|
+
},
|
|
343
|
+
"prompt": {
|
|
344
|
+
"type": "number",
|
|
345
|
+
"description": "Indicates the max dimension for images in prompt - this is also the default dimension for all other input fields if it's not specified"
|
|
346
|
+
},
|
|
347
|
+
"rationale": {
|
|
348
|
+
"type": "number",
|
|
349
|
+
"description": "Indicates the max dimension for images in rationale"
|
|
350
|
+
},
|
|
351
|
+
"rowTitles": {
|
|
352
|
+
"type": "number",
|
|
353
|
+
"description": "Indicates the max dimension for images in row labels"
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
"ConfigureMathMLProp": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"properties": {
|
|
360
|
+
"mmlOutput": {
|
|
361
|
+
"type": "boolean",
|
|
362
|
+
"description": "Indicates if model should have mathML output instead of latex"
|
|
363
|
+
},
|
|
364
|
+
"mmlEditing": {
|
|
365
|
+
"type": "boolean",
|
|
366
|
+
"description": "Indicates if mathML that's already in model should be editable"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"ConfigureLanguageOptions": {
|
|
371
|
+
"type": "object",
|
|
372
|
+
"properties": {
|
|
373
|
+
"label": {
|
|
374
|
+
"type": "string"
|
|
375
|
+
},
|
|
376
|
+
"options": {
|
|
377
|
+
"type": "array",
|
|
378
|
+
"items": {
|
|
379
|
+
"$ref": "#/definitions/ConfigureLanguageOptionsProp"
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"required": [
|
|
384
|
+
"label",
|
|
385
|
+
"options"
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
"ConfigureLanguageOptionsProp": {
|
|
389
|
+
"type": "object",
|
|
390
|
+
"properties": {
|
|
391
|
+
"value": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"description": "Value of the language option"
|
|
394
|
+
},
|
|
395
|
+
"label": {
|
|
396
|
+
"type": "string",
|
|
397
|
+
"description": "Label of the language option"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
"required": [
|
|
401
|
+
"value",
|
|
402
|
+
"label"
|
|
403
|
+
]
|
|
404
|
+
},
|
|
405
|
+
"ContentDimensions": {
|
|
406
|
+
"type": "object",
|
|
407
|
+
"properties": {
|
|
408
|
+
"maxHeight": {
|
|
409
|
+
"type": [
|
|
410
|
+
"string",
|
|
411
|
+
"number"
|
|
412
|
+
]
|
|
413
|
+
},
|
|
414
|
+
"maxWidth": {
|
|
415
|
+
"type": [
|
|
416
|
+
"string",
|
|
417
|
+
"number"
|
|
418
|
+
]
|
|
419
|
+
},
|
|
420
|
+
"minHeight": {
|
|
421
|
+
"type": [
|
|
422
|
+
"string",
|
|
423
|
+
"number"
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
"minWidth": {
|
|
427
|
+
"type": [
|
|
428
|
+
"string",
|
|
429
|
+
"number"
|
|
430
|
+
]
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"description": "Indicates the dimensions configuration for the authoring container. Note: Some items have a default minimum width because of their content, but if a lower minWidth is provided, it will be used."
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"additionalProperties": false
|
|
437
|
+
}
|