@khanacademy/perseus 51.0.0 → 52.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.js +682 -1997
- package/dist/es/index.js.map +1 -1
- package/dist/es/strings.js +103 -3
- package/dist/es/strings.js.map +1 -1
- package/dist/index.d.ts +36 -6
- package/dist/index.js +737 -2005
- package/dist/index.js.map +1 -1
- package/dist/item-version.d.ts +1 -1
- package/dist/renderer-util.d.ts +7 -2
- package/dist/strings.d.ts +100 -0
- package/dist/strings.js +159 -14
- package/dist/strings.js.map +1 -1
- package/dist/types.d.ts +13 -12
- package/dist/widget-ai-utils/mock-widget/prompt-utils.d.ts +1 -1
- package/dist/widget-type-utils.d.ts +1 -22
- package/dist/widgets/categorizer/categorizer.d.ts +5 -5
- package/dist/widgets/cs-program/cs-program.d.ts +3 -2
- package/dist/widgets/dropdown/dropdown.d.ts +2 -1
- package/dist/widgets/expression/expression.d.ts +8 -10
- package/dist/widgets/grapher/grapher.d.ts +2 -1
- package/dist/widgets/group/group.d.ts +4 -2
- package/dist/widgets/group/score-group.d.ts +2 -2
- package/dist/widgets/group/validate-group.d.ts +4 -0
- package/dist/widgets/iframe/iframe.d.ts +3 -2
- package/dist/widgets/input-number/input-number.d.ts +2 -1
- package/dist/widgets/interactive-graph.d.ts +2 -1
- package/dist/widgets/interactive-graphs/graphs/linear.d.ts +2 -0
- package/dist/widgets/interactive-graphs/graphs/quadratic.d.ts +12 -1
- package/dist/widgets/interactive-graphs/graphs/segment.d.ts +2 -0
- package/dist/widgets/interactive-graphs/graphs/utils.d.ts +6 -0
- package/dist/widgets/label-image/label-image.d.ts +5 -4
- package/dist/widgets/matcher/matcher.d.ts +2 -1
- package/dist/widgets/matrix/matrix.d.ts +4 -2
- package/dist/widgets/measurer/measurer.d.ts +3 -8
- package/dist/widgets/mock-widgets/mock-widget-types.d.ts +17 -0
- package/dist/widgets/mock-widgets/mock-widget.d.ts +5 -4
- package/dist/widgets/mock-widgets/score-mock-widget.d.ts +2 -1
- package/dist/widgets/mock-widgets/validate-mock-widget.d.ts +4 -0
- package/dist/widgets/number-line/number-line.d.ts +3 -1
- package/dist/widgets/numeric-input/numeric-input.d.ts +2 -1
- package/dist/widgets/orderer/orderer.d.ts +6 -2
- package/dist/widgets/passage-ref/passage-ref.d.ts +2 -5
- package/dist/widgets/passage-ref-target/passage-ref-target.d.ts +0 -4
- package/dist/widgets/plotter/plotter.d.ts +4 -2
- package/dist/widgets/radio/radio-component.d.ts +1 -1
- package/dist/widgets/radio/radio.d.ts +5 -9
- package/dist/widgets/sorter/sorter.d.ts +3 -1
- package/dist/widgets/table/table.d.ts +3 -1
- package/dist/widgets.d.ts +3 -2
- package/package.json +14 -14
- package/dist/util/is-real-json-parse.d.ts +0 -1
- package/dist/util/parse-perseus-json/error-tracking-parse-context.d.ts +0 -9
- package/dist/util/parse-perseus-json/exhaustive-test-tool/index.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/any.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/array.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/array.typetest.d.ts +0 -1
- package/dist/util/parse-perseus-json/general-purpose-parsers/boolean.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/constant.d.ts +0 -4
- package/dist/util/parse-perseus-json/general-purpose-parsers/convert.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/defaulted.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/discriminated-union.d.ts +0 -21
- package/dist/util/parse-perseus-json/general-purpose-parsers/discriminated-union.typetest.d.ts +0 -1
- package/dist/util/parse-perseus-json/general-purpose-parsers/enumeration.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/enumeration.typetest.d.ts +0 -1
- package/dist/util/parse-perseus-json/general-purpose-parsers/index.d.ts +0 -17
- package/dist/util/parse-perseus-json/general-purpose-parsers/is-object.d.ts +0 -1
- package/dist/util/parse-perseus-json/general-purpose-parsers/nullable.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/number.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/object.d.ts +0 -6
- package/dist/util/parse-perseus-json/general-purpose-parsers/optional.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/pair.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/pipe-parsers.d.ts +0 -7
- package/dist/util/parse-perseus-json/general-purpose-parsers/pipe-parsers.typetest.d.ts +0 -1
- package/dist/util/parse-perseus-json/general-purpose-parsers/record.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/string-to-number.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/string.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/test-helpers.d.ts +0 -8
- package/dist/util/parse-perseus-json/general-purpose-parsers/trio.d.ts +0 -2
- package/dist/util/parse-perseus-json/general-purpose-parsers/union.d.ts +0 -7
- package/dist/util/parse-perseus-json/general-purpose-parsers/union.typetest.d.ts +0 -1
- package/dist/util/parse-perseus-json/general-purpose-parsers/unknown.d.ts +0 -2
- package/dist/util/parse-perseus-json/index.d.ts +0 -45
- package/dist/util/parse-perseus-json/object-path.d.ts +0 -2
- package/dist/util/parse-perseus-json/parse-failure-detail.d.ts +0 -2
- package/dist/util/parse-perseus-json/parse.d.ts +0 -3
- package/dist/util/parse-perseus-json/parser-types.d.ts +0 -30
- package/dist/util/parse-perseus-json/perseus-parsers/categorizer-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/cs-program-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/definition-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/dropdown-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/explanation-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/expression-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/graded-group-set-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/graded-group-widget.d.ts +0 -16
- package/dist/util/parse-perseus-json/perseus-parsers/grapher-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/group-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/hint.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/iframe-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/image-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/images-map.d.ts +0 -5
- package/dist/util/parse-perseus-json/perseus-parsers/input-number-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/interaction-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/interactive-graph-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/label-image-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/matcher-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/matrix-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/measurer-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/molecule-renderer-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/number-line-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/numeric-input-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/orderer-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/passage-ref-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/passage-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/perseus-article.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/perseus-image-background.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/perseus-item.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/perseus-renderer.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/phet-simulation-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/plotter-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/python-program-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/radio-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/sorter-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/table-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/versioned-widget-options.d.ts +0 -36
- package/dist/util/parse-perseus-json/perseus-parsers/video-widget.d.ts +0 -3
- package/dist/util/parse-perseus-json/perseus-parsers/widget.d.ts +0 -7
- package/dist/util/parse-perseus-json/perseus-parsers/widgets-map.d.ts +0 -3
- package/dist/util/parse-perseus-json/result.d.ts +0 -16
- package/dist/util/snowman-utils.d.ts +0 -17
- package/dist/widgets/categorizer/categorizer.util.d.ts +0 -17
package/dist/item-version.d.ts
CHANGED
package/dist/renderer-util.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type { PerseusStrings } from "./strings";
|
|
2
2
|
import type { PerseusRenderer, PerseusWidgetsMap } from "@khanacademy/perseus-core";
|
|
3
|
-
import type { PerseusScore,
|
|
3
|
+
import type { UserInputMap, PerseusScore, ValidationDataMap } from "@khanacademy/perseus-score";
|
|
4
4
|
export declare function getUpgradedWidgetOptions(oldWidgetOptions: PerseusWidgetsMap): PerseusWidgetsMap;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Checks the given user input to see if any answerable widgets have not been
|
|
7
|
+
* "filled in" (ie. if they're empty). Another way to think about this
|
|
8
|
+
* function is that its a check to see if we can score the provided input.
|
|
9
|
+
*/
|
|
10
|
+
export declare function emptyWidgetsFunctional(widgets: ValidationDataMap, widgetIds: ReadonlyArray<string>, userInputMap: UserInputMap, strings: PerseusStrings, locale: string): ReadonlyArray<string>;
|
|
6
11
|
export declare function scorePerseusItem(perseusRenderData: PerseusRenderer, userInputMap: UserInputMap, strings: PerseusStrings, locale: string): PerseusScore;
|
|
7
12
|
export declare function scoreWidgetsFunctional(widgets: PerseusWidgetsMap, widgetIds: ReadonlyArray<string>, userInputMap: UserInputMap, strings: PerseusStrings, locale: string): {
|
|
8
13
|
[widgetId: string]: PerseusScore;
|
package/dist/strings.d.ts
CHANGED
|
@@ -263,6 +263,43 @@ export type PerseusStrings = {
|
|
|
263
263
|
endingSideX: string;
|
|
264
264
|
endingSideY: string;
|
|
265
265
|
}) => string;
|
|
266
|
+
srSingleSegmentGraphAriaLabel: string;
|
|
267
|
+
srMultipleSegmentGraphAriaLabel: ({ countOfSegments, }: {
|
|
268
|
+
countOfSegments: number;
|
|
269
|
+
}) => string;
|
|
270
|
+
srMultipleSegmentIndividualLabel: ({ point1X, point1Y, point2X, point2Y, indexOfSegment, }: {
|
|
271
|
+
point1X: string;
|
|
272
|
+
point1Y: string;
|
|
273
|
+
point2X: string;
|
|
274
|
+
point2Y: string;
|
|
275
|
+
indexOfSegment: number;
|
|
276
|
+
}) => string;
|
|
277
|
+
srSingleSegmentLabel: ({ point1X, point1Y, point2X, point2Y, }: {
|
|
278
|
+
point1X: string;
|
|
279
|
+
point1Y: string;
|
|
280
|
+
point2X: string;
|
|
281
|
+
point2Y: string;
|
|
282
|
+
}) => string;
|
|
283
|
+
srSegmentLength: ({ length }: {
|
|
284
|
+
length: string;
|
|
285
|
+
}) => string;
|
|
286
|
+
srSingleSegmentGraphEndpointAriaLabel: ({ endpointNumber, x, y, }: {
|
|
287
|
+
endpointNumber: number;
|
|
288
|
+
x: string;
|
|
289
|
+
y: string;
|
|
290
|
+
}) => string;
|
|
291
|
+
srMultipleSegmentGraphEndpointAriaLabel: ({ endpointNumber, x, y, indexOfSegment, }: {
|
|
292
|
+
endpointNumber: number;
|
|
293
|
+
x: string;
|
|
294
|
+
y: string;
|
|
295
|
+
indexOfSegment: number;
|
|
296
|
+
}) => string;
|
|
297
|
+
srSegmentGrabHandle: ({ point1X, point1Y, point2X, point2Y, }: {
|
|
298
|
+
point1X: string;
|
|
299
|
+
point1Y: string;
|
|
300
|
+
point2X: string;
|
|
301
|
+
point2Y: string;
|
|
302
|
+
}) => string;
|
|
266
303
|
srLinearSystemGraph: string;
|
|
267
304
|
srLinearSystemPoints: ({ lineNumber, point1X, point1Y, point2X, point2Y, }: {
|
|
268
305
|
lineNumber: number;
|
|
@@ -298,6 +335,47 @@ export type PerseusStrings = {
|
|
|
298
335
|
point2X: string;
|
|
299
336
|
point2Y: string;
|
|
300
337
|
}) => string;
|
|
338
|
+
srQuadraticGraph: string;
|
|
339
|
+
srQuadraticFaceUp: string;
|
|
340
|
+
srQuadraticFaceDown: string;
|
|
341
|
+
srQuadraticGraphVertexOrigin: string;
|
|
342
|
+
srQuadraticGraphVertexXAxis: string;
|
|
343
|
+
srQuadraticGraphVertexYAxis: string;
|
|
344
|
+
srQuadraticGraphVertexQuadrant: ({ quadrant }: {
|
|
345
|
+
quadrant: number;
|
|
346
|
+
}) => string;
|
|
347
|
+
srQuadraticTwoXIntercepts: ({ intercept1, intercept2, }: {
|
|
348
|
+
intercept1: string;
|
|
349
|
+
intercept2: string;
|
|
350
|
+
}) => string;
|
|
351
|
+
srQuadraticOneXIntercept: ({ intercept }: {
|
|
352
|
+
intercept: string;
|
|
353
|
+
}) => string;
|
|
354
|
+
srQuadraticYIntercept: ({ intercept }: {
|
|
355
|
+
intercept: string;
|
|
356
|
+
}) => string;
|
|
357
|
+
srQuadraticPointOrigin: ({ pointNumber }: {
|
|
358
|
+
pointNumber: number;
|
|
359
|
+
}) => string;
|
|
360
|
+
srQuadraticPointAxis: ({ pointNumber, x, y, }: {
|
|
361
|
+
pointNumber: number;
|
|
362
|
+
x: string;
|
|
363
|
+
y: string;
|
|
364
|
+
}) => string;
|
|
365
|
+
srQuadraticPointQuadrant: ({ pointNumber, x, y, quadrant, }: {
|
|
366
|
+
pointNumber: number;
|
|
367
|
+
x: string;
|
|
368
|
+
y: string;
|
|
369
|
+
quadrant: number;
|
|
370
|
+
}) => string;
|
|
371
|
+
srQuadraticInteractiveElements: ({ point1X, point1Y, point2X, point2Y, point3X, point3Y, }: {
|
|
372
|
+
point1X: string;
|
|
373
|
+
point1Y: string;
|
|
374
|
+
point2X: string;
|
|
375
|
+
point2Y: string;
|
|
376
|
+
point3X: string;
|
|
377
|
+
point3Y: string;
|
|
378
|
+
}) => string;
|
|
301
379
|
};
|
|
302
380
|
/**
|
|
303
381
|
* Untranslated strings used in Perseus. To be used by an external
|
|
@@ -468,6 +546,14 @@ export declare const strings: {
|
|
|
468
546
|
srAngleVertexAtCoordinatesWithAngleMeasure: string;
|
|
469
547
|
srAngleGraphAriaLabel: string;
|
|
470
548
|
srAngleGraphAriaDescription: string;
|
|
549
|
+
srSingleSegmentGraphAriaLabel: string;
|
|
550
|
+
srMultipleSegmentGraphAriaLabel: string;
|
|
551
|
+
srMultipleSegmentIndividualLabel: string;
|
|
552
|
+
srSingleSegmentLabel: string;
|
|
553
|
+
srSegmentLength: string;
|
|
554
|
+
srSingleSegmentGraphEndpointAriaLabel: string;
|
|
555
|
+
srMultipleSegmentGraphEndpointAriaLabel: string;
|
|
556
|
+
srSegmentGrabHandle: string;
|
|
471
557
|
srLinearSystemGraph: string;
|
|
472
558
|
srLinearSystemPoints: string;
|
|
473
559
|
srLinearSystemPoint: string;
|
|
@@ -476,6 +562,20 @@ export declare const strings: {
|
|
|
476
562
|
srRayGrabHandle: string;
|
|
477
563
|
srRayEndpoint: string;
|
|
478
564
|
srRayTerminalPoint: string;
|
|
565
|
+
srQuadraticGraph: string;
|
|
566
|
+
srQuadraticFaceUp: string;
|
|
567
|
+
srQuadraticFaceDown: string;
|
|
568
|
+
srQuadraticGraphVertexOrigin: string;
|
|
569
|
+
srQuadraticGraphVertexXAxis: string;
|
|
570
|
+
srQuadraticGraphVertexYAxis: string;
|
|
571
|
+
srQuadraticGraphVertexQuadrant: string;
|
|
572
|
+
srQuadraticTwoXIntercepts: string;
|
|
573
|
+
srQuadraticOneXIntercept: string;
|
|
574
|
+
srQuadraticYIntercept: string;
|
|
575
|
+
srQuadraticPointOrigin: string;
|
|
576
|
+
srQuadraticPointAxis: string;
|
|
577
|
+
srQuadraticPointQuadrant: string;
|
|
578
|
+
srQuadraticInteractiveElements: string;
|
|
479
579
|
};
|
|
480
580
|
/**
|
|
481
581
|
* Mock strings for the Perseus package, to be used for tests and Storybook.
|
package/dist/strings.js
CHANGED
|
@@ -180,14 +180,36 @@ const strings = {
|
|
|
180
180
|
srAngleVertexAtCoordinatesWithAngleMeasure: "Point 2, vertex at %(x)s comma %(y)s. Angle %(angleMeasure)s degrees",
|
|
181
181
|
srAngleGraphAriaLabel: "An angle on a coordinate plane.",
|
|
182
182
|
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",
|
|
183
|
+
srSingleSegmentGraphAriaLabel: "A line segment on a coordinate plane.",
|
|
184
|
+
srMultipleSegmentGraphAriaLabel: "%(countOfSegments)s line segments on a coordinate plane.",
|
|
185
|
+
srMultipleSegmentIndividualLabel: "Segment %(indexOfSegment)s: Endpoint 1 at %(point1X)s comma %(point1Y)s. Endpoint 2 %(point2X)s comma %(point2Y)s.",
|
|
186
|
+
srSingleSegmentLabel: "Endpoint 1 at %(point1X)s comma %(point1Y)s. Endpoint 2 %(point2X)s comma %(point2Y)s.",
|
|
187
|
+
srSegmentLength: "Segment length %(length)s units.",
|
|
188
|
+
srSingleSegmentGraphEndpointAriaLabel: "Endpoint %(endpointNumber)s at %(x)s comma %(y)s.",
|
|
189
|
+
srMultipleSegmentGraphEndpointAriaLabel: "Endpoint %(endpointNumber)s on segment %(indexOfSegment)s at %(x)s comma %(y)s.",
|
|
190
|
+
srSegmentGrabHandle: "Segment from %(point1X)s comma %(point1Y)s to %(point2X)s comma %(point2Y)s.",
|
|
183
191
|
srLinearSystemGraph: "Two lines on a coordinate plane.",
|
|
184
192
|
srLinearSystemPoints: "Line %(lineNumber)s has two points, point 1 at %(point1X)s comma %(point1Y)s and point 2 at %(point2X)s comma %(point2Y)s.",
|
|
185
193
|
srLinearSystemPoint: "Point %(pointSequence)s on line %(lineNumber)s at %(x)s comma %(y)s.",
|
|
186
194
|
srRayGraph: "A ray on a coordinate plane.",
|
|
187
195
|
srRayPoints: "The endpoint is at %(point1X)s comma %(point1Y)s and the ray goes through point %(point2X)s comma %(point2Y)s.",
|
|
188
196
|
srRayGrabHandle: "Ray with endpoint %(point1X)s comma %(point1Y)s going through point %(point2X)s comma %(point2Y)s.",
|
|
189
|
-
srRayEndpoint: "Endpoint at %(
|
|
190
|
-
srRayTerminalPoint: "Through point at %(
|
|
197
|
+
srRayEndpoint: "Endpoint at %(x)s comma %(y)s.",
|
|
198
|
+
srRayTerminalPoint: "Through point at %(x)s comma %(y)s.",
|
|
199
|
+
srQuadraticGraph: "A parabola on a 4-quadrant coordinate plane.",
|
|
200
|
+
srQuadraticFaceUp: "The parabola opens upward.",
|
|
201
|
+
srQuadraticFaceDown: "The parabola opens downward.",
|
|
202
|
+
srQuadraticGraphVertexOrigin: "Vertex is at the origin.",
|
|
203
|
+
srQuadraticGraphVertexXAxis: "Vertex is on the X-axis.",
|
|
204
|
+
srQuadraticGraphVertexYAxis: "Vertex is on the Y-axis.",
|
|
205
|
+
srQuadraticGraphVertexQuadrant: "Vertex is in quadrant %(quadrant)s.",
|
|
206
|
+
srQuadraticTwoXIntercepts: "The X-intercepts are at %(intercept1)s comma 0 and %(intercept2)s comma 0.",
|
|
207
|
+
srQuadraticOneXIntercept: "The X-intercept is at %(intercept)s comma 0.",
|
|
208
|
+
srQuadraticYIntercept: "The Y-intercept is at 0 comma %(intercept)s.",
|
|
209
|
+
srQuadraticPointOrigin: "Point %(pointNumber)s on parabola at the origin.",
|
|
210
|
+
srQuadraticPointAxis: "Point %(pointNumber)s on parabola at %(x)s comma %(y)s.",
|
|
211
|
+
srQuadraticPointQuadrant: "Point %(pointNumber)s on parabola in quadrant %(quadrant)s at %(x)s comma %(y)s.",
|
|
212
|
+
srQuadraticInteractiveElements: "Parabola with points at %(point1X)s comma %(point1Y)s, %(point2X)s comma %(point2Y)s, and %(point3X)s comma %(point3Y)s."
|
|
191
213
|
// The above strings are used for interactive graph SR descriptions.
|
|
192
214
|
};
|
|
193
215
|
|
|
@@ -577,58 +599,181 @@ const mockStrings = {
|
|
|
577
599
|
} = _ref40;
|
|
578
600
|
return `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}.`;
|
|
579
601
|
},
|
|
602
|
+
srSingleSegmentGraphAriaLabel: "A line segment on a coordinate plane.",
|
|
603
|
+
srMultipleSegmentGraphAriaLabel: _ref41 => {
|
|
604
|
+
let {
|
|
605
|
+
countOfSegments
|
|
606
|
+
} = _ref41;
|
|
607
|
+
return `${countOfSegments} segments on a coordinate plane.`;
|
|
608
|
+
},
|
|
609
|
+
srMultipleSegmentIndividualLabel: _ref42 => {
|
|
610
|
+
let {
|
|
611
|
+
point1X,
|
|
612
|
+
point1Y,
|
|
613
|
+
point2X,
|
|
614
|
+
point2Y,
|
|
615
|
+
indexOfSegment
|
|
616
|
+
} = _ref42;
|
|
617
|
+
return `Segment ${indexOfSegment}: Endpoint 1 at ${point1X} comma ${point1Y}. Endpoint 2 at ${point2X} comma ${point2Y}.`;
|
|
618
|
+
},
|
|
619
|
+
srSingleSegmentLabel: _ref43 => {
|
|
620
|
+
let {
|
|
621
|
+
point1X,
|
|
622
|
+
point1Y,
|
|
623
|
+
point2X,
|
|
624
|
+
point2Y
|
|
625
|
+
} = _ref43;
|
|
626
|
+
return `Endpoint 1 at ${point1X} comma ${point1Y}. Endpoint 2 at ${point2X} comma ${point2Y}.`;
|
|
627
|
+
},
|
|
628
|
+
srSegmentLength: _ref44 => {
|
|
629
|
+
let {
|
|
630
|
+
length
|
|
631
|
+
} = _ref44;
|
|
632
|
+
return `Segment length ${length} units.`;
|
|
633
|
+
},
|
|
634
|
+
srSingleSegmentGraphEndpointAriaLabel: _ref45 => {
|
|
635
|
+
let {
|
|
636
|
+
endpointNumber,
|
|
637
|
+
x,
|
|
638
|
+
y
|
|
639
|
+
} = _ref45;
|
|
640
|
+
return `Endpoint ${endpointNumber} at ${x} comma ${y}.`;
|
|
641
|
+
},
|
|
642
|
+
srMultipleSegmentGraphEndpointAriaLabel: _ref46 => {
|
|
643
|
+
let {
|
|
644
|
+
endpointNumber,
|
|
645
|
+
x,
|
|
646
|
+
y,
|
|
647
|
+
indexOfSegment
|
|
648
|
+
} = _ref46;
|
|
649
|
+
return `Endpoint ${endpointNumber} on segment ${indexOfSegment} at ${x} comma ${y}.`;
|
|
650
|
+
},
|
|
651
|
+
srSegmentGrabHandle: _ref47 => {
|
|
652
|
+
let {
|
|
653
|
+
point1X,
|
|
654
|
+
point1Y,
|
|
655
|
+
point2X,
|
|
656
|
+
point2Y
|
|
657
|
+
} = _ref47;
|
|
658
|
+
return `Segment from ${point1X} comma ${point1Y} to ${point2X} comma ${point2Y}.`;
|
|
659
|
+
},
|
|
580
660
|
srLinearSystemGraph: "Two lines on a coordinate plane.",
|
|
581
|
-
srLinearSystemPoints:
|
|
661
|
+
srLinearSystemPoints: _ref48 => {
|
|
582
662
|
let {
|
|
583
663
|
lineNumber,
|
|
584
664
|
point1X,
|
|
585
665
|
point1Y,
|
|
586
666
|
point2X,
|
|
587
667
|
point2Y
|
|
588
|
-
} =
|
|
668
|
+
} = _ref48;
|
|
589
669
|
return `Line ${lineNumber} has two points, point 1 at ${point1X} comma ${point1Y} and point 2 at ${point2X} comma ${point2Y}.`;
|
|
590
670
|
},
|
|
591
|
-
srLinearSystemPoint:
|
|
671
|
+
srLinearSystemPoint: _ref49 => {
|
|
592
672
|
let {
|
|
593
673
|
lineNumber,
|
|
594
674
|
pointSequence,
|
|
595
675
|
x,
|
|
596
676
|
y
|
|
597
|
-
} =
|
|
677
|
+
} = _ref49;
|
|
598
678
|
return `Point ${pointSequence} on line ${lineNumber} at ${x} comma ${y}.`;
|
|
599
679
|
},
|
|
600
680
|
srRayGraph: "A ray on a coordinate plane.",
|
|
601
|
-
srRayPoints:
|
|
681
|
+
srRayPoints: _ref50 => {
|
|
602
682
|
let {
|
|
603
683
|
point1X,
|
|
604
684
|
point1Y,
|
|
605
685
|
point2X,
|
|
606
686
|
point2Y
|
|
607
|
-
} =
|
|
687
|
+
} = _ref50;
|
|
608
688
|
return `The endpoint is at ${point1X} comma ${point1Y} and the ray goes through point ${point2X} comma ${point2Y}.`;
|
|
609
689
|
},
|
|
610
|
-
srRayGrabHandle:
|
|
690
|
+
srRayGrabHandle: _ref51 => {
|
|
611
691
|
let {
|
|
612
692
|
point1X,
|
|
613
693
|
point1Y,
|
|
614
694
|
point2X,
|
|
615
695
|
point2Y
|
|
616
|
-
} =
|
|
696
|
+
} = _ref51;
|
|
617
697
|
return `Ray with endpoint ${point1X} comma ${point1Y} going through point ${point2X} comma ${point2Y}.`;
|
|
618
698
|
},
|
|
619
|
-
srRayEndpoint:
|
|
699
|
+
srRayEndpoint: _ref52 => {
|
|
620
700
|
let {
|
|
621
701
|
x,
|
|
622
702
|
y
|
|
623
|
-
} =
|
|
703
|
+
} = _ref52;
|
|
624
704
|
return `Endpoint at ${x} comma ${y}.`;
|
|
625
705
|
},
|
|
626
|
-
srRayTerminalPoint:
|
|
706
|
+
srRayTerminalPoint: _ref53 => {
|
|
627
707
|
let {
|
|
628
708
|
x,
|
|
629
709
|
y
|
|
630
|
-
} =
|
|
710
|
+
} = _ref53;
|
|
631
711
|
return `Through point at ${x} comma ${y}.`;
|
|
712
|
+
},
|
|
713
|
+
srQuadraticGraph: "A parabola on a 4-quadrant coordinate plane.",
|
|
714
|
+
srQuadraticFaceUp: "The parabola opens upward.",
|
|
715
|
+
srQuadraticFaceDown: "The parabola opens downward.",
|
|
716
|
+
srQuadraticGraphVertexOrigin: "Vertex is at the origin.",
|
|
717
|
+
srQuadraticGraphVertexXAxis: "Vertex is on the X-axis.",
|
|
718
|
+
srQuadraticGraphVertexYAxis: "Vertex is on the Y-axis.",
|
|
719
|
+
srQuadraticGraphVertexQuadrant: _ref54 => {
|
|
720
|
+
let {
|
|
721
|
+
quadrant
|
|
722
|
+
} = _ref54;
|
|
723
|
+
return `Vertex is in quadrant ${quadrant}.`;
|
|
724
|
+
},
|
|
725
|
+
srQuadraticTwoXIntercepts: _ref55 => {
|
|
726
|
+
let {
|
|
727
|
+
intercept1,
|
|
728
|
+
intercept2
|
|
729
|
+
} = _ref55;
|
|
730
|
+
return `The X-intercepts are at ${intercept1} comma 0 and ${intercept2} comma 0.`;
|
|
731
|
+
},
|
|
732
|
+
srQuadraticOneXIntercept: _ref56 => {
|
|
733
|
+
let {
|
|
734
|
+
intercept
|
|
735
|
+
} = _ref56;
|
|
736
|
+
return `The X-intercept is at ${intercept} comma 0.`;
|
|
737
|
+
},
|
|
738
|
+
srQuadraticYIntercept: _ref57 => {
|
|
739
|
+
let {
|
|
740
|
+
intercept
|
|
741
|
+
} = _ref57;
|
|
742
|
+
return `The Y-intercept is at 0 comma ${intercept}.`;
|
|
743
|
+
},
|
|
744
|
+
srQuadraticPointOrigin: _ref58 => {
|
|
745
|
+
let {
|
|
746
|
+
pointNumber
|
|
747
|
+
} = _ref58;
|
|
748
|
+
return `Point ${pointNumber} on parabola at the origin.`;
|
|
749
|
+
},
|
|
750
|
+
srQuadraticPointAxis: _ref59 => {
|
|
751
|
+
let {
|
|
752
|
+
pointNumber,
|
|
753
|
+
x,
|
|
754
|
+
y
|
|
755
|
+
} = _ref59;
|
|
756
|
+
return `Point ${pointNumber} on parabola at ${x} comma ${y}.`;
|
|
757
|
+
},
|
|
758
|
+
srQuadraticPointQuadrant: _ref60 => {
|
|
759
|
+
let {
|
|
760
|
+
pointNumber,
|
|
761
|
+
x,
|
|
762
|
+
y,
|
|
763
|
+
quadrant
|
|
764
|
+
} = _ref60;
|
|
765
|
+
return `Point ${pointNumber} on parabola in quadrant ${quadrant} at ${x} comma ${y}.`;
|
|
766
|
+
},
|
|
767
|
+
srQuadraticInteractiveElements: _ref61 => {
|
|
768
|
+
let {
|
|
769
|
+
point1X,
|
|
770
|
+
point1Y,
|
|
771
|
+
point2X,
|
|
772
|
+
point2Y,
|
|
773
|
+
point3X,
|
|
774
|
+
point3Y
|
|
775
|
+
} = _ref61;
|
|
776
|
+
return `Parabola with points at ${point1X} comma ${point1Y}, ${point2X} comma ${point2Y}, and ${point3X} comma ${point3Y}.`;
|
|
632
777
|
}
|
|
633
778
|
// The above strings are used for interactive graph SR descriptions.
|
|
634
779
|
};
|