@khanacademy/perseus-editor 6.7.0 → 6.10.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 +7 -0
- package/dist/components/coordinate-pair-input.d.ts +3 -2
- package/dist/components/ellipse-swatch.d.ts +9 -0
- package/dist/components/locked-ellipse-settings.d.ts +15 -0
- package/dist/components/locked-figure-select.d.ts +1 -0
- package/dist/components/locked-figure-settings.d.ts +3 -1
- package/dist/components/locked-figures-section.d.ts +1 -1
- package/dist/components/locked-vector-settings.d.ts +15 -0
- package/dist/components/util.d.ts +3 -1
- package/dist/es/index.js +606 -281
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +604 -278
- package/dist/index.js.map +1 -1
- package/dist/widgets/interactive-graph-editor.d.ts +0 -62
- package/package.json +9 -9
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { Coord } from "@khanacademy/perseus";
|
|
3
3
|
type Props = {
|
|
4
4
|
coord: [number, number];
|
|
5
|
+
labels?: [string, string];
|
|
5
6
|
error?: boolean;
|
|
6
|
-
|
|
7
|
+
onChange: (newCoord: Coord) => void;
|
|
7
8
|
};
|
|
8
9
|
declare const CoordinatePairInput: (props: Props) => JSX.Element;
|
|
9
10
|
export default CoordinatePairInput;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { LockedFigureColor, LockedEllipseFillType } from "@khanacademy/perseus";
|
|
3
|
+
type Props = {
|
|
4
|
+
color: LockedFigureColor;
|
|
5
|
+
fillStyle: LockedEllipseFillType;
|
|
6
|
+
strokeStyle: "solid" | "dashed";
|
|
7
|
+
};
|
|
8
|
+
declare const EllipseSwatch: (props: Props) => JSX.Element;
|
|
9
|
+
export default EllipseSwatch;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AccordionProps } from "./locked-figure-settings";
|
|
3
|
+
import type { LockedEllipseType } from "@khanacademy/perseus";
|
|
4
|
+
export type Props = AccordionProps & LockedEllipseType & {
|
|
5
|
+
/**
|
|
6
|
+
* Called when the delete button is pressed.
|
|
7
|
+
*/
|
|
8
|
+
onRemove: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* Called when the props (coords, color, etc.) are updated.
|
|
11
|
+
*/
|
|
12
|
+
onChangeProps: (newProps: Partial<LockedEllipseType>) => void;
|
|
13
|
+
};
|
|
14
|
+
declare const LockedEllipseSettings: (props: Props) => JSX.Element;
|
|
15
|
+
export default LockedEllipseSettings;
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
* Used in the interactive graph editor's locked figures section.
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
|
+
import type { Props as LockedEllipseProps } from "./locked-ellipse-settings";
|
|
8
9
|
import type { Props as LockedLineProps } from "./locked-line-settings";
|
|
9
10
|
import type { Props as LockedPointProps } from "./locked-point-settings";
|
|
11
|
+
import type { Props as LockedVectorProps } from "./locked-vector-settings";
|
|
10
12
|
export type AccordionProps = {
|
|
11
13
|
showM2Features?: boolean;
|
|
12
14
|
/**
|
|
@@ -18,6 +20,6 @@ export type AccordionProps = {
|
|
|
18
20
|
*/
|
|
19
21
|
onToggle?: (expanded: boolean) => void;
|
|
20
22
|
};
|
|
21
|
-
type Props = AccordionProps & (LockedPointProps | LockedLineProps);
|
|
23
|
+
type Props = AccordionProps & (LockedPointProps | LockedLineProps | LockedEllipseProps | LockedVectorProps);
|
|
22
24
|
declare const LockedFigureSettings: (props: Props) => JSX.Element | null;
|
|
23
25
|
export default LockedFigureSettings;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { Props as InteractiveGraphEditorProps } from "../widgets/interactive-graph-editor";
|
|
3
3
|
import type { LockedFigure } from "@khanacademy/perseus";
|
|
4
4
|
type Props = {
|
|
5
|
-
showM2Features
|
|
5
|
+
showM2Features: boolean;
|
|
6
6
|
figures?: Array<LockedFigure>;
|
|
7
7
|
onChange: (props: Partial<InteractiveGraphEditorProps>) => void;
|
|
8
8
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AccordionProps } from "./locked-figure-settings";
|
|
3
|
+
import type { LockedFigure, LockedVectorType } from "@khanacademy/perseus";
|
|
4
|
+
export type Props = LockedVectorType & AccordionProps & {
|
|
5
|
+
/**
|
|
6
|
+
* Called when the delete button is pressed.
|
|
7
|
+
*/
|
|
8
|
+
onRemove: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* Called when the props (points, color, etc.) are updated.
|
|
11
|
+
*/
|
|
12
|
+
onChangeProps: (newProps: Partial<LockedFigure>) => void;
|
|
13
|
+
};
|
|
14
|
+
declare const LockedVectorSettings: (props: Props) => JSX.Element;
|
|
15
|
+
export default LockedVectorSettings;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { LockedFigure, LockedFigureType, LockedPointType, LockedLineType } from "@khanacademy/perseus";
|
|
1
|
+
import type { LockedFigure, LockedFigureType, LockedPointType, LockedLineType, LockedEllipseType, LockedVectorType } 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;
|
|
5
|
+
export declare function getDefaultFigureForType(type: "ellipse"): LockedEllipseType;
|
|
6
|
+
export declare function getDefaultFigureForType(type: "vector"): LockedVectorType;
|
|
5
7
|
export declare function getDefaultFigureForType(type: LockedFigureType): LockedFigure;
|