@khanacademy/perseus 17.3.1 → 17.3.3
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/CHANGELOG.md +12 -0
- package/dist/es/index.css +12 -10
- package/dist/es/index.js +14 -5
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +12 -10
- package/dist/index.js +14 -5
- package/dist/index.js.map +1 -1
- package/dist/server-item-renderer.d.ts +5 -5
- package/package.json +1 -1
- package/src/__tests__/error-boundary.test.tsx +76 -0
- package/src/error-boundary.tsx +22 -7
- package/src/server-item-renderer.tsx +5 -5
- package/src/styles/articles.less +20 -15
- package/tsconfig-build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @khanacademy/perseus
|
|
2
2
|
|
|
3
|
+
## 17.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#876](https://github.com/Khan/perseus/pull/876) [`fdc00c90`](https://github.com/Khan/perseus/commit/fdc00c90a19d3e241b3a5cdc2b1df5d761b24af3) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Adjust CSS to ensure all `code` and `pre` blocks rendered by Perseus have a monospace font and common styling
|
|
8
|
+
|
|
9
|
+
## 17.3.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#850](https://github.com/Khan/perseus/pull/850) [`f4cd2a76`](https://github.com/Khan/perseus/commit/f4cd2a7639556312af75b9ba9c6a97c41c94beac) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Widget rendering errors are now reported as distinct errors to the Perseus logging infrastructure.
|
|
14
|
+
|
|
3
15
|
## 17.3.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/es/index.css
CHANGED
|
@@ -1490,6 +1490,18 @@ body.mobile ul.inequalities-one-line-radios > li {
|
|
|
1490
1490
|
clear: both;
|
|
1491
1491
|
}
|
|
1492
1492
|
/* Fall back colors? Eg educator, talks & interviews */
|
|
1493
|
+
.framework-perseus code {
|
|
1494
|
+
font-family: Courier, monospace;
|
|
1495
|
+
}
|
|
1496
|
+
.framework-perseus pre {
|
|
1497
|
+
background-color: #f0f1f2;
|
|
1498
|
+
border-radius: 4px;
|
|
1499
|
+
color: #21242c;
|
|
1500
|
+
font-size: 18px;
|
|
1501
|
+
padding: 16px;
|
|
1502
|
+
white-space: pre;
|
|
1503
|
+
overflow: auto;
|
|
1504
|
+
}
|
|
1493
1505
|
.framework-perseus.perseus-article:not(.perseus-mobile) .perseus-widget-container:not(.perseus-widget__definition) {
|
|
1494
1506
|
font-size: 14px;
|
|
1495
1507
|
line-height: 19.6px;
|
|
@@ -1634,17 +1646,7 @@ body.mobile ul.inequalities-one-line-radios > li {
|
|
|
1634
1646
|
line-height: 1.5;
|
|
1635
1647
|
margin: 0;
|
|
1636
1648
|
}
|
|
1637
|
-
.framework-perseus.perseus-article:not(.perseus-mobile) code {
|
|
1638
|
-
font-family: Courier, monospace;
|
|
1639
|
-
}
|
|
1640
1649
|
.framework-perseus.perseus-article:not(.perseus-mobile) pre {
|
|
1641
|
-
background-color: #f0f1f2;
|
|
1642
|
-
border-radius: 4px;
|
|
1643
|
-
color: #21242c;
|
|
1644
|
-
font-size: 18px;
|
|
1645
|
-
padding: 16px;
|
|
1646
|
-
white-space: pre;
|
|
1647
|
-
overflow: auto;
|
|
1648
1650
|
margin: 0 -16px 32px -16px;
|
|
1649
1651
|
}
|
|
1650
1652
|
.framework-perseus:not(.perseus-article):not(.perseus-mobile) .perseus-radio-option-content .perseus-renderer > .paragraph {
|
package/dist/es/index.js
CHANGED
|
@@ -17373,10 +17373,18 @@ class ErrorBoundary extends React.Component {
|
|
|
17373
17373
|
error: error.toString()
|
|
17374
17374
|
});
|
|
17375
17375
|
(_this$props$onError = (_this$props = this.props).onError) == null || _this$props$onError.call(_this$props, error, info);
|
|
17376
|
-
Log.error(
|
|
17376
|
+
Log.error(
|
|
17377
|
+
// NOTE(jeremy): We concatenate the error messsage here. Typical
|
|
17378
|
+
// Khan Academy error handling guidance says that you should never
|
|
17379
|
+
// "build" the error message that might be sent to our error
|
|
17380
|
+
// reporting tool (currently Sentry). However, if we don't
|
|
17381
|
+
// differentiate between the different errors that are thrown, they
|
|
17382
|
+
// all end up being grouped as a single Sentry event, which is very
|
|
17383
|
+
// unhelpful.
|
|
17384
|
+
"Unhandled Perseus error: " + error.message, Errors.Internal, {
|
|
17377
17385
|
cause: error,
|
|
17378
17386
|
loggedMetadata: _extends({
|
|
17379
|
-
componentStack: info.componentStack
|
|
17387
|
+
componentStack: !!info && "componentStack" in info ? info.componentStack : "componentStack not provided"
|
|
17380
17388
|
}, this.props.metadata)
|
|
17381
17389
|
});
|
|
17382
17390
|
}
|
|
@@ -17390,8 +17398,9 @@ class ErrorBoundary extends React.Component {
|
|
|
17390
17398
|
return /*#__PURE__*/React.createElement("svg", {
|
|
17391
17399
|
height: "16",
|
|
17392
17400
|
width: "16",
|
|
17393
|
-
viewBox: "0 0 16 16"
|
|
17394
|
-
|
|
17401
|
+
viewBox: "0 0 16 16",
|
|
17402
|
+
role: "img"
|
|
17403
|
+
}, /*#__PURE__*/React.createElement("title", null, "Rendering Error!"), /*#__PURE__*/React.createElement("path", {
|
|
17395
17404
|
d: "m8 16c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm0-3c0.55 0 1-0.45 1-1s-0.45-1-1-1-1 0.45-1 1 0.45 1 1 1zm0-9c-0.55 0-1 0.45-1 1v4c0 0.55.45 1 1 1s1-0.45 1-1v-4c0-0.55-0.45-1-1-1z",
|
|
17396
17405
|
fill: "#d92916",
|
|
17397
17406
|
fillRule: "evenodd"
|
|
@@ -44193,7 +44202,7 @@ const init = function init(options) {
|
|
|
44193
44202
|
|
|
44194
44203
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
44195
44204
|
const libName = "@khanacademy/perseus";
|
|
44196
|
-
const libVersion = "17.3.
|
|
44205
|
+
const libVersion = "17.3.3";
|
|
44197
44206
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
44198
44207
|
|
|
44199
44208
|
const apiVersion = {
|