@khanacademy/perseus 19.7.0 → 19.7.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.css +4 -1
- package/dist/es/index.js +11 -7
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +4 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/widgets/interactive-graphs/mafs-graph.d.ts +2 -0
- package/package.json +1 -1
package/dist/es/index.css
CHANGED
|
@@ -4323,7 +4323,10 @@ html body .mq-editable-field .mq-selection .mq-nthroot-container * {
|
|
|
4323
4323
|
*/
|
|
4324
4324
|
.MafsView {
|
|
4325
4325
|
--mafs-bg: transparent;
|
|
4326
|
-
--mafs-fg:
|
|
4326
|
+
--mafs-fg: rgb(33, 36, 44); /* WB color.offBlack */
|
|
4327
|
+
|
|
4328
|
+
--mafs-line-color: var(--mafs-fg);
|
|
4329
|
+
--grid-line-subdivision-color: rgba(33, 36, 44, 0.16);
|
|
4327
4330
|
|
|
4328
4331
|
--mafs-blue: #1865f2; /* WB color.blue */
|
|
4329
4332
|
--mafs-red: #d92916; /* WB color.red */
|
package/dist/es/index.js
CHANGED
|
@@ -29011,7 +29011,7 @@ const MafsGraph = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
29011
29011
|
React.useImperativeHandle(ref, () => ({
|
|
29012
29012
|
getUserInput: () => graphRef.current
|
|
29013
29013
|
}));
|
|
29014
|
-
const [width, height] =
|
|
29014
|
+
const [width, height] = props.box;
|
|
29015
29015
|
const legacyGrid = getLegacyGrid([width, height], props.backgroundImage);
|
|
29016
29016
|
return /*#__PURE__*/React.createElement(View, {
|
|
29017
29017
|
style: {
|
|
@@ -29035,7 +29035,7 @@ const MafsGraph = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
29035
29035
|
zoom: false,
|
|
29036
29036
|
width: width,
|
|
29037
29037
|
height: height
|
|
29038
|
-
},
|
|
29038
|
+
}, !legacyGrid && /*#__PURE__*/React.createElement(Grid, props), renderGraph(_extends({}, props, {
|
|
29039
29039
|
onGraphChange: handleGraphUpdate
|
|
29040
29040
|
})))));
|
|
29041
29041
|
});
|
|
@@ -30256,13 +30256,19 @@ class InteractiveGraph extends React.Component {
|
|
|
30256
30256
|
// <Renderer apiOptions={{flags: {mafs: {segment}}}}
|
|
30257
30257
|
render() {
|
|
30258
30258
|
var _this$props$apiOption;
|
|
30259
|
+
const box = getInteractiveBoxFromSizeClass(this.props.containerSizeClass);
|
|
30260
|
+
const gridStep = this.props.gridStep || Util.getGridStep(this.props.range, this.props.step, box[0]);
|
|
30261
|
+
const snapStep = this.props.snapStep || Util.snapStepFromGridStep(gridStep);
|
|
30262
|
+
|
|
30259
30263
|
// Mafs shim
|
|
30260
30264
|
if ((_this$props$apiOption = this.props.apiOptions) != null && (_this$props$apiOption = _this$props$apiOption.flags) != null && (_this$props$apiOption = _this$props$apiOption["mafs"]) != null && _this$props$apiOption[this.props.graph.type]) {
|
|
30261
30265
|
return /*#__PURE__*/React.createElement(MafsGraph, _extends({}, this.props, {
|
|
30262
|
-
ref: this.mafsRef
|
|
30266
|
+
ref: this.mafsRef,
|
|
30267
|
+
gridStep: gridStep,
|
|
30268
|
+
snapStep: snapStep,
|
|
30269
|
+
box: box
|
|
30263
30270
|
}));
|
|
30264
30271
|
}
|
|
30265
|
-
const box = getInteractiveBoxFromSizeClass(this.props.containerSizeClass);
|
|
30266
30272
|
let instructions;
|
|
30267
30273
|
// isClickToAddPoints() only applies to points and polygons
|
|
30268
30274
|
if (this.isClickToAddPoints() && this.state.shouldShowInstructions) {
|
|
@@ -30278,8 +30284,6 @@ class InteractiveGraph extends React.Component {
|
|
|
30278
30284
|
if (this.isClickToAddPoints()) {
|
|
30279
30285
|
onMouseDown = this.handleAddPointsMouseDown;
|
|
30280
30286
|
}
|
|
30281
|
-
const gridStep = this.props.gridStep || Util.getGridStep(this.props.range, this.props.step, box[0]);
|
|
30282
|
-
const snapStep = this.props.snapStep || Util.snapStepFromGridStep(gridStep);
|
|
30283
30287
|
const isMobile = this.props.apiOptions.isMobile;
|
|
30284
30288
|
return /*#__PURE__*/React.createElement("div", {
|
|
30285
30289
|
className: "perseus-widget " + "perseus-widget-interactive-graph",
|
|
@@ -42124,7 +42128,7 @@ const init = function init(options) {
|
|
|
42124
42128
|
|
|
42125
42129
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
42126
42130
|
const libName = "@khanacademy/perseus";
|
|
42127
|
-
const libVersion = "19.7.
|
|
42131
|
+
const libVersion = "19.7.1";
|
|
42128
42132
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
42129
42133
|
|
|
42130
42134
|
const apiVersion = {
|