@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
|
@@ -1,36 +1,37 @@
|
|
|
1
|
+
import type { MathInlineResponse } from '../types.js';
|
|
1
2
|
declare const _default: {
|
|
2
|
-
allowTrailingZerosDefault:
|
|
3
|
-
customKeys:
|
|
4
|
-
equationEditor:
|
|
3
|
+
allowTrailingZerosDefault: false;
|
|
4
|
+
customKeys: string[];
|
|
5
|
+
equationEditor: "8";
|
|
5
6
|
expression: string;
|
|
6
7
|
feedback: {
|
|
7
8
|
correct: {
|
|
8
9
|
default: string;
|
|
9
|
-
type:
|
|
10
|
+
type: "none";
|
|
10
11
|
};
|
|
11
12
|
incorrect: {
|
|
12
13
|
default: string;
|
|
13
|
-
type:
|
|
14
|
+
type: "none";
|
|
14
15
|
};
|
|
15
16
|
partial: {
|
|
16
17
|
default: string;
|
|
17
|
-
type:
|
|
18
|
+
type: "none";
|
|
18
19
|
};
|
|
19
20
|
};
|
|
20
|
-
feedbackEnabled:
|
|
21
|
-
ignoreOrderDefault:
|
|
22
|
-
partialScoring:
|
|
21
|
+
feedbackEnabled: false;
|
|
22
|
+
ignoreOrderDefault: false;
|
|
23
|
+
partialScoring: true;
|
|
23
24
|
prompt: string;
|
|
24
|
-
promptEnabled:
|
|
25
|
+
promptEnabled: true;
|
|
25
26
|
rationale: string;
|
|
26
|
-
rationaleEnabled:
|
|
27
|
-
responseType:
|
|
28
|
-
responses:
|
|
29
|
-
scoringType:
|
|
30
|
-
studentInstructionsEnabled:
|
|
27
|
+
rationaleEnabled: true;
|
|
28
|
+
responseType: "Advanced Multi";
|
|
29
|
+
responses: MathInlineResponse[];
|
|
30
|
+
scoringType: "auto";
|
|
31
|
+
studentInstructionsEnabled: true;
|
|
31
32
|
teacherInstructions: string;
|
|
32
|
-
teacherInstructionsEnabled:
|
|
33
|
-
toolbarEditorPosition:
|
|
34
|
-
validationDefault:
|
|
33
|
+
teacherInstructionsEnabled: true;
|
|
34
|
+
toolbarEditorPosition: "bottom";
|
|
35
|
+
validationDefault: "literal";
|
|
35
36
|
};
|
|
36
37
|
export default _default;
|
|
@@ -1,4 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ExtraCSSRules, PieEnvironment } from '@pie-element/shared-types';
|
|
2
|
+
import type { MathInlineConfiguration, MathInlineModel, MathInlineResponse, MathInlineSession } from '../types.js';
|
|
3
|
+
/** Correctness of the learner's answer; `score` is a number for `outcome()` and a percentage for `model()`. */
|
|
4
|
+
type MathInlineCorrectness = {
|
|
5
|
+
correctness: 'correct' | 'incorrect' | 'unanswered';
|
|
6
|
+
score: number | string;
|
|
7
|
+
correct: boolean;
|
|
8
|
+
};
|
|
9
|
+
/** The model with the controller defaults applied. */
|
|
10
|
+
type NormalizedQuestion = ReturnType<typeof normalize>;
|
|
11
|
+
/** The model as the delivery view receives it. */
|
|
12
|
+
type MathInlineViewConfig = Omit<NormalizedQuestion, 'extraCSSRules' | 'responses' | 'language' | 'prompt' | 'rationale' | 'teacherInstructions'> & {
|
|
13
|
+
responses?: MathInlineResponse[];
|
|
14
|
+
prompt?: string | null;
|
|
15
|
+
rationale?: string | null;
|
|
16
|
+
teacherInstructions?: string | null;
|
|
17
|
+
showNote?: boolean;
|
|
18
|
+
note?: string;
|
|
19
|
+
env?: PieEnvironment;
|
|
20
|
+
};
|
|
21
|
+
type MathInlineViewModel = {
|
|
22
|
+
extraCSSRules?: ExtraCSSRules;
|
|
23
|
+
config: MathInlineViewConfig;
|
|
24
|
+
correctness?: MathInlineCorrectness;
|
|
25
|
+
feedback?: string;
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
view: boolean;
|
|
28
|
+
correctResponse?: Record<string, never>;
|
|
29
|
+
rationale?: string | null;
|
|
30
|
+
teacherInstructions?: string | null;
|
|
31
|
+
language?: string;
|
|
32
|
+
};
|
|
33
|
+
type MathInlineOutcome = {
|
|
34
|
+
score: number | string | undefined;
|
|
35
|
+
completed?: undefined;
|
|
36
|
+
empty?: boolean;
|
|
37
|
+
logTrace: string[];
|
|
38
|
+
};
|
|
39
|
+
/** Errors `validate()` reports, keyed by field; `responsesErrors` is keyed by response index, then by `answer` or alternate id. */
|
|
40
|
+
export type MathInlineValidationErrors = {
|
|
41
|
+
teacherInstructions?: string;
|
|
42
|
+
prompt?: string;
|
|
43
|
+
rationale?: string;
|
|
44
|
+
responseAreasError?: string;
|
|
45
|
+
responsesErrors?: Record<number, Record<string, string>>;
|
|
46
|
+
};
|
|
47
|
+
export declare function createDefaultModel(model?: Partial<MathInlineModel>): Promise<Partial<MathInlineModel>>;
|
|
2
48
|
/**
|
|
3
49
|
* Generates detailed trace log for math-inline scoring evaluation
|
|
4
50
|
* @param {Object} question
|
|
@@ -6,9 +52,58 @@ export declare function createDefaultModel(model?: {}): Promise<unknown>;
|
|
|
6
52
|
* @param {Object} env
|
|
7
53
|
* @returns {Array<string>} traceLog
|
|
8
54
|
*/
|
|
9
|
-
export declare const getLogTrace: (question:
|
|
10
|
-
export declare const outcome: (question:
|
|
11
|
-
export declare const normalize: (question:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
55
|
+
export declare const getLogTrace: (question: MathInlineModel, session: MathInlineSession | undefined, env: PieEnvironment) => string[];
|
|
56
|
+
export declare const outcome: (question: MathInlineModel, session: MathInlineSession | undefined, env: PieEnvironment) => Promise<MathInlineOutcome>;
|
|
57
|
+
export declare const normalize: (question: MathInlineModel) => {
|
|
58
|
+
config?: import("../types.js").MathInlineModelSettings;
|
|
59
|
+
id: string;
|
|
60
|
+
element: string;
|
|
61
|
+
accessibilityCatalogs?: import("@pie-element/shared-types").AccessibilityCatalog[];
|
|
62
|
+
responseType: import("../types.js").MathInlineResponseType;
|
|
63
|
+
prompt: string;
|
|
64
|
+
promptEnabled: boolean;
|
|
65
|
+
expression: string;
|
|
66
|
+
equationEditor: import("../types.js").EquationEditor;
|
|
67
|
+
promptEquationEditor?: import("../types.js").EquationEditor;
|
|
68
|
+
feedback: import("../types.js").ComplexFeedback | {
|
|
69
|
+
correct: {
|
|
70
|
+
default: string;
|
|
71
|
+
type: "none";
|
|
72
|
+
};
|
|
73
|
+
incorrect: {
|
|
74
|
+
default: string;
|
|
75
|
+
type: "none";
|
|
76
|
+
};
|
|
77
|
+
partial: {
|
|
78
|
+
default: string;
|
|
79
|
+
type: "none";
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
responses: MathInlineResponse[];
|
|
83
|
+
defaultResponse?: MathInlineResponse;
|
|
84
|
+
partialScoring: boolean;
|
|
85
|
+
validationDefault: "literal" | "symbolic";
|
|
86
|
+
ignoreOrderDefault: boolean;
|
|
87
|
+
allowTrailingZerosDefault: boolean;
|
|
88
|
+
rationale: string;
|
|
89
|
+
scoringType: "auto" | "rubric";
|
|
90
|
+
studentInstructions?: string;
|
|
91
|
+
teacherInstructions: string;
|
|
92
|
+
customKeys: string[];
|
|
93
|
+
feedbackEnabled: boolean;
|
|
94
|
+
rationaleEnabled: boolean;
|
|
95
|
+
spellCheckEnabled?: boolean;
|
|
96
|
+
studentInstructionsEnabled: boolean;
|
|
97
|
+
teacherInstructionsEnabled: boolean;
|
|
98
|
+
note?: string;
|
|
99
|
+
toolbarEditorPosition: "bottom" | "top";
|
|
100
|
+
rubricEnabled?: boolean;
|
|
101
|
+
language?: string;
|
|
102
|
+
extraCSSRules?: ExtraCSSRules;
|
|
103
|
+
ignoreOrder?: import("../types.js").MathInlineToggle;
|
|
104
|
+
allowTrailingZeros?: import("../types.js").MathInlineToggle;
|
|
105
|
+
};
|
|
106
|
+
export declare const model: (question: MathInlineModel, session: MathInlineSession | undefined, env: PieEnvironment) => Promise<MathInlineViewModel>;
|
|
107
|
+
export declare const createCorrectResponseSession: (question: MathInlineModel, env: PieEnvironment) => Promise<MathInlineSession | null>;
|
|
108
|
+
export declare const validate: (model?: Partial<MathInlineModel>, config?: MathInlineConfiguration) => MathInlineValidationErrors;
|
|
109
|
+
export {};
|
package/dist/controller/index.js
CHANGED
|
@@ -29,14 +29,14 @@ function u(e, n) {
|
|
|
29
29
|
allowTrailingZeros: e.allowTrailingZeros || !1,
|
|
30
30
|
ignoreOrder: e.ignoreOrder || !1
|
|
31
31
|
});
|
|
32
|
-
let a = [e.answer].concat(Object.keys(
|
|
33
|
-
for (let e = 0; e <
|
|
34
|
-
if (o.latexEqual(n,
|
|
32
|
+
let a = e.alternates || {}, s = [e.answer].concat(Object.keys(a).map((e) => a[e]));
|
|
33
|
+
for (let e = 0; e < s.length; e++) try {
|
|
34
|
+
if (o.latexEqual(n, s[e], i)) {
|
|
35
35
|
r = !0;
|
|
36
36
|
break;
|
|
37
37
|
}
|
|
38
38
|
} catch (t) {
|
|
39
|
-
c("Parse failure when evaluating math",
|
|
39
|
+
c("Parse failure when evaluating math", s[e], n, t);
|
|
40
40
|
continue;
|
|
41
41
|
}
|
|
42
42
|
}), r;
|
|
@@ -65,8 +65,8 @@ var p = (t, n, r) => {
|
|
|
65
65
|
let t = e.allowTrailingZeros || !1, n = e.ignoreOrder || !1;
|
|
66
66
|
i.push(`Allow trailing zeros: ${t ? "enabled" : "disabled"}.`), i.push(`Ignore order: ${n ? "enabled" : "disabled"}.`);
|
|
67
67
|
}
|
|
68
|
-
let a = [e.answer].concat(Object.keys(
|
|
69
|
-
|
|
68
|
+
let a = e.alternates || {}, o = [e.answer].concat(Object.keys(a).map((e) => a[e]));
|
|
69
|
+
o.length > 1 && i.push(`Accepted answers: ${o.length} (including alternates).`);
|
|
70
70
|
});
|
|
71
71
|
let l = d(t, r, n, !0);
|
|
72
72
|
return l.correctness === "correct" ? i.push("Student answer matches one of the accepted responses.") : l.correctness === "incorrect" ? i.push("Student answer does not match any of the accepted responses.") : i.push("Student answer could not be evaluated."), i.push(`Response evaluated as ${l.correctness}.`), i.push(`Final score: ${l.score}.`), i;
|
|
@@ -92,17 +92,17 @@ var p = (t, n, r) => {
|
|
|
92
92
|
...t,
|
|
93
93
|
...e
|
|
94
94
|
}), g = (t, n, r) => new Promise((i) => {
|
|
95
|
-
let o = h(t), l = d(o, r, n), { extraCSSRules: u, responses: f, language: p, ...m } = o;
|
|
96
|
-
|
|
97
|
-
let
|
|
95
|
+
let o = h(t), l = d(o, r, n), { extraCSSRules: u, responses: f, language: p, ...m } = o, g = m;
|
|
96
|
+
g.responses = g.responseType === e.simple ? f.slice(0, 1) : f;
|
|
97
|
+
let _ = {
|
|
98
98
|
extraCSSRules: u,
|
|
99
|
-
config:
|
|
99
|
+
config: g,
|
|
100
100
|
correctness: l,
|
|
101
101
|
feedback: r.mode === "evaluate" && o.feedbackEnabled ? a(l?.correctness, o.feedback) : void 0,
|
|
102
102
|
disabled: r.mode !== "gather",
|
|
103
103
|
view: r.mode === "view"
|
|
104
|
-
},
|
|
105
|
-
r.mode === "evaluate" ? (
|
|
104
|
+
}, v = o.note || s.t("mathInline.primaryCorrectWithAlternates", { lng: p }), y = (g?.responses?.length ?? 0) > 1 || (g?.responses || []).some((e) => e.validation === "symbolic" || Object.keys(e.alternates || {}).length > 0);
|
|
105
|
+
r.mode === "evaluate" ? (_.correctResponse = {}, _.config.showNote = y, _.config.note = v) : (_.config.responses = [], _.config.showNote = !1), r.role === "instructor" && (r.mode === "view" || r.mode === "evaluate") ? (_.rationale = o.rationaleEnabled ? o.rationale : null, _.teacherInstructions = o.teacherInstructionsEnabled ? o.teacherInstructions : null) : (_.rationale = null, _.teacherInstructions = null, _.config.rationale = null, _.config.teacherInstructions = null), _.config.env = r, _.config.prompt = o.promptEnabled ? o.prompt : null, _.language = p, c("out: ", _), i(_);
|
|
106
106
|
}), _ = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), v = (e) => new Promise((t) => {
|
|
107
107
|
let { responses: n, id: r } = e, { answer: i } = n && n.length ? n[0] : {};
|
|
108
108
|
t({
|
|
@@ -145,7 +145,7 @@ var p = (t, n, r) => {
|
|
|
145
145
|
completeAnswer: i
|
|
146
146
|
}), console.error(e.toString());
|
|
147
147
|
}
|
|
148
|
-
}), x = (e, t) => t.mode === "evaluate" || t.role !== "instructor" ? (console.error("can not create correct response session if mode is evaluate or role is not instructor"), Promise.resolve(null)) : (e.responseType || "").toLowerCase() === "simple" ? v(e
|
|
148
|
+
}), x = (e, t) => t.mode === "evaluate" || t.role !== "instructor" ? (console.error("can not create correct response session if mode is evaluate or role is not instructor"), Promise.resolve(null)) : (e.responseType || "").toLowerCase() === "simple" ? v(e) : b(e), S = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), C = (e = {}, t = {}) => {
|
|
149
149
|
let { expression: n = "", responses: r, responseType: a } = e, { maxResponseAreas: o } = t, s = {}, c = {};
|
|
150
150
|
if ([
|
|
151
151
|
"teacherInstructions",
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,385 @@
|
|
|
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/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
|
+
"prompt": {
|
|
11
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
|
|
12
|
+
"description": "Configuration for prompt"
|
|
13
|
+
},
|
|
14
|
+
"feedback": {
|
|
15
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
16
|
+
"description": "Settings Panel control for feedback"
|
|
17
|
+
},
|
|
18
|
+
"responseType": {
|
|
19
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
20
|
+
"description": "Configuration for response type"
|
|
21
|
+
},
|
|
22
|
+
"partialScoring": {
|
|
23
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
24
|
+
"description": "Not read by this element"
|
|
25
|
+
},
|
|
26
|
+
"rationale": {
|
|
27
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
|
|
28
|
+
"description": "Rationale configuration"
|
|
29
|
+
},
|
|
30
|
+
"settingsPanelDisabled": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"description": "Indicates if the settings panel is not available"
|
|
33
|
+
},
|
|
34
|
+
"spellCheck": {
|
|
35
|
+
"$ref": "#/definitions/ConfigurePropWithEnabled",
|
|
36
|
+
"description": "Configuration for the author's spellcheck; `enabled` is not read"
|
|
37
|
+
},
|
|
38
|
+
"scoringType": {
|
|
39
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
40
|
+
"description": "Scoring Type configuration"
|
|
41
|
+
},
|
|
42
|
+
"studentInstructions": {
|
|
43
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
44
|
+
"description": "Student Instructions configuration"
|
|
45
|
+
},
|
|
46
|
+
"teacherInstructions": {
|
|
47
|
+
"$ref": "#/definitions/EditableHtmlPluginConfigureRequired",
|
|
48
|
+
"description": "Teacher Instructions configuration"
|
|
49
|
+
},
|
|
50
|
+
"ignoreOrder": {
|
|
51
|
+
"$ref": "#/definitions/ConfigurePropWithEnabled",
|
|
52
|
+
"description": "Ignore Order configuration; `enabled` shows the control on each response"
|
|
53
|
+
},
|
|
54
|
+
"allowTrailingZeros": {
|
|
55
|
+
"$ref": "#/definitions/ConfigurePropWithEnabled",
|
|
56
|
+
"description": "Allow Trailing Zeros configuration; `enabled` shows the control on each response"
|
|
57
|
+
},
|
|
58
|
+
"maxResponseAreas": {
|
|
59
|
+
"type": "number",
|
|
60
|
+
"description": "Maximum number of response areas"
|
|
61
|
+
},
|
|
62
|
+
"maxImageWidth": {
|
|
63
|
+
"$ref": "#/definitions/ConfigureMaxImageDimensionsProp",
|
|
64
|
+
"description": "Maximum image width for input fields"
|
|
65
|
+
},
|
|
66
|
+
"maxImageHeight": {
|
|
67
|
+
"$ref": "#/definitions/ConfigureMaxImageDimensionsProp",
|
|
68
|
+
"description": "Maximum image height for input fields"
|
|
69
|
+
},
|
|
70
|
+
"withRubric": {
|
|
71
|
+
"$ref": "#/definitions/ConfigureProp",
|
|
72
|
+
"description": "Rubric configuration - only relevant in environments that use pie-player-components"
|
|
73
|
+
},
|
|
74
|
+
"mathMlOptions": {
|
|
75
|
+
"$ref": "#/definitions/ConfigureMathMLProp",
|
|
76
|
+
"description": "Configuration for editable-html"
|
|
77
|
+
},
|
|
78
|
+
"language": {
|
|
79
|
+
"$ref": "#/definitions/ConfigurePropWithEnabled",
|
|
80
|
+
"description": "Language configuration"
|
|
81
|
+
},
|
|
82
|
+
"languageChoices": {
|
|
83
|
+
"$ref": "#/definitions/ConfigureLanguageOptions",
|
|
84
|
+
"description": "Language choices configuration Only available if language is enabled"
|
|
85
|
+
},
|
|
86
|
+
"contentDimensions": {
|
|
87
|
+
"$ref": "#/definitions/ContentDimensions",
|
|
88
|
+
"description": "Dimensions of the authoring container"
|
|
89
|
+
},
|
|
90
|
+
"showPrompt": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"description": "Not read by this element: the model's `promptEnabled` shows the prompt"
|
|
93
|
+
},
|
|
94
|
+
"promptLabel": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"description": "Not read by this element: `prompt.label` labels the prompt"
|
|
97
|
+
},
|
|
98
|
+
"settingsPartialScoring": {
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"description": "Not read by this element"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"description": "Config Object for `@pie-element/math-inline`",
|
|
104
|
+
"definitions": {
|
|
105
|
+
"EditableHtmlConfigureProp": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"properties": {
|
|
108
|
+
"math": {
|
|
109
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
110
|
+
},
|
|
111
|
+
"audio": {
|
|
112
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
113
|
+
},
|
|
114
|
+
"video": {
|
|
115
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
116
|
+
},
|
|
117
|
+
"image": {
|
|
118
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
119
|
+
},
|
|
120
|
+
"customPlugins": {
|
|
121
|
+
"type": "array",
|
|
122
|
+
"items": {
|
|
123
|
+
"$ref": "#/definitions/CustomPlugin"
|
|
124
|
+
},
|
|
125
|
+
"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)."
|
|
126
|
+
},
|
|
127
|
+
"blockquote": {
|
|
128
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
129
|
+
},
|
|
130
|
+
"h3": {
|
|
131
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
132
|
+
},
|
|
133
|
+
"characters": {
|
|
134
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
135
|
+
},
|
|
136
|
+
"bold": {
|
|
137
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
138
|
+
},
|
|
139
|
+
"html": {
|
|
140
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
141
|
+
},
|
|
142
|
+
"italic": {
|
|
143
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
144
|
+
},
|
|
145
|
+
"ol_list": {
|
|
146
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
147
|
+
},
|
|
148
|
+
"redo": {
|
|
149
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
150
|
+
},
|
|
151
|
+
"strikethrough": {
|
|
152
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
153
|
+
},
|
|
154
|
+
"sub": {
|
|
155
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
156
|
+
},
|
|
157
|
+
"sup": {
|
|
158
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
159
|
+
},
|
|
160
|
+
"table": {
|
|
161
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
162
|
+
},
|
|
163
|
+
"ul_list": {
|
|
164
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
165
|
+
},
|
|
166
|
+
"underline": {
|
|
167
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
168
|
+
},
|
|
169
|
+
"undo": {
|
|
170
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
171
|
+
},
|
|
172
|
+
"textAlign": {
|
|
173
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
174
|
+
},
|
|
175
|
+
"showParagraphs": {
|
|
176
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
177
|
+
},
|
|
178
|
+
"separateParagraphs": {
|
|
179
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
180
|
+
},
|
|
181
|
+
"pasteFormatting": {
|
|
182
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
183
|
+
},
|
|
184
|
+
"superscript": {
|
|
185
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
186
|
+
},
|
|
187
|
+
"subscript": {
|
|
188
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
189
|
+
},
|
|
190
|
+
"languageCharacters": {
|
|
191
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
192
|
+
},
|
|
193
|
+
"responseArea": {
|
|
194
|
+
"$ref": "#/definitions/EditableHtmlButtonConfigure"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"description": "Toolbar plugins of an editable-html field, keyed by plugin name."
|
|
198
|
+
},
|
|
199
|
+
"EditableHtmlButtonConfigure": {
|
|
200
|
+
"type": "object",
|
|
201
|
+
"properties": {
|
|
202
|
+
"disabled": {
|
|
203
|
+
"type": "boolean",
|
|
204
|
+
"description": "Indicates if the plugin is disabled or not"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"CustomPlugin": {
|
|
209
|
+
"type": "object",
|
|
210
|
+
"properties": {
|
|
211
|
+
"event": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"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."
|
|
214
|
+
},
|
|
215
|
+
"iconAlt": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"description": "The alt for the custom button icon"
|
|
218
|
+
},
|
|
219
|
+
"iconType": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"description": "The icon type. Currently, only \"SVG\" is supported."
|
|
222
|
+
},
|
|
223
|
+
"icon": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"description": "The icon string. Currently, only SVG is supported, so it needs to be a valid svg."
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"required": [
|
|
229
|
+
"event",
|
|
230
|
+
"iconAlt",
|
|
231
|
+
"iconType",
|
|
232
|
+
"icon"
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
"EditableHtmlPluginConfigureRequired": {
|
|
236
|
+
"type": "object",
|
|
237
|
+
"properties": {
|
|
238
|
+
"settings": {
|
|
239
|
+
"type": "boolean",
|
|
240
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel"
|
|
241
|
+
},
|
|
242
|
+
"label": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel"
|
|
245
|
+
},
|
|
246
|
+
"inputConfiguration": {
|
|
247
|
+
"$ref": "#/definitions/EditableHtmlConfigureProp",
|
|
248
|
+
"description": "Configuration for editable-html"
|
|
249
|
+
},
|
|
250
|
+
"required": {
|
|
251
|
+
"type": "boolean",
|
|
252
|
+
"description": "Indicates if the item is required and the value cannot be empty"
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
"ConfigureProp": {
|
|
257
|
+
"type": "object",
|
|
258
|
+
"properties": {
|
|
259
|
+
"settings": {
|
|
260
|
+
"type": "boolean",
|
|
261
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel"
|
|
262
|
+
},
|
|
263
|
+
"label": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"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."
|
|
269
|
+
},
|
|
270
|
+
"ConfigurePropWithEnabled": {
|
|
271
|
+
"type": "object",
|
|
272
|
+
"properties": {
|
|
273
|
+
"settings": {
|
|
274
|
+
"type": "boolean",
|
|
275
|
+
"description": "Indicates if the item has to be displayed in the Settings Panel"
|
|
276
|
+
},
|
|
277
|
+
"label": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"description": "Indicates the label for the item that has to be displayed in the Settings Panel"
|
|
280
|
+
},
|
|
281
|
+
"enabled": {
|
|
282
|
+
"type": "boolean",
|
|
283
|
+
"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)"
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"ConfigureMaxImageDimensionsProp": {
|
|
288
|
+
"type": "object",
|
|
289
|
+
"properties": {
|
|
290
|
+
"teacherInstructions": {
|
|
291
|
+
"type": "number",
|
|
292
|
+
"description": "Indicates the max dimension for images in teacher instructions"
|
|
293
|
+
},
|
|
294
|
+
"prompt": {
|
|
295
|
+
"type": "number",
|
|
296
|
+
"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"
|
|
297
|
+
},
|
|
298
|
+
"rationale": {
|
|
299
|
+
"type": "number",
|
|
300
|
+
"description": "Indicates the max dimension for images in rationale"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"description": "Maximum image dimensions per editable field. Elements extend it with their own fields."
|
|
304
|
+
},
|
|
305
|
+
"ConfigureMathMLProp": {
|
|
306
|
+
"type": "object",
|
|
307
|
+
"properties": {
|
|
308
|
+
"mmlOutput": {
|
|
309
|
+
"type": "boolean",
|
|
310
|
+
"description": "Indicates if model should have mathML output instead of latex"
|
|
311
|
+
},
|
|
312
|
+
"mmlEditing": {
|
|
313
|
+
"type": "boolean",
|
|
314
|
+
"description": "Indicates if mathML that's already in model should be editable"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"ConfigureLanguageOptions": {
|
|
319
|
+
"type": "object",
|
|
320
|
+
"properties": {
|
|
321
|
+
"label": {
|
|
322
|
+
"type": "string"
|
|
323
|
+
},
|
|
324
|
+
"options": {
|
|
325
|
+
"type": "array",
|
|
326
|
+
"items": {
|
|
327
|
+
"$ref": "#/definitions/ConfigureLanguageOptionsProp"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"required": [
|
|
332
|
+
"label",
|
|
333
|
+
"options"
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
"ConfigureLanguageOptionsProp": {
|
|
337
|
+
"type": "object",
|
|
338
|
+
"properties": {
|
|
339
|
+
"value": {
|
|
340
|
+
"type": "string",
|
|
341
|
+
"description": "Value of the language option"
|
|
342
|
+
},
|
|
343
|
+
"label": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"description": "Label of the language option"
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"required": [
|
|
349
|
+
"value",
|
|
350
|
+
"label"
|
|
351
|
+
]
|
|
352
|
+
},
|
|
353
|
+
"ContentDimensions": {
|
|
354
|
+
"type": "object",
|
|
355
|
+
"properties": {
|
|
356
|
+
"maxHeight": {
|
|
357
|
+
"type": [
|
|
358
|
+
"string",
|
|
359
|
+
"number"
|
|
360
|
+
]
|
|
361
|
+
},
|
|
362
|
+
"maxWidth": {
|
|
363
|
+
"type": [
|
|
364
|
+
"string",
|
|
365
|
+
"number"
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
"minHeight": {
|
|
369
|
+
"type": [
|
|
370
|
+
"string",
|
|
371
|
+
"number"
|
|
372
|
+
]
|
|
373
|
+
},
|
|
374
|
+
"minWidth": {
|
|
375
|
+
"type": [
|
|
376
|
+
"string",
|
|
377
|
+
"number"
|
|
378
|
+
]
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"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."
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
"additionalProperties": false
|
|
385
|
+
}
|