@khanacademy/perseus-core 28.1.0 → 28.2.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/data-schema.d.ts +4 -1
- package/dist/es/index.item-splitting.js +1 -1
- package/dist/es/index.item-splitting.js.map +1 -1
- package/dist/es/index.js +5 -5
- package/dist/es/index.js.map +1 -1
- package/dist/feature-flags.d.ts +1 -1
- package/dist/index.item-splitting.js +1 -1
- package/dist/index.item-splitting.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/parse-perseus-json/perseus-parsers/expression-widget.d.ts +1 -1
- package/dist/parse-perseus-json/perseus-parsers/legacy-button-sets.d.ts +1 -1
- package/dist/parse-perseus-json/perseus-parsers/perseus-answer-area.d.ts +5 -2
- package/package.json +1 -1
package/dist/feature-flags.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* export const PerseusFeatureFlags = [];
|
|
10
10
|
* 4. Also update the testing/feature-flags-util.ts for testing purpose
|
|
11
11
|
*/
|
|
12
|
-
declare const PerseusFeatureFlags: readonly ["input-number-to-numeric-input", "grapher-to-interactive-graph"];
|
|
12
|
+
declare const PerseusFeatureFlags: readonly ["input-number-to-numeric-input", "grapher-to-interactive-graph", "desmos-calculator"];
|
|
13
13
|
export default PerseusFeatureFlags;
|
|
14
14
|
/**
|
|
15
15
|
* Checks if a feature flag is enabled in the given props.
|
|
@@ -168,7 +168,7 @@ union(parsePerseusRenderer).or(array(parsePerseusRenderer)).parser;
|
|
|
168
168
|
|
|
169
169
|
const parseHint=object({replace:defaulted(optional(boolean),()=>undefined),placeholder:defaulted(optional(boolean),()=>undefined),content:string,widgets:defaulted(parseWidgetsMap,()=>({})),images:parseImages,metadata:any});
|
|
170
170
|
|
|
171
|
-
const booleanOrFalse=defaulted(boolean,()=>false);const
|
|
171
|
+
const booleanOrFalse=defaulted(boolean,()=>false);const nullableCalculatorVariant=defaulted(nullable(enumeration("scientific","graphing","four_function")),()=>null);const baseParser=defaulted(object({calculator:booleanOrFalse,calculatorVariant:nullableCalculatorVariant,financialCalculatorMonthlyPayment:booleanOrFalse,financialCalculatorTotalAmount:booleanOrFalse,financialCalculatorTimeToPayOff:booleanOrFalse,periodicTable:booleanOrFalse,periodicTableWithKey:booleanOrFalse}),()=>({calculator:false,calculatorVariant:null,financialCalculatorMonthlyPayment:false,financialCalculatorTotalAmount:false,financialCalculatorTimeToPayOff:false,periodicTable:false,periodicTableWithKey:false}));const parsePerseusAnswerArea=pipeParsers(baseParser).then(convert(parsed=>{const calculatorVariant=parsed.calculator&&parsed.calculatorVariant===null?"scientific":parsed.calculatorVariant;return {...parsed,calculatorVariant}})).parser;
|
|
172
172
|
|
|
173
173
|
const parsePerseusItem=object({question:parsePerseusRenderer,hints:defaulted(array(parseHint),()=>[]),answerArea:parsePerseusAnswerArea});
|
|
174
174
|
|