@khanacademy/perseus 17.1.1 → 17.3.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/CHANGELOG.md +23 -0
- package/dist/es/index.js +26 -5
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +25 -3
- package/dist/index.js.map +1 -1
- package/dist/perseus-types.d.ts +2 -8
- package/package.json +2 -2
- package/src/__testdata__/graphie.testdata.ts +8 -8
- package/src/__testdata__/server-item-renderer.testdata.ts +10 -12
- package/src/__tests__/mock-asset-loading-widget.tsx +5 -8
- package/src/components/math-input.tsx +6 -1
- package/src/index.ts +2 -0
- package/src/perseus-types.ts +18 -11
- package/src/widgets/__testdata__/expression.testdata.ts +13 -15
- package/src/widgets/label-image/hide-answers-toggle.tsx +1 -1
- package/tsconfig-build.tsbuildinfo +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export { default as KhanMath } from "./util/math";
|
|
|
52
52
|
export { default as LoadingContext } from "./loading-context";
|
|
53
53
|
export { default as mediaQueries } from "./styles/media-queries";
|
|
54
54
|
export { default as PerseusMarkdown } from "./perseus-markdown";
|
|
55
|
-
export { PerseusExpressionAnswerFormConsidered, plotterPlotTypes, } from "./perseus-types";
|
|
55
|
+
export { PerseusExpressionAnswerFormConsidered, plotterPlotTypes, ItemExtras, } from "./perseus-types";
|
|
56
56
|
export { traverse } from "./traversal";
|
|
57
57
|
export { isItemRenderableByVersion } from "./renderability";
|
|
58
58
|
export { violatingWidgets } from "./a11y";
|
|
@@ -81,7 +81,7 @@ export type { ILogger, LogErrorOptions, ErrorKind } from "./logging/log";
|
|
|
81
81
|
export type { ServerItemRenderer as ServerItemRendererComponent } from "./server-item-renderer";
|
|
82
82
|
export type { Alignment, APIOptions, APIOptionsWithDefaults, ChangeHandler, DeviceType, DomInsertCheckFn, EditorMode, FocusPath, Hint, ImageDict, ImageUploader, JiptLabelStore, JiptRenderer, PerseusDependencies, PerseusScore, Version, VideoData, VideoKind, WidgetDict, WidgetExports, WidgetInfo, } from "./types";
|
|
83
83
|
export type { ParsedValue } from "./util";
|
|
84
|
-
export type { MathFormat, InputNumberWidget, PerseusImageBackground, PerseusInteractiveGraphWidgetOptions, PerseusRadioWidgetOptions, PerseusExpressionWidgetOptions, PerseusPlotterWidgetOptions, PerseusRenderer, } from "./perseus-types";
|
|
84
|
+
export type { MathFormat, InputNumberWidget, PerseusImageBackground, PerseusInteractiveGraphWidgetOptions, PerseusRadioWidgetOptions, PerseusExpressionWidgetOptions, PerseusPlotterWidgetOptions, PerseusRenderer, PerseusAnswerArea, } from "./perseus-types";
|
|
85
85
|
export type { Coord } from "./interactive2/types";
|
|
86
86
|
export type { MarkerType } from "./widgets/label-image/types";
|
|
87
87
|
/**
|
package/dist/index.js
CHANGED
|
@@ -182,7 +182,7 @@ class MathInput extends React__namespace.Component {
|
|
|
182
182
|
// Use the specified symbol to represent multiplication
|
|
183
183
|
// TODO(alex): Add an option to disallow variables, in
|
|
184
184
|
// which case 'x' should get converted to '\\times'
|
|
185
|
-
if (this.props.convertDotToTimes) {
|
|
185
|
+
if (mathInput.convertDotToTimesByLocale(this.props.convertDotToTimes)) {
|
|
186
186
|
value = value.replace(/\\cdot/g, "\\times");
|
|
187
187
|
|
|
188
188
|
// Preserve cursor position in the common case:
|
|
@@ -31234,7 +31234,8 @@ const HideAnswersToggle = props => {
|
|
|
31234
31234
|
"aria-labelledby": labelId
|
|
31235
31235
|
}), /*#__PURE__*/React__namespace.createElement(wonderBlocksTypography.LabelMedium, {
|
|
31236
31236
|
id: labelId,
|
|
31237
|
-
htmlFor: switchId
|
|
31237
|
+
htmlFor: switchId,
|
|
31238
|
+
tag: "label"
|
|
31238
31239
|
}, strings.hideAnswersToggleLabel));
|
|
31239
31240
|
};
|
|
31240
31241
|
const styles$h = aphrodite.StyleSheet.create({
|
|
@@ -44320,7 +44321,7 @@ const init = function (options) {
|
|
|
44320
44321
|
|
|
44321
44322
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
44322
44323
|
const libName = "@khanacademy/perseus";
|
|
44323
|
-
const libVersion = "17.
|
|
44324
|
+
const libVersion = "17.3.0";
|
|
44324
44325
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
44325
44326
|
|
|
44326
44327
|
const apiVersion = {
|
|
@@ -45651,6 +45652,26 @@ var constants = /*#__PURE__*/Object.freeze({
|
|
|
45651
45652
|
|
|
45652
45653
|
// TODO(FEI-5054): Figure out how to get global .d.ts files working with monorepos
|
|
45653
45654
|
|
|
45655
|
+
const ItemExtras = [
|
|
45656
|
+
// The user might benefit from using a Scientific Calculator. Provided on Khan Academy when true
|
|
45657
|
+
"calculator",
|
|
45658
|
+
// The user might benefit from using a statistics Chi Squared Table like https://people.richland.edu/james/lecture/m170/tbl-chi.html
|
|
45659
|
+
"chi2Table",
|
|
45660
|
+
// The user might benefit from a monthly payments calculator. Provided on Khan Academy when true
|
|
45661
|
+
"financialCalculatorMonthlyPayment",
|
|
45662
|
+
// The user might benefit from a total amount calculator. Provided on Khan Academy when true
|
|
45663
|
+
"financialCalculatorTotalAmount",
|
|
45664
|
+
// The user might benefit from a time to pay off calculator. Provided on Khan Academy when true
|
|
45665
|
+
"financialCalculatorTimeToPayOff",
|
|
45666
|
+
// The user might benefit from using a Periodic Table of Elements. Provided on Khan Academy when true
|
|
45667
|
+
"periodicTable",
|
|
45668
|
+
// The user might benefit from using a Periodic Table of Elements with key. Provided on Khan Academy when true
|
|
45669
|
+
"periodicTableWithKey",
|
|
45670
|
+
// The user might benefit from using a statistics T Table like https://www.statisticshowto.com/tables/t-distribution-table/
|
|
45671
|
+
"tTable",
|
|
45672
|
+
// The user might benefit from using a statistics Z Table like https://www.ztable.net/
|
|
45673
|
+
"zTable"];
|
|
45674
|
+
|
|
45654
45675
|
// prettier-ignore
|
|
45655
45676
|
|
|
45656
45677
|
// prettier-ignore
|
|
@@ -46883,6 +46904,7 @@ exports.HintRenderer = HintRenderer;
|
|
|
46883
46904
|
exports.HintsRenderer = HintsRenderer;
|
|
46884
46905
|
exports.InputNumber = InputNumber$1;
|
|
46885
46906
|
exports.InteractiveGraphWidget = InteractiveGraph$1;
|
|
46907
|
+
exports.ItemExtras = ItemExtras;
|
|
46886
46908
|
exports.JiptParagraphs = JiptParagraphs;
|
|
46887
46909
|
exports.KhanColors = KhanColors;
|
|
46888
46910
|
exports.KhanMath = KhanMath;
|