@pie-element/math-inline 12.1.1-next.12 → 12.1.2

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.
Files changed (101) hide show
  1. package/CHANGELOG.json +2627 -0
  2. package/CHANGELOG.md +2483 -0
  3. package/LICENSE.md +5 -0
  4. package/README.md +3 -0
  5. package/configure/CHANGELOG.json +1652 -0
  6. package/configure/CHANGELOG.md +2111 -0
  7. package/configure/lib/configure.js +186 -0
  8. package/configure/lib/configure.js.map +1 -0
  9. package/configure/lib/defaults.js +185 -0
  10. package/configure/lib/defaults.js.map +1 -0
  11. package/configure/lib/general-config-block.js +525 -0
  12. package/configure/lib/general-config-block.js.map +1 -0
  13. package/configure/lib/index.js +136 -0
  14. package/configure/lib/index.js.map +1 -0
  15. package/configure/lib/response.js +369 -0
  16. package/configure/lib/response.js.map +1 -0
  17. package/configure/lib/utils.js +31 -0
  18. package/configure/lib/utils.js.map +1 -0
  19. package/configure/package.json +29 -0
  20. package/controller/CHANGELOG.json +1002 -0
  21. package/controller/CHANGELOG.md +1540 -0
  22. package/controller/lib/defaults.js +43 -0
  23. package/controller/lib/defaults.js.map +1 -0
  24. package/controller/lib/index.js +383 -0
  25. package/controller/lib/index.js.map +1 -0
  26. package/controller/lib/utils.js +11 -0
  27. package/controller/lib/utils.js.map +1 -0
  28. package/controller/package.json +26 -0
  29. package/docs/config-schema.json +2071 -0
  30. package/docs/config-schema.json.md +1533 -0
  31. package/docs/demo/config.js +8 -0
  32. package/docs/demo/generate.js +41 -0
  33. package/docs/demo/index.html +1 -0
  34. package/docs/demo/session.js +11 -0
  35. package/docs/pie-schema.json +1472 -0
  36. package/docs/pie-schema.json.md +845 -0
  37. package/lib/index.js +93 -0
  38. package/lib/index.js.map +1 -0
  39. package/lib/main.js +1030 -0
  40. package/lib/main.js.map +1 -0
  41. package/lib/print.js +92 -0
  42. package/lib/print.js.map +1 -0
  43. package/lib/simple-question-block.js +148 -0
  44. package/lib/simple-question-block.js.map +1 -0
  45. package/lib/utils.js +11 -0
  46. package/lib/utils.js.map +1 -0
  47. package/package.json +26 -93
  48. package/configure.js +0 -2
  49. package/controller.js +0 -1
  50. package/dist/author/configure.d.ts +0 -25
  51. package/dist/author/configure.js +0 -114
  52. package/dist/author/defaults.d.ts +0 -186
  53. package/dist/author/defaults.js +0 -145
  54. package/dist/author/general-config-block.d.ts +0 -35
  55. package/dist/author/general-config-block.js +0 -390
  56. package/dist/author/index.d.ts +0 -60
  57. package/dist/author/index.js +0 -77
  58. package/dist/author/response.d.ts +0 -40
  59. package/dist/author/response.js +0 -238
  60. package/dist/author/utils.d.ts +0 -14
  61. package/dist/author/utils.js +0 -13
  62. package/dist/browser/author/index.js +0 -30246
  63. package/dist/browser/author/index.js.map +0 -1
  64. package/dist/browser/controller/index.js +0 -37789
  65. package/dist/browser/controller/index.js.map +0 -1
  66. package/dist/browser/delivery/index.js +0 -84
  67. package/dist/browser/delivery/index.js.map +0 -1
  68. package/dist/browser/dist-BJ5Sm1Fi.js +0 -313
  69. package/dist/browser/dist-BJ5Sm1Fi.js.map +0 -1
  70. package/dist/browser/dist-D9ARZhQk.js +0 -1426
  71. package/dist/browser/dist-D9ARZhQk.js.map +0 -1
  72. package/dist/browser/dist-OamHPwLm.js +0 -19418
  73. package/dist/browser/dist-OamHPwLm.js.map +0 -1
  74. package/dist/browser/main-BDByYWlm.js +0 -973
  75. package/dist/browser/main-BDByYWlm.js.map +0 -1
  76. package/dist/browser/math-inline.css +0 -2
  77. package/dist/browser/print/index.js +0 -50
  78. package/dist/browser/print/index.js.map +0 -1
  79. package/dist/controller/defaults.d.ts +0 -44
  80. package/dist/controller/defaults.js +0 -39
  81. package/dist/controller/index.d.ts +0 -22
  82. package/dist/controller/index.js +0 -171
  83. package/dist/controller/utils.d.ts +0 -12
  84. package/dist/controller/utils.js +0 -7
  85. package/dist/delivery/index.d.ts +0 -22
  86. package/dist/delivery/index.js +0 -55
  87. package/dist/delivery/main.d.ts +0 -44
  88. package/dist/delivery/main.js +0 -606
  89. package/dist/delivery/simple-question-block.d.ts +0 -27
  90. package/dist/delivery/simple-question-block.js +0 -94
  91. package/dist/delivery/utils.d.ts +0 -12
  92. package/dist/delivery/utils.js +0 -7
  93. package/dist/index.d.ts +0 -1
  94. package/dist/index.iife.d.ts +0 -8
  95. package/dist/index.iife.js +0 -227
  96. package/dist/index.js +0 -2
  97. package/dist/math-inline.css +0 -2
  98. package/dist/print/index.d.ts +0 -15
  99. package/dist/print/index.js +0 -50
  100. package/dist/runtime-support.d.ts +0 -12
  101. package/dist/runtime-support.js +0 -12
@@ -1,25 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/math-inline/configure/src/configure.jsx
3
- * @auto-generated
4
- *
5
- * This file is automatically synced from pie-elements and converted to TypeScript.
6
- * Manual edits will be overwritten on next sync.
7
- * To make changes, edit the upstream JavaScript file and run sync again.
8
- */
9
- import React from 'react';
10
- import PropTypes from 'prop-types';
11
- export declare class Configure extends React.Component {
12
- static propTypes: {
13
- onModelChanged: PropTypes.Requireable<(...args: any[]) => any>;
14
- onConfigurationChanged: PropTypes.Requireable<(...args: any[]) => any>;
15
- model: PropTypes.Validator<object>;
16
- configuration: PropTypes.Validator<object>;
17
- imageSupport: PropTypes.Requireable<object>;
18
- uploadSoundSupport: PropTypes.Requireable<object>;
19
- };
20
- onChange: any;
21
- changeTeacherInstructions: any;
22
- onFeedbackChange: any;
23
- render(): React.JSX.Element;
24
- }
25
- export default Configure;
@@ -1,114 +0,0 @@
1
- import { ResponseTypes as e, getPluginProps as t } from "./utils.js";
2
- import n from "./general-config-block.js";
3
- import r from "react";
4
- import i from "debug";
5
- import a from "prop-types";
6
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
7
- import { styled as c } from "@mui/material/styles";
8
- import { FeedbackConfig as l, InputContainer as u, layout as d, settings as f } from "@pie-lib/config-ui";
9
- import p from "@pie-lib/editable-html-tip-tap";
10
- //#region src/author/configure.tsx
11
- var m = i("@pie-element:math-inline:configure"), { Panel: h, toggle: g, radio: _, dropdown: v } = f, y = c(u)(({ theme: e }) => ({
12
- width: "100%",
13
- paddingTop: e.spacing(2),
14
- marginBottom: e.spacing(2)
15
- })), b = c("div")(({ theme: e }) => ({
16
- fontSize: e.typography.fontSize - 2,
17
- color: e.palette.error.main,
18
- paddingTop: e.spacing(1)
19
- })), x = class extends r.Component {
20
- static propTypes = {
21
- onModelChanged: a.func,
22
- onConfigurationChanged: a.func,
23
- model: a.object.isRequired,
24
- configuration: a.object.isRequired,
25
- imageSupport: a.object,
26
- uploadSoundSupport: a.object
27
- };
28
- onChange = (e) => {
29
- this.props.onModelChanged(e);
30
- };
31
- changeTeacherInstructions = (e) => {
32
- this.props.onModelChanged({
33
- ...this.props.model,
34
- teacherInstructions: e
35
- });
36
- };
37
- onFeedbackChange = (e) => {
38
- let { model: t, onModelChanged: n } = this.props;
39
- t.feedback = e, n(t);
40
- };
41
- render() {
42
- let { model: r, imageSupport: i, onModelChanged: a, configuration: c, onConfigurationChanged: u, uploadSoundSupport: f } = this.props, { allowTrailingZeros: x = {}, baseInputConfiguration: S = {}, contentDimensions: C = {}, feedback: w = {}, ignoreOrder: T = {}, maxImageWidth: E = {}, maxImageHeight: D = {}, prompt: O = {}, rationale: k = {}, responseType: A = {}, scoringType: j = {}, settingsPanelDisabled: M, spellCheck: N = {}, studentInstructions: P = {}, teacherInstructions: F = {}, withRubric: I = {}, mathMlOptions: L = {}, language: R = {}, languageChoices: z = {} } = c || {}, { errors: B = {}, extraCSSRules: V, feedbackEnabled: H, promptEnabled: U, rationaleEnabled: W, spellCheckEnabled: G, teacherInstructionsEnabled: K, toolbarEditorPosition: q } = r || {}, { teacherInstructions: J } = B;
43
- m("[render] model", r);
44
- let Y = { position: q === "top" ? "top" : "bottom" }, X = E && E.prompt, Z = D && D.prompt, Q = {
45
- responseType: A.settings && _(A.label, [e.simple, e.advanced]),
46
- feedbackEnabled: w.settings && g(w.label),
47
- promptEnabled: O.settings && g(O.label),
48
- "language.enabled": R.settings && g(R.label, !0),
49
- language: R.settings && R.enabled && v(z.label, z.options)
50
- }, $ = {
51
- teacherInstructionsEnabled: F.settings && g(F.label),
52
- studentInstructionsEnabled: P.settings && g(P.label),
53
- rationaleEnabled: k.settings && g(k.label),
54
- spellCheckEnabled: N.settings && g(N.label),
55
- scoringType: j.settings && _(j.label, ["auto", "rubric"]),
56
- "ignoreOrder.enabled": T.settings && g(T.label),
57
- "allowTrailingZeros.enabled": x.settings && g(x.label),
58
- rubricEnabled: I?.settings && g(I?.label)
59
- };
60
- return /* @__PURE__ */ s(d.ConfigLayout, {
61
- extraCSSRules: V,
62
- dimensions: C,
63
- hideSettings: M,
64
- settings: /* @__PURE__ */ o(h, {
65
- model: r,
66
- configuration: c,
67
- onChangeModel: (e) => a(e),
68
- onChangeConfiguration: (e) => u(e),
69
- groups: {
70
- Settings: Q,
71
- Properties: $
72
- }
73
- }),
74
- children: [
75
- K && /* @__PURE__ */ s(y, {
76
- label: F.label,
77
- children: [/* @__PURE__ */ o(p, {
78
- markup: r.teacherInstructions || "",
79
- onChange: this.changeTeacherInstructions,
80
- imageSupport: i,
81
- nonEmpty: !1,
82
- error: J,
83
- toolbarOpts: Y,
84
- pluginProps: t(F?.inputConfiguration, S),
85
- spellCheck: G,
86
- maxImageWidth: E && E.teacherInstructions || X,
87
- maxImageHeight: D && D.teacherInstructions || Z,
88
- uploadSoundSupport: f,
89
- languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
90
- mathMlOptions: L
91
- }), J && /* @__PURE__ */ o(b, { children: J })]
92
- }),
93
- /* @__PURE__ */ o(n, {
94
- imageSupport: i,
95
- uploadSoundSupport: f,
96
- model: r,
97
- configuration: c,
98
- onChange: this.onChange,
99
- rationaleEnabled: W,
100
- promptEnabled: U,
101
- toolbarOpts: Y,
102
- spellCheck: G
103
- }),
104
- H && /* @__PURE__ */ o(l, {
105
- feedback: r.feedback,
106
- onChange: this.onFeedbackChange,
107
- toolbarOpts: Y
108
- })
109
- ]
110
- });
111
- }
112
- };
113
- //#endregion
114
- export { x as default };
@@ -1,186 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/math-inline/configure/src/defaults.js
3
- * @auto-generated
4
- *
5
- * This file is automatically synced from pie-elements and converted to TypeScript.
6
- * Manual edits will be overwritten on next sync.
7
- * To make changes, edit the upstream JavaScript file and run sync again.
8
- */
9
- /** NOTE: teacherInstructions, studentInstructions, rationale & scoringType
10
- * functionalities are not defined yet - the value for those can belong to
11
- * model or to configure
12
- */
13
- declare const _default: {
14
- model: {
15
- allowTrailingZerosDefault: boolean;
16
- customKeys: never[];
17
- equationEditor: string;
18
- expression: string;
19
- feedback: {
20
- correct: {
21
- default: string;
22
- type: string;
23
- };
24
- incorrect: {
25
- default: string;
26
- type: string;
27
- };
28
- partial: {
29
- default: string;
30
- type: string;
31
- };
32
- };
33
- feedbackEnabled: boolean;
34
- ignoreOrderDefault: boolean;
35
- partialScoring: boolean;
36
- prompt: string;
37
- promptEnabled: boolean;
38
- rationale: string;
39
- rationaleEnabled: boolean;
40
- responseType: string;
41
- responses: never[];
42
- scoringType: string;
43
- studentInstructionsEnabled: boolean;
44
- teacherInstructions: string;
45
- teacherInstructionsEnabled: boolean;
46
- toolbarEditorPosition: string;
47
- validationDefault: string;
48
- };
49
- configuration: {
50
- baseInputConfiguration: {
51
- h3: {
52
- disabled: boolean;
53
- };
54
- audio: {
55
- disabled: boolean;
56
- };
57
- video: {
58
- disabled: boolean;
59
- };
60
- image: {
61
- disabled: boolean;
62
- };
63
- textAlign: {
64
- disabled: boolean;
65
- };
66
- showParagraphs: {
67
- disabled: boolean;
68
- };
69
- separateParagraphs: {
70
- disabled: boolean;
71
- };
72
- };
73
- prompt: {
74
- settings: boolean;
75
- label: string;
76
- inputConfiguration: {
77
- audio: {
78
- disabled: boolean;
79
- };
80
- video: {
81
- disabled: boolean;
82
- };
83
- image: {
84
- disabled: boolean;
85
- };
86
- };
87
- required: boolean;
88
- };
89
- feedback: {
90
- settings: boolean;
91
- label: string;
92
- };
93
- responseType: {
94
- settings: boolean;
95
- label: string;
96
- };
97
- rationale: {
98
- settings: boolean;
99
- label: string;
100
- inputConfiguration: {
101
- audio: {
102
- disabled: boolean;
103
- };
104
- video: {
105
- disabled: boolean;
106
- };
107
- image: {
108
- disabled: boolean;
109
- };
110
- };
111
- required: boolean;
112
- };
113
- settingsPanelDisabled: boolean;
114
- spellCheck: {
115
- label: string;
116
- settings: boolean;
117
- enabled: boolean;
118
- };
119
- scoringType: {
120
- settings: boolean;
121
- label: string;
122
- };
123
- studentInstructions: {
124
- settings: boolean;
125
- label: string;
126
- };
127
- teacherInstructions: {
128
- settings: boolean;
129
- label: string;
130
- inputConfiguration: {
131
- audio: {
132
- disabled: boolean;
133
- };
134
- video: {
135
- disabled: boolean;
136
- };
137
- image: {
138
- disabled: boolean;
139
- };
140
- };
141
- required: boolean;
142
- };
143
- partialScoring: {
144
- settings: boolean;
145
- label: string;
146
- };
147
- ignoreOrder: {
148
- settings: boolean;
149
- label: string;
150
- enabled: boolean;
151
- };
152
- allowTrailingZeros: {
153
- settings: boolean;
154
- label: string;
155
- enabled: boolean;
156
- };
157
- maxImageWidth: {
158
- teacherInstructions: number;
159
- prompt: number;
160
- rationale: number;
161
- };
162
- maxImageHeight: {
163
- teacherInstructions: number;
164
- prompt: number;
165
- rationale: number;
166
- };
167
- withRubric: {
168
- settings: boolean;
169
- label: string;
170
- };
171
- mathMlOptions: {
172
- mmlOutput: boolean;
173
- mmlEditing: boolean;
174
- };
175
- language: {
176
- settings: boolean;
177
- label: string;
178
- enabled: boolean;
179
- };
180
- languageChoices: {
181
- label: string;
182
- options: never[];
183
- };
184
- };
185
- };
186
- export default _default;
@@ -1,145 +0,0 @@
1
- import { ResponseTypes as e } from "./utils.js";
2
- //#region src/author/defaults.ts
3
- var t = {
4
- model: {
5
- allowTrailingZerosDefault: !1,
6
- customKeys: [],
7
- equationEditor: "8",
8
- expression: "",
9
- feedback: {
10
- correct: {
11
- default: "Correct",
12
- type: "none"
13
- },
14
- incorrect: {
15
- default: "Incorrect",
16
- type: "none"
17
- },
18
- partial: {
19
- default: "Nearly",
20
- type: "none"
21
- }
22
- },
23
- feedbackEnabled: !1,
24
- ignoreOrderDefault: !1,
25
- partialScoring: !0,
26
- prompt: "",
27
- promptEnabled: !0,
28
- rationale: "",
29
- rationaleEnabled: !0,
30
- responseType: e.advanced,
31
- responses: [],
32
- scoringType: "auto",
33
- studentInstructionsEnabled: !0,
34
- teacherInstructions: "",
35
- teacherInstructionsEnabled: !0,
36
- toolbarEditorPosition: "bottom",
37
- validationDefault: "literal"
38
- },
39
- configuration: {
40
- baseInputConfiguration: {
41
- h3: { disabled: !0 },
42
- audio: { disabled: !1 },
43
- video: { disabled: !1 },
44
- image: { disabled: !1 },
45
- textAlign: { disabled: !0 },
46
- showParagraphs: { disabled: !1 },
47
- separateParagraphs: { disabled: !0 }
48
- },
49
- prompt: {
50
- settings: !0,
51
- label: "Prompt",
52
- inputConfiguration: {
53
- audio: { disabled: !1 },
54
- video: { disabled: !1 },
55
- image: { disabled: !1 }
56
- },
57
- required: !1
58
- },
59
- feedback: {
60
- settings: !0,
61
- label: "Feedback"
62
- },
63
- responseType: {
64
- settings: !0,
65
- label: "Response type"
66
- },
67
- rationale: {
68
- settings: !0,
69
- label: "Rationale",
70
- inputConfiguration: {
71
- audio: { disabled: !1 },
72
- video: { disabled: !1 },
73
- image: { disabled: !1 }
74
- },
75
- required: !1
76
- },
77
- settingsPanelDisabled: !1,
78
- spellCheck: {
79
- label: "Spellcheck",
80
- settings: !1,
81
- enabled: !0
82
- },
83
- scoringType: {
84
- settings: !1,
85
- label: "Scoring Type"
86
- },
87
- studentInstructions: {
88
- settings: !1,
89
- label: "Student Instructions"
90
- },
91
- teacherInstructions: {
92
- settings: !0,
93
- label: "Teacher Instructions",
94
- inputConfiguration: {
95
- audio: { disabled: !1 },
96
- video: { disabled: !1 },
97
- image: { disabled: !1 }
98
- },
99
- required: !1
100
- },
101
- partialScoring: {
102
- settings: !1,
103
- label: "Allow Partial Scoring"
104
- },
105
- ignoreOrder: {
106
- settings: !1,
107
- label: "Ignore Order",
108
- enabled: !0
109
- },
110
- allowTrailingZeros: {
111
- settings: !1,
112
- label: "Allow Trailing Zeros",
113
- enabled: !0
114
- },
115
- maxImageWidth: {
116
- teacherInstructions: 300,
117
- prompt: 300,
118
- rationale: 300
119
- },
120
- maxImageHeight: {
121
- teacherInstructions: 300,
122
- prompt: 300,
123
- rationale: 300
124
- },
125
- withRubric: {
126
- settings: !1,
127
- label: "Add Rubric"
128
- },
129
- mathMlOptions: {
130
- mmlOutput: !1,
131
- mmlEditing: !1
132
- },
133
- language: {
134
- settings: !1,
135
- label: "Specify Language",
136
- enabled: !1
137
- },
138
- languageChoices: {
139
- label: "Language Choices",
140
- options: []
141
- }
142
- }
143
- };
144
- //#endregion
145
- export { t as default };
@@ -1,35 +0,0 @@
1
- /**
2
- * @synced-from pie-elements/packages/math-inline/configure/src/general-config-block.jsx
3
- * @auto-generated
4
- *
5
- * This file is automatically synced from pie-elements and converted to TypeScript.
6
- * Manual edits will be overwritten on next sync.
7
- * To make changes, edit the upstream JavaScript file and run sync again.
8
- */
9
- import * as React from 'react';
10
- import PropTypes from 'prop-types';
11
- declare class GeneralConfigBlock extends React.Component {
12
- static propTypes: {
13
- model: PropTypes.Validator<object>;
14
- imageSupport: PropTypes.Requireable<object>;
15
- uploadSoundSupport: PropTypes.Requireable<object>;
16
- configuration: PropTypes.Requireable<object>;
17
- onChange: PropTypes.Validator<(...args: any[]) => any>;
18
- promptEnabled: PropTypes.Requireable<boolean>;
19
- rationaleEnabled: PropTypes.Requireable<boolean>;
20
- toolbarOpts: PropTypes.Requireable<object>;
21
- };
22
- constructor(props: any);
23
- onChange: (name: any) => (evtOrValue: any) => void;
24
- onDone: any;
25
- onFocus: any;
26
- onPromptFocus: any;
27
- UNSAFE_componentWillMount(): void;
28
- componentDidMount(): void;
29
- componentDidUpdate(): void;
30
- handleAnswerBlockDomUpdate: any;
31
- onAddResponse: any;
32
- onResponseChange: any;
33
- render(): React.JSX.Element;
34
- }
35
- export default GeneralConfigBlock;