Skip to content

Commit

Permalink
Merge branch 'main' into LEMS-2484-minimally-describe-sinusoid
Browse files Browse the repository at this point in the history
  • Loading branch information
anakaren-rojas committed Jan 16, 2025
2 parents 040aa58 + 41ffd4a commit 0895fb7
Show file tree
Hide file tree
Showing 35 changed files with 1,151 additions and 105 deletions.
5 changes: 5 additions & 0 deletions .changeset/new-tomatoes-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": patch
---

Internal: Enable the exhaustive test tool for parsePerseusItem to test articles.
5 changes: 5 additions & 0 deletions .changeset/tidy-baboons-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": patch
---

[SR] Linear System - add screen reader support for Linear System interactive graph
5 changes: 5 additions & 0 deletions .changeset/wild-keys-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": patch
---

[SR] Ray graph - Add screen reader support for Ray interactive graph
8 changes: 8 additions & 0 deletions .changeset/young-beers-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@khanacademy/perseus-dev-ui": patch
"@khanacademy/math-input": patch
"@khanacademy/perseus": patch
"@khanacademy/perseus-editor": patch
---

Updating our wonder-blocks packages with the latest versions.
11 changes: 11 additions & 0 deletions dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @khanacademy/perseus-dev-ui

## 5.1.0

### Minor Changes

- [#2103](https://github.com/Khan/perseus/pull/2103) [`01caf5f31`](https://github.com/Khan/perseus/commit/01caf5f3111d84cf37dffc45012f21860d1648b1) Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - revert wb versions

### Patch Changes

- Updated dependencies [[`01caf5f31`](https://github.com/Khan/perseus/commit/01caf5f3111d84cf37dffc45012f21860d1648b1)]:
- @khanacademy/math-input@22.2.0

## 5.0.12

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Perseus dev UI",
"author": "Khan Academy",
"license": "MIT",
"version": "5.0.12",
"version": "5.1.0",
"private": true,
"repository": {
"type": "git",
Expand All @@ -16,7 +16,7 @@
"dependencies": {
"@khanacademy/kas": "^0.4.10",
"@khanacademy/kmath": "^0.2.0",
"@khanacademy/math-input": "^22.1.2",
"@khanacademy/math-input": "^22.2.0",
"@khanacademy/perseus-core": "3.1.0",
"@khanacademy/perseus-linter": "^1.2.12",
"@khanacademy/pure-markdown": "^0.3.21",
Expand Down
6 changes: 6 additions & 0 deletions packages/math-input/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @khanacademy/math-input

## 22.2.0

### Minor Changes

- [#2103](https://github.com/Khan/perseus/pull/2103) [`01caf5f31`](https://github.com/Khan/perseus/commit/01caf5f3111d84cf37dffc45012f21860d1648b1) Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - revert wb versions

## 22.1.2

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/math-input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Khan Academy's new expression editor for the mobile web.",
"author": "Khan Academy",
"license": "MIT",
"version": "22.1.2",
"version": "22.2.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -80,4 +80,4 @@
"react-transition-group": "^4.4.1"
},
"keywords": []
}
}
12 changes: 12 additions & 0 deletions packages/perseus-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @khanacademy/perseus-editor

## 17.3.0

### Minor Changes

- [#2103](https://github.com/Khan/perseus/pull/2103) [`01caf5f31`](https://github.com/Khan/perseus/commit/01caf5f3111d84cf37dffc45012f21860d1648b1) Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - revert wb versions

### Patch Changes

- Updated dependencies [[`600bf6acb`](https://github.com/Khan/perseus/commit/600bf6acbbf76817e3bf7893f8f85188a538bd6a), [`01caf5f31`](https://github.com/Khan/perseus/commit/01caf5f3111d84cf37dffc45012f21860d1648b1), [`7ed21f49e`](https://github.com/Khan/perseus/commit/7ed21f49ee0cccbb40f200903a7fdfb9c2c0389b), [`ce67b0f0a`](https://github.com/Khan/perseus/commit/ce67b0f0a823c09c1c942220d93eca20aa8a963f)]:
- @khanacademy/perseus@50.1.0
- @khanacademy/math-input@22.2.0

## 17.2.0

### Minor Changes
Expand Down
8 changes: 4 additions & 4 deletions packages/perseus-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Perseus editors",
"author": "Khan Academy",
"license": "MIT",
"version": "17.2.0",
"version": "17.3.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -38,8 +38,8 @@
"@khanacademy/kas": "^0.4.10",
"@khanacademy/keypad-context": "^1.0.13",
"@khanacademy/kmath": "^0.2.0",
"@khanacademy/math-input": "^22.1.2",
"@khanacademy/perseus": "^50.0.0",
"@khanacademy/math-input": "^22.2.0",
"@khanacademy/perseus": "^50.1.0",
"@khanacademy/perseus-core": "3.1.0",
"@khanacademy/pure-markdown": "^0.3.21",
"mafs": "^0.19.0"
Expand Down Expand Up @@ -100,4 +100,4 @@
"underscore": "^1.4.4"
},
"keywords": []
}
}
17 changes: 17 additions & 0 deletions packages/perseus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @khanacademy/perseus

## 50.1.0

### Minor Changes

- [#2092](https://github.com/Khan/perseus/pull/2092) [`600bf6acb`](https://github.com/Khan/perseus/commit/600bf6acbbf76817e3bf7893f8f85188a538bd6a) Thanks [@Myranae](https://github.com/Myranae)! - Introduce a widget export function to filter out scoring data from widget options. Implement this function for the categorizer widget.

* [#2103](https://github.com/Khan/perseus/pull/2103) [`01caf5f31`](https://github.com/Khan/perseus/commit/01caf5f3111d84cf37dffc45012f21860d1648b1) Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - revert wb versions

### Patch Changes

- [#2097](https://github.com/Khan/perseus/pull/2097) [`7ed21f49e`](https://github.com/Khan/perseus/commit/7ed21f49ee0cccbb40f200903a7fdfb9c2c0389b) Thanks [@nishasy](https://github.com/nishasy)! - [SR][locked figures] Give all locked figures "img" role

* [#2104](https://github.com/Khan/perseus/pull/2104) [`ce67b0f0a`](https://github.com/Khan/perseus/commit/ce67b0f0a823c09c1c942220d93eca20aa8a963f) Thanks [@handeyeco](https://github.com/handeyeco)! - Handle error codes better in Graded Group

* Updated dependencies [[`01caf5f31`](https://github.com/Khan/perseus/commit/01caf5f3111d84cf37dffc45012f21860d1648b1)]:
- @khanacademy/math-input@22.2.0

## 50.0.0

### Major Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/perseus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Core Perseus API (includes renderers and widgets)",
"author": "Khan Academy",
"license": "MIT",
"version": "50.0.0",
"version": "50.1.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -44,7 +44,7 @@
"@khanacademy/kas": "^0.4.10",
"@khanacademy/keypad-context": "^1.0.13",
"@khanacademy/kmath": "^0.2.0",
"@khanacademy/math-input": "^22.1.2",
"@khanacademy/math-input": "^22.2.0",
"@khanacademy/perseus-core": "3.1.0",
"@khanacademy/perseus-linter": "^1.2.12",
"@khanacademy/perseus-score": "^1.0.0",
Expand Down Expand Up @@ -124,4 +124,4 @@
"underscore": "^1.4.4"
},
"keywords": []
}
}
74 changes: 74 additions & 0 deletions packages/perseus/src/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,56 @@ export type PerseusStrings = {
endingSideX: string;
endingSideY: string;
}) => string;
srLinearSystemGraph: string;
srLinearSystemPoints: ({
lineNumber,
point1X,
point1Y,
point2X,
point2Y,
}: {
lineNumber: number;
point1X: string;
point1Y: string;
point2X: string;
point2Y: string;
}) => string;
srLinearSystemPoint({
lineNumber,
pointSequence,
x,
y,
}: {
lineNumber: number;
pointSequence: number;
x: string;
y: string;
}): string;
srRayGraph: string;
srRayPoints: ({
point1X,
point1Y,
point2X,
point2Y,
}: {
point1X: string;
point1Y: string;
point2X: string;
point2Y: string;
}) => string;
srRayEndpoint: ({x, y}: {x: string; y: string}) => string;
srRayTerminalPoint: ({x, y}: {x: string; y: string}) => string;
srRayGrabHandle: ({
point1X,
point1Y,
point2X,
point2Y,
}: {
point1X: string;
point1Y: string;
point2X: string;
point2Y: string;
}) => string;
srSinusoidGraphAriaLabel: string;
srSinusoidExtremumPoint: ({x, y}: {x: string; y: string}) => string;
srSinusoidMidlineIntersection: ({x, y}: {x: string; y: string}) => string;
Expand Down Expand Up @@ -483,6 +533,18 @@ export const strings: {
srAngleGraphAriaLabel: "An angle on a coordinate plane.",
srAngleGraphAriaDescription:
"The angle measure is %(angleMeasure)s degrees with a vertex at %(vertexX)s comma %(vertexY)s, a point on the starting side at %(startingSideX)s comma %(startingSideY)s and a point on the ending side at %(endingSideX)s comma %(endingSideY)s",
srLinearSystemGraph: "Two lines on a coordinate plane.",
srLinearSystemPoints:
"Line %(lineNumber)s has two points, point 1 at %(point1X)s comma %(point1Y)s and point 2 at %(point2X)s comma %(point2Y)s.",
srLinearSystemPoint:
"Point %(pointSequence)s on line %(lineNumber)s at %(x)s comma %(y)s.",
srRayGraph: "A ray on a coordinate plane.",
srRayPoints:
"The endpoint is at %(point1X)s comma %(point1Y)s and the ray goes through point %(point2X)s comma %(point2Y)s.",
srRayGrabHandle:
"Ray with endpoint %(point1X)s comma %(point1Y)s going through point %(point2X)s comma %(point2Y)s.",
srRayEndpoint: "Endpoint at %(point1X)s comma %(point1Y)s.",
srRayTerminalPoint: "Through point at %(point2X)s comma %(point2Y)s.",
srSinusoidGraphAriaLabel: "A sinusoid function on a coordinate plane.",
srSinusoidExtremumPoint: "Extremum Point at %(x)s comma %(y)s.",
srSinusoidMidlineIntersection: "Midline Intersection at %(x)s comma %(y)s.",
Expand Down Expand Up @@ -703,6 +765,18 @@ export const mockStrings: PerseusStrings = {
endingSideY,
}) =>
`The angle measure is ${angleMeasure} degrees with a vertex at ${vertexX} comma ${vertexY}, a point on the starting side at ${startingSideX} comma ${startingSideY} and a point on the ending side at ${endingSideX} comma ${endingSideY}.`,
srLinearSystemGraph: "Two lines on a coordinate plane.",
srLinearSystemPoints: ({lineNumber, point1X, point1Y, point2X, point2Y}) =>
`Line ${lineNumber} has two points, point 1 at ${point1X} comma ${point1Y} and point 2 at ${point2X} comma ${point2Y}.`,
srLinearSystemPoint: ({lineNumber, pointSequence, x, y}) =>
`Point ${pointSequence} on line ${lineNumber} at ${x} comma ${y}.`,
srRayGraph: "A ray on a coordinate plane.",
srRayPoints: ({point1X, point1Y, point2X, point2Y}) =>
`The endpoint is at ${point1X} comma ${point1Y} and the ray goes through point ${point2X} comma ${point2Y}.`,
srRayGrabHandle: ({point1X, point1Y, point2X, point2Y}) =>
`Ray with endpoint ${point1X} comma ${point1Y} going through point ${point2X} comma ${point2Y}.`,
srRayEndpoint: ({x, y}) => `Endpoint at ${x} comma ${y}.`,
srRayTerminalPoint: ({x, y}) => `Through point at ${x} comma ${y}.`,
srSinusoidGraphAriaLabel: "A sinusoid function on a coordinate plane.",
srSinusoidExtremumPoint: ({x, y}) => `Extremum Point at ${x} comma ${y}.`,
srSinusoidMidlineIntersection: ({x, y}) =>
Expand Down
13 changes: 13 additions & 0 deletions packages/perseus/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import type {
UserInputMap,
} from "./validation.types";
import type {WidgetPromptJSON} from "./widget-ai-utils/prompt-types";
import type getCategorizerPublicWidgetOptions from "./widgets/categorizer/categorizer.util";
import type {KeypadAPI} from "@khanacademy/math-input";
import type {
Hint,
Expand Down Expand Up @@ -542,6 +543,12 @@ export type WidgetScorerFunction = (
locale?: string,
) => PerseusScore;

/**
* A union type of all the functions that provide public widget options.
*/
export type PublicWidgetOptionsFunction =
typeof getCategorizerPublicWidgetOptions;

export type WidgetExports<
T extends React.ComponentType<any> & Widget = React.ComponentType<any>,
> = Readonly<{
Expand Down Expand Up @@ -589,6 +596,12 @@ export type WidgetExports<
*/
scorer?: WidgetScorerFunction;

/**
* A function that provides a public version of the widget options that can
* be shared with the client.
*/
getPublicWidgetOptions?: PublicWidgetOptionsFunction;

getOneCorrectAnswerFromRubric?: (
rubric: Rubric,
) => string | null | undefined;
Expand Down
Loading

0 comments on commit 0895fb7

Please sign in to comment.