@khanacademy/perseus-core 27.1.0 → 27.3.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 +1 -3
- package/dist/es/index.item-splitting.js +3 -3
- package/dist/es/index.item-splitting.js.map +1 -1
- package/dist/es/index.js +4 -4
- package/dist/es/index.js.map +1 -1
- package/dist/index.item-splitting.js +3 -3
- package/dist/index.item-splitting.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/parse-perseus-json/perseus-parsers/interactive-graph-user-input.d.ts +0 -1
- package/dist/parse-perseus-json/perseus-parsers/interactive-graph-widget.d.ts +17 -20
- package/dist/parse-perseus-json/regression-tests/item-data/interactive-graph-locked-figure-colors.d.ts +65 -0
- package/package.json +7 -7
|
@@ -100,5 +100,4 @@ export declare const parseInteractiveGraphUserInput: import("../parser-types").P
|
|
|
100
100
|
coords: [[number, number], [number, number]] | null | undefined;
|
|
101
101
|
startCoords: [[number, number], [number, number]] | undefined;
|
|
102
102
|
match: "congruent" | "exact" | undefined;
|
|
103
|
-
pointLabels: [string, string] | undefined;
|
|
104
103
|
}>>;
|
|
@@ -100,7 +100,6 @@ export declare const parsePerseusGraphType: import("../parser-types").Parser<imp
|
|
|
100
100
|
coords: [[number, number], [number, number]] | null | undefined;
|
|
101
101
|
startCoords: [[number, number], [number, number]] | undefined;
|
|
102
102
|
match: "congruent" | "exact" | undefined;
|
|
103
|
-
pointLabels: [string, string] | undefined;
|
|
104
103
|
}>>;
|
|
105
104
|
export declare const parseLockedFunctionDomain: import("../parser-types").Parser<[number, number]>;
|
|
106
105
|
export declare const parseInteractiveGraphWidget: import("../parser-types").Parser<import("../..").WidgetOptions<"interactive-graph", import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
@@ -237,7 +236,6 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
237
236
|
coords: [[number, number], [number, number]] | null | undefined;
|
|
238
237
|
startCoords: [[number, number], [number, number]] | undefined;
|
|
239
238
|
match: "congruent" | "exact" | undefined;
|
|
240
|
-
pointLabels: [string, string] | undefined;
|
|
241
239
|
}>;
|
|
242
240
|
correct: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
243
241
|
type: "angle";
|
|
@@ -341,24 +339,23 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
341
339
|
coords: [[number, number], [number, number]] | null | undefined;
|
|
342
340
|
startCoords: [[number, number], [number, number]] | undefined;
|
|
343
341
|
match: "congruent" | "exact" | undefined;
|
|
344
|
-
pointLabels: [string, string] | undefined;
|
|
345
342
|
}>;
|
|
346
343
|
lockedFigures: (import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
347
344
|
type: "label";
|
|
348
345
|
coord: [number, number];
|
|
349
346
|
text: string;
|
|
350
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
347
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
351
348
|
size: "small" | "medium" | "large";
|
|
352
349
|
}> | import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
353
350
|
type: "point";
|
|
354
351
|
coord: [number, number];
|
|
355
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
352
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
356
353
|
filled: boolean;
|
|
357
354
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
358
355
|
type: "label";
|
|
359
356
|
coord: [number, number];
|
|
360
357
|
text: string;
|
|
361
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
358
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
362
359
|
size: "small" | "medium" | "large";
|
|
363
360
|
}>[];
|
|
364
361
|
ariaLabel: string | undefined;
|
|
@@ -368,31 +365,31 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
368
365
|
points: [import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
369
366
|
type: "point";
|
|
370
367
|
coord: [number, number];
|
|
371
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
368
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
372
369
|
filled: boolean;
|
|
373
370
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
374
371
|
type: "label";
|
|
375
372
|
coord: [number, number];
|
|
376
373
|
text: string;
|
|
377
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
374
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
378
375
|
size: "small" | "medium" | "large";
|
|
379
376
|
}>[];
|
|
380
377
|
ariaLabel: string | undefined;
|
|
381
378
|
}>, import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
382
379
|
type: "point";
|
|
383
380
|
coord: [number, number];
|
|
384
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
381
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
385
382
|
filled: boolean;
|
|
386
383
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
387
384
|
type: "label";
|
|
388
385
|
coord: [number, number];
|
|
389
386
|
text: string;
|
|
390
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
387
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
391
388
|
size: "small" | "medium" | "large";
|
|
392
389
|
}>[];
|
|
393
390
|
ariaLabel: string | undefined;
|
|
394
391
|
}>];
|
|
395
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
392
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
396
393
|
lineStyle: "solid" | "dashed";
|
|
397
394
|
showPoint1: boolean;
|
|
398
395
|
showPoint2: boolean;
|
|
@@ -401,20 +398,20 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
401
398
|
type: "label";
|
|
402
399
|
coord: [number, number];
|
|
403
400
|
text: string;
|
|
404
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
401
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
405
402
|
size: "small" | "medium" | "large";
|
|
406
403
|
}>[];
|
|
407
404
|
ariaLabel: string | undefined;
|
|
408
405
|
}> | import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
409
406
|
type: "vector";
|
|
410
407
|
points: [[number, number], [number, number]];
|
|
411
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
408
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
412
409
|
weight: "thin" | "medium" | "thick";
|
|
413
410
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
414
411
|
type: "label";
|
|
415
412
|
coord: [number, number];
|
|
416
413
|
text: string;
|
|
417
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
414
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
418
415
|
size: "small" | "medium" | "large";
|
|
419
416
|
}>[];
|
|
420
417
|
ariaLabel: string | undefined;
|
|
@@ -423,7 +420,7 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
423
420
|
center: [number, number];
|
|
424
421
|
radius: [number, number];
|
|
425
422
|
angle: number;
|
|
426
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
423
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
427
424
|
fillStyle: "none" | "solid" | "white" | "translucent";
|
|
428
425
|
strokeStyle: "solid" | "dashed";
|
|
429
426
|
weight: "thin" | "medium" | "thick";
|
|
@@ -431,14 +428,14 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
431
428
|
type: "label";
|
|
432
429
|
coord: [number, number];
|
|
433
430
|
text: string;
|
|
434
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
431
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
435
432
|
size: "small" | "medium" | "large";
|
|
436
433
|
}>[];
|
|
437
434
|
ariaLabel: string | undefined;
|
|
438
435
|
}> | import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
439
436
|
type: "polygon";
|
|
440
437
|
points: [number, number][];
|
|
441
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
438
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
442
439
|
showVertices: boolean;
|
|
443
440
|
fillStyle: "none" | "solid" | "white" | "translucent";
|
|
444
441
|
strokeStyle: "solid" | "dashed";
|
|
@@ -447,13 +444,13 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
447
444
|
type: "label";
|
|
448
445
|
coord: [number, number];
|
|
449
446
|
text: string;
|
|
450
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
447
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
451
448
|
size: "small" | "medium" | "large";
|
|
452
449
|
}>[];
|
|
453
450
|
ariaLabel: string | undefined;
|
|
454
451
|
}> | import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
455
452
|
type: "function";
|
|
456
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
453
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
457
454
|
strokeStyle: "solid" | "dashed";
|
|
458
455
|
weight: "thin" | "medium" | "thick";
|
|
459
456
|
equation: string;
|
|
@@ -463,7 +460,7 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
463
460
|
type: "label";
|
|
464
461
|
coord: [number, number];
|
|
465
462
|
text: string;
|
|
466
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
463
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
467
464
|
size: "small" | "medium" | "large";
|
|
468
465
|
}>[];
|
|
469
466
|
ariaLabel: string | undefined;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
question: {
|
|
3
|
+
content: string;
|
|
4
|
+
images: {};
|
|
5
|
+
widgets: {
|
|
6
|
+
"interactive-graph 1": {
|
|
7
|
+
type: string;
|
|
8
|
+
alignment: string;
|
|
9
|
+
static: boolean;
|
|
10
|
+
graded: boolean;
|
|
11
|
+
options: {
|
|
12
|
+
step: number[];
|
|
13
|
+
backgroundImage: {
|
|
14
|
+
url: null;
|
|
15
|
+
};
|
|
16
|
+
markings: string;
|
|
17
|
+
labels: string[];
|
|
18
|
+
labelLocation: string;
|
|
19
|
+
showProtractor: boolean;
|
|
20
|
+
showTooltips: boolean;
|
|
21
|
+
range: number[][];
|
|
22
|
+
showAxisArrows: {
|
|
23
|
+
xMin: boolean;
|
|
24
|
+
xMax: boolean;
|
|
25
|
+
yMin: boolean;
|
|
26
|
+
yMax: boolean;
|
|
27
|
+
};
|
|
28
|
+
showAxisTicks: {
|
|
29
|
+
x: boolean;
|
|
30
|
+
y: boolean;
|
|
31
|
+
};
|
|
32
|
+
gridStep: number[];
|
|
33
|
+
snapStep: number[];
|
|
34
|
+
lockedFigures: {
|
|
35
|
+
type: string;
|
|
36
|
+
coord: number[];
|
|
37
|
+
color: string;
|
|
38
|
+
filled: boolean;
|
|
39
|
+
labels: never[];
|
|
40
|
+
}[];
|
|
41
|
+
graph: {
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
correct: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
version: {
|
|
49
|
+
major: number;
|
|
50
|
+
minor: number;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
answerArea: {
|
|
56
|
+
calculator: boolean;
|
|
57
|
+
financialCalculatorMonthlyPayment: boolean;
|
|
58
|
+
financialCalculatorTotalAmount: boolean;
|
|
59
|
+
financialCalculatorTimeToPayOff: boolean;
|
|
60
|
+
periodicTable: boolean;
|
|
61
|
+
periodicTableWithKey: boolean;
|
|
62
|
+
};
|
|
63
|
+
hints: never[];
|
|
64
|
+
};
|
|
65
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Shared Perseus infrastructure",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "27.
|
|
6
|
+
"version": "27.3.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -20,16 +20,16 @@
|
|
|
20
20
|
"source": "src/index.ts",
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
23
|
-
"import": "./dist/es/index.js",
|
|
24
|
-
"require": "./dist/index.js",
|
|
25
23
|
"types": "./dist/index.d.ts",
|
|
26
|
-
"source": "./src/index.ts"
|
|
24
|
+
"source": "./src/index.ts",
|
|
25
|
+
"import": "./dist/es/index.js",
|
|
26
|
+
"require": "./dist/index.js"
|
|
27
27
|
},
|
|
28
28
|
"./item-splitting": {
|
|
29
|
-
"import": "./dist/es/index.item-splitting.js",
|
|
30
|
-
"require": "./dist/index.item-splitting.js",
|
|
31
29
|
"types": "./dist/index.item-splitting.d.ts",
|
|
32
|
-
"source": "./src/index.item-splitting.ts"
|
|
30
|
+
"source": "./src/index.item-splitting.ts",
|
|
31
|
+
"import": "./dist/es/index.item-splitting.js",
|
|
32
|
+
"require": "./dist/index.item-splitting.js"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"files": [
|