@khanacademy/perseus-core 7.1.0 → 7.1.1
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/es/index.js +4 -2
- package/dist/es/index.js.map +1 -1
- package/dist/feature-flags.d.ts +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTANT:
|
|
3
|
+
* 1. Do not delete this file or the variable below.
|
|
4
|
+
* This will be the definition of the active feature flags in Perseus
|
|
5
|
+
* that will hide features/changes under development. This will be used
|
|
6
|
+
* by flags of APIOptions type.
|
|
7
|
+
* 2. Do cleanup unused feature flags
|
|
8
|
+
* 3. When no active feature flag is available value will be:
|
|
9
|
+
* export const PerseusFeatureFlags = [];
|
|
10
|
+
*/
|
|
11
|
+
declare const PerseusFeatureFlags: string[];
|
|
12
|
+
export default PerseusFeatureFlags;
|
package/dist/index.d.ts
CHANGED
|
@@ -110,3 +110,4 @@ export { default as getMatrixPublicWidgetOptions } from "./widgets/matrix/matrix
|
|
|
110
110
|
export { default as getPlotterPublicWidgetOptions } from "./widgets/plotter/plotter-util";
|
|
111
111
|
export { default as getMatcherPublicWidgetOptions, shuffleMatcher, } from "./widgets/matcher/matcher-util";
|
|
112
112
|
export { shuffle, seededRNG, random } from "./utils/random-util";
|
|
113
|
+
export { default as PerseusFeatureFlags } from "./feature-flags";
|
package/dist/index.js
CHANGED
|
@@ -196,7 +196,7 @@ const parsePerseusItem$1=object({question:parsePerseusRenderer,hints:defaulted(a
|
|
|
196
196
|
|
|
197
197
|
function parsePerseusItem(json){if(isRealJSONParse(JSON.parse)){return JSON.parse(json)}throw new Error("Something went wrong.")}function parseAndMigratePerseusItem(json){throwErrorIfCheatingDetected();const object=JSON.parse(json);const result=parse(object,parsePerseusItem$1);if(isFailure(result)){return failure({message:result.detail,invalidObject:object})}return result}function parseAndMigratePerseusArticle(json){throwErrorIfCheatingDetected();const object=JSON.parse(json);const result=parse(object,parsePerseusArticle);if(isFailure(result)){return failure({message:result.detail,invalidObject:object})}return result}function throwErrorIfCheatingDetected(){if(!isRealJSONParse(JSON.parse)){throw new Error("Something went wrong.")}}
|
|
198
198
|
|
|
199
|
-
const libName="@khanacademy/perseus-core";const libVersion="7.1.
|
|
199
|
+
const libName="@khanacademy/perseus-core";const libVersion="7.1.1";perseusUtils.addLibraryVersionToPerseusDebug(libName,libVersion);
|
|
200
200
|
|
|
201
201
|
const Errors=Object.freeze({Unknown:"Unknown",Internal:"Internal",InvalidInput:"InvalidInput",NotAllowed:"NotAllowed",TransientService:"TransientService",Service:"Service"});
|
|
202
202
|
|
|
@@ -327,12 +327,15 @@ const DEFAULT_STATIC=false;const upgradeWidgetInfoToLatestVersion=oldWidgetInfo=
|
|
|
327
327
|
|
|
328
328
|
function splitPerseusItem(originalItem){const item=___default.default.clone(originalItem);const originalWidgets=item.widgets??{};const upgradedWidgets=getUpgradedWidgetOptions(originalWidgets);const splitWidgets={};for(const[id,widget]of Object.entries(upgradedWidgets)){const publicWidgetOptionsFun=getPublicWidgetOptionsFunction(widget.type);splitWidgets[id]={...widget,options:publicWidgetOptionsFun(widget.options)};}return {...item,widgets:splitWidgets}}
|
|
329
329
|
|
|
330
|
+
const PerseusFeatureFlags=["new-radio-widget"];
|
|
331
|
+
|
|
330
332
|
exports.CoreWidgetRegistry = coreWidgetRegistry;
|
|
331
333
|
exports.Errors = Errors;
|
|
332
334
|
exports.GrapherUtil = grapherUtil;
|
|
333
335
|
exports.ItemExtras = ItemExtras;
|
|
334
336
|
exports.PerseusError = PerseusError;
|
|
335
337
|
exports.PerseusExpressionAnswerFormConsidered = PerseusExpressionAnswerFormConsidered;
|
|
338
|
+
exports.PerseusFeatureFlags = PerseusFeatureFlags;
|
|
336
339
|
exports.addWidget = addWidget;
|
|
337
340
|
exports.approximateDeepEqual = approximateDeepEqual;
|
|
338
341
|
exports.approximateEqual = approximateEqual;
|