@khanacademy/perseus 19.7.2 → 19.8.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,13 +1,18 @@
1
- import PropTypes from "prop-types";
2
1
  import * as React from "react";
3
- declare class ReactionDiagramWidget extends React.Component<any> {
4
- static propTypes: {
5
- rotationAngle: PropTypes.Requireable<(number | null | undefined)[]>;
6
- separators: PropTypes.Requireable<(object | null | undefined)[]>;
7
- smiles: PropTypes.Requireable<(string | null | undefined)[]>;
8
- widgetId: PropTypes.Requireable<string>;
9
- };
10
- static defaultProps: any;
2
+ import type { PerseusReactionDiagramWidgetOptions } from "../perseus-types";
3
+ type ReactionDiagramProps = {
4
+ rotationAngle: PerseusReactionDiagramWidgetOptions["rotationAngle"];
5
+ separators: PerseusReactionDiagramWidgetOptions["separators"];
6
+ smiles: PerseusReactionDiagramWidgetOptions["smiles"];
7
+ widgetId: PerseusReactionDiagramWidgetOptions["widgetId"];
8
+ };
9
+ type DefaultProps = {
10
+ rotationAngle: ReactionDiagramProps["rotationAngle"];
11
+ separators: ReactionDiagramProps["separators"];
12
+ smiles: ReactionDiagramProps["smiles"];
13
+ };
14
+ declare class ReactionDiagramWidget extends React.Component<ReactionDiagramProps> {
15
+ static defaultProps: DefaultProps;
11
16
  simpleValidate: (arg1: any) => any;
12
17
  getUserInput: () => any;
13
18
  validate: (arg1: any, arg2: any) => any;
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import type { PerseusUnitInputWidgetOptions } from "../perseus-types";
2
3
  import type { APIOptions, ChangeHandler, FocusPath } from "../types";
3
4
  export declare const countSigfigs: (value: string) => number;
4
5
  export declare const sigfigPrint: (num: number, sigfigs: number) => string;
@@ -24,7 +25,7 @@ type ValidationResult = {
24
25
  type Props = {
25
26
  apiOptions: APIOptions;
26
27
  onChange: ChangeHandler;
27
- value: string;
28
+ value: PerseusUnitInputWidgetOptions["value"];
28
29
  onBlur: (arg1: FocusPath) => unknown;
29
30
  onFocus: (arg1: FocusPath) => unknown;
30
31
  };
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": "19.7.2",
6
+ "version": "19.8.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "@khanacademy/kas": "^0.3.8",
29
29
  "@khanacademy/kmath": "^0.1.12",
30
- "@khanacademy/math-input": "^17.2.2",
30
+ "@khanacademy/math-input": "^17.2.3",
31
31
  "@khanacademy/perseus-core": "1.4.2",
32
32
  "@khanacademy/perseus-linter": "^0.3.12",
33
33
  "@khanacademy/pure-markdown": "^0.3.0",