@khanacademy/perseus 22.0.0 → 22.0.1

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
@@ -2594,7 +2594,7 @@ class Expression extends React__namespace.Component {
2594
2594
  blurInputPath = inputPath => {
2595
2595
  // eslint-disable-next-line react/no-string-refs
2596
2596
  // @ts-expect-error - TS2339 - Property 'blur' does not exist on type 'ReactInstance'.
2597
- this.refs.input.blur();
2597
+ this.refs.input?.blur();
2598
2598
  };
2599
2599
 
2600
2600
  // HACK(joel)
@@ -21945,7 +21945,7 @@ class SimpleKeypadInput extends React__namespace.Component {
21945
21945
 
21946
21946
  blur() {
21947
21947
  // @ts-expect-error - TS2339 - Property 'blur' does not exist on type 'ReactInstance'.
21948
- this.refs.input.blur(); // eslint-disable-line react/no-string-refs
21948
+ this.refs.input?.blur(); // eslint-disable-line react/no-string-refs
21949
21949
  }
21950
21950
 
21951
21951
  getValue() {
@@ -22152,7 +22152,7 @@ class InputNumber extends React__namespace.Component {
22152
22152
  blurInputPath = inputPath => {
22153
22153
  // eslint-disable-next-line react/no-string-refs
22154
22154
  // @ts-expect-error - TS2339 - Property 'blur' does not exist on type 'ReactInstance'.
22155
- this.refs.input.blur();
22155
+ this.refs.input?.blur();
22156
22156
  };
22157
22157
  getInputPaths = () => {
22158
22158
  // The widget itself is an input, so we return a single empty list to
@@ -29170,7 +29170,7 @@ function Arrowhead(props) {
29170
29170
  d: arrowPath,
29171
29171
  fill: "none",
29172
29172
  style: {
29173
- stroke: "inherit"
29173
+ stroke: props.color ?? "inherit"
29174
29174
  },
29175
29175
  strokeLinejoin: "round",
29176
29176
  strokeLinecap: "round"
@@ -29776,22 +29776,27 @@ function AxisArrows() {
29776
29776
  const {
29777
29777
  range: [[xMin, xMax], [yMin, yMax]]
29778
29778
  } = useGraphConfig();
29779
+ const axisColor = "var(--mafs-fg)";
29779
29780
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Arrowhead, {
29781
+ color: axisColor,
29782
+ x: xMin,
29783
+ y: 0,
29784
+ angle: 180
29785
+ }), /*#__PURE__*/React__default["default"].createElement(Arrowhead, {
29786
+ color: axisColor,
29780
29787
  x: xMax,
29781
29788
  y: 0,
29782
29789
  angle: 0
29783
29790
  }), /*#__PURE__*/React__default["default"].createElement(Arrowhead, {
29791
+ color: axisColor,
29784
29792
  x: 0,
29785
29793
  y: yMin,
29786
- angle: 90
29787
- }), /*#__PURE__*/React__default["default"].createElement(Arrowhead, {
29788
- x: xMin,
29789
- y: 0,
29790
- angle: 180
29794
+ angle: 270
29791
29795
  }), /*#__PURE__*/React__default["default"].createElement(Arrowhead, {
29796
+ color: axisColor,
29792
29797
  x: 0,
29793
29798
  y: yMax,
29794
- angle: 270
29799
+ angle: 90
29795
29800
  }));
29796
29801
  }
29797
29802
 
@@ -29919,7 +29924,7 @@ const Grid = props => {
29919
29924
  return props.markings === "none" ? null : /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(mafs.Coordinates.Cartesian, {
29920
29925
  xAxis: axisOptions(props, 0),
29921
29926
  yAxis: axisOptions(props, 1)
29922
- }), props.markings === "graph" && /*#__PURE__*/React__namespace.createElement(AxisArrows, null),
29927
+ }),
29923
29928
  // Only render the axis ticks and arrows if the markings are set to a full "graph"
29924
29929
  props.markings === "graph" && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(AxisTicks, {
29925
29930
  range: props.range,
@@ -43331,7 +43336,7 @@ const init = function (options) {
43331
43336
 
43332
43337
  // This file is processed by a Rollup plugin (replace) to inject the production
43333
43338
  const libName = "@khanacademy/perseus";
43334
- const libVersion = "22.0.0";
43339
+ const libVersion = "22.0.1";
43335
43340
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
43336
43341
 
43337
43342
  const apiVersion = {