@khanacademy/perseus-core 19.3.0 → 19.4.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.
Files changed (86) hide show
  1. package/dist/data-schema.d.ts +1 -0
  2. package/dist/es/index.item-splitting.js +1 -1
  3. package/dist/es/index.item-splitting.js.map +1 -1
  4. package/dist/es/index.js +2 -2
  5. package/dist/es/index.js.map +1 -1
  6. package/dist/index.item-splitting.js +1 -1
  7. package/dist/index.item-splitting.js.map +1 -1
  8. package/dist/index.js +2 -2
  9. package/dist/index.js.map +1 -1
  10. package/dist/parse-perseus-json/perseus-parsers/image-widget.d.ts +1 -0
  11. package/dist/parse-perseus-json/regression-tests/article-data/image-with-id-0.d.ts +201 -0
  12. package/dist/parse-perseus-json/regression-tests/item-data/categorizer-missing-randomizeItems.d.ts +36 -0
  13. package/dist/parse-perseus-json/regression-tests/item-data/categorizer-missing-static.d.ts +37 -0
  14. package/dist/parse-perseus-json/regression-tests/item-data/categorizer-with-null-value.d.ts +44 -0
  15. package/dist/parse-perseus-json/regression-tests/item-data/cs-program-missing-static.d.ts +71 -0
  16. package/dist/parse-perseus-json/regression-tests/item-data/cs-program-with-null-width.d.ts +21 -0
  17. package/dist/parse-perseus-json/regression-tests/item-data/definition-missing-static.d.ts +55 -0
  18. package/dist/parse-perseus-json/regression-tests/item-data/dropdown-missing-placeholder.d.ts +38 -0
  19. package/dist/parse-perseus-json/regression-tests/item-data/dropdown-missing-version.d.ts +34 -0
  20. package/dist/parse-perseus-json/regression-tests/item-data/explanation-missing-widgets-map.d.ts +69 -0
  21. package/dist/parse-perseus-json/regression-tests/item-data/expression-answerForm-missing-form.d.ts +41 -0
  22. package/dist/parse-perseus-json/regression-tests/item-data/expression-missing-buttonSets.d.ts +35 -0
  23. package/dist/parse-perseus-json/regression-tests/item-data/expression-option-missing-value.d.ts +44 -0
  24. package/dist/parse-perseus-json/regression-tests/item-data/expression-with-null-answer-key.d.ts +124 -0
  25. package/dist/parse-perseus-json/regression-tests/item-data/expression-with-scientific-notation.d.ts +115 -0
  26. package/dist/parse-perseus-json/regression-tests/item-data/graded-group-with-false-hint.d.ts +133 -0
  27. package/dist/parse-perseus-json/regression-tests/item-data/grapher-with-empty-coords.d.ts +111 -0
  28. package/dist/parse-perseus-json/regression-tests/item-data/grapher-with-null-coords.d.ts +59 -0
  29. package/dist/parse-perseus-json/regression-tests/item-data/hint-missing-images.d.ts +175 -0
  30. package/dist/parse-perseus-json/regression-tests/item-data/hint-with-null-replace.d.ts +72 -0
  31. package/dist/parse-perseus-json/regression-tests/item-data/iframe-missing-allowFullScreen.d.ts +63 -0
  32. package/dist/parse-perseus-json/regression-tests/item-data/iframe-missing-settings.d.ts +18 -0
  33. package/dist/parse-perseus-json/regression-tests/item-data/iframe-missing-static.d.ts +46 -0
  34. package/dist/parse-perseus-json/regression-tests/item-data/image-with-null-dimensions.d.ts +181 -0
  35. package/dist/parse-perseus-json/regression-tests/item-data/input-number-with-boolean-value.d.ts +84 -0
  36. package/dist/parse-perseus-json/regression-tests/item-data/interaction-element-missing-constraints.d.ts +115 -0
  37. package/dist/parse-perseus-json/regression-tests/item-data/interaction-element-missing-key.d.ts +353 -0
  38. package/dist/parse-perseus-json/regression-tests/item-data/interactive-graph-backgroundImage-with-empty-string-coordinates.d.ts +77 -0
  39. package/dist/parse-perseus-json/regression-tests/item-data/interactive-graph-locked-figures-missing-weights.d.ts +213 -0
  40. package/dist/parse-perseus-json/regression-tests/item-data/interactive-graph-locked-function-with-null-domain-element.d.ts +62 -0
  41. package/dist/parse-perseus-json/regression-tests/item-data/interactive-graph-locked-line-missing-showPoint1.d.ts +294 -0
  42. package/dist/parse-perseus-json/regression-tests/item-data/interactive-graph-missing-graph.d.ts +167 -0
  43. package/dist/parse-perseus-json/regression-tests/item-data/interactive-graph-missing-gridStep.d.ts +121 -0
  44. package/dist/parse-perseus-json/regression-tests/item-data/interactive-graph-missing-labels.d.ts +49 -0
  45. package/dist/parse-perseus-json/regression-tests/item-data/interactive-graph-polygon-with-exact-match.d.ts +96 -0
  46. package/dist/parse-perseus-json/regression-tests/item-data/interactive-graph-with-string-backgroundImage-left.d.ts +86 -0
  47. package/dist/parse-perseus-json/regression-tests/item-data/item-with-null-itemDataVersion.d.ts +100 -0
  48. package/dist/parse-perseus-json/regression-tests/item-data/label-image-missing-static.d.ts +110 -0
  49. package/dist/parse-perseus-json/regression-tests/item-data/lights-puzzle.d.ts +27 -0
  50. package/dist/parse-perseus-json/regression-tests/item-data/matcher-with-null-options.d.ts +14 -0
  51. package/dist/parse-perseus-json/regression-tests/item-data/matrix-missing-version.d.ts +24 -0
  52. package/dist/parse-perseus-json/regression-tests/item-data/matrix-with-nulls-in-answer.d.ts +39 -0
  53. package/dist/parse-perseus-json/regression-tests/item-data/matrix-with-string-answer-element.d.ts +69 -0
  54. package/dist/parse-perseus-json/regression-tests/item-data/measurer-missing-image.d.ts +49 -0
  55. package/dist/parse-perseus-json/regression-tests/item-data/measurer-missing-static.d.ts +41 -0
  56. package/dist/parse-perseus-json/regression-tests/item-data/number-line-missing-snapDivisions.d.ts +133 -0
  57. package/dist/parse-perseus-json/regression-tests/item-data/number-line-missing-static.d.ts +46 -0
  58. package/dist/parse-perseus-json/regression-tests/item-data/number-line-with-empty-strings-in-label-range.d.ts +92 -0
  59. package/dist/parse-perseus-json/regression-tests/item-data/number-line-with-null-correctX.d.ts +68 -0
  60. package/dist/parse-perseus-json/regression-tests/item-data/numeric-input-answer-with-null-value.d.ts +44 -0
  61. package/dist/parse-perseus-json/regression-tests/item-data/numeric-input-answer-with-simplify-true.d.ts +40 -0
  62. package/dist/parse-perseus-json/regression-tests/item-data/numeric-input-answer-without-value.d.ts +89 -0
  63. package/dist/parse-perseus-json/regression-tests/item-data/numeric-input-missing-coefficient.d.ts +43 -0
  64. package/dist/parse-perseus-json/regression-tests/item-data/numeric-input-missing-labelText.d.ts +210 -0
  65. package/dist/parse-perseus-json/regression-tests/item-data/numeric-input-with-null-answerForms.d.ts +228 -0
  66. package/dist/parse-perseus-json/regression-tests/item-data/numeric-input-with-simplify-accepted.d.ts +108 -0
  67. package/dist/parse-perseus-json/regression-tests/item-data/numeric-input-with-simplify-false.d.ts +52 -0
  68. package/dist/parse-perseus-json/regression-tests/item-data/numeric-input-with-simplify-true-string.d.ts +75 -0
  69. package/dist/parse-perseus-json/regression-tests/item-data/orderer-option-missing-images.d.ts +539 -0
  70. package/dist/parse-perseus-json/regression-tests/item-data/orderer-option-missing-widgets.d.ts +80 -0
  71. package/dist/parse-perseus-json/regression-tests/item-data/orderer-with-invalid-height.d.ts +33 -0
  72. package/dist/parse-perseus-json/regression-tests/item-data/orderer-with-undefined-options.d.ts +135 -0
  73. package/dist/parse-perseus-json/regression-tests/item-data/passage-missing-footnotes-and-title.d.ts +47 -0
  74. package/dist/parse-perseus-json/regression-tests/item-data/passage-ref-missing-summaryText.d.ts +147 -0
  75. package/dist/parse-perseus-json/regression-tests/item-data/plotter-missing-scaleY-and-snapsPerLine.d.ts +64 -0
  76. package/dist/parse-perseus-json/regression-tests/item-data/plotter-with-undefined-plotDimensions.d.ts +76 -0
  77. package/dist/parse-perseus-json/regression-tests/item-data/question-missing-content.d.ts +8 -0
  78. package/dist/parse-perseus-json/regression-tests/item-data/radio-choice-ids-set-to-empty-string.d.ts +49 -0
  79. package/dist/parse-perseus-json/regression-tests/item-data/radio-choice-missing-content.d.ts +147 -0
  80. package/dist/parse-perseus-json/regression-tests/item-data/radio-missing-noneOfTheAbove.d.ts +43 -0
  81. package/dist/parse-perseus-json/regression-tests/item-data/radio-with-extra-fields-from-go-schema.d.ts +169 -0
  82. package/dist/parse-perseus-json/regression-tests/item-data/radio-with-null-options.d.ts +78 -0
  83. package/dist/parse-perseus-json/regression-tests/item-data/radio-with-null-widgets.d.ts +115 -0
  84. package/dist/parse-perseus-json/regression-tests/item-data/simulator-widget.d.ts +51 -0
  85. package/dist/parse-perseus-json/regression-tests/item-data/transformer-widget.d.ts +99 -0
  86. package/package.json +1 -1
@@ -0,0 +1,43 @@
1
+ declare const _default: {
2
+ question: {
3
+ content: string;
4
+ images: {};
5
+ widgets: {
6
+ "radio 1": {
7
+ type: string;
8
+ alignment: string;
9
+ static: boolean;
10
+ graded: boolean;
11
+ options: {
12
+ choices: {
13
+ content: string;
14
+ correct: boolean;
15
+ }[];
16
+ randomize: boolean;
17
+ multipleSelect: boolean;
18
+ countChoices: boolean;
19
+ displayCount: null;
20
+ hasNoneOfTheAbove: boolean;
21
+ deselectEnabled: boolean;
22
+ };
23
+ version: {
24
+ major: number;
25
+ minor: number;
26
+ };
27
+ };
28
+ };
29
+ };
30
+ answerArea: {
31
+ calculator: boolean;
32
+ chi2Table: boolean;
33
+ periodicTable: boolean;
34
+ tTable: boolean;
35
+ zTable: boolean;
36
+ };
37
+ itemDataVersion: {
38
+ major: number;
39
+ minor: number;
40
+ };
41
+ hints: never[];
42
+ };
43
+ export default _default;
@@ -0,0 +1,169 @@
1
+ declare const _default: {
2
+ question: {
3
+ content: string;
4
+ widgets: {
5
+ "definition 1": {
6
+ type: string;
7
+ static: boolean;
8
+ graded: boolean;
9
+ alignment: string;
10
+ id: null;
11
+ key: null;
12
+ version: {
13
+ major: number;
14
+ minor: number;
15
+ };
16
+ options: {
17
+ togglePrompt: string;
18
+ definition: string;
19
+ static: boolean;
20
+ };
21
+ };
22
+ "definition 2": {
23
+ type: string;
24
+ static: boolean;
25
+ graded: boolean;
26
+ alignment: string;
27
+ id: null;
28
+ key: null;
29
+ version: {
30
+ major: number;
31
+ minor: number;
32
+ };
33
+ options: {
34
+ togglePrompt: string;
35
+ definition: string;
36
+ static: boolean;
37
+ };
38
+ };
39
+ "definition 3": {
40
+ type: string;
41
+ static: boolean;
42
+ graded: boolean;
43
+ alignment: string;
44
+ id: null;
45
+ key: null;
46
+ version: {
47
+ major: number;
48
+ minor: number;
49
+ };
50
+ options: {
51
+ togglePrompt: string;
52
+ definition: string;
53
+ static: boolean;
54
+ };
55
+ };
56
+ "explanation 1": {
57
+ type: string;
58
+ static: boolean;
59
+ graded: boolean;
60
+ alignment: string;
61
+ id: null;
62
+ key: null;
63
+ version: {
64
+ major: number;
65
+ minor: number;
66
+ };
67
+ options: {
68
+ showPrompt: string;
69
+ hidePrompt: string;
70
+ explanation: string;
71
+ widgets: {};
72
+ static: boolean;
73
+ };
74
+ };
75
+ "image 1": {
76
+ type: string;
77
+ static: boolean;
78
+ graded: boolean;
79
+ alignment: string;
80
+ id: null;
81
+ key: null;
82
+ version: {
83
+ major: number;
84
+ minor: number;
85
+ };
86
+ options: {
87
+ title: string;
88
+ labels: never[];
89
+ caption: string;
90
+ alt: string;
91
+ backgroundImage: {
92
+ url: string;
93
+ width: number;
94
+ height: number;
95
+ top: number;
96
+ scale: null;
97
+ bottom: null;
98
+ left: null;
99
+ };
100
+ static: boolean;
101
+ range: number[][];
102
+ box: number[];
103
+ };
104
+ };
105
+ "radio 1": {
106
+ type: string;
107
+ static: boolean;
108
+ graded: boolean;
109
+ alignment: string;
110
+ id: null;
111
+ key: null;
112
+ version: {
113
+ major: number;
114
+ minor: number;
115
+ };
116
+ options: {
117
+ choices: {
118
+ content: string;
119
+ rationale: string;
120
+ correct: boolean;
121
+ isNoneOfTheAbove: boolean;
122
+ id: string;
123
+ widgets: null;
124
+ clue: string;
125
+ }[];
126
+ numCorrect: number;
127
+ hasNoneOfTheAbove: boolean;
128
+ countChoices: boolean;
129
+ deselectEnabled: boolean;
130
+ randomize: boolean;
131
+ multipleSelect: boolean;
132
+ displayCount: null;
133
+ noneOfTheAbove: null;
134
+ onePerLine: null;
135
+ };
136
+ };
137
+ };
138
+ replace: null;
139
+ metadata: null;
140
+ images: {};
141
+ };
142
+ hints: never[];
143
+ answerArea: {
144
+ type: string;
145
+ static: boolean;
146
+ graded: boolean;
147
+ alignment: string;
148
+ id: null;
149
+ key: null;
150
+ version: null;
151
+ zTable: boolean;
152
+ chi2Table: boolean;
153
+ tTable: boolean;
154
+ calculator: boolean;
155
+ periodicTable: boolean;
156
+ periodicTableWithKey: boolean;
157
+ financialCalculatorMonthlyPayment: boolean;
158
+ financialCalculatorTotalAmount: boolean;
159
+ financialCalculatorTimeToPayOff: boolean;
160
+ options: null;
161
+ };
162
+ _multi: null;
163
+ itemDataVersion: {
164
+ major: number;
165
+ minor: number;
166
+ };
167
+ answer: null;
168
+ };
169
+ export default _default;
@@ -0,0 +1,78 @@
1
+ declare const _default: {
2
+ question: {
3
+ content: string;
4
+ widgets: {
5
+ "radio 1": {
6
+ type: string;
7
+ static: boolean;
8
+ graded: boolean;
9
+ alignment: string;
10
+ id: null;
11
+ key: null;
12
+ version: {
13
+ major: number;
14
+ minor: number;
15
+ };
16
+ options: null;
17
+ };
18
+ };
19
+ replace: null;
20
+ metadata: null;
21
+ images: {};
22
+ };
23
+ answerArea: {
24
+ type: string;
25
+ static: boolean;
26
+ graded: boolean;
27
+ alignment: string;
28
+ id: null;
29
+ key: null;
30
+ version: null;
31
+ zTable: boolean;
32
+ chi2Table: boolean;
33
+ tTable: boolean;
34
+ calculator: boolean;
35
+ periodicTable: boolean;
36
+ periodicTableWithKey: boolean;
37
+ financialCalculatorMonthlyPayment: boolean;
38
+ financialCalculatorTotalAmount: boolean;
39
+ financialCalculatorTimeToPayOff: boolean;
40
+ options: null;
41
+ };
42
+ hints: ({
43
+ content: string;
44
+ widgets: {
45
+ "explanation 1": {
46
+ type: string;
47
+ static: boolean;
48
+ graded: boolean;
49
+ alignment: string;
50
+ id: null;
51
+ key: null;
52
+ version: {
53
+ major: number;
54
+ minor: number;
55
+ };
56
+ options: {
57
+ showPrompt: string;
58
+ hidePrompt: string;
59
+ explanation: string;
60
+ widgets: {};
61
+ static: boolean;
62
+ };
63
+ };
64
+ };
65
+ replace: boolean;
66
+ metadata: null;
67
+ images: {};
68
+ } | {
69
+ content: string;
70
+ widgets: {
71
+ "explanation 1"?: undefined;
72
+ };
73
+ replace: boolean;
74
+ metadata: null;
75
+ images: {};
76
+ })[];
77
+ };
78
+ export default _default;
@@ -0,0 +1,115 @@
1
+ declare const _default: {
2
+ question: {
3
+ content: string;
4
+ widgets: {
5
+ "explanation 1": {
6
+ type: string;
7
+ static: boolean;
8
+ graded: boolean;
9
+ alignment: string;
10
+ id: null;
11
+ key: null;
12
+ version: {
13
+ major: number;
14
+ minor: number;
15
+ };
16
+ options: {
17
+ showPrompt: string;
18
+ hidePrompt: string;
19
+ explanation: string;
20
+ widgets: {};
21
+ static: boolean;
22
+ };
23
+ };
24
+ "image 1": {
25
+ type: string;
26
+ static: boolean;
27
+ graded: boolean;
28
+ alignment: string;
29
+ id: null;
30
+ key: null;
31
+ version: {
32
+ major: number;
33
+ minor: number;
34
+ };
35
+ options: {
36
+ title: string;
37
+ labels: never[];
38
+ caption: string;
39
+ alt: string;
40
+ backgroundImage: {
41
+ url: string;
42
+ width: number;
43
+ height: number;
44
+ top: number;
45
+ scale: null;
46
+ bottom: null;
47
+ left: null;
48
+ };
49
+ static: boolean;
50
+ range: number[][];
51
+ box: number[];
52
+ };
53
+ };
54
+ "radio 1": {
55
+ type: string;
56
+ static: boolean;
57
+ graded: boolean;
58
+ alignment: string;
59
+ id: null;
60
+ key: null;
61
+ version: {
62
+ major: number;
63
+ minor: number;
64
+ };
65
+ options: {
66
+ choices: {
67
+ content: string;
68
+ clue: string;
69
+ correct: boolean;
70
+ isNoneOfTheAbove: boolean;
71
+ widgets: null;
72
+ }[];
73
+ noneOfTheAbove: boolean;
74
+ hasNoneOfTheAbove: boolean;
75
+ countChoices: boolean;
76
+ deselectEnabled: boolean;
77
+ randomize: boolean;
78
+ multipleSelect: boolean;
79
+ onePerLine: boolean;
80
+ displayCount: null;
81
+ };
82
+ };
83
+ };
84
+ replace: null;
85
+ metadata: null;
86
+ images: {};
87
+ };
88
+ hints: never[];
89
+ answerArea: {
90
+ type: string;
91
+ static: boolean;
92
+ graded: boolean;
93
+ alignment: string;
94
+ id: null;
95
+ key: null;
96
+ version: null;
97
+ zTable: boolean;
98
+ chi2Table: boolean;
99
+ tTable: boolean;
100
+ calculator: boolean;
101
+ periodicTable: boolean;
102
+ periodicTableWithKey: boolean;
103
+ financialCalculatorMonthlyPayment: boolean;
104
+ financialCalculatorTotalAmount: boolean;
105
+ financialCalculatorTimeToPayOff: boolean;
106
+ options: null;
107
+ };
108
+ _multi: null;
109
+ itemDataVersion: {
110
+ major: number;
111
+ minor: number;
112
+ };
113
+ answer: null;
114
+ };
115
+ export default _default;
@@ -0,0 +1,51 @@
1
+ declare const _default: {
2
+ answerArea: {
3
+ calculator: boolean;
4
+ options: {
5
+ content: string;
6
+ images: {};
7
+ widgets: {};
8
+ };
9
+ type: string;
10
+ };
11
+ hints: never[];
12
+ itemDataVersion: {
13
+ major: number;
14
+ minor: number;
15
+ };
16
+ question: {
17
+ content: string;
18
+ images: {};
19
+ widgets: {
20
+ "simulator 1": {
21
+ graded: boolean;
22
+ options: {
23
+ numTrials: number;
24
+ proportionLabel: string;
25
+ proportionOrPercentage: string;
26
+ xAxisLabel: string;
27
+ yAxisLabel: string;
28
+ };
29
+ type: string;
30
+ version: {
31
+ major: number;
32
+ minor: number;
33
+ };
34
+ };
35
+ "sorter 1": {
36
+ graded: boolean;
37
+ options: {
38
+ correct: string[];
39
+ layout: string;
40
+ padding: boolean;
41
+ };
42
+ type: string;
43
+ version: {
44
+ major: number;
45
+ minor: number;
46
+ };
47
+ };
48
+ };
49
+ };
50
+ };
51
+ export default _default;
@@ -0,0 +1,99 @@
1
+ declare const _default: {
2
+ answerArea: {
3
+ calculator: boolean;
4
+ options: {
5
+ content: string;
6
+ images: {};
7
+ widgets: {};
8
+ };
9
+ type: string;
10
+ };
11
+ hints: never[];
12
+ itemDataVersion: {
13
+ major: number;
14
+ minor: number;
15
+ };
16
+ question: {
17
+ content: string;
18
+ images: {};
19
+ widgets: {
20
+ "transformer 1": {
21
+ graded: boolean;
22
+ options: {
23
+ correct: {
24
+ shape: {
25
+ coords: number[][];
26
+ options: {}[];
27
+ type: string[];
28
+ };
29
+ transformations: never[];
30
+ };
31
+ drawSolutionShape: boolean;
32
+ gradeEmpty: boolean;
33
+ graph: {
34
+ backgroundImage: {
35
+ url: null;
36
+ };
37
+ gridStep: number[];
38
+ labels: string[];
39
+ markings: string;
40
+ range: number[][];
41
+ rulerLabel: string;
42
+ rulerTicks: number;
43
+ showProtractor: boolean;
44
+ showRuler: boolean;
45
+ snapStep: number[];
46
+ step: number[];
47
+ };
48
+ graphMode: string;
49
+ listMode: string;
50
+ starting: {
51
+ shape: {
52
+ coords: number[][];
53
+ type: string;
54
+ };
55
+ transformations: never[];
56
+ };
57
+ tools: {
58
+ dilation: {
59
+ constraints: {
60
+ fixed: boolean;
61
+ };
62
+ coord: number[];
63
+ enabled: boolean;
64
+ required: boolean;
65
+ };
66
+ reflection: {
67
+ constraints: {
68
+ fixed: boolean;
69
+ };
70
+ coords: number[][];
71
+ enabled: boolean;
72
+ required: boolean;
73
+ };
74
+ rotation: {
75
+ constraints: {
76
+ fixed: boolean;
77
+ };
78
+ coord: number[];
79
+ enabled: boolean;
80
+ required: boolean;
81
+ };
82
+ translation: {
83
+ constraints: {};
84
+ enabled: boolean;
85
+ required: boolean;
86
+ };
87
+ };
88
+ version: number;
89
+ };
90
+ type: string;
91
+ version: {
92
+ major: number;
93
+ minor: number;
94
+ };
95
+ };
96
+ };
97
+ };
98
+ };
99
+ 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": "19.3.0",
6
+ "version": "19.4.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },