@khanacademy/perseus 19.3.0 → 19.3.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
@@ -28227,6 +28227,33 @@ class Graph extends React__namespace.Component {
28227
28227
  allowScratchpad: true,
28228
28228
  setDrawingAreaAvailable: this.props.setDrawingAreaAvailable
28229
28229
  });
28230
+
28231
+ // Maybe move this out later
28232
+ if (this.props.lockedFigures) {
28233
+ for (const lockedFigure of this.props.lockedFigures) {
28234
+ switch (lockedFigure.type) {
28235
+ case "point":
28236
+ graphie.circle(
28237
+ // center
28238
+ lockedFigure.coord,
28239
+ // radius
28240
+ 0.2,
28241
+ // style
28242
+ lockedFigure.style);
28243
+ break;
28244
+ default:
28245
+ /**
28246
+ * Devlopment-time future-proofing: This `never` should
28247
+ * fail during type-checking if we add a new locked
28248
+ * shape type and forget to handle it in any other
28249
+ * switch case here.
28250
+ */
28251
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
28252
+ lockedFigure.type;
28253
+ throw new Error(`Unknown locked shape type: ${lockedFigure.type}`);
28254
+ }
28255
+ }
28256
+ }
28230
28257
  this._updateProtractor();
28231
28258
  this._updateRuler();
28232
28259
 
@@ -29556,7 +29583,8 @@ class InteractiveGraph extends React__namespace.Component {
29556
29583
  onMouseDown: onMouseDown,
29557
29584
  onGraphieUpdated: this.setGraphie,
29558
29585
  setDrawingAreaAvailable: this.props.apiOptions.setDrawingAreaAvailable,
29559
- isMobile: isMobile
29586
+ isMobile: isMobile,
29587
+ lockedFigures: this.props.lockedFigures
29560
29588
  }));
29561
29589
  }
29562
29590
  static getQuadraticCoefficients(coords) {
@@ -41690,7 +41718,7 @@ const init = function (options) {
41690
41718
 
41691
41719
  // This file is processed by a Rollup plugin (replace) to inject the production
41692
41720
  const libName = "@khanacademy/perseus";
41693
- const libVersion = "19.3.0";
41721
+ const libVersion = "19.3.1";
41694
41722
  perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
41695
41723
 
41696
41724
  const apiVersion = {