@khanacademy/perseus-core 34.1.0 → 35.0.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.
@@ -0,0 +1,3 @@
1
+ export declare const parseBlankUserInput: import("../parser-types").Parser<import("../general-purpose-parsers/object-types").OptionalizeProperties<{
2
+ selected: string | null;
3
+ }>>;
@@ -0,0 +1,4 @@
1
+ export declare const parseBlankWidget: import("../parser-types").Parser<import("../..").WidgetOptions<"blank", import("../general-purpose-parsers/object-types").OptionalizeProperties<{
2
+ displayType: "normal" | "superscript" | "subscript";
3
+ correctId: string;
4
+ }>>>;
@@ -0,0 +1,3 @@
1
+ import type { PerseusBlankWidgetOptions, BlankWidget } from "../../data-schema";
2
+ export declare function generateBlankOptions(options?: Partial<PerseusBlankWidgetOptions>): PerseusBlankWidgetOptions;
3
+ export declare function generateBlankWidget(blankWidgetProperties?: Partial<Omit<BlankWidget, "type">>): BlankWidget;
@@ -103,6 +103,19 @@ export type ValidationResult = Extract<PerseusScore, {
103
103
  * via postMessage.
104
104
  */
105
105
  export type UserInputStatus = "correct" | "incorrect" | "incomplete";
106
+ export type PerseusBlankUserInput = {
107
+ /**
108
+ * The user's placed answer tile on the blank, or null if the user has not
109
+ * placed a tile yet.
110
+ */
111
+ selected: string | null;
112
+ };
113
+ export type PerseusBlankRubric = {
114
+ /**
115
+ * The ID of the correct answer tile
116
+ */
117
+ correctId: string;
118
+ };
106
119
  /** Scoring rubric for the Categorizer widget. */
107
120
  export type PerseusCategorizerRubric = {
108
121
  /**
@@ -0,0 +1,7 @@
1
+ import type { PerseusBlankWidgetOptions } from "../../data-schema";
2
+ export type BlankPublicWidgetOptions = Pick<PerseusBlankWidgetOptions, "displayType">;
3
+ /**
4
+ * Given a PerseusBlankWidgetOptions object, return a new object with only
5
+ * the public options that should be exposed to the client.
6
+ */
7
+ export declare function getBlankPublicWidgetOptions(options: PerseusBlankWidgetOptions): BlankPublicWidgetOptions;
@@ -0,0 +1,5 @@
1
+ import type { BlankPublicWidgetOptions } from "./blank-util";
2
+ import type { PerseusBlankWidgetOptions } from "../../data-schema";
3
+ import type { WidgetLogic } from "../logic-export.types";
4
+ declare const blankWidgetLogic: WidgetLogic<PerseusBlankWidgetOptions, BlankPublicWidgetOptions>;
5
+ export default blankWidgetLogic;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Shared Perseus infrastructure",
4
4
  "author": "Khan Academy",
5
5
  "license": "MIT",
6
- "version": "34.1.0",
6
+ "version": "35.0.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },