@pie-element/math-inline 11.0.5-esm.1 → 11.1.2-next.1
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/CHANGELOG.md +1191 -2718
- package/configure/CHANGELOG.md +984 -2344
- package/configure/lib/configure.js +162 -240
- package/configure/lib/configure.js.map +1 -1
- package/configure/lib/defaults.js +8 -8
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/general-config-block.js +447 -564
- package/configure/lib/general-config-block.js.map +1 -1
- package/configure/lib/index.js +111 -176
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/response.js +330 -388
- package/configure/lib/response.js.map +1 -1
- package/configure/lib/utils.js +15 -30
- package/configure/lib/utils.js.map +1 -1
- package/configure/package.json +14 -12
- package/controller/CHANGELOG.md +721 -1739
- package/controller/lib/defaults.js +5 -8
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +189 -278
- package/controller/lib/index.js.map +1 -1
- package/controller/lib/utils.js +1 -2
- package/controller/lib/utils.js.map +1 -1
- package/controller/package.json +7 -7
- package/lib/index.js +72 -125
- package/lib/index.js.map +1 -1
- package/lib/main.js +784 -889
- package/lib/main.js.map +1 -1
- package/lib/print.js +43 -84
- package/lib/print.js.map +1 -1
- package/lib/simple-question-block.js +125 -162
- package/lib/simple-question-block.js.map +1 -1
- package/lib/utils.js +1 -2
- package/lib/utils.js.map +1 -1
- package/package.json +18 -33
- package/esm/configure.css +0 -847
- package/esm/configure.js +0 -1769
- package/esm/configure.js.map +0 -1
- package/esm/controller.css +0 -847
- package/esm/controller.js +0 -416
- package/esm/controller.js.map +0 -1
- package/esm/element.css +0 -847
- package/esm/element.js +0 -1476
- package/esm/element.js.map +0 -1
- package/esm/print.css +0 -847
- package/esm/print.js +0 -1288
- package/esm/print.js.map +0 -1
- package/module/configure.js +0 -1
- package/module/controller.js +0 -4320
- package/module/demo.js +0 -66
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -14
- package/module/print-demo.js +0 -104
- package/module/print.html +0 -18
- package/module/print.js +0 -1
|
@@ -1,185 +1,148 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
-
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
-
|
|
7
|
+
exports.default = exports.SimpleQuestionBlock = void 0;
|
|
22
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
-
|
|
24
9
|
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
10
|
var _mathToolbar = require("@pie-lib/math-toolbar");
|
|
27
|
-
|
|
28
11
|
var _mathInput = require("@pie-lib/math-input");
|
|
29
|
-
|
|
30
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
31
|
-
|
|
32
|
-
var _styles = require("@material-ui/core/styles");
|
|
33
|
-
|
|
12
|
+
var _styles = require("@mui/material/styles");
|
|
34
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
35
|
-
|
|
36
14
|
var _renderUi = require("@pie-lib/render-ui");
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
15
|
+
const Expression = (0, _styles.styled)('div')(({
|
|
16
|
+
theme
|
|
17
|
+
}) => ({
|
|
18
|
+
marginTop: theme.spacing(2),
|
|
19
|
+
marginBottom: theme.spacing(2),
|
|
20
|
+
padding: theme.spacing(1)
|
|
21
|
+
}));
|
|
22
|
+
const Static = (0, _styles.styled)('div', {
|
|
23
|
+
shouldForwardProp: prop => !['isCorrect', 'isIncorrect'].includes(prop)
|
|
24
|
+
})(({
|
|
25
|
+
theme,
|
|
26
|
+
isCorrect,
|
|
27
|
+
isIncorrect
|
|
28
|
+
}) => ({
|
|
29
|
+
color: _renderUi.color.text(),
|
|
30
|
+
background: _renderUi.color.background(),
|
|
31
|
+
border: isCorrect ? `2px solid ${_renderUi.color.correct()} !important` : isIncorrect ? `2px solid ${_renderUi.color.incorrect()} !important` : `1px solid ${_renderUi.color.primaryLight()}`,
|
|
32
|
+
width: 'fit-content',
|
|
33
|
+
fontSize: '1rem',
|
|
34
|
+
padding: isCorrect || isIncorrect ? theme.spacing(1) : theme.spacing(0.5),
|
|
35
|
+
letterSpacing: isCorrect || isIncorrect ? '0.5px' : 'normal',
|
|
36
|
+
'& > .mq-math-mode': {
|
|
37
|
+
'& > .mq-hasCursor': {
|
|
38
|
+
'& > .mq-cursor': {
|
|
39
|
+
display: 'none'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
|
|
45
|
+
// CSS for MathToolbar classNames (used as strings)
|
|
46
|
+
if (typeof document !== 'undefined') {
|
|
47
|
+
const styleId = 'math-inline-simple-question-styles';
|
|
48
|
+
if (!document.getElementById(styleId)) {
|
|
49
|
+
const style = document.createElement('style');
|
|
50
|
+
style.id = styleId;
|
|
51
|
+
style.textContent = `
|
|
52
|
+
.response-editor {
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
width: auto;
|
|
56
|
+
max-width: fit-content;
|
|
57
|
+
height: auto;
|
|
58
|
+
text-align: left;
|
|
59
|
+
padding: 8px;
|
|
60
|
+
}
|
|
61
|
+
.response-editor.mq-math-mode {
|
|
62
|
+
border: 1px solid ${_renderUi.color.primaryLight()};
|
|
63
|
+
}
|
|
64
|
+
`;
|
|
65
|
+
document.head.appendChild(style);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
class SimpleQuestionBlock extends _react.default.Component {
|
|
69
|
+
constructor(props) {
|
|
70
|
+
super(props);
|
|
71
|
+
(0, _defineProperty2.default)(this, "mathToolBarContainsTarget", e => document.getElementById(this.mathToolBarId).contains(e.target));
|
|
72
|
+
(0, _defineProperty2.default)(this, "handleClick", e => {
|
|
56
73
|
try {
|
|
57
|
-
if (!
|
|
58
|
-
|
|
74
|
+
if (!this.mathToolBarContainsTarget(e)) {
|
|
75
|
+
this.setState({
|
|
59
76
|
showKeypad: false
|
|
60
77
|
});
|
|
61
78
|
}
|
|
62
|
-
} catch (e) {
|
|
79
|
+
} catch (e) {
|
|
80
|
+
// console.log(e.toString());
|
|
63
81
|
}
|
|
64
82
|
});
|
|
65
|
-
(0, _defineProperty2
|
|
66
|
-
|
|
67
|
-
|
|
83
|
+
(0, _defineProperty2.default)(this, "onFocus", () => {
|
|
84
|
+
const {
|
|
85
|
+
onSubFieldFocus
|
|
86
|
+
} = this.props;
|
|
87
|
+
onSubFieldFocus(this.mathToolBarId);
|
|
68
88
|
});
|
|
69
|
-
|
|
70
|
-
return _this;
|
|
89
|
+
this.mathToolBarId = `math-toolbar-${new Date().getTime()}`;
|
|
71
90
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
config = _ref.config,
|
|
89
|
-
disabled = _ref.disabled,
|
|
90
|
-
correctness = _ref.correctness;
|
|
91
|
-
|
|
92
|
-
if (!config) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
var correct = correctness && correctness.correct;
|
|
97
|
-
var responses = config.responses,
|
|
98
|
-
equationEditor = config.equationEditor;
|
|
99
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
|
-
className: classes.expression,
|
|
101
|
-
"data-keypad": true
|
|
102
|
-
}, showCorrect || disabled ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
|
-
className: (0, _classnames["default"])(classes["static"], (_cx = {}, (0, _defineProperty2["default"])(_cx, classes.incorrect, !emptyResponse && !correct && !showCorrect), (0, _defineProperty2["default"])(_cx, classes.correct, !emptyResponse && (correct || showCorrect)), _cx))
|
|
104
|
-
}, /*#__PURE__*/_react["default"].createElement(_mathInput.mq.Static, {
|
|
105
|
-
latex: showCorrect ? responses && responses.length && responses[0].answer : session.response || ''
|
|
106
|
-
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
107
|
-
id: this.mathToolBarId
|
|
108
|
-
}, /*#__PURE__*/_react["default"].createElement(_mathToolbar.MathToolbar, {
|
|
109
|
-
classNames: {
|
|
110
|
-
editor: classes.responseEditor
|
|
111
|
-
},
|
|
112
|
-
latex: session.response,
|
|
113
|
-
keypadMode: equationEditor,
|
|
114
|
-
onChange: onSimpleResponseChange,
|
|
115
|
-
onDone: function onDone() {},
|
|
116
|
-
onFocus: this.onFocus,
|
|
117
|
-
controlledKeypad: true,
|
|
118
|
-
showKeypad: showKeypad,
|
|
119
|
-
hideDoneButton: true
|
|
120
|
-
})));
|
|
91
|
+
render() {
|
|
92
|
+
const {
|
|
93
|
+
model,
|
|
94
|
+
showCorrect,
|
|
95
|
+
session,
|
|
96
|
+
emptyResponse,
|
|
97
|
+
onSimpleResponseChange,
|
|
98
|
+
showKeypad
|
|
99
|
+
} = this.props;
|
|
100
|
+
const {
|
|
101
|
+
config,
|
|
102
|
+
disabled,
|
|
103
|
+
correctness
|
|
104
|
+
} = model || {};
|
|
105
|
+
if (!config) {
|
|
106
|
+
return;
|
|
121
107
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
108
|
+
const correct = correctness && correctness.correct;
|
|
109
|
+
const {
|
|
110
|
+
responses,
|
|
111
|
+
equationEditor
|
|
112
|
+
} = config;
|
|
113
|
+
return /*#__PURE__*/_react.default.createElement(Expression, {
|
|
114
|
+
"data-keypad": true
|
|
115
|
+
}, showCorrect || disabled ? /*#__PURE__*/_react.default.createElement(Static, {
|
|
116
|
+
isIncorrect: !emptyResponse && !correct && !showCorrect,
|
|
117
|
+
isCorrect: !emptyResponse && (correct || showCorrect)
|
|
118
|
+
}, /*#__PURE__*/_react.default.createElement(_mathInput.mq.Static, {
|
|
119
|
+
latex: showCorrect ? responses && responses.length && responses[0].answer : session.response || ''
|
|
120
|
+
})) : /*#__PURE__*/_react.default.createElement("div", {
|
|
121
|
+
id: this.mathToolBarId
|
|
122
|
+
}, /*#__PURE__*/_react.default.createElement(_mathToolbar.MathToolbar, {
|
|
123
|
+
classNames: {
|
|
124
|
+
editor: 'response-editor'
|
|
125
|
+
},
|
|
126
|
+
latex: session.response,
|
|
127
|
+
keypadMode: equationEditor,
|
|
128
|
+
onChange: onSimpleResponseChange,
|
|
129
|
+
onDone: () => {},
|
|
130
|
+
onFocus: this.onFocus,
|
|
131
|
+
controlledKeypad: true,
|
|
132
|
+
showKeypad: showKeypad,
|
|
133
|
+
hideDoneButton: true
|
|
134
|
+
})));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.SimpleQuestionBlock = SimpleQuestionBlock;
|
|
138
|
+
(0, _defineProperty2.default)(SimpleQuestionBlock, "propTypes", {
|
|
139
|
+
onSimpleResponseChange: _propTypes.default.func,
|
|
140
|
+
model: _propTypes.default.object.isRequired,
|
|
141
|
+
emptyResponse: _propTypes.default.bool,
|
|
142
|
+
session: _propTypes.default.object.isRequired,
|
|
143
|
+
showCorrect: _propTypes.default.bool,
|
|
144
|
+
onSubFieldFocus: _propTypes.default.func.isRequired,
|
|
145
|
+
showKeypad: _propTypes.default.bool.isRequired
|
|
136
146
|
});
|
|
137
|
-
var
|
|
138
|
-
return {
|
|
139
|
-
responseEditor: {
|
|
140
|
-
display: 'flex',
|
|
141
|
-
justifyContent: 'center',
|
|
142
|
-
width: 'auto',
|
|
143
|
-
maxWidth: 'fit-content',
|
|
144
|
-
height: 'auto',
|
|
145
|
-
textAlign: 'left',
|
|
146
|
-
padding: theme.spacing.unit,
|
|
147
|
-
'&.mq-math-mode': {
|
|
148
|
-
border: "1px solid ".concat(_renderUi.color.primaryLight())
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
expression: {
|
|
152
|
-
marginTop: theme.spacing.unit * 2,
|
|
153
|
-
marginBottom: theme.spacing.unit * 2,
|
|
154
|
-
padding: theme.spacing.unit
|
|
155
|
-
},
|
|
156
|
-
"static": {
|
|
157
|
-
color: _renderUi.color.text(),
|
|
158
|
-
background: _renderUi.color.background(),
|
|
159
|
-
border: "1px solid ".concat(_renderUi.color.primaryLight()),
|
|
160
|
-
width: 'fit-content',
|
|
161
|
-
fontSize: '1rem',
|
|
162
|
-
padding: theme.spacing.unit / 2,
|
|
163
|
-
'& > .mq-math-mode': {
|
|
164
|
-
'& > .mq-hasCursor': {
|
|
165
|
-
'& > .mq-cursor': {
|
|
166
|
-
display: 'none'
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
correct: {
|
|
172
|
-
border: "2px solid ".concat(_renderUi.color.correct(), " !important"),
|
|
173
|
-
padding: theme.spacing.unit,
|
|
174
|
-
letterSpacing: '0.5px'
|
|
175
|
-
},
|
|
176
|
-
incorrect: {
|
|
177
|
-
border: "2px solid ".concat(_renderUi.color.incorrect(), " !important"),
|
|
178
|
-
padding: theme.spacing.unit,
|
|
179
|
-
letterSpacing: '0.5px'
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
})(SimpleQuestionBlockRaw);
|
|
183
|
-
var _default = SimpleQuestionBlock;
|
|
184
|
-
exports["default"] = _default;
|
|
147
|
+
var _default = exports.default = SimpleQuestionBlock;
|
|
185
148
|
//# sourceMappingURL=simple-question-block.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"simple-question-block.js","names":["_react","_interopRequireDefault","require","_mathToolbar","_mathInput","_styles","_propTypes","_renderUi","Expression","styled","theme","marginTop","spacing","marginBottom","padding","Static","shouldForwardProp","prop","includes","isCorrect","isIncorrect","color","text","background","border","correct","incorrect","primaryLight","width","fontSize","letterSpacing","display","document","styleId","getElementById","style","createElement","id","textContent","head","appendChild","SimpleQuestionBlock","React","Component","constructor","props","_defineProperty2","default","e","mathToolBarId","contains","target","mathToolBarContainsTarget","setState","showKeypad","onSubFieldFocus","Date","getTime","render","model","showCorrect","session","emptyResponse","onSimpleResponseChange","config","disabled","correctness","responses","equationEditor","mq","latex","length","answer","response","MathToolbar","classNames","editor","keypadMode","onChange","onDone","onFocus","controlledKeypad","hideDoneButton","exports","PropTypes","func","object","isRequired","bool","_default"],"sources":["../src/simple-question-block.jsx"],"sourcesContent":["import React from 'react';\nimport { MathToolbar } from '@pie-lib/math-toolbar';\nimport { mq } from '@pie-lib/math-input';\nimport { styled } from '@mui/material/styles';\nimport PropTypes from 'prop-types';\nimport { color } from '@pie-lib/render-ui';\n\nconst Expression = styled('div')(({ theme }) => ({\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n padding: theme.spacing(1),\n}));\n\nconst Static = styled('div', {\n shouldForwardProp: (prop) => !['isCorrect', 'isIncorrect'].includes(prop),\n})(({ theme, isCorrect, isIncorrect }) => ({\n color: color.text(),\n background: color.background(),\n border: isCorrect\n ? `2px solid ${color.correct()} !important`\n : isIncorrect\n ? `2px solid ${color.incorrect()} !important`\n : `1px solid ${color.primaryLight()}`,\n width: 'fit-content',\n fontSize: '1rem',\n padding: isCorrect || isIncorrect ? theme.spacing(1) : theme.spacing(0.5),\n letterSpacing: (isCorrect || isIncorrect) ? '0.5px' : 'normal',\n '& > .mq-math-mode': {\n '& > .mq-hasCursor': {\n '& > .mq-cursor': {\n display: 'none',\n },\n },\n },\n}));\n\n// CSS for MathToolbar classNames (used as strings)\nif (typeof document !== 'undefined') {\n const styleId = 'math-inline-simple-question-styles';\n if (!document.getElementById(styleId)) {\n const style = document.createElement('style');\n style.id = styleId;\n style.textContent = `\n .response-editor {\n display: flex;\n justify-content: center;\n width: auto;\n max-width: fit-content;\n height: auto;\n text-align: left;\n padding: 8px;\n }\n .response-editor.mq-math-mode {\n border: 1px solid ${color.primaryLight()};\n }\n `;\n document.head.appendChild(style);\n }\n}\n\nexport class SimpleQuestionBlock extends React.Component {\n static propTypes = {\n onSimpleResponseChange: PropTypes.func,\n model: PropTypes.object.isRequired,\n emptyResponse: PropTypes.bool,\n session: PropTypes.object.isRequired,\n showCorrect: PropTypes.bool,\n onSubFieldFocus: PropTypes.func.isRequired,\n showKeypad: PropTypes.bool.isRequired,\n };\n\n constructor(props) {\n super(props);\n\n this.mathToolBarId = `math-toolbar-${new Date().getTime()}`;\n }\n\n mathToolBarContainsTarget = (e) => document.getElementById(this.mathToolBarId).contains(e.target);\n\n handleClick = (e) => {\n try {\n if (!this.mathToolBarContainsTarget(e)) {\n this.setState({ showKeypad: false });\n }\n } catch (e) {\n // console.log(e.toString());\n }\n };\n\n onFocus = () => {\n const { onSubFieldFocus } = this.props;\n\n onSubFieldFocus(this.mathToolBarId);\n };\n\n render() {\n const { model, showCorrect, session, emptyResponse,onSimpleResponseChange, showKeypad } = this.props;\n const { config, disabled, correctness } = model || {};\n\n if (!config) {\n return;\n }\n\n const correct = correctness && correctness.correct;\n const { responses, equationEditor } = config;\n\n return (\n <Expression data-keypad={true}>\n {showCorrect || disabled ? (\n <Static\n isIncorrect={!emptyResponse && !correct && !showCorrect}\n isCorrect={!emptyResponse && (correct || showCorrect)}\n >\n <mq.Static\n latex={showCorrect ? responses && responses.length && responses[0].answer : session.response || ''}\n />\n </Static>\n ) : (\n <div id={this.mathToolBarId}>\n <MathToolbar\n classNames={{ editor: 'response-editor' }}\n latex={session.response}\n keypadMode={equationEditor}\n onChange={onSimpleResponseChange}\n onDone={() => {}}\n onFocus={this.onFocus}\n controlledKeypad={true}\n showKeypad={showKeypad}\n hideDoneButton={true}\n />\n </div>\n )}\n </Expression>\n );\n }\n}\n\nexport default SimpleQuestionBlock;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAEA,MAAMM,UAAU,GAAG,IAAAC,cAAM,EAAC,KAAK,CAAC,CAAC,CAAC;EAAEC;AAAM,CAAC,MAAM;EAC/CC,SAAS,EAAED,KAAK,CAACE,OAAO,CAAC,CAAC,CAAC;EAC3BC,YAAY,EAAEH,KAAK,CAACE,OAAO,CAAC,CAAC,CAAC;EAC9BE,OAAO,EAAEJ,KAAK,CAACE,OAAO,CAAC,CAAC;AAC1B,CAAC,CAAC,CAAC;AAEH,MAAMG,MAAM,GAAG,IAAAN,cAAM,EAAC,KAAK,EAAE;E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B,kBAAS,CAACE,MAAM,CAACC,UAAU;EAClCzB,aAAa,EAAEsB,kBAAS,CAACI,IAAI;EAC7B3B,OAAO,EAAEuB,kBAAS,CAACE,MAAM,CAACC,UAAU;EACpC3B,WAAW,EAAEwB,kBAAS,CAACI,IAAI;EAC3BjC,eAAe,EAAE6B,kBAAS,CAACC,IAAI,CAACE,UAAU;EAC1CjC,UAAU,EAAE8B,kBAAS,CAACI,IAAI,CAACD;AAC7B,CAAC;AAAA,IAAAE,QAAA,GAAAN,OAAA,CAAApC,OAAA,GAoEYN,mBAAmB","ignoreList":[]}
|
package/lib/utils.js
CHANGED
|
@@ -4,9 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ResponseTypes = void 0;
|
|
7
|
-
|
|
7
|
+
const ResponseTypes = exports.ResponseTypes = {
|
|
8
8
|
advanced: 'Advanced Multi',
|
|
9
9
|
simple: 'Simple'
|
|
10
10
|
};
|
|
11
|
-
exports.ResponseTypes = ResponseTypes;
|
|
12
11
|
//# sourceMappingURL=utils.js.map
|
package/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"utils.js","names":["ResponseTypes","exports","advanced","simple"],"sources":["../src/utils.js"],"sourcesContent":["export const ResponseTypes = {\n advanced: 'Advanced Multi',\n simple: 'Simple',\n};\n"],"mappings":";;;;;;AAAO,MAAMA,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC3BE,QAAQ,EAAE,gBAAgB;EAC1BC,MAAM,EAAE;AACV,CAAC","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,56 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/math-inline",
|
|
3
|
+
"repository": "pie-framework/pie-elements",
|
|
3
4
|
"publishConfig": {
|
|
4
5
|
"access": "public"
|
|
5
6
|
},
|
|
6
|
-
"
|
|
7
|
-
"version": "11.0.5-esm.1",
|
|
7
|
+
"version": "11.1.2-next.1",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"description": "",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"postpublish": "../../scripts/postpublish"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@
|
|
14
|
+
"@emotion/react": "^11.14.0",
|
|
15
|
+
"@emotion/style": "^0.8.0",
|
|
16
|
+
"@mui/icons-material": "^7.3.4",
|
|
17
|
+
"@mui/material": "^7.3.4",
|
|
15
18
|
"@pie-framework/mathquill": "^1.1.3",
|
|
16
19
|
"@pie-framework/pie-player-events": "^0.1.0",
|
|
17
|
-
"@pie-lib/correct-answer-toggle": "
|
|
18
|
-
"@pie-lib/math-input": "
|
|
19
|
-
"@pie-lib/math-rendering": "
|
|
20
|
-
"@pie-lib/math-toolbar": "
|
|
21
|
-
"@pie-lib/render-ui": "
|
|
22
|
-
"@pie-lib/translator": "
|
|
20
|
+
"@pie-lib/correct-answer-toggle": "3.2.0-next.4",
|
|
21
|
+
"@pie-lib/math-input": "7.2.0-next.4",
|
|
22
|
+
"@pie-lib/math-rendering": "4.2.0-next.3",
|
|
23
|
+
"@pie-lib/math-toolbar": "2.2.0-next.5",
|
|
24
|
+
"@pie-lib/render-ui": "5.2.0-next.4",
|
|
25
|
+
"@pie-lib/translator": "3.2.0-next.3",
|
|
23
26
|
"classnames": "^2.2.5",
|
|
24
27
|
"debug": "^4.1.1",
|
|
25
|
-
"lodash": "^4.17.
|
|
28
|
+
"lodash-es": "^4.17.23",
|
|
26
29
|
"prop-types": "^15.6.1",
|
|
27
|
-
"react": "
|
|
28
|
-
"react-dom": "
|
|
30
|
+
"react": "18.3.1",
|
|
31
|
+
"react-dom": "18.3.1"
|
|
29
32
|
},
|
|
30
33
|
"author": "",
|
|
31
34
|
"license": "ISC",
|
|
32
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "9cc4a1cd183a260a03c7d817e0085517112a1a56",
|
|
33
36
|
"module": "src/index.js",
|
|
34
37
|
"exports": {
|
|
35
|
-
".":
|
|
36
|
-
|
|
37
|
-
"require": "./lib/index.js",
|
|
38
|
-
"default": "./esm/element.js"
|
|
39
|
-
},
|
|
40
|
-
"./configure": {
|
|
41
|
-
"import": "./esm/configure.js",
|
|
42
|
-
"require": "./configure/lib/index.js",
|
|
43
|
-
"default": "./esm/configure.js"
|
|
44
|
-
},
|
|
45
|
-
"./controller": {
|
|
46
|
-
"import": "./esm/controller.js",
|
|
47
|
-
"require": "./controller/lib/index.js",
|
|
48
|
-
"default": "./esm/controller.js"
|
|
49
|
-
},
|
|
50
|
-
"./print": {
|
|
51
|
-
"import": "./esm/print.js",
|
|
52
|
-
"require": "./lib/print.js",
|
|
53
|
-
"default": "./esm/print.js"
|
|
54
|
-
}
|
|
38
|
+
".": "./src/index.js",
|
|
39
|
+
"./print": "./src/print.js"
|
|
55
40
|
}
|
|
56
41
|
}
|