@khanacademy/perseus-core 34.0.2 → 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.
- package/dist/data-schema.d.ts +17 -3
- package/dist/es/index.item-splitting.js +4 -2
- package/dist/es/index.item-splitting.js.map +1 -1
- package/dist/es/index.js +13 -5
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.item-splitting.js +4 -2
- package/dist/index.item-splitting.js.map +1 -1
- package/dist/index.js +15 -4
- package/dist/index.js.map +1 -1
- package/dist/parse-perseus-json/perseus-parsers/blank-user-input.d.ts +3 -0
- package/dist/parse-perseus-json/perseus-parsers/blank-user-input.typetest.d.ts +1 -0
- package/dist/parse-perseus-json/perseus-parsers/blank-widget.d.ts +4 -0
- package/dist/parse-perseus-json/perseus-parsers/interactive-graph-widget.d.ts +4 -4
- package/dist/utils/generators/blank-widget-generator.d.ts +3 -0
- package/dist/validation.types.d.ts +13 -0
- package/dist/widgets/blank/blank-util.d.ts +7 -0
- package/dist/widgets/blank/index.d.ts +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -198,7 +198,7 @@ export declare const parseLockedFigure: import("../parser-types").Parser<import(
|
|
|
198
198
|
angle: number;
|
|
199
199
|
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
200
200
|
fillStyle: "none" | "solid" | "white" | "translucent";
|
|
201
|
-
strokeStyle: "solid" | "dashed";
|
|
201
|
+
strokeStyle: "none" | "solid" | "dashed";
|
|
202
202
|
weight: "thin" | "medium" | "thick";
|
|
203
203
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
204
204
|
type: "label";
|
|
@@ -214,7 +214,7 @@ export declare const parseLockedFigure: import("../parser-types").Parser<import(
|
|
|
214
214
|
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
215
215
|
showVertices: boolean;
|
|
216
216
|
fillStyle: "none" | "solid" | "white" | "translucent";
|
|
217
|
-
strokeStyle: "solid" | "dashed";
|
|
217
|
+
strokeStyle: "none" | "solid" | "dashed";
|
|
218
218
|
weight: "thin" | "medium" | "thick";
|
|
219
219
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
220
220
|
type: "label";
|
|
@@ -590,7 +590,7 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
590
590
|
angle: number;
|
|
591
591
|
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
592
592
|
fillStyle: "none" | "solid" | "white" | "translucent";
|
|
593
|
-
strokeStyle: "solid" | "dashed";
|
|
593
|
+
strokeStyle: "none" | "solid" | "dashed";
|
|
594
594
|
weight: "thin" | "medium" | "thick";
|
|
595
595
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
596
596
|
type: "label";
|
|
@@ -606,7 +606,7 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
606
606
|
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
607
607
|
showVertices: boolean;
|
|
608
608
|
fillStyle: "none" | "solid" | "white" | "translucent";
|
|
609
|
-
strokeStyle: "solid" | "dashed";
|
|
609
|
+
strokeStyle: "none" | "solid" | "dashed";
|
|
610
610
|
weight: "thin" | "medium" | "thick";
|
|
611
611
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
612
612
|
type: "label";
|
|
@@ -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;
|