@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/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/index.js
CHANGED
|
@@ -29165,7 +29165,7 @@ const MafsGraph = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
|
29165
29165
|
React__namespace.useImperativeHandle(ref, () => ({
|
|
29166
29166
|
getUserInput: () => graphRef.current
|
|
29167
29167
|
}));
|
|
29168
|
-
const [width, height] =
|
|
29168
|
+
const [width, height] = props.box;
|
|
29169
29169
|
const legacyGrid = getLegacyGrid([width, height], props.backgroundImage);
|
|
29170
29170
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
29171
29171
|
style: {
|
|
@@ -29189,7 +29189,7 @@ const MafsGraph = /*#__PURE__*/React__namespace.forwardRef((props, ref) => {
|
|
|
29189
29189
|
zoom: false,
|
|
29190
29190
|
width: width,
|
|
29191
29191
|
height: height
|
|
29192
|
-
},
|
|
29192
|
+
}, !legacyGrid && /*#__PURE__*/React__namespace.createElement(Grid, props), renderGraph({
|
|
29193
29193
|
...props,
|
|
29194
29194
|
onGraphChange: handleGraphUpdate
|
|
29195
29195
|
}))));
|
|
@@ -30389,13 +30389,19 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
30389
30389
|
// const segment: boolean = useFeatureIsOn("mafs-segment-graph");
|
|
30390
30390
|
// <Renderer apiOptions={{flags: {mafs: {segment}}}}
|
|
30391
30391
|
render() {
|
|
30392
|
+
const box = getInteractiveBoxFromSizeClass(this.props.containerSizeClass);
|
|
30393
|
+
const gridStep = this.props.gridStep || Util.getGridStep(this.props.range, this.props.step, box[0]);
|
|
30394
|
+
const snapStep = this.props.snapStep || Util.snapStepFromGridStep(gridStep);
|
|
30395
|
+
|
|
30392
30396
|
// Mafs shim
|
|
30393
30397
|
if (this.props.apiOptions?.flags?.["mafs"]?.[this.props.graph.type]) {
|
|
30394
30398
|
return /*#__PURE__*/React__namespace.createElement(MafsGraph, _extends({}, this.props, {
|
|
30395
|
-
ref: this.mafsRef
|
|
30399
|
+
ref: this.mafsRef,
|
|
30400
|
+
gridStep: gridStep,
|
|
30401
|
+
snapStep: snapStep,
|
|
30402
|
+
box: box
|
|
30396
30403
|
}));
|
|
30397
30404
|
}
|
|
30398
|
-
const box = getInteractiveBoxFromSizeClass(this.props.containerSizeClass);
|
|
30399
30405
|
let instructions;
|
|
30400
30406
|
// isClickToAddPoints() only applies to points and polygons
|
|
30401
30407
|
if (this.isClickToAddPoints() && this.state.shouldShowInstructions) {
|
|
@@ -30411,8 +30417,6 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
30411
30417
|
if (this.isClickToAddPoints()) {
|
|
30412
30418
|
onMouseDown = this.handleAddPointsMouseDown;
|
|
30413
30419
|
}
|
|
30414
|
-
const gridStep = this.props.gridStep || Util.getGridStep(this.props.range, this.props.step, box[0]);
|
|
30415
|
-
const snapStep = this.props.snapStep || Util.snapStepFromGridStep(gridStep);
|
|
30416
30420
|
const isMobile = this.props.apiOptions.isMobile;
|
|
30417
30421
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
30418
30422
|
className: "perseus-widget " + "perseus-widget-interactive-graph",
|
|
@@ -42258,7 +42262,7 @@ const init = function (options) {
|
|
|
42258
42262
|
|
|
42259
42263
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
42260
42264
|
const libName = "@khanacademy/perseus";
|
|
42261
|
-
const libVersion = "19.7.
|
|
42265
|
+
const libVersion = "19.7.1";
|
|
42262
42266
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
42263
42267
|
|
|
42264
42268
|
const apiVersion = {
|