@khanacademy/perseus 57.0.0 → 57.1.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 +100 -129
- package/dist/es/index.js.map +1 -1
- package/dist/es/strings.js +4 -4
- package/dist/es/strings.js.map +1 -1
- package/dist/index.js +101 -130
- package/dist/index.js.map +1 -1
- package/dist/strings.js +4 -4
- package/dist/strings.js.map +1 -1
- package/dist/widgets/interactive-graphs/backgrounds/axis-labels.d.ts +0 -5
- package/dist/widgets/interactive-graphs/graphs/components/sr-description-within-svg.d.ts +19 -0
- package/dist/widgets/interactive-graphs/interactive-graph-question-builder.d.ts +1 -3
- package/dist/widgets/interactive-graphs/mafs-graph.d.ts +0 -1
- package/dist/widgets/interactive-graphs/reducer/use-graph-config.d.ts +1 -2
- package/dist/widgets/interactive-graphs/stateful-mafs-graph.d.ts +0 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -354,8 +354,8 @@ const mockStrings = {
|
|
|
354
354
|
simulationLocaleWarning: "Sorry, this simulation isn't available in your language.",
|
|
355
355
|
selectAnAnswer: "Select an answer",
|
|
356
356
|
// The following strings are used for interactive graph SR descriptions.
|
|
357
|
-
srGraphInstructions: "Use the Tab key to move through the interactive elements in the graph. When an interactive element has focus, use
|
|
358
|
-
srUnlimitedGraphInstructions: "Press Shift + Enter to interact with the graph. Use the Tab key to move through the interactive elements in the graph and access the graph Action Bar. When an interactive element has focus, use
|
|
357
|
+
srGraphInstructions: "Use the Tab key to move through the interactive elements in the graph. When an interactive element has focus, use Control + Shift + Arrows to move it.",
|
|
358
|
+
srUnlimitedGraphInstructions: "Press Shift + Enter to interact with the graph. Use the Tab key to move through the interactive elements in the graph and access the graph Action Bar. When an interactive element has focus, use Control + Shift + Arrows to move it or use the Delete key to remove it from the graph. Use the buttons in the Action Bar to add or adjust elements within the graph.",
|
|
359
359
|
xAxis: "X-axis",
|
|
360
360
|
yAxis: "Y-axis",
|
|
361
361
|
graphKeyboardPrompt: "Press Shift + Enter to interact with the graph",
|
|
@@ -25414,7 +25414,7 @@ class GradedGroupAnswerBar extends React__namespace.Component {
|
|
|
25414
25414
|
}, nextQuestion));
|
|
25415
25415
|
}
|
|
25416
25416
|
}
|
|
25417
|
-
const fontSize
|
|
25417
|
+
const fontSize = 17;
|
|
25418
25418
|
const styles$j = {
|
|
25419
25419
|
answerBar: {
|
|
25420
25420
|
display: "flex",
|
|
@@ -25439,7 +25439,7 @@ const styles$j = {
|
|
|
25439
25439
|
flexDirection: "row",
|
|
25440
25440
|
alignItems: "center",
|
|
25441
25441
|
fontWeight: "bold",
|
|
25442
|
-
fontSize: fontSize
|
|
25442
|
+
fontSize: fontSize
|
|
25443
25443
|
}
|
|
25444
25444
|
};
|
|
25445
25445
|
|
|
@@ -28126,7 +28126,6 @@ const defaultGraphConfig = {
|
|
|
28126
28126
|
width: 0,
|
|
28127
28127
|
height: 0,
|
|
28128
28128
|
labels: [],
|
|
28129
|
-
labelLocation: "onAxis",
|
|
28130
28129
|
disableKeyboardInteraction: false,
|
|
28131
28130
|
interactiveColor: "var(--mafs-blue)"
|
|
28132
28131
|
};
|
|
@@ -28350,8 +28349,6 @@ function escapeIfUnescaped(character) {
|
|
|
28350
28349
|
}
|
|
28351
28350
|
}
|
|
28352
28351
|
|
|
28353
|
-
// Exported for testing purposes
|
|
28354
|
-
const fontSize = 14;
|
|
28355
28352
|
function AxisLabels(_ref) {
|
|
28356
28353
|
let {
|
|
28357
28354
|
i18n
|
|
@@ -28360,26 +28357,24 @@ function AxisLabels(_ref) {
|
|
|
28360
28357
|
range,
|
|
28361
28358
|
labels,
|
|
28362
28359
|
width,
|
|
28363
|
-
height
|
|
28364
|
-
labelLocation
|
|
28360
|
+
height
|
|
28365
28361
|
} = useGraphConfig();
|
|
28366
28362
|
const {
|
|
28367
28363
|
strings
|
|
28368
28364
|
} = i18n;
|
|
28365
|
+
const yAxisLabelLocation = [0, range[Y][MAX]];
|
|
28366
|
+
const xAxisLabelLocation = [range[X][MAX], 0];
|
|
28367
|
+
const [xAxisLabelText, yAxisLabelText] = labels;
|
|
28369
28368
|
const graphInfo = {
|
|
28370
28369
|
range,
|
|
28371
28370
|
width,
|
|
28372
28371
|
height
|
|
28373
28372
|
};
|
|
28374
|
-
|
|
28375
|
-
//
|
|
28376
|
-
|
|
28377
|
-
|
|
28378
|
-
|
|
28379
|
-
// If the labels are rotated, we need to center the
|
|
28380
|
-
// x-axis label along the bottom of the graph.
|
|
28381
|
-
const xLabelTransform = labelLocation === "onAxis" ? "translate(7px, -50%)" : "translate(-50%, -50%)";
|
|
28382
|
-
const yLabelTransform = labelLocation === "onAxis" ? "translate(-50%, 0px)" : "translate(-50%, 0px) rotate(-90deg)";
|
|
28373
|
+
const [x1, y1] = pointToPixel(xAxisLabelLocation, graphInfo);
|
|
28374
|
+
// The default location for the y-axis-label is at the maximum y point
|
|
28375
|
+
// This is just underneath the tick line for that point. The -24 moves the
|
|
28376
|
+
// label up one grid square, so it sits on top of the graph
|
|
28377
|
+
const [x2, y2] = mafs.vec.add(pointToPixel(yAxisLabelLocation, graphInfo), [0, -24]);
|
|
28383
28378
|
const {
|
|
28384
28379
|
TeX
|
|
28385
28380
|
} = getDependencies();
|
|
@@ -28387,53 +28382,22 @@ function AxisLabels(_ref) {
|
|
|
28387
28382
|
"aria-label": strings.xAxis,
|
|
28388
28383
|
style: {
|
|
28389
28384
|
position: "absolute",
|
|
28390
|
-
left:
|
|
28391
|
-
top:
|
|
28392
|
-
fontSize:
|
|
28393
|
-
transform:
|
|
28385
|
+
left: x1,
|
|
28386
|
+
top: y1,
|
|
28387
|
+
fontSize: "14px",
|
|
28388
|
+
transform: "translate(7px, -50%)"
|
|
28394
28389
|
}
|
|
28395
28390
|
}, /*#__PURE__*/React__default["default"].createElement(TeX, null, replaceOutsideTeX(xAxisLabelText))), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
28396
28391
|
"aria-label": strings.yAxis,
|
|
28397
28392
|
style: {
|
|
28398
28393
|
position: "absolute",
|
|
28399
|
-
left:
|
|
28400
|
-
top:
|
|
28401
|
-
fontSize:
|
|
28402
|
-
transform:
|
|
28394
|
+
left: x2,
|
|
28395
|
+
top: y2,
|
|
28396
|
+
fontSize: "14px",
|
|
28397
|
+
transform: "translate(-50%, 0px)"
|
|
28403
28398
|
}
|
|
28404
28399
|
}, /*#__PURE__*/React__default["default"].createElement(TeX, null, replaceOutsideTeX(yAxisLabelText))));
|
|
28405
28400
|
}
|
|
28406
|
-
const getLabelPosition = (graphInfo, labelLocation) => {
|
|
28407
|
-
// If the labels are placed along the edge of the graph, we need to place them at the
|
|
28408
|
-
// center of the graph, which is the average of the min and max values of the axes.
|
|
28409
|
-
if (labelLocation === "alongEdge") {
|
|
28410
|
-
// Offset the labels by a certain amount based on the range of the graph, to ensure that
|
|
28411
|
-
// the labels do not overlap with the axis tick if they are out of the graph bounds.
|
|
28412
|
-
const xAxisLabelOffset = graphInfo.range[Y][MIN] >= 0 ? [0, fontSize * 3] // Move the label down by 3 font sizes if the y-axis min is positive
|
|
28413
|
-
: [0, fontSize]; // Move the label down by 1 font size if the y-axis min is negative
|
|
28414
|
-
const yAxisLabelOffset = graphInfo.range[X][MIN] >= 0 ? [-fontSize * 3, -fontSize] // Move the label left by 3 font sizes if the x-axis min is positive
|
|
28415
|
-
: [-fontSize, -fontSize]; // Move the label left by 1 font size if the x-axis min is negative
|
|
28416
|
-
|
|
28417
|
-
// Calculate the location of the labels to be halfway between the min and max values of the axes
|
|
28418
|
-
const xAxisLabelLocation = [(graphInfo.range[X][MIN] + graphInfo.range[X][MAX]) / 2, graphInfo.range[Y][MIN]];
|
|
28419
|
-
const yAxisLabelLocation = [graphInfo.range[X][MIN], (graphInfo.range[Y][MIN] + graphInfo.range[Y][MAX]) / 2];
|
|
28420
|
-
|
|
28421
|
-
// Convert the Vector2 coordinates to pixel coordinates and add the offsets
|
|
28422
|
-
const xLabel = mafs.vec.add(pointToPixel(xAxisLabelLocation, graphInfo), xAxisLabelOffset);
|
|
28423
|
-
const yLabel = mafs.vec.add(pointToPixel(yAxisLabelLocation, graphInfo), yAxisLabelOffset);
|
|
28424
|
-
return [xLabel, yLabel];
|
|
28425
|
-
}
|
|
28426
|
-
|
|
28427
|
-
// Otherwise, the labels are placed on the axes (default), and we need to
|
|
28428
|
-
// place them at the end of the axis, which is the maximum value of the axis.
|
|
28429
|
-
const xLabelInitial = [graphInfo.range[X][MAX], 0];
|
|
28430
|
-
const yLabelInitial = [0, graphInfo.range[Y][MAX]];
|
|
28431
|
-
const yLabelOffset = [0, -fontSize * 2]; // Move the y-axis label up by 2 font sizes
|
|
28432
|
-
|
|
28433
|
-
const xLabel = pointToPixel(xLabelInitial, graphInfo);
|
|
28434
|
-
const yLabel = mafs.vec.add(pointToPixel(yLabelInitial, graphInfo), yLabelOffset);
|
|
28435
|
-
return [xLabel, yLabel];
|
|
28436
|
-
};
|
|
28437
28401
|
|
|
28438
28402
|
// The size of the ticks and labels in pixels
|
|
28439
28403
|
const tickSize = 10;
|
|
@@ -30666,6 +30630,7 @@ function useDraggable(args) {
|
|
|
30666
30630
|
const {
|
|
30667
30631
|
direction: yDownDirection,
|
|
30668
30632
|
altKey,
|
|
30633
|
+
ctrlKey,
|
|
30669
30634
|
metaKey,
|
|
30670
30635
|
shiftKey
|
|
30671
30636
|
} = state;
|
|
@@ -30675,7 +30640,7 @@ function useDraggable(args) {
|
|
|
30675
30640
|
if (altKey || metaKey) {
|
|
30676
30641
|
divisions = 200;
|
|
30677
30642
|
}
|
|
30678
|
-
if (shiftKey) {
|
|
30643
|
+
if (shiftKey && !ctrlKey) {
|
|
30679
30644
|
divisions = 10;
|
|
30680
30645
|
}
|
|
30681
30646
|
const min = span / (divisions * 2);
|
|
@@ -31209,6 +31174,35 @@ const MovablePoint$1 = /*#__PURE__*/React__namespace.forwardRef((props, pointRef
|
|
|
31209
31174
|
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, focusableHandle, visiblePoint);
|
|
31210
31175
|
});
|
|
31211
31176
|
|
|
31177
|
+
/**
|
|
31178
|
+
* If an element has an `aria-describedby` attribute, it needs to point to
|
|
31179
|
+
* a separate description element that contains the description for that
|
|
31180
|
+
* element.
|
|
31181
|
+
*
|
|
31182
|
+
* If the element is within an SVG, the description element must be a
|
|
31183
|
+
* `<span>` within a `<foreignObject>` in order for some browser/SR
|
|
31184
|
+
* combos to be able to access it.
|
|
31185
|
+
*
|
|
31186
|
+
* Use this SRDescInSVG component to create the <foreignObject>
|
|
31187
|
+
* and styling for this description element.
|
|
31188
|
+
*/
|
|
31189
|
+
function SRDescInSVG(props) {
|
|
31190
|
+
const {
|
|
31191
|
+
id,
|
|
31192
|
+
children
|
|
31193
|
+
} = props;
|
|
31194
|
+
return /*#__PURE__*/React__namespace.createElement("foreignObject", null, /*#__PURE__*/React__namespace.createElement("span", {
|
|
31195
|
+
id: id
|
|
31196
|
+
// Hidden visually
|
|
31197
|
+
,
|
|
31198
|
+
style: a11y.srOnly
|
|
31199
|
+
// Hidden from screen readers so they don't read this
|
|
31200
|
+
// again outside of the element that it describes.
|
|
31201
|
+
,
|
|
31202
|
+
"aria-hidden": true
|
|
31203
|
+
}, children));
|
|
31204
|
+
}
|
|
31205
|
+
|
|
31212
31206
|
const {
|
|
31213
31207
|
calculateAngleInDegrees: calculateAngleInDegrees$1,
|
|
31214
31208
|
getClockwiseAngle: getClockwiseAngle$2,
|
|
@@ -31316,9 +31310,8 @@ function AngleGraph(props) {
|
|
|
31316
31310
|
constrain: getAngleSideConstraint(coords[2], coords[1], snapDegrees || 1),
|
|
31317
31311
|
onMove: destination => dispatch(actions.angle.movePoint(2, destination)),
|
|
31318
31312
|
ariaLabel: srAngleStartingSide
|
|
31319
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
31320
|
-
id: descriptionId
|
|
31321
|
-
style: a11y.srOnly
|
|
31313
|
+
}), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
31314
|
+
id: descriptionId
|
|
31322
31315
|
}, srAngleGraphAriaDescription));
|
|
31323
31316
|
}
|
|
31324
31317
|
function getAngleGraphDescription(state, i18n) {
|
|
@@ -31607,12 +31600,10 @@ function CircleGraph(props) {
|
|
|
31607
31600
|
dispatch(actions.circle.moveRadiusPoint(newRadiusPoint));
|
|
31608
31601
|
},
|
|
31609
31602
|
constrain: getCircleKeyboardConstraint(center, radiusPoint, snapStep)
|
|
31610
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
31611
|
-
id: radiusId
|
|
31612
|
-
|
|
31613
|
-
|
|
31614
|
-
id: outerPointsId,
|
|
31615
|
-
style: a11y.srOnly
|
|
31603
|
+
}), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
31604
|
+
id: radiusId
|
|
31605
|
+
}, srCircleRadius), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
31606
|
+
id: outerPointsId
|
|
31616
31607
|
}, srCircleOuterPoints));
|
|
31617
31608
|
}
|
|
31618
31609
|
function MovableCircle(props) {
|
|
@@ -31859,15 +31850,12 @@ const LinearGraph = (props, key) => {
|
|
|
31859
31850
|
end: true
|
|
31860
31851
|
},
|
|
31861
31852
|
onMovePoint: (endpointIndex, destination) => dispatch(actions.linear.movePoint(endpointIndex, destination))
|
|
31862
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
31863
|
-
id: pointsDescriptionId
|
|
31864
|
-
|
|
31865
|
-
|
|
31866
|
-
|
|
31867
|
-
|
|
31868
|
-
}, interceptString), /*#__PURE__*/React__namespace.createElement("g", {
|
|
31869
|
-
id: slopeDescriptionId,
|
|
31870
|
-
style: a11y.srOnly
|
|
31853
|
+
}), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
31854
|
+
id: pointsDescriptionId
|
|
31855
|
+
}, srLinearGraphPoints), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
31856
|
+
id: interceptDescriptionId
|
|
31857
|
+
}, interceptString), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
31858
|
+
id: slopeDescriptionId
|
|
31871
31859
|
}, slopeString));
|
|
31872
31860
|
};
|
|
31873
31861
|
function getLinearGraphDescription(state, i18n) {
|
|
@@ -32001,7 +31989,7 @@ const LinearSystemGraph = props => {
|
|
|
32001
31989
|
end: true
|
|
32002
31990
|
},
|
|
32003
31991
|
onMovePoint: (endpointIndex, destination) => dispatch(actions.linearSystem.movePointInFigure(i, endpointIndex, destination))
|
|
32004
|
-
})), linesAriaInfo.map(_ref2 => {
|
|
31992
|
+
})), linesAriaInfo.map((_ref2, i) => {
|
|
32005
31993
|
let {
|
|
32006
31994
|
pointsDescriptionId,
|
|
32007
31995
|
interceptDescriptionId,
|
|
@@ -32010,22 +31998,17 @@ const LinearSystemGraph = props => {
|
|
|
32010
31998
|
interceptDescription,
|
|
32011
31999
|
slopeDescription
|
|
32012
32000
|
} = _ref2;
|
|
32013
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
32014
|
-
key:
|
|
32015
|
-
|
|
32016
|
-
|
|
32017
|
-
}, pointsDescription), /*#__PURE__*/React__namespace.createElement(
|
|
32018
|
-
|
|
32019
|
-
|
|
32020
|
-
|
|
32021
|
-
}, interceptDescription), /*#__PURE__*/React__namespace.createElement("g", {
|
|
32022
|
-
key: slopeDescriptionId,
|
|
32023
|
-
id: slopeDescriptionId,
|
|
32024
|
-
style: a11y.srOnly
|
|
32001
|
+
return /*#__PURE__*/React__namespace.createElement("span", {
|
|
32002
|
+
key: `line-descriptions-${i}`
|
|
32003
|
+
}, /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
32004
|
+
id: pointsDescriptionId
|
|
32005
|
+
}, pointsDescription), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
32006
|
+
id: interceptDescriptionId
|
|
32007
|
+
}, interceptDescription), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
32008
|
+
id: slopeDescriptionId
|
|
32025
32009
|
}, slopeDescription));
|
|
32026
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
32027
|
-
id: intersectionId
|
|
32028
|
-
style: a11y.srOnly
|
|
32010
|
+
}), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
32011
|
+
id: intersectionId
|
|
32029
32012
|
}, intersectionDescription));
|
|
32030
32013
|
};
|
|
32031
32014
|
|
|
@@ -33627,23 +33610,21 @@ const LimitedPolygonGraph = statefulProps => {
|
|
|
33627
33610
|
// point is "polite".
|
|
33628
33611
|
setAriaLives(["off", ...newPointAriaLives]);
|
|
33629
33612
|
}
|
|
33630
|
-
}), angleDegree && /*#__PURE__*/React__namespace.createElement(
|
|
33613
|
+
}), angleDegree && /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
33631
33614
|
id: angleId
|
|
33632
33615
|
}, Number.isInteger(angleDegree) ? strings.srPolygonPointAngle({
|
|
33633
33616
|
angle: angleDegree
|
|
33634
33617
|
}) : strings.srPolygonPointAngleApprox({
|
|
33635
33618
|
angle: srFormatNumber(angleDegree, locale, 1)
|
|
33636
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
33619
|
+
})), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
33637
33620
|
id: side1Id
|
|
33638
|
-
}, getPolygonSideString(side1Length, point1Index, strings, locale)), /*#__PURE__*/React__namespace.createElement(
|
|
33621
|
+
}, getPolygonSideString(side1Length, point1Index, strings, locale)), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
33639
33622
|
id: side2Id
|
|
33640
33623
|
}, getPolygonSideString(side2Length, point2Index, strings, locale)));
|
|
33641
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
33642
|
-
id: polygonPointsNumId
|
|
33643
|
-
|
|
33644
|
-
|
|
33645
|
-
id: polygonPointsId,
|
|
33646
|
-
style: a11y.srOnly
|
|
33624
|
+
}), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
33625
|
+
id: polygonPointsNumId
|
|
33626
|
+
}, srPolygonGraphPointsNum), srPolygonGraphPoints && /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
33627
|
+
id: polygonPointsId
|
|
33647
33628
|
}, srPolygonGraphPoints));
|
|
33648
33629
|
};
|
|
33649
33630
|
const UnlimitedPolygonGraph = statefulProps => {
|
|
@@ -33779,7 +33760,7 @@ const UnlimitedPolygonGraph = statefulProps => {
|
|
|
33779
33760
|
}
|
|
33780
33761
|
dispatch(actions.polygon.clickPoint(i));
|
|
33781
33762
|
}
|
|
33782
|
-
}), angleDegree && /*#__PURE__*/React__namespace.createElement(
|
|
33763
|
+
}), angleDegree && /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
33783
33764
|
id: angleId
|
|
33784
33765
|
}, Number.isInteger(angleDegree) ? strings.srPolygonPointAngle({
|
|
33785
33766
|
angle: angleDegree
|
|
@@ -33790,17 +33771,15 @@ const UnlimitedPolygonGraph = statefulProps => {
|
|
|
33790
33771
|
pointIndex,
|
|
33791
33772
|
sideLength
|
|
33792
33773
|
} = _ref2;
|
|
33793
|
-
return /*#__PURE__*/React__namespace.createElement(
|
|
33774
|
+
return /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
33794
33775
|
key: `${id}-point-${i}-side-${j}`,
|
|
33795
33776
|
id: `${id}-point-${i}-side-${j}`
|
|
33796
33777
|
}, getPolygonSideString(sideLength, pointIndex, strings, locale));
|
|
33797
33778
|
}));
|
|
33798
|
-
}), coords.length > 0 && /*#__PURE__*/React__namespace.createElement(
|
|
33799
|
-
id: polygonPointsNumId
|
|
33800
|
-
|
|
33801
|
-
|
|
33802
|
-
id: polygonPointsId,
|
|
33803
|
-
style: a11y.srOnly
|
|
33779
|
+
}), coords.length > 0 && /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
33780
|
+
id: polygonPointsNumId
|
|
33781
|
+
}, srPolygonGraphPointsNum), srPolygonGraphPoints && /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
33782
|
+
id: polygonPointsId
|
|
33804
33783
|
}, srPolygonGraphPoints));
|
|
33805
33784
|
};
|
|
33806
33785
|
function getLines(points) {
|
|
@@ -34054,15 +34033,12 @@ function QuadraticGraph(props) {
|
|
|
34054
34033
|
constrain: getQuadraticKeyboardConstraint(coords, snapStep, i),
|
|
34055
34034
|
onMove: destination => dispatch(actions.quadratic.movePoint(i, destination))
|
|
34056
34035
|
});
|
|
34057
|
-
}), srQuadraticDirection && /*#__PURE__*/React__namespace.createElement(
|
|
34058
|
-
id: quadraticDirectionId
|
|
34059
|
-
|
|
34060
|
-
|
|
34061
|
-
|
|
34062
|
-
|
|
34063
|
-
}, srQuadraticVertex), /*#__PURE__*/React__namespace.createElement("g", {
|
|
34064
|
-
id: quadraticInterceptsId,
|
|
34065
|
-
style: a11y.srOnly
|
|
34036
|
+
}), srQuadraticDirection && /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
34037
|
+
id: quadraticDirectionId
|
|
34038
|
+
}, srQuadraticDirection), srQuadraticVertex && /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
34039
|
+
id: quadraticVertexId
|
|
34040
|
+
}, srQuadraticVertex), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
34041
|
+
id: quadraticInterceptsId
|
|
34066
34042
|
}, srQuadraticXIntercepts ? `${srQuadraticXIntercepts} ${srQuadraticYIntercept}` : `${srQuadraticYIntercept}`));
|
|
34067
34043
|
}
|
|
34068
34044
|
|
|
@@ -34250,9 +34226,8 @@ const RayGraph = props => {
|
|
|
34250
34226
|
start: false,
|
|
34251
34227
|
end: true
|
|
34252
34228
|
}
|
|
34253
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
34254
|
-
id: pointsDescriptionId
|
|
34255
|
-
style: a11y.srOnly
|
|
34229
|
+
}), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
34230
|
+
id: pointsDescriptionId
|
|
34256
34231
|
}, srRayPoints));
|
|
34257
34232
|
};
|
|
34258
34233
|
function getRayGraphDescription(state, i18n) {
|
|
@@ -34392,13 +34367,11 @@ const SegmentGraph = _ref => {
|
|
|
34392
34367
|
point2Y: srFormatNumber(segment[1][Y], locale)
|
|
34393
34368
|
})
|
|
34394
34369
|
}
|
|
34395
|
-
}), /*#__PURE__*/React__namespace.createElement(
|
|
34396
|
-
id: lengthDescriptionId
|
|
34397
|
-
style: a11y.srOnly
|
|
34370
|
+
}), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
34371
|
+
id: lengthDescriptionId
|
|
34398
34372
|
}, strings.srSegmentLength({
|
|
34399
34373
|
length: srFormatNumber(getLengthOfSegment(segment), locale)
|
|
34400
|
-
})))), /*#__PURE__*/React__namespace.createElement(
|
|
34401
|
-
style: a11y.srOnly,
|
|
34374
|
+
})))), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
34402
34375
|
id: wholeGraphDescriptionId
|
|
34403
34376
|
}, getWholeSegmentGraphAriaDescription()));
|
|
34404
34377
|
};
|
|
@@ -34500,7 +34473,7 @@ function SinusoidGraph(props) {
|
|
|
34500
34473
|
sequenceNumber: i + 1,
|
|
34501
34474
|
constrain: getSinusoidKeyboardConstraint(coords, snapStep, i),
|
|
34502
34475
|
onMove: destination => dispatch(actions.sinusoid.movePoint(i, destination))
|
|
34503
|
-
})), /*#__PURE__*/React__namespace.createElement(
|
|
34476
|
+
})), /*#__PURE__*/React__namespace.createElement(SRDescInSVG, {
|
|
34504
34477
|
id: descriptionId
|
|
34505
34478
|
}, srSinusoidDescription));
|
|
34506
34479
|
}
|
|
@@ -34774,7 +34747,6 @@ const MafsGraph = props => {
|
|
|
34774
34747
|
state,
|
|
34775
34748
|
dispatch,
|
|
34776
34749
|
labels,
|
|
34777
|
-
labelLocation,
|
|
34778
34750
|
readOnly,
|
|
34779
34751
|
fullGraphAriaLabel,
|
|
34780
34752
|
fullGraphAriaDescription
|
|
@@ -34855,7 +34827,6 @@ const MafsGraph = props => {
|
|
|
34855
34827
|
width,
|
|
34856
34828
|
height,
|
|
34857
34829
|
labels,
|
|
34858
|
-
labelLocation,
|
|
34859
34830
|
disableKeyboardInteraction: disableInteraction,
|
|
34860
34831
|
// If the graph is read-only or static, we want to make it
|
|
34861
34832
|
// visually clear that the graph is no longer interactive.
|
|
@@ -41983,7 +41954,7 @@ const addLibraryVersionToPerseusDebug = (libraryName, libraryVersion) => {
|
|
|
41983
41954
|
|
|
41984
41955
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
41985
41956
|
const libName = "@khanacademy/perseus";
|
|
41986
|
-
const libVersion = "57.
|
|
41957
|
+
const libVersion = "57.1.0";
|
|
41987
41958
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
41988
41959
|
|
|
41989
41960
|
const apiVersion = {
|