@khanacademy/perseus-core 36.0.0 → 36.1.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/es/index.item-splitting.js +1 -1
- package/dist/es/index.item-splitting.js.map +1 -1
- package/dist/es/index.js +2 -2
- package/dist/es/index.js.map +1 -1
- package/dist/index.item-splitting.js +1 -1
- package/dist/index.item-splitting.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/parse-perseus-json/regression-tests/item-data/radio-with-weird-alignment.d.ts +63 -0
- package/package.json +1 -1
|
@@ -52,7 +52,7 @@ const parseImages=defaulted(record(string,parsePerseusImageDetail),()=>({}));
|
|
|
52
52
|
|
|
53
53
|
function convert(f){return (rawValue,ctx)=>ctx.success(f(rawValue))}
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
function toValidAlignment(alignment){switch(alignment){case "default":case "block":case "inline-block":case "inline":case "wrap-left":case "wrap-right":case "full-width":case undefined:return alignment;default:return "default"}}const parseAlignment=pipeParsers(optional(string)).then(convert(toValidAlignment)).parser;function parseWidget(parseType,parseOptions){return object({type:parseType,static:optional(boolean),graded:optional(boolean),alignment:parseAlignment,options:parseOptions,key:optional(nullable(number)),version:optional(object({major:number,minor:number}))})}function parseWidgetWithVersion(parseVersion,parseType,parseOptions){return object({type:parseType,static:optional(boolean),graded:optional(boolean),alignment:parseAlignment,options:parseOptions,key:optional(nullable(number)),version:parseVersion})}
|
|
56
56
|
|
|
57
57
|
const parseBlankWidget=parseWidget(constant("blank"),object({displayType:defaulted(enumeration("normal","superscript","subscript"),()=>"normal"),correctId:string}));
|
|
58
58
|
|