@khanacademy/perseus-editor 11.4.0 → 11.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/components/util.d.ts +1 -0
- package/dist/es/index.js +259 -202
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +259 -202
- package/dist/index.js.map +1 -1
- package/dist/widgets/interactive-graph-editor.d.ts +0 -62
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -83,7 +83,7 @@ var arrowCounterClockwise__default = /*#__PURE__*/_interopDefaultLegacy(arrowCou
|
|
|
83
83
|
|
|
84
84
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
85
85
|
const libName = "@khanacademy/perseus-editor";
|
|
86
|
-
const libVersion = "11.
|
|
86
|
+
const libVersion = "11.5.0";
|
|
87
87
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
88
88
|
|
|
89
89
|
function _extends() {
|
|
@@ -278,13 +278,13 @@ class SectionControlButton extends React__namespace.Component {
|
|
|
278
278
|
role: "button",
|
|
279
279
|
hideDefaultFocusRing: true,
|
|
280
280
|
"aria-label": title,
|
|
281
|
-
style: styles$
|
|
281
|
+
style: styles$S.button
|
|
282
282
|
}, _ref => {
|
|
283
283
|
return /*#__PURE__*/React__namespace.createElement(InlineIcon$a, icon);
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
const styles$
|
|
287
|
+
const styles$S = aphrodite.StyleSheet.create({
|
|
288
288
|
button: {
|
|
289
289
|
backgroundColor: wonderBlocksTokens.color.gold,
|
|
290
290
|
margin: 2,
|
|
@@ -20789,13 +20789,13 @@ class WidgetSelect extends React__namespace.Component {
|
|
|
20789
20789
|
* that collapse a region.
|
|
20790
20790
|
*/
|
|
20791
20791
|
function ToggleableCaret(props) {
|
|
20792
|
-
const iconStyle = props.isExpanded ? styles$
|
|
20792
|
+
const iconStyle = props.isExpanded ? styles$R.expanded : styles$R.collapsed;
|
|
20793
20793
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksIcon.PhosphorIcon, {
|
|
20794
20794
|
icon: caretRight__default["default"],
|
|
20795
20795
|
style: iconStyle
|
|
20796
20796
|
});
|
|
20797
20797
|
}
|
|
20798
|
-
const styles$
|
|
20798
|
+
const styles$R = aphrodite.StyleSheet.create({
|
|
20799
20799
|
collapsed: {
|
|
20800
20800
|
transition: ".15s"
|
|
20801
20801
|
},
|
|
@@ -20825,16 +20825,16 @@ class TexErrorView extends React__namespace.Component {
|
|
|
20825
20825
|
showErrors
|
|
20826
20826
|
} = this.state;
|
|
20827
20827
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
20828
|
-
style: styles$
|
|
20828
|
+
style: styles$Q.errorContainer
|
|
20829
20829
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
20830
|
-
style: styles$
|
|
20830
|
+
style: styles$Q.title,
|
|
20831
20831
|
onClick: this.handleToggleTexErrors
|
|
20832
20832
|
}, /*#__PURE__*/React__namespace.createElement(ToggleableCaret, {
|
|
20833
20833
|
isExpanded: showErrors
|
|
20834
20834
|
}), "\xA0 TeX Errors (", errorList.length, ")"), showErrors && /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
20835
|
-
style: styles$
|
|
20835
|
+
style: styles$Q.errorExplanation
|
|
20836
20836
|
}, "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__namespace.createElement(wonderBlocksCore.View, {
|
|
20837
|
-
style: styles$
|
|
20837
|
+
style: styles$Q.error,
|
|
20838
20838
|
key: index
|
|
20839
20839
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
20840
20840
|
style: {
|
|
@@ -20843,7 +20843,7 @@ class TexErrorView extends React__namespace.Component {
|
|
|
20843
20843
|
}, e.math), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, e.message))));
|
|
20844
20844
|
}
|
|
20845
20845
|
}
|
|
20846
|
-
const styles$
|
|
20846
|
+
const styles$Q = aphrodite.StyleSheet.create({
|
|
20847
20847
|
title: {
|
|
20848
20848
|
backgroundColor: "#eee",
|
|
20849
20849
|
fontSize: "1.25em",
|
|
@@ -23920,7 +23920,7 @@ class ItemExtrasEditor extends React__namespace.Component {
|
|
|
23920
23920
|
}
|
|
23921
23921
|
}
|
|
23922
23922
|
const ItemExtraCheckbox = props => /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
23923
|
-
style: [styles$
|
|
23923
|
+
style: [styles$P.checkbox, props.indent ? styles$P.indented : undefined]
|
|
23924
23924
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.Checkbox, {
|
|
23925
23925
|
label: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
23926
23926
|
style: {
|
|
@@ -23930,7 +23930,7 @@ const ItemExtraCheckbox = props => /*#__PURE__*/React__namespace.createElement(w
|
|
|
23930
23930
|
checked: props.checked,
|
|
23931
23931
|
onChange: newCheckedState => props.onChange(newCheckedState)
|
|
23932
23932
|
}));
|
|
23933
|
-
const styles$
|
|
23933
|
+
const styles$P = aphrodite.StyleSheet.create({
|
|
23934
23934
|
indented: {
|
|
23935
23935
|
marginInlineStart: wonderBlocksTokens.spacing.large_24
|
|
23936
23936
|
}
|
|
@@ -24593,12 +24593,12 @@ class SimpleButton extends React__namespace.Component {
|
|
|
24593
24593
|
...otherProps
|
|
24594
24594
|
} = this.props;
|
|
24595
24595
|
return /*#__PURE__*/React__namespace.createElement("div", _extends({
|
|
24596
|
-
className: aphrodite.css(styles$
|
|
24596
|
+
className: aphrodite.css(styles$O.baseButton, color === "green" && styles$O.green, color === "orange" && styles$O.orange),
|
|
24597
24597
|
onClick: onClick
|
|
24598
24598
|
}, otherProps), children);
|
|
24599
24599
|
}
|
|
24600
24600
|
}
|
|
24601
|
-
const styles$
|
|
24601
|
+
const styles$O = aphrodite.StyleSheet.create({
|
|
24602
24602
|
baseButton: {
|
|
24603
24603
|
top: "0",
|
|
24604
24604
|
fontSize: "11px",
|
|
@@ -24811,23 +24811,23 @@ const LeafContainer = _ref2 => {
|
|
|
24811
24811
|
} = _ref2;
|
|
24812
24812
|
const hasPreviewHeading = shape.type === "content" || shape.type === "hint";
|
|
24813
24813
|
const previewHeading = hasPreviewHeading && /*#__PURE__*/React__namespace.createElement("div", {
|
|
24814
|
-
className: aphrodite.css(styles$
|
|
24814
|
+
className: aphrodite.css(styles$N.containerHeader)
|
|
24815
24815
|
}, /*#__PURE__*/React__namespace.createElement(Header, {
|
|
24816
24816
|
depth: path.length,
|
|
24817
|
-
className: aphrodite.css(styles$
|
|
24817
|
+
className: aphrodite.css(styles$N.containerTitle)
|
|
24818
24818
|
}, capitalize(name)));
|
|
24819
24819
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
24820
|
-
className: aphrodite.css(styles$
|
|
24820
|
+
className: aphrodite.css(styles$N.container)
|
|
24821
24821
|
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
24822
|
-
className: aphrodite.css(styles$
|
|
24822
|
+
className: aphrodite.css(styles$N.row, styles$N.rowHeading)
|
|
24823
24823
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24824
|
-
className: aphrodite.css(styles$
|
|
24824
|
+
className: aphrodite.css(styles$N.columnLeft)
|
|
24825
24825
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24826
|
-
className: "pod-title " + aphrodite.css(styles$
|
|
24826
|
+
className: "pod-title " + aphrodite.css(styles$N.containerHeader)
|
|
24827
24827
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24828
|
-
className: aphrodite.css(styles$
|
|
24828
|
+
className: aphrodite.css(styles$N.containerTitle)
|
|
24829
24829
|
}, capitalize(name)), controls)), /*#__PURE__*/React__namespace.createElement("div", {
|
|
24830
|
-
className: aphrodite.css(styles$
|
|
24830
|
+
className: aphrodite.css(styles$N.columnRight)
|
|
24831
24831
|
}, previewHeading)), children);
|
|
24832
24832
|
};
|
|
24833
24833
|
const ArrayContainer = props => {
|
|
@@ -24840,11 +24840,11 @@ const ArrayContainer = props => {
|
|
|
24840
24840
|
actions
|
|
24841
24841
|
} = props;
|
|
24842
24842
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
24843
|
-
className: aphrodite.css(styles$
|
|
24843
|
+
className: aphrodite.css(styles$N.container)
|
|
24844
24844
|
}, controls && /*#__PURE__*/React__namespace.createElement("div", {
|
|
24845
|
-
className: aphrodite.css(styles$
|
|
24845
|
+
className: aphrodite.css(styles$N.columnLeft, styles$N.containerHeader)
|
|
24846
24846
|
}, controls), /*#__PURE__*/React__namespace.createElement("div", null, children), /*#__PURE__*/React__namespace.createElement("div", {
|
|
24847
|
-
className: aphrodite.css(styles$
|
|
24847
|
+
className: aphrodite.css(styles$N.columnLeft)
|
|
24848
24848
|
}, /*#__PURE__*/React__namespace.createElement("a", {
|
|
24849
24849
|
href: "javascript:void 0",
|
|
24850
24850
|
onClick: () => actions.addArrayElement(path, shape.elementShape)
|
|
@@ -24858,28 +24858,28 @@ const ObjectContainer = _ref3 => {
|
|
|
24858
24858
|
path
|
|
24859
24859
|
} = _ref3;
|
|
24860
24860
|
const headingEditor = /*#__PURE__*/React__namespace.createElement("div", {
|
|
24861
|
-
className: aphrodite.css(styles$
|
|
24861
|
+
className: aphrodite.css(styles$N.containerHeader)
|
|
24862
24862
|
}, /*#__PURE__*/React__namespace.createElement(Header, {
|
|
24863
24863
|
depth: path.length,
|
|
24864
|
-
className: aphrodite.css(styles$
|
|
24864
|
+
className: aphrodite.css(styles$N.containerTitle)
|
|
24865
24865
|
}, capitalize(name)), controls);
|
|
24866
24866
|
const headingPreview = (name || controls) && /*#__PURE__*/React__namespace.createElement("div", {
|
|
24867
|
-
className: aphrodite.css(styles$
|
|
24867
|
+
className: aphrodite.css(styles$N.containerHeader, styles$N.previewCollectionHeader)
|
|
24868
24868
|
}, /*#__PURE__*/React__namespace.createElement(Header, {
|
|
24869
24869
|
depth: path.length,
|
|
24870
|
-
className: aphrodite.css(styles$
|
|
24870
|
+
className: aphrodite.css(styles$N.containerTitle)
|
|
24871
24871
|
}, capitalize(name)));
|
|
24872
24872
|
const hasBothHeadings = headingEditor && headingPreview;
|
|
24873
24873
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
24874
|
-
className: aphrodite.css(styles$
|
|
24874
|
+
className: aphrodite.css(styles$N.container)
|
|
24875
24875
|
}, hasBothHeadings && /*#__PURE__*/React__namespace.createElement("span", {
|
|
24876
|
-
className: aphrodite.css(styles$
|
|
24876
|
+
className: aphrodite.css(styles$N.row)
|
|
24877
24877
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
24878
|
-
className: aphrodite.css(styles$
|
|
24878
|
+
className: aphrodite.css(styles$N.columnLeft)
|
|
24879
24879
|
}, headingEditor), /*#__PURE__*/React__namespace.createElement("div", {
|
|
24880
|
-
className: aphrodite.css(styles$
|
|
24880
|
+
className: aphrodite.css(styles$N.columnRight)
|
|
24881
24881
|
}, headingPreview)), /*#__PURE__*/React__namespace.createElement("div", {
|
|
24882
|
-
className: aphrodite.css(path.length > 0 && styles$
|
|
24882
|
+
className: aphrodite.css(path.length > 0 && styles$N.contentIndent)
|
|
24883
24883
|
}, children));
|
|
24884
24884
|
};
|
|
24885
24885
|
|
|
@@ -24999,11 +24999,11 @@ const ItemNodeContent = withStickiness(props => {
|
|
|
24999
24999
|
className: "framework-perseus"
|
|
25000
25000
|
}, lens(renderers).get(path));
|
|
25001
25001
|
return /*#__PURE__*/React__namespace.createElement("span", null, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25002
|
-
className: aphrodite.css(styles$
|
|
25002
|
+
className: aphrodite.css(styles$N.row)
|
|
25003
25003
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25004
|
-
className: aphrodite.css(styles$
|
|
25004
|
+
className: aphrodite.css(styles$N.columnLeft)
|
|
25005
25005
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25006
|
-
className: aphrodite.css(sticky && styles$
|
|
25006
|
+
className: aphrodite.css(sticky && styles$N.sticky)
|
|
25007
25007
|
},
|
|
25008
25008
|
/*#__PURE__*/
|
|
25009
25009
|
// @ts-expect-error - TS2769 - No overload matches this call.
|
|
@@ -25011,9 +25011,9 @@ const ItemNodeContent = withStickiness(props => {
|
|
|
25011
25011
|
onChange: newVal => actions.mergeValueAtPath(path, newVal),
|
|
25012
25012
|
apiOptions: apiOptions
|
|
25013
25013
|
})))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
25014
|
-
className: aphrodite.css(styles$
|
|
25014
|
+
className: aphrodite.css(styles$N.columnRight)
|
|
25015
25015
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25016
|
-
className: aphrodite.css(sticky && styles$
|
|
25016
|
+
className: aphrodite.css(sticky && styles$N.sticky)
|
|
25017
25017
|
}, preview))));
|
|
25018
25018
|
});
|
|
25019
25019
|
const HintNodeContent = withStickiness(props => {
|
|
@@ -25029,13 +25029,13 @@ const HintNodeContent = withStickiness(props => {
|
|
|
25029
25029
|
className: "framework-perseus"
|
|
25030
25030
|
}, lens(renderers).get(path));
|
|
25031
25031
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
25032
|
-
className: aphrodite.css(styles$
|
|
25032
|
+
className: aphrodite.css(styles$N.row)
|
|
25033
25033
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25034
|
-
className: aphrodite.css(styles$
|
|
25034
|
+
className: aphrodite.css(styles$N.columnLeft)
|
|
25035
25035
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25036
|
-
className: aphrodite.css(sticky && styles$
|
|
25036
|
+
className: aphrodite.css(sticky && styles$N.sticky)
|
|
25037
25037
|
}, /*#__PURE__*/React__namespace.createElement(HintEditor, _extends({}, data, {
|
|
25038
|
-
className: aphrodite.css(styles$
|
|
25038
|
+
className: aphrodite.css(styles$N.hintEditor),
|
|
25039
25039
|
onChange: newVal => actions.mergeValueAtPath(path, newVal),
|
|
25040
25040
|
apiOptions: apiOptions,
|
|
25041
25041
|
showTitle: false,
|
|
@@ -25050,9 +25050,9 @@ const HintNodeContent = withStickiness(props => {
|
|
|
25050
25050
|
isFirst: true,
|
|
25051
25051
|
isLast: true
|
|
25052
25052
|
})))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
25053
|
-
className: aphrodite.css(styles$
|
|
25053
|
+
className: aphrodite.css(styles$N.columnRight)
|
|
25054
25054
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25055
|
-
className: aphrodite.css(sticky && styles$
|
|
25055
|
+
className: aphrodite.css(sticky && styles$N.sticky)
|
|
25056
25056
|
}, preview)));
|
|
25057
25057
|
});
|
|
25058
25058
|
const TagsNodeContent = props => {
|
|
@@ -25069,9 +25069,9 @@ const TagsNodeContent = props => {
|
|
|
25069
25069
|
return null;
|
|
25070
25070
|
}
|
|
25071
25071
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
25072
|
-
className: aphrodite.css(styles$
|
|
25072
|
+
className: aphrodite.css(styles$N.columnLeft)
|
|
25073
25073
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25074
|
-
className: aphrodite.css(styles$
|
|
25074
|
+
className: aphrodite.css(styles$N.tagsEditor)
|
|
25075
25075
|
}, /*#__PURE__*/React__namespace.createElement(GroupMetadataEditor, {
|
|
25076
25076
|
value: data,
|
|
25077
25077
|
onChange: newVal => actions.setValueAtPath(path, newVal),
|
|
@@ -25102,23 +25102,23 @@ const ArrayNodeContent = props => {
|
|
|
25102
25102
|
const subpath = path.concat(i);
|
|
25103
25103
|
const controls = [i > 0 && /*#__PURE__*/React__namespace.createElement("div", {
|
|
25104
25104
|
key: "moveArrayElementUp",
|
|
25105
|
-
className: aphrodite.css(styles$
|
|
25105
|
+
className: aphrodite.css(styles$N.control)
|
|
25106
25106
|
}, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
|
|
25107
25107
|
color: "orange",
|
|
25108
25108
|
title: "Move up",
|
|
25109
25109
|
onClick: () => actions.moveArrayElementUp(subpath)
|
|
25110
25110
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
25111
|
-
className: aphrodite.css(styles$
|
|
25111
|
+
className: aphrodite.css(styles$N.verticalFlip)
|
|
25112
25112
|
}, /*#__PURE__*/React__namespace.createElement(InlineIcon$5, iconChevronDown)))), i < data.length - 1 && /*#__PURE__*/React__namespace.createElement("div", {
|
|
25113
25113
|
key: "moveArrayElementDown",
|
|
25114
|
-
className: aphrodite.css(styles$
|
|
25114
|
+
className: aphrodite.css(styles$N.control)
|
|
25115
25115
|
}, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
|
|
25116
25116
|
color: "orange",
|
|
25117
25117
|
title: "Move down",
|
|
25118
25118
|
onClick: () => actions.moveArrayElementDown(subpath)
|
|
25119
25119
|
}, /*#__PURE__*/React__namespace.createElement(InlineIcon$5, iconChevronDown))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
25120
25120
|
key: "removeArrayElement",
|
|
25121
|
-
className: aphrodite.css(styles$
|
|
25121
|
+
className: aphrodite.css(styles$N.control)
|
|
25122
25122
|
}, /*#__PURE__*/React__namespace.createElement(SimpleButton, {
|
|
25123
25123
|
color: "orange",
|
|
25124
25124
|
title: "Delete",
|
|
@@ -25126,7 +25126,7 @@ const ArrayNodeContent = props => {
|
|
|
25126
25126
|
}, /*#__PURE__*/React__namespace.createElement(InlineIcon$5, iconTrash$4)))];
|
|
25127
25127
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
25128
25128
|
key: i,
|
|
25129
|
-
className: aphrodite.css(styles$
|
|
25129
|
+
className: aphrodite.css(styles$N.arrayElement, !elementIsLeaf && styles$N.arrayElementAndNotLeaf)
|
|
25130
25130
|
}, /*#__PURE__*/React__namespace.createElement(NodeContainer, _extends({}, otherProps, {
|
|
25131
25131
|
key: i,
|
|
25132
25132
|
shape: shape.elementShape,
|
|
@@ -25152,7 +25152,7 @@ const ObjectNodeContent = props => {
|
|
|
25152
25152
|
// made sense to the shape's author is the order in which we'll iterate :)
|
|
25153
25153
|
const children = Object.keys(shape.shape).map(subkey => /*#__PURE__*/React__namespace.createElement("div", {
|
|
25154
25154
|
key: subkey,
|
|
25155
|
-
className: aphrodite.css(styles$
|
|
25155
|
+
className: aphrodite.css(styles$N.objectElement)
|
|
25156
25156
|
}, /*#__PURE__*/React__namespace.createElement(NodeContainer, _extends({}, otherProps, {
|
|
25157
25157
|
shape: shape.shape[subkey],
|
|
25158
25158
|
data: data[subkey],
|
|
@@ -25322,7 +25322,7 @@ class MultiRendererEditor extends React__namespace.Component {
|
|
|
25322
25322
|
}, this._renderContent());
|
|
25323
25323
|
}
|
|
25324
25324
|
}
|
|
25325
|
-
const styles$
|
|
25325
|
+
const styles$N = aphrodite.StyleSheet.create({
|
|
25326
25326
|
// This is used in a number of places throughout this file.
|
|
25327
25327
|
container: {},
|
|
25328
25328
|
// eslint-disable-next-line react-native/no-unused-styles
|
|
@@ -26405,11 +26405,11 @@ class Spring extends React__namespace.Component {
|
|
|
26405
26405
|
} = this.props;
|
|
26406
26406
|
return React__namespace.createElement(wonderBlocksCore.View, {
|
|
26407
26407
|
"aria-hidden": "true",
|
|
26408
|
-
style: [styles$
|
|
26408
|
+
style: [styles$M.grow, style]
|
|
26409
26409
|
});
|
|
26410
26410
|
}
|
|
26411
26411
|
}
|
|
26412
|
-
const styles$
|
|
26412
|
+
const styles$M = aphrodite.StyleSheet.create({
|
|
26413
26413
|
grow: {
|
|
26414
26414
|
flexGrow: 1
|
|
26415
26415
|
}
|
|
@@ -26611,7 +26611,7 @@ const SortableItem = createReactClass__default["default"]({
|
|
|
26611
26611
|
}
|
|
26612
26612
|
return /*#__PURE__*/React__namespace.createElement("li", {
|
|
26613
26613
|
draggable: this.props.draggable,
|
|
26614
|
-
className: [dragState, aphrodite.css(styles$
|
|
26614
|
+
className: [dragState, aphrodite.css(styles$L.sortableListItem)].join(" "),
|
|
26615
26615
|
onDragStart: this.handleDragStart,
|
|
26616
26616
|
onDrop: this.handleDrop,
|
|
26617
26617
|
onDragEnter: this.handleDragEnter,
|
|
@@ -26619,7 +26619,7 @@ const SortableItem = createReactClass__default["default"]({
|
|
|
26619
26619
|
}, this.props.component);
|
|
26620
26620
|
}
|
|
26621
26621
|
});
|
|
26622
|
-
const styles$
|
|
26622
|
+
const styles$L = aphrodite.StyleSheet.create({
|
|
26623
26623
|
sortableListItem: {
|
|
26624
26624
|
margin: "5px 0"
|
|
26625
26625
|
}
|
|
@@ -26739,13 +26739,13 @@ class ExpressionEditor extends React__namespace.Component {
|
|
|
26739
26739
|
onChange: this.handleToggleDiv
|
|
26740
26740
|
}));
|
|
26741
26741
|
return /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.HeadingSmall, null, "Global Options"), /*#__PURE__*/React__namespace.createElement("div", {
|
|
26742
|
-
className: aphrodite.css(styles$
|
|
26742
|
+
className: aphrodite.css(styles$K.paddedY)
|
|
26743
26743
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.LabeledTextField, {
|
|
26744
26744
|
label: "Visible label",
|
|
26745
26745
|
value: this.props.visibleLabel || "",
|
|
26746
26746
|
onChange: this.change("visibleLabel")
|
|
26747
26747
|
}), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.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__namespace.createElement("div", {
|
|
26748
|
-
className: aphrodite.css(styles$
|
|
26748
|
+
className: aphrodite.css(styles$K.paddedY)
|
|
26749
26749
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.LabeledTextField, {
|
|
26750
26750
|
label: "Aria label",
|
|
26751
26751
|
value: this.props.ariaLabel || "",
|
|
@@ -26754,13 +26754,13 @@ class ExpressionEditor extends React__namespace.Component {
|
|
|
26754
26754
|
href: "https://www.w3.org/WAI/tips/designing/#ensure-that-form-elements-include-clearly-associated-labels",
|
|
26755
26755
|
target: "_blank"
|
|
26756
26756
|
}, "this article.")))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
26757
|
-
className: aphrodite.css(styles$
|
|
26757
|
+
className: aphrodite.css(styles$K.paddedY)
|
|
26758
26758
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.LabeledTextField, {
|
|
26759
26759
|
label: "Function variables",
|
|
26760
26760
|
value: this.state.functionsInternal,
|
|
26761
26761
|
onChange: this.handleFunctions
|
|
26762
26762
|
}), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.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__namespace.createElement("div", {
|
|
26763
|
-
className: aphrodite.css(styles$
|
|
26763
|
+
className: aphrodite.css(styles$K.paddedY)
|
|
26764
26764
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.Checkbox, {
|
|
26765
26765
|
label: "Use \xD7 instead of \u22C5 for multiplication",
|
|
26766
26766
|
checked: this.props.times,
|
|
@@ -26770,7 +26770,7 @@ class ExpressionEditor extends React__namespace.Component {
|
|
|
26770
26770
|
});
|
|
26771
26771
|
}
|
|
26772
26772
|
}), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.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__namespace.createElement("div", {
|
|
26773
|
-
className: aphrodite.css(styles$
|
|
26773
|
+
className: aphrodite.css(styles$K.paddedY)
|
|
26774
26774
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.HeadingXSmall, null, "Button Sets"), buttonSetChoices), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.HeadingSmall, null, "Answers"), /*#__PURE__*/React__namespace.createElement("p", {
|
|
26775
26775
|
style: {
|
|
26776
26776
|
margin: "4px 0"
|
|
@@ -26958,18 +26958,18 @@ class AnswerOption extends React__namespace.Component {
|
|
|
26958
26958
|
color: "destructive",
|
|
26959
26959
|
light: true
|
|
26960
26960
|
}, "Delete");
|
|
26961
|
-
const answerStatusCss = aphrodite.css(styles$
|
|
26961
|
+
const answerStatusCss = aphrodite.css(styles$K.answerStatus, this.props.considered === "wrong" && styles$K.answerStatusWrong, this.props.considered === "correct" && styles$K.answerStatusCorrect, this.props.considered === "ungraded" && styles$K.answerStatusUngraded);
|
|
26962
26962
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
26963
|
-
className: aphrodite.css(styles$
|
|
26963
|
+
className: aphrodite.css(styles$K.answerOption)
|
|
26964
26964
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
26965
|
-
className: aphrodite.css(styles$
|
|
26965
|
+
className: aphrodite.css(styles$K.answerHandle)
|
|
26966
26966
|
}), /*#__PURE__*/React__namespace.createElement("div", {
|
|
26967
|
-
className: aphrodite.css(styles$
|
|
26967
|
+
className: aphrodite.css(styles$K.answerBody)
|
|
26968
26968
|
}, /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement("button", {
|
|
26969
26969
|
onClick: this.toggleConsidered,
|
|
26970
26970
|
className: answerStatusCss
|
|
26971
26971
|
}, this.props.considered), /*#__PURE__*/React__namespace.createElement("div", null, /*#__PURE__*/React__namespace.createElement(perseus.Expression, this.props.expressionProps))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
26972
|
-
className: aphrodite.css(styles$
|
|
26972
|
+
className: aphrodite.css(styles$K.paddedY, styles$K.paddedX)
|
|
26973
26973
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.Checkbox, {
|
|
26974
26974
|
label: "Answer expression must have the same form.",
|
|
26975
26975
|
checked: this.props.form,
|
|
@@ -26979,7 +26979,7 @@ class AnswerOption extends React__namespace.Component {
|
|
|
26979
26979
|
});
|
|
26980
26980
|
}
|
|
26981
26981
|
}), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.createElement("p", null, "The student's answer must be in the same form. Commutativity and excess negative signs are ignored."))), /*#__PURE__*/React__namespace.createElement("div", {
|
|
26982
|
-
className: aphrodite.css(styles$
|
|
26982
|
+
className: aphrodite.css(styles$K.paddedY, styles$K.paddedX)
|
|
26983
26983
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.Checkbox, {
|
|
26984
26984
|
label: "Answer expression must be fully expanded and simplified.",
|
|
26985
26985
|
checked: this.props.simplify,
|
|
@@ -26989,7 +26989,7 @@ class AnswerOption extends React__namespace.Component {
|
|
|
26989
26989
|
});
|
|
26990
26990
|
}
|
|
26991
26991
|
}), /*#__PURE__*/React__namespace.createElement(InfoTip$i, null, /*#__PURE__*/React__namespace.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__namespace.createElement("div", {
|
|
26992
|
-
className: aphrodite.css(styles$
|
|
26992
|
+
className: aphrodite.css(styles$K.buttonRow, styles$K.paddedY)
|
|
26993
26993
|
}, removeButton)));
|
|
26994
26994
|
}
|
|
26995
26995
|
handleImSure = () => {
|
|
@@ -27012,7 +27012,7 @@ class AnswerOption extends React__namespace.Component {
|
|
|
27012
27012
|
});
|
|
27013
27013
|
};
|
|
27014
27014
|
}
|
|
27015
|
-
const styles$
|
|
27015
|
+
const styles$K = aphrodite.StyleSheet.create({
|
|
27016
27016
|
paddedX: {
|
|
27017
27017
|
paddingLeft: wonderBlocksTokens.spacing.xSmall_8,
|
|
27018
27018
|
paddingRight: wonderBlocksTokens.spacing.xSmall_8
|
|
@@ -27114,10 +27114,10 @@ class GradedGroupEditor extends React__namespace.Component {
|
|
|
27114
27114
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
27115
27115
|
className: "perseus-widget-row"
|
|
27116
27116
|
}, /*#__PURE__*/React__namespace.createElement("label", {
|
|
27117
|
-
className: aphrodite.css(styles$
|
|
27117
|
+
className: aphrodite.css(styles$J.title)
|
|
27118
27118
|
}, "Title:", " ", /*#__PURE__*/React__namespace.createElement(TextInput$6, {
|
|
27119
27119
|
value: this.props.title,
|
|
27120
|
-
className: aphrodite.css(styles$
|
|
27120
|
+
className: aphrodite.css(styles$J.input)
|
|
27121
27121
|
// @ts-expect-error - TS2554 - Expected 3 arguments, but got 1.
|
|
27122
27122
|
,
|
|
27123
27123
|
onChange: this.change("title")
|
|
@@ -27142,7 +27142,7 @@ class GradedGroupEditor extends React__namespace.Component {
|
|
|
27142
27142
|
}, /*#__PURE__*/React__namespace.createElement(InlineIcon$3, iconPlus$1), " Add a hint"), this.props.hint && /*#__PURE__*/React__namespace.createElement("div", {
|
|
27143
27143
|
className: "perseus-hint-editor"
|
|
27144
27144
|
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
27145
|
-
className: aphrodite.css(styles$
|
|
27145
|
+
className: aphrodite.css(styles$J.hintsTitle)
|
|
27146
27146
|
}, "Hint"), /*#__PURE__*/React__namespace.createElement(Editor, {
|
|
27147
27147
|
ref: this.hintEditor,
|
|
27148
27148
|
content: this.props.hint ? this.props.hint.content : "",
|
|
@@ -27174,7 +27174,7 @@ class GradedGroupEditor extends React__namespace.Component {
|
|
|
27174
27174
|
};
|
|
27175
27175
|
};
|
|
27176
27176
|
}
|
|
27177
|
-
const styles$
|
|
27177
|
+
const styles$J = aphrodite.StyleSheet.create({
|
|
27178
27178
|
title: {
|
|
27179
27179
|
fontSize: 18,
|
|
27180
27180
|
fontWeight: "bold"
|
|
@@ -28561,13 +28561,13 @@ function MathquillInput(props) {
|
|
|
28561
28561
|
}
|
|
28562
28562
|
});
|
|
28563
28563
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
28564
|
-
style: styles$
|
|
28564
|
+
style: styles$I.outerWrapper
|
|
28565
28565
|
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
28566
28566
|
ref: mathFieldWrapperRef,
|
|
28567
28567
|
className: "perseus-math-input mq-editable-field mq-math-mode"
|
|
28568
28568
|
}));
|
|
28569
28569
|
}
|
|
28570
|
-
const styles$
|
|
28570
|
+
const styles$I = aphrodite.StyleSheet.create({
|
|
28571
28571
|
outerWrapper: {
|
|
28572
28572
|
display: "inline-block",
|
|
28573
28573
|
borderStyle: "solid",
|
|
@@ -29637,16 +29637,16 @@ const LabeledRow = props => {
|
|
|
29637
29637
|
style
|
|
29638
29638
|
} = props;
|
|
29639
29639
|
return /*#__PURE__*/React__namespace.createElement("label", {
|
|
29640
|
-
className: aphrodite.css(styles$
|
|
29640
|
+
className: aphrodite.css(styles$H.label)
|
|
29641
29641
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
29642
|
-
style: [styles$
|
|
29642
|
+
style: [styles$H.row, style]
|
|
29643
29643
|
}, labelSide === "start" || /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, {
|
|
29644
|
-
style: styles$
|
|
29644
|
+
style: styles$H.spaceEnd
|
|
29645
29645
|
}, label), children, labelSide === "end" && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelSmall, {
|
|
29646
|
-
style: styles$
|
|
29646
|
+
style: styles$H.spaceStart
|
|
29647
29647
|
}, label)));
|
|
29648
29648
|
};
|
|
29649
|
-
const styles$
|
|
29649
|
+
const styles$H = aphrodite.StyleSheet.create({
|
|
29650
29650
|
label: {
|
|
29651
29651
|
width: "fit-content"
|
|
29652
29652
|
},
|
|
@@ -29672,11 +29672,11 @@ function Heading(_ref) {
|
|
|
29672
29672
|
onToggle
|
|
29673
29673
|
} = _ref;
|
|
29674
29674
|
return /*#__PURE__*/React__namespace.createElement(Clickable__default["default"], {
|
|
29675
|
-
style: [styles$
|
|
29675
|
+
style: [styles$G.container, !isCollapsible && styles$G.notClickable],
|
|
29676
29676
|
disabled: !isCollapsible,
|
|
29677
29677
|
onClick: () => isCollapsible && onToggle?.(!isOpen)
|
|
29678
29678
|
}, () => /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
29679
|
-
style: styles$
|
|
29679
|
+
style: styles$G.heading
|
|
29680
29680
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, {
|
|
29681
29681
|
style: {
|
|
29682
29682
|
fontSize: 14,
|
|
@@ -29686,7 +29686,7 @@ function Heading(_ref) {
|
|
|
29686
29686
|
isExpanded: isOpen
|
|
29687
29687
|
})));
|
|
29688
29688
|
}
|
|
29689
|
-
const styles$
|
|
29689
|
+
const styles$G = aphrodite.StyleSheet.create({
|
|
29690
29690
|
container: {
|
|
29691
29691
|
marginTop: wonderBlocksTokens.spacing.small_12,
|
|
29692
29692
|
// NOTE(jeremy): This is the inverse of the @editorPadding CSS
|
|
@@ -29904,6 +29904,17 @@ const getQuadraticEquation = startCoords => {
|
|
|
29904
29904
|
const c = (p2[0] * p3[0] * (p2[0] - p3[0]) * p1[1] + p3[0] * p1[0] * (p3[0] - p1[0]) * p2[1] + p1[0] * p2[0] * (p1[0] - p2[0]) * p3[1]) / denom;
|
|
29905
29905
|
return "y = " + a.toFixed(3) + "x^2 + " + b.toFixed(3) + "x + " + c.toFixed(3);
|
|
29906
29906
|
};
|
|
29907
|
+
const findAngle = (point1, point2) => {
|
|
29908
|
+
const x = point1[0] - point2[0];
|
|
29909
|
+
const y = point1[1] - point2[1];
|
|
29910
|
+
return (180 + Math.atan2(-y, -x) * 180 / Math.PI + 360) % 360;
|
|
29911
|
+
};
|
|
29912
|
+
const getAngleEquation = startCoords => {
|
|
29913
|
+
const [point1, vertex, point2] = startCoords;
|
|
29914
|
+
const angle = findAngle(point2, vertex) - findAngle(point1, vertex);
|
|
29915
|
+
const roundedAngle = angle.toFixed(0);
|
|
29916
|
+
return `${roundedAngle}\u00B0 angle at (${vertex[0]}, ${vertex[1]})`;
|
|
29917
|
+
};
|
|
29907
29918
|
const shouldShowStartCoordsUI = (flags, graph) => {
|
|
29908
29919
|
// TODO(LEMS-2228): Remove flags once this is fully released
|
|
29909
29920
|
const startCoordsUiPhase1Types = ["linear", "linear-system", "ray", "segment", "circle"];
|
|
@@ -29949,17 +29960,17 @@ const LockedFigureSelect = props => {
|
|
|
29949
29960
|
const figureTypes = ["point", "line", "vector", "ellipse", "polygon"];
|
|
29950
29961
|
const figureTypesCurrent = props.showM2bFeatures ? [...figureTypes, "function"] : figureTypes;
|
|
29951
29962
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
29952
|
-
style: styles$
|
|
29963
|
+
style: styles$F.container
|
|
29953
29964
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionMenu, {
|
|
29954
29965
|
menuText: "Add locked figure",
|
|
29955
|
-
style: styles$
|
|
29966
|
+
style: styles$F.addElementSelect
|
|
29956
29967
|
}, figureTypesCurrent.map(figureType => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.ActionItem, {
|
|
29957
29968
|
key: `${id}-${figureType}`,
|
|
29958
29969
|
label: figureType,
|
|
29959
29970
|
onClick: () => onChange(figureType)
|
|
29960
29971
|
}))));
|
|
29961
29972
|
};
|
|
29962
|
-
const styles$
|
|
29973
|
+
const styles$F = aphrodite.StyleSheet.create({
|
|
29963
29974
|
container: {
|
|
29964
29975
|
marginTop: wonderBlocksTokens.spacing.xSmall_8
|
|
29965
29976
|
},
|
|
@@ -30029,18 +30040,18 @@ const AngleInput = props => {
|
|
|
30029
30040
|
}
|
|
30030
30041
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
30031
30042
|
tag: "label",
|
|
30032
|
-
style: styles$
|
|
30043
|
+
style: styles$E.row
|
|
30033
30044
|
}, "angle (degrees)", /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30034
30045
|
size: wonderBlocksTokens.spacing.xxSmall_6
|
|
30035
30046
|
}), /*#__PURE__*/React__namespace.createElement(ScrolllessNumberTextField, {
|
|
30036
30047
|
value: angleInput,
|
|
30037
30048
|
onChange: handleAngleChange,
|
|
30038
|
-
style: styles$
|
|
30049
|
+
style: styles$E.textField
|
|
30039
30050
|
}), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30040
30051
|
size: wonderBlocksTokens.spacing.xxSmall_6
|
|
30041
30052
|
}));
|
|
30042
30053
|
};
|
|
30043
|
-
const styles$
|
|
30054
|
+
const styles$E = aphrodite.StyleSheet.create({
|
|
30044
30055
|
row: {
|
|
30045
30056
|
display: "flex",
|
|
30046
30057
|
flexDirection: "row",
|
|
@@ -30089,30 +30100,30 @@ const CoordinatePairInput = props => {
|
|
|
30089
30100
|
onChange(newCoords);
|
|
30090
30101
|
}
|
|
30091
30102
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30092
|
-
style: [styles$
|
|
30103
|
+
style: [styles$D.row, style]
|
|
30093
30104
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
30094
30105
|
tag: "label",
|
|
30095
|
-
style: styles$
|
|
30106
|
+
style: styles$D.row
|
|
30096
30107
|
}, labels ? labels[0] : "x coord", /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30097
30108
|
size: wonderBlocksTokens.spacing.xxSmall_6
|
|
30098
30109
|
}), /*#__PURE__*/React__namespace.createElement(ScrolllessNumberTextField, {
|
|
30099
30110
|
value: coordState[0],
|
|
30100
30111
|
onChange: newValue => handleCoordChange(newValue, 0),
|
|
30101
|
-
style: [styles$
|
|
30112
|
+
style: [styles$D.textField, error ? styles$D.errorField : undefined]
|
|
30102
30113
|
})), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30103
30114
|
size: wonderBlocksTokens.spacing.medium_16
|
|
30104
30115
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
30105
30116
|
tag: "label",
|
|
30106
|
-
style: styles$
|
|
30117
|
+
style: styles$D.row
|
|
30107
30118
|
}, labels ? labels[1] : "y coord", /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30108
30119
|
size: wonderBlocksTokens.spacing.xxSmall_6
|
|
30109
30120
|
}), /*#__PURE__*/React__namespace.createElement(ScrolllessNumberTextField, {
|
|
30110
30121
|
value: coordState[1],
|
|
30111
30122
|
onChange: newValue => handleCoordChange(newValue, 1),
|
|
30112
|
-
style: [styles$
|
|
30123
|
+
style: [styles$D.textField, error ? styles$D.errorField : undefined]
|
|
30113
30124
|
})));
|
|
30114
30125
|
};
|
|
30115
|
-
const styles$
|
|
30126
|
+
const styles$D = aphrodite.StyleSheet.create({
|
|
30116
30127
|
row: {
|
|
30117
30128
|
display: "flex",
|
|
30118
30129
|
flexDirection: "row",
|
|
@@ -30145,14 +30156,14 @@ const PerseusEditorAccordion = props => {
|
|
|
30145
30156
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksAccordion.AccordionSection, {
|
|
30146
30157
|
expanded: expanded,
|
|
30147
30158
|
onToggle: onToggle,
|
|
30148
|
-
style: [styles$
|
|
30149
|
-
headerStyle: styles$
|
|
30159
|
+
style: [styles$C.container, containerStyle],
|
|
30160
|
+
headerStyle: styles$C.accordionHeader,
|
|
30150
30161
|
header: header
|
|
30151
30162
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30152
|
-
style: [styles$
|
|
30163
|
+
style: [styles$C.accordionPanel, panelStyle]
|
|
30153
30164
|
}, children)));
|
|
30154
30165
|
};
|
|
30155
|
-
const styles$
|
|
30166
|
+
const styles$C = aphrodite.StyleSheet.create({
|
|
30156
30167
|
container: {
|
|
30157
30168
|
backgroundColor: wonderBlocksTokens.color.fadedBlue8,
|
|
30158
30169
|
marginTop: wonderBlocksTokens.spacing.xSmall_8
|
|
@@ -30183,13 +30194,13 @@ const ColorSwatch = props => {
|
|
|
30183
30194
|
"aria-label":
|
|
30184
30195
|
// Don't include an aria label for decorative circles.
|
|
30185
30196
|
!decorative ? `${color}, ${filled ? "filled" : "open"}` : undefined,
|
|
30186
|
-
style: [styles$
|
|
30197
|
+
style: [styles$B.colorSwatch, {
|
|
30187
30198
|
border: `4px solid ${perseus.lockedFigureColors[color]}`,
|
|
30188
30199
|
backgroundColor: filled ? perseus.lockedFigureColors[color] : wonderBlocksTokens.color.white
|
|
30189
30200
|
}]
|
|
30190
30201
|
});
|
|
30191
30202
|
};
|
|
30192
|
-
const styles$
|
|
30203
|
+
const styles$B = aphrodite.StyleSheet.create({
|
|
30193
30204
|
colorSwatch: {
|
|
30194
30205
|
// Add a white outline so that the color swatch is visible when
|
|
30195
30206
|
// the dropdown option is highlighted with its blue background.
|
|
@@ -30208,10 +30219,10 @@ const ColorSelect = props => {
|
|
|
30208
30219
|
onChange
|
|
30209
30220
|
} = props;
|
|
30210
30221
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30211
|
-
style: [styles$
|
|
30222
|
+
style: [styles$A.row, style]
|
|
30212
30223
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
30213
30224
|
tag: "label",
|
|
30214
|
-
style: styles$
|
|
30225
|
+
style: styles$A.row
|
|
30215
30226
|
}, "color", /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30216
30227
|
size: wonderBlocksTokens.spacing.xxSmall_6
|
|
30217
30228
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
@@ -30230,7 +30241,7 @@ const ColorSelect = props => {
|
|
|
30230
30241
|
})
|
|
30231
30242
|
})))));
|
|
30232
30243
|
};
|
|
30233
|
-
const styles$
|
|
30244
|
+
const styles$A = aphrodite.StyleSheet.create({
|
|
30234
30245
|
row: {
|
|
30235
30246
|
display: "flex",
|
|
30236
30247
|
flexDirection: "row",
|
|
@@ -30249,17 +30260,17 @@ const EllipseSwatch = props => {
|
|
|
30249
30260
|
} = props;
|
|
30250
30261
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30251
30262
|
"aria-label": `${color}, stroke ${strokeStyle}, fill ${fillStyle}`,
|
|
30252
|
-
style: [styles$
|
|
30263
|
+
style: [styles$z.container, {
|
|
30253
30264
|
border: `4px ${strokeStyle} ${perseus.lockedFigureColors[color]}`
|
|
30254
30265
|
}]
|
|
30255
30266
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30256
|
-
style: [styles$
|
|
30267
|
+
style: [styles$z.innerCircle, {
|
|
30257
30268
|
backgroundColor: perseus.lockedFigureColors[color],
|
|
30258
30269
|
opacity: fillStyle === "white" ? 0 : perseus.lockedFigureFillStyles[fillStyle]
|
|
30259
30270
|
}]
|
|
30260
30271
|
}));
|
|
30261
30272
|
};
|
|
30262
|
-
const styles$
|
|
30273
|
+
const styles$z = aphrodite.StyleSheet.create({
|
|
30263
30274
|
container: {
|
|
30264
30275
|
// Add a white outline so that the color swatch is visible when
|
|
30265
30276
|
// the dropdown option is highlighted with its blue background.
|
|
@@ -30285,7 +30296,7 @@ const LineStrokeSelect = props => {
|
|
|
30285
30296
|
} = props;
|
|
30286
30297
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
30287
30298
|
tag: "label",
|
|
30288
|
-
style: styles$
|
|
30299
|
+
style: styles$y.lineStrokeSelect
|
|
30289
30300
|
}, "stroke", /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30290
30301
|
size: wonderBlocksTokens.spacing.xxxSmall_4
|
|
30291
30302
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
@@ -30302,7 +30313,7 @@ const LineStrokeSelect = props => {
|
|
|
30302
30313
|
label: "dashed"
|
|
30303
30314
|
})));
|
|
30304
30315
|
};
|
|
30305
|
-
const styles$
|
|
30316
|
+
const styles$y = aphrodite.StyleSheet.create({
|
|
30306
30317
|
lineStrokeSelect: {
|
|
30307
30318
|
display: "flex",
|
|
30308
30319
|
flexDirection: "row",
|
|
@@ -30324,40 +30335,40 @@ const LockedFigureSettingsActions = props => {
|
|
|
30324
30335
|
onRemove
|
|
30325
30336
|
} = props;
|
|
30326
30337
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30327
|
-
style: styles$
|
|
30338
|
+
style: styles$x.container
|
|
30328
30339
|
}, /*#__PURE__*/React__namespace.createElement(Button__default["default"], {
|
|
30329
30340
|
startIcon: trashIcon__default["default"],
|
|
30330
30341
|
"aria-label": `Delete locked ${figureType}`,
|
|
30331
30342
|
onClick: onRemove,
|
|
30332
30343
|
kind: "tertiary",
|
|
30333
|
-
style: styles$
|
|
30344
|
+
style: styles$x.deleteButton
|
|
30334
30345
|
}, "Delete"), /*#__PURE__*/React__namespace.createElement(Spring, null), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
|
|
30335
30346
|
icon: caretDoubleUpIcon__default["default"],
|
|
30336
30347
|
size: "small",
|
|
30337
30348
|
"aria-label": `Move locked ${figureType} to the back`,
|
|
30338
30349
|
onClick: () => onMove("back"),
|
|
30339
|
-
style: styles$
|
|
30350
|
+
style: styles$x.iconButton
|
|
30340
30351
|
}), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
|
|
30341
30352
|
icon: caretUpIcon__default["default"],
|
|
30342
30353
|
size: "small",
|
|
30343
30354
|
"aria-label": `Move locked ${figureType} backward`,
|
|
30344
30355
|
onClick: () => onMove("backward"),
|
|
30345
|
-
style: styles$
|
|
30356
|
+
style: styles$x.iconButton
|
|
30346
30357
|
}), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
|
|
30347
30358
|
icon: caretDownIcon__default["default"],
|
|
30348
30359
|
size: "small",
|
|
30349
30360
|
"aria-label": `Move locked ${figureType} forward`,
|
|
30350
30361
|
onClick: () => onMove("forward"),
|
|
30351
|
-
style: styles$
|
|
30362
|
+
style: styles$x.iconButton
|
|
30352
30363
|
}), /*#__PURE__*/React__namespace.createElement(IconButton__default["default"], {
|
|
30353
30364
|
icon: caretDoubleDownIcon__default["default"],
|
|
30354
30365
|
size: "small",
|
|
30355
30366
|
"aria-label": `Move locked ${figureType} to the front`,
|
|
30356
30367
|
onClick: () => onMove("front"),
|
|
30357
|
-
style: styles$
|
|
30368
|
+
style: styles$x.iconButton
|
|
30358
30369
|
}));
|
|
30359
30370
|
};
|
|
30360
|
-
const styles$
|
|
30371
|
+
const styles$x = aphrodite.StyleSheet.create({
|
|
30361
30372
|
container: {
|
|
30362
30373
|
width: "100%",
|
|
30363
30374
|
flexDirection: "row",
|
|
@@ -30404,7 +30415,7 @@ const LockedEllipseSettings = props => {
|
|
|
30404
30415
|
/*#__PURE__*/
|
|
30405
30416
|
// Summary: Ellipse, center, radius, color (opacity, dashed)
|
|
30406
30417
|
React__namespace.createElement(wonderBlocksCore.View, {
|
|
30407
|
-
style: styles$
|
|
30418
|
+
style: styles$w.row
|
|
30408
30419
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Ellipse (${center[0]}, ${center[1]}), radius ${radius[0]}, ${radius[1]}`), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30409
30420
|
size: wonderBlocksTokens.spacing.xSmall_8
|
|
30410
30421
|
}), /*#__PURE__*/React__namespace.createElement(EllipseSwatch, {
|
|
@@ -30413,19 +30424,19 @@ const LockedEllipseSettings = props => {
|
|
|
30413
30424
|
strokeStyle: strokeStyle
|
|
30414
30425
|
}))
|
|
30415
30426
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30416
|
-
style: styles$
|
|
30427
|
+
style: styles$w.row
|
|
30417
30428
|
}, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
|
|
30418
30429
|
coord: center,
|
|
30419
|
-
style: styles$
|
|
30430
|
+
style: styles$w.spaceUnder,
|
|
30420
30431
|
onChange: newCoords => onChangeProps({
|
|
30421
30432
|
center: newCoords
|
|
30422
30433
|
})
|
|
30423
30434
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30424
|
-
style: styles$
|
|
30435
|
+
style: styles$w.spaceUnder
|
|
30425
30436
|
}, /*#__PURE__*/React__namespace.createElement(InfoTip$d, null, "The coordinates for the center of the ellipse."))), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
|
|
30426
30437
|
coord: radius,
|
|
30427
30438
|
labels: ["x radius", "y radius"],
|
|
30428
|
-
style: styles$
|
|
30439
|
+
style: styles$w.spaceUnder,
|
|
30429
30440
|
onChange: newCoords => onChangeProps({
|
|
30430
30441
|
radius: newCoords
|
|
30431
30442
|
})
|
|
@@ -30437,7 +30448,7 @@ const LockedEllipseSettings = props => {
|
|
|
30437
30448
|
}), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30438
30449
|
size: wonderBlocksTokens.spacing.xSmall_8
|
|
30439
30450
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30440
|
-
style: [styles$
|
|
30451
|
+
style: [styles$w.row, styles$w.spaceUnder]
|
|
30441
30452
|
}, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
|
|
30442
30453
|
selectedValue: color,
|
|
30443
30454
|
onChange: handleColorChange
|
|
@@ -30445,7 +30456,7 @@ const LockedEllipseSettings = props => {
|
|
|
30445
30456
|
size: wonderBlocksTokens.spacing.medium_16
|
|
30446
30457
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
30447
30458
|
tag: "label",
|
|
30448
|
-
style: [styles$
|
|
30459
|
+
style: [styles$w.row, styles$w.truncatedWidth]
|
|
30449
30460
|
}, "fill", /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30450
30461
|
size: wonderBlocksTokens.spacing.xxSmall_6
|
|
30451
30462
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
@@ -30471,7 +30482,7 @@ const LockedEllipseSettings = props => {
|
|
|
30471
30482
|
onRemove: onRemove
|
|
30472
30483
|
}));
|
|
30473
30484
|
};
|
|
30474
|
-
const styles$
|
|
30485
|
+
const styles$w = aphrodite.StyleSheet.create({
|
|
30475
30486
|
row: {
|
|
30476
30487
|
display: "flex",
|
|
30477
30488
|
flexDirection: "row",
|
|
@@ -30492,15 +30503,15 @@ const LineSwatch = props => {
|
|
|
30492
30503
|
lineStyle
|
|
30493
30504
|
} = props;
|
|
30494
30505
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30495
|
-
style: styles$
|
|
30506
|
+
style: styles$v.container
|
|
30496
30507
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30497
30508
|
"aria-label": `${color}, ${lineStyle}`,
|
|
30498
|
-
style: [styles$
|
|
30509
|
+
style: [styles$v.lineSwatch, {
|
|
30499
30510
|
border: `5px ${lineStyle} ${perseus.lockedFigureColors[color]}`
|
|
30500
30511
|
}]
|
|
30501
30512
|
}));
|
|
30502
30513
|
};
|
|
30503
|
-
const styles$
|
|
30514
|
+
const styles$v = aphrodite.StyleSheet.create({
|
|
30504
30515
|
container: {
|
|
30505
30516
|
backgroundColor: wonderBlocksTokens.color.white,
|
|
30506
30517
|
justifyContent: "center",
|
|
@@ -30574,9 +30585,9 @@ const LockedFunctionSettings = props => {
|
|
|
30574
30585
|
expanded: props.expanded,
|
|
30575
30586
|
onToggle: props.onToggle,
|
|
30576
30587
|
header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30577
|
-
style: styles$
|
|
30588
|
+
style: styles$u.row
|
|
30578
30589
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, {
|
|
30579
|
-
style: styles$
|
|
30590
|
+
style: styles$u.accordionHeader
|
|
30580
30591
|
}, lineLabel), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30581
30592
|
size: wonderBlocksTokens.spacing.xSmall_8
|
|
30582
30593
|
}), /*#__PURE__*/React__namespace.createElement(LineSwatch, {
|
|
@@ -30584,7 +30595,7 @@ const LockedFunctionSettings = props => {
|
|
|
30584
30595
|
lineStyle: strokeStyle
|
|
30585
30596
|
}))
|
|
30586
30597
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30587
|
-
style: [styles$
|
|
30598
|
+
style: [styles$u.row, styles$u.spaceUnder]
|
|
30588
30599
|
}, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
|
|
30589
30600
|
selectedValue: lineColor,
|
|
30590
30601
|
onChange: newValue => {
|
|
@@ -30598,14 +30609,14 @@ const LockedFunctionSettings = props => {
|
|
|
30598
30609
|
handlePropChange("strokeStyle", newValue);
|
|
30599
30610
|
}
|
|
30600
30611
|
})), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30601
|
-
style: [styles$
|
|
30612
|
+
style: [styles$u.row, styles$u.rowSpace]
|
|
30602
30613
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
30603
30614
|
selectedValue: directionalAxis,
|
|
30604
30615
|
onChange: newValue => {
|
|
30605
30616
|
handlePropChange("directionalAxis", newValue);
|
|
30606
30617
|
},
|
|
30607
30618
|
"aria-label": "equation prefix",
|
|
30608
|
-
style: styles$
|
|
30619
|
+
style: styles$u.equationPrefix
|
|
30609
30620
|
// Placeholder is required, but never gets used.
|
|
30610
30621
|
,
|
|
30611
30622
|
placeholder: ""
|
|
@@ -30624,17 +30635,17 @@ const LockedFunctionSettings = props => {
|
|
|
30624
30635
|
onChange: newValue => {
|
|
30625
30636
|
handlePropChange("equation", newValue);
|
|
30626
30637
|
},
|
|
30627
|
-
style: [styles$
|
|
30638
|
+
style: [styles$u.textField]
|
|
30628
30639
|
})), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30629
|
-
style: [styles$
|
|
30640
|
+
style: [styles$u.row, styles$u.rowSpace]
|
|
30630
30641
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
30631
30642
|
tag: "label",
|
|
30632
|
-
style: styles$
|
|
30643
|
+
style: styles$u.domainMin
|
|
30633
30644
|
}, "domain min", /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30634
30645
|
size: wonderBlocksTokens.spacing.xxSmall_6
|
|
30635
30646
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
|
|
30636
30647
|
type: "number",
|
|
30637
|
-
style: styles$
|
|
30648
|
+
style: styles$u.domainMinField,
|
|
30638
30649
|
value: domainEntries[0],
|
|
30639
30650
|
onChange: newValue => {
|
|
30640
30651
|
handleDomainChange(0, newValue);
|
|
@@ -30644,12 +30655,12 @@ const LockedFunctionSettings = props => {
|
|
|
30644
30655
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
30645
30656
|
tag: "label",
|
|
30646
30657
|
"aria-label": "domain max",
|
|
30647
|
-
style: styles$
|
|
30658
|
+
style: styles$u.domainMax
|
|
30648
30659
|
}, "max", /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30649
30660
|
size: wonderBlocksTokens.spacing.xxSmall_6
|
|
30650
30661
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.TextField, {
|
|
30651
30662
|
type: "number",
|
|
30652
|
-
style: styles$
|
|
30663
|
+
style: styles$u.domainMaxField,
|
|
30653
30664
|
value: domainEntries[1],
|
|
30654
30665
|
onChange: newValue => {
|
|
30655
30666
|
handleDomainChange(1, newValue);
|
|
@@ -30660,7 +30671,7 @@ const LockedFunctionSettings = props => {
|
|
|
30660
30671
|
onRemove: onRemove
|
|
30661
30672
|
}));
|
|
30662
30673
|
};
|
|
30663
|
-
const styles$
|
|
30674
|
+
const styles$u = aphrodite.StyleSheet.create({
|
|
30664
30675
|
accordionHeader: {
|
|
30665
30676
|
textOverflow: "ellipsis",
|
|
30666
30677
|
// A maximum width needs to be specified in order for the ellipsis to work.
|
|
@@ -30725,7 +30736,7 @@ const LabeledSwitch = props => {
|
|
|
30725
30736
|
const ids = wonderBlocksCore.useUniqueIdWithMock();
|
|
30726
30737
|
const switchId = ids.get("switch");
|
|
30727
30738
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30728
|
-
style: [styles$
|
|
30739
|
+
style: [styles$t.row, style]
|
|
30729
30740
|
}, /*#__PURE__*/React__namespace.createElement(Switch__default["default"], {
|
|
30730
30741
|
id: switchId,
|
|
30731
30742
|
checked: checked,
|
|
@@ -30737,7 +30748,7 @@ const LabeledSwitch = props => {
|
|
|
30737
30748
|
htmlFor: switchId
|
|
30738
30749
|
}, label));
|
|
30739
30750
|
};
|
|
30740
|
-
const styles$
|
|
30751
|
+
const styles$t = aphrodite.StyleSheet.create({
|
|
30741
30752
|
row: {
|
|
30742
30753
|
flexDirection: "row",
|
|
30743
30754
|
alignItems: "center"
|
|
@@ -30771,13 +30782,13 @@ const DefiningPointSettings = props => {
|
|
|
30771
30782
|
return /*#__PURE__*/React__namespace.createElement(PerseusEditorAccordion, {
|
|
30772
30783
|
expanded: expanded,
|
|
30773
30784
|
onToggle: onToggle,
|
|
30774
|
-
containerStyle: styles$
|
|
30775
|
-
panelStyle: styles$
|
|
30785
|
+
containerStyle: styles$s.container,
|
|
30786
|
+
panelStyle: styles$s.accordionPanel,
|
|
30776
30787
|
header:
|
|
30777
30788
|
/*#__PURE__*/
|
|
30778
30789
|
// Summary: Point, coords, color (filled/open)
|
|
30779
30790
|
React__namespace.createElement(wonderBlocksCore.View, {
|
|
30780
|
-
style: styles$
|
|
30791
|
+
style: styles$s.row
|
|
30781
30792
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `${label || "Point"} (${coord[0]}, ${coord[1]})`), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30782
30793
|
size: wonderBlocksTokens.spacing.xSmall_8
|
|
30783
30794
|
}), showPoint && /*#__PURE__*/React__namespace.createElement(ColorSwatch, {
|
|
@@ -30787,7 +30798,7 @@ const DefiningPointSettings = props => {
|
|
|
30787
30798
|
}, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
|
|
30788
30799
|
coord: coord,
|
|
30789
30800
|
error: !!error,
|
|
30790
|
-
style: styles$
|
|
30801
|
+
style: styles$s.spaceUnder,
|
|
30791
30802
|
onChange: newCoords => {
|
|
30792
30803
|
onChangeProps({
|
|
30793
30804
|
coord: newCoords
|
|
@@ -30796,12 +30807,12 @@ const DefiningPointSettings = props => {
|
|
|
30796
30807
|
}), onTogglePoint && /*#__PURE__*/React__namespace.createElement(LabeledSwitch, {
|
|
30797
30808
|
label: "show point on graph",
|
|
30798
30809
|
checked: !!showPoint,
|
|
30799
|
-
style: showPoint && styles$
|
|
30810
|
+
style: showPoint && styles$s.spaceUnder,
|
|
30800
30811
|
onChange: onTogglePoint
|
|
30801
30812
|
}), showPoint && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
|
|
30802
30813
|
selectedValue: pointColor,
|
|
30803
30814
|
onChange: handleColorChange,
|
|
30804
|
-
style: styles$
|
|
30815
|
+
style: styles$s.spaceUnder
|
|
30805
30816
|
}), /*#__PURE__*/React__namespace.createElement(LabeledSwitch, {
|
|
30806
30817
|
label: "open point",
|
|
30807
30818
|
checked: !filled,
|
|
@@ -30812,7 +30823,7 @@ const DefiningPointSettings = props => {
|
|
|
30812
30823
|
}
|
|
30813
30824
|
})));
|
|
30814
30825
|
};
|
|
30815
|
-
const styles$
|
|
30826
|
+
const styles$s = aphrodite.StyleSheet.create({
|
|
30816
30827
|
container: {
|
|
30817
30828
|
marginTop: wonderBlocksTokens.spacing.xSmall_8,
|
|
30818
30829
|
marginBottom: 0,
|
|
@@ -30880,7 +30891,7 @@ const LockedLineSettings = props => {
|
|
|
30880
30891
|
expanded: props.expanded,
|
|
30881
30892
|
onToggle: props.onToggle,
|
|
30882
30893
|
header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30883
|
-
style: styles$
|
|
30894
|
+
style: styles$r.row
|
|
30884
30895
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, lineLabel), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30885
30896
|
size: wonderBlocksTokens.spacing.xSmall_8
|
|
30886
30897
|
}), /*#__PURE__*/React__namespace.createElement(LineSwatch, {
|
|
@@ -30889,7 +30900,7 @@ const LockedLineSettings = props => {
|
|
|
30889
30900
|
}))
|
|
30890
30901
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
30891
30902
|
tag: "label",
|
|
30892
|
-
style: [styles$
|
|
30903
|
+
style: [styles$r.row, styles$r.spaceUnder]
|
|
30893
30904
|
}, "kind", /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30894
30905
|
size: wonderBlocksTokens.spacing.xxxSmall_4
|
|
30895
30906
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
@@ -30910,7 +30921,7 @@ const LockedLineSettings = props => {
|
|
|
30910
30921
|
value: "segment",
|
|
30911
30922
|
label: "segment"
|
|
30912
30923
|
}))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
30913
|
-
style: styles$
|
|
30924
|
+
style: styles$r.row
|
|
30914
30925
|
}, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
|
|
30915
30926
|
selectedValue: lineColor,
|
|
30916
30927
|
onChange: handleColorChange
|
|
@@ -30922,7 +30933,7 @@ const LockedLineSettings = props => {
|
|
|
30922
30933
|
lineStyle: value
|
|
30923
30934
|
})
|
|
30924
30935
|
})), isInvalid && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
30925
|
-
style: styles$
|
|
30936
|
+
style: styles$r.errorText
|
|
30926
30937
|
}, lengthZeroStr), /*#__PURE__*/React__namespace.createElement(DefiningPointSettings, _extends({
|
|
30927
30938
|
label: "Point 1",
|
|
30928
30939
|
showPoint: showPoint1,
|
|
@@ -30947,7 +30958,7 @@ const LockedLineSettings = props => {
|
|
|
30947
30958
|
onRemove: onRemove
|
|
30948
30959
|
}));
|
|
30949
30960
|
};
|
|
30950
|
-
const styles$
|
|
30961
|
+
const styles$r = aphrodite.StyleSheet.create({
|
|
30951
30962
|
row: {
|
|
30952
30963
|
display: "flex",
|
|
30953
30964
|
flexDirection: "row",
|
|
@@ -30988,7 +30999,7 @@ const LockedPointSettings = props => {
|
|
|
30988
30999
|
/*#__PURE__*/
|
|
30989
31000
|
// Summary: Point, coords, color (filled/open)
|
|
30990
31001
|
React__namespace.createElement(wonderBlocksCore.View, {
|
|
30991
|
-
style: styles$
|
|
31002
|
+
style: styles$q.row
|
|
30992
31003
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Point (${coord[0]}, ${coord[1]})`), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
30993
31004
|
size: wonderBlocksTokens.spacing.xSmall_8
|
|
30994
31005
|
}), /*#__PURE__*/React__namespace.createElement(ColorSwatch, {
|
|
@@ -30997,7 +31008,7 @@ const LockedPointSettings = props => {
|
|
|
30997
31008
|
}))
|
|
30998
31009
|
}, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
|
|
30999
31010
|
coord: coord,
|
|
31000
|
-
style: styles$
|
|
31011
|
+
style: styles$q.spaceUnder,
|
|
31001
31012
|
onChange: newCoord => {
|
|
31002
31013
|
onChangeProps({
|
|
31003
31014
|
coord: newCoord
|
|
@@ -31006,7 +31017,7 @@ const LockedPointSettings = props => {
|
|
|
31006
31017
|
}), /*#__PURE__*/React__namespace.createElement(ColorSelect, {
|
|
31007
31018
|
selectedValue: pointColor,
|
|
31008
31019
|
onChange: handleColorChange,
|
|
31009
|
-
style: styles$
|
|
31020
|
+
style: styles$q.spaceUnder
|
|
31010
31021
|
}), /*#__PURE__*/React__namespace.createElement(LabeledSwitch, {
|
|
31011
31022
|
label: "open point",
|
|
31012
31023
|
checked: !filled,
|
|
@@ -31021,7 +31032,7 @@ const LockedPointSettings = props => {
|
|
|
31021
31032
|
onRemove: onRemove
|
|
31022
31033
|
}));
|
|
31023
31034
|
};
|
|
31024
|
-
const styles$
|
|
31035
|
+
const styles$q = aphrodite.StyleSheet.create({
|
|
31025
31036
|
row: {
|
|
31026
31037
|
flexDirection: "row",
|
|
31027
31038
|
alignItems: "center"
|
|
@@ -31039,17 +31050,17 @@ const PolygonSwatch = props => {
|
|
|
31039
31050
|
} = props;
|
|
31040
31051
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
31041
31052
|
"aria-label": `${color}, stroke ${strokeStyle}, fill ${fillStyle}`,
|
|
31042
|
-
style: [styles$
|
|
31053
|
+
style: [styles$p.container, {
|
|
31043
31054
|
border: `4px ${strokeStyle} ${perseus.lockedFigureColors[color]}`
|
|
31044
31055
|
}]
|
|
31045
31056
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
31046
|
-
style: [styles$
|
|
31057
|
+
style: [styles$p.innerSquare, {
|
|
31047
31058
|
backgroundColor: perseus.lockedFigureColors[color],
|
|
31048
31059
|
opacity: fillStyle === "white" ? 0 : perseus.lockedFigureFillStyles[fillStyle]
|
|
31049
31060
|
}]
|
|
31050
31061
|
}));
|
|
31051
31062
|
};
|
|
31052
|
-
const styles$
|
|
31063
|
+
const styles$p = aphrodite.StyleSheet.create({
|
|
31053
31064
|
container: {
|
|
31054
31065
|
// Add a white outline so that the color swatch is visible when
|
|
31055
31066
|
// the dropdown option is highlighted with its blue background.
|
|
@@ -31091,7 +31102,7 @@ const LockedPolygonSettings = props => {
|
|
|
31091
31102
|
/*#__PURE__*/
|
|
31092
31103
|
// Summary: Polygon, number of sides, style swatch
|
|
31093
31104
|
React__namespace.createElement(wonderBlocksCore.View, {
|
|
31094
|
-
style: styles$
|
|
31105
|
+
style: styles$o.row
|
|
31095
31106
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Polygon, ${points.length} sides`), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
31096
31107
|
size: wonderBlocksTokens.spacing.xSmall_8
|
|
31097
31108
|
}), /*#__PURE__*/React__namespace.createElement(PolygonSwatch, {
|
|
@@ -31100,7 +31111,7 @@ const LockedPolygonSettings = props => {
|
|
|
31100
31111
|
strokeStyle: strokeStyle
|
|
31101
31112
|
}))
|
|
31102
31113
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
31103
|
-
style: [styles$
|
|
31114
|
+
style: [styles$o.row, styles$o.spaceUnder]
|
|
31104
31115
|
}, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
|
|
31105
31116
|
selectedValue: color,
|
|
31106
31117
|
onChange: handleColorChange
|
|
@@ -31108,7 +31119,7 @@ const LockedPolygonSettings = props => {
|
|
|
31108
31119
|
size: wonderBlocksTokens.spacing.medium_16
|
|
31109
31120
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
31110
31121
|
tag: "label",
|
|
31111
|
-
style: [styles$
|
|
31122
|
+
style: [styles$o.row, styles$o.truncatedWidth]
|
|
31112
31123
|
}, "fill", /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
31113
31124
|
size: wonderBlocksTokens.spacing.xxSmall_6
|
|
31114
31125
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.SingleSelect, {
|
|
@@ -31134,17 +31145,17 @@ const LockedPolygonSettings = props => {
|
|
|
31134
31145
|
onChange: newValue => onChangeProps({
|
|
31135
31146
|
showVertices: newValue
|
|
31136
31147
|
}),
|
|
31137
|
-
style: styles$
|
|
31148
|
+
style: styles$o.spaceUnder
|
|
31138
31149
|
}), /*#__PURE__*/React__namespace.createElement(PerseusEditorAccordion, {
|
|
31139
31150
|
header: /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Points"),
|
|
31140
31151
|
expanded: true,
|
|
31141
|
-
containerStyle: styles$
|
|
31142
|
-
panelStyle: styles$
|
|
31152
|
+
containerStyle: styles$o.pointAccordionContainer,
|
|
31153
|
+
panelStyle: styles$o.pointAccordionPanel
|
|
31143
31154
|
}, points.map((point, index) => {
|
|
31144
31155
|
const pointLabel = String.fromCharCode(65 + index);
|
|
31145
31156
|
return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
31146
31157
|
key: `locked-polygon-point-index-${index}`,
|
|
31147
|
-
style: [styles$
|
|
31158
|
+
style: [styles$o.row, styles$o.spaceUnder]
|
|
31148
31159
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `${pointLabel}:`), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
31149
31160
|
size: wonderBlocksTokens.spacing.medium_16
|
|
31150
31161
|
}), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
|
|
@@ -31172,7 +31183,7 @@ const LockedPolygonSettings = props => {
|
|
|
31172
31183
|
points: newPoints
|
|
31173
31184
|
});
|
|
31174
31185
|
},
|
|
31175
|
-
style: styles$
|
|
31186
|
+
style: styles$o.icon
|
|
31176
31187
|
}));
|
|
31177
31188
|
}), /*#__PURE__*/React__namespace.createElement(Button__default["default"], {
|
|
31178
31189
|
kind: "tertiary",
|
|
@@ -31188,7 +31199,7 @@ const LockedPolygonSettings = props => {
|
|
|
31188
31199
|
onRemove: onRemove
|
|
31189
31200
|
}));
|
|
31190
31201
|
};
|
|
31191
|
-
const styles$
|
|
31202
|
+
const styles$o = aphrodite.StyleSheet.create({
|
|
31192
31203
|
row: {
|
|
31193
31204
|
display: "flex",
|
|
31194
31205
|
flexDirection: "row",
|
|
@@ -31250,7 +31261,7 @@ const LockedVectorSettings = props => {
|
|
|
31250
31261
|
expanded: props.expanded,
|
|
31251
31262
|
onToggle: props.onToggle,
|
|
31252
31263
|
header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
31253
|
-
style: styles$
|
|
31264
|
+
style: styles$n.row
|
|
31254
31265
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, lineLabel), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
31255
31266
|
size: wonderBlocksTokens.spacing.xSmall_8
|
|
31256
31267
|
}), /*#__PURE__*/React__namespace.createElement(LineSwatch, {
|
|
@@ -31258,19 +31269,19 @@ const LockedVectorSettings = props => {
|
|
|
31258
31269
|
lineStyle: "solid"
|
|
31259
31270
|
}))
|
|
31260
31271
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
31261
|
-
style: [styles$
|
|
31272
|
+
style: [styles$n.row, styles$n.spaceUnder]
|
|
31262
31273
|
}, /*#__PURE__*/React__namespace.createElement(ColorSelect, {
|
|
31263
31274
|
selectedValue: lineColor,
|
|
31264
31275
|
onChange: handleColorChange
|
|
31265
31276
|
})), isInvalid && /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
31266
|
-
style: styles$
|
|
31277
|
+
style: styles$n.errorText
|
|
31267
31278
|
}, lengthErrorMessage), /*#__PURE__*/React__namespace.createElement(PerseusEditorAccordion, {
|
|
31268
31279
|
expanded: true // Initial state is expanded
|
|
31269
31280
|
,
|
|
31270
|
-
containerStyle: styles$
|
|
31271
|
-
panelStyle: styles$
|
|
31281
|
+
containerStyle: styles$n.container,
|
|
31282
|
+
panelStyle: styles$n.accordionPanel,
|
|
31272
31283
|
header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
31273
|
-
style: styles$
|
|
31284
|
+
style: styles$n.row
|
|
31274
31285
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Tail (${tail[0]}, ${tail[1]})`))
|
|
31275
31286
|
}, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
|
|
31276
31287
|
coord: tail,
|
|
@@ -31281,10 +31292,10 @@ const LockedVectorSettings = props => {
|
|
|
31281
31292
|
})), /*#__PURE__*/React__namespace.createElement(PerseusEditorAccordion, {
|
|
31282
31293
|
expanded: true // Initial state is expanded
|
|
31283
31294
|
,
|
|
31284
|
-
containerStyle: styles$
|
|
31285
|
-
panelStyle: styles$
|
|
31295
|
+
containerStyle: styles$n.container,
|
|
31296
|
+
panelStyle: styles$n.accordionPanel,
|
|
31286
31297
|
header: /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
31287
|
-
style: styles$
|
|
31298
|
+
style: styles$n.row
|
|
31288
31299
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, `Tip (${tip[0]}, ${tip[1]})`))
|
|
31289
31300
|
}, /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
|
|
31290
31301
|
coord: tip,
|
|
@@ -31298,7 +31309,7 @@ const LockedVectorSettings = props => {
|
|
|
31298
31309
|
onRemove: onRemove
|
|
31299
31310
|
}));
|
|
31300
31311
|
};
|
|
31301
|
-
const styles$
|
|
31312
|
+
const styles$n = aphrodite.StyleSheet.create({
|
|
31302
31313
|
accordionPanel: {
|
|
31303
31314
|
paddingBottom: wonderBlocksTokens.spacing.medium_16
|
|
31304
31315
|
},
|
|
@@ -31465,7 +31476,7 @@ const LockedFiguresSection = props => {
|
|
|
31465
31476
|
onRemove: () => removeLockedFigure(index)
|
|
31466
31477
|
}));
|
|
31467
31478
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
31468
|
-
style: styles$
|
|
31479
|
+
style: styles$m.buttonContainer
|
|
31469
31480
|
}, /*#__PURE__*/React__namespace.createElement(LockedFigureSelect, {
|
|
31470
31481
|
showM2bFeatures: props.showM2bFeatures,
|
|
31471
31482
|
id: `${uniqueId}-select`,
|
|
@@ -31475,10 +31486,10 @@ const LockedFiguresSection = props => {
|
|
|
31475
31486
|
}), showExpandButton && /*#__PURE__*/React__namespace.createElement(Button__default["default"], {
|
|
31476
31487
|
kind: "secondary",
|
|
31477
31488
|
onClick: () => toggleExpanded(allCollapsed),
|
|
31478
|
-
style: styles$
|
|
31489
|
+
style: styles$m.button
|
|
31479
31490
|
}, buttonLabel))));
|
|
31480
31491
|
};
|
|
31481
|
-
const styles$
|
|
31492
|
+
const styles$m = aphrodite.StyleSheet.create({
|
|
31482
31493
|
buttonContainer: {
|
|
31483
31494
|
flexDirection: "row",
|
|
31484
31495
|
alignItems: "center"
|
|
@@ -31514,7 +31525,7 @@ const GraphPointsCountSelector = _ref => {
|
|
|
31514
31525
|
// Never uses placeholder, always has value
|
|
31515
31526
|
,
|
|
31516
31527
|
placeholder: "",
|
|
31517
|
-
style: styles$
|
|
31528
|
+
style: styles$l.singleSelectShort
|
|
31518
31529
|
}, [...[...Array(7).keys()].map(n => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
31519
31530
|
key: n,
|
|
31520
31531
|
value: `${n}`,
|
|
@@ -31525,7 +31536,7 @@ const GraphPointsCountSelector = _ref => {
|
|
|
31525
31536
|
label: "unlimited"
|
|
31526
31537
|
})]);
|
|
31527
31538
|
};
|
|
31528
|
-
const styles$
|
|
31539
|
+
const styles$l = aphrodite.StyleSheet.create({
|
|
31529
31540
|
singleSelectShort: {
|
|
31530
31541
|
// Non-standard spacing, but it's the smallest we can go
|
|
31531
31542
|
// without running into styling issues with the dropdown.
|
|
@@ -31538,7 +31549,7 @@ const GraphTypeSelector = props => {
|
|
|
31538
31549
|
selectedValue: props.graphType,
|
|
31539
31550
|
onChange: props.onChange,
|
|
31540
31551
|
placeholder: "Select a graph type",
|
|
31541
|
-
style: styles$
|
|
31552
|
+
style: styles$k.singleSelectShort
|
|
31542
31553
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
31543
31554
|
value: "linear",
|
|
31544
31555
|
label: "Linear function"
|
|
@@ -31571,7 +31582,7 @@ const GraphTypeSelector = props => {
|
|
|
31571
31582
|
label: "Angle"
|
|
31572
31583
|
}));
|
|
31573
31584
|
};
|
|
31574
|
-
const styles$
|
|
31585
|
+
const styles$k = aphrodite.StyleSheet.create({
|
|
31575
31586
|
singleSelectShort: {
|
|
31576
31587
|
// Non-standard spacing, but it's the smallest we can go
|
|
31577
31588
|
// without running into styling issues with the dropdown.
|
|
@@ -32003,10 +32014,10 @@ class InteractiveGraphSettings extends React__namespace.Component {
|
|
|
32003
32014
|
}
|
|
32004
32015
|
}))), /*#__PURE__*/React__namespace.createElement(LabeledRow, {
|
|
32005
32016
|
label: "Background image URL:",
|
|
32006
|
-
style: styles$
|
|
32017
|
+
style: styles$j.resetSpaceTop
|
|
32007
32018
|
}, /*#__PURE__*/React__namespace.createElement("input", {
|
|
32008
32019
|
type: "text",
|
|
32009
|
-
className: aphrodite.css(styles$
|
|
32020
|
+
className: aphrodite.css(styles$j.backgroundUrlInput),
|
|
32010
32021
|
ref: this.bgUrlRef,
|
|
32011
32022
|
value: this.state.backgroundImage.url || "",
|
|
32012
32023
|
onChange: e => {
|
|
@@ -32022,9 +32033,9 @@ class InteractiveGraphSettings extends React__namespace.Component {
|
|
|
32022
32033
|
onKeyPress: this.changeBackgroundUrl,
|
|
32023
32034
|
onBlur: this.changeBackgroundUrl
|
|
32024
32035
|
}), /*#__PURE__*/React__namespace.createElement(InfoTip$c, null, /*#__PURE__*/React__namespace.createElement("p", null, "Create an image in graphie, or use the \"Add image\" function to create a background."))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
32025
|
-
style: styles$
|
|
32036
|
+
style: styles$j.protractorSection
|
|
32026
32037
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
32027
|
-
style: styles$
|
|
32038
|
+
style: styles$j.checkboxRow
|
|
32028
32039
|
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksForm.Checkbox, {
|
|
32029
32040
|
label: "Show protractor",
|
|
32030
32041
|
checked: this.props.showProtractor,
|
|
@@ -32033,7 +32044,7 @@ class InteractiveGraphSettings extends React__namespace.Component {
|
|
|
32033
32044
|
showProtractor: value
|
|
32034
32045
|
});
|
|
32035
32046
|
},
|
|
32036
|
-
style: styles$
|
|
32047
|
+
style: styles$j.resetSpaceTop
|
|
32037
32048
|
})), this.props.showProtractor && /*#__PURE__*/React__namespace.createElement(Banner__default["default"], {
|
|
32038
32049
|
layout: "floating",
|
|
32039
32050
|
text: "The protractor is not accessible. Please consider an alternate approach.",
|
|
@@ -32041,7 +32052,7 @@ class InteractiveGraphSettings extends React__namespace.Component {
|
|
|
32041
32052
|
}))));
|
|
32042
32053
|
}
|
|
32043
32054
|
}
|
|
32044
|
-
const styles$
|
|
32055
|
+
const styles$j = aphrodite.StyleSheet.create({
|
|
32045
32056
|
resetSpaceTop: {
|
|
32046
32057
|
marginTop: 0
|
|
32047
32058
|
},
|
|
@@ -32080,14 +32091,14 @@ const SegmentCountSelector = _ref => {
|
|
|
32080
32091
|
const num = +newValue;
|
|
32081
32092
|
onChange(num);
|
|
32082
32093
|
},
|
|
32083
|
-
style: styles$
|
|
32094
|
+
style: styles$i.singleSelectShort
|
|
32084
32095
|
}, ___default["default"].range(1, 7).map(n => /*#__PURE__*/React__namespace.createElement(wonderBlocksDropdown.OptionItem, {
|
|
32085
32096
|
key: n,
|
|
32086
32097
|
value: `${n}`,
|
|
32087
32098
|
label: `${n} segment${n > 1 ? "s" : ""}`
|
|
32088
32099
|
})));
|
|
32089
32100
|
};
|
|
32090
|
-
const styles$
|
|
32101
|
+
const styles$i = aphrodite.StyleSheet.create({
|
|
32091
32102
|
singleSelectShort: {
|
|
32092
32103
|
// Non-standard spacing, but it's the smallest we can go
|
|
32093
32104
|
// without running into styling issues with the dropdown.
|
|
@@ -32097,14 +32108,60 @@ const styles$h = aphrodite.StyleSheet.create({
|
|
|
32097
32108
|
|
|
32098
32109
|
const StartCoordsAngle = props => {
|
|
32099
32110
|
const {
|
|
32100
|
-
startCoords
|
|
32111
|
+
startCoords,
|
|
32112
|
+
onChange
|
|
32101
32113
|
} = props;
|
|
32102
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
32103
|
-
|
|
32104
|
-
|
|
32105
|
-
|
|
32106
|
-
}))
|
|
32114
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
32115
|
+
style: styles$h.equationSection
|
|
32116
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, null, "Starting equation:"), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.BodyMonospace, {
|
|
32117
|
+
style: styles$h.equationBody
|
|
32118
|
+
}, getAngleEquation(startCoords))), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
32119
|
+
style: styles$h.tile
|
|
32120
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Point 1:"), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
32121
|
+
size: wonderBlocksTokens.spacing.small_12
|
|
32122
|
+
}), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
|
|
32123
|
+
coord: startCoords[0],
|
|
32124
|
+
labels: ["x", "y"],
|
|
32125
|
+
onChange: value => onChange([value, startCoords[1], startCoords[2]])
|
|
32126
|
+
})), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
32127
|
+
style: styles$h.tile
|
|
32128
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Vertex:"), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
32129
|
+
size: wonderBlocksTokens.spacing.small_12
|
|
32130
|
+
}), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
|
|
32131
|
+
coord: startCoords[1],
|
|
32132
|
+
labels: ["x", "y"],
|
|
32133
|
+
onChange: value => onChange([startCoords[0], value, startCoords[2]])
|
|
32134
|
+
})), /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
|
|
32135
|
+
style: styles$h.tile
|
|
32136
|
+
}, /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelLarge, null, "Point 2:"), /*#__PURE__*/React__namespace.createElement(Strut, {
|
|
32137
|
+
size: wonderBlocksTokens.spacing.small_12
|
|
32138
|
+
}), /*#__PURE__*/React__namespace.createElement(CoordinatePairInput, {
|
|
32139
|
+
coord: startCoords[2],
|
|
32140
|
+
labels: ["x", "y"],
|
|
32141
|
+
onChange: value => onChange([startCoords[0], startCoords[1], value])
|
|
32142
|
+
})));
|
|
32107
32143
|
};
|
|
32144
|
+
const styles$h = aphrodite.StyleSheet.create({
|
|
32145
|
+
tile: {
|
|
32146
|
+
backgroundColor: wonderBlocksTokens.color.fadedBlue8,
|
|
32147
|
+
marginTop: wonderBlocksTokens.spacing.xSmall_8,
|
|
32148
|
+
padding: wonderBlocksTokens.spacing.small_12,
|
|
32149
|
+
borderRadius: wonderBlocksTokens.spacing.xSmall_8,
|
|
32150
|
+
flexDirection: "row",
|
|
32151
|
+
alignItems: "center"
|
|
32152
|
+
},
|
|
32153
|
+
equationSection: {
|
|
32154
|
+
marginTop: wonderBlocksTokens.spacing.small_12
|
|
32155
|
+
},
|
|
32156
|
+
equationBody: {
|
|
32157
|
+
backgroundColor: wonderBlocksTokens.color.fadedOffBlack8,
|
|
32158
|
+
border: `1px solid ${wonderBlocksTokens.color.fadedOffBlack32}`,
|
|
32159
|
+
marginTop: wonderBlocksTokens.spacing.xSmall_8,
|
|
32160
|
+
paddingLeft: wonderBlocksTokens.spacing.xSmall_8,
|
|
32161
|
+
paddingRight: wonderBlocksTokens.spacing.xSmall_8,
|
|
32162
|
+
fontSize: wonderBlocksTokens.font.size.xSmall
|
|
32163
|
+
}
|
|
32164
|
+
});
|
|
32108
32165
|
|
|
32109
32166
|
const StartCoordsCircle = props => {
|
|
32110
32167
|
const {
|