@khanacademy/perseus 84.3.0 → 85.0.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.
@@ -160,13 +160,6 @@ declare class Renderer extends React.Component<Props, State> implements GetPromp
160
160
  focusPath: (path: FocusPath) => void;
161
161
  blurPath: (path: FocusPath) => void;
162
162
  blur: () => void;
163
- /**
164
- * Serializes widget state. Seems to be used only by editors though.
165
- *
166
- * @deprecated and likely a very broken API
167
- * [LEMS-3185] do not trust serializedState
168
- */
169
- serialize: () => Record<any, any>;
170
163
  /**
171
164
  * Returns an array of widget ids that are empty (meaning widgets where the
172
165
  * learner has not interacted with the widget yet or has not filled in all
@@ -171,13 +171,6 @@ declare class Renderer extends React.Component<Props, State> implements GetPromp
171
171
  focusPath: (path: FocusPath) => void;
172
172
  blurPath: (path: FocusPath) => void;
173
173
  blur: () => void;
174
- /**
175
- * Serializes widget state. Seems to be used only by editors though.
176
- *
177
- * @deprecated and likely a very broken API
178
- * [LEMS-3185] do not trust serializedState
179
- */
180
- serialize: () => Record<any, any>;
181
174
  /**
182
175
  * Returns an array of widget ids that are empty (meaning widgets where the
183
176
  * learner has not interacted with the widget yet or has not filled in all
package/dist/types.d.ts CHANGED
@@ -341,9 +341,6 @@ export type WidgetProps<TWidgetOptions, TUserInput = Empty, TrackingExtraArgs =
341
341
  linterContext: LinterContextProps;
342
342
  containerSizeClass: SizeClass;
343
343
  };
344
- export type ChangeFn = (newPropsOrSinglePropName: string | {
345
- [key: string]: any;
346
- }, propValue?: any, callback?: () => unknown) => any;
347
344
  export type SharedRendererProps = {
348
345
  apiOptions: APIOptions;
349
346
  linterContext: LinterContextProps;
@@ -1,13 +1,10 @@
1
1
  import * as React from "react";
2
- import type { PerseusDependenciesV2, WidgetProps } from "../../types";
3
- import type { PerseusDefinitionWidgetOptions, PerseusRenderer } from "@khanacademy/perseus-core";
4
- type DefinitionProps = WidgetProps<PerseusDefinitionWidgetOptions> & {
5
- widgets: PerseusRenderer["widgets"];
6
- dependencies: PerseusDependenciesV2;
7
- };
2
+ import type { Widget, WidgetProps } from "../../types";
3
+ import type { PerseusDefinitionWidgetOptions } from "@khanacademy/perseus-core";
4
+ type Props = WidgetProps<PerseusDefinitionWidgetOptions>;
8
5
  declare const _default: {
9
6
  name: string;
10
7
  displayName: string;
11
- widget: React.ForwardRefExoticComponent<Omit<DefinitionProps, "dependencies"> & React.RefAttributes<any>>;
8
+ widget: React.ForwardRefExoticComponent<Props & React.RefAttributes<Widget>>;
12
9
  };
13
10
  export default _default;
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": "84.3.0",
6
+ "version": "85.0.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -45,14 +45,14 @@
45
45
  "uuid": "^10.0.0",
46
46
  "jquery": "^2.1.1",
47
47
  "@khanacademy/kas": "2.2.6",
48
- "@khanacademy/keypad-context": "3.2.84",
49
- "@khanacademy/kmath": "2.4.43",
50
- "@khanacademy/math-input": "27.0.4",
51
- "@khanacademy/perseus-core": "36.1.0",
52
- "@khanacademy/perseus-score": "8.12.16",
48
+ "@khanacademy/keypad-context": "3.2.85",
49
+ "@khanacademy/kmath": "2.4.44",
50
+ "@khanacademy/math-input": "27.0.5",
51
+ "@khanacademy/perseus-core": "37.0.0",
52
+ "@khanacademy/perseus-linter": "5.1.25",
53
+ "@khanacademy/perseus-score": "8.12.17",
53
54
  "@khanacademy/perseus-utils": "2.1.5",
54
55
  "@khanacademy/pure-markdown": "2.3.2",
55
- "@khanacademy/perseus-linter": "5.1.24",
56
56
  "@khanacademy/simple-markdown": "3.0.1"
57
57
  },
58
58
  "devDependencies": {
@@ -1,35 +0,0 @@
1
- /**
2
- * Changeable
3
- *
4
- * Adds a this.change() function to a component
5
- *
6
- * This.change takes prop changes as parameters, and calls
7
- * this.props.onChange with the modified props.
8
- */
9
- import type { ChangeFn } from "../types";
10
- /**
11
- * this.change()
12
- *
13
- * Can be called as follows:
14
- * this.change(newProps, callback);
15
- *
16
- * this.change(propName, propValue, callback);
17
- *
18
- * this.change(propName) -> returns a lambda that takes a prop value to
19
- * set and a callback to call after having set that value.
20
- *
21
- * TODO(LEMS-3245) remove Changeable
22
- *
23
- * @deprecated
24
- */
25
- export declare const change: ChangeFn;
26
- /**
27
- * TODO(LEMS-3245) remove Changeable
28
- *
29
- * @deprecated
30
- */
31
- export type ChangeableProps = {
32
- onChange: (values: {
33
- [key: string]: any;
34
- }, callback?: (() => unknown) | null | undefined, silent?: boolean) => unknown;
35
- };
@@ -1,8 +0,0 @@
1
- /**
2
- * @deprecated do not use EditorJsonify
3
- * See LEMS-4108 for more details
4
- */
5
- declare const EditorJsonify: {
6
- readonly serialize: () => any;
7
- };
8
- export default EditorJsonify;
@@ -1,5 +0,0 @@
1
- /**
2
- * @deprecated do not use the denylist
3
- * See LEMS-4108 for more details
4
- */
5
- export declare function excludeDenylistKeys(obj: Record<any, any>): {};