@khanacademy/perseus-editor 12.0.1 → 13.0.1
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/all-editors.d.ts +2 -1
- package/dist/components/graph-locked-figures/locked-figure-select.d.ts +1 -0
- package/dist/components/graph-locked-figures/locked-figure-settings.d.ts +3 -1
- package/dist/components/graph-locked-figures/locked-figures-section.d.ts +1 -0
- package/dist/components/graph-locked-figures/locked-label-settings.d.ts +17 -0
- package/dist/components/util.d.ts +2 -1
- package/dist/components/widget-editor.d.ts +1 -1
- package/dist/es/index.js +313 -145
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +312 -144
- package/dist/index.js.map +1 -1
- package/dist/widgets/interactive-graph-editor.d.ts +186 -248
- package/dist/widgets/phet-simulation-editor.d.ts +19 -0
- package/package.json +2 -2
package/dist/es/index.js
CHANGED
|
@@ -41,7 +41,7 @@ import arrowCounterClockwise from '@phosphor-icons/core/bold/arrow-counter-clock
|
|
|
41
41
|
|
|
42
42
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
43
43
|
const libName = "@khanacademy/perseus-editor";
|
|
44
|
-
const libVersion = "
|
|
44
|
+
const libVersion = "13.0.1";
|
|
45
45
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
46
46
|
|
|
47
47
|
function _extends() {
|
|
@@ -231,7 +231,7 @@ class SectionControlButton extends React.Component {
|
|
|
231
231
|
role: "button",
|
|
232
232
|
hideDefaultFocusRing: true,
|
|
233
233
|
"aria-label": title,
|
|
234
|
-
style: styles$
|
|
234
|
+
style: styles$T.button
|
|
235
235
|
}, ({
|
|
236
236
|
hovered,
|
|
237
237
|
focused,
|
|
@@ -239,7 +239,7 @@ class SectionControlButton extends React.Component {
|
|
|
239
239
|
}) => /*#__PURE__*/React.createElement(InlineIcon$a, icon));
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
const styles$
|
|
242
|
+
const styles$T = StyleSheet.create({
|
|
243
243
|
button: {
|
|
244
244
|
backgroundColor: color.gold,
|
|
245
245
|
margin: 2,
|
|
@@ -20633,11 +20633,11 @@ class Spring extends React.Component {
|
|
|
20633
20633
|
} = this.props;
|
|
20634
20634
|
return React.createElement(View, {
|
|
20635
20635
|
"aria-hidden": "true",
|
|
20636
|
-
style: [styles$
|
|
20636
|
+
style: [styles$S.grow, style]
|
|
20637
20637
|
});
|
|
20638
20638
|
}
|
|
20639
20639
|
}
|
|
20640
|
-
const styles$
|
|
20640
|
+
const styles$S = StyleSheet.create({
|
|
20641
20641
|
grow: {
|
|
20642
20642
|
flexGrow: 1
|
|
20643
20643
|
}
|
|
@@ -20874,13 +20874,13 @@ class WidgetSelect extends React.Component {
|
|
|
20874
20874
|
* that collapse a region.
|
|
20875
20875
|
*/
|
|
20876
20876
|
function ToggleableCaret(props) {
|
|
20877
|
-
const iconStyle = props.isExpanded ? styles$
|
|
20877
|
+
const iconStyle = props.isExpanded ? styles$R.expanded : styles$R.collapsed;
|
|
20878
20878
|
return /*#__PURE__*/React.createElement(PhosphorIcon, {
|
|
20879
20879
|
icon: caretRight,
|
|
20880
20880
|
style: iconStyle
|
|
20881
20881
|
});
|
|
20882
20882
|
}
|
|
20883
|
-
const styles$
|
|
20883
|
+
const styles$R = StyleSheet.create({
|
|
20884
20884
|
collapsed: {
|
|
20885
20885
|
transition: ".15s"
|
|
20886
20886
|
},
|
|
@@ -20913,16 +20913,16 @@ class TexErrorView extends React.Component {
|
|
|
20913
20913
|
showErrors
|
|
20914
20914
|
} = this.state;
|
|
20915
20915
|
return /*#__PURE__*/React.createElement(View, {
|
|
20916
|
-
style: styles$
|
|
20916
|
+
style: styles$Q.errorContainer
|
|
20917
20917
|
}, /*#__PURE__*/React.createElement(View, {
|
|
20918
|
-
style: styles$
|
|
20918
|
+
style: styles$Q.title,
|
|
20919
20919
|
onClick: this.handleToggleTexErrors
|
|
20920
20920
|
}, /*#__PURE__*/React.createElement(ToggleableCaret, {
|
|
20921
20921
|
isExpanded: showErrors
|
|
20922
20922
|
}), "\xA0 TeX Errors (", errorList.length, ")"), showErrors && /*#__PURE__*/React.createElement(View, {
|
|
20923
|
-
style: styles$
|
|
20923
|
+
style: styles$Q.errorExplanation
|
|
20924
20924
|
}, "If your math doesn't display correctly, these errors might help you troubleshoot. Message #content-kitchen for help."), showErrors && errorList.map((e, index) => /*#__PURE__*/React.createElement(View, {
|
|
20925
|
-
style: styles$
|
|
20925
|
+
style: styles$Q.error,
|
|
20926
20926
|
key: index
|
|
20927
20927
|
}, /*#__PURE__*/React.createElement(View, {
|
|
20928
20928
|
style: {
|
|
@@ -20931,7 +20931,7 @@ class TexErrorView extends React.Component {
|
|
|
20931
20931
|
}, e.math), /*#__PURE__*/React.createElement(View, null, e.message))));
|
|
20932
20932
|
}
|
|
20933
20933
|
}
|
|
20934
|
-
const styles$
|
|
20934
|
+
const styles$Q = StyleSheet.create({
|
|
20935
20935
|
title: {
|
|
20936
20936
|
backgroundColor: "#eee",
|
|
20937
20937
|
fontSize: "1.25em",
|
|
@@ -24044,7 +24044,7 @@ ItemExtrasEditor.defaultProps = {
|
|
|
24044
24044
|
zTable: false
|
|
24045
24045
|
};
|
|
24046
24046
|
const ItemExtraCheckbox = props => /*#__PURE__*/React.createElement(View, {
|
|
24047
|
-
style: [styles$
|
|
24047
|
+
style: [styles$P.checkbox, props.indent ? styles$P.indented : undefined]
|
|
24048
24048
|
}, /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
24049
24049
|
label: /*#__PURE__*/React.createElement(View, {
|
|
24050
24050
|
style: {
|
|
@@ -24054,7 +24054,7 @@ const ItemExtraCheckbox = props => /*#__PURE__*/React.createElement(View, {
|
|
|
24054
24054
|
checked: props.checked,
|
|
24055
24055
|
onChange: newCheckedState => props.onChange(newCheckedState)
|
|
24056
24056
|
}));
|
|
24057
|
-
const styles$
|
|
24057
|
+
const styles$P = StyleSheet.create({
|
|
24058
24058
|
indented: {
|
|
24059
24059
|
marginInlineStart: spacing.large_24
|
|
24060
24060
|
}
|
|
@@ -24712,7 +24712,7 @@ class SimpleButton extends React.Component {
|
|
|
24712
24712
|
} = _this$props,
|
|
24713
24713
|
otherProps = _objectWithoutPropertiesLoose(_this$props, _excluded$3);
|
|
24714
24714
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
24715
|
-
className: css(styles$
|
|
24715
|
+
className: css(styles$O.baseButton, color === "green" && styles$O.green, color === "orange" && styles$O.orange),
|
|
24716
24716
|
onClick: onClick
|
|
24717
24717
|
}, otherProps), children);
|
|
24718
24718
|
}
|
|
@@ -24727,7 +24727,7 @@ SimpleButton.defaultProps = {
|
|
|
24727
24727
|
color: "green",
|
|
24728
24728
|
onClick: () => {}
|
|
24729
24729
|
};
|
|
24730
|
-
const styles$
|
|
24730
|
+
const styles$O = StyleSheet.create({
|
|
24731
24731
|
baseButton: {
|
|
24732
24732
|
top: "0",
|
|
24733
24733
|
fontSize: "11px",
|
|
@@ -24947,23 +24947,23 @@ const LeafContainer = ({
|
|
|
24947
24947
|
}) => {
|
|
24948
24948
|
const hasPreviewHeading = shape.type === "content" || shape.type === "hint";
|
|
24949
24949
|
const previewHeading = hasPreviewHeading && /*#__PURE__*/React.createElement("div", {
|
|
24950
|
-
className: css(styles$
|
|
24950
|
+
className: css(styles$N.containerHeader)
|
|
24951
24951
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
24952
24952
|
depth: path.length,
|
|
24953
|
-
className: css(styles$
|
|
24953
|
+
className: css(styles$N.containerTitle)
|
|
24954
24954
|
}, capitalize(name)));
|
|
24955
24955
|
return /*#__PURE__*/React.createElement("div", {
|
|
24956
|
-
className: css(styles$
|
|
24956
|
+
className: css(styles$N.container)
|
|
24957
24957
|
}, /*#__PURE__*/React.createElement("span", {
|
|
24958
|
-
className: css(styles$
|
|
24958
|
+
className: css(styles$N.row, styles$N.rowHeading)
|
|
24959
24959
|
}, /*#__PURE__*/React.createElement("div", {
|
|
24960
|
-
className: css(styles$
|
|
24960
|
+
className: css(styles$N.columnLeft)
|
|
24961
24961
|
}, /*#__PURE__*/React.createElement("div", {
|
|
24962
|
-
className: "pod-title " + css(styles$
|
|
24962
|
+
className: "pod-title " + css(styles$N.containerHeader)
|
|
24963
24963
|
}, /*#__PURE__*/React.createElement("div", {
|
|
24964
|
-
className: css(styles$
|
|
24964
|
+
className: css(styles$N.containerTitle)
|
|
24965
24965
|
}, capitalize(name)), controls)), /*#__PURE__*/React.createElement("div", {
|
|
24966
|
-
className: css(styles$
|
|
24966
|
+
className: css(styles$N.columnRight)
|
|
24967
24967
|
}, previewHeading)), children);
|
|
24968
24968
|
};
|
|
24969
24969
|
const ArrayContainer = props => {
|
|
@@ -24976,11 +24976,11 @@ const ArrayContainer = props => {
|
|
|
24976
24976
|
actions
|
|
24977
24977
|
} = props;
|
|
24978
24978
|
return /*#__PURE__*/React.createElement("div", {
|
|
24979
|
-
className: css(styles$
|
|
24979
|
+
className: css(styles$N.container)
|
|
24980
24980
|
}, controls && /*#__PURE__*/React.createElement("div", {
|
|
24981
|
-
className: css(styles$
|
|
24981
|
+
className: css(styles$N.columnLeft, styles$N.containerHeader)
|
|
24982
24982
|
}, controls), /*#__PURE__*/React.createElement("div", null, children), /*#__PURE__*/React.createElement("div", {
|
|
24983
|
-
className: css(styles$
|
|
24983
|
+
className: css(styles$N.columnLeft)
|
|
24984
24984
|
}, /*#__PURE__*/React.createElement("a", {
|
|
24985
24985
|
href: "javascript:void 0",
|
|
24986
24986
|
onClick: () => actions.addArrayElement(path, shape.elementShape)
|
|
@@ -24993,28 +24993,28 @@ const ObjectContainer = ({
|
|
|
24993
24993
|
path
|
|
24994
24994
|
}) => {
|
|
24995
24995
|
const headingEditor = /*#__PURE__*/React.createElement("div", {
|
|
24996
|
-
className: css(styles$
|
|
24996
|
+
className: css(styles$N.containerHeader)
|
|
24997
24997
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
24998
24998
|
depth: path.length,
|
|
24999
|
-
className: css(styles$
|
|
24999
|
+
className: css(styles$N.containerTitle)
|
|
25000
25000
|
}, capitalize(name)), controls);
|
|
25001
25001
|
const headingPreview = (name || controls) && /*#__PURE__*/React.createElement("div", {
|
|
25002
|
-
className: css(styles$
|
|
25002
|
+
className: css(styles$N.containerHeader, styles$N.previewCollectionHeader)
|
|
25003
25003
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
25004
25004
|
depth: path.length,
|
|
25005
|
-
className: css(styles$
|
|
25005
|
+
className: css(styles$N.containerTitle)
|
|
25006
25006
|
}, capitalize(name)));
|
|
25007
25007
|
const hasBothHeadings = headingEditor && headingPreview;
|
|
25008
25008
|
return /*#__PURE__*/React.createElement("div", {
|
|
25009
|
-
className: css(styles$
|
|
25009
|
+
className: css(styles$N.container)
|
|
25010
25010
|
}, hasBothHeadings && /*#__PURE__*/React.createElement("span", {
|
|
25011
|
-
className: css(styles$
|
|
25011
|
+
className: css(styles$N.row)
|
|
25012
25012
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25013
|
-
className: css(styles$
|
|
25013
|
+
className: css(styles$N.columnLeft)
|
|
25014
25014
|
}, headingEditor), /*#__PURE__*/React.createElement("div", {
|
|
25015
|
-
className: css(styles$
|
|
25015
|
+
className: css(styles$N.columnRight)
|
|
25016
25016
|
}, headingPreview)), /*#__PURE__*/React.createElement("div", {
|
|
25017
|
-
className: css(path.length > 0 && styles$
|
|
25017
|
+
className: css(path.length > 0 && styles$N.contentIndent)
|
|
25018
25018
|
}, children));
|
|
25019
25019
|
};
|
|
25020
25020
|
|
|
@@ -25137,11 +25137,11 @@ const ItemNodeContent = withStickiness(props => {
|
|
|
25137
25137
|
className: "framework-perseus"
|
|
25138
25138
|
}, lens(renderers).get(path));
|
|
25139
25139
|
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("div", {
|
|
25140
|
-
className: css(styles$
|
|
25140
|
+
className: css(styles$N.row)
|
|
25141
25141
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25142
|
-
className: css(styles$
|
|
25142
|
+
className: css(styles$N.columnLeft)
|
|
25143
25143
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25144
|
-
className: css(sticky && styles$
|
|
25144
|
+
className: css(sticky && styles$N.sticky)
|
|
25145
25145
|
},
|
|
25146
25146
|
/*#__PURE__*/
|
|
25147
25147
|
// @ts-expect-error - TS2769 - No overload matches this call.
|
|
@@ -25149,9 +25149,9 @@ const ItemNodeContent = withStickiness(props => {
|
|
|
25149
25149
|
onChange: newVal => actions.mergeValueAtPath(path, newVal),
|
|
25150
25150
|
apiOptions: apiOptions
|
|
25151
25151
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
25152
|
-
className: css(styles$
|
|
25152
|
+
className: css(styles$N.columnRight)
|
|
25153
25153
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25154
|
-
className: css(sticky && styles$
|
|
25154
|
+
className: css(sticky && styles$N.sticky)
|
|
25155
25155
|
}, preview))));
|
|
25156
25156
|
});
|
|
25157
25157
|
const HintNodeContent = withStickiness(props => {
|
|
@@ -25167,13 +25167,13 @@ const HintNodeContent = withStickiness(props => {
|
|
|
25167
25167
|
className: "framework-perseus"
|
|
25168
25168
|
}, lens(renderers).get(path));
|
|
25169
25169
|
return /*#__PURE__*/React.createElement("div", {
|
|
25170
|
-
className: css(styles$
|
|
25170
|
+
className: css(styles$N.row)
|
|
25171
25171
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25172
|
-
className: css(styles$
|
|
25172
|
+
className: css(styles$N.columnLeft)
|
|
25173
25173
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25174
|
-
className: css(sticky && styles$
|
|
25174
|
+
className: css(sticky && styles$N.sticky)
|
|
25175
25175
|
}, /*#__PURE__*/React.createElement(HintEditor, _extends({}, data, {
|
|
25176
|
-
className: css(styles$
|
|
25176
|
+
className: css(styles$N.hintEditor),
|
|
25177
25177
|
onChange: newVal => actions.mergeValueAtPath(path, newVal),
|
|
25178
25178
|
apiOptions: apiOptions,
|
|
25179
25179
|
showTitle: false,
|
|
@@ -25188,9 +25188,9 @@ const HintNodeContent = withStickiness(props => {
|
|
|
25188
25188
|
isFirst: true,
|
|
25189
25189
|
isLast: true
|
|
25190
25190
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
25191
|
-
className: css(styles$
|
|
25191
|
+
className: css(styles$N.columnRight)
|
|
25192
25192
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25193
|
-
className: css(sticky && styles$
|
|
25193
|
+
className: css(sticky && styles$N.sticky)
|
|
25194
25194
|
}, preview)));
|
|
25195
25195
|
});
|
|
25196
25196
|
const TagsNodeContent = props => {
|
|
@@ -25207,9 +25207,9 @@ const TagsNodeContent = props => {
|
|
|
25207
25207
|
return null;
|
|
25208
25208
|
}
|
|
25209
25209
|
return /*#__PURE__*/React.createElement("div", {
|
|
25210
|
-
className: css(styles$
|
|
25210
|
+
className: css(styles$N.columnLeft)
|
|
25211
25211
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25212
|
-
className: css(styles$
|
|
25212
|
+
className: css(styles$N.tagsEditor)
|
|
25213
25213
|
}, /*#__PURE__*/React.createElement(GroupMetadataEditor, {
|
|
25214
25214
|
value: data,
|
|
25215
25215
|
onChange: newVal => actions.setValueAtPath(path, newVal),
|
|
@@ -25240,23 +25240,23 @@ const ArrayNodeContent = props => {
|
|
|
25240
25240
|
const subpath = path.concat(i);
|
|
25241
25241
|
const controls = [i > 0 && /*#__PURE__*/React.createElement("div", {
|
|
25242
25242
|
key: "moveArrayElementUp",
|
|
25243
|
-
className: css(styles$
|
|
25243
|
+
className: css(styles$N.control)
|
|
25244
25244
|
}, /*#__PURE__*/React.createElement(SimpleButton, {
|
|
25245
25245
|
color: "orange",
|
|
25246
25246
|
title: "Move up",
|
|
25247
25247
|
onClick: () => actions.moveArrayElementUp(subpath)
|
|
25248
25248
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25249
|
-
className: css(styles$
|
|
25249
|
+
className: css(styles$N.verticalFlip)
|
|
25250
25250
|
}, /*#__PURE__*/React.createElement(InlineIcon$5, iconChevronDown)))), i < data.length - 1 && /*#__PURE__*/React.createElement("div", {
|
|
25251
25251
|
key: "moveArrayElementDown",
|
|
25252
|
-
className: css(styles$
|
|
25252
|
+
className: css(styles$N.control)
|
|
25253
25253
|
}, /*#__PURE__*/React.createElement(SimpleButton, {
|
|
25254
25254
|
color: "orange",
|
|
25255
25255
|
title: "Move down",
|
|
25256
25256
|
onClick: () => actions.moveArrayElementDown(subpath)
|
|
25257
25257
|
}, /*#__PURE__*/React.createElement(InlineIcon$5, iconChevronDown))), /*#__PURE__*/React.createElement("div", {
|
|
25258
25258
|
key: "removeArrayElement",
|
|
25259
|
-
className: css(styles$
|
|
25259
|
+
className: css(styles$N.control)
|
|
25260
25260
|
}, /*#__PURE__*/React.createElement(SimpleButton, {
|
|
25261
25261
|
color: "orange",
|
|
25262
25262
|
title: "Delete",
|
|
@@ -25264,7 +25264,7 @@ const ArrayNodeContent = props => {
|
|
|
25264
25264
|
}, /*#__PURE__*/React.createElement(InlineIcon$5, iconTrash$4)))];
|
|
25265
25265
|
return /*#__PURE__*/React.createElement("div", {
|
|
25266
25266
|
key: i,
|
|
25267
|
-
className: css(styles$
|
|
25267
|
+
className: css(styles$N.arrayElement, !elementIsLeaf && styles$N.arrayElementAndNotLeaf)
|
|
25268
25268
|
}, /*#__PURE__*/React.createElement(NodeContainer, _extends({}, otherProps, {
|
|
25269
25269
|
key: i,
|
|
25270
25270
|
shape: shape.elementShape,
|
|
@@ -25290,7 +25290,7 @@ const ObjectNodeContent = props => {
|
|
|
25290
25290
|
// made sense to the shape's author is the order in which we'll iterate :)
|
|
25291
25291
|
const children = Object.keys(shape.shape).map(subkey => /*#__PURE__*/React.createElement("div", {
|
|
25292
25292
|
key: subkey,
|
|
25293
|
-
className: css(styles$
|
|
25293
|
+
className: css(styles$N.objectElement)
|
|
25294
25294
|
}, /*#__PURE__*/React.createElement(NodeContainer, _extends({}, otherProps, {
|
|
25295
25295
|
shape: shape.shape[subkey],
|
|
25296
25296
|
data: data[subkey],
|
|
@@ -25457,7 +25457,7 @@ class MultiRendererEditor extends React.Component {
|
|
|
25457
25457
|
}, this._renderContent());
|
|
25458
25458
|
}
|
|
25459
25459
|
}
|
|
25460
|
-
const styles$
|
|
25460
|
+
const styles$N = StyleSheet.create({
|
|
25461
25461
|
// This is used in a number of places throughout this file.
|
|
25462
25462
|
container: {},
|
|
25463
25463
|
// eslint-disable-next-line react-native/no-unused-styles
|
|
@@ -26617,7 +26617,7 @@ const SortableItem = createReactClass({
|
|
|
26617
26617
|
}
|
|
26618
26618
|
return /*#__PURE__*/React.createElement("li", {
|
|
26619
26619
|
draggable: this.props.draggable,
|
|
26620
|
-
className: [dragState, css(styles$
|
|
26620
|
+
className: [dragState, css(styles$M.sortableListItem)].join(" "),
|
|
26621
26621
|
onDragStart: this.handleDragStart,
|
|
26622
26622
|
onDrop: this.handleDrop,
|
|
26623
26623
|
onDragEnter: this.handleDragEnter,
|
|
@@ -26625,7 +26625,7 @@ const SortableItem = createReactClass({
|
|
|
26625
26625
|
}, this.props.component);
|
|
26626
26626
|
}
|
|
26627
26627
|
});
|
|
26628
|
-
const styles$
|
|
26628
|
+
const styles$M = StyleSheet.create({
|
|
26629
26629
|
sortableListItem: {
|
|
26630
26630
|
margin: "5px 0"
|
|
26631
26631
|
}
|
|
@@ -26873,13 +26873,13 @@ class ExpressionEditor extends React.Component {
|
|
|
26873
26873
|
onChange: this.handleToggleDiv
|
|
26874
26874
|
}));
|
|
26875
26875
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(HeadingSmall, null, "Global Options"), /*#__PURE__*/React.createElement("div", {
|
|
26876
|
-
className: css(styles$
|
|
26876
|
+
className: css(styles$L.paddedY)
|
|
26877
26877
|
}, /*#__PURE__*/React.createElement(LabeledTextField, {
|
|
26878
26878
|
label: "Visible label",
|
|
26879
26879
|
value: this.props.visibleLabel || "",
|
|
26880
26880
|
onChange: this.change("visibleLabel")
|
|
26881
26881
|
}), /*#__PURE__*/React.createElement(InfoTip$i, null, /*#__PURE__*/React.createElement("p", null, "Optional visible text; strongly encouraged to help learners using dictation software, but can be omitted if the surrounding content provides enough context."))), /*#__PURE__*/React.createElement("div", {
|
|
26882
|
-
className: css(styles$
|
|
26882
|
+
className: css(styles$L.paddedY)
|
|
26883
26883
|
}, /*#__PURE__*/React.createElement(LabeledTextField, {
|
|
26884
26884
|
label: "Aria label",
|
|
26885
26885
|
value: this.props.ariaLabel || "",
|
|
@@ -26888,13 +26888,13 @@ class ExpressionEditor extends React.Component {
|
|
|
26888
26888
|
href: "https://www.w3.org/WAI/tips/designing/#ensure-that-form-elements-include-clearly-associated-labels",
|
|
26889
26889
|
target: "_blank"
|
|
26890
26890
|
}, "this article.")))), /*#__PURE__*/React.createElement("div", {
|
|
26891
|
-
className: css(styles$
|
|
26891
|
+
className: css(styles$L.paddedY)
|
|
26892
26892
|
}, /*#__PURE__*/React.createElement(LabeledTextField, {
|
|
26893
26893
|
label: "Function variables",
|
|
26894
26894
|
value: this.state.functionsInternal,
|
|
26895
26895
|
onChange: this.handleFunctions
|
|
26896
26896
|
}), /*#__PURE__*/React.createElement(InfoTip$i, null, /*#__PURE__*/React.createElement("p", null, "Single-letter variables listed here will be interpreted as functions. This let us know that f(x) means \"f of x\" and not \"f times x\"."))), /*#__PURE__*/React.createElement("div", {
|
|
26897
|
-
className: css(styles$
|
|
26897
|
+
className: css(styles$L.paddedY)
|
|
26898
26898
|
}, /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
26899
26899
|
label: "Use \xD7 instead of \u22C5 for multiplication",
|
|
26900
26900
|
checked: this.props.times,
|
|
@@ -26904,7 +26904,7 @@ class ExpressionEditor extends React.Component {
|
|
|
26904
26904
|
});
|
|
26905
26905
|
}
|
|
26906
26906
|
}), /*#__PURE__*/React.createElement(InfoTip$i, null, /*#__PURE__*/React.createElement("p", null, "For pre-algebra problems this option displays multiplication as \\times instead of \\cdot in both the rendered output and the acceptable formats examples."))), /*#__PURE__*/React.createElement("div", {
|
|
26907
|
-
className: css(styles$
|
|
26907
|
+
className: css(styles$L.paddedY)
|
|
26908
26908
|
}, /*#__PURE__*/React.createElement(HeadingXSmall, null, "Button Sets"), buttonSetChoices), /*#__PURE__*/React.createElement(HeadingSmall, null, "Answers"), /*#__PURE__*/React.createElement("p", {
|
|
26909
26909
|
style: {
|
|
26910
26910
|
margin: "4px 0"
|
|
@@ -26975,18 +26975,18 @@ class AnswerOption extends React.Component {
|
|
|
26975
26975
|
color: "destructive",
|
|
26976
26976
|
light: true
|
|
26977
26977
|
}, "Delete");
|
|
26978
|
-
const answerStatusCss = css(styles$
|
|
26978
|
+
const answerStatusCss = css(styles$L.answerStatus, this.props.considered === "wrong" && styles$L.answerStatusWrong, this.props.considered === "correct" && styles$L.answerStatusCorrect, this.props.considered === "ungraded" && styles$L.answerStatusUngraded);
|
|
26979
26979
|
return /*#__PURE__*/React.createElement("div", {
|
|
26980
|
-
className: css(styles$
|
|
26980
|
+
className: css(styles$L.answerOption)
|
|
26981
26981
|
}, /*#__PURE__*/React.createElement("div", {
|
|
26982
|
-
className: css(styles$
|
|
26982
|
+
className: css(styles$L.answerHandle)
|
|
26983
26983
|
}), /*#__PURE__*/React.createElement("div", {
|
|
26984
|
-
className: css(styles$
|
|
26984
|
+
className: css(styles$L.answerBody)
|
|
26985
26985
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
|
|
26986
26986
|
onClick: this.toggleConsidered,
|
|
26987
26987
|
className: answerStatusCss
|
|
26988
26988
|
}, this.props.considered), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Expression, this.props.expressionProps))), /*#__PURE__*/React.createElement("div", {
|
|
26989
|
-
className: css(styles$
|
|
26989
|
+
className: css(styles$L.paddedY, styles$L.paddedX)
|
|
26990
26990
|
}, /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
26991
26991
|
label: "Answer expression must have the same form.",
|
|
26992
26992
|
checked: this.props.form,
|
|
@@ -26996,7 +26996,7 @@ class AnswerOption extends React.Component {
|
|
|
26996
26996
|
});
|
|
26997
26997
|
}
|
|
26998
26998
|
}), /*#__PURE__*/React.createElement(InfoTip$i, null, /*#__PURE__*/React.createElement("p", null, "The student's answer must be in the same form. Commutativity and excess negative signs are ignored."))), /*#__PURE__*/React.createElement("div", {
|
|
26999
|
-
className: css(styles$
|
|
26999
|
+
className: css(styles$L.paddedY, styles$L.paddedX)
|
|
27000
27000
|
}, /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
27001
27001
|
label: "Answer expression must be fully expanded and simplified.",
|
|
27002
27002
|
checked: this.props.simplify,
|
|
@@ -27006,11 +27006,11 @@ class AnswerOption extends React.Component {
|
|
|
27006
27006
|
});
|
|
27007
27007
|
}
|
|
27008
27008
|
}), /*#__PURE__*/React.createElement(InfoTip$i, null, /*#__PURE__*/React.createElement("p", null, "The student's answer must be fully expanded and simplified. Answering this equation (x^2+2x+1) with this factored equation (x+1)^2 will render this response \"Your answer is not fully expanded and simplified.\""))), /*#__PURE__*/React.createElement("div", {
|
|
27009
|
-
className: css(styles$
|
|
27009
|
+
className: css(styles$L.buttonRow, styles$L.paddedY)
|
|
27010
27010
|
}, removeButton)));
|
|
27011
27011
|
}
|
|
27012
27012
|
}
|
|
27013
|
-
const styles$
|
|
27013
|
+
const styles$L = StyleSheet.create({
|
|
27014
27014
|
paddedX: {
|
|
27015
27015
|
paddingLeft: spacing.xSmall_8,
|
|
27016
27016
|
paddingRight: spacing.xSmall_8
|
|
@@ -27105,10 +27105,10 @@ class GradedGroupEditor extends React.Component {
|
|
|
27105
27105
|
}, /*#__PURE__*/React.createElement("div", {
|
|
27106
27106
|
className: "perseus-widget-row"
|
|
27107
27107
|
}, /*#__PURE__*/React.createElement("label", {
|
|
27108
|
-
className: css(styles$
|
|
27108
|
+
className: css(styles$K.title)
|
|
27109
27109
|
}, "Title:", " ", /*#__PURE__*/React.createElement(TextInput$6, {
|
|
27110
27110
|
value: this.props.title,
|
|
27111
|
-
className: css(styles$
|
|
27111
|
+
className: css(styles$K.input)
|
|
27112
27112
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
27113
27113
|
,
|
|
27114
27114
|
onChange: this.change("title")
|
|
@@ -27133,7 +27133,7 @@ class GradedGroupEditor extends React.Component {
|
|
|
27133
27133
|
}, /*#__PURE__*/React.createElement(InlineIcon$3, iconPlus$1), " Add a hint"), this.props.hint && /*#__PURE__*/React.createElement("div", {
|
|
27134
27134
|
className: "perseus-hint-editor"
|
|
27135
27135
|
}, /*#__PURE__*/React.createElement("div", {
|
|
27136
|
-
className: css(styles$
|
|
27136
|
+
className: css(styles$K.hintsTitle)
|
|
27137
27137
|
}, "Hint"), /*#__PURE__*/React.createElement(Editor, {
|
|
27138
27138
|
ref: this.hintEditor,
|
|
27139
27139
|
content: this.props.hint ? this.props.hint.content : "",
|
|
@@ -27170,7 +27170,7 @@ GradedGroupEditor.defaultProps = {
|
|
|
27170
27170
|
images: {},
|
|
27171
27171
|
hint: null
|
|
27172
27172
|
};
|
|
27173
|
-
const styles$
|
|
27173
|
+
const styles$K = StyleSheet.create({
|
|
27174
27174
|
title: {
|
|
27175
27175
|
fontSize: 18,
|
|
27176
27176
|
fontWeight: "bold"
|
|
@@ -28525,13 +28525,13 @@ function MathquillInput(props) {
|
|
|
28525
28525
|
}
|
|
28526
28526
|
});
|
|
28527
28527
|
return /*#__PURE__*/React.createElement(View, {
|
|
28528
|
-
style: styles$
|
|
28528
|
+
style: styles$J.outerWrapper
|
|
28529
28529
|
}, /*#__PURE__*/React.createElement("span", {
|
|
28530
28530
|
ref: mathFieldWrapperRef,
|
|
28531
28531
|
className: "perseus-math-input mq-editable-field mq-math-mode"
|
|
28532
28532
|
}));
|
|
28533
28533
|
}
|
|
28534
|
-
const styles$
|
|
28534
|
+
const styles$J = StyleSheet.create({
|
|
28535
28535
|
outerWrapper: {
|
|
28536
28536
|
display: "inline-block",
|
|
28537
28537
|
borderStyle: "solid",
|
|
@@ -29577,16 +29577,16 @@ const LabeledRow = props => {
|
|
|
29577
29577
|
style
|
|
29578
29578
|
} = props;
|
|
29579
29579
|
return /*#__PURE__*/React.createElement("label", {
|
|
29580
|
-
className: css(styles$
|
|
29580
|
+
className: css(styles$I.label)
|
|
29581
29581
|
}, /*#__PURE__*/React.createElement(View, {
|
|
29582
|
-
style: [styles$
|
|
29582
|
+
style: [styles$I.row, style]
|
|
29583
29583
|
}, labelSide === "start" || /*#__PURE__*/React.createElement(LabelSmall, {
|
|
29584
|
-
style: styles$
|
|
29584
|
+
style: styles$I.spaceEnd
|
|
29585
29585
|
}, label), children, labelSide === "end" && /*#__PURE__*/React.createElement(LabelSmall, {
|
|
29586
|
-
style: styles$
|
|
29586
|
+
style: styles$I.spaceStart
|
|
29587
29587
|
}, label)));
|
|
29588
29588
|
};
|
|
29589
|
-
const styles$
|
|
29589
|
+
const styles$I = StyleSheet.create({
|
|
29590
29590
|
label: {
|
|
29591
29591
|
width: "fit-content"
|
|
29592
29592
|
},
|
|
@@ -29611,11 +29611,11 @@ function Heading({
|
|
|
29611
29611
|
onToggle
|
|
29612
29612
|
}) {
|
|
29613
29613
|
return /*#__PURE__*/React.createElement(Clickable, {
|
|
29614
|
-
style: [styles$
|
|
29614
|
+
style: [styles$H.container, !isCollapsible && styles$H.notClickable],
|
|
29615
29615
|
disabled: !isCollapsible,
|
|
29616
29616
|
onClick: () => isCollapsible && (onToggle == null ? void 0 : onToggle(!isOpen))
|
|
29617
29617
|
}, () => /*#__PURE__*/React.createElement(View, {
|
|
29618
|
-
style: styles$
|
|
29618
|
+
style: styles$H.heading
|
|
29619
29619
|
}, /*#__PURE__*/React.createElement(LabelLarge, {
|
|
29620
29620
|
style: {
|
|
29621
29621
|
fontSize: 14,
|
|
@@ -29625,7 +29625,7 @@ function Heading({
|
|
|
29625
29625
|
isExpanded: isOpen
|
|
29626
29626
|
})));
|
|
29627
29627
|
}
|
|
29628
|
-
const styles$
|
|
29628
|
+
const styles$H = StyleSheet.create({
|
|
29629
29629
|
container: {
|
|
29630
29630
|
marginTop: spacing.small_12,
|
|
29631
29631
|
// NOTE(jeremy): This is the inverse of the @editorPadding CSS
|
|
@@ -29744,6 +29744,14 @@ function getDefaultFigureForType(type) {
|
|
|
29744
29744
|
equation: "x^2",
|
|
29745
29745
|
directionalAxis: "x"
|
|
29746
29746
|
};
|
|
29747
|
+
case "label":
|
|
29748
|
+
return {
|
|
29749
|
+
type: "label",
|
|
29750
|
+
coord: [0, 0],
|
|
29751
|
+
text: "",
|
|
29752
|
+
color: DEFAULT_COLOR,
|
|
29753
|
+
size: "medium"
|
|
29754
|
+
};
|
|
29747
29755
|
default:
|
|
29748
29756
|
throw new UnreachableCaseError(type);
|
|
29749
29757
|
}
|
|
@@ -29888,19 +29896,24 @@ const LockedFigureSelect = props => {
|
|
|
29888
29896
|
onChange
|
|
29889
29897
|
} = props;
|
|
29890
29898
|
const figureTypes = ["point", "line", "vector", "ellipse", "polygon"];
|
|
29891
|
-
|
|
29899
|
+
if (props.showM2bFeatures) {
|
|
29900
|
+
figureTypes.push("function");
|
|
29901
|
+
}
|
|
29902
|
+
if (props.showLabelsFlag) {
|
|
29903
|
+
figureTypes.push("label");
|
|
29904
|
+
}
|
|
29892
29905
|
return /*#__PURE__*/React.createElement(View, {
|
|
29893
|
-
style: styles$
|
|
29906
|
+
style: styles$G.container
|
|
29894
29907
|
}, /*#__PURE__*/React.createElement(ActionMenu, {
|
|
29895
29908
|
menuText: "Add locked figure",
|
|
29896
|
-
style: styles$
|
|
29897
|
-
},
|
|
29909
|
+
style: styles$G.addElementSelect
|
|
29910
|
+
}, figureTypes.map(figureType => /*#__PURE__*/React.createElement(ActionItem, {
|
|
29898
29911
|
key: `${id}-${figureType}`,
|
|
29899
29912
|
label: figureType,
|
|
29900
29913
|
onClick: () => onChange(figureType)
|
|
29901
29914
|
}))));
|
|
29902
29915
|
};
|
|
29903
|
-
const styles$
|
|
29916
|
+
const styles$G = StyleSheet.create({
|
|
29904
29917
|
container: {
|
|
29905
29918
|
marginTop: spacing.xSmall_8
|
|
29906
29919
|
},
|
|
@@ -29970,18 +29983,18 @@ const AngleInput = props => {
|
|
|
29970
29983
|
}
|
|
29971
29984
|
return /*#__PURE__*/React.createElement(LabelMedium, {
|
|
29972
29985
|
tag: "label",
|
|
29973
|
-
style: styles$
|
|
29986
|
+
style: styles$F.row
|
|
29974
29987
|
}, "angle (degrees)", /*#__PURE__*/React.createElement(Strut, {
|
|
29975
29988
|
size: spacing.xxSmall_6
|
|
29976
29989
|
}), /*#__PURE__*/React.createElement(ScrolllessNumberTextField, {
|
|
29977
29990
|
value: angleInput,
|
|
29978
29991
|
onChange: handleAngleChange,
|
|
29979
|
-
style: styles$
|
|
29992
|
+
style: styles$F.textField
|
|
29980
29993
|
}), /*#__PURE__*/React.createElement(Strut, {
|
|
29981
29994
|
size: spacing.xxSmall_6
|
|
29982
29995
|
}));
|
|
29983
29996
|
};
|
|
29984
|
-
const styles$
|
|
29997
|
+
const styles$F = StyleSheet.create({
|
|
29985
29998
|
row: {
|
|
29986
29999
|
display: "flex",
|
|
29987
30000
|
flexDirection: "row",
|
|
@@ -30030,30 +30043,30 @@ const CoordinatePairInput = props => {
|
|
|
30030
30043
|
onChange(newCoords);
|
|
30031
30044
|
}
|
|
30032
30045
|
return /*#__PURE__*/React.createElement(View, {
|
|
30033
|
-
style: [styles$
|
|
30046
|
+
style: [styles$E.row, style]
|
|
30034
30047
|
}, /*#__PURE__*/React.createElement(LabelMedium, {
|
|
30035
30048
|
tag: "label",
|
|
30036
|
-
style: styles$
|
|
30049
|
+
style: styles$E.row
|
|
30037
30050
|
}, labels ? labels[0] : "x coord", /*#__PURE__*/React.createElement(Strut, {
|
|
30038
30051
|
size: spacing.xxSmall_6
|
|
30039
30052
|
}), /*#__PURE__*/React.createElement(ScrolllessNumberTextField, {
|
|
30040
30053
|
value: coordState[0],
|
|
30041
30054
|
onChange: newValue => handleCoordChange(newValue, 0),
|
|
30042
|
-
style: [styles$
|
|
30055
|
+
style: [styles$E.textField, error ? styles$E.errorField : undefined]
|
|
30043
30056
|
})), /*#__PURE__*/React.createElement(Strut, {
|
|
30044
30057
|
size: spacing.medium_16
|
|
30045
30058
|
}), /*#__PURE__*/React.createElement(LabelMedium, {
|
|
30046
30059
|
tag: "label",
|
|
30047
|
-
style: styles$
|
|
30060
|
+
style: styles$E.row
|
|
30048
30061
|
}, labels ? labels[1] : "y coord", /*#__PURE__*/React.createElement(Strut, {
|
|
30049
30062
|
size: spacing.xxSmall_6
|
|
30050
30063
|
}), /*#__PURE__*/React.createElement(ScrolllessNumberTextField, {
|
|
30051
30064
|
value: coordState[1],
|
|
30052
30065
|
onChange: newValue => handleCoordChange(newValue, 1),
|
|
30053
|
-
style: [styles$
|
|
30066
|
+
style: [styles$E.textField, error ? styles$E.errorField : undefined]
|
|
30054
30067
|
})));
|
|
30055
30068
|
};
|
|
30056
|
-
const styles$
|
|
30069
|
+
const styles$E = StyleSheet.create({
|
|
30057
30070
|
row: {
|
|
30058
30071
|
display: "flex",
|
|
30059
30072
|
flexDirection: "row",
|
|
@@ -30086,14 +30099,14 @@ const PerseusEditorAccordion = props => {
|
|
|
30086
30099
|
}, /*#__PURE__*/React.createElement(AccordionSection, {
|
|
30087
30100
|
expanded: expanded,
|
|
30088
30101
|
onToggle: onToggle,
|
|
30089
|
-
style: [styles$
|
|
30090
|
-
headerStyle: styles$
|
|
30102
|
+
style: [styles$D.container, containerStyle],
|
|
30103
|
+
headerStyle: styles$D.accordionHeader,
|
|
30091
30104
|
header: header
|
|
30092
30105
|
}, /*#__PURE__*/React.createElement(View, {
|
|
30093
|
-
style: [styles$
|
|
30106
|
+
style: [styles$D.accordionPanel, panelStyle]
|
|
30094
30107
|
}, children)));
|
|
30095
30108
|
};
|
|
30096
|
-
const styles$
|
|
30109
|
+
const styles$D = StyleSheet.create({
|
|
30097
30110
|
container: {
|
|
30098
30111
|
backgroundColor: color.fadedBlue8,
|
|
30099
30112
|
marginTop: spacing.xSmall_8
|
|
@@ -30124,13 +30137,13 @@ const ColorSwatch = props => {
|
|
|
30124
30137
|
"aria-label":
|
|
30125
30138
|
// Don't include an aria label for decorative circles.
|
|
30126
30139
|
!decorative ? `${color$1}, ${filled ? "filled" : "open"}` : undefined,
|
|
30127
|
-
style: [styles$
|
|
30140
|
+
style: [styles$C.colorSwatch, {
|
|
30128
30141
|
border: `4px solid ${lockedFigureColors[color$1]}`,
|
|
30129
30142
|
backgroundColor: filled ? lockedFigureColors[color$1] : color.white
|
|
30130
30143
|
}]
|
|
30131
30144
|
});
|
|
30132
30145
|
};
|
|
30133
|
-
const styles$
|
|
30146
|
+
const styles$C = StyleSheet.create({
|
|
30134
30147
|
colorSwatch: {
|
|
30135
30148
|
// Add a white outline so that the color swatch is visible when
|
|
30136
30149
|
// the dropdown option is highlighted with its blue background.
|
|
@@ -30149,10 +30162,10 @@ const ColorSelect = props => {
|
|
|
30149
30162
|
onChange
|
|
30150
30163
|
} = props;
|
|
30151
30164
|
return /*#__PURE__*/React.createElement(View, {
|
|
30152
|
-
style: [styles$
|
|
30165
|
+
style: [styles$B.row, style]
|
|
30153
30166
|
}, /*#__PURE__*/React.createElement(LabelMedium, {
|
|
30154
30167
|
tag: "label",
|
|
30155
|
-
style: styles$
|
|
30168
|
+
style: styles$B.row
|
|
30156
30169
|
}, "color", /*#__PURE__*/React.createElement(Strut, {
|
|
30157
30170
|
size: spacing.xxSmall_6
|
|
30158
30171
|
}), /*#__PURE__*/React.createElement(SingleSelect, {
|
|
@@ -30171,7 +30184,7 @@ const ColorSelect = props => {
|
|
|
30171
30184
|
})
|
|
30172
30185
|
})))));
|
|
30173
30186
|
};
|
|
30174
|
-
const styles$
|
|
30187
|
+
const styles$B = StyleSheet.create({
|
|
30175
30188
|
row: {
|
|
30176
30189
|
display: "flex",
|
|
30177
30190
|
flexDirection: "row",
|
|
@@ -30190,17 +30203,17 @@ const EllipseSwatch = props => {
|
|
|
30190
30203
|
} = props;
|
|
30191
30204
|
return /*#__PURE__*/React.createElement(View, {
|
|
30192
30205
|
"aria-label": `${color}, stroke ${strokeStyle}, fill ${fillStyle}`,
|
|
30193
|
-
style: [styles$
|
|
30206
|
+
style: [styles$A.container, {
|
|
30194
30207
|
border: `4px ${strokeStyle} ${lockedFigureColors[color]}`
|
|
30195
30208
|
}]
|
|
30196
30209
|
}, /*#__PURE__*/React.createElement(View, {
|
|
30197
|
-
style: [styles$
|
|
30210
|
+
style: [styles$A.innerCircle, {
|
|
30198
30211
|
backgroundColor: lockedFigureColors[color],
|
|
30199
30212
|
opacity: fillStyle === "white" ? 0 : lockedFigureFillStyles[fillStyle]
|
|
30200
30213
|
}]
|
|
30201
30214
|
}));
|
|
30202
30215
|
};
|
|
30203
|
-
const styles$
|
|
30216
|
+
const styles$A = StyleSheet.create({
|
|
30204
30217
|
container: {
|
|
30205
30218
|
// Add a white outline so that the color swatch is visible when
|
|
30206
30219
|
// the dropdown option is highlighted with its blue background.
|
|
@@ -30226,7 +30239,7 @@ const LineStrokeSelect = props => {
|
|
|
30226
30239
|
} = props;
|
|
30227
30240
|
return /*#__PURE__*/React.createElement(LabelMedium, {
|
|
30228
30241
|
tag: "label",
|
|
30229
|
-
style: styles$
|
|
30242
|
+
style: styles$z.lineStrokeSelect
|
|
30230
30243
|
}, "stroke", /*#__PURE__*/React.createElement(Strut, {
|
|
30231
30244
|
size: spacing.xxxSmall_4
|
|
30232
30245
|
}), /*#__PURE__*/React.createElement(SingleSelect, {
|
|
@@ -30243,7 +30256,7 @@ const LineStrokeSelect = props => {
|
|
|
30243
30256
|
label: "dashed"
|
|
30244
30257
|
})));
|
|
30245
30258
|
};
|
|
30246
|
-
const styles$
|
|
30259
|
+
const styles$z = StyleSheet.create({
|
|
30247
30260
|
lineStrokeSelect: {
|
|
30248
30261
|
display: "flex",
|
|
30249
30262
|
flexDirection: "row",
|
|
@@ -30265,40 +30278,40 @@ const LockedFigureSettingsActions = props => {
|
|
|
30265
30278
|
onRemove
|
|
30266
30279
|
} = props;
|
|
30267
30280
|
return /*#__PURE__*/React.createElement(View, {
|
|
30268
|
-
style: styles$
|
|
30281
|
+
style: styles$y.container
|
|
30269
30282
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
30270
30283
|
startIcon: trashIcon,
|
|
30271
30284
|
"aria-label": `Delete locked ${figureType}`,
|
|
30272
30285
|
onClick: onRemove,
|
|
30273
30286
|
kind: "tertiary",
|
|
30274
|
-
style: styles$
|
|
30287
|
+
style: styles$y.deleteButton
|
|
30275
30288
|
}, "Delete"), /*#__PURE__*/React.createElement(Spring, null), /*#__PURE__*/React.createElement(IconButton, {
|
|
30276
30289
|
icon: caretDoubleUpIcon,
|
|
30277
30290
|
size: "small",
|
|
30278
30291
|
"aria-label": `Move locked ${figureType} to the back`,
|
|
30279
30292
|
onClick: () => onMove("back"),
|
|
30280
|
-
style: styles$
|
|
30293
|
+
style: styles$y.iconButton
|
|
30281
30294
|
}), /*#__PURE__*/React.createElement(IconButton, {
|
|
30282
30295
|
icon: caretUpIcon,
|
|
30283
30296
|
size: "small",
|
|
30284
30297
|
"aria-label": `Move locked ${figureType} backward`,
|
|
30285
30298
|
onClick: () => onMove("backward"),
|
|
30286
|
-
style: styles$
|
|
30299
|
+
style: styles$y.iconButton
|
|
30287
30300
|
}), /*#__PURE__*/React.createElement(IconButton, {
|
|
30288
30301
|
icon: caretDownIcon,
|
|
30289
30302
|
size: "small",
|
|
30290
30303
|
"aria-label": `Move locked ${figureType} forward`,
|
|
30291
30304
|
onClick: () => onMove("forward"),
|
|
30292
|
-
style: styles$
|
|
30305
|
+
style: styles$y.iconButton
|
|
30293
30306
|
}), /*#__PURE__*/React.createElement(IconButton, {
|
|
30294
30307
|
icon: caretDoubleDownIcon,
|
|
30295
30308
|
size: "small",
|
|
30296
30309
|
"aria-label": `Move locked ${figureType} to the front`,
|
|
30297
30310
|
onClick: () => onMove("front"),
|
|
30298
|
-
style: styles$
|
|
30311
|
+
style: styles$y.iconButton
|
|
30299
30312
|
}));
|
|
30300
30313
|
};
|
|
30301
|
-
const styles$
|
|
30314
|
+
const styles$y = StyleSheet.create({
|
|
30302
30315
|
container: {
|
|
30303
30316
|
width: "100%",
|
|
30304
30317
|
flexDirection: "row",
|
|
@@ -30345,7 +30358,7 @@ const LockedEllipseSettings = props => {
|
|
|
30345
30358
|
/*#__PURE__*/
|
|
30346
30359
|
// Summary: Ellipse, center, radius, color (opacity, dashed)
|
|
30347
30360
|
React.createElement(View, {
|
|
30348
|
-
style: styles$
|
|
30361
|
+
style: styles$x.row
|
|
30349
30362
|
}, /*#__PURE__*/React.createElement(LabelLarge, null, `Ellipse (${center[0]}, ${center[1]}), radius ${radius[0]}, ${radius[1]}`), /*#__PURE__*/React.createElement(Strut, {
|
|
30350
30363
|
size: spacing.xSmall_8
|
|
30351
30364
|
}), /*#__PURE__*/React.createElement(EllipseSwatch, {
|
|
@@ -30354,19 +30367,19 @@ const LockedEllipseSettings = props => {
|
|
|
30354
30367
|
strokeStyle: strokeStyle
|
|
30355
30368
|
}))
|
|
30356
30369
|
}, /*#__PURE__*/React.createElement(View, {
|
|
30357
|
-
style: styles$
|
|
30370
|
+
style: styles$x.row
|
|
30358
30371
|
}, /*#__PURE__*/React.createElement(CoordinatePairInput, {
|
|
30359
30372
|
coord: center,
|
|
30360
|
-
style: styles$
|
|
30373
|
+
style: styles$x.spaceUnder,
|
|
30361
30374
|
onChange: newCoords => onChangeProps({
|
|
30362
30375
|
center: newCoords
|
|
30363
30376
|
})
|
|
30364
30377
|
}), /*#__PURE__*/React.createElement(View, {
|
|
30365
|
-
style: styles$
|
|
30378
|
+
style: styles$x.spaceUnder
|
|
30366
30379
|
}, /*#__PURE__*/React.createElement(InfoTip$d, null, "The coordinates for the center of the ellipse."))), /*#__PURE__*/React.createElement(CoordinatePairInput, {
|
|
30367
30380
|
coord: radius,
|
|
30368
30381
|
labels: ["x radius", "y radius"],
|
|
30369
|
-
style: styles$
|
|
30382
|
+
style: styles$x.spaceUnder,
|
|
30370
30383
|
onChange: newCoords => onChangeProps({
|
|
30371
30384
|
radius: newCoords
|
|
30372
30385
|
})
|
|
@@ -30378,7 +30391,7 @@ const LockedEllipseSettings = props => {
|
|
|
30378
30391
|
}), /*#__PURE__*/React.createElement(Strut, {
|
|
30379
30392
|
size: spacing.xSmall_8
|
|
30380
30393
|
}), /*#__PURE__*/React.createElement(View, {
|
|
30381
|
-
style: [styles$
|
|
30394
|
+
style: [styles$x.row, styles$x.spaceUnder]
|
|
30382
30395
|
}, /*#__PURE__*/React.createElement(ColorSelect, {
|
|
30383
30396
|
selectedValue: color,
|
|
30384
30397
|
onChange: handleColorChange
|
|
@@ -30386,7 +30399,7 @@ const LockedEllipseSettings = props => {
|
|
|
30386
30399
|
size: spacing.medium_16
|
|
30387
30400
|
}), /*#__PURE__*/React.createElement(LabelMedium, {
|
|
30388
30401
|
tag: "label",
|
|
30389
|
-
style: [styles$
|
|
30402
|
+
style: [styles$x.row, styles$x.truncatedWidth]
|
|
30390
30403
|
}, "fill", /*#__PURE__*/React.createElement(Strut, {
|
|
30391
30404
|
size: spacing.xxSmall_6
|
|
30392
30405
|
}), /*#__PURE__*/React.createElement(SingleSelect, {
|
|
@@ -30412,7 +30425,7 @@ const LockedEllipseSettings = props => {
|
|
|
30412
30425
|
onRemove: onRemove
|
|
30413
30426
|
}));
|
|
30414
30427
|
};
|
|
30415
|
-
const styles$
|
|
30428
|
+
const styles$x = StyleSheet.create({
|
|
30416
30429
|
row: {
|
|
30417
30430
|
display: "flex",
|
|
30418
30431
|
flexDirection: "row",
|
|
@@ -30433,15 +30446,15 @@ const LineSwatch = props => {
|
|
|
30433
30446
|
lineStyle
|
|
30434
30447
|
} = props;
|
|
30435
30448
|
return /*#__PURE__*/React.createElement(View, {
|
|
30436
|
-
style: styles$
|
|
30449
|
+
style: styles$w.container
|
|
30437
30450
|
}, /*#__PURE__*/React.createElement(View, {
|
|
30438
30451
|
"aria-label": `${color}, ${lineStyle}`,
|
|
30439
|
-
style: [styles$
|
|
30452
|
+
style: [styles$w.lineSwatch, {
|
|
30440
30453
|
border: `5px ${lineStyle} ${lockedFigureColors[color]}`
|
|
30441
30454
|
}]
|
|
30442
30455
|
}));
|
|
30443
30456
|
};
|
|
30444
|
-
const styles$
|
|
30457
|
+
const styles$w = StyleSheet.create({
|
|
30445
30458
|
container: {
|
|
30446
30459
|
backgroundColor: color.white,
|
|
30447
30460
|
justifyContent: "center",
|
|
@@ -30515,9 +30528,9 @@ const LockedFunctionSettings = props => {
|
|
|
30515
30528
|
expanded: props.expanded,
|
|
30516
30529
|
onToggle: props.onToggle,
|
|
30517
30530
|
header: /*#__PURE__*/React.createElement(View, {
|
|
30518
|
-
style: styles$
|
|
30531
|
+
style: styles$v.row
|
|
30519
30532
|
}, /*#__PURE__*/React.createElement(LabelLarge, {
|
|
30520
|
-
style: styles$
|
|
30533
|
+
style: styles$v.accordionHeader
|
|
30521
30534
|
}, lineLabel), /*#__PURE__*/React.createElement(Strut, {
|
|
30522
30535
|
size: spacing.xSmall_8
|
|
30523
30536
|
}), /*#__PURE__*/React.createElement(LineSwatch, {
|
|
@@ -30525,7 +30538,7 @@ const LockedFunctionSettings = props => {
|
|
|
30525
30538
|
lineStyle: strokeStyle
|
|
30526
30539
|
}))
|
|
30527
30540
|
}, /*#__PURE__*/React.createElement(View, {
|
|
30528
|
-
style: [styles$
|
|
30541
|
+
style: [styles$v.row, styles$v.spaceUnder]
|
|
30529
30542
|
}, /*#__PURE__*/React.createElement(ColorSelect, {
|
|
30530
30543
|
selectedValue: lineColor,
|
|
30531
30544
|
onChange: newValue => {
|
|
@@ -30539,14 +30552,14 @@ const LockedFunctionSettings = props => {
|
|
|
30539
30552
|
handlePropChange("strokeStyle", newValue);
|
|
30540
30553
|
}
|
|
30541
30554
|
})), /*#__PURE__*/React.createElement(View, {
|
|
30542
|
-
style: [styles$
|
|
30555
|
+
style: [styles$v.row, styles$v.rowSpace]
|
|
30543
30556
|
}, /*#__PURE__*/React.createElement(SingleSelect, {
|
|
30544
30557
|
selectedValue: directionalAxis,
|
|
30545
30558
|
onChange: newValue => {
|
|
30546
30559
|
handlePropChange("directionalAxis", newValue);
|
|
30547
30560
|
},
|
|
30548
30561
|
"aria-label": "equation prefix",
|
|
30549
|
-
style: styles$
|
|
30562
|
+
style: styles$v.equationPrefix
|
|
30550
30563
|
// Placeholder is required, but never gets used.
|
|
30551
30564
|
,
|
|
30552
30565
|
placeholder: ""
|
|
@@ -30565,17 +30578,17 @@ const LockedFunctionSettings = props => {
|
|
|
30565
30578
|
onChange: newValue => {
|
|
30566
30579
|
handlePropChange("equation", newValue);
|
|
30567
30580
|
},
|
|
30568
|
-
style: [styles$
|
|
30581
|
+
style: [styles$v.textField]
|
|
30569
30582
|
})), /*#__PURE__*/React.createElement(View, {
|
|
30570
|
-
style: [styles$
|
|
30583
|
+
style: [styles$v.row, styles$v.rowSpace]
|
|
30571
30584
|
}, /*#__PURE__*/React.createElement(LabelMedium, {
|
|
30572
30585
|
tag: "label",
|
|
30573
|
-
style: styles$
|
|
30586
|
+
style: styles$v.domainMin
|
|
30574
30587
|
}, "domain min", /*#__PURE__*/React.createElement(Strut, {
|
|
30575
30588
|
size: spacing.xxSmall_6
|
|
30576
30589
|
}), /*#__PURE__*/React.createElement(TextField, {
|
|
30577
30590
|
type: "number",
|
|
30578
|
-
style: styles$
|
|
30591
|
+
style: styles$v.domainMinField,
|
|
30579
30592
|
value: domainEntries[0],
|
|
30580
30593
|
onChange: newValue => {
|
|
30581
30594
|
handleDomainChange(0, newValue);
|
|
@@ -30585,12 +30598,12 @@ const LockedFunctionSettings = props => {
|
|
|
30585
30598
|
}), /*#__PURE__*/React.createElement(LabelMedium, {
|
|
30586
30599
|
tag: "label",
|
|
30587
30600
|
"aria-label": "domain max",
|
|
30588
|
-
style: styles$
|
|
30601
|
+
style: styles$v.domainMax
|
|
30589
30602
|
}, "max", /*#__PURE__*/React.createElement(Strut, {
|
|
30590
30603
|
size: spacing.xxSmall_6
|
|
30591
30604
|
}), /*#__PURE__*/React.createElement(TextField, {
|
|
30592
30605
|
type: "number",
|
|
30593
|
-
style: styles$
|
|
30606
|
+
style: styles$v.domainMaxField,
|
|
30594
30607
|
value: domainEntries[1],
|
|
30595
30608
|
onChange: newValue => {
|
|
30596
30609
|
handleDomainChange(1, newValue);
|
|
@@ -30601,7 +30614,7 @@ const LockedFunctionSettings = props => {
|
|
|
30601
30614
|
onRemove: onRemove
|
|
30602
30615
|
}));
|
|
30603
30616
|
};
|
|
30604
|
-
const styles$
|
|
30617
|
+
const styles$v = StyleSheet.create({
|
|
30605
30618
|
accordionHeader: {
|
|
30606
30619
|
textOverflow: "ellipsis",
|
|
30607
30620
|
// A maximum width needs to be specified in order for the ellipsis to work.
|
|
@@ -30656,6 +30669,123 @@ const styles$u = StyleSheet.create({
|
|
|
30656
30669
|
}
|
|
30657
30670
|
});
|
|
30658
30671
|
|
|
30672
|
+
/**
|
|
30673
|
+
* LockedLabelSettings is a component that allows the user to edit the
|
|
30674
|
+
* settings of specifically a locked label on the graph within the
|
|
30675
|
+
* Interactive Graph widget.
|
|
30676
|
+
*
|
|
30677
|
+
* Used in the interactive graph editor's locked figures section.
|
|
30678
|
+
*/
|
|
30679
|
+
function LockedLabelSettings(props) {
|
|
30680
|
+
const {
|
|
30681
|
+
type,
|
|
30682
|
+
coord,
|
|
30683
|
+
color: color$1,
|
|
30684
|
+
size,
|
|
30685
|
+
text,
|
|
30686
|
+
expanded,
|
|
30687
|
+
onChangeProps,
|
|
30688
|
+
onMove,
|
|
30689
|
+
onRemove,
|
|
30690
|
+
onToggle
|
|
30691
|
+
} = props;
|
|
30692
|
+
return /*#__PURE__*/React.createElement(PerseusEditorAccordion, {
|
|
30693
|
+
expanded: expanded,
|
|
30694
|
+
onToggle: onToggle,
|
|
30695
|
+
header: /*#__PURE__*/React.createElement(View, {
|
|
30696
|
+
style: [styles$u.row, styles$u.accordionHeaderContainer]
|
|
30697
|
+
}, /*#__PURE__*/React.createElement(LabelLarge, null, "Label (", coord[0], ", ", coord[1], ")"), /*#__PURE__*/React.createElement(Strut, {
|
|
30698
|
+
size: spacing.xSmall_8
|
|
30699
|
+
}), text !== "" && /*#__PURE__*/React.createElement(LabelLarge, {
|
|
30700
|
+
style: [{
|
|
30701
|
+
backgroundColor: color.white,
|
|
30702
|
+
color: lockedFigureColors[color$1]
|
|
30703
|
+
}, styles$u.accordionHeader]
|
|
30704
|
+
}, text))
|
|
30705
|
+
}, /*#__PURE__*/React.createElement(CoordinatePairInput, {
|
|
30706
|
+
coord: coord,
|
|
30707
|
+
onChange: newCoords => {
|
|
30708
|
+
onChangeProps({
|
|
30709
|
+
coord: newCoords
|
|
30710
|
+
});
|
|
30711
|
+
},
|
|
30712
|
+
style: styles$u.spaceUnder
|
|
30713
|
+
}), /*#__PURE__*/React.createElement(LabelMedium, {
|
|
30714
|
+
tag: "label",
|
|
30715
|
+
style: [styles$u.row, styles$u.spaceUnder]
|
|
30716
|
+
}, "TeX", /*#__PURE__*/React.createElement(Strut, {
|
|
30717
|
+
size: spacing.xSmall_8
|
|
30718
|
+
}), /*#__PURE__*/React.createElement(TextField, {
|
|
30719
|
+
value: text,
|
|
30720
|
+
placeholder: "ex. x^2 or \\frac{1}{2}",
|
|
30721
|
+
onChange: newValue => onChangeProps({
|
|
30722
|
+
text: newValue
|
|
30723
|
+
})
|
|
30724
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
30725
|
+
style: styles$u.row
|
|
30726
|
+
}, /*#__PURE__*/React.createElement(ColorSelect, {
|
|
30727
|
+
selectedValue: color$1,
|
|
30728
|
+
onChange: newColor => {
|
|
30729
|
+
onChangeProps({
|
|
30730
|
+
color: newColor
|
|
30731
|
+
});
|
|
30732
|
+
},
|
|
30733
|
+
style: styles$u.spaceUnder
|
|
30734
|
+
}), /*#__PURE__*/React.createElement(Strut, {
|
|
30735
|
+
size: spacing.medium_16
|
|
30736
|
+
}), /*#__PURE__*/React.createElement(LabelMedium, {
|
|
30737
|
+
tag: "label",
|
|
30738
|
+
style: styles$u.row
|
|
30739
|
+
}, "size", /*#__PURE__*/React.createElement(Strut, {
|
|
30740
|
+
size: spacing.xSmall_8
|
|
30741
|
+
}), /*#__PURE__*/React.createElement(SingleSelect, {
|
|
30742
|
+
selectedValue: size,
|
|
30743
|
+
onChange: newValue => onChangeProps({
|
|
30744
|
+
size: newValue
|
|
30745
|
+
})
|
|
30746
|
+
// Placeholder is required, but never gets used since
|
|
30747
|
+
// we have a label for the select.
|
|
30748
|
+
,
|
|
30749
|
+
placeholder: ""
|
|
30750
|
+
}, /*#__PURE__*/React.createElement(OptionItem, {
|
|
30751
|
+
value: "small",
|
|
30752
|
+
label: "small"
|
|
30753
|
+
}), /*#__PURE__*/React.createElement(OptionItem, {
|
|
30754
|
+
value: "medium",
|
|
30755
|
+
label: "medium"
|
|
30756
|
+
}), /*#__PURE__*/React.createElement(OptionItem, {
|
|
30757
|
+
value: "large",
|
|
30758
|
+
label: "large"
|
|
30759
|
+
})))), /*#__PURE__*/React.createElement(LockedFigureSettingsActions, {
|
|
30760
|
+
figureType: type,
|
|
30761
|
+
onMove: onMove,
|
|
30762
|
+
onRemove: onRemove
|
|
30763
|
+
}));
|
|
30764
|
+
}
|
|
30765
|
+
const styles$u = StyleSheet.create({
|
|
30766
|
+
accordionHeaderContainer: {
|
|
30767
|
+
// Stop the label summary from wrapping.
|
|
30768
|
+
whiteSpace: "nowrap"
|
|
30769
|
+
},
|
|
30770
|
+
accordionHeader: {
|
|
30771
|
+
padding: spacing.xxxSmall_4,
|
|
30772
|
+
marginInlineEnd: spacing.xSmall_8,
|
|
30773
|
+
borderRadius: spacing.xxxSmall_4,
|
|
30774
|
+
textOverflow: "ellipsis",
|
|
30775
|
+
overflow: "hidden"
|
|
30776
|
+
},
|
|
30777
|
+
row: {
|
|
30778
|
+
display: "flex",
|
|
30779
|
+
flexDirection: "row",
|
|
30780
|
+
alignItems: "center",
|
|
30781
|
+
// Allow truncation, stop bleeding over the edge.
|
|
30782
|
+
minWidth: 0
|
|
30783
|
+
},
|
|
30784
|
+
spaceUnder: {
|
|
30785
|
+
marginBottom: spacing.xSmall_8
|
|
30786
|
+
}
|
|
30787
|
+
});
|
|
30788
|
+
|
|
30659
30789
|
const LabeledSwitch = props => {
|
|
30660
30790
|
const {
|
|
30661
30791
|
checked,
|
|
@@ -31347,6 +31477,11 @@ const LockedFigureSettings = props => {
|
|
|
31347
31477
|
return /*#__PURE__*/React.createElement(LockedFunctionSettings, props);
|
|
31348
31478
|
}
|
|
31349
31479
|
break;
|
|
31480
|
+
case "label":
|
|
31481
|
+
if (props.showLabelsFlag) {
|
|
31482
|
+
return /*#__PURE__*/React.createElement(LockedLabelSettings, props);
|
|
31483
|
+
}
|
|
31484
|
+
break;
|
|
31350
31485
|
}
|
|
31351
31486
|
return null;
|
|
31352
31487
|
};
|
|
@@ -31453,6 +31588,7 @@ const LockedFiguresSection = props => {
|
|
|
31453
31588
|
return /*#__PURE__*/React.createElement(LockedFigureSettings, _extends({
|
|
31454
31589
|
key: `${uniqueId}-locked-${figure}-${index}`,
|
|
31455
31590
|
showM2bFeatures: props.showM2bFeatures,
|
|
31591
|
+
showLabelsFlag: props.showLabelsFlag,
|
|
31456
31592
|
expanded: expandedStates[index],
|
|
31457
31593
|
onToggle: newValue => {
|
|
31458
31594
|
const newExpanded = [...expandedStates];
|
|
@@ -31468,6 +31604,7 @@ const LockedFiguresSection = props => {
|
|
|
31468
31604
|
style: styles$m.buttonContainer
|
|
31469
31605
|
}, /*#__PURE__*/React.createElement(LockedFigureSelect, {
|
|
31470
31606
|
showM2bFeatures: props.showM2bFeatures,
|
|
31607
|
+
showLabelsFlag: props.showLabelsFlag,
|
|
31471
31608
|
id: `${uniqueId}-select`,
|
|
31472
31609
|
onChange: addLockedFigure
|
|
31473
31610
|
}), /*#__PURE__*/React.createElement(Strut, {
|
|
@@ -32598,7 +32735,7 @@ class InteractiveGraphEditor extends React.Component {
|
|
|
32598
32735
|
DeprecationMixin.UNSAFE_componentWillMount.call(this);
|
|
32599
32736
|
}
|
|
32600
32737
|
render() {
|
|
32601
|
-
var _this$props$graph$typ, _this$props$graph2, _this$props$correct, _this$props$correct2, _this$props$correct3, _this$props$correct4, _this$props$correct5, _this$props$correct6, _this$props$correct7, _this$props$correct8, _this$props$correct9, _this$props$correct10, _this$props$correct11, _this$props$graph5, _this$props$apiOption, _this$props$apiOption2;
|
|
32738
|
+
var _this$props$graph$typ, _this$props$graph2, _this$props$correct, _this$props$correct2, _this$props$correct3, _this$props$correct4, _this$props$correct5, _this$props$correct6, _this$props$correct7, _this$props$correct8, _this$props$correct9, _this$props$correct10, _this$props$correct11, _this$props$graph5, _this$props$apiOption, _this$props$apiOption2, _this$props$apiOption3;
|
|
32602
32739
|
let graph;
|
|
32603
32740
|
let equationString;
|
|
32604
32741
|
const gridStep = this.props.gridStep || Util.getGridStep(this.props.range, this.props.step, interactiveSizes.defaultBoxSize);
|
|
@@ -32860,6 +32997,7 @@ class InteractiveGraphEditor extends React.Component {
|
|
|
32860
32997
|
// is using Mafs.
|
|
32861
32998
|
this.props.graph && ((_this$props$apiOption = this.props.apiOptions) == null || (_this$props$apiOption = _this$props$apiOption.flags) == null || (_this$props$apiOption = _this$props$apiOption.mafs) == null ? void 0 : _this$props$apiOption[this.props.graph.type]) && /*#__PURE__*/React.createElement(LockedFiguresSection, {
|
|
32862
32999
|
showM2bFeatures: (_this$props$apiOption2 = this.props.apiOptions) == null || (_this$props$apiOption2 = _this$props$apiOption2.flags) == null || (_this$props$apiOption2 = _this$props$apiOption2.mafs) == null ? void 0 : _this$props$apiOption2["interactive-graph-locked-features-m2b"],
|
|
33000
|
+
showLabelsFlag: (_this$props$apiOption3 = this.props.apiOptions) == null || (_this$props$apiOption3 = _this$props$apiOption3.flags) == null || (_this$props$apiOption3 = _this$props$apiOption3.mafs) == null ? void 0 : _this$props$apiOption3["interactive-graph-locked-features-labels"],
|
|
32863
33001
|
figures: this.props.lockedFigures,
|
|
32864
33002
|
onChange: this.props.onChange
|
|
32865
33003
|
}));
|
|
@@ -35775,6 +35913,36 @@ PassageRefTargetEditor.defaultProps = {
|
|
|
35775
35913
|
content: ""
|
|
35776
35914
|
};
|
|
35777
35915
|
|
|
35916
|
+
/* eslint-disable @khanacademy/ts-no-error-suppressions */
|
|
35917
|
+
class PhetSimulationEditor extends React.Component {
|
|
35918
|
+
render() {
|
|
35919
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabeledTextField, {
|
|
35920
|
+
label: "URL",
|
|
35921
|
+
value: this.props.url,
|
|
35922
|
+
onChange: url => this.props.onChange({
|
|
35923
|
+
url
|
|
35924
|
+
})
|
|
35925
|
+
}), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(LabeledTextField, {
|
|
35926
|
+
label: "Description",
|
|
35927
|
+
value: this.props.description,
|
|
35928
|
+
onChange: description => this.props.onChange({
|
|
35929
|
+
description
|
|
35930
|
+
})
|
|
35931
|
+
}));
|
|
35932
|
+
}
|
|
35933
|
+
serialize() {
|
|
35934
|
+
return {
|
|
35935
|
+
url: this.props.url,
|
|
35936
|
+
description: this.props.description
|
|
35937
|
+
};
|
|
35938
|
+
}
|
|
35939
|
+
}
|
|
35940
|
+
PhetSimulationEditor.defaultProps = {
|
|
35941
|
+
url: "",
|
|
35942
|
+
description: ""
|
|
35943
|
+
};
|
|
35944
|
+
PhetSimulationEditor.widgetName = "phet-simulation";
|
|
35945
|
+
|
|
35778
35946
|
const {
|
|
35779
35947
|
InfoTip: InfoTip$3,
|
|
35780
35948
|
NumberInput: NumberInput$2,
|
|
@@ -36721,7 +36889,7 @@ VideoEditor.defaultProps = {
|
|
|
36721
36889
|
location: ""
|
|
36722
36890
|
};
|
|
36723
36891
|
|
|
36724
|
-
var AllEditors = [CategorizerEditor, CSProgramEditor, DefinitionEditor, DropdownEditor, ExampleGraphieWidgetEditor, ExampleWidgetEditor, ExplanationEditor, ExpressionEditor, GradedGroupEditor, GradedGroupSetEditor, GrapherEditor, GroupEditor, IframeEditor, ImageEditor, InputNumberEditor, InteractionEditor, InteractiveGraphEditor, LabelImageEditor, MatcherEditor, MatrixEditor, MeasurerEditor, MoleculeWidgetEditor, NumberLineEditor, NumericInputEditor, OrdererEditor, PassageEditor, PassageRefEditor, PassageRefTargetEditor, PlotterEditor, PythonProgramEditor, SimpleMarkdownTesterEditor, SorterEditor, TableEditor, VideoEditor, RadioEditor, DeprecatedStandinEditor];
|
|
36892
|
+
var AllEditors = [CategorizerEditor, CSProgramEditor, DefinitionEditor, DropdownEditor, ExampleGraphieWidgetEditor, ExampleWidgetEditor, ExplanationEditor, ExpressionEditor, GradedGroupEditor, GradedGroupSetEditor, GrapherEditor, GroupEditor, IframeEditor, ImageEditor, InputNumberEditor, InteractionEditor, InteractiveGraphEditor, LabelImageEditor, MatcherEditor, MatrixEditor, MeasurerEditor, MoleculeWidgetEditor, NumberLineEditor, NumericInputEditor, OrdererEditor, PassageEditor, PassageRefEditor, PassageRefTargetEditor, PhetSimulationEditor, PlotterEditor, PythonProgramEditor, SimpleMarkdownTesterEditor, SorterEditor, TableEditor, VideoEditor, RadioEditor, DeprecatedStandinEditor];
|
|
36725
36893
|
|
|
36726
36894
|
/* eslint-disable @khanacademy/ts-no-error-suppressions */
|
|
36727
36895
|
class TextInput extends React.Component {
|