@khanacademy/perseus-editor 2.7.7 → 2.8.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @khanacademy/perseus-editor
2
2
 
3
+ ## 2.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5bcf118c: Desktop Expression Widget now uses v2 keypad
8
+
9
+ ### Patch Changes
10
+
11
+ - 5bcf118c: # Update MathInput
12
+
13
+ - `buttonSets` is now deprecated in favor of `keypadButtonSets`, but currently maps to the new prop for backwards compatability.
14
+ - `buttonsVisible` is now a bit misleading: "focused" is the default state with a toggle-able keypad and "always" shows the keypad by default.
15
+
16
+ - Updated dependencies [5bcf118c]
17
+ - Updated dependencies [5bcf118c]
18
+ - @khanacademy/perseus@12.0.0
19
+
3
20
  ## 2.7.7
4
21
 
5
22
  ### Patch Changes
package/dist/es/index.js CHANGED
@@ -22,7 +22,7 @@ import * as i18n$1 from '@khanacademy/wonder-blocks-i18n';
22
22
 
23
23
  // This file is processed by a Rollup plugin (replace) to inject the production
24
24
  const libName = "@khanacademy/perseus-editor";
25
- const libVersion = "2.7.7";
25
+ const libVersion = "2.8.0";
26
26
  addLibraryVersionToPerseusDebug(libName, libVersion);
27
27
 
28
28
  function _extends() {
@@ -26740,6 +26740,16 @@ const {
26740
26740
  const {
26741
26741
  getDependencies: getDependencies$2
26742
26742
  } = Dependencies;
26743
+ const parseAnswerKey = ({
26744
+ key
26745
+ }) => {
26746
+ const parsedKey = Number.parseInt(key != null ? key : "");
26747
+ if (Number.isNaN(parsedKey)) {
26748
+ throw new Error(`Invalid answer key: ${key}`);
26749
+ }
26750
+ return parsedKey;
26751
+ };
26752
+
26743
26753
  // Pick a key that isn't currently used by an answer in answerForms
26744
26754
  const _makeNewKey = answerForms => {
26745
26755
  // first note all the currently used keys in an array, used like a map :3
@@ -26747,7 +26757,7 @@ const _makeNewKey = answerForms => {
26747
26757
  // be one past the largest key.
26748
26758
  const usedKeys = [];
26749
26759
  answerForms.forEach(ans => {
26750
- usedKeys[ans.key] = true;
26760
+ usedKeys[parseAnswerKey(ans)] = true;
26751
26761
  });
26752
26762
 
26753
26763
  // then scan through the array to find the first unused (undefined) key
@@ -26918,7 +26928,8 @@ class ExpressionEditor extends React.Component {
26918
26928
  return Changeable.change.apply(this, args);
26919
26929
  }
26920
26930
  render() {
26921
- const answerOptions = this.props.answerForms.map((obj, index) => {
26931
+ const answerOptions = this.props.answerForms.map(ans => {
26932
+ const key = parseAnswerKey(ans);
26922
26933
  const expressionProps = {
26923
26934
  // note we're using
26924
26935
  // *this.props*.{times,functions,buttonSets} since each
@@ -26927,21 +26938,24 @@ class ExpressionEditor extends React.Component {
26927
26938
  functions: this.props.functions,
26928
26939
  buttonSets: this.props.buttonSets,
26929
26940
  buttonsVisible: "focused",
26930
- form: obj.form,
26931
- simplify: obj.simplify,
26932
- value: obj.value,
26933
- onChange: props => this.updateForm(index, props),
26941
+ form: ans.form,
26942
+ simplify: ans.simplify,
26943
+ value: ans.value,
26944
+ onChange: props => this.updateForm(key, props),
26934
26945
  trackInteraction: () => {},
26935
- widgetId: this.props.widgetId + "-" + index
26946
+ widgetId: this.props.widgetId + "-" + ans.key
26936
26947
  };
26937
- return lens(obj).merge([], {
26948
+ return lens(ans).merge([], {
26938
26949
  draggable: true,
26939
- onChange: props => this.updateForm(index, props),
26940
- onDelete: () => this.handleRemoveForm(index),
26950
+ onChange: props => {
26951
+ var _ans$key;
26952
+ return this.updateForm(Number.parseInt((_ans$key = ans.key) != null ? _ans$key : ""), props);
26953
+ },
26954
+ onDelete: () => this.handleRemoveForm(key),
26941
26955
  expressionProps: expressionProps
26942
26956
  }).freeze();
26943
- }).map((obj, index) => /*#__PURE__*/React.createElement(AnswerOption, _extends({
26944
- key: index
26957
+ }).map(obj => /*#__PURE__*/React.createElement(AnswerOption, _extends({
26958
+ key: obj.key
26945
26959
  }, obj)));
26946
26960
  const sortable = /*#__PURE__*/React.createElement(SortableArea, {
26947
26961
  components: answerOptions,
@@ -28513,6 +28527,9 @@ class ConstraintEditor extends React.Component {
28513
28527
  const {
28514
28528
  TeX
28515
28529
  } = Dependencies.getDependencies();
28530
+ const analyticsStub = {
28531
+ onAnalyticsEvent: () => Promise.resolve()
28532
+ };
28516
28533
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
28517
28534
  className: "perseus-widget-row"
28518
28535
  }, "Constraint:", " ", /*#__PURE__*/React.createElement(ButtonGroup$2, {
@@ -28543,47 +28560,47 @@ class ConstraintEditor extends React.Component {
28543
28560
  }, /*#__PURE__*/React.createElement("div", {
28544
28561
  className: "perseus-widget-row"
28545
28562
  }, /*#__PURE__*/React.createElement(TeX, null, "x="), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28546
- buttonSets: [],
28547
28563
  buttonsVisible: "never",
28548
28564
  value: this.props.constraintFn,
28549
- onChange: this.change("constraintFn")
28565
+ onChange: this.change("constraintFn"),
28566
+ analytics: analyticsStub
28550
28567
  }))), this.props.constraint === "y" && /*#__PURE__*/React.createElement("div", {
28551
28568
  className: "graph-settings"
28552
28569
  }, /*#__PURE__*/React.createElement("div", {
28553
28570
  className: "perseus-widget-row"
28554
28571
  }, /*#__PURE__*/React.createElement(TeX, null, "y="), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28555
- buttonSets: [],
28556
28572
  buttonsVisible: "never",
28557
28573
  value: this.props.constraintFn,
28558
- onChange: this.change("constraintFn")
28574
+ onChange: this.change("constraintFn"),
28575
+ analytics: analyticsStub
28559
28576
  }))), "Ensure these are set so nothing can be dragged off the canvas:", /*#__PURE__*/React.createElement("div", {
28560
28577
  className: "perseus-widget-row"
28561
28578
  }, /*#__PURE__*/React.createElement("div", {
28562
28579
  className: "perseus-widget-row"
28563
28580
  }, /*#__PURE__*/React.createElement(TeX, null, "x \\in \\Large["), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28564
- buttonSets: [],
28565
28581
  buttonsVisible: "never",
28566
28582
  value: this.props.constraintXMin,
28567
- onChange: this.change("constraintXMin")
28583
+ onChange: this.change("constraintXMin"),
28584
+ analytics: analyticsStub
28568
28585
  }), /*#__PURE__*/React.createElement(TeX, null, ", "), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28569
- buttonSets: [],
28570
28586
  buttonsVisible: "never",
28571
28587
  value: this.props.constraintXMax,
28572
- onChange: this.change("constraintXMax")
28588
+ onChange: this.change("constraintXMax"),
28589
+ analytics: analyticsStub
28573
28590
  }), " ", /*#__PURE__*/React.createElement(TeX, null, "\\Large]"))), /*#__PURE__*/React.createElement("div", {
28574
28591
  className: "perseus-widget-row"
28575
28592
  }, /*#__PURE__*/React.createElement("div", {
28576
28593
  className: "perseus-widget-row"
28577
28594
  }, /*#__PURE__*/React.createElement(TeX, null, "y \\in \\Large["), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28578
- buttonSets: [],
28579
28595
  buttonsVisible: "never",
28580
28596
  value: this.props.constraintYMin,
28581
- onChange: this.change("constraintYMin")
28597
+ onChange: this.change("constraintYMin"),
28598
+ analytics: analyticsStub
28582
28599
  }), /*#__PURE__*/React.createElement(TeX, null, ", "), " ", /*#__PURE__*/React.createElement(MathInput$1, {
28583
- buttonSets: [],
28584
28600
  buttonsVisible: "never",
28585
28601
  value: this.props.constraintYMax,
28586
- onChange: this.change("constraintYMax")
28602
+ onChange: this.change("constraintYMax"),
28603
+ analytics: analyticsStub
28587
28604
  }), " ", /*#__PURE__*/React.createElement(TeX, null, "\\Large]"))));
28588
28605
  }
28589
28606
  }
@@ -28638,24 +28655,27 @@ class PointEditor extends React.Component {
28638
28655
  const {
28639
28656
  TeX
28640
28657
  } = getDependencies();
28658
+ const analyticsStub = {
28659
+ onAnalyticsEvent: () => Promise.resolve()
28660
+ };
28641
28661
  return /*#__PURE__*/React.createElement("div", {
28642
28662
  className: "graph-settings"
28643
28663
  }, /*#__PURE__*/React.createElement("div", {
28644
28664
  className: "perseus-widget-row"
28645
28665
  }, "Coordinate: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28646
- buttonSets: [],
28647
28666
  buttonsVisible: "never",
28648
28667
  value: this.props.coordX
28649
28668
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28650
28669
  ,
28651
- onChange: this.change("coordX")
28670
+ onChange: this.change("coordX"),
28671
+ analytics: analyticsStub
28652
28672
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28653
- buttonSets: [],
28654
28673
  buttonsVisible: "never",
28655
28674
  value: this.props.coordY
28656
28675
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28657
28676
  ,
28658
- onChange: this.change("coordY")
28677
+ onChange: this.change("coordY"),
28678
+ analytics: analyticsStub
28659
28679
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28660
28680
  className: "perseus-widget-row"
28661
28681
  }, /*#__PURE__*/React.createElement(ColorPicker, {
@@ -28695,40 +28715,43 @@ class LineEditor extends React.Component {
28695
28715
  const {
28696
28716
  TeX
28697
28717
  } = getDependencies();
28718
+ const analyticsStub = {
28719
+ onAnalyticsEvent: () => Promise.resolve()
28720
+ };
28698
28721
  return /*#__PURE__*/React.createElement("div", {
28699
28722
  className: "graph-settings"
28700
28723
  }, /*#__PURE__*/React.createElement("div", {
28701
28724
  className: "perseus-widget-row"
28702
28725
  }, "Start: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28703
- buttonSets: [],
28704
28726
  buttonsVisible: "never",
28705
28727
  value: this.props.startX
28706
28728
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28707
28729
  ,
28708
- onChange: this.change("startX")
28730
+ onChange: this.change("startX"),
28731
+ analytics: analyticsStub
28709
28732
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28710
- buttonSets: [],
28711
28733
  buttonsVisible: "never",
28712
28734
  value: this.props.startY
28713
28735
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28714
28736
  ,
28715
- onChange: this.change("startY")
28737
+ onChange: this.change("startY"),
28738
+ analytics: analyticsStub
28716
28739
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28717
28740
  className: "perseus-widget-row"
28718
28741
  }, "End: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28719
- buttonSets: [],
28720
28742
  buttonsVisible: "never",
28721
28743
  value: this.props.endX
28722
28744
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28723
28745
  ,
28724
- onChange: this.change("endX")
28746
+ onChange: this.change("endX"),
28747
+ analytics: analyticsStub
28725
28748
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28726
- buttonSets: [],
28727
28749
  buttonsVisible: "never",
28728
28750
  value: this.props.endY
28729
28751
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28730
28752
  ,
28731
- onChange: this.change("endY")
28753
+ onChange: this.change("endY"),
28754
+ analytics: analyticsStub
28732
28755
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28733
28756
  className: "perseus-widget-row"
28734
28757
  }, /*#__PURE__*/React.createElement(ColorPicker, {
@@ -28801,20 +28824,23 @@ class MovablePointEditor extends React.Component {
28801
28824
  const {
28802
28825
  TeX
28803
28826
  } = getDependencies();
28827
+ const analyticsStub = {
28828
+ onAnalyticsEvent: () => Promise.resolve()
28829
+ };
28804
28830
  return /*#__PURE__*/React.createElement("div", {
28805
28831
  className: "graph-settings"
28806
28832
  }, /*#__PURE__*/React.createElement("div", {
28807
28833
  className: "perseus-widget-row"
28808
28834
  }, "Start: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28809
- buttonSets: [],
28810
28835
  buttonsVisible: "never",
28811
28836
  value: this.props.startX,
28812
- onChange: this.change("startX")
28837
+ onChange: this.change("startX"),
28838
+ analytics: analyticsStub
28813
28839
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28814
- buttonSets: [],
28815
28840
  buttonsVisible: "never",
28816
28841
  value: this.props.startY,
28817
- onChange: this.change("startY")
28842
+ onChange: this.change("startY"),
28843
+ analytics: analyticsStub
28818
28844
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28819
28845
  className: "perseus-widget-row"
28820
28846
  }, "Update ", /*#__PURE__*/React.createElement(TeX, null, "(x_n, y_n)"), " for ", /*#__PURE__*/React.createElement(TeX, null, "n ="), " ", /*#__PURE__*/React.createElement(NumberInput$b, {
@@ -28862,32 +28888,35 @@ class MovableLineEditor extends React.Component {
28862
28888
  const {
28863
28889
  TeX
28864
28890
  } = getDependencies();
28891
+ const analyticsStub = {
28892
+ onAnalyticsEvent: () => Promise.resolve()
28893
+ };
28865
28894
  return /*#__PURE__*/React.createElement("div", {
28866
28895
  className: "graph-settings"
28867
28896
  }, "Initial position:", /*#__PURE__*/React.createElement("div", {
28868
28897
  className: "perseus-widget-row"
28869
28898
  }, "Start: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28870
- buttonSets: [],
28871
28899
  buttonsVisible: "never",
28872
28900
  value: this.props.startX,
28873
- onChange: this.change("startX")
28901
+ onChange: this.change("startX"),
28902
+ analytics: analyticsStub
28874
28903
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28875
- buttonSets: [],
28876
28904
  buttonsVisible: "never",
28877
28905
  value: this.props.startY,
28878
- onChange: this.change("startY")
28906
+ onChange: this.change("startY"),
28907
+ analytics: analyticsStub
28879
28908
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28880
28909
  className: "perseus-widget-row"
28881
28910
  }, "End: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28882
- buttonSets: [],
28883
28911
  buttonsVisible: "never",
28884
28912
  value: this.props.endX,
28885
- onChange: this.change("endX")
28913
+ onChange: this.change("endX"),
28914
+ analytics: analyticsStub
28886
28915
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28887
- buttonSets: [],
28888
28916
  buttonsVisible: "never",
28889
28917
  value: this.props.endY,
28890
- onChange: this.change("endY")
28918
+ onChange: this.change("endY"),
28919
+ analytics: analyticsStub
28891
28920
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28892
28921
  className: "perseus-widget-row"
28893
28922
  }, "Start updates ", /*#__PURE__*/React.createElement(TeX, null, "(x_n, y_n)"), " for ", /*#__PURE__*/React.createElement(TeX, null, "n ="), /*#__PURE__*/React.createElement(NumberInput$b, {
@@ -28946,33 +28975,36 @@ class FunctionEditor extends React.Component {
28946
28975
  const {
28947
28976
  TeX
28948
28977
  } = getDependencies();
28978
+ const analyticsStub = {
28979
+ onAnalyticsEvent: () => Promise.resolve()
28980
+ };
28949
28981
  return /*#__PURE__*/React.createElement("div", {
28950
28982
  className: "graph-settings"
28951
28983
  }, /*#__PURE__*/React.createElement("div", {
28952
28984
  className: "perseus-widget-row"
28953
28985
  }, /*#__PURE__*/React.createElement(TeX, null, this.props.funcName + "(x)="), " ", /*#__PURE__*/React.createElement(MathInput, {
28954
- buttonSets: [],
28955
28986
  buttonsVisible: "never",
28956
28987
  value: this.props.value
28957
28988
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28958
28989
  ,
28959
- onChange: this.change("value")
28990
+ onChange: this.change("value"),
28991
+ analytics: analyticsStub
28960
28992
  })), /*#__PURE__*/React.createElement("div", {
28961
28993
  className: "perseus-widget-row"
28962
28994
  }, "Range: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
28963
- buttonSets: [],
28964
28995
  buttonsVisible: "never",
28965
28996
  value: this.props.rangeMin
28966
28997
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28967
28998
  ,
28968
- onChange: this.change("rangeMin")
28999
+ onChange: this.change("rangeMin"),
29000
+ analytics: analyticsStub
28969
29001
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
28970
- buttonSets: [],
28971
29002
  buttonsVisible: "never",
28972
29003
  value: this.props.rangeMax
28973
29004
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
28974
29005
  ,
28975
- onChange: this.change("rangeMax")
29006
+ onChange: this.change("rangeMax"),
29007
+ analytics: analyticsStub
28976
29008
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
28977
29009
  className: "perseus-widget-row"
28978
29010
  }, /*#__PURE__*/React.createElement(ColorPicker, {
@@ -29035,42 +29067,45 @@ class ParametricEditor extends React.Component {
29035
29067
  const {
29036
29068
  TeX
29037
29069
  } = getDependencies();
29070
+ const analyticsStub = {
29071
+ onAnalyticsEvent: () => Promise.resolve()
29072
+ };
29038
29073
  return /*#__PURE__*/React.createElement("div", {
29039
29074
  className: "graph-settings"
29040
29075
  }, /*#__PURE__*/React.createElement("div", {
29041
29076
  className: "perseus-widget-row"
29042
29077
  }, /*#__PURE__*/React.createElement(TeX, null, "X(t) ="), " ", /*#__PURE__*/React.createElement(MathInput, {
29043
- buttonSets: [],
29044
29078
  buttonsVisible: "never",
29045
29079
  value: this.props.x
29046
29080
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29047
29081
  ,
29048
- onChange: this.change("x")
29082
+ onChange: this.change("x"),
29083
+ analytics: analyticsStub
29049
29084
  })), /*#__PURE__*/React.createElement("div", {
29050
29085
  className: "perseus-widget-row"
29051
29086
  }, /*#__PURE__*/React.createElement(TeX, null, "Y(t) ="), " ", /*#__PURE__*/React.createElement(MathInput, {
29052
- buttonSets: [],
29053
29087
  buttonsVisible: "never",
29054
29088
  value: this.props.y
29055
29089
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29056
29090
  ,
29057
- onChange: this.change("y")
29091
+ onChange: this.change("y"),
29092
+ analytics: analyticsStub
29058
29093
  })), /*#__PURE__*/React.createElement("div", {
29059
29094
  className: "perseus-widget-row"
29060
29095
  }, "Range: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
29061
- buttonSets: [],
29062
29096
  buttonsVisible: "never",
29063
29097
  value: this.props.rangeMin
29064
29098
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29065
29099
  ,
29066
- onChange: this.change("rangeMin")
29100
+ onChange: this.change("rangeMin"),
29101
+ analytics: analyticsStub
29067
29102
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
29068
- buttonSets: [],
29069
29103
  buttonsVisible: "never",
29070
29104
  value: this.props.rangeMax
29071
29105
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29072
29106
  ,
29073
- onChange: this.change("rangeMax")
29107
+ onChange: this.change("rangeMax"),
29108
+ analytics: analyticsStub
29074
29109
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
29075
29110
  className: "perseus-widget-row"
29076
29111
  }, /*#__PURE__*/React.createElement(ColorPicker, {
@@ -29136,6 +29171,9 @@ class LabelEditor extends React.Component {
29136
29171
  const {
29137
29172
  TeX
29138
29173
  } = getDependencies();
29174
+ const analyticsStub = {
29175
+ onAnalyticsEvent: () => Promise.resolve()
29176
+ };
29139
29177
  return /*#__PURE__*/React.createElement("div", {
29140
29178
  className: "graph-settings"
29141
29179
  }, /*#__PURE__*/React.createElement("div", {
@@ -29151,19 +29189,19 @@ class LabelEditor extends React.Component {
29151
29189
  })), /*#__PURE__*/React.createElement("div", {
29152
29190
  className: "perseus-widget-row"
29153
29191
  }, "Location: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
29154
- buttonSets: [],
29155
29192
  buttonsVisible: "never",
29156
29193
  value: this.props.coordX
29157
29194
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29158
29195
  ,
29159
- onChange: this.change("coordX")
29196
+ onChange: this.change("coordX"),
29197
+ analytics: analyticsStub
29160
29198
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
29161
- buttonSets: [],
29162
29199
  buttonsVisible: "never",
29163
29200
  value: this.props.coordY
29164
29201
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29165
29202
  ,
29166
- onChange: this.change("coordY")
29203
+ onChange: this.change("coordY"),
29204
+ analytics: analyticsStub
29167
29205
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
29168
29206
  className: "perseus-widget-row"
29169
29207
  }, /*#__PURE__*/React.createElement(ColorPicker, {
@@ -29205,42 +29243,45 @@ class RectangleEditor extends React.Component {
29205
29243
  const {
29206
29244
  TeX
29207
29245
  } = getDependencies();
29246
+ const analyticsStub = {
29247
+ onAnalyticsEvent: () => Promise.resolve()
29248
+ };
29208
29249
  return /*#__PURE__*/React.createElement("div", {
29209
29250
  className: "graph-settings"
29210
29251
  }, /*#__PURE__*/React.createElement("div", {
29211
29252
  className: "perseus-widget-row"
29212
29253
  }, "Bottom left: ", /*#__PURE__*/React.createElement(TeX, null, "\\Large("), /*#__PURE__*/React.createElement(MathInput, {
29213
- buttonSets: [],
29214
29254
  buttonsVisible: "never",
29215
29255
  value: this.props.coordX
29216
29256
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29217
29257
  ,
29218
- onChange: this.change("coordX")
29258
+ onChange: this.change("coordX"),
29259
+ analytics: analyticsStub
29219
29260
  }), /*#__PURE__*/React.createElement(TeX, null, ","), " ", /*#__PURE__*/React.createElement(MathInput, {
29220
- buttonSets: [],
29221
29261
  buttonsVisible: "never",
29222
29262
  value: this.props.coordY
29223
29263
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29224
29264
  ,
29225
- onChange: this.change("coordY")
29265
+ onChange: this.change("coordY"),
29266
+ analytics: analyticsStub
29226
29267
  }), /*#__PURE__*/React.createElement(TeX, null, "\\Large)")), /*#__PURE__*/React.createElement("div", {
29227
29268
  className: "perseus-widget-row"
29228
29269
  }, "Width:", " ", /*#__PURE__*/React.createElement(MathInput, {
29229
- buttonSets: [],
29230
29270
  buttonsVisible: "never",
29231
29271
  value: this.props.width
29232
29272
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29233
29273
  ,
29234
- onChange: this.change("width")
29274
+ onChange: this.change("width"),
29275
+ analytics: analyticsStub
29235
29276
  })), /*#__PURE__*/React.createElement("div", {
29236
29277
  className: "perseus-widget-row"
29237
29278
  }, "Height:", " ", /*#__PURE__*/React.createElement(MathInput, {
29238
- buttonSets: [],
29239
29279
  buttonsVisible: "never",
29240
29280
  value: this.props.height
29241
29281
  // @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
29242
29282
  ,
29243
- onChange: this.change("height")
29283
+ onChange: this.change("height"),
29284
+ analytics: analyticsStub
29244
29285
  })), /*#__PURE__*/React.createElement("div", {
29245
29286
  className: "perseus-widget-row"
29246
29287
  }, /*#__PURE__*/React.createElement(ColorPicker, {