@khanacademy/perseus 38.0.1 → 39.0.0
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/components/math-input.d.ts +1 -1
- package/dist/components/sortable.d.ts +1 -1
- package/dist/definition-context.d.ts +1 -1
- package/dist/es/index.js +34 -104
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +30 -103
- package/dist/index.js.map +1 -1
- package/dist/interactive2/movable-point.d.ts +1 -1
- package/dist/multi-items/prop-type-builders.d.ts +0 -6
- package/dist/perseus-api.d.ts +3 -1
- package/dist/perseus-types.d.ts +3 -42
- package/dist/renderer.d.ts +1 -2
- package/dist/server-item-renderer.d.ts +3 -2
- package/dist/sigfigs.d.ts +0 -16
- package/dist/styles/constants.d.ts +0 -18
- package/dist/types.d.ts +4 -6
- package/dist/util/math.d.ts +0 -1
- package/dist/util.d.ts +2 -1
- package/dist/validation.types.d.ts +2 -9
- package/dist/widgets/__shared__/noop-validator.d.ts +1 -1
- package/dist/widgets/definition/definition.d.ts +1 -2
- package/dist/widgets/explanation/explanation.d.ts +1 -2
- package/dist/widgets/expression/expression.d.ts +25 -12
- package/dist/widgets/image/image.d.ts +1 -2
- package/dist/widgets/input-number/input-number.d.ts +0 -1
- package/dist/widgets/interaction/interaction.d.ts +1 -2
- package/dist/widgets/interactive-graphs/graphs/components/movable-line.d.ts +0 -11
- package/dist/widgets/interactive-graphs/graphs/point.d.ts +0 -2
- package/dist/widgets/interactive-graphs/graphs/use-transform.d.ts +0 -1
- package/dist/widgets/interactive-graphs/mafs-supported-graph-types.d.ts +2 -1
- package/dist/widgets/interactive-graphs/protractor.d.ts +0 -2
- package/dist/widgets/label-image/answer-choices.d.ts +1 -1
- package/dist/widgets/label-image/label-image.d.ts +12 -28
- package/dist/widgets/matrix/matrix.d.ts +0 -1
- package/dist/widgets/measurer/measurer.d.ts +3 -15
- package/dist/widgets/molecule/molecule.d.ts +0 -21
- package/dist/widgets/number-line/number-line.d.ts +0 -1
- package/dist/widgets/numeric-input/numeric-input.d.ts +0 -1
- package/dist/widgets/orderer/orderer.d.ts +1 -1
- package/dist/widgets/passage/passage.d.ts +1 -2
- package/dist/widgets/passage-ref/passage-ref.d.ts +1 -2
- package/dist/widgets/radio/base-radio.d.ts +2 -1
- package/dist/widgets/table/table.d.ts +0 -1
- package/dist/widgets/video/video.d.ts +1 -2
- package/package.json +3 -3
- package/dist/util/fix-passage-refs.d.ts +0 -3
- package/dist/widgets/radio/choice.jsx.fixture.d.ts +0 -1
|
@@ -5,7 +5,7 @@ import type { LegacyButtonSets } from "../perseus-types";
|
|
|
5
5
|
import type { PerseusDependenciesV2 } from "../types";
|
|
6
6
|
import type { Keys, MathFieldInterface } from "@khanacademy/math-input";
|
|
7
7
|
type ButtonsVisibleType = "always" | "never" | "focused";
|
|
8
|
-
|
|
8
|
+
type KeypadButtonSets = {
|
|
9
9
|
advancedRelations?: boolean;
|
|
10
10
|
basicRelations?: boolean;
|
|
11
11
|
divisionKey?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Position } from "../util";
|
|
3
3
|
import type { LinterContextProps } from "@khanacademy/perseus-linter";
|
|
4
|
-
|
|
4
|
+
type Layout = "horizontal" | "vertical";
|
|
5
5
|
declare enum ItemState {
|
|
6
6
|
STATIC = "static",
|
|
7
7
|
DRAGGING = "dragging",
|
|
@@ -9,7 +9,7 @@ type DefintionContext = {
|
|
|
9
9
|
type ProviderState = {
|
|
10
10
|
activeDefinitionId: string | null | undefined;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type ProviderProps = {
|
|
13
13
|
children: any;
|
|
14
14
|
};
|
|
15
15
|
export declare class DefinitionProvider extends React.Component<ProviderProps, ProviderState> {
|
package/dist/es/index.js
CHANGED
|
@@ -2402,11 +2402,6 @@ class Expression extends React.Component {
|
|
|
2402
2402
|
// @ts-expect-error - TS2339 - Property 'insert' does not exist on type 'ReactInstance'.
|
|
2403
2403
|
this.refs.input.insert(keyPressed);
|
|
2404
2404
|
}
|
|
2405
|
-
// TODO(Nicole): I believe this is going away and won't be needed anymore
|
|
2406
|
-
getGrammarTypeForPath(inputPath) {
|
|
2407
|
-
/* c8 ignore next */
|
|
2408
|
-
return "expression";
|
|
2409
|
-
}
|
|
2410
2405
|
setInputValue(path, newValue, cb) {
|
|
2411
2406
|
this.props.onChange({
|
|
2412
2407
|
value: newValue
|
|
@@ -2878,7 +2873,9 @@ function flattenScores(widgetScoreMap) {
|
|
|
2878
2873
|
function isCorrect(score) {
|
|
2879
2874
|
return score.type === "points" && score.earned >= score.total;
|
|
2880
2875
|
}
|
|
2881
|
-
function keScoreFromPerseusScore(score,
|
|
2876
|
+
function keScoreFromPerseusScore(score,
|
|
2877
|
+
// It's weird, but this is what we're passing it
|
|
2878
|
+
guess, state) {
|
|
2882
2879
|
if (score.type === "points") {
|
|
2883
2880
|
return {
|
|
2884
2881
|
empty: false,
|
|
@@ -3892,36 +3889,14 @@ const ZoomService = new ZoomServiceClass();
|
|
|
3892
3889
|
const baseFontFamily$1 = "'Lato', sans-serif";
|
|
3893
3890
|
// @boldFontFamily: "Lato-Bold", "Lato", sans-serif;
|
|
3894
3891
|
const boldFontFamily = "'Lato-Bold', 'Lato', sans-serif";
|
|
3895
|
-
// @green: #76a005;
|
|
3896
|
-
const green$1 = "#76A005";
|
|
3897
3892
|
// @kaGreen: #71b307;
|
|
3898
3893
|
const kaGreen$1 = "#71B307";
|
|
3899
|
-
// @blue: #1c758a;
|
|
3900
|
-
const blue$1 = "#1C758A";
|
|
3901
|
-
// @gray: #aaa;
|
|
3902
|
-
const gray$1 = "#AAAAAA";
|
|
3903
|
-
// @red: #ffbaba;
|
|
3904
|
-
const red$1 = "#FFBABA";
|
|
3905
|
-
// @grayLight: #aaa;
|
|
3906
|
-
const grayLight$1 = "#AAAAAA";
|
|
3907
|
-
// @grayLighter: #ddd;
|
|
3908
|
-
const grayLighter$1 = "#DDDDDD";
|
|
3909
|
-
// @learnstormBlue: #4898fc;
|
|
3910
|
-
const learnstormBlue$1 = "#4898FC";
|
|
3911
3894
|
const white$1 = "#FFFFFF";
|
|
3912
|
-
const gray98 = "#FAFAFA";
|
|
3913
3895
|
const gray97 = "#F6F7F7";
|
|
3914
|
-
const gray95 = "#F0F1F2";
|
|
3915
|
-
const gray90 = "#E3E5E6";
|
|
3916
3896
|
const gray85 = "#D6D8DA";
|
|
3917
3897
|
const gray76 = "#BABEC2";
|
|
3918
3898
|
const gray68 = "#888D93";
|
|
3919
|
-
const gray41 = "#626569";
|
|
3920
|
-
const gray25 = "#3B3e40";
|
|
3921
3899
|
const gray17 = "#21242c";
|
|
3922
|
-
const black$1 = "#000000";
|
|
3923
|
-
const warning1 = "#F86700";
|
|
3924
|
-
const warning3 = "#C75300";
|
|
3925
3900
|
|
|
3926
3901
|
// @pure-sm-min: 568px;
|
|
3927
3902
|
const pureSmMin$2 = "568px";
|
|
@@ -3941,16 +3916,10 @@ const pureMdMax$2 = "1023px";
|
|
|
3941
3916
|
const pureLgMax$2 = "1279px";
|
|
3942
3917
|
// @tableBackgroundAccent: #f9f9f9; // for striping
|
|
3943
3918
|
const tableBackgroundAccent$1 = "#F9F9F9";
|
|
3944
|
-
// @zIndexScratchPad: 1;
|
|
3945
|
-
const zIndexScratchPad = 1;
|
|
3946
3919
|
// @zIndexAboveScratchpad: @zIndexScratchPad + 1;
|
|
3947
3920
|
const zIndexAboveScratchpad$1 = 2;
|
|
3948
3921
|
// @zIndexInteractiveComponent: @zIndexAboveScratchpad + 1;
|
|
3949
3922
|
const zIndexInteractiveComponent$1 = 3;
|
|
3950
|
-
// @zIndexCurrentlyDragging: @zIndexInteractiveComponent + 1;
|
|
3951
|
-
const zIndexCurrentlyDragging = 4;
|
|
3952
|
-
// @zIndexCalculator: @zIndexCurrentlyDragging + 1;
|
|
3953
|
-
const zIndexCalculator = 5;
|
|
3954
3923
|
// @phoneMargin: 16px;
|
|
3955
3924
|
const phoneMargin = 16;
|
|
3956
3925
|
const negativePhoneMargin = -16;
|
|
@@ -3978,28 +3947,13 @@ var constants$1 = /*#__PURE__*/Object.freeze({
|
|
|
3978
3947
|
__proto__: null,
|
|
3979
3948
|
baseFontFamily: baseFontFamily$1,
|
|
3980
3949
|
boldFontFamily: boldFontFamily,
|
|
3981
|
-
green: green$1,
|
|
3982
3950
|
kaGreen: kaGreen$1,
|
|
3983
|
-
blue: blue$1,
|
|
3984
|
-
gray: gray$1,
|
|
3985
|
-
red: red$1,
|
|
3986
|
-
grayLight: grayLight$1,
|
|
3987
|
-
grayLighter: grayLighter$1,
|
|
3988
|
-
learnstormBlue: learnstormBlue$1,
|
|
3989
3951
|
white: white$1,
|
|
3990
|
-
gray98: gray98,
|
|
3991
3952
|
gray97: gray97,
|
|
3992
|
-
gray95: gray95,
|
|
3993
|
-
gray90: gray90,
|
|
3994
3953
|
gray85: gray85,
|
|
3995
3954
|
gray76: gray76,
|
|
3996
3955
|
gray68: gray68,
|
|
3997
|
-
gray41: gray41,
|
|
3998
|
-
gray25: gray25,
|
|
3999
3956
|
gray17: gray17,
|
|
4000
|
-
black: black$1,
|
|
4001
|
-
warning1: warning1,
|
|
4002
|
-
warning3: warning3,
|
|
4003
3957
|
pureSmMin: pureSmMin$2,
|
|
4004
3958
|
pureMdMin: pureMdMin$2,
|
|
4005
3959
|
pureLgMin: pureLgMin$2,
|
|
@@ -4009,11 +3963,8 @@ var constants$1 = /*#__PURE__*/Object.freeze({
|
|
|
4009
3963
|
pureMdMax: pureMdMax$2,
|
|
4010
3964
|
pureLgMax: pureLgMax$2,
|
|
4011
3965
|
tableBackgroundAccent: tableBackgroundAccent$1,
|
|
4012
|
-
zIndexScratchPad: zIndexScratchPad,
|
|
4013
3966
|
zIndexAboveScratchpad: zIndexAboveScratchpad$1,
|
|
4014
3967
|
zIndexInteractiveComponent: zIndexInteractiveComponent$1,
|
|
4015
|
-
zIndexCurrentlyDragging: zIndexCurrentlyDragging,
|
|
4016
|
-
zIndexCalculator: zIndexCalculator,
|
|
4017
3968
|
phoneMargin: phoneMargin,
|
|
4018
3969
|
negativePhoneMargin: negativePhoneMargin,
|
|
4019
3970
|
hintBorderWidth: hintBorderWidth,
|
|
@@ -19756,6 +19707,7 @@ class Renderer extends React.Component {
|
|
|
19756
19707
|
onBlur: _.partial(this._onWidgetBlur, id),
|
|
19757
19708
|
findWidgets: this.findWidgets,
|
|
19758
19709
|
reviewModeRubric: reviewModeRubric,
|
|
19710
|
+
reviewMode: this.props.reviewMode,
|
|
19759
19711
|
onChange: (newProps, cb, silent = false) => {
|
|
19760
19712
|
this._setWidgetProps(id, newProps, cb, silent);
|
|
19761
19713
|
},
|
|
@@ -20435,14 +20387,6 @@ class Renderer extends React.Component {
|
|
|
20435
20387
|
return ReactDOM__default.findDOMNode(widget);
|
|
20436
20388
|
}
|
|
20437
20389
|
};
|
|
20438
|
-
this.getGrammarTypeForPath = path => {
|
|
20439
|
-
// @ts-expect-error - TS2345 - Argument of type 'FocusPath' is not assignable to parameter of type 'List<any>'.
|
|
20440
|
-
const widgetId = _.first(path);
|
|
20441
|
-
// @ts-expect-error - TS2345 - Argument of type 'FocusPath' is not assignable to parameter of type 'List<any>'.
|
|
20442
|
-
const interWidgetPath = _.rest(path);
|
|
20443
|
-
const widget = this.getWidgetInstance(widgetId);
|
|
20444
|
-
return widget == null || widget.getGrammarTypeForPath == null ? void 0 : widget.getGrammarTypeForPath(interWidgetPath);
|
|
20445
|
-
};
|
|
20446
20390
|
this.getInputPaths = () => {
|
|
20447
20391
|
const inputPaths = [];
|
|
20448
20392
|
_.each(this.widgetIds, widgetId => {
|
|
@@ -20582,11 +20526,6 @@ class Renderer extends React.Component {
|
|
|
20582
20526
|
this.getWidgetIds = () => {
|
|
20583
20527
|
return this.widgetIds;
|
|
20584
20528
|
};
|
|
20585
|
-
this.guessAndScore = () => {
|
|
20586
|
-
const totalGuess = this.getUserInput();
|
|
20587
|
-
const totalScore = this.score();
|
|
20588
|
-
return [totalGuess, totalScore];
|
|
20589
|
-
};
|
|
20590
20529
|
this.examples = () => {
|
|
20591
20530
|
const widgetIds = this.widgetIds;
|
|
20592
20531
|
const examples = _.compact(_.map(widgetIds, widgetId => {
|
|
@@ -20808,6 +20747,11 @@ class Renderer extends React.Component {
|
|
|
20808
20747
|
const combinedScore = Util.flattenScores(scores);
|
|
20809
20748
|
return combinedScore;
|
|
20810
20749
|
}
|
|
20750
|
+
guessAndScore() {
|
|
20751
|
+
const totalGuess = this.getUserInput();
|
|
20752
|
+
const totalScore = this.score();
|
|
20753
|
+
return [totalGuess, totalScore];
|
|
20754
|
+
}
|
|
20811
20755
|
render() {
|
|
20812
20756
|
const apiOptions = this.getApiOptions();
|
|
20813
20757
|
if (this.reuseMarkdown) {
|
|
@@ -21787,12 +21731,6 @@ class InputNumber extends React.Component {
|
|
|
21787
21731
|
/* c8 ignore next */
|
|
21788
21732
|
return [[]];
|
|
21789
21733
|
};
|
|
21790
|
-
// Note: We believe that this isn't used anywhere but are leaving it during
|
|
21791
|
-
// the initial refactor
|
|
21792
|
-
this.getGrammarTypeForPath = path => {
|
|
21793
|
-
/* c8 ignore next */
|
|
21794
|
-
return "number";
|
|
21795
|
-
};
|
|
21796
21734
|
this.setInputValue = (path, newValue, cb) => {
|
|
21797
21735
|
this.props.onChange({
|
|
21798
21736
|
currentValue: newValue
|
|
@@ -21836,17 +21774,13 @@ class InputNumber extends React.Component {
|
|
|
21836
21774
|
}
|
|
21837
21775
|
return input;
|
|
21838
21776
|
}
|
|
21839
|
-
// HACK(johnsullivan): Create a function with shared logic between
|
|
21840
|
-
// this and NumericInput.
|
|
21841
|
-
// TODO(jeremy): Deprecate this widget and prefer numeric-input.
|
|
21842
|
-
const rubric = this.props.reviewModeRubric;
|
|
21843
21777
|
|
|
21844
21778
|
// Note: This is _very_ similar to what `numeric-input.jsx` does. If
|
|
21845
21779
|
// you modify this, double-check if you also need to modify that
|
|
21846
21780
|
// component.
|
|
21847
21781
|
const inputStyles = [styles$A.default, this.props.size === "small" ? styles$A.small : null, this.props.rightAlign ? styles$A.rightAlign : styles$A.leftAlign];
|
|
21848
21782
|
// Unanswered
|
|
21849
|
-
if (
|
|
21783
|
+
if (this.props.reviewMode && !this.props.currentValue) {
|
|
21850
21784
|
inputStyles.push(styles$A.answerStateUnanswered);
|
|
21851
21785
|
}
|
|
21852
21786
|
return /*#__PURE__*/React.createElement(InputWithExamples
|
|
@@ -22149,10 +22083,6 @@ class NumericInput extends React.Component {
|
|
|
22149
22083
|
/* c8 ignore next */
|
|
22150
22084
|
return [[]];
|
|
22151
22085
|
};
|
|
22152
|
-
this.getGrammarTypeForPath = inputPath => {
|
|
22153
|
-
/* c8 ignore next */
|
|
22154
|
-
return "number";
|
|
22155
|
-
};
|
|
22156
22086
|
this.setInputValue = (path, newValue, cb) => {
|
|
22157
22087
|
/* c8 ignore next */
|
|
22158
22088
|
this.props.onChange({
|
|
@@ -22339,7 +22269,7 @@ var NumericInput$1 = {
|
|
|
22339
22269
|
* Several widgets don't have "right"/"wrong" validation logic,
|
|
22340
22270
|
* so this just says to move on past those widgets
|
|
22341
22271
|
*
|
|
22342
|
-
* TODO(LEMS-
|
|
22272
|
+
* TODO(LEMS-2543) widgets that use this probably shouldn't have any
|
|
22343
22273
|
* validation logic and the thing validating an exercise
|
|
22344
22274
|
* should just know to skip these
|
|
22345
22275
|
*/
|
|
@@ -24401,7 +24331,7 @@ class Passage extends React.Component {
|
|
|
24401
24331
|
const enabled = this.state.stylesAreApplied;
|
|
24402
24332
|
|
|
24403
24333
|
// Highlights are read-only in review mode.
|
|
24404
|
-
const editable = !this.props.
|
|
24334
|
+
const editable = !this.props.reviewMode;
|
|
24405
24335
|
return /*#__PURE__*/React.createElement(HighlightableContent, {
|
|
24406
24336
|
editable: editable,
|
|
24407
24337
|
enabled: enabled,
|
|
@@ -25660,6 +25590,7 @@ const BaseRadio = function BaseRadio(props) {
|
|
|
25660
25590
|
const {
|
|
25661
25591
|
apiOptions,
|
|
25662
25592
|
reviewModeRubric,
|
|
25593
|
+
reviewMode,
|
|
25663
25594
|
choices,
|
|
25664
25595
|
editMode,
|
|
25665
25596
|
multipleSelect,
|
|
@@ -25772,7 +25703,6 @@ const BaseRadio = function BaseRadio(props) {
|
|
|
25772
25703
|
});
|
|
25773
25704
|
|
|
25774
25705
|
// some commonly used shorthands
|
|
25775
|
-
const reviewMode = !!reviewModeRubric;
|
|
25776
25706
|
const isMobile = apiOptions.isMobile;
|
|
25777
25707
|
const firstChoiceHighlighted = choices[0].highlighted;
|
|
25778
25708
|
const lastChoiceHighlighted = choices[choices.length - 1].highlighted;
|
|
@@ -26340,6 +26270,7 @@ class Radio$1 extends React.Component {
|
|
|
26340
26270
|
}));
|
|
26341
26271
|
}
|
|
26342
26272
|
const choicesProp = choices.map((choice, i) => {
|
|
26273
|
+
var _this$props$reviewMod;
|
|
26343
26274
|
const content = choice.isNoneOfTheAbove && !choice.content ? strings.noneOfTheAbove : choice.content;
|
|
26344
26275
|
const {
|
|
26345
26276
|
selected,
|
|
@@ -26350,7 +26281,7 @@ class Radio$1 extends React.Component {
|
|
|
26350
26281
|
highlighted,
|
|
26351
26282
|
previouslyAnswered
|
|
26352
26283
|
} = choiceStates[i];
|
|
26353
|
-
const reviewChoice = this.props.reviewModeRubric
|
|
26284
|
+
const reviewChoice = (_this$props$reviewMod = this.props.reviewModeRubric) == null ? void 0 : _this$props$reviewMod.choices[i];
|
|
26354
26285
|
return {
|
|
26355
26286
|
content: this._renderRenderer(content),
|
|
26356
26287
|
checked: selected,
|
|
@@ -26385,6 +26316,7 @@ class Radio$1 extends React.Component {
|
|
|
26385
26316
|
choices: choicesProp,
|
|
26386
26317
|
onChange: this.updateChoices,
|
|
26387
26318
|
reviewModeRubric: this.props.reviewModeRubric,
|
|
26319
|
+
reviewMode: this.props.reviewMode,
|
|
26388
26320
|
deselectEnabled: this.props.deselectEnabled,
|
|
26389
26321
|
apiOptions: this.props.apiOptions,
|
|
26390
26322
|
isLastUsedWidget: this.props.isLastUsedWidget,
|
|
@@ -29121,7 +29053,7 @@ class Group extends React.Component {
|
|
|
29121
29053
|
ref: ref => this.rendererRef = ref,
|
|
29122
29054
|
apiOptions: apiOptions,
|
|
29123
29055
|
findExternalWidgets: this.props.findWidgets,
|
|
29124
|
-
reviewMode:
|
|
29056
|
+
reviewMode: this.props.reviewMode,
|
|
29125
29057
|
onInteractWithWidget: onInteractWithWidget,
|
|
29126
29058
|
linterContext: this.props.linterContext,
|
|
29127
29059
|
strings: this.context.strings
|
|
@@ -38983,8 +38915,6 @@ const styles$b = StyleSheet.create({
|
|
|
38983
38915
|
* No diagonals allowed.
|
|
38984
38916
|
*/
|
|
38985
38917
|
|
|
38986
|
-
// TODO: should this be using WidgetProps / PerseusLabelImageWidgetOptions?
|
|
38987
|
-
|
|
38988
38918
|
class LabelImage extends React.Component {
|
|
38989
38919
|
/**
|
|
38990
38920
|
* Test whether point is contained within triangle.
|
|
@@ -40615,9 +40545,6 @@ class Matrix extends React.Component {
|
|
|
40615
40545
|
});
|
|
40616
40546
|
return inputPaths;
|
|
40617
40547
|
};
|
|
40618
|
-
this.getGrammarTypeForPath = inputPath => {
|
|
40619
|
-
return "number";
|
|
40620
|
-
};
|
|
40621
40548
|
this._handleFocus = (row, col) => {
|
|
40622
40549
|
this.props.onFocus(getInputPath$1(row, col));
|
|
40623
40550
|
};
|
|
@@ -41030,7 +40957,7 @@ class Measurer extends React.Component {
|
|
|
41030
40957
|
}
|
|
41031
40958
|
Measurer.defaultProps = {
|
|
41032
40959
|
box: [480, 480],
|
|
41033
|
-
image:
|
|
40960
|
+
image: defaultImage,
|
|
41034
40961
|
showProtractor: true,
|
|
41035
40962
|
protractorX: 7.5,
|
|
41036
40963
|
protractorY: 0.5,
|
|
@@ -42415,11 +42342,6 @@ class NumberLine extends React.Component {
|
|
|
42415
42342
|
}
|
|
42416
42343
|
return null;
|
|
42417
42344
|
}
|
|
42418
|
-
getGrammarTypeForPath(inputPath) {
|
|
42419
|
-
if ((inputPath == null ? void 0 : inputPath.length) === 1 && inputPath[0] === "tick-ctrl") {
|
|
42420
|
-
return "number";
|
|
42421
|
-
}
|
|
42422
|
-
}
|
|
42423
42345
|
getUserInput() {
|
|
42424
42346
|
return {
|
|
42425
42347
|
numLinePosition: this.props.numLinePosition,
|
|
@@ -44513,9 +44435,6 @@ class Table extends React.Component {
|
|
|
44513
44435
|
});
|
|
44514
44436
|
return inputPaths;
|
|
44515
44437
|
};
|
|
44516
|
-
this.getGrammarTypeForPath = inputPath => {
|
|
44517
|
-
return "number";
|
|
44518
|
-
};
|
|
44519
44438
|
this.setInputValue = (path, newValue, cb) => {
|
|
44520
44439
|
// Extract row, column information
|
|
44521
44440
|
const row = getRowFromPath(path);
|
|
@@ -44833,7 +44752,7 @@ const init = function init(options) {
|
|
|
44833
44752
|
|
|
44834
44753
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
44835
44754
|
const libName = "@khanacademy/perseus";
|
|
44836
|
-
const libVersion = "
|
|
44755
|
+
const libVersion = "39.0.0";
|
|
44837
44756
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
44838
44757
|
|
|
44839
44758
|
const apiVersion = {
|
|
@@ -45555,9 +45474,6 @@ class ServerItemRenderer extends React.Component {
|
|
|
45555
45474
|
getDOMNodeForPath(path) {
|
|
45556
45475
|
return this.questionRenderer.getDOMNodeForPath(path);
|
|
45557
45476
|
}
|
|
45558
|
-
getGrammarTypeForPath(path) {
|
|
45559
|
-
return this.questionRenderer.getGrammarTypeForPath(path);
|
|
45560
|
-
}
|
|
45561
45477
|
getInputPaths() {
|
|
45562
45478
|
const questionAreaInputPaths = this.questionRenderer.getInputPaths();
|
|
45563
45479
|
return questionAreaInputPaths;
|
|
@@ -46834,7 +46750,6 @@ const styles = StyleSheet.create({
|
|
|
46834
46750
|
* If you're writing new components, though, consider using the Item and Shape
|
|
46835
46751
|
* types instead.
|
|
46836
46752
|
*/
|
|
46837
|
-
|
|
46838
46753
|
/**
|
|
46839
46754
|
* Return a PropType that accepts Items of the given shape, and rejects other
|
|
46840
46755
|
* objects.
|
|
@@ -47066,6 +46981,21 @@ function violatingWidgets(itemData) {
|
|
|
47066
46981
|
}
|
|
47067
46982
|
|
|
47068
46983
|
/* eslint-disable eqeqeq, @typescript-eslint/no-unused-vars */
|
|
46984
|
+
/*
|
|
46985
|
+
* A class for formatting number to significant digits.
|
|
46986
|
+
* Copyright (C) 2001 Stephen Ostermiller
|
|
46987
|
+
* http://ostermiller.org/contact.pl?regarding?JavaScript+Significant+Figures
|
|
46988
|
+
*
|
|
46989
|
+
* This program is free software; you can redistribute it and/or modify
|
|
46990
|
+
* it under the terms of the GNU General Public License as published by
|
|
46991
|
+
* the Free Software Foundation; either version 2 of the License, or
|
|
46992
|
+
* (at your option) any later version.
|
|
46993
|
+
*
|
|
46994
|
+
* This program is distributed in the hope that it will be useful,
|
|
46995
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
46996
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
46997
|
+
* GNU General Public License for more details.
|
|
46998
|
+
*/
|
|
47069
46999
|
|
|
47070
47000
|
/**
|
|
47071
47001
|
* Format a floating point for display using the specified
|