@khanacademy/perseus 0.3.1 → 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/dist/index.js CHANGED
@@ -24,7 +24,6 @@ require('intersection-observer');
24
24
  var wonderBlocksCore = require('@khanacademy/wonder-blocks-core');
25
25
  var Button = require('@khanacademy/wonder-blocks-button');
26
26
  var wonderBlocksPopover = require('@khanacademy/wonder-blocks-popover');
27
- var Spacing = require('@khanacademy/wonder-blocks-spacing');
28
27
  var wonderBlocksDropdown = require('@khanacademy/wonder-blocks-dropdown');
29
28
  var debounce = require('lodash.debounce');
30
29
  var wonderBlocksProgressSpinner = require('@khanacademy/wonder-blocks-progress-spinner');
@@ -66,7 +65,6 @@ var SimpleMarkdown__default = /*#__PURE__*/_interopDefaultLegacy(SimpleMarkdown)
66
65
  var MathQuill__default = /*#__PURE__*/_interopDefaultLegacy(MathQuill);
67
66
  var Color__default = /*#__PURE__*/_interopDefaultLegacy(Color);
68
67
  var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
69
- var Spacing__default = /*#__PURE__*/_interopDefaultLegacy(Spacing);
70
68
  var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce);
71
69
  var Link__default = /*#__PURE__*/_interopDefaultLegacy(Link);
72
70
 
@@ -17709,8 +17707,8 @@ function _noop() {}
17709
17707
 
17710
17708
 
17711
17709
  class InteractionTracker {
17712
- // eslint-disable-next-line flowtype/no-weak-types
17713
- constructor( // eslint-disable-next-line flowtype/no-weak-types
17710
+ // eslint-disable-next-line ft-flow/no-weak-types
17711
+ constructor( // eslint-disable-next-line ft-flow/no-weak-types
17714
17712
  trackApi, // original apiOptions.trackInteraction
17715
17713
  widgetType, widgetID, setting // "" means track once
17716
17714
  ) {
@@ -19254,7 +19252,7 @@ const isIdPathPrefix = function (prefixArray, wholeArray) {
19254
19252
 
19255
19253
  class Renderer extends React__namespace.Component {
19256
19254
  // The i18n linter.
19257
- // eslint-disable-next-line flowtype/no-mutable-array
19255
+ // eslint-disable-next-line ft-flow/no-mutable-array
19258
19256
  constructor(_props, context) {
19259
19257
  var _this;
19260
19258
 
@@ -29850,11 +29848,9 @@ _defineProperty(Definition, "defaultProps", {
29850
29848
  const styles$o = {
29851
29849
  tooltipBody: {
29852
29850
  color: Color__default["default"].offBlack,
29853
- display: "block",
29854
29851
  fontSize: 20,
29855
29852
  fontWeight: 500,
29856
- lineHeight: "30px",
29857
- margin: Spacing__default["default"].xSmall_8
29853
+ lineHeight: "30px"
29858
29854
  }
29859
29855
  };
29860
29856
  var Definition$1 = {
@@ -34629,7 +34625,7 @@ class InteractiveGraph extends React__namespace.Component {
34629
34625
  // to the graph, we can't enforce them.
34630
34626
  if (this.points == null || this.points.length === 0) {
34631
34627
  return true;
34632
- } // eslint-disable-next-line flowtype/no-mutable-array
34628
+ } // eslint-disable-next-line ft-flow/no-mutable-array
34633
34629
 
34634
34630
 
34635
34631
  const coords = ___default["default"].invoke(this.points, "coord");
@@ -35690,11 +35686,11 @@ class InteractiveGraph extends React__namespace.Component {
35690
35686
  } else if (state.type === "polygon" && rubric.correct.type === "polygon" && state.coords != null) {
35691
35687
  var _state$coords2, _rubric$correct$coord;
35692
35688
 
35693
- const guess = (_state$coords2 = state.coords) === null || _state$coords2 === void 0 ? void 0 : _state$coords2.slice(); // eslint-disable-line flowtype/no-mutable-array
35689
+ const guess = (_state$coords2 = state.coords) === null || _state$coords2 === void 0 ? void 0 : _state$coords2.slice(); // eslint-disable-line ft-flow/no-mutable-array
35694
35690
  // $FlowFixMe[incompatible-type]
35695
35691
  // $FlowFixMe[prop-missing]
35696
35692
 
35697
- const correct = (_rubric$correct$coord = rubric.correct.coords) === null || _rubric$correct$coord === void 0 ? void 0 : _rubric$correct$coord.slice(); // eslint-disable-line flowtype/no-mutable-array
35693
+ const correct = (_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
35698
35694
 
35699
35695
  let match;
35700
35696
 
@@ -35948,7 +35944,7 @@ class AnswerChoice extends React__namespace.Component {
35948
35944
 
35949
35945
  class AnswerChoices extends React__namespace.Component {
35950
35946
  // The rendered answers elements.
35951
- // eslint-disable-next-line flowtype/no-mutable-array
35947
+ // eslint-disable-next-line ft-flow/no-mutable-array
35952
35948
  constructor(props) {
35953
35949
  super(props);
35954
35950
 
@@ -36315,7 +36311,7 @@ const styles$g = aphrodite.StyleSheet.create({
36315
36311
 
36316
36312
  class LabelImage extends React__namespace.Component {
36317
36313
  // The rendered markers on the question image for labeling.
36318
- // eslint-disable-next-line flowtype/no-mutable-array
36314
+ // eslint-disable-next-line ft-flow/no-mutable-array
36319
36315
  // The popup component containing the answer choices.
36320
36316
  // The rendered list of answer choices for the currently selected marker.
36321
36317
  static gradeMarker(marker) {
@@ -39300,7 +39296,7 @@ function compareElements(item0, item1) {
39300
39296
  /**
39301
39297
  * Draw an array of rendering instructions into a 2D canvas drawing context.
39302
39298
  */
39303
- // eslint-disable-next-line flowtype/no-mutable-array
39299
+ // eslint-disable-next-line ft-flow/no-mutable-array
39304
39300
 
39305
39301
 
39306
39302
  function draw(ctx, items) {
@@ -41967,7 +41963,7 @@ function getClientRectsForTextInRange(range) {
41967
41963
  * client rects onto the given `mutableRects` array.
41968
41964
  */
41969
41965
 
41970
- function addClientRectsForTextInNodeAndRange(node, range, // eslint-disable-next-line flowtype/no-mutable-array
41966
+ function addClientRectsForTextInNodeAndRange(node, range, // eslint-disable-next-line ft-flow/no-mutable-array
41971
41967
  mutableRects) {
41972
41968
  const nodeContentsRange = new Range();
41973
41969
  nodeContentsRange.selectNodeContents(node);
@@ -42008,7 +42004,7 @@ mutableRects) {
42008
42004
  */
42009
42005
 
42010
42006
 
42011
- function addClientRectsForText(textNode, textRange, // eslint-disable-next-line flowtype/no-mutable-array
42007
+ function addClientRectsForText(textNode, textRange, // eslint-disable-next-line ft-flow/no-mutable-array
42012
42008
  mutableRects) {
42013
42009
  const parentElement = textNode.parentElement;
42014
42010
  const computedStyle = window.getComputedStyle(parentElement); // NOTE(mdr): I'm not sure how computed line height works in all contexts
@@ -51305,7 +51301,7 @@ class ItemRenderer extends React__namespace.Component {
51305
51301
  * the form "answer-input-number 1", or the string "answer-area"
51306
51302
  * for the whole answer area (if the answer area is a single widget).
51307
51303
  */
51308
- // eslint-disable-next-line flowtype/no-weak-types
51304
+ // eslint-disable-next-line ft-flow/no-weak-types
51309
51305
 
51310
51306
 
51311
51307
  _setWidgetProps(widgetId, newProps, callback) {
@@ -51654,7 +51650,7 @@ class ServerItemRenderer extends React__namespace.Component {
51654
51650
  * the form "answer-input-number 1", or the string "answer-area"
51655
51651
  * for the whole answer area (if the answer area is a single widget).
51656
51652
  */
51657
- // eslint-disable-next-line flowtype/no-weak-types
51653
+ // eslint-disable-next-line ft-flow/no-weak-types
51658
51654
 
51659
51655
 
51660
51656
  _setWidgetProps(widgetId, newProps, callback) {