@khanacademy/perseus 77.7.2 → 77.8.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.
- package/dist/es/index.css +1 -1
- package/dist/es/index.css.map +1 -1
- package/dist/es/index.js +31 -29
- package/dist/es/index.js.map +1 -1
- package/dist/es/strings.js +1 -1
- package/dist/es/strings.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +30 -28
- package/dist/index.js.map +1 -1
- package/dist/server-item-renderer.d.ts +1 -1
- package/dist/strings.d.ts +6 -0
- package/dist/strings.js +1 -1
- package/dist/strings.js.map +1 -1
- package/dist/testing/feature-flags-util.d.ts +0 -4
- package/dist/testing/item-renderer-hooks.d.ts +1 -1
- package/dist/widgets/dropdown/dropdown.d.ts +1 -1
- package/dist/widgets/expression/expression.d.ts +2 -2
- package/dist/widgets/interactive-graphs/graphs/components/clip-to-graph-bounds.d.ts +4 -0
- package/dist/widgets/interactive-graphs/interactive-graph.d.ts +1 -1
- package/dist/widgets/interactive-graphs/reducer/interactive-graph-action.d.ts +3 -3
- package/dist/widgets/interactive-graphs/utils.d.ts +2 -2
- package/dist/widgets/label-image/label-image.d.ts +1 -1
- package/dist/widgets/mock-widgets/mock-widget.d.ts +1 -1
- package/dist/widgets/numeric-input/numeric-input.class.d.ts +2 -1
- package/dist/widgets/numeric-input/numeric-input.d.ts +2 -2
- package/dist/widgets/table/table.d.ts +1 -1
- package/package.json +7 -7
|
@@ -42,7 +42,7 @@ export declare const Expression: React.ForwardRefExoticComponent<PerseusExpressi
|
|
|
42
42
|
hintProgressColor?: string;
|
|
43
43
|
canScrollPage?: boolean;
|
|
44
44
|
editorChangeDelay?: number;
|
|
45
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input"
|
|
45
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input", boolean>;
|
|
46
46
|
}> & {
|
|
47
47
|
baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
|
|
48
48
|
canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
|
|
@@ -122,7 +122,7 @@ declare const _default: {
|
|
|
122
122
|
hintProgressColor?: string;
|
|
123
123
|
canScrollPage?: boolean;
|
|
124
124
|
editorChangeDelay?: number;
|
|
125
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input"
|
|
125
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input", boolean>;
|
|
126
126
|
}> & {
|
|
127
127
|
baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
|
|
128
128
|
canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
|
|
@@ -199,7 +199,7 @@ declare class InteractiveGraph extends React.Component<Props, State> {
|
|
|
199
199
|
hintProgressColor?: string;
|
|
200
200
|
canScrollPage?: boolean;
|
|
201
201
|
editorChangeDelay?: number;
|
|
202
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input"
|
|
202
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input", boolean>;
|
|
203
203
|
}> & {
|
|
204
204
|
baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
|
|
205
205
|
canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
|
|
@@ -71,7 +71,7 @@ export declare const actions: {
|
|
|
71
71
|
movePoint: typeof movePoint;
|
|
72
72
|
};
|
|
73
73
|
vector: {
|
|
74
|
-
moveTip: (destination: vec.Vector2) =>
|
|
74
|
+
moveTip: (destination: vec.Vector2) => MovePointInFigure;
|
|
75
75
|
moveVector: (newStart: vec.Vector2) => MoveLine;
|
|
76
76
|
};
|
|
77
77
|
};
|
|
@@ -141,9 +141,9 @@ declare function openPolygon(): OpenPolygon;
|
|
|
141
141
|
export declare const MOVE_ALL = "move-all";
|
|
142
142
|
export interface MoveAll {
|
|
143
143
|
type: typeof MOVE_ALL;
|
|
144
|
-
|
|
144
|
+
newStart: vec.Vector2;
|
|
145
145
|
}
|
|
146
|
-
declare function moveAll(
|
|
146
|
+
declare function moveAll(newStart: vec.Vector2): MoveAll;
|
|
147
147
|
export declare const MOVE_POINT = "move-point";
|
|
148
148
|
export interface MovePoint {
|
|
149
149
|
type: typeof MOVE_POINT;
|
|
@@ -16,9 +16,9 @@ export declare function bound({ snapStep, range, point, }: {
|
|
|
16
16
|
range: [Interval, Interval];
|
|
17
17
|
point: vec.Vector2;
|
|
18
18
|
}): vec.Vector2;
|
|
19
|
-
export declare function
|
|
19
|
+
export declare function boundToEdgeAndSnapToGrid(point: vec.Vector2, { snapStep, range }: {
|
|
20
|
+
snapStep: vec.Vector2;
|
|
20
21
|
range: [Interval, Interval];
|
|
21
|
-
point: vec.Vector2;
|
|
22
22
|
}): vec.Vector2;
|
|
23
23
|
export declare function isUnlimitedGraphState(state: InteractiveGraphState): state is UnlimitedGraphState;
|
|
24
24
|
/**
|
|
@@ -151,7 +151,7 @@ declare const _default: {
|
|
|
151
151
|
hintProgressColor?: string;
|
|
152
152
|
canScrollPage?: boolean;
|
|
153
153
|
editorChangeDelay?: number;
|
|
154
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input"
|
|
154
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input", boolean>;
|
|
155
155
|
}> & {
|
|
156
156
|
baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
|
|
157
157
|
canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
|
|
@@ -75,7 +75,7 @@ declare class MockWidgetComponent extends React.Component<Props> implements Widg
|
|
|
75
75
|
hintProgressColor?: string;
|
|
76
76
|
canScrollPage?: boolean;
|
|
77
77
|
editorChangeDelay?: number;
|
|
78
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input"
|
|
78
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input", boolean>;
|
|
79
79
|
}> & {
|
|
80
80
|
baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
|
|
81
81
|
canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
|
|
@@ -25,6 +25,7 @@ export declare class NumericInput extends React.Component<NumericInputProps> imp
|
|
|
25
25
|
inputRef: React.RefObject<Focusable>;
|
|
26
26
|
static defaultProps: DefaultProps;
|
|
27
27
|
focus: () => boolean;
|
|
28
|
+
blur: () => void;
|
|
28
29
|
focusInputPath: () => void;
|
|
29
30
|
blurInputPath: () => void;
|
|
30
31
|
getInputPaths: () => ReadonlyArray<ReadonlyArray<string>>;
|
|
@@ -82,7 +83,7 @@ export declare class NumericInput extends React.Component<NumericInputProps> imp
|
|
|
82
83
|
hintProgressColor?: string;
|
|
83
84
|
canScrollPage?: boolean;
|
|
84
85
|
editorChangeDelay?: number;
|
|
85
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input"
|
|
86
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input", boolean>;
|
|
86
87
|
}> & {
|
|
87
88
|
baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
|
|
88
89
|
canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
|
|
@@ -45,7 +45,7 @@ export declare const NumericInputComponent: React.ForwardRefExoticComponent<impo
|
|
|
45
45
|
hintProgressColor?: string;
|
|
46
46
|
canScrollPage?: boolean;
|
|
47
47
|
editorChangeDelay?: number;
|
|
48
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input"
|
|
48
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input", boolean>;
|
|
49
49
|
}> & {
|
|
50
50
|
baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
|
|
51
51
|
canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
|
|
@@ -104,7 +104,7 @@ export declare const NumericInputComponent: React.ForwardRefExoticComponent<impo
|
|
|
104
104
|
hintProgressColor?: string;
|
|
105
105
|
canScrollPage?: boolean;
|
|
106
106
|
editorChangeDelay?: number;
|
|
107
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input"
|
|
107
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input", boolean>;
|
|
108
108
|
}> & {
|
|
109
109
|
baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
|
|
110
110
|
canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
|
|
@@ -83,7 +83,7 @@ declare class Table extends React.Component<Props> implements Widget {
|
|
|
83
83
|
hintProgressColor?: string;
|
|
84
84
|
canScrollPage?: boolean;
|
|
85
85
|
editorChangeDelay?: number;
|
|
86
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input"
|
|
86
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale" | "input-number-to-numeric-input", boolean>;
|
|
87
87
|
}> & {
|
|
88
88
|
baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
|
|
89
89
|
canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
|
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": "77.
|
|
6
|
+
"version": "77.8.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"tiny-invariant": "1.3.1",
|
|
44
44
|
"uuid": "^10.0.0",
|
|
45
45
|
"@khanacademy/kas": "2.2.3",
|
|
46
|
-
"@khanacademy/keypad-context": "3.2.
|
|
47
|
-
"@khanacademy/kmath": "2.4.
|
|
48
|
-
"@khanacademy/math-input": "26.4.
|
|
49
|
-
"@khanacademy/perseus-core": "27.0.
|
|
50
|
-
"@khanacademy/perseus-linter": "5.0.
|
|
51
|
-
"@khanacademy/perseus-score": "8.10.
|
|
46
|
+
"@khanacademy/keypad-context": "3.2.57",
|
|
47
|
+
"@khanacademy/kmath": "2.4.15",
|
|
48
|
+
"@khanacademy/math-input": "26.4.29",
|
|
49
|
+
"@khanacademy/perseus-core": "27.0.3",
|
|
50
|
+
"@khanacademy/perseus-linter": "5.0.12",
|
|
51
|
+
"@khanacademy/perseus-score": "8.10.5",
|
|
52
52
|
"@khanacademy/perseus-utils": "2.1.5",
|
|
53
53
|
"@khanacademy/pure-markdown": "2.2.8",
|
|
54
54
|
"@khanacademy/simple-markdown": "2.2.3"
|