@khanacademy/perseus 93.0.3 → 93.1.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.
@@ -1,3 +1,4 @@
1
+ import WrappedEllipse from "./wrapped-ellipse";
1
2
  import type { Movable } from "./movable";
2
3
  import type { Constraint, ConstraintCallbacks, Coord } from "./types";
3
4
  import type { Graphie } from "../util/graphie";
@@ -23,7 +24,7 @@ type State = {
23
24
  static: boolean;
24
25
  tooltip: boolean;
25
26
  touchOffset: null | Coord;
26
- mouseTarget: unknown;
27
+ mouseTarget: WrappedEllipse | null;
27
28
  visibleShape: {
28
29
  wrapper: HTMLElement;
29
30
  toBack(): void;
@@ -74,7 +75,7 @@ export declare class MovablePoint {
74
75
  static: boolean;
75
76
  tooltip: boolean;
76
77
  touchOffset: null | Coord;
77
- mouseTarget: unknown;
78
+ mouseTarget: WrappedEllipse | null;
78
79
  visibleShape: {
79
80
  wrapper: HTMLElement;
80
81
  toBack(): void;
@@ -152,7 +153,7 @@ export declare class MovablePoint {
152
153
  toFront(): void;
153
154
  };
154
155
  outOfBounds(): boolean;
155
- mouseTarget(): unknown;
156
+ mouseTarget(): WrappedEllipse | null;
156
157
  touchOffset(): Coord | null;
157
158
  /**
158
159
  * Forwarding methods to this.movable:
@@ -4,7 +4,6 @@ export declare const ApiOptions: {
4
4
  };
5
5
  export declare const ClassNames: {
6
6
  readonly RENDERER: "perseus-renderer";
7
- readonly TWO_COLUMN_RENDERER: "perseus-renderer-two-columns";
8
7
  readonly RESPONSIVE_RENDERER: "perseus-renderer-responsive";
9
8
  readonly INPUT: "perseus-input";
10
9
  readonly FOCUSED: "perseus-focused";
@@ -85,7 +85,6 @@ declare class Renderer extends React.Component<Props, State> implements GetPromp
85
85
  [id: string]: InteractionTracker<any>;
86
86
  };
87
87
  _isMounted: boolean;
88
- _isTwoColumn: boolean;
89
88
  _translationLinter: TranslationLinter;
90
89
  _widgetContainers: Map<string, WidgetContainer>;
91
90
  translationIndex: number;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Parse a string of text and math into a list of objects with type and content
3
+ *
4
+ * Example: "Pi is about $\frac{22}{7}$" ==>
5
+ * [
6
+ * {type: "text", content: "Pi is about "},
7
+ * {type: "math", content: "\\frac{22}{7}"},
8
+ * ]
9
+ */
10
+ export declare const mathOnlyParser: import("@khanacademy/simple-markdown").Parser;
11
+ /**
12
+ * Replace all text outside of the $ TeX blocks with `\\text{...}`
13
+ * This way, the entire resulting string can be rendered within <TeX>
14
+ * and the text outside of the $ blocks will be non-TeX text.
15
+ */
16
+ export declare function replaceOutsideTeX(mathString: string): string;
@@ -20,22 +20,6 @@ export declare function boundToEdgeAndSnapToGrid(point: vec.Vector2, { snapStep,
20
20
  range: [Interval, Interval];
21
21
  }): vec.Vector2;
22
22
  export declare function isUnlimitedGraphState(state: InteractiveGraphState): state is UnlimitedGraphState;
23
- /**
24
- * Parse a string of text and math into a list of objects with type and content
25
- *
26
- * Example: "Pi is about $\frac{22}{7}$" ==>
27
- * [
28
- * {type: "text", content: "Pi is about "},
29
- * {type: "math", content: "\\frac{22}{7}"},
30
- * ]
31
- */
32
- export declare const mathOnlyParser: import("@khanacademy/simple-markdown").Parser;
33
- /**
34
- * Replace all text outside of the $ TeX blocks with `\\text{...}`
35
- * This way, the entire resulting string can be rendered within <TeX>
36
- * and the text outside of the $ blocks will be non-TeX text.
37
- */
38
- export declare function replaceOutsideTeX(mathString: string): string;
39
23
  export declare const calculateNestedSVGCoords: (range: vec.Vector2[], width: number, height: number) => {
40
24
  viewboxX: number;
41
25
  viewboxY: number;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Core Perseus API (includes renderers and widgets)",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "93.0.3",
6
+ "version": "93.1.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -28,14 +28,14 @@
28
28
  "@dnd-kit/dom": "^0.5.0",
29
29
  "@dnd-kit/react": "^0.5.0",
30
30
  "@khanacademy/kas": "3.1.1",
31
- "@khanacademy/keypad-context": "6.0.12",
32
- "@khanacademy/kmath": "3.1.5",
33
- "@khanacademy/math-input": "30.2.2",
34
- "@khanacademy/perseus-core": "42.2.0",
35
- "@khanacademy/perseus-linter": "8.0.0",
36
- "@khanacademy/perseus-score": "9.0.13",
31
+ "@khanacademy/keypad-context": "6.0.13",
32
+ "@khanacademy/kmath": "3.1.6",
33
+ "@khanacademy/math-input": "30.2.3",
34
+ "@khanacademy/perseus-core": "42.3.0",
35
+ "@khanacademy/perseus-linter": "8.0.1",
36
+ "@khanacademy/perseus-score": "9.0.14",
37
37
  "@khanacademy/perseus-utils": "3.0.2",
38
- "@khanacademy/pure-markdown": "3.1.2",
38
+ "@khanacademy/pure-markdown": "4.0.0",
39
39
  "@khanacademy/simple-markdown": "4.0.3",
40
40
  "@use-gesture/react": "^10.2.27",
41
41
  "gifuct-js": "^2.1.2",
@@ -46,6 +46,7 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@internal/build-settings": "0.9.2",
49
+ "@khanacademy/mathjax-renderer": "3.2.0",
49
50
  "@khanacademy/wonder-blocks-announcer": "1.1.2",
50
51
  "@khanacademy/wonder-blocks-banner": "5.2.0",
51
52
  "@khanacademy/wonder-blocks-button": "11.7.13",
@@ -81,6 +82,7 @@
81
82
  "underscore": "1.4.4"
82
83
  },
83
84
  "peerDependencies": {
85
+ "@khanacademy/mathjax-renderer": "^3.2.0",
84
86
  "@khanacademy/wonder-blocks-announcer": "^1.1.2",
85
87
  "@khanacademy/wonder-blocks-banner": "^5.2.0",
86
88
  "@khanacademy/wonder-blocks-button": "^11.7.13",
@@ -115,7 +117,7 @@
115
117
  },
116
118
  "keywords": [],
117
119
  "khan": {
118
- "catalogHash": "c5e0d95da455a764"
120
+ "catalogHash": "fcc2e6d435b5a05b"
119
121
  },
120
122
  "scripts": {}
121
123
  }