@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/dist/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/index.js
CHANGED
|
@@ -17421,10 +17421,18 @@ class ErrorBoundary extends React__namespace.Component {
|
|
|
17421
17421
|
error: error.toString()
|
|
17422
17422
|
});
|
|
17423
17423
|
this.props.onError?.(error, info);
|
|
17424
|
-
Log.error(
|
|
17424
|
+
Log.error(
|
|
17425
|
+
// NOTE(jeremy): We concatenate the error messsage here. Typical
|
|
17426
|
+
// Khan Academy error handling guidance says that you should never
|
|
17427
|
+
// "build" the error message that might be sent to our error
|
|
17428
|
+
// reporting tool (currently Sentry). However, if we don't
|
|
17429
|
+
// differentiate between the different errors that are thrown, they
|
|
17430
|
+
// all end up being grouped as a single Sentry event, which is very
|
|
17431
|
+
// unhelpful.
|
|
17432
|
+
"Unhandled Perseus error: " + error.message, Errors.Internal, {
|
|
17425
17433
|
cause: error,
|
|
17426
17434
|
loggedMetadata: {
|
|
17427
|
-
componentStack: info.componentStack,
|
|
17435
|
+
componentStack: !!info && "componentStack" in info ? info.componentStack : "componentStack not provided",
|
|
17428
17436
|
...this.props.metadata
|
|
17429
17437
|
}
|
|
17430
17438
|
});
|
|
@@ -17439,8 +17447,9 @@ class ErrorBoundary extends React__namespace.Component {
|
|
|
17439
17447
|
return /*#__PURE__*/React__namespace.createElement("svg", {
|
|
17440
17448
|
height: "16",
|
|
17441
17449
|
width: "16",
|
|
17442
|
-
viewBox: "0 0 16 16"
|
|
17443
|
-
|
|
17450
|
+
viewBox: "0 0 16 16",
|
|
17451
|
+
role: "img"
|
|
17452
|
+
}, /*#__PURE__*/React__namespace.createElement("title", null, "Rendering Error!"), /*#__PURE__*/React__namespace.createElement("path", {
|
|
17444
17453
|
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",
|
|
17445
17454
|
fill: "#d92916",
|
|
17446
17455
|
fillRule: "evenodd"
|
|
@@ -44328,7 +44337,7 @@ const init = function (options) {
|
|
|
44328
44337
|
|
|
44329
44338
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
44330
44339
|
const libName = "@khanacademy/perseus";
|
|
44331
|
-
const libVersion = "17.3.
|
|
44340
|
+
const libVersion = "17.3.3";
|
|
44332
44341
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
44333
44342
|
|
|
44334
44343
|
const apiVersion = {
|