@khanacademy/perseus 19.3.1 → 19.4.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/dist/components/graph.d.ts +1 -1
- package/dist/es/index.js +41 -2
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +46 -1
- package/dist/index.js.map +1 -1
- package/dist/perseus-types.d.ts +2 -2
- package/dist/util/test-utils.d.ts +12 -0
- package/package.json +1 -1
package/dist/es/index.js
CHANGED
|
@@ -41580,7 +41580,7 @@ const init = function init(options) {
|
|
|
41580
41580
|
|
|
41581
41581
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
41582
41582
|
const libName = "@khanacademy/perseus";
|
|
41583
|
-
const libVersion = "19.
|
|
41583
|
+
const libVersion = "19.4.0";
|
|
41584
41584
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
41585
41585
|
|
|
41586
41586
|
const apiVersion = {
|
|
@@ -44585,6 +44585,45 @@ function parsePerseusItem(json) {
|
|
|
44585
44585
|
return JSON.parse(json);
|
|
44586
44586
|
}
|
|
44587
44587
|
|
|
44588
|
+
const genericPerseusItemData = {
|
|
44589
|
+
question: {
|
|
44590
|
+
content: "",
|
|
44591
|
+
images: {},
|
|
44592
|
+
widgets: {}
|
|
44593
|
+
},
|
|
44594
|
+
answerArea: {
|
|
44595
|
+
calculator: false,
|
|
44596
|
+
chi2Table: false,
|
|
44597
|
+
periodicTable: false,
|
|
44598
|
+
tTable: false,
|
|
44599
|
+
zTable: false,
|
|
44600
|
+
financialCalculatorMonthlyPayment: false,
|
|
44601
|
+
financialCalculatorTotalAmount: false,
|
|
44602
|
+
financialCalculatorTimeToPayOff: false,
|
|
44603
|
+
periodicTableWithKey: false
|
|
44604
|
+
},
|
|
44605
|
+
itemDataVersion: {
|
|
44606
|
+
major: 0,
|
|
44607
|
+
minor: 1
|
|
44608
|
+
},
|
|
44609
|
+
hints: [],
|
|
44610
|
+
_multi: null,
|
|
44611
|
+
answer: null
|
|
44612
|
+
};
|
|
44613
|
+
|
|
44614
|
+
/**
|
|
44615
|
+
* Generate a Perseus item object for testing purposes.
|
|
44616
|
+
*
|
|
44617
|
+
* In order to better type Perseus objects used in testing, this function
|
|
44618
|
+
* uses a basic Perseus object and updates it with custom values as needed.
|
|
44619
|
+
*
|
|
44620
|
+
* @param {Partial<PerseusItem>} customFields
|
|
44621
|
+
* @returns PerseusItem
|
|
44622
|
+
*/
|
|
44623
|
+
function generateTestPerseusItem(customFields = {}) {
|
|
44624
|
+
return _extends({}, genericPerseusItemData, customFields);
|
|
44625
|
+
}
|
|
44626
|
+
|
|
44588
44627
|
const EditorJsonify = {
|
|
44589
44628
|
serialize: function () {
|
|
44590
44629
|
// Omit props that get passed to all widgets
|
|
@@ -44593,5 +44632,5 @@ const EditorJsonify = {
|
|
|
44593
44632
|
}
|
|
44594
44633
|
};
|
|
44595
44634
|
|
|
44596
|
-
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, Util, denylist as WIDGET_PROP_DENYLIST, WidgetJsonifyDeprecated, widgets$1 as Widgets, apiVersion, buildEmptyItemTreeForShape, buildMapper, components, constants, displaySigFigs, getAnswersFromWidgets, globalConstants, globalStyles, iconPaths as icons, init, injectWidgets, interactiveSizes$1 as interactiveSizes, isItemRenderableByVersion, itemDataVersion, itemToTree, ItemVersion as itemVersion, libVersion, mediaQueries, parsePerseusItem, plotterPlotTypes, preprocessTex, registerAllWidgetsForTesting, shapes, traverse, violatingWidgets, allWidgets as widgets };
|
|
44635
|
+
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, Util, denylist as WIDGET_PROP_DENYLIST, WidgetJsonifyDeprecated, widgets$1 as Widgets, apiVersion, buildEmptyItemTreeForShape, buildMapper, components, constants, displaySigFigs, generateTestPerseusItem, genericPerseusItemData, getAnswersFromWidgets, globalConstants, globalStyles, iconPaths as icons, init, injectWidgets, interactiveSizes$1 as interactiveSizes, isItemRenderableByVersion, itemDataVersion, itemToTree, ItemVersion as itemVersion, libVersion, mediaQueries, parsePerseusItem, plotterPlotTypes, preprocessTex, registerAllWidgetsForTesting, shapes, traverse, violatingWidgets, allWidgets as widgets };
|
|
44597
44636
|
//# sourceMappingURL=index.js.map
|