@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,228 @@
1
+ declare const _default: {
2
+ question: {
3
+ content: string;
4
+ widgets: {
5
+ "image 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
+ title: string;
18
+ labels: never[];
19
+ caption: string;
20
+ alt: string;
21
+ backgroundImage: {
22
+ url: string;
23
+ width: number;
24
+ height: number;
25
+ top: number;
26
+ scale: null;
27
+ bottom: null;
28
+ left: null;
29
+ };
30
+ static: boolean;
31
+ range: number[][];
32
+ box: number[];
33
+ };
34
+ };
35
+ "numeric-input 1": {
36
+ type: string;
37
+ static: boolean;
38
+ graded: boolean;
39
+ alignment: string;
40
+ id: null;
41
+ key: null;
42
+ version: {
43
+ major: number;
44
+ minor: number;
45
+ };
46
+ options: {
47
+ answers: {
48
+ message: string;
49
+ value: number;
50
+ status: string;
51
+ strict: boolean;
52
+ simplify: string;
53
+ maxError: null;
54
+ answerForms: null;
55
+ }[];
56
+ labelText: string;
57
+ static: boolean;
58
+ size: string;
59
+ coefficient: boolean;
60
+ multipleNumberInput: boolean;
61
+ rightAlign: boolean;
62
+ };
63
+ };
64
+ "numeric-input 2": {
65
+ type: string;
66
+ static: boolean;
67
+ graded: boolean;
68
+ alignment: string;
69
+ id: null;
70
+ key: null;
71
+ version: {
72
+ major: number;
73
+ minor: number;
74
+ };
75
+ options: {
76
+ answers: {
77
+ message: string;
78
+ value: number;
79
+ status: string;
80
+ strict: boolean;
81
+ simplify: string;
82
+ maxError: null;
83
+ answerForms: null;
84
+ }[];
85
+ labelText: string;
86
+ static: boolean;
87
+ size: string;
88
+ coefficient: boolean;
89
+ multipleNumberInput: boolean;
90
+ rightAlign: boolean;
91
+ };
92
+ };
93
+ "numeric-input 3": {
94
+ type: string;
95
+ static: boolean;
96
+ graded: boolean;
97
+ alignment: string;
98
+ id: null;
99
+ key: null;
100
+ version: {
101
+ major: number;
102
+ minor: number;
103
+ };
104
+ options: {
105
+ answers: {
106
+ message: string;
107
+ value: number;
108
+ status: string;
109
+ strict: boolean;
110
+ simplify: string;
111
+ maxError: null;
112
+ answerForms: null;
113
+ }[];
114
+ labelText: string;
115
+ static: boolean;
116
+ size: string;
117
+ coefficient: boolean;
118
+ multipleNumberInput: boolean;
119
+ rightAlign: boolean;
120
+ };
121
+ };
122
+ "radio 1": {
123
+ type: string;
124
+ static: boolean;
125
+ graded: boolean;
126
+ alignment: string;
127
+ id: null;
128
+ key: null;
129
+ version: {
130
+ major: number;
131
+ minor: number;
132
+ };
133
+ options: {
134
+ choices: {
135
+ content: string;
136
+ clue: string;
137
+ correct: boolean;
138
+ isNoneOfTheAbove: boolean;
139
+ widgets: {};
140
+ }[];
141
+ noneOfTheAbove: boolean;
142
+ hasNoneOfTheAbove: boolean;
143
+ countChoices: boolean;
144
+ deselectEnabled: boolean;
145
+ randomize: boolean;
146
+ multipleSelect: boolean;
147
+ onePerLine: boolean;
148
+ displayCount: null;
149
+ };
150
+ };
151
+ };
152
+ replace: null;
153
+ metadata: null;
154
+ images: {};
155
+ };
156
+ hints: ({
157
+ content: string;
158
+ widgets: {
159
+ "image 1"?: undefined;
160
+ };
161
+ replace: boolean;
162
+ metadata: null;
163
+ images: {};
164
+ } | {
165
+ content: string;
166
+ widgets: {
167
+ "image 1": {
168
+ type: string;
169
+ static: boolean;
170
+ graded: boolean;
171
+ alignment: string;
172
+ id: null;
173
+ key: null;
174
+ version: {
175
+ major: number;
176
+ minor: number;
177
+ };
178
+ options: {
179
+ title: string;
180
+ labels: never[];
181
+ caption: string;
182
+ alt: string;
183
+ backgroundImage: {
184
+ url: string;
185
+ width: number;
186
+ height: number;
187
+ top: number;
188
+ scale: null;
189
+ bottom: null;
190
+ left: null;
191
+ };
192
+ static: boolean;
193
+ range: number[][];
194
+ box: number[];
195
+ };
196
+ };
197
+ };
198
+ replace: boolean;
199
+ metadata: null;
200
+ images: {};
201
+ })[];
202
+ answerArea: {
203
+ type: string;
204
+ static: boolean;
205
+ graded: boolean;
206
+ alignment: string;
207
+ id: null;
208
+ key: null;
209
+ version: null;
210
+ zTable: boolean;
211
+ chi2Table: boolean;
212
+ tTable: boolean;
213
+ calculator: boolean;
214
+ periodicTable: boolean;
215
+ periodicTableWithKey: boolean;
216
+ financialCalculatorMonthlyPayment: boolean;
217
+ financialCalculatorTotalAmount: boolean;
218
+ financialCalculatorTimeToPayOff: boolean;
219
+ options: null;
220
+ };
221
+ _multi: null;
222
+ itemDataVersion: {
223
+ major: number;
224
+ minor: number;
225
+ };
226
+ answer: null;
227
+ };
228
+ export default _default;
@@ -0,0 +1,108 @@
1
+ declare const _default: {
2
+ answerArea: {
3
+ calculator: boolean;
4
+ chi2Table: boolean;
5
+ periodicTable: boolean;
6
+ tTable: boolean;
7
+ zTable: boolean;
8
+ };
9
+ hints: ({
10
+ content: string;
11
+ images: {};
12
+ replace: boolean;
13
+ widgets: {
14
+ "image 1"?: undefined;
15
+ };
16
+ } | {
17
+ content: string;
18
+ images: {};
19
+ replace: boolean;
20
+ widgets: {
21
+ "image 1": {
22
+ alignment: string;
23
+ graded: boolean;
24
+ options: {
25
+ alt: string;
26
+ backgroundImage: {
27
+ height: number;
28
+ url: string;
29
+ width: number;
30
+ };
31
+ box: number[];
32
+ caption: string;
33
+ labels: never[];
34
+ range: number[][];
35
+ static: boolean;
36
+ title: string;
37
+ };
38
+ static: boolean;
39
+ type: string;
40
+ version: {
41
+ major: number;
42
+ minor: number;
43
+ };
44
+ };
45
+ };
46
+ })[];
47
+ itemDataVersion: {
48
+ major: number;
49
+ minor: number;
50
+ };
51
+ question: {
52
+ content: string;
53
+ images: {};
54
+ widgets: {
55
+ "image 1": {
56
+ alignment: string;
57
+ graded: boolean;
58
+ options: {
59
+ alt: string;
60
+ backgroundImage: {
61
+ height: number;
62
+ url: string;
63
+ width: number;
64
+ };
65
+ box: number[];
66
+ caption: string;
67
+ labels: never[];
68
+ range: number[][];
69
+ static: boolean;
70
+ title: string;
71
+ };
72
+ static: boolean;
73
+ type: string;
74
+ version: {
75
+ major: number;
76
+ minor: number;
77
+ };
78
+ };
79
+ "numeric-input 1": {
80
+ alignment: string;
81
+ graded: boolean;
82
+ options: {
83
+ answers: {
84
+ maxError: number;
85
+ message: string;
86
+ simplify: string;
87
+ status: string;
88
+ strict: boolean;
89
+ value: number;
90
+ }[];
91
+ coefficient: boolean;
92
+ labelText: string;
93
+ multipleNumberInput: boolean;
94
+ rightAlign: boolean;
95
+ size: string;
96
+ static: boolean;
97
+ };
98
+ static: boolean;
99
+ type: string;
100
+ version: {
101
+ major: number;
102
+ minor: number;
103
+ };
104
+ };
105
+ };
106
+ };
107
+ };
108
+ export default _default;
@@ -0,0 +1,52 @@
1
+ declare const _default: {
2
+ question: {
3
+ content: string;
4
+ images: {
5
+ "web+graphie://ka-perseus-graphie.s3.amazonaws.com/b886f0f83c43c5f13fb41bed1e6c067500ec31d9": {
6
+ width: number;
7
+ height: number;
8
+ };
9
+ };
10
+ widgets: {
11
+ "numeric-input 1": {
12
+ type: string;
13
+ alignment: string;
14
+ static: boolean;
15
+ graded: boolean;
16
+ options: {
17
+ static: boolean;
18
+ answers: {
19
+ maxError: number;
20
+ status: string;
21
+ strict: boolean;
22
+ value: number;
23
+ simplify: boolean;
24
+ message: string;
25
+ }[];
26
+ size: string;
27
+ coefficient: boolean;
28
+ labelText: string;
29
+ multipleNumberInput: boolean;
30
+ rightAlign: boolean;
31
+ };
32
+ version: {
33
+ major: number;
34
+ minor: number;
35
+ };
36
+ };
37
+ };
38
+ };
39
+ answerArea: {
40
+ calculator: boolean;
41
+ chi2Table: boolean;
42
+ periodicTable: boolean;
43
+ tTable: boolean;
44
+ zTable: boolean;
45
+ };
46
+ itemDataVersion: {
47
+ major: number;
48
+ minor: number;
49
+ };
50
+ hints: never[];
51
+ };
52
+ export default _default;
@@ -0,0 +1,75 @@
1
+ declare const _default: {
2
+ question: {
3
+ content: string;
4
+ images: {};
5
+ widgets: {
6
+ "numeric-input 1": {
7
+ type: string;
8
+ alignment: string;
9
+ static: boolean;
10
+ graded: boolean;
11
+ options: {
12
+ static: boolean;
13
+ answers: {
14
+ maxError: number;
15
+ status: string;
16
+ strict: boolean;
17
+ value: number;
18
+ simplify: string;
19
+ message: string;
20
+ }[];
21
+ size: string;
22
+ coefficient: boolean;
23
+ labelText: string;
24
+ };
25
+ version: {
26
+ major: number;
27
+ minor: number;
28
+ };
29
+ };
30
+ };
31
+ };
32
+ answerArea: {
33
+ zTable: boolean;
34
+ calculator: boolean;
35
+ chi2Table: boolean;
36
+ financialCalculatorMonthlyPayment: boolean;
37
+ financialCalculatorTotalAmount: boolean;
38
+ financialCalculatorTimeToPayOff: boolean;
39
+ periodicTable: boolean;
40
+ periodicTableWithKey: boolean;
41
+ tTable: boolean;
42
+ };
43
+ hints: ({
44
+ replace: boolean;
45
+ content: string;
46
+ images: {
47
+ "web+graphie://ka-perseus-graphie.s3.amazonaws.com/ca9d3feac6a8385bbb89193669b96559b861d979"?: undefined;
48
+ "web+graphie://ka-perseus-graphie.s3.amazonaws.com/36c5150b272beb2433a9c77b262bbc89c5a03f83"?: undefined;
49
+ };
50
+ widgets: {};
51
+ } | {
52
+ replace: boolean;
53
+ content: string;
54
+ images: {
55
+ "web+graphie://ka-perseus-graphie.s3.amazonaws.com/ca9d3feac6a8385bbb89193669b96559b861d979": {
56
+ width: number;
57
+ height: number;
58
+ };
59
+ "web+graphie://ka-perseus-graphie.s3.amazonaws.com/36c5150b272beb2433a9c77b262bbc89c5a03f83"?: undefined;
60
+ };
61
+ widgets: {};
62
+ } | {
63
+ replace: boolean;
64
+ content: string;
65
+ images: {
66
+ "web+graphie://ka-perseus-graphie.s3.amazonaws.com/36c5150b272beb2433a9c77b262bbc89c5a03f83": {
67
+ width: number;
68
+ height: number;
69
+ };
70
+ "web+graphie://ka-perseus-graphie.s3.amazonaws.com/ca9d3feac6a8385bbb89193669b96559b861d979"?: undefined;
71
+ };
72
+ widgets: {};
73
+ })[];
74
+ };
75
+ export default _default;