@khanacademy/perseus-core 41.0.0 → 41.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/data-schema.d.ts +21 -12
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/data-schema.d.ts
CHANGED
|
@@ -1456,6 +1456,7 @@ export type PerseusNumericInputAnswer = {
|
|
|
1456
1456
|
/** How unsimplified responses should be handled. */
|
|
1457
1457
|
simplify: PerseusNumericInputSimplify;
|
|
1458
1458
|
};
|
|
1459
|
+
export type PerseusNumberLineLabelStyle = "decimal" | "improper" | "mixed" | "non-reduced";
|
|
1459
1460
|
/** Options for the number-line widget. A draggable point on a number line. */
|
|
1460
1461
|
export type PerseusNumberLineWidgetOptions = {
|
|
1461
1462
|
/**
|
|
@@ -1473,18 +1474,28 @@ export type PerseusNumberLineWidgetOptions = {
|
|
|
1473
1474
|
* This controls the styling of the labels for the two main labels as well
|
|
1474
1475
|
* as all the tick mark labels, if applicable.
|
|
1475
1476
|
*/
|
|
1476
|
-
labelStyle:
|
|
1477
|
+
labelStyle: PerseusNumberLineLabelStyle;
|
|
1477
1478
|
/** Show label ticks */
|
|
1478
1479
|
labelTicks: boolean;
|
|
1479
|
-
/**
|
|
1480
|
+
/**
|
|
1481
|
+
* Whether the learner should be able to set the number of divisions.
|
|
1482
|
+
*/
|
|
1480
1483
|
isTickCtrl: boolean;
|
|
1481
1484
|
isInequality: boolean;
|
|
1482
|
-
/**
|
|
1485
|
+
/**
|
|
1486
|
+
* The range of possible values for numDivisions, in the format [min, max].
|
|
1487
|
+
*/
|
|
1483
1488
|
divisionRange: number[];
|
|
1484
1489
|
/**
|
|
1485
|
-
*
|
|
1486
|
-
*
|
|
1487
|
-
*
|
|
1490
|
+
* The number of divisions of the number line. Divisions are the spaces
|
|
1491
|
+
* between tick marks.
|
|
1492
|
+
*
|
|
1493
|
+
* When `isTickCtrl` is true, the learner can change the number of
|
|
1494
|
+
* divisions, constrained by `divisionRange`. In that case, `numDivisions`
|
|
1495
|
+
* specifies the initial value.
|
|
1496
|
+
*
|
|
1497
|
+
* Exactly one of tickStep and numDivisions must be set; the missing value
|
|
1498
|
+
* will be calculated from the other.
|
|
1488
1499
|
*/
|
|
1489
1500
|
numDivisions?: number | null;
|
|
1490
1501
|
/**
|
|
@@ -1494,12 +1505,10 @@ export type PerseusNumberLineWidgetOptions = {
|
|
|
1494
1505
|
*/
|
|
1495
1506
|
snapDivisions: number;
|
|
1496
1507
|
/**
|
|
1497
|
-
*
|
|
1498
|
-
*
|
|
1499
|
-
*
|
|
1500
|
-
*
|
|
1501
|
-
* see if labels coordinate with the tick marks, which may be confusing for
|
|
1502
|
-
* users if the blue labels and black ticks are off-step.
|
|
1508
|
+
* The distance between tick marks on the number line.
|
|
1509
|
+
*
|
|
1510
|
+
* Exactly one of tickStep and numDivisions must be set; the missing value
|
|
1511
|
+
* will be calculated from the other.
|
|
1503
1512
|
*/
|
|
1504
1513
|
tickStep?: number | null;
|
|
1505
1514
|
/**
|
package/dist/index.js
CHANGED
|
@@ -232,7 +232,7 @@ const parseUserInputMap=(rawValue,ctx)=>{if(!isPlainObject(rawValue)){return ctx
|
|
|
232
232
|
|
|
233
233
|
function parseAndMigratePerseusItem(data){const object=typeof data==="string"?JSON.parse(data):data;const result=parse(object,parsePerseusItem);if(isFailure(result)){return failure({message:result.detail,invalidObject:object})}return result}function parseAndMigratePerseusArticle(data){const object=typeof data==="string"?JSON.parse(data):data;const result=parse(object,parsePerseusArticle);if(isFailure(result)){return failure({message:result.detail,invalidObject:object})}return result}function parseAndMigrateUserInputMap(data){const object=typeof data==="string"?JSON.parse(data):data;const result=parse(object,parseUserInputMap);if(isFailure(result)){return failure({message:result.detail,invalidObject:object})}return result}function parseAndMigratePerseusRenderer(data){const object=typeof data==="string"?JSON.parse(data):data;const result=parse(object,parsePerseusRenderer);if(isFailure(result)){return failure({message:result.detail,invalidObject:object})}return result}
|
|
234
234
|
|
|
235
|
-
const libName="@khanacademy/perseus-core";const libVersion="41.
|
|
235
|
+
const libName="@khanacademy/perseus-core";const libVersion="41.1.0";addLibraryVersionToPerseusDebug(libName,libVersion);
|
|
236
236
|
|
|
237
237
|
const Errors=Object.freeze({Unknown:"Unknown",Internal:"Internal",InvalidInput:"InvalidInput",NotAllowed:"NotAllowed",TransientService:"TransientService",Service:"Service"});
|
|
238
238
|
|