@khanacademy/perseus-editor 6.7.0 → 6.9.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
@@ -67,7 +67,7 @@ var trashIcon__default = /*#__PURE__*/_interopDefaultLegacy(trashIcon);
67
67
 
68
68
  // This file is processed by a Rollup plugin (replace) to inject the production
69
69
  const libName = "@khanacademy/perseus-editor";
70
- const libVersion = "6.7.0";
70
+ const libVersion = "6.9.0";
71
71
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
72
72
 
73
73
  function _extends() {
@@ -262,13 +262,13 @@ class SectionControlButton extends React__namespace.Component {
262
262
  role: "button",
263
263
  hideDefaultFocusRing: true,
264
264
  "aria-label": title,
265
- style: styles$z.button
265
+ style: styles$D.button
266
266
  }, _ref => {
267
267
  return /*#__PURE__*/React__namespace.createElement(InlineIcon$b, icon);
268
268
  });
269
269
  }
270
270
  }
271
- const styles$z = aphrodite.StyleSheet.create({
271
+ const styles$D = aphrodite.StyleSheet.create({
272
272
  button: {
273
273
  backgroundColor: wonderBlocksTokens.color.gold,
274
274
  margin: 2,
@@ -20773,13 +20773,13 @@ class WidgetSelect extends React__namespace.Component {
20773
20773
  * that collapse a region.
20774
20774
  */
20775
20775
  function ToggleableCaret(props) {
20776
- const iconStyle = props.isExpanded ? styles$y.expanded : styles$y.collapsed;
20776
+ const iconStyle = props.isExpanded ? styles$C.expanded : styles$C.collapsed;
20777
20777
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksIcon.PhosphorIcon, {
20778
20778
  icon: caretRight__default["default"],
20779
20779
  style: iconStyle
20780
20780
  });
20781
20781
  }
20782
- const styles$y = aphrodite.StyleSheet.create({
20782
+ const styles$C = aphrodite.StyleSheet.create({
20783
20783
  collapsed: {
20784
20784
  transition: ".15s"
20785
20785
  },
@@ -20809,16 +20809,16 @@ class TexErrorView extends React__namespace.Component {
20809
20809
  showErrors
20810
20810
  } = this.state;
20811
20811
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20812
- style: styles$x.errorContainer
20812
+ style: styles$B.errorContainer
20813
20813
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20814
- style: styles$x.title,
20814
+ style: styles$B.title,
20815
20815
  onClick: this.handleToggleTexErrors
20816
20816
  }, /*#__PURE__*/React__namespace.createElement(ToggleableCaret, {
20817
20817
  isExpanded: showErrors
20818
20818
  }), "\xA0 TeX Errors (", errorList.length, ")"), showErrors && /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20819
- style: styles$x.errorExplanation
20819
+ style: styles$B.errorExplanation
20820
20820
  }, "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, {
20821
- style: styles$x.error,
20821
+ style: styles$B.error,
20822
20822
  key: index
20823
20823
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20824
20824
  style: {
@@ -20827,7 +20827,7 @@ class TexErrorView extends React__namespace.Component {
20827
20827
  }, e.math), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, e.message))));
20828
20828
  }
20829
20829
  }
20830
- const styles$x = aphrodite.StyleSheet.create({
20830
+ const styles$B = aphrodite.StyleSheet.create({
20831
20831
  title: {
20832
20832
  backgroundColor: "#eee",
20833
20833
  fontSize: "1.25em",
@@ -23464,7 +23464,7 @@ class StructuredItemDiff extends React__namespace.Component {
23464
23464
 
23465
23465
  /* eslint-disable @khanacademy/ts-no-error-suppressions */
23466
23466
  const {
23467
- InfoTip: InfoTip$l,
23467
+ InfoTip: InfoTip$n,
23468
23468
  InlineIcon: InlineIcon$7
23469
23469
  } = perseus.components;
23470
23470
  const {
@@ -23538,7 +23538,7 @@ class HintEditor extends React__namespace.Component {
23538
23538
  type: "button",
23539
23539
  className: this.props.isFirst ? "hidden" : "",
23540
23540
  onClick: ___default["default"].partial(this.props.onMove, -1)
23541
- }, /*#__PURE__*/React__namespace.createElement(InlineIcon$7, iconCircleArrowUp)), " ", this.props.isLast && /*#__PURE__*/React__namespace.createElement(InfoTip$l, null, /*#__PURE__*/React__namespace.createElement("p", null, "The last hint is automatically bolded."))), /*#__PURE__*/React__namespace.createElement("input", {
23541
+ }, /*#__PURE__*/React__namespace.createElement(InlineIcon$7, iconCircleArrowUp)), " ", this.props.isLast && /*#__PURE__*/React__namespace.createElement(InfoTip$n, null, /*#__PURE__*/React__namespace.createElement("p", null, "The last hint is automatically bolded."))), /*#__PURE__*/React__namespace.createElement("input", {
23542
23542
  type: "checkbox"
23543
23543
  // @ts-expect-error - TS2322 - Type 'boolean | null | undefined' is not assignable to type 'boolean | undefined'.
23544
23544
  ,
@@ -23773,7 +23773,7 @@ class CombinedHintsEditor extends React__namespace.Component {
23773
23773
  }
23774
23774
 
23775
23775
  const {
23776
- InfoTip: InfoTip$k
23776
+ InfoTip: InfoTip$m
23777
23777
  } = perseus.components;
23778
23778
  class ItemExtrasEditor extends React__namespace.Component {
23779
23779
  static defaultProps = {
@@ -23918,7 +23918,7 @@ const ItemExtraCheckbox = props => /*#__PURE__*/React__namespace.createElement("
23918
23918
  type: "checkbox",
23919
23919
  checked: props.checked,
23920
23920
  onChange: props.onChange
23921
- })), /*#__PURE__*/React__namespace.createElement(InfoTip$k, null, props.infoTip));
23921
+ })), /*#__PURE__*/React__namespace.createElement(InfoTip$m, null, props.infoTip));
23922
23922
 
23923
23923
  const ITEM_DATA_VERSION = perseus.itemDataVersion;
23924
23924
  class ItemEditor extends React__namespace.Component {
@@ -24577,12 +24577,12 @@ class SimpleButton extends React__namespace.Component {
24577
24577
  ...otherProps
24578
24578
  } = this.props;
24579
24579
  return /*#__PURE__*/React__namespace.createElement("div", _extends({
24580
- className: aphrodite.css(styles$w.baseButton, color === "green" && styles$w.green, color === "orange" && styles$w.orange),
24580
+ className: aphrodite.css(styles$A.baseButton, color === "green" && styles$A.green, color === "orange" && styles$A.orange),
24581
24581
  onClick: onClick
24582
24582
  }, otherProps), children);
24583
24583
  }
24584
24584
  }
24585
- const styles$w = aphrodite.StyleSheet.create({
24585
+ const styles$A = aphrodite.StyleSheet.create({
24586
24586
  baseButton: {
24587
24587
  top: "0",
24588
24588
  fontSize: "11px",
@@ -24795,23 +24795,23 @@ const LeafContainer = _ref2 => {
24795
24795
  } = _ref2;
24796
24796
  const hasPreviewHeading = shape.type === "content" || shape.type === "hint";
24797
24797
  const previewHeading = hasPreviewHeading && /*#__PURE__*/React__namespace.createElement("div", {
24798
- className: aphrodite.css(styles$v.containerHeader)
24798
+ className: aphrodite.css(styles$z.containerHeader)
24799
24799
  }, /*#__PURE__*/React__namespace.createElement(Header, {
24800
24800
  depth: path.length,
24801
- className: aphrodite.css(styles$v.containerTitle)
24801
+ className: aphrodite.css(styles$z.containerTitle)
24802
24802
  }, capitalize(name)));
24803
24803
  return /*#__PURE__*/React__namespace.createElement("div", {
24804
- className: aphrodite.css(styles$v.container)
24804
+ className: aphrodite.css(styles$z.container)
24805
24805
  }, /*#__PURE__*/React__namespace.createElement("span", {
24806
- className: aphrodite.css(styles$v.row, styles$v.rowHeading)
24806
+ className: aphrodite.css(styles$z.row, styles$z.rowHeading)
24807
24807
  }, /*#__PURE__*/React__namespace.createElement("div", {
24808
- className: aphrodite.css(styles$v.columnLeft)
24808
+ className: aphrodite.css(styles$z.columnLeft)
24809
24809
  }, /*#__PURE__*/React__namespace.createElement("div", {
24810
- className: "pod-title " + aphrodite.css(styles$v.containerHeader)
24810
+ className: "pod-title " + aphrodite.css(styles$z.containerHeader)
24811
24811
  }, /*#__PURE__*/React__namespace.createElement("div", {
24812
- className: aphrodite.css(styles$v.containerTitle)
24812
+ className: aphrodite.css(styles$z.containerTitle)
24813
24813
  }, capitalize(name)), controls)), /*#__PURE__*/React__namespace.createElement("div", {
24814
- className: aphrodite.css(styles$v.columnRight)
24814
+ className: aphrodite.css(styles$z.columnRight)
24815
24815
  }, previewHeading)), children);
24816
24816
  };
24817
24817
  const ArrayContainer = props => {
@@ -24824,11 +24824,11 @@ const ArrayContainer = props => {
24824
24824
  actions
24825
24825
  } = props;
24826
24826
  return /*#__PURE__*/React__namespace.createElement("div", {
24827
- className: aphrodite.css(styles$v.container)
24827
+ className: aphrodite.css(styles$z.container)
24828
24828
  }, controls && /*#__PURE__*/React__namespace.createElement("div", {
24829
- className: aphrodite.css(styles$v.columnLeft, styles$v.containerHeader)
24829
+ className: aphrodite.css(styles$z.columnLeft, styles$z.containerHeader)
24830
24830
  }, controls), /*#__PURE__*/React__namespace.createElement("div", null, children), /*#__PURE__*/React__namespace.createElement("div", {
24831
- className: aphrodite.css(styles$v.columnLeft)
24831
+ className: aphrodite.css(styles$z.columnLeft)
24832
24832
  }, /*#__PURE__*/React__namespace.createElement("a", {
24833
24833
  href: "javascript:void 0",
24834
24834
  onClick: () => actions.addArrayElement(path, shape.elementShape)
@@ -24842,28 +24842,28 @@ const ObjectContainer = _ref3 => {
24842
24842
  path
24843
24843
  } = _ref3;
24844
24844
  const headingEditor = /*#__PURE__*/React__namespace.createElement("div", {
24845
- className: aphrodite.css(styles$v.containerHeader)
24845
+ className: aphrodite.css(styles$z.containerHeader)
24846
24846
  }, /*#__PURE__*/React__namespace.createElement(Header, {
24847
24847
  depth: path.length,
24848
- className: aphrodite.css(styles$v.containerTitle)
24848
+ className: aphrodite.css(styles$z.containerTitle)
24849
24849
  }, capitalize(name)), controls);
24850
24850
  const headingPreview = (name || controls) && /*#__PURE__*/React__namespace.createElement("div", {
24851
- className: aphrodite.css(styles$v.containerHeader, styles$v.previewCollectionHeader)
24851
+ className: aphrodite.css(styles$z.containerHeader, styles$z.previewCollectionHeader)
24852
24852
  }, /*#__PURE__*/React__namespace.createElement(Header, {
24853
24853
  depth: path.length,
24854
- className: aphrodite.css(styles$v.containerTitle)
24854
+ className: aphrodite.css(styles$z.containerTitle)
24855
24855
  }, capitalize(name)));
24856
24856
  const hasBothHeadings = headingEditor && headingPreview;
24857
24857
  return /*#__PURE__*/React__namespace.createElement("div", {
24858
- className: aphrodite.css(styles$v.container)
24858
+ className: aphrodite.css(styles$z.container)
24859
24859
  }, hasBothHeadings && /*#__PURE__*/React__namespace.createElement("span", {
24860
- className: aphrodite.css(styles$v.row)
24860
+ className: aphrodite.css(styles$z.row)
24861
24861
  }, /*#__PURE__*/React__namespace.createElement("div", {
24862
- className: aphrodite.css(styles$v.columnLeft)
24862
+ className: aphrodite.css(styles$z.columnLeft)
24863
24863
  }, headingEditor), /*#__PURE__*/React__namespace.createElement("div", {
24864
- className: aphrodite.css(styles$v.columnRight)
24864
+ className: aphrodite.css(styles$z.columnRight)
24865
24865
  }, headingPreview)), /*#__PURE__*/React__namespace.createElement("div", {
24866
- className: aphrodite.css(path.length > 0 && styles$v.contentIndent)
24866
+ className: aphrodite.css(path.length > 0 && styles$z.contentIndent)
24867
24867
  }, children));
24868
24868
  };
24869
24869
 
@@ -24983,11 +24983,11 @@ const ItemNodeContent = withStickiness(props => {
24983
24983
  className: "framework-perseus"
24984
24984
  }, lens(renderers).get(path));
24985
24985
  return /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement("div", {
24986
- className: aphrodite.css(styles$v.row)
24986
+ className: aphrodite.css(styles$z.row)
24987
24987
  }, /*#__PURE__*/React__namespace.createElement("div", {
24988
- className: aphrodite.css(styles$v.columnLeft)
24988
+ className: aphrodite.css(styles$z.columnLeft)
24989
24989
  }, /*#__PURE__*/React__namespace.createElement("div", {
24990
- className: aphrodite.css(sticky && styles$v.sticky)
24990
+ className: aphrodite.css(sticky && styles$z.sticky)
24991
24991
  },
24992
24992
  /*#__PURE__*/
24993
24993
  // @ts-expect-error - TS2769 - No overload matches this call.
@@ -24995,9 +24995,9 @@ const ItemNodeContent = withStickiness(props => {
24995
24995
  onChange: newVal => actions.mergeValueAtPath(path, newVal),
24996
24996
  apiOptions: apiOptions
24997
24997
  })))), /*#__PURE__*/React__namespace.createElement("div", {
24998
- className: aphrodite.css(styles$v.columnRight)
24998
+ className: aphrodite.css(styles$z.columnRight)
24999
24999
  }, /*#__PURE__*/React__namespace.createElement("div", {
25000
- className: aphrodite.css(sticky && styles$v.sticky)
25000
+ className: aphrodite.css(sticky && styles$z.sticky)
25001
25001
  }, preview))));
25002
25002
  });
25003
25003
  const HintNodeContent = withStickiness(props => {
@@ -25013,13 +25013,13 @@ const HintNodeContent = withStickiness(props => {
25013
25013
  className: "framework-perseus"
25014
25014
  }, lens(renderers).get(path));
25015
25015
  return /*#__PURE__*/React__namespace.createElement("div", {
25016
- className: aphrodite.css(styles$v.row)
25016
+ className: aphrodite.css(styles$z.row)
25017
25017
  }, /*#__PURE__*/React__namespace.createElement("div", {
25018
- className: aphrodite.css(styles$v.columnLeft)
25018
+ className: aphrodite.css(styles$z.columnLeft)
25019
25019
  }, /*#__PURE__*/React__namespace.createElement("div", {
25020
- className: aphrodite.css(sticky && styles$v.sticky)
25020
+ className: aphrodite.css(sticky && styles$z.sticky)
25021
25021
  }, /*#__PURE__*/React__namespace.createElement(HintEditor, _extends({}, data, {
25022
- className: aphrodite.css(styles$v.hintEditor),
25022
+ className: aphrodite.css(styles$z.hintEditor),
25023
25023
  onChange: newVal => actions.mergeValueAtPath(path, newVal),
25024
25024
  apiOptions: apiOptions,
25025
25025
  showTitle: false,
@@ -25034,9 +25034,9 @@ const HintNodeContent = withStickiness(props => {
25034
25034
  isFirst: true,
25035
25035
  isLast: true
25036
25036
  })))), /*#__PURE__*/React__namespace.createElement("div", {
25037
- className: aphrodite.css(styles$v.columnRight)
25037
+ className: aphrodite.css(styles$z.columnRight)
25038
25038
  }, /*#__PURE__*/React__namespace.createElement("div", {
25039
- className: aphrodite.css(sticky && styles$v.sticky)
25039
+ className: aphrodite.css(sticky && styles$z.sticky)
25040
25040
  }, preview)));
25041
25041
  });
25042
25042
  const TagsNodeContent = props => {
@@ -25053,9 +25053,9 @@ const TagsNodeContent = props => {
25053
25053
  return null;
25054
25054
  }
25055
25055
  return /*#__PURE__*/React__namespace.createElement("div", {
25056
- className: aphrodite.css(styles$v.columnLeft)
25056
+ className: aphrodite.css(styles$z.columnLeft)
25057
25057
  }, /*#__PURE__*/React__namespace.createElement("div", {
25058
- className: aphrodite.css(styles$v.tagsEditor)
25058
+ className: aphrodite.css(styles$z.tagsEditor)
25059
25059
  }, /*#__PURE__*/React__namespace.createElement(GroupMetadataEditor, {
25060
25060
  value: data,
25061
25061
  onChange: newVal => actions.setValueAtPath(path, newVal),
@@ -25086,23 +25086,23 @@ const ArrayNodeContent = props => {
25086
25086
  const subpath = path.concat(i);
25087
25087
  const controls = [i > 0 && /*#__PURE__*/React__namespace.createElement("div", {
25088
25088
  key: "moveArrayElementUp",
25089
- className: aphrodite.css(styles$v.control)
25089
+ className: aphrodite.css(styles$z.control)
25090
25090
  }, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
25091
25091
  color: "orange",
25092
25092
  title: "Move up",
25093
25093
  onClick: () => actions.moveArrayElementUp(subpath)
25094
25094
  }, /*#__PURE__*/React__namespace.createElement("div", {
25095
- className: aphrodite.css(styles$v.verticalFlip)
25095
+ className: aphrodite.css(styles$z.verticalFlip)
25096
25096
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$6, iconChevronDown)))), i < data.length - 1 && /*#__PURE__*/React__namespace.createElement("div", {
25097
25097
  key: "moveArrayElementDown",
25098
- className: aphrodite.css(styles$v.control)
25098
+ className: aphrodite.css(styles$z.control)
25099
25099
  }, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
25100
25100
  color: "orange",
25101
25101
  title: "Move down",
25102
25102
  onClick: () => actions.moveArrayElementDown(subpath)
25103
25103
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$6, iconChevronDown))), /*#__PURE__*/React__namespace.createElement("div", {
25104
25104
  key: "removeArrayElement",
25105
- className: aphrodite.css(styles$v.control)
25105
+ className: aphrodite.css(styles$z.control)
25106
25106
  }, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
25107
25107
  color: "orange",
25108
25108
  title: "Delete",
@@ -25110,7 +25110,7 @@ const ArrayNodeContent = props => {
25110
25110
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$6, iconTrash$4)))];
25111
25111
  return /*#__PURE__*/React__namespace.createElement("div", {
25112
25112
  key: i,
25113
- className: aphrodite.css(styles$v.arrayElement, !elementIsLeaf && styles$v.arrayElementAndNotLeaf)
25113
+ className: aphrodite.css(styles$z.arrayElement, !elementIsLeaf && styles$z.arrayElementAndNotLeaf)
25114
25114
  }, /*#__PURE__*/React__namespace.createElement(NodeContainer, _extends({}, otherProps, {
25115
25115
  key: i,
25116
25116
  shape: shape.elementShape,
@@ -25136,7 +25136,7 @@ const ObjectNodeContent = props => {
25136
25136
  // made sense to the shape's author is the order in which we'll iterate :)
25137
25137
  const children = Object.keys(shape.shape).map(subkey => /*#__PURE__*/React__namespace.createElement("div", {
25138
25138
  key: subkey,
25139
- className: aphrodite.css(styles$v.objectElement)
25139
+ className: aphrodite.css(styles$z.objectElement)
25140
25140
  }, /*#__PURE__*/React__namespace.createElement(NodeContainer, _extends({}, otherProps, {
25141
25141
  shape: shape.shape[subkey],
25142
25142
  data: data[subkey],
@@ -25306,7 +25306,7 @@ class MultiRendererEditor extends React__namespace.Component {
25306
25306
  }, this._renderContent());
25307
25307
  }
25308
25308
  }
25309
- const styles$v = aphrodite.StyleSheet.create({
25309
+ const styles$z = aphrodite.StyleSheet.create({
25310
25310
  // This is used in a number of places throughout this file.
25311
25311
  container: {},
25312
25312
  // eslint-disable-next-line react-native/no-unused-styles
@@ -25458,47 +25458,47 @@ const StatefulArticleEditor = createReactClass__default["default"]({
25458
25458
  screen
25459
25459
  } = this.state;
25460
25460
  return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("div", {
25461
- style: styles$u.controlBar
25461
+ style: styles$y.controlBar
25462
25462
  }, /*#__PURE__*/React__namespace.createElement("span", {
25463
- style: styles$u.controls
25463
+ style: styles$y.controls
25464
25464
  }, "Mode:", " ", /*#__PURE__*/React__namespace.createElement("span", {
25465
25465
  onClick: () => this.setState({
25466
25466
  mode: "edit"
25467
25467
  }),
25468
- style: mode === "edit" ? styles$u.controlSelected : styles$u.control
25468
+ style: mode === "edit" ? styles$y.controlSelected : styles$y.control
25469
25469
  }, "EDIT"), " | ", /*#__PURE__*/React__namespace.createElement("span", {
25470
25470
  onClick: () => this.setState({
25471
25471
  mode: "preview"
25472
25472
  }),
25473
- style: mode === "preview" ? styles$u.controlSelected : styles$u.control
25473
+ style: mode === "preview" ? styles$y.controlSelected : styles$y.control
25474
25474
  }, "PREVIEW"), " | ", /*#__PURE__*/React__namespace.createElement("span", {
25475
25475
  onClick: () => this.setState({
25476
25476
  mode: "json"
25477
25477
  }),
25478
- style: mode === "json" ? styles$u.controlSelected : styles$u.control
25478
+ style: mode === "json" ? styles$y.controlSelected : styles$y.control
25479
25479
  }, "JSON")), /*#__PURE__*/React__namespace.createElement("span", {
25480
- style: styles$u.controls
25480
+ style: styles$y.controls
25481
25481
  }, "Screen:", " ", /*#__PURE__*/React__namespace.createElement("span", {
25482
25482
  onClick: () => this.setState({
25483
25483
  screen: "phone"
25484
25484
  }),
25485
- style: screen === "phone" ? styles$u.controlSelected : styles$u.control
25485
+ style: screen === "phone" ? styles$y.controlSelected : styles$y.control
25486
25486
  }, "PHONE"), " | ", /*#__PURE__*/React__namespace.createElement("span", {
25487
25487
  onClick: () => this.setState({
25488
25488
  screen: "tablet"
25489
25489
  }),
25490
- style: screen === "tablet" ? styles$u.controlSelected : styles$u.control
25490
+ style: screen === "tablet" ? styles$y.controlSelected : styles$y.control
25491
25491
  }, "TABLET"), " | ", /*#__PURE__*/React__namespace.createElement("span", {
25492
25492
  onClick: () => this.setState({
25493
25493
  screen: "desktop"
25494
25494
  }),
25495
- style: screen === "desktop" ? styles$u.controlSelected : styles$u.control
25495
+ style: screen === "desktop" ? styles$y.controlSelected : styles$y.control
25496
25496
  }, "DESKTOP"))), /*#__PURE__*/React__namespace.createElement("div", {
25497
- style: styles$u.editor
25497
+ style: styles$y.editor
25498
25498
  }, /*#__PURE__*/React__namespace.createElement(ArticleEditor, this.state)));
25499
25499
  }
25500
25500
  });
25501
- const styles$u = {
25501
+ const styles$y = {
25502
25502
  controlBar: {
25503
25503
  marginBottom: 25,
25504
25504
  marginTop: 5
@@ -25713,7 +25713,7 @@ class BlurInput extends React__namespace.Component {
25713
25713
 
25714
25714
  /* eslint-disable no-useless-escape */
25715
25715
  const {
25716
- InfoTip: InfoTip$j,
25716
+ InfoTip: InfoTip$l,
25717
25717
  PropCheckBox: PropCheckBox$b
25718
25718
  } = perseus.components;
25719
25719
  const DEFAULT_WIDTH = 400;
@@ -25901,7 +25901,7 @@ class CSProgramEditor extends React__namespace.Component {
25901
25901
  label: "Show Editor",
25902
25902
  showEditor: this.props.showEditor,
25903
25903
  onChange: this.props.onChange
25904
- }), /*#__PURE__*/React__namespace.createElement(InfoTip$j, null, "If you show the editor, you should use the \"full-width\" alignment to make room for the width of the editor."), /*#__PURE__*/React__namespace.createElement("br", null), /*#__PURE__*/React__namespace.createElement(PropCheckBox$b, {
25904
+ }), /*#__PURE__*/React__namespace.createElement(InfoTip$l, null, "If you show the editor, you should use the \"full-width\" alignment to make room for the width of the editor."), /*#__PURE__*/React__namespace.createElement("br", null), /*#__PURE__*/React__namespace.createElement(PropCheckBox$b, {
25905
25905
  label: "Show Buttons",
25906
25906
  showButtons: this.props.showButtons,
25907
25907
  onChange: this.props.onChange
@@ -25909,7 +25909,7 @@ class CSProgramEditor extends React__namespace.Component {
25909
25909
  name: "settings",
25910
25910
  pairs: this.props.settings,
25911
25911
  onChange: this._handleSettingsChange
25912
- }), /*#__PURE__*/React__namespace.createElement(InfoTip$j, null, "Settings that you add here are available to the program as an object returned by ", /*#__PURE__*/React__namespace.createElement("code", null, "Program.settings()"))));
25912
+ }), /*#__PURE__*/React__namespace.createElement(InfoTip$l, null, "Settings that you add here are available to the program as an object returned by ", /*#__PURE__*/React__namespace.createElement("code", null, "Program.settings()"))));
25913
25913
  }
25914
25914
  }
25915
25915
 
@@ -25986,7 +25986,7 @@ class DeprecatedStandinEditor extends React__namespace.Component {
25986
25986
 
25987
25987
  /* eslint-disable @khanacademy/ts-no-error-suppressions */
25988
25988
  const {
25989
- InfoTip: InfoTip$i,
25989
+ InfoTip: InfoTip$k,
25990
25990
  InlineIcon: InlineIcon$5
25991
25991
  } = perseus.components;
25992
25992
  const {
@@ -26067,14 +26067,14 @@ class DropdownEditor extends React__namespace.Component {
26067
26067
  className: "perseus-widget-dropdown"
26068
26068
  }, /*#__PURE__*/React__namespace.createElement("div", {
26069
26069
  className: "dropdown-info"
26070
- }, "Dropdown", /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.createElement("p", null, "The drop down is useful for making inequalities in a custom format. We normally use the symbols ", "<", ",", " ", ">", ", \u2264, \u2265 (in that order) which you can copy into the choices. When possible, use the \"multiple choice\" answer type instead."))), /*#__PURE__*/React__namespace.createElement("div", {
26070
+ }, "Dropdown", /*#__PURE__*/React__namespace.createElement(InfoTip$k, null, /*#__PURE__*/React__namespace.createElement("p", null, "The drop down is useful for making inequalities in a custom format. We normally use the symbols ", "<", ",", " ", ">", ", \u2264, \u2265 (in that order) which you can copy into the choices. When possible, use the \"multiple choice\" answer type instead."))), /*#__PURE__*/React__namespace.createElement("div", {
26071
26071
  className: "dropdown-placeholder"
26072
26072
  }, /*#__PURE__*/React__namespace.createElement("input", {
26073
26073
  type: "text",
26074
26074
  placeholder: "Placeholder value",
26075
26075
  value: this.props.placeholder,
26076
26076
  onChange: this.onPlaceholderChange
26077
- }), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.createElement("p", null, "This value will appear as the drop down default. It should give the user some indication of the values available in the drop down itself, e.g., Yes/No/Maybe."))), /*#__PURE__*/React__namespace.createElement("div", {
26077
+ }), /*#__PURE__*/React__namespace.createElement(InfoTip$k, null, /*#__PURE__*/React__namespace.createElement("p", null, "This value will appear as the drop down default. It should give the user some indication of the values available in the drop down itself, e.g., Yes/No/Maybe."))), /*#__PURE__*/React__namespace.createElement("div", {
26078
26078
  className: "clearfix"
26079
26079
  }), /*#__PURE__*/React__namespace.createElement("ul", {
26080
26080
  className: "dropdown-choices"
@@ -26608,7 +26608,7 @@ const SortableItem = createReactClass__default["default"]({
26608
26608
  });
26609
26609
 
26610
26610
  const {
26611
- InfoTip: InfoTip$h,
26611
+ InfoTip: InfoTip$j,
26612
26612
  PropCheckBox: PropCheckBox$a
26613
26613
  } = perseus.components;
26614
26614
 
@@ -26734,11 +26734,11 @@ class ExpressionEditor extends React__namespace.Component {
26734
26734
  onChange: this.props.onChange,
26735
26735
  labelAlignment: "right",
26736
26736
  label: "Use \xD7 for rendering multiplication instead of a center dot."
26737
- }), /*#__PURE__*/React__namespace.createElement(InfoTip$h, 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", null, /*#__PURE__*/React__namespace.createElement("label", null, "Function variables: ", /*#__PURE__*/React__namespace.createElement("input", {
26737
+ }), /*#__PURE__*/React__namespace.createElement(InfoTip$j, 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", null, /*#__PURE__*/React__namespace.createElement("label", null, "Function variables: ", /*#__PURE__*/React__namespace.createElement("input", {
26738
26738
  type: "text",
26739
26739
  defaultValue: this.props.functions.join(" "),
26740
26740
  onChange: this.handleFunctions
26741
- })), /*#__PURE__*/React__namespace.createElement(InfoTip$h, 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", null, /*#__PURE__*/React__namespace.createElement("div", null, "Button sets:"), buttonSetChoices), /*#__PURE__*/React__namespace.createElement("h3", {
26741
+ })), /*#__PURE__*/React__namespace.createElement(InfoTip$j, 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", null, /*#__PURE__*/React__namespace.createElement("div", null, "Button sets:"), buttonSetChoices), /*#__PURE__*/React__namespace.createElement("h3", {
26742
26742
  className: "expression-editor-h3"
26743
26743
  }, "Answers"), /*#__PURE__*/React__namespace.createElement("p", {
26744
26744
  style: {
@@ -26952,14 +26952,14 @@ class AnswerOption extends React__namespace.Component {
26952
26952
  onChange: this.props.onChange,
26953
26953
  labelAlignment: "right",
26954
26954
  label: "Answer expression must have the same form."
26955
- }), /*#__PURE__*/React__namespace.createElement(InfoTip$h, 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", {
26955
+ }), /*#__PURE__*/React__namespace.createElement(InfoTip$j, 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", {
26956
26956
  className: "answer-option"
26957
26957
  }, /*#__PURE__*/React__namespace.createElement(PropCheckBox$a, {
26958
26958
  simplify: this.props.simplify,
26959
26959
  onChange: this.props.onChange,
26960
26960
  labelAlignment: "right",
26961
26961
  label: "Answer expression must be fully expanded and simplified."
26962
- }), /*#__PURE__*/React__namespace.createElement(InfoTip$h, 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", {
26962
+ }), /*#__PURE__*/React__namespace.createElement(InfoTip$j, 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", {
26963
26963
  className: "remove-container"
26964
26964
  }, removeButton)));
26965
26965
  }
@@ -27037,10 +27037,10 @@ class GradedGroupEditor extends React__namespace.Component {
27037
27037
  }, /*#__PURE__*/React__namespace.createElement("div", {
27038
27038
  className: "perseus-widget-row"
27039
27039
  }, /*#__PURE__*/React__namespace.createElement("label", {
27040
- className: aphrodite.css(styles$t.title)
27040
+ className: aphrodite.css(styles$x.title)
27041
27041
  }, "Title:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$6, {
27042
27042
  value: this.props.title,
27043
- className: aphrodite.css(styles$t.input)
27043
+ className: aphrodite.css(styles$x.input)
27044
27044
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
27045
27045
  ,
27046
27046
  onChange: this.change("title")
@@ -27065,7 +27065,7 @@ class GradedGroupEditor extends React__namespace.Component {
27065
27065
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$4, iconPlus$1), " Add a hint"), this.props.hint && /*#__PURE__*/React__namespace.createElement("div", {
27066
27066
  className: "perseus-hint-editor"
27067
27067
  }, /*#__PURE__*/React__namespace.createElement("div", {
27068
- className: aphrodite.css(styles$t.hintsTitle)
27068
+ className: aphrodite.css(styles$x.hintsTitle)
27069
27069
  }, "Hint"), /*#__PURE__*/React__namespace.createElement(Editor, {
27070
27070
  ref: this.hintEditor,
27071
27071
  content: this.props.hint ? this.props.hint.content : "",
@@ -27097,7 +27097,7 @@ class GradedGroupEditor extends React__namespace.Component {
27097
27097
  };
27098
27098
  };
27099
27099
  }
27100
- const styles$t = aphrodite.StyleSheet.create({
27100
+ const styles$x = aphrodite.StyleSheet.create({
27101
27101
  title: {
27102
27102
  fontSize: 18,
27103
27103
  fontWeight: "bold"
@@ -27184,7 +27184,7 @@ const setArrayItem = (list, i, value) => [...list.slice(0, i), value, ...list.sl
27184
27184
  /* eslint-disable react/forbid-prop-types, react/no-unsafe */
27185
27185
  const {
27186
27186
  ButtonGroup: ButtonGroup$4,
27187
- InfoTip: InfoTip$g,
27187
+ InfoTip: InfoTip$i,
27188
27188
  PropCheckBox: PropCheckBox$9,
27189
27189
  RangeInput: RangeInput$6
27190
27190
  } = perseus.components;
@@ -27645,7 +27645,7 @@ const GraphSettings = createReactClass__default["default"]({
27645
27645
  },
27646
27646
  onKeyPress: this.changeBackgroundUrl,
27647
27647
  onBlur: this.changeBackgroundUrl
27648
- }), /*#__PURE__*/React__namespace.createElement(InfoTip$g, null, /*#__PURE__*/React__namespace.createElement("p", null, "Create an image in graphie, or use the \"Add image\" function to create a background.")))), ___default["default"].contains(this.props.editableSettings, "measure") && /*#__PURE__*/React__namespace.createElement("div", {
27648
+ }), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.createElement("p", null, "Create an image in graphie, or use the \"Add image\" function to create a background.")))), ___default["default"].contains(this.props.editableSettings, "measure") && /*#__PURE__*/React__namespace.createElement("div", {
27649
27649
  className: "misc-settings"
27650
27650
  }, /*#__PURE__*/React__namespace.createElement("div", {
27651
27651
  className: "perseus-widget-row"
@@ -27683,7 +27683,7 @@ const GraphSettings = createReactClass__default["default"]({
27683
27683
  });
27684
27684
 
27685
27685
  const {
27686
- InfoTip: InfoTip$f,
27686
+ InfoTip: InfoTip$h,
27687
27687
  MultiButtonGroup: MultiButtonGroup$1
27688
27688
  } = perseus.components;
27689
27689
  const {
@@ -27757,7 +27757,7 @@ class GrapherEditor extends React__namespace.Component {
27757
27757
  className: "perseus-error"
27758
27758
  }, this.props.graph.valid);
27759
27759
  }
27760
- return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("div", null, "Correct answer", " ", /*#__PURE__*/React__namespace.createElement(InfoTip$f, null, /*#__PURE__*/React__namespace.createElement("p", null, "Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer.")), " ", ": ", equationString), /*#__PURE__*/React__namespace.createElement(GraphSettings, {
27760
+ return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("div", null, "Correct answer", " ", /*#__PURE__*/React__namespace.createElement(InfoTip$h, null, /*#__PURE__*/React__namespace.createElement("p", null, "Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer.")), " ", ": ", equationString), /*#__PURE__*/React__namespace.createElement(GraphSettings, {
27761
27761
  editableSettings: ["graph", "snap", "image"],
27762
27762
  box: getInteractiveBoxFromSizeClass$1(sizeClass),
27763
27763
  range: this.props.graph.range,
@@ -28032,7 +28032,7 @@ class IframeEditor extends React__namespace.Component {
28032
28032
 
28033
28033
  /* eslint-disable jsx-a11y/anchor-is-valid, react/sort-comp */
28034
28034
  const {
28035
- InfoTip: InfoTip$e,
28035
+ InfoTip: InfoTip$g,
28036
28036
  InlineIcon: InlineIcon$3,
28037
28037
  RangeInput: RangeInput$5
28038
28038
  } = perseus.components;
@@ -28089,7 +28089,7 @@ class ImageEditor extends React__namespace.Component {
28089
28089
  style: {
28090
28090
  width: "100%"
28091
28091
  }
28092
- }))), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("label", null, /*#__PURE__*/React__namespace.createElement("div", null, "Dimensions:"), /*#__PURE__*/React__namespace.createElement("p", null, backgroundImage.width, "x", backgroundImage.height))), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("label", null, /*#__PURE__*/React__namespace.createElement("div", null, "Alt text:", /*#__PURE__*/React__namespace.createElement(InfoTip$e, null, "This is important for screenreaders. The content of this alt text will be formatted as markdown (tables, emphasis, etc. are supported).")), /*#__PURE__*/React__namespace.createElement(Editor, {
28092
+ }))), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("label", null, /*#__PURE__*/React__namespace.createElement("div", null, "Dimensions:"), /*#__PURE__*/React__namespace.createElement("p", null, backgroundImage.width, "x", backgroundImage.height))), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("label", null, /*#__PURE__*/React__namespace.createElement("div", null, "Alt text:", /*#__PURE__*/React__namespace.createElement(InfoTip$g, null, "This is important for screenreaders. The content of this alt text will be formatted as markdown (tables, emphasis, etc. are supported).")), /*#__PURE__*/React__namespace.createElement(Editor, {
28093
28093
  apiOptions: this.props.apiOptions,
28094
28094
  content: this.props.alt,
28095
28095
  onChange: props => {
@@ -28113,7 +28113,7 @@ class ImageEditor extends React__namespace.Component {
28113
28113
  }, this.state.backgroundImageError);
28114
28114
  return /*#__PURE__*/React__namespace.createElement("div", {
28115
28115
  className: "perseus-image-editor"
28116
- }, /*#__PURE__*/React__namespace.createElement("label", null, "Image url:", /*#__PURE__*/React__namespace.createElement(InfoTip$e, null, "Paste an image or graphie image URL."), this.state.backgroundImageError && backgroundImageErrorText, /*#__PURE__*/React__namespace.createElement(BlurInput, {
28116
+ }, /*#__PURE__*/React__namespace.createElement("label", null, "Image url:", /*#__PURE__*/React__namespace.createElement(InfoTip$g, null, "Paste an image or graphie image URL."), this.state.backgroundImageError && backgroundImageErrorText, /*#__PURE__*/React__namespace.createElement(BlurInput, {
28117
28117
  value: backgroundImage.url || "",
28118
28118
  style: {
28119
28119
  width: 332
@@ -28269,7 +28269,7 @@ class ImageEditor extends React__namespace.Component {
28269
28269
 
28270
28270
  /* eslint-disable react/sort-comp */
28271
28271
  const {
28272
- InfoTip: InfoTip$d
28272
+ InfoTip: InfoTip$f
28273
28273
  } = perseus.components;
28274
28274
  const answerTypes = {
28275
28275
  number: {
@@ -28349,7 +28349,7 @@ class InputNumberEditor extends React__namespace.Component {
28349
28349
  value: "optional"
28350
28350
  }, "will be accepted"), /*#__PURE__*/React__namespace.createElement("option", {
28351
28351
  value: "enforced"
28352
- }, "will be marked wrong"))), /*#__PURE__*/React__namespace.createElement(InfoTip$d, null, /*#__PURE__*/React__namespace.createElement("p", null, "Normally select \"will not be graded\". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and anything after)"), /*#__PURE__*/React__namespace.createElement("p", null, "Select \"will be accepted\" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)"), /*#__PURE__*/React__namespace.createElement("p", null, "Select \"will be marked wrong\" only if we are specifically assessing the ability to simplify."))), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("label", null, /*#__PURE__*/React__namespace.createElement("input", {
28352
+ }, "will be marked wrong"))), /*#__PURE__*/React__namespace.createElement(InfoTip$f, null, /*#__PURE__*/React__namespace.createElement("p", null, "Normally select \"will not be graded\". This will give the user a message saying the answer is correct but not simplified. The user will then have to simplify it and re-enter, but will not be penalized. (5th grade and anything after)"), /*#__PURE__*/React__namespace.createElement("p", null, "Select \"will be accepted\" only if the user is not expected to know how to simplify fractions yet. (Anything prior to 5th grade)"), /*#__PURE__*/React__namespace.createElement("p", null, "Select \"will be marked wrong\" only if we are specifically assessing the ability to simplify."))), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("label", null, /*#__PURE__*/React__namespace.createElement("input", {
28353
28353
  type: "checkbox",
28354
28354
  checked: this.props.inexact,
28355
28355
  onChange: e => {
@@ -28385,7 +28385,7 @@ class InputNumberEditor extends React__namespace.Component {
28385
28385
  });
28386
28386
  },
28387
28387
  "aria-label": "Answer type"
28388
- }, answerTypeOptions), /*#__PURE__*/React__namespace.createElement(InfoTip$d, null, /*#__PURE__*/React__namespace.createElement("p", null, "Use the default \"Numbers\" unless the answer must be in a specific form (e.g., question is about converting decimals to fractions)."))), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("label", null, "Width", " ", /*#__PURE__*/React__namespace.createElement("select", {
28388
+ }, answerTypeOptions), /*#__PURE__*/React__namespace.createElement(InfoTip$f, null, /*#__PURE__*/React__namespace.createElement("p", null, "Use the default \"Numbers\" unless the answer must be in a specific form (e.g., question is about converting decimals to fractions)."))), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("label", null, "Width", " ", /*#__PURE__*/React__namespace.createElement("select", {
28389
28389
  value: this.props.size,
28390
28390
  onChange: e => {
28391
28391
  // @ts-expect-error - TS2322 - Type 'string' is not assignable to type '"small" | "normal" | undefined'.
@@ -28397,7 +28397,7 @@ class InputNumberEditor extends React__namespace.Component {
28397
28397
  value: "normal"
28398
28398
  }, "Normal (80px)"), /*#__PURE__*/React__namespace.createElement("option", {
28399
28399
  value: "small"
28400
- }, "Small (40px)"))), /*#__PURE__*/React__namespace.createElement(InfoTip$d, null, /*#__PURE__*/React__namespace.createElement("p", null, "Use size \"Normal\" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them."))), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("label", null, /*#__PURE__*/React__namespace.createElement("input", {
28400
+ }, "Small (40px)"))), /*#__PURE__*/React__namespace.createElement(InfoTip$f, null, /*#__PURE__*/React__namespace.createElement("p", null, "Use size \"Normal\" for all text boxes, unless there are multiple text boxes in one line and the answer area is too narrow to fit them."))), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("label", null, /*#__PURE__*/React__namespace.createElement("input", {
28401
28401
  type: "checkbox",
28402
28402
  checked: this.props.rightAlign,
28403
28403
  onChange: e => {
@@ -28468,13 +28468,13 @@ function MathquillInput(props) {
28468
28468
  }
28469
28469
  });
28470
28470
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
28471
- style: styles$s.outerWrapper
28471
+ style: styles$w.outerWrapper
28472
28472
  }, /*#__PURE__*/React__namespace.createElement("span", {
28473
28473
  ref: mathFieldWrapperRef,
28474
28474
  className: "perseus-math-input mq-editable-field mq-math-mode"
28475
28475
  }));
28476
28476
  }
28477
- const styles$s = aphrodite.StyleSheet.create({
28477
+ const styles$w = aphrodite.StyleSheet.create({
28478
28478
  outerWrapper: {
28479
28479
  display: "inline-block",
28480
28480
  borderStyle: "solid",
@@ -29560,7 +29560,7 @@ const GraphPointsCountSelector = _ref => {
29560
29560
  // Never uses placeholder, always has value
29561
29561
  ,
29562
29562
  placeholder: "",
29563
- style: styles$r.singleSelectShort
29563
+ style: styles$v.singleSelectShort
29564
29564
  }, [...[...Array(7).keys()].map(n => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
29565
29565
  key: n,
29566
29566
  value: `${n}`,
@@ -29571,7 +29571,7 @@ const GraphPointsCountSelector = _ref => {
29571
29571
  label: "unlimited"
29572
29572
  })]);
29573
29573
  };
29574
- const styles$r = aphrodite.StyleSheet.create({
29574
+ const styles$v = aphrodite.StyleSheet.create({
29575
29575
  singleSelectShort: {
29576
29576
  // Non-standard spacing, but it's the smallest we can go
29577
29577
  // without running into styling issues with the dropdown.
@@ -29584,7 +29584,7 @@ const GraphTypeSelector = props => {
29584
29584
  selectedValue: props.graphType,
29585
29585
  onChange: props.onChange,
29586
29586
  placeholder: "Select a graph type",
29587
- style: styles$q.singleSelectShort
29587
+ style: styles$u.singleSelectShort
29588
29588
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
29589
29589
  value: "linear",
29590
29590
  label: "Linear function"
@@ -29617,7 +29617,7 @@ const GraphTypeSelector = props => {
29617
29617
  label: "Angle"
29618
29618
  }));
29619
29619
  };
29620
- const styles$q = aphrodite.StyleSheet.create({
29620
+ const styles$u = aphrodite.StyleSheet.create({
29621
29621
  singleSelectShort: {
29622
29622
  // Non-standard spacing, but it's the smallest we can go
29623
29623
  // without running into styling issues with the dropdown.
@@ -29634,16 +29634,16 @@ const LabeledRow = props => {
29634
29634
  style
29635
29635
  } = props;
29636
29636
  return /*#__PURE__*/React__namespace.createElement("label", {
29637
- className: aphrodite.css(styles$p.label)
29637
+ className: aphrodite.css(styles$t.label)
29638
29638
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
29639
- style: [styles$p.row, style]
29639
+ style: [styles$t.row, style]
29640
29640
  }, labelSide === "start" || /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, {
29641
- style: styles$p.spaceEnd
29641
+ style: styles$t.spaceEnd
29642
29642
  }, label), children, labelSide === "end" && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, {
29643
- style: styles$p.spaceStart
29643
+ style: styles$t.spaceStart
29644
29644
  }, label)));
29645
29645
  };
29646
- const styles$p = aphrodite.StyleSheet.create({
29646
+ const styles$t = aphrodite.StyleSheet.create({
29647
29647
  label: {
29648
29648
  width: "fit-content"
29649
29649
  },
@@ -29664,7 +29664,7 @@ const styles$p = aphrodite.StyleSheet.create({
29664
29664
  /* eslint-disable react/forbid-prop-types, react/no-unsafe */
29665
29665
  const {
29666
29666
  ButtonGroup: ButtonGroup$2,
29667
- InfoTip: InfoTip$c,
29667
+ InfoTip: InfoTip$e,
29668
29668
  PropCheckBox: PropCheckBox$7,
29669
29669
  RangeInput: RangeInput$4
29670
29670
  } = perseus.components;
@@ -30099,10 +30099,10 @@ class InteractiveGraphSettings extends React__namespace.Component {
30099
30099
  onChange: this.change
30100
30100
  }))), /*#__PURE__*/React__namespace.createElement(LabeledRow, {
30101
30101
  label: "Background image URL:",
30102
- style: styles$o.resetSpaceTop
30102
+ style: styles$s.resetSpaceTop
30103
30103
  }, /*#__PURE__*/React__namespace.createElement("input", {
30104
30104
  type: "text",
30105
- className: aphrodite.css(styles$o.backgroundUrlInput),
30105
+ className: aphrodite.css(styles$s.backgroundUrlInput),
30106
30106
  ref: this.bgUrlRef,
30107
30107
  value: this.state.backgroundImage.url || "",
30108
30108
  onChange: e => {
@@ -30117,29 +30117,29 @@ class InteractiveGraphSettings extends React__namespace.Component {
30117
30117
  },
30118
30118
  onKeyPress: this.changeBackgroundUrl,
30119
30119
  onBlur: this.changeBackgroundUrl
30120
- }), /*#__PURE__*/React__namespace.createElement(InfoTip$c, null, /*#__PURE__*/React__namespace.createElement("p", null, "Create an image in graphie, or use the \"Add image\" function to create a background."))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30121
- style: styles$o.rulerSection
30120
+ }), /*#__PURE__*/React__namespace.createElement(InfoTip$e, null, /*#__PURE__*/React__namespace.createElement("p", null, "Create an image in graphie, or use the \"Add image\" function to create a background."))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30121
+ style: styles$s.rulerSection
30122
30122
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30123
- style: styles$o.checkboxRow
30123
+ style: styles$s.checkboxRow
30124
30124
  }, /*#__PURE__*/React__namespace.createElement(PropCheckBox$7, {
30125
30125
  label: "Show ruler",
30126
30126
  showRuler: this.props.showRuler,
30127
30127
  onChange: this.change,
30128
- style: styles$o.resetSpaceTop
30128
+ style: styles$s.resetSpaceTop
30129
30129
  }), /*#__PURE__*/React__namespace.createElement(PropCheckBox$7, {
30130
30130
  label: "Show protractor",
30131
30131
  showProtractor: this.props.showProtractor,
30132
30132
  onChange: this.change,
30133
- style: styles$o.resetSpaceTop
30133
+ style: styles$s.resetSpaceTop
30134
30134
  })), (this.props.showRuler || this.props.showProtractor) && /*#__PURE__*/React__namespace.createElement(Banner__default["default"], {
30135
30135
  layout: "floating",
30136
30136
  text: "The ruler and protractor are not accessible. Please consider an alternate approach.",
30137
30137
  kind: "warning"
30138
30138
  }), this.props.showRuler && /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30139
- style: styles$o.spaceTop
30139
+ style: styles$s.spaceTop
30140
30140
  }, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
30141
30141
  label: "Ruler label:",
30142
- style: styles$o.resetSpaceTop
30142
+ style: styles$s.resetSpaceTop
30143
30143
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
30144
30144
  id: "ruler-label-select",
30145
30145
  selectedValue: this.props.rulerLabel,
@@ -30149,7 +30149,7 @@ class InteractiveGraphSettings extends React__namespace.Component {
30149
30149
  });
30150
30150
  },
30151
30151
  placeholder: "None",
30152
- style: styles$o.singleSelectShort
30152
+ style: styles$s.singleSelectShort
30153
30153
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
30154
30154
  value: "",
30155
30155
  label: "None",
@@ -30190,7 +30190,7 @@ class InteractiveGraphSettings extends React__namespace.Component {
30190
30190
  });
30191
30191
  },
30192
30192
  placeholder: "10",
30193
- style: styles$o.singleSelectShort
30193
+ style: styles$s.singleSelectShort
30194
30194
  }, [1, 2, 4, 8, 10, 16].map(value => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
30195
30195
  key: value,
30196
30196
  value: `${value}`,
@@ -30198,7 +30198,7 @@ class InteractiveGraphSettings extends React__namespace.Component {
30198
30198
  }))))))));
30199
30199
  }
30200
30200
  }
30201
- const styles$o = aphrodite.StyleSheet.create({
30201
+ const styles$s = aphrodite.StyleSheet.create({
30202
30202
  resetSpaceTop: {
30203
30203
  marginTop: 0
30204
30204
  },
@@ -30322,22 +30322,19 @@ const LockedFigureSelect = props => {
30322
30322
  id,
30323
30323
  onChange
30324
30324
  } = props;
30325
+ const figureTypes = props.showM2Features ? ["point", "line", "ellipse", "vector"] : ["point", "line"];
30325
30326
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30326
- style: styles$n.container
30327
+ style: styles$r.container
30327
30328
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionMenu, {
30328
30329
  menuText: "Add locked figure",
30329
- style: styles$n.addElementSelect
30330
- }, [/*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionItem, {
30331
- key: `${id}-point`,
30332
- label: "Point",
30333
- onClick: () => onChange("point")
30334
- }, "Point"), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionItem, {
30335
- key: `${id}-line`,
30336
- label: "Line",
30337
- onClick: () => onChange("line")
30338
- }, "Line")]));
30330
+ style: styles$r.addElementSelect
30331
+ }, figureTypes.map(figureType => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionItem, {
30332
+ key: `${id}-${figureType}`,
30333
+ label: figureType,
30334
+ onClick: () => onChange(figureType)
30335
+ }, figureType))));
30339
30336
  };
30340
- const styles$n = aphrodite.StyleSheet.create({
30337
+ const styles$r = aphrodite.StyleSheet.create({
30341
30338
  container: {
30342
30339
  marginTop: wonderBlocksTokens.spacing.xSmall_8
30343
30340
  },
@@ -30347,6 +30344,83 @@ const styles$n = aphrodite.StyleSheet.create({
30347
30344
  }
30348
30345
  });
30349
30346
 
30347
+ const {
30348
+ InfoTip: InfoTip$d
30349
+ } = perseus.components;
30350
+ const degreeToRadian = degrees => {
30351
+ return degrees / 180 * Math.PI;
30352
+ };
30353
+ const AngleInput = props => {
30354
+ const {
30355
+ angle,
30356
+ onChange
30357
+ } = props;
30358
+ const [angleInput, setAngleInput] = React__namespace.useState(angle.toString());
30359
+ const [isInDegrees, setIsInDegrees] = React__namespace.useState(false);
30360
+ function handleAngleChange(newValue) {
30361
+ let useDegrees = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : isInDegrees;
30362
+ // Update the local state (update the input field value).
30363
+ setAngleInput(newValue);
30364
+ try {
30365
+ // If the new value is a valid expression, update the props.
30366
+ // Save the angle in radians.
30367
+ const evaluatedAngle = KAS__namespace.parse(newValue).expr.eval();
30368
+ if (useDegrees) {
30369
+ onChange(degreeToRadian(evaluatedAngle));
30370
+ } else {
30371
+ onChange(evaluatedAngle);
30372
+ }
30373
+ } catch (e) {
30374
+ // The user likely has not finished typing the expression.
30375
+ // Do nothing.
30376
+ return;
30377
+ }
30378
+ }
30379
+ function handleAngleTypeChange() {
30380
+ // Change the angle based on the new angle type.
30381
+ handleAngleChange(angleInput, !isInDegrees);
30382
+
30383
+ // Update the angle to the new type.
30384
+ setIsInDegrees(usingDegrees => !usingDegrees);
30385
+ }
30386
+ return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30387
+ style: [styles$q.row, styles$q.spaceUnder]
30388
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30389
+ tag: "label"
30390
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30391
+ style: styles$q.row
30392
+ }, "angle", /*#__PURE__*/React__namespace.createElement(Strut, {
30393
+ size: wonderBlocksTokens.spacing.xxSmall_6
30394
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
30395
+ id: "",
30396
+ value: angleInput,
30397
+ onChange: handleAngleChange,
30398
+ style: styles$q.textField
30399
+ }))), /*#__PURE__*/React__namespace.createElement(Strut, {
30400
+ size: wonderBlocksTokens.spacing.xxSmall_6
30401
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30402
+ style: styles$q.row
30403
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, null, "radians"), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30404
+ style: styles$q.switch
30405
+ }, /*#__PURE__*/React__namespace.createElement(Switch__default["default"], {
30406
+ onChange: handleAngleTypeChange,
30407
+ checked: isInDegrees
30408
+ })), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, null, "degrees")), /*#__PURE__*/React__namespace.createElement(InfoTip$d, null, /*#__PURE__*/React__namespace.createElement("p", null, "The angle of rotation for the ellipse (if the x radius and y radius are different)."), /*#__PURE__*/React__namespace.createElement("p", null, "Expressions will be evaluted (e.g. \"pi/2\" or \"5pi/4\").")));
30409
+ };
30410
+ const styles$q = aphrodite.StyleSheet.create({
30411
+ row: {
30412
+ flexDirection: "row",
30413
+ alignItems: "center"
30414
+ },
30415
+ switch: {
30416
+ marginLeft: wonderBlocksTokens.spacing.xxSmall_6,
30417
+ marginRight: wonderBlocksTokens.spacing.xxSmall_6
30418
+ },
30419
+ textField: {
30420
+ maxWidth: wonderBlocksTokens.spacing.xxxLarge_64
30421
+ }
30422
+ });
30423
+
30350
30424
  const ColorSwatch = props => {
30351
30425
  const {
30352
30426
  color,
@@ -30357,13 +30431,13 @@ const ColorSwatch = props => {
30357
30431
  "aria-label":
30358
30432
  // Don't include an aria label for decorative circles.
30359
30433
  !decorative ? `${color}, ${filled ? "filled" : "open"}` : undefined,
30360
- style: [styles$m.colorSwatch, {
30434
+ style: [styles$p.colorSwatch, {
30361
30435
  border: `4px solid ${perseus.lockedFigureColors[color]}`,
30362
30436
  backgroundColor: filled ? perseus.lockedFigureColors[color] : wonderBlocksTokens.color.white
30363
30437
  }]
30364
30438
  });
30365
30439
  };
30366
- const styles$m = aphrodite.StyleSheet.create({
30440
+ const styles$p = aphrodite.StyleSheet.create({
30367
30441
  colorSwatch: {
30368
30442
  // Add a white outline so that the color swatch is visible when
30369
30443
  // the dropdown option is highlighted with its blue background.
@@ -30384,10 +30458,10 @@ const ColorSelect = props => {
30384
30458
  const ids = wonderBlocksCore.useUniqueIdWithMock();
30385
30459
  const id = ids.get("color-select");
30386
30460
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30387
- style: [styles$l.row, style]
30461
+ style: [styles$o.row, style]
30388
30462
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30389
30463
  htmlFor: id,
30390
- style: styles$l.label,
30464
+ style: styles$o.label,
30391
30465
  tag: "label"
30392
30466
  }, "color"), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
30393
30467
  id: id,
@@ -30406,7 +30480,7 @@ const ColorSelect = props => {
30406
30480
  })
30407
30481
  }, colorName))));
30408
30482
  };
30409
- const styles$l = aphrodite.StyleSheet.create({
30483
+ const styles$o = aphrodite.StyleSheet.create({
30410
30484
  row: {
30411
30485
  flexDirection: "row",
30412
30486
  alignItems: "center"
@@ -30419,8 +30493,9 @@ const styles$l = aphrodite.StyleSheet.create({
30419
30493
  const CoordinatePairInput = props => {
30420
30494
  const {
30421
30495
  coord,
30496
+ labels,
30422
30497
  error,
30423
- onChangeProps
30498
+ onChange
30424
30499
  } = props;
30425
30500
 
30426
30501
  // Keep track of the coordinates via state as the user is editing them,
@@ -30449,37 +30524,35 @@ const CoordinatePairInput = props => {
30449
30524
  // Update the props (update the graph).
30450
30525
  const newCoords = [...coord];
30451
30526
  newCoords[coordIndex] = +newValue;
30452
- onChangeProps({
30453
- coord: newCoords
30454
- });
30527
+ onChange(newCoords);
30455
30528
  }
30456
30529
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30457
- style: [styles$k.row, styles$k.spaceUnder]
30530
+ style: [styles$n.row, styles$n.spaceUnder]
30458
30531
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30459
30532
  htmlFor: xCoordId,
30460
- style: styles$k.label,
30533
+ style: styles$n.label,
30461
30534
  tag: "label"
30462
- }, "x coord"), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
30535
+ }, labels ? labels[0] : "x coord"), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
30463
30536
  id: xCoordId,
30464
30537
  type: "number",
30465
30538
  value: coordState[0],
30466
30539
  onChange: newValue => handleCoordChange(newValue, 0),
30467
- style: [styles$k.textField, error ? styles$k.errorField : undefined]
30540
+ style: [styles$n.textField, error ? styles$n.errorField : undefined]
30468
30541
  }), /*#__PURE__*/React__namespace.createElement(Strut, {
30469
30542
  size: wonderBlocksTokens.spacing.medium_16
30470
30543
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30471
30544
  htmlFor: yCoordId,
30472
- style: styles$k.label,
30545
+ style: styles$n.label,
30473
30546
  tag: "label"
30474
- }, "y coord"), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
30547
+ }, labels ? labels[1] : "y coord"), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
30475
30548
  id: yCoordId,
30476
30549
  type: "number",
30477
30550
  value: coordState[1],
30478
30551
  onChange: newValue => handleCoordChange(newValue, 1),
30479
- style: [styles$k.textField, error ? styles$k.errorField : undefined]
30552
+ style: [styles$n.textField, error ? styles$n.errorField : undefined]
30480
30553
  })));
30481
30554
  };
30482
- const styles$k = aphrodite.StyleSheet.create({
30555
+ const styles$n = aphrodite.StyleSheet.create({
30483
30556
  row: {
30484
30557
  flexDirection: "row",
30485
30558
  alignItems: "center"
@@ -30499,32 +30572,40 @@ const styles$k = aphrodite.StyleSheet.create({
30499
30572
  }
30500
30573
  });
30501
30574
 
30502
- const LabeledSwitch = props => {
30575
+ const EllipseSwatch = props => {
30503
30576
  const {
30504
- checked,
30505
- label,
30506
- style,
30507
- onChange
30577
+ color,
30578
+ fillStyle,
30579
+ strokeStyle
30508
30580
  } = props;
30509
- const ids = wonderBlocksCore.useUniqueIdWithMock();
30510
- const switchId = ids.get("switch");
30511
30581
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30512
- style: [styles$j.row, style]
30513
- }, /*#__PURE__*/React__namespace.createElement(Switch__default["default"], {
30514
- id: switchId,
30515
- checked: checked,
30516
- onChange: onChange
30517
- }), /*#__PURE__*/React__namespace.createElement(Strut, {
30518
- size: wonderBlocksTokens.spacing.xSmall_8
30519
- }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30520
- tag: "label",
30521
- htmlFor: switchId
30522
- }, label));
30582
+ "aria-label": `${color}, stroke ${strokeStyle}, fill ${fillStyle}`,
30583
+ style: [styles$m.container, {
30584
+ border: `4px ${strokeStyle} ${perseus.lockedFigureColors[color]}`
30585
+ }]
30586
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30587
+ style: [styles$m.innerCircle, {
30588
+ backgroundColor: perseus.lockedFigureColors[color],
30589
+ opacity: perseus.lockedEllipseFillStyles[fillStyle]
30590
+ }]
30591
+ }));
30523
30592
  };
30524
- const styles$j = aphrodite.StyleSheet.create({
30525
- row: {
30526
- flexDirection: "row",
30527
- alignItems: "center"
30593
+ const styles$m = aphrodite.StyleSheet.create({
30594
+ container: {
30595
+ // Add a white outline so that the color swatch is visible when
30596
+ // the dropdown option is highlighted with its blue background.
30597
+ outline: `2px solid ${wonderBlocksTokens.color.offWhite}`,
30598
+ borderRadius: "50%",
30599
+ width: wonderBlocksTokens.spacing.xLarge_32,
30600
+ height: wonderBlocksTokens.spacing.large_24,
30601
+ backgroundColor: wonderBlocksTokens.color.white,
30602
+ alignItems: "center",
30603
+ justifyContent: "center"
30604
+ },
30605
+ innerCircle: {
30606
+ width: 28,
30607
+ height: 20,
30608
+ borderRadius: "50%"
30528
30609
  }
30529
30610
  });
30530
30611
 
@@ -30546,14 +30627,14 @@ const LockedFigureSettingsAccordion = props => {
30546
30627
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksAccordion.AccordionSection, {
30547
30628
  expanded: expanded,
30548
30629
  onToggle: onToggle,
30549
- style: [styles$i.container, containerStyle],
30550
- headerStyle: styles$i.accordionHeader,
30630
+ style: [styles$l.container, containerStyle],
30631
+ headerStyle: styles$l.accordionHeader,
30551
30632
  header: header
30552
30633
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30553
- style: [styles$i.accordionPanel, panelStyle]
30634
+ style: [styles$l.accordionPanel, panelStyle]
30554
30635
  }, children)));
30555
30636
  };
30556
- const styles$i = aphrodite.StyleSheet.create({
30637
+ const styles$l = aphrodite.StyleSheet.create({
30557
30638
  container: {
30558
30639
  backgroundColor: wonderBlocksTokens.color.fadedBlue8,
30559
30640
  marginTop: wonderBlocksTokens.spacing.xSmall_8
@@ -30574,6 +30655,192 @@ const styles$i = aphrodite.StyleSheet.create({
30574
30655
  }
30575
30656
  });
30576
30657
 
30658
+ /**
30659
+ * The part of a locked figure settings panel that contains actions
30660
+ * for this panel and its associated locked figure, including
30661
+ * the delete button.
30662
+ */
30663
+ const LockedFigureSettingsActions = props => {
30664
+ const {
30665
+ onRemove,
30666
+ figureAriaLabel
30667
+ } = props;
30668
+ return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30669
+ style: styles$k.container
30670
+ }, /*#__PURE__*/React__namespace.createElement(Button__default["default"], {
30671
+ startIcon: trashIcon__default["default"],
30672
+ "aria-label": `Delete ${figureAriaLabel}`,
30673
+ onClick: onRemove,
30674
+ kind: "tertiary",
30675
+ style: styles$k.deleteButton
30676
+ }, "Delete"));
30677
+ };
30678
+ const styles$k = aphrodite.StyleSheet.create({
30679
+ container: {
30680
+ width: "100%",
30681
+ flexDirection: "row",
30682
+ alignItems: "center",
30683
+ marginTop: wonderBlocksTokens.spacing.xxxSmall_4
30684
+ },
30685
+ deleteButton: {
30686
+ // Line up the delete icon with the rest of the content.
30687
+ marginInlineStart: -wonderBlocksTokens.spacing.xxxSmall_4
30688
+ }
30689
+ });
30690
+
30691
+ const {
30692
+ InfoTip: InfoTip$c
30693
+ } = perseus.components;
30694
+ const LockedEllipseSettings = props => {
30695
+ const {
30696
+ center,
30697
+ radius,
30698
+ angle,
30699
+ color,
30700
+ fillStyle,
30701
+ strokeStyle,
30702
+ expanded,
30703
+ onToggle,
30704
+ onChangeProps,
30705
+ onRemove
30706
+ } = props;
30707
+ const ids = wonderBlocksCore.useUniqueIdWithMock();
30708
+ const strokeSelectId = ids.get("stroke-style-select");
30709
+ const fillSelectId = ids.get("fill-style-select");
30710
+ function handleColorChange(newValue) {
30711
+ onChangeProps({
30712
+ color: newValue
30713
+ });
30714
+ }
30715
+ return /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsAccordion, {
30716
+ expanded: expanded,
30717
+ onToggle: onToggle,
30718
+ header:
30719
+ /*#__PURE__*/
30720
+ // Summary: Ellipse, center, radius, color (opacity, dashed)
30721
+ React__namespace.createElement(wonderBlocksCore.View, {
30722
+ style: styles$j.row
30723
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Ellipse (${center[0]}, ${center[1]}), radius ${radius[0]}, ${radius[1]}`), /*#__PURE__*/React__namespace.createElement(Strut, {
30724
+ size: wonderBlocksTokens.spacing.xSmall_8
30725
+ }), /*#__PURE__*/React__namespace.createElement(EllipseSwatch, {
30726
+ color: props.color,
30727
+ fillStyle: fillStyle,
30728
+ strokeStyle: strokeStyle
30729
+ }))
30730
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30731
+ style: styles$j.row
30732
+ }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30733
+ coord: center,
30734
+ onChange: newCoords => onChangeProps({
30735
+ center: newCoords
30736
+ })
30737
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30738
+ style: styles$j.spaceUnder
30739
+ }, /*#__PURE__*/React__namespace.createElement(InfoTip$c, null, "The coordinates for the center of the ellipse."))), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30740
+ coord: radius,
30741
+ labels: ["x radius", "y radius"],
30742
+ onChange: newCoords => onChangeProps({
30743
+ radius: newCoords
30744
+ })
30745
+ }), /*#__PURE__*/React__namespace.createElement(AngleInput, {
30746
+ angle: angle,
30747
+ onChange: newAngle => onChangeProps({
30748
+ angle: newAngle
30749
+ })
30750
+ }), /*#__PURE__*/React__namespace.createElement(Strut, {
30751
+ size: wonderBlocksTokens.spacing.xSmall_8
30752
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30753
+ style: [styles$j.row, styles$j.spaceUnder]
30754
+ }, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30755
+ selectedValue: color,
30756
+ onChange: handleColorChange
30757
+ }), /*#__PURE__*/React__namespace.createElement(Strut, {
30758
+ size: wonderBlocksTokens.spacing.medium_16
30759
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30760
+ tag: "label",
30761
+ htmlFor: fillSelectId,
30762
+ style: styles$j.label
30763
+ }, "fill"), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
30764
+ id: fillSelectId,
30765
+ selectedValue: fillStyle,
30766
+ onChange: value => onChangeProps({
30767
+ fillStyle: value
30768
+ })
30769
+ // Placeholder is required, but never gets used.
30770
+ ,
30771
+ placeholder: ""
30772
+ }, Object.keys(perseus.lockedEllipseFillStyles).map(option => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
30773
+ key: option,
30774
+ value: option,
30775
+ label: option
30776
+ }, option)))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30777
+ style: styles$j.row
30778
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30779
+ tag: "label",
30780
+ htmlFor: strokeSelectId,
30781
+ style: styles$j.label
30782
+ }, "stroke"), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
30783
+ id: strokeSelectId,
30784
+ selectedValue: strokeStyle,
30785
+ onChange: value => onChangeProps({
30786
+ strokeStyle: value
30787
+ })
30788
+ // Placeholder is required, but never gets used.
30789
+ ,
30790
+ placeholder: ""
30791
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
30792
+ value: "solid",
30793
+ label: "solid"
30794
+ }, "solid"), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
30795
+ value: "dashed",
30796
+ label: "dashed"
30797
+ }, "dashed"))), /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsActions, {
30798
+ onRemove: onRemove,
30799
+ figureAriaLabel: `locked ellipse at ${center[0]}, ${center[1]}`
30800
+ }));
30801
+ };
30802
+ const styles$j = aphrodite.StyleSheet.create({
30803
+ row: {
30804
+ flexDirection: "row",
30805
+ alignItems: "center"
30806
+ },
30807
+ label: {
30808
+ marginInlineEnd: wonderBlocksTokens.spacing.xxSmall_6
30809
+ },
30810
+ spaceUnder: {
30811
+ marginBottom: wonderBlocksTokens.spacing.xSmall_8
30812
+ }
30813
+ });
30814
+
30815
+ const LabeledSwitch = props => {
30816
+ const {
30817
+ checked,
30818
+ label,
30819
+ style,
30820
+ onChange
30821
+ } = props;
30822
+ const ids = wonderBlocksCore.useUniqueIdWithMock();
30823
+ const switchId = ids.get("switch");
30824
+ return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30825
+ style: [styles$i.row, style]
30826
+ }, /*#__PURE__*/React__namespace.createElement(Switch__default["default"], {
30827
+ id: switchId,
30828
+ checked: checked,
30829
+ onChange: onChange
30830
+ }), /*#__PURE__*/React__namespace.createElement(Strut, {
30831
+ size: wonderBlocksTokens.spacing.xSmall_8
30832
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30833
+ tag: "label",
30834
+ htmlFor: switchId
30835
+ }, label));
30836
+ };
30837
+ const styles$i = aphrodite.StyleSheet.create({
30838
+ row: {
30839
+ flexDirection: "row",
30840
+ alignItems: "center"
30841
+ }
30842
+ });
30843
+
30577
30844
  /**
30578
30845
  * DefiningPointSettings is a component that allows the user to edit the
30579
30846
  * settings of a point that defines a locked figure (ex. line) on the graph.
@@ -30615,7 +30882,11 @@ const DefiningPointSettings = props => {
30615
30882
  }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30616
30883
  coord: coord,
30617
30884
  error: !!error,
30618
- onChangeProps: onChangeProps
30885
+ onChange: newCoords => {
30886
+ onChangeProps({
30887
+ coord: newCoords
30888
+ });
30889
+ }
30619
30890
  }), onTogglePoint && /*#__PURE__*/React__namespace.createElement(LabeledSwitch, {
30620
30891
  label: "show point on graph",
30621
30892
  checked: !!showPoint,
@@ -30682,39 +30953,6 @@ const styles$g = aphrodite.StyleSheet.create({
30682
30953
  }
30683
30954
  });
30684
30955
 
30685
- /**
30686
- * The part of a locked figure settings panel that contains actions
30687
- * for this panel and its associated locked figure, including
30688
- * the delete button.
30689
- */
30690
- const LockedFigureSettingsActions = props => {
30691
- const {
30692
- onRemove,
30693
- figureAriaLabel
30694
- } = props;
30695
- return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30696
- style: styles$f.container
30697
- }, /*#__PURE__*/React__namespace.createElement(Button__default["default"], {
30698
- startIcon: trashIcon__default["default"],
30699
- "aria-label": `Delete ${figureAriaLabel}`,
30700
- onClick: onRemove,
30701
- kind: "tertiary",
30702
- style: styles$f.deleteButton
30703
- }, "Delete"));
30704
- };
30705
- const styles$f = aphrodite.StyleSheet.create({
30706
- container: {
30707
- width: "100%",
30708
- flexDirection: "row",
30709
- alignItems: "center",
30710
- marginTop: wonderBlocksTokens.spacing.xxxSmall_4
30711
- },
30712
- deleteButton: {
30713
- // Line up the delete icon with the rest of the content.
30714
- marginInlineStart: -wonderBlocksTokens.spacing.xxxSmall_4
30715
- }
30716
- });
30717
-
30718
30956
  const lengthZeroStr = "The line cannot have length 0.";
30719
30957
  const LockedLineSettings = props => {
30720
30958
  const {
@@ -30767,7 +31005,7 @@ const LockedLineSettings = props => {
30767
31005
  expanded: props.expanded,
30768
31006
  onToggle: props.onToggle,
30769
31007
  header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30770
- style: styles$e.row
31008
+ style: styles$f.row
30771
31009
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, lineLabel), /*#__PURE__*/React__namespace.createElement(Strut, {
30772
31010
  size: wonderBlocksTokens.spacing.xSmall_8
30773
31011
  }), /*#__PURE__*/React__namespace.createElement(LineSwatch, {
@@ -30775,10 +31013,10 @@ const LockedLineSettings = props => {
30775
31013
  lineStyle: lineStyle
30776
31014
  }))
30777
31015
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30778
- style: [styles$e.row, styles$e.spaceUnder]
31016
+ style: [styles$f.row, styles$f.spaceUnder]
30779
31017
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30780
31018
  htmlFor: kindSelectId,
30781
- style: styles$e.label,
31019
+ style: styles$f.label,
30782
31020
  tag: "label"
30783
31021
  }, "kind"), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
30784
31022
  id: kindSelectId,
@@ -30799,17 +31037,17 @@ const LockedLineSettings = props => {
30799
31037
  value: "segment",
30800
31038
  label: "segment"
30801
31039
  }))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30802
- style: [styles$e.row, styles$e.spaceUnder]
31040
+ style: [styles$f.row, styles$f.spaceUnder]
30803
31041
  }, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30804
31042
  selectedValue: lineColor,
30805
31043
  onChange: handleColorChange
30806
31044
  }), /*#__PURE__*/React__namespace.createElement(Strut, {
30807
31045
  size: wonderBlocksTokens.spacing.small_12
30808
31046
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30809
- style: styles$e.row
31047
+ style: styles$f.row
30810
31048
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30811
31049
  htmlFor: styleSelectId,
30812
- style: styles$e.label,
31050
+ style: styles$f.label,
30813
31051
  tag: "label"
30814
31052
  }, "style"), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
30815
31053
  id: styleSelectId,
@@ -30820,7 +31058,7 @@ const LockedLineSettings = props => {
30820
31058
  // Placeholder is required, but never gets used.
30821
31059
  ,
30822
31060
  placeholder: "",
30823
- style: styles$e.selectMarginOffset
31061
+ style: styles$f.selectMarginOffset
30824
31062
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
30825
31063
  value: "solid",
30826
31064
  label: "solid"
@@ -30828,7 +31066,7 @@ const LockedLineSettings = props => {
30828
31066
  value: "dashed",
30829
31067
  label: "dashed"
30830
31068
  })))), isInvalid && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30831
- style: styles$e.errorText
31069
+ style: styles$f.errorText
30832
31070
  }, lengthZeroStr), /*#__PURE__*/React__namespace.createElement(DefiningPointSettings, _extends({
30833
31071
  label: "Point 1",
30834
31072
  showPoint: showPoint1,
@@ -30854,7 +31092,7 @@ const LockedLineSettings = props => {
30854
31092
  ${point2.coord[0]}, ${point2.coord[1]}.`
30855
31093
  }));
30856
31094
  };
30857
- const styles$e = aphrodite.StyleSheet.create({
31095
+ const styles$f = aphrodite.StyleSheet.create({
30858
31096
  row: {
30859
31097
  flexDirection: "row",
30860
31098
  alignItems: "center"
@@ -30900,7 +31138,7 @@ const LockedPointSettings = props => {
30900
31138
  /*#__PURE__*/
30901
31139
  // Summary: Point, coords, color (filled/open)
30902
31140
  React__namespace.createElement(wonderBlocksCore.View, {
30903
- style: styles$d.row
31141
+ style: styles$e.row
30904
31142
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Point (${coord[0]}, ${coord[1]})`), /*#__PURE__*/React__namespace.createElement(Strut, {
30905
31143
  size: wonderBlocksTokens.spacing.xSmall_8
30906
31144
  }), /*#__PURE__*/React__namespace.createElement(ColorSwatch, {
@@ -30909,11 +31147,15 @@ const LockedPointSettings = props => {
30909
31147
  }))
30910
31148
  }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30911
31149
  coord: coord,
30912
- onChangeProps: onChangeProps
31150
+ onChange: newCoord => {
31151
+ onChangeProps({
31152
+ coord: newCoord
31153
+ });
31154
+ }
30913
31155
  }), /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30914
31156
  selectedValue: pointColor,
30915
31157
  onChange: handleColorChange,
30916
- style: styles$d.spaceUnder
31158
+ style: styles$e.spaceUnder
30917
31159
  }), /*#__PURE__*/React__namespace.createElement(LabeledSwitch, {
30918
31160
  label: "open point",
30919
31161
  checked: !filled,
@@ -30927,7 +31169,7 @@ const LockedPointSettings = props => {
30927
31169
  figureAriaLabel: `locked point at ${coord[0]}, ${coord[1]}`
30928
31170
  }));
30929
31171
  };
30930
- const styles$d = aphrodite.StyleSheet.create({
31172
+ const styles$e = aphrodite.StyleSheet.create({
30931
31173
  row: {
30932
31174
  flexDirection: "row",
30933
31175
  alignItems: "center"
@@ -30937,6 +31179,113 @@ const styles$d = aphrodite.StyleSheet.create({
30937
31179
  }
30938
31180
  });
30939
31181
 
31182
+ /**
31183
+ * LockedVectorSettings is a component that allows the user to edit the
31184
+ * settings of specifically a locked vector on the graph.
31185
+ *
31186
+ * Used in the interactive graph editor's locked figures section.
31187
+ */
31188
+ const lengthErrorMessage = "The vector cannot have length 0.";
31189
+ const LockedVectorSettings = props => {
31190
+ const {
31191
+ points,
31192
+ color: lineColor,
31193
+ onChangeProps,
31194
+ onRemove
31195
+ } = props;
31196
+ const [tail, tip] = points;
31197
+ const lineLabel = `Vector (${tail[0]}, ${tail[1]}), (${tip[0]}, ${tip[1]})`;
31198
+
31199
+ // Check if the line has length 0.
31200
+ const isInvalid = kmath.vector.equal(tail, tip);
31201
+ function handleChangePoint(newCoord, index) {
31202
+ if (typeof newCoord !== "undefined") {
31203
+ const newPoints = [...points];
31204
+ newPoints[index] = [...newCoord];
31205
+ onChangeProps({
31206
+ points: newPoints
31207
+ });
31208
+ }
31209
+ }
31210
+ function handleColorChange(newColor) {
31211
+ onChangeProps({
31212
+ color: newColor
31213
+ });
31214
+ }
31215
+ return /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsAccordion, {
31216
+ expanded: props.expanded,
31217
+ onToggle: props.onToggle,
31218
+ header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31219
+ style: styles$d.row
31220
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, lineLabel), /*#__PURE__*/React__namespace.createElement(Strut, {
31221
+ size: wonderBlocksTokens.spacing.xSmall_8
31222
+ }), /*#__PURE__*/React__namespace.createElement(LineSwatch, {
31223
+ color: lineColor,
31224
+ lineStyle: "solid"
31225
+ }))
31226
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31227
+ style: [styles$d.row, styles$d.spaceUnder]
31228
+ }, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
31229
+ selectedValue: lineColor,
31230
+ onChange: handleColorChange
31231
+ })), isInvalid && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
31232
+ style: styles$d.errorText
31233
+ }, lengthErrorMessage), /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsAccordion, {
31234
+ expanded: true // Initial state is expanded
31235
+ ,
31236
+ containerStyle: styles$d.container,
31237
+ panelStyle: styles$d.accordionPanel,
31238
+ header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31239
+ style: styles$d.row
31240
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Tail (${tail[0]}, ${tail[1]})`))
31241
+ }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
31242
+ coord: tail,
31243
+ error: isInvalid,
31244
+ onChange: newProps => {
31245
+ handleChangePoint(newProps, 0);
31246
+ }
31247
+ })), /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsAccordion, {
31248
+ expanded: true // Initial state is expanded
31249
+ ,
31250
+ containerStyle: styles$d.container,
31251
+ panelStyle: styles$d.accordionPanel,
31252
+ header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31253
+ style: styles$d.row
31254
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Tip (${tip[0]}, ${tip[1]})`))
31255
+ }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
31256
+ coord: tip,
31257
+ error: isInvalid,
31258
+ onChange: newProps => {
31259
+ handleChangePoint(newProps, 1);
31260
+ }
31261
+ })), /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsActions, {
31262
+ onRemove: onRemove,
31263
+ figureAriaLabel: `locked vector defined by starting point
31264
+ ${tail[0]}, ${tail[1]} and extending to
31265
+ ${tip[0]}, ${tip[1]}.`
31266
+ }));
31267
+ };
31268
+ const styles$d = aphrodite.StyleSheet.create({
31269
+ accordionPanel: {
31270
+ paddingBottom: wonderBlocksTokens.spacing.medium_16
31271
+ },
31272
+ container: {
31273
+ marginTop: wonderBlocksTokens.spacing.xSmall_8,
31274
+ marginBottom: 0,
31275
+ marginLeft: -wonderBlocksTokens.spacing.xxxSmall_4,
31276
+ marginRight: -wonderBlocksTokens.spacing.xxxSmall_4,
31277
+ backgroundColor: wonderBlocksTokens.color.white
31278
+ },
31279
+ errorText: {
31280
+ color: wonderBlocksTokens.color.red,
31281
+ marginTop: wonderBlocksTokens.spacing.xSmall_8
31282
+ },
31283
+ row: {
31284
+ flexDirection: "row",
31285
+ alignItems: "center"
31286
+ }
31287
+ });
31288
+
30940
31289
  /**
30941
31290
  * LockedFigureSettings takes in a figure and renders the
30942
31291
  * respective settings for that figure type.
@@ -30952,6 +31301,16 @@ const LockedFigureSettings = props => {
30952
31301
  return /*#__PURE__*/React__namespace.createElement(LockedPointSettings, props);
30953
31302
  case "line":
30954
31303
  return /*#__PURE__*/React__namespace.createElement(LockedLineSettings, props);
31304
+ case "ellipse":
31305
+ if (props.showM2Features) {
31306
+ return /*#__PURE__*/React__namespace.createElement(LockedEllipseSettings, props);
31307
+ }
31308
+ break;
31309
+ case "vector":
31310
+ if (props.showM2Features) {
31311
+ return /*#__PURE__*/React__namespace.createElement(LockedVectorSettings, props);
31312
+ }
31313
+ break;
30955
31314
  }
30956
31315
  return null;
30957
31316
  };
@@ -31019,15 +31378,22 @@ function getDefaultFigureForType(type) {
31019
31378
  showPoint1: false,
31020
31379
  showPoint2: false
31021
31380
  };
31022
- case "circle":
31381
+ case "ellipse":
31023
31382
  return {
31024
- type: "circle",
31383
+ type: "ellipse",
31025
31384
  center: [0, 0],
31026
- radius: 1,
31385
+ radius: [1, 1],
31386
+ angle: 0,
31027
31387
  color: DEFAULT_COLOR,
31028
31388
  fillStyle: "none",
31029
31389
  strokeStyle: "solid"
31030
31390
  };
31391
+ case "vector":
31392
+ return {
31393
+ type: "vector",
31394
+ points: [[0, 0], [2, 2]],
31395
+ color: DEFAULT_COLOR
31396
+ };
31031
31397
  default:
31032
31398
  throw new wonderStuffCore.UnreachableCaseError(type);
31033
31399
  }
@@ -31085,21 +31451,15 @@ const LockedFiguresSection = props => {
31085
31451
  const buttonLabel = allCollapsed ? "Expand all" : "Collapse all";
31086
31452
  const showExpandButton = !!figures?.length;
31087
31453
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, figures?.map((figure, index) => {
31088
- if (figure.type === "circle") {
31089
- // TODO(LEMS-1941): Implement circle locked figure settings.
31090
- // Remove this block once circle locked figure settings are
31091
- // implemented.
31092
- return;
31093
- }
31094
31454
  return /*#__PURE__*/React__namespace.createElement(LockedFigureSettings, _extends({
31455
+ key: `${uniqueId}-locked-${figure}-${index}`,
31095
31456
  showM2Features: props.showM2Features,
31096
31457
  expanded: expandedStates[index],
31097
31458
  onToggle: newValue => {
31098
31459
  const newExpanded = [...expandedStates];
31099
31460
  newExpanded[index] = newValue;
31100
31461
  setExpandedStates(newExpanded);
31101
- },
31102
- key: `${uniqueId}-locked-${figure}-${index}`
31462
+ }
31103
31463
  }, figure, {
31104
31464
  onChangeProps: newProps => changeProps(index, newProps),
31105
31465
  onRemove: () => removeLockedFigure(index)
@@ -31107,6 +31467,7 @@ const LockedFiguresSection = props => {
31107
31467
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31108
31468
  style: styles$c.buttonContainer
31109
31469
  }, /*#__PURE__*/React__namespace.createElement(LockedFigureSelect, {
31470
+ showM2Features: props.showM2Features,
31110
31471
  id: `${uniqueId}-select`,
31111
31472
  onChange: addLockedFigure
31112
31473
  }), /*#__PURE__*/React__namespace.createElement(Strut, {
@@ -31468,7 +31829,7 @@ class InteractiveGraphEditor extends React__namespace.Component {
31468
31829
  }, equationString), /*#__PURE__*/React__namespace.createElement(InfoTip$b, null, /*#__PURE__*/React__namespace.createElement("p", null, "Graph the correct answer in the graph below and ensure the equation or point coordinates displayed represent the correct answer."))), graph,
31469
31830
  // Only show the "Add locked figure" dropdown if the graph
31470
31831
  // is using Mafs.
31471
- this.props.graph && this.props.apiOptions?.flags?.mafs?.["interactive-graph-locked-features-m1"] && this.props.apiOptions?.flags?.mafs?.[this.props.graph.type] && /*#__PURE__*/React__namespace.createElement(LockedFiguresSection, {
31832
+ this.props.graph && this.props.apiOptions?.flags?.mafs?.[this.props.graph.type] && /*#__PURE__*/React__namespace.createElement(LockedFiguresSection, {
31472
31833
  showM2Features: this.props.apiOptions?.flags?.mafs?.["interactive-graph-locked-features-m2"],
31473
31834
  figures: this.props.lockedFigures,
31474
31835
  onChange: this.props.onChange