@khanacademy/perseus 83.1.0 → 84.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.
@@ -23,14 +23,6 @@ import type { ChangeFn } from "../types";
23
23
  * @deprecated
24
24
  */
25
25
  export declare const change: ChangeFn;
26
- /**
27
- * TODO(LEMS-3245) remove Changeable
28
- *
29
- * @deprecated
30
- */
31
- export declare const propTypes: {
32
- readonly onChange: any;
33
- };
34
26
  /**
35
27
  * TODO(LEMS-3245) remove Changeable
36
28
  *
@@ -4,6 +4,6 @@
4
4
  * PerseusWidgetUsedInProblemAttempt CEDAR event, we needed
5
5
  * to: get the type and convert that to an enum value.
6
6
  */
7
- type WidgetEnum = "CATEGORIZER" | "CS_PROGRAM" | "DEFINITION" | "DEPRECATED_STANDIN" | "DROPDOWN" | "EXPLANATION" | "EXPRESSION" | "FREE_RESPONSE" | "GRADED_GROUP" | "GRADED_GROUP_SET" | "GRAPHER" | "GROUP" | "IFRAME" | "IMAGE" | "INPUT_NUMBER" | "INTERACTIVE" | "INTERACTIVE_GRAPH" | "LABEL_IMAGE" | "LIGHTS_PUZZLE" | "MATCHER" | "MATRIX" | "MEASURER" | "MOLECULE" | "NUMBER_LINE" | "NUMERIC_INPUT" | "ORDERER" | "PASSAGE" | "PASSAGE_REF" | "PASSAGE_REF_TARGET" | "PHET_SIMULATION" | "PLOTTER" | "PYTHON_PROGRAM" | "REACTION_DIAGRAM" | "RADIO" | "SEQUENCE" | "SIMULATOR" | "SORTER" | "TABLE" | "UNIT" | "VIDEO";
7
+ type WidgetEnum = "BLANK" | "CATEGORIZER" | "CS_PROGRAM" | "DEFINITION" | "DEPRECATED_STANDIN" | "DROPDOWN" | "EXPLANATION" | "EXPRESSION" | "FREE_RESPONSE" | "GRADED_GROUP" | "GRADED_GROUP_SET" | "GRAPHER" | "GROUP" | "IFRAME" | "IMAGE" | "INPUT_NUMBER" | "INTERACTIVE" | "INTERACTIVE_GRAPH" | "LABEL_IMAGE" | "LIGHTS_PUZZLE" | "MATCHER" | "MATRIX" | "MEASURER" | "MOLECULE" | "NUMBER_LINE" | "NUMERIC_INPUT" | "ORDERER" | "PASSAGE" | "PASSAGE_REF" | "PASSAGE_REF_TARGET" | "PHET_SIMULATION" | "PLOTTER" | "PYTHON_PROGRAM" | "REACTION_DIAGRAM" | "RADIO" | "SEQUENCE" | "SIMULATOR" | "SORTER" | "TABLE" | "UNIT" | "VIDEO";
8
8
  export declare function convertWidgetNameToEnum(name: string): WidgetEnum;
9
9
  export {};
@@ -0,0 +1,67 @@
1
+ import * as React from "react";
2
+ import type { Widget } from "../../types";
3
+ import type { PerseusBlankWidgetOptions, PerseusBlankUserInput } from "@khanacademy/perseus-core";
4
+ declare const _default: {
5
+ name: string;
6
+ displayName: string;
7
+ widget: React.ForwardRefExoticComponent<PerseusBlankWidgetOptions & {
8
+ trackInteraction: (extraData?: Empty | undefined) => void;
9
+ widgetId: string;
10
+ widgetIndex: number;
11
+ alignment: string | null | undefined;
12
+ static: boolean | null | undefined;
13
+ graded?: boolean | null;
14
+ problemNum: number | null | undefined;
15
+ apiOptions: Readonly<Readonly<{
16
+ isArticle?: boolean;
17
+ onFocusChange?: (newFocusPath: import("../..").FocusPath, oldFocusPath: import("../..").FocusPath, keypadHeight?: number, focusedElement?: HTMLElement) => unknown;
18
+ showAlignmentOptions?: boolean;
19
+ readOnly?: boolean;
20
+ editingDisabled?: boolean;
21
+ answerableCallback?: (arg1: boolean) => unknown;
22
+ getAnotherHint?: () => unknown;
23
+ interactionCallback?: (widgetData: {
24
+ [widgetId: string]: any;
25
+ }) => void;
26
+ imagePlaceholder?: React.ReactNode;
27
+ widgetPlaceholder?: React.ReactNode;
28
+ baseElements?: {
29
+ Link: React.ComponentType<any>;
30
+ };
31
+ trackInteraction?: (args: {
32
+ type: string;
33
+ id: string;
34
+ correct?: boolean;
35
+ } & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
36
+ visible: number;
37
+ }>) => void;
38
+ customKeypad?: boolean;
39
+ isMobile?: boolean;
40
+ isMobileApp?: boolean;
41
+ hintProgressColor?: string;
42
+ flags?: Record<"perseus-renderer-upgrade" | "desmos-calculator", boolean>;
43
+ }> & {
44
+ baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
45
+ isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
46
+ isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
47
+ isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
48
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
49
+ onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
50
+ readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
51
+ showAlignmentOptions: NonNullable<import("../..").APIOptions["showAlignmentOptions"]>;
52
+ }>;
53
+ keypadElement?: any;
54
+ onFocus: (blurPath: import("../..").FocusPath) => void;
55
+ onBlur: (blurPath: import("../..").FocusPath) => void;
56
+ findWidgets: import("../../types").FindWidgetsFunction;
57
+ reviewMode: boolean;
58
+ showSolutions?: import("@khanacademy/perseus-core").ShowSolutions;
59
+ handleUserInput: (newUserInput: PerseusBlankUserInput, cb?: () => void, silent?: boolean) => void;
60
+ userInput: PerseusBlankUserInput;
61
+ linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
62
+ containerSizeClass: import("../../util/sizing-utils").SizeClass;
63
+ } & React.RefAttributes<Widget>>;
64
+ isLintable: true;
65
+ hidden: true;
66
+ };
67
+ export default _default;
@@ -0,0 +1 @@
1
+ export { default } from "./blank";
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": "83.1.0",
6
+ "version": "84.0.1",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -44,15 +44,15 @@
44
44
  "tiny-invariant": "1.3.1",
45
45
  "uuid": "^10.0.0",
46
46
  "@khanacademy/kas": "2.2.6",
47
- "@khanacademy/keypad-context": "3.2.81",
48
- "@khanacademy/kmath": "2.4.40",
49
- "@khanacademy/math-input": "27.0.1",
50
- "@khanacademy/perseus-core": "34.1.0",
51
- "@khanacademy/perseus-linter": "5.1.21",
52
- "@khanacademy/perseus-score": "8.12.13",
53
- "@khanacademy/perseus-utils": "2.1.5",
47
+ "@khanacademy/kmath": "2.4.41",
48
+ "@khanacademy/keypad-context": "3.2.82",
49
+ "@khanacademy/math-input": "27.0.2",
50
+ "@khanacademy/perseus-core": "35.0.0",
51
+ "@khanacademy/perseus-linter": "5.1.22",
54
52
  "@khanacademy/pure-markdown": "2.3.2",
55
- "@khanacademy/simple-markdown": "3.0.1"
53
+ "@khanacademy/perseus-score": "8.12.14",
54
+ "@khanacademy/simple-markdown": "3.0.1",
55
+ "@khanacademy/perseus-utils": "2.1.5"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@khanacademy/wonder-blocks-announcer": "1.1.1",