@pie-element/math-inline 12.1.1-next.29 → 12.1.1-next.30

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 (106) hide show
  1. package/author.js +2 -0
  2. package/configure.js +2 -0
  3. package/controller.js +1 -0
  4. package/dist/author/configure.d.ts +25 -0
  5. package/dist/author/configure.js +114 -0
  6. package/dist/author/defaults.d.ts +186 -0
  7. package/dist/author/defaults.js +145 -0
  8. package/dist/author/general-config-block.d.ts +35 -0
  9. package/dist/author/general-config-block.js +390 -0
  10. package/dist/author/index.d.ts +61 -0
  11. package/dist/author/index.js +80 -0
  12. package/dist/author/response.d.ts +40 -0
  13. package/dist/author/response.js +238 -0
  14. package/dist/author/utils.d.ts +14 -0
  15. package/dist/author/utils.js +13 -0
  16. package/dist/browser/assets/Symbola-4c507403.woff2 +0 -0
  17. package/dist/browser/author/index.js +28211 -0
  18. package/dist/browser/author/index.js.map +1 -0
  19. package/dist/browser/controller/index.js +37791 -0
  20. package/dist/browser/controller/index.js.map +1 -0
  21. package/dist/browser/delivery/index.js +134 -0
  22. package/dist/browser/delivery/index.js.map +1 -0
  23. package/dist/browser/dist--pvq7WNe.js +324 -0
  24. package/dist/browser/dist--pvq7WNe.js.map +1 -0
  25. package/dist/browser/dist-BvAYH2DS.js +16774 -0
  26. package/dist/browser/dist-BvAYH2DS.js.map +1 -0
  27. package/dist/browser/dist-DCmVXYeO.js +1528 -0
  28. package/dist/browser/dist-DCmVXYeO.js.map +1 -0
  29. package/dist/browser/main-CmzEG2JL.js +973 -0
  30. package/dist/browser/main-CmzEG2JL.js.map +1 -0
  31. package/dist/browser/print/index.js +50 -0
  32. package/dist/browser/print/index.js.map +1 -0
  33. package/dist/controller/defaults.d.ts +44 -0
  34. package/dist/controller/defaults.js +39 -0
  35. package/dist/controller/index.d.ts +22 -0
  36. package/dist/controller/index.js +171 -0
  37. package/dist/controller/utils.d.ts +12 -0
  38. package/dist/controller/utils.js +7 -0
  39. package/dist/delivery/index.d.ts +22 -0
  40. package/dist/delivery/index.js +54 -0
  41. package/dist/delivery/main.d.ts +44 -0
  42. package/dist/delivery/main.js +606 -0
  43. package/dist/delivery/simple-question-block.d.ts +27 -0
  44. package/dist/delivery/simple-question-block.js +94 -0
  45. package/dist/delivery/utils.d.ts +12 -0
  46. package/dist/delivery/utils.js +7 -0
  47. package/dist/index.d.ts +1 -0
  48. package/dist/index.iife.d.ts +8 -0
  49. package/dist/index.iife.js +224 -0
  50. package/dist/index.js +2 -0
  51. package/dist/math-inline.css +2 -0
  52. package/dist/print/index.d.ts +15 -0
  53. package/dist/print/index.js +50 -0
  54. package/dist/runtime-support.d.ts +12 -0
  55. package/dist/runtime-support.js +12 -0
  56. package/module/assets/Symbola-4c507403.woff2 +0 -0
  57. package/module/print.js +25409 -0
  58. package/module/print.js.map +1 -0
  59. package/package.json +100 -26
  60. package/print.js +2 -0
  61. package/CHANGELOG.json +0 -2627
  62. package/CHANGELOG.md +0 -2473
  63. package/LICENSE.md +0 -5
  64. package/README.md +0 -3
  65. package/configure/CHANGELOG.json +0 -1652
  66. package/configure/CHANGELOG.md +0 -2101
  67. package/configure/lib/configure.js +0 -186
  68. package/configure/lib/configure.js.map +0 -1
  69. package/configure/lib/defaults.js +0 -185
  70. package/configure/lib/defaults.js.map +0 -1
  71. package/configure/lib/general-config-block.js +0 -525
  72. package/configure/lib/general-config-block.js.map +0 -1
  73. package/configure/lib/index.js +0 -136
  74. package/configure/lib/index.js.map +0 -1
  75. package/configure/lib/response.js +0 -369
  76. package/configure/lib/response.js.map +0 -1
  77. package/configure/lib/utils.js +0 -31
  78. package/configure/lib/utils.js.map +0 -1
  79. package/configure/package.json +0 -29
  80. package/controller/CHANGELOG.json +0 -1002
  81. package/controller/CHANGELOG.md +0 -1536
  82. package/controller/lib/defaults.js +0 -43
  83. package/controller/lib/defaults.js.map +0 -1
  84. package/controller/lib/index.js +0 -383
  85. package/controller/lib/index.js.map +0 -1
  86. package/controller/lib/utils.js +0 -11
  87. package/controller/lib/utils.js.map +0 -1
  88. package/controller/package.json +0 -26
  89. package/docs/config-schema.json +0 -2071
  90. package/docs/config-schema.json.md +0 -1533
  91. package/docs/demo/config.js +0 -8
  92. package/docs/demo/generate.js +0 -41
  93. package/docs/demo/index.html +0 -1
  94. package/docs/demo/session.js +0 -11
  95. package/docs/pie-schema.json +0 -1472
  96. package/docs/pie-schema.json.md +0 -845
  97. package/lib/index.js +0 -93
  98. package/lib/index.js.map +0 -1
  99. package/lib/main.js +0 -1030
  100. package/lib/main.js.map +0 -1
  101. package/lib/print.js +0 -92
  102. package/lib/print.js.map +0 -1
  103. package/lib/simple-question-block.js +0 -148
  104. package/lib/simple-question-block.js.map +0 -1
  105. package/lib/utils.js +0 -11
  106. package/lib/utils.js.map +0 -1
package/author.js ADDED
@@ -0,0 +1,2 @@
1
+ export { default } from './dist/author/index.js';
2
+ export * from './dist/author/index.js';
package/configure.js ADDED
@@ -0,0 +1,2 @@
1
+ export { default } from './dist/author/index.js';
2
+ export * from './dist/author/index.js';
package/controller.js ADDED
@@ -0,0 +1 @@
1
+ export * from './dist/controller/index.js';
@@ -0,0 +1,25 @@
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;
@@ -0,0 +1,114 @@
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 Configure, x as default };
@@ -0,0 +1,186 @@
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;
@@ -0,0 +1,145 @@
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 };
@@ -0,0 +1,35 @@
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;