@khanacademy/perseus 20.4.1 → 20.5.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/es/index.js +14 -2
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/perseus-types.d.ts +1 -1
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -32,6 +32,7 @@ import caretDown from '@phosphor-icons/core/assets/regular/caret-down.svg';
|
|
|
32
32
|
import caretUp from '@phosphor-icons/core/assets/regular/caret-up.svg';
|
|
33
33
|
import debounce$2 from 'lodash.debounce';
|
|
34
34
|
import { Point as Point$2, vec, useTransformContext, useMovable, Vector, Coordinates, Mafs } from 'mafs';
|
|
35
|
+
import { color } from '@khanacademy/wonder-blocks-tokens';
|
|
35
36
|
import { PhosphorIcon } from '@khanacademy/wonder-blocks-icon';
|
|
36
37
|
import questionIcon from '@phosphor-icons/core/regular/question.svg';
|
|
37
38
|
import { LabelSmall, LabelMedium } from '@khanacademy/wonder-blocks-typography';
|
|
@@ -28125,6 +28126,17 @@ Graph.defaultProps = {
|
|
|
28125
28126
|
isMobile: false
|
|
28126
28127
|
};
|
|
28127
28128
|
|
|
28129
|
+
/**
|
|
28130
|
+
* Takes a style object with color names and converts them to actual
|
|
28131
|
+
* Wonder Blocks color values. This way, we can use colors and their
|
|
28132
|
+
* names in the editor UI without having to convert them back and forth.
|
|
28133
|
+
*/
|
|
28134
|
+
function convertStyle(style) {
|
|
28135
|
+
return _extends({}, style, {
|
|
28136
|
+
stroke: color[(style == null ? void 0 : style.stroke) || "blue"],
|
|
28137
|
+
fill: color[(style == null ? void 0 : style.fill) || "blue"]
|
|
28138
|
+
});
|
|
28139
|
+
}
|
|
28128
28140
|
const GraphLockedLayer = props => {
|
|
28129
28141
|
const {
|
|
28130
28142
|
lockedFigures
|
|
@@ -28138,7 +28150,7 @@ const GraphLockedLayer = props => {
|
|
|
28138
28150
|
x: x,
|
|
28139
28151
|
y: y,
|
|
28140
28152
|
svgCircleProps: {
|
|
28141
|
-
style: figure.style
|
|
28153
|
+
style: convertStyle(figure.style)
|
|
28142
28154
|
}
|
|
28143
28155
|
});
|
|
28144
28156
|
}
|
|
@@ -41481,7 +41493,7 @@ const init = function init(options) {
|
|
|
41481
41493
|
|
|
41482
41494
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
41483
41495
|
const libName = "@khanacademy/perseus";
|
|
41484
|
-
const libVersion = "20.
|
|
41496
|
+
const libVersion = "20.5.0";
|
|
41485
41497
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
41486
41498
|
|
|
41487
41499
|
const apiVersion = {
|