@khanacademy/perseus-core 27.2.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 -1
- 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-widget.d.ts +17 -17
- package/dist/parse-perseus-json/regression-tests/item-data/interactive-graph-locked-figure-colors.d.ts +65 -0
- package/package.json +7 -7
|
@@ -344,18 +344,18 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
344
344
|
type: "label";
|
|
345
345
|
coord: [number, number];
|
|
346
346
|
text: string;
|
|
347
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
347
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
348
348
|
size: "small" | "medium" | "large";
|
|
349
349
|
}> | import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
350
350
|
type: "point";
|
|
351
351
|
coord: [number, number];
|
|
352
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
352
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
353
353
|
filled: boolean;
|
|
354
354
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
355
355
|
type: "label";
|
|
356
356
|
coord: [number, number];
|
|
357
357
|
text: string;
|
|
358
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
358
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
359
359
|
size: "small" | "medium" | "large";
|
|
360
360
|
}>[];
|
|
361
361
|
ariaLabel: string | undefined;
|
|
@@ -365,31 +365,31 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
365
365
|
points: [import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
366
366
|
type: "point";
|
|
367
367
|
coord: [number, number];
|
|
368
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
368
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
369
369
|
filled: boolean;
|
|
370
370
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
371
371
|
type: "label";
|
|
372
372
|
coord: [number, number];
|
|
373
373
|
text: string;
|
|
374
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
374
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
375
375
|
size: "small" | "medium" | "large";
|
|
376
376
|
}>[];
|
|
377
377
|
ariaLabel: string | undefined;
|
|
378
378
|
}>, import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
379
379
|
type: "point";
|
|
380
380
|
coord: [number, number];
|
|
381
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
381
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
382
382
|
filled: boolean;
|
|
383
383
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
384
384
|
type: "label";
|
|
385
385
|
coord: [number, number];
|
|
386
386
|
text: string;
|
|
387
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
387
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
388
388
|
size: "small" | "medium" | "large";
|
|
389
389
|
}>[];
|
|
390
390
|
ariaLabel: string | undefined;
|
|
391
391
|
}>];
|
|
392
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
392
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
393
393
|
lineStyle: "solid" | "dashed";
|
|
394
394
|
showPoint1: boolean;
|
|
395
395
|
showPoint2: boolean;
|
|
@@ -398,20 +398,20 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
398
398
|
type: "label";
|
|
399
399
|
coord: [number, number];
|
|
400
400
|
text: string;
|
|
401
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
401
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
402
402
|
size: "small" | "medium" | "large";
|
|
403
403
|
}>[];
|
|
404
404
|
ariaLabel: string | undefined;
|
|
405
405
|
}> | import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
406
406
|
type: "vector";
|
|
407
407
|
points: [[number, number], [number, number]];
|
|
408
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
408
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
409
409
|
weight: "thin" | "medium" | "thick";
|
|
410
410
|
labels: import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
411
411
|
type: "label";
|
|
412
412
|
coord: [number, number];
|
|
413
413
|
text: string;
|
|
414
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
414
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
415
415
|
size: "small" | "medium" | "large";
|
|
416
416
|
}>[];
|
|
417
417
|
ariaLabel: string | undefined;
|
|
@@ -420,7 +420,7 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
420
420
|
center: [number, number];
|
|
421
421
|
radius: [number, number];
|
|
422
422
|
angle: number;
|
|
423
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
423
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
424
424
|
fillStyle: "none" | "solid" | "white" | "translucent";
|
|
425
425
|
strokeStyle: "solid" | "dashed";
|
|
426
426
|
weight: "thin" | "medium" | "thick";
|
|
@@ -428,14 +428,14 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
428
428
|
type: "label";
|
|
429
429
|
coord: [number, number];
|
|
430
430
|
text: string;
|
|
431
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
431
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
432
432
|
size: "small" | "medium" | "large";
|
|
433
433
|
}>[];
|
|
434
434
|
ariaLabel: string | undefined;
|
|
435
435
|
}> | import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
436
436
|
type: "polygon";
|
|
437
437
|
points: [number, number][];
|
|
438
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
438
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
439
439
|
showVertices: boolean;
|
|
440
440
|
fillStyle: "none" | "solid" | "white" | "translucent";
|
|
441
441
|
strokeStyle: "solid" | "dashed";
|
|
@@ -444,13 +444,13 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
444
444
|
type: "label";
|
|
445
445
|
coord: [number, number];
|
|
446
446
|
text: string;
|
|
447
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
447
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
448
448
|
size: "small" | "medium" | "large";
|
|
449
449
|
}>[];
|
|
450
450
|
ariaLabel: string | undefined;
|
|
451
451
|
}> | import("../general-purpose-parsers/object-types").OptionalizeProperties<{
|
|
452
452
|
type: "function";
|
|
453
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
453
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
454
454
|
strokeStyle: "solid" | "dashed";
|
|
455
455
|
weight: "thin" | "medium" | "thick";
|
|
456
456
|
equation: string;
|
|
@@ -460,7 +460,7 @@ export declare const parseInteractiveGraphWidget: import("../parser-types").Pars
|
|
|
460
460
|
type: "label";
|
|
461
461
|
coord: [number, number];
|
|
462
462
|
text: string;
|
|
463
|
-
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red"
|
|
463
|
+
color: "blue" | "gold" | "green" | "grayH" | "purple" | "pink" | "red";
|
|
464
464
|
size: "small" | "medium" | "large";
|
|
465
465
|
}>[];
|
|
466
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": [
|