@khanacademy/perseus-editor 4.3.4 → 4.4.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/widget-editor.d.ts +1 -1
- package/dist/es/index.js +10 -14
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +6 -17
- package/dist/index.js.map +1 -1
- package/dist/widgets/example-graphie-widget.d.ts +12 -38
- package/dist/widgets/example-widget.d.ts +19 -8
- package/dist/widgets/interactive-graph-editor.d.ts +368 -644
- package/dist/widgets/simple-markdown-tester.d.ts +9 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -64,7 +64,7 @@ var i18n__namespace = /*#__PURE__*/_interopNamespace(i18n$1);
|
|
|
64
64
|
|
|
65
65
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
66
66
|
const libName = "@khanacademy/perseus-editor";
|
|
67
|
-
const libVersion = "4.
|
|
67
|
+
const libVersion = "4.4.0";
|
|
68
68
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
69
69
|
|
|
70
70
|
function _extends() {
|
|
@@ -20630,6 +20630,10 @@ class WidgetEditor extends React__namespace.Component {
|
|
|
20630
20630
|
});
|
|
20631
20631
|
};
|
|
20632
20632
|
_handleWidgetChange = (newProps, cb, silent) => {
|
|
20633
|
+
// Casting to any is necessary because typescript
|
|
20634
|
+
// seems confused about the type of WidgetOptions
|
|
20635
|
+
// TODO (LC-1794): Fix this type so that we don't
|
|
20636
|
+
// require the cast to any.
|
|
20633
20637
|
const newWidgetInfo = {
|
|
20634
20638
|
...this.state.widgetInfo,
|
|
20635
20639
|
options: {
|
|
@@ -26142,12 +26146,6 @@ const MovablePoint = Graphie.MovablePoint;
|
|
|
26142
26146
|
* users enter their answers.
|
|
26143
26147
|
*/
|
|
26144
26148
|
class ExampleGraphieWidget$1 extends React__namespace.Component {
|
|
26145
|
-
static propTypes = {
|
|
26146
|
-
...perseus.Changeable.propTypes,
|
|
26147
|
-
apiOptions: perseus.ApiOptions.propTypes,
|
|
26148
|
-
graph: PropTypes__default["default"].object.isRequired,
|
|
26149
|
-
coord: PropTypes__default["default"].arrayOf(PropTypes__default["default"].number)
|
|
26150
|
-
};
|
|
26151
26149
|
static defaultProps = {
|
|
26152
26150
|
// We want to allow our coord to be null to test if the
|
|
26153
26151
|
// user has interacted with this widget yet when grading it
|
|
@@ -26202,7 +26200,7 @@ class ExampleGraphieWidget$1 extends React__namespace.Component {
|
|
|
26202
26200
|
range: this.props.graph.range,
|
|
26203
26201
|
options: this.props.graph,
|
|
26204
26202
|
setup: this.setupGraphie,
|
|
26205
|
-
setDrawingAreaAvailable: this.props.apiOptions
|
|
26203
|
+
setDrawingAreaAvailable: this.props.apiOptions?.setDrawingAreaAvailable
|
|
26206
26204
|
}, /*#__PURE__*/React__namespace.createElement(MovablePoint, {
|
|
26207
26205
|
pointSize: 5,
|
|
26208
26206
|
coord: this.props.coord || [0, 0],
|
|
@@ -35030,17 +35028,12 @@ class TextInput extends React__namespace.Component {
|
|
|
35030
35028
|
this.props.onChange(e.target.value);
|
|
35031
35029
|
};
|
|
35032
35030
|
}
|
|
35033
|
-
|
|
35034
35031
|
/**
|
|
35035
35032
|
* This is the widget's renderer. It shows up in the right column
|
|
35036
35033
|
* in the demo, and is what is visible to users, and where
|
|
35037
35034
|
* users enter their answers.
|
|
35038
35035
|
*/
|
|
35039
35036
|
class ExampleWidget extends React__namespace.Component {
|
|
35040
|
-
static propTypes = {
|
|
35041
|
-
...perseus.Changeable.propTypes,
|
|
35042
|
-
value: PropTypes__default["default"].string
|
|
35043
|
-
};
|
|
35044
35037
|
static defaultProps = {
|
|
35045
35038
|
value: ""
|
|
35046
35039
|
};
|
|
@@ -35146,10 +35139,6 @@ var ExampleWidget$1 = {
|
|
|
35146
35139
|
const mdParse = perseus.PerseusMarkdown.parse;
|
|
35147
35140
|
const mdOutput = perseus.PerseusMarkdown.basicOutput;
|
|
35148
35141
|
class SimpleMarkdownTester extends React__namespace.Component {
|
|
35149
|
-
static propTypes = {
|
|
35150
|
-
...perseus.Changeable.propTypes,
|
|
35151
|
-
value: PropTypes__default["default"].string
|
|
35152
|
-
};
|
|
35153
35142
|
static defaultProps = {
|
|
35154
35143
|
value: ""
|
|
35155
35144
|
};
|