@khanacademy/perseus-editor 2.6.3 → 2.6.4
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/CHANGELOG.md +9 -0
- package/dist/components/section-control-button.d.ts +2 -1
- package/dist/es/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/widgets/input-number-editor.d.ts +7 -6
- package/dist/widgets/interactive-graph-editor.d.ts +48 -47
- package/package.json +2 -2
- package/src/components/section-control-button.tsx +3 -4
- package/src/widgets/input-number-editor.tsx +8 -23
- package/src/widgets/interactive-graph-editor.tsx +2 -5
- package/tsconfig-build.tsbuildinfo +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { ParsedValue, InputNumber } from "@khanacademy/perseus";
|
|
3
|
+
import type { PropsFor } from "@khanacademy/wonder-blocks-core";
|
|
3
4
|
type Props = {
|
|
4
5
|
value: number;
|
|
5
|
-
simplify:
|
|
6
|
-
size:
|
|
7
|
-
inexact:
|
|
8
|
-
maxError:
|
|
9
|
-
answerType:
|
|
10
|
-
rightAlign:
|
|
6
|
+
simplify: PropsFor<typeof InputNumber.widget>["simplify"];
|
|
7
|
+
size: PropsFor<typeof InputNumber.widget>["size"];
|
|
8
|
+
inexact: PropsFor<typeof InputNumber.widget>["reviewModeRubric"]["inexact"];
|
|
9
|
+
maxError: PropsFor<typeof InputNumber.widget>["reviewModeRubric"]["maxError"];
|
|
10
|
+
answerType: PropsFor<typeof InputNumber.widget>["answerType"];
|
|
11
|
+
rightAlign: PropsFor<typeof InputNumber.widget>["rightAlign"];
|
|
11
12
|
onChange: (arg1: {
|
|
12
13
|
value?: ParsedValue | 0;
|
|
13
14
|
simplify?: Props["simplify"];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SizingUtils } from "@khanacademy/perseus";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import type { PerseusImageBackground, PerseusInteractiveGraphWidgetOptions, APIOptionsWithDefaults } from "@khanacademy/perseus";
|
|
4
|
+
import type { PropsFor } from "@khanacademy/wonder-blocks-core";
|
|
4
5
|
declare const InteractiveGraph: {
|
|
5
6
|
new (props: (PerseusInteractiveGraphWidgetOptions & {
|
|
6
7
|
widgetId: string;
|
|
@@ -69,7 +70,7 @@ declare const InteractiveGraph: {
|
|
|
69
70
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
70
71
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
71
72
|
isLastUsedWidget: boolean;
|
|
72
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
73
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
73
74
|
containerSizeClass: SizingUtils.SizeClass;
|
|
74
75
|
}) | Readonly<PerseusInteractiveGraphWidgetOptions & {
|
|
75
76
|
widgetId: string;
|
|
@@ -138,7 +139,7 @@ declare const InteractiveGraph: {
|
|
|
138
139
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
139
140
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
140
141
|
isLastUsedWidget: boolean;
|
|
141
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
142
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
142
143
|
containerSizeClass: SizingUtils.SizeClass;
|
|
143
144
|
}>): {
|
|
144
145
|
angle: any;
|
|
@@ -227,7 +228,7 @@ declare const InteractiveGraph: {
|
|
|
227
228
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
228
229
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
229
230
|
isLastUsedWidget: boolean;
|
|
230
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
231
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
231
232
|
containerSizeClass: SizingUtils.SizeClass;
|
|
232
233
|
}): void;
|
|
233
234
|
componentDidUpdate(prevProps: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -297,7 +298,7 @@ declare const InteractiveGraph: {
|
|
|
297
298
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
298
299
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
299
300
|
isLastUsedWidget: boolean;
|
|
300
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
301
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
301
302
|
containerSizeClass: SizingUtils.SizeClass;
|
|
302
303
|
}, prevState: any): void;
|
|
303
304
|
_getShouldShowInstructions: (arg1?: (PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -367,7 +368,7 @@ declare const InteractiveGraph: {
|
|
|
367
368
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
368
369
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
369
370
|
isLastUsedWidget: boolean;
|
|
370
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
371
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
371
372
|
containerSizeClass: SizingUtils.SizeClass;
|
|
372
373
|
}) | null | undefined) => boolean;
|
|
373
374
|
deprecatedProps: any;
|
|
@@ -445,7 +446,7 @@ declare const InteractiveGraph: {
|
|
|
445
446
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
446
447
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
447
448
|
isLastUsedWidget: boolean;
|
|
448
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
449
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
449
450
|
containerSizeClass: SizingUtils.SizeClass;
|
|
450
451
|
}) | null | undefined) => boolean;
|
|
451
452
|
areAngleGraphsEqual(prevGraph: import("../../../perseus/src/perseus-types").PerseusGraphTypeAngle, currentGraph: import("../../../perseus/src/perseus-types").PerseusGraphTypeAngle): boolean;
|
|
@@ -562,7 +563,7 @@ declare const InteractiveGraph: {
|
|
|
562
563
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
563
564
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
564
565
|
isLastUsedWidget: boolean;
|
|
565
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
566
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
566
567
|
containerSizeClass: SizingUtils.SizeClass;
|
|
567
568
|
}> & Readonly<{
|
|
568
569
|
children?: React.ReactNode;
|
|
@@ -637,7 +638,7 @@ declare const InteractiveGraph: {
|
|
|
637
638
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
638
639
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
639
640
|
isLastUsedWidget: boolean;
|
|
640
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
641
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
641
642
|
containerSizeClass: SizingUtils.SizeClass;
|
|
642
643
|
}>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
643
644
|
componentWillUnmount?(): void;
|
|
@@ -709,7 +710,7 @@ declare const InteractiveGraph: {
|
|
|
709
710
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
710
711
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
711
712
|
isLastUsedWidget: boolean;
|
|
712
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
713
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
713
714
|
containerSizeClass: SizingUtils.SizeClass;
|
|
714
715
|
}>, prevState: Readonly<any>): any;
|
|
715
716
|
componentWillMount?(): void;
|
|
@@ -780,7 +781,7 @@ declare const InteractiveGraph: {
|
|
|
780
781
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
781
782
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
782
783
|
isLastUsedWidget: boolean;
|
|
783
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
784
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
784
785
|
containerSizeClass: SizingUtils.SizeClass;
|
|
785
786
|
}>, nextContext: any): void;
|
|
786
787
|
componentWillUpdate?(nextProps: Readonly<PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -850,7 +851,7 @@ declare const InteractiveGraph: {
|
|
|
850
851
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
851
852
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
852
853
|
isLastUsedWidget: boolean;
|
|
853
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
854
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
854
855
|
containerSizeClass: SizingUtils.SizeClass;
|
|
855
856
|
}>, nextState: Readonly<any>, nextContext: any): void;
|
|
856
857
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -920,7 +921,7 @@ declare const InteractiveGraph: {
|
|
|
920
921
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
921
922
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
922
923
|
isLastUsedWidget: boolean;
|
|
923
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
924
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
924
925
|
containerSizeClass: SizingUtils.SizeClass;
|
|
925
926
|
}>, nextState: Readonly<any>, nextContext: any): void;
|
|
926
927
|
};
|
|
@@ -991,7 +992,7 @@ declare const InteractiveGraph: {
|
|
|
991
992
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
992
993
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
993
994
|
isLastUsedWidget: boolean;
|
|
994
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
995
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
995
996
|
containerSizeClass: SizingUtils.SizeClass;
|
|
996
997
|
}, context: any): {
|
|
997
998
|
angle: any;
|
|
@@ -1080,7 +1081,7 @@ declare const InteractiveGraph: {
|
|
|
1080
1081
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1081
1082
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1082
1083
|
isLastUsedWidget: boolean;
|
|
1083
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1084
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1084
1085
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1085
1086
|
}): void;
|
|
1086
1087
|
componentDidUpdate(prevProps: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -1150,7 +1151,7 @@ declare const InteractiveGraph: {
|
|
|
1150
1151
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1151
1152
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1152
1153
|
isLastUsedWidget: boolean;
|
|
1153
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1154
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1154
1155
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1155
1156
|
}, prevState: any): void;
|
|
1156
1157
|
_getShouldShowInstructions: (arg1?: (PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -1220,7 +1221,7 @@ declare const InteractiveGraph: {
|
|
|
1220
1221
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1221
1222
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1222
1223
|
isLastUsedWidget: boolean;
|
|
1223
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1224
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1224
1225
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1225
1226
|
}) | null | undefined) => boolean;
|
|
1226
1227
|
deprecatedProps: any;
|
|
@@ -1298,7 +1299,7 @@ declare const InteractiveGraph: {
|
|
|
1298
1299
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1299
1300
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1300
1301
|
isLastUsedWidget: boolean;
|
|
1301
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1302
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1302
1303
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1303
1304
|
}) | null | undefined) => boolean;
|
|
1304
1305
|
areAngleGraphsEqual(prevGraph: import("../../../perseus/src/perseus-types").PerseusGraphTypeAngle, currentGraph: import("../../../perseus/src/perseus-types").PerseusGraphTypeAngle): boolean;
|
|
@@ -1415,7 +1416,7 @@ declare const InteractiveGraph: {
|
|
|
1415
1416
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1416
1417
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1417
1418
|
isLastUsedWidget: boolean;
|
|
1418
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1419
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1419
1420
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1420
1421
|
}> & Readonly<{
|
|
1421
1422
|
children?: React.ReactNode;
|
|
@@ -1490,7 +1491,7 @@ declare const InteractiveGraph: {
|
|
|
1490
1491
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1491
1492
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1492
1493
|
isLastUsedWidget: boolean;
|
|
1493
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1494
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1494
1495
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1495
1496
|
}>, nextState: Readonly<any>, nextContext: any): boolean;
|
|
1496
1497
|
componentWillUnmount?(): void;
|
|
@@ -1562,7 +1563,7 @@ declare const InteractiveGraph: {
|
|
|
1562
1563
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1563
1564
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1564
1565
|
isLastUsedWidget: boolean;
|
|
1565
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1566
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1566
1567
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1567
1568
|
}>, prevState: Readonly<any>): any;
|
|
1568
1569
|
componentWillMount?(): void;
|
|
@@ -1633,7 +1634,7 @@ declare const InteractiveGraph: {
|
|
|
1633
1634
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1634
1635
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1635
1636
|
isLastUsedWidget: boolean;
|
|
1636
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1637
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1637
1638
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1638
1639
|
}>, nextContext: any): void;
|
|
1639
1640
|
componentWillUpdate?(nextProps: Readonly<PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -1703,7 +1704,7 @@ declare const InteractiveGraph: {
|
|
|
1703
1704
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1704
1705
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1705
1706
|
isLastUsedWidget: boolean;
|
|
1706
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1707
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1707
1708
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1708
1709
|
}>, nextState: Readonly<any>, nextContext: any): void;
|
|
1709
1710
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -1773,7 +1774,7 @@ declare const InteractiveGraph: {
|
|
|
1773
1774
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1774
1775
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1775
1776
|
isLastUsedWidget: boolean;
|
|
1776
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1777
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1777
1778
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1778
1779
|
}>, nextState: Readonly<any>, nextContext: any): void;
|
|
1779
1780
|
};
|
|
@@ -1859,7 +1860,7 @@ declare const InteractiveGraph: {
|
|
|
1859
1860
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1860
1861
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1861
1862
|
isLastUsedWidget: boolean;
|
|
1862
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1863
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1863
1864
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1864
1865
|
}): readonly import("@khanacademy/perseus").Coord[];
|
|
1865
1866
|
getPointCoords(graph: import("../../../perseus/src/perseus-types").PerseusGraphTypePoint, props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -1929,7 +1930,7 @@ declare const InteractiveGraph: {
|
|
|
1929
1930
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
1930
1931
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
1931
1932
|
isLastUsedWidget: boolean;
|
|
1932
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
1933
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
1933
1934
|
containerSizeClass: SizingUtils.SizeClass;
|
|
1934
1935
|
}): readonly import("@khanacademy/perseus").Coord[];
|
|
1935
1936
|
getLinearSystemCoords(graph: import("../../../perseus/src/perseus-types").PerseusGraphType, props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -1999,7 +2000,7 @@ declare const InteractiveGraph: {
|
|
|
1999
2000
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2000
2001
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2001
2002
|
isLastUsedWidget: boolean;
|
|
2002
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2003
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2003
2004
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2004
2005
|
}): readonly (readonly import("@khanacademy/perseus").Coord[])[];
|
|
2005
2006
|
getPolygonCoords(graph: import("../../../perseus/src/perseus-types").PerseusGraphType, props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2069,7 +2070,7 @@ declare const InteractiveGraph: {
|
|
|
2069
2070
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2070
2071
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2071
2072
|
isLastUsedWidget: boolean;
|
|
2072
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2073
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2073
2074
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2074
2075
|
}): readonly import("@khanacademy/perseus").Coord[];
|
|
2075
2076
|
getSegmentCoords(graph: import("../../../perseus/src/perseus-types").PerseusGraphTypeSegment, props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2139,7 +2140,7 @@ declare const InteractiveGraph: {
|
|
|
2139
2140
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2140
2141
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2141
2142
|
isLastUsedWidget: boolean;
|
|
2142
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2143
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2143
2144
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2144
2145
|
}): readonly (readonly import("@khanacademy/perseus").Coord[])[];
|
|
2145
2146
|
getAngleCoords(graph: import("../../../perseus/src/perseus-types").PerseusGraphTypeAngle, props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2209,7 +2210,7 @@ declare const InteractiveGraph: {
|
|
|
2209
2210
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2210
2211
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2211
2212
|
isLastUsedWidget: boolean;
|
|
2212
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2213
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2213
2214
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2214
2215
|
}): readonly import("@khanacademy/perseus").Coord[];
|
|
2215
2216
|
normalizeCoords(coordsList: readonly import("@khanacademy/perseus").Coord[], ranges: [import("../../../perseus/src/util/geometry").Range, import("../../../perseus/src/util/geometry").Range]): readonly import("@khanacademy/perseus").Coord[];
|
|
@@ -2280,7 +2281,7 @@ declare const InteractiveGraph: {
|
|
|
2280
2281
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2281
2282
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2282
2283
|
isLastUsedWidget: boolean;
|
|
2283
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2284
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2284
2285
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2285
2286
|
}): string;
|
|
2286
2287
|
pointsFromNormalized(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2350,7 +2351,7 @@ declare const InteractiveGraph: {
|
|
|
2350
2351
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2351
2352
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2352
2353
|
isLastUsedWidget: boolean;
|
|
2353
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2354
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2354
2355
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2355
2356
|
}, coordsList: readonly import("@khanacademy/perseus").Coord[], noSnap?: boolean | undefined): readonly import("@khanacademy/perseus").Coord[];
|
|
2356
2357
|
getLinearEquationString(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2420,7 +2421,7 @@ declare const InteractiveGraph: {
|
|
|
2420
2421
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2421
2422
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2422
2423
|
isLastUsedWidget: boolean;
|
|
2423
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2424
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2424
2425
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2425
2426
|
}): string;
|
|
2426
2427
|
getCurrentQuadraticCoefficients(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2490,7 +2491,7 @@ declare const InteractiveGraph: {
|
|
|
2490
2491
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2491
2492
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2492
2493
|
isLastUsedWidget: boolean;
|
|
2493
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2494
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2494
2495
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2495
2496
|
}): import("../../../perseus/src/util/geometry").QuadraticCoefficient;
|
|
2496
2497
|
defaultQuadraticCoords(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2560,7 +2561,7 @@ declare const InteractiveGraph: {
|
|
|
2560
2561
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2561
2562
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2562
2563
|
isLastUsedWidget: boolean;
|
|
2563
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2564
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2564
2565
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2565
2566
|
}): readonly import("@khanacademy/perseus").Coord[];
|
|
2566
2567
|
getQuadraticEquationString(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2630,7 +2631,7 @@ declare const InteractiveGraph: {
|
|
|
2630
2631
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2631
2632
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2632
2633
|
isLastUsedWidget: boolean;
|
|
2633
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2634
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2634
2635
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2635
2636
|
}): string;
|
|
2636
2637
|
getCurrentSinusoidCoefficients(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2700,7 +2701,7 @@ declare const InteractiveGraph: {
|
|
|
2700
2701
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2701
2702
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2702
2703
|
isLastUsedWidget: boolean;
|
|
2703
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2704
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2704
2705
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2705
2706
|
}): import("../../../perseus/src/util/geometry").SineCoefficient;
|
|
2706
2707
|
defaultSinusoidCoords(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2770,7 +2771,7 @@ declare const InteractiveGraph: {
|
|
|
2770
2771
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2771
2772
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2772
2773
|
isLastUsedWidget: boolean;
|
|
2773
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2774
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2774
2775
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2775
2776
|
}): readonly import("@khanacademy/perseus").Coord[];
|
|
2776
2777
|
getSinusoidEquationString(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2840,7 +2841,7 @@ declare const InteractiveGraph: {
|
|
|
2840
2841
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2841
2842
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2842
2843
|
isLastUsedWidget: boolean;
|
|
2843
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2844
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2844
2845
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2845
2846
|
}): string;
|
|
2846
2847
|
getCircleEquationString(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2910,7 +2911,7 @@ declare const InteractiveGraph: {
|
|
|
2910
2911
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2911
2912
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2912
2913
|
isLastUsedWidget: boolean;
|
|
2913
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2914
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2914
2915
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2915
2916
|
}): string;
|
|
2916
2917
|
getLinearSystemEquationString(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -2980,7 +2981,7 @@ declare const InteractiveGraph: {
|
|
|
2980
2981
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
2981
2982
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
2982
2983
|
isLastUsedWidget: boolean;
|
|
2983
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
2984
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
2984
2985
|
containerSizeClass: SizingUtils.SizeClass;
|
|
2985
2986
|
}): string;
|
|
2986
2987
|
getPointEquationString(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -3050,7 +3051,7 @@ declare const InteractiveGraph: {
|
|
|
3050
3051
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
3051
3052
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
3052
3053
|
isLastUsedWidget: boolean;
|
|
3053
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
3054
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
3054
3055
|
containerSizeClass: SizingUtils.SizeClass;
|
|
3055
3056
|
}): string;
|
|
3056
3057
|
getSegmentEquationString(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -3120,7 +3121,7 @@ declare const InteractiveGraph: {
|
|
|
3120
3121
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
3121
3122
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
3122
3123
|
isLastUsedWidget: boolean;
|
|
3123
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
3124
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
3124
3125
|
containerSizeClass: SizingUtils.SizeClass;
|
|
3125
3126
|
}): string;
|
|
3126
3127
|
getRayEquationString(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -3190,7 +3191,7 @@ declare const InteractiveGraph: {
|
|
|
3190
3191
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
3191
3192
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
3192
3193
|
isLastUsedWidget: boolean;
|
|
3193
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
3194
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
3194
3195
|
containerSizeClass: SizingUtils.SizeClass;
|
|
3195
3196
|
}): string;
|
|
3196
3197
|
getPolygonEquationString(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -3260,7 +3261,7 @@ declare const InteractiveGraph: {
|
|
|
3260
3261
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
3261
3262
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
3262
3263
|
isLastUsedWidget: boolean;
|
|
3263
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
3264
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
3264
3265
|
containerSizeClass: SizingUtils.SizeClass;
|
|
3265
3266
|
}): string;
|
|
3266
3267
|
getAngleEquationString(props: PerseusInteractiveGraphWidgetOptions & {
|
|
@@ -3330,7 +3331,7 @@ declare const InteractiveGraph: {
|
|
|
3330
3331
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
3331
3332
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
3332
3333
|
isLastUsedWidget: boolean;
|
|
3333
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
3334
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
3334
3335
|
containerSizeClass: SizingUtils.SizeClass;
|
|
3335
3336
|
}): string;
|
|
3336
3337
|
validate(state: import("../../../perseus/src/perseus-types").PerseusGraphType, rubric: PerseusInteractiveGraphWidgetOptions, component: any): import("@khanacademy/perseus").PerseusScore;
|
|
@@ -3401,12 +3402,12 @@ declare const InteractiveGraph: {
|
|
|
3401
3402
|
onChange: import("@khanacademy/perseus").ChangeHandler;
|
|
3402
3403
|
trackInteraction: (extraData?: {} | undefined) => void;
|
|
3403
3404
|
isLastUsedWidget: boolean;
|
|
3404
|
-
linterContext: import("@khanacademy/perseus").LinterContextProps;
|
|
3405
|
+
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
3405
3406
|
containerSizeClass: SizingUtils.SizeClass;
|
|
3406
3407
|
}): import("../../../perseus/src/perseus-types").PerseusGraphType;
|
|
3407
3408
|
contextType?: React.Context<any> | undefined;
|
|
3408
3409
|
};
|
|
3409
|
-
type InteractiveGraphProps =
|
|
3410
|
+
type InteractiveGraphProps = PropsFor<typeof InteractiveGraph>;
|
|
3410
3411
|
type Range = [number, number];
|
|
3411
3412
|
type Props = {
|
|
3412
3413
|
apiOptions: APIOptionsWithDefaults;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Perseus editors",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "2.6.
|
|
6
|
+
"version": "2.6.4",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@khanacademy/kas": "^0.3.1",
|
|
25
25
|
"@khanacademy/kmath": "^0.1.2",
|
|
26
|
-
"@khanacademy/perseus": "^
|
|
26
|
+
"@khanacademy/perseus": "^10.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@khanacademy/wonder-blocks-button": "^4.1.3",
|
|
@@ -4,12 +4,11 @@ import Color from "@khanacademy/wonder-blocks-color";
|
|
|
4
4
|
import {StyleSheet} from "aphrodite";
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
|
|
7
|
+
import type {PropsFor} from "@khanacademy/wonder-blocks-core";
|
|
8
|
+
|
|
7
9
|
const {InlineIcon} = components;
|
|
8
10
|
|
|
9
|
-
type InlineIconProps =
|
|
10
|
-
typeof InlineIcon,
|
|
11
|
-
React.ComponentProps<typeof InlineIcon>
|
|
12
|
-
>;
|
|
11
|
+
type InlineIconProps = PropsFor<typeof InlineIcon>;
|
|
13
12
|
|
|
14
13
|
type SectionControlButtonProps = {
|
|
15
14
|
icon: InlineIconProps;
|
|
@@ -7,6 +7,7 @@ import _ from "underscore";
|
|
|
7
7
|
import BlurInput from "../components/blur-input";
|
|
8
8
|
|
|
9
9
|
import type {ParsedValue, InputNumber} from "@khanacademy/perseus";
|
|
10
|
+
import type {PropsFor} from "@khanacademy/wonder-blocks-core";
|
|
10
11
|
|
|
11
12
|
const {InfoTip} = components;
|
|
12
13
|
|
|
@@ -47,30 +48,14 @@ const answerTypes = {
|
|
|
47
48
|
|
|
48
49
|
type Props = {
|
|
49
50
|
value: number;
|
|
50
|
-
simplify:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
typeof InputNumber.widget,
|
|
56
|
-
React.ComponentProps<typeof InputNumber.widget>
|
|
57
|
-
>["size"];
|
|
58
|
-
inexact: JSX.LibraryManagedAttributes<
|
|
59
|
-
typeof InputNumber.widget,
|
|
60
|
-
React.ComponentProps<typeof InputNumber.widget>
|
|
61
|
-
>["reviewModeRubric"]["inexact"];
|
|
62
|
-
maxError: JSX.LibraryManagedAttributes<
|
|
63
|
-
typeof InputNumber.widget,
|
|
64
|
-
React.ComponentProps<typeof InputNumber.widget>
|
|
51
|
+
simplify: PropsFor<typeof InputNumber.widget>["simplify"];
|
|
52
|
+
size: PropsFor<typeof InputNumber.widget>["size"];
|
|
53
|
+
inexact: PropsFor<typeof InputNumber.widget>["reviewModeRubric"]["inexact"];
|
|
54
|
+
maxError: PropsFor<
|
|
55
|
+
typeof InputNumber.widget
|
|
65
56
|
>["reviewModeRubric"]["maxError"];
|
|
66
|
-
answerType:
|
|
67
|
-
|
|
68
|
-
React.ComponentProps<typeof InputNumber.widget>
|
|
69
|
-
>["answerType"];
|
|
70
|
-
rightAlign: JSX.LibraryManagedAttributes<
|
|
71
|
-
typeof InputNumber.widget,
|
|
72
|
-
React.ComponentProps<typeof InputNumber.widget>
|
|
73
|
-
>["rightAlign"];
|
|
57
|
+
answerType: PropsFor<typeof InputNumber.widget>["answerType"];
|
|
58
|
+
rightAlign: PropsFor<typeof InputNumber.widget>["rightAlign"];
|
|
74
59
|
onChange: (arg1: {
|
|
75
60
|
value?: ParsedValue | 0;
|
|
76
61
|
simplify?: Props["simplify"];
|
|
@@ -24,17 +24,14 @@ import type {
|
|
|
24
24
|
PerseusInteractiveGraphWidgetOptions,
|
|
25
25
|
APIOptionsWithDefaults,
|
|
26
26
|
} from "@khanacademy/perseus";
|
|
27
|
-
import type {StyleType} from "@khanacademy/wonder-blocks-core";
|
|
27
|
+
import type {PropsFor, StyleType} from "@khanacademy/wonder-blocks-core";
|
|
28
28
|
|
|
29
29
|
const {InfoTip} = components;
|
|
30
30
|
const {containerSizeClass, getInteractiveBoxFromSizeClass} = SizingUtils;
|
|
31
31
|
const DeprecationMixin = Util.DeprecationMixin;
|
|
32
32
|
const InteractiveGraph = InteractiveGraphWidget.widget;
|
|
33
33
|
|
|
34
|
-
type InteractiveGraphProps =
|
|
35
|
-
typeof InteractiveGraph,
|
|
36
|
-
React.ComponentProps<typeof InteractiveGraph>
|
|
37
|
-
>;
|
|
34
|
+
type InteractiveGraphProps = PropsFor<typeof InteractiveGraph>;
|
|
38
35
|
|
|
39
36
|
const defaultBackgroundImage = {
|
|
40
37
|
url: null,
|