@khanacademy/perseus-editor 8.2.0 → 10.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/components/angle-input.d.ts +2 -2
- package/dist/components/coordinate-pair-input.d.ts +2 -2
- package/dist/components/graph-locked-figures/color-select.d.ts +2 -2
- package/dist/components/graph-locked-figures/color-swatch.d.ts +2 -2
- package/dist/components/graph-locked-figures/defining-point-settings.d.ts +2 -2
- package/dist/components/graph-locked-figures/ellipse-swatch.d.ts +2 -2
- package/dist/components/graph-locked-figures/labeled-row.d.ts +1 -1
- package/dist/components/graph-locked-figures/labeled-switch.d.ts +2 -2
- package/dist/components/graph-locked-figures/line-swatch.d.ts +2 -2
- package/dist/components/graph-locked-figures/locked-ellipse-settings.d.ts +2 -2
- package/dist/components/graph-locked-figures/locked-figure-select.d.ts +2 -2
- package/dist/components/graph-locked-figures/locked-figure-settings-actions.d.ts +2 -2
- package/dist/components/graph-locked-figures/locked-figure-settings.d.ts +2 -2
- package/dist/components/graph-locked-figures/locked-figures-section.d.ts +2 -2
- package/dist/components/graph-locked-figures/locked-line-settings.d.ts +2 -2
- package/dist/components/graph-locked-figures/locked-point-settings.d.ts +2 -2
- package/dist/components/graph-locked-figures/locked-polygon-settings.d.ts +2 -2
- package/dist/components/graph-locked-figures/locked-vector-settings.d.ts +2 -2
- package/dist/components/graph-locked-figures/polygon-swatch.d.ts +2 -2
- package/dist/components/graph-points-count-selector.d.ts +2 -2
- package/dist/components/graph-type-selector.d.ts +2 -2
- package/dist/components/heading.d.ts +2 -2
- package/dist/components/interactive-graph-correct-answer.d.ts +1 -1
- package/dist/components/interactive-graph-settings.d.ts +1 -1
- package/dist/components/perseus-editor-accordion.d.ts +1 -1
- package/dist/components/segment-count-selector.d.ts +2 -2
- package/dist/components/start-coord-settings.d.ts +2 -2
- package/dist/components/toggleable-caret.d.ts +2 -2
- package/dist/components/viewport-resizer.d.ts +2 -2
- package/dist/components/widget-editor.d.ts +1 -1
- package/dist/es/index.js +62 -172
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +61 -172
- package/dist/index.js.map +1 -1
- package/dist/widgets/image-editor.d.ts +2 -2
- package/dist/widgets/interaction-editor/mathquill-input.d.ts +2 -2
- package/dist/widgets/interactive-graph-editor.d.ts +129 -75
- package/dist/widgets/numeric-input-editor.d.ts +1 -1
- package/package.json +7 -7
- package/dist/stateful-article-editor.d.ts +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
type Props = {
|
|
3
3
|
angle: number;
|
|
4
4
|
onChange: (angle: number) => void;
|
|
5
5
|
};
|
|
6
|
-
declare const AngleInput: (props: Props) => JSX.Element;
|
|
6
|
+
declare const AngleInput: (props: Props) => React.JSX.Element;
|
|
7
7
|
export default AngleInput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { Coord } from "@khanacademy/perseus";
|
|
3
3
|
import type { StyleType } from "@khanacademy/wonder-blocks-core";
|
|
4
4
|
type Props = {
|
|
@@ -8,5 +8,5 @@ type Props = {
|
|
|
8
8
|
style?: StyleType;
|
|
9
9
|
onChange: (newCoord: Coord) => void;
|
|
10
10
|
};
|
|
11
|
-
declare const CoordinatePairInput: (props: Props) => JSX.Element;
|
|
11
|
+
declare const CoordinatePairInput: (props: Props) => React.JSX.Element;
|
|
12
12
|
export default CoordinatePairInput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { LockedFigureColor } from "@khanacademy/perseus";
|
|
3
3
|
import type { StyleType } from "@khanacademy/wonder-blocks-core";
|
|
4
4
|
type Props = {
|
|
@@ -6,5 +6,5 @@ type Props = {
|
|
|
6
6
|
style?: StyleType;
|
|
7
7
|
onChange: (newValue: string) => void;
|
|
8
8
|
};
|
|
9
|
-
declare const ColorSelect: (props: Props) => JSX.Element;
|
|
9
|
+
declare const ColorSelect: (props: Props) => React.JSX.Element;
|
|
10
10
|
export default ColorSelect;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type LockedFigureColor } from "@khanacademy/perseus";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
type Props = {
|
|
4
4
|
color: LockedFigureColor;
|
|
5
5
|
filled?: boolean;
|
|
6
6
|
decorative?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare const ColorSwatch: (props: Props) => JSX.Element;
|
|
8
|
+
declare const ColorSwatch: (props: Props) => React.JSX.Element;
|
|
9
9
|
export default ColorSwatch;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { LockedPointType } from "@khanacademy/perseus";
|
|
3
3
|
export type Props = LockedPointType & {
|
|
4
4
|
/**
|
|
@@ -31,5 +31,5 @@ export type Props = LockedPointType & {
|
|
|
31
31
|
*/
|
|
32
32
|
onToggle?: (expanded: boolean) => void;
|
|
33
33
|
};
|
|
34
|
-
declare const DefiningPointSettings: (props: Props) => JSX.Element;
|
|
34
|
+
declare const DefiningPointSettings: (props: Props) => React.JSX.Element;
|
|
35
35
|
export default DefiningPointSettings;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { LockedFigureColor, LockedFigureFillType } from "@khanacademy/perseus";
|
|
3
3
|
type Props = {
|
|
4
4
|
color: LockedFigureColor;
|
|
5
5
|
fillStyle: LockedFigureFillType;
|
|
6
6
|
strokeStyle: "solid" | "dashed";
|
|
7
7
|
};
|
|
8
|
-
declare const EllipseSwatch: (props: Props) => JSX.Element;
|
|
8
|
+
declare const EllipseSwatch: (props: Props) => React.JSX.Element;
|
|
9
9
|
export default EllipseSwatch;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { StyleType } from "@khanacademy/wonder-blocks-core";
|
|
3
3
|
type Props = {
|
|
4
4
|
label: string;
|
|
@@ -6,5 +6,5 @@ type Props = {
|
|
|
6
6
|
style?: StyleType;
|
|
7
7
|
onChange: (newValue: boolean) => void;
|
|
8
8
|
};
|
|
9
|
-
declare const LabeledSwitch: (props: Props) => JSX.Element;
|
|
9
|
+
declare const LabeledSwitch: (props: Props) => React.JSX.Element;
|
|
10
10
|
export default LabeledSwitch;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type LockedFigureColor } from "@khanacademy/perseus";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
type Props = {
|
|
4
4
|
color: LockedFigureColor;
|
|
5
5
|
lineStyle: "solid" | "dashed";
|
|
6
6
|
};
|
|
7
|
-
declare const LineSwatch: (props: Props) => JSX.Element;
|
|
7
|
+
declare const LineSwatch: (props: Props) => React.JSX.Element;
|
|
8
8
|
export default LineSwatch;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { LockedFigureSettingsCommonProps } from "./locked-figure-settings";
|
|
3
3
|
import type { LockedEllipseType } from "@khanacademy/perseus";
|
|
4
4
|
export type Props = LockedFigureSettingsCommonProps & LockedEllipseType & {
|
|
@@ -7,5 +7,5 @@ export type Props = LockedFigureSettingsCommonProps & LockedEllipseType & {
|
|
|
7
7
|
*/
|
|
8
8
|
onChangeProps: (newProps: Partial<LockedEllipseType>) => void;
|
|
9
9
|
};
|
|
10
|
-
declare const LockedEllipseSettings: (props: Props) => JSX.Element;
|
|
10
|
+
declare const LockedEllipseSettings: (props: Props) => React.JSX.Element;
|
|
11
11
|
export default LockedEllipseSettings;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
type Props = {
|
|
3
3
|
showM2Features: boolean;
|
|
4
4
|
showM2bFeatures: boolean;
|
|
5
5
|
id: string;
|
|
6
6
|
onChange: (value: string) => void;
|
|
7
7
|
};
|
|
8
|
-
declare const LockedFigureSelect: (props: Props) => JSX.Element;
|
|
8
|
+
declare const LockedFigureSelect: (props: Props) => React.JSX.Element;
|
|
9
9
|
export default LockedFigureSelect;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { LockedFigureType } from "@khanacademy/perseus";
|
|
3
3
|
export type LockedFigureSettingsMovementType = "back" | "backward" | "forward" | "front";
|
|
4
4
|
type Props = {
|
|
@@ -7,5 +7,5 @@ type Props = {
|
|
|
7
7
|
onMove: (movement: LockedFigureSettingsMovementType) => void;
|
|
8
8
|
onRemove: () => void;
|
|
9
9
|
};
|
|
10
|
-
declare const LockedFigureSettingsActions: (props: Props) => JSX.Element;
|
|
10
|
+
declare const LockedFigureSettingsActions: (props: Props) => React.JSX.Element;
|
|
11
11
|
export default LockedFigureSettingsActions;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Used in the interactive graph editor's locked figures section.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
import * as React from "react";
|
|
8
8
|
import type { Props as LockedEllipseProps } from "./locked-ellipse-settings";
|
|
9
9
|
import type { LockedFigureSettingsMovementType } from "./locked-figure-settings-actions";
|
|
10
10
|
import type { Props as LockedLineProps } from "./locked-line-settings";
|
|
@@ -32,5 +32,5 @@ export type LockedFigureSettingsCommonProps = {
|
|
|
32
32
|
onToggle?: (expanded: boolean) => void;
|
|
33
33
|
};
|
|
34
34
|
type Props = LockedFigureSettingsCommonProps & (LockedPointProps | LockedLineProps | LockedEllipseProps | LockedVectorProps | LockedPolygonProps);
|
|
35
|
-
declare const LockedFigureSettings: (props: Props) => JSX.Element | null;
|
|
35
|
+
declare const LockedFigureSettings: (props: Props) => React.JSX.Element | null;
|
|
36
36
|
export default LockedFigureSettings;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { Props as InteractiveGraphEditorProps } from "../../widgets/interactive-graph-editor";
|
|
3
3
|
import type { LockedFigure } from "@khanacademy/perseus";
|
|
4
4
|
type Props = {
|
|
@@ -7,5 +7,5 @@ type Props = {
|
|
|
7
7
|
figures?: Array<LockedFigure>;
|
|
8
8
|
onChange: (props: Partial<InteractiveGraphEditorProps>) => void;
|
|
9
9
|
};
|
|
10
|
-
declare const LockedFiguresSection: (props: Props) => JSX.Element;
|
|
10
|
+
declare const LockedFiguresSection: (props: Props) => React.JSX.Element;
|
|
11
11
|
export default LockedFiguresSection;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { LockedFigureSettingsCommonProps } from "./locked-figure-settings";
|
|
3
3
|
import type { LockedFigure, LockedLineType } from "@khanacademy/perseus";
|
|
4
4
|
export type Props = LockedLineType & LockedFigureSettingsCommonProps & {
|
|
@@ -7,5 +7,5 @@ export type Props = LockedLineType & LockedFigureSettingsCommonProps & {
|
|
|
7
7
|
*/
|
|
8
8
|
onChangeProps: (newProps: Partial<LockedFigure>) => void;
|
|
9
9
|
};
|
|
10
|
-
declare const LockedLineSettings: (props: Props) => JSX.Element;
|
|
10
|
+
declare const LockedLineSettings: (props: Props) => React.JSX.Element;
|
|
11
11
|
export default LockedLineSettings;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { LockedFigureSettingsCommonProps } from "./locked-figure-settings";
|
|
3
3
|
import type { LockedPointType } from "@khanacademy/perseus";
|
|
4
4
|
export type Props = LockedFigureSettingsCommonProps & LockedPointType & {
|
|
@@ -7,5 +7,5 @@ export type Props = LockedFigureSettingsCommonProps & LockedPointType & {
|
|
|
7
7
|
*/
|
|
8
8
|
onChangeProps: (newProps: Partial<LockedPointType>) => void;
|
|
9
9
|
};
|
|
10
|
-
declare const LockedPointSettings: (props: Props) => JSX.Element;
|
|
10
|
+
declare const LockedPointSettings: (props: Props) => React.JSX.Element;
|
|
11
11
|
export default LockedPointSettings;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type LockedPolygonType } from "@khanacademy/perseus";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
import type { LockedFigureSettingsCommonProps } from "./locked-figure-settings";
|
|
4
4
|
export type Props = LockedFigureSettingsCommonProps & LockedPolygonType & {
|
|
5
5
|
/**
|
|
@@ -7,5 +7,5 @@ export type Props = LockedFigureSettingsCommonProps & LockedPolygonType & {
|
|
|
7
7
|
*/
|
|
8
8
|
onChangeProps: (newProps: Partial<LockedPolygonType>) => void;
|
|
9
9
|
};
|
|
10
|
-
declare const LockedPolygonSettings: (props: Props) => JSX.Element;
|
|
10
|
+
declare const LockedPolygonSettings: (props: Props) => React.JSX.Element;
|
|
11
11
|
export default LockedPolygonSettings;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { LockedFigureSettingsCommonProps } from "./locked-figure-settings";
|
|
3
3
|
import type { LockedFigure, LockedVectorType } from "@khanacademy/perseus";
|
|
4
4
|
export type Props = LockedVectorType & LockedFigureSettingsCommonProps & {
|
|
@@ -7,5 +7,5 @@ export type Props = LockedVectorType & LockedFigureSettingsCommonProps & {
|
|
|
7
7
|
*/
|
|
8
8
|
onChangeProps: (newProps: Partial<LockedFigure>) => void;
|
|
9
9
|
};
|
|
10
|
-
declare const LockedVectorSettings: (props: Props) => JSX.Element;
|
|
10
|
+
declare const LockedVectorSettings: (props: Props) => React.JSX.Element;
|
|
11
11
|
export default LockedVectorSettings;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { LockedFigureColor, LockedFigureFillType } from "@khanacademy/perseus";
|
|
3
3
|
type Props = {
|
|
4
4
|
color: LockedFigureColor;
|
|
5
5
|
fillStyle: LockedFigureFillType;
|
|
6
6
|
strokeStyle: "solid" | "dashed";
|
|
7
7
|
};
|
|
8
|
-
declare const PolygonSwatch: (props: Props) => JSX.Element;
|
|
8
|
+
declare const PolygonSwatch: (props: Props) => React.JSX.Element;
|
|
9
9
|
export default PolygonSwatch;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { PointValue } from "../util/points";
|
|
3
3
|
declare const GraphPointsCountSelector: ({ numPoints, onChange, }: {
|
|
4
4
|
numPoints?: PointValue | undefined;
|
|
5
5
|
onChange: (points: PointValue) => void;
|
|
6
|
-
}) => JSX.Element;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
7
|
export default GraphPointsCountSelector;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
type GraphTypeSelectorProps = {
|
|
3
3
|
graphType: string;
|
|
4
4
|
onChange: (newGraphType: string) => void;
|
|
5
5
|
};
|
|
6
|
-
declare const GraphTypeSelector: (props: GraphTypeSelectorProps) => JSX.Element;
|
|
6
|
+
declare const GraphTypeSelector: (props: GraphTypeSelectorProps) => React.JSX.Element;
|
|
7
7
|
export default GraphTypeSelector;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
declare function Heading({ title, isOpen, isCollapsible, onToggle, }: {
|
|
3
3
|
title: string;
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
isCollapsible: boolean;
|
|
6
6
|
onToggle?: (isOpen: boolean) => void;
|
|
7
|
-
}): JSX.Element;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
8
|
export default Heading;
|
|
@@ -137,6 +137,6 @@ declare class InteractiveGraphSettings extends React.Component<Props, State> {
|
|
|
137
137
|
changeSnapStep: (snapStep: any) => void;
|
|
138
138
|
changeGridStep: (gridStep: any) => void;
|
|
139
139
|
changeGraph: () => void;
|
|
140
|
-
render(): JSX.Element;
|
|
140
|
+
render(): React.JSX.Element;
|
|
141
141
|
}
|
|
142
142
|
export default InteractiveGraphSettings;
|
|
@@ -8,5 +8,5 @@ type Props = {
|
|
|
8
8
|
panelStyle?: StyleType;
|
|
9
9
|
onToggle?: (expanded: boolean) => void;
|
|
10
10
|
};
|
|
11
|
-
declare const PerseusEditorAccordion: (props: Props) => JSX.Element;
|
|
11
|
+
declare const PerseusEditorAccordion: (props: Props) => React.JSX.Element;
|
|
12
12
|
export default PerseusEditorAccordion;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
declare const SegmentCountSelector: ({ numSegments, onChange, }: {
|
|
3
3
|
numSegments?: number | undefined;
|
|
4
4
|
onChange: (numSegments: number) => void;
|
|
5
|
-
}) => JSX.Element;
|
|
5
|
+
}) => React.JSX.Element;
|
|
6
6
|
export default SegmentCountSelector;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { PerseusGraphType, Range, CollinearTuple } from "@khanacademy/perseus";
|
|
3
3
|
type Props = PerseusGraphType & {
|
|
4
4
|
range: [x: Range, y: Range];
|
|
5
5
|
step: [x: number, y: number];
|
|
6
6
|
onChange: (startCoords: CollinearTuple) => void;
|
|
7
7
|
};
|
|
8
|
-
declare const StartCoordSettings: (props: Props) => JSX.Element | null;
|
|
8
|
+
declare const StartCoordSettings: (props: Props) => React.JSX.Element | null;
|
|
9
9
|
export default StartCoordSettings;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
type Props = {
|
|
3
3
|
isExpanded: boolean;
|
|
4
4
|
};
|
|
@@ -6,5 +6,5 @@ type Props = {
|
|
|
6
6
|
* Displays a caret in either expanded or collapsed state. For use in headings
|
|
7
7
|
* that collapse a region.
|
|
8
8
|
*/
|
|
9
|
-
declare function ToggleableCaret(props: Props): JSX.Element;
|
|
9
|
+
declare function ToggleableCaret(props: Props): React.JSX.Element;
|
|
10
10
|
export default ToggleableCaret;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
2
|
import type { DeviceType } from "@khanacademy/perseus";
|
|
3
3
|
type Props = {
|
|
4
4
|
/** The current device type that is selected. */
|
|
@@ -9,5 +9,5 @@ type Props = {
|
|
|
9
9
|
*/
|
|
10
10
|
onViewportSizeChanged: (deviceType: DeviceType) => unknown;
|
|
11
11
|
};
|
|
12
|
-
declare const ViewportResizer: (props: Props) => JSX.Element;
|
|
12
|
+
declare const ViewportResizer: (props: Props) => React.JSX.Element;
|
|
13
13
|
export default ViewportResizer;
|
|
@@ -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" | "
|
|
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" | "unit-input" | "deprecated-standin";
|
|
25
25
|
alignment: string | undefined;
|
|
26
26
|
static: boolean | undefined;
|
|
27
27
|
graded: boolean | undefined;
|