@khanacademy/perseus 89.0.0 → 90.0.1

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/types.d.ts CHANGED
@@ -336,6 +336,7 @@ export type WidgetProps<TWidgetOptions, TUserInput = Empty, TrackingExtraArgs =
336
336
  onBlur: (blurPath: FocusPath) => void;
337
337
  findWidgets: FindWidgetsFunction;
338
338
  reviewMode: boolean;
339
+ isScorable: boolean;
339
340
  showSolutions?: ShowSolutions;
340
341
  handleUserInput: (newUserInput: TUserInput, cb?: () => void, silent?: boolean) => void;
341
342
  userInput: TUserInput;
@@ -1,17 +1,9 @@
1
- import React from "react";
2
- import { PerseusI18nContext } from "../../components/i18n-context";
1
+ import * as React from "react";
3
2
  import type { Widget } from "../../types";
4
- type Props = object;
5
- declare class DeprecatedStandin extends React.Component<Props> implements Widget {
6
- static contextType: React.Context<import("../../components/i18n-context").I18nContextType>;
7
- context: React.ContextType<typeof PerseusI18nContext>;
8
- isWidget: true;
9
- render(): React.JSX.Element;
10
- }
11
3
  declare const _default: {
12
4
  name: string;
13
5
  displayName: string;
14
- widget: typeof DeprecatedStandin;
6
+ widget: React.ForwardRefExoticComponent<React.RefAttributes<Widget>>;
15
7
  hidden: true;
16
8
  };
17
9
  export default _default;
@@ -5,19 +5,9 @@
5
5
  * is "short answer" type questions.
6
6
  */
7
7
  import * as React from "react";
8
- import { PerseusI18nContext } from "../../components/i18n-context";
9
8
  import type { Widget, WidgetExports, WidgetProps } from "../../types";
10
9
  import type { PerseusFreeResponseUserInput, PerseusFreeResponseWidgetOptions } from "@khanacademy/perseus-core";
11
10
  type Props = WidgetProps<PerseusFreeResponseWidgetOptions, PerseusFreeResponseUserInput>;
12
- export declare class FreeResponse extends React.Component<Props> implements Widget {
13
- static contextType: React.Context<import("../../components/i18n-context").I18nContextType>;
14
- context: React.ContextType<typeof PerseusI18nContext>;
15
- isWidget: true;
16
- announceCharacterCount: (message: string, isOverLimit: boolean) => void;
17
- characterCount: () => number;
18
- _handleUserInput: (newValue: string) => void;
19
- isOverLimit(): boolean;
20
- render(): React.ReactNode;
21
- }
11
+ export declare const FreeResponse: React.ForwardRefExoticComponent<Props & React.RefAttributes<Widget>>;
22
12
  declare const _default: WidgetExports<typeof FreeResponse>;
23
13
  export default _default;
@@ -37,13 +37,7 @@ export declare const graphieImage: {
37
37
  width: number;
38
38
  height: number;
39
39
  };
40
- export declare const graphieImage2: {
41
- url: string;
42
- width: number;
43
- height: number;
44
- };
45
40
  export declare const graphieImageAlt = "An array of isosceles triangles. A triangle has height A. Two smaller triangle, one with height B and one with height C, have approximately the same combined height as A.";
46
- export declare const graphieImage2Alt = "A picture graph shows the horizontal axis labeled Number of insects and the vertical axis labeled Types of insects. Each type of insect is listed along the vertical axis from bottom to top as follows: Beetle, Cricket, Ant, Mosquito, and Bee. The number of insects for each type of insect is represented by the number of pictures of ladybugs plotted on the graph. Beetle is represented by 5 pictures of ladybugs, Cricket is represented by 4 pictures of ladybugs, Ant is represented by 3 pictures of ladybugs, Mosquito is represented by 6 pictures of ladybugs, and Bee is represented by 3 pictures of ladybugs.";
47
41
  export declare const animatedGifLandscape: {
48
42
  url: string;
49
43
  width: number;
@@ -61,6 +61,7 @@ declare const _default: {
61
61
  onBlur: (blurPath: import("../..").FocusPath) => void;
62
62
  findWidgets: import("../../types").FindWidgetsFunction;
63
63
  reviewMode: boolean;
64
+ isScorable: boolean;
64
65
  showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
65
66
  handleUserInput: (newUserInput: import("@khanacademy/perseus-core").PerseusNumericInputUserInput, cb?: () => void, silent?: boolean) => void;
66
67
  userInput: import("@khanacademy/perseus-core").PerseusNumericInputUserInput;
@@ -70,6 +70,7 @@ declare class InteractiveGraph extends React.Component<Props> {
70
70
  onBlur: (blurPath: import("../..").FocusPath) => void;
71
71
  findWidgets: import("../../types").FindWidgetsFunction;
72
72
  reviewMode: boolean;
73
+ isScorable: boolean;
73
74
  showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
74
75
  handleUserInput: (newUserInput: PerseusGraphType, cb?: () => void, silent?: boolean) => void;
75
76
  linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
@@ -11,8 +11,7 @@ import Marker from "./marker";
11
11
  import type { DependencyProps } from "../../dependencies";
12
12
  import type { Widget, WidgetProps } from "../../types";
13
13
  import type { LabelImagePromptJSON } from "../../widget-ai-utils/label-image/label-image-ai-utils";
14
- import type { InteractiveMarkerType, PerseusLabelImageWidgetOptions, PerseusLabelImageUserInput, LabelImagePublicWidgetOptions, ShowSolutions, PerseusLabelImageUserInputMarker } from "@khanacademy/perseus-core";
15
- type PreferredPopoverDirection = "NONE" | "UP" | "DOWN" | "LEFT" | "RIGHT";
14
+ import type { InteractiveMarkerType, PerseusLabelImageWidgetOptions, PerseusLabelImageUserInput, LabelImagePublicWidgetOptions, ShowSolutions, PerseusLabelImageUserInputMarker, PreferredPopoverDirection } from "@khanacademy/perseus-core";
16
15
  /**
17
16
  * Represents a direction vector.
18
17
  * No diagonals allowed.
@@ -36,7 +35,6 @@ export type OptionalAnswersMarkerType = Omit<InteractiveMarkerType, "answers"> &
36
35
  };
37
36
  type Options = Omit<PerseusLabelImageWidgetOptions, "markers"> & {
38
37
  markers: ReadonlyArray<OptionalAnswersMarkerType>;
39
- preferredPopoverDirection?: PreferredPopoverDirection;
40
38
  };
41
39
  type Props = WidgetProps<Options, PerseusLabelImageUserInput> & {
42
40
  analytics: DependencyProps["analytics"];
@@ -82,6 +82,7 @@ declare class MockWidgetComponent extends React.Component<Props> implements Widg
82
82
  onBlur: (blurPath: import("../..").FocusPath) => void;
83
83
  findWidgets: import("../../types").FindWidgetsFunction;
84
84
  reviewMode: boolean;
85
+ isScorable: boolean;
85
86
  showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
86
87
  handleUserInput: (newUserInput: PerseusMockWidgetUserInput, cb?: () => void, silent?: boolean) => void;
87
88
  linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
@@ -61,6 +61,7 @@ declare const _default: {
61
61
  onBlur: (blurPath: import("../..").FocusPath) => void;
62
62
  findWidgets: import("../../types").FindWidgetsFunction;
63
63
  reviewMode: boolean;
64
+ isScorable: boolean;
64
65
  showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
65
66
  handleUserInput: (newUserInput: PerseusSorterUserInput, cb?: () => void, silent?: boolean) => void;
66
67
  userInput: PerseusSorterUserInput;
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": "89.0.0",
6
+ "version": "90.0.1",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -35,12 +35,12 @@
35
35
  "tiny-invariant": "1.3.1",
36
36
  "uuid": "^10.0.0",
37
37
  "@khanacademy/kas": "3.0.0",
38
- "@khanacademy/keypad-context": "6.0.0",
39
- "@khanacademy/kmath": "3.0.1",
40
- "@khanacademy/math-input": "30.0.0",
41
- "@khanacademy/perseus-core": "40.0.1",
42
- "@khanacademy/perseus-linter": "6.0.1",
43
- "@khanacademy/perseus-score": "9.0.1",
38
+ "@khanacademy/keypad-context": "6.0.2",
39
+ "@khanacademy/kmath": "3.0.3",
40
+ "@khanacademy/math-input": "30.0.2",
41
+ "@khanacademy/perseus-core": "41.0.0",
42
+ "@khanacademy/perseus-linter": "6.0.3",
43
+ "@khanacademy/perseus-score": "9.0.3",
44
44
  "@khanacademy/perseus-utils": "3.0.0",
45
45
  "@khanacademy/pure-markdown": "3.0.0",
46
46
  "@khanacademy/simple-markdown": "4.0.0"