@khanacademy/perseus-editor 11.0.2 → 11.2.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
@@ -83,7 +83,7 @@ var arrowCounterClockwise__default = /*#__PURE__*/_interopDefaultLegacy(arrowCou
83
83
 
84
84
  // This file is processed by a Rollup plugin (replace) to inject the production
85
85
  const libName = "@khanacademy/perseus-editor";
86
- const libVersion = "11.0.2";
86
+ const libVersion = "11.2.0";
87
87
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
88
88
 
89
89
  function _extends() {
@@ -278,13 +278,13 @@ class SectionControlButton extends React__namespace.Component {
278
278
  role: "button",
279
279
  hideDefaultFocusRing: true,
280
280
  "aria-label": title,
281
- style: styles$I.button
281
+ style: styles$L.button
282
282
  }, _ref => {
283
283
  return /*#__PURE__*/React__namespace.createElement(InlineIcon$a, icon);
284
284
  });
285
285
  }
286
286
  }
287
- const styles$I = aphrodite.StyleSheet.create({
287
+ const styles$L = aphrodite.StyleSheet.create({
288
288
  button: {
289
289
  backgroundColor: wonderBlocksTokens.color.gold,
290
290
  margin: 2,
@@ -20789,13 +20789,13 @@ class WidgetSelect extends React__namespace.Component {
20789
20789
  * that collapse a region.
20790
20790
  */
20791
20791
  function ToggleableCaret(props) {
20792
- const iconStyle = props.isExpanded ? styles$H.expanded : styles$H.collapsed;
20792
+ const iconStyle = props.isExpanded ? styles$K.expanded : styles$K.collapsed;
20793
20793
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksIcon.PhosphorIcon, {
20794
20794
  icon: caretRight__default["default"],
20795
20795
  style: iconStyle
20796
20796
  });
20797
20797
  }
20798
- const styles$H = aphrodite.StyleSheet.create({
20798
+ const styles$K = aphrodite.StyleSheet.create({
20799
20799
  collapsed: {
20800
20800
  transition: ".15s"
20801
20801
  },
@@ -20825,16 +20825,16 @@ class TexErrorView extends React__namespace.Component {
20825
20825
  showErrors
20826
20826
  } = this.state;
20827
20827
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20828
- style: styles$G.errorContainer
20828
+ style: styles$J.errorContainer
20829
20829
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20830
- style: styles$G.title,
20830
+ style: styles$J.title,
20831
20831
  onClick: this.handleToggleTexErrors
20832
20832
  }, /*#__PURE__*/React__namespace.createElement(ToggleableCaret, {
20833
20833
  isExpanded: showErrors
20834
20834
  }), "\xA0 TeX Errors (", errorList.length, ")"), showErrors && /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20835
- style: styles$G.errorExplanation
20835
+ style: styles$J.errorExplanation
20836
20836
  }, "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, {
20837
- style: styles$G.error,
20837
+ style: styles$J.error,
20838
20838
  key: index
20839
20839
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
20840
20840
  style: {
@@ -20843,7 +20843,7 @@ class TexErrorView extends React__namespace.Component {
20843
20843
  }, e.math), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, e.message))));
20844
20844
  }
20845
20845
  }
20846
- const styles$G = aphrodite.StyleSheet.create({
20846
+ const styles$J = aphrodite.StyleSheet.create({
20847
20847
  title: {
20848
20848
  backgroundColor: "#eee",
20849
20849
  fontSize: "1.25em",
@@ -24593,12 +24593,12 @@ class SimpleButton extends React__namespace.Component {
24593
24593
  ...otherProps
24594
24594
  } = this.props;
24595
24595
  return /*#__PURE__*/React__namespace.createElement("div", _extends({
24596
- className: aphrodite.css(styles$F.baseButton, color === "green" && styles$F.green, color === "orange" && styles$F.orange),
24596
+ className: aphrodite.css(styles$I.baseButton, color === "green" && styles$I.green, color === "orange" && styles$I.orange),
24597
24597
  onClick: onClick
24598
24598
  }, otherProps), children);
24599
24599
  }
24600
24600
  }
24601
- const styles$F = aphrodite.StyleSheet.create({
24601
+ const styles$I = aphrodite.StyleSheet.create({
24602
24602
  baseButton: {
24603
24603
  top: "0",
24604
24604
  fontSize: "11px",
@@ -24811,23 +24811,23 @@ const LeafContainer = _ref2 => {
24811
24811
  } = _ref2;
24812
24812
  const hasPreviewHeading = shape.type === "content" || shape.type === "hint";
24813
24813
  const previewHeading = hasPreviewHeading && /*#__PURE__*/React__namespace.createElement("div", {
24814
- className: aphrodite.css(styles$E.containerHeader)
24814
+ className: aphrodite.css(styles$H.containerHeader)
24815
24815
  }, /*#__PURE__*/React__namespace.createElement(Header, {
24816
24816
  depth: path.length,
24817
- className: aphrodite.css(styles$E.containerTitle)
24817
+ className: aphrodite.css(styles$H.containerTitle)
24818
24818
  }, capitalize(name)));
24819
24819
  return /*#__PURE__*/React__namespace.createElement("div", {
24820
- className: aphrodite.css(styles$E.container)
24820
+ className: aphrodite.css(styles$H.container)
24821
24821
  }, /*#__PURE__*/React__namespace.createElement("span", {
24822
- className: aphrodite.css(styles$E.row, styles$E.rowHeading)
24822
+ className: aphrodite.css(styles$H.row, styles$H.rowHeading)
24823
24823
  }, /*#__PURE__*/React__namespace.createElement("div", {
24824
- className: aphrodite.css(styles$E.columnLeft)
24824
+ className: aphrodite.css(styles$H.columnLeft)
24825
24825
  }, /*#__PURE__*/React__namespace.createElement("div", {
24826
- className: "pod-title " + aphrodite.css(styles$E.containerHeader)
24826
+ className: "pod-title " + aphrodite.css(styles$H.containerHeader)
24827
24827
  }, /*#__PURE__*/React__namespace.createElement("div", {
24828
- className: aphrodite.css(styles$E.containerTitle)
24828
+ className: aphrodite.css(styles$H.containerTitle)
24829
24829
  }, capitalize(name)), controls)), /*#__PURE__*/React__namespace.createElement("div", {
24830
- className: aphrodite.css(styles$E.columnRight)
24830
+ className: aphrodite.css(styles$H.columnRight)
24831
24831
  }, previewHeading)), children);
24832
24832
  };
24833
24833
  const ArrayContainer = props => {
@@ -24840,11 +24840,11 @@ const ArrayContainer = props => {
24840
24840
  actions
24841
24841
  } = props;
24842
24842
  return /*#__PURE__*/React__namespace.createElement("div", {
24843
- className: aphrodite.css(styles$E.container)
24843
+ className: aphrodite.css(styles$H.container)
24844
24844
  }, controls && /*#__PURE__*/React__namespace.createElement("div", {
24845
- className: aphrodite.css(styles$E.columnLeft, styles$E.containerHeader)
24845
+ className: aphrodite.css(styles$H.columnLeft, styles$H.containerHeader)
24846
24846
  }, controls), /*#__PURE__*/React__namespace.createElement("div", null, children), /*#__PURE__*/React__namespace.createElement("div", {
24847
- className: aphrodite.css(styles$E.columnLeft)
24847
+ className: aphrodite.css(styles$H.columnLeft)
24848
24848
  }, /*#__PURE__*/React__namespace.createElement("a", {
24849
24849
  href: "javascript:void 0",
24850
24850
  onClick: () => actions.addArrayElement(path, shape.elementShape)
@@ -24858,28 +24858,28 @@ const ObjectContainer = _ref3 => {
24858
24858
  path
24859
24859
  } = _ref3;
24860
24860
  const headingEditor = /*#__PURE__*/React__namespace.createElement("div", {
24861
- className: aphrodite.css(styles$E.containerHeader)
24861
+ className: aphrodite.css(styles$H.containerHeader)
24862
24862
  }, /*#__PURE__*/React__namespace.createElement(Header, {
24863
24863
  depth: path.length,
24864
- className: aphrodite.css(styles$E.containerTitle)
24864
+ className: aphrodite.css(styles$H.containerTitle)
24865
24865
  }, capitalize(name)), controls);
24866
24866
  const headingPreview = (name || controls) && /*#__PURE__*/React__namespace.createElement("div", {
24867
- className: aphrodite.css(styles$E.containerHeader, styles$E.previewCollectionHeader)
24867
+ className: aphrodite.css(styles$H.containerHeader, styles$H.previewCollectionHeader)
24868
24868
  }, /*#__PURE__*/React__namespace.createElement(Header, {
24869
24869
  depth: path.length,
24870
- className: aphrodite.css(styles$E.containerTitle)
24870
+ className: aphrodite.css(styles$H.containerTitle)
24871
24871
  }, capitalize(name)));
24872
24872
  const hasBothHeadings = headingEditor && headingPreview;
24873
24873
  return /*#__PURE__*/React__namespace.createElement("div", {
24874
- className: aphrodite.css(styles$E.container)
24874
+ className: aphrodite.css(styles$H.container)
24875
24875
  }, hasBothHeadings && /*#__PURE__*/React__namespace.createElement("span", {
24876
- className: aphrodite.css(styles$E.row)
24876
+ className: aphrodite.css(styles$H.row)
24877
24877
  }, /*#__PURE__*/React__namespace.createElement("div", {
24878
- className: aphrodite.css(styles$E.columnLeft)
24878
+ className: aphrodite.css(styles$H.columnLeft)
24879
24879
  }, headingEditor), /*#__PURE__*/React__namespace.createElement("div", {
24880
- className: aphrodite.css(styles$E.columnRight)
24880
+ className: aphrodite.css(styles$H.columnRight)
24881
24881
  }, headingPreview)), /*#__PURE__*/React__namespace.createElement("div", {
24882
- className: aphrodite.css(path.length > 0 && styles$E.contentIndent)
24882
+ className: aphrodite.css(path.length > 0 && styles$H.contentIndent)
24883
24883
  }, children));
24884
24884
  };
24885
24885
 
@@ -24999,11 +24999,11 @@ const ItemNodeContent = withStickiness(props => {
24999
24999
  className: "framework-perseus"
25000
25000
  }, lens(renderers).get(path));
25001
25001
  return /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement("div", {
25002
- className: aphrodite.css(styles$E.row)
25002
+ className: aphrodite.css(styles$H.row)
25003
25003
  }, /*#__PURE__*/React__namespace.createElement("div", {
25004
- className: aphrodite.css(styles$E.columnLeft)
25004
+ className: aphrodite.css(styles$H.columnLeft)
25005
25005
  }, /*#__PURE__*/React__namespace.createElement("div", {
25006
- className: aphrodite.css(sticky && styles$E.sticky)
25006
+ className: aphrodite.css(sticky && styles$H.sticky)
25007
25007
  },
25008
25008
  /*#__PURE__*/
25009
25009
  // @ts-expect-error - TS2769 - No overload matches this call.
@@ -25011,9 +25011,9 @@ const ItemNodeContent = withStickiness(props => {
25011
25011
  onChange: newVal => actions.mergeValueAtPath(path, newVal),
25012
25012
  apiOptions: apiOptions
25013
25013
  })))), /*#__PURE__*/React__namespace.createElement("div", {
25014
- className: aphrodite.css(styles$E.columnRight)
25014
+ className: aphrodite.css(styles$H.columnRight)
25015
25015
  }, /*#__PURE__*/React__namespace.createElement("div", {
25016
- className: aphrodite.css(sticky && styles$E.sticky)
25016
+ className: aphrodite.css(sticky && styles$H.sticky)
25017
25017
  }, preview))));
25018
25018
  });
25019
25019
  const HintNodeContent = withStickiness(props => {
@@ -25029,13 +25029,13 @@ const HintNodeContent = withStickiness(props => {
25029
25029
  className: "framework-perseus"
25030
25030
  }, lens(renderers).get(path));
25031
25031
  return /*#__PURE__*/React__namespace.createElement("div", {
25032
- className: aphrodite.css(styles$E.row)
25032
+ className: aphrodite.css(styles$H.row)
25033
25033
  }, /*#__PURE__*/React__namespace.createElement("div", {
25034
- className: aphrodite.css(styles$E.columnLeft)
25034
+ className: aphrodite.css(styles$H.columnLeft)
25035
25035
  }, /*#__PURE__*/React__namespace.createElement("div", {
25036
- className: aphrodite.css(sticky && styles$E.sticky)
25036
+ className: aphrodite.css(sticky && styles$H.sticky)
25037
25037
  }, /*#__PURE__*/React__namespace.createElement(HintEditor, _extends({}, data, {
25038
- className: aphrodite.css(styles$E.hintEditor),
25038
+ className: aphrodite.css(styles$H.hintEditor),
25039
25039
  onChange: newVal => actions.mergeValueAtPath(path, newVal),
25040
25040
  apiOptions: apiOptions,
25041
25041
  showTitle: false,
@@ -25050,9 +25050,9 @@ const HintNodeContent = withStickiness(props => {
25050
25050
  isFirst: true,
25051
25051
  isLast: true
25052
25052
  })))), /*#__PURE__*/React__namespace.createElement("div", {
25053
- className: aphrodite.css(styles$E.columnRight)
25053
+ className: aphrodite.css(styles$H.columnRight)
25054
25054
  }, /*#__PURE__*/React__namespace.createElement("div", {
25055
- className: aphrodite.css(sticky && styles$E.sticky)
25055
+ className: aphrodite.css(sticky && styles$H.sticky)
25056
25056
  }, preview)));
25057
25057
  });
25058
25058
  const TagsNodeContent = props => {
@@ -25069,9 +25069,9 @@ const TagsNodeContent = props => {
25069
25069
  return null;
25070
25070
  }
25071
25071
  return /*#__PURE__*/React__namespace.createElement("div", {
25072
- className: aphrodite.css(styles$E.columnLeft)
25072
+ className: aphrodite.css(styles$H.columnLeft)
25073
25073
  }, /*#__PURE__*/React__namespace.createElement("div", {
25074
- className: aphrodite.css(styles$E.tagsEditor)
25074
+ className: aphrodite.css(styles$H.tagsEditor)
25075
25075
  }, /*#__PURE__*/React__namespace.createElement(GroupMetadataEditor, {
25076
25076
  value: data,
25077
25077
  onChange: newVal => actions.setValueAtPath(path, newVal),
@@ -25102,23 +25102,23 @@ const ArrayNodeContent = props => {
25102
25102
  const subpath = path.concat(i);
25103
25103
  const controls = [i > 0 && /*#__PURE__*/React__namespace.createElement("div", {
25104
25104
  key: "moveArrayElementUp",
25105
- className: aphrodite.css(styles$E.control)
25105
+ className: aphrodite.css(styles$H.control)
25106
25106
  }, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
25107
25107
  color: "orange",
25108
25108
  title: "Move up",
25109
25109
  onClick: () => actions.moveArrayElementUp(subpath)
25110
25110
  }, /*#__PURE__*/React__namespace.createElement("div", {
25111
- className: aphrodite.css(styles$E.verticalFlip)
25111
+ className: aphrodite.css(styles$H.verticalFlip)
25112
25112
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$5, iconChevronDown)))), i < data.length - 1 && /*#__PURE__*/React__namespace.createElement("div", {
25113
25113
  key: "moveArrayElementDown",
25114
- className: aphrodite.css(styles$E.control)
25114
+ className: aphrodite.css(styles$H.control)
25115
25115
  }, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
25116
25116
  color: "orange",
25117
25117
  title: "Move down",
25118
25118
  onClick: () => actions.moveArrayElementDown(subpath)
25119
25119
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$5, iconChevronDown))), /*#__PURE__*/React__namespace.createElement("div", {
25120
25120
  key: "removeArrayElement",
25121
- className: aphrodite.css(styles$E.control)
25121
+ className: aphrodite.css(styles$H.control)
25122
25122
  }, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
25123
25123
  color: "orange",
25124
25124
  title: "Delete",
@@ -25126,7 +25126,7 @@ const ArrayNodeContent = props => {
25126
25126
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$5, iconTrash$4)))];
25127
25127
  return /*#__PURE__*/React__namespace.createElement("div", {
25128
25128
  key: i,
25129
- className: aphrodite.css(styles$E.arrayElement, !elementIsLeaf && styles$E.arrayElementAndNotLeaf)
25129
+ className: aphrodite.css(styles$H.arrayElement, !elementIsLeaf && styles$H.arrayElementAndNotLeaf)
25130
25130
  }, /*#__PURE__*/React__namespace.createElement(NodeContainer, _extends({}, otherProps, {
25131
25131
  key: i,
25132
25132
  shape: shape.elementShape,
@@ -25152,7 +25152,7 @@ const ObjectNodeContent = props => {
25152
25152
  // made sense to the shape's author is the order in which we'll iterate :)
25153
25153
  const children = Object.keys(shape.shape).map(subkey => /*#__PURE__*/React__namespace.createElement("div", {
25154
25154
  key: subkey,
25155
- className: aphrodite.css(styles$E.objectElement)
25155
+ className: aphrodite.css(styles$H.objectElement)
25156
25156
  }, /*#__PURE__*/React__namespace.createElement(NodeContainer, _extends({}, otherProps, {
25157
25157
  shape: shape.shape[subkey],
25158
25158
  data: data[subkey],
@@ -25322,7 +25322,7 @@ class MultiRendererEditor extends React__namespace.Component {
25322
25322
  }, this._renderContent());
25323
25323
  }
25324
25324
  }
25325
- const styles$E = aphrodite.StyleSheet.create({
25325
+ const styles$H = aphrodite.StyleSheet.create({
25326
25326
  // This is used in a number of places throughout this file.
25327
25327
  container: {},
25328
25328
  // eslint-disable-next-line react-native/no-unused-styles
@@ -25821,7 +25821,7 @@ class CSProgramEditor extends React__namespace.Component {
25821
25821
 
25822
25822
  /* eslint-disable @khanacademy/ts-no-error-suppressions */
25823
25823
  const {
25824
- TextInput: TextInput$8
25824
+ TextInput: TextInput$9
25825
25825
  } = perseus.components;
25826
25826
  class DefinitionEditor extends React__namespace.Component {
25827
25827
  static propTypes = {
@@ -25855,7 +25855,7 @@ class DefinitionEditor extends React__namespace.Component {
25855
25855
  target: "_blank"
25856
25856
  }, "Definition style guide"), /*#__PURE__*/React__namespace.createElement("div", {
25857
25857
  className: "perseus-widget-row"
25858
- }, /*#__PURE__*/React__namespace.createElement("label", null, "Word to be defined:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$8, {
25858
+ }, /*#__PURE__*/React__namespace.createElement("label", null, "Word to be defined:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$9, {
25859
25859
  value: this.props.togglePrompt
25860
25860
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
25861
25861
  ,
@@ -26265,7 +26265,7 @@ class ExampleWidgetEditor extends React__namespace.Component {
26265
26265
 
26266
26266
  /* eslint-disable @khanacademy/ts-no-error-suppressions */
26267
26267
  const {
26268
- TextInput: TextInput$7
26268
+ TextInput: TextInput$8
26269
26269
  } = perseus.components;
26270
26270
  const defaultExplanationProps = {
26271
26271
  showPrompt: "Explain",
@@ -26302,14 +26302,14 @@ class ExplanationEditor extends React__namespace.Component {
26302
26302
  className: "perseus-widget-explanation-editor"
26303
26303
  }, /*#__PURE__*/React__namespace.createElement("div", {
26304
26304
  className: "perseus-widget-row"
26305
- }, /*#__PURE__*/React__namespace.createElement("label", null, "Prompt to show explanation:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$7, {
26305
+ }, /*#__PURE__*/React__namespace.createElement("label", null, "Prompt to show explanation:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$8, {
26306
26306
  value: this.props.showPrompt
26307
26307
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
26308
26308
  ,
26309
26309
  onChange: this.change("showPrompt")
26310
26310
  }))), /*#__PURE__*/React__namespace.createElement("div", {
26311
26311
  className: "perseus-widget-row"
26312
- }, /*#__PURE__*/React__namespace.createElement("label", null, "Prompt to hide explanation:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$7, {
26312
+ }, /*#__PURE__*/React__namespace.createElement("label", null, "Prompt to hide explanation:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$8, {
26313
26313
  value: this.props.hidePrompt
26314
26314
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
26315
26315
  ,
@@ -26515,7 +26515,8 @@ const SortableItem = createReactClass__default["default"]({
26515
26515
 
26516
26516
  const {
26517
26517
  InfoTip: InfoTip$i,
26518
- PropCheckBox: PropCheckBox$a
26518
+ PropCheckBox: PropCheckBox$a,
26519
+ TextInput: TextInput$7
26519
26520
  } = perseus.components;
26520
26521
 
26521
26522
  // types for iterables
@@ -26635,7 +26636,20 @@ class ExpressionEditor extends React__namespace.Component {
26635
26636
  className: "perseus-widget-expression-editor"
26636
26637
  }, /*#__PURE__*/React__namespace.createElement("h3", {
26637
26638
  className: "expression-editor-h3"
26638
- }, "Global Options"), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(PropCheckBox$a, {
26639
+ }, "Global Options"), /*#__PURE__*/React__namespace.createElement("div", {
26640
+ className: "perseus-widget-row"
26641
+ }, /*#__PURE__*/React__namespace.createElement("label", null, "Visible label:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$7, {
26642
+ value: this.props.visibleLabel,
26643
+ onChange: this.change("visibleLabel")
26644
+ })), /*#__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", {
26645
+ className: "perseus-widget-row"
26646
+ }, /*#__PURE__*/React__namespace.createElement("label", null, "Aria label:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$7, {
26647
+ value: this.props.ariaLabel,
26648
+ onChange: this.change("ariaLabel")
26649
+ })), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.createElement("p", null, "Label text that's read by screen readers. Highly recommend adding a label here to ensure your exercise is accessible. For more information on writting accessible labels, please see", " ", /*#__PURE__*/React__namespace.createElement("a", {
26650
+ href: "https://www.w3.org/WAI/tips/designing/#ensure-that-form-elements-include-clearly-associated-labels",
26651
+ target: "_blank"
26652
+ }, "this article.")))), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(PropCheckBox$a, {
26639
26653
  times: this.props.times,
26640
26654
  onChange: this.props.onChange,
26641
26655
  labelAlignment: "right",
@@ -26664,7 +26678,7 @@ class ExpressionEditor extends React__namespace.Component {
26664
26678
  // it's a little weird to serialize the react key, but saves some
26665
26679
  // effort reconstructing them when this item is loaded later.
26666
26680
  "key"];
26667
- const serializables = ["answerForms", "buttonSets", "functions", "times"];
26681
+ const serializables = ["answerForms", "buttonSets", "functions", "times", "visibleLabel", "ariaLabel"];
26668
26682
  const answerForms = this.props.answerForms.map(form => {
26669
26683
  return ___default["default"](form).pick(formSerializables);
26670
26684
  });
@@ -26943,10 +26957,10 @@ class GradedGroupEditor extends React__namespace.Component {
26943
26957
  }, /*#__PURE__*/React__namespace.createElement("div", {
26944
26958
  className: "perseus-widget-row"
26945
26959
  }, /*#__PURE__*/React__namespace.createElement("label", {
26946
- className: aphrodite.css(styles$D.title)
26960
+ className: aphrodite.css(styles$G.title)
26947
26961
  }, "Title:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$6, {
26948
26962
  value: this.props.title,
26949
- className: aphrodite.css(styles$D.input)
26963
+ className: aphrodite.css(styles$G.input)
26950
26964
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
26951
26965
  ,
26952
26966
  onChange: this.change("title")
@@ -26971,7 +26985,7 @@ class GradedGroupEditor extends React__namespace.Component {
26971
26985
  }, /*#__PURE__*/React__namespace.createElement(InlineIcon$3, iconPlus$1), " Add a hint"), this.props.hint && /*#__PURE__*/React__namespace.createElement("div", {
26972
26986
  className: "perseus-hint-editor"
26973
26987
  }, /*#__PURE__*/React__namespace.createElement("div", {
26974
- className: aphrodite.css(styles$D.hintsTitle)
26988
+ className: aphrodite.css(styles$G.hintsTitle)
26975
26989
  }, "Hint"), /*#__PURE__*/React__namespace.createElement(Editor, {
26976
26990
  ref: this.hintEditor,
26977
26991
  content: this.props.hint ? this.props.hint.content : "",
@@ -27003,7 +27017,7 @@ class GradedGroupEditor extends React__namespace.Component {
27003
27017
  };
27004
27018
  };
27005
27019
  }
27006
- const styles$D = aphrodite.StyleSheet.create({
27020
+ const styles$G = aphrodite.StyleSheet.create({
27007
27021
  title: {
27008
27022
  fontSize: 18,
27009
27023
  fontWeight: "bold"
@@ -28374,13 +28388,13 @@ function MathquillInput(props) {
28374
28388
  }
28375
28389
  });
28376
28390
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
28377
- style: styles$C.outerWrapper
28391
+ style: styles$F.outerWrapper
28378
28392
  }, /*#__PURE__*/React__namespace.createElement("span", {
28379
28393
  ref: mathFieldWrapperRef,
28380
28394
  className: "perseus-math-input mq-editable-field mq-math-mode"
28381
28395
  }));
28382
28396
  }
28383
- const styles$C = aphrodite.StyleSheet.create({
28397
+ const styles$F = aphrodite.StyleSheet.create({
28384
28398
  outerWrapper: {
28385
28399
  display: "inline-block",
28386
28400
  borderStyle: "solid",
@@ -29450,16 +29464,16 @@ const LabeledRow = props => {
29450
29464
  style
29451
29465
  } = props;
29452
29466
  return /*#__PURE__*/React__namespace.createElement("label", {
29453
- className: aphrodite.css(styles$B.label)
29467
+ className: aphrodite.css(styles$E.label)
29454
29468
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
29455
- style: [styles$B.row, style]
29469
+ style: [styles$E.row, style]
29456
29470
  }, labelSide === "start" || /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, {
29457
- style: styles$B.spaceEnd
29471
+ style: styles$E.spaceEnd
29458
29472
  }, label), children, labelSide === "end" && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, {
29459
- style: styles$B.spaceStart
29473
+ style: styles$E.spaceStart
29460
29474
  }, label)));
29461
29475
  };
29462
- const styles$B = aphrodite.StyleSheet.create({
29476
+ const styles$E = aphrodite.StyleSheet.create({
29463
29477
  label: {
29464
29478
  width: "fit-content"
29465
29479
  },
@@ -29536,11 +29550,11 @@ class Spring extends React__namespace.Component {
29536
29550
  } = this.props;
29537
29551
  return React__namespace.createElement(wonderBlocksCore.View, {
29538
29552
  "aria-hidden": "true",
29539
- style: [styles$A.grow, style]
29553
+ style: [styles$D.grow, style]
29540
29554
  });
29541
29555
  }
29542
29556
  }
29543
- const styles$A = aphrodite.StyleSheet.create({
29557
+ const styles$D = aphrodite.StyleSheet.create({
29544
29558
  grow: {
29545
29559
  flexGrow: 1
29546
29560
  }
@@ -29577,11 +29591,11 @@ function Heading(_ref) {
29577
29591
  onToggle
29578
29592
  } = _ref;
29579
29593
  return /*#__PURE__*/React__namespace.createElement(Clickable__default["default"], {
29580
- style: [styles$z.container, !isCollapsible && styles$z.notClickable],
29594
+ style: [styles$C.container, !isCollapsible && styles$C.notClickable],
29581
29595
  disabled: !isCollapsible,
29582
29596
  onClick: () => isCollapsible && onToggle?.(!isOpen)
29583
29597
  }, () => /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
29584
- style: styles$z.heading
29598
+ style: styles$C.heading
29585
29599
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, {
29586
29600
  style: {
29587
29601
  fontSize: 14,
@@ -29591,7 +29605,7 @@ function Heading(_ref) {
29591
29605
  isExpanded: isOpen
29592
29606
  })));
29593
29607
  }
29594
- const styles$z = aphrodite.StyleSheet.create({
29608
+ const styles$C = aphrodite.StyleSheet.create({
29595
29609
  container: {
29596
29610
  marginTop: wonderBlocksTokens.spacing.small_12,
29597
29611
  // NOTE(jeremy): This is the inverse of the @editorPadding CSS
@@ -29739,10 +29753,57 @@ function getDefaultGraphStartCoords(graph, range, step) {
29739
29753
  ...graph,
29740
29754
  startCoords: undefined
29741
29755
  }, range, step);
29756
+ case "circle":
29757
+ const startCoords = perseus.getCircleCoords({
29758
+ ...graph,
29759
+ startCoords: undefined
29760
+ });
29761
+ const radius = kmath.vector.length(kmath.vector.subtract(startCoords.radiusPoint, startCoords.center));
29762
+ return {
29763
+ center: startCoords.center,
29764
+ radius
29765
+ };
29766
+ case "sinusoid":
29767
+ return perseus.getSinusoidCoords({
29768
+ ...graph,
29769
+ startCoords: undefined
29770
+ }, range, step);
29771
+ case "quadratic":
29772
+ return perseus.getQuadraticCoords({
29773
+ ...graph,
29774
+ startCoords: undefined
29775
+ }, range, step);
29742
29776
  default:
29743
29777
  return undefined;
29744
29778
  }
29745
29779
  }
29780
+ const getSinusoidEquation = startCoords => {
29781
+ // Get coefficients
29782
+ // It's assumed that p1 is the root and p2 is the first peak
29783
+ const p1 = startCoords[0];
29784
+ const p2 = startCoords[1];
29785
+
29786
+ // Resulting coefficients are canonical for this sine curve
29787
+ const amplitude = p2[1] - p1[1];
29788
+ const angularFrequency = Math.PI / (2 * (p2[0] - p1[0]));
29789
+ const phase = p1[0] * angularFrequency;
29790
+ const verticalOffset = p1[1];
29791
+ return "y = " + amplitude.toFixed(3) + "sin(" + angularFrequency.toFixed(3) + "x - " + phase.toFixed(3) + ") + " + verticalOffset.toFixed(3);
29792
+ };
29793
+ const getQuadraticEquation = startCoords => {
29794
+ const p1 = startCoords[0];
29795
+ const p2 = startCoords[1];
29796
+ const p3 = startCoords[2];
29797
+ const denom = (p1[0] - p2[0]) * (p1[0] - p3[0]) * (p2[0] - p3[0]);
29798
+ if (denom === 0) {
29799
+ // Many of the callers assume that the return value is always defined.
29800
+ return "Division by zero error";
29801
+ }
29802
+ const a = (p3[0] * (p2[1] - p1[1]) + p2[0] * (p1[1] - p3[1]) + p1[0] * (p3[1] - p2[1])) / denom;
29803
+ const b = (p3[0] * p3[0] * (p1[1] - p2[1]) + p2[0] * p2[0] * (p3[1] - p1[1]) + p1[0] * p1[0] * (p2[1] - p3[1])) / denom;
29804
+ const c = (p2[0] * p3[0] * (p2[0] - p3[0]) * p1[1] + p3[0] * p1[0] * (p3[0] - p1[0]) * p2[1] + p1[0] * p2[0] * (p1[0] - p2[0]) * p3[1]) / denom;
29805
+ return "y = " + a.toFixed(3) + "x^2 + " + b.toFixed(3) + "x + " + c.toFixed(3);
29806
+ };
29746
29807
 
29747
29808
  /**
29748
29809
  * Dropdown for selecting a locked figure to add to an interactive graph.
@@ -29756,19 +29817,20 @@ const LockedFigureSelect = props => {
29756
29817
  id,
29757
29818
  onChange
29758
29819
  } = props;
29759
- const figureTypes = props.showM2Features ? ["point", "line", "vector", "ellipse", "polygon"] : ["point", "line"];
29820
+ const figureTypes = ["point", "line", "vector", "ellipse", "polygon"];
29821
+ const figureTypesCurrent = props.showM2bFeatures ? [...figureTypes, "function"] : figureTypes;
29760
29822
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
29761
- style: styles$y.container
29823
+ style: styles$B.container
29762
29824
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionMenu, {
29763
29825
  menuText: "Add locked figure",
29764
- style: styles$y.addElementSelect
29765
- }, figureTypes.map(figureType => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionItem, {
29826
+ style: styles$B.addElementSelect
29827
+ }, figureTypesCurrent.map(figureType => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionItem, {
29766
29828
  key: `${id}-${figureType}`,
29767
29829
  label: figureType,
29768
29830
  onClick: () => onChange(figureType)
29769
29831
  }))));
29770
29832
  };
29771
- const styles$y = aphrodite.StyleSheet.create({
29833
+ const styles$B = aphrodite.StyleSheet.create({
29772
29834
  container: {
29773
29835
  marginTop: wonderBlocksTokens.spacing.xSmall_8
29774
29836
  },
@@ -29799,19 +29861,19 @@ const AngleInput = props => {
29799
29861
  }
29800
29862
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
29801
29863
  tag: "label",
29802
- style: styles$x.row
29864
+ style: styles$A.row
29803
29865
  }, "angle (degrees)", /*#__PURE__*/React__namespace.createElement(Strut, {
29804
29866
  size: wonderBlocksTokens.spacing.xxSmall_6
29805
29867
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
29806
29868
  type: "number",
29807
29869
  value: angleInput,
29808
29870
  onChange: handleAngleChange,
29809
- style: styles$x.textField
29871
+ style: styles$A.textField
29810
29872
  }), /*#__PURE__*/React__namespace.createElement(Strut, {
29811
29873
  size: wonderBlocksTokens.spacing.xxSmall_6
29812
29874
  }));
29813
29875
  };
29814
- const styles$x = aphrodite.StyleSheet.create({
29876
+ const styles$A = aphrodite.StyleSheet.create({
29815
29877
  row: {
29816
29878
  display: "flex",
29817
29879
  flexDirection: "row",
@@ -29860,32 +29922,32 @@ const CoordinatePairInput = props => {
29860
29922
  onChange(newCoords);
29861
29923
  }
29862
29924
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
29863
- style: [styles$w.row, style]
29925
+ style: [styles$z.row, style]
29864
29926
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
29865
29927
  tag: "label",
29866
- style: styles$w.row
29928
+ style: styles$z.row
29867
29929
  }, labels ? labels[0] : "x coord", /*#__PURE__*/React__namespace.createElement(Strut, {
29868
29930
  size: wonderBlocksTokens.spacing.xxSmall_6
29869
29931
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
29870
29932
  type: "number",
29871
29933
  value: coordState[0],
29872
29934
  onChange: newValue => handleCoordChange(newValue, 0),
29873
- style: [styles$w.textField, error ? styles$w.errorField : undefined]
29935
+ style: [styles$z.textField, error ? styles$z.errorField : undefined]
29874
29936
  })), /*#__PURE__*/React__namespace.createElement(Strut, {
29875
29937
  size: wonderBlocksTokens.spacing.medium_16
29876
29938
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
29877
29939
  tag: "label",
29878
- style: styles$w.row
29940
+ style: styles$z.row
29879
29941
  }, labels ? labels[1] : "y coord", /*#__PURE__*/React__namespace.createElement(Strut, {
29880
29942
  size: wonderBlocksTokens.spacing.xxSmall_6
29881
29943
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
29882
29944
  type: "number",
29883
29945
  value: coordState[1],
29884
29946
  onChange: newValue => handleCoordChange(newValue, 1),
29885
- style: [styles$w.textField, error ? styles$w.errorField : undefined]
29947
+ style: [styles$z.textField, error ? styles$z.errorField : undefined]
29886
29948
  })));
29887
29949
  };
29888
- const styles$w = aphrodite.StyleSheet.create({
29950
+ const styles$z = aphrodite.StyleSheet.create({
29889
29951
  row: {
29890
29952
  display: "flex",
29891
29953
  flexDirection: "row",
@@ -29918,14 +29980,14 @@ const PerseusEditorAccordion = props => {
29918
29980
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksAccordion.AccordionSection, {
29919
29981
  expanded: expanded,
29920
29982
  onToggle: onToggle,
29921
- style: [styles$v.container, containerStyle],
29922
- headerStyle: styles$v.accordionHeader,
29983
+ style: [styles$y.container, containerStyle],
29984
+ headerStyle: styles$y.accordionHeader,
29923
29985
  header: header
29924
29986
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
29925
- style: [styles$v.accordionPanel, panelStyle]
29987
+ style: [styles$y.accordionPanel, panelStyle]
29926
29988
  }, children)));
29927
29989
  };
29928
- const styles$v = aphrodite.StyleSheet.create({
29990
+ const styles$y = aphrodite.StyleSheet.create({
29929
29991
  container: {
29930
29992
  backgroundColor: wonderBlocksTokens.color.fadedBlue8,
29931
29993
  marginTop: wonderBlocksTokens.spacing.xSmall_8
@@ -29956,13 +30018,13 @@ const ColorSwatch = props => {
29956
30018
  "aria-label":
29957
30019
  // Don't include an aria label for decorative circles.
29958
30020
  !decorative ? `${color}, ${filled ? "filled" : "open"}` : undefined,
29959
- style: [styles$u.colorSwatch, {
30021
+ style: [styles$x.colorSwatch, {
29960
30022
  border: `4px solid ${perseus.lockedFigureColors[color]}`,
29961
30023
  backgroundColor: filled ? perseus.lockedFigureColors[color] : wonderBlocksTokens.color.white
29962
30024
  }]
29963
30025
  });
29964
30026
  };
29965
- const styles$u = aphrodite.StyleSheet.create({
30027
+ const styles$x = aphrodite.StyleSheet.create({
29966
30028
  colorSwatch: {
29967
30029
  // Add a white outline so that the color swatch is visible when
29968
30030
  // the dropdown option is highlighted with its blue background.
@@ -29981,10 +30043,10 @@ const ColorSelect = props => {
29981
30043
  onChange
29982
30044
  } = props;
29983
30045
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
29984
- style: [styles$t.row, style]
30046
+ style: [styles$w.row, style]
29985
30047
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
29986
30048
  tag: "label",
29987
- style: styles$t.row
30049
+ style: styles$w.row
29988
30050
  }, "color", /*#__PURE__*/React__namespace.createElement(Strut, {
29989
30051
  size: wonderBlocksTokens.spacing.xxSmall_6
29990
30052
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
@@ -30003,7 +30065,7 @@ const ColorSelect = props => {
30003
30065
  })
30004
30066
  })))));
30005
30067
  };
30006
- const styles$t = aphrodite.StyleSheet.create({
30068
+ const styles$w = aphrodite.StyleSheet.create({
30007
30069
  row: {
30008
30070
  display: "flex",
30009
30071
  flexDirection: "row",
@@ -30019,17 +30081,17 @@ const EllipseSwatch = props => {
30019
30081
  } = props;
30020
30082
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30021
30083
  "aria-label": `${color}, stroke ${strokeStyle}, fill ${fillStyle}`,
30022
- style: [styles$s.container, {
30084
+ style: [styles$v.container, {
30023
30085
  border: `4px ${strokeStyle} ${perseus.lockedFigureColors[color]}`
30024
30086
  }]
30025
30087
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30026
- style: [styles$s.innerCircle, {
30088
+ style: [styles$v.innerCircle, {
30027
30089
  backgroundColor: perseus.lockedFigureColors[color],
30028
30090
  opacity: perseus.lockedFigureFillStyles[fillStyle]
30029
30091
  }]
30030
30092
  }));
30031
30093
  };
30032
- const styles$s = aphrodite.StyleSheet.create({
30094
+ const styles$v = aphrodite.StyleSheet.create({
30033
30095
  container: {
30034
30096
  // Add a white outline so that the color swatch is visible when
30035
30097
  // the dropdown option is highlighted with its blue background.
@@ -30060,40 +30122,40 @@ const LockedFigureSettingsActions = props => {
30060
30122
  onRemove
30061
30123
  } = props;
30062
30124
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30063
- style: styles$r.container
30125
+ style: styles$u.container
30064
30126
  }, /*#__PURE__*/React__namespace.createElement(Button__default["default"], {
30065
30127
  startIcon: trashIcon__default["default"],
30066
30128
  "aria-label": `Delete locked ${figureType}`,
30067
30129
  onClick: onRemove,
30068
30130
  kind: "tertiary",
30069
- style: styles$r.deleteButton
30070
- }, "Delete"), /*#__PURE__*/React__namespace.createElement(Spring, null), props.showM2Features && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
30131
+ style: styles$u.deleteButton
30132
+ }, "Delete"), /*#__PURE__*/React__namespace.createElement(Spring, null), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
30071
30133
  icon: caretDoubleUpIcon__default["default"],
30072
30134
  size: "small",
30073
30135
  "aria-label": `Move locked ${figureType} to the back`,
30074
30136
  onClick: () => onMove("back"),
30075
- style: styles$r.iconButton
30137
+ style: styles$u.iconButton
30076
30138
  }), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
30077
30139
  icon: caretUpIcon__default["default"],
30078
30140
  size: "small",
30079
30141
  "aria-label": `Move locked ${figureType} backward`,
30080
30142
  onClick: () => onMove("backward"),
30081
- style: styles$r.iconButton
30143
+ style: styles$u.iconButton
30082
30144
  }), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
30083
30145
  icon: caretDownIcon__default["default"],
30084
30146
  size: "small",
30085
30147
  "aria-label": `Move locked ${figureType} forward`,
30086
30148
  onClick: () => onMove("forward"),
30087
- style: styles$r.iconButton
30149
+ style: styles$u.iconButton
30088
30150
  }), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
30089
30151
  icon: caretDoubleDownIcon__default["default"],
30090
30152
  size: "small",
30091
30153
  "aria-label": `Move locked ${figureType} to the front`,
30092
30154
  onClick: () => onMove("front"),
30093
- style: styles$r.iconButton
30094
- })));
30155
+ style: styles$u.iconButton
30156
+ }));
30095
30157
  };
30096
- const styles$r = aphrodite.StyleSheet.create({
30158
+ const styles$u = aphrodite.StyleSheet.create({
30097
30159
  container: {
30098
30160
  width: "100%",
30099
30161
  flexDirection: "row",
@@ -30140,7 +30202,7 @@ const LockedEllipseSettings = props => {
30140
30202
  /*#__PURE__*/
30141
30203
  // Summary: Ellipse, center, radius, color (opacity, dashed)
30142
30204
  React__namespace.createElement(wonderBlocksCore.View, {
30143
- style: styles$q.row
30205
+ style: styles$t.row
30144
30206
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Ellipse (${center[0]}, ${center[1]}), radius ${radius[0]}, ${radius[1]}`), /*#__PURE__*/React__namespace.createElement(Strut, {
30145
30207
  size: wonderBlocksTokens.spacing.xSmall_8
30146
30208
  }), /*#__PURE__*/React__namespace.createElement(EllipseSwatch, {
@@ -30149,19 +30211,19 @@ const LockedEllipseSettings = props => {
30149
30211
  strokeStyle: strokeStyle
30150
30212
  }))
30151
30213
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30152
- style: styles$q.row
30214
+ style: styles$t.row
30153
30215
  }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30154
30216
  coord: center,
30155
- style: styles$q.spaceUnder,
30217
+ style: styles$t.spaceUnder,
30156
30218
  onChange: newCoords => onChangeProps({
30157
30219
  center: newCoords
30158
30220
  })
30159
30221
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30160
- style: styles$q.spaceUnder
30222
+ style: styles$t.spaceUnder
30161
30223
  }, /*#__PURE__*/React__namespace.createElement(InfoTip$d, null, "The coordinates for the center of the ellipse."))), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30162
30224
  coord: radius,
30163
30225
  labels: ["x radius", "y radius"],
30164
- style: styles$q.spaceUnder,
30226
+ style: styles$t.spaceUnder,
30165
30227
  onChange: newCoords => onChangeProps({
30166
30228
  radius: newCoords
30167
30229
  })
@@ -30173,7 +30235,7 @@ const LockedEllipseSettings = props => {
30173
30235
  }), /*#__PURE__*/React__namespace.createElement(Strut, {
30174
30236
  size: wonderBlocksTokens.spacing.xSmall_8
30175
30237
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30176
- style: [styles$q.row, styles$q.spaceUnder]
30238
+ style: [styles$t.row, styles$t.spaceUnder]
30177
30239
  }, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30178
30240
  selectedValue: color,
30179
30241
  onChange: handleColorChange
@@ -30181,7 +30243,7 @@ const LockedEllipseSettings = props => {
30181
30243
  size: wonderBlocksTokens.spacing.medium_16
30182
30244
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30183
30245
  tag: "label",
30184
- style: styles$q.row
30246
+ style: styles$t.row
30185
30247
  }, "fill", /*#__PURE__*/React__namespace.createElement(Strut, {
30186
30248
  size: wonderBlocksTokens.spacing.xxSmall_6
30187
30249
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
@@ -30198,7 +30260,7 @@ const LockedEllipseSettings = props => {
30198
30260
  label: option
30199
30261
  }))))), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30200
30262
  tag: "label",
30201
- style: styles$q.row
30263
+ style: styles$t.row
30202
30264
  }, "stroke", /*#__PURE__*/React__namespace.createElement(Strut, {
30203
30265
  size: wonderBlocksTokens.spacing.xxSmall_6
30204
30266
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
@@ -30216,13 +30278,12 @@ const LockedEllipseSettings = props => {
30216
30278
  value: "dashed",
30217
30279
  label: "dashed"
30218
30280
  }))), /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsActions, {
30219
- showM2Features: props.showM2Features,
30220
30281
  figureType: props.type,
30221
30282
  onMove: onMove,
30222
30283
  onRemove: onRemove
30223
30284
  }));
30224
30285
  };
30225
- const styles$q = aphrodite.StyleSheet.create({
30286
+ const styles$t = aphrodite.StyleSheet.create({
30226
30287
  row: {
30227
30288
  display: "flex",
30228
30289
  flexDirection: "row",
@@ -30243,7 +30304,7 @@ const LabeledSwitch = props => {
30243
30304
  const ids = wonderBlocksCore.useUniqueIdWithMock();
30244
30305
  const switchId = ids.get("switch");
30245
30306
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30246
- style: [styles$p.row, style]
30307
+ style: [styles$s.row, style]
30247
30308
  }, /*#__PURE__*/React__namespace.createElement(Switch__default["default"], {
30248
30309
  id: switchId,
30249
30310
  checked: checked,
@@ -30255,7 +30316,7 @@ const LabeledSwitch = props => {
30255
30316
  htmlFor: switchId
30256
30317
  }, label));
30257
30318
  };
30258
- const styles$p = aphrodite.StyleSheet.create({
30319
+ const styles$s = aphrodite.StyleSheet.create({
30259
30320
  row: {
30260
30321
  flexDirection: "row",
30261
30322
  alignItems: "center"
@@ -30289,13 +30350,13 @@ const DefiningPointSettings = props => {
30289
30350
  return /*#__PURE__*/React__namespace.createElement(PerseusEditorAccordion, {
30290
30351
  expanded: expanded,
30291
30352
  onToggle: onToggle,
30292
- containerStyle: styles$o.container,
30293
- panelStyle: styles$o.accordionPanel,
30353
+ containerStyle: styles$r.container,
30354
+ panelStyle: styles$r.accordionPanel,
30294
30355
  header:
30295
30356
  /*#__PURE__*/
30296
30357
  // Summary: Point, coords, color (filled/open)
30297
30358
  React__namespace.createElement(wonderBlocksCore.View, {
30298
- style: styles$o.row
30359
+ style: styles$r.row
30299
30360
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `${label || "Point"} (${coord[0]}, ${coord[1]})`), /*#__PURE__*/React__namespace.createElement(Strut, {
30300
30361
  size: wonderBlocksTokens.spacing.xSmall_8
30301
30362
  }), showPoint && /*#__PURE__*/React__namespace.createElement(ColorSwatch, {
@@ -30305,7 +30366,7 @@ const DefiningPointSettings = props => {
30305
30366
  }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30306
30367
  coord: coord,
30307
30368
  error: !!error,
30308
- style: styles$o.spaceUnder,
30369
+ style: styles$r.spaceUnder,
30309
30370
  onChange: newCoords => {
30310
30371
  onChangeProps({
30311
30372
  coord: newCoords
@@ -30314,12 +30375,12 @@ const DefiningPointSettings = props => {
30314
30375
  }), onTogglePoint && /*#__PURE__*/React__namespace.createElement(LabeledSwitch, {
30315
30376
  label: "show point on graph",
30316
30377
  checked: !!showPoint,
30317
- style: showPoint && styles$o.spaceUnder,
30378
+ style: showPoint && styles$r.spaceUnder,
30318
30379
  onChange: onTogglePoint
30319
30380
  }), showPoint && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30320
30381
  selectedValue: pointColor,
30321
30382
  onChange: handleColorChange,
30322
- style: styles$o.spaceUnder
30383
+ style: styles$r.spaceUnder
30323
30384
  }), /*#__PURE__*/React__namespace.createElement(LabeledSwitch, {
30324
30385
  label: "open point",
30325
30386
  checked: !filled,
@@ -30330,7 +30391,7 @@ const DefiningPointSettings = props => {
30330
30391
  }
30331
30392
  })));
30332
30393
  };
30333
- const styles$o = aphrodite.StyleSheet.create({
30394
+ const styles$r = aphrodite.StyleSheet.create({
30334
30395
  container: {
30335
30396
  marginTop: wonderBlocksTokens.spacing.xSmall_8,
30336
30397
  marginBottom: 0,
@@ -30357,15 +30418,15 @@ const LineSwatch = props => {
30357
30418
  lineStyle
30358
30419
  } = props;
30359
30420
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30360
- style: styles$n.container
30421
+ style: styles$q.container
30361
30422
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30362
30423
  "aria-label": `${color}, ${lineStyle}`,
30363
- style: [styles$n.lineSwatch, {
30424
+ style: [styles$q.lineSwatch, {
30364
30425
  border: `5px ${lineStyle} ${perseus.lockedFigureColors[color]}`
30365
30426
  }]
30366
30427
  }));
30367
30428
  };
30368
- const styles$n = aphrodite.StyleSheet.create({
30429
+ const styles$q = aphrodite.StyleSheet.create({
30369
30430
  container: {
30370
30431
  backgroundColor: wonderBlocksTokens.color.white,
30371
30432
  justifyContent: "center",
@@ -30424,7 +30485,7 @@ const LockedLineSettings = props => {
30424
30485
  expanded: props.expanded,
30425
30486
  onToggle: props.onToggle,
30426
30487
  header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30427
- style: styles$m.row
30488
+ style: styles$p.row
30428
30489
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, lineLabel), /*#__PURE__*/React__namespace.createElement(Strut, {
30429
30490
  size: wonderBlocksTokens.spacing.xSmall_8
30430
30491
  }), /*#__PURE__*/React__namespace.createElement(LineSwatch, {
@@ -30433,7 +30494,7 @@ const LockedLineSettings = props => {
30433
30494
  }))
30434
30495
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30435
30496
  tag: "label",
30436
- style: [styles$m.row, styles$m.spaceUnder]
30497
+ style: [styles$p.row, styles$p.spaceUnder]
30437
30498
  }, "kind", /*#__PURE__*/React__namespace.createElement(Strut, {
30438
30499
  size: wonderBlocksTokens.spacing.xxxSmall_4
30439
30500
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
@@ -30454,7 +30515,7 @@ const LockedLineSettings = props => {
30454
30515
  value: "segment",
30455
30516
  label: "segment"
30456
30517
  }))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30457
- style: styles$m.row
30518
+ style: styles$p.row
30458
30519
  }, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30459
30520
  selectedValue: lineColor,
30460
30521
  onChange: handleColorChange
@@ -30462,7 +30523,7 @@ const LockedLineSettings = props => {
30462
30523
  size: wonderBlocksTokens.spacing.small_12
30463
30524
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30464
30525
  tag: "label",
30465
- style: styles$m.row
30526
+ style: styles$p.row
30466
30527
  }, "style", /*#__PURE__*/React__namespace.createElement(Strut, {
30467
30528
  size: wonderBlocksTokens.spacing.xxxSmall_4
30468
30529
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
@@ -30473,7 +30534,7 @@ const LockedLineSettings = props => {
30473
30534
  // Placeholder is required, but never gets used.
30474
30535
  ,
30475
30536
  placeholder: "",
30476
- style: styles$m.selectMarginOffset
30537
+ style: styles$p.selectMarginOffset
30477
30538
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
30478
30539
  value: "solid",
30479
30540
  label: "solid"
@@ -30481,7 +30542,7 @@ const LockedLineSettings = props => {
30481
30542
  value: "dashed",
30482
30543
  label: "dashed"
30483
30544
  })))), isInvalid && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30484
- style: styles$m.errorText
30545
+ style: styles$p.errorText
30485
30546
  }, lengthZeroStr), /*#__PURE__*/React__namespace.createElement(DefiningPointSettings, _extends({
30486
30547
  label: "Point 1",
30487
30548
  showPoint: showPoint1,
@@ -30501,13 +30562,12 @@ const LockedLineSettings = props => {
30501
30562
  }),
30502
30563
  onChangeProps: newProps => handleChangePoint(newProps, 1)
30503
30564
  })), /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsActions, {
30504
- showM2Features: props.showM2Features,
30505
30565
  figureType: props.type,
30506
30566
  onMove: onMove,
30507
30567
  onRemove: onRemove
30508
30568
  }));
30509
30569
  };
30510
- const styles$m = aphrodite.StyleSheet.create({
30570
+ const styles$p = aphrodite.StyleSheet.create({
30511
30571
  row: {
30512
30572
  display: "flex",
30513
30573
  flexDirection: "row",
@@ -30552,7 +30612,7 @@ const LockedPointSettings = props => {
30552
30612
  /*#__PURE__*/
30553
30613
  // Summary: Point, coords, color (filled/open)
30554
30614
  React__namespace.createElement(wonderBlocksCore.View, {
30555
- style: styles$l.row
30615
+ style: styles$o.row
30556
30616
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Point (${coord[0]}, ${coord[1]})`), /*#__PURE__*/React__namespace.createElement(Strut, {
30557
30617
  size: wonderBlocksTokens.spacing.xSmall_8
30558
30618
  }), /*#__PURE__*/React__namespace.createElement(ColorSwatch, {
@@ -30561,7 +30621,7 @@ const LockedPointSettings = props => {
30561
30621
  }))
30562
30622
  }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30563
30623
  coord: coord,
30564
- style: styles$l.spaceUnder,
30624
+ style: styles$o.spaceUnder,
30565
30625
  onChange: newCoord => {
30566
30626
  onChangeProps({
30567
30627
  coord: newCoord
@@ -30570,7 +30630,7 @@ const LockedPointSettings = props => {
30570
30630
  }), /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30571
30631
  selectedValue: pointColor,
30572
30632
  onChange: handleColorChange,
30573
- style: styles$l.spaceUnder
30633
+ style: styles$o.spaceUnder
30574
30634
  }), /*#__PURE__*/React__namespace.createElement(LabeledSwitch, {
30575
30635
  label: "open point",
30576
30636
  checked: !filled,
@@ -30580,13 +30640,12 @@ const LockedPointSettings = props => {
30580
30640
  });
30581
30641
  }
30582
30642
  }), /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsActions, {
30583
- showM2Features: props.showM2Features,
30584
30643
  figureType: props.type,
30585
30644
  onMove: onMove,
30586
30645
  onRemove: onRemove
30587
30646
  }));
30588
30647
  };
30589
- const styles$l = aphrodite.StyleSheet.create({
30648
+ const styles$o = aphrodite.StyleSheet.create({
30590
30649
  row: {
30591
30650
  flexDirection: "row",
30592
30651
  alignItems: "center"
@@ -30604,17 +30663,17 @@ const PolygonSwatch = props => {
30604
30663
  } = props;
30605
30664
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30606
30665
  "aria-label": `${color}, stroke ${strokeStyle}, fill ${fillStyle}`,
30607
- style: [styles$k.container, {
30666
+ style: [styles$n.container, {
30608
30667
  border: `4px ${strokeStyle} ${perseus.lockedFigureColors[color]}`
30609
30668
  }]
30610
30669
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30611
- style: [styles$k.innerSquare, {
30670
+ style: [styles$n.innerSquare, {
30612
30671
  backgroundColor: perseus.lockedFigureColors[color],
30613
30672
  opacity: perseus.lockedFigureFillStyles[fillStyle]
30614
30673
  }]
30615
30674
  }));
30616
30675
  };
30617
- const styles$k = aphrodite.StyleSheet.create({
30676
+ const styles$n = aphrodite.StyleSheet.create({
30618
30677
  container: {
30619
30678
  // Add a white outline so that the color swatch is visible when
30620
30679
  // the dropdown option is highlighted with its blue background.
@@ -30656,7 +30715,7 @@ const LockedPolygonSettings = props => {
30656
30715
  /*#__PURE__*/
30657
30716
  // Summary: Polygon, number of sides, style swatch
30658
30717
  React__namespace.createElement(wonderBlocksCore.View, {
30659
- style: styles$j.row
30718
+ style: styles$m.row
30660
30719
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Polygon, ${points.length} sides`), /*#__PURE__*/React__namespace.createElement(Strut, {
30661
30720
  size: wonderBlocksTokens.spacing.xSmall_8
30662
30721
  }), /*#__PURE__*/React__namespace.createElement(PolygonSwatch, {
@@ -30665,7 +30724,7 @@ const LockedPolygonSettings = props => {
30665
30724
  strokeStyle: strokeStyle
30666
30725
  }))
30667
30726
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30668
- style: [styles$j.row, styles$j.spaceUnder]
30727
+ style: [styles$m.row, styles$m.spaceUnder]
30669
30728
  }, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30670
30729
  selectedValue: color,
30671
30730
  onChange: handleColorChange
@@ -30673,7 +30732,7 @@ const LockedPolygonSettings = props => {
30673
30732
  size: wonderBlocksTokens.spacing.medium_16
30674
30733
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30675
30734
  tag: "label",
30676
- style: styles$j.row
30735
+ style: styles$m.row
30677
30736
  }, "fill", /*#__PURE__*/React__namespace.createElement(Strut, {
30678
30737
  size: wonderBlocksTokens.spacing.xxSmall_6
30679
30738
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
@@ -30690,7 +30749,7 @@ const LockedPolygonSettings = props => {
30690
30749
  label: option
30691
30750
  }))))), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30692
30751
  tag: "label",
30693
- style: [styles$j.row, styles$j.spaceUnder]
30752
+ style: [styles$m.row, styles$m.spaceUnder]
30694
30753
  }, "stroke", /*#__PURE__*/React__namespace.createElement(Strut, {
30695
30754
  size: wonderBlocksTokens.spacing.xxSmall_6
30696
30755
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
@@ -30713,17 +30772,17 @@ const LockedPolygonSettings = props => {
30713
30772
  onChange: newValue => onChangeProps({
30714
30773
  showVertices: newValue
30715
30774
  }),
30716
- style: styles$j.spaceUnder
30775
+ style: styles$m.spaceUnder
30717
30776
  }), /*#__PURE__*/React__namespace.createElement(PerseusEditorAccordion, {
30718
30777
  header: /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Points"),
30719
30778
  expanded: true,
30720
- containerStyle: styles$j.pointAccordionContainer,
30721
- panelStyle: styles$j.pointAccordionPanel
30779
+ containerStyle: styles$m.pointAccordionContainer,
30780
+ panelStyle: styles$m.pointAccordionPanel
30722
30781
  }, points.map((point, index) => {
30723
30782
  const pointLabel = String.fromCharCode(65 + index);
30724
30783
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30725
30784
  key: `locked-polygon-point-${point[0]}-${point[1]}-index-${index}`,
30726
- style: [styles$j.row, styles$j.spaceUnder]
30785
+ style: [styles$m.row, styles$m.spaceUnder]
30727
30786
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `${pointLabel}:`), /*#__PURE__*/React__namespace.createElement(Strut, {
30728
30787
  size: wonderBlocksTokens.spacing.medium_16
30729
30788
  }), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
@@ -30751,7 +30810,7 @@ const LockedPolygonSettings = props => {
30751
30810
  points: newPoints
30752
30811
  });
30753
30812
  },
30754
- style: styles$j.icon
30813
+ style: styles$m.icon
30755
30814
  }));
30756
30815
  }), /*#__PURE__*/React__namespace.createElement(Button__default["default"], {
30757
30816
  kind: "tertiary",
@@ -30762,13 +30821,12 @@ const LockedPolygonSettings = props => {
30762
30821
  });
30763
30822
  }
30764
30823
  }, "Add point")), /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsActions, {
30765
- showM2Features: props.showM2Features,
30766
30824
  figureType: props.type,
30767
30825
  onMove: onMove,
30768
30826
  onRemove: onRemove
30769
30827
  }));
30770
30828
  };
30771
- const styles$j = aphrodite.StyleSheet.create({
30829
+ const styles$m = aphrodite.StyleSheet.create({
30772
30830
  row: {
30773
30831
  display: "flex",
30774
30832
  flexDirection: "row",
@@ -30826,7 +30884,7 @@ const LockedVectorSettings = props => {
30826
30884
  expanded: props.expanded,
30827
30885
  onToggle: props.onToggle,
30828
30886
  header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30829
- style: styles$i.row
30887
+ style: styles$l.row
30830
30888
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, lineLabel), /*#__PURE__*/React__namespace.createElement(Strut, {
30831
30889
  size: wonderBlocksTokens.spacing.xSmall_8
30832
30890
  }), /*#__PURE__*/React__namespace.createElement(LineSwatch, {
@@ -30834,19 +30892,19 @@ const LockedVectorSettings = props => {
30834
30892
  lineStyle: "solid"
30835
30893
  }))
30836
30894
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30837
- style: [styles$i.row, styles$i.spaceUnder]
30895
+ style: [styles$l.row, styles$l.spaceUnder]
30838
30896
  }, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
30839
30897
  selectedValue: lineColor,
30840
30898
  onChange: handleColorChange
30841
30899
  })), isInvalid && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
30842
- style: styles$i.errorText
30900
+ style: styles$l.errorText
30843
30901
  }, lengthErrorMessage), /*#__PURE__*/React__namespace.createElement(PerseusEditorAccordion, {
30844
30902
  expanded: true // Initial state is expanded
30845
30903
  ,
30846
- containerStyle: styles$i.container,
30847
- panelStyle: styles$i.accordionPanel,
30904
+ containerStyle: styles$l.container,
30905
+ panelStyle: styles$l.accordionPanel,
30848
30906
  header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30849
- style: styles$i.row
30907
+ style: styles$l.row
30850
30908
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Tail (${tail[0]}, ${tail[1]})`))
30851
30909
  }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30852
30910
  coord: tail,
@@ -30857,10 +30915,10 @@ const LockedVectorSettings = props => {
30857
30915
  })), /*#__PURE__*/React__namespace.createElement(PerseusEditorAccordion, {
30858
30916
  expanded: true // Initial state is expanded
30859
30917
  ,
30860
- containerStyle: styles$i.container,
30861
- panelStyle: styles$i.accordionPanel,
30918
+ containerStyle: styles$l.container,
30919
+ panelStyle: styles$l.accordionPanel,
30862
30920
  header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
30863
- style: styles$i.row
30921
+ style: styles$l.row
30864
30922
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Tip (${tip[0]}, ${tip[1]})`))
30865
30923
  }, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
30866
30924
  coord: tip,
@@ -30869,13 +30927,12 @@ const LockedVectorSettings = props => {
30869
30927
  handleChangePoint(newProps, 1);
30870
30928
  }
30871
30929
  })), /*#__PURE__*/React__namespace.createElement(LockedFigureSettingsActions, {
30872
- showM2Features: props.showM2Features,
30873
30930
  figureType: props.type,
30874
30931
  onMove: onMove,
30875
30932
  onRemove: onRemove
30876
30933
  }));
30877
30934
  };
30878
- const styles$i = aphrodite.StyleSheet.create({
30935
+ const styles$l = aphrodite.StyleSheet.create({
30879
30936
  accordionPanel: {
30880
30937
  paddingBottom: wonderBlocksTokens.spacing.medium_16
30881
30938
  },
@@ -30912,19 +30969,11 @@ const LockedFigureSettings = props => {
30912
30969
  case "line":
30913
30970
  return /*#__PURE__*/React__namespace.createElement(LockedLineSettings, props);
30914
30971
  case "vector":
30915
- if (props.showM2Features) {
30916
- return /*#__PURE__*/React__namespace.createElement(LockedVectorSettings, props);
30917
- }
30918
- break;
30972
+ return /*#__PURE__*/React__namespace.createElement(LockedVectorSettings, props);
30919
30973
  case "ellipse":
30920
- if (props.showM2Features) {
30921
- return /*#__PURE__*/React__namespace.createElement(LockedEllipseSettings, props);
30922
- }
30923
- break;
30974
+ return /*#__PURE__*/React__namespace.createElement(LockedEllipseSettings, props);
30924
30975
  case "polygon":
30925
- if (props.showM2Features) {
30926
- return /*#__PURE__*/React__namespace.createElement(LockedPolygonSettings, props);
30927
- }
30976
+ return /*#__PURE__*/React__namespace.createElement(LockedPolygonSettings, props);
30928
30977
  }
30929
30978
  return null;
30930
30979
  };
@@ -31038,7 +31087,6 @@ const LockedFiguresSection = props => {
31038
31087
  }
31039
31088
  return /*#__PURE__*/React__namespace.createElement(LockedFigureSettings, _extends({
31040
31089
  key: `${uniqueId}-locked-${figure}-${index}`,
31041
- showM2Features: props.showM2Features,
31042
31090
  showM2bFeatures: props.showM2bFeatures,
31043
31091
  expanded: expandedStates[index],
31044
31092
  onToggle: newValue => {
@@ -31052,9 +31100,8 @@ const LockedFiguresSection = props => {
31052
31100
  onRemove: () => removeLockedFigure(index)
31053
31101
  }));
31054
31102
  }), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31055
- style: styles$h.buttonContainer
31103
+ style: styles$k.buttonContainer
31056
31104
  }, /*#__PURE__*/React__namespace.createElement(LockedFigureSelect, {
31057
- showM2Features: props.showM2Features,
31058
31105
  showM2bFeatures: props.showM2bFeatures,
31059
31106
  id: `${uniqueId}-select`,
31060
31107
  onChange: addLockedFigure
@@ -31063,10 +31110,10 @@ const LockedFiguresSection = props => {
31063
31110
  }), showExpandButton && /*#__PURE__*/React__namespace.createElement(Button__default["default"], {
31064
31111
  kind: "secondary",
31065
31112
  onClick: () => toggleExpanded(allCollapsed),
31066
- style: styles$h.button
31113
+ style: styles$k.button
31067
31114
  }, buttonLabel))));
31068
31115
  };
31069
- const styles$h = aphrodite.StyleSheet.create({
31116
+ const styles$k = aphrodite.StyleSheet.create({
31070
31117
  buttonContainer: {
31071
31118
  flexDirection: "row",
31072
31119
  alignItems: "center"
@@ -31102,7 +31149,7 @@ const GraphPointsCountSelector = _ref => {
31102
31149
  // Never uses placeholder, always has value
31103
31150
  ,
31104
31151
  placeholder: "",
31105
- style: styles$g.singleSelectShort
31152
+ style: styles$j.singleSelectShort
31106
31153
  }, [...[...Array(7).keys()].map(n => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
31107
31154
  key: n,
31108
31155
  value: `${n}`,
@@ -31113,7 +31160,7 @@ const GraphPointsCountSelector = _ref => {
31113
31160
  label: "unlimited"
31114
31161
  })]);
31115
31162
  };
31116
- const styles$g = aphrodite.StyleSheet.create({
31163
+ const styles$j = aphrodite.StyleSheet.create({
31117
31164
  singleSelectShort: {
31118
31165
  // Non-standard spacing, but it's the smallest we can go
31119
31166
  // without running into styling issues with the dropdown.
@@ -31126,7 +31173,7 @@ const GraphTypeSelector = props => {
31126
31173
  selectedValue: props.graphType,
31127
31174
  onChange: props.onChange,
31128
31175
  placeholder: "Select a graph type",
31129
- style: styles$f.singleSelectShort
31176
+ style: styles$i.singleSelectShort
31130
31177
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
31131
31178
  value: "linear",
31132
31179
  label: "Linear function"
@@ -31159,7 +31206,7 @@ const GraphTypeSelector = props => {
31159
31206
  label: "Angle"
31160
31207
  }));
31161
31208
  };
31162
- const styles$f = aphrodite.StyleSheet.create({
31209
+ const styles$i = aphrodite.StyleSheet.create({
31163
31210
  singleSelectShort: {
31164
31211
  // Non-standard spacing, but it's the smallest we can go
31165
31212
  // without running into styling issues with the dropdown.
@@ -31588,10 +31635,10 @@ class InteractiveGraphSettings extends React__namespace.Component {
31588
31635
  onChange: this.change
31589
31636
  }))), /*#__PURE__*/React__namespace.createElement(LabeledRow, {
31590
31637
  label: "Background image URL:",
31591
- style: styles$e.resetSpaceTop
31638
+ style: styles$h.resetSpaceTop
31592
31639
  }, /*#__PURE__*/React__namespace.createElement("input", {
31593
31640
  type: "text",
31594
- className: aphrodite.css(styles$e.backgroundUrlInput),
31641
+ className: aphrodite.css(styles$h.backgroundUrlInput),
31595
31642
  ref: this.bgUrlRef,
31596
31643
  value: this.state.backgroundImage.url || "",
31597
31644
  onChange: e => {
@@ -31607,14 +31654,14 @@ class InteractiveGraphSettings extends React__namespace.Component {
31607
31654
  onKeyPress: this.changeBackgroundUrl,
31608
31655
  onBlur: this.changeBackgroundUrl
31609
31656
  }), /*#__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, {
31610
- style: styles$e.protractorSection
31657
+ style: styles$h.protractorSection
31611
31658
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31612
- style: styles$e.checkboxRow
31659
+ style: styles$h.checkboxRow
31613
31660
  }, /*#__PURE__*/React__namespace.createElement(PropCheckBox$7, {
31614
31661
  label: "Show protractor",
31615
31662
  showProtractor: this.props.showProtractor,
31616
31663
  onChange: this.change,
31617
- style: styles$e.resetSpaceTop
31664
+ style: styles$h.resetSpaceTop
31618
31665
  })), this.props.showProtractor && /*#__PURE__*/React__namespace.createElement(Banner__default["default"], {
31619
31666
  layout: "floating",
31620
31667
  text: "The protractor is not accessible. Please consider an alternate approach.",
@@ -31622,7 +31669,7 @@ class InteractiveGraphSettings extends React__namespace.Component {
31622
31669
  }))));
31623
31670
  }
31624
31671
  }
31625
- const styles$e = aphrodite.StyleSheet.create({
31672
+ const styles$h = aphrodite.StyleSheet.create({
31626
31673
  resetSpaceTop: {
31627
31674
  marginTop: 0
31628
31675
  },
@@ -31661,14 +31708,14 @@ const SegmentCountSelector = _ref => {
31661
31708
  const num = +newValue;
31662
31709
  onChange(num);
31663
31710
  },
31664
- style: styles$d.singleSelectShort
31711
+ style: styles$g.singleSelectShort
31665
31712
  }, ___default["default"].range(1, 7).map(n => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
31666
31713
  key: n,
31667
31714
  value: `${n}`,
31668
31715
  label: `${n} segment${n > 1 ? "s" : ""}`
31669
31716
  })));
31670
31717
  };
31671
- const styles$d = aphrodite.StyleSheet.create({
31718
+ const styles$g = aphrodite.StyleSheet.create({
31672
31719
  singleSelectShort: {
31673
31720
  // Non-standard spacing, but it's the smallest we can go
31674
31721
  // without running into styling issues with the dropdown.
@@ -31676,13 +31723,65 @@ const styles$d = aphrodite.StyleSheet.create({
31676
31723
  }
31677
31724
  });
31678
31725
 
31726
+ const StartCoordsCircle = props => {
31727
+ const {
31728
+ startCoords,
31729
+ onChange
31730
+ } = props;
31731
+ return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31732
+ style: styles$f.tile
31733
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31734
+ style: styles$f.row
31735
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Center:"), /*#__PURE__*/React__namespace.createElement(Strut, {
31736
+ size: wonderBlocksTokens.spacing.small_12
31737
+ }), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
31738
+ coord: startCoords.center,
31739
+ labels: ["x", "y"],
31740
+ onChange: coord => onChange({
31741
+ center: coord,
31742
+ radius: startCoords.radius
31743
+ })
31744
+ })), /*#__PURE__*/React__namespace.createElement(Strut, {
31745
+ size: wonderBlocksTokens.spacing.small_12
31746
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31747
+ style: styles$f.row
31748
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Radius:"), /*#__PURE__*/React__namespace.createElement(Strut, {
31749
+ size: wonderBlocksTokens.spacing.small_12
31750
+ }), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
31751
+ value: startCoords.radius.toString(),
31752
+ type: "number",
31753
+ onChange: value => {
31754
+ onChange({
31755
+ center: startCoords.center,
31756
+ radius: parseFloat(value)
31757
+ });
31758
+ },
31759
+ style: styles$f.textField
31760
+ })));
31761
+ };
31762
+ const styles$f = aphrodite.StyleSheet.create({
31763
+ tile: {
31764
+ backgroundColor: wonderBlocksTokens.color.fadedBlue8,
31765
+ marginTop: wonderBlocksTokens.spacing.xSmall_8,
31766
+ padding: wonderBlocksTokens.spacing.small_12,
31767
+ borderRadius: wonderBlocksTokens.spacing.xSmall_8
31768
+ },
31769
+ row: {
31770
+ flexDirection: "row",
31771
+ alignItems: "center"
31772
+ },
31773
+ textField: {
31774
+ width: wonderBlocksTokens.spacing.xxxLarge_64
31775
+ }
31776
+ });
31777
+
31679
31778
  const StartCoordsLine = props => {
31680
31779
  const {
31681
31780
  startCoords,
31682
31781
  onChange
31683
31782
  } = props;
31684
31783
  return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31685
- style: styles$c.tile
31784
+ style: styles$e.tile
31686
31785
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Point 1:"), /*#__PURE__*/React__namespace.createElement(Strut, {
31687
31786
  size: wonderBlocksTokens.spacing.small_12
31688
31787
  }), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
@@ -31690,7 +31789,7 @@ const StartCoordsLine = props => {
31690
31789
  labels: ["x", "y"],
31691
31790
  onChange: value => onChange([value, startCoords[1]])
31692
31791
  })), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31693
- style: styles$c.tile
31792
+ style: styles$e.tile
31694
31793
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Point 2:"), /*#__PURE__*/React__namespace.createElement(Strut, {
31695
31794
  size: wonderBlocksTokens.spacing.small_12
31696
31795
  }), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
@@ -31699,7 +31798,7 @@ const StartCoordsLine = props => {
31699
31798
  onChange: value => onChange([startCoords[0], value])
31700
31799
  })));
31701
31800
  };
31702
- const styles$c = aphrodite.StyleSheet.create({
31801
+ const styles$e = aphrodite.StyleSheet.create({
31703
31802
  tile: {
31704
31803
  backgroundColor: wonderBlocksTokens.color.fadedBlue8,
31705
31804
  marginTop: wonderBlocksTokens.spacing.xSmall_8,
@@ -31722,7 +31821,7 @@ const StartCoordsMultiline = props => {
31722
31821
  header: /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `${graphName} ${i + 1}`),
31723
31822
  expanded: true
31724
31823
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31725
- style: styles$b.nestedTile
31824
+ style: styles$d.nestedTile
31726
31825
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Point 1:"), /*#__PURE__*/React__namespace.createElement(Strut, {
31727
31826
  size: wonderBlocksTokens.spacing.small_12
31728
31827
  }), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
@@ -31734,7 +31833,7 @@ const StartCoordsMultiline = props => {
31734
31833
  onChange(newCoords);
31735
31834
  }
31736
31835
  })), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31737
- style: styles$b.nestedTile
31836
+ style: styles$d.nestedTile
31738
31837
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Point 2:"), /*#__PURE__*/React__namespace.createElement(Strut, {
31739
31838
  size: wonderBlocksTokens.spacing.small_12
31740
31839
  }), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
@@ -31747,7 +31846,7 @@ const StartCoordsMultiline = props => {
31747
31846
  }
31748
31847
  })))));
31749
31848
  };
31750
- const styles$b = aphrodite.StyleSheet.create({
31849
+ const styles$d = aphrodite.StyleSheet.create({
31751
31850
  nestedTile: {
31752
31851
  paddingBottom: wonderBlocksTokens.spacing.small_12,
31753
31852
  flexDirection: "row",
@@ -31755,6 +31854,112 @@ const styles$b = aphrodite.StyleSheet.create({
31755
31854
  }
31756
31855
  });
31757
31856
 
31857
+ const StartCoordsQuadratic = props => {
31858
+ const {
31859
+ startCoords,
31860
+ onChange
31861
+ } = props;
31862
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31863
+ style: styles$c.equationSection
31864
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, null, "Starting equation:"), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.BodyMonospace, {
31865
+ style: styles$c.equationBody
31866
+ }, getQuadraticEquation(startCoords))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31867
+ style: styles$c.tile
31868
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Point 1:"), /*#__PURE__*/React__namespace.createElement(Strut, {
31869
+ size: wonderBlocksTokens.spacing.small_12
31870
+ }), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
31871
+ coord: startCoords[0],
31872
+ labels: ["x", "y"],
31873
+ onChange: value => onChange([value, startCoords[1], startCoords[2]])
31874
+ })), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31875
+ style: styles$c.tile
31876
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Point 2:"), /*#__PURE__*/React__namespace.createElement(Strut, {
31877
+ size: wonderBlocksTokens.spacing.small_12
31878
+ }), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
31879
+ coord: startCoords[1],
31880
+ labels: ["x", "y"],
31881
+ onChange: value => onChange([startCoords[0], value, startCoords[2]])
31882
+ })), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31883
+ style: styles$c.tile
31884
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Point 3:"), /*#__PURE__*/React__namespace.createElement(Strut, {
31885
+ size: wonderBlocksTokens.spacing.small_12
31886
+ }), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
31887
+ coord: startCoords[2],
31888
+ labels: ["x", "y"],
31889
+ onChange: value => onChange([startCoords[0], startCoords[1], value])
31890
+ })));
31891
+ };
31892
+ const styles$c = aphrodite.StyleSheet.create({
31893
+ tile: {
31894
+ backgroundColor: wonderBlocksTokens.color.fadedBlue8,
31895
+ marginTop: wonderBlocksTokens.spacing.xSmall_8,
31896
+ padding: wonderBlocksTokens.spacing.small_12,
31897
+ borderRadius: wonderBlocksTokens.spacing.xSmall_8,
31898
+ flexDirection: "row",
31899
+ alignItems: "center"
31900
+ },
31901
+ equationSection: {
31902
+ marginTop: wonderBlocksTokens.spacing.small_12
31903
+ },
31904
+ equationBody: {
31905
+ backgroundColor: wonderBlocksTokens.color.fadedOffBlack8,
31906
+ border: `1px solid ${wonderBlocksTokens.color.fadedOffBlack32}`,
31907
+ marginTop: wonderBlocksTokens.spacing.xSmall_8,
31908
+ paddingLeft: wonderBlocksTokens.spacing.xSmall_8,
31909
+ paddingRight: wonderBlocksTokens.spacing.xSmall_8,
31910
+ fontSize: wonderBlocksTokens.font.size.xSmall
31911
+ }
31912
+ });
31913
+
31914
+ const StartCoordsSinusoid = props => {
31915
+ const {
31916
+ startCoords,
31917
+ onChange
31918
+ } = props;
31919
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31920
+ style: styles$b.equationSection
31921
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, null, "Starting equation:"), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.BodyMonospace, {
31922
+ style: styles$b.equationBody
31923
+ }, getSinusoidEquation(startCoords))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31924
+ style: styles$b.tile
31925
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Point 1:"), /*#__PURE__*/React__namespace.createElement(Strut, {
31926
+ size: wonderBlocksTokens.spacing.small_12
31927
+ }), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
31928
+ coord: startCoords[0],
31929
+ labels: ["x", "y"],
31930
+ onChange: value => onChange([value, startCoords[1]])
31931
+ })), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
31932
+ style: styles$b.tile
31933
+ }, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Point 2:"), /*#__PURE__*/React__namespace.createElement(Strut, {
31934
+ size: wonderBlocksTokens.spacing.small_12
31935
+ }), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
31936
+ coord: startCoords[1],
31937
+ labels: ["x", "y"],
31938
+ onChange: value => onChange([startCoords[0], value])
31939
+ })));
31940
+ };
31941
+ const styles$b = aphrodite.StyleSheet.create({
31942
+ tile: {
31943
+ backgroundColor: wonderBlocksTokens.color.fadedBlue8,
31944
+ marginTop: wonderBlocksTokens.spacing.xSmall_8,
31945
+ padding: wonderBlocksTokens.spacing.small_12,
31946
+ borderRadius: wonderBlocksTokens.spacing.xSmall_8,
31947
+ flexDirection: "row",
31948
+ alignItems: "center"
31949
+ },
31950
+ equationSection: {
31951
+ marginTop: wonderBlocksTokens.spacing.small_12
31952
+ },
31953
+ equationBody: {
31954
+ backgroundColor: wonderBlocksTokens.color.fadedOffBlack8,
31955
+ border: `1px solid ${wonderBlocksTokens.color.fadedOffBlack32}`,
31956
+ marginTop: wonderBlocksTokens.spacing.xSmall_8,
31957
+ paddingLeft: wonderBlocksTokens.spacing.xSmall_8,
31958
+ paddingRight: wonderBlocksTokens.spacing.xSmall_8,
31959
+ fontSize: wonderBlocksTokens.font.size.xSmall
31960
+ }
31961
+ });
31962
+
31758
31963
  const StartCoordsSettingsInner = props => {
31759
31964
  const {
31760
31965
  type,
@@ -31785,6 +31990,28 @@ const StartCoordsSettingsInner = props => {
31785
31990
  startCoords: multiLineCoords,
31786
31991
  onChange: onChange
31787
31992
  });
31993
+ case "circle":
31994
+ const circleCoords = perseus.getCircleCoords(props);
31995
+ const radius = kmath.vector.length(kmath.vector.subtract(circleCoords.radiusPoint, circleCoords.center));
31996
+ return /*#__PURE__*/React__namespace.createElement(StartCoordsCircle, {
31997
+ startCoords: {
31998
+ center: circleCoords.center,
31999
+ radius
32000
+ },
32001
+ onChange: onChange
32002
+ });
32003
+ case "sinusoid":
32004
+ const sinusoidCoords = perseus.getSinusoidCoords(props, range, step);
32005
+ return /*#__PURE__*/React__namespace.createElement(StartCoordsSinusoid, {
32006
+ startCoords: sinusoidCoords,
32007
+ onChange: onChange
32008
+ });
32009
+ case "quadratic":
32010
+ const quadraticCoords = perseus.getQuadraticCoords(props, range, step);
32011
+ return /*#__PURE__*/React__namespace.createElement(StartCoordsQuadratic, {
32012
+ startCoords: quadraticCoords,
32013
+ onChange: onChange
32014
+ });
31788
32015
  default:
31789
32016
  return null;
31790
32017
  }
@@ -31839,6 +32066,10 @@ const POLYGON_SIDES = ___default["default"].map(___default["default"].range(3, 1
31839
32066
  label: `${value} sides`
31840
32067
  });
31841
32068
  });
32069
+
32070
+ // TODO(LEMS-2228): Remove flags once this is fully released
32071
+ const startCoordsUiPhase1Types = ["linear", "linear-system", "ray", "segment", "circle"];
32072
+ const startCoordsUiPhase2Types = ["sinusoid", "quadratic"];
31842
32073
  /**
31843
32074
  * An editor for the InteractiveGraph widget, which allows the user to
31844
32075
  * specify the graph's properties and the correct answer.
@@ -31932,6 +32163,9 @@ class InteractiveGraphEditor extends React__namespace.Component {
31932
32163
  className: "perseus-error"
31933
32164
  }, this.props.valid);
31934
32165
  }
32166
+ const startCoordsPhase1 = this.props.apiOptions?.flags?.mafs?.["start-coords-ui-phase-1"];
32167
+ const startCoordsPhase2 = this.props.apiOptions?.flags?.mafs?.["start-coords-ui-phase-2"];
32168
+ const displayStartCoordsUI = this.props.graph && (startCoordsPhase1 && startCoordsUiPhase1Types.includes(this.props.graph.type) || startCoordsPhase2 && startCoordsUiPhase2Types.includes(this.props.graph.type));
31935
32169
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, /*#__PURE__*/React__namespace.createElement(LabeledRow, {
31936
32170
  label: "Type of Graph:"
31937
32171
  }, /*#__PURE__*/React__namespace.createElement(GraphTypeSelector, {
@@ -32076,7 +32310,9 @@ class InteractiveGraphEditor extends React__namespace.Component {
32076
32310
  }
32077
32311
  });
32078
32312
  }
32079
- })), this.props.graph?.type && this.props.apiOptions.flags?.mafs?.["start-coords-ui"] && /*#__PURE__*/React__namespace.createElement(StartCoordsSettings, _extends({}, this.props.graph, {
32313
+ })), this.props.graph?.type &&
32314
+ // TODO(LEMS-2228): Remove flags once this is fully released
32315
+ displayStartCoordsUI && /*#__PURE__*/React__namespace.createElement(StartCoordsSettings, _extends({}, this.props.graph, {
32080
32316
  range: this.props.range,
32081
32317
  step: this.props.step,
32082
32318
  onChange: this.changeStartCoords
@@ -32133,7 +32369,6 @@ class InteractiveGraphEditor extends React__namespace.Component {
32133
32369
  // Only show the "Add locked figure" dropdown if the graph
32134
32370
  // is using Mafs.
32135
32371
  this.props.graph && this.props.apiOptions?.flags?.mafs?.[this.props.graph.type] && /*#__PURE__*/React__namespace.createElement(LockedFiguresSection, {
32136
- showM2Features: this.props.apiOptions?.flags?.mafs?.["interactive-graph-locked-features-m2"],
32137
32372
  showM2bFeatures: this.props.apiOptions?.flags?.mafs?.["interactive-graph-locked-features-m2b"],
32138
32373
  figures: this.props.lockedFigures,
32139
32374
  onChange: this.props.onChange