@khanacademy/perseus-editor 26.0.0 → 26.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,7 +1,7 @@
1
1
  import * as React from "react";
2
- import type { APIOptions, Changeable } from "@khanacademy/perseus";
2
+ import type { Changeable, APIOptions } from "@khanacademy/perseus";
3
3
  import type { PerseusRadioWidgetOptions, PerseusRadioChoice, RadioDefaultWidgetOptions } from "@khanacademy/perseus-core";
4
- type RadioEditorProps = {
4
+ export interface RadioEditorProps extends Changeable.ChangeableProps {
5
5
  apiOptions: APIOptions;
6
6
  countChoices: boolean;
7
7
  choices: PerseusRadioChoice[];
@@ -10,15 +10,16 @@ type RadioEditorProps = {
10
10
  multipleSelect: boolean;
11
11
  deselectEnabled: boolean;
12
12
  static: boolean;
13
- } & Changeable.ChangeableProps;
13
+ }
14
14
  declare class RadioEditor extends React.Component<RadioEditorProps> {
15
15
  static widgetName: "radio";
16
16
  static defaultProps: RadioDefaultWidgetOptions;
17
17
  onMultipleSelectChange: (arg1: any) => any;
18
18
  onCountChoicesChange: (arg1: any) => void;
19
19
  onChange: (arg1: any) => void;
20
+ onStatusChange: (choiceIndex: number, correct: boolean) => void;
20
21
  onContentChange: (arg1: any, arg2: any) => void;
21
- onRationaleChange(choiceIndex: number, newRationale: string): void;
22
+ onRationaleChange: (choiceIndex: number, newRationale: string) => void;
22
23
  onDelete: (arg1: number) => void;
23
24
  addChoice: (arg1: boolean, arg2: any) => void;
24
25
  focus: () => boolean;
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import type { PerseusRadioChoice } from "@khanacademy/perseus-core";
3
+ interface RadioOptionSettingsProps {
4
+ index: number;
5
+ choice: PerseusRadioChoice;
6
+ multipleSelect: boolean;
7
+ onStatusChange: (choiceIndex: number, correct: boolean) => void;
8
+ onContentChange: (choiceIndex: number, content: string) => void;
9
+ onRationaleChange: (choiceIndex: number, rationale: string) => void;
10
+ showDelete: boolean;
11
+ onDelete: () => void;
12
+ }
13
+ export declare function RadioOptionSettings({ index, choice, multipleSelect, onStatusChange, onContentChange, onRationaleChange, showDelete, onDelete, }: RadioOptionSettingsProps): React.JSX.Element;
14
+ export {};
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ interface RadioStatusPillProps {
3
+ index: number;
4
+ correct?: boolean;
5
+ multipleSelect: boolean;
6
+ onClick: () => void;
7
+ }
8
+ export declare function RadioStatusPill({ index, correct, multipleSelect, onClick, }: RadioStatusPillProps): React.JSX.Element;
9
+ export {};
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Perseus editors",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "26.0.0",
6
+ "version": "26.1.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -35,13 +35,13 @@
35
35
  "mafs": "^0.19.0",
36
36
  "tiny-invariant": "1.3.1",
37
37
  "@khanacademy/kas": "2.0.9",
38
- "@khanacademy/keypad-context": "3.0.27",
39
- "@khanacademy/kmath": "2.0.27",
40
- "@khanacademy/perseus-linter": "4.1.0",
41
- "@khanacademy/math-input": "26.0.16",
42
- "@khanacademy/perseus": "65.8.0",
43
- "@khanacademy/perseus-core": "18.2.0",
44
- "@khanacademy/perseus-score": "7.1.14",
38
+ "@khanacademy/keypad-context": "3.0.29",
39
+ "@khanacademy/kmath": "2.0.29",
40
+ "@khanacademy/perseus-linter": "4.1.2",
41
+ "@khanacademy/math-input": "26.0.18",
42
+ "@khanacademy/perseus": "66.0.1",
43
+ "@khanacademy/perseus-core": "18.2.2",
44
+ "@khanacademy/perseus-score": "7.1.16",
45
45
  "@khanacademy/perseus-utils": "2.0.5",
46
46
  "@khanacademy/pure-markdown": "2.1.0"
47
47
  },