@khanacademy/perseus 19.2.0 → 19.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/es/index.js +25 -23
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +20 -23
- package/dist/index.js.map +1 -1
- package/dist/perseus-api.d.ts +3 -1
- package/dist/server-item-renderer.d.ts +3 -1
- package/dist/types.d.ts +3 -1
- package/dist/widgets/expression.d.ts +18 -6
- package/dist/widgets/label-image.d.ts +16 -2
- package/package.json +2 -2
package/dist/perseus-api.d.ts
CHANGED
|
@@ -70,7 +70,9 @@ export declare const ApiOptions: {
|
|
|
70
70
|
readOnly?: boolean | undefined;
|
|
71
71
|
answerableCallback?: ((arg1: boolean) => unknown) | undefined;
|
|
72
72
|
getAnotherHint?: (() => unknown) | undefined;
|
|
73
|
-
interactionCallback?: ((
|
|
73
|
+
interactionCallback?: ((widgetData: {
|
|
74
|
+
[widgetId: string]: any;
|
|
75
|
+
}) => void) | undefined;
|
|
74
76
|
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
75
77
|
imagePlaceholder?: React.ReactNode;
|
|
76
78
|
widgetPlaceholder?: React.ReactNode;
|
|
@@ -112,7 +112,9 @@ declare const ref: React.ForwardRefExoticComponent<Omit<Pick<OwnProps & HOCProps
|
|
|
112
112
|
readOnly?: boolean | undefined;
|
|
113
113
|
answerableCallback?: ((arg1: boolean) => unknown) | undefined;
|
|
114
114
|
getAnotherHint?: (() => unknown) | undefined;
|
|
115
|
-
interactionCallback?: ((
|
|
115
|
+
interactionCallback?: ((widgetData: {
|
|
116
|
+
[widgetId: string]: any;
|
|
117
|
+
}) => void) | undefined;
|
|
116
118
|
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
117
119
|
imagePlaceholder?: React.ReactNode;
|
|
118
120
|
widgetPlaceholder?: React.ReactNode;
|
package/dist/types.d.ts
CHANGED
|
@@ -84,7 +84,9 @@ export type APIOptions = Readonly<{
|
|
|
84
84
|
readOnly?: boolean;
|
|
85
85
|
answerableCallback?: (arg1: boolean) => unknown;
|
|
86
86
|
getAnotherHint?: () => unknown;
|
|
87
|
-
interactionCallback?: (
|
|
87
|
+
interactionCallback?: (widgetData: {
|
|
88
|
+
[widgetId: string]: any;
|
|
89
|
+
}) => void;
|
|
88
90
|
groupAnnotator?: (groupNumber: number, widgetId: string) => React.ReactNode;
|
|
89
91
|
imagePlaceholder?: React.ReactNode;
|
|
90
92
|
widgetPlaceholder?: React.ReactNode;
|
|
@@ -98,7 +98,9 @@ declare const _default: Readonly<{
|
|
|
98
98
|
readOnly?: boolean | undefined;
|
|
99
99
|
answerableCallback?: ((arg1: boolean) => unknown) | undefined;
|
|
100
100
|
getAnotherHint?: (() => unknown) | undefined;
|
|
101
|
-
interactionCallback?: ((
|
|
101
|
+
interactionCallback?: ((widgetData: {
|
|
102
|
+
[widgetId: string]: any;
|
|
103
|
+
}) => void) | undefined;
|
|
102
104
|
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
103
105
|
imagePlaceholder?: React.ReactNode;
|
|
104
106
|
widgetPlaceholder?: React.ReactNode;
|
|
@@ -162,7 +164,9 @@ declare const _default: Readonly<{
|
|
|
162
164
|
readOnly?: boolean | undefined;
|
|
163
165
|
answerableCallback?: ((arg1: boolean) => unknown) | undefined;
|
|
164
166
|
getAnotherHint?: (() => unknown) | undefined;
|
|
165
|
-
interactionCallback?: ((
|
|
167
|
+
interactionCallback?: ((widgetData: {
|
|
168
|
+
[widgetId: string]: any;
|
|
169
|
+
}) => void) | undefined;
|
|
166
170
|
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
167
171
|
imagePlaceholder?: React.ReactNode;
|
|
168
172
|
widgetPlaceholder?: React.ReactNode;
|
|
@@ -226,7 +230,9 @@ declare const _default: Readonly<{
|
|
|
226
230
|
readOnly?: boolean | undefined;
|
|
227
231
|
answerableCallback?: ((arg1: boolean) => unknown) | undefined;
|
|
228
232
|
getAnotherHint?: (() => unknown) | undefined;
|
|
229
|
-
interactionCallback?: ((
|
|
233
|
+
interactionCallback?: ((widgetData: {
|
|
234
|
+
[widgetId: string]: any;
|
|
235
|
+
}) => void) | undefined;
|
|
230
236
|
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
231
237
|
imagePlaceholder?: React.ReactNode;
|
|
232
238
|
widgetPlaceholder?: React.ReactNode;
|
|
@@ -287,7 +293,9 @@ declare const _default: Readonly<{
|
|
|
287
293
|
readOnly?: boolean | undefined;
|
|
288
294
|
answerableCallback?: ((arg1: boolean) => unknown) | undefined;
|
|
289
295
|
getAnotherHint?: (() => unknown) | undefined;
|
|
290
|
-
interactionCallback?: ((
|
|
296
|
+
interactionCallback?: ((widgetData: {
|
|
297
|
+
[widgetId: string]: any;
|
|
298
|
+
}) => void) | undefined;
|
|
291
299
|
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
292
300
|
imagePlaceholder?: React.ReactNode;
|
|
293
301
|
widgetPlaceholder?: React.ReactNode;
|
|
@@ -351,7 +359,9 @@ declare const _default: Readonly<{
|
|
|
351
359
|
readOnly?: boolean | undefined;
|
|
352
360
|
answerableCallback?: ((arg1: boolean) => unknown) | undefined;
|
|
353
361
|
getAnotherHint?: (() => unknown) | undefined;
|
|
354
|
-
interactionCallback?: ((
|
|
362
|
+
interactionCallback?: ((widgetData: {
|
|
363
|
+
[widgetId: string]: any;
|
|
364
|
+
}) => void) | undefined;
|
|
355
365
|
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
356
366
|
imagePlaceholder?: React.ReactNode;
|
|
357
367
|
widgetPlaceholder?: React.ReactNode;
|
|
@@ -415,7 +425,9 @@ declare const _default: Readonly<{
|
|
|
415
425
|
readOnly?: boolean | undefined;
|
|
416
426
|
answerableCallback?: ((arg1: boolean) => unknown) | undefined;
|
|
417
427
|
getAnotherHint?: (() => unknown) | undefined;
|
|
418
|
-
interactionCallback?: ((
|
|
428
|
+
interactionCallback?: ((widgetData: {
|
|
429
|
+
[widgetId: string]: any;
|
|
430
|
+
}) => void) | undefined;
|
|
419
431
|
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
420
432
|
imagePlaceholder?: React.ReactNode;
|
|
421
433
|
widgetPlaceholder?: React.ReactNode;
|
|
@@ -97,11 +97,18 @@ declare const _default: Readonly<{
|
|
|
97
97
|
readOnly?: boolean | undefined;
|
|
98
98
|
answerableCallback?: ((arg1: boolean) => unknown) | undefined;
|
|
99
99
|
getAnotherHint?: (() => unknown) | undefined;
|
|
100
|
-
interactionCallback?: ((
|
|
100
|
+
interactionCallback?: ((widgetData: {
|
|
101
|
+
[widgetId: string]: any;
|
|
102
|
+
}) => void) | undefined;
|
|
101
103
|
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
102
104
|
imagePlaceholder?: React.ReactNode;
|
|
103
105
|
widgetPlaceholder?: React.ReactNode;
|
|
104
106
|
baseElements?: {
|
|
107
|
+
/**
|
|
108
|
+
* Test whether point is contained within triangle.
|
|
109
|
+
*
|
|
110
|
+
* Implementation taken from: https://stackoverflow.com/a/2049593
|
|
111
|
+
*/
|
|
105
112
|
Link: React.ComponentType<any>;
|
|
106
113
|
} | undefined;
|
|
107
114
|
imagePreloader?: ((dimensions: import("../types").Dimensions) => React.ReactNode) | undefined;
|
|
@@ -143,11 +150,18 @@ declare const _default: Readonly<{
|
|
|
143
150
|
readOnly?: boolean | undefined;
|
|
144
151
|
answerableCallback?: ((arg1: boolean) => unknown) | undefined;
|
|
145
152
|
getAnotherHint?: (() => unknown) | undefined;
|
|
146
|
-
interactionCallback?: ((
|
|
153
|
+
interactionCallback?: ((widgetData: {
|
|
154
|
+
[widgetId: string]: any;
|
|
155
|
+
}) => void) | undefined;
|
|
147
156
|
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
148
157
|
imagePlaceholder?: React.ReactNode;
|
|
149
158
|
widgetPlaceholder?: React.ReactNode;
|
|
150
159
|
baseElements?: {
|
|
160
|
+
/**
|
|
161
|
+
* Test whether point is contained within triangle.
|
|
162
|
+
*
|
|
163
|
+
* Implementation taken from: https://stackoverflow.com/a/2049593
|
|
164
|
+
*/
|
|
151
165
|
Link: React.ComponentType<any>;
|
|
152
166
|
} | undefined;
|
|
153
167
|
imagePreloader?: ((dimensions: import("../types").Dimensions) => React.ReactNode) | undefined;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Core Perseus API (includes renderers and widgets)",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "19.
|
|
6
|
+
"version": "19.3.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@khanacademy/kas": "^0.3.8",
|
|
29
29
|
"@khanacademy/kmath": "^0.1.12",
|
|
30
|
-
"@khanacademy/math-input": "^17.0
|
|
30
|
+
"@khanacademy/math-input": "^17.1.0",
|
|
31
31
|
"@khanacademy/perseus-core": "1.4.2",
|
|
32
32
|
"@khanacademy/perseus-linter": "^0.3.12",
|
|
33
33
|
"@khanacademy/pure-markdown": "^0.2.15",
|