@doenet/doenetml 0.7.21-dev.361 → 0.7.21-dev.362

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 (141) hide show
  1. package/{AnswerResponseButton-BzVcEOrl.js → AnswerResponseButton-FrNXi7jz.js} +8 -10
  2. package/{Description-CeDL7FZY.js → Description-D4h1QV0r.js} +20 -3
  3. package/{GraphFrame-8IPcvXqk.js → GraphFrame-7muJHYBu.js} +2 -2
  4. package/{JSXGraphRenderer-Be41lgIz.js → JSXGraphRenderer-DH6ZzfYT.js} +1 -1
  5. package/{NonInlineMediaWrapper-Tf8Bgp1V.js → NonInlineMediaWrapper-CqBvf7rz.js} +1 -1
  6. package/Viewer/DocViewer.d.ts.map +1 -1
  7. package/Viewer/coreWorkerBoot.d.ts.map +1 -1
  8. package/Viewer/renderers/_error.d.ts.map +1 -1
  9. package/Viewer/renderers/answer.d.ts.map +1 -1
  10. package/Viewer/renderers/booleanInput.d.ts.map +1 -1
  11. package/Viewer/renderers/choiceInput.d.ts.map +1 -1
  12. package/Viewer/renderers/containerBlock.d.ts.map +1 -1
  13. package/Viewer/renderers/containerInline.d.ts.map +1 -1
  14. package/Viewer/renderers/feedback.d.ts.map +1 -1
  15. package/Viewer/renderers/footnote.d.ts.map +1 -1
  16. package/Viewer/renderers/fractionInput.d.ts.map +1 -1
  17. package/Viewer/renderers/hint.d.ts.map +1 -1
  18. package/Viewer/renderers/list.d.ts.map +1 -1
  19. package/Viewer/renderers/mathInput.d.ts.map +1 -1
  20. package/Viewer/renderers/matrixInput.d.ts.map +1 -1
  21. package/Viewer/renderers/orbitalDiagramInput.d.ts.map +1 -1
  22. package/Viewer/renderers/p.d.ts.map +1 -1
  23. package/Viewer/renderers/pretzel.d.ts.map +1 -1
  24. package/Viewer/renderers/section.d.ts.map +1 -1
  25. package/Viewer/renderers/slider.d.ts.map +1 -1
  26. package/Viewer/renderers/solution.d.ts.map +1 -1
  27. package/Viewer/renderers/subsetOfRealsInput.d.ts.map +1 -1
  28. package/Viewer/renderers/summaryStatistics.d.ts.map +1 -1
  29. package/Viewer/renderers/textInput.d.ts.map +1 -1
  30. package/Viewer/renderers/utils/AnswerResponseButton.d.ts.map +1 -1
  31. package/Viewer/renderers/utils/Description.d.ts.map +1 -1
  32. package/Viewer/renderers/utils/checkWork.d.ts +5 -1
  33. package/Viewer/renderers/utils/checkWork.d.ts.map +1 -1
  34. package/Viewer/renderers/utils/disclosure.d.ts +16 -0
  35. package/Viewer/renderers/utils/disclosure.d.ts.map +1 -0
  36. package/Viewer/renderers/utils/validationState.d.ts +3 -1
  37. package/Viewer/renderers/utils/validationState.d.ts.map +1 -1
  38. package/Viewer/renderersLoadComponent.d.ts.map +1 -1
  39. package/{_error-DhRiszio.js → _error-BdTgXDgj.js} +4 -3
  40. package/{alert-CExDcbrh.js → alert-Bp9rBO1c.js} +3 -3
  41. package/{angle-FCTtCuvN.js → angle-xoJC6SFX.js} +6 -6
  42. package/{answer-BLusvBSG.js → answer-_Zvxo4jA.js} +8 -6
  43. package/{asList-Dv__hv6D.js → asList-DZD-Xdrj.js} +2 -2
  44. package/{blockQuote-B6Wtw4HN.js → blockQuote-CUi9cydG.js} +3 -3
  45. package/{boolean-IP59-Zjp.js → boolean-CX7vVQJz.js} +2 -2
  46. package/{booleanInput-BCNoC_vo.js → booleanInput-CceFBEy2.js} +9 -7
  47. package/{br-BqejfFtq.js → br-C_fdDVKv.js} +2 -2
  48. package/{button-DzYMy3G6.js → button-DBxivYmV.js} +4 -4
  49. package/{c-wV9nNSPC.js → c-Dr5FHPut.js} +3 -3
  50. package/{cell-Cfv7v4mc.js → cell-hqwqMA4A.js} +3 -3
  51. package/{choiceInput-BjbqDU9d.js → choiceInput-7JZaBHNZ.js} +10 -7
  52. package/{circle-CQ5lWEtc.js → circle-BqfCWmj2.js} +6 -6
  53. package/{cobwebPolyline-CAStHK_5.js → cobwebPolyline-JFOTL1HK.js} +4 -4
  54. package/{codeEditor-C2tiWOSh.js → codeEditor-oSH9duvd.js} +2 -2
  55. package/{composites-BVLPwfSW.js → composites-DbpoF3XJ.js} +1 -1
  56. package/{containerBlock-CLEUmhMM.js → containerBlock-BwJnX0UE.js} +7 -5
  57. package/{containerInline-kv3umsgq.js → containerInline-DSHf9h9o.js} +7 -5
  58. package/{curve-gdmcSsYU.js → curve-BH7j7hXT.js} +4 -4
  59. package/disclosure-axyZa36E.js +6 -0
  60. package/{doenetml-BXSsTmMg.js → doenetml-CCMBYR_b.js} +1712 -227
  61. package/doenetml-external-worker.js +2 -2
  62. package/doenetml-inline-worker.js +2 -2
  63. package/doenetml.d.ts.map +1 -1
  64. package/{ellipsis-D4fj-dH6.js → ellipsis-CQ4585lT.js} +2 -2
  65. package/{em-BLDmBPbZ.js → em-CYcBkUiA.js} +3 -3
  66. package/{embed-DFjdhAuI.js → embed-Be0he9Uz.js} +2 -2
  67. package/{feedback-BDSuY82b.js → feedback-ByTDuaNm.js} +7 -5
  68. package/{figure-DCQvyct_.js → figure-Dl_yKz7e.js} +3 -3
  69. package/{fillPatterns-DePmEjFP.js → fillPatterns-B-Wb7Rdw.js} +1 -1
  70. package/{footnote-EqPCQBWN.js → footnote-BpmhdxIC.js} +6 -8
  71. package/{fractionInput-CLSJPyA_.js → fractionInput-CCMZLzep.js} +10 -7
  72. package/{graph-C6hIOAwD.js → graph-CJRztDFF.js} +6 -6
  73. package/{hint-5LodBIQj.js → hint-39ljV3xf.js} +9 -9
  74. package/{hr-C9sb2QsS.js → hr-ACnfIwXC.js} +2 -2
  75. package/{image-CVqPuME4.js → image-DvAqXhei.js} +7 -7
  76. package/{index-yIMJFPe2.js → index-CMIXIik7.js} +1 -1
  77. package/{index.es-DnBW6AYz.js → index.es-p77isnix.js} +1 -1
  78. package/index.js +1 -1
  79. package/{label-BH-b9r-w.js → label-C63Ww5PO.js} +6 -6
  80. package/{labelWithLatex-DpzLXHtw.js → labelWithLatex-ClPeO6KG.js} +1 -1
  81. package/{legend-Dmq310xU.js → legend-BIyyKsy5.js} +4 -4
  82. package/{line-BerJZTGH.js → line-nzRw-2iw.js} +6 -6
  83. package/{lineFamilyDragHandlers-YfhC_Q94.js → lineFamilyDragHandlers-LT5y2nwm.js} +1 -1
  84. package/{lineSegment-BUtYPLbh.js → lineSegment-DEV7vXZ3.js} +5 -5
  85. package/{list-Ye_2Ltwm.js → list-0vosUKx2.js} +7 -5
  86. package/{lq-BiqdUNus.js → lq-C6SI-4Ja.js} +2 -2
  87. package/{lsq-DiKKUzSa.js → lsq-77sCkOO8.js} +2 -2
  88. package/{markupRenderer-Cb5alIAV.js → markupRenderer-BkS3m7gW.js} +1 -1
  89. package/{math-CIdkbUN1.js → math-dC5Avala.js} +6 -6
  90. package/{mathInput-BzRlJdzU.js → mathInput-Be03NUZy.js} +25 -13
  91. package/{matrixInput-DDs7lvBh.js → matrixInput-BZHnwuib.js} +23 -9
  92. package/{mdash-6RQrvN6B.js → mdash-D-AfwjXw.js} +2 -2
  93. package/{nbsp-Bv8MOxpQ.js → nbsp-D2K2UhZb.js} +2 -2
  94. package/{ndash-9o2u4hWP.js → ndash-DadHhIWX.js} +2 -2
  95. package/{number-CkoP-Awu.js → number-dzVGZ9ov.js} +6 -6
  96. package/{orbitalDiagram-B0YGzU6e.js → orbitalDiagram-Dxcuy3dt.js} +2 -2
  97. package/{orbitalDiagramInput-CMOVOQd6.js → orbitalDiagramInput-CI-jzpnD.js} +25 -10
  98. package/{p-Ds5IiZOP.js → p-pEbvJ23K.js} +7 -5
  99. package/package.json +1 -1
  100. package/{paginatorControls-2F08srE_.js → paginatorControls-DGwC24KV.js} +2 -2
  101. package/{pegboard-CJ7R1ORC.js → pegboard-DThvj_AK.js} +4 -4
  102. package/{point-DWqkuQLD.js → point-DRIItKT6.js} +6 -6
  103. package/{polygon-DVaeOcPw.js → polygon-CyiUEjCg.js} +6 -6
  104. package/{polyline-DQvHh8rj.js → polyline-Boz-zlQv.js} +5 -5
  105. package/{pre-C_MW5Olo.js → pre-Bjvq5iJ4.js} +3 -3
  106. package/{prefigure-Ci1f1zUh.js → prefigure-BPQPwHBD.js} +1 -1
  107. package/{pretzel-DVucy8kL.js → pretzel-CfNL3RKC.js} +10 -7
  108. package/{q-CNXXCBSX.js → q-DJbSp6bj.js} +3 -3
  109. package/{ray-DJJXgWjR.js → ray-BfGfX6gD.js} +5 -5
  110. package/{ref-Cd36RrOw.js → ref-B-M85Wgb.js} +2 -2
  111. package/{regionBetweenCurveXAxis-C4leqEex.js → regionBetweenCurveXAxis-CGlQKapF.js} +5 -5
  112. package/{regionBetweenCurves-BMps4Bio.js → regionBetweenCurves-DV7ARKKw.js} +5 -5
  113. package/{row-CbA-d6r0.js → row-DBEHryOQ.js} +2 -2
  114. package/{rq-DOr-Phc5.js → rq-DSkqTb4D.js} +2 -2
  115. package/{rsq-DIEK5RYn.js → rsq-CmYO91JS.js} +2 -2
  116. package/{section-DxVcSpPO.js → section-P6nedLi8.js} +26 -22
  117. package/{sha256-J35x7uWS-BC2XE0XO.js → sha256-J35x7uWS-BtnkRJk3.js} +1 -1
  118. package/{sideBySide-Dax2p65a.js → sideBySide-B__iobBS.js} +2 -2
  119. package/{slider-WcUbkagC.js → slider-Cj1kf_PL.js} +6 -5
  120. package/{solution-pYYqr4mI.js → solution-CugnzBD0.js} +10 -10
  121. package/{spreadsheet-BrvEPVkR.js → spreadsheet-BDQTKOo4.js} +2 -2
  122. package/{sq-CsVdwQ0w.js → sq-DRRKkcQ2.js} +3 -3
  123. package/style.css +7 -0
  124. package/{subsetOfRealsInput-C7LSCImc.js → subsetOfRealsInput-runRYoEh.js} +34 -6
  125. package/{summaryStatistics-Dx4n5bYn.js → summaryStatistics-CpAo0yUx.js} +11 -6
  126. package/{table-BCG2EBik.js → table-DFoJXU6W.js} +2 -2
  127. package/{tabular-DEiey_kF.js → tabular-CHSfbyFz.js} +2 -2
  128. package/{tag-CfZ-K_y5.js → tag-CgmbdQFT.js} +2 -2
  129. package/{text-C6U0VcDc.js → text-Cp6jnCrT.js} +6 -6
  130. package/{textInput-CaAFDfjE.js → textInput-Dqw-NXoY.js} +12 -9
  131. package/{tooltip-provider-kvNemycF.js → tooltip-provider-BTQ5leCb.js} +1 -1
  132. package/{useAnchoredGraphDragHandler-BUbd_SAk.js → useAnchoredGraphDragHandler-CoDUH2rg.js} +1 -1
  133. package/useDoenetRenderer-DAqF5zFD.js +114 -0
  134. package/{useSubmitActionWithDelay-BysJ9T7y.js → useSubmitActionWithDelay-DBHyoI8R.js} +52 -24
  135. package/utils/i18n.d.ts +46 -0
  136. package/utils/i18n.d.ts.map +1 -0
  137. package/validationState-DI_lxk1a.js +21 -0
  138. package/{vector-eEvp4DAc.js → vector-Dnoio46i.js} +6 -6
  139. package/{video-B7wOIA1h.js → video-DQw2pxWK.js} +4 -4
  140. package/useDoenetRenderer-BAq1ktng.js +0 -114
  141. package/validationState-CVwSJZpB.js +0 -13
@@ -1,6 +1,6 @@
1
- import { u as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-BXSsTmMg.js";
1
+ import { q as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-CCMBYR_b.js";
2
2
  import React__default, { useRef } from "react";
3
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
3
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
4
4
  import { a as getBlockMarginWithOptionalTopSuppression } from "./nonInlineMediaLayout-CkXHaqzo.js";
5
5
  function isWhitespaceTextChild(child) {
6
6
  return typeof child === "string" && child.trim() === "";
@@ -1,8 +1,8 @@
1
- import { n as jsxRuntimeExports, G as ActionButtonGroup, H as ActionButton, q as Context } from "./doenetml-BXSsTmMg.js";
1
+ import { u as useT, n as jsxRuntimeExports, H as ActionButtonGroup, I as ActionButton, v as Context } from "./doenetml-CCMBYR_b.js";
2
2
  import React__default, { useState, useRef, useEffect } from "react";
3
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
3
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
4
4
  import { s as sizeToCSS } from "./css-BJLDLYRJ.js";
5
- import { r as renderLabelWithLatex } from "./labelWithLatex-DpzLXHtw.js";
5
+ import { r as renderLabelWithLatex } from "./labelWithLatex-ClPeO6KG.js";
6
6
  let round_to_decimals = (x, n) => {
7
7
  try {
8
8
  return Context.round_numbers_to_decimals(x, n).tree;
@@ -141,6 +141,7 @@ function generateTextLabels(points, inputWidth, SVs) {
141
141
  }
142
142
  const slider = React__default.memo(function Slider(props) {
143
143
  let { id, SVs, actions, callAction } = useDoenetRenderer(props);
144
+ const t = useT();
144
145
  Slider.baseStateVariable = "index";
145
146
  const [index, setIndex] = useState(SVs.index);
146
147
  const width = sizeToCSS(SVs.width);
@@ -274,7 +275,7 @@ const slider = React__default.memo(function Slider(props) {
274
275
  /* @__PURE__ */ jsxRuntimeExports.jsx(
275
276
  ActionButton,
276
277
  {
277
- value: "Prev",
278
+ value: t("slider-previous", void 0, "Prev"),
278
279
  onClick: () => {
279
280
  if (inputRef.current) {
280
281
  inputRef.current.stepDown();
@@ -288,7 +289,7 @@ const slider = React__default.memo(function Slider(props) {
288
289
  /* @__PURE__ */ jsxRuntimeExports.jsx(
289
290
  ActionButton,
290
291
  {
291
- value: "Next",
292
+ value: t("slider-next", void 0, "Next"),
292
293
  onClick: () => {
293
294
  if (inputRef.current) {
294
295
  inputRef.current.stepUp();
@@ -1,14 +1,16 @@
1
- import { u as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-BXSsTmMg.js";
1
+ import { u as useT, q as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-CCMBYR_b.js";
2
2
  import React__default, { useRef } from "react";
3
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
4
- import { F as FontAwesomeIcon } from "./index.es-DnBW6AYz.js";
3
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
4
+ import { F as FontAwesomeIcon } from "./index.es-p77isnix.js";
5
5
  import { c as faPuzzlePiece } from "./index-BDlitCgu.js";
6
- import { a as addCommasForCompositeRanges } from "./composites-BVLPwfSW.js";
6
+ import { a as addCommasForCompositeRanges } from "./composites-DbpoF3XJ.js";
7
+ import { c as clickToToggleLabel } from "./disclosure-axyZa36E.js";
7
8
  const solution = React__default.memo(function Solution(props) {
8
9
  let { id, SVs, children, actions, callAction } = useDoenetRenderer(props);
10
+ const t = useT();
9
11
  const ref = useRef(null);
10
12
  useRecordVisibilityChanges(ref, callAction, actions);
11
- let openCloseText = "open";
13
+ const openCloseText = clickToToggleLabel(t, SVs.open);
12
14
  if (SVs.hidden) {
13
15
  return null;
14
16
  }
@@ -27,8 +29,7 @@ const solution = React__default.memo(function Solution(props) {
27
29
  });
28
30
  }
29
31
  icon = /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faPuzzlePiece });
30
- openCloseText = "close";
31
- childrenToRender = SVs.rendered ? children : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "Initializing..." });
32
+ childrenToRender = SVs.rendered ? children : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: t("collapsible-initializing", void 0, "Initializing...") });
32
33
  infoBlockStyle = {
33
34
  display: "block",
34
35
  margin: "0px 4px 12px 4px",
@@ -104,9 +105,8 @@ const solution = React__default.memo(function Solution(props) {
104
105
  SVs.sectionName,
105
106
  " ",
106
107
  SVs.message,
107
- " (click to ",
108
- openCloseText,
109
- ")"
108
+ " ",
109
+ openCloseText
110
110
  ]
111
111
  }
112
112
  ),
@@ -1,6 +1,6 @@
1
- import { o as DocContext, u as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-BXSsTmMg.js";
1
+ import { o as DocContext, q as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-CCMBYR_b.js";
2
2
  import React__default, { forwardRef, useId, useRef, useCallback, useMemo, useEffect, Children, useImperativeHandle, Fragment, createContext as createContext$1, useContext, useState } from "react";
3
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
3
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
4
4
  import require$$2 from "react-dom";
5
5
  import { s as sizeToCSS } from "./css-BJLDLYRJ.js";
6
6
  import { a as getBlockMarginWithOptionalTopSuppression } from "./nonInlineMediaLayout-CkXHaqzo.js";
@@ -1,7 +1,7 @@
1
- import { n as jsxRuntimeExports } from "./doenetml-BXSsTmMg.js";
1
+ import { n as jsxRuntimeExports } from "./doenetml-CCMBYR_b.js";
2
2
  import React__default from "react";
3
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
4
- import { r as renderMarkupBody } from "./markupRenderer-Cb5alIAV.js";
3
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
4
+ import { r as renderMarkupBody } from "./markupRenderer-BkS3m7gW.js";
5
5
  const sq = React__default.memo(function Sq(props) {
6
6
  const { SVs, children } = useDoenetRenderer(props);
7
7
  const body = renderMarkupBody({ SVs, children });
package/style.css CHANGED
@@ -464,6 +464,10 @@ div.jxgbox input[type="checkbox"] {
464
464
  /**************************************************
465
465
  End JSXGraph styles
466
466
  **************************************************/
467
+ .inline {
468
+ display: inline;
469
+ }
470
+
467
471
  .overline {
468
472
  text-decoration-line: overline;
469
473
  }
@@ -760,6 +764,9 @@ div.jxgbox input[type="checkbox"] {
760
764
  Tailwind base is purposely not included because we want all styles to be prefixed. We manually copy in whatever is needed from tailwind preflight.
761
765
  @tailwind base;
762
766
  */
767
+ .inline {
768
+ display: inline;
769
+ }
763
770
  .overline {
764
771
  text-decoration-line: overline;
765
772
  }
@@ -1,9 +1,10 @@
1
- import { u as useRecordVisibilityChanges, n as jsxRuntimeExports, I as ToggleButtonGroup, T as ToggleButton, G as ActionButtonGroup, H as ActionButton } from "./doenetml-BXSsTmMg.js";
1
+ import { u as useT, q as useRecordVisibilityChanges, n as jsxRuntimeExports, J as ToggleButtonGroup, T as ToggleButton, H as ActionButtonGroup, I as ActionButton } from "./doenetml-CCMBYR_b.js";
2
2
  import React__default, { useState, useRef } from "react";
3
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
3
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
4
4
  const subsetOfRealsInput = React__default.memo(function subsetOfReals(props) {
5
5
  let { id, SVs, actions, callAction } = useDoenetRenderer(props, false);
6
6
  let [mode, setMode] = useState("add remove points");
7
+ const t = useT();
7
8
  let bounds = useRef(null);
8
9
  let pointGrabbed = useRef(null);
9
10
  const ref = useRef(null);
@@ -24,9 +25,36 @@ const subsetOfRealsInput = React__default.memo(function subsetOfReals(props) {
24
25
  if (!SVs.fixed) {
25
26
  controlButtons = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
26
27
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ToggleButtonGroup, { onClick: handleTogglePoints, children: [
27
- /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButton, { value: "Add/Remove points" }),
28
- /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButton, { value: "Toggle points and intervals" }),
29
- /* @__PURE__ */ jsxRuntimeExports.jsx(ToggleButton, { value: "Move Points" })
28
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
29
+ ToggleButton,
30
+ {
31
+ value: t(
32
+ "subset-add-remove-points",
33
+ void 0,
34
+ "Add/Remove points"
35
+ )
36
+ }
37
+ ),
38
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
39
+ ToggleButton,
40
+ {
41
+ value: t(
42
+ "subset-toggle-points-intervals",
43
+ void 0,
44
+ "Toggle points and intervals"
45
+ )
46
+ }
47
+ ),
48
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
49
+ ToggleButton,
50
+ {
51
+ value: t(
52
+ "subset-move-points",
53
+ void 0,
54
+ "Move Points"
55
+ )
56
+ }
57
+ )
30
58
  ] }),
31
59
  /* @__PURE__ */ jsxRuntimeExports.jsxs(ActionButtonGroup, { children: [
32
60
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -35,7 +63,7 @@ const subsetOfRealsInput = React__default.memo(function subsetOfReals(props) {
35
63
  onClick: () => callAction({
36
64
  action: actions.clear
37
65
  }),
38
- value: "Clear"
66
+ value: t("subset-clear", void 0, "Clear")
39
67
  }
40
68
  ),
41
69
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -1,9 +1,10 @@
1
- import { u as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-BXSsTmMg.js";
1
+ import { u as useT, q as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-CCMBYR_b.js";
2
2
  import React__default, { useRef } from "react";
3
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
3
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
4
4
  import { s as sizeToCSS } from "./css-BJLDLYRJ.js";
5
5
  const summaryStatistics = React__default.memo(function SummaryStatistics(props) {
6
6
  let { id, SVs, actions, callAction } = useDoenetRenderer(props);
7
+ const t = useT();
7
8
  const ref = useRef(null);
8
9
  useRecordVisibilityChanges(ref, callAction, actions);
9
10
  if (SVs.hidden) {
@@ -34,10 +35,14 @@ const summaryStatistics = React__default.memo(function SummaryStatistics(props)
34
35
  let heading = /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: columns.map((x, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("th", { children: x }, i)) });
35
36
  let data = /* @__PURE__ */ jsxRuntimeExports.jsx("tr", { children: columns.map((x, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("td", { children: SVs.summaryStatistics[x] }, i)) });
36
37
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { margin: "12px 0" }, ref, children: [
37
- /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
38
- "Summary statistics of ",
39
- SVs.columnName
40
- ] }),
38
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: t(
39
+ "summary-statistics-caption",
40
+ // Fluent renders `{ $column }` literally if handed a
41
+ // `null`, so an unnamed column becomes an empty string —
42
+ // which is what interpolating it into JSX used to do.
43
+ { column: SVs.columnName ?? "" },
44
+ `Summary statistics of ${SVs.columnName ?? ""}`
45
+ ) }),
41
46
  /* @__PURE__ */ jsxRuntimeExports.jsx("table", { id, style: tableStyle, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("tbody", { children: [
42
47
  heading,
43
48
  data
@@ -1,6 +1,6 @@
1
- import { u as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-BXSsTmMg.js";
1
+ import { q as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-CCMBYR_b.js";
2
2
  import React__default, { useRef } from "react";
3
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
3
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
4
4
  const table = React__default.memo(function Table(props) {
5
5
  let { id, SVs, children, actions, callAction } = useDoenetRenderer(props);
6
6
  const ref = useRef(null);
@@ -1,6 +1,6 @@
1
- import { u as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-BXSsTmMg.js";
1
+ import { q as useRecordVisibilityChanges, n as jsxRuntimeExports } from "./doenetml-CCMBYR_b.js";
2
2
  import React__default, { useRef } from "react";
3
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
3
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
4
4
  import { s as sizeToCSS } from "./css-BJLDLYRJ.js";
5
5
  import { a as getBlockMarginWithOptionalTopSuppression } from "./nonInlineMediaLayout-CkXHaqzo.js";
6
6
  const tabular = React__default.memo(function Tabular(props) {
@@ -1,6 +1,6 @@
1
- import { n as jsxRuntimeExports } from "./doenetml-BXSsTmMg.js";
1
+ import { n as jsxRuntimeExports } from "./doenetml-CCMBYR_b.js";
2
2
  import React__default from "react";
3
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
3
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
4
4
  const tag = React__default.memo(function Tag(props) {
5
5
  let { id, SVs, children } = useDoenetRenderer(props);
6
6
  if (SVs.hidden) {
@@ -1,13 +1,13 @@
1
- import { o as DocContext, q as Context, n as jsxRuntimeExports, t as textRendererStyle } from "./doenetml-BXSsTmMg.js";
1
+ import { o as DocContext, v as Context, n as jsxRuntimeExports, t as textRendererStyle } from "./doenetml-CCMBYR_b.js";
2
2
  import React__default, { useRef, useContext } from "react";
3
- import { j as jxg } from "./JSXGraphRenderer-Be41lgIz.js";
4
- import { BoardContext, TEXT_LAYER_OFFSET } from "./graph-C6hIOAwD.js";
5
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
3
+ import { j as jxg } from "./JSXGraphRenderer-DH6ZzfYT.js";
4
+ import { BoardContext, TEXT_LAYER_OFFSET } from "./graph-CJRztDFF.js";
5
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
6
6
  import { g as getPositionFromAnchorByCoordinate } from "./graph-W6vrFcBu.js";
7
- import { ChoiceInputInlineContext } from "./choiceInput-BjbqDU9d.js";
7
+ import { ChoiceInputInlineContext } from "./choiceInput-7JZaBHNZ.js";
8
8
  import { u as usePointerDragState, a as useBoardPointerTracking } from "./useBoardPointerTracking-DV6a8Wvg.js";
9
9
  import { u as useDraggableRefs, a as useJSXGraphCleanup } from "./useJSXGraphCleanup-CX91oVW8.js";
10
- import { d as detachAnchoredGraphElement, a as attachAnchoredGraphDragHandlers } from "./useAnchoredGraphDragHandler-BUbd_SAk.js";
10
+ import { d as detachAnchoredGraphElement, a as attachAnchoredGraphDragHandlers } from "./useAnchoredGraphDragHandler-CoDUH2rg.js";
11
11
  const text = React__default.memo(function Text(props) {
12
12
  let { componentIdx, id, SVs, actions, callAction } = useDoenetRenderer(props);
13
13
  Text.ignoreActionsWithoutCore = () => true;
@@ -1,15 +1,16 @@
1
- import { q as Context, n as jsxRuntimeExports, M as MathJax } from "./doenetml-BXSsTmMg.js";
1
+ import { u as useT, v as Context, n as jsxRuntimeExports, M as MathJax } from "./doenetml-CCMBYR_b.js";
2
2
  import { useState, useRef, useContext, useEffect } from "react";
3
- import { j as jxg } from "./JSXGraphRenderer-Be41lgIz.js";
4
- import { u as useDoenetRenderer } from "./useDoenetRenderer-BAq1ktng.js";
3
+ import { j as jxg } from "./JSXGraphRenderer-DH6ZzfYT.js";
4
+ import { u as useDoenetRenderer } from "./useDoenetRenderer-DAqF5zFD.js";
5
5
  import { s as sizeToCSS } from "./css-BJLDLYRJ.js";
6
- import { BoardContext } from "./graph-C6hIOAwD.js";
6
+ import { BoardContext } from "./graph-CJRztDFF.js";
7
7
  import { g as getPositionFromAnchorByCoordinate, P as POINTER_DRAG_THRESHOLD } from "./graph-W6vrFcBu.js";
8
- import { c as calculateValidationState, u as useSubmitActionWithDelay, a as createCheckWorkComponent } from "./useSubmitActionWithDelay-BysJ9T7y.js";
9
- import { D as DescriptionPopover } from "./Description-CeDL7FZY.js";
10
- import { a as addValidationStateToShortDescription } from "./validationState-CVwSJZpB.js";
8
+ import { c as calculateValidationState, u as useSubmitActionWithDelay, a as createCheckWorkComponent } from "./useSubmitActionWithDelay-DBHyoI8R.js";
9
+ import { D as DescriptionPopover } from "./Description-D4h1QV0r.js";
10
+ import { a as addValidationStateToShortDescription } from "./validationState-DI_lxk1a.js";
11
11
  function TextInput(props) {
12
12
  let { id, SVs, children, actions, ignoreUpdate, callAction } = useDoenetRenderer(props);
13
+ const t = useT();
13
14
  let width = sizeToCSS(SVs.width);
14
15
  sizeToCSS(SVs.height);
15
16
  TextInput.baseStateVariable = "immediateValue";
@@ -431,7 +432,8 @@ function TextInput(props) {
431
432
  validationState,
432
433
  submitActionWithPending,
433
434
  SVs.forceFullCheckWorkButton,
434
- isPending
435
+ isPending,
436
+ t
435
437
  );
436
438
  let input;
437
439
  let label = SVs.label;
@@ -453,7 +455,8 @@ function TextInput(props) {
453
455
  inputClass += ` text-input-${validationState}`;
454
456
  shortDescription = addValidationStateToShortDescription(
455
457
  validationState,
456
- shortDescription
458
+ shortDescription,
459
+ t
457
460
  );
458
461
  }
459
462
  if (SVs.expanded) {
@@ -1,4 +1,4 @@
1
- import { a6 as createStoreContext, a7 as HovercardScopedContextProvider, a8 as HovercardContextProvider, a9 as createDialogComponent, L as forwardRef, N as createElement, O as createHook, Q as invariant, aa as useWrapElement, n as jsxRuntimeExports, R as useStoreState, ab as useHovercard, ac as isFalsyBooleanCallback, ad as contains, ae as sync, af as chain, ag as useEvent, ah as useHovercardAnchor, ai as createStore, aj as createHovercardStore, ak as defaultValue, al as useStore, am as useStoreProps, an as useHovercardStoreProps } from "./doenetml-BXSsTmMg.js";
1
+ import { a7 as createStoreContext, a8 as HovercardScopedContextProvider, a9 as HovercardContextProvider, aa as createDialogComponent, N as forwardRef, O as createElement, P as createHook, R as invariant, ab as useWrapElement, n as jsxRuntimeExports, S as useStoreState, ac as useHovercard, ad as isFalsyBooleanCallback, ae as contains, af as sync, ag as chain, ah as useEvent, ai as useHovercardAnchor, aj as createStore, ak as createHovercardStore, al as defaultValue, am as useStore, an as useStoreProps, ao as useHovercardStoreProps } from "./doenetml-CCMBYR_b.js";
2
2
  import { useRef, useEffect } from "react";
3
3
  const ctx = createStoreContext([HovercardContextProvider], [HovercardScopedContextProvider]);
4
4
  const useTooltipProviderContext = ctx.useProviderContext;
@@ -1,4 +1,4 @@
1
- import { r as removeJXGEventHandlers, L as LINE_FAMILY_EVENTS, j as jxg } from "./JSXGraphRenderer-Be41lgIz.js";
1
+ import { r as removeJXGEventHandlers, L as LINE_FAMILY_EVENTS, j as jxg } from "./JSXGraphRenderer-DH6ZzfYT.js";
2
2
  import { e as exceededDragThreshold, p as pointerEventToUserCoords } from "./dragThreshold-DuSSFrIU.js";
3
3
  function attachAnchoredGraphDragHandlers(params) {
4
4
  const {
@@ -0,0 +1,114 @@
1
+ import { z as useAppSelector, A as mainSlice, E as renderersLoadComponent, _ as __variableDynamicImportRuntimeHelper } from "./doenetml-CCMBYR_b.js";
2
+ import React__default, { useState, useEffect } from "react";
3
+ function useDoenetRenderer(props, initializeChildrenOnConstruction = true) {
4
+ const actions = props.componentInstructions.actions;
5
+ const componentIdx = props.componentInstructions.componentIdx;
6
+ const effectiveIdx = props.componentInstructions.effectiveIdx;
7
+ const id = props.componentInstructions.id;
8
+ const rendererName = props.coreId + componentIdx;
9
+ const [renderersToLoad, setRenderersToLoad] = useState({});
10
+ const componentInfo = useAppSelector(
11
+ (state) => mainSlice.selectors.componentInfo(state)[rendererName]
12
+ );
13
+ const {
14
+ stateValues,
15
+ sourceOfUpdate = {},
16
+ ignoreUpdate,
17
+ childrenInstructions,
18
+ prefixForIds
19
+ } = componentInfo || {
20
+ stateValues: {},
21
+ sourceOfUpdate: {},
22
+ ignoreUpdate: false,
23
+ childrenInstructions: [],
24
+ prefixForIds: ""
25
+ };
26
+ let children = [];
27
+ const loadMoreRenderers = Object.keys(renderersToLoad).length === 0;
28
+ for (let childInstructions of childrenInstructions) {
29
+ let child = createChildFromInstructions(
30
+ childInstructions,
31
+ loadMoreRenderers
32
+ );
33
+ children.push(child);
34
+ }
35
+ useEffect(() => {
36
+ const entries = Object.entries(renderersToLoad);
37
+ if (entries.length > 0) {
38
+ const names = entries.map(([name]) => name);
39
+ const loaders = entries.map(([, loader]) => loader);
40
+ renderersLoadComponent(loaders, names).then(
41
+ ({ rendererClasses: newRendererClasses }) => {
42
+ Object.assign(props.rendererClasses, newRendererClasses);
43
+ setRenderersToLoad({});
44
+ }
45
+ );
46
+ }
47
+ }, [renderersToLoad, props.rendererClasses]);
48
+ function createChildFromInstructions(childInstructions, loadMoreRenderers2) {
49
+ if (typeof childInstructions === "string" || childInstructions === null) {
50
+ return childInstructions;
51
+ }
52
+ let propsForChild = {
53
+ key: props.coreId + childInstructions.componentIdx,
54
+ componentInstructions: childInstructions,
55
+ rendererClasses: props.rendererClasses,
56
+ coreId: props.coreId,
57
+ docId: props.docId,
58
+ activityId: props.activityId,
59
+ callAction: props.callAction,
60
+ fetchExternalDoenetML: props.fetchExternalDoenetML,
61
+ requestScrollTo: props.requestScrollTo,
62
+ flags: props.flags
63
+ };
64
+ let rendererClass = props.rendererClasses[childInstructions.rendererType];
65
+ if (!rendererClass) {
66
+ if (loadMoreRenderers2) {
67
+ setRenderersToLoad((old) => {
68
+ let rendererLoaders = { ...old };
69
+ if (!(childInstructions.rendererType in rendererLoaders)) {
70
+ rendererLoaders[childInstructions.rendererType] = () => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./renderers/GraphFrame.tsx": () => import("./GraphFrame-7muJHYBu.js"), "./renderers/JSXGraphRenderer.tsx": () => import("./JSXGraphRenderer-DH6ZzfYT.js").then((n) => n.m), "./renderers/_error.tsx": () => import("./_error-BdTgXDgj.js"), "./renderers/alert.tsx": () => import("./alert-Bp9rBO1c.js"), "./renderers/angle.tsx": () => import("./angle-xoJC6SFX.js"), "./renderers/answer.tsx": () => import("./answer-_Zvxo4jA.js"), "./renderers/asList.tsx": () => import("./asList-DZD-Xdrj.js"), "./renderers/blockQuote.tsx": () => import("./blockQuote-CUi9cydG.js"), "./renderers/boolean.tsx": () => import("./boolean-CX7vVQJz.js"), "./renderers/booleanInput.tsx": () => import("./booleanInput-CceFBEy2.js"), "./renderers/br.tsx": () => import("./br-C_fdDVKv.js"), "./renderers/button.tsx": () => import("./button-DBxivYmV.js"), "./renderers/c.tsx": () => import("./c-Dr5FHPut.js"), "./renderers/cell.tsx": () => import("./cell-hqwqMA4A.js"), "./renderers/choiceInput.tsx": () => import("./choiceInput-7JZaBHNZ.js"), "./renderers/circle.tsx": () => import("./circle-BqfCWmj2.js"), "./renderers/cobwebPolyline.tsx": () => import("./cobwebPolyline-JFOTL1HK.js"), "./renderers/codeEditor.tsx": () => import("./codeEditor-oSH9duvd.js"), "./renderers/containerBlock.tsx": () => import("./containerBlock-BwJnX0UE.js"), "./renderers/containerInline.tsx": () => import("./containerInline-DSHf9h9o.js"), "./renderers/curve.tsx": () => import("./curve-BH7j7hXT.js"), "./renderers/ellipsis.tsx": () => import("./ellipsis-CQ4585lT.js"), "./renderers/em.tsx": () => import("./em-CYcBkUiA.js"), "./renderers/embed.tsx": () => import("./embed-Be0he9Uz.js"), "./renderers/feedback.tsx": () => import("./feedback-ByTDuaNm.js"), "./renderers/figure.tsx": () => import("./figure-Dl_yKz7e.js"), "./renderers/footnote.tsx": () => import("./footnote-BpmhdxIC.js"), "./renderers/fractionInput.tsx": () => import("./fractionInput-CCMZLzep.js"), "./renderers/graph.tsx": () => import("./graph-CJRztDFF.js"), "./renderers/hint.tsx": () => import("./hint-39ljV3xf.js"), "./renderers/hr.tsx": () => import("./hr-ACnfIwXC.js"), "./renderers/image.tsx": () => import("./image-DvAqXhei.js"), "./renderers/label.tsx": () => import("./label-C63Ww5PO.js"), "./renderers/legend.tsx": () => import("./legend-BIyyKsy5.js"), "./renderers/line.tsx": () => import("./line-nzRw-2iw.js"), "./renderers/lineSegment.tsx": () => import("./lineSegment-DEV7vXZ3.js"), "./renderers/list.tsx": () => import("./list-0vosUKx2.js"), "./renderers/lq.tsx": () => import("./lq-C6SI-4Ja.js"), "./renderers/lsq.tsx": () => import("./lsq-77sCkOO8.js"), "./renderers/math.tsx": () => import("./math-dC5Avala.js"), "./renderers/mathInput.tsx": () => import("./mathInput-Be03NUZy.js"), "./renderers/matrixInput.tsx": () => import("./matrixInput-BZHnwuib.js"), "./renderers/mdash.tsx": () => import("./mdash-D-AfwjXw.js"), "./renderers/nbsp.tsx": () => import("./nbsp-D2K2UhZb.js"), "./renderers/ndash.tsx": () => import("./ndash-DadHhIWX.js"), "./renderers/number.tsx": () => import("./number-dzVGZ9ov.js"), "./renderers/orbitalDiagram.tsx": () => import("./orbitalDiagram-Dxcuy3dt.js"), "./renderers/orbitalDiagramInput.tsx": () => import("./orbitalDiagramInput-CI-jzpnD.js"), "./renderers/p.tsx": () => import("./p-pEbvJ23K.js"), "./renderers/paginatorControls.tsx": () => import("./paginatorControls-DGwC24KV.js"), "./renderers/pegboard.tsx": () => import("./pegboard-DThvj_AK.js"), "./renderers/point.tsx": () => import("./point-DRIItKT6.js"), "./renderers/polygon.tsx": () => import("./polygon-CyiUEjCg.js"), "./renderers/polyline.tsx": () => import("./polyline-Boz-zlQv.js"), "./renderers/pre.tsx": () => import("./pre-Bjvq5iJ4.js"), "./renderers/prefigure.tsx": () => import("./prefigure-BPQPwHBD.js"), "./renderers/pretzel.tsx": () => import("./pretzel-CfNL3RKC.js"), "./renderers/q.tsx": () => import("./q-DJbSp6bj.js"), "./renderers/ray.tsx": () => import("./ray-BfGfX6gD.js"), "./renderers/ref.tsx": () => import("./ref-B-M85Wgb.js"), "./renderers/regionBetweenCurveXAxis.tsx": () => import("./regionBetweenCurveXAxis-CGlQKapF.js"), "./renderers/regionBetweenCurves.tsx": () => import("./regionBetweenCurves-DV7ARKKw.js"), "./renderers/row.tsx": () => import("./row-DBEHryOQ.js"), "./renderers/rq.tsx": () => import("./rq-DSkqTb4D.js"), "./renderers/rsq.tsx": () => import("./rsq-CmYO91JS.js"), "./renderers/section.tsx": () => import("./section-P6nedLi8.js"), "./renderers/sideBySide.tsx": () => import("./sideBySide-B__iobBS.js"), "./renderers/slider.tsx": () => import("./slider-Cj1kf_PL.js"), "./renderers/solution.tsx": () => import("./solution-CugnzBD0.js"), "./renderers/spreadsheet.tsx": () => import("./spreadsheet-BDQTKOo4.js"), "./renderers/sq.tsx": () => import("./sq-DRRKkcQ2.js"), "./renderers/subsetOfRealsInput.tsx": () => import("./subsetOfRealsInput-runRYoEh.js"), "./renderers/summaryStatistics.tsx": () => import("./summaryStatistics-CpAo0yUx.js"), "./renderers/table.tsx": () => import("./table-DFoJXU6W.js"), "./renderers/tabular.tsx": () => import("./tabular-CHSfbyFz.js"), "./renderers/tag.tsx": () => import("./tag-CgmbdQFT.js"), "./renderers/text.tsx": () => import("./text-Cp6jnCrT.js"), "./renderers/textInput.tsx": () => import("./textInput-Dqw-NXoY.js"), "./renderers/vector.tsx": () => import("./vector-Dnoio46i.js"), "./renderers/video.tsx": () => import("./video-DQw2pxWK.js") }), `./renderers/${childInstructions.rendererType}.tsx`, 3);
71
+ }
72
+ return rendererLoaders;
73
+ });
74
+ }
75
+ return null;
76
+ }
77
+ let child = React__default.createElement(rendererClass, propsForChild);
78
+ return child;
79
+ }
80
+ let rendererType = props.componentInstructions.rendererType;
81
+ const callAction = (argObj) => {
82
+ if (!argObj.componentIdx) {
83
+ argObj = { ...argObj };
84
+ argObj.componentIdx = componentIdx;
85
+ }
86
+ if (!argObj.rendererType) {
87
+ argObj = { ...argObj };
88
+ argObj.rendererType = rendererType;
89
+ }
90
+ return props.callAction(argObj);
91
+ };
92
+ return {
93
+ componentIdx: effectiveIdx,
94
+ id: prefixForIds + id,
95
+ SVs: stateValues,
96
+ docId: props.docId,
97
+ activityId: props.activityId,
98
+ actions,
99
+ children,
100
+ sourceOfUpdate,
101
+ ignoreUpdate,
102
+ rendererName,
103
+ initializeChildren: () => {
104
+ },
105
+ callAction,
106
+ doenetViewerUrl: props.doenetViewerUrl,
107
+ fetchExternalDoenetML: props.fetchExternalDoenetML,
108
+ requestScrollTo: props.requestScrollTo,
109
+ flags: props.flags
110
+ };
111
+ }
112
+ export {
113
+ useDoenetRenderer as u
114
+ };
@@ -1,5 +1,5 @@
1
- import { n as jsxRuntimeExports } from "./doenetml-BXSsTmMg.js";
2
- import { F as FontAwesomeIcon } from "./index.es-DnBW6AYz.js";
1
+ import { n as jsxRuntimeExports } from "./doenetml-CCMBYR_b.js";
2
+ import { F as FontAwesomeIcon } from "./index.es-p77isnix.js";
3
3
  import { d as faSpinner, e as faLevelDownAlt, g as faCheck, h as faTimes, i as faCloud } from "./index-BDlitCgu.js";
4
4
  import React__default, { useCallback } from "react";
5
5
  function calculateValidationState(SVs) {
@@ -15,7 +15,7 @@ function calculateValidationState(SVs) {
15
15
  }
16
16
  return validationState;
17
17
  }
18
- function createCheckWorkComponent(SVs, id, validationState, submitAnswer, showText, isPending = false) {
18
+ function createCheckWorkComponent(SVs, id, validationState, submitAnswer, showText, isPending, t) {
19
19
  if (!SVs.showCheckWork) {
20
20
  return null;
21
21
  }
@@ -27,8 +27,8 @@ function createCheckWorkComponent(SVs, id, validationState, submitAnswer, showTe
27
27
  let otherLabel = void 0;
28
28
  if (isPending) {
29
29
  buttonClassNames.push("check-work-pending");
30
- const pendingText = SVs.showCorrectness ? "Checking..." : "Submitting...";
31
- liveLabel = SVs.showCorrectness ? "Checking answer" : "Submitting answer";
30
+ const pendingText = SVs.showCorrectness ? t("answer-checking", void 0, "Checking...") : t("answer-submitting", void 0, "Submitting...");
31
+ liveLabel = SVs.showCorrectness ? t("answer-checking-status", void 0, "Checking answer") : t("answer-submitting-status", void 0, "Submitting answer");
32
32
  buttonContent = showText ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
33
33
  "  ",
34
34
  pendingText
@@ -59,8 +59,11 @@ function createCheckWorkComponent(SVs, id, validationState, submitAnswer, showTe
59
59
  } else if (SVs.showCorrectness) {
60
60
  buttonClassNames.push(`check-work-${validationState}`);
61
61
  if (validationState === "correct") {
62
- liveLabel = "Correct";
63
- buttonContent = showText ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "  Correct" }) : null;
62
+ liveLabel = t("answer-correct", void 0, "Correct");
63
+ buttonContent = showText ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
64
+ "  ",
65
+ liveLabel
66
+ ] }) : null;
64
67
  buttonContent = /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { "aria-hidden": true, children: [
65
68
  /* @__PURE__ */ jsxRuntimeExports.jsx(
66
69
  FontAwesomeIcon,
@@ -72,8 +75,11 @@ function createCheckWorkComponent(SVs, id, validationState, submitAnswer, showTe
72
75
  buttonContent
73
76
  ] });
74
77
  } else if (validationState === "incorrect") {
75
- liveLabel = "Incorrect";
76
- buttonContent = showText ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "  Incorrect" }) : null;
78
+ liveLabel = t("answer-incorrect", void 0, "Incorrect");
79
+ buttonContent = showText ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
80
+ "  ",
81
+ liveLabel
82
+ ] }) : null;
77
83
  buttonContent = /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { "aria-hidden": true, children: [
78
84
  /* @__PURE__ */ jsxRuntimeExports.jsx(
79
85
  FontAwesomeIcon,
@@ -86,14 +92,25 @@ function createCheckWorkComponent(SVs, id, validationState, submitAnswer, showTe
86
92
  ] });
87
93
  } else {
88
94
  const percent = Math.round(SVs.creditAchieved * 100);
89
- const partialText = SVs.creditIsReducedByAttempt ? `${percent}% Credit` : `${percent}% Correct`;
90
- buttonContent = /* @__PURE__ */ jsxRuntimeExports.jsx("span", { "aria-hidden": true, children: showText ? partialText : `${percent} %` });
95
+ const partialText = SVs.creditIsReducedByAttempt ? t("answer-percent-credit", { percent }, `${percent}% Credit`) : t(
96
+ "answer-percent-correct",
97
+ { percent },
98
+ `${percent}% Correct`
99
+ );
100
+ buttonContent = /* @__PURE__ */ jsxRuntimeExports.jsx("span", { "aria-hidden": true, children: showText ? partialText : t(
101
+ "answer-percent-short",
102
+ { percent },
103
+ `${percent} %`
104
+ ) });
91
105
  liveLabel = partialText;
92
106
  }
93
107
  } else {
94
108
  buttonClassNames.push("check-work-response-saved");
95
- liveLabel = "Response Saved";
96
- buttonContent = showText ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: "  Response Saved" }) : null;
109
+ liveLabel = t("answer-response-saved", void 0, "Response Saved");
110
+ buttonContent = showText ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
111
+ "  ",
112
+ liveLabel
113
+ ] }) : null;
97
114
  buttonContent = /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { "aria-hidden": true, children: [
98
115
  /* @__PURE__ */ jsxRuntimeExports.jsx(FontAwesomeIcon, { icon: faCloud, title: liveLabel }),
99
116
  buttonContent
@@ -119,24 +136,35 @@ function createCheckWorkComponent(SVs, id, validationState, submitAnswer, showTe
119
136
  );
120
137
  let messages = [];
121
138
  if (SVs.creditIsReducedByAttempt) {
139
+ let maxCreditPercent;
122
140
  if (SVs.numIncorrectSubmissions === 0) {
123
- messages.push("Max credit available: 100%");
141
+ maxCreditPercent = 100;
124
142
  } else if (SVs.creditAchieved > 0) {
125
- messages.push(
126
- `Max credit available: ${Math.round(100 * SVs.creditFactorUsed)}%`
127
- );
143
+ maxCreditPercent = Math.round(100 * SVs.creditFactorUsed);
128
144
  } else {
129
- messages.push(
130
- `Max credit available: ${Math.round(100 * SVs.nextCreditFactor)}%`
131
- );
145
+ maxCreditPercent = Math.round(100 * SVs.nextCreditFactor);
132
146
  }
147
+ messages.push(
148
+ t(
149
+ "max-credit-available",
150
+ { percent: maxCreditPercent },
151
+ `Max credit available: ${maxCreditPercent}%`
152
+ )
153
+ );
133
154
  }
134
155
  if (SVs.numAttemptsLeft < 1) {
135
- messages.push("no attempts remaining");
136
- } else if (SVs.numAttemptsLeft === 1) {
137
- messages.push("1 attempt remaining");
156
+ messages.push(
157
+ t("attempts-remaining", { count: 0 }, "no attempts remaining")
158
+ );
138
159
  } else if (Number.isFinite(SVs.numAttemptsLeft)) {
139
- messages.push(`${SVs.numAttemptsLeft} attempts remaining`);
160
+ const count = SVs.numAttemptsLeft;
161
+ messages.push(
162
+ t(
163
+ "attempts-remaining",
164
+ { count },
165
+ count === 1 ? "1 attempt remaining" : `${count} attempts remaining`
166
+ )
167
+ );
140
168
  }
141
169
  if (messages.length > 0) {
142
170
  const message = messages.join("; ");