@khanacademy/perseus 4.0.1 → 5.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/CHANGELOG.md +26 -0
- package/dist/components/highlighting/highlightable-content.d.ts +4 -4
- package/dist/components/highlighting/highlightable-content.js.flow +4 -7
- package/dist/components/highlighting/ui/highlight-renderer.d.ts +6 -6
- package/dist/components/highlighting/ui/highlight-renderer.js.flow +6 -8
- package/dist/components/highlighting/ui/highlight-set-renderer.d.ts +5 -5
- package/dist/components/highlighting/ui/highlight-set-renderer.js.flow +5 -8
- package/dist/components/highlighting/ui/highlight-tooltip.d.ts +2 -2
- package/dist/components/highlighting/ui/highlight-tooltip.js.flow +2 -4
- package/dist/components/highlighting/ui/highlighting-ui.d.ts +3 -3
- package/dist/components/highlighting/ui/highlighting-ui.js.flow +2 -2
- package/dist/components/highlighting/ui/selection-tracker.d.ts +5 -5
- package/dist/components/highlighting/ui/selection-tracker.js.flow +5 -7
- package/dist/components/highlighting/word-indexer.d.ts +2 -2
- package/dist/components/highlighting/word-indexer.js.flow +2 -2
- package/dist/components/inline-icon.d.ts +35 -1
- package/dist/components/inline-icon.js.flow +11 -1
- package/dist/components/simple-keypad-input.d.ts +1 -1
- package/dist/components/simple-keypad-input.js.flow +1 -1
- package/dist/components/tex-buttons.d.ts +2 -2
- package/dist/components/tex-buttons.js.flow +2 -2
- package/dist/error-boundary.d.ts +4 -4
- package/dist/error-boundary.js.flow +4 -6
- package/dist/es/index.js +53 -233
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +53 -233
- package/dist/index.js.map +1 -1
- package/dist/multi-items/multi-renderer.d.ts +1 -1
- package/dist/multi-items/multi-renderer.js.flow +1 -1
- package/dist/multi-items/prop-type-builders.d.ts +1 -1
- package/dist/multi-items/shape-types.d.ts +1 -1
- package/dist/multi-items/shape-types.js.flow +1 -1
- package/dist/multi-items/tree-types.d.ts +1 -1
- package/dist/multi-items/tree-types.js.flow +1 -1
- package/dist/perseus-types.d.ts +0 -1
- package/dist/perseus-types.js.flow +0 -1
- package/dist/widgets/__stories__/test-keypad-context-wrapper.d.ts +6 -0
- package/dist/widgets/__stories__/test-keypad-context-wrapper.js.flow +12 -0
- package/dist/widgets/expression.d.ts +2 -2
- package/dist/widgets/expression.js.flow +2 -2
- package/dist/widgets/interaction/element-container.d.ts +5 -4
- package/dist/widgets/interaction/element-container.js.flow +6 -11
- package/dist/widgets/label-image/marker.d.ts +4 -4
- package/dist/widgets/label-image/marker.js.flow +4 -6
- package/dist/widgets/numeric-input.d.ts +0 -2
- package/dist/widgets/numeric-input.js.flow +0 -4
- package/dist/widgets/radio/base-radio.d.ts +7 -1
- package/dist/widgets/radio/base-radio.js.flow +7 -1
- package/dist/widgets/radio/choice-icon/choice-icon.d.ts +1 -1
- package/dist/widgets/radio/choice-icon/choice-icon.js.flow +1 -1
- package/dist/widgets/radio/choice-icon/cross-out-line.d.ts +2 -2
- package/dist/widgets/radio/choice-icon/cross-out-line.js.flow +2 -2
- package/dist/widgets/radio/focus-ring.d.ts +8 -1
- package/dist/widgets/radio/focus-ring.js.flow +8 -1
- package/dist/widgets/radio/option-status.d.ts +2 -2
- package/dist/widgets/radio/option-status.js.flow +2 -2
- package/dist/widgets/video-transcript-link.d.ts +1 -1
- package/dist/widgets/video-transcript-link.js.flow +1 -1
- package/package.json +4 -4
- package/src/__stories__/item-renderer.stories.tsx +2 -6
- package/src/__stories__/server-item-renderer.stories.tsx +2 -6
- package/src/__testdata__/item-renderer.testdata.ts +1 -1
- package/src/__testdata__/renderer.testdata.ts +1 -1
- package/src/__tests__/item-renderer.test.tsx +1 -2
- package/src/__tests__/renderer-api.test.tsx +1 -5
- package/src/__tests__/renderer.test.tsx +1 -1
- package/src/components/__stories__/button-group.stories.tsx +2 -6
- package/src/components/__stories__/fixed-to-responsive.stories.tsx +14 -16
- package/src/components/__stories__/graph.stories.tsx +3 -5
- package/src/components/__stories__/graphie.stories.tsx +3 -5
- package/src/components/__stories__/hud.stories.tsx +2 -6
- package/src/components/__stories__/icon.stories.tsx +1 -1
- package/src/components/__stories__/image-loader.stories.tsx +4 -4
- package/src/components/__stories__/info-tip.stories.tsx +2 -6
- package/src/components/__stories__/inline-icon.stories.tsx +4 -8
- package/src/components/__stories__/input-with-examples.stories.tsx +6 -10
- package/src/components/__stories__/lint.stories.tsx +12 -12
- package/src/components/__stories__/math-input.stories.tsx +4 -8
- package/src/components/__stories__/math-output.stories.tsx +3 -5
- package/src/components/__stories__/multi-button-group.stories.tsx +2 -6
- package/src/components/__stories__/number-input.stories.tsx +6 -8
- package/src/components/__stories__/prop-check-box.stories.tsx +9 -9
- package/src/components/__stories__/range-input.stories.tsx +4 -6
- package/src/components/__stories__/simple-keypad-input.stories.tsx +2 -4
- package/src/components/__stories__/sortable.stories.tsx +15 -15
- package/src/components/__stories__/stub-tag-editor.stories.tsx +5 -9
- package/src/components/__stories__/svg-image.stories.tsx +10 -18
- package/src/components/__stories__/tex.stories.tsx +1 -3
- package/src/components/__stories__/text-buttons.stories.tsx +10 -22
- package/src/components/__stories__/text-input.stories.tsx +4 -10
- package/src/components/__stories__/text-list-editor.stories.tsx +1 -3
- package/src/components/__stories__/zoomable-tex.stories.tsx +6 -4
- package/src/components/__stories__/zoomable.stories.tsx +1 -3
- package/src/components/fixed-to-responsive.tsx +0 -1
- package/src/components/graph.tsx +0 -4
- package/src/components/highlighting/highlightable-content.tsx +4 -7
- package/src/components/highlighting/ui/highlight-renderer.tsx +6 -9
- package/src/components/highlighting/ui/highlight-set-renderer.tsx +5 -8
- package/src/components/highlighting/ui/highlight-tooltip.tsx +2 -2
- package/src/components/highlighting/ui/highlighting-ui.tsx +5 -15
- package/src/components/highlighting/ui/selection-tracker.tsx +6 -9
- package/src/components/highlighting/word-indexer.tsx +2 -6
- package/src/components/inline-icon.tsx +2 -2
- package/src/components/math-input.tsx +0 -2
- package/src/components/number-input.tsx +0 -2
- package/src/components/simple-keypad-input.tsx +2 -2
- package/src/components/tex-buttons.tsx +2 -2
- package/src/components/text-list-editor.tsx +0 -4
- package/src/components/visibility-observer/__stories__/visibility-observer.stories.tsx +1 -3
- package/src/components/zoomable-tex.tsx +0 -2
- package/src/components/zoomable.tsx +0 -4
- package/src/definition-context.tsx +0 -1
- package/src/error-boundary.tsx +4 -7
- package/src/hints-renderer.tsx +1 -1
- package/src/interactive2/__tests__/movable-point.test.ts +0 -1
- package/src/item-renderer.tsx +0 -5
- package/src/mixins/changeable.ts +1 -1
- package/src/multi-items/__stories__/multi-renderer.stories.tsx +1 -5
- package/src/multi-items/__tests__/items.test.ts +3 -13
- package/src/multi-items/__tests__/multi-renderer.test.tsx +3 -4
- package/src/multi-items/__tests__/prop-type-builders.test.ts +1 -1
- package/src/multi-items/__tests__/trees.test.ts +2 -10
- package/src/multi-items/multi-renderer.tsx +7 -10
- package/src/multi-items/prop-type-builders.ts +1 -1
- package/src/multi-items/shape-types.ts +1 -1
- package/src/multi-items/tree-types.ts +1 -1
- package/src/perseus-markdown.tsx +0 -2
- package/src/perseus-types.ts +1 -4
- package/src/renderer.tsx +2 -5
- package/src/server-item-renderer.tsx +0 -3
- package/src/util/graphie.ts +3 -3
- package/src/util/interactive.ts +0 -4
- package/src/util/math.ts +0 -3
- package/src/widgets/__stories__/categorizer.stories.tsx +1 -1
- package/src/widgets/__stories__/cs-program.stories.tsx +1 -1
- package/src/widgets/__stories__/definition.stories.tsx +3 -7
- package/src/widgets/__stories__/dropdown.stories.tsx +1 -1
- package/src/widgets/__stories__/explanation.stories.tsx +2 -2
- package/src/widgets/__stories__/expression.stories.tsx +113 -13
- package/src/widgets/__stories__/graded-group-set.stories.tsx +1 -1
- package/src/widgets/__stories__/graded-group.stories.tsx +1 -1
- package/src/widgets/__stories__/grapher.stories.tsx +7 -21
- package/src/widgets/__stories__/group.stories.tsx +1 -1
- package/src/widgets/__stories__/iframe.stories.tsx +1 -1
- package/src/widgets/__stories__/image.stories.tsx +2 -2
- package/src/widgets/__stories__/input-number.stories.tsx +3 -12
- package/src/widgets/__stories__/interaction.stories.tsx +1 -1
- package/src/widgets/__stories__/interactive-graph.stories.tsx +9 -9
- package/src/widgets/__stories__/matcher.stories.tsx +1 -1
- package/src/widgets/__stories__/matrix.stories.tsx +1 -1
- package/src/widgets/__stories__/number-line.stories.tsx +1 -1
- package/src/widgets/__stories__/numeric-input.stories.tsx +3 -5
- package/src/widgets/__stories__/orderer.stories.tsx +1 -1
- package/src/widgets/__stories__/passage-ref.stories.tsx +2 -2
- package/src/widgets/__stories__/passage.stories.tsx +3 -9
- package/src/widgets/__stories__/radio.stories.tsx +3 -5
- package/src/widgets/__stories__/sorter.stories.tsx +1 -1
- package/src/widgets/__stories__/{on-screen-keypad.stories.tsx → test-keypad-context-wrapper.tsx} +15 -57
- package/src/widgets/__stories__/transformer.stories.tsx +1 -1
- package/src/widgets/__stories__/unit.stories.tsx +1 -3
- package/src/widgets/__stories__/video-transcript-link.stories.tsx +2 -6
- package/src/widgets/__stories__/video.stories.tsx +1 -1
- package/src/widgets/__testdata__/expression.testdata.ts +16 -12
- package/src/widgets/__testdata__/group.testdata.ts +0 -2
- package/src/widgets/__testdata__/numeric-input.testdata.ts +0 -1
- package/src/widgets/__testdata__/transformer.testdata.ts +0 -1
- package/src/widgets/__tests__/group.test.tsx +0 -2
- package/src/widgets/__tests__/radio/focus-ring.test.tsx +0 -1
- package/src/widgets/__tests__/radio.test.ts +1 -1
- package/src/widgets/expression.tsx +4 -4
- package/src/widgets/graded-group-set.tsx +0 -4
- package/src/widgets/graded-group.tsx +0 -4
- package/src/widgets/grapher/util.tsx +1 -5
- package/src/widgets/grapher.tsx +0 -5
- package/src/widgets/group.tsx +0 -1
- package/src/widgets/interaction/element-container.tsx +7 -8
- package/src/widgets/interaction.tsx +0 -1
- package/src/widgets/interactive-graph.tsx +3 -62
- package/src/widgets/label-image/__stories__/answer-choices.stories.tsx +2 -4
- package/src/widgets/label-image/__stories__/marker.stories.tsx +9 -19
- package/src/widgets/label-image/marker.tsx +4 -4
- package/src/widgets/label-image.tsx +1 -1
- package/src/widgets/measurer.tsx +0 -1
- package/src/widgets/number-line.tsx +0 -2
- package/src/widgets/numeric-input.tsx +0 -3
- package/src/widgets/orderer.tsx +0 -3
- package/src/widgets/passage/passage-markdown.tsx +3 -3
- package/src/widgets/passage-ref-target.tsx +0 -1
- package/src/widgets/passage.tsx +1 -1
- package/src/widgets/plotter.tsx +0 -1
- package/src/widgets/radio/__stories__/base-radio.stories.tsx +13 -21
- package/src/widgets/radio/__stories__/choice-icon.stories.tsx +9 -11
- package/src/widgets/radio/__stories__/choice-none-above.stories.tsx +1 -1
- package/src/widgets/radio/__stories__/choice.stories.tsx +4 -4
- package/src/widgets/radio/__stories__/focus-ring.stories.tsx +1 -1
- package/src/widgets/radio/__stories__/option-status.stories.tsx +2 -4
- package/src/widgets/radio/base-radio.tsx +2 -2
- package/src/widgets/radio/choice-icon/choice-icon.tsx +5 -5
- package/src/widgets/radio/choice-icon/cross-out-line.tsx +1 -3
- package/src/widgets/radio/choice-none-above.tsx +2 -2
- package/src/widgets/radio/choice.tsx +1 -3
- package/src/widgets/radio/focus-ring.tsx +1 -1
- package/src/widgets/radio/option-status.tsx +2 -4
- package/src/widgets/radio/widget.tsx +0 -1
- package/src/widgets/reaction-diagram.tsx +2 -2
- package/src/widgets/transformer.tsx +1 -16
- package/src/widgets/video-transcript-link.tsx +1 -1
- package/src/widgets.ts +1 -1
- package/src/zoom.ts +0 -3
- package/tsconfig.tsbuildinfo +1 -1
package/dist/index.js
CHANGED
|
@@ -485,8 +485,6 @@ class MathInput extends React__namespace.Component {
|
|
|
485
485
|
// group. This will probably require ESCAPE key handling to enable to
|
|
486
486
|
// close (blur) the button group in order to focus on next page element.
|
|
487
487
|
if (!this.mouseDown &&
|
|
488
|
-
// $FlowFixMe[incompatible-use]
|
|
489
|
-
// $FlowFixMe[incompatible-call]
|
|
490
488
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
|
|
491
489
|
!ReactDOM__default["default"].findDOMNode(this).contains(e.relatedTarget)) {
|
|
492
490
|
this.setState({
|
|
@@ -1309,7 +1307,7 @@ const _changeSingle = function (component, propName, value, callback) {
|
|
|
1309
1307
|
* this.change(propName) -> returns a lambda that takes a prop value to
|
|
1310
1308
|
* set and a callback to call after having set that value.
|
|
1311
1309
|
*/
|
|
1312
|
-
// TODO(WEB-1727): use proper
|
|
1310
|
+
// TODO(WEB-1727): use proper TypeScript syntax for overloaded functions
|
|
1313
1311
|
const change = function (newPropsOrSinglePropName, propValue, callback) {
|
|
1314
1312
|
if (___default["default"].isObject(newPropsOrSinglePropName) && callback === undefined) {
|
|
1315
1313
|
// Called with an object of multiple props to change
|
|
@@ -1393,8 +1391,6 @@ class TextListEditor extends React__namespace.Component {
|
|
|
1393
1391
|
// eslint-disable-next-line react/no-string-refs
|
|
1394
1392
|
// @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1395
1393
|
this.refs["input_" + focusIndex]
|
|
1396
|
-
// $FlowFixMe[incompatible-use]
|
|
1397
|
-
// $FlowFixMe[prop-missing]
|
|
1398
1394
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'focus' does not exist on type 'Element | Text'.
|
|
1399
1395
|
).focus();
|
|
1400
1396
|
});
|
|
@@ -1430,8 +1426,6 @@ class TextListEditor extends React__namespace.Component {
|
|
|
1430
1426
|
// eslint-disable-next-line react/no-string-refs
|
|
1431
1427
|
// @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
1432
1428
|
this.refs["input_" + focusIndex]
|
|
1433
|
-
// $FlowFixMe[incompatible-use]
|
|
1434
|
-
// $FlowFixMe[prop-missing]
|
|
1435
1429
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'focus' does not exist on type 'Element | Text'.
|
|
1436
1430
|
).focus();
|
|
1437
1431
|
});
|
|
@@ -1735,7 +1729,6 @@ const KhanMath = {
|
|
|
1735
1729
|
}
|
|
1736
1730
|
return true;
|
|
1737
1731
|
},
|
|
1738
|
-
// $FlowFixMe[incompatible-return]
|
|
1739
1732
|
// @ts-expect-error [FEI-5003] - TS2366 - Function lacks ending return statement and return type does not include 'undefined'.
|
|
1740
1733
|
getPrimeFactorization: function (number) {
|
|
1741
1734
|
if (number === 1) {
|
|
@@ -1792,9 +1785,7 @@ const KhanMath = {
|
|
|
1792
1785
|
// toFraction(0.666, 0.001) => [2, 3]
|
|
1793
1786
|
//
|
|
1794
1787
|
// tolerance can't be bigger than 1, sorry
|
|
1795
|
-
toFraction: function (decimal,
|
|
1796
|
-
// $FlowFixMe[incompatible-return]
|
|
1797
|
-
tolerance) {
|
|
1788
|
+
toFraction: function (decimal, tolerance) {
|
|
1798
1789
|
if (tolerance == null) {
|
|
1799
1790
|
tolerance = Math.pow(2, -46);
|
|
1800
1791
|
}
|
|
@@ -2612,6 +2603,8 @@ class Expression extends React__namespace.Component {
|
|
|
2612
2603
|
var _this;
|
|
2613
2604
|
super(...arguments);
|
|
2614
2605
|
_this = this;
|
|
2606
|
+
_defineProperty(this, "_isMounted", false);
|
|
2607
|
+
_defineProperty(this, "errorTimeout", null);
|
|
2615
2608
|
_defineProperty(this, "displayName", "Expression");
|
|
2616
2609
|
_defineProperty(this, "state", {
|
|
2617
2610
|
showErrorTooltip: false,
|
|
@@ -2658,8 +2651,6 @@ class Expression extends React__namespace.Component {
|
|
|
2658
2651
|
clearTimeout(this.errorTimeout);
|
|
2659
2652
|
this._isMounted = false;
|
|
2660
2653
|
});
|
|
2661
|
-
_defineProperty(this, "_isMounted", false);
|
|
2662
|
-
_defineProperty(this, "errorTimeout", null);
|
|
2663
2654
|
_defineProperty(this, "simpleValidate", (rubric, onInputError) => {
|
|
2664
2655
|
onInputError = onInputError || function () {};
|
|
2665
2656
|
return Expression.validate(this.getUserInput(), rubric, onInputError);
|
|
@@ -2901,7 +2892,7 @@ class Expression extends React__namespace.Component {
|
|
|
2901
2892
|
var _this$props$keypadEle;
|
|
2902
2893
|
// this.props.keypadElement should always be set
|
|
2903
2894
|
// when apiOptions.customKeypad is set, but how
|
|
2904
|
-
// to convince
|
|
2895
|
+
// to convince TypeScript of this?
|
|
2905
2896
|
(_this$props$keypadEle = this.props.keypadElement) === null || _this$props$keypadEle === void 0 ? void 0 : _this$props$keypadEle.configure(this.props.keypadConfiguration, () => {
|
|
2906
2897
|
if (this._isMounted) {
|
|
2907
2898
|
this._handleFocus();
|
|
@@ -4230,16 +4221,10 @@ Zoom.prototype._calculateZoom = function () {
|
|
|
4230
4221
|
// Zoom to fit the viewport.
|
|
4231
4222
|
const imageAspectRatio = originalFullImageWidth / originalFullImageHeight;
|
|
4232
4223
|
const viewportAspectRatio = viewportWidth / viewportHeight;
|
|
4233
|
-
if (
|
|
4234
|
-
// $FlowFixMe[invalid-compare]
|
|
4235
|
-
originalFullImageWidth < viewportWidth &&
|
|
4236
|
-
// $FlowFixMe[invalid-compare]
|
|
4237
|
-
originalFullImageHeight < viewportHeight) {
|
|
4224
|
+
if (originalFullImageWidth < viewportWidth && originalFullImageHeight < viewportHeight) {
|
|
4238
4225
|
this._imgScaleFactor = maxScaleFactor;
|
|
4239
4226
|
} else if (imageAspectRatio < viewportAspectRatio) {
|
|
4240
|
-
this._imgScaleFactor =
|
|
4241
|
-
// $FlowFixMe[unsafe-addition]
|
|
4242
|
-
viewportHeight / originalFullImageHeight * maxScaleFactor;
|
|
4227
|
+
this._imgScaleFactor = viewportHeight / originalFullImageHeight * maxScaleFactor;
|
|
4243
4228
|
} else {
|
|
4244
4229
|
this._imgScaleFactor = viewportWidth / (originalFullImageWidth !== null && originalFullImageWidth !== void 0 ? originalFullImageWidth : 0) * maxScaleFactor;
|
|
4245
4230
|
}
|
|
@@ -4569,7 +4554,6 @@ const FixedToResponsive = createReactClass__default["default"]({
|
|
|
4569
4554
|
// Based on http://refills.bourbon.io/components/#video && medium.com
|
|
4570
4555
|
const spacer = /*#__PURE__*/React__namespace.createElement("div", {
|
|
4571
4556
|
style: {
|
|
4572
|
-
// $FlowFixMe[unsafe-addition]
|
|
4573
4557
|
// @ts-expect-error [FEI-5003] - TS2362 - The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
|
|
4574
4558
|
paddingBottom: (1 / aspectRatio).toFixed(4) * 100 + "%"
|
|
4575
4559
|
}
|
|
@@ -10072,7 +10056,7 @@ GraphUtils.createGraphie = function (el) {
|
|
|
10072
10056
|
* the function at i
|
|
10073
10057
|
* @param {[]} rangeArray array of ranges over which the
|
|
10074
10058
|
* corresponding functions are defined
|
|
10075
|
-
* @return {
|
|
10059
|
+
* @return {Set<any>} set of paths
|
|
10076
10060
|
*/
|
|
10077
10061
|
plotPiecewise: function (fnArray, rangeArray) {
|
|
10078
10062
|
const paths = raphael$1.set();
|
|
@@ -10094,8 +10078,8 @@ GraphUtils.createGraphie = function (el) {
|
|
|
10094
10078
|
* return a Raphael set of Raphael circle objects at those
|
|
10095
10079
|
* coordinates
|
|
10096
10080
|
*
|
|
10097
|
-
* @param {Array
|
|
10098
|
-
* @return {
|
|
10081
|
+
* @param {Array<[number, number]>} endpointArray
|
|
10082
|
+
* @return {Set<any>} set of circles
|
|
10099
10083
|
*/
|
|
10100
10084
|
plotEndpointCircles: function (endpointArray) {
|
|
10101
10085
|
const circles = raphael$1.set();
|
|
@@ -13630,9 +13614,7 @@ function Protractor(graph, center) {
|
|
|
13630
13614
|
const time = Math.abs(this.rotation - angle) * 5;
|
|
13631
13615
|
$__default["default"]({
|
|
13632
13616
|
0: this.rotation
|
|
13633
|
-
}).animate(
|
|
13634
|
-
// $FlowFixMe[unsupported-syntax]
|
|
13635
|
-
{
|
|
13617
|
+
}).animate({
|
|
13636
13618
|
0: angle
|
|
13637
13619
|
}, {
|
|
13638
13620
|
duration: time,
|
|
@@ -13685,11 +13667,8 @@ function Ruler(graphie, options) {
|
|
|
13685
13667
|
if (options.ticksPerUnit === 10) {
|
|
13686
13668
|
// decimal, as on a centimeter ruler
|
|
13687
13669
|
tickHeightMap = {
|
|
13688
|
-
// $FlowFixMe[unsupported-syntax]
|
|
13689
13670
|
10: tickHeight,
|
|
13690
|
-
// $FlowFixMe[unsupported-syntax]
|
|
13691
13671
|
5: tickHeight * 0.55,
|
|
13692
|
-
// $FlowFixMe[unsupported-syntax]
|
|
13693
13672
|
1: tickHeight * 0.35
|
|
13694
13673
|
};
|
|
13695
13674
|
} else {
|
|
@@ -17794,12 +17773,8 @@ _defineProperty(Zoomable, "defaultProps", {
|
|
|
17794
17773
|
computeChildBounds: parentNode => {
|
|
17795
17774
|
const firstChild = parentNode.firstElementChild;
|
|
17796
17775
|
return {
|
|
17797
|
-
// $FlowFixMe[incompatible-use]
|
|
17798
|
-
// $FlowFixMe[prop-missing]
|
|
17799
17776
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'. | TS2339 - Property 'offsetWidth' does not exist on type 'Element'.
|
|
17800
17777
|
width: firstChild.offsetWidth,
|
|
17801
|
-
// $FlowFixMe[incompatible-use]
|
|
17802
|
-
// $FlowFixMe[prop-missing]
|
|
17803
17778
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'. | TS2339 - Property 'offsetHeight' does not exist on type 'Element'.
|
|
17804
17779
|
height: firstChild.offsetHeight
|
|
17805
17780
|
};
|
|
@@ -17809,10 +17784,8 @@ _defineProperty(Zoomable, "defaultProps", {
|
|
|
17809
17784
|
const computeMathBounds = (parentNode, parentBounds) => {
|
|
17810
17785
|
const textElement = parentNode.querySelector(".katex-html") || parentNode.querySelector(".MathJax");
|
|
17811
17786
|
const textBounds = {
|
|
17812
|
-
// $FlowFixMe[incompatible-use]
|
|
17813
17787
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'. | TS2339 - Property 'offsetWidth' does not exist on type 'Element'.
|
|
17814
17788
|
width: textElement.offsetWidth,
|
|
17815
|
-
// $FlowFixMe[incompatible-use]
|
|
17816
17789
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'. | TS2339 - Property 'offsetHeight' does not exist on type 'Element'.
|
|
17817
17790
|
height: textElement.offsetHeight
|
|
17818
17791
|
};
|
|
@@ -18735,11 +18708,8 @@ var PerseusMarkdown = {
|
|
|
18735
18708
|
parse: parse$3,
|
|
18736
18709
|
parseInline: inlineParser,
|
|
18737
18710
|
reactFor: SimpleMarkdown__default["default"].reactFor,
|
|
18738
|
-
// $FlowFixMe[incompatible-use]
|
|
18739
18711
|
ruleOutput: SimpleMarkdown__default["default"].ruleOutput(rules$1, "react"),
|
|
18740
|
-
basicOutput: SimpleMarkdown__default["default"].reactFor(
|
|
18741
|
-
// $FlowFixMe[incompatible-use]
|
|
18742
|
-
SimpleMarkdown__default["default"].ruleOutput(rules$1, "react")),
|
|
18712
|
+
basicOutput: SimpleMarkdown__default["default"].reactFor(SimpleMarkdown__default["default"].ruleOutput(rules$1, "react")),
|
|
18743
18713
|
sanitizeUrl: SimpleMarkdown__default["default"].sanitizeUrl
|
|
18744
18714
|
};
|
|
18745
18715
|
|
|
@@ -19181,7 +19151,7 @@ const validAlignments = ["block", "inline-block", "inline", "float-left", "float
|
|
|
19181
19151
|
* invalid.
|
|
19182
19152
|
*/
|
|
19183
19153
|
// TODO(alex): Change this to run as a testcase (vs. being run at runtime)
|
|
19184
|
-
// TODO(LP-10707): I think this can be completely removed because our
|
|
19154
|
+
// TODO(LP-10707): I think this can be completely removed because our TypeScript types
|
|
19185
19155
|
// enforce this!
|
|
19186
19156
|
const validateAlignments = () => {
|
|
19187
19157
|
___default["default"].each(widgets, function (widgetInfo) {
|
|
@@ -19553,10 +19523,8 @@ class Renderer extends React__namespace.Component {
|
|
|
19553
19523
|
let interactionTracker = this._interactionTrackers[id];
|
|
19554
19524
|
if (!interactionTracker) {
|
|
19555
19525
|
interactionTracker = this._interactionTrackers[id] = new InteractionTracker(apiOptions.trackInteraction,
|
|
19556
|
-
// $FlowFixMe[incompatible-call]
|
|
19557
19526
|
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'.
|
|
19558
19527
|
widgetInfo && widgetInfo.type, id,
|
|
19559
|
-
// $FlowFixMe[incompatible-call]
|
|
19560
19528
|
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'.
|
|
19561
19529
|
getTracking(widgetInfo && widgetInfo.type));
|
|
19562
19530
|
}
|
|
@@ -19866,7 +19834,7 @@ class Renderer extends React__namespace.Component {
|
|
|
19866
19834
|
const isString = typeof nodeOut === "string";
|
|
19867
19835
|
if (typeof nodeOut === "string" && lastWasString) {
|
|
19868
19836
|
/**
|
|
19869
|
-
* We know that last was string, but
|
|
19837
|
+
* We know that last was string, but TypeScript can't see this
|
|
19870
19838
|
* refinement.
|
|
19871
19839
|
*/
|
|
19872
19840
|
result[result.length - 1] += nodeOut;
|
|
@@ -20034,7 +20002,6 @@ class Renderer extends React__namespace.Component {
|
|
|
20034
20002
|
} = _ref3;
|
|
20035
20003
|
return /*#__PURE__*/React__namespace.createElement(SvgImage, _extends({
|
|
20036
20004
|
setAssetStatus: setAssetStatus
|
|
20037
|
-
/* $FlowFixMe[incompatible-type]: sanitizeUrl() can return null */
|
|
20038
20005
|
// @ts-expect-error [FEI-5003] - TS2322 - Type 'string | null | undefined' is not assignable to type 'string | undefined'.
|
|
20039
20006
|
,
|
|
20040
20007
|
src: PerseusMarkdown.sanitizeUrl(node.target),
|
|
@@ -21923,8 +21890,7 @@ _defineProperty(NumericInput, "defaultProps", {
|
|
|
21923
21890
|
coefficient: false,
|
|
21924
21891
|
answerForms: [],
|
|
21925
21892
|
labelText: "",
|
|
21926
|
-
linterContext: PerseusLinter.linterContextDefault
|
|
21927
|
-
multipleNumberInput: false
|
|
21893
|
+
linterContext: PerseusLinter.linterContextDefault
|
|
21928
21894
|
});
|
|
21929
21895
|
const unionAnswerForms = function (answerFormsList) {
|
|
21930
21896
|
// Takes a list of lists of answer forms, and returns a list of the forms
|
|
@@ -23351,7 +23317,7 @@ const BaseRadio = function (props) {
|
|
|
23351
23317
|
aphroditeClassName(true);
|
|
23352
23318
|
let correctnessClass;
|
|
23353
23319
|
// reviewMode is only true if there's a rubric
|
|
23354
|
-
// but
|
|
23320
|
+
// but TypeScript doesn't understand that
|
|
23355
23321
|
if (reviewMode && reviewModeRubric) {
|
|
23356
23322
|
correctnessClass = reviewModeRubric.choices[i].correct ? ClassNames.CORRECT : ClassNames.INCORRECT;
|
|
23357
23323
|
}
|
|
@@ -23872,9 +23838,7 @@ class Radio$1 extends React__namespace.Component {
|
|
|
23872
23838
|
};
|
|
23873
23839
|
});
|
|
23874
23840
|
return /*#__PURE__*/React__namespace.createElement(BaseRadio, {
|
|
23875
|
-
labelWrap: true
|
|
23876
|
-
// @ts-expect-error [FEI-5003] - TS2322 - Type 'boolean | undefined' is not assignable to type 'boolean'.
|
|
23877
|
-
,
|
|
23841
|
+
labelWrap: true,
|
|
23878
23842
|
multipleSelect: this.props.multipleSelect,
|
|
23879
23843
|
countChoices: this.props.countChoices,
|
|
23880
23844
|
numCorrect: this.props.numCorrect,
|
|
@@ -25130,7 +25094,6 @@ class GradedGroup extends React__namespace.Component {
|
|
|
25130
25094
|
}
|
|
25131
25095
|
const mobileClass = this.props.inGradedGroupSet ? aphrodite.css(styles$l.gradedGroupInSet) : aphrodite.css(styles$l.gradedGroup);
|
|
25132
25096
|
const classes = classNames__default["default"]({
|
|
25133
|
-
// $FlowFixMe[invalid-computed-prop]
|
|
25134
25097
|
[mobileClass]: apiOptions.isMobile,
|
|
25135
25098
|
"perseus-graded-group": true,
|
|
25136
25099
|
"answer-correct": apiOptions.isMobile ? false : this.state.status === GRADING_STATUSES.correct,
|
|
@@ -25392,7 +25355,6 @@ class GradedGroupSet extends React__namespace.Component {
|
|
|
25392
25355
|
/*#__PURE__*/
|
|
25393
25356
|
// TODO(jeremy): Don't spread this.props, instead
|
|
25394
25357
|
// pass in all props GradedGroup needs explicilty
|
|
25395
|
-
// $FlowFixMe[prop-missing]
|
|
25396
25358
|
// @ts-expect-error [FEI-5003] - TS2769 - No overload matches this call.
|
|
25397
25359
|
React__namespace.createElement(GradedGroup, _extends({
|
|
25398
25360
|
key: i
|
|
@@ -25431,12 +25393,8 @@ class GradedGroupSet extends React__namespace.Component {
|
|
|
25431
25393
|
ref: comp => this._childGroup = comp
|
|
25432
25394
|
// We should pass in the set of props explicitly
|
|
25433
25395
|
}, this.props, currentGroup, {
|
|
25434
|
-
inGradedGroupSet: true
|
|
25435
|
-
|
|
25436
|
-
,
|
|
25437
|
-
title: null
|
|
25438
|
-
// $FlowFixMe[incompatible-type]
|
|
25439
|
-
,
|
|
25396
|
+
inGradedGroupSet: true,
|
|
25397
|
+
title: null,
|
|
25440
25398
|
onNextQuestion: handleNextQuestion,
|
|
25441
25399
|
linterContext: this.props.linterContext
|
|
25442
25400
|
})));
|
|
@@ -25709,7 +25667,6 @@ const Linear = ___default["default"].extend({}, PlotDefaults, {
|
|
|
25709
25667
|
const Quadratic = ___default["default"].extend({}, PlotDefaults, {
|
|
25710
25668
|
url: "https://ka-perseus-graphie.s3.amazonaws.com/e23d36e6fc29ee37174e92c9daba2a66677128ab.png",
|
|
25711
25669
|
defaultCoords: [[0.5, 0.5], [0.75, 0.75]],
|
|
25712
|
-
// $FlowFixMe[prop-missing]
|
|
25713
25670
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'Parabola' does not exist on type 'typeof Graphie'.
|
|
25714
25671
|
Movable: Graphie.Parabola,
|
|
25715
25672
|
getCoefficients: function (coords) {
|
|
@@ -25750,7 +25707,6 @@ const Quadratic = ___default["default"].extend({}, PlotDefaults, {
|
|
|
25750
25707
|
const Sinusoid = ___default["default"].extend({}, PlotDefaults, {
|
|
25751
25708
|
url: "https://ka-perseus-graphie.s3.amazonaws.com/3d68e7718498475f53b206c2ab285626baf8857e.png",
|
|
25752
25709
|
defaultCoords: [[0.5, 0.5], [0.6, 0.6]],
|
|
25753
|
-
// $FlowFixMe[prop-missing]
|
|
25754
25710
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'Sinusoid' does not exist on type 'typeof Graphie'.
|
|
25755
25711
|
Movable: Graphie.Sinusoid,
|
|
25756
25712
|
getCoefficients: function (coords) {
|
|
@@ -25990,7 +25946,7 @@ const functionTypeMapping = {
|
|
|
25990
25946
|
const allTypes = ___default["default"].keys(functionTypeMapping);
|
|
25991
25947
|
function functionForType(
|
|
25992
25948
|
// TODO(jeremy): Actually `$Keys<typeof functionTypeMapping>` but that
|
|
25993
|
-
// triggers
|
|
25949
|
+
// triggers TypeScript to require all of our Plot types to be fully typed which
|
|
25994
25950
|
// is a big amount of work/change.
|
|
25995
25951
|
type) {
|
|
25996
25952
|
return functionTypeMapping[type];
|
|
@@ -26240,10 +26196,8 @@ class FunctionGrapher extends React__namespace.Component {
|
|
|
26240
26196
|
});
|
|
26241
26197
|
},
|
|
26242
26198
|
constraints: [
|
|
26243
|
-
// $FlowFixMe[prop-missing]
|
|
26244
26199
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
26245
26200
|
Interactive2.MovableLine.constraints.bound(),
|
|
26246
|
-
// $FlowFixMe[prop-missing]
|
|
26247
26201
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
26248
26202
|
Interactive2.MovableLine.constraints.snap(), (newCoord, oldCoord) => {
|
|
26249
26203
|
// Calculate and apply proposed displacement
|
|
@@ -26277,10 +26231,8 @@ class FunctionGrapher extends React__namespace.Component {
|
|
|
26277
26231
|
coord: coord,
|
|
26278
26232
|
static: this.props.static,
|
|
26279
26233
|
constraints: [
|
|
26280
|
-
// $FlowFixMe[prop-missing]
|
|
26281
26234
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
26282
26235
|
Interactive2.MovablePoint.constraints.bound(),
|
|
26283
|
-
// $FlowFixMe[prop-missing]
|
|
26284
26236
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
26285
26237
|
Interactive2.MovablePoint.constraints.snap(), coord => {
|
|
26286
26238
|
// Always enforce that this is a function
|
|
@@ -26338,7 +26290,6 @@ class FunctionGrapher extends React__namespace.Component {
|
|
|
26338
26290
|
// @ts-expect-error [FEI-5003] - TS2322 - Type 'Element' is not assignable to type 'null'.
|
|
26339
26291
|
image =
|
|
26340
26292
|
/*#__PURE__*/
|
|
26341
|
-
// $FlowFixMe[prop-missing]: alt props is missing
|
|
26342
26293
|
// @ts-expect-error [FEI-5003] - TS2741 - Property 'alt' is missing in type '{ src: any; width: any; height: any; scale: number; }' but required in type 'Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "children" | "height" | "width" | "title" | "alt" | "trackInteraction" | "preloader" | "allowFullBleed" | "extraGraphie" | "overrideAriaHidden">'.
|
|
26343
26294
|
React__namespace.createElement(SvgImage, {
|
|
26344
26295
|
src: imageDescription.url,
|
|
@@ -27245,9 +27196,7 @@ class Interaction extends React__namespace.Component {
|
|
|
27245
27196
|
functions: this.state.functions
|
|
27246
27197
|
});
|
|
27247
27198
|
compiledVars[name] = function (x) {
|
|
27248
|
-
return func(
|
|
27249
|
-
// $FlowFixMe[extra-arg]
|
|
27250
|
-
___default["default"].extend({}, compiledVars, {
|
|
27199
|
+
return func(___default["default"].extend({}, compiledVars, {
|
|
27251
27200
|
x: x
|
|
27252
27201
|
}));
|
|
27253
27202
|
};
|
|
@@ -27960,7 +27909,6 @@ class Graph extends React__namespace.Component {
|
|
|
27960
27909
|
const scale = this.props.box[0] / interactiveSizes$1.defaultBoxSize;
|
|
27961
27910
|
image =
|
|
27962
27911
|
/*#__PURE__*/
|
|
27963
|
-
// $FlowFixMe[prop-missing]: `alt` is missing
|
|
27964
27912
|
// @ts-expect-error [FEI-5003] - TS2741 - Property 'alt' is missing in type '{ src: any; width: any; height: any; scale: number; responsive: false; }' but required in type 'Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "children" | "height" | "width" | "title" | "alt" | "trackInteraction" | "preloader" | "allowFullBleed" | "extraGraphie" | "overrideAriaHidden">'.
|
|
27965
27913
|
React__namespace.createElement(SvgImage, {
|
|
27966
27914
|
src: imageData.url,
|
|
@@ -27978,15 +27926,12 @@ class Graph extends React__namespace.Component {
|
|
|
27978
27926
|
width: this.props.box[0],
|
|
27979
27927
|
height: this.props.box[1]
|
|
27980
27928
|
}
|
|
27981
|
-
// $FlowFixMe[prop-missing]: This can probably be removed
|
|
27982
27929
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'onMouseOut' does not exist on type 'Graph'.
|
|
27983
27930
|
,
|
|
27984
27931
|
onMouseOut: this.onMouseOut
|
|
27985
|
-
// $FlowFixMe[prop-missing]: This can probably be removed
|
|
27986
27932
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'onMouseOver' does not exist on type 'Graph'.
|
|
27987
27933
|
,
|
|
27988
27934
|
onMouseOver: this.onMouseOver
|
|
27989
|
-
// $FlowFixMe[prop-missing]: This can probably be removed
|
|
27990
27935
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'onClick' does not exist on type 'Graph'.
|
|
27991
27936
|
,
|
|
27992
27937
|
onClick: this.onClick
|
|
@@ -28481,10 +28426,8 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28481
28426
|
return Interactive2.addMaybeMobileMovablePoint(this, {
|
|
28482
28427
|
coord: coord,
|
|
28483
28428
|
constraints: [
|
|
28484
|
-
// $FlowFixMe[prop-missing]
|
|
28485
28429
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28486
28430
|
Interactive2.MovablePoint.constraints.bound(),
|
|
28487
|
-
// $FlowFixMe[prop-missing]
|
|
28488
28431
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28489
28432
|
Interactive2.MovablePoint.constraints.snap()],
|
|
28490
28433
|
onMove: () => {
|
|
@@ -28543,7 +28486,6 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28543
28486
|
}
|
|
28544
28487
|
const onMoveHandler = () => {
|
|
28545
28488
|
const graph = ___default["default"].extend({}, this.props.graph, {
|
|
28546
|
-
// $FlowFixMe[incompatible-use]
|
|
28547
28489
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'. | TS2531 - Object is possibly 'null'. | TS2531 - Object is possibly 'null'.
|
|
28548
28490
|
coords: [pointA.coord(), pointB.coord(), pointC.coord()]
|
|
28549
28491
|
});
|
|
@@ -28560,17 +28502,13 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28560
28502
|
pointA = this.pointA = Interactive2.addMaybeMobileMovablePoint(this, {
|
|
28561
28503
|
coord: coords[0],
|
|
28562
28504
|
constraints: [
|
|
28563
|
-
// $FlowFixMe[prop-missing]
|
|
28564
28505
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28565
28506
|
Interactive2.MovablePoint.constraints.bound(),
|
|
28566
|
-
// $FlowFixMe[prop-missing]
|
|
28567
28507
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28568
28508
|
Interactive2.MovablePoint.constraints.snap(), coord => {
|
|
28569
28509
|
return !pointA ||
|
|
28570
|
-
// $FlowFixMe[incompatible-use]
|
|
28571
28510
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
|
|
28572
28511
|
coord[0] !== pointB.coord()[0] &&
|
|
28573
|
-
// $FlowFixMe[incompatible-use]
|
|
28574
28512
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
|
|
28575
28513
|
coord[0] !== pointC.coord()[0];
|
|
28576
28514
|
}],
|
|
@@ -28584,17 +28522,13 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28584
28522
|
pointB = this.pointB = Interactive2.addMaybeMobileMovablePoint(this, {
|
|
28585
28523
|
coord: coords[1],
|
|
28586
28524
|
constraints: [
|
|
28587
|
-
// $FlowFixMe[prop-missing]
|
|
28588
28525
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28589
28526
|
Interactive2.MovablePoint.constraints.bound(),
|
|
28590
|
-
// $FlowFixMe[prop-missing]
|
|
28591
28527
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28592
28528
|
Interactive2.MovablePoint.constraints.snap(), coord => {
|
|
28593
28529
|
return !pointB ||
|
|
28594
|
-
// $FlowFixMe[incompatible-use]
|
|
28595
28530
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
|
|
28596
28531
|
coord[0] !== pointA.coord()[0] &&
|
|
28597
|
-
// $FlowFixMe[incompatible-use]
|
|
28598
28532
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
|
|
28599
28533
|
coord[0] !== pointC.coord()[0];
|
|
28600
28534
|
}],
|
|
@@ -28608,17 +28542,13 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28608
28542
|
pointC = this.pointC = Interactive2.addMaybeMobileMovablePoint(this, {
|
|
28609
28543
|
coord: coords[2],
|
|
28610
28544
|
constraints: [
|
|
28611
|
-
// $FlowFixMe[prop-missing]
|
|
28612
28545
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28613
28546
|
Interactive2.MovablePoint.constraints.bound(),
|
|
28614
|
-
// $FlowFixMe[prop-missing]
|
|
28615
28547
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28616
28548
|
Interactive2.MovablePoint.constraints.snap(), coord => {
|
|
28617
28549
|
return !pointC ||
|
|
28618
|
-
// $FlowFixMe[incompatible-use]
|
|
28619
28550
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
|
|
28620
28551
|
coord[0] !== pointA.coord()[0] &&
|
|
28621
|
-
// $FlowFixMe[incompatible-use]
|
|
28622
28552
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
|
|
28623
28553
|
coord[0] !== pointB.coord()[0];
|
|
28624
28554
|
}],
|
|
@@ -28674,7 +28604,6 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28674
28604
|
}
|
|
28675
28605
|
const onMoveHandler = () => {
|
|
28676
28606
|
const graph = ___default["default"].extend({}, this.props.graph, {
|
|
28677
|
-
// $FlowFixMe[incompatible-use]
|
|
28678
28607
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
|
|
28679
28608
|
coords: [pointA.coord(), pointB.coord()]
|
|
28680
28609
|
});
|
|
@@ -28691,10 +28620,8 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28691
28620
|
pointA = this.pointA = Interactive2.addMaybeMobileMovablePoint(this, {
|
|
28692
28621
|
coord: coords[0],
|
|
28693
28622
|
constraints: [
|
|
28694
|
-
// $FlowFixMe[prop-missing]
|
|
28695
28623
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28696
28624
|
Interactive2.MovablePoint.constraints.bound(),
|
|
28697
|
-
// $FlowFixMe[prop-missing]
|
|
28698
28625
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28699
28626
|
Interactive2.MovablePoint.constraints.snap(), coord => {
|
|
28700
28627
|
return !pointA || coord[0] !== pointB.coord()[0];
|
|
@@ -28704,10 +28631,8 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28704
28631
|
const pointB = this.pointB = Interactive2.addMaybeMobileMovablePoint(this, {
|
|
28705
28632
|
coord: coords[1],
|
|
28706
28633
|
constraints: [
|
|
28707
|
-
// $FlowFixMe[prop-missing]
|
|
28708
28634
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28709
28635
|
Interactive2.MovablePoint.constraints.bound(),
|
|
28710
|
-
// $FlowFixMe[prop-missing]
|
|
28711
28636
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28712
28637
|
Interactive2.MovablePoint.constraints.snap(), coord => {
|
|
28713
28638
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'coord' does not exist on type 'never'.
|
|
@@ -28768,9 +28693,7 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28768
28693
|
});
|
|
28769
28694
|
$__default["default"](circle).on("move", () => {
|
|
28770
28695
|
const graph = ___default["default"].extend({}, this.props.graph, {
|
|
28771
|
-
// $FlowFixMe[incompatible-use]
|
|
28772
28696
|
center: circle.center,
|
|
28773
|
-
// $FlowFixMe[incompatible-use]
|
|
28774
28697
|
radius: circle.radius
|
|
28775
28698
|
});
|
|
28776
28699
|
this.onChange({
|
|
@@ -28797,10 +28720,8 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28797
28720
|
segmentPoints.push(Interactive2.addMaybeMobileMovablePoint(this, {
|
|
28798
28721
|
coord: coord,
|
|
28799
28722
|
constraints: [
|
|
28800
|
-
// $FlowFixMe[prop-missing]
|
|
28801
28723
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28802
28724
|
Interactive2.MovablePoint.constraints.bound(),
|
|
28803
|
-
// $FlowFixMe[prop-missing]
|
|
28804
28725
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28805
28726
|
Interactive2.MovablePoint.constraints.snap(), coord => {
|
|
28806
28727
|
const otherSegment = segmentPoints[1 - i];
|
|
@@ -28851,12 +28772,7 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28851
28772
|
}
|
|
28852
28773
|
const graphie = this.graphie;
|
|
28853
28774
|
const screenPoint = graphie === null || graphie === void 0 ? void 0 : graphie.scalePoint(coord);
|
|
28854
|
-
return
|
|
28855
|
-
// $FlowFixMe[incompatible-use]
|
|
28856
|
-
screenPoint[0] >= graphie.xpixels - 40 &&
|
|
28857
|
-
// $FlowFixMe[incompatible-use]
|
|
28858
|
-
screenPoint[1] >= graphie.ypixels - 40
|
|
28859
|
-
);
|
|
28775
|
+
return screenPoint[0] >= graphie.xpixels - 40 && screenPoint[1] >= graphie.ypixels - 40;
|
|
28860
28776
|
});
|
|
28861
28777
|
_defineProperty(this, "createPointForPointsType", (coord, i) => {
|
|
28862
28778
|
const self = this;
|
|
@@ -28883,10 +28799,8 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
28883
28799
|
point = Interactive2.addMaybeMobileMovablePoint(this, {
|
|
28884
28800
|
coord: coord,
|
|
28885
28801
|
constraints: [
|
|
28886
|
-
// $FlowFixMe[prop-missing]
|
|
28887
28802
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28888
28803
|
Interactive2.MovablePoint.constraints.bound(),
|
|
28889
|
-
// $FlowFixMe[prop-missing]
|
|
28890
28804
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
28891
28805
|
Interactive2.MovablePoint.constraints.snap(), function (coord) {
|
|
28892
28806
|
// TODO(jack): There ought to be a
|
|
@@ -29174,10 +29088,8 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
29174
29088
|
const point = Interactive2.addMaybeMobileMovablePoint(this, {
|
|
29175
29089
|
coord: coord,
|
|
29176
29090
|
constraints: [
|
|
29177
|
-
// $FlowFixMe[prop-missing]
|
|
29178
29091
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
29179
29092
|
Interactive2.MovablePoint.constraints.bound(), snapToGrid ?
|
|
29180
|
-
// $FlowFixMe[prop-missing]
|
|
29181
29093
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
29182
29094
|
Interactive2.MovablePoint.constraints.snap() : null, graphConstraint],
|
|
29183
29095
|
onMoveStart: () => {
|
|
@@ -29273,10 +29185,8 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
29273
29185
|
points.push(createPoint({
|
|
29274
29186
|
coord: coord,
|
|
29275
29187
|
constraints: [
|
|
29276
|
-
// $FlowFixMe[prop-missing]
|
|
29277
29188
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
29278
29189
|
Interactive2.MovablePoint.constraints.bound(),
|
|
29279
|
-
// $FlowFixMe[prop-missing]
|
|
29280
29190
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
29281
29191
|
Interactive2.MovablePoint.constraints.snap(), coord => {
|
|
29282
29192
|
const otherPoint = points[1 - i];
|
|
@@ -29298,14 +29208,11 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
29298
29208
|
points: points,
|
|
29299
29209
|
static: false,
|
|
29300
29210
|
constraints: [
|
|
29301
|
-
// $FlowFixMe[prop-missing]
|
|
29302
29211
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
29303
29212
|
Interactive2.MovableLine.constraints.bound(),
|
|
29304
|
-
// $FlowFixMe[prop-missing]
|
|
29305
29213
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
29306
29214
|
Interactive2.MovableLine.constraints.snap()],
|
|
29307
29215
|
onMove: [
|
|
29308
|
-
// $FlowFixMe[prop-missing]
|
|
29309
29216
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'onMove' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
29310
29217
|
Interactive2.MovableLine.onMove.updatePoints, updateCoordProps],
|
|
29311
29218
|
normalStyle: {
|
|
@@ -29402,10 +29309,8 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
29402
29309
|
const self = this;
|
|
29403
29310
|
self.polygon = Interactive2.addMovablePolygon(graphie, {
|
|
29404
29311
|
constraints: [
|
|
29405
|
-
// $FlowFixMe[prop-missing]
|
|
29406
29312
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => undefined'.
|
|
29407
29313
|
Interactive2.MovablePolygon.constraints.bound(), snapToGrid ?
|
|
29408
|
-
// $FlowFixMe[prop-missing]
|
|
29409
29314
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => undefined'.
|
|
29410
29315
|
Interactive2.MovablePolygon.constraints.snap() : null],
|
|
29411
29316
|
closed: closed,
|
|
@@ -29415,7 +29320,6 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
29415
29320
|
numArcs: numArcs,
|
|
29416
29321
|
sideLabels: sideLabels,
|
|
29417
29322
|
onMove: [
|
|
29418
|
-
// $FlowFixMe[prop-missing]
|
|
29419
29323
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'onMove' does not exist on type '(graphie: any, movable: any, options: any) => undefined'.
|
|
29420
29324
|
Interactive2.MovablePolygon.onMove.updatePoints, function () {
|
|
29421
29325
|
// @ts-expect-error [FEI-5003] - TS2683 - 'this' implicitly has type 'any' because it does not have a type annotation.
|
|
@@ -29647,7 +29551,6 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
29647
29551
|
*/
|
|
29648
29552
|
static getLineCoords(graph, props) {
|
|
29649
29553
|
return (
|
|
29650
|
-
// $FlowFixMe[incompatible-return]
|
|
29651
29554
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'coords' does not exist on type 'PerseusGraphType'.
|
|
29652
29555
|
graph.coords || InteractiveGraph.pointsFromNormalized(props, [[0.25, 0.75], [0.75, 0.75]])
|
|
29653
29556
|
);
|
|
@@ -29702,7 +29605,6 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
29702
29605
|
static getLinearSystemCoords(graph, props) {
|
|
29703
29606
|
return (
|
|
29704
29607
|
// The callers assume that we're return an array of points
|
|
29705
|
-
// $FlowFixMe[incompatible-return]
|
|
29706
29608
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'coords' does not exist on type 'PerseusGraphType'.
|
|
29707
29609
|
graph.coords || ___default["default"].map([[[0.25, 0.75], [0.75, 0.75]], [[0.25, 0.25], [0.75, 0.25]]], coords => {
|
|
29708
29610
|
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'number[][]' is not assignable to parameter of type 'readonly Coord[]'.
|
|
@@ -29758,17 +29660,11 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
29758
29660
|
const n = graph.numSegments || 1;
|
|
29759
29661
|
// @ts-expect-error [FEI-5003] - TS2322 - Type 'number[] | undefined' is not assignable to type 'readonly number[]'.
|
|
29760
29662
|
const ys = {
|
|
29761
|
-
// $FlowFixMe[unsupported-syntax]
|
|
29762
29663
|
1: [5],
|
|
29763
|
-
// $FlowFixMe[unsupported-syntax]
|
|
29764
29664
|
2: [5, -5],
|
|
29765
|
-
// $FlowFixMe[unsupported-syntax]
|
|
29766
29665
|
3: [5, 0, -5],
|
|
29767
|
-
// $FlowFixMe[unsupported-syntax]
|
|
29768
29666
|
4: [6, 2, -2, -6],
|
|
29769
|
-
// $FlowFixMe[unsupported-syntax]
|
|
29770
29667
|
5: [6, 3, 0, -3, -6],
|
|
29771
|
-
// $FlowFixMe[unsupported-syntax]
|
|
29772
29668
|
6: [5, 3, 1, -1, -3, -5]
|
|
29773
29669
|
}[n];
|
|
29774
29670
|
const range = [[-10, 10], [-10, 10]];
|
|
@@ -29972,7 +29868,6 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
29972
29868
|
// If both of the guess points are on the correct line, it's
|
|
29973
29869
|
// correct.
|
|
29974
29870
|
if (
|
|
29975
|
-
// $FlowFixMe[incompatible-use] - Fix type so coords can't be omitted
|
|
29976
29871
|
// @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'. | TS2532 - Object is possibly 'undefined'.
|
|
29977
29872
|
collinear(correct[0], correct[1], guess[0]) &&
|
|
29978
29873
|
// @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'. | TS2532 - Object is possibly 'undefined'.
|
|
@@ -29999,8 +29894,6 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
29999
29894
|
// If the parabola coefficients match, it's correct.
|
|
30000
29895
|
const guessCoeffs = this.getQuadraticCoefficients(state.coords);
|
|
30001
29896
|
const correctCoeffs = this.getQuadraticCoefficients(
|
|
30002
|
-
// $FlowFixMe[incompatible-call]
|
|
30003
|
-
// $FlowFixMe[prop-missing]
|
|
30004
29897
|
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'readonly Coord[] | undefined' is not assignable to parameter of type 'readonly Coord[]'.
|
|
30005
29898
|
rubric.correct.coords);
|
|
30006
29899
|
if (deepEq$2(guessCoeffs, correctCoeffs)) {
|
|
@@ -30014,8 +29907,6 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
30014
29907
|
} else if (state.type === "sinusoid" && rubric.correct.type === "sinusoid" && state.coords != null) {
|
|
30015
29908
|
const guessCoeffs = this.getSinusoidCoefficients(state.coords);
|
|
30016
29909
|
const correctCoeffs = this.getSinusoidCoefficients(
|
|
30017
|
-
// $FlowFixMe[incompatible-call]
|
|
30018
|
-
// $FlowFixMe[prop-missing]
|
|
30019
29910
|
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'readonly Coord[] | undefined' is not assignable to parameter of type 'readonly Coord[]'.
|
|
30020
29911
|
rubric.correct.coords);
|
|
30021
29912
|
const canonicalGuessCoeffs = canonicalSineCoefficients(guessCoeffs);
|
|
@@ -30030,9 +29921,7 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
30030
29921
|
};
|
|
30031
29922
|
}
|
|
30032
29923
|
} else if (state.type === "circle" && rubric.correct.type === "circle") {
|
|
30033
|
-
if (deepEq$2(state.center, rubric.correct.center) &&
|
|
30034
|
-
// $FlowFixMe[prop-missing]
|
|
30035
|
-
eq(state.radius, rubric.correct.radius)) {
|
|
29924
|
+
if (deepEq$2(state.center, rubric.correct.center) && eq(state.radius, rubric.correct.radius)) {
|
|
30036
29925
|
return {
|
|
30037
29926
|
type: "points",
|
|
30038
29927
|
earned: 1,
|
|
@@ -30105,10 +29994,8 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
30105
29994
|
const guess = state.coords;
|
|
30106
29995
|
const correct = rubric.correct.coords;
|
|
30107
29996
|
if (
|
|
30108
|
-
// $FlowFixMe[incompatible-use]
|
|
30109
29997
|
// @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'.
|
|
30110
29998
|
deepEq$2(guess[0], correct[0]) &&
|
|
30111
|
-
// $FlowFixMe[incompatible-use]
|
|
30112
29999
|
// @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'. | TS2532 - Object is possibly 'undefined'.
|
|
30113
30000
|
collinear(correct[0], correct[1], guess[1])) {
|
|
30114
30001
|
return {
|
|
@@ -30138,13 +30025,10 @@ class InteractiveGraph extends React__namespace.Component {
|
|
|
30138
30025
|
} else {
|
|
30139
30026
|
/* exact */
|
|
30140
30027
|
match =
|
|
30141
|
-
// $FlowFixMe[incompatible-use]
|
|
30142
30028
|
// @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'. | TS2532 - Object is possibly 'undefined'.
|
|
30143
30029
|
deepEq$2(guess[1], correct[1]) &&
|
|
30144
|
-
// $FlowFixMe[incompatible-use]
|
|
30145
30030
|
// @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'. | TS2532 - Object is possibly 'undefined'. | TS2532 - Object is possibly 'undefined'.
|
|
30146
30031
|
collinear(correct[1], correct[0], guess[0]) &&
|
|
30147
|
-
// $FlowFixMe[incompatible-use]
|
|
30148
30032
|
// @ts-expect-error [FEI-5003] - TS2532 - Object is possibly 'undefined'. | TS2532 - Object is possibly 'undefined'. | TS2532 - Object is possibly 'undefined'.
|
|
30149
30033
|
collinear(correct[1], correct[2], guess[2]);
|
|
30150
30034
|
}
|
|
@@ -30183,7 +30067,6 @@ _defineProperty(InteractiveGraph, "defaultProps", {
|
|
|
30183
30067
|
labels: ["x", "y"],
|
|
30184
30068
|
range: [[-10, 10], [-10, 10]],
|
|
30185
30069
|
step: [1, 1],
|
|
30186
|
-
// $FlowFixMe[prop-missing]
|
|
30187
30070
|
// @ts-expect-error [FEI-5003] - TS2739 - Type '{ readonly url: null; }' is missing the following properties from type 'PerseusImageBackground': width, height
|
|
30188
30071
|
backgroundImage: defaultBackgroundImage$1,
|
|
30189
30072
|
markings: "graph",
|
|
@@ -31863,7 +31746,7 @@ class LabelImage extends React__namespace.Component {
|
|
|
31863
31746
|
_defineProperty(this, "handleDocumentClick", e => {
|
|
31864
31747
|
// Dismiss open popup with answer choices if user clicks outside it.
|
|
31865
31748
|
if (this._selectedMarkerPopup && this._answerChoices) {
|
|
31866
|
-
const answerChoices =
|
|
31749
|
+
const answerChoices = ReactDOM__namespace.findDOMNode(this._answerChoices);
|
|
31867
31750
|
const targetElement = e.target;
|
|
31868
31751
|
// HACK(michaelpolyak): We want to determine if the click target is
|
|
31869
31752
|
// contained within the popup layer. As there's no public interface
|
|
@@ -31958,7 +31841,7 @@ class LabelImage extends React__namespace.Component {
|
|
|
31958
31841
|
// Set focus on the just-deselected-marker, to enable to resume
|
|
31959
31842
|
// navigating between the markers using the keyboard.
|
|
31960
31843
|
if (marker) {
|
|
31961
|
-
|
|
31844
|
+
ReactDOM__namespace.findDOMNode(marker).focus();
|
|
31962
31845
|
}
|
|
31963
31846
|
});
|
|
31964
31847
|
}
|
|
@@ -32049,7 +31932,7 @@ class LabelImage extends React__namespace.Component {
|
|
|
32049
31932
|
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type '{ x: number; y: number; } | { x: number; y: number; } | { x: number; y: number; } | { x: number; y: number; }' is not assignable to parameter of type 'Direction'.
|
|
32050
31933
|
navigateDirection, markers, index)];
|
|
32051
31934
|
if (marker) {
|
|
32052
|
-
|
|
31935
|
+
ReactDOM__namespace.findDOMNode(marker).focus();
|
|
32053
31936
|
}
|
|
32054
31937
|
}
|
|
32055
31938
|
handleAnswerChoicesChangeForMarker(index, selection) {
|
|
@@ -33508,8 +33391,6 @@ class NumberInput extends React__namespace.Component {
|
|
|
33508
33391
|
});
|
|
33509
33392
|
_defineProperty(this, "getValue", () => {
|
|
33510
33393
|
return this.parseInputValue(
|
|
33511
|
-
// $FlowFixMe[incompatible-use]
|
|
33512
|
-
// $FlowFixMe[prop-missing]
|
|
33513
33394
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'. | TS2339 - Property 'value' does not exist on type 'Element | Text'.
|
|
33514
33395
|
ReactDOM__default["default"].findDOMNode(this.refs.input).value // eslint-disable-line react/no-string-refs
|
|
33515
33396
|
);
|
|
@@ -35334,14 +35215,10 @@ const TickMarks = Graphie.createSimpleClass((graphie, props) => {
|
|
|
35334
35215
|
// Render the text labels
|
|
35335
35216
|
results.push(graphie.style(props.isMobile ? {
|
|
35336
35217
|
color: KhanColors.BLUE_D
|
|
35337
|
-
} : {},
|
|
35338
|
-
// $FlowFixMe[incompatible-call]
|
|
35339
|
-
() => _label(graphie, props.labelStyle, leftLabel, leftLabel, base)));
|
|
35218
|
+
} : {}, () => _label(graphie, props.labelStyle, leftLabel, leftLabel, base)));
|
|
35340
35219
|
results.push(graphie.style(props.isMobile ? {
|
|
35341
35220
|
color: KhanColors.BLUE_D
|
|
35342
|
-
} : {}, () =>
|
|
35343
|
-
// $FlowFixMe[incompatible-call]
|
|
35344
|
-
_label(graphie, props.labelStyle, rightLabel, rightLabel, base)));
|
|
35221
|
+
} : {}, () => _label(graphie, props.labelStyle, rightLabel, rightLabel, base)));
|
|
35345
35222
|
|
|
35346
35223
|
// Render the labels' lines
|
|
35347
35224
|
graphie.style({
|
|
@@ -36028,10 +35905,7 @@ class Orderer extends React__namespace.Component {
|
|
|
36028
35905
|
current: list,
|
|
36029
35906
|
dragging: true,
|
|
36030
35907
|
placeholderIndex: placeholderIndex,
|
|
36031
|
-
// $FlowFixMe[prop-missing]
|
|
36032
|
-
// $FlowFixMe[incompatible-use]
|
|
36033
35908
|
dragKey: opt.key,
|
|
36034
|
-
// $FlowFixMe[incompatible-use]
|
|
36035
35909
|
dragContent: opt.content,
|
|
36036
35910
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'width' does not exist on type 'JQueryStatic'.
|
|
36037
35911
|
dragWidth: $draggable.width(),
|
|
@@ -37369,7 +37243,7 @@ class SelectionTracker extends React__namespace.PureComponent {
|
|
|
37369
37243
|
}
|
|
37370
37244
|
|
|
37371
37245
|
// NOTE(mdr): The focus node is guaranteed to exist, because
|
|
37372
|
-
// there's a range, but the
|
|
37246
|
+
// there's a range, but the type annotations for
|
|
37373
37247
|
// Selection don't know that. Cast it ourselves.
|
|
37374
37248
|
const focusNode = selection.focusNode;
|
|
37375
37249
|
const focusOffset = selection.focusOffset;
|
|
@@ -37491,23 +37365,8 @@ class HighlightingUI extends React__namespace.PureComponent {
|
|
|
37491
37365
|
zIndexes: this.props.zIndexes
|
|
37492
37366
|
}), this._selectionIsValid(trackedSelection) && !userIsMouseSelecting && /*#__PURE__*/React__namespace.createElement(HighlightTooltip, {
|
|
37493
37367
|
label: i18n__namespace._("Add highlight"),
|
|
37494
|
-
onClick: () => this._handleAddHighlight(
|
|
37495
|
-
|
|
37496
|
-
// "proposedHighlight (Cannot get `trackedSelection.proposedHighlight` because property `proposedHighlight` is missing in null or undefined [1].)"
|
|
37497
|
-
// $FlowFixMe[incompatible-use](0.57.3->0.75.0)
|
|
37498
|
-
// @ts-expect-error [FEI-5003] - TS2533 - Object is possibly 'null' or 'undefined'.
|
|
37499
|
-
trackedSelection.proposedHighlight)
|
|
37500
|
-
// TODO(mdr): We found a new Flow error when upgrading:
|
|
37501
|
-
// "focusNode (Cannot get `trackedSelection.focusNode` because property `focusNode` is missing in null or undefined [1].)"
|
|
37502
|
-
// $FlowFixMe[incompatible-use](0.57.3->0.75.0)
|
|
37503
|
-
// @ts-expect-error [FEI-5003] - TS2533 - Object is possibly 'null' or 'undefined'.
|
|
37504
|
-
,
|
|
37505
|
-
focusNode: trackedSelection.focusNode
|
|
37506
|
-
// TODO(mdr): We found a new Flow error when upgrading:
|
|
37507
|
-
// "focusOffset (Cannot get `trackedSelection.focusOffset` because property `focusOffset` is missing in null or undefined [1].)"
|
|
37508
|
-
// $FlowFixMe[incompatible-use](0.57.3->0.75.0)
|
|
37509
|
-
// @ts-expect-error [FEI-5003] - TS2533 - Object is possibly 'null' or 'undefined'.
|
|
37510
|
-
,
|
|
37368
|
+
onClick: () => this._handleAddHighlight(trackedSelection.proposedHighlight),
|
|
37369
|
+
focusNode: trackedSelection.focusNode,
|
|
37511
37370
|
focusOffset: trackedSelection.focusOffset,
|
|
37512
37371
|
offsetParent: this.props.offsetParent
|
|
37513
37372
|
})));
|
|
@@ -37581,11 +37440,7 @@ class WordIndexer extends React__namespace.PureComponent {
|
|
|
37581
37440
|
let newTrailingWordRange = null;
|
|
37582
37441
|
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'string | null' is not assignable to parameter of type 'string'.
|
|
37583
37442
|
while ((wordMatch = wordPattern.exec(text)) !== null) {
|
|
37584
|
-
// TODO(mdr): We found a new Flow error when upgrading:
|
|
37585
|
-
// "index (Cannot get `wordMatch.index` because property `index` is missing in null [1].)"
|
|
37586
37443
|
const startOffset = wordMatch.index;
|
|
37587
|
-
// TODO(mdr): We found a new Flow error when upgrading:
|
|
37588
|
-
// "index (Cannot get `wordMatch.index` because property `index` is missing in null [1].)", "0 (Cannot get `wordMatch[0]` because an indexer property is missing in null [1].)"
|
|
37589
37444
|
const endOffset = wordMatch.index + wordMatch[0].length;
|
|
37590
37445
|
let range;
|
|
37591
37446
|
if (startOffset === 0 && trailingWordRange) {
|
|
@@ -37869,7 +37724,7 @@ const rules = {
|
|
|
37869
37724
|
|
|
37870
37725
|
// A "magic" capture that matches the opening {{
|
|
37871
37726
|
// but captures the full ref text internally :D
|
|
37872
|
-
// unfortunately the "magic" makes
|
|
37727
|
+
// unfortunately the "magic" makes TypeScript upset,
|
|
37873
37728
|
// so there's this questionable workaround
|
|
37874
37729
|
capture[1] = source.slice(2, closeIndex);
|
|
37875
37730
|
return capture;
|
|
@@ -38247,7 +38102,7 @@ class Passage extends React__namespace.Component {
|
|
|
38247
38102
|
});
|
|
38248
38103
|
}
|
|
38249
38104
|
_measureLines() {
|
|
38250
|
-
const renderer =
|
|
38105
|
+
const renderer = ReactDOM__namespace.findDOMNode(this._contentRef);
|
|
38251
38106
|
// @ts-expect-error [FEI-5003] - TS2769 - No overload matches this call. | TS2339 - Property 'height' does not exist on type 'JQueryStatic'.
|
|
38252
38107
|
const contentsHeight = $__default["default"](renderer).height();
|
|
38253
38108
|
const lineHeight = this._getLineHeight();
|
|
@@ -38301,7 +38156,7 @@ class Passage extends React__namespace.Component {
|
|
|
38301
38156
|
}
|
|
38302
38157
|
|
|
38303
38158
|
// @ts-expect-error [FEI-5003] - TS2769 - No overload matches this call.
|
|
38304
|
-
const $ref = $__default["default"](
|
|
38159
|
+
const $ref = $__default["default"](ReactDOM__namespace.findDOMNode(ref));
|
|
38305
38160
|
// We really care about the first text after the ref, not the
|
|
38306
38161
|
// ref element itself:
|
|
38307
38162
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'next' does not exist on type 'JQueryStatic'.
|
|
@@ -38322,7 +38177,7 @@ class Passage extends React__namespace.Component {
|
|
|
38322
38177
|
}
|
|
38323
38178
|
|
|
38324
38179
|
// @ts-expect-error [FEI-5003] - TS2769 - No overload matches this call.
|
|
38325
|
-
const $ref = $__default["default"](
|
|
38180
|
+
const $ref = $__default["default"](ReactDOM__namespace.findDOMNode(ref));
|
|
38326
38181
|
// We really care about the last text before the ref, not the
|
|
38327
38182
|
// ref element itself:
|
|
38328
38183
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'prev' does not exist on type 'JQueryStatic'.
|
|
@@ -38347,7 +38202,7 @@ class Passage extends React__namespace.Component {
|
|
|
38347
38202
|
return this.state.startLineNumbersAfter + line;
|
|
38348
38203
|
}
|
|
38349
38204
|
_convertPosToLineNumber(absoluteVPos) {
|
|
38350
|
-
const content =
|
|
38205
|
+
const content = ReactDOM__namespace.findDOMNode(this._contentRef);
|
|
38351
38206
|
// @ts-expect-error [FEI-5003] - TS2769 - No overload matches this call. | TS2339 - Property 'offset' does not exist on type 'JQueryStatic'.
|
|
38352
38207
|
const relativeVPos = absoluteVPos - $__default["default"](content).offset().top;
|
|
38353
38208
|
const lineHeight = this._getLineHeight();
|
|
@@ -38575,18 +38430,14 @@ class PassageRefTarget extends React__namespace.Component {
|
|
|
38575
38430
|
};
|
|
38576
38431
|
}
|
|
38577
38432
|
render() {
|
|
38578
|
-
return (
|
|
38579
|
-
|
|
38580
|
-
//
|
|
38581
|
-
|
|
38582
|
-
|
|
38583
|
-
|
|
38584
|
-
|
|
38585
|
-
|
|
38586
|
-
apiOptions: this.props.apiOptions,
|
|
38587
|
-
linterContext: this.props.linterContext
|
|
38588
|
-
})
|
|
38589
|
-
);
|
|
38433
|
+
return /*#__PURE__*/React__namespace.createElement(Renderer, {
|
|
38434
|
+
content: this.props.content
|
|
38435
|
+
// @ts-expect-error [FEI-5003] - TS2322 - Type '{ content: any; inline: boolean; apiOptions: any; linterContext: any; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Renderer> & Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "children" | ... 3 more ... | "legacyPerseusLint"> & InexactPartial<...> & InexactPartial<...>'.
|
|
38436
|
+
,
|
|
38437
|
+
inline: true,
|
|
38438
|
+
apiOptions: this.props.apiOptions,
|
|
38439
|
+
linterContext: this.props.linterContext
|
|
38440
|
+
});
|
|
38590
38441
|
}
|
|
38591
38442
|
}
|
|
38592
38443
|
_defineProperty(PassageRefTarget, "propTypes", {
|
|
@@ -39181,7 +39032,6 @@ class Plotter extends React__namespace.Component {
|
|
|
39181
39032
|
if (i > 0) {
|
|
39182
39033
|
c.graph.lines[i] = Interactive2.addMovableLine(graphie, {
|
|
39183
39034
|
points: [c.graph.points[i - 1], c.graph.points[i]],
|
|
39184
|
-
// $FlowFixMe[prop-missing]
|
|
39185
39035
|
// @ts-expect-error [FEI-5003] - TS2339 - Property 'constraints' does not exist on type '(graphie: any, movable: any, options: any) => void'.
|
|
39186
39036
|
constraints: Interactive2.MovablePoint.constraints.fixed(),
|
|
39187
39037
|
normalStyle: {
|
|
@@ -41921,9 +41771,7 @@ const ShapeTypes = {
|
|
|
41921
41771
|
fixed: !options.translatable && !options.editable
|
|
41922
41772
|
},
|
|
41923
41773
|
visible: options.showPoints,
|
|
41924
|
-
// $FlowFixMe[prop-missing]
|
|
41925
41774
|
snapX: options.snap && options.snap[0] || 0,
|
|
41926
|
-
// $FlowFixMe[prop-missing]
|
|
41927
41775
|
snapY: options.snap && options.snap[1] || 0,
|
|
41928
41776
|
bounded: false,
|
|
41929
41777
|
// Don't bound it when placing it on the graph
|
|
@@ -42497,7 +42345,6 @@ class Transformer extends React__namespace.Component {
|
|
|
42497
42345
|
transform = {
|
|
42498
42346
|
type: "translation",
|
|
42499
42347
|
// NOTE(kevib): these should be numbers
|
|
42500
|
-
// $FlowFixMe[incompatible-type]
|
|
42501
42348
|
// @ts-expect-error [FEI-5003] - TS2322 - Type 'null' is not assignable to type 'number'. | TS2322 - Type 'null' is not assignable to type 'number'.
|
|
42502
42349
|
vector: [null, null]
|
|
42503
42350
|
};
|
|
@@ -42506,11 +42353,9 @@ class Transformer extends React__namespace.Component {
|
|
|
42506
42353
|
transform = {
|
|
42507
42354
|
type: "rotation",
|
|
42508
42355
|
// NOTE(kevib): these should be numbers
|
|
42509
|
-
// $FlowFixMe[incompatible-type]
|
|
42510
42356
|
// @ts-expect-error [FEI-5003] - TS2322 - Type 'null' is not assignable to type 'number'. | TS2322 - Type 'null' is not assignable to type 'number'.
|
|
42511
42357
|
center: [null, null],
|
|
42512
42358
|
// NOTE(kevib): this should be a number
|
|
42513
|
-
// $FlowFixMe[incompatible-type]
|
|
42514
42359
|
// @ts-expect-error [FEI-5003] - TS2322 - Type 'null' is not assignable to type 'number'.
|
|
42515
42360
|
angleDeg: null
|
|
42516
42361
|
};
|
|
@@ -42521,11 +42366,9 @@ class Transformer extends React__namespace.Component {
|
|
|
42521
42366
|
type: "reflection",
|
|
42522
42367
|
line: [
|
|
42523
42368
|
// NOTE(kevib): these should be numbers
|
|
42524
|
-
// $FlowFixMe[incompatible-type]
|
|
42525
42369
|
// @ts-expect-error [FEI-5003] - TS2322 - Type 'null' is not assignable to type 'number'. | TS2322 - Type 'null' is not assignable to type 'number'.
|
|
42526
42370
|
[null, null],
|
|
42527
42371
|
// NOTE(kevib): these should be numbers
|
|
42528
|
-
// $FlowFixMe[incompatible-type]
|
|
42529
42372
|
// @ts-expect-error [FEI-5003] - TS2322 - Type 'null' is not assignable to type 'number'. | TS2322 - Type 'null' is not assignable to type 'number'.
|
|
42530
42373
|
[null, null]]
|
|
42531
42374
|
};
|
|
@@ -42534,11 +42377,9 @@ class Transformer extends React__namespace.Component {
|
|
|
42534
42377
|
transform = {
|
|
42535
42378
|
type: "dilation",
|
|
42536
42379
|
// NOTE(kevib): these should be numbers
|
|
42537
|
-
// $FlowFixMe[incompatible-type]
|
|
42538
42380
|
// @ts-expect-error [FEI-5003] - TS2322 - Type 'null' is not assignable to type 'number'. | TS2322 - Type 'null' is not assignable to type 'number'.
|
|
42539
42381
|
center: [null, null],
|
|
42540
42382
|
// NOTE(kevib): this should be a number
|
|
42541
|
-
// $FlowFixMe[incompatible-type]
|
|
42542
42383
|
// @ts-expect-error [FEI-5003] - TS2322 - Type 'null' is not assignable to type 'number'.
|
|
42543
42384
|
scale: null
|
|
42544
42385
|
};
|
|
@@ -42711,7 +42552,6 @@ class Transformer extends React__namespace.Component {
|
|
|
42711
42552
|
if (reflectRotateHandle) {
|
|
42712
42553
|
$__default["default"](reflectRotateHandle).on("move", function () {
|
|
42713
42554
|
const rotateHandleApprox = self.snapCoord(
|
|
42714
|
-
// $FlowFixMe[incompatible-use]
|
|
42715
42555
|
// @ts-expect-error [FEI-5003] - TS2531 - Object is possibly 'null'.
|
|
42716
42556
|
reflectRotateHandle.coord);
|
|
42717
42557
|
const rotateVector = kmath.vector.subtract(rotateHandleApprox, reflectButton.coord);
|
|
@@ -42779,9 +42619,7 @@ class Transformer extends React__namespace.Component {
|
|
|
42779
42619
|
width: this.scaleToCurrentRange(0.24),
|
|
42780
42620
|
hoverWidth: this.scaleToCurrentRange(0.4),
|
|
42781
42621
|
onMove: function (newAngle, oldAngle) {
|
|
42782
|
-
const transform = self.getRotationTransformFromAngle(
|
|
42783
|
-
// $FlowFixMe[incompatible-use]
|
|
42784
|
-
self.rotatePoint.coord, newAngle - oldAngle);
|
|
42622
|
+
const transform = self.getRotationTransformFromAngle(self.rotatePoint.coord, newAngle - oldAngle);
|
|
42785
42623
|
|
|
42786
42624
|
// Rotate polygon with rotateHandle
|
|
42787
42625
|
self.doTransform(transform);
|
|
@@ -42830,9 +42668,7 @@ class Transformer extends React__namespace.Component {
|
|
|
42830
42668
|
self.doTransform({
|
|
42831
42669
|
type: "dilation",
|
|
42832
42670
|
// NOTE(kevinb): It's hard to convince that this.dilationCircle
|
|
42833
|
-
// will still be defined here.
|
|
42834
|
-
// $FlowFixMe[incompatible-use]
|
|
42835
|
-
center: self.dilationCircle.centerPoint.coord,
|
|
42671
|
+
// will still be defined here. center: self.dilationCircle.centerPoint.coord,
|
|
42836
42672
|
scale: newRadius / oldRadius
|
|
42837
42673
|
});
|
|
42838
42674
|
},
|
|
@@ -42871,7 +42707,6 @@ class Transformer extends React__namespace.Component {
|
|
|
42871
42707
|
origOnMoveEnd(args);
|
|
42872
42708
|
}
|
|
42873
42709
|
self.changeTool("dilation", {
|
|
42874
|
-
// $FlowFixMe[incompatible-use]
|
|
42875
42710
|
coord: self.dilationCircle.centerPoint.coord
|
|
42876
42711
|
});
|
|
42877
42712
|
};
|
|
@@ -42991,7 +42826,6 @@ class Transformer extends React__namespace.Component {
|
|
|
42991
42826
|
// handle coordinates in formal mode without movement, since
|
|
42992
42827
|
// the movablepoints never move
|
|
42993
42828
|
shape: {
|
|
42994
|
-
// $FlowFixMe[incompatible-use]
|
|
42995
42829
|
type: this.shape.type,
|
|
42996
42830
|
coords: this.getCoords(),
|
|
42997
42831
|
options: (_this$shape5 = this.shape) === null || _this$shape5 === void 0 ? void 0 : _this$shape5.getOptions()
|
|
@@ -44950,7 +44784,7 @@ class HintsRenderer extends React__namespace.Component {
|
|
|
44950
44784
|
this._cacheHintImages();
|
|
44951
44785
|
}
|
|
44952
44786
|
|
|
44953
|
-
// Force number to make
|
|
44787
|
+
// Force number to make TypeScript happy
|
|
44954
44788
|
const prevHintsVisible = prevProps.hintsVisible || 0;
|
|
44955
44789
|
const nextHintsVisible = this.props.hintsVisible || 0;
|
|
44956
44790
|
|
|
@@ -45211,13 +45045,7 @@ class ItemRenderer extends React__namespace.Component {
|
|
|
45211
45045
|
// that have completely different places in the DOM, we have to do this
|
|
45212
45046
|
// strangeness instead of relying on React's normal render() method.
|
|
45213
45047
|
// TODO(alpert): Figure out how to clean this up somehow
|
|
45214
|
-
render(
|
|
45215
|
-
/*#__PURE__*/
|
|
45216
|
-
// metadata (from item.question, aka PerseusRenderer)
|
|
45217
|
-
// replace (also item.question, aka PerseusRenderer)
|
|
45218
|
-
// savedState (I _think_ this is serializedState on Renderer)
|
|
45219
|
-
// $FlowFixMe[prop-missing] metadata, replace, savedState (see above)
|
|
45220
|
-
React__namespace.createElement(Renderer, _extends({
|
|
45048
|
+
render( /*#__PURE__*/React__namespace.createElement(Renderer, _extends({
|
|
45221
45049
|
ref: node => {
|
|
45222
45050
|
if (!node) {
|
|
45223
45051
|
return;
|
|
@@ -45302,9 +45130,7 @@ class ItemRenderer extends React__namespace.Component {
|
|
|
45302
45130
|
return Util.inputPathsEqual(inputPath, this._currentFocus);
|
|
45303
45131
|
});
|
|
45304
45132
|
if (this.props.apiOptions.onFocusChange != null) {
|
|
45305
|
-
this.props.apiOptions.onFocusChange(this._currentFocus, prevFocus,
|
|
45306
|
-
// $FlowFixMe[incompatible-call]: onFocusChange expects an HTMLElement or nothing
|
|
45307
|
-
didFocusInput && keypadElement && keypadElement.getDOMNode());
|
|
45133
|
+
this.props.apiOptions.onFocusChange(this._currentFocus, prevFocus, didFocusInput && keypadElement && keypadElement.getDOMNode());
|
|
45308
45134
|
}
|
|
45309
45135
|
if (keypadElement) {
|
|
45310
45136
|
if (didFocusInput) {
|
|
@@ -45610,14 +45436,9 @@ class ServerItemRenderer extends React__namespace.Component {
|
|
|
45610
45436
|
return Util.inputPathsEqual(inputPath, this._currentFocus);
|
|
45611
45437
|
});
|
|
45612
45438
|
if (onFocusChange != null) {
|
|
45613
|
-
onFocusChange(this._currentFocus, prevFocus,
|
|
45614
|
-
// $FlowFixMe[incompatible-call]: onFocusChange expects an HTMLElement or nothing
|
|
45615
|
-
didFocusInput && keypadElement && keypadElement.getDOMNode(),
|
|
45616
|
-
// $FlowFixMe[incompatible-call]: onFocusChange expects an HTMLElement or nothing
|
|
45439
|
+
onFocusChange(this._currentFocus, prevFocus, didFocusInput && keypadElement && keypadElement.getDOMNode(),
|
|
45617
45440
|
// @ts-expect-error [FEI-5003] - TS2345 - Argument of type 'false | Element | Text | null | undefined' is not assignable to parameter of type 'HTMLElement | undefined'.
|
|
45618
|
-
didFocusInput &&
|
|
45619
|
-
// $FlowFixMe[incompatible-call]: onFocusChange expects an HTMLElement or nothing
|
|
45620
|
-
this.questionRenderer.getDOMNodeForPath(newFocus));
|
|
45441
|
+
didFocusInput && this.questionRenderer.getDOMNodeForPath(newFocus));
|
|
45621
45442
|
}
|
|
45622
45443
|
if (keypadElement && isMobile) {
|
|
45623
45444
|
if (didFocusInput) {
|
|
@@ -46857,7 +46678,7 @@ class MultiRenderer extends React__namespace.Component {
|
|
|
46857
46678
|
// were to change every render, it would cause the Renderer to
|
|
46858
46679
|
// re-render a lot more than is necessary. Don't re-compute this
|
|
46859
46680
|
// element unless it is necessary!
|
|
46860
|
-
// HACK(mdr):
|
|
46681
|
+
// HACK(mdr): TypeScript can't prove that this is a ContentRendererData,
|
|
46861
46682
|
// because of how we awkwardly construct it in order to obtain a
|
|
46862
46683
|
// circular reference. But it is, I promise.
|
|
46863
46684
|
const data = {
|
|
@@ -46877,7 +46698,6 @@ class MultiRenderer extends React__namespace.Component {
|
|
|
46877
46698
|
* one to one could introduce a bug. Need to work out the exact
|
|
46878
46699
|
* type for ContentNode and then fix this.
|
|
46879
46700
|
*/
|
|
46880
|
-
// $FlowFixMe[cannot-spread-inexact]
|
|
46881
46701
|
// @ts-expect-error [FEI-5003] - TS2322 - Type '{ ref: (e: any) => any; findExternalWidgets: (criterion: any) => readonly (Widget | null | undefined)[]; serializedState: any; onSerializedStateUpdated: (state: any) => void; __type: "content" | "item"; ... 9 more ...; reviewMode?: boolean | ... 1 more ... | undefined; }' is not assignable to type 'InexactPartial<Pick<Readonly<Props> & Readonly<{ children?: ReactNode; }>, "content" | "images" | "onRender" | "linterContext" | "widgets" | "alwaysUpdate" | ... 6 more ... | "serializedState">>'.
|
|
46882
46702
|
React__namespace.createElement(Renderer, _extends({}, this._getRendererProps(), content, {
|
|
46883
46703
|
ref: refFunc,
|
|
@@ -47121,7 +46941,7 @@ const styles = aphrodite.StyleSheet.create({
|
|
|
47121
46941
|
* Utility functions to build React PropTypes for multi-items and shapes.
|
|
47122
46942
|
*
|
|
47123
46943
|
* If you're writing new components, though, consider using the Item and Shape
|
|
47124
|
-
*
|
|
46944
|
+
* types instead.
|
|
47125
46945
|
*/
|
|
47126
46946
|
|
|
47127
46947
|
/**
|