@doenet/doenetml 0.6.0-alpha3 → 0.6.0-alpha5

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 (119) hide show
  1. package/dist/{ActionButtonGroup-f9a56616.js → ActionButtonGroup-cce60f98.js} +15 -16
  2. package/dist/{ToggleButton-8da16cc2.js → ToggleButton-67a72bb5.js} +7 -8
  3. package/dist/alert-33a70a3d.js +12 -0
  4. package/dist/{angle-40d0f6e5.js → angle-27255fe0.js} +4 -7
  5. package/dist/{answer-5f1c4979.js → answer-2afd88fa.js} +22 -24
  6. package/dist/{asList-c80d2031.js → asList-b1a434a8.js} +5 -7
  7. package/dist/blockQuote-8da178e1.js +22 -0
  8. package/dist/boolean-b742fe48.js +12 -0
  9. package/dist/{booleanInput-45df7ed1.js → booleanInput-9a61bf21.js} +13 -15
  10. package/dist/booleanInput.css +1 -0
  11. package/dist/{button-9c4d0fd2.js → button-0f49bac0.js} +15 -18
  12. package/dist/c-f11cfb55.js +12 -0
  13. package/dist/callAction-45217748.js +12 -0
  14. package/dist/{cell-fcd153d3.js → cell-0e133fa0.js} +5 -7
  15. package/dist/{chart-3891d729.js → chart-3fb05dec.js} +15 -17
  16. package/dist/{choiceInput-8b419109.js → choiceInput-06f9fe0d.js} +42 -43
  17. package/dist/choiceInput.css +1 -0
  18. package/dist/{circle-4ade8a0f.js → circle-58b448e4.js} +4 -7
  19. package/dist/{cobwebPolyline-18a1467d.js → cobwebPolyline-97c318ac.js} +4 -7
  20. package/dist/{codeEditor-af9a5cf1.js → codeEditor-a6457ef2.js} +19 -21
  21. package/dist/{codeViewer-df817eee.js → codeViewer-861c4813.js} +7 -9
  22. package/dist/containerBlock-c729c3c7.js +22 -0
  23. package/dist/containerInline-5f5c3422.js +12 -0
  24. package/dist/{contentBrowser-470db41c.js → contentBrowser-df4ee62e.js} +14 -16
  25. package/dist/{contentPicker-ecce4a79.js → contentPicker-d3e4b364.js} +9 -11
  26. package/dist/{curve-a6592419.js → curve-17572fc3.js} +4 -7
  27. package/dist/doenetml.js +15 -18
  28. package/dist/ellipsis-28863ba2.js +12 -0
  29. package/dist/em-65a27a36.js +12 -0
  30. package/dist/{embed-9bc2c461.js → embed-b47e5ea5.js} +9 -11
  31. package/dist/{feedback-a590c58f.js → feedback-3bbde9f2.js} +16 -18
  32. package/dist/{figure-a5ce1591.js → figure-7d10aba0.js} +3 -5
  33. package/dist/{footnote-5396cb55.js → footnote-c70ce2c5.js} +7 -9
  34. package/dist/{graph-102e9613.js → graph-d69449f2.js} +1 -3
  35. package/dist/{hint-5886a633.js → hint-c8e96cfa.js} +19 -21
  36. package/dist/{image-8e043789.js → image-19660806.js} +4 -6
  37. package/dist/{index-d3e0f79a.js → index-7481592c.js} +1 -1
  38. package/dist/{index-85d4fdb6.js → index-7912373f.js} +89797 -88659
  39. package/dist/{index-7998d090.js → index-9317ebc1.js} +1 -1
  40. package/dist/index.css +1 -0
  41. package/dist/{label-cdd6d4a5.js → label-b9c6a62a.js} +19 -22
  42. package/dist/{legend-52744e3c.js → legend-1fd4a6df.js} +8 -11
  43. package/dist/{line-c3fbafa6.js → line-d9273eb3.js} +17 -20
  44. package/dist/{lineSegment-ef21d787.js → lineSegment-d8c96e17.js} +4 -7
  45. package/dist/{list-4aecfe4d.js → list-f0b49f78.js} +11 -13
  46. package/dist/{lq-3b39cf5b.js → lq-90e8a033.js} +1 -3
  47. package/dist/lsq-8cac08e0.js +9 -0
  48. package/dist/{math-4beb47d1.js → math-8f654445.js} +4 -7
  49. package/dist/{mathInput-a8cc60be.js → mathInput-dbd1ba40.js} +6 -9
  50. package/dist/mathInput.css +1 -0
  51. package/dist/{mathInputog-1303492b.js → mathInputog-6d84c7f3.js} +2 -3
  52. package/dist/{mathList-dcb3e340.js → mathList-b458bb31.js} +9 -11
  53. package/dist/{matrixInput-f4bdc517.js → matrixInput-f651b375.js} +6 -9
  54. package/dist/mdash-6806bcce.js +9 -0
  55. package/dist/nbsp-fcc79f6e.js +9 -0
  56. package/dist/ndash-c720354c.js +9 -0
  57. package/dist/{number-6f1f3643.js → number-79d34feb.js} +4 -7
  58. package/dist/{numberList-a696789a.js → numberList-d50ce33a.js} +6 -8
  59. package/dist/{orbitalDiagram-b00c95a2.js → orbitalDiagram-4b563b6b.js} +32 -34
  60. package/dist/{orbitalDiagramInput-59420ea8.js → orbitalDiagramInput-76732581.js} +11 -13
  61. package/dist/p-5232cada.js +22 -0
  62. package/dist/{paginatorControls-f758f5a8.js → paginatorControls-b70730d0.js} +4 -6
  63. package/dist/{pegboard-9795cd51.js → pegboard-79f9c901.js} +14 -17
  64. package/dist/{point-545ffb65.js → point-d3f0e709.js} +4 -7
  65. package/dist/{polygon-fc4843a1.js → polygon-451f6aab.js} +4 -7
  66. package/dist/{polyline-7551a56f.js → polyline-b8610944.js} +4 -7
  67. package/dist/pre-f5c6b49a.js +22 -0
  68. package/dist/q-ea153de6.js +14 -0
  69. package/dist/{ray-782ed614.js → ray-8ebc8e35.js} +19 -22
  70. package/dist/{ref-08765c0f.js → ref-3f4e54aa.js} +18 -20
  71. package/dist/{regionBetweenCurveXAxis-fb8a3c9c.js → regionBetweenCurveXAxis-fa31ef83.js} +9 -12
  72. package/dist/{renderDoenetML-3a37978d.js → renderDoenetML-5fbe5a5f.js} +4 -6
  73. package/dist/{row-6e13f678.js → row-3a111c29.js} +5 -7
  74. package/dist/{rq-e36238a4.js → rq-be748d03.js} +3 -5
  75. package/dist/rsq-2ec34103.js +9 -0
  76. package/dist/{section-4746da87.js → section-5a53d600.js} +32 -34
  77. package/dist/{sideBySide-247e2dc5.js → sideBySide-8b21239b.js} +7 -9
  78. package/dist/{slider-e55a8838.js → slider-bc9bd636.js} +36 -38
  79. package/dist/{solution-ed56d868.js → solution-61675899.js} +26 -28
  80. package/dist/{spreadsheet-5cf21f01.js → spreadsheet-8f61699e.js} +10214 -10214
  81. package/dist/spreadsheet.css +41 -0
  82. package/dist/sq-08ee83a3.js +14 -0
  83. package/dist/{subsetOfRealsInput-e55e5c2b.js → subsetOfRealsInput-a151c105.js} +46 -48
  84. package/dist/{summaryStatistics-42f1a384.js → summaryStatistics-dc26ed99.js} +6 -8
  85. package/dist/{table-d99a11f9.js → table-48b11b9c.js} +9 -11
  86. package/dist/{tabular-398150dd.js → tabular-f3c4f0f4.js} +7 -9
  87. package/dist/tag-7ef067e8.js +17 -0
  88. package/dist/{text-00615612.js → text-bc66e68e.js} +50 -53
  89. package/dist/{textInput-26b3e2e2.js → textInput-cb97b103.js} +28 -30
  90. package/dist/textList-4fa2b394.js +20 -0
  91. package/dist/{triggerSet-d62aa283.js → triggerSet-47fe087c.js} +7 -9
  92. package/dist/updateValue-2620a937.js +20 -0
  93. package/dist/{vector-9d0a33ff.js → vector-1aaf00e9.js} +4 -7
  94. package/dist/{video-e7fd83ab.js → video-7b44cfcf.js} +14 -16
  95. package/package.json +6 -9
  96. package/dist/alert-e14bfd03.js +0 -14
  97. package/dist/blockQuote-71c980cc.js +0 -24
  98. package/dist/boolean-5855f758.js +0 -14
  99. package/dist/c-18bd5f9e.js +0 -14
  100. package/dist/callAction-13bd9520.js +0 -14
  101. package/dist/containerBlock-4624186b.js +0 -24
  102. package/dist/containerInline-44e4a079.js +0 -14
  103. package/dist/doenetml.umd.cjs +0 -20897
  104. package/dist/ellipsis-b157c3ba.js +0 -14
  105. package/dist/em-f951d01a.js +0 -14
  106. package/dist/lsq-5ad1e572.js +0 -11
  107. package/dist/mathInput-4ed993c7.js +0 -1
  108. package/dist/mdash-e8d37006.js +0 -11
  109. package/dist/nbsp-0a9573c6.js +0 -11
  110. package/dist/ndash-cb0f855e.js +0 -11
  111. package/dist/p-bbad4c3a.js +0 -24
  112. package/dist/pre-976f6d04.js +0 -24
  113. package/dist/q-138ac8a8.js +0 -16
  114. package/dist/rsq-5d347142.js +0 -11
  115. package/dist/sq-9b3da9df.js +0 -16
  116. package/dist/style.css +0 -41
  117. package/dist/tag-499e57c1.js +0 -19
  118. package/dist/textList-34576ab3.js +0 -22
  119. package/dist/updateValue-59710b32.js +0 -22
@@ -1,8 +1,7 @@
1
- import { u as P, R as W, r as T, j as e, F as x, f as _, a as I, b as w, c as L, M as H } from "./index-85d4fdb6.js";
2
- import N, { useState as O, useRef as G } from "react";
3
- import U from "styled-components";
4
- import "react-dom";
5
- const u = U.button`
1
+ import "./choiceInput.css";
2
+ import { u as P, R as W, r as T, j as e, F as x, f as _, a as I, b as w, c as L, s as H, M as O } from "./index-7912373f.js";
3
+ import N, { useState as G, useRef as U } from "react";
4
+ const u = H.button`
6
5
  position: relative;
7
6
  /* width: 24px; */
8
7
  height: 24px;
@@ -21,7 +20,7 @@ const u = U.button`
21
20
  background-color: var(--lightBlue);
22
21
  color: black;
23
22
  }
24
- `, X = N.memo(function F(R) {
23
+ `, Q = N.memo(function F(R) {
25
24
  let {
26
25
  name: K,
27
26
  id: s,
@@ -34,10 +33,10 @@ const u = U.button`
34
33
  callAction: g
35
34
  } = P(R);
36
35
  F.baseStateVariable = "selectedIndices";
37
- const [f, A] = O(
36
+ const [f, A] = G(
38
37
  t.selectedIndices
39
38
  ), B = W(T(E));
40
- let y = G(null);
39
+ let y = U(null);
41
40
  !V && y.current !== t.selectedIndices ? (A(t.selectedIndices), y.current = t.selectedIndices) : y.current = null;
42
41
  let d = "unvalidated";
43
42
  (t.valueHasBeenValidated || t.numAttemptsLeft < 1) && (t.creditAchieved === 1 ? d = "correct" : t.creditAchieved === 0 ? d = "incorrect" : d = "partialcorrect");
@@ -46,21 +45,21 @@ const u = U.button`
46
45
  if (t.inline)
47
46
  i.target.value && (n = Array.from(
48
47
  i.target.selectedOptions,
49
- (r) => Number(r.value)
48
+ (l) => Number(l.value)
50
49
  ));
51
50
  else if (t.selectMultiple) {
52
51
  n = [...f];
53
- let r = Number(i.target.value);
52
+ let l = Number(i.target.value);
54
53
  if (i.target.checked)
55
- n.includes(r) || (n.push(r), n.sort((a, c) => a - c));
54
+ n.includes(l) || (n.push(l), n.sort((a, c) => a - c));
56
55
  else {
57
- let a = n.indexOf(r);
56
+ let a = n.indexOf(l);
58
57
  a !== -1 && n.splice(a, 1);
59
58
  }
60
59
  } else
61
60
  n = [Number(i.target.value)];
62
- (f.length !== n.length || f.some((r, a) => r != n[a])) && (A(n), y.current = t.selectedIndices, B((r) => {
63
- let a = { ...r };
61
+ (f.length !== n.length || f.some((l, a) => l != n[a])) && (A(n), y.current = t.selectedIndices, B((l) => {
62
+ let a = { ...l };
64
63
  return a.ignoreUpdate = !0, a;
65
64
  }), g({
66
65
  action: b.updateSelectedIndices,
@@ -73,7 +72,7 @@ const u = U.button`
73
72
  if (t.hidden)
74
73
  return null;
75
74
  let m = t.disabled, C = t.label;
76
- if (t.labelHasLatex && (C = /* @__PURE__ */ e.jsx(H, { hideUntilTypeset: "first", inline: !0, dynamic: !0, children: C })), t.inline) {
75
+ if (t.labelHasLatex && (C = /* @__PURE__ */ e.jsx(O, { hideUntilTypeset: "first", inline: !0, dynamic: !0, children: C })), t.inline) {
77
76
  let i = {
78
77
  cursor: "pointer",
79
78
  padding: "1px 6px 1px 6px",
@@ -139,8 +138,8 @@ const u = U.button`
139
138
  ] })
140
139
  ] }));
141
140
  }
142
- let r = t, a = t.choiceTexts.map(function(p, o) {
143
- return r.choicesHidden[o] ? null : /* @__PURE__ */ e.jsx("option", { value: o + 1, disabled: r.choicesDisabled[o], children: p }, o + 1);
141
+ let l = t, a = t.choiceTexts.map(function(p, o) {
142
+ return l.choicesHidden[o] ? null : /* @__PURE__ */ e.jsx("option", { value: o + 1, disabled: l.choicesDisabled[o], children: p }, o + 1);
144
143
  }), c = f;
145
144
  return c === void 0 ? c = "" : t.selectMultiple || (c = c[0], c === void 0 && (c = "")), /* @__PURE__ */ e.jsxs(N.Fragment, { children: [
146
145
  /* @__PURE__ */ e.jsx("a", { name: s }),
@@ -194,8 +193,8 @@ const u = U.button`
194
193
  onClick: () => g({
195
194
  action: b.submitAnswer
196
195
  }),
197
- onKeyPress: (l) => {
198
- l.key === "Enter" && g({
196
+ onKeyPress: (r) => {
197
+ r.key === "Enter" && g({
199
198
  action: b.submitAnswer
200
199
  });
201
200
  },
@@ -232,8 +231,8 @@ const u = U.button`
232
231
  ] });
233
232
  else if (d === "partialcorrect") {
234
233
  i.backgroundColor = "#efab34";
235
- let l = `${Math.round(t.creditAchieved * 100)}% Correct`;
236
- n = /* @__PURE__ */ e.jsx(u, { id: s + "_partial", style: i, children: l });
234
+ let r = `${Math.round(t.creditAchieved * 100)}% Correct`;
235
+ n = /* @__PURE__ */ e.jsx(u, { id: s + "_partial", style: i, children: r });
237
236
  }
238
237
  } else
239
238
  i.backgroundColor = "rgb(74, 3, 217)", n = /* @__PURE__ */ e.jsxs(u, { id: s + "_saved", style: i, children: [
@@ -254,15 +253,15 @@ const u = U.button`
254
253
  " attempts remaining)"
255
254
  ] })
256
255
  ] }));
257
- let r = s, a = {
256
+ let l = s, a = {
258
257
  listStyleType: "none"
259
- }, c = r + "_choice", p = "radio";
258
+ }, c = l + "_choice", p = "radio";
260
259
  t.selectMultiple && (p = "checkbox");
261
- let o = t, M = t.choiceOrder.map((h) => D[h - 1]).map(function(h, l) {
262
- if (o.choicesHidden[l])
260
+ let o = t, M = t.choiceOrder.map((h) => D[h - 1]).map(function(h, r) {
261
+ if (o.choicesHidden[r])
263
262
  return null;
264
263
  if (p == "radio") {
265
- let v = m || o.choicesDisabled[l], k = "radio-container", j = "radio-checkmark";
264
+ let v = m || o.choicesDisabled[r], k = "radio-container", j = "radio-checkmark";
266
265
  return v && (k += " radio-container-disabled", j += " radio-checkmark-disabled"), /* @__PURE__ */ e.jsxs(
267
266
  "label",
268
267
  {
@@ -272,10 +271,10 @@ const u = U.button`
272
271
  "input",
273
272
  {
274
273
  type: "radio",
275
- id: c + (l + 1) + "_input",
276
- name: r,
277
- value: l + 1,
278
- checked: f.includes(l + 1),
274
+ id: c + (r + 1) + "_input",
275
+ name: l,
276
+ value: r + 1,
277
+ checked: f.includes(r + 1),
279
278
  onChange: S,
280
279
  disabled: v
281
280
  }
@@ -284,17 +283,17 @@ const u = U.button`
284
283
  /* @__PURE__ */ e.jsx(
285
284
  "label",
286
285
  {
287
- htmlFor: c + (l + 1) + "_input",
286
+ htmlFor: c + (r + 1) + "_input",
288
287
  style: { marginLeft: "2px" },
289
288
  children: h
290
289
  }
291
290
  )
292
291
  ]
293
292
  },
294
- r + "_choice" + (l + 1)
293
+ l + "_choice" + (r + 1)
295
294
  );
296
295
  } else if (p == "checkbox") {
297
- let v = m || o.choicesDisabled[l], k = "checkbox-container", j = "checkbox-checkmark";
296
+ let v = m || o.choicesDisabled[r], k = "checkbox-container", j = "checkbox-checkmark";
298
297
  return v && (k += " checkbox-container-disabled", j += " checkbox-checkmark-disabled"), /* @__PURE__ */ e.jsxs(
299
298
  "label",
300
299
  {
@@ -304,32 +303,32 @@ const u = U.button`
304
303
  "input",
305
304
  {
306
305
  type: "checkbox",
307
- id: c + (l + 1) + "_input",
308
- name: r,
309
- value: l + 1,
310
- checked: f.includes(l + 1),
306
+ id: c + (r + 1) + "_input",
307
+ name: l,
308
+ value: r + 1,
309
+ checked: f.includes(r + 1),
311
310
  onChange: S,
312
- disabled: m || o.choicesDisabled[l]
311
+ disabled: m || o.choicesDisabled[r]
313
312
  }
314
313
  ),
315
314
  /* @__PURE__ */ e.jsx("span", { className: j }),
316
315
  /* @__PURE__ */ e.jsx(
317
316
  "label",
318
317
  {
319
- htmlFor: c + (l + 1) + "_input",
318
+ htmlFor: c + (r + 1) + "_input",
320
319
  style: { marginLeft: "2px" },
321
320
  children: h
322
321
  }
323
322
  )
324
323
  ]
325
324
  },
326
- r + "_choice" + (l + 1)
325
+ l + "_choice" + (r + 1)
327
326
  );
328
327
  }
329
328
  });
330
- return /* @__PURE__ */ e.jsxs("div", { id: r + "-label", children: [
329
+ return /* @__PURE__ */ e.jsxs("div", { id: l + "-label", children: [
331
330
  C,
332
- /* @__PURE__ */ e.jsxs("ol", { id: r, style: a, children: [
331
+ /* @__PURE__ */ e.jsxs("ol", { id: l, style: a, children: [
333
332
  /* @__PURE__ */ e.jsx("a", { name: s }),
334
333
  M
335
334
  ] }),
@@ -338,5 +337,5 @@ const u = U.button`
338
337
  }
339
338
  });
340
339
  export {
341
- X as default
340
+ Q as default
342
341
  };
@@ -0,0 +1 @@
1
+ .radio-container{display:block;position:relative;padding-left:24px;margin-bottom:4px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.radio-container label{cursor:pointer}.radio-container-disabled,.radio-container-disabled label{cursor:not-allowed}.radio-container input{position:absolute;opacity:0;cursor:pointer;height:1;width:1}.radio-container-disabled input{cursor:not-allowed}.radio-checkmark{position:absolute;top:0;left:0;height:18px;width:18px;background-color:var(--mainGray);border-style:solid;border-color:var(--canvastext);border-radius:50%}.radio-checkmark-disabled{background-color:var(--mainGray);border-color:var(--mainGray);cursor:not-allowed}.radio-container:hover input~.radio-checkmark{background-color:var(--lightBlue)}.radio-container:hover input~.radio-checkmark-disabled{background-color:var(--mainGray)}.radio-container input:checked~.radio-checkmark{background-color:var(--mainBlue)}.radio-container:focus-within input~.radio-checkmark{outline:2px solid var(--mainBlue);outline-offset:2px}.radio-checkmark:after{content:"";position:absolute;display:none}.radio-container input:checked~.radio-checkmark:after{display:block}.radio-container .radio-checkmark:after{top:6px;left:6px;width:6px;height:6px;border-radius:50%;background:var(--canvas)}.checkbox-container{display:block;position:relative;padding-left:24px;margin-bottom:4px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.checkbox-container label{cursor:pointer}.checkbox-container-disabled,.checkbox-container-disabled label{cursor:not-allowed}.checkbox-container input{position:absolute;opacity:0;cursor:pointer;height:1;width:1}.checkbox-container-disabled input{cursor:not-allowed}.checkbox-checkmark{position:absolute;top:0;left:0;height:18px;width:18px;background-color:var(--mainGray);border-style:solid;border-color:var(--canvastext);border-radius:var(--mainBorderRadius)}.checkbox-checkmark-disabled{background-color:var(--mainGray);border-color:var(--mainGray);cursor:not-allowed}.checkbox-container:hover input~.checkbox-checkmark{background-color:var(--lightBlue)}.checkbox-container:hover input~.checkbox-checkmark-disabled{background-color:var(--mainGray)}.checkbox-container input:checked~.checkbox-checkmark{background-color:var(--mainBlue)}.checkbox-container:focus-within input~.checkbox-checkmark{outline:2px solid var(--mainBlue);outline-offset:2px}.checkbox-checkmark:after{content:"";position:absolute;display:none}.checkbox-container input:checked~.checkbox-checkmark:after{display:block}.checkbox-container .checkbox-checkmark:after{left:5px;top:1px;width:5px;height:10px;border:solid var(--canvas);border-width:0 3px 3px 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.custom-select{border:var(--mainBorder);border-radius:var(--mainBorderRadius);height:24px;margin:0 4px 4px}.custom-select:hover{background:var(--lightBlue)}.custom-select:focus-within{outline:var(--mainBorder);outline-offset:2px}
@@ -1,11 +1,8 @@
1
- import { u as se, d as de, e as fe, j as he } from "./index-85d4fdb6.js";
1
+ import { u as se, d as de, e as fe, j as he } from "./index-7912373f.js";
2
2
  import pe, { useContext as ye, useRef as a, useEffect as V } from "react";
3
- import { BoardContext as ge, LINE_LAYER_OFFSET as K, POINT_LAYER_OFFSET as Z } from "./graph-102e9613.js";
3
+ import { BoardContext as ge, LINE_LAYER_OFFSET as K, POINT_LAYER_OFFSET as Z } from "./graph-d69449f2.js";
4
4
  import { c as x, g as $, a as Y, b as z, n as ee, d as re, e as te, f as ne } from "./offGraphIndicators-6eabeb84.js";
5
- import "react-dom";
6
- import "styled-components";
7
- import "./css-ab4d83ca.js";
8
- const Re = pe.memo(function M(ie) {
5
+ const Se = pe.memo(function M(ie) {
9
6
  let { name: A, id: j, SVs: e, actions: d, callAction: f } = se(ie);
10
7
  M.ignoreActionsWithoutCore = () => !0;
11
8
  const l = ye(ge);
@@ -418,5 +415,5 @@ function le(M) {
418
415
  return M === "solid" ? 0 : M === "dashed" ? 2 : M === "dotted" ? 1 : 0;
419
416
  }
420
417
  export {
421
- Re as default
418
+ Se as default
422
419
  };
@@ -1,10 +1,7 @@
1
- import { u as N, h as V, j as F } from "./index-85d4fdb6.js";
1
+ import { u as N, h as V, j as F } from "./index-7912373f.js";
2
2
  import L, { useContext as U, useRef as m, useEffect as Y } from "react";
3
- import { BoardContext as W, LINE_LAYER_OFFSET as _, VERTEX_LAYER_OFFSET as B } from "./graph-102e9613.js";
4
- import "react-dom";
5
- import "styled-components";
6
- import "./css-ab4d83ca.js";
7
- const Z = L.memo(function b(D) {
3
+ import { BoardContext as W, LINE_LAYER_OFFSET as _, VERTEX_LAYER_OFFSET as B } from "./graph-d69449f2.js";
4
+ const q = L.memo(function b(D) {
8
5
  let { name: $, id: G, SVs: e, actions: k, sourceOfUpdate: S, callAction: x } = N(D);
9
6
  b.ignoreActionsWithoutCore = () => !0;
10
7
  const u = U(W);
@@ -201,5 +198,5 @@ function H(b) {
201
198
  return b === "triangle" ? "triangleup" : b;
202
199
  }
203
200
  export {
204
- Z as default
201
+ q as default
205
202
  };
@@ -1,12 +1,10 @@
1
- import { u as L, R as _, r as E, j as i, i as F, V as I } from "./index-85d4fdb6.js";
1
+ import { u as L, R as _, r as E, j as i, i as F, V as I } from "./index-7912373f.js";
2
2
  import D, { useRef as c, useEffect as H } from "react";
3
3
  import { s as o } from "./css-ab4d83ca.js";
4
- import "react-dom";
5
- import "styled-components";
6
- const X = D.memo(function y(j) {
4
+ const M = D.memo(function y(j) {
7
5
  let {
8
6
  name: O,
9
- id: m,
7
+ id: h,
10
8
  SVs: e,
11
9
  children: x,
12
10
  actions: l,
@@ -16,8 +14,8 @@ const X = D.memo(function y(j) {
16
14
  } = L(j);
17
15
  y.baseStateVariable = "immediateValue";
18
16
  const v = _(E(w));
19
- let r = c(e.immediateValue), a = c(null), S = c(null), b = c(e.immediateValue), W = { ...e.height }, h = { ...e.height };
20
- e.showResults && e.resultsLocation === "bottom" && (h.size *= 1 - e.viewerRatio);
17
+ let r = c(e.immediateValue), a = c(null), S = c(null), b = c(e.immediateValue), W = { ...e.height }, m = { ...e.height };
18
+ e.showResults && e.resultsLocation === "bottom" && (m.size *= 1 - e.viewerRatio);
21
19
  let C = (d) => {
22
20
  n({
23
21
  action: l.recordVisibilityChange,
@@ -34,11 +32,11 @@ const X = D.memo(function y(j) {
34
32
  }));
35
33
  }, []), e.hidden)
36
34
  return null;
37
- const g = m + "_editor";
35
+ const g = h + "_editor";
38
36
  !R && e.immediateValue !== r.current && (r.current = e.immediateValue, b.current = e.immediateValue);
39
- let s = null, T = e.width, p = e.width, z = {
37
+ let s = null, T = e.width, V = e.width, z = {
40
38
  width: o(T),
41
- height: o(h),
39
+ height: o(m),
42
40
  maxWidth: "100%",
43
41
  padding: "0px",
44
42
  // padding: "2px",
@@ -47,12 +45,12 @@ const X = D.memo(function y(j) {
47
45
  overflowY: "scroll"
48
46
  };
49
47
  e.showResults && (e.resultsLocation === "bottom" ? s = /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
50
- /* @__PURE__ */ i.jsx("hr", { style: { width: o(p), maxWidth: "100%" } }),
48
+ /* @__PURE__ */ i.jsx("hr", { style: { width: o(V), maxWidth: "100%" } }),
51
49
  /* @__PURE__ */ i.jsx("div", { children: x })
52
50
  ] }) : s = /* @__PURE__ */ i.jsx("div", { children: x }));
53
- let u = { ...h };
51
+ let u = { ...m };
54
52
  u.size /= 2, u = o(u);
55
- let V = /* @__PURE__ */ i.jsx("div", { id: g, style: z, children: /* @__PURE__ */ i.jsx(
53
+ let f = /* @__PURE__ */ i.jsx("div", { id: g, style: z, children: /* @__PURE__ */ i.jsx(
56
54
  F,
57
55
  {
58
56
  editorRef: S,
@@ -68,8 +66,8 @@ const X = D.memo(function y(j) {
68
66
  },
69
67
  onBeforeChange: (d) => {
70
68
  r.current !== d && (r.current = d, v((B) => {
71
- let f = { ...B };
72
- return f.ignoreUpdate = !0, f;
69
+ let p = { ...B };
70
+ return p.ignoreUpdate = !0, p;
73
71
  }), n({
74
72
  action: l.updateImmediateValue,
75
73
  args: { text: d },
@@ -83,12 +81,12 @@ const X = D.memo(function y(j) {
83
81
  },
84
82
  paddingBottom: u
85
83
  }
86
- ) }, g), t = V;
84
+ ) }, g), t = f;
87
85
  return e.showResults && e.resultsLocation === "bottom" && (t = /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
88
- V,
86
+ f,
89
87
  s
90
88
  ] })), t = /* @__PURE__ */ i.jsxs("div", { style: { margin: "12px 0" }, children: [
91
- /* @__PURE__ */ i.jsx("a", { name: m }),
89
+ /* @__PURE__ */ i.jsx("a", { name: h }),
92
90
  /* @__PURE__ */ i.jsx(
93
91
  "div",
94
92
  {
@@ -97,12 +95,12 @@ const X = D.memo(function y(j) {
97
95
  border: "var(--mainBorder)",
98
96
  borderRadius: "var(--mainBorderRadius)",
99
97
  height: o(W),
100
- width: o(p),
98
+ width: o(V),
101
99
  maxWidth: "100%",
102
100
  display: "flex",
103
101
  flexDirection: "column"
104
102
  },
105
- id: m,
103
+ id: h,
106
104
  children: t
107
105
  }
108
106
  )
@@ -153,5 +151,5 @@ const X = D.memo(function y(j) {
153
151
  ] }))), /* @__PURE__ */ i.jsx(I, { partialVisibility: !0, onChange: C, children: t });
154
152
  });
155
153
  export {
156
- X as default
154
+ M as default
157
155
  };
@@ -1,13 +1,11 @@
1
- import { u as g, j as e, B as p, V as b } from "./index-85d4fdb6.js";
1
+ import { u as g, j as e, B as p, V as b } from "./index-7912373f.js";
2
2
  import f, { useEffect as y } from "react";
3
3
  import { s as t } from "./css-ab4d83ca.js";
4
- import "react-dom";
5
- import "styled-components";
6
- const B = f.memo(function(h) {
4
+ const C = f.memo(function(h) {
7
5
  let { name: v, id: r, SVs: i, children: c, actions: o, callAction: n } = g(
8
6
  h,
9
7
  !1
10
- ), m = (u) => {
8
+ ), x = (u) => {
11
9
  n({
12
10
  action: o.recordVisibilityChange,
13
11
  args: { isVisible: u }
@@ -29,7 +27,7 @@ const B = f.memo(function(h) {
29
27
  maxWidth: "100%"
30
28
  };
31
29
  i.locationFromParent !== "bottom" && (d.border = "var(--mainBorder)", d.borderRadius = "var(--mainBorderRadius)");
32
- let x = /* @__PURE__ */ e.jsxs(
30
+ let m = /* @__PURE__ */ e.jsxs(
33
31
  "div",
34
32
  {
35
33
  style: {
@@ -71,7 +69,7 @@ const B = f.memo(function(h) {
71
69
  ]
72
70
  }
73
71
  ), l = {};
74
- return i.locationFromParent !== "bottom" && (l = { margin: "12px 0" }), /* @__PURE__ */ e.jsx(b, { partialVisibility: !0, onChange: m, children: /* @__PURE__ */ e.jsxs("div", { style: l, children: [
72
+ return i.locationFromParent !== "bottom" && (l = { margin: "12px 0" }), /* @__PURE__ */ e.jsx(b, { partialVisibility: !0, onChange: x, children: /* @__PURE__ */ e.jsxs("div", { style: l, children: [
75
73
  /* @__PURE__ */ e.jsx("a", { name: r }),
76
74
  /* @__PURE__ */ e.jsx(
77
75
  "div",
@@ -79,11 +77,11 @@ const B = f.memo(function(h) {
79
77
  style: d,
80
78
  className: "codeViewerSurroundingBox",
81
79
  id: r,
82
- children: x
80
+ children: m
83
81
  }
84
82
  )
85
83
  ] }) });
86
84
  });
87
85
  export {
88
- B as default
86
+ C as default
89
87
  };
@@ -0,0 +1,22 @@
1
+ import { u as c, j as e, V as d } from "./index-7912373f.js";
2
+ import u, { useEffect as f } from "react";
3
+ const g = u.memo(function(t) {
4
+ let { name: V, id: n, SVs: s, children: a, actions: i, callAction: r } = c(t), o = (l) => {
5
+ i.recordVisibilityChange && r({
6
+ action: i.recordVisibilityChange,
7
+ args: { isVisible: l }
8
+ });
9
+ };
10
+ return f(() => () => {
11
+ i.recordVisibilityChange && r({
12
+ action: i.recordVisibilityChange,
13
+ args: { isVisible: !1 }
14
+ });
15
+ }, []), s.hidden ? null : /* @__PURE__ */ e.jsx(d, { partialVisibility: !0, onChange: o, children: /* @__PURE__ */ e.jsxs("div", { id: n, children: [
16
+ /* @__PURE__ */ e.jsx("a", { name: n }),
17
+ a
18
+ ] }) });
19
+ });
20
+ export {
21
+ g as default
22
+ };
@@ -0,0 +1,12 @@
1
+ import { u as a, j as n } from "./index-7912373f.js";
2
+ import o from "react";
3
+ const d = o.memo(function(r) {
4
+ let { name: l, id: e, SVs: t, children: i } = a(r);
5
+ return t.hidden ? null : /* @__PURE__ */ n.jsxs("span", { id: e, children: [
6
+ /* @__PURE__ */ n.jsx("a", { name: e }),
7
+ i
8
+ ] });
9
+ });
10
+ export {
11
+ d as default
12
+ };
@@ -1,9 +1,7 @@
1
- import { u as B, j as t, k as x, V as F } from "./index-85d4fdb6.js";
2
- import R, { useEffect as p } from "react";
3
- import { L as f } from "./index-d3e0f79a.js";
4
- import "react-dom";
5
- import "styled-components";
6
- const W = R.memo(function(b) {
1
+ import { u as B, j as t, k as m, V as F } from "./index-7912373f.js";
2
+ import R, { useEffect as f } from "react";
3
+ import { L as p } from "./index-7481592c.js";
4
+ const O = R.memo(function(b) {
7
5
  let { name: E, id: s, SVs: i, children: u, actions: n, callAction: o, location: c } = B(b), g = c.search || "", d = c.hash || "", y = (e) => {
8
6
  n.recordVisibilityChange && o({
9
7
  action: n.recordVisibilityChange,
@@ -15,12 +13,12 @@ const W = R.memo(function(b) {
15
13
  args: { ind: e }
16
14
  });
17
15
  };
18
- if (p(() => () => {
16
+ if (f(() => () => {
19
17
  n.recordVisibilityChange && o({
20
18
  action: n.recordVisibilityChange,
21
19
  args: { isVisible: !1 }
22
20
  });
23
- }, []), p(() => {
21
+ }, []), f(() => {
24
22
  let e = d.indexOf("\\/");
25
23
  if (e !== -1) {
26
24
  let a = d.substring(e), l = i.indByEscapedComponentName[a];
@@ -29,7 +27,7 @@ const W = R.memo(function(b) {
29
27
  }, [d]), i.hidden)
30
28
  return null;
31
29
  let I = s.indexOf("\\/"), v = s.substring(0, I), h = g + "#" + v, w = i.allInitials.map((e) => /* @__PURE__ */ t.jsx(
32
- f,
30
+ p,
33
31
  {
34
32
  style: {
35
33
  padding: "0 5px",
@@ -38,11 +36,11 @@ const W = R.memo(function(b) {
38
36
  color: "var(--mainBlue)",
39
37
  textDecoration: e === i.initial ? "underline" : "none"
40
38
  },
41
- to: h + x(i.firstComponentNameByInitial[e]),
39
+ to: h + m(i.firstComponentNameByInitial[e]),
42
40
  children: e
43
41
  },
44
42
  e
45
- )), m = [], C = i.itemInfoForInitial.length, V = Math.ceil(C / 3);
43
+ )), x = [], C = i.itemInfoForInitial.length, V = Math.ceil(C / 3);
46
44
  for (let e = 0; e < V; e++) {
47
45
  let a = [];
48
46
  for (let l = e * 3; l < (e + 1) * 3; l++) {
@@ -51,7 +49,7 @@ const W = R.memo(function(b) {
51
49
  break;
52
50
  a.push(
53
51
  /* @__PURE__ */ t.jsx("td", { width: "33%", children: /* @__PURE__ */ t.jsx(
54
- f,
52
+ p,
55
53
  {
56
54
  style: {
57
55
  display: "block",
@@ -62,16 +60,16 @@ const W = R.memo(function(b) {
62
60
  textDecoration: "none",
63
61
  backgroundColor: r.selected ? "var(--mainGray)" : "var(--canvas)"
64
62
  },
65
- to: h + x(r.componentName),
63
+ to: h + m(r.componentName),
66
64
  children: r.label
67
65
  },
68
66
  r.ind
69
67
  ) })
70
68
  );
71
69
  }
72
- m.push(/* @__PURE__ */ t.jsx("tr", { children: a }, e));
70
+ x.push(/* @__PURE__ */ t.jsx("tr", { children: a }, e));
73
71
  }
74
- let S = /* @__PURE__ */ t.jsx("table", { children: m }), k = /* @__PURE__ */ t.jsxs("div", { style: { width: "100%" }, "data-test": "labelPicker", children: [
72
+ let S = /* @__PURE__ */ t.jsx("table", { children: x }), k = /* @__PURE__ */ t.jsxs("div", { style: { width: "100%" }, "data-test": "labelPicker", children: [
75
73
  /* @__PURE__ */ t.jsx(
76
74
  "div",
77
75
  {
@@ -111,5 +109,5 @@ const W = R.memo(function(b) {
111
109
  ] }) });
112
110
  });
113
111
  export {
114
- W as default
112
+ O as default
115
113
  };
@@ -1,8 +1,6 @@
1
- import { u as R, R as C, r as v, j as n, V as _ } from "./index-85d4fdb6.js";
1
+ import { u as R, R as C, r as v, j as n, V as _ } from "./index-7912373f.js";
2
2
  import k, { useState as B, useRef as N, useEffect as T } from "react";
3
- import "react-dom";
4
- import "styled-components";
5
- const U = k.memo(function f(b) {
3
+ const O = k.memo(function f(b) {
6
4
  let {
7
5
  name: w,
8
6
  id: c,
@@ -14,11 +12,11 @@ const U = k.memo(function f(b) {
14
12
  callAction: d
15
13
  } = R(b);
16
14
  f.baseStateVariable = "selectedIndices";
17
- const [o, p] = B(
15
+ const [o, h] = B(
18
16
  e.selectedIndices
19
17
  ), x = C(v(I));
20
18
  let r = N(null);
21
- !g && r.current !== e.selectedIndices ? (p(e.selectedIndices), r.current = e.selectedIndices) : r.current = null;
19
+ !g && r.current !== e.selectedIndices ? (h(e.selectedIndices), r.current = e.selectedIndices) : r.current = null;
22
20
  let j = (t) => {
23
21
  d({
24
22
  action: a.recordVisibilityChange,
@@ -36,7 +34,7 @@ const U = k.memo(function f(b) {
36
34
  t.target.value && (i = Array.from(
37
35
  t.target.selectedOptions,
38
36
  (s) => Number(s.value)
39
- )), (o.length !== i.length || o.some((s, l) => s != i[l])) && (p(i), r.current = e.selectedIndices, x((s) => {
37
+ )), (o.length !== i.length || o.some((s, l) => s != i[l])) && (h(i), r.current = e.selectedIndices, x((s) => {
40
38
  let l = { ...s };
41
39
  return l.ignoreUpdate = !0, l;
42
40
  }), d({
@@ -63,10 +61,10 @@ const U = k.memo(function f(b) {
63
61
  u = e.childInfo.map(function(t, i) {
64
62
  return /* @__PURE__ */ n.jsx("option", { value: i + 1, children: t.title }, i + 1);
65
63
  });
66
- let V = o[0], h = null;
67
- e.label && (h = e.label + ": ");
64
+ let V = o[0], p = null;
65
+ e.label && (p = e.label + ": ");
68
66
  let y = /* @__PURE__ */ n.jsx("p", { children: /* @__PURE__ */ n.jsxs("label", { children: [
69
- h,
67
+ p,
70
68
  /* @__PURE__ */ n.jsx(
71
69
  "select",
72
70
  {
@@ -86,5 +84,5 @@ const U = k.memo(function f(b) {
86
84
  ] }) });
87
85
  });
88
86
  export {
89
- U as default
87
+ O as default
90
88
  };
@@ -1,10 +1,7 @@
1
- import { u as Oe, d as Me, e as Se, h as k, j as y } from "./index-85d4fdb6.js";
1
+ import { u as Oe, d as Me, e as Se, h as k, j as y } from "./index-7912373f.js";
2
2
  import De, { useContext as Re, useRef as f, useEffect as ye } from "react";
3
- import { BoardContext as Xe, LINE_LAYER_OFFSET as Ce, VERTEX_LAYER_OFFSET as Z, CONTROL_POINT_LAYER_OFFSET as xe } from "./graph-102e9613.js";
4
- import "react-dom";
5
- import "styled-components";
6
- import "./css-ab4d83ca.js";
7
- const Ee = De.memo(function G($) {
3
+ import { BoardContext as Xe, LINE_LAYER_OFFSET as Ce, VERTEX_LAYER_OFFSET as Z, CONTROL_POINT_LAYER_OFFSET as xe } from "./graph-d69449f2.js";
4
+ const _e = De.memo(function G($) {
8
5
  let { name: F, id: O, SVs: e, actions: m, sourceOfUpdate: Y, callAction: b } = Oe($);
9
6
  G.ignoreActionsWithoutCore = () => !0;
10
7
  const o = Re(Xe);
@@ -442,5 +439,5 @@ function we(G, $) {
442
439
  return G === "dashed" || $ ? 2 : G === "solid" ? 0 : G === "dotted" ? 1 : 0;
443
440
  }
444
441
  export {
445
- Ee as default
442
+ _e as default
446
443
  };
package/dist/doenetml.js CHANGED
@@ -1,20 +1,17 @@
1
- import { i as s, a3 as o, S as n, X as m, U as d, e as l, Y as p, T as c, Z as C, W as v, a2 as A, $ as f, a0 as u, a1 as x } from "./index-85d4fdb6.js";
2
- import "react";
3
- import "react-dom";
4
- import "styled-components";
1
+ import { i as r, a5 as i, U as s, Z as t, X as o, e as n, $ as d, W as l, a0 as m, Y as c, a4 as C, a1 as v, a2 as A, a3 as f } from "./index-7912373f.js";
5
2
  export {
6
- s as CodeMirror,
7
- o as DarkmodeController,
8
- n as DoenetML,
9
- m as calculateOrderAndVariants,
10
- d as cidFromText,
11
- l as darkModeAtom,
12
- p as determineNumberOfActivityVariants,
13
- c as mathjaxConfig,
14
- C as parseActivityDefinition,
15
- v as retrieveTextFileForCid,
16
- A as returnAllPossibleVariants,
17
- f as returnNumberOfActivityVariantsForCid,
18
- u as serializedComponentsReplacer,
19
- x as serializedComponentsReviver
3
+ r as CodeMirror,
4
+ i as DarkmodeController,
5
+ s as DoenetML,
6
+ t as calculateOrderAndVariants,
7
+ o as cidFromText,
8
+ n as darkModeAtom,
9
+ d as determineNumberOfActivityVariants,
10
+ l as mathjaxConfig,
11
+ m as parseActivityDefinition,
12
+ c as retrieveTextFileForCid,
13
+ C as returnAllPossibleVariants,
14
+ v as returnNumberOfActivityVariantsForCid,
15
+ A as serializedComponentsReplacer,
16
+ f as serializedComponentsReviver
20
17
  };