@khanacademy/perseus-editor 4.1.9 → 4.2.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.
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import type { PerseusPlotterWidgetOptions } from "@khanacademy/perseus";
3
3
  declare const editingStates: string[];
4
- type EditingState = typeof editingStates[number];
4
+ type EditingState = (typeof editingStates)[number];
5
5
  type Props = {
6
6
  type: PerseusPlotterWidgetOptions["type"];
7
7
  labels: Array<string>;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * This editor is for embedding Khan Academy Python programs.
3
+ */
4
+ import { Changeable } from "@khanacademy/perseus";
5
+ import * as React from "react";
6
+ import type { PerseusPythonProgramWidgetOptions } from "@khanacademy/perseus";
7
+ type Props = Changeable.ChangeableProps & {
8
+ programID: string;
9
+ height: number;
10
+ };
11
+ type DefaultProps = {
12
+ programID: Props["programID"];
13
+ height: Props["height"];
14
+ };
15
+ export declare function validateOptions(height: Props["height"], programID: Props["programID"]): ReadonlyArray<string>;
16
+ /**
17
+ * This is the main editor for this widget, to specify all the options.
18
+ */
19
+ declare class PythonProgramEditor extends React.Component<Props> {
20
+ static widgetName: "python-program";
21
+ static defaultProps: DefaultProps;
22
+ change: (...args: ReadonlyArray<unknown>) => any;
23
+ serialize(): PerseusPythonProgramWidgetOptions;
24
+ getSaveWarnings: () => ReadonlyArray<string>;
25
+ render(): React.ReactNode;
26
+ }
27
+ export default PythonProgramEditor;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Perseus editors",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "4.1.9",
6
+ "version": "4.2.1",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@khanacademy/kas": "^0.3.8",
29
29
  "@khanacademy/kmath": "^0.1.12",
30
- "@khanacademy/math-input": "^17.0.7",
31
- "@khanacademy/perseus": "^19.1.9",
30
+ "@khanacademy/math-input": "^17.0.8",
31
+ "@khanacademy/perseus": "^19.2.1",
32
32
  "@khanacademy/perseus-core": "1.4.2"
33
33
  },
34
34
  "devDependencies": {