@khanacademy/perseus 41.4.0 → 42.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/es/index.css +3 -0
- package/dist/es/index.js +879 -343
- package/dist/es/index.js.map +1 -1
- package/dist/es/strings.js +3 -2
- package/dist/es/strings.js.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +876 -338
- package/dist/index.js.map +1 -1
- package/dist/renderer-util.d.ts +3 -2
- package/dist/renderer.d.ts +7 -10
- package/dist/server-item-renderer.d.ts +34 -3
- package/dist/strings.d.ts +2 -1
- package/dist/strings.js +3 -2
- package/dist/strings.js.map +1 -1
- package/dist/types.d.ts +6 -1
- package/dist/util/parse-perseus-json/exhaustive-test-tool/index.d.ts +2 -0
- package/dist/util/parse-perseus-json/perseus-parsers/graded-group-set-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/graded-group-widget.d.ts +16 -0
- package/dist/util/parse-perseus-json/perseus-parsers/grapher-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/group-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/iframe-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/image-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/input-number-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/interaction-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/label-image-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/matcher-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/matrix-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/measurer-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/molecule-renderer-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/number-line-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/numeric-input-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/orderer-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/passage-ref-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/passage-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/phet-simulation-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/plotter-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/python-program-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/radio-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/sorter-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/table-widget.d.ts +3 -0
- package/dist/util/parse-perseus-json/perseus-parsers/video-widget.d.ts +3 -0
- package/dist/widget-ai-utils/graded-group/{prompt-utils.d.ts → graded-group-ai-utils.d.ts} +1 -1
- package/dist/widget-ai-utils/graded-group-set/{prompt-utils.d.ts → graded-group-set-ai-utils.d.ts} +1 -1
- package/dist/widget-ai-utils/group/{prompt-utils.d.ts → group-ai-utils.d.ts} +1 -1
- package/dist/widget-ai-utils/prompt-types.d.ts +33 -0
- package/dist/widget-ai-utils/unsupported-widget.d.ts +1 -1
- package/dist/widgets/categorizer/categorizer.d.ts +1 -1
- package/dist/widgets/definition/definition.d.ts +1 -1
- package/dist/widgets/dropdown/dropdown.d.ts +1 -1
- package/dist/widgets/explanation/explanation.d.ts +1 -1
- package/dist/widgets/expression/expression.d.ts +1 -1
- package/dist/widgets/graded-group/graded-group.d.ts +1 -1
- package/dist/widgets/graded-group-set/graded-group-set.d.ts +1 -1
- package/dist/widgets/grapher/grapher.d.ts +1 -1
- package/dist/widgets/group/group.d.ts +1 -1
- package/dist/widgets/image/image.d.ts +1 -1
- package/dist/widgets/input-number/input-number.d.ts +1 -1
- package/dist/widgets/interactive-graph.d.ts +1 -1
- package/dist/widgets/interactive-graphs/graphs/components/movable-point.d.ts +9 -0
- package/dist/widgets/interactive-graphs/graphs/components/use-control-point.d.ts +9 -0
- package/dist/widgets/label-image/label-image.d.ts +1 -1
- package/dist/widgets/matcher/matcher.d.ts +1 -1
- package/dist/widgets/matrix/matrix.d.ts +1 -1
- package/dist/widgets/number-line/number-line.d.ts +1 -1
- package/dist/widgets/numeric-input/numeric-input.d.ts +7 -0
- package/dist/widgets/orderer/orderer.d.ts +1 -1
- package/dist/widgets/passage/passage.d.ts +1 -1
- package/dist/widgets/passage-ref/passage-ref.d.ts +1 -1
- package/dist/widgets/radio/radio-component.d.ts +1 -1
- package/dist/widgets/sorter/sorter.d.ts +1 -1
- package/package.json +1 -1
- package/dist/prompt-types.d.ts +0 -33
- /package/dist/widget-ai-utils/categorizer/{prompt-utils.d.ts → categorizer-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/cs-program/{prompt-utils.d.ts → cs-program-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/definition/{prompt-utils.d.ts → definition-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/dropdown/{prompt-utils.d.ts → dropdown-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/explanation/{prompt-utils.d.ts → explanation-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/expression/{prompt-utils.d.ts → expression-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/grapher/{prompt-utils.d.ts → grapher-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/iframe/{prompt-utils.d.ts → iframe-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/image/{prompt-utils.d.ts → image-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/input-number/{prompt-utils.d.ts → input-number-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/interaction/{prompt-utils.d.ts → interaction-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/interactive-graph/{prompt-utils.d.ts → interactive-graph-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/label-image/{prompt-utils.d.ts → label-image-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/matcher/{prompt-utils.d.ts → matcher-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/matrix/{prompt-utils.d.ts → matrix-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/measurer/{prompt-utils.d.ts → measurer-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/number-line/{prompt-utils.d.ts → number-line-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/orderer/{prompt-utils.d.ts → orderer-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/passage/{prompt-utils.d.ts → passage-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/passage-ref/{prompt-utils.d.ts → passage-ref-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/phet-simulation/{prompt-utils.d.ts → phet-simulation-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/plotter/{prompt-utils.d.ts → plotter-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/python-program/{prompt-utils.d.ts → python-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/radio/{prompt-utils.d.ts → radio-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/sorter/{prompt-utils.d.ts → sorter-ai-utils.d.ts} +0 -0
- /package/dist/widget-ai-utils/video/{prompt-utils.d.ts → video-ai-utils.d.ts} +0 -0
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
3
3
|
import type { PerseusRenderer, PerseusDefinitionWidgetOptions } from "../../perseus-types";
|
|
4
4
|
import type { Widget, WidgetProps } from "../../types";
|
|
5
|
-
import type { DefinitionPromptJSON } from "../../widget-ai-utils/definition/
|
|
5
|
+
import type { DefinitionPromptJSON } from "../../widget-ai-utils/definition/definition-ai-utils";
|
|
6
6
|
type RenderProps = PerseusDefinitionWidgetOptions;
|
|
7
7
|
type DefinitionProps = WidgetProps<RenderProps> & {
|
|
8
8
|
widgets: PerseusRenderer["widgets"];
|
|
@@ -3,7 +3,7 @@ import scoreDropdown from "./score-dropdown";
|
|
|
3
3
|
import type { PerseusDropdownWidgetOptions } from "../../perseus-types";
|
|
4
4
|
import type { Widget, WidgetProps } from "../../types";
|
|
5
5
|
import type { PerseusDropdownRubric, PerseusDropdownUserInput } from "../../validation.types";
|
|
6
|
-
import type { DropdownPromptJSON } from "../../widget-ai-utils/dropdown/
|
|
6
|
+
import type { DropdownPromptJSON } from "../../widget-ai-utils/dropdown/dropdown-ai-utils";
|
|
7
7
|
type Props = WidgetProps<RenderProps, PerseusDropdownRubric> & {
|
|
8
8
|
selected: number;
|
|
9
9
|
};
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
3
3
|
import type { PerseusExplanationWidgetOptions } from "../../perseus-types";
|
|
4
4
|
import type { Widget, WidgetProps } from "../../types";
|
|
5
|
-
import type { ExplanationPromptJSON } from "../../widget-ai-utils/explanation/
|
|
5
|
+
import type { ExplanationPromptJSON } from "../../widget-ai-utils/explanation/explanation-ai-utils";
|
|
6
6
|
type RenderProps = PerseusExplanationWidgetOptions;
|
|
7
7
|
type Props = WidgetProps<RenderProps>;
|
|
8
8
|
type DefaultProps = {
|
|
@@ -5,7 +5,7 @@ import type { DependenciesContext } from "../../dependencies";
|
|
|
5
5
|
import type { PerseusExpressionWidgetOptions } from "../../perseus-types";
|
|
6
6
|
import type { FocusPath, Widget, WidgetProps } from "../../types";
|
|
7
7
|
import type { PerseusExpressionRubric, PerseusExpressionUserInput } from "../../validation.types";
|
|
8
|
-
import type { ExpressionPromptJSON } from "../../widget-ai-utils/expression/
|
|
8
|
+
import type { ExpressionPromptJSON } from "../../widget-ai-utils/expression/expression-ai-utils";
|
|
9
9
|
import type { Keys as Key, KeypadConfiguration } from "@khanacademy/math-input";
|
|
10
10
|
type InputPath = ReadonlyArray<string>;
|
|
11
11
|
type RenderProps = {
|
|
@@ -5,7 +5,7 @@ import type { ANSWER_BAR_STATES } from "./graded-group-answer-bar";
|
|
|
5
5
|
import type { PerseusGradedGroupWidgetOptions } from "../../perseus-types";
|
|
6
6
|
import type { FocusPath, TrackingGradedGroupExtraArguments, Widget, WidgetProps } from "../../types";
|
|
7
7
|
import type { PerseusGradedGroupRubric } from "../../validation.types";
|
|
8
|
-
import type { GradedGroupPromptJSON } from "../../widget-ai-utils/graded-group/
|
|
8
|
+
import type { GradedGroupPromptJSON } from "../../widget-ai-utils/graded-group/graded-group-ai-utils";
|
|
9
9
|
declare const GRADING_STATUSES: {
|
|
10
10
|
readonly ungraded: "ungraded";
|
|
11
11
|
readonly correct: "correct";
|
|
@@ -4,7 +4,7 @@ import { GradedGroup } from "../graded-group/graded-group";
|
|
|
4
4
|
import type { PerseusGradedGroupSetWidgetOptions } from "../../perseus-types";
|
|
5
5
|
import type { FocusPath, Widget, WidgetProps } from "../../types";
|
|
6
6
|
import type { PerseusGradedGroupSetRubric } from "../../validation.types";
|
|
7
|
-
import type { GradedGroupSetPromptJSON } from "../../widget-ai-utils/graded-group-set/
|
|
7
|
+
import type { GradedGroupSetPromptJSON } from "../../widget-ai-utils/graded-group-set/graded-group-set-ai-utils";
|
|
8
8
|
type RenderProps = PerseusGradedGroupSetWidgetOptions;
|
|
9
9
|
type Props = Changeable.ChangeableProps & WidgetProps<RenderProps, PerseusGradedGroupSetRubric> & {
|
|
10
10
|
trackInteraction: () => void;
|
|
@@ -6,7 +6,7 @@ import type { PerseusGrapherWidgetOptions } from "../../perseus-types";
|
|
|
6
6
|
import type { Widget, WidgetProps } from "../../types";
|
|
7
7
|
import type { GridDimensions } from "../../util";
|
|
8
8
|
import type { PerseusGrapherRubric, PerseusGrapherUserInput } from "../../validation.types";
|
|
9
|
-
import type { GrapherPromptJSON } from "../../widget-ai-utils/grapher/
|
|
9
|
+
import type { GrapherPromptJSON } from "../../widget-ai-utils/grapher/grapher-ai-utils";
|
|
10
10
|
import type { PropsFor } from "@khanacademy/wonder-blocks-core";
|
|
11
11
|
type RenderProps = {
|
|
12
12
|
availableTypes: PerseusGrapherWidgetOptions["availableTypes"];
|
|
@@ -4,7 +4,7 @@ import Renderer from "../../renderer";
|
|
|
4
4
|
import type { PerseusGroupWidgetOptions } from "../../perseus-types";
|
|
5
5
|
import type { ChangeFn, FocusPath, Widget, WidgetProps } from "../../types";
|
|
6
6
|
import type { PerseusGroupRubric, UserInputArray } from "../../validation.types";
|
|
7
|
-
import type { GroupPromptJSON } from "../../widget-ai-utils/group/
|
|
7
|
+
import type { GroupPromptJSON } from "../../widget-ai-utils/group/group-ai-utils";
|
|
8
8
|
type RenderProps = PerseusGroupWidgetOptions;
|
|
9
9
|
type Props = WidgetProps<RenderProps, PerseusGroupRubric>;
|
|
10
10
|
type DefaultProps = {
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
3
3
|
import type { PerseusImageWidgetOptions } from "../../perseus-types";
|
|
4
4
|
import type { ChangeFn, WidgetProps, Widget } from "../../types";
|
|
5
|
-
import type { ImagePromptJSON } from "../../widget-ai-utils/image/
|
|
5
|
+
import type { ImagePromptJSON } from "../../widget-ai-utils/image/image-ai-utils";
|
|
6
6
|
type RenderProps = PerseusImageWidgetOptions;
|
|
7
7
|
type ExternalProps = WidgetProps<RenderProps>;
|
|
8
8
|
type Props = ExternalProps & {
|
|
@@ -5,7 +5,7 @@ import type { PerseusInputNumberWidgetOptions } from "../../perseus-types";
|
|
|
5
5
|
import type { PerseusStrings } from "../../strings";
|
|
6
6
|
import type { Path, Widget, WidgetProps } from "../../types";
|
|
7
7
|
import type { PerseusInputNumberRubric, PerseusInputNumberUserInput } from "../../validation.types";
|
|
8
|
-
import type { InputNumberPromptJSON } from "../../widget-ai-utils/input-number/
|
|
8
|
+
import type { InputNumberPromptJSON } from "../../widget-ai-utils/input-number/input-number-ai-utils";
|
|
9
9
|
type RenderProps = {
|
|
10
10
|
simplify: PerseusInputNumberWidgetOptions["simplify"];
|
|
11
11
|
size: PerseusInputNumberWidgetOptions["size"];
|
|
@@ -8,7 +8,7 @@ import type { PerseusGraphType, PerseusGraphTypeAngle, PerseusGraphTypePoint, Pe
|
|
|
8
8
|
import type { ChangeHandler, WidgetProps } from "../types";
|
|
9
9
|
import type { QuadraticCoefficient, Range, SineCoefficient } from "../util/geometry";
|
|
10
10
|
import type { PerseusInteractiveGraphRubric, PerseusInteractiveGraphUserInput } from "../validation.types";
|
|
11
|
-
import type { InteractiveGraphPromptJSON } from "../widget-ai-utils/interactive-graph/
|
|
11
|
+
import type { InteractiveGraphPromptJSON } from "../widget-ai-utils/interactive-graph/interactive-graph-ai-utils";
|
|
12
12
|
import type { UnsupportedWidgetPromptJSON } from "../widget-ai-utils/unsupported-widget";
|
|
13
13
|
type RenderProps = PerseusInteractiveGraphWidgetOptions;
|
|
14
14
|
type Props = WidgetProps<RenderProps, PerseusInteractiveGraphRubric>;
|
|
@@ -4,6 +4,15 @@ import type { KeyboardMovementConstraint } from "../use-draggable";
|
|
|
4
4
|
import type { vec } from "mafs";
|
|
5
5
|
type Props = {
|
|
6
6
|
point: vec.Vector2;
|
|
7
|
+
/**
|
|
8
|
+
* Represents where this point stands in the overall point sequence.
|
|
9
|
+
* This is used to provide screen readers with context about the point.
|
|
10
|
+
* Example: sequenceNumber={1} ==> "Point 1 at x comma y"
|
|
11
|
+
*
|
|
12
|
+
* Note: This number is 1-indexed, and should restart from 1 for each
|
|
13
|
+
* interactive figure on the graph.
|
|
14
|
+
*/
|
|
15
|
+
sequenceNumber: number;
|
|
7
16
|
onMove?: (newPoint: vec.Vector2) => unknown;
|
|
8
17
|
onClick?: () => unknown;
|
|
9
18
|
color?: string;
|
|
@@ -6,6 +6,15 @@ type Params = {
|
|
|
6
6
|
point: vec.Vector2;
|
|
7
7
|
color?: string | undefined;
|
|
8
8
|
cursor?: CSSCursor | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Represents where this point stands in the overall point sequence.
|
|
11
|
+
* This is used to provide screen readers with context about the point.
|
|
12
|
+
* Example: sequenceNumber={1} ==> "Point 1 at x comma y"
|
|
13
|
+
*
|
|
14
|
+
* Note: This number is 1-indexed, and should restart from 1 for each
|
|
15
|
+
* interactive figure on the graph.
|
|
16
|
+
*/
|
|
17
|
+
sequenceNumber: number;
|
|
9
18
|
constrain?: KeyboardMovementConstraint;
|
|
10
19
|
onMove?: ((newPoint: vec.Vector2) => unknown) | undefined;
|
|
11
20
|
onClick?: (() => unknown) | undefined;
|
|
@@ -15,7 +15,7 @@ import type { ChangeableProps } from "../../mixins/changeable";
|
|
|
15
15
|
import type { PerseusLabelImageWidgetOptions } from "../../perseus-types";
|
|
16
16
|
import type { APIOptions, Widget } from "../../types";
|
|
17
17
|
import type { PerseusLabelImageRubric, PerseusLabelImageUserInput } from "../../validation.types";
|
|
18
|
-
import type { LabelImagePromptJSON } from "../../widget-ai-utils/label-image/
|
|
18
|
+
import type { LabelImagePromptJSON } from "../../widget-ai-utils/label-image/label-image-ai-utils";
|
|
19
19
|
export type PreferredPopoverDirection = "NONE" | "UP" | "DOWN" | "LEFT" | "RIGHT";
|
|
20
20
|
/**
|
|
21
21
|
* Represents a direction vector.
|
|
@@ -5,7 +5,7 @@ import type { SortableOption } from "../../components/sortable";
|
|
|
5
5
|
import type { PerseusMatcherWidgetOptions } from "../../perseus-types";
|
|
6
6
|
import type { WidgetProps, Widget } from "../../types";
|
|
7
7
|
import type { PerseusMatcherRubric, PerseusMatcherUserInput } from "../../validation.types";
|
|
8
|
-
import type { MatcherPromptJSON } from "../../widget-ai-utils/matcher/
|
|
8
|
+
import type { MatcherPromptJSON } from "../../widget-ai-utils/matcher/matcher-ai-utils";
|
|
9
9
|
type RenderProps = PerseusMatcherWidgetOptions;
|
|
10
10
|
type Props = WidgetProps<RenderProps, PerseusMatcherRubric>;
|
|
11
11
|
type DefaultProps = {
|
|
@@ -4,7 +4,7 @@ import scoreMatrix from "./score-matrix";
|
|
|
4
4
|
import type { PerseusMatrixWidgetOptions } from "../../perseus-types";
|
|
5
5
|
import type { WidgetProps, Widget, FocusPath } from "../../types";
|
|
6
6
|
import type { PerseusMatrixRubric, PerseusMatrixUserInput } from "../../validation.types";
|
|
7
|
-
import type { MatrixPromptJSON } from "../../widget-ai-utils/matrix/
|
|
7
|
+
import type { MatrixPromptJSON } from "../../widget-ai-utils/matrix/matrix-ai-utils";
|
|
8
8
|
export declare function getMatrixSize(matrix: ReadonlyArray<ReadonlyArray<number>>): number[];
|
|
9
9
|
type ExternalProps = WidgetProps<PerseusMatrixWidgetOptions, PerseusMatrixRubric>;
|
|
10
10
|
type Props = ExternalProps & {
|
|
@@ -4,7 +4,7 @@ import scoreNumberLine from "./score-number-line";
|
|
|
4
4
|
import type { ChangeableProps } from "../../mixins/changeable";
|
|
5
5
|
import type { APIOptions, FocusPath, Widget } from "../../types";
|
|
6
6
|
import type { PerseusNumberLineUserInput } from "../../validation.types";
|
|
7
|
-
import type { NumberLinePromptJSON } from "../../widget-ai-utils/number-line/
|
|
7
|
+
import type { NumberLinePromptJSON } from "../../widget-ai-utils/number-line/number-line-ai-utils";
|
|
8
8
|
export type Relationship = "lt" | "gt" | "le" | "ge";
|
|
9
9
|
type Props = ChangeableProps & {
|
|
10
10
|
range: [number, number];
|
|
@@ -74,7 +74,14 @@ declare const _default: {
|
|
|
74
74
|
defaultAlignment: "inline-block";
|
|
75
75
|
accessible: true;
|
|
76
76
|
widget: typeof NumericInput;
|
|
77
|
+
version: {
|
|
78
|
+
major: number;
|
|
79
|
+
minor: number;
|
|
80
|
+
};
|
|
77
81
|
transform: (widgetOptions: PerseusNumericInputWidgetOptions) => RenderProps;
|
|
82
|
+
propUpgrades: {
|
|
83
|
+
readonly "1": (initialProps: any) => PerseusNumericInputWidgetOptions;
|
|
84
|
+
};
|
|
78
85
|
isLintable: true;
|
|
79
86
|
scorer: typeof scoreNumericInput;
|
|
80
87
|
getOneCorrectAnswerFromRubric(rubric: PerseusNumericInputRubric): string | null | undefined;
|
|
@@ -3,7 +3,7 @@ import { scoreOrderer } from "./score-orderer";
|
|
|
3
3
|
import type { PerseusOrdererWidgetOptions } from "../../perseus-types";
|
|
4
4
|
import type { WidgetProps, Widget } from "../../types";
|
|
5
5
|
import type { PerseusOrdererRubric, PerseusOrdererUserInput } from "../../validation.types";
|
|
6
|
-
import type { OrdererPromptJSON } from "../../widget-ai-utils/orderer/
|
|
6
|
+
import type { OrdererPromptJSON } from "../../widget-ai-utils/orderer/orderer-ai-utils";
|
|
7
7
|
type Position = {
|
|
8
8
|
left: number;
|
|
9
9
|
top: number;
|
|
@@ -5,7 +5,7 @@ import type { SerializedHighlightSet } from "../../components/highlighting/types
|
|
|
5
5
|
import type { ChangeableProps } from "../../mixins/changeable";
|
|
6
6
|
import type { PerseusPassageWidgetOptions, PerseusWidget } from "../../perseus-types";
|
|
7
7
|
import type { WidgetProps, Widget } from "../../types";
|
|
8
|
-
import type { PassagePromptJSON } from "../../widget-ai-utils/passage/
|
|
8
|
+
import type { PassagePromptJSON } from "../../widget-ai-utils/passage/passage-ai-utils";
|
|
9
9
|
import type { SingleASTNode } from "@khanacademy/simple-markdown";
|
|
10
10
|
export declare class LineHeightMeasurer extends React.Component<Record<any, any>> {
|
|
11
11
|
_line: HTMLDivElement | null | undefined;
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
3
3
|
import type { PerseusPassageRefWidgetOptions } from "../../perseus-types";
|
|
4
4
|
import type { ChangeFn, Widget, WidgetProps } from "../../types";
|
|
5
|
-
import type { PassageRefPromptJSON } from "../../widget-ai-utils/passage-ref/
|
|
5
|
+
import type { PassageRefPromptJSON } from "../../widget-ai-utils/passage-ref/passage-ref-ai-utils";
|
|
6
6
|
type RenderProps = {
|
|
7
7
|
passageNumber: PerseusPassageRefWidgetOptions["passageNumber"];
|
|
8
8
|
referenceNumber: PerseusPassageRefWidgetOptions["referenceNumber"];
|
|
@@ -4,7 +4,7 @@ import type { FocusFunction } from "./base-radio";
|
|
|
4
4
|
import type { PerseusRadioChoice, PerseusRadioWidgetOptions, ShowSolutions } from "../../perseus-types";
|
|
5
5
|
import type { WidgetProps, ChoiceState, Widget } from "../../types";
|
|
6
6
|
import type { PerseusRadioRubric, PerseusRadioUserInput } from "../../validation.types";
|
|
7
|
-
import type { RadioPromptJSON } from "../../widget-ai-utils/radio/
|
|
7
|
+
import type { RadioPromptJSON } from "../../widget-ai-utils/radio/radio-ai-utils";
|
|
8
8
|
export type RenderProps = {
|
|
9
9
|
numCorrect: number;
|
|
10
10
|
hasNoneOfTheAbove?: boolean;
|
|
@@ -4,7 +4,7 @@ import type { SortableOption } from "../../components/sortable";
|
|
|
4
4
|
import type { PerseusSorterWidgetOptions } from "../../perseus-types";
|
|
5
5
|
import type { Widget, WidgetProps } from "../../types";
|
|
6
6
|
import type { PerseusSorterRubric, PerseusSorterUserInput } from "../../validation.types";
|
|
7
|
-
import type { SorterPromptJSON } from "../../widget-ai-utils/sorter/
|
|
7
|
+
import type { SorterPromptJSON } from "../../widget-ai-utils/sorter/sorter-ai-utils";
|
|
8
8
|
type RenderProps = PerseusSorterWidgetOptions;
|
|
9
9
|
type Props = WidgetProps<RenderProps, PerseusSorterRubric>;
|
|
10
10
|
type DefaultProps = {
|
package/package.json
CHANGED
package/dist/prompt-types.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { CategorizerPromptJSON } from "./widget-ai-utils/categorizer/prompt-utils";
|
|
2
|
-
import type { DefinitionPromptJSON } from "./widget-ai-utils/definition/prompt-utils";
|
|
3
|
-
import type { DropdownPromptJSON } from "./widget-ai-utils/dropdown/prompt-utils";
|
|
4
|
-
import type { ExplanationPromptJSON } from "./widget-ai-utils/explanation/prompt-utils";
|
|
5
|
-
import type { ExpressionPromptJSON } from "./widget-ai-utils/expression/prompt-utils";
|
|
6
|
-
import type { GradedGroupPromptJSON } from "./widget-ai-utils/graded-group/prompt-utils";
|
|
7
|
-
import type { GradedGroupSetPromptJSON } from "./widget-ai-utils/graded-group-set/prompt-utils";
|
|
8
|
-
import type { GrapherPromptJSON } from "./widget-ai-utils/grapher/prompt-utils";
|
|
9
|
-
import type { GroupPromptJSON } from "./widget-ai-utils/group/prompt-utils";
|
|
10
|
-
import type { ImagePromptJSON } from "./widget-ai-utils/image/prompt-utils";
|
|
11
|
-
import type { InputNumberPromptJSON } from "./widget-ai-utils/input-number/prompt-utils";
|
|
12
|
-
import type { LabelImagePromptJSON } from "./widget-ai-utils/label-image/prompt-utils";
|
|
13
|
-
import type { MatcherPromptJSON } from "./widget-ai-utils/matcher/prompt-utils";
|
|
14
|
-
import type { MatrixPromptJSON } from "./widget-ai-utils/matrix/prompt-utils";
|
|
15
|
-
import type { NumberLinePromptJSON } from "./widget-ai-utils/number-line/prompt-utils";
|
|
16
|
-
import type { NumericInputPromptJSON } from "./widget-ai-utils/numeric-input/prompt-utils";
|
|
17
|
-
import type { OrdererPromptJSON } from "./widget-ai-utils/orderer/prompt-utils";
|
|
18
|
-
import type { PassagePromptJSON } from "./widget-ai-utils/passage/prompt-utils";
|
|
19
|
-
import type { PassageRefPromptJSON } from "./widget-ai-utils/passage-ref/prompt-utils";
|
|
20
|
-
import type { RadioPromptJSON } from "./widget-ai-utils/radio/prompt-utils";
|
|
21
|
-
import type { SorterPromptJSON } from "./widget-ai-utils/sorter/prompt-utils";
|
|
22
|
-
import type { UnsupportedWidgetPromptJSON } from "./widget-ai-utils/unsupported-widget";
|
|
23
|
-
export type UnsupportedWidget = "cs-program" | "iframe" | "interaction" | "interactive-graph-unsupported" | "measurer" | "phet-simulation" | "plotter" | "python-program" | "video";
|
|
24
|
-
export type WidgetPromptJSON = CategorizerPromptJSON | DefinitionPromptJSON | DropdownPromptJSON | ExplanationPromptJSON | ExpressionPromptJSON | GradedGroupPromptJSON | GradedGroupSetPromptJSON | GrapherPromptJSON | GroupPromptJSON | ImagePromptJSON | InputNumberPromptJSON | LabelImagePromptJSON | MatcherPromptJSON | MatrixPromptJSON | NumberLinePromptJSON | NumericInputPromptJSON | OrdererPromptJSON | PassagePromptJSON | PassageRefPromptJSON | RadioPromptJSON | SorterPromptJSON | UnsupportedWidgetPromptJSON;
|
|
25
|
-
export type RendererPromptJSON = {
|
|
26
|
-
content: string;
|
|
27
|
-
widgets: {
|
|
28
|
-
[widgetId: string]: WidgetPromptJSON;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export interface GetPromptJSONInterface {
|
|
32
|
-
getPromptJSON(): RendererPromptJSON;
|
|
33
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/widget-ai-utils/phet-simulation/{prompt-utils.d.ts → phet-simulation-ai-utils.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|