@khanacademy/perseus-core
Advanced tools
Comparing version 4.0.0 to 5.0.0
@@ -29,2 +29,3 @@ /** | ||
*/ | ||
import type { KeypadKey } from "./keypad"; | ||
export type Coord = [x: number, y: number]; | ||
@@ -369,2 +370,3 @@ export type Interval = [min: number, max: number]; | ||
times: boolean; | ||
extraKeys?: ReadonlyArray<KeypadKey>; | ||
visibleLabel?: string; | ||
@@ -838,2 +840,3 @@ ariaLabel?: string; | ||
countChoices?: boolean; | ||
numCorrect?: number; | ||
randomize?: boolean; | ||
@@ -840,0 +843,0 @@ multipleSelect?: boolean; |
export type { PerseusAnalyticsEvent, AnalyticsEventHandlerFn } from "./analytics"; | ||
export type { KEScore, KeypadContextRendererInterface, RendererInterface, MarkerType, InteractiveMarkerType, Relationship, Alignment, } from "./types"; | ||
export type { KEScore, RendererInterface, MarkerType, InteractiveMarkerType, Relationship, Alignment, } from "./types"; | ||
export type { KeypadKey, KeypadConfiguration, KeypadContextRendererInterface, } from "./keypad"; | ||
export type { ErrorKind } from "./error/errors"; | ||
@@ -31,2 +32,3 @@ export type { FunctionTypeMappingKeys } from "./utils/grapher-util"; | ||
export type { ExpressionDefaultWidgetOptions } from "./widgets/expression"; | ||
export { default as deriveExtraKeys } from "./widgets/expression/derive-extra-keys"; | ||
export { default as gradedGroupLogic } from "./widgets/graded-group"; | ||
@@ -78,2 +80,3 @@ export type { GradedGroupDefaultWidgetOptions } from "./widgets/graded-group"; | ||
export type { RadioDefaultWidgetOptions } from "./widgets/radio"; | ||
export { usesNumCorrect } from "./widgets/radio/radio-util"; | ||
export { default as sorterLogic } from "./widgets/sorter"; | ||
@@ -93,2 +96,3 @@ export type { SorterDefaultWidgetOptions } from "./widgets/sorter"; | ||
export { default as getExpressionPublicWidgetOptions } from "./widgets/expression/expression-util"; | ||
export type { ExpressionPublicWidgetOptions } from "./widgets/expression/expression-util"; | ||
export { default as getGrapherPublicWidgetOptions } from "./widgets/grapher/grapher-util"; | ||
@@ -103,2 +107,3 @@ export { default as getInteractiveGraphPublicWidgetOptions, type InteractiveGraphPublicWidgetOptions, } from "./widgets/interactive-graph/interactive-graph-util"; | ||
export { default as getRadioPublicWidgetOptions } from "./widgets/radio/radio-util"; | ||
export { deriveNumCorrect } from "./widgets/radio/radio-upgrade"; | ||
export { default as getTablePublicWidgetOptions } from "./widgets/table/table-util"; | ||
@@ -105,0 +110,0 @@ export { default as getIFramePublicWidgetOptions } from "./widgets/iframe/iframe-util"; |
@@ -1,4 +0,1 @@ | ||
export interface KeypadContextRendererInterface { | ||
blur(): void; | ||
} | ||
type State = any; | ||
@@ -5,0 +2,0 @@ export interface RendererInterface { |
@@ -7,2 +7,3 @@ import type { PerseusExpressionWidgetOptions } from "../../data-schema"; | ||
export declare const widgetOptionsUpgrades: { | ||
readonly "2": (v1options: any) => PerseusExpressionWidgetOptions; | ||
readonly "1": (v0options: any) => PerseusExpressionWidgetOptions; | ||
@@ -9,0 +10,0 @@ }; |
@@ -6,3 +6,3 @@ import type { PerseusExpressionWidgetOptions } from "@khanacademy/perseus-core"; | ||
*/ | ||
type ExpressionPublicWidgetOptions = { | ||
export type ExpressionPublicWidgetOptions = { | ||
buttonSets: PerseusExpressionWidgetOptions["buttonSets"]; | ||
@@ -14,2 +14,3 @@ functions: PerseusExpressionWidgetOptions["functions"]; | ||
buttonsVisible?: PerseusExpressionWidgetOptions["buttonsVisible"]; | ||
extraKeys?: PerseusExpressionWidgetOptions["extraKeys"]; | ||
}; | ||
@@ -16,0 +17,0 @@ /** |
@@ -6,3 +6,5 @@ import type { PerseusRadioWidgetOptions } from "../../data-schema"; | ||
}; | ||
export declare function deriveNumCorrect(options: PerseusRadioWidgetOptions): number; | ||
export declare const widgetOptionsUpgrades: { | ||
readonly "2": (v1props: any) => PerseusRadioWidgetOptions; | ||
readonly "1": (v0props: any) => PerseusRadioWidgetOptions; | ||
@@ -9,0 +11,0 @@ }; |
@@ -10,2 +10,3 @@ import type { PerseusRadioChoice, PerseusRadioWidgetOptions } from "@khanacademy/perseus-core"; | ||
countChoices?: PerseusRadioWidgetOptions["countChoices"]; | ||
numCorrect?: PerseusRadioWidgetOptions["numCorrect"]; | ||
randomize?: PerseusRadioWidgetOptions["randomize"]; | ||
@@ -23,2 +24,11 @@ multipleSelect?: PerseusRadioWidgetOptions["multipleSelect"]; | ||
/** | ||
* Shared functionality to determine if numCorrect is used, because: | ||
* | ||
* 1. numCorrect is conditionally used for rendering pre-scoring | ||
* 2. numCorrect also exposes information about answers | ||
* | ||
* So only include/use numCorrect when we know it's useful. | ||
*/ | ||
export declare function usesNumCorrect(multipleSelect: PerseusRadioWidgetOptions["multipleSelect"], countChoices: PerseusRadioWidgetOptions["countChoices"], numCorrect: PerseusRadioWidgetOptions["numCorrect"]): number | false | undefined; | ||
/** | ||
* Given a PerseusRadioWidgetOptions object, return a new object with only | ||
@@ -25,0 +35,0 @@ * the public options that should be exposed to the client. |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"publishConfig": { | ||
@@ -25,3 +25,5 @@ "access": "public" | ||
], | ||
"dependencies": {}, | ||
"dependencies": { | ||
"@khanacademy/kas": "0.5.0" | ||
}, | ||
"devDependencies": { | ||
@@ -28,0 +30,0 @@ "@khanacademy/wonder-stuff-core": "1.5.4", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1227062
163
10275
3
+ Added@khanacademy/kas@0.5.0
+ Added@khanacademy/kas@0.5.0(transitive)