@pie-element/math-templated 7.1.1-next.31 → 7.1.1-next.33
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/browser/author/index.js +4 -4
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/author/index.js +4 -4
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/{horizontal-keypad-CiYZhAxh.js → horizontal-keypad-BO3mMm2x.js} +257 -224
- package/dist/browser/editor-runtime/{horizontal-keypad-CiYZhAxh.js.map → horizontal-keypad-BO3mMm2x.js.map} +1 -1
- package/dist/browser/editor-runtime/{main-Bq72a7tn.js → main-DkYEHel_.js} +45 -45
- package/dist/browser/editor-runtime/{main-Bq72a7tn.js.map → main-DkYEHel_.js.map} +1 -1
- package/dist/browser/editor-runtime/print/index.js +2 -2
- package/dist/browser/{horizontal-keypad-BCQ_32_9.js → horizontal-keypad-DBLSRlSH.js} +257 -224
- package/dist/browser/{horizontal-keypad-BCQ_32_9.js.map → horizontal-keypad-DBLSRlSH.js.map} +1 -1
- package/dist/browser/{main-BO6AhHMd.js → main-Cl7NZ4vz.js} +45 -45
- package/dist/browser/{main-BO6AhHMd.js.map → main-Cl7NZ4vz.js.map} +1 -1
- package/dist/browser/print/index.js +2 -2
- package/dist/index.iife.js +7 -7
- package/module/print.js +566 -533
- package/module/print.js.map +1 -1
- package/package.json +15 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as e, n as t, o as n, t as r, w as i } from "./browser-CCIOWBDT.js";
|
|
2
|
-
import { G as a, J as o, K as s, Nt as c, W as l, _ as u,
|
|
2
|
+
import { G as a, J as o, K as s, Nt as c, W as l, _ as u, c as d, it as f, k as p, l as m, n as h, o as g, q as _, s as v, t as y, ut as b, x, y as S } from "./horizontal-keypad-BO3mMm2x.js";
|
|
3
3
|
import { t as C } from "./dist-DCmVXYeO.js";
|
|
4
4
|
import w, { useRef as T } from "react";
|
|
5
5
|
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
@@ -76,7 +76,7 @@ ne.propTypes = {
|
|
|
76
76
|
fgFill: O.default.string.isRequired,
|
|
77
77
|
borderFill: O.default.string.isRequired
|
|
78
78
|
};
|
|
79
|
-
var re =
|
|
79
|
+
var re = b("div")(({ size: e }) => ({
|
|
80
80
|
width: e || "25px",
|
|
81
81
|
height: e || "25px"
|
|
82
82
|
})), k = ({ open: e, size: t }) => /* @__PURE__ */ E(re, {
|
|
@@ -469,10 +469,10 @@ var ge = he(), _e = (0, ie.default)("@pie-lib:mask-markup:serialization"), ve =
|
|
|
469
469
|
nodes: t
|
|
470
470
|
}
|
|
471
471
|
};
|
|
472
|
-
}, Ne =
|
|
472
|
+
}, Ne = b("div")(({ theme: e }) => ({
|
|
473
473
|
paddingTop: e.spacing(.5),
|
|
474
474
|
paddingBottom: e.spacing(.5)
|
|
475
|
-
})), V =
|
|
475
|
+
})), V = b("span")(() => ({
|
|
476
476
|
display: "inline-block",
|
|
477
477
|
width: ".75em"
|
|
478
478
|
})), Pe = ["tbody", "tr"], Fe = (e, t) => {
|
|
@@ -516,7 +516,7 @@ var ge = he(), _e = (0, ie.default)("@pie-lib:mask-markup:serialization"), ve =
|
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
}), o;
|
|
519
|
-
}, Le =
|
|
519
|
+
}, Le = b("div")(() => ({
|
|
520
520
|
display: "initial",
|
|
521
521
|
"&:not(.MathJax) table": { borderCollapse: "collapse" },
|
|
522
522
|
"&:not(.MathJax) table td, &:not(.MathJax) table th": {
|
|
@@ -537,7 +537,7 @@ var ge = he(), _e = (0, ie.default)("@pie-lib:mask-markup:serialization"), ve =
|
|
|
537
537
|
};
|
|
538
538
|
componentDidMount() {
|
|
539
539
|
let e = this.props.containerRef || this.internalContainerRef;
|
|
540
|
-
e.current && typeof
|
|
540
|
+
e.current && typeof x == "function" && x(e.current);
|
|
541
541
|
}
|
|
542
542
|
handleChange = (e, t) => {
|
|
543
543
|
let n = {
|
|
@@ -591,7 +591,7 @@ var ge = he(), _e = (0, ie.default)("@pie-lib:mask-markup:serialization"), ve =
|
|
|
591
591
|
})("input", (e) => (t, n, r) => {
|
|
592
592
|
let i = t.data && t.data.dataset || {};
|
|
593
593
|
if (i.component === "input") return e.customMarkMarkupComponent(i.id);
|
|
594
|
-
}), U = "height ease-in 300ms, opacity ease-in 300ms", Ve =
|
|
594
|
+
}), U = "height ease-in 300ms, opacity ease-in 300ms", Ve = b("div")(() => ({
|
|
595
595
|
position: "relative",
|
|
596
596
|
height: 0,
|
|
597
597
|
overflow: "hidden",
|
|
@@ -627,7 +627,7 @@ var ge = he(), _e = (0, ie.default)("@pie-lib:mask-markup:serialization"), ve =
|
|
|
627
627
|
}
|
|
628
628
|
})), He = (e) => {
|
|
629
629
|
let { show: t, children: n, className: r } = e, i = T(null);
|
|
630
|
-
return /* @__PURE__ */ E(
|
|
630
|
+
return /* @__PURE__ */ E(f, {
|
|
631
631
|
nodeRef: i,
|
|
632
632
|
in: t,
|
|
633
633
|
appear: !0,
|
|
@@ -659,29 +659,29 @@ function W(e) {
|
|
|
659
659
|
function Ue(e, t) {
|
|
660
660
|
return !e || W(e) ? e : W(e.default) ? e.default : t && W(e[t]) ? e[t] : t && W(e[t]?.default) ? e[t].default : e;
|
|
661
661
|
}
|
|
662
|
-
var We = Ue(
|
|
662
|
+
var We = Ue(d, "Readable") || Ue(Ke.Readable, "Readable"), Ge = h, G = Ge.default, Ke = G && typeof G == "object" ? G : Ge, { translator: K } = C, qe = {
|
|
663
663
|
WebkitTouchCallout: "none",
|
|
664
664
|
WebkitUserSelect: "none",
|
|
665
665
|
KhtmlUserSelect: "none",
|
|
666
666
|
MozUserSelect: "none",
|
|
667
667
|
msUserSelect: "none",
|
|
668
668
|
userSelect: "none"
|
|
669
|
-
}, Je =
|
|
669
|
+
}, Je = b("div")(() => ({
|
|
670
670
|
width: "100%",
|
|
671
671
|
cursor: "pointer"
|
|
672
|
-
})), Ye =
|
|
672
|
+
})), Ye = b("div")(() => ({
|
|
673
673
|
margin: "0 auto",
|
|
674
674
|
textAlign: "center",
|
|
675
675
|
display: "flex"
|
|
676
|
-
})), Xe =
|
|
676
|
+
})), Xe = b("div")(() => ({
|
|
677
677
|
width: "fit-content",
|
|
678
678
|
minWidth: "140px",
|
|
679
679
|
alignSelf: "center",
|
|
680
680
|
verticalAlign: "middle",
|
|
681
|
-
color: `var(--correct-answer-toggle-label-color, ${
|
|
681
|
+
color: `var(--correct-answer-toggle-label-color, ${p.text()})`,
|
|
682
682
|
fontWeight: "normal",
|
|
683
683
|
...qe
|
|
684
|
-
})), Ze =
|
|
684
|
+
})), Ze = b("div")(() => ({
|
|
685
685
|
position: "absolute",
|
|
686
686
|
width: "25px",
|
|
687
687
|
"&.enter": { opacity: "0" },
|
|
@@ -694,7 +694,7 @@ var We = Ue(f, "Readable") || Ue(Ke.Readable, "Readable"), Ge = g, G = Ge.defaul
|
|
|
694
694
|
opacity: "0",
|
|
695
695
|
transition: "opacity 0.3s ease-in"
|
|
696
696
|
}
|
|
697
|
-
})), Qe =
|
|
697
|
+
})), Qe = b("div")(() => ({
|
|
698
698
|
width: "25px",
|
|
699
699
|
marginRight: "5px",
|
|
700
700
|
display: "flex",
|
|
@@ -744,7 +744,7 @@ var We = Ue(f, "Readable") || Ue(Ke.Readable, "Readable"), Ge = g, G = Ge.defaul
|
|
|
744
744
|
children: /* @__PURE__ */ D(Ye, {
|
|
745
745
|
onClick: this.onClick.bind(this),
|
|
746
746
|
onTouchEnd: this.onTouch.bind(this),
|
|
747
|
-
children: [/* @__PURE__ */ D(Qe, { children: [/* @__PURE__ */ E(
|
|
747
|
+
children: [/* @__PURE__ */ D(Qe, { children: [/* @__PURE__ */ E(f, {
|
|
748
748
|
nodeRef: this.openIconRef,
|
|
749
749
|
timeout: 400,
|
|
750
750
|
in: t,
|
|
@@ -759,7 +759,7 @@ var We = Ue(f, "Readable") || Ue(Ke.Readable, "Readable"), Ge = g, G = Ge.defaul
|
|
|
759
759
|
ref: this.openIconRef,
|
|
760
760
|
children: /* @__PURE__ */ E(k, { open: t }, "correct-open")
|
|
761
761
|
})
|
|
762
|
-
}), /* @__PURE__ */ E(
|
|
762
|
+
}), /* @__PURE__ */ E(f, {
|
|
763
763
|
nodeRef: this.closedIconRef,
|
|
764
764
|
timeout: 5e3,
|
|
765
765
|
in: !t,
|
|
@@ -794,16 +794,16 @@ function q(e) {
|
|
|
794
794
|
function J(e, t) {
|
|
795
795
|
return !e || q(e) ? e : q(e.default) ? e.default : t && q(e[t]) ? e[t] : t && q(e[t]?.default) ? e[t].default : e;
|
|
796
796
|
}
|
|
797
|
-
var et = J(u, "UiLayout") || J(Z.UiLayout, "UiLayout"), Y = J(
|
|
798
|
-
color:
|
|
799
|
-
backgroundColor:
|
|
797
|
+
var et = J(u, "UiLayout") || J(Z.UiLayout, "UiLayout"), Y = J(m, "PreviewPrompt") || J(Z.PreviewPrompt, "PreviewPrompt"), tt = J(d, "Readable") || J(Z.Readable, "Readable"), nt = J(S, "Collapsible") || J(Z.Collapsible, "Collapsible"), rt = h, X = rt.default, Z = X && typeof X == "object" ? X : rt, it = b(et)({
|
|
798
|
+
color: p.text(),
|
|
799
|
+
backgroundColor: p.background(),
|
|
800
800
|
display: "inline-block"
|
|
801
|
-
}), Q =
|
|
801
|
+
}), Q = b("div")({
|
|
802
802
|
width: "100%",
|
|
803
803
|
position: "relative",
|
|
804
|
-
backgroundColor:
|
|
805
|
-
color:
|
|
806
|
-
}), at =
|
|
804
|
+
backgroundColor: p.background(),
|
|
805
|
+
color: p.text()
|
|
806
|
+
}), at = b("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), ot = b("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), st = b("div")({
|
|
807
807
|
position: "relative",
|
|
808
808
|
"& > div > div": {
|
|
809
809
|
display: "flex",
|
|
@@ -838,10 +838,10 @@ var et = J(u, "UiLayout") || J(Z.UiLayout, "UiLayout"), Y = J(h, "PreviewPrompt"
|
|
|
838
838
|
paddingTop: "1.5px !important"
|
|
839
839
|
},
|
|
840
840
|
"& .mq-parallelogram": { lineHeight: .85 }
|
|
841
|
-
}), ct =
|
|
841
|
+
}), ct = b("div")(({ theme: e, $incorrect: t, $correct: n, $showCorrectness: r, $correctAnswerShown: i }) => ({
|
|
842
842
|
maxWidth: "fit-content",
|
|
843
|
-
...t && { borderColor: `${
|
|
844
|
-
...n && { borderColor: `${
|
|
843
|
+
...t && { borderColor: `${p.incorrect()} !important` },
|
|
844
|
+
...n && { borderColor: `${p.correct()} !important` },
|
|
845
845
|
...r && { border: "2px solid" },
|
|
846
846
|
...i && {
|
|
847
847
|
padding: e.spacing(1),
|
|
@@ -854,22 +854,22 @@ var et = J(u, "UiLayout") || J(Z.UiLayout, "UiLayout"), Y = J(h, "PreviewPrompt"
|
|
|
854
854
|
} },
|
|
855
855
|
"& sup": { top: 0 }
|
|
856
856
|
}
|
|
857
|
-
})), lt =
|
|
857
|
+
})), lt = b(l.Static)({ "& > .mq-root-block": { "& > .mq-editable-field": { borderColor: p.text() } } }), ut = b("div")(({ theme: e }) => ({
|
|
858
858
|
zIndex: 10,
|
|
859
859
|
minWidth: "400px",
|
|
860
860
|
marginTop: e.spacing(2)
|
|
861
|
-
})), dt =
|
|
861
|
+
})), dt = b("div")(({ theme: e }) => ({
|
|
862
862
|
marginBottom: e.spacing(1),
|
|
863
863
|
pointerEvents: "none"
|
|
864
|
-
})), ft =
|
|
864
|
+
})), ft = b("h2")({
|
|
865
865
|
position: "absolute",
|
|
866
866
|
left: "-10000px",
|
|
867
867
|
top: "auto",
|
|
868
868
|
width: "1px",
|
|
869
869
|
height: "1px",
|
|
870
870
|
overflow: "hidden"
|
|
871
|
-
}), pt =
|
|
872
|
-
color:
|
|
871
|
+
}), pt = b("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), mt = b($e)(({ theme: e }) => ({
|
|
872
|
+
color: p.text(),
|
|
873
873
|
marginBottom: e.spacing(2)
|
|
874
874
|
}));
|
|
875
875
|
if (typeof document < "u") {
|
|
@@ -894,8 +894,8 @@ if (typeof document < "u") {
|
|
|
894
894
|
border-right: 2px solid #bdbdbd !important;
|
|
895
895
|
}
|
|
896
896
|
.block-math {
|
|
897
|
-
color: ${
|
|
898
|
-
background-color: ${
|
|
897
|
+
color: ${p.text()};
|
|
898
|
+
background-color: ${p.background()};
|
|
899
899
|
padding: 4px !important;
|
|
900
900
|
display: flex;
|
|
901
901
|
align-items: center;
|
|
@@ -906,10 +906,10 @@ if (typeof document < "u") {
|
|
|
906
906
|
display: none;
|
|
907
907
|
}
|
|
908
908
|
.correct {
|
|
909
|
-
border-color: ${
|
|
909
|
+
border-color: ${p.correct()} !important;
|
|
910
910
|
}
|
|
911
911
|
.incorrect {
|
|
912
|
-
border-color: ${
|
|
912
|
+
border-color: ${p.incorrect()} !important;
|
|
913
913
|
}
|
|
914
914
|
`, document.head.appendChild(t);
|
|
915
915
|
}
|
|
@@ -1006,7 +1006,7 @@ var Ct = {
|
|
|
1006
1006
|
let o = r[t];
|
|
1007
1007
|
a(n, o && o.value || ""), e.view && (n.parentElement.parentElement.classList.remove("correct"), n.parentElement.parentElement.classList.remove("incorrect")), i.textContent = "R";
|
|
1008
1008
|
}
|
|
1009
|
-
}),
|
|
1009
|
+
}), x(this.root);
|
|
1010
1010
|
};
|
|
1011
1011
|
UNSAFE_componentWillReceiveProps(n) {
|
|
1012
1012
|
let { model: r } = this.props, { model: i = {} } = n || {}, { markup: a = "", env: o = {} } = r || {}, { markup: s = "", env: c = {}, alwaysShowCorrect: l = !1 } = i, u = (e) => e && e.mode === "evaluate";
|
|
@@ -1033,7 +1033,7 @@ var Ct = {
|
|
|
1033
1033
|
return !r || !i;
|
|
1034
1034
|
}
|
|
1035
1035
|
componentDidMount() {
|
|
1036
|
-
this.handleAnswerBlockDomUpdate(), setTimeout(() =>
|
|
1036
|
+
this.handleAnswerBlockDomUpdate(), setTimeout(() => x(this.root), 100);
|
|
1037
1037
|
}
|
|
1038
1038
|
componentDidUpdate() {
|
|
1039
1039
|
this.handleAnswerBlockDomUpdate();
|
|
@@ -1096,7 +1096,7 @@ var Ct = {
|
|
|
1096
1096
|
this.setState({ showCorrect: e }, this.handleAnswerBlockDomUpdate);
|
|
1097
1097
|
};
|
|
1098
1098
|
subFieldChanged = (e, t) => {
|
|
1099
|
-
|
|
1099
|
+
_(), e && this.setState((n) => ({ session: {
|
|
1100
1100
|
...n.session,
|
|
1101
1101
|
answers: {
|
|
1102
1102
|
...n.session.answers,
|
|
@@ -1135,7 +1135,7 @@ var Ct = {
|
|
|
1135
1135
|
}, 1);
|
|
1136
1136
|
}
|
|
1137
1137
|
renderTeacherInstructions = () => {
|
|
1138
|
-
let { model: e } = this.props, { teacherInstructions: t, animationsDisabled: n } = e || {}, r = t && (
|
|
1138
|
+
let { model: e } = this.props, { teacherInstructions: t, animationsDisabled: n } = e || {}, r = t && (v(t) || g(t)), i = /* @__PURE__ */ E(Y, {
|
|
1139
1139
|
defaultClassName: "teacher-instructions",
|
|
1140
1140
|
prompt: t
|
|
1141
1141
|
});
|
|
@@ -1149,7 +1149,7 @@ var Ct = {
|
|
|
1149
1149
|
};
|
|
1150
1150
|
renderRationale = () => {
|
|
1151
1151
|
let { model: e } = this.props, { rationale: t, animationsDisabled: n } = e || {}, r = /* @__PURE__ */ E(Y, { prompt: t });
|
|
1152
|
-
return t && (
|
|
1152
|
+
return t && (v(t) || g(t)) && /* @__PURE__ */ E(ot, { children: n ? r : /* @__PURE__ */ E(nt, {
|
|
1153
1153
|
labels: {
|
|
1154
1154
|
hidden: "Show Rationale",
|
|
1155
1155
|
visible: "Hide Rationale"
|
|
@@ -1158,7 +1158,7 @@ var Ct = {
|
|
|
1158
1158
|
}) });
|
|
1159
1159
|
};
|
|
1160
1160
|
renderPlayerContent = () => {
|
|
1161
|
-
let { model: e } = this.props, { activeAnswerBlock: t, showCorrect: r, session: i, tooltipContainerRef: a } = this.state, { correctness: s, disabled: c, view: l, responses: u, equationEditor: d, customKeys: f, feedback: p, env: { mode: m } = {}, printMode: h, alwaysShowCorrect: g } = e || {}, _ = n(u), v = yt(f),
|
|
1161
|
+
let { model: e } = this.props, { activeAnswerBlock: t, showCorrect: r, session: i, tooltipContainerRef: a } = this.state, { correctness: s, disabled: c, view: l, responses: u, equationEditor: d, customKeys: f, feedback: p, env: { mode: m } = {}, printMode: h, alwaysShowCorrect: g } = e || {}, _ = n(u), v = yt(f), b = St(e, this.state) || "", x = h && !g;
|
|
1162
1162
|
return /* @__PURE__ */ E(st, { children: /* @__PURE__ */ E(Be, {
|
|
1163
1163
|
disabled: c,
|
|
1164
1164
|
markup: e.markup,
|
|
@@ -1168,7 +1168,7 @@ var Ct = {
|
|
|
1168
1168
|
ref: (e) => {
|
|
1169
1169
|
this.mqStatic = e || this.mqStatic;
|
|
1170
1170
|
},
|
|
1171
|
-
latex:
|
|
1171
|
+
latex: b[e],
|
|
1172
1172
|
onSubFieldChange: this.subFieldChanged,
|
|
1173
1173
|
getFieldName: this.getFieldName,
|
|
1174
1174
|
setInput: this.setInput,
|
|
@@ -1221,7 +1221,7 @@ var Ct = {
|
|
|
1221
1221
|
title: Object.keys(i.answers).map((e) => e === t && !(r || c) && /* @__PURE__ */ E(ut, {
|
|
1222
1222
|
"data-keypad": !0,
|
|
1223
1223
|
style: { width: bt(v, d) },
|
|
1224
|
-
children: /* @__PURE__ */ E(
|
|
1224
|
+
children: /* @__PURE__ */ E(y, {
|
|
1225
1225
|
additionalKeys: v,
|
|
1226
1226
|
mode: d || gt,
|
|
1227
1227
|
onClick: this.onClick
|
|
@@ -1267,4 +1267,4 @@ var Ct = {
|
|
|
1267
1267
|
//#endregion
|
|
1268
1268
|
export { wt as t };
|
|
1269
1269
|
|
|
1270
|
-
//# sourceMappingURL=main-
|
|
1270
|
+
//# sourceMappingURL=main-DkYEHel_.js.map
|