@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/es/index.js
CHANGED
|
@@ -2320,9 +2320,10 @@ class Expression extends React.Component {
|
|
|
2320
2320
|
this.refs.input.focus();
|
|
2321
2321
|
};
|
|
2322
2322
|
this.blurInputPath = inputPath => {
|
|
2323
|
+
var _this$refs$input;
|
|
2323
2324
|
// eslint-disable-next-line react/no-string-refs
|
|
2324
2325
|
// @ts-expect-error - TS2339 - Property 'blur' does not exist on type 'ReactInstance'.
|
|
2325
|
-
this.refs.input.blur();
|
|
2326
|
+
(_this$refs$input = this.refs.input) == null || _this$refs$input.blur();
|
|
2326
2327
|
};
|
|
2327
2328
|
this.getInputPaths = () => {
|
|
2328
2329
|
// The widget itself is an input, so we return a single empty list to
|
|
@@ -21718,8 +21719,9 @@ class SimpleKeypadInput extends React.Component {
|
|
|
21718
21719
|
}
|
|
21719
21720
|
|
|
21720
21721
|
blur() {
|
|
21722
|
+
var _this$refs$input;
|
|
21721
21723
|
// @ts-expect-error - TS2339 - Property 'blur' does not exist on type 'ReactInstance'.
|
|
21722
|
-
this.refs.input.blur(); // eslint-disable-line react/no-string-refs
|
|
21724
|
+
(_this$refs$input = this.refs.input) == null || _this$refs$input.blur(); // eslint-disable-line react/no-string-refs
|
|
21723
21725
|
}
|
|
21724
21726
|
|
|
21725
21727
|
getValue() {
|
|
@@ -21866,9 +21868,10 @@ class InputNumber extends React.Component {
|
|
|
21866
21868
|
this.refs.input.focus();
|
|
21867
21869
|
};
|
|
21868
21870
|
this.blurInputPath = inputPath => {
|
|
21871
|
+
var _this$refs$input;
|
|
21869
21872
|
// eslint-disable-next-line react/no-string-refs
|
|
21870
21873
|
// @ts-expect-error - TS2339 - Property 'blur' does not exist on type 'ReactInstance'.
|
|
21871
|
-
this.refs.input.blur();
|
|
21874
|
+
(_this$refs$input = this.refs.input) == null || _this$refs$input.blur();
|
|
21872
21875
|
};
|
|
21873
21876
|
this.getInputPaths = () => {
|
|
21874
21877
|
// The widget itself is an input, so we return a single empty list to
|
|
@@ -28868,6 +28871,7 @@ function scaleCommandBy(scaleFactor) {
|
|
|
28868
28871
|
// don't want that.
|
|
28869
28872
|
const arrowPath = pathBuilder().move(-3, 4).curve(-2.75, 2.5, 0, 0.25, 0.75, 0).curve(0, -0.25, -2.75, -2.5, -3, -4).scale(1.4).build();
|
|
28870
28873
|
function Arrowhead(props) {
|
|
28874
|
+
var _props$color;
|
|
28871
28875
|
const [point] = useTransform([props.x, props.y]);
|
|
28872
28876
|
return /*#__PURE__*/React.createElement("g", {
|
|
28873
28877
|
transform: `translate(${point[0]} ${point[1]}) rotate(${-props.angle})`
|
|
@@ -28877,7 +28881,7 @@ function Arrowhead(props) {
|
|
|
28877
28881
|
d: arrowPath,
|
|
28878
28882
|
fill: "none",
|
|
28879
28883
|
style: {
|
|
28880
|
-
stroke: "inherit"
|
|
28884
|
+
stroke: (_props$color = props.color) != null ? _props$color : "inherit"
|
|
28881
28885
|
},
|
|
28882
28886
|
strokeLinejoin: "round",
|
|
28883
28887
|
strokeLinecap: "round"
|
|
@@ -29472,22 +29476,27 @@ function AxisArrows() {
|
|
|
29472
29476
|
const {
|
|
29473
29477
|
range: [[xMin, xMax], [yMin, yMax]]
|
|
29474
29478
|
} = useGraphConfig();
|
|
29479
|
+
const axisColor = "var(--mafs-fg)";
|
|
29475
29480
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Arrowhead, {
|
|
29481
|
+
color: axisColor,
|
|
29482
|
+
x: xMin,
|
|
29483
|
+
y: 0,
|
|
29484
|
+
angle: 180
|
|
29485
|
+
}), /*#__PURE__*/React__default.createElement(Arrowhead, {
|
|
29486
|
+
color: axisColor,
|
|
29476
29487
|
x: xMax,
|
|
29477
29488
|
y: 0,
|
|
29478
29489
|
angle: 0
|
|
29479
29490
|
}), /*#__PURE__*/React__default.createElement(Arrowhead, {
|
|
29491
|
+
color: axisColor,
|
|
29480
29492
|
x: 0,
|
|
29481
29493
|
y: yMin,
|
|
29482
|
-
angle:
|
|
29483
|
-
}), /*#__PURE__*/React__default.createElement(Arrowhead, {
|
|
29484
|
-
x: xMin,
|
|
29485
|
-
y: 0,
|
|
29486
|
-
angle: 180
|
|
29494
|
+
angle: 270
|
|
29487
29495
|
}), /*#__PURE__*/React__default.createElement(Arrowhead, {
|
|
29496
|
+
color: axisColor,
|
|
29488
29497
|
x: 0,
|
|
29489
29498
|
y: yMax,
|
|
29490
|
-
angle:
|
|
29499
|
+
angle: 90
|
|
29491
29500
|
}));
|
|
29492
29501
|
}
|
|
29493
29502
|
|
|
@@ -29613,7 +29622,7 @@ const Grid = props => {
|
|
|
29613
29622
|
return props.markings === "none" ? null : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Coordinates.Cartesian, {
|
|
29614
29623
|
xAxis: axisOptions(props, 0),
|
|
29615
29624
|
yAxis: axisOptions(props, 1)
|
|
29616
|
-
}),
|
|
29625
|
+
}),
|
|
29617
29626
|
// Only render the axis ticks and arrows if the markings are set to a full "graph"
|
|
29618
29627
|
props.markings === "graph" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(AxisTicks, {
|
|
29619
29628
|
range: props.range,
|
|
@@ -43009,7 +43018,7 @@ const init = function init(options) {
|
|
|
43009
43018
|
|
|
43010
43019
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
43011
43020
|
const libName = "@khanacademy/perseus";
|
|
43012
|
-
const libVersion = "22.0.
|
|
43021
|
+
const libVersion = "22.0.1";
|
|
43013
43022
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
43014
43023
|
|
|
43015
43024
|
const apiVersion = {
|