@khanacademy/perseus 19.1.1 → 19.1.3
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/CHANGELOG.md +24 -0
- package/dist/all-widgets.d.ts +1 -1
- package/dist/basic-widgets.d.ts +1 -1
- package/dist/components/graph.d.ts +7 -6
- package/dist/components/graphie.d.ts +8 -1
- package/dist/es/index.js +49 -51
- package/dist/es/index.js.map +1 -1
- package/dist/extra-widgets.d.ts +1 -1
- package/dist/index.js +48 -49
- package/dist/index.js.map +1 -1
- package/dist/perseus-types.d.ts +3 -3
- package/dist/types.d.ts +1 -1
- package/dist/util/graphie.d.ts +13 -6
- package/dist/widgets/categorizer.d.ts +1 -1
- package/dist/widgets/cs-program.d.ts +1 -1
- package/dist/widgets/definition.d.ts +1 -1
- package/dist/widgets/deprecated-standin/index.d.ts +1 -1
- package/dist/widgets/dropdown.d.ts +1 -1
- package/dist/widgets/explanation.d.ts +1 -1
- package/dist/widgets/expression.d.ts +14 -14
- package/dist/widgets/graded-group-set.d.ts +1 -1
- package/dist/widgets/graded-group.d.ts +1 -1
- package/dist/widgets/grapher.d.ts +1 -1
- package/dist/widgets/group.d.ts +1 -1
- package/dist/widgets/iframe.d.ts +1 -1
- package/dist/widgets/image.d.ts +1 -1
- package/dist/widgets/input-number.d.ts +1 -1
- package/dist/widgets/interaction.d.ts +1 -1
- package/dist/widgets/interactive-graph.d.ts +1 -1
- package/dist/widgets/label-image.d.ts +14 -14
- package/dist/widgets/lights-puzzle.d.ts +1 -1
- package/dist/widgets/matcher.d.ts +1 -1
- package/dist/widgets/matrix.d.ts +1 -1
- package/dist/widgets/measurer.d.ts +5 -5
- package/dist/widgets/molecule.d.ts +1 -1
- package/dist/widgets/number-line.d.ts +1 -1
- package/dist/widgets/numeric-input.d.ts +1 -1
- package/dist/widgets/orderer.d.ts +1 -1
- package/dist/widgets/passage-ref-target.d.ts +1 -1
- package/dist/widgets/passage-ref.d.ts +1 -1
- package/dist/widgets/passage.d.ts +1 -1
- package/dist/widgets/plotter.d.ts +1 -1
- package/dist/widgets/radio.d.ts +1 -1
- package/dist/widgets/reaction-diagram.d.ts +1 -1
- package/dist/widgets/sequence.d.ts +1 -1
- package/dist/widgets/simulator.d.ts +1 -1
- package/dist/widgets/sorter.d.ts +1 -1
- package/dist/widgets/table.d.ts +1 -1
- package/dist/widgets/unit.d.ts +1 -1
- package/dist/widgets/video.d.ts +1 -1
- package/package.json +3 -3
- package/src/__tests__/init.test.ts +10 -0
- package/src/__tests__/widgets.test.ts +2 -3
- package/src/components/graph.tsx +25 -20
- package/src/components/graphie.tsx +19 -14
- package/src/init.ts +1 -4
- package/src/perseus-types.ts +3 -3
- package/src/types.ts +4 -2
- package/src/util/graphie.test.ts +1 -15
- package/src/util/graphie.ts +14 -24
- package/src/util/interactive.ts +2 -2
- package/src/widgets/__tests__/__snapshots__/input-number.test.ts.snap +1 -1
- package/src/widgets/__tests__/__snapshots__/numeric-input.test.ts.snap +1 -1
- package/src/widgets/label-image/marker.tsx +4 -0
- package/src/widgets/label-image.tsx +2 -7
- package/src/widgets/measurer.tsx +8 -2
- package/src/widgets/plotter.tsx +2 -0
- package/src/widgets.ts +9 -4
- package/tsconfig-build.tsbuildinfo +1 -1
package/dist/extra-widgets.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ declare const _default: readonly Readonly<{
|
|
|
3
3
|
name: string;
|
|
4
4
|
displayName: string;
|
|
5
5
|
getWidget?: (() => import("react").ComponentType<any>) | undefined;
|
|
6
|
+
widget: import("react").ComponentType<any>;
|
|
6
7
|
accessible?: boolean | ((props: any) => boolean) | undefined;
|
|
7
8
|
hidden?: boolean | undefined;
|
|
8
9
|
version?: import("./types").Version | undefined;
|
|
@@ -17,6 +18,5 @@ declare const _default: readonly Readonly<{
|
|
|
17
18
|
propUpgrades?: {
|
|
18
19
|
[key: string]: (arg1: any) => any;
|
|
19
20
|
} | undefined;
|
|
20
|
-
widget: import("react").ComponentType<any>;
|
|
21
21
|
}>[];
|
|
22
22
|
export default _default;
|
package/dist/index.js
CHANGED
|
@@ -9647,15 +9647,6 @@ const GraphUtils = {
|
|
|
9647
9647
|
getDistance: function (point1, point2) {
|
|
9648
9648
|
return kmath.point.distanceToPoint(point1, point2);
|
|
9649
9649
|
},
|
|
9650
|
-
/**
|
|
9651
|
-
* Round the given coordinates to a given snap value
|
|
9652
|
-
* (e.g., nearest 0.2 increment)
|
|
9653
|
-
*/
|
|
9654
|
-
snapCoord: function (coord, snap) {
|
|
9655
|
-
return coord.map(function (val, i) {
|
|
9656
|
-
return KhanMath.roundToNearest(snap[i], val);
|
|
9657
|
-
});
|
|
9658
|
-
},
|
|
9659
9650
|
// Find the angle in degrees between two or three points
|
|
9660
9651
|
findAngle: function (point1, point2, vertex) {
|
|
9661
9652
|
if (vertex === undefined) {
|
|
@@ -16175,6 +16166,9 @@ const {
|
|
|
16175
16166
|
} = InteractiveUtil;
|
|
16176
16167
|
class Graphie extends React__namespace.Component {
|
|
16177
16168
|
graphieDivRef = /*#__PURE__*/React__namespace.createRef();
|
|
16169
|
+
_graphie = new Graphie$1(document.createElement("div"));
|
|
16170
|
+
_movables = {};
|
|
16171
|
+
movables = {};
|
|
16178
16172
|
static defaultProps = {
|
|
16179
16173
|
range: [[-10, 10], [-10, 10]],
|
|
16180
16174
|
options: {},
|
|
@@ -16217,7 +16211,6 @@ class Graphie extends React__namespace.Component {
|
|
|
16217
16211
|
* Use it for good and not evil.
|
|
16218
16212
|
*/
|
|
16219
16213
|
getGraphie = () => {
|
|
16220
|
-
// @ts-expect-error - TS2339 - Property '_graphie' does not exist on type 'Graphie'.
|
|
16221
16214
|
return this._graphie;
|
|
16222
16215
|
};
|
|
16223
16216
|
|
|
@@ -16239,10 +16232,12 @@ class Graphie extends React__namespace.Component {
|
|
|
16239
16232
|
};
|
|
16240
16233
|
return [ensureMinSize(this.props.box[0]), ensureMinSize(this.props.box[1])];
|
|
16241
16234
|
};
|
|
16235
|
+
|
|
16236
|
+
// @ts-expect-error - TS2322: Type '() => number[]' is not assignable to type '() => Coord'.
|
|
16242
16237
|
_scale = () => {
|
|
16243
16238
|
const box = this._box();
|
|
16244
16239
|
const range = this._range();
|
|
16245
|
-
return
|
|
16240
|
+
return box.map((pixelDim, i) => {
|
|
16246
16241
|
const unitDim = range[i][1] - range[i][0];
|
|
16247
16242
|
return pixelDim / unitDim;
|
|
16248
16243
|
});
|
|
@@ -16250,9 +16245,10 @@ class Graphie extends React__namespace.Component {
|
|
|
16250
16245
|
_setupGraphie = () => {
|
|
16251
16246
|
this._removeMovables();
|
|
16252
16247
|
const graphieDiv = ReactDOM__default["default"].findDOMNode(this.graphieDivRef.current);
|
|
16253
|
-
|
|
16254
|
-
|
|
16255
|
-
|
|
16248
|
+
if (graphieDiv == null || graphieDiv instanceof Text) {
|
|
16249
|
+
throw new Error("No graphie container div found");
|
|
16250
|
+
}
|
|
16251
|
+
graphieDiv.innerHTML = "";
|
|
16256
16252
|
const graphie = this._graphie = createGraphie(graphieDiv);
|
|
16257
16253
|
|
|
16258
16254
|
// This has to be called before addMouseLayer. You can re-init
|
|
@@ -16264,6 +16260,7 @@ class Graphie extends React__namespace.Component {
|
|
|
16264
16260
|
});
|
|
16265
16261
|
// Only add the mouselayer if we actually want one.
|
|
16266
16262
|
if (this.props.addMouseLayer) {
|
|
16263
|
+
// @ts-expect-error - TS2339: Property 'addMouseLayer' does not exist on type 'Graphie'.
|
|
16267
16264
|
graphie.addMouseLayer({
|
|
16268
16265
|
onClick: this.props.onClick,
|
|
16269
16266
|
onMouseDown: this.props.onMouseDown,
|
|
@@ -16272,12 +16269,13 @@ class Graphie extends React__namespace.Component {
|
|
|
16272
16269
|
setDrawingAreaAvailable: this.props.setDrawingAreaAvailable
|
|
16273
16270
|
});
|
|
16274
16271
|
}
|
|
16272
|
+
|
|
16273
|
+
// @ts-expect-error - TS2339: Property 'snap' does not exist on type 'Graphie'.
|
|
16275
16274
|
graphie.snap = this.props.options.snapStep || [1, 1];
|
|
16276
16275
|
if (this.props.responsive) {
|
|
16277
16276
|
// Overwrite fixed styles set in init()
|
|
16278
16277
|
// TODO(alex): Either make this component always responsive by
|
|
16279
16278
|
// itself, or always wrap it in other components so that it is.
|
|
16280
|
-
// @ts-expect-error - TS2769 - No overload matches this call. | TS2554 - Expected 2 arguments, but got 1.
|
|
16281
16279
|
$__default["default"](graphieDiv).css({
|
|
16282
16280
|
width: "100%",
|
|
16283
16281
|
height: "100%"
|
|
@@ -16291,9 +16289,7 @@ class Graphie extends React__namespace.Component {
|
|
|
16291
16289
|
};
|
|
16292
16290
|
_removeMovables = () => {
|
|
16293
16291
|
// _.invoke works even when this._movables is undefined
|
|
16294
|
-
// @ts-expect-error - TS2339 - Property '_movables' does not exist on type 'Graphie'.
|
|
16295
16292
|
___default["default"].invoke(this._movables, "remove");
|
|
16296
|
-
// @ts-expect-error - TS2339 - Property '_movables' does not exist on type 'Graphie'.
|
|
16297
16293
|
this._movables = {};
|
|
16298
16294
|
};
|
|
16299
16295
|
|
|
@@ -16390,7 +16386,6 @@ class Graphie extends React__namespace.Component {
|
|
|
16390
16386
|
newMovables[key].toFront();
|
|
16391
16387
|
}
|
|
16392
16388
|
if (ref) {
|
|
16393
|
-
// @ts-expect-error - TS2339 - Property 'movables' does not exist on type 'Graphie'.
|
|
16394
16389
|
this.movables[ref] = newMovables[key];
|
|
16395
16390
|
}
|
|
16396
16391
|
return newMovables[key];
|
|
@@ -16399,15 +16394,10 @@ class Graphie extends React__namespace.Component {
|
|
|
16399
16394
|
|
|
16400
16395
|
// Sort of like react diffing, but for movables
|
|
16401
16396
|
_updateMovables = () => {
|
|
16402
|
-
// @ts-expect-error - TS2339 - Property '_graphie' does not exist on type 'Graphie'.
|
|
16403
16397
|
const graphie = this._graphie;
|
|
16404
|
-
|
|
16405
|
-
// @ts-expect-error - TS2339 - Property '_movables' does not exist on type 'Graphie'.
|
|
16406
16398
|
const oldMovables = this._movables;
|
|
16407
16399
|
const newMovables = {};
|
|
16408
|
-
// @ts-expect-error - TS2339 - Property '_movables' does not exist on type 'Graphie'.
|
|
16409
16400
|
this._movables = newMovables;
|
|
16410
|
-
// @ts-expect-error - TS2339 - Property 'movables' does not exist on type 'Graphie'.
|
|
16411
16401
|
this.movables = {};
|
|
16412
16402
|
|
|
16413
16403
|
// @ts-expect-error - TS2345 - Argument of type 'ReactNode' is not assignable to parameter of type 'readonly any[]'.
|
|
@@ -18538,10 +18528,13 @@ const registerWidgets = widgets => {
|
|
|
18538
18528
|
*/
|
|
18539
18529
|
const replaceWidget = (name, replacementName) => {
|
|
18540
18530
|
const substituteWidget = widgets[replacementName];
|
|
18541
|
-
|
|
18531
|
+
|
|
18532
|
+
// If the replacement widget isn't found, we need to throw. Otherwise after
|
|
18533
|
+
// removing the deprecated widget, we'll have data asking for a widget type
|
|
18534
|
+
// that doesn't exist at all.
|
|
18535
|
+
if (!substituteWidget) {
|
|
18542
18536
|
const errorMsg = `Failed to replace ${name} with ${replacementName}`;
|
|
18543
|
-
|
|
18544
|
-
return;
|
|
18537
|
+
throw new PerseusError(errorMsg, Errors.Internal);
|
|
18545
18538
|
}
|
|
18546
18539
|
registerWidget(name, substituteWidget);
|
|
18547
18540
|
};
|
|
@@ -18629,7 +18622,10 @@ const getAllWidgetTypes = () => {
|
|
|
18629
18622
|
};
|
|
18630
18623
|
const upgradeWidgetInfoToLatestVersion = oldWidgetInfo => {
|
|
18631
18624
|
const type = oldWidgetInfo.type;
|
|
18632
|
-
//
|
|
18625
|
+
// NOTE(jeremy): This looks like it could be replaced by fixing types so
|
|
18626
|
+
// that `type` is non-optional. But we're seeing this in Sentry today so I
|
|
18627
|
+
// suspect we have legacy data (potentially unpublished) and we should
|
|
18628
|
+
// figure that out before depending solely on types.
|
|
18633
18629
|
if (!___default["default"].isString(type)) {
|
|
18634
18630
|
throw new PerseusError("widget type must be a string, but was: " + type, Errors.Internal);
|
|
18635
18631
|
}
|
|
@@ -27923,21 +27919,23 @@ class Graph extends React__namespace.Component {
|
|
|
27923
27919
|
// `\text{Dollars}` to the Graph widget.
|
|
27924
27920
|
const labels = this.props.labels.map(label => Util.unescapeMathMode(label));
|
|
27925
27921
|
const range = this.props.range;
|
|
27922
|
+
// @ts-expect-error - TS2345: Argument of type 'Element | Text | null' is not assignable to parameter of type 'HTMLElement'.
|
|
27926
27923
|
const graphie = this._graphie = GraphUtils.createGraphie(graphieDiv);
|
|
27927
27924
|
const gridConfig = this._getGridConfig();
|
|
27925
|
+
// @ts-expect-error - TS2339: Property 'snap' does not exist on type 'Graphie'.
|
|
27928
27926
|
graphie.snap = this.props.snapStep;
|
|
27929
27927
|
if (this.props.markings === "graph") {
|
|
27930
27928
|
graphie.graphInit({
|
|
27931
27929
|
range: range,
|
|
27932
|
-
scale:
|
|
27930
|
+
scale: kmath.vector.map(gridConfig, g => g.scale),
|
|
27933
27931
|
axisArrows: "<->",
|
|
27934
27932
|
labelFormat: function (s) {
|
|
27935
27933
|
return "\\small{" + s + "}";
|
|
27936
27934
|
},
|
|
27937
27935
|
gridStep: this.props.gridStep,
|
|
27938
|
-
tickStep:
|
|
27936
|
+
tickStep: kmath.vector.map(gridConfig, g => g.tickStep),
|
|
27939
27937
|
labelStep: 1,
|
|
27940
|
-
unityLabels:
|
|
27938
|
+
unityLabels: kmath.vector.map(gridConfig, g => g.unityLabel),
|
|
27941
27939
|
isMobile: this.props.isMobile
|
|
27942
27940
|
});
|
|
27943
27941
|
graphie.label([0, range[1][1]], labels[1], this.props.isMobile ? "below right" : "above");
|
|
@@ -27945,7 +27943,7 @@ class Graph extends React__namespace.Component {
|
|
|
27945
27943
|
} else if (this.props.markings === "grid") {
|
|
27946
27944
|
graphie.graphInit({
|
|
27947
27945
|
range: range,
|
|
27948
|
-
scale:
|
|
27946
|
+
scale: kmath.vector.map(gridConfig, g => g.scale),
|
|
27949
27947
|
gridStep: this.props.gridStep,
|
|
27950
27948
|
axes: false,
|
|
27951
27949
|
ticks: false,
|
|
@@ -27955,7 +27953,7 @@ class Graph extends React__namespace.Component {
|
|
|
27955
27953
|
} else if (this.props.markings === "none") {
|
|
27956
27954
|
graphie.init({
|
|
27957
27955
|
range: range,
|
|
27958
|
-
scale:
|
|
27956
|
+
scale: kmath.vector.map(gridConfig, g => g.scale),
|
|
27959
27957
|
isMobile: this.props.isMobile
|
|
27960
27958
|
});
|
|
27961
27959
|
}
|
|
@@ -28002,6 +28000,7 @@ class Graph extends React__namespace.Component {
|
|
|
28002
28000
|
} : null;
|
|
28003
28001
|
/* eslint-enable indent */
|
|
28004
28002
|
|
|
28003
|
+
// @ts-expect-error - Property 'addMouseLayer' does not exist on type 'Graphie'.
|
|
28005
28004
|
graphie.addMouseLayer({
|
|
28006
28005
|
onClick: this.props.onClick,
|
|
28007
28006
|
onMouseDown: onMouseDown,
|
|
@@ -28027,10 +28026,7 @@ class Graph extends React__namespace.Component {
|
|
|
28027
28026
|
}
|
|
28028
28027
|
};
|
|
28029
28028
|
_getGridConfig = () => {
|
|
28030
|
-
|
|
28031
|
-
return ___default["default"].map(self.props.step, function (step, i) {
|
|
28032
|
-
return Util.gridDimensionConfig(step, self.props.range[i], self.props.box[i], self.props.gridStep[i]);
|
|
28033
|
-
});
|
|
28029
|
+
return kmath.vector.map(this.props.step, (step, i) => Util.gridDimensionConfig(step, this.props.range[i], this.props.box[i], this.props.gridStep[i]));
|
|
28034
28030
|
};
|
|
28035
28031
|
_updateProtractor = () => {
|
|
28036
28032
|
if (this.protractor) {
|
|
@@ -31123,7 +31119,8 @@ class Marker extends React__namespace.Component {
|
|
|
31123
31119
|
answerSide,
|
|
31124
31120
|
answerStyles,
|
|
31125
31121
|
hovered,
|
|
31126
|
-
focused
|
|
31122
|
+
focused,
|
|
31123
|
+
label
|
|
31127
31124
|
} = this.props;
|
|
31128
31125
|
|
|
31129
31126
|
// We cannot make dropdown openers untabbable, so we isolate tabbing
|
|
@@ -31132,6 +31129,9 @@ class Marker extends React__namespace.Component {
|
|
|
31132
31129
|
const active = hovered || focused;
|
|
31133
31130
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
31134
31131
|
style: [styles$g.marker, active && !markerDisabled && styles$g.markerActive]
|
|
31132
|
+
// already translated in: /widgets/graded-group.tsx
|
|
31133
|
+
,
|
|
31134
|
+
"aria-label": markerDisabled ? i18n__namespace._("Correct!") : label
|
|
31135
31135
|
}, this.renderIcon()), !!selected && showAnswer && /*#__PURE__*/React__namespace.createElement(AnswerPill, {
|
|
31136
31136
|
selectedAnswers: selected,
|
|
31137
31137
|
showCorrectness: showCorrectness,
|
|
@@ -31679,15 +31679,12 @@ class LabelImage extends React__namespace.Component {
|
|
|
31679
31679
|
disabled: disabled,
|
|
31680
31680
|
opener: _ref => {
|
|
31681
31681
|
let {
|
|
31682
|
-
opened
|
|
31683
|
-
text
|
|
31682
|
+
opened
|
|
31684
31683
|
} = _ref;
|
|
31685
31684
|
return /*#__PURE__*/React__namespace.createElement(Clickable__default["default"], {
|
|
31686
31685
|
role: "button",
|
|
31687
|
-
|
|
31688
|
-
|
|
31689
|
-
// already translated in: /widgets/graded-group.tsx
|
|
31690
|
-
showCorrectness === "correct" ? i18n__namespace._("Correct!") : marker.label
|
|
31686
|
+
"aria-expanded": opened,
|
|
31687
|
+
key: `marker-${marker.x}.${marker.y}`
|
|
31691
31688
|
}, _ref2 => {
|
|
31692
31689
|
let {
|
|
31693
31690
|
hovered,
|
|
@@ -33802,6 +33799,7 @@ const Measurer = createReactClass__default["default"]({
|
|
|
33802
33799
|
const graphieDiv = ReactDOM__default["default"].findDOMNode(this.refs.graphieDiv);
|
|
33803
33800
|
// @ts-expect-error - TS2769 - No overload matches this call. | TS2339 - Property 'empty' does not exist on type 'JQueryStatic'.
|
|
33804
33801
|
$__default["default"](graphieDiv).empty();
|
|
33802
|
+
// @ts-expect-error - Argument of type 'Element | Text | null' is not assignable to parameter of type 'HTMLElement'.
|
|
33805
33803
|
const graphie = this.graphie = GraphUtils.createGraphie(graphieDiv);
|
|
33806
33804
|
const scale = [40, 40];
|
|
33807
33805
|
const range = [[0, this.props.box[0] / scale[0]], [0, this.props.box[1] / scale[1]]];
|
|
@@ -33809,6 +33807,7 @@ const Measurer = createReactClass__default["default"]({
|
|
|
33809
33807
|
range: range,
|
|
33810
33808
|
scale: scale
|
|
33811
33809
|
});
|
|
33810
|
+
// @ts-expect-error - Property 'addMouseLayer' does not exist on type 'Graphie'.
|
|
33812
33811
|
graphie.addMouseLayer({
|
|
33813
33812
|
allowScratchpad: true,
|
|
33814
33813
|
setDrawingAreaAvailable: this.props.apiOptions.setDrawingAreaAvailable
|
|
@@ -33817,12 +33816,14 @@ const Measurer = createReactClass__default["default"]({
|
|
|
33817
33816
|
this.protractor.remove();
|
|
33818
33817
|
}
|
|
33819
33818
|
if (this.props.showProtractor) {
|
|
33819
|
+
// @ts-expect-error - Property 'protractor' does not exist on type 'Graphie'.
|
|
33820
33820
|
this.protractor = graphie.protractor([this.props.protractorX, this.props.protractorY]);
|
|
33821
33821
|
}
|
|
33822
33822
|
if (this.ruler) {
|
|
33823
33823
|
this.ruler.remove();
|
|
33824
33824
|
}
|
|
33825
33825
|
if (this.props.showRuler) {
|
|
33826
|
+
// @ts-expect-error - Property 'ruler' does not exist on type 'Graphie'.
|
|
33826
33827
|
this.ruler = graphie.ruler({
|
|
33827
33828
|
center: [(range[0][0] + range[0][1]) / 2, (range[1][0] + range[1][1]) / 2],
|
|
33828
33829
|
label: this.props.rulerLabel,
|
|
@@ -38241,6 +38242,7 @@ class Plotter extends React__namespace.Component {
|
|
|
38241
38242
|
const graphieDiv = ReactDOM__default["default"].findDOMNode(self.refs.graphieDiv);
|
|
38242
38243
|
// @ts-expect-error - TS2769 - No overload matches this call. | TS2339 - Property 'empty' does not exist on type 'JQueryStatic'.
|
|
38243
38244
|
$__default["default"](graphieDiv).empty();
|
|
38245
|
+
// @ts-expect-error - Argument of type 'Element | Text | null' is not assignable to parameter of type 'HTMLElement'.
|
|
38244
38246
|
const graphie = GraphUtils.createGraphie(graphieDiv);
|
|
38245
38247
|
|
|
38246
38248
|
// TODO(jakesandlund): It's not the react way to hang
|
|
@@ -38348,6 +38350,7 @@ class Plotter extends React__namespace.Component {
|
|
|
38348
38350
|
scale: c.scale,
|
|
38349
38351
|
isMobile: this.props.apiOptions.isMobile
|
|
38350
38352
|
});
|
|
38353
|
+
// @ts-expect-error - Property 'addMouseLayer' does not exist on type 'Graphie'.
|
|
38351
38354
|
graphie.addMouseLayer({
|
|
38352
38355
|
allowScratchpad: true,
|
|
38353
38356
|
setDrawingAreaAvailable: this.props.apiOptions.setDrawingAreaAvailable
|
|
@@ -41586,11 +41589,7 @@ var extraWidgets = [Categorizer$1, CSProgram$1, Dropdown$1, Explanation$1, Defin
|
|
|
41586
41589
|
const init = function (options) {
|
|
41587
41590
|
registerWidgets(basicWidgets);
|
|
41588
41591
|
registerWidgets(extraWidgets);
|
|
41589
|
-
|
|
41590
|
-
// This section replaces widgets
|
|
41591
|
-
// When it's time to replace the transformer widget
|
|
41592
|
-
// uncomment this line
|
|
41593
|
-
// Widgets.replaceWidget("transformer", "deprecated-standin");
|
|
41592
|
+
replaceWidget("transformer", "deprecated-standin");
|
|
41594
41593
|
|
|
41595
41594
|
// Pass skipMathJax: true if MathJax is already loaded and configured.
|
|
41596
41595
|
const skipMathJax = options.skipMathJax;
|
|
@@ -41616,7 +41615,7 @@ const init = function (options) {
|
|
|
41616
41615
|
|
|
41617
41616
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
41618
41617
|
const libName = "@khanacademy/perseus";
|
|
41619
|
-
const libVersion = "19.1.
|
|
41618
|
+
const libVersion = "19.1.3";
|
|
41620
41619
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
41621
41620
|
|
|
41622
41621
|
const apiVersion = {
|