@khanacademy/perseus 19.7.3 → 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.
- package/dist/es/index.js +262 -174
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +255 -166
- package/dist/index.js.map +1 -1
- package/dist/perseus-api.d.ts +1 -1
- package/dist/perseus-types.d.ts +140 -21
- package/dist/renderer.d.ts +4 -6
- package/dist/server-item-renderer.d.ts +1 -1
- package/dist/types.d.ts +2 -5
- package/dist/widgets/expression.d.ts +6 -6
- package/dist/widgets/interactive-graphs/graphs/segment.d.ts +3 -2
- package/dist/widgets/interactive-graphs/interactive-graph-action.d.ts +17 -0
- package/dist/widgets/interactive-graphs/interactive-graph-reducer.d.ts +3 -0
- package/dist/widgets/interactive-graphs/interactive-graph-state.d.ts +19 -0
- package/dist/widgets/interactive-graphs/mafs-graph.d.ts +1 -1
- package/dist/widgets/interactive-graphs/types.d.ts +6 -6
- package/dist/widgets/interactive-graphs/utils.d.ts +3 -14
- package/dist/widgets/label-image.d.ts +2 -12
- package/dist/widgets/lights-puzzle.d.ts +17 -11
- package/dist/widgets/molecule.d.ts +17 -15
- package/dist/widgets/passage-ref-target.d.ts +15 -13
- package/dist/widgets/reaction-diagram.d.ts +14 -9
- package/dist/widgets/unit.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import PropTypes from "prop-types";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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;
|
package/dist/widgets/unit.d.ts
CHANGED
|
@@ -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:
|
|
28
|
+
value: PerseusUnitInputWidgetOptions["value"];
|
|
28
29
|
onBlur: (arg1: FocusPath) => unknown;
|
|
29
30
|
onFocus: (arg1: FocusPath) => unknown;
|
|
30
31
|
};
|