@khanacademy/perseus 90.0.2 → 90.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,16 +1,13 @@
1
1
  import * as React from "react";
2
- import { PerseusI18nContext } from "../../components/i18n-context";
3
- import type { APIOptions } from "../../types";
4
- export type ANSWER_BAR_STATES = "ACTIVE" | "INACTIVE" | "INCORRECT" | "CORRECT";
2
+ import type { APIOptions, TrackingGradedGroupExtraArguments } from "../../types";
3
+ export type GradingStatus = TrackingGradedGroupExtraArguments["status"];
4
+ export type AnswerBarState = "active" | GradingStatus;
5
5
  type Props = {
6
- answerBarState: ANSWER_BAR_STATES;
6
+ answerBarState: AnswerBarState;
7
7
  apiOptions: APIOptions;
8
+ invalidMessage?: string;
8
9
  onCheckAnswer: () => unknown;
9
10
  onNextQuestion?: () => unknown;
10
11
  };
11
- declare class GradedGroupAnswerBar extends React.Component<Props> {
12
- static contextType: React.Context<import("../../components/i18n-context").I18nContextType>;
13
- context: React.ContextType<typeof PerseusI18nContext>;
14
- render(): React.ReactNode;
15
- }
12
+ declare function GradedGroupAnswerBar({ apiOptions, answerBarState, invalidMessage, onCheckAnswer, onNextQuestion, }: Props): React.JSX.Element;
16
13
  export default GradedGroupAnswerBar;
@@ -10,6 +10,7 @@ export interface RadioComponentProps {
10
10
  numCorrect: number;
11
11
  onChoiceChange: (choiceId: string, newCheckedState: boolean) => void;
12
12
  reviewMode: boolean;
13
+ isRequired?: boolean;
13
14
  }
14
15
  /**
15
16
  * The RadioComponent renders the UI for multiple choice questions.
@@ -49,5 +50,5 @@ export interface RadioComponentProps {
49
50
  *
50
51
  * Created as part of the Radio Revitalization Project (LEMS-2933).
51
52
  */
52
- declare const RadioComponent: ({ choices, countChoices, multipleSelect, numCorrect, onChoiceChange, reviewMode, }: RadioComponentProps) => React.ReactElement;
53
+ declare const RadioComponent: ({ choices, countChoices, multipleSelect, numCorrect, onChoiceChange, reviewMode, isRequired, }: RadioComponentProps) => React.ReactElement;
53
54
  export default RadioComponent;
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": "90.0.2",
6
+ "version": "90.1.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -34,12 +34,12 @@
34
34
  "mafs": "0.19.0",
35
35
  "tiny-invariant": "1.3.1",
36
36
  "uuid": "^10.0.0",
37
- "@khanacademy/kmath": "3.0.3",
38
37
  "@khanacademy/keypad-context": "6.0.2",
39
- "@khanacademy/math-input": "30.0.3",
38
+ "@khanacademy/kmath": "3.0.3",
40
39
  "@khanacademy/perseus-core": "41.0.0",
40
+ "@khanacademy/math-input": "30.0.3",
41
41
  "@khanacademy/kas": "3.0.0",
42
- "@khanacademy/perseus-linter": "6.0.3",
42
+ "@khanacademy/perseus-linter": "6.1.0",
43
43
  "@khanacademy/perseus-score": "9.0.3",
44
44
  "@khanacademy/perseus-utils": "3.0.0",
45
45
  "@khanacademy/pure-markdown": "3.0.0",