@khanacademy/perseus-editor 10.0.0 → 11.0.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/all-editors.d.ts +1 -2
- package/dist/components/interactive-graph-settings.d.ts +0 -17
- package/dist/components/start-coords-line.d.ts +8 -0
- package/dist/components/start-coords-multiline.d.ts +9 -0
- package/dist/components/start-coords-settings.d.ts +9 -0
- package/dist/components/util.d.ts +2 -1
- package/dist/components/widget-editor.d.ts +1 -1
- package/dist/es/index.js +418 -643
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +411 -639
- package/dist/index.js.map +1 -1
- package/dist/util/object-utils.d.ts +1 -0
- package/dist/widgets/interactive-graph-editor.d.ts +20 -40
- package/package.json +3 -3
- package/dist/components/start-coord-settings.d.ts +0 -9
- package/dist/widgets/unit-editor.d.ts +0 -33
package/dist/all-editors.d.ts
CHANGED
|
@@ -33,7 +33,6 @@ import RadioEditor from "./widgets/radio/editor";
|
|
|
33
33
|
import SimpleMarkdownTesterEditor from "./widgets/simple-markdown-tester-editor";
|
|
34
34
|
import SorterEditor from "./widgets/sorter-editor";
|
|
35
35
|
import TableEditor from "./widgets/table-editor";
|
|
36
|
-
import UnitEditor from "./widgets/unit-editor";
|
|
37
36
|
import VideoEditor from "./widgets/video-editor";
|
|
38
|
-
declare const _default: (typeof CategorizerEditor | typeof CSProgramEditor | typeof DefinitionEditor | typeof DeprecatedStandinEditor | typeof DropdownEditor | typeof ExampleGraphieWidgetEditor | typeof ExampleWidgetEditor | typeof ExplanationEditor | typeof ExpressionEditor | typeof GradedGroupEditor | typeof GradedGroupSetEditor | typeof GrapherEditor | typeof GroupEditor | typeof IframeEditor | typeof ImageEditor | typeof InputNumberEditor | typeof InteractionEditor | typeof InteractiveGraphEditor | typeof LabelImageEditor | typeof MatcherEditor | typeof MatrixEditor | typeof MeasurerEditor | typeof MoleculeEditor | typeof NumberLineEditor | typeof NumericInputEditor | typeof OrdererEditor | typeof PassageEditor | typeof PassageRefEditor | typeof PassageRefTargetEditor | typeof PlotterEditor | typeof PythonProgramEditor | typeof RadioEditor | typeof SimpleMarkdownTesterEditor | typeof SorterEditor | typeof TableEditor | typeof
|
|
37
|
+
declare const _default: (typeof CategorizerEditor | typeof CSProgramEditor | typeof DefinitionEditor | typeof DeprecatedStandinEditor | typeof DropdownEditor | typeof ExampleGraphieWidgetEditor | typeof ExampleWidgetEditor | typeof ExplanationEditor | typeof ExpressionEditor | typeof GradedGroupEditor | typeof GradedGroupSetEditor | typeof GrapherEditor | typeof GroupEditor | typeof IframeEditor | typeof ImageEditor | typeof InputNumberEditor | typeof InteractionEditor | typeof InteractiveGraphEditor | typeof LabelImageEditor | typeof MatcherEditor | typeof MatrixEditor | typeof MeasurerEditor | typeof MoleculeEditor | typeof NumberLineEditor | typeof NumericInputEditor | typeof OrdererEditor | typeof PassageEditor | typeof PassageRefEditor | typeof PassageRefTargetEditor | typeof PlotterEditor | typeof PythonProgramEditor | typeof RadioEditor | typeof SimpleMarkdownTesterEditor | typeof SorterEditor | typeof TableEditor | typeof VideoEditor)[];
|
|
39
38
|
export default _default;
|
|
@@ -47,22 +47,10 @@ type Props = {
|
|
|
47
47
|
* Whether to show the protractor on the graph.
|
|
48
48
|
*/
|
|
49
49
|
showProtractor: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Whether to show the ruler on the graph.
|
|
52
|
-
*/
|
|
53
|
-
showRuler: boolean;
|
|
54
50
|
/**
|
|
55
51
|
* Whether to show tooltips on the graph.
|
|
56
52
|
*/
|
|
57
53
|
showTooltips: boolean;
|
|
58
|
-
/**
|
|
59
|
-
* The label to display on the ruler, if any.
|
|
60
|
-
*/
|
|
61
|
-
rulerLabel: string;
|
|
62
|
-
/**
|
|
63
|
-
* The number of ticks to display on the ruler.
|
|
64
|
-
*/
|
|
65
|
-
rulerTicks: number;
|
|
66
54
|
onChange: (arg1: Partial<Props>) => void;
|
|
67
55
|
};
|
|
68
56
|
type State = {
|
|
@@ -111,17 +99,12 @@ declare class InteractiveGraphSettings extends React.Component<Props, State> {
|
|
|
111
99
|
};
|
|
112
100
|
markings: string;
|
|
113
101
|
showProtractor: boolean;
|
|
114
|
-
showRuler: boolean;
|
|
115
102
|
showTooltips: boolean;
|
|
116
|
-
rulerLabel: string;
|
|
117
|
-
rulerTicks: number;
|
|
118
103
|
};
|
|
119
104
|
componentDidMount(): void;
|
|
120
105
|
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
121
106
|
componentWillUnmount(): void;
|
|
122
107
|
change: (...args: any[]) => any;
|
|
123
|
-
changeRulerLabel: (e: any) => void;
|
|
124
|
-
changeRulerTicks: (e: any) => void;
|
|
125
108
|
changeBackgroundUrl: (e: any) => void;
|
|
126
109
|
renderLabelChoices: (choices: any) => any;
|
|
127
110
|
validRange: (range: any) => true | "Range must be a valid number" | "Range must have a higher number on the right";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { CollinearTuple, PerseusGraphType } from "@khanacademy/perseus";
|
|
3
|
+
type Props = {
|
|
4
|
+
startCoords: CollinearTuple;
|
|
5
|
+
onChange: (startCoords: PerseusGraphType["startCoords"]) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const StartCoordsLine: (props: Props) => React.JSX.Element;
|
|
8
|
+
export default StartCoordsLine;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { CollinearTuple, PerseusGraphType } from "@khanacademy/perseus";
|
|
3
|
+
type Props = {
|
|
4
|
+
type: "linear-system" | "segment";
|
|
5
|
+
startCoords: CollinearTuple[];
|
|
6
|
+
onChange: (startCoords: PerseusGraphType["startCoords"]) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const StartCoordsMultiline: (props: Props) => React.JSX.Element;
|
|
9
|
+
export default StartCoordsMultiline;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { PerseusGraphType, Range } from "@khanacademy/perseus";
|
|
3
|
+
type Props = PerseusGraphType & {
|
|
4
|
+
range: [x: Range, y: Range];
|
|
5
|
+
step: [x: number, y: number];
|
|
6
|
+
onChange: (startCoords: PerseusGraphType["startCoords"]) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const StartCoordsSettings: (props: Props) => React.JSX.Element;
|
|
9
|
+
export default StartCoordsSettings;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LockedFigure, LockedFigureType, LockedPointType, LockedLineType, LockedEllipseType, LockedVectorType, LockedPolygonType, LockedFunctionType } from "@khanacademy/perseus";
|
|
1
|
+
import type { Range, LockedFigure, LockedFigureType, LockedPointType, LockedLineType, LockedEllipseType, LockedVectorType, LockedPolygonType, LockedFunctionType, PerseusGraphType } from "@khanacademy/perseus";
|
|
2
2
|
export declare function focusWithChromeStickyFocusBugWorkaround(element: Element): void;
|
|
3
3
|
export declare function getDefaultFigureForType(type: "point"): LockedPointType;
|
|
4
4
|
export declare function getDefaultFigureForType(type: "line"): LockedLineType;
|
|
@@ -9,3 +9,4 @@ export declare function getDefaultFigureForType(type: "function"): LockedFunctio
|
|
|
9
9
|
export declare function getDefaultFigureForType(type: LockedFigureType): LockedFigure;
|
|
10
10
|
export declare function degreeToRadian(degrees: number): number;
|
|
11
11
|
export declare function radianToDegree(radians: number): number;
|
|
12
|
+
export declare function getDefaultGraphStartCoords(graph: PerseusGraphType, range: [x: Range, y: Range], step: [x: number, y: number]): PerseusGraphType["startCoords"];
|
|
@@ -21,7 +21,7 @@ declare class WidgetEditor extends React.Component<WidgetEditorProps, WidgetEdit
|
|
|
21
21
|
_handleAlignmentChange: (e: React.SyntheticEvent<HTMLSelectElement>) => void;
|
|
22
22
|
getSaveWarnings: () => any;
|
|
23
23
|
serialize: () => {
|
|
24
|
-
type: "categorizer" | "image" | "radio" | "table" | "cs-program" | "iframe" | "video" | "definition" | "group" | "dropdown" | "example-graphie-widget" | "example-widget" | "explanation" | "expression" | "graded-group-set" | "graded-group" | "grapher" | "input-number" | "interaction" | "interactive-graph" | "label-image" | "matcher" | "matrix" | "measurer" | "molecule-renderer" | "number-line" | "numeric-input" | "orderer" | "passage-ref" | "passage" | "plotter" | "python-program" | "passage-ref-target" | "simple-markdown-tester" | "sorter" | "
|
|
24
|
+
type: "categorizer" | "image" | "radio" | "table" | "cs-program" | "iframe" | "video" | "definition" | "group" | "dropdown" | "example-graphie-widget" | "example-widget" | "explanation" | "expression" | "graded-group-set" | "graded-group" | "grapher" | "input-number" | "interaction" | "interactive-graph" | "label-image" | "matcher" | "matrix" | "measurer" | "molecule-renderer" | "number-line" | "numeric-input" | "orderer" | "passage-ref" | "passage" | "plotter" | "python-program" | "passage-ref-target" | "simple-markdown-tester" | "sorter" | "deprecated-standin";
|
|
25
25
|
alignment: string | undefined;
|
|
26
26
|
static: boolean | undefined;
|
|
27
27
|
graded: boolean | undefined;
|