@khanacademy/perseus 19.6.0 → 19.6.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/es/index.js +13 -39
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +13 -39
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -24844,22 +24844,19 @@ class Explanation extends React.Component {
|
|
|
24844
24844
|
};
|
|
24845
24845
|
}
|
|
24846
24846
|
render() {
|
|
24847
|
-
const {
|
|
24848
|
-
Link
|
|
24849
|
-
} = this.props.apiOptions.baseElements;
|
|
24850
24847
|
const {
|
|
24851
24848
|
isArticle,
|
|
24852
24849
|
isMobile
|
|
24853
24850
|
} = this.props.apiOptions;
|
|
24854
|
-
const
|
|
24855
|
-
let
|
|
24851
|
+
const promptText = this.state.expanded ? this.props.hidePrompt : this.props.showPrompt;
|
|
24852
|
+
let promptContainer;
|
|
24856
24853
|
|
|
24857
24854
|
// TODO(diedra): This isn't a valid href;
|
|
24858
24855
|
// change this to a button that looks like a link.
|
|
24859
24856
|
const href = "javascript:void(0)";
|
|
24860
24857
|
const onClick = this._onClick;
|
|
24861
24858
|
if (isMobile) {
|
|
24862
|
-
|
|
24859
|
+
promptContainer = /*#__PURE__*/React.createElement("div", {
|
|
24863
24860
|
className: css(styles$o.linkContainer)
|
|
24864
24861
|
}, /*#__PURE__*/React.createElement("a", {
|
|
24865
24862
|
className: css(styles$o.mobileExplanationLink),
|
|
@@ -24867,7 +24864,7 @@ class Explanation extends React.Component {
|
|
|
24867
24864
|
onClick: onClick,
|
|
24868
24865
|
role: "button",
|
|
24869
24866
|
"aria-expanded": this.state.expanded
|
|
24870
|
-
},
|
|
24867
|
+
}, promptText), this.state.expanded && /*#__PURE__*/React.createElement("svg", {
|
|
24871
24868
|
className: css(styles$o.disclosureArrow)
|
|
24872
24869
|
}, /*#__PURE__*/React.createElement("polygon", {
|
|
24873
24870
|
style: {
|
|
@@ -24876,41 +24873,18 @@ class Explanation extends React.Component {
|
|
|
24876
24873
|
points: `0,${arrowHeight} ` + `${arrowWidth},${arrowHeight} ` + `${arrowWidth / 2},0`
|
|
24877
24874
|
})));
|
|
24878
24875
|
} else {
|
|
24879
|
-
|
|
24880
|
-
|
|
24881
|
-
|
|
24882
|
-
|
|
24883
|
-
|
|
24884
|
-
|
|
24885
|
-
|
|
24886
|
-
className: css(styles$o.explanationLink)
|
|
24887
|
-
// HACK(michaelpolyak): WB Link doesn't passthrough
|
|
24888
|
-
// class name.
|
|
24889
|
-
,
|
|
24890
|
-
style: styles$o.explanationLink,
|
|
24891
|
-
href: href,
|
|
24892
|
-
onClick: onClick,
|
|
24893
|
-
role: "button",
|
|
24894
|
-
"aria-expanded": this.state.expanded
|
|
24895
|
-
}, `[${linkAnchor}]`));
|
|
24896
|
-
} else {
|
|
24897
|
-
// NOTE: For exercises, the baseElements `Link` is an
|
|
24898
|
-
// anchor tag, see: `perseus-api.jsx`.
|
|
24899
|
-
linkContainer = /*#__PURE__*/React.createElement("div", {
|
|
24900
|
-
className: css(styles$o.linkContainer, styles$o.exerciseLink)
|
|
24901
|
-
}, /*#__PURE__*/React.createElement(Link, {
|
|
24902
|
-
className: css(styles$o.explanationLink),
|
|
24903
|
-
href: href,
|
|
24904
|
-
onClick: onClick,
|
|
24905
|
-
role: "button",
|
|
24906
|
-
"aria-expanded": this.state.expanded
|
|
24907
|
-
}, `[${linkAnchor}]`));
|
|
24908
|
-
}
|
|
24876
|
+
const viewStyling = isArticle ? [styles$o.explanationLink, styles$o.articleLink] : [styles$o.explanationLink, styles$o.exerciseLink];
|
|
24877
|
+
promptContainer = /*#__PURE__*/React.createElement(Clickable, {
|
|
24878
|
+
onClick: onClick,
|
|
24879
|
+
"aria-expanded": this.state.expanded
|
|
24880
|
+
}, () => /*#__PURE__*/React.createElement(View, {
|
|
24881
|
+
style: viewStyling
|
|
24882
|
+
}, `[${promptText}]`));
|
|
24909
24883
|
}
|
|
24910
24884
|
const expandedStyle = isMobile ? styles$o.contentExpandedMobile : styles$o.contentExpanded;
|
|
24911
24885
|
return /*#__PURE__*/React.createElement("div", {
|
|
24912
24886
|
className: css(styles$o.container)
|
|
24913
|
-
},
|
|
24887
|
+
}, promptContainer, this.state.expanded && /*#__PURE__*/React.createElement("div", {
|
|
24914
24888
|
className: css(styles$o.content, isMobile && styles$o.contentMobile, this.state.expanded && expandedStyle)
|
|
24915
24889
|
// eslint-disable-next-line react/no-string-refs
|
|
24916
24890
|
,
|
|
@@ -41580,7 +41554,7 @@ const init = function init(options) {
|
|
|
41580
41554
|
|
|
41581
41555
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
41582
41556
|
const libName = "@khanacademy/perseus";
|
|
41583
|
-
const libVersion = "19.6.
|
|
41557
|
+
const libVersion = "19.6.1";
|
|
41584
41558
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
41585
41559
|
|
|
41586
41560
|
const apiVersion = {
|