@khanacademy/perseus-editor 12.0.0 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -91,7 +91,7 @@ var arrowCounterClockwise__default = /*#__PURE__*/_interopDefaultLegacy(arrowCou
91
91
 
92
92
  // This file is processed by a Rollup plugin (replace) to inject the production
93
93
  const libName = "@khanacademy/perseus-editor";
94
- const libVersion = "12.0.0";
94
+ const libVersion = "13.0.0";
95
95
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
96
96
 
97
97
  function _extends() {
@@ -286,13 +286,13 @@ class SectionControlButton extends React__namespace.Component {
286
286
  role: "button",
287
287
  hideDefaultFocusRing: true,
288
288
  "aria-label": title,
289
- style: styles$S.button
289
+ style: styles$T.button
290
290
  }, _ref => {
291
291
  return /*#__PURE__*/React__namespace.createElement(InlineIcon$a, icon);
292
292
  });
293
293
  }
294
294
  }
295
- const styles$S = aphrodite.StyleSheet.create({
295
+ const styles$T = aphrodite.StyleSheet.create({
296
296
  button: {
297
297
  backgroundColor: wonderBlocksTokens.color.gold,
298
298
  margin: 2,
@@ -20673,11 +20673,11 @@ class Spring extends React__namespace.Component {
20673
20673
  } = this.props;
20674
20674
  return React__namespace.createElement(wonderBlocksCore.View, {
20675
20675
  "aria-hidden": "true",
20676
- style: [styles$R.grow, style]
20676
+ style: [styles$S.grow, style]
20677
20677
  });
20678
20678
  }
20679
20679
  }
20680
- const styles$R = aphrodite.StyleSheet.create({
20680
+ const styles$S = aphrodite.StyleSheet.create({
20681
20681
  grow: {
20682
20682
  flexGrow: 1
20683
20683
  }
@@ -20914,13 +20914,13 @@ class WidgetSelect extends React__namespace.Component {
20914
20914
  * that collapse a region.
20915
20915
  */
20916
20916
  function ToggleableCaret(props) {
20917
- const iconStyle = props.isExpanded ? styles$Q.expanded : styles$Q.collapsed;
20917
+ const iconStyle = props.isExpanded ? styles$R.expanded : styles$R.collapsed;
20918
20918
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksIcon.PhosphorIcon, {
20919
20919
  icon: caretRight__default["default"],
20920
20920
  style: iconStyle
20921
20921
  });
20922
20922
  }
20923
- const styles$Q = aphrodite.StyleSheet.create({
20923
+ const styles$R = aphrodite.StyleSheet.create({
20924
20924
  collapsed: {
20925
20925
  transition: ".15s"
20926
20926
  },
@@ -20950,16 +20950,16 @@ class TexErrorView extends React__namespace.Component {
20950
20950
  showErrors
20951
20951
  } = this.state;
20952
20952
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20953
- style: styles$P.errorContainer
20953
+ style: styles$Q.errorContainer
20954
20954
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20955
- style: styles$P.title,
20955
+ style: styles$Q.title,
20956
20956
  onClick: this.handleToggleTexErrors
20957
20957
  }, /*#__PURE__*/React__namespace.createElement(ToggleableCaret, {
20958
20958
  isExpanded: showErrors
20959
20959
  }), "\xA0 TeX Errors (", errorList.length, ")"), showErrors && /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20960
- style: styles$P.errorExplanation
20960
+ style: styles$Q.errorExplanation
20961
20961
  }, "If your math doesn't display correctly, these errors might help you troubleshoot. Message #content-kitchen for help."), showErrors && errorList.map((e, index) => /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20962
- style: styles$P.error,
20962
+ style: styles$Q.error,
20963
20963
  key: index
20964
20964
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20965
20965
  style: {
@@ -20968,7 +20968,7 @@ class TexErrorView extends React__namespace.Component {
20968
20968
  }, e.math), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, e.message))));
20969
20969
  }
20970
20970
  }
20971
- const styles$P = aphrodite.StyleSheet.create({
20971
+ const styles$Q = aphrodite.StyleSheet.create({
20972
20972
  title: {
20973
20973
  backgroundColor: "#eee",
20974
20974
  fontSize: "1.25em",
@@ -24045,7 +24045,7 @@ class ItemExtrasEditor extends React__namespace.Component {
24045
24045
  }
24046
24046
  }
24047
24047
  const ItemExtraCheckbox = props => /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
24048
- style: [styles$O.checkbox, props.indent ? styles$O.indented : undefined]
24048
+ style: [styles$P.checkbox, props.indent ? styles$P.indented : undefined]
24049
24049
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.Checkbox, {
24050
24050
  label: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
24051
24051
  style: {
@@ -24055,7 +24055,7 @@ const ItemExtraCheckbox = props => /*#__PURE__*/React__namespace.createElement(w
24055
24055
  checked: props.checked,
24056
24056
  onChange: newCheckedState => props.onChange(newCheckedState)
24057
24057
  }));
24058
- const styles$O = aphrodite.StyleSheet.create({
24058
+ const styles$P = aphrodite.StyleSheet.create({
24059
24059
  indented: {
24060
24060
  marginInlineStart: wonderBlocksTokens.spacing.large_24
24061
24061
  }
@@ -24718,12 +24718,12 @@ class SimpleButton extends React__namespace.Component {
24718
24718
  ...otherProps
24719
24719
  } = this.props;
24720
24720
  return /*#__PURE__*/React__namespace.createElement("div", _extends({
24721
- className: aphrodite.css(styles$N.baseButton, color === "green" && styles$N.green, color === "orange" && styles$N.orange),
24721
+ className: aphrodite.css(styles$O.baseButton, color === "green" && styles$O.green, color === "orange" && styles$O.orange),
24722
24722
  onClick: onClick
24723
24723
  }, otherProps), children);
24724
24724
  }
24725
24725
  }
24726
- const styles$N = aphrodite.StyleSheet.create({
24726
+ const styles$O = aphrodite.StyleSheet.create({
24727
24727
  baseButton: {
24728
24728
  top: "0",
24729
24729
  fontSize: "11px",
@@ -24936,23 +24936,23 @@ const LeafContainer = _ref2 => {
24936
24936
  } = _ref2;
24937
24937
  const hasPreviewHeading = shape.type === "content" || shape.type === "hint";
24938
24938
  const previewHeading = hasPreviewHeading && /*#__PURE__*/React__namespace.createElement("div", {
24939
- className: aphrodite.css(styles$M.containerHeader)
24939
+ className: aphrodite.css(styles$N.containerHeader)
24940
24940
  }, /*#__PURE__*/React__namespace.createElement(Header, {
24941
24941
  depth: path.length,
24942
- className: aphrodite.css(styles$M.containerTitle)
24942
+ className: aphrodite.css(styles$N.containerTitle)
24943
24943
  }, capitalize(name)));
24944
24944
  return /*#__PURE__*/React__namespace.createElement("div", {
24945
- className: aphrodite.css(styles$M.container)
24945
+ className: aphrodite.css(styles$N.container)
24946
24946
  }, /*#__PURE__*/React__namespace.createElement("span", {
24947
- className: aphrodite.css(styles$M.row, styles$M.rowHeading)
24947
+ className: aphrodite.css(styles$N.row, styles$N.rowHeading)
24948
24948
  }, /*#__PURE__*/React__namespace.createElement("div", {
24949
- className: aphrodite.css(styles$M.columnLeft)
24949
+ className: aphrodite.css(styles$N.columnLeft)
24950
24950
  }, /*#__PURE__*/React__namespace.createElement("div", {
24951
- className: "pod-title " + aphrodite.css(styles$M.containerHeader)
24951
+ className: "pod-title " + aphrodite.css(styles$N.containerHeader)
24952
24952
  }, /*#__PURE__*/React__namespace.createElement("div", {
24953
- className: aphrodite.css(styles$M.containerTitle)
24953
+ className: aphrodite.css(styles$N.containerTitle)
24954
24954
  }, capitalize(name)), controls)), /*#__PURE__*/React__namespace.createElement("div", {
24955
- className: aphrodite.css(styles$M.columnRight)
24955
+ className: aphrodite.css(styles$N.columnRight)
24956
24956
  }, previewHeading)), children);
24957
24957
  };
24958
24958
  const ArrayContainer = props => {
@@ -24965,11 +24965,11 @@ const ArrayContainer = props => {
24965
24965
  actions
24966
24966
  } = props;
24967
24967
  return /*#__PURE__*/React__namespace.createElement("div", {
24968
- className: aphrodite.css(styles$M.container)
24968
+ className: aphrodite.css(styles$N.container)
24969
24969
  }, controls && /*#__PURE__*/React__namespace.createElement("div", {
24970
- className: aphrodite.css(styles$M.columnLeft, styles$M.containerHeader)
24970
+ className: aphrodite.css(styles$N.columnLeft, styles$N.containerHeader)
24971
24971
  }, controls), /*#__PURE__*/React__namespace.createElement("div", null, children), /*#__PURE__*/React__namespace.createElement("div", {
24972
- className: aphrodite.css(styles$M.columnLeft)
24972
+ className: aphrodite.css(styles$N.columnLeft)
24973
24973
  }, /*#__PURE__*/React__namespace.createElement("a", {
24974
24974
  href: "javascript:void 0",
24975
24975
  onClick: () => actions.addArrayElement(path, shape.elementShape)
@@ -24983,28 +24983,28 @@ const ObjectContainer = _ref3 => {
24983
24983
  path
24984
24984
  } = _ref3;
24985
24985
  const headingEditor = /*#__PURE__*/React__namespace.createElement("div", {
24986
- className: aphrodite.css(styles$M.containerHeader)
24986
+ className: aphrodite.css(styles$N.containerHeader)
24987
24987
  }, /*#__PURE__*/React__namespace.createElement(Header, {
24988
24988
  depth: path.length,
24989
- className: aphrodite.css(styles$M.containerTitle)
24989
+ className: aphrodite.css(styles$N.containerTitle)
24990
24990
  }, capitalize(name)), controls);
24991
24991
  const headingPreview = (name || controls) && /*#__PURE__*/React__namespace.createElement("div", {
24992
- className: aphrodite.css(styles$M.containerHeader, styles$M.previewCollectionHeader)
24992
+ className: aphrodite.css(styles$N.containerHeader, styles$N.previewCollectionHeader)
24993
24993
  }, /*#__PURE__*/React__namespace.createElement(Header, {
24994
24994
  depth: path.length,
24995
- className: aphrodite.css(styles$M.containerTitle)
24995
+ className: aphrodite.css(styles$N.containerTitle)
24996
24996
  }, capitalize(name)));
24997
24997
  const hasBothHeadings = headingEditor && headingPreview;
24998
24998
  return /*#__PURE__*/React__namespace.createElement("div", {
24999
- className: aphrodite.css(styles$M.container)
24999
+ className: aphrodite.css(styles$N.container)
25000
25000
  }, hasBothHeadings && /*#__PURE__*/React__namespace.createElement("span", {
25001
- className: aphrodite.css(styles$M.row)
25001
+ className: aphrodite.css(styles$N.row)
25002
25002
  }, /*#__PURE__*/React__namespace.createElement("div", {
25003
- className: aphrodite.css(styles$M.columnLeft)
25003
+ className: aphrodite.css(styles$N.columnLeft)
25004
25004
  }, headingEditor), /*#__PURE__*/React__namespace.createElement("div", {
25005
- className: aphrodite.css(styles$M.columnRight)
25005
+ className: aphrodite.css(styles$N.columnRight)
25006
25006
  }, headingPreview)), /*#__PURE__*/React__namespace.createElement("div", {
25007
- className: aphrodite.css(path.length > 0 && styles$M.contentIndent)
25007
+ className: aphrodite.css(path.length > 0 && styles$N.contentIndent)
25008
25008
  }, children));
25009
25009
  };
25010
25010
 
@@ -25124,11 +25124,11 @@ const ItemNodeContent = withStickiness(props => {
25124
25124
  className: "framework-perseus"
25125
25125
  }, lens(renderers).get(path));
25126
25126
  return /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement("div", {
25127
- className: aphrodite.css(styles$M.row)
25127
+ className: aphrodite.css(styles$N.row)
25128
25128
  }, /*#__PURE__*/React__namespace.createElement("div", {
25129
- className: aphrodite.css(styles$M.columnLeft)
25129
+ className: aphrodite.css(styles$N.columnLeft)
25130
25130
  }, /*#__PURE__*/React__namespace.createElement("div", {
25131
- className: aphrodite.css(sticky && styles$M.sticky)
25131
+ className: aphrodite.css(sticky && styles$N.sticky)
25132
25132
  },
25133
25133
  /*#__PURE__*/
25134
25134
  // @ts-expect-error - TS2769 - No overload matches this call.
@@ -25136,9 +25136,9 @@ const ItemNodeContent = withStickiness(props => {
25136
25136
  onChange: newVal => actions.mergeValueAtPath(path, newVal),
25137
25137
  apiOptions: apiOptions
25138
25138
  })))), /*#__PURE__*/React__namespace.createElement("div", {
25139
- className: aphrodite.css(styles$M.columnRight)
25139
+ className: aphrodite.css(styles$N.columnRight)
25140
25140
  }, /*#__PURE__*/React__namespace.createElement("div", {
25141
- className: aphrodite.css(sticky && styles$M.sticky)
25141
+ className: aphrodite.css(sticky && styles$N.sticky)
25142
25142
  }, preview))));
25143
25143
  });
25144
25144
  const HintNodeContent = withStickiness(props => {
@@ -25154,13 +25154,13 @@ const HintNodeContent = withStickiness(props => {
25154
25154
  className: "framework-perseus"
25155
25155
  }, lens(renderers).get(path));
25156
25156
  return /*#__PURE__*/React__namespace.createElement("div", {
25157
- className: aphrodite.css(styles$M.row)
25157
+ className: aphrodite.css(styles$N.row)
25158
25158
  }, /*#__PURE__*/React__namespace.createElement("div", {
25159
- className: aphrodite.css(styles$M.columnLeft)
25159
+ className: aphrodite.css(styles$N.columnLeft)
25160
25160
  }, /*#__PURE__*/React__namespace.createElement("div", {
25161
- className: aphrodite.css(sticky && styles$M.sticky)
25161
+ className: aphrodite.css(sticky && styles$N.sticky)
25162
25162
  }, /*#__PURE__*/React__namespace.createElement(HintEditor, _extends({}, data, {
25163
- className: aphrodite.css(styles$M.hintEditor),
25163
+ className: aphrodite.css(styles$N.hintEditor),
25164
25164
  onChange: newVal => actions.mergeValueAtPath(path, newVal),
25165
25165
  apiOptions: apiOptions,
25166
25166
  showTitle: false,
@@ -25175,9 +25175,9 @@ const HintNodeContent = withStickiness(props => {
25175
25175
  isFirst: true,
25176
25176
  isLast: true
25177
25177
  })))), /*#__PURE__*/React__namespace.createElement("div", {
25178
- className: aphrodite.css(styles$M.columnRight)
25178
+ className: aphrodite.css(styles$N.columnRight)
25179
25179
  }, /*#__PURE__*/React__namespace.createElement("div", {
25180
- className: aphrodite.css(sticky && styles$M.sticky)
25180
+ className: aphrodite.css(sticky && styles$N.sticky)
25181
25181
  }, preview)));
25182
25182
  });
25183
25183
  const TagsNodeContent = props => {
@@ -25194,9 +25194,9 @@ const TagsNodeContent = props => {
25194
25194
  return null;
25195
25195
  }
25196
25196
  return /*#__PURE__*/React__namespace.createElement("div", {
25197
- className: aphrodite.css(styles$M.columnLeft)
25197
+ className: aphrodite.css(styles$N.columnLeft)
25198
25198
  }, /*#__PURE__*/React__namespace.createElement("div", {
25199
- className: aphrodite.css(styles$M.tagsEditor)
25199
+ className: aphrodite.css(styles$N.tagsEditor)
25200
25200
  }, /*#__PURE__*/React__namespace.createElement(GroupMetadataEditor, {
25201
25201
  value: data,
25202
25202
  onChange: newVal => actions.setValueAtPath(path, newVal),
@@ -25227,23 +25227,23 @@ const ArrayNodeContent = props => {
25227
25227
  const subpath = path.concat(i);
25228
25228
  const controls = [i > 0 && /*#__PURE__*/React__namespace.createElement("div", {
25229
25229
  key: "moveArrayElementUp",
25230
- className: aphrodite.css(styles$M.control)
25230
+ className: aphrodite.css(styles$N.control)
25231
25231
  }, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
25232
25232
  color: "orange",
25233
25233
  title: "Move up",
25234
25234
  onClick: () => actions.moveArrayElementUp(subpath)
25235
25235
  }, /*#__PURE__*/React__namespace.createElement("div", {
25236
- className: aphrodite.css(styles$M.verticalFlip)
25236
+ className: aphrodite.css(styles$N.verticalFlip)
25237
25237
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$5, iconChevronDown)))), i < data.length - 1 && /*#__PURE__*/React__namespace.createElement("div", {
25238
25238
  key: "moveArrayElementDown",
25239
- className: aphrodite.css(styles$M.control)
25239
+ className: aphrodite.css(styles$N.control)
25240
25240
  }, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
25241
25241
  color: "orange",
25242
25242
  title: "Move down",
25243
25243
  onClick: () => actions.moveArrayElementDown(subpath)
25244
25244
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$5, iconChevronDown))), /*#__PURE__*/React__namespace.createElement("div", {
25245
25245
  key: "removeArrayElement",
25246
- className: aphrodite.css(styles$M.control)
25246
+ className: aphrodite.css(styles$N.control)
25247
25247
  }, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
25248
25248
  color: "orange",
25249
25249
  title: "Delete",
@@ -25251,7 +25251,7 @@ const ArrayNodeContent = props => {
25251
25251
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$5, iconTrash$4)))];
25252
25252
  return /*#__PURE__*/React__namespace.createElement("div", {
25253
25253
  key: i,
25254
- className: aphrodite.css(styles$M.arrayElement, !elementIsLeaf && styles$M.arrayElementAndNotLeaf)
25254
+ className: aphrodite.css(styles$N.arrayElement, !elementIsLeaf && styles$N.arrayElementAndNotLeaf)
25255
25255
  }, /*#__PURE__*/React__namespace.createElement(NodeContainer, _extends({}, otherProps, {
25256
25256
  key: i,
25257
25257
  shape: shape.elementShape,
@@ -25277,7 +25277,7 @@ const ObjectNodeContent = props => {
25277
25277
  // made sense to the shape's author is the order in which we'll iterate :)
25278
25278
  const children = Object.keys(shape.shape).map(subkey => /*#__PURE__*/React__namespace.createElement("div", {
25279
25279
  key: subkey,
25280
- className: aphrodite.css(styles$M.objectElement)
25280
+ className: aphrodite.css(styles$N.objectElement)
25281
25281
  }, /*#__PURE__*/React__namespace.createElement(NodeContainer, _extends({}, otherProps, {
25282
25282
  shape: shape.shape[subkey],
25283
25283
  data: data[subkey],
@@ -25447,7 +25447,7 @@ class MultiRendererEditor extends React__namespace.Component {
25447
25447
  }, this._renderContent());
25448
25448
  }
25449
25449
  }
25450
- const styles$M = aphrodite.StyleSheet.create({
25450
+ const styles$N = aphrodite.StyleSheet.create({
25451
25451
  // This is used in a number of places throughout this file.
25452
25452
  container: {},
25453
25453
  // eslint-disable-next-line react-native/no-unused-styles
@@ -26644,7 +26644,7 @@ const SortableItem = createReactClass__default["default"]({
26644
26644
  }
26645
26645
  return /*#__PURE__*/React__namespace.createElement("li", {
26646
26646
  draggable: this.props.draggable,
26647
- className: [dragState, aphrodite.css(styles$L.sortableListItem)].join(" "),
26647
+ className: [dragState, aphrodite.css(styles$M.sortableListItem)].join(" "),
26648
26648
  onDragStart: this.handleDragStart,
26649
26649
  onDrop: this.handleDrop,
26650
26650
  onDragEnter: this.handleDragEnter,
@@ -26652,7 +26652,7 @@ const SortableItem = createReactClass__default["default"]({
26652
26652
  }, this.props.component);
26653
26653
  }
26654
26654
  });
26655
- const styles$L = aphrodite.StyleSheet.create({
26655
+ const styles$M = aphrodite.StyleSheet.create({
26656
26656
  sortableListItem: {
26657
26657
  margin: "5px 0"
26658
26658
  }
@@ -26772,13 +26772,13 @@ class ExpressionEditor extends React__namespace.Component {
26772
26772
  onChange: this.handleToggleDiv
26773
26773
  }));
26774
26774
  return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.HeadingSmall, null, "Global Options"), /*#__PURE__*/React__namespace.createElement("div", {
26775
- className: aphrodite.css(styles$K.paddedY)
26775
+ className: aphrodite.css(styles$L.paddedY)
26776
26776
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.LabeledTextField, {
26777
26777
  label: "Visible label",
26778
26778
  value: this.props.visibleLabel || "",
26779
26779
  onChange: this.change("visibleLabel")
26780
26780
  }), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.createElement("p", null, "Optional visible text; strongly encouraged to help learners using dictation software, but can be omitted if the surrounding content provides enough context."))), /*#__PURE__*/React__namespace.createElement("div", {
26781
- className: aphrodite.css(styles$K.paddedY)
26781
+ className: aphrodite.css(styles$L.paddedY)
26782
26782
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.LabeledTextField, {
26783
26783
  label: "Aria label",
26784
26784
  value: this.props.ariaLabel || "",
@@ -26787,13 +26787,13 @@ class ExpressionEditor extends React__namespace.Component {
26787
26787
  href: "https://www.w3.org/WAI/tips/designing/#ensure-that-form-elements-include-clearly-associated-labels",
26788
26788
  target: "_blank"
26789
26789
  }, "this article.")))), /*#__PURE__*/React__namespace.createElement("div", {
26790
- className: aphrodite.css(styles$K.paddedY)
26790
+ className: aphrodite.css(styles$L.paddedY)
26791
26791
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.LabeledTextField, {
26792
26792
  label: "Function variables",
26793
26793
  value: this.state.functionsInternal,
26794
26794
  onChange: this.handleFunctions
26795
26795
  }), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.createElement("p", null, "Single-letter variables listed here will be interpreted as functions. This let us know that f(x) means \"f of x\" and not \"f times x\"."))), /*#__PURE__*/React__namespace.createElement("div", {
26796
- className: aphrodite.css(styles$K.paddedY)
26796
+ className: aphrodite.css(styles$L.paddedY)
26797
26797
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.Checkbox, {
26798
26798
  label: "Use \xD7 instead of \u22C5 for multiplication",
26799
26799
  checked: this.props.times,
@@ -26803,7 +26803,7 @@ class ExpressionEditor extends React__namespace.Component {
26803
26803
  });
26804
26804
  }
26805
26805
  }), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.createElement("p", null, "For pre-algebra problems this option displays multiplication as \\times instead of \\cdot in both the rendered output and the acceptable formats examples."))), /*#__PURE__*/React__namespace.createElement("div", {
26806
- className: aphrodite.css(styles$K.paddedY)
26806
+ className: aphrodite.css(styles$L.paddedY)
26807
26807
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.HeadingXSmall, null, "Button Sets"), buttonSetChoices), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.HeadingSmall, null, "Answers"), /*#__PURE__*/React__namespace.createElement("p", {
26808
26808
  style: {
26809
26809
  margin: "4px 0"
@@ -26991,18 +26991,18 @@ class AnswerOption extends React__namespace.Component {
26991
26991
  color: "destructive",
26992
26992
  light: true
26993
26993
  }, "Delete");
26994
- const answerStatusCss = aphrodite.css(styles$K.answerStatus, this.props.considered === "wrong" && styles$K.answerStatusWrong, this.props.considered === "correct" && styles$K.answerStatusCorrect, this.props.considered === "ungraded" && styles$K.answerStatusUngraded);
26994
+ const answerStatusCss = aphrodite.css(styles$L.answerStatus, this.props.considered === "wrong" && styles$L.answerStatusWrong, this.props.considered === "correct" && styles$L.answerStatusCorrect, this.props.considered === "ungraded" && styles$L.answerStatusUngraded);
26995
26995
  return /*#__PURE__*/React__namespace.createElement("div", {
26996
- className: aphrodite.css(styles$K.answerOption)
26996
+ className: aphrodite.css(styles$L.answerOption)
26997
26997
  }, /*#__PURE__*/React__namespace.createElement("div", {
26998
- className: aphrodite.css(styles$K.answerHandle)
26998
+ className: aphrodite.css(styles$L.answerHandle)
26999
26999
  }), /*#__PURE__*/React__namespace.createElement("div", {
27000
- className: aphrodite.css(styles$K.answerBody)
27000
+ className: aphrodite.css(styles$L.answerBody)
27001
27001
  }, /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("button", {
27002
27002
  onClick: this.toggleConsidered,
27003
27003
  className: answerStatusCss
27004
27004
  }, this.props.considered), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(perseus.Expression, this.props.expressionProps))), /*#__PURE__*/React__namespace.createElement("div", {
27005
- className: aphrodite.css(styles$K.paddedY, styles$K.paddedX)
27005
+ className: aphrodite.css(styles$L.paddedY, styles$L.paddedX)
27006
27006
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.Checkbox, {
27007
27007
  label: "Answer expression must have the same form.",
27008
27008
  checked: this.props.form,
@@ -27012,7 +27012,7 @@ class AnswerOption extends React__namespace.Component {
27012
27012
  });
27013
27013
  }
27014
27014
  }), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.createElement("p", null, "The student's answer must be in the same form. Commutativity and excess negative signs are ignored."))), /*#__PURE__*/React__namespace.createElement("div", {
27015
- className: aphrodite.css(styles$K.paddedY, styles$K.paddedX)
27015
+ className: aphrodite.css(styles$L.paddedY, styles$L.paddedX)
27016
27016
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.Checkbox, {
27017
27017
  label: "Answer expression must be fully expanded and simplified.",
27018
27018
  checked: this.props.simplify,
@@ -27022,7 +27022,7 @@ class AnswerOption extends React__namespace.Component {
27022
27022
  });
27023
27023
  }
27024
27024
  }), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.createElement("p", null, "The student's answer must be fully expanded and simplified. Answering this equation (x^2+2x+1) with this factored equation (x+1)^2 will render this response \"Your answer is not fully expanded and simplified.\""))), /*#__PURE__*/React__namespace.createElement("div", {
27025
- className: aphrodite.css(styles$K.buttonRow, styles$K.paddedY)
27025
+ className: aphrodite.css(styles$L.buttonRow, styles$L.paddedY)
27026
27026
  }, removeButton)));
27027
27027
  }
27028
27028
  handleImSure = () => {
@@ -27045,7 +27045,7 @@ class AnswerOption extends React__namespace.Component {
27045
27045
  });
27046
27046
  };
27047
27047
  }
27048
- const styles$K = aphrodite.StyleSheet.create({
27048
+ const styles$L = aphrodite.StyleSheet.create({
27049
27049
  paddedX: {
27050
27050
  paddingLeft: wonderBlocksTokens.spacing.xSmall_8,
27051
27051
  paddingRight: wonderBlocksTokens.spacing.xSmall_8
@@ -27147,10 +27147,10 @@ class GradedGroupEditor extends React__namespace.Component {
27147
27147
  }, /*#__PURE__*/React__namespace.createElement("div", {
27148
27148
  className: "perseus-widget-row"
27149
27149
  }, /*#__PURE__*/React__namespace.createElement("label", {
27150
- className: aphrodite.css(styles$J.title)
27150
+ className: aphrodite.css(styles$K.title)
27151
27151
  }, "Title:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$6, {
27152
27152
  value: this.props.title,
27153
- className: aphrodite.css(styles$J.input)
27153
+ className: aphrodite.css(styles$K.input)
27154
27154
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
27155
27155
  ,
27156
27156
  onChange: this.change("title")
@@ -27175,7 +27175,7 @@ class GradedGroupEditor extends React__namespace.Component {
27175
27175
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$3, iconPlus$1), " Add a hint"), this.props.hint && /*#__PURE__*/React__namespace.createElement("div", {
27176
27176
  className: "perseus-hint-editor"
27177
27177
  }, /*#__PURE__*/React__namespace.createElement("div", {
27178
- className: aphrodite.css(styles$J.hintsTitle)
27178
+ className: aphrodite.css(styles$K.hintsTitle)
27179
27179
  }, "Hint"), /*#__PURE__*/React__namespace.createElement(Editor, {
27180
27180
  ref: this.hintEditor,
27181
27181
  content: this.props.hint ? this.props.hint.content : "",
@@ -27207,7 +27207,7 @@ class GradedGroupEditor extends React__namespace.Component {
27207
27207
  };
27208
27208
  };
27209
27209
  }
27210
- const styles$J = aphrodite.StyleSheet.create({
27210
+ const styles$K = aphrodite.StyleSheet.create({
27211
27211
  title: {
27212
27212
  fontSize: 18,
27213
27213
  fontWeight: "bold"
@@ -28594,13 +28594,13 @@ function MathquillInput(props) {
28594
28594
  }
28595
28595
  });
28596
28596
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
28597
- style: styles$I.outerWrapper
28597
+ style: styles$J.outerWrapper
28598
28598
  }, /*#__PURE__*/React__namespace.createElement("span", {
28599
28599
  ref: mathFieldWrapperRef,
28600
28600
  className: "perseus-math-input mq-editable-field mq-math-mode"
28601
28601
  }));
28602
28602
  }
28603
- const styles$I = aphrodite.StyleSheet.create({
28603
+ const styles$J = aphrodite.StyleSheet.create({
28604
28604
  outerWrapper: {
28605
28605
  display: "inline-block",
28606
28606
  borderStyle: "solid",
@@ -29670,16 +29670,16 @@ const LabeledRow = props => {
29670
29670
  style
29671
29671
  } = props;
29672
29672
  return /*#__PURE__*/React__namespace.createElement("label", {
29673
- className: aphrodite.css(styles$H.label)
29673
+ className: aphrodite.css(styles$I.label)
29674
29674
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
29675
- style: [styles$H.row, style]
29675
+ style: [styles$I.row, style]
29676
29676
  }, labelSide === "start" || /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, {
29677
- style: styles$H.spaceEnd
29677
+ style: styles$I.spaceEnd
29678
29678
  }, label), children, labelSide === "end" && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, {
29679
- style: styles$H.spaceStart
29679
+ style: styles$I.spaceStart
29680
29680
  }, label)));
29681
29681
  };
29682
- const styles$H = aphrodite.StyleSheet.create({
29682
+ const styles$I = aphrodite.StyleSheet.create({
29683
29683
  label: {
29684
29684
  width: "fit-content"
29685
29685
  },
@@ -29705,11 +29705,11 @@ function Heading(_ref) {
29705
29705
  onToggle
29706
29706
  } = _ref;
29707
29707
  return /*#__PURE__*/React__namespace.createElement(Clickable__default["default"], {
29708
- style: [styles$G.container, !isCollapsible && styles$G.notClickable],
29708
+ style: [styles$H.container, !isCollapsible && styles$H.notClickable],
29709
29709
  disabled: !isCollapsible,
29710
29710
  onClick: () => isCollapsible && onToggle?.(!isOpen)
29711
29711
  }, () => /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
29712
- style: styles$G.heading
29712
+ style: styles$H.heading
29713
29713
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, {
29714
29714
  style: {
29715
29715
  fontSize: 14,
@@ -29719,7 +29719,7 @@ function Heading(_ref) {
29719
29719
  isExpanded: isOpen
29720
29720
  })));
29721
29721
  }
29722
- const styles$G = aphrodite.StyleSheet.create({
29722
+ const styles$H = aphrodite.StyleSheet.create({
29723
29723
  container: {
29724
29724
  marginTop: wonderBlocksTokens.spacing.small_12,
29725
29725
  // NOTE(jeremy): This is the inverse of the @editorPadding CSS
@@ -29839,6 +29839,14 @@ function getDefaultFigureForType(type) {
29839
29839
  equation: "x^2",
29840
29840
  directionalAxis: "x"
29841
29841
  };
29842
+ case "label":
29843
+ return {
29844
+ type: "label",
29845
+ coord: [0, 0],
29846
+ text: "",
29847
+ color: DEFAULT_COLOR,
29848
+ size: "medium"
29849
+ };
29842
29850
  default:
29843
29851
  throw new wonderStuffCore.UnreachableCaseError(type);
29844
29852
  }
@@ -29991,19 +29999,24 @@ const LockedFigureSelect = props => {
29991
29999
  onChange
29992
30000
  } = props;
29993
30001
  const figureTypes = ["point", "line", "vector", "ellipse", "polygon"];
29994
- const figureTypesCurrent = props.showM2bFeatures ? [...figureTypes, "function"] : figureTypes;
30002
+ if (props.showM2bFeatures) {
30003
+ figureTypes.push("function");
30004
+ }
30005
+ if (props.showLabelsFlag) {
30006
+ figureTypes.push("label");
30007
+ }
29995
30008
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
29996
- style: styles$F.container
30009
+ style: styles$G.container
29997
30010
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionMenu, {
29998
30011
  menuText: "Add locked figure",
29999
- style: styles$F.addElementSelect
30000
- }, figureTypesCurrent.map(figureType => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionItem, {
30012
+ style: styles$G.addElementSelect
30013
+ }, figureTypes.map(figureType => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionItem, {
30001
30014
  key: `${id}-${figureType}`,
30002
30015
  label: figureType,
30003
30016
  onClick: () => onChange(figureType)
30004
30017
  }))));
30005
30018
  };
30006
- const styles$F = aphrodite.StyleSheet.create({
30019
+ const styles$G = aphrodite.StyleSheet.create({
30007
30020
  container: {
30008
30021
  marginTop: wonderBlocksTokens.spacing.xSmall_8
30009
30022
  },
@@ -30073,18 +30086,18 @@ const AngleInput = props => {
30073
30086
  }
30074
30087
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30075
30088
  tag: "label",
30076
- style: styles$E.row
30089
+ style: styles$F.row
30077
30090
  }, "angle (degrees)", /*#__PURE__*/React__namespace.createElement(Strut, {
30078
30091
  size: wonderBlocksTokens.spacing.xxSmall_6
30079
30092
  }), /*#__PURE__*/React__namespace.createElement(ScrolllessNumberTextField, {
30080
30093
  value: angleInput,
30081
30094
  onChange: handleAngleChange,
30082
- style: styles$E.textField
30095
+ style: styles$F.textField
30083
30096
  }), /*#__PURE__*/React__namespace.createElement(Strut, {
30084
30097
  size: wonderBlocksTokens.spacing.xxSmall_6
30085
30098
  }));
30086
30099
  };
30087
- const styles$E = aphrodite.StyleSheet.create({
30100
+ const styles$F = aphrodite.StyleSheet.create({
30088
30101
  row: {
30089
30102
  display: "flex",
30090
30103
  flexDirection: "row",
@@ -30133,30 +30146,30 @@ const CoordinatePairInput = props => {
30133
30146
  onChange(newCoords);
30134
30147
  }
30135
30148
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30136
- style: [styles$D.row, style]
30149
+ style: [styles$E.row, style]
30137
30150
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30138
30151
  tag: "label",
30139
- style: styles$D.row
30152
+ style: styles$E.row
30140
30153
  }, labels ? labels[0] : "x coord", /*#__PURE__*/React__namespace.createElement(Strut, {
30141
30154
  size: wonderBlocksTokens.spacing.xxSmall_6
30142
30155
  }), /*#__PURE__*/React__namespace.createElement(ScrolllessNumberTextField, {
30143
30156
  value: coordState[0],
30144
30157
  onChange: newValue => handleCoordChange(newValue, 0),
30145
- style: [styles$D.textField, error ? styles$D.errorField : undefined]
30158
+ style: [styles$E.textField, error ? styles$E.errorField : undefined]
30146
30159
  })), /*#__PURE__*/React__namespace.createElement(Strut, {
30147
30160
  size: wonderBlocksTokens.spacing.medium_16
30148
30161
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30149
30162
  tag: "label",
30150
- style: styles$D.row
30163
+ style: styles$E.row
30151
30164
  }, labels ? labels[1] : "y coord", /*#__PURE__*/React__namespace.createElement(Strut, {
30152
30165
  size: wonderBlocksTokens.spacing.xxSmall_6
30153
30166
  }), /*#__PURE__*/React__namespace.createElement(ScrolllessNumberTextField, {
30154
30167
  value: coordState[1],
30155
30168
  onChange: newValue => handleCoordChange(newValue, 1),
30156
- style: [styles$D.textField, error ? styles$D.errorField : undefined]
30169
+ style: [styles$E.textField, error ? styles$E.errorField : undefined]
30157
30170
  })));
30158
30171
  };
30159
- const styles$D = aphrodite.StyleSheet.create({
30172
+ const styles$E = aphrodite.StyleSheet.create({
30160
30173
  row: {
30161
30174
  display: "flex",
30162
30175
  flexDirection: "row",
@@ -30189,14 +30202,14 @@ const PerseusEditorAccordion = props => {
30189
30202
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksAccordion.AccordionSection, {
30190
30203
  expanded: expanded,
30191
30204
  onToggle: onToggle,
30192
- style: [styles$C.container, containerStyle],
30193
- headerStyle: styles$C.accordionHeader,
30205
+ style: [styles$D.container, containerStyle],
30206
+ headerStyle: styles$D.accordionHeader,
30194
30207
  header: header
30195
30208
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30196
- style: [styles$C.accordionPanel, panelStyle]
30209
+ style: [styles$D.accordionPanel, panelStyle]
30197
30210
  }, children)));
30198
30211
  };
30199
- const styles$C = aphrodite.StyleSheet.create({
30212
+ const styles$D = aphrodite.StyleSheet.create({
30200
30213
  container: {
30201
30214
  backgroundColor: wonderBlocksTokens.color.fadedBlue8,
30202
30215
  marginTop: wonderBlocksTokens.spacing.xSmall_8
@@ -30227,13 +30240,13 @@ const ColorSwatch = props => {
30227
30240
  "aria-label":
30228
30241
  // Don't include an aria label for decorative circles.
30229
30242
  !decorative ? `${color}, ${filled ? "filled" : "open"}` : undefined,
30230
- style: [styles$B.colorSwatch, {
30243
+ style: [styles$C.colorSwatch, {
30231
30244
  border: `4px solid ${perseus.lockedFigureColors[color]}`,
30232
30245
  backgroundColor: filled ? perseus.lockedFigureColors[color] : wonderBlocksTokens.color.white
30233
30246
  }]
30234
30247
  });
30235
30248
  };
30236
- const styles$B = aphrodite.StyleSheet.create({
30249
+ const styles$C = aphrodite.StyleSheet.create({
30237
30250
  colorSwatch: {
30238
30251
  // Add a white outline so that the color swatch is visible when
30239
30252
  // the dropdown option is highlighted with its blue background.
@@ -30252,10 +30265,10 @@ const ColorSelect = props => {
30252
30265
  onChange
30253
30266
  } = props;
30254
30267
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30255
- style: [styles$A.row, style]
30268
+ style: [styles$B.row, style]
30256
30269
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30257
30270
  tag: "label",
30258
- style: styles$A.row
30271
+ style: styles$B.row
30259
30272
  }, "color", /*#__PURE__*/React__namespace.createElement(Strut, {
30260
30273
  size: wonderBlocksTokens.spacing.xxSmall_6
30261
30274
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
@@ -30274,7 +30287,7 @@ const ColorSelect = props => {
30274
30287
  })
30275
30288
  })))));
30276
30289
  };
30277
- const styles$A = aphrodite.StyleSheet.create({
30290
+ const styles$B = aphrodite.StyleSheet.create({
30278
30291
  row: {
30279
30292
  display: "flex",
30280
30293
  flexDirection: "row",
@@ -30293,17 +30306,17 @@ const EllipseSwatch = props => {
30293
30306
  } = props;
30294
30307
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30295
30308
  "aria-label": `${color}, stroke ${strokeStyle}, fill ${fillStyle}`,
30296
- style: [styles$z.container, {
30309
+ style: [styles$A.container, {
30297
30310
  border: `4px ${strokeStyle} ${perseus.lockedFigureColors[color]}`
30298
30311
  }]
30299
30312
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30300
- style: [styles$z.innerCircle, {
30313
+ style: [styles$A.innerCircle, {
30301
30314
  backgroundColor: perseus.lockedFigureColors[color],
30302
30315
  opacity: fillStyle === "white" ? 0 : perseus.lockedFigureFillStyles[fillStyle]
30303
30316
  }]
30304
30317
  }));
30305
30318
  };
30306
- const styles$z = aphrodite.StyleSheet.create({
30319
+ const styles$A = aphrodite.StyleSheet.create({
30307
30320
  container: {
30308
30321
  // Add a white outline so that the color swatch is visible when
30309
30322
  // the dropdown option is highlighted with its blue background.
@@ -30329,7 +30342,7 @@ const LineStrokeSelect = props => {
30329
30342
  } = props;
30330
30343
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30331
30344
  tag: "label",
30332
- style: styles$y.lineStrokeSelect
30345
+ style: styles$z.lineStrokeSelect
30333
30346
  }, "stroke", /*#__PURE__*/React__namespace.createElement(Strut, {
30334
30347
  size: wonderBlocksTokens.spacing.xxxSmall_4
30335
30348
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
@@ -30346,7 +30359,7 @@ const LineStrokeSelect = props => {
30346
30359
  label: "dashed"
30347
30360
  })));
30348
30361
  };
30349
- const styles$y = aphrodite.StyleSheet.create({
30362
+ const styles$z = aphrodite.StyleSheet.create({
30350
30363
  lineStrokeSelect: {
30351
30364
  display: "flex",
30352
30365
  flexDirection: "row",
@@ -30368,40 +30381,40 @@ const LockedFigureSettingsActions = props => {
30368
30381
  onRemove
30369
30382
  } = props;
30370
30383
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30371
- style: styles$x.container
30384
+ style: styles$y.container
30372
30385
  }, /*#__PURE__*/React__namespace.createElement(Button__default["default"], {
30373
30386
  startIcon: trashIcon__default["default"],
30374
30387
  "aria-label": `Delete locked ${figureType}`,
30375
30388
  onClick: onRemove,
30376
30389
  kind: "tertiary",
30377
- style: styles$x.deleteButton
30390
+ style: styles$y.deleteButton
30378
30391
  }, "Delete"), /*#__PURE__*/React__namespace.createElement(Spring, null), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
30379
30392
  icon: caretDoubleUpIcon__default["default"],
30380
30393
  size: "small",
30381
30394
  "aria-label": `Move locked ${figureType} to the back`,
30382
30395
  onClick: () => onMove("back"),
30383
- style: styles$x.iconButton
30396
+ style: styles$y.iconButton
30384
30397
  }), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
30385
30398
  icon: caretUpIcon__default["default"],
30386
30399
  size: "small",
30387
30400
  "aria-label": `Move locked ${figureType} backward`,
30388
30401
  onClick: () => onMove("backward"),
30389
- style: styles$x.iconButton
30402
+ style: styles$y.iconButton
30390
30403
  }), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
30391
30404
  icon: caretDownIcon__default["default"],
30392
30405
  size: "small",
30393
30406
  "aria-label": `Move locked ${figureType} forward`,
30394
30407
  onClick: () => onMove("forward"),
30395
- style: styles$x.iconButton
30408
+ style: styles$y.iconButton
30396
30409
  }), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
30397
30410
  icon: caretDoubleDownIcon__default["default"],
30398
30411
  size: "small",
30399
30412
  "aria-label": `Move locked ${figureType} to the front`,
30400
30413
  onClick: () => onMove("front"),
30401
- style: styles$x.iconButton
30414
+ style: styles$y.iconButton
30402
30415
  }));
30403
30416
  };
30404
- const styles$x = aphrodite.StyleSheet.create({
30417
+ const styles$y = aphrodite.StyleSheet.create({
30405
30418
  container: {
30406
30419
  width: "100%",
30407
30420
  flexDirection: "row",
@@ -30448,7 +30461,7 @@ const LockedEllipseSettings = props => {
30448
30461
  /*#__PURE__*/
30449
30462
  // Summary: Ellipse, center, radius, color (opacity, dashed)
30450
30463
  React__namespace.createElement(wonderBlocksCore.View, {
30451
- style: styles$w.row
30464
+ style: styles$x.row
30452
30465
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Ellipse (${center[0]}, ${center[1]}), radius ${radius[0]}, ${radius[1]}`), /*#__PURE__*/React__namespace.createElement(Strut, {
30453
30466
  size: wonderBlocksTokens.spacing.xSmall_8
30454
30467
  }), /*#__PURE__*/React__namespace.createElement(EllipseSwatch, {
@@ -30457,19 +30470,19 @@ const LockedEllipseSettings = props => {
30457
30470
  strokeStyle: strokeStyle
30458
30471
  }))
30459
30472
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30460
- style: styles$w.row
30473
+ style: styles$x.row
30461
30474
  }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30462
30475
  coord: center,
30463
- style: styles$w.spaceUnder,
30476
+ style: styles$x.spaceUnder,
30464
30477
  onChange: newCoords => onChangeProps({
30465
30478
  center: newCoords
30466
30479
  })
30467
30480
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30468
- style: styles$w.spaceUnder
30481
+ style: styles$x.spaceUnder
30469
30482
  }, /*#__PURE__*/React__namespace.createElement(InfoTip$d, null, "The coordinates for the center of the ellipse."))), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30470
30483
  coord: radius,
30471
30484
  labels: ["x radius", "y radius"],
30472
- style: styles$w.spaceUnder,
30485
+ style: styles$x.spaceUnder,
30473
30486
  onChange: newCoords => onChangeProps({
30474
30487
  radius: newCoords
30475
30488
  })
@@ -30481,7 +30494,7 @@ const LockedEllipseSettings = props => {
30481
30494
  }), /*#__PURE__*/React__namespace.createElement(Strut, {
30482
30495
  size: wonderBlocksTokens.spacing.xSmall_8
30483
30496
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30484
- style: [styles$w.row, styles$w.spaceUnder]
30497
+ style: [styles$x.row, styles$x.spaceUnder]
30485
30498
  }, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30486
30499
  selectedValue: color,
30487
30500
  onChange: handleColorChange
@@ -30489,7 +30502,7 @@ const LockedEllipseSettings = props => {
30489
30502
  size: wonderBlocksTokens.spacing.medium_16
30490
30503
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30491
30504
  tag: "label",
30492
- style: [styles$w.row, styles$w.truncatedWidth]
30505
+ style: [styles$x.row, styles$x.truncatedWidth]
30493
30506
  }, "fill", /*#__PURE__*/React__namespace.createElement(Strut, {
30494
30507
  size: wonderBlocksTokens.spacing.xxSmall_6
30495
30508
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
@@ -30515,7 +30528,7 @@ const LockedEllipseSettings = props => {
30515
30528
  onRemove: onRemove
30516
30529
  }));
30517
30530
  };
30518
- const styles$w = aphrodite.StyleSheet.create({
30531
+ const styles$x = aphrodite.StyleSheet.create({
30519
30532
  row: {
30520
30533
  display: "flex",
30521
30534
  flexDirection: "row",
@@ -30536,15 +30549,15 @@ const LineSwatch = props => {
30536
30549
  lineStyle
30537
30550
  } = props;
30538
30551
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30539
- style: styles$v.container
30552
+ style: styles$w.container
30540
30553
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30541
30554
  "aria-label": `${color}, ${lineStyle}`,
30542
- style: [styles$v.lineSwatch, {
30555
+ style: [styles$w.lineSwatch, {
30543
30556
  border: `5px ${lineStyle} ${perseus.lockedFigureColors[color]}`
30544
30557
  }]
30545
30558
  }));
30546
30559
  };
30547
- const styles$v = aphrodite.StyleSheet.create({
30560
+ const styles$w = aphrodite.StyleSheet.create({
30548
30561
  container: {
30549
30562
  backgroundColor: wonderBlocksTokens.color.white,
30550
30563
  justifyContent: "center",
@@ -30618,9 +30631,9 @@ const LockedFunctionSettings = props => {
30618
30631
  expanded: props.expanded,
30619
30632
  onToggle: props.onToggle,
30620
30633
  header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30621
- style: styles$u.row
30634
+ style: styles$v.row
30622
30635
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, {
30623
- style: styles$u.accordionHeader
30636
+ style: styles$v.accordionHeader
30624
30637
  }, lineLabel), /*#__PURE__*/React__namespace.createElement(Strut, {
30625
30638
  size: wonderBlocksTokens.spacing.xSmall_8
30626
30639
  }), /*#__PURE__*/React__namespace.createElement(LineSwatch, {
@@ -30628,7 +30641,7 @@ const LockedFunctionSettings = props => {
30628
30641
  lineStyle: strokeStyle
30629
30642
  }))
30630
30643
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30631
- style: [styles$u.row, styles$u.spaceUnder]
30644
+ style: [styles$v.row, styles$v.spaceUnder]
30632
30645
  }, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30633
30646
  selectedValue: lineColor,
30634
30647
  onChange: newValue => {
@@ -30642,14 +30655,14 @@ const LockedFunctionSettings = props => {
30642
30655
  handlePropChange("strokeStyle", newValue);
30643
30656
  }
30644
30657
  })), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30645
- style: [styles$u.row, styles$u.rowSpace]
30658
+ style: [styles$v.row, styles$v.rowSpace]
30646
30659
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
30647
30660
  selectedValue: directionalAxis,
30648
30661
  onChange: newValue => {
30649
30662
  handlePropChange("directionalAxis", newValue);
30650
30663
  },
30651
30664
  "aria-label": "equation prefix",
30652
- style: styles$u.equationPrefix
30665
+ style: styles$v.equationPrefix
30653
30666
  // Placeholder is required, but never gets used.
30654
30667
  ,
30655
30668
  placeholder: ""
@@ -30668,17 +30681,17 @@ const LockedFunctionSettings = props => {
30668
30681
  onChange: newValue => {
30669
30682
  handlePropChange("equation", newValue);
30670
30683
  },
30671
- style: [styles$u.textField]
30684
+ style: [styles$v.textField]
30672
30685
  })), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30673
- style: [styles$u.row, styles$u.rowSpace]
30686
+ style: [styles$v.row, styles$v.rowSpace]
30674
30687
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30675
30688
  tag: "label",
30676
- style: styles$u.domainMin
30689
+ style: styles$v.domainMin
30677
30690
  }, "domain min", /*#__PURE__*/React__namespace.createElement(Strut, {
30678
30691
  size: wonderBlocksTokens.spacing.xxSmall_6
30679
30692
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
30680
30693
  type: "number",
30681
- style: styles$u.domainMinField,
30694
+ style: styles$v.domainMinField,
30682
30695
  value: domainEntries[0],
30683
30696
  onChange: newValue => {
30684
30697
  handleDomainChange(0, newValue);
@@ -30688,12 +30701,12 @@ const LockedFunctionSettings = props => {
30688
30701
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30689
30702
  tag: "label",
30690
30703
  "aria-label": "domain max",
30691
- style: styles$u.domainMax
30704
+ style: styles$v.domainMax
30692
30705
  }, "max", /*#__PURE__*/React__namespace.createElement(Strut, {
30693
30706
  size: wonderBlocksTokens.spacing.xxSmall_6
30694
30707
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
30695
30708
  type: "number",
30696
- style: styles$u.domainMaxField,
30709
+ style: styles$v.domainMaxField,
30697
30710
  value: domainEntries[1],
30698
30711
  onChange: newValue => {
30699
30712
  handleDomainChange(1, newValue);
@@ -30704,7 +30717,7 @@ const LockedFunctionSettings = props => {
30704
30717
  onRemove: onRemove
30705
30718
  }));
30706
30719
  };
30707
- const styles$u = aphrodite.StyleSheet.create({
30720
+ const styles$v = aphrodite.StyleSheet.create({
30708
30721
  accordionHeader: {
30709
30722
  textOverflow: "ellipsis",
30710
30723
  // A maximum width needs to be specified in order for the ellipsis to work.
@@ -30759,6 +30772,123 @@ const styles$u = aphrodite.StyleSheet.create({
30759
30772
  }
30760
30773
  });
30761
30774
 
30775
+ /**
30776
+ * LockedLabelSettings is a component that allows the user to edit the
30777
+ * settings of specifically a locked label on the graph within the
30778
+ * Interactive Graph widget.
30779
+ *
30780
+ * Used in the interactive graph editor's locked figures section.
30781
+ */
30782
+ function LockedLabelSettings(props) {
30783
+ const {
30784
+ type,
30785
+ coord,
30786
+ color,
30787
+ size,
30788
+ text,
30789
+ expanded,
30790
+ onChangeProps,
30791
+ onMove,
30792
+ onRemove,
30793
+ onToggle
30794
+ } = props;
30795
+ return /*#__PURE__*/React__namespace.createElement(PerseusEditorAccordion, {
30796
+ expanded: expanded,
30797
+ onToggle: onToggle,
30798
+ header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30799
+ style: [styles$u.row, styles$u.accordionHeaderContainer]
30800
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Label (", coord[0], ", ", coord[1], ")"), /*#__PURE__*/React__namespace.createElement(Strut, {
30801
+ size: wonderBlocksTokens.spacing.xSmall_8
30802
+ }), text !== "" && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, {
30803
+ style: [{
30804
+ backgroundColor: wonderBlocksTokens.color.white,
30805
+ color: perseus.lockedFigureColors[color]
30806
+ }, styles$u.accordionHeader]
30807
+ }, text))
30808
+ }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30809
+ coord: coord,
30810
+ onChange: newCoords => {
30811
+ onChangeProps({
30812
+ coord: newCoords
30813
+ });
30814
+ },
30815
+ style: styles$u.spaceUnder
30816
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30817
+ tag: "label",
30818
+ style: [styles$u.row, styles$u.spaceUnder]
30819
+ }, "TeX", /*#__PURE__*/React__namespace.createElement(Strut, {
30820
+ size: wonderBlocksTokens.spacing.xSmall_8
30821
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
30822
+ value: text,
30823
+ placeholder: "ex. x^2 or \\frac{1}{2}",
30824
+ onChange: newValue => onChangeProps({
30825
+ text: newValue
30826
+ })
30827
+ })), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30828
+ style: styles$u.row
30829
+ }, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30830
+ selectedValue: color,
30831
+ onChange: newColor => {
30832
+ onChangeProps({
30833
+ color: newColor
30834
+ });
30835
+ },
30836
+ style: styles$u.spaceUnder
30837
+ }), /*#__PURE__*/React__namespace.createElement(Strut, {
30838
+ size: wonderBlocksTokens.spacing.medium_16
30839
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30840
+ tag: "label",
30841
+ style: styles$u.row
30842
+ }, "size", /*#__PURE__*/React__namespace.createElement(Strut, {
30843
+ size: wonderBlocksTokens.spacing.xSmall_8
30844
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
30845
+ selectedValue: size,
30846
+ onChange: newValue => onChangeProps({
30847
+ size: newValue
30848
+ })
30849
+ // Placeholder is required, but never gets used since
30850
+ // we have a label for the select.
30851
+ ,
30852
+ placeholder: ""
30853
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
30854
+ value: "small",
30855
+ label: "small"
30856
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
30857
+ value: "medium",
30858
+ label: "medium"
30859
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
30860
+ value: "large",
30861
+ label: "large"
30862
+ })))), /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsActions, {
30863
+ figureType: type,
30864
+ onMove: onMove,
30865
+ onRemove: onRemove
30866
+ }));
30867
+ }
30868
+ const styles$u = aphrodite.StyleSheet.create({
30869
+ accordionHeaderContainer: {
30870
+ // Stop the label summary from wrapping.
30871
+ whiteSpace: "nowrap"
30872
+ },
30873
+ accordionHeader: {
30874
+ padding: wonderBlocksTokens.spacing.xxxSmall_4,
30875
+ marginInlineEnd: wonderBlocksTokens.spacing.xSmall_8,
30876
+ borderRadius: wonderBlocksTokens.spacing.xxxSmall_4,
30877
+ textOverflow: "ellipsis",
30878
+ overflow: "hidden"
30879
+ },
30880
+ row: {
30881
+ display: "flex",
30882
+ flexDirection: "row",
30883
+ alignItems: "center",
30884
+ // Allow truncation, stop bleeding over the edge.
30885
+ minWidth: 0
30886
+ },
30887
+ spaceUnder: {
30888
+ marginBottom: wonderBlocksTokens.spacing.xSmall_8
30889
+ }
30890
+ });
30891
+
30762
30892
  const LabeledSwitch = props => {
30763
30893
  const {
30764
30894
  checked,
@@ -31467,6 +31597,11 @@ const LockedFigureSettings = props => {
31467
31597
  return /*#__PURE__*/React__namespace.createElement(LockedFunctionSettings, props);
31468
31598
  }
31469
31599
  break;
31600
+ case "label":
31601
+ if (props.showLabelsFlag) {
31602
+ return /*#__PURE__*/React__namespace.createElement(LockedLabelSettings, props);
31603
+ }
31604
+ break;
31470
31605
  }
31471
31606
  return null;
31472
31607
  };
@@ -31572,9 +31707,16 @@ const LockedFiguresSection = props => {
31572
31707
  onToggle: () => setIsExpanded(!isExpanded),
31573
31708
  isCollapsible: true
31574
31709
  }), isExpanded && /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, figures?.map((figure, index) => {
31710
+ if (figure.type === "label") {
31711
+ // TODO(LEMS-1795): Add locked label settings.
31712
+ // Remove this block once label locked figure
31713
+ // settings are implemented.
31714
+ return;
31715
+ }
31575
31716
  return /*#__PURE__*/React__namespace.createElement(LockedFigureSettings, _extends({
31576
31717
  key: `${uniqueId}-locked-${figure}-${index}`,
31577
31718
  showM2bFeatures: props.showM2bFeatures,
31719
+ showLabelsFlag: props.showLabelsFlag,
31578
31720
  expanded: expandedStates[index],
31579
31721
  onToggle: newValue => {
31580
31722
  const newExpanded = [...expandedStates];
@@ -31590,6 +31732,7 @@ const LockedFiguresSection = props => {
31590
31732
  style: styles$m.buttonContainer
31591
31733
  }, /*#__PURE__*/React__namespace.createElement(LockedFigureSelect, {
31592
31734
  showM2bFeatures: props.showM2bFeatures,
31735
+ showLabelsFlag: props.showLabelsFlag,
31593
31736
  id: `${uniqueId}-select`,
31594
31737
  onChange: addLockedFigure
31595
31738
  }), /*#__PURE__*/React__namespace.createElement(Strut, {
@@ -32985,6 +33128,7 @@ class InteractiveGraphEditor extends React__namespace.Component {
32985
33128
  // is using Mafs.
32986
33129
  this.props.graph && this.props.apiOptions?.flags?.mafs?.[this.props.graph.type] && /*#__PURE__*/React__namespace.createElement(LockedFiguresSection, {
32987
33130
  showM2bFeatures: this.props.apiOptions?.flags?.mafs?.["interactive-graph-locked-features-m2b"],
33131
+ showLabelsFlag: this.props.apiOptions?.flags?.mafs?.["interactive-graph-locked-features-labels"],
32988
33132
  figures: this.props.lockedFigures,
32989
33133
  onChange: this.props.onChange
32990
33134
  }));
@@ -35587,11 +35731,11 @@ class NumericInputEditor extends React__namespace.Component {
35587
35731
  });
35588
35732
  return /*#__PURE__*/React__namespace.createElement("div", {
35589
35733
  className: "perseus-input-number-editor"
35590
- }, labelText, inputSize, rightAlign, coefficientCheck, /*#__PURE__*/React__namespace.createElement("div", {
35734
+ }, /*#__PURE__*/React__namespace.createElement("div", {
35591
35735
  className: "ui-title"
35592
35736
  }, "User input"), /*#__PURE__*/React__namespace.createElement("div", {
35593
35737
  className: "msg-title"
35594
- }, "Message shown to user on attempt"), generateInputAnswerEditors(), addAnswerButton);
35738
+ }, "Message shown to user on attempt"), generateInputAnswerEditors(), addAnswerButton, inputSize, rightAlign, coefficientCheck, labelText);
35595
35739
  }
35596
35740
  change = (() => {
35597
35741
  var _this = this;
@@ -35980,6 +36124,36 @@ class PassageRefTargetEditor extends React__namespace.Component {
35980
36124
  }
35981
36125
  }
35982
36126
 
36127
+ /* eslint-disable @khanacademy/ts-no-error-suppressions */
36128
+ class PhetSimEditor extends React__namespace.Component {
36129
+ static defaultProps = {
36130
+ url: "",
36131
+ description: ""
36132
+ };
36133
+ static widgetName = "phet-sim";
36134
+ render() {
36135
+ return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.LabeledTextField, {
36136
+ label: "URL",
36137
+ value: this.props.url,
36138
+ onChange: url => this.props.onChange({
36139
+ url
36140
+ })
36141
+ }), /*#__PURE__*/React__namespace.createElement("br", null), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.LabeledTextField, {
36142
+ label: "Description",
36143
+ value: this.props.description,
36144
+ onChange: description => this.props.onChange({
36145
+ description
36146
+ })
36147
+ }));
36148
+ }
36149
+ serialize() {
36150
+ return {
36151
+ url: this.props.url,
36152
+ description: this.props.description
36153
+ };
36154
+ }
36155
+ }
36156
+
35983
36157
  const {
35984
36158
  InfoTip: InfoTip$3,
35985
36159
  NumberInput: NumberInput$2,
@@ -36935,7 +37109,7 @@ class VideoEditor extends React__namespace.Component {
36935
37109
  }
36936
37110
  }
36937
37111
 
36938
- var AllEditors = [CategorizerEditor, CSProgramEditor, DefinitionEditor, DropdownEditor, ExampleGraphieWidgetEditor, ExampleWidgetEditor, ExplanationEditor, ExpressionEditor, GradedGroupEditor, GradedGroupSetEditor, GrapherEditor, GroupEditor, IframeEditor, ImageEditor, InputNumberEditor, InteractionEditor, InteractiveGraphEditor, LabelImageEditor, MatcherEditor, MatrixEditor, MeasurerEditor, MoleculeWidgetEditor, NumberLineEditor, NumericInputEditor, OrdererEditor, PassageEditor, PassageRefEditor, PassageRefTargetEditor, PlotterEditor, PythonProgramEditor, SimpleMarkdownTesterEditor, SorterEditor, TableEditor, VideoEditor, RadioEditor, DeprecatedStandinEditor];
37112
+ var AllEditors = [CategorizerEditor, CSProgramEditor, DefinitionEditor, DropdownEditor, ExampleGraphieWidgetEditor, ExampleWidgetEditor, ExplanationEditor, ExpressionEditor, GradedGroupEditor, GradedGroupSetEditor, GrapherEditor, GroupEditor, IframeEditor, ImageEditor, InputNumberEditor, InteractionEditor, InteractiveGraphEditor, LabelImageEditor, MatcherEditor, MatrixEditor, MeasurerEditor, MoleculeWidgetEditor, NumberLineEditor, NumericInputEditor, OrdererEditor, PassageEditor, PassageRefEditor, PassageRefTargetEditor, PhetSimEditor, PlotterEditor, PythonProgramEditor, SimpleMarkdownTesterEditor, SorterEditor, TableEditor, VideoEditor, RadioEditor, DeprecatedStandinEditor];
36939
37113
 
36940
37114
  /* eslint-disable @khanacademy/ts-no-error-suppressions */
36941
37115
  class TextInput extends React__namespace.Component {