@khanacademy/perseus 0.2.6 → 0.3.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.
Files changed (97) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +5 -0
  3. package/dist/es/index.css +1 -436
  4. package/dist/es/index.js +13785 -16058
  5. package/dist/es/index.js.map +1 -1
  6. package/dist/index.css +1 -436
  7. package/dist/index.js +3200 -5480
  8. package/dist/index.js.map +1 -1
  9. package/package.json +5 -3
  10. package/src/__tests__/jipt-paragraphs_test.js +34 -0
  11. package/src/__tests__/perseus-markdown_test.jsx +6 -6
  12. package/src/__tests__/renderer_test.jsx +9 -9
  13. package/src/article-renderer.jsx +4 -5
  14. package/src/components/input-with-examples.jsx +4 -5
  15. package/src/components/lint.jsx +2 -1
  16. package/src/components/sortable.jsx +6 -7
  17. package/src/hint-renderer.jsx +3 -4
  18. package/src/hints-renderer.jsx +3 -4
  19. package/src/item-renderer.jsx +4 -5
  20. package/src/jipt-paragraphs.js +16 -8
  21. package/src/jquery.mobile.vmouse.js +2 -1
  22. package/src/perseus-markdown.jsx +3 -3
  23. package/src/renderer.jsx +31 -33
  24. package/src/styles/perseus-renderer.less +1 -1
  25. package/src/{not-gorgon.js → translation-linter.js} +10 -14
  26. package/src/widget-container.jsx +1 -1
  27. package/src/widgets/__tests__/__snapshots__/definition_test.js.snap +30 -12
  28. package/src/widgets/__tests__/definition_test.js +18 -33
  29. package/src/widgets/__tests__/grapher.cypress.jsx +2 -2
  30. package/src/widgets/__tests__/interactive-graph.cypress.jsx +2 -2
  31. package/src/widgets/categorizer.jsx +1 -1
  32. package/src/widgets/definition.jsx +36 -71
  33. package/src/widgets/explanation.jsx +1 -1
  34. package/src/widgets/expression.jsx +1 -1
  35. package/src/widgets/graded-group-set.jsx +1 -1
  36. package/src/widgets/graded-group.jsx +1 -1
  37. package/src/widgets/group.jsx +1 -1
  38. package/src/widgets/image.jsx +1 -1
  39. package/src/widgets/input-number.jsx +1 -1
  40. package/src/widgets/matcher.jsx +4 -1
  41. package/src/widgets/matrix.jsx +1 -1
  42. package/src/widgets/numeric-input.jsx +1 -1
  43. package/src/widgets/orderer.jsx +4 -1
  44. package/src/widgets/passage-ref-target.jsx +4 -1
  45. package/src/widgets/passage.jsx +1 -1
  46. package/src/widgets/radio/widget.jsx +1 -1
  47. package/src/widgets/sequence.jsx +4 -1
  48. package/src/widgets/sorter.jsx +4 -1
  49. package/src/widgets/table.jsx +4 -1
  50. package/src/README.md +0 -35
  51. package/src/__tests__/__snapshots__/pure-markdown_test.js.snap +0 -113
  52. package/src/__tests__/pure-markdown_test.js +0 -552
  53. package/src/gorgon/README +0 -40
  54. package/src/gorgon/__tests__/matcher_test.js +0 -497
  55. package/src/gorgon/__tests__/rule_test.js +0 -101
  56. package/src/gorgon/__tests__/rules_test.js +0 -487
  57. package/src/gorgon/__tests__/selector-parser_test.js +0 -52
  58. package/src/gorgon/__tests__/tree-transformer_test.js +0 -446
  59. package/src/gorgon/gorgon.js +0 -290
  60. package/src/gorgon/proptypes.js +0 -29
  61. package/src/gorgon/rule.js +0 -413
  62. package/src/gorgon/rules/absolute-url.js +0 -24
  63. package/src/gorgon/rules/all-rules.js +0 -72
  64. package/src/gorgon/rules/blockquoted-math.js +0 -10
  65. package/src/gorgon/rules/blockquoted-widget.js +0 -10
  66. package/src/gorgon/rules/double-spacing-after-terminal.js +0 -12
  67. package/src/gorgon/rules/extra-content-spacing.js +0 -12
  68. package/src/gorgon/rules/heading-level-1.js +0 -14
  69. package/src/gorgon/rules/heading-level-skip.js +0 -20
  70. package/src/gorgon/rules/heading-sentence-case.js +0 -11
  71. package/src/gorgon/rules/heading-title-case.js +0 -63
  72. package/src/gorgon/rules/image-alt-text.js +0 -21
  73. package/src/gorgon/rules/image-in-table.js +0 -10
  74. package/src/gorgon/rules/image-spaces-around-urls.js +0 -35
  75. package/src/gorgon/rules/image-widget.js +0 -50
  76. package/src/gorgon/rules/link-click-here.js +0 -11
  77. package/src/gorgon/rules/lint-utils.js +0 -48
  78. package/src/gorgon/rules/long-paragraph.js +0 -14
  79. package/src/gorgon/rules/math-adjacent.js +0 -10
  80. package/src/gorgon/rules/math-align-extra-break.js +0 -11
  81. package/src/gorgon/rules/math-align-linebreaks.js +0 -43
  82. package/src/gorgon/rules/math-empty.js +0 -10
  83. package/src/gorgon/rules/math-font-size.js +0 -12
  84. package/src/gorgon/rules/math-frac.js +0 -10
  85. package/src/gorgon/rules/math-nested.js +0 -11
  86. package/src/gorgon/rules/math-starts-with-space.js +0 -12
  87. package/src/gorgon/rules/math-text-empty.js +0 -10
  88. package/src/gorgon/rules/math-without-dollars.js +0 -14
  89. package/src/gorgon/rules/nested-lists.js +0 -11
  90. package/src/gorgon/rules/profanity.js +0 -10
  91. package/src/gorgon/rules/table-missing-cells.js +0 -20
  92. package/src/gorgon/rules/unbalanced-code-delimiters.js +0 -14
  93. package/src/gorgon/rules/unescaped-dollar.js +0 -10
  94. package/src/gorgon/rules/widget-in-table.js +0 -10
  95. package/src/gorgon/selector.js +0 -506
  96. package/src/gorgon/tree-transformer.js +0 -588
  97. package/src/pure-markdown.js +0 -347
@@ -1,17 +1,13 @@
1
1
  // @flow
2
+ import {Rule} from "@khanacademy/perseus-linter";
2
3
  import {debounce} from "underscore";
3
4
 
4
- import Rule from "./gorgon/rule.js";
5
-
6
5
  /**
7
- * NotGorgon asynchronously calls Khan Academy's poentry linter.
6
+ * TranslationLinter asynchronously calls Khan Academy's poentry linter.
8
7
  *
9
8
  * The poentry linter checks for issues that prevent content from being
10
- * translated. This linter is KA-specific and so NotGorgon does not do anything
11
- * in non-KA environments.
12
- *
13
- * NotGorgon is named as such because it is not Gorgon, Perseus' built-in
14
- * linter.
9
+ * translated. This linter is KA-specific and so TranslationLinter does not do
10
+ * anything in non-KA environments.
15
11
  */
16
12
 
17
13
  // A LintCB is called once the linter has been run.
@@ -21,7 +17,7 @@ type LintCB = (errors: $ReadOnlyArray<string>) => void;
21
17
  // last call. The timer is reset if the lint is called during the wait.
22
18
  const DEBOUNCE_TIMEOUT = 1000;
23
19
 
24
- export default class NotGorgon {
20
+ export default class TranslationLinter {
25
21
  // To avoid linting when nothing has changed.
26
22
  previousContent: ?string = null;
27
23
 
@@ -102,17 +98,17 @@ export default class NotGorgon {
102
98
 
103
99
  /**
104
100
  * Applies an array of errors generated by linters without position
105
- * information (NotGorgon and the legacy getSaveWarnings()) to the top
106
- * of a Perseus tree.
101
+ * information (TranslationLinter and the legacy getSaveWarnings()) to the
102
+ * top of a Perseus tree.
107
103
  */
108
104
  applyLintErrors(
109
105
  parsedMarkdown: any,
110
- notGorgonLintErrors: $ReadOnlyArray<string>,
106
+ translationLintErrors: $ReadOnlyArray<string>,
111
107
  ) {
112
108
  // These lint errors do not have position data associated with
113
109
  // them, so we just plop them at the top.
114
- if (notGorgonLintErrors.length) {
115
- const errorText = notGorgonLintErrors.join("\n\n");
110
+ if (translationLintErrors.length) {
111
+ const errorText = translationLintErrors.join("\n\n");
116
112
  parsedMarkdown.unshift({
117
113
  content: {
118
114
  type: "text",
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable react/no-unsafe, react/sort-comp */
2
2
  // @flow
3
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
3
4
  import classNames from "classnames";
4
5
  import * as React from "react";
5
6
  import ReactDOM from "react-dom";
6
7
 
7
- import {linterContextDefault} from "./gorgon/proptypes.js";
8
8
  import {zIndexInteractiveComponent} from "./styles/constants.js";
9
9
  import {containerSizeClass, getClassFromWidth} from "./util/sizing-utils.js";
10
10
  import * as Widgets from "./widgets.js";
@@ -30,15 +30,24 @@ exports[`Definition widget should have a default snapshot: first render 1`] = `
30
30
  class="perseus-widget-container widget-nohighlight widget-inline"
31
31
  >
32
32
  <span
33
- aria-describedby="uid-tooltip-0-aria-content"
33
+ aria-controls="uid-popover-0-wb-id"
34
+ aria-expanded="false"
34
35
  class="perseus-widget-definition"
35
- tabindex="0"
36
+ id="uid-popover-0-wb-id-anchor"
36
37
  >
37
- <div
38
- class="default_xu2jcg-o_O-inlineStyles_txdle"
38
+ <button
39
+ aria-disabled="false"
40
+ class="button_vr44p2-o_O-shared_lwskrm-o_O-default_1hl5pu8-o_O-small_xwkmkn"
41
+ role="button"
42
+ tabindex="0"
43
+ type="button"
39
44
  >
40
- the Pequots
41
- </div>
45
+ <span
46
+ class="text_f1191h-o_O-LabelSmall_hl4zs1-o_O-text_m8a8ki-o_O-textWithFocus_e296pg"
47
+ >
48
+ the Pequots
49
+ </span>
50
+ </button>
42
51
  </span>
43
52
  </div>
44
53
  , upon these conditions.
@@ -79,15 +88,24 @@ exports[`Definition widget should have an open state snapshot: open state 1`] =
79
88
  class="perseus-widget-container widget-nohighlight widget-inline"
80
89
  >
81
90
  <span
82
- aria-describedby="uid-tooltip-1-aria-content"
91
+ aria-controls="uid-popover-1-wb-id"
92
+ aria-expanded="true"
83
93
  class="perseus-widget-definition"
84
- tabindex="0"
94
+ id="uid-popover-1-wb-id-anchor"
85
95
  >
86
- <div
87
- class="default_xu2jcg-o_O-inlineStyles_txdle"
96
+ <button
97
+ aria-disabled="false"
98
+ class="button_vr44p2-o_O-shared_lwskrm-o_O-default_1hl5pu8-o_O-small_xwkmkn"
99
+ role="button"
100
+ tabindex="0"
101
+ type="button"
88
102
  >
89
- the Pequots
90
- </div>
103
+ <span
104
+ class="text_f1191h-o_O-LabelSmall_hl4zs1-o_O-text_m8a8ki-o_O-textWithFocus_e296pg-o_O-focus_15mc0l2"
105
+ >
106
+ the Pequots
107
+ </span>
108
+ </button>
91
109
  </span>
92
110
  </div>
93
111
  , upon these conditions.
@@ -1,5 +1,5 @@
1
1
  // @flow
2
- import {screen, waitForElementToBeRemoved} from "@testing-library/react";
2
+ import {screen} from "@testing-library/react";
3
3
  import userEvent from "@testing-library/user-event";
4
4
 
5
5
  import "@testing-library/jest-dom"; // Imports custom matchers
@@ -49,28 +49,30 @@ describe("Definition widget", () => {
49
49
  expect(container).toMatchSnapshot("first render");
50
50
  });
51
51
 
52
- it("should have an open state snapshot", () => {
52
+ it("should have an open state snapshot", async () => {
53
53
  // Arrange
54
54
  const {container} = renderQuestion(question);
55
55
 
56
56
  // Act
57
57
  const definitionAnchor = screen.getByText("the Pequots");
58
- userEvent.hover(definitionAnchor);
58
+ userEvent.click(definitionAnchor);
59
59
 
60
60
  // Assert
61
+ const tooltip = await screen.findByRole("dialog");
62
+ expect(tooltip).toBeVisible();
61
63
  expect(container).toMatchSnapshot("open state");
62
64
  });
63
65
 
64
- it("should display the definition on hover", async () => {
66
+ it("should display the definition on click", async () => {
65
67
  // Arrange
66
68
  renderQuestion(question);
67
69
 
68
70
  // Act
69
71
  const definitionAnchor = screen.getByText("the Pequots");
70
- userEvent.hover(definitionAnchor);
72
+ userEvent.click(definitionAnchor);
71
73
 
72
74
  // Assert
73
- const tooltip = await screen.findByRole("tooltip");
75
+ const tooltip = await screen.findByRole("dialog");
74
76
  expect(tooltip).toBeVisible();
75
77
  expect(tooltip).toHaveTextContent("Definition text");
76
78
  });
@@ -82,41 +84,28 @@ describe("Definition widget", () => {
82
84
  // Act
83
85
  const definitionAnchor = screen.getByText("the Pequots");
84
86
  userEvent.click(definitionAnchor);
85
- const tooltip = await screen.findByRole("tooltip");
87
+ const tooltip = await screen.findByRole("dialog");
86
88
 
87
89
  // Assert
88
90
  expect(tooltip).toBeVisible();
89
91
  expect(tooltip).toHaveTextContent("Definition text");
90
92
  });
91
93
 
92
- it("should show via focus by the tab key", async () => {
94
+ it("should show via focus on space key", async () => {
93
95
  // Arrange
94
96
  renderQuestion(question);
95
97
 
96
98
  // Act - Tab in to set focus
97
- userEvent.tab();
99
+ const definitionAnchor = screen.getByText("the Pequots");
100
+ userEvent.type(definitionAnchor, "{space}");
98
101
 
99
102
  // Assert
100
- const tooltip = await screen.findByRole("tooltip");
103
+ const tooltip = await screen.findByRole("dialog");
101
104
  expect(tooltip).toBeVisible();
102
105
  expect(tooltip).toHaveTextContent("Definition text");
103
106
  });
104
107
 
105
- it("should hide and blur by the tab key", async () => {
106
- // Arrange
107
- renderQuestion(question);
108
-
109
- // Act - Tab in to set focus, tab out to blur
110
- userEvent.tab();
111
- await screen.findByRole("tooltip");
112
- userEvent.tab();
113
- await waitForElementToBeRemoved(() => screen.queryByRole("tooltip"));
114
-
115
- // Assert
116
- expect(screen.queryByRole("tooltip")).toBeNull();
117
- });
118
-
119
- it("should dimiss by a click when showing", async () => {
108
+ it("should dimiss by a click on the x when showing", async () => {
120
109
  renderQuestion(question);
121
110
 
122
111
  // Act
@@ -124,16 +113,12 @@ describe("Definition widget", () => {
124
113
  const definitionAnchor = screen.getByText("the Pequots");
125
114
  userEvent.click(definitionAnchor);
126
115
 
127
- // Move the mouse away and make sure text is still visible
128
- userEvent.unhover(definitionAnchor);
129
- await screen.findByRole("tooltip");
130
-
131
- // Click to elsewhere, tooltip is hidden
132
- userEvent.click((document.body: any));
133
- await waitForElementToBeRemoved(() => screen.queryByRole("tooltip"));
116
+ // Click close, tooltip is hidden
117
+ const close = screen.getByTestId("popover-close-btn");
118
+ userEvent.click(close);
134
119
 
135
120
  // Assert
136
- expect(screen.queryByRole("tooltip")).toBeNull();
121
+ expect(screen.queryByRole("dialog")).toBeNull();
137
122
  });
138
123
 
139
124
  it("should not affect answerable", () => {
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
 
3
3
  import renderQuestionWithCypress from "../../../../../testing/render-question-with-cypress.jsx";
4
- import {testDependencies} from "../../../../../testing/test-dependencies.js";
4
+ import {cypressTestDependencies} from "../../../../../testing/test-dependencies.js";
5
5
  import * as Perseus from "../../index.js";
6
6
  import {
7
7
  absoluteValueQuestion,
@@ -27,7 +27,7 @@ const LINES = "[data-interactive-kind-for-testing=movable-line] > svg > path";
27
27
  describe("Grapher widget", () => {
28
28
  beforeEach(() => {
29
29
  Perseus.init({skipMathJax: true});
30
- Perseus.Dependencies.setDependencies(testDependencies);
30
+ Perseus.Dependencies.setDependencies(cypressTestDependencies);
31
31
  });
32
32
 
33
33
  describe("absolute value graph", () => {
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
 
3
3
  import renderQuestion from "../../../../../testing/render-question-with-cypress.jsx";
4
- import {testDependencies} from "../../../../../testing/test-dependencies.js";
4
+ import {cypressTestDependencies} from "../../../../../testing/test-dependencies.js";
5
5
  import * as Dependencies from "../../dependencies.js";
6
6
  import * as Perseus from "../../index.js";
7
7
  import {
@@ -29,7 +29,7 @@ const CIRCLES = "svg > circle";
29
29
 
30
30
  describe("Interactive graph", () => {
31
31
  beforeEach(() => {
32
- Dependencies.setDependencies(testDependencies);
32
+ Dependencies.setDependencies(cypressTestDependencies);
33
33
  Perseus.init({skipMathJax: true});
34
34
  });
35
35
 
@@ -1,5 +1,6 @@
1
1
  /* eslint-disable react/sort-comp */
2
2
  // @flow
3
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
3
4
  import * as i18n from "@khanacademy/wonder-blocks-i18n";
4
5
  import {StyleSheet, css} from "aphrodite";
5
6
  import classNames from "classnames";
@@ -7,7 +8,6 @@ import * as React from "react";
7
8
  import _ from "underscore";
8
9
 
9
10
  import InlineIcon from "../components/inline-icon.jsx";
10
- import {linterContextDefault} from "../gorgon/proptypes.js";
11
11
  import {iconCircle, iconCircleThin} from "../icon-paths.js";
12
12
  import * as Changeable from "../mixins/changeable.jsx";
13
13
  import WidgetJsonifyDeprecated from "../mixins/widget-jsonify-deprecated.jsx";
@@ -1,60 +1,20 @@
1
1
  // @flow
2
2
 
3
+ import Button from "@khanacademy/wonder-blocks-button";
3
4
  import Color from "@khanacademy/wonder-blocks-color";
4
- import {View} from "@khanacademy/wonder-blocks-core";
5
+ import {Popover, PopoverContentCore} from "@khanacademy/wonder-blocks-popover";
5
6
  import Spacing from "@khanacademy/wonder-blocks-spacing";
6
- import Tooltip from "@khanacademy/wonder-blocks-tooltip";
7
- import PropTypes from "prop-types";
8
7
  import * as React from "react";
9
- import _ from "underscore";
10
8
 
11
- import {ApiOptions} from "../perseus-api.jsx";
12
9
  import Renderer from "../renderer.jsx";
13
10
 
14
11
  import type {
15
12
  PerseusRenderer,
16
13
  PerseusDefinitionWidgetOptions,
17
14
  } from "../perseus-types.js";
18
- import type {
19
- APIOptionsWithDefaults,
20
- PerseusScore,
21
- WidgetExports,
22
- WidgetProps,
23
- } from "../types.js";
24
-
25
- type DefinitionContentProps = {|
26
- apiOptions: APIOptionsWithDefaults,
27
- content: string,
28
- trackInteraction: () => mixed,
29
- widgets: PerseusRenderer["widgets"],
30
- |};
31
-
32
- class DefinitionContent extends React.Component<DefinitionContentProps> {
33
- static propTypes = {
34
- apiOptions: ApiOptions.propTypes,
35
- content: PropTypes.string,
36
- trackInteraction: PropTypes.func.isRequired,
37
- widgets: PropTypes.objectOf(PropTypes.any),
38
- };
39
-
40
- componentDidMount() {
41
- this.props.trackInteraction();
42
- }
43
-
44
- render(): React.Node {
45
- return (
46
- <View style={styles.tooltipBody}>
47
- <Renderer
48
- apiOptions={this.props.apiOptions}
49
- content={this.props.content}
50
- widgets={this.props.widgets}
51
- />
52
- </View>
53
- );
54
- }
55
- }
15
+ import type {PerseusScore, WidgetExports, WidgetProps} from "../types.js";
56
16
 
57
- type RenderProps = PerseusDefinitionWidgetOptions; // transform = _.identity
17
+ type RenderProps = PerseusDefinitionWidgetOptions;
58
18
 
59
19
  type Rubric = PerseusDefinitionWidgetOptions;
60
20
 
@@ -89,25 +49,38 @@ class Definition extends React.Component<DefinitionProps> {
89
49
  };
90
50
 
91
51
  render(): React.Node {
92
- const content = (
93
- <DefinitionContent
94
- apiOptions={this.props.apiOptions}
95
- content={this.props.definition}
96
- key={this.props.definition}
97
- trackInteraction={this.props.trackInteraction}
98
- widgets={this.props.widgets}
99
- />
100
- );
101
-
102
52
  return (
103
- // $FlowFixMe[incompatible-type]: content prop
104
- <Tooltip content={content} placement="top">
105
- <span className="perseus-widget-definition">
106
- <View style={styles.definitionLink}>
107
- {this.props.togglePrompt}
108
- </View>
109
- </span>
110
- </Tooltip>
53
+ <Popover
54
+ content={
55
+ <PopoverContentCore
56
+ color="white"
57
+ style={styles.tooltipBody}
58
+ closeButtonVisible={true}
59
+ >
60
+ <Renderer
61
+ apiOptions={this.props.apiOptions}
62
+ content={this.props.definition}
63
+ widgets={this.props.widgets}
64
+ />
65
+ </PopoverContentCore>
66
+ }
67
+ placement="top"
68
+ >
69
+ {({open}) => (
70
+ <span className="perseus-widget-definition">
71
+ <Button
72
+ size="small"
73
+ kind="tertiary"
74
+ onClick={() => {
75
+ this.props.trackInteraction();
76
+ open();
77
+ }}
78
+ >
79
+ {this.props.togglePrompt}
80
+ </Button>
81
+ </span>
82
+ )}
83
+ </Popover>
111
84
  );
112
85
  }
113
86
  }
@@ -121,14 +94,6 @@ const styles = {
121
94
  lineHeight: "30px",
122
95
  margin: Spacing.xSmall_8,
123
96
  },
124
-
125
- definitionLink: {
126
- borderBottom: `dashed 1px ${Color.blue}`,
127
- color: Color.blue,
128
- cursor: "pointer",
129
- display: "inline-block",
130
- textDecoration: "none",
131
- },
132
97
  };
133
98
 
134
99
  export default ({
@@ -137,5 +102,5 @@ export default ({
137
102
  accessible: true,
138
103
  defaultAlignment: "inline",
139
104
  widget: Definition,
140
- transform: _.identity,
105
+ transform: (x: any) => x,
141
106
  }: WidgetExports<typeof Definition>);
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable react/sort-comp */
2
2
  // @flow
3
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
3
4
  import {StyleSheet, css} from "aphrodite";
4
5
  import * as React from "react";
5
6
  import _ from "underscore";
6
7
 
7
- import {linterContextDefault} from "../gorgon/proptypes.js";
8
8
  import * as Changeable from "../mixins/changeable.jsx";
9
9
  import Renderer from "../renderer.jsx";
10
10
  import * as styleConstants from "../styles/constants.js";
@@ -2,6 +2,7 @@
2
2
  // @flow
3
3
  import * as KAS from "@khanacademy/kas";
4
4
  import {KeypadInput, KeypadTypes} from "@khanacademy/math-input";
5
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
5
6
  import * as i18n from "@khanacademy/wonder-blocks-i18n";
6
7
  import classNames from "classnames";
7
8
  import * as React from "react";
@@ -11,7 +12,6 @@ import InlineIcon from "../components/inline-icon.jsx";
11
12
  import InputWithExamples from "../components/input-with-examples.jsx";
12
13
  import MathInput from "../components/math-input.jsx";
13
14
  import Tooltip from "../components/tooltip.jsx";
14
- import {linterContextDefault} from "../gorgon/proptypes.js";
15
15
  import {iconExclamationSign} from "../icon-paths.js";
16
16
  import {Errors as PerseusErrors, Log} from "../logging/log.js";
17
17
  import * as Changeable from "../mixins/changeable.jsx";
@@ -1,10 +1,10 @@
1
1
  // @flow
2
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
2
3
  import * as i18n from "@khanacademy/wonder-blocks-i18n";
3
4
  import {StyleSheet, css} from "aphrodite";
4
5
  import * as React from "react";
5
6
 
6
7
  import {getDependencies} from "../dependencies.js";
7
- import {linterContextDefault} from "../gorgon/proptypes.js";
8
8
  import * as Changeable from "../mixins/changeable.jsx";
9
9
  import {
10
10
  grayLight,
@@ -1,4 +1,5 @@
1
1
  // @flow
2
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
2
3
  import Button from "@khanacademy/wonder-blocks-button";
3
4
  import * as i18n from "@khanacademy/wonder-blocks-i18n";
4
5
  import {StyleSheet, css} from "aphrodite";
@@ -7,7 +8,6 @@ import * as React from "react";
7
8
  import _ from "underscore";
8
9
 
9
10
  import InlineIcon from "../components/inline-icon.jsx";
10
- import {linterContextDefault} from "../gorgon/proptypes.js";
11
11
  import {iconOk, iconRemove} from "../icon-paths.js";
12
12
  import * as Changeable from "../mixins/changeable.jsx";
13
13
  import {ApiOptions} from "../perseus-api.jsx";
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable react/sort-comp */
2
2
  // @flow
3
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
3
4
  import classNames from "classnames";
4
5
  import * as React from "react";
5
6
  import _ from "underscore";
6
7
 
7
- import {linterContextDefault} from "../gorgon/proptypes.js";
8
8
  import * as Changeable from "../mixins/changeable.jsx";
9
9
  import {ApiOptions} from "../perseus-api.jsx";
10
10
  import Renderer from "../renderer.jsx";
@@ -1,13 +1,13 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  /* eslint-disable react/sort-comp */
3
3
  // @flow
4
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
4
5
  import {StyleSheet, css} from "aphrodite";
5
6
  import classNames from "classnames";
6
7
  import * as React from "react";
7
8
  import _ from "underscore";
8
9
 
9
10
  import SvgImage from "../components/svg-image.jsx";
10
- import {linterContextDefault} from "../gorgon/proptypes.js";
11
11
  import * as Changeable from "../mixins/changeable.jsx";
12
12
  import Renderer from "../renderer.jsx";
13
13
  import {baseUnitPx} from "../styles/constants.js";
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  /* eslint-disable react/sort-comp */
3
3
  // @flow
4
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
4
5
  import * as i18n from "@khanacademy/wonder-blocks-i18n";
5
6
  import classNames from "classnames";
6
7
  import * as React from "react";
@@ -9,7 +10,6 @@ import _ from "underscore";
9
10
  import InputWithExamples from "../components/input-with-examples.jsx";
10
11
  import PossibleAnswers from "../components/possible-answers.jsx";
11
12
  import SimpleKeypadInput from "../components/simple-keypad-input.jsx";
12
- import {linterContextDefault} from "../gorgon/proptypes.js";
13
13
  import {ClassNames as ApiClassNames, ApiOptions} from "../perseus-api.jsx";
14
14
  import TexWrangler from "../tex-wrangler.js";
15
15
  import KhanAnswerTypes from "../util/answer-types.js";
@@ -1,5 +1,9 @@
1
1
  /* eslint-disable react/forbid-prop-types, react/sort-comp */
2
2
  // @flow
3
+ import {
4
+ linterContextProps,
5
+ linterContextDefault,
6
+ } from "@khanacademy/perseus-linter";
3
7
  import {CircularSpinner} from "@khanacademy/wonder-blocks-progress-spinner";
4
8
  import {StyleSheet, css} from "aphrodite";
5
9
  import PropTypes from "prop-types";
@@ -8,7 +12,6 @@ import _ from "underscore";
8
12
 
9
13
  import Sortable from "../components/sortable.jsx";
10
14
  import {getDependencies} from "../dependencies.js";
11
- import {linterContextProps, linterContextDefault} from "../gorgon/proptypes.js";
12
15
  import {ApiOptions} from "../perseus-api.jsx";
13
16
  import Renderer from "../renderer.jsx";
14
17
  import Util from "../util.js";
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  /* eslint-disable react/sort-comp */
3
3
  // @flow
4
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
4
5
  import * as i18n from "@khanacademy/wonder-blocks-i18n";
5
6
  import classNames from "classnames";
6
7
  import * as React from "react";
@@ -11,7 +12,6 @@ import MathOutput from "../components/math-output.jsx";
11
12
  import NumberInput from "../components/number-input.jsx";
12
13
  import SimpleKeypadInput from "../components/simple-keypad-input.jsx";
13
14
  import TextInput from "../components/text-input.jsx";
14
- import {linterContextDefault} from "../gorgon/proptypes.js";
15
15
  import InteractiveUtil from "../interactive2/interactive-util.js";
16
16
  import {ApiOptions} from "../perseus-api.jsx";
17
17
  import Renderer from "../renderer.jsx";
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  // @flow
3
3
 
4
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
4
5
  import * as i18n from "@khanacademy/wonder-blocks-i18n";
5
6
  import classNames from "classnames";
6
7
  import * as React from "react";
@@ -9,7 +10,6 @@ import _ from "underscore";
9
10
  import InputWithExamples from "../components/input-with-examples.jsx";
10
11
  import PossibleAnswers from "../components/possible-answers.jsx";
11
12
  import SimpleKeypadInput from "../components/simple-keypad-input.jsx";
12
- import {linterContextDefault} from "../gorgon/proptypes.js";
13
13
  import {ApiOptions, ClassNames as ApiClassNames} from "../perseus-api.jsx";
14
14
  import TexWrangler from "../tex-wrangler.js";
15
15
  import KhanAnswerTypes from "../util/answer-types.js";
@@ -1,5 +1,9 @@
1
1
  /* eslint-disable @babel/no-invalid-this, no-unused-vars, one-var, react/no-unsafe, react/sort-comp */
2
2
  // @flow
3
+ import {
4
+ linterContextProps,
5
+ linterContextDefault,
6
+ } from "@khanacademy/perseus-linter";
3
7
  import $ from "jquery";
4
8
  import PropTypes, {bool} from "prop-types";
5
9
  import * as React from "react";
@@ -7,7 +11,6 @@ import ReactDOM from "react-dom";
7
11
  import _ from "underscore";
8
12
 
9
13
  import {getDependencies} from "../dependencies.js";
10
- import {linterContextProps, linterContextDefault} from "../gorgon/proptypes.js";
11
14
  import {Errors, Log} from "../logging/log.js";
12
15
  import {ClassNames as ApiClassNames} from "../perseus-api.jsx";
13
16
  import Renderer from "../renderer.jsx";
@@ -1,9 +1,12 @@
1
1
  // @flow
2
+ import {
3
+ linterContextProps,
4
+ linterContextDefault,
5
+ } from "@khanacademy/perseus-linter";
2
6
  import PropTypes from "prop-types";
3
7
  import * as React from "react";
4
8
  import _ from "underscore";
5
9
 
6
- import {linterContextProps, linterContextDefault} from "../gorgon/proptypes.js";
7
10
  import * as Changeable from "../mixins/changeable.jsx";
8
11
  import WidgetJsonifyDeprecated from "../mixins/widget-jsonify-deprecated.jsx";
9
12
  import Renderer from "../renderer.jsx";
@@ -1,5 +1,6 @@
1
1
  // @flow
2
2
 
3
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
3
4
  import * as i18n from "@khanacademy/wonder-blocks-i18n";
4
5
  import {StyleSheet, css} from "aphrodite";
5
6
  import $ from "jquery";
@@ -9,7 +10,6 @@ import _ from "underscore";
9
10
 
10
11
  import HighlightableContent from "../components/highlighting/highlightable-content.jsx";
11
12
  import {getDependencies} from "../dependencies.js";
12
- import {linterContextDefault} from "../gorgon/proptypes.js";
13
13
  import Renderer from "../renderer.jsx";
14
14
 
15
15
  import {getLineHeightForNode} from "./passage/get-line-height-for-node.js";
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable react/sort-comp */
2
2
  // @flow
3
+ import {linterContextDefault} from "@khanacademy/perseus-linter";
3
4
  import * as i18n from "@khanacademy/wonder-blocks-i18n";
4
5
  import * as React from "react";
5
6
  import _ from "underscore";
6
7
 
7
- import {linterContextDefault} from "../../gorgon/proptypes.js";
8
8
  import Renderer from "../../renderer.jsx";
9
9
  import Util from "../../util.js";
10
10
  import PassageRef from "../passage-ref.jsx";