@khanacademy/perseus 19.7.0 → 19.7.2

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 CHANGED
@@ -4285,45 +4285,16 @@ html body .mq-editable-field .mq-selection .mq-nthroot-container * {
4285
4285
  stroke-opacity: 1;
4286
4286
  }
4287
4287
 
4288
- @font-face {
4289
- font-family: "CMU Serif";
4290
- font-style: roman;
4291
- font-weight: 500;
4292
- src: url("./fonts/cmu-serif-500-roman.woff2") format("woff2"), url("./fonts/cmu-serif-500-roman.ttf") format("truetype");
4293
- }
4294
-
4295
- @font-face {
4296
- font-family: "CMU Serif";
4297
- font-style: italic;
4298
- font-weight: 500;
4299
- src: url("./fonts/cmu-serif-500-italic.woff2") format("woff2"), url("./fonts/cmu-serif-500-italic.ttf") format("truetype");
4300
- }
4301
-
4302
- @font-face {
4303
- font-family: "CMU Serif";
4304
- font-style: roman;
4305
- font-weight: 700;
4306
- src: url("./fonts/cmu-serif-700-roman.woff2") format("woff2"), url("./fonts/cmu-serif-700-roman.ttf") format("truetype");
4307
- }
4308
-
4309
- @font-face {
4310
- font-family: "CMU Serif";
4311
- font-style: italic;
4312
- font-weight: 700;
4313
- src: url("./fonts/cmu-serif-700-italic.woff2") format("woff2"), url("./fonts/cmu-serif-700-italic.ttf") format("truetype");
4314
- }
4315
-
4316
- .MafsView {
4317
- font-family: "CMU Serif", serif;
4318
- }
4319
-
4320
4288
  /**
4321
4289
  * Overrides of mafs styles-- we will want to move this into JS land
4322
4290
  * to take advantage of WB tokens, but I cannot get that to work at the moment
4323
4291
  */
4324
4292
  .MafsView {
4325
4293
  --mafs-bg: transparent;
4326
- --mafs-fg: #21242c; /* WB color.offBlack */
4294
+ --mafs-fg: rgb(33, 36, 44); /* WB color.offBlack */
4295
+
4296
+ --mafs-line-color: var(--mafs-fg);
4297
+ --grid-line-subdivision-color: rgba(33, 36, 44, 0.16);
4327
4298
 
4328
4299
  --mafs-blue: #1865f2; /* WB color.blue */
4329
4300
  --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] = getInteractiveBoxFromSizeClass(props.containerSizeClass);
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
- }, !!legacyGrid && /*#__PURE__*/React.createElement(Grid, props), renderGraph(_extends({}, props, {
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.0";
42131
+ const libVersion = "19.7.2";
42128
42132
  addLibraryVersionToPerseusDebug(libName, libVersion);
42129
42133
 
42130
42134
  const apiVersion = {