@pie-element/math-templated 7.1.1-next.40 → 7.1.1-next.43

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.
@@ -1,5 +1,5 @@
1
1
  import { C as e, g as t, n, o as r, t as i } from "./browser-_ggI30Zt.js";
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-CckHDTF9.js";
2
+ import { G as a, J as o, K as s, Nt as c, W as l, _ as u, b as d, c as f, it as p, k as m, l as h, n as g, o as _, q as v, s as y, t as b, ut as x, y as S } from "./horizontal-keypad-CdjdVnsZ.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 = b("div")(({ size: e }) => ({
79
+ var re = x("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 = b("div")(({ theme: e }) => ({
472
+ }, Ne = x("div")(({ theme: e }) => ({
473
473
  paddingTop: e.spacing(.5),
474
474
  paddingBottom: e.spacing(.5)
475
- })), V = b("span")(() => ({
475
+ })), V = x("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 = b("div")(() => ({
519
+ }, Le = x("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 x == "function" && x(e.current);
540
+ e.current && typeof d == "function" && d(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 = b("div")(() => ({
594
+ }), U = "height ease-in 300ms, opacity ease-in 300ms", Ve = x("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(f, {
630
+ return /* @__PURE__ */ E(p, {
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(d, "Readable") || Ue(Ke.Readable, "Readable"), Ge = h, G = Ge.default, Ke = G && typeof G == "object" ? G : Ge, { translator: K } = C, qe = {
662
+ var We = Ue(f, "Readable") || Ue(Ke.Readable, "Readable"), Ge = g, 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 = b("div")(() => ({
669
+ }, Je = x("div")(() => ({
670
670
  width: "100%",
671
671
  cursor: "pointer"
672
- })), Ye = b("div")(() => ({
672
+ })), Ye = x("div")(() => ({
673
673
  margin: "0 auto",
674
674
  textAlign: "center",
675
675
  display: "flex"
676
- })), Xe = b("div")(() => ({
676
+ })), Xe = x("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, ${p.text()})`,
681
+ color: `var(--correct-answer-toggle-label-color, ${m.text()})`,
682
682
  fontWeight: "normal",
683
683
  ...qe
684
- })), Ze = b("div")(() => ({
684
+ })), Ze = x("div")(() => ({
685
685
  position: "absolute",
686
686
  width: "25px",
687
687
  "&.enter": { opacity: "0" },
@@ -694,7 +694,7 @@ var We = Ue(d, "Readable") || Ue(Ke.Readable, "Readable"), Ge = h, G = Ge.defaul
694
694
  opacity: "0",
695
695
  transition: "opacity 0.3s ease-in"
696
696
  }
697
- })), Qe = b("div")(() => ({
697
+ })), Qe = x("div")(() => ({
698
698
  width: "25px",
699
699
  marginRight: "5px",
700
700
  display: "flex",
@@ -744,7 +744,7 @@ var We = Ue(d, "Readable") || Ue(Ke.Readable, "Readable"), Ge = h, 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(f, {
747
+ children: [/* @__PURE__ */ D(Qe, { children: [/* @__PURE__ */ E(p, {
748
748
  nodeRef: this.openIconRef,
749
749
  timeout: 400,
750
750
  in: t,
@@ -759,7 +759,7 @@ var We = Ue(d, "Readable") || Ue(Ke.Readable, "Readable"), Ge = h, G = Ge.defaul
759
759
  ref: this.openIconRef,
760
760
  children: /* @__PURE__ */ E(k, { open: t }, "correct-open")
761
761
  })
762
- }), /* @__PURE__ */ E(f, {
762
+ }), /* @__PURE__ */ E(p, {
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(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(),
797
+ var et = J(u, "UiLayout") || J(Z.UiLayout, "UiLayout"), Y = J(h, "PreviewPrompt") || J(Z.PreviewPrompt, "PreviewPrompt"), tt = J(f, "Readable") || J(Z.Readable, "Readable"), nt = J(S, "Collapsible") || J(Z.Collapsible, "Collapsible"), rt = g, X = rt.default, Z = X && typeof X == "object" ? X : rt, it = x(et)({
798
+ color: m.text(),
799
+ backgroundColor: m.background(),
800
800
  display: "inline-block"
801
- }), Q = b("div")({
801
+ }), Q = x("div")({
802
802
  width: "100%",
803
803
  position: "relative",
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")({
804
+ backgroundColor: m.background(),
805
+ color: m.text()
806
+ }), at = x("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), ot = x("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), st = x("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(m, "PreviewPrompt"
838
838
  paddingTop: "1.5px !important"
839
839
  },
840
840
  "& .mq-parallelogram": { lineHeight: .85 }
841
- }), ct = b("div")(({ theme: e, $incorrect: t, $correct: n, $showCorrectness: r, $correctAnswerShown: i }) => ({
841
+ }), ct = x("div")(({ theme: e, $incorrect: t, $correct: n, $showCorrectness: r, $correctAnswerShown: i }) => ({
842
842
  maxWidth: "fit-content",
843
- ...t && { borderColor: `${p.incorrect()} !important` },
844
- ...n && { borderColor: `${p.correct()} !important` },
843
+ ...t && { borderColor: `${m.incorrect()} !important` },
844
+ ...n && { borderColor: `${m.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(m, "PreviewPrompt"
854
854
  } },
855
855
  "& sup": { top: 0 }
856
856
  }
857
- })), lt = b(l.Static)({ "& > .mq-root-block": { "& > .mq-editable-field": { borderColor: p.text() } } }), ut = b("div")(({ theme: e }) => ({
857
+ })), lt = x(l.Static)({ "& > .mq-root-block": { "& > .mq-editable-field": { borderColor: m.text() } } }), ut = x("div")(({ theme: e }) => ({
858
858
  zIndex: 10,
859
859
  minWidth: "400px",
860
860
  marginTop: e.spacing(2)
861
- })), dt = b("div")(({ theme: e }) => ({
861
+ })), dt = x("div")(({ theme: e }) => ({
862
862
  marginBottom: e.spacing(1),
863
863
  pointerEvents: "none"
864
- })), ft = b("h2")({
864
+ })), ft = x("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 = b("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), mt = b($e)(({ theme: e }) => ({
872
- color: p.text(),
871
+ }), pt = x("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), mt = x($e)(({ theme: e }) => ({
872
+ color: m.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: ${p.text()};
898
- background-color: ${p.background()};
897
+ color: ${m.text()};
898
+ background-color: ${m.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: ${p.correct()} !important;
909
+ border-color: ${m.correct()} !important;
910
910
  }
911
911
  .incorrect {
912
- border-color: ${p.incorrect()} !important;
912
+ border-color: ${m.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
- }), x(this.root);
1009
+ }), d(this.root);
1010
1010
  };
1011
1011
  UNSAFE_componentWillReceiveProps(t) {
1012
1012
  let { model: r } = this.props, { model: i = {} } = t || {}, { 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(() => x(this.root), 100);
1036
+ this.handleAnswerBlockDomUpdate(), setTimeout(() => d(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
- _(), e && this.setState((n) => ({ session: {
1099
+ v(), 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 && (v(t) || g(t)), i = /* @__PURE__ */ E(Y, {
1138
+ let { model: e } = this.props, { teacherInstructions: t, animationsDisabled: n } = e || {}, r = t && (y(t) || _(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 && (v(t) || g(t)) && /* @__PURE__ */ E(ot, { children: n ? r : /* @__PURE__ */ E(nt, {
1152
+ return t && (y(t) || _(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: n, 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 || {}, _ = r(u), v = yt(f), b = St(e, this.state) || "", x = h && !g;
1161
+ let { model: e } = this.props, { activeAnswerBlock: t, showCorrect: n, 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 || {}, _ = r(u), v = yt(f), y = 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: b[e],
1171
+ latex: y[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 && !(n || c) && /* @__PURE__ */ E(ut, {
1222
1222
  "data-keypad": !0,
1223
1223
  style: { width: bt(v, d) },
1224
- children: /* @__PURE__ */ E(y, {
1224
+ children: /* @__PURE__ */ E(b, {
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-BylAsGNC.js.map
1270
+ //# sourceMappingURL=main-DI8JSt5y.js.map