@khanacademy/perseus 0.3.3 → 0.3.4
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 +8 -0
- package/dist/es/index.js +14 -17
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +14 -18
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/highlighting/ui/util.js +2 -2
- package/src/interaction-tracker.js +2 -2
- package/src/item-renderer.jsx +1 -1
- package/src/mixins/provide-keypad.jsx +1 -1
- package/src/renderer.jsx +2 -2
- package/src/server-item-renderer.jsx +1 -1
- package/src/types.js +1 -1
- package/src/util/scroll-utils.js +2 -2
- package/src/widgets/definition.jsx +0 -3
- package/src/widgets/interactive-graph.jsx +4 -4
- package/src/widgets/label-image/answer-choices.jsx +1 -1
- package/src/widgets/label-image.jsx +1 -1
- package/src/widgets/molecule/molecule-drawing.jsx +1 -1
package/CHANGELOG.md
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -22,7 +22,6 @@ import 'intersection-observer';
|
|
|
22
22
|
import { UniqueIDProvider, View, Text } from '@khanacademy/wonder-blocks-core';
|
|
23
23
|
import Button from '@khanacademy/wonder-blocks-button';
|
|
24
24
|
import { Popover, PopoverContentCore } from '@khanacademy/wonder-blocks-popover';
|
|
25
|
-
import Spacing from '@khanacademy/wonder-blocks-spacing';
|
|
26
25
|
import { OptionItem, SingleSelect } from '@khanacademy/wonder-blocks-dropdown';
|
|
27
26
|
import debounce$1 from 'lodash.debounce';
|
|
28
27
|
import { CircularSpinner } from '@khanacademy/wonder-blocks-progress-spinner';
|
|
@@ -17819,8 +17818,8 @@ function _noop() {}
|
|
|
17819
17818
|
|
|
17820
17819
|
|
|
17821
17820
|
class InteractionTracker {
|
|
17822
|
-
// eslint-disable-next-line
|
|
17823
|
-
constructor( // eslint-disable-next-line
|
|
17821
|
+
// eslint-disable-next-line ft-flow/no-weak-types
|
|
17822
|
+
constructor( // eslint-disable-next-line ft-flow/no-weak-types
|
|
17824
17823
|
trackApi, // original apiOptions.trackInteraction
|
|
17825
17824
|
widgetType, widgetID, setting // "" means track once
|
|
17826
17825
|
) {
|
|
@@ -19361,7 +19360,7 @@ var isIdPathPrefix = function isIdPathPrefix(prefixArray, wholeArray) {
|
|
|
19361
19360
|
|
|
19362
19361
|
class Renderer extends React.Component {
|
|
19363
19362
|
// The i18n linter.
|
|
19364
|
-
// eslint-disable-next-line
|
|
19363
|
+
// eslint-disable-next-line ft-flow/no-mutable-array
|
|
19365
19364
|
constructor(_props, context) {
|
|
19366
19365
|
var _this;
|
|
19367
19366
|
|
|
@@ -29953,11 +29952,9 @@ _defineProperty(Definition, "defaultProps", {
|
|
|
29953
29952
|
var styles$o = {
|
|
29954
29953
|
tooltipBody: {
|
|
29955
29954
|
color: Color.offBlack,
|
|
29956
|
-
display: "block",
|
|
29957
29955
|
fontSize: 20,
|
|
29958
29956
|
fontWeight: 500,
|
|
29959
|
-
lineHeight: "30px"
|
|
29960
|
-
margin: Spacing.xSmall_8
|
|
29957
|
+
lineHeight: "30px"
|
|
29961
29958
|
}
|
|
29962
29959
|
};
|
|
29963
29960
|
var Definition$1 = {
|
|
@@ -34752,7 +34749,7 @@ class InteractiveGraph extends React.Component {
|
|
|
34752
34749
|
// to the graph, we can't enforce them.
|
|
34753
34750
|
if (this.points == null || this.points.length === 0) {
|
|
34754
34751
|
return true;
|
|
34755
|
-
} // eslint-disable-next-line
|
|
34752
|
+
} // eslint-disable-next-line ft-flow/no-mutable-array
|
|
34756
34753
|
|
|
34757
34754
|
|
|
34758
34755
|
var coords = _.invoke(this.points, "coord");
|
|
@@ -35822,12 +35819,12 @@ class InteractiveGraph extends React.Component {
|
|
|
35822
35819
|
} else if (state.type === "polygon" && rubric.correct.type === "polygon" && state.coords != null) {
|
|
35823
35820
|
var _state$coords2, _rubric$correct$coord;
|
|
35824
35821
|
|
|
35825
|
-
var _guess3 = (_state$coords2 = state.coords) === null || _state$coords2 === void 0 ? void 0 : _state$coords2.slice(); // eslint-disable-line
|
|
35822
|
+
var _guess3 = (_state$coords2 = state.coords) === null || _state$coords2 === void 0 ? void 0 : _state$coords2.slice(); // eslint-disable-line ft-flow/no-mutable-array
|
|
35826
35823
|
// $FlowFixMe[incompatible-type]
|
|
35827
35824
|
// $FlowFixMe[prop-missing]
|
|
35828
35825
|
|
|
35829
35826
|
|
|
35830
|
-
var _correct3 = (_rubric$correct$coord = rubric.correct.coords) === null || _rubric$correct$coord === void 0 ? void 0 : _rubric$correct$coord.slice(); // eslint-disable-line
|
|
35827
|
+
var _correct3 = (_rubric$correct$coord = rubric.correct.coords) === null || _rubric$correct$coord === void 0 ? void 0 : _rubric$correct$coord.slice(); // eslint-disable-line ft-flow/no-mutable-array
|
|
35831
35828
|
|
|
35832
35829
|
|
|
35833
35830
|
var match;
|
|
@@ -36087,7 +36084,7 @@ class AnswerChoice extends React.Component {
|
|
|
36087
36084
|
|
|
36088
36085
|
class AnswerChoices extends React.Component {
|
|
36089
36086
|
// The rendered answers elements.
|
|
36090
|
-
// eslint-disable-next-line
|
|
36087
|
+
// eslint-disable-next-line ft-flow/no-mutable-array
|
|
36091
36088
|
constructor(props) {
|
|
36092
36089
|
super(props);
|
|
36093
36090
|
|
|
@@ -36454,7 +36451,7 @@ var styles$g = StyleSheet.create({
|
|
|
36454
36451
|
|
|
36455
36452
|
class LabelImage extends React.Component {
|
|
36456
36453
|
// The rendered markers on the question image for labeling.
|
|
36457
|
-
// eslint-disable-next-line
|
|
36454
|
+
// eslint-disable-next-line ft-flow/no-mutable-array
|
|
36458
36455
|
// The popup component containing the answer choices.
|
|
36459
36456
|
// The rendered list of answer choices for the currently selected marker.
|
|
36460
36457
|
static gradeMarker(marker) {
|
|
@@ -39434,7 +39431,7 @@ function compareElements(item0, item1) {
|
|
|
39434
39431
|
/**
|
|
39435
39432
|
* Draw an array of rendering instructions into a 2D canvas drawing context.
|
|
39436
39433
|
*/
|
|
39437
|
-
// eslint-disable-next-line
|
|
39434
|
+
// eslint-disable-next-line ft-flow/no-mutable-array
|
|
39438
39435
|
|
|
39439
39436
|
|
|
39440
39437
|
function draw(ctx, items) {
|
|
@@ -42101,7 +42098,7 @@ function getClientRectsForTextInRange(range) {
|
|
|
42101
42098
|
* client rects onto the given `mutableRects` array.
|
|
42102
42099
|
*/
|
|
42103
42100
|
|
|
42104
|
-
function addClientRectsForTextInNodeAndRange(node, range, // eslint-disable-next-line
|
|
42101
|
+
function addClientRectsForTextInNodeAndRange(node, range, // eslint-disable-next-line ft-flow/no-mutable-array
|
|
42105
42102
|
mutableRects) {
|
|
42106
42103
|
var nodeContentsRange = new Range();
|
|
42107
42104
|
nodeContentsRange.selectNodeContents(node);
|
|
@@ -42142,7 +42139,7 @@ mutableRects) {
|
|
|
42142
42139
|
*/
|
|
42143
42140
|
|
|
42144
42141
|
|
|
42145
|
-
function addClientRectsForText(textNode, textRange, // eslint-disable-next-line
|
|
42142
|
+
function addClientRectsForText(textNode, textRange, // eslint-disable-next-line ft-flow/no-mutable-array
|
|
42146
42143
|
mutableRects) {
|
|
42147
42144
|
var parentElement = textNode.parentElement;
|
|
42148
42145
|
var computedStyle = window.getComputedStyle(parentElement); // NOTE(mdr): I'm not sure how computed line height works in all contexts
|
|
@@ -51450,7 +51447,7 @@ class ItemRenderer extends React.Component {
|
|
|
51450
51447
|
* the form "answer-input-number 1", or the string "answer-area"
|
|
51451
51448
|
* for the whole answer area (if the answer area is a single widget).
|
|
51452
51449
|
*/
|
|
51453
|
-
// eslint-disable-next-line
|
|
51450
|
+
// eslint-disable-next-line ft-flow/no-weak-types
|
|
51454
51451
|
|
|
51455
51452
|
|
|
51456
51453
|
_setWidgetProps(widgetId, newProps, callback) {
|
|
@@ -51800,7 +51797,7 @@ class ServerItemRenderer extends React.Component {
|
|
|
51800
51797
|
* the form "answer-input-number 1", or the string "answer-area"
|
|
51801
51798
|
* for the whole answer area (if the answer area is a single widget).
|
|
51802
51799
|
*/
|
|
51803
|
-
// eslint-disable-next-line
|
|
51800
|
+
// eslint-disable-next-line ft-flow/no-weak-types
|
|
51804
51801
|
|
|
51805
51802
|
|
|
51806
51803
|
_setWidgetProps(widgetId, newProps, callback) {
|