@khanacademy/perseus 92.0.2 → 92.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,4 +1,5 @@
1
1
  import { GrapherUtil } from "@khanacademy/perseus-core";
2
+ import * as React from "react";
2
3
  import type { Coord } from "../../interactive2/types";
3
4
  import type { FunctionTypeMappingKeys, GrapherAnswerTypes } from "@khanacademy/perseus-core";
4
5
  type MovableMap = {
@@ -14,5 +15,9 @@ export declare const getGridAndSnapSteps: (options: any, boxSize: number) => {
14
15
  snapStep: [number, number];
15
16
  };
16
17
  export declare const DEFAULT_GRAPHER_PROPS: any;
17
- export declare const typeToButton: (type: FunctionTypeMappingKeys) => any;
18
+ export declare const typeToButton: (type: FunctionTypeMappingKeys) => {
19
+ value: "linear" | "quadratic" | "sinusoid" | "exponential" | "tangent" | "logarithm" | "absolute_value";
20
+ title: string;
21
+ content: React.JSX.Element;
22
+ };
18
23
  export {};
@@ -45,7 +45,7 @@ declare const _default: {
45
45
  isMobile?: boolean;
46
46
  isMobileApp?: boolean;
47
47
  hintProgressColor?: string;
48
- flags?: Record<"perseus-renderer-upgrade" | "desmos-calculator" | "article-extras" | "dnd-widget-fitb", boolean>;
48
+ flags?: Record<"desmos-calculator" | "article-extras" | "dnd-widget-fitb" | "dnd-widget-sorter", boolean>;
49
49
  }> & {
50
50
  baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
51
51
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
@@ -54,7 +54,7 @@ declare class InteractiveGraph extends React.Component<Props> {
54
54
  isMobile?: boolean;
55
55
  isMobileApp?: boolean;
56
56
  hintProgressColor?: string;
57
- flags?: Record<"perseus-renderer-upgrade" | "desmos-calculator" | "article-extras" | "dnd-widget-fitb", boolean>;
57
+ flags?: Record<"desmos-calculator" | "article-extras" | "dnd-widget-fitb" | "dnd-widget-sorter", boolean>;
58
58
  }> & {
59
59
  baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
60
60
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
@@ -45,7 +45,7 @@ declare const _default: {
45
45
  isMobile?: boolean;
46
46
  isMobileApp?: boolean;
47
47
  hintProgressColor?: string;
48
- flags?: Record<"perseus-renderer-upgrade" | "desmos-calculator" | "article-extras" | "dnd-widget-fitb", boolean>;
48
+ flags?: Record<"desmos-calculator" | "article-extras" | "dnd-widget-fitb" | "dnd-widget-sorter", boolean>;
49
49
  }> & {
50
50
  baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
51
51
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
@@ -67,7 +67,7 @@ declare const _default: {
67
67
  userInput: PerseusSorterUserInput;
68
68
  linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
69
69
  containerSizeClass: import("../../util/sizing-utils").SizeClass;
70
- } & import("react").RefAttributes<import("./sorter").SorterHandle>>;
70
+ } & import("react").RefAttributes<import("./old/sorter").SorterHandle>>;
71
71
  isLintable: true;
72
72
  getStartUserInput: typeof getStartUserInput;
73
73
  getUserInputFromSerializedState: typeof getUserInputFromSerializedState;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import type { Widget, WidgetProps } from "../../../types";
3
+ import type { PerseusSorterWidgetOptions, PerseusSorterUserInput } from "@khanacademy/perseus-core";
4
+ type Props = WidgetProps<PerseusSorterWidgetOptions, PerseusSorterUserInput>;
5
+ declare const Sorter: React.ForwardRefExoticComponent<Props & React.RefAttributes<Widget>>;
6
+ export default Sorter;
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ import type { SortableOption } from "../../../components/sortable";
3
+ import type { Widget, WidgetProps } from "../../../types";
4
+ import type { PerseusSorterWidgetOptions, PerseusSorterUserInput } from "@khanacademy/perseus-core";
5
+ type Props = WidgetProps<PerseusSorterWidgetOptions, PerseusSorterUserInput>;
6
+ export interface SorterHandle extends Widget {
7
+ /**
8
+ * Programatic API for moving options. This is used by testing.
9
+ *
10
+ * @deprecated prefer user interaction testing over backdoor
11
+ * state manipulation
12
+ */
13
+ moveOptionToIndex: (option: SortableOption, index: number) => void;
14
+ }
15
+ declare const Sorter: React.ForwardRefExoticComponent<Props & React.RefAttributes<SorterHandle>>;
16
+ export default Sorter;
@@ -1,16 +1,7 @@
1
1
  import * as React from "react";
2
- import type { SortableOption } from "../../components/sortable";
3
- import type { Widget, WidgetProps } from "../../types";
2
+ import type { SorterHandle } from "./old/sorter";
3
+ import type { WidgetProps } from "../../types";
4
4
  import type { PerseusSorterWidgetOptions, PerseusSorterUserInput } from "@khanacademy/perseus-core";
5
5
  type Props = WidgetProps<PerseusSorterWidgetOptions, PerseusSorterUserInput>;
6
- export interface SorterHandle extends Widget {
7
- /**
8
- * Programatic API for moving options. This is used by testing.
9
- *
10
- * @deprecated prefer user interaction testing over backdoor
11
- * state manipulation
12
- */
13
- moveOptionToIndex: (option: SortableOption, index: number) => void;
14
- }
15
6
  declare const Sorter: React.ForwardRefExoticComponent<Props & React.RefAttributes<SorterHandle>>;
16
7
  export default Sorter;
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": "92.0.2",
6
+ "version": "92.1.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -29,14 +29,14 @@
29
29
  "@dnd-kit/dom": "^0.5.0",
30
30
  "@dnd-kit/react": "^0.5.0",
31
31
  "@khanacademy/kas": "3.0.2",
32
- "@khanacademy/keypad-context": "6.0.7",
33
- "@khanacademy/kmath": "3.1.0",
34
- "@khanacademy/math-input": "30.1.2",
35
- "@khanacademy/perseus-core": "42.0.0",
36
- "@khanacademy/perseus-linter": "6.1.5",
37
- "@khanacademy/perseus-score": "9.0.8",
32
+ "@khanacademy/keypad-context": "6.0.8",
33
+ "@khanacademy/kmath": "3.1.1",
34
+ "@khanacademy/math-input": "30.1.3",
35
+ "@khanacademy/perseus-core": "42.0.1",
36
+ "@khanacademy/perseus-linter": "6.2.0",
37
+ "@khanacademy/perseus-score": "9.0.9",
38
38
  "@khanacademy/perseus-utils": "3.0.1",
39
- "@khanacademy/pure-markdown": "3.0.1",
39
+ "@khanacademy/pure-markdown": "3.1.0",
40
40
  "@khanacademy/simple-markdown": "4.0.1",
41
41
  "@use-gesture/react": "^10.2.27",
42
42
  "gifuct-js": "^2.1.2",