@khanacademy/perseus-editor 7.0.2 → 7.0.3
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/util.d.ts +2 -1
- package/dist/es/index.js +15 -1
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/widgets/interactive-graph-editor.d.ts +63 -1
- package/package.json +3 -3
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type { LockedFigure, LockedFigureType, LockedPointType, LockedLineType, LockedEllipseType, LockedVectorType, LockedPolygonType } from "@khanacademy/perseus";
|
|
1
|
+
import type { LockedFigure, LockedFigureType, LockedPointType, LockedLineType, LockedEllipseType, LockedVectorType, LockedPolygonType, LockedFunctionType } 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
5
|
export declare function getDefaultFigureForType(type: "vector"): LockedVectorType;
|
|
6
6
|
export declare function getDefaultFigureForType(type: "ellipse"): LockedEllipseType;
|
|
7
7
|
export declare function getDefaultFigureForType(type: "polygon"): LockedPolygonType;
|
|
8
|
+
export declare function getDefaultFigureForType(type: "function"): LockedFunctionType;
|
|
8
9
|
export declare function getDefaultFigureForType(type: LockedFigureType): LockedFigure;
|
|
9
10
|
export declare function degreeToRadian(degrees: number): number;
|
|
10
11
|
export declare function radianToDegree(radians: number): number;
|
package/dist/es/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import Banner from '@khanacademy/wonder-blocks-banner';
|
|
|
36
36
|
|
|
37
37
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
38
38
|
const libName = "@khanacademy/perseus-editor";
|
|
39
|
-
const libVersion = "7.0.
|
|
39
|
+
const libVersion = "7.0.3";
|
|
40
40
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
41
41
|
|
|
42
42
|
function _extends() {
|
|
@@ -29679,6 +29679,14 @@ function getDefaultFigureForType(type) {
|
|
|
29679
29679
|
fillStyle: "none",
|
|
29680
29680
|
strokeStyle: "solid"
|
|
29681
29681
|
};
|
|
29682
|
+
case "function":
|
|
29683
|
+
return {
|
|
29684
|
+
type: "function",
|
|
29685
|
+
color: DEFAULT_COLOR,
|
|
29686
|
+
strokeStyle: "solid",
|
|
29687
|
+
equation: "x^2",
|
|
29688
|
+
directionalAxis: "x"
|
|
29689
|
+
};
|
|
29682
29690
|
default:
|
|
29683
29691
|
throw new UnreachableCaseError(type);
|
|
29684
29692
|
}
|
|
@@ -30957,6 +30965,12 @@ const LockedFiguresSection = props => {
|
|
|
30957
30965
|
const buttonLabel = allCollapsed ? "Expand all" : "Collapse all";
|
|
30958
30966
|
const showExpandButton = !!(figures != null && figures.length);
|
|
30959
30967
|
return /*#__PURE__*/React.createElement(View, null, figures == null ? void 0 : figures.map((figure, index) => {
|
|
30968
|
+
if (figure.type === "function") {
|
|
30969
|
+
// TODO(LEMS-1947): Add locked function settings.
|
|
30970
|
+
// Remove this block once function locked figure settings are
|
|
30971
|
+
// implemented.
|
|
30972
|
+
return;
|
|
30973
|
+
}
|
|
30960
30974
|
return /*#__PURE__*/React.createElement(LockedFigureSettings, _extends({
|
|
30961
30975
|
key: `${uniqueId}-locked-${figure}-${index}`,
|
|
30962
30976
|
showM2Features: props.showM2Features,
|