@khanacademy/perseus-editor 32.0.5 → 32.2.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/components/coordinate-pair-input.d.ts +1 -0
- package/dist/es/index.css +2 -2
- package/dist/es/index.css.map +1 -1
- package/dist/es/index.js +72 -70
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.js +71 -69
- package/dist/index.js.map +1 -1
- package/dist/testing/feature-flags-util.d.ts +4 -2
- package/dist/widgets/image-editor/components/image-settings.d.ts +1 -1
- package/dist/widgets/interactive-graph-editor/interactive-graph-editor.d.ts +25 -24
- package/dist/widgets/interactive-graph-editor/start-coords/coord-input.d.ts +2 -0
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-absolute-value.d.ts +5 -3
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-angle.d.ts +5 -3
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-circle.d.ts +5 -3
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-exponential.d.ts +5 -3
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-line.d.ts +5 -3
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-logarithm.d.ts +5 -3
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-multiline.d.ts +5 -3
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-point.d.ts +2 -0
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-quadratic.d.ts +5 -3
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-settings.d.ts +4 -2
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-sinusoid.d.ts +5 -3
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-tangent.d.ts +5 -3
- package/dist/widgets/interactive-graph-editor/start-coords/start-coords-vector.d.ts +8 -0
- package/dist/widgets/interactive-graph-editor/utils/reshape-point-labels.d.ts +5 -0
- package/package.json +43 -43
- package/dist/widgets/image-editor/components/image-dimensions-input.d.ts +0 -9
|
@@ -2,7 +2,8 @@ declare const DEFAULT_FEATURE_FLAGS: {
|
|
|
2
2
|
"perseus-test-flag-1": boolean;
|
|
3
3
|
"perseus-test-flag-2": boolean;
|
|
4
4
|
"image-widget-upgrade-gif-controls": boolean;
|
|
5
|
-
"
|
|
5
|
+
"interactive-graph-vector": boolean;
|
|
6
|
+
"interactive-graph-not-scored": boolean;
|
|
6
7
|
"input-number-to-numeric-input": boolean;
|
|
7
8
|
};
|
|
8
9
|
/** Utility to get feature flags with optional overrides for testing.
|
|
@@ -13,7 +14,8 @@ export declare function getFeatureFlags(overrides?: Partial<typeof DEFAULT_FEATU
|
|
|
13
14
|
"perseus-test-flag-1": boolean;
|
|
14
15
|
"perseus-test-flag-2": boolean;
|
|
15
16
|
"image-widget-upgrade-gif-controls": boolean;
|
|
16
|
-
"
|
|
17
|
+
"interactive-graph-vector": boolean;
|
|
18
|
+
"interactive-graph-not-scored": boolean;
|
|
17
19
|
"input-number-to-numeric-input": boolean;
|
|
18
20
|
};
|
|
19
21
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Props } from "../image-editor";
|
|
3
|
-
export default function ImageSettings({ alt, backgroundImage, scale,
|
|
3
|
+
export default function ImageSettings({ alt, backgroundImage, scale, caption, decorative, longDescription, title, onChange, }: Props): React.JSX.Element | null;
|
|
@@ -68,7 +68,7 @@ declare const InteractiveGraph: {
|
|
|
68
68
|
hintProgressColor?: string;
|
|
69
69
|
canScrollPage?: boolean;
|
|
70
70
|
editorChangeDelay?: number;
|
|
71
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
71
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
72
72
|
}> & {
|
|
73
73
|
baseElements: NonNullable<Readonly<{
|
|
74
74
|
isArticle?: boolean;
|
|
@@ -102,7 +102,7 @@ declare const InteractiveGraph: {
|
|
|
102
102
|
hintProgressColor?: string;
|
|
103
103
|
canScrollPage?: boolean;
|
|
104
104
|
editorChangeDelay?: number;
|
|
105
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
105
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
106
106
|
}>["baseElements"]>;
|
|
107
107
|
canScrollPage: NonNullable<Readonly<{
|
|
108
108
|
isArticle?: boolean;
|
|
@@ -136,7 +136,7 @@ declare const InteractiveGraph: {
|
|
|
136
136
|
hintProgressColor?: string;
|
|
137
137
|
canScrollPage?: boolean;
|
|
138
138
|
editorChangeDelay?: number;
|
|
139
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
139
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
140
140
|
}>["canScrollPage"]>;
|
|
141
141
|
editorChangeDelay: NonNullable<Readonly<{
|
|
142
142
|
isArticle?: boolean;
|
|
@@ -170,7 +170,7 @@ declare const InteractiveGraph: {
|
|
|
170
170
|
hintProgressColor?: string;
|
|
171
171
|
canScrollPage?: boolean;
|
|
172
172
|
editorChangeDelay?: number;
|
|
173
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
173
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
174
174
|
}>["editorChangeDelay"]>;
|
|
175
175
|
isArticle: NonNullable<Readonly<{
|
|
176
176
|
isArticle?: boolean;
|
|
@@ -204,7 +204,7 @@ declare const InteractiveGraph: {
|
|
|
204
204
|
hintProgressColor?: string;
|
|
205
205
|
canScrollPage?: boolean;
|
|
206
206
|
editorChangeDelay?: number;
|
|
207
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
207
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
208
208
|
}>["isArticle"]>;
|
|
209
209
|
isMobile: NonNullable<Readonly<{
|
|
210
210
|
isArticle?: boolean;
|
|
@@ -238,7 +238,7 @@ declare const InteractiveGraph: {
|
|
|
238
238
|
hintProgressColor?: string;
|
|
239
239
|
canScrollPage?: boolean;
|
|
240
240
|
editorChangeDelay?: number;
|
|
241
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
241
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
242
242
|
}>["isMobile"]>;
|
|
243
243
|
isMobileApp: NonNullable<Readonly<{
|
|
244
244
|
isArticle?: boolean;
|
|
@@ -272,7 +272,7 @@ declare const InteractiveGraph: {
|
|
|
272
272
|
hintProgressColor?: string;
|
|
273
273
|
canScrollPage?: boolean;
|
|
274
274
|
editorChangeDelay?: number;
|
|
275
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
275
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
276
276
|
}>["isMobileApp"]>;
|
|
277
277
|
editingDisabled: NonNullable<Readonly<{
|
|
278
278
|
isArticle?: boolean;
|
|
@@ -306,7 +306,7 @@ declare const InteractiveGraph: {
|
|
|
306
306
|
hintProgressColor?: string;
|
|
307
307
|
canScrollPage?: boolean;
|
|
308
308
|
editorChangeDelay?: number;
|
|
309
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
309
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
310
310
|
}>["editingDisabled"]>;
|
|
311
311
|
onFocusChange: NonNullable<Readonly<{
|
|
312
312
|
isArticle?: boolean;
|
|
@@ -340,7 +340,7 @@ declare const InteractiveGraph: {
|
|
|
340
340
|
hintProgressColor?: string;
|
|
341
341
|
canScrollPage?: boolean;
|
|
342
342
|
editorChangeDelay?: number;
|
|
343
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
343
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
344
344
|
}>["onFocusChange"]>;
|
|
345
345
|
readOnly: NonNullable<Readonly<{
|
|
346
346
|
isArticle?: boolean;
|
|
@@ -374,7 +374,7 @@ declare const InteractiveGraph: {
|
|
|
374
374
|
hintProgressColor?: string;
|
|
375
375
|
canScrollPage?: boolean;
|
|
376
376
|
editorChangeDelay?: number;
|
|
377
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
377
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
378
378
|
}>["readOnly"]>;
|
|
379
379
|
setDrawingAreaAvailable: NonNullable<Readonly<{
|
|
380
380
|
isArticle?: boolean;
|
|
@@ -408,7 +408,7 @@ declare const InteractiveGraph: {
|
|
|
408
408
|
hintProgressColor?: string;
|
|
409
409
|
canScrollPage?: boolean;
|
|
410
410
|
editorChangeDelay?: number;
|
|
411
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
411
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
412
412
|
}>["setDrawingAreaAvailable"]>;
|
|
413
413
|
showAlignmentOptions: NonNullable<Readonly<{
|
|
414
414
|
isArticle?: boolean;
|
|
@@ -442,7 +442,7 @@ declare const InteractiveGraph: {
|
|
|
442
442
|
hintProgressColor?: string;
|
|
443
443
|
canScrollPage?: boolean;
|
|
444
444
|
editorChangeDelay?: number;
|
|
445
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
445
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
446
446
|
}>["showAlignmentOptions"]>;
|
|
447
447
|
}>;
|
|
448
448
|
keypadElement?: any;
|
|
@@ -541,7 +541,7 @@ declare const InteractiveGraph: {
|
|
|
541
541
|
hintProgressColor?: string;
|
|
542
542
|
canScrollPage?: boolean;
|
|
543
543
|
editorChangeDelay?: number;
|
|
544
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
544
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
545
545
|
}> & {
|
|
546
546
|
baseElements: NonNullable<Readonly<{
|
|
547
547
|
isArticle?: boolean;
|
|
@@ -575,7 +575,7 @@ declare const InteractiveGraph: {
|
|
|
575
575
|
hintProgressColor?: string;
|
|
576
576
|
canScrollPage?: boolean;
|
|
577
577
|
editorChangeDelay?: number;
|
|
578
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
578
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
579
579
|
}>["baseElements"]>;
|
|
580
580
|
canScrollPage: NonNullable<Readonly<{
|
|
581
581
|
isArticle?: boolean;
|
|
@@ -609,7 +609,7 @@ declare const InteractiveGraph: {
|
|
|
609
609
|
hintProgressColor?: string;
|
|
610
610
|
canScrollPage?: boolean;
|
|
611
611
|
editorChangeDelay?: number;
|
|
612
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
612
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
613
613
|
}>["canScrollPage"]>;
|
|
614
614
|
editorChangeDelay: NonNullable<Readonly<{
|
|
615
615
|
isArticle?: boolean;
|
|
@@ -643,7 +643,7 @@ declare const InteractiveGraph: {
|
|
|
643
643
|
hintProgressColor?: string;
|
|
644
644
|
canScrollPage?: boolean;
|
|
645
645
|
editorChangeDelay?: number;
|
|
646
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
646
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
647
647
|
}>["editorChangeDelay"]>;
|
|
648
648
|
isArticle: NonNullable<Readonly<{
|
|
649
649
|
isArticle?: boolean;
|
|
@@ -677,7 +677,7 @@ declare const InteractiveGraph: {
|
|
|
677
677
|
hintProgressColor?: string;
|
|
678
678
|
canScrollPage?: boolean;
|
|
679
679
|
editorChangeDelay?: number;
|
|
680
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
680
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
681
681
|
}>["isArticle"]>;
|
|
682
682
|
isMobile: NonNullable<Readonly<{
|
|
683
683
|
isArticle?: boolean;
|
|
@@ -711,7 +711,7 @@ declare const InteractiveGraph: {
|
|
|
711
711
|
hintProgressColor?: string;
|
|
712
712
|
canScrollPage?: boolean;
|
|
713
713
|
editorChangeDelay?: number;
|
|
714
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
714
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
715
715
|
}>["isMobile"]>;
|
|
716
716
|
isMobileApp: NonNullable<Readonly<{
|
|
717
717
|
isArticle?: boolean;
|
|
@@ -745,7 +745,7 @@ declare const InteractiveGraph: {
|
|
|
745
745
|
hintProgressColor?: string;
|
|
746
746
|
canScrollPage?: boolean;
|
|
747
747
|
editorChangeDelay?: number;
|
|
748
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
748
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
749
749
|
}>["isMobileApp"]>;
|
|
750
750
|
editingDisabled: NonNullable<Readonly<{
|
|
751
751
|
isArticle?: boolean;
|
|
@@ -779,7 +779,7 @@ declare const InteractiveGraph: {
|
|
|
779
779
|
hintProgressColor?: string;
|
|
780
780
|
canScrollPage?: boolean;
|
|
781
781
|
editorChangeDelay?: number;
|
|
782
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
782
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
783
783
|
}>["editingDisabled"]>;
|
|
784
784
|
onFocusChange: NonNullable<Readonly<{
|
|
785
785
|
isArticle?: boolean;
|
|
@@ -813,7 +813,7 @@ declare const InteractiveGraph: {
|
|
|
813
813
|
hintProgressColor?: string;
|
|
814
814
|
canScrollPage?: boolean;
|
|
815
815
|
editorChangeDelay?: number;
|
|
816
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
816
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
817
817
|
}>["onFocusChange"]>;
|
|
818
818
|
readOnly: NonNullable<Readonly<{
|
|
819
819
|
isArticle?: boolean;
|
|
@@ -847,7 +847,7 @@ declare const InteractiveGraph: {
|
|
|
847
847
|
hintProgressColor?: string;
|
|
848
848
|
canScrollPage?: boolean;
|
|
849
849
|
editorChangeDelay?: number;
|
|
850
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
850
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
851
851
|
}>["readOnly"]>;
|
|
852
852
|
setDrawingAreaAvailable: NonNullable<Readonly<{
|
|
853
853
|
isArticle?: boolean;
|
|
@@ -881,7 +881,7 @@ declare const InteractiveGraph: {
|
|
|
881
881
|
hintProgressColor?: string;
|
|
882
882
|
canScrollPage?: boolean;
|
|
883
883
|
editorChangeDelay?: number;
|
|
884
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
884
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
885
885
|
}>["setDrawingAreaAvailable"]>;
|
|
886
886
|
showAlignmentOptions: NonNullable<Readonly<{
|
|
887
887
|
isArticle?: boolean;
|
|
@@ -915,7 +915,7 @@ declare const InteractiveGraph: {
|
|
|
915
915
|
hintProgressColor?: string;
|
|
916
916
|
canScrollPage?: boolean;
|
|
917
917
|
editorChangeDelay?: number;
|
|
918
|
-
flags?: Record<"image-widget-upgrade-gif-controls" | "
|
|
918
|
+
flags?: Record<"image-widget-upgrade-gif-controls" | "input-number-to-numeric-input", boolean>;
|
|
919
919
|
}>["showAlignmentOptions"]>;
|
|
920
920
|
}>;
|
|
921
921
|
keypadElement?: any;
|
|
@@ -1081,6 +1081,7 @@ declare class InteractiveGraphEditor extends React.Component<Props> {
|
|
|
1081
1081
|
valid: true | string;
|
|
1082
1082
|
};
|
|
1083
1083
|
changeStartCoords: (coords: any) => void;
|
|
1084
|
+
changePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
1084
1085
|
serialize(): PerseusInteractiveGraphWidgetOptions;
|
|
1085
1086
|
getSaveWarnings: () => any[];
|
|
1086
1087
|
render(): React.JSX.Element;
|
|
@@ -4,6 +4,8 @@ interface CoordInputProps {
|
|
|
4
4
|
label: string;
|
|
5
5
|
coord: Coord;
|
|
6
6
|
onChange: (coord: Coord) => void;
|
|
7
|
+
pointLabel?: string;
|
|
8
|
+
onPointLabelChange?: (newLabel: string) => void;
|
|
7
9
|
}
|
|
8
10
|
declare const CoordInput: (props: CoordInputProps) => React.JSX.Element;
|
|
9
11
|
export default CoordInput;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Coord } from "@khanacademy/perseus";
|
|
3
3
|
type AbsoluteValueCoords = [Coord, Coord];
|
|
4
|
-
|
|
4
|
+
interface StartCoordsAbsoluteValueProps {
|
|
5
5
|
startCoords: AbsoluteValueCoords;
|
|
6
6
|
onChange: (startCoords: AbsoluteValueCoords) => void;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
pointLabels: ReadonlyArray<string>;
|
|
8
|
+
onChangePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const StartCoordsAbsoluteValue: (props: StartCoordsAbsoluteValueProps) => React.JSX.Element;
|
|
9
11
|
export default StartCoordsAbsoluteValue;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Coord } from "@khanacademy/perseus";
|
|
3
3
|
type AngleCoords = [Coord, Coord, Coord];
|
|
4
|
-
|
|
4
|
+
interface StartCoordsAngleProps {
|
|
5
5
|
startCoords: AngleCoords;
|
|
6
6
|
allowReflexAngles?: boolean;
|
|
7
7
|
onChange: (startCoords: AngleCoords) => void;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
pointLabels: ReadonlyArray<string>;
|
|
9
|
+
onChangePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const StartCoordsAngle: (props: StartCoordsAngleProps) => React.JSX.Element;
|
|
10
12
|
export default StartCoordsAngle;
|
|
@@ -4,9 +4,11 @@ type CircleCoords = {
|
|
|
4
4
|
center: Coord;
|
|
5
5
|
radius: number;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
interface StartCoordsCircleProps {
|
|
8
8
|
startCoords: CircleCoords;
|
|
9
9
|
onChange: (startCoords: CircleCoords) => void;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
pointLabels: ReadonlyArray<string>;
|
|
11
|
+
onChangePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const StartCoordsCircle: (props: StartCoordsCircleProps) => React.JSX.Element;
|
|
12
14
|
export default StartCoordsCircle;
|
|
@@ -4,9 +4,11 @@ type ExponentialStartCoords = {
|
|
|
4
4
|
coords: [Coord, Coord];
|
|
5
5
|
asymptote: number;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
interface StartCoordsExponentialProps {
|
|
8
8
|
startCoords: ExponentialStartCoords;
|
|
9
9
|
onChange: (startCoords: ExponentialStartCoords) => void;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
pointLabels: ReadonlyArray<string>;
|
|
11
|
+
onChangePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const StartCoordsExponential: (props: StartCoordsExponentialProps) => React.JSX.Element;
|
|
12
14
|
export default StartCoordsExponential;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { CollinearTuple } from "@khanacademy/perseus-core";
|
|
3
|
-
|
|
3
|
+
interface StartCoordsLineProps {
|
|
4
4
|
startCoords: CollinearTuple;
|
|
5
5
|
onChange: (startCoords: CollinearTuple) => void;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
pointLabels: ReadonlyArray<string>;
|
|
7
|
+
onChangePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const StartCoordsLine: (props: StartCoordsLineProps) => React.JSX.Element;
|
|
8
10
|
export default StartCoordsLine;
|
|
@@ -4,9 +4,11 @@ type LogarithmStartCoords = {
|
|
|
4
4
|
coords: [Coord, Coord];
|
|
5
5
|
asymptote: number;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
interface StartCoordsLogarithmProps {
|
|
8
8
|
startCoords: LogarithmStartCoords;
|
|
9
9
|
onChange: (startCoords: LogarithmStartCoords) => void;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
pointLabels: ReadonlyArray<string>;
|
|
11
|
+
onChangePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const StartCoordsLogarithm: (props: StartCoordsLogarithmProps) => React.JSX.Element;
|
|
12
14
|
export default StartCoordsLogarithm;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { CollinearTuple } from "@khanacademy/perseus-core";
|
|
3
|
-
|
|
3
|
+
interface StartCoordsMultilineProps {
|
|
4
4
|
type: "linear-system" | "segment";
|
|
5
5
|
startCoords: CollinearTuple[];
|
|
6
6
|
onChange: (startCoords: CollinearTuple[]) => void;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
pointLabels: ReadonlyArray<string>;
|
|
8
|
+
onChangePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const StartCoordsMultiline: (props: StartCoordsMultilineProps) => React.JSX.Element;
|
|
9
11
|
export default StartCoordsMultiline;
|
|
@@ -3,6 +3,8 @@ import type { Coord } from "@khanacademy/perseus";
|
|
|
3
3
|
type Props = {
|
|
4
4
|
startCoords: Coord[];
|
|
5
5
|
onChange: (startCoords: Coord[]) => void;
|
|
6
|
+
pointLabels?: ReadonlyArray<string>;
|
|
7
|
+
onChangePointLabels?: (pointLabels: ReadonlyArray<string>) => void;
|
|
6
8
|
};
|
|
7
9
|
declare const StartCoordsPoint: (props: Props) => React.JSX.Element;
|
|
8
10
|
export default StartCoordsPoint;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Coord } from "@khanacademy/perseus";
|
|
3
|
-
|
|
3
|
+
interface StartCoordsQuadraticProps {
|
|
4
4
|
startCoords: [Coord, Coord, Coord];
|
|
5
5
|
onChange: (startCoords: [Coord, Coord, Coord]) => void;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
pointLabels: ReadonlyArray<string>;
|
|
7
|
+
onChangePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const StartCoordsQuadratic: (props: StartCoordsQuadraticProps) => React.JSX.Element;
|
|
8
10
|
export default StartCoordsQuadratic;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { StartCoords } from "./types";
|
|
3
3
|
import type { PerseusGraphType, Range } from "@khanacademy/perseus-core";
|
|
4
|
-
|
|
4
|
+
interface StartCoordsSettingsProps {
|
|
5
5
|
range: [x: Range, y: Range];
|
|
6
6
|
step: [x: number, y: number];
|
|
7
7
|
allowReflexAngles?: boolean;
|
|
8
8
|
onChange: (startCoords: StartCoords) => void;
|
|
9
|
-
|
|
9
|
+
onChangePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
10
|
+
}
|
|
11
|
+
type Props = PerseusGraphType & StartCoordsSettingsProps;
|
|
10
12
|
declare const StartCoordsSettings: (props: Props) => React.JSX.Element;
|
|
11
13
|
export default StartCoordsSettings;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Coord } from "@khanacademy/perseus";
|
|
3
3
|
type SinusoidCoords = [Coord, Coord];
|
|
4
|
-
|
|
4
|
+
interface StartCoordsSinusoidProps {
|
|
5
5
|
startCoords: SinusoidCoords;
|
|
6
6
|
onChange: (startCoords: SinusoidCoords) => void;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
pointLabels: ReadonlyArray<string>;
|
|
8
|
+
onChangePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const StartCoordsSinusoid: (props: StartCoordsSinusoidProps) => React.JSX.Element;
|
|
9
11
|
export default StartCoordsSinusoid;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Coord } from "@khanacademy/perseus";
|
|
3
3
|
type TangentCoords = [Coord, Coord];
|
|
4
|
-
|
|
4
|
+
interface StartCoordsTangentProps {
|
|
5
5
|
startCoords: TangentCoords;
|
|
6
6
|
onChange: (startCoords: TangentCoords) => void;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
pointLabels: ReadonlyArray<string>;
|
|
8
|
+
onChangePointLabels: (pointLabels: ReadonlyArray<string>) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const StartCoordsTangent: (props: StartCoordsTangentProps) => React.JSX.Element;
|
|
9
11
|
export default StartCoordsTangent;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { CollinearTuple } from "@khanacademy/perseus-core";
|
|
3
|
+
interface StartCoordsVectorProps {
|
|
4
|
+
startCoords: CollinearTuple;
|
|
5
|
+
onChange: (startCoords: CollinearTuple) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const StartCoordsVector: (props: StartCoordsVectorProps) => React.JSX.Element;
|
|
8
|
+
export default StartCoordsVector;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PerseusGraphType } from "@khanacademy/perseus-core";
|
|
2
|
+
export declare function reshapePointLabelsForGraphType(pointLabels: ReadonlyArray<string>, graph: PerseusGraphType | undefined, correct: PerseusGraphType | undefined): {
|
|
3
|
+
graph: PerseusGraphType;
|
|
4
|
+
correct: PerseusGraphType;
|
|
5
|
+
} | null;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Perseus editors",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "32.0
|
|
6
|
+
"version": "32.2.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -36,35 +36,35 @@
|
|
|
36
36
|
"mafs": "^0.19.0",
|
|
37
37
|
"tiny-invariant": "1.3.1",
|
|
38
38
|
"@khanacademy/kas": "2.2.3",
|
|
39
|
-
"@khanacademy/keypad-context": "3.2.
|
|
40
|
-
"@khanacademy/kmath": "2.4.
|
|
41
|
-
"@khanacademy/math-input": "26.4.
|
|
42
|
-
"@khanacademy/perseus": "77.
|
|
43
|
-
"@khanacademy/perseus-core": "27.0
|
|
44
|
-
"@khanacademy/perseus-linter": "5.0.
|
|
45
|
-
"@khanacademy/perseus-score": "8.
|
|
39
|
+
"@khanacademy/keypad-context": "3.2.59",
|
|
40
|
+
"@khanacademy/kmath": "2.4.17",
|
|
41
|
+
"@khanacademy/math-input": "26.4.31",
|
|
42
|
+
"@khanacademy/perseus": "77.10.0",
|
|
43
|
+
"@khanacademy/perseus-core": "27.2.0",
|
|
44
|
+
"@khanacademy/perseus-linter": "5.0.14",
|
|
45
|
+
"@khanacademy/perseus-score": "8.11.1",
|
|
46
46
|
"@khanacademy/perseus-utils": "2.1.5"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@khanacademy/mathjax-renderer": "3.0.0",
|
|
50
|
-
"@khanacademy/wonder-blocks-accordion": "3.1.
|
|
51
|
-
"@khanacademy/wonder-blocks-banner": "5.1.
|
|
52
|
-
"@khanacademy/wonder-blocks-button": "11.6.
|
|
53
|
-
"@khanacademy/wonder-blocks-clickable": "8.1
|
|
54
|
-
"@khanacademy/wonder-blocks-core": "12.4.
|
|
55
|
-
"@khanacademy/wonder-blocks-dropdown": "10.9.
|
|
56
|
-
"@khanacademy/wonder-blocks-form": "7.6.
|
|
57
|
-
"@khanacademy/wonder-blocks-icon": "5.3.
|
|
58
|
-
"@khanacademy/wonder-blocks-icon-button": "11.3.
|
|
59
|
-
"@khanacademy/wonder-blocks-labeled-field": "4.1.
|
|
60
|
-
"@khanacademy/wonder-blocks-layout": "3.1.
|
|
61
|
-
"@khanacademy/wonder-blocks-link": "10.
|
|
62
|
-
"@khanacademy/wonder-blocks-pill": "3.1.
|
|
63
|
-
"@khanacademy/wonder-blocks-switch": "3.4.
|
|
50
|
+
"@khanacademy/wonder-blocks-accordion": "3.1.61",
|
|
51
|
+
"@khanacademy/wonder-blocks-banner": "5.1.2",
|
|
52
|
+
"@khanacademy/wonder-blocks-button": "11.6.2",
|
|
53
|
+
"@khanacademy/wonder-blocks-clickable": "8.2.1",
|
|
54
|
+
"@khanacademy/wonder-blocks-core": "12.4.4",
|
|
55
|
+
"@khanacademy/wonder-blocks-dropdown": "10.9.2",
|
|
56
|
+
"@khanacademy/wonder-blocks-form": "7.6.2",
|
|
57
|
+
"@khanacademy/wonder-blocks-icon": "5.3.16",
|
|
58
|
+
"@khanacademy/wonder-blocks-icon-button": "11.3.2",
|
|
59
|
+
"@khanacademy/wonder-blocks-labeled-field": "4.1.2",
|
|
60
|
+
"@khanacademy/wonder-blocks-layout": "3.1.53",
|
|
61
|
+
"@khanacademy/wonder-blocks-link": "10.3.1",
|
|
62
|
+
"@khanacademy/wonder-blocks-pill": "3.1.65",
|
|
63
|
+
"@khanacademy/wonder-blocks-switch": "3.4.2",
|
|
64
64
|
"@khanacademy/wonder-blocks-timing": "7.1.0",
|
|
65
|
-
"@khanacademy/wonder-blocks-tokens": "16.
|
|
66
|
-
"@khanacademy/wonder-blocks-tooltip": "4.1.
|
|
67
|
-
"@khanacademy/wonder-blocks-typography": "4.3.
|
|
65
|
+
"@khanacademy/wonder-blocks-tokens": "16.6.0",
|
|
66
|
+
"@khanacademy/wonder-blocks-tooltip": "4.1.77",
|
|
67
|
+
"@khanacademy/wonder-blocks-typography": "4.3.6",
|
|
68
68
|
"@khanacademy/wonder-stuff-core": "3.0.0",
|
|
69
69
|
"@phosphor-icons/core": "2.0.2",
|
|
70
70
|
"aphrodite": "1.2.5",
|
|
@@ -79,24 +79,24 @@
|
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@khanacademy/mathjax-renderer": "^3.0.0",
|
|
82
|
-
"@khanacademy/wonder-blocks-accordion": "^3.1.
|
|
83
|
-
"@khanacademy/wonder-blocks-banner": "^5.1.
|
|
84
|
-
"@khanacademy/wonder-blocks-button": "^11.6.
|
|
85
|
-
"@khanacademy/wonder-blocks-clickable": "^8.1
|
|
86
|
-
"@khanacademy/wonder-blocks-core": "^12.4.
|
|
87
|
-
"@khanacademy/wonder-blocks-dropdown": "^10.9.
|
|
88
|
-
"@khanacademy/wonder-blocks-form": "^7.6.
|
|
89
|
-
"@khanacademy/wonder-blocks-icon": "^5.3.
|
|
90
|
-
"@khanacademy/wonder-blocks-icon-button": "^11.3.
|
|
91
|
-
"@khanacademy/wonder-blocks-labeled-field": "^4.1.
|
|
92
|
-
"@khanacademy/wonder-blocks-layout": "^3.1.
|
|
93
|
-
"@khanacademy/wonder-blocks-link": "^10.
|
|
94
|
-
"@khanacademy/wonder-blocks-pill": "^3.1.
|
|
95
|
-
"@khanacademy/wonder-blocks-switch": "^3.4.
|
|
82
|
+
"@khanacademy/wonder-blocks-accordion": "^3.1.61",
|
|
83
|
+
"@khanacademy/wonder-blocks-banner": "^5.1.2",
|
|
84
|
+
"@khanacademy/wonder-blocks-button": "^11.6.2",
|
|
85
|
+
"@khanacademy/wonder-blocks-clickable": "^8.2.1",
|
|
86
|
+
"@khanacademy/wonder-blocks-core": "^12.4.4",
|
|
87
|
+
"@khanacademy/wonder-blocks-dropdown": "^10.9.2",
|
|
88
|
+
"@khanacademy/wonder-blocks-form": "^7.6.2",
|
|
89
|
+
"@khanacademy/wonder-blocks-icon": "^5.3.16",
|
|
90
|
+
"@khanacademy/wonder-blocks-icon-button": "^11.3.2",
|
|
91
|
+
"@khanacademy/wonder-blocks-labeled-field": "^4.1.2",
|
|
92
|
+
"@khanacademy/wonder-blocks-layout": "^3.1.53",
|
|
93
|
+
"@khanacademy/wonder-blocks-link": "^10.3.1",
|
|
94
|
+
"@khanacademy/wonder-blocks-pill": "^3.1.65",
|
|
95
|
+
"@khanacademy/wonder-blocks-switch": "^3.4.2",
|
|
96
96
|
"@khanacademy/wonder-blocks-timing": "^7.1.0",
|
|
97
|
-
"@khanacademy/wonder-blocks-tokens": "^16.
|
|
98
|
-
"@khanacademy/wonder-blocks-tooltip": "^4.1.
|
|
99
|
-
"@khanacademy/wonder-blocks-typography": "^4.3.
|
|
97
|
+
"@khanacademy/wonder-blocks-tokens": "^16.6.0",
|
|
98
|
+
"@khanacademy/wonder-blocks-tooltip": "^4.1.77",
|
|
99
|
+
"@khanacademy/wonder-blocks-typography": "^4.3.6",
|
|
100
100
|
"@khanacademy/wonder-stuff-core": "^3.0.0",
|
|
101
101
|
"@phosphor-icons/core": "^2.0.2",
|
|
102
102
|
"aphrodite": "^1.2.5",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
},
|
|
110
110
|
"keywords": [],
|
|
111
111
|
"khan": {
|
|
112
|
-
"catalogHash": "
|
|
112
|
+
"catalogHash": "8d63a26474e3cbb4"
|
|
113
113
|
},
|
|
114
114
|
"scripts": {}
|
|
115
115
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import type { Props as ImageEditorProps } from "../image-editor";
|
|
3
|
-
import type { PerseusImageBackground } from "@khanacademy/perseus-core";
|
|
4
|
-
interface Props {
|
|
5
|
-
backgroundImage: PerseusImageBackground;
|
|
6
|
-
onChange: ImageEditorProps["onChange"];
|
|
7
|
-
}
|
|
8
|
-
export default function ImageDimensionsInput({ backgroundImage, onChange, }: Props): React.JSX.Element;
|
|
9
|
-
export {};
|