@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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @khanacademy/perseus
|
|
2
2
|
|
|
3
|
+
## 17.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#867](https://github.com/Khan/perseus/pull/867) [`378294da`](https://github.com/Khan/perseus/commit/378294da3d207839a861333175920b562773ee97) Thanks [@nedredmond](https://github.com/nedredmond)! - Update and export PerseusAnswerArea type
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#869](https://github.com/Khan/perseus/pull/869) [`57eeec68`](https://github.com/Khan/perseus/commit/57eeec681072591c64b633527833f3ab9f6e3f1a) Thanks [@nedredmond](https://github.com/nedredmond)! - Remove new unused field from PerseusAnswerArea API
|
|
12
|
+
|
|
13
|
+
## 17.2.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- [#863](https://github.com/Khan/perseus/pull/863) [`f910bd72`](https://github.com/Khan/perseus/commit/f910bd72fc5cbf88a1a00d57f8aefa8eea2c755d) Thanks [@handeyeco](https://github.com/handeyeco)! - Localize the multiplication symbol in MathInput
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#865](https://github.com/Khan/perseus/pull/865) [`347d6d15`](https://github.com/Khan/perseus/commit/347d6d15ee7989819852067e5916a86725e95def) Thanks [@nedredmond](https://github.com/nedredmond)! - Make label for hide answers switch in Label Image Widget into label tag
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [[`f910bd72`](https://github.com/Khan/perseus/commit/f910bd72fc5cbf88a1a00d57f8aefa8eea2c755d)]:
|
|
24
|
+
- @khanacademy/math-input@16.3.0
|
|
25
|
+
|
|
3
26
|
## 17.1.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as KAS from '@khanacademy/kas';
|
|
2
|
-
import { keyTranslator, CursorContext, createMathField, mathQuillInstance, getCursorContext, DesktopKeypad, KeypadInput, KeypadType, KeyArray, keypadElementPropType } from '@khanacademy/math-input';
|
|
2
|
+
import { keyTranslator, CursorContext, createMathField, convertDotToTimesByLocale, mathQuillInstance, getCursorContext, DesktopKeypad, KeypadInput, KeypadType, KeyArray, keypadElementPropType } from '@khanacademy/math-input';
|
|
3
3
|
import * as PerseusLinter from '@khanacademy/perseus-linter';
|
|
4
4
|
import { linterContextDefault, Rule, linterContextProps } from '@khanacademy/perseus-linter';
|
|
5
5
|
import { View, RenderStateRoot, useUniqueIdWithMock, Text } from '@khanacademy/wonder-blocks-core';
|
|
@@ -130,7 +130,7 @@ class MathInput extends React.Component {
|
|
|
130
130
|
// Use the specified symbol to represent multiplication
|
|
131
131
|
// TODO(alex): Add an option to disallow variables, in
|
|
132
132
|
// which case 'x' should get converted to '\\times'
|
|
133
|
-
if (this.props.convertDotToTimes) {
|
|
133
|
+
if (convertDotToTimesByLocale(this.props.convertDotToTimes)) {
|
|
134
134
|
value = value.replace(/\\cdot/g, "\\times");
|
|
135
135
|
|
|
136
136
|
// Preserve cursor position in the common case:
|
|
@@ -31105,7 +31105,8 @@ const HideAnswersToggle = props => {
|
|
|
31105
31105
|
"aria-labelledby": labelId
|
|
31106
31106
|
}), /*#__PURE__*/React.createElement(LabelMedium, {
|
|
31107
31107
|
id: labelId,
|
|
31108
|
-
htmlFor: switchId
|
|
31108
|
+
htmlFor: switchId,
|
|
31109
|
+
tag: "label"
|
|
31109
31110
|
}, strings.hideAnswersToggleLabel));
|
|
31110
31111
|
};
|
|
31111
31112
|
const styles$h = StyleSheet.create({
|
|
@@ -44184,7 +44185,7 @@ const init = function init(options) {
|
|
|
44184
44185
|
|
|
44185
44186
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
44186
44187
|
const libName = "@khanacademy/perseus";
|
|
44187
|
-
const libVersion = "17.
|
|
44188
|
+
const libVersion = "17.3.0";
|
|
44188
44189
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
44189
44190
|
|
|
44190
44191
|
const apiVersion = {
|
|
@@ -45516,6 +45517,26 @@ var constants = /*#__PURE__*/Object.freeze({
|
|
|
45516
45517
|
|
|
45517
45518
|
// TODO(FEI-5054): Figure out how to get global .d.ts files working with monorepos
|
|
45518
45519
|
|
|
45520
|
+
const ItemExtras = [
|
|
45521
|
+
// The user might benefit from using a Scientific Calculator. Provided on Khan Academy when true
|
|
45522
|
+
"calculator",
|
|
45523
|
+
// The user might benefit from using a statistics Chi Squared Table like https://people.richland.edu/james/lecture/m170/tbl-chi.html
|
|
45524
|
+
"chi2Table",
|
|
45525
|
+
// The user might benefit from a monthly payments calculator. Provided on Khan Academy when true
|
|
45526
|
+
"financialCalculatorMonthlyPayment",
|
|
45527
|
+
// The user might benefit from a total amount calculator. Provided on Khan Academy when true
|
|
45528
|
+
"financialCalculatorTotalAmount",
|
|
45529
|
+
// The user might benefit from a time to pay off calculator. Provided on Khan Academy when true
|
|
45530
|
+
"financialCalculatorTimeToPayOff",
|
|
45531
|
+
// The user might benefit from using a Periodic Table of Elements. Provided on Khan Academy when true
|
|
45532
|
+
"periodicTable",
|
|
45533
|
+
// The user might benefit from using a Periodic Table of Elements with key. Provided on Khan Academy when true
|
|
45534
|
+
"periodicTableWithKey",
|
|
45535
|
+
// The user might benefit from using a statistics T Table like https://www.statisticshowto.com/tables/t-distribution-table/
|
|
45536
|
+
"tTable",
|
|
45537
|
+
// The user might benefit from using a statistics Z Table like https://www.ztable.net/
|
|
45538
|
+
"zTable"];
|
|
45539
|
+
|
|
45519
45540
|
// prettier-ignore
|
|
45520
45541
|
|
|
45521
45542
|
// prettier-ignore
|
|
@@ -46736,5 +46757,5 @@ const EditorJsonify = {
|
|
|
46736
46757
|
}
|
|
46737
46758
|
};
|
|
46738
46759
|
|
|
46739
|
-
export { ApiOptions, ArrowPicker, ArticleRenderer, BaseRadio, Categorizer$1 as Categorizer, changeable as Changeable, ClassNames, ColorPicker, DashPicker, dependencies as Dependencies, EditorJsonify, ElementContainer, Errors, Expression, util as GrapherUtil, Grapher$1 as GrapherWidget, HintRenderer, HintsRenderer, InputNumber$1 as InputNumber, InteractiveGraph$1 as InteractiveGraphWidget, JiptParagraphs, KhanColors, KhanMath, context as LoadingContext, Log, Matrix$1 as MatrixWidget, MultiItems, NumericInput$1 as NumericInput, PerseusError, PerseusExpressionAnswerFormConsidered, PerseusMarkdown, Plotter$1 as PlotterWidget, Radio, Renderer, ref as ServerItemRenderer, sizingUtils as SizingUtils, Table$1 as TableWidget, Transformer$1 as TransformerWidget, Util, denylist as WIDGET_PROP_DENYLIST, WidgetJsonifyDeprecated, widgets$1 as Widgets, apiVersion, buildEmptyItemTreeForShape, buildMapper, components, constants, displaySigFigs, globalConstants, globalStyles, iconPaths as icons, init, interactiveSizes$1 as interactiveSizes, isItemRenderableByVersion, itemDataVersion, itemToTree, ItemVersion as itemVersion, libVersion, mediaQueries, plotterPlotTypes, preprocessTex, registerAllWidgetsForTesting, shapes, traverse, violatingWidgets, allWidgets as widgets };
|
|
46760
|
+
export { ApiOptions, ArrowPicker, ArticleRenderer, BaseRadio, Categorizer$1 as Categorizer, changeable as Changeable, ClassNames, ColorPicker, DashPicker, dependencies as Dependencies, EditorJsonify, ElementContainer, Errors, Expression, util as GrapherUtil, Grapher$1 as GrapherWidget, HintRenderer, HintsRenderer, InputNumber$1 as InputNumber, InteractiveGraph$1 as InteractiveGraphWidget, ItemExtras, JiptParagraphs, KhanColors, KhanMath, context as LoadingContext, Log, Matrix$1 as MatrixWidget, MultiItems, NumericInput$1 as NumericInput, PerseusError, PerseusExpressionAnswerFormConsidered, PerseusMarkdown, Plotter$1 as PlotterWidget, Radio, Renderer, ref as ServerItemRenderer, sizingUtils as SizingUtils, Table$1 as TableWidget, Transformer$1 as TransformerWidget, Util, denylist as WIDGET_PROP_DENYLIST, WidgetJsonifyDeprecated, widgets$1 as Widgets, apiVersion, buildEmptyItemTreeForShape, buildMapper, components, constants, displaySigFigs, globalConstants, globalStyles, iconPaths as icons, init, interactiveSizes$1 as interactiveSizes, isItemRenderableByVersion, itemDataVersion, itemToTree, ItemVersion as itemVersion, libVersion, mediaQueries, plotterPlotTypes, preprocessTex, registerAllWidgetsForTesting, shapes, traverse, violatingWidgets, allWidgets as widgets };
|
|
46740
46761
|
//# sourceMappingURL=index.js.map
|