@khanacademy/perseus 43.1.0 → 45.0.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/all-widgets.d.ts +2 -23
- package/dist/basic-widgets.d.ts +2 -23
- package/dist/components/graph.d.ts +1 -0
- package/dist/components/icon.d.ts +0 -1
- package/dist/components/multi-button-group.d.ts +1 -0
- package/dist/components/tooltip.d.ts +1 -0
- package/dist/es/index.js +276 -212
- package/dist/es/index.js.map +1 -1
- package/dist/es/strings.js +4 -2
- package/dist/es/strings.js.map +1 -1
- package/dist/extra-widgets.d.ts +2 -23
- package/dist/index.d.ts +4 -2
- package/dist/index.js +273 -205
- package/dist/index.js.map +1 -1
- package/dist/interactive2/interactive-util.d.ts +1 -1
- package/dist/interactive2/movable-point-options.d.ts +2 -2
- package/dist/interactive2/movable-point.d.ts +7 -7
- package/dist/interactive2/objective_.d.ts +1 -1
- package/dist/jipt-paragraphs.d.ts +2 -2
- package/dist/perseus-api.d.ts +2 -77
- package/dist/perseus-types.d.ts +3 -10
- package/dist/renderer-util.d.ts +4 -2
- package/dist/renderer.d.ts +6 -10
- package/dist/server-item-renderer.d.ts +58 -50
- package/dist/strings.d.ts +1 -0
- package/dist/strings.js +4 -2
- package/dist/strings.js.map +1 -1
- package/dist/styles/global-styles.d.ts +0 -1
- package/dist/styles/shared.d.ts +0 -1
- package/dist/traversal.d.ts +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/util/a11y.d.ts +0 -1
- package/dist/util/debounce.d.ts +1 -1
- package/dist/util/parse-perseus-json/perseus-parsers/graded-group-widget.d.ts +2 -2
- package/dist/widgets/definition/definition.d.ts +1 -1
- package/dist/widgets/deprecated-standin/deprecated-standin.d.ts +1 -1
- package/dist/widgets/dropdown/dropdown.d.ts +9 -1
- package/dist/widgets/explanation/explanation.d.ts +1 -1
- package/dist/widgets/expression/expression.d.ts +92 -217
- package/dist/widgets/group/group.d.ts +1 -1
- package/dist/widgets/image/image.d.ts +1 -1
- package/dist/widgets/interaction/interaction.d.ts +1 -1
- package/dist/widgets/interactive-graphs/graphs/quadratic.d.ts +1 -1
- package/dist/widgets/label-image/answer-pill.d.ts +0 -1
- package/dist/widgets/label-image/label-image.d.ts +5 -65
- package/dist/widgets/label-image/marker.d.ts +0 -1
- package/dist/widgets/measurer/measurer.d.ts +1 -1
- package/dist/widgets/molecule/molecule.d.ts +1 -1
- package/dist/widgets/passage/passage-markdown.d.ts +2 -2
- package/dist/widgets/passage/passage.d.ts +1 -1
- package/dist/widgets/passage-ref/passage-ref.d.ts +1 -1
- package/dist/widgets/passage-ref-target/passage-ref-target.d.ts +1 -1
- package/dist/widgets/radio/choice-icon/shared-styles.d.ts +0 -1
- package/dist/widgets/radio/choice-none-above.d.ts +1 -1
- package/dist/widgets/radio/radio.d.ts +2 -2
- package/dist/widgets/video/video.d.ts +1 -1
- package/package.json +2 -2
|
@@ -99,264 +99,139 @@ declare const _default: {
|
|
|
99
99
|
static: boolean | null | undefined;
|
|
100
100
|
problemNum: number | null | undefined;
|
|
101
101
|
apiOptions: Readonly<Readonly<{
|
|
102
|
-
isArticle?: boolean
|
|
103
|
-
onFocusChange?: (
|
|
104
|
-
GroupMetadataEditor?: React.ComponentType<any
|
|
105
|
-
showAlignmentOptions?: boolean
|
|
106
|
-
readOnly?: boolean
|
|
107
|
-
answerableCallback?: (
|
|
108
|
-
getAnotherHint?: (
|
|
109
|
-
interactionCallback?: (
|
|
102
|
+
isArticle?: boolean;
|
|
103
|
+
onFocusChange?: (newFocusPath: FocusPath, oldFocusPath: FocusPath, keypadHeight?: number, focusedElement?: HTMLElement) => unknown;
|
|
104
|
+
GroupMetadataEditor?: React.ComponentType<any>;
|
|
105
|
+
showAlignmentOptions?: boolean;
|
|
106
|
+
readOnly?: boolean;
|
|
107
|
+
answerableCallback?: (arg1: boolean) => unknown;
|
|
108
|
+
getAnotherHint?: () => unknown;
|
|
109
|
+
interactionCallback?: (widgetData: {
|
|
110
110
|
[widgetId: string]: any;
|
|
111
|
-
}) => void
|
|
112
|
-
groupAnnotator?: (
|
|
111
|
+
}) => void;
|
|
112
|
+
groupAnnotator?: (groupNumber: number, widgetId: string) => React.ReactNode;
|
|
113
113
|
imagePlaceholder?: React.ReactNode;
|
|
114
114
|
widgetPlaceholder?: React.ReactNode;
|
|
115
115
|
baseElements?: {
|
|
116
116
|
Link: React.ComponentType<any>;
|
|
117
|
-
}
|
|
118
|
-
imagePreloader?: (
|
|
119
|
-
trackInteraction?: (
|
|
117
|
+
};
|
|
118
|
+
imagePreloader?: (dimensions: import("../../types").Dimensions) => React.ReactNode;
|
|
119
|
+
trackInteraction?: (args: {
|
|
120
120
|
type: string;
|
|
121
121
|
id: string;
|
|
122
|
-
correct?: boolean
|
|
122
|
+
correct?: boolean;
|
|
123
123
|
} & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
|
|
124
124
|
visible: number;
|
|
125
|
-
}>) => void
|
|
126
|
-
customKeypad?: boolean
|
|
127
|
-
nativeKeypadProxy?: (
|
|
128
|
-
isMobile?: boolean
|
|
129
|
-
setDrawingAreaAvailable?: (
|
|
130
|
-
hintProgressColor?: string
|
|
131
|
-
canScrollPage?: boolean
|
|
132
|
-
crossOutEnabled?: boolean
|
|
133
|
-
editorChangeDelay?: number
|
|
125
|
+
}>) => void;
|
|
126
|
+
customKeypad?: boolean;
|
|
127
|
+
nativeKeypadProxy?: (blur: () => void) => import("@khanacademy/math-input").KeypadAPI;
|
|
128
|
+
isMobile?: boolean;
|
|
129
|
+
setDrawingAreaAvailable?: (arg1: boolean) => unknown;
|
|
130
|
+
hintProgressColor?: string;
|
|
131
|
+
canScrollPage?: boolean;
|
|
132
|
+
crossOutEnabled?: boolean;
|
|
133
|
+
editorChangeDelay?: number;
|
|
134
134
|
flags?: {
|
|
135
|
-
mafs?: false | ({
|
|
136
|
-
none?: boolean | undefined;
|
|
137
|
-
linear?: boolean | undefined;
|
|
138
|
-
circle?: boolean | undefined;
|
|
139
|
-
polygon?: boolean | undefined;
|
|
140
|
-
point?: boolean | undefined;
|
|
141
|
-
quadratic?: boolean | undefined;
|
|
142
|
-
sinusoid?: boolean | undefined;
|
|
143
|
-
angle?: boolean | undefined;
|
|
144
|
-
"linear-system"?: boolean | undefined;
|
|
145
|
-
ray?: boolean | undefined;
|
|
146
|
-
segment?: boolean | undefined;
|
|
147
|
-
"unlimited-polygon"?: boolean | undefined;
|
|
148
|
-
"unlimited-point"?: boolean | undefined;
|
|
149
|
-
} & {
|
|
150
|
-
"interactive-graph-locked-features-labels"?: boolean | undefined;
|
|
151
|
-
"locked-figures-aria"?: boolean | undefined;
|
|
152
|
-
"locked-point-labels"?: boolean | undefined;
|
|
153
|
-
"locked-line-labels"?: boolean | undefined;
|
|
154
|
-
"locked-vector-labels"?: boolean | undefined;
|
|
155
|
-
"locked-ellipse-labels"?: boolean | undefined;
|
|
156
|
-
"locked-polygon-labels"?: boolean | undefined;
|
|
157
|
-
"locked-function-labels"?: boolean | undefined;
|
|
158
|
-
}) | undefined;
|
|
159
|
-
} | undefined;
|
|
160
|
-
onWidgetStartProps?: ((widgets: import("../../perseus-types").PerseusWidgetsMap) => void) | undefined;
|
|
161
|
-
}> & {
|
|
162
|
-
GroupMetadataEditor: NonNullable<React.ComponentType<any> | undefined>;
|
|
163
|
-
baseElements: {
|
|
164
|
-
Link: React.ComponentType<any>;
|
|
135
|
+
mafs?: false | ({ [Key in typeof import("../../types").MafsGraphTypeFlags[number]]?: boolean; } & { [Key in typeof import("../../types").InteractiveGraphLockedFeaturesFlags[number]]?: boolean; });
|
|
165
136
|
};
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
137
|
+
onWidgetStartProps?: (widgets: import("../..").PerseusWidgetsMap) => void;
|
|
138
|
+
}> & {
|
|
139
|
+
GroupMetadataEditor: NonNullable<import("../..").APIOptions["GroupMetadataEditor"]>;
|
|
140
|
+
baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
|
|
141
|
+
canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
|
|
142
|
+
crossOutEnabled: NonNullable<import("../..").APIOptions["crossOutEnabled"]>;
|
|
143
|
+
editorChangeDelay: NonNullable<import("../..").APIOptions["editorChangeDelay"]>;
|
|
144
|
+
groupAnnotator: NonNullable<import("../..").APIOptions["groupAnnotator"]>;
|
|
145
|
+
isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
|
|
146
|
+
isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
|
|
147
|
+
onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
|
|
148
|
+
readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
|
|
149
|
+
setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
|
|
150
|
+
showAlignmentOptions: NonNullable<import("../..").APIOptions["showAlignmentOptions"]>;
|
|
176
151
|
}>;
|
|
177
152
|
keypadElement?: any;
|
|
178
|
-
questionCompleted?: boolean
|
|
153
|
+
questionCompleted?: boolean;
|
|
179
154
|
onFocus: (blurPath: FocusPath) => void;
|
|
180
155
|
onBlur: (blurPath: FocusPath) => void;
|
|
181
|
-
findWidgets: (criterion: import("../../types").FilterCriterion) =>
|
|
156
|
+
findWidgets: (criterion: import("../../types").FilterCriterion) => ReadonlyArray<Widget>;
|
|
182
157
|
reviewModeRubric?: PerseusExpressionRubric | null | undefined;
|
|
183
158
|
reviewMode: boolean;
|
|
184
|
-
onChange: import("
|
|
159
|
+
onChange: import("../..").ChangeHandler;
|
|
185
160
|
trackInteraction: (extraData?: Empty | undefined) => void;
|
|
186
161
|
isLastUsedWidget: boolean;
|
|
187
162
|
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
188
163
|
containerSizeClass: import("../../util/sizing-utils").SizeClass;
|
|
189
|
-
} & Partial<import("
|
|
190
|
-
apiOptions:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
[widgetId: string]: any;
|
|
200
|
-
}) => void) | undefined;
|
|
201
|
-
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
202
|
-
imagePlaceholder?: React.ReactNode;
|
|
203
|
-
widgetPlaceholder?: React.ReactNode;
|
|
204
|
-
baseElements?: {
|
|
205
|
-
Link: React.ComponentType<any>;
|
|
206
|
-
} | undefined;
|
|
207
|
-
imagePreloader?: ((dimensions: import("../../types").Dimensions) => React.ReactNode) | undefined;
|
|
208
|
-
trackInteraction?: ((args: {
|
|
209
|
-
type: string;
|
|
210
|
-
id: string;
|
|
211
|
-
correct?: boolean | undefined;
|
|
212
|
-
} & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
|
|
213
|
-
visible: number;
|
|
214
|
-
}>) => void) | undefined;
|
|
215
|
-
customKeypad?: boolean | undefined;
|
|
216
|
-
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
217
|
-
isMobile?: boolean | undefined;
|
|
218
|
-
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
219
|
-
hintProgressColor?: string | undefined;
|
|
220
|
-
canScrollPage?: boolean | undefined;
|
|
221
|
-
crossOutEnabled?: boolean | undefined;
|
|
222
|
-
editorChangeDelay?: number | undefined;
|
|
223
|
-
flags?: {
|
|
224
|
-
mafs?: false | ({
|
|
225
|
-
none?: boolean | undefined;
|
|
226
|
-
linear?: boolean | undefined;
|
|
227
|
-
circle?: boolean | undefined;
|
|
228
|
-
polygon?: boolean | undefined;
|
|
229
|
-
point?: boolean | undefined;
|
|
230
|
-
quadratic?: boolean | undefined;
|
|
231
|
-
sinusoid?: boolean | undefined;
|
|
232
|
-
angle?: boolean | undefined;
|
|
233
|
-
"linear-system"?: boolean | undefined;
|
|
234
|
-
ray?: boolean | undefined;
|
|
235
|
-
segment?: boolean | undefined;
|
|
236
|
-
"unlimited-polygon"?: boolean | undefined;
|
|
237
|
-
"unlimited-point"?: boolean | undefined;
|
|
238
|
-
} & {
|
|
239
|
-
"interactive-graph-locked-features-labels"?: boolean | undefined;
|
|
240
|
-
"locked-figures-aria"?: boolean | undefined;
|
|
241
|
-
"locked-point-labels"?: boolean | undefined;
|
|
242
|
-
"locked-line-labels"?: boolean | undefined;
|
|
243
|
-
"locked-vector-labels"?: boolean | undefined;
|
|
244
|
-
"locked-ellipse-labels"?: boolean | undefined;
|
|
245
|
-
"locked-polygon-labels"?: boolean | undefined;
|
|
246
|
-
"locked-function-labels"?: boolean | undefined;
|
|
247
|
-
}) | undefined;
|
|
248
|
-
} | undefined;
|
|
249
|
-
onWidgetStartProps?: ((widgets: import("../../perseus-types").PerseusWidgetsMap) => void) | undefined;
|
|
250
|
-
}> & {
|
|
251
|
-
GroupMetadataEditor: NonNullable<React.ComponentType<any> | undefined>;
|
|
252
|
-
baseElements: {
|
|
253
|
-
Link: React.ComponentType<any>;
|
|
254
|
-
};
|
|
255
|
-
canScrollPage: NonNullable<boolean | undefined>;
|
|
256
|
-
crossOutEnabled: NonNullable<boolean | undefined>;
|
|
257
|
-
editorChangeDelay: number;
|
|
258
|
-
groupAnnotator: (groupNumber: number, widgetId: string) => React.ReactNode;
|
|
259
|
-
isArticle: NonNullable<boolean | undefined>;
|
|
260
|
-
isMobile: NonNullable<boolean | undefined>;
|
|
261
|
-
onFocusChange: (newFocusPath: FocusPath, oldFocusPath: FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown;
|
|
262
|
-
readOnly: NonNullable<boolean | undefined>;
|
|
263
|
-
setDrawingAreaAvailable: (arg1: boolean) => unknown;
|
|
264
|
-
showAlignmentOptions: NonNullable<boolean | undefined>;
|
|
265
|
-
}>;
|
|
266
|
-
buttonSets: import("../../perseus-types").LegacyButtonSets;
|
|
267
|
-
functions: readonly string[];
|
|
268
|
-
linterContext: import("@khanacademy/perseus-linter").LinterContextProps;
|
|
269
|
-
onBlur: (blurPath: FocusPath) => void;
|
|
270
|
-
onFocus: (blurPath: FocusPath) => void;
|
|
271
|
-
times: boolean;
|
|
272
|
-
visibleLabel: string | undefined;
|
|
273
|
-
ariaLabel: string | undefined;
|
|
164
|
+
} & Partial<import("../..").PerseusDependenciesV2> & {
|
|
165
|
+
apiOptions: NonNullable<ExternalProps["apiOptions"]>;
|
|
166
|
+
buttonSets: NonNullable<ExternalProps["buttonSets"]>;
|
|
167
|
+
functions: NonNullable<ExternalProps["functions"]>;
|
|
168
|
+
linterContext: NonNullable<ExternalProps["linterContext"]>;
|
|
169
|
+
onBlur: NonNullable<ExternalProps["onBlur"]>;
|
|
170
|
+
onFocus: NonNullable<ExternalProps["onFocus"]>;
|
|
171
|
+
times: NonNullable<ExternalProps["times"]>;
|
|
172
|
+
visibleLabel: PerseusExpressionWidgetOptions["visibleLabel"];
|
|
173
|
+
ariaLabel: PerseusExpressionWidgetOptions["ariaLabel"];
|
|
274
174
|
value: string;
|
|
275
|
-
}, "ariaLabel" | "static" | "onChange" | "keypadElement" | "containerSizeClass" | "widgetId" | "problemNum" | "questionCompleted" | "findWidgets" | "trackInteraction" | "reviewMode" | keyof import("
|
|
175
|
+
}, "ariaLabel" | "static" | "onChange" | "keypadElement" | "containerSizeClass" | "widgetId" | "problemNum" | "questionCompleted" | "findWidgets" | "trackInteraction" | "alignment" | "reviewMode" | keyof import("../..").PerseusDependenciesV2 | "reviewModeRubric" | "isLastUsedWidget" | "visibleLabel" | "buttonsVisible" | "keypadConfiguration"> & {
|
|
276
176
|
value?: string | undefined;
|
|
277
177
|
onFocus?: ((blurPath: FocusPath) => void) | undefined;
|
|
278
178
|
onBlur?: ((blurPath: FocusPath) => void) | undefined;
|
|
279
179
|
apiOptions?: Readonly<Readonly<{
|
|
280
|
-
isArticle?: boolean
|
|
281
|
-
onFocusChange?: (
|
|
282
|
-
GroupMetadataEditor?: React.ComponentType<any
|
|
283
|
-
showAlignmentOptions?: boolean
|
|
284
|
-
readOnly?: boolean
|
|
285
|
-
answerableCallback?: (
|
|
286
|
-
getAnotherHint?: (
|
|
287
|
-
interactionCallback?: (
|
|
180
|
+
isArticle?: boolean;
|
|
181
|
+
onFocusChange?: (newFocusPath: FocusPath, oldFocusPath: FocusPath, keypadHeight?: number, focusedElement?: HTMLElement) => unknown;
|
|
182
|
+
GroupMetadataEditor?: React.ComponentType<any>;
|
|
183
|
+
showAlignmentOptions?: boolean;
|
|
184
|
+
readOnly?: boolean;
|
|
185
|
+
answerableCallback?: (arg1: boolean) => unknown;
|
|
186
|
+
getAnotherHint?: () => unknown;
|
|
187
|
+
interactionCallback?: (widgetData: {
|
|
288
188
|
[widgetId: string]: any;
|
|
289
|
-
}) => void
|
|
290
|
-
groupAnnotator?: (
|
|
189
|
+
}) => void;
|
|
190
|
+
groupAnnotator?: (groupNumber: number, widgetId: string) => React.ReactNode;
|
|
291
191
|
imagePlaceholder?: React.ReactNode;
|
|
292
192
|
widgetPlaceholder?: React.ReactNode;
|
|
293
193
|
baseElements?: {
|
|
294
194
|
Link: React.ComponentType<any>;
|
|
295
|
-
}
|
|
296
|
-
imagePreloader?: (
|
|
297
|
-
trackInteraction?: (
|
|
195
|
+
};
|
|
196
|
+
imagePreloader?: (dimensions: import("../../types").Dimensions) => React.ReactNode;
|
|
197
|
+
trackInteraction?: (args: {
|
|
298
198
|
type: string;
|
|
299
199
|
id: string;
|
|
300
|
-
correct?: boolean
|
|
200
|
+
correct?: boolean;
|
|
301
201
|
} & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
|
|
302
202
|
visible: number;
|
|
303
|
-
}>) => void
|
|
304
|
-
customKeypad?: boolean
|
|
305
|
-
nativeKeypadProxy?: (
|
|
306
|
-
isMobile?: boolean
|
|
307
|
-
setDrawingAreaAvailable?: (
|
|
308
|
-
hintProgressColor?: string
|
|
309
|
-
canScrollPage?: boolean
|
|
310
|
-
crossOutEnabled?: boolean
|
|
311
|
-
editorChangeDelay?: number
|
|
203
|
+
}>) => void;
|
|
204
|
+
customKeypad?: boolean;
|
|
205
|
+
nativeKeypadProxy?: (blur: () => void) => import("@khanacademy/math-input").KeypadAPI;
|
|
206
|
+
isMobile?: boolean;
|
|
207
|
+
setDrawingAreaAvailable?: (arg1: boolean) => unknown;
|
|
208
|
+
hintProgressColor?: string;
|
|
209
|
+
canScrollPage?: boolean;
|
|
210
|
+
crossOutEnabled?: boolean;
|
|
211
|
+
editorChangeDelay?: number;
|
|
312
212
|
flags?: {
|
|
313
|
-
mafs?: false | ({
|
|
314
|
-
none?: boolean | undefined;
|
|
315
|
-
linear?: boolean | undefined;
|
|
316
|
-
circle?: boolean | undefined;
|
|
317
|
-
polygon?: boolean | undefined;
|
|
318
|
-
point?: boolean | undefined;
|
|
319
|
-
quadratic?: boolean | undefined;
|
|
320
|
-
sinusoid?: boolean | undefined;
|
|
321
|
-
angle?: boolean | undefined;
|
|
322
|
-
"linear-system"?: boolean | undefined;
|
|
323
|
-
ray?: boolean | undefined;
|
|
324
|
-
segment?: boolean | undefined;
|
|
325
|
-
"unlimited-polygon"?: boolean | undefined;
|
|
326
|
-
"unlimited-point"?: boolean | undefined;
|
|
327
|
-
} & {
|
|
328
|
-
"interactive-graph-locked-features-labels"?: boolean | undefined;
|
|
329
|
-
"locked-figures-aria"?: boolean | undefined;
|
|
330
|
-
"locked-point-labels"?: boolean | undefined;
|
|
331
|
-
"locked-line-labels"?: boolean | undefined;
|
|
332
|
-
"locked-vector-labels"?: boolean | undefined;
|
|
333
|
-
"locked-ellipse-labels"?: boolean | undefined;
|
|
334
|
-
"locked-polygon-labels"?: boolean | undefined;
|
|
335
|
-
"locked-function-labels"?: boolean | undefined;
|
|
336
|
-
}) | undefined;
|
|
337
|
-
} | undefined;
|
|
338
|
-
onWidgetStartProps?: ((widgets: import("../../perseus-types").PerseusWidgetsMap) => void) | undefined;
|
|
339
|
-
}> & {
|
|
340
|
-
GroupMetadataEditor: NonNullable<React.ComponentType<any> | undefined>;
|
|
341
|
-
baseElements: {
|
|
342
|
-
Link: React.ComponentType<any>;
|
|
213
|
+
mafs?: false | ({ [Key in typeof import("../../types").MafsGraphTypeFlags[number]]?: boolean; } & { [Key in typeof import("../../types").InteractiveGraphLockedFeaturesFlags[number]]?: boolean; });
|
|
343
214
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
215
|
+
onWidgetStartProps?: (widgets: import("../..").PerseusWidgetsMap) => void;
|
|
216
|
+
}> & {
|
|
217
|
+
GroupMetadataEditor: NonNullable<import("../..").APIOptions["GroupMetadataEditor"]>;
|
|
218
|
+
baseElements: NonNullable<import("../..").APIOptions["baseElements"]>;
|
|
219
|
+
canScrollPage: NonNullable<import("../..").APIOptions["canScrollPage"]>;
|
|
220
|
+
crossOutEnabled: NonNullable<import("../..").APIOptions["crossOutEnabled"]>;
|
|
221
|
+
editorChangeDelay: NonNullable<import("../..").APIOptions["editorChangeDelay"]>;
|
|
222
|
+
groupAnnotator: NonNullable<import("../..").APIOptions["groupAnnotator"]>;
|
|
223
|
+
isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
|
|
224
|
+
isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
|
|
225
|
+
onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
|
|
226
|
+
readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
|
|
227
|
+
setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
|
|
228
|
+
showAlignmentOptions: NonNullable<import("../..").APIOptions["showAlignmentOptions"]>;
|
|
354
229
|
}> | undefined;
|
|
355
230
|
linterContext?: import("@khanacademy/perseus-linter").LinterContextProps | undefined;
|
|
356
|
-
buttonSets?: import("
|
|
231
|
+
buttonSets?: import("../..").LegacyButtonSets | undefined;
|
|
357
232
|
functions?: readonly string[] | undefined;
|
|
358
233
|
times?: boolean | undefined;
|
|
359
|
-
} & {}, keyof import("
|
|
234
|
+
} & {}, keyof import("../..").PerseusDependenciesV2> & React.RefAttributes<Expression>>;
|
|
360
235
|
transform: (widgetOptions: PerseusExpressionWidgetOptions) => RenderProps;
|
|
361
236
|
version: {
|
|
362
237
|
major: number;
|
|
@@ -23,7 +23,7 @@ declare class Group extends React.Component<Props> implements Widget {
|
|
|
23
23
|
static defaultProps: DefaultProps;
|
|
24
24
|
componentDidMount(): void;
|
|
25
25
|
change: ChangeFn;
|
|
26
|
-
getUserInputMap(): import("
|
|
26
|
+
getUserInputMap(): import("../..").UserInputMap | undefined;
|
|
27
27
|
/**
|
|
28
28
|
* @deprecated getUserInputMap should be used for Groups
|
|
29
29
|
*/
|
|
@@ -2,5 +2,5 @@ import type { QuadraticGraphState, Dispatch, InteractiveGraphElementSuite } from
|
|
|
2
2
|
export declare function renderQuadraticGraph(state: QuadraticGraphState, dispatch: Dispatch): InteractiveGraphElementSuite;
|
|
3
3
|
type QuadraticCoefficient = [number, number, number];
|
|
4
4
|
export type QuadraticCoords = QuadraticGraphState["coords"];
|
|
5
|
-
export declare const getQuadraticCoefficients: (coords:
|
|
5
|
+
export declare const getQuadraticCoefficients: (coords: QuadraticCoords) => QuadraticCoefficient | undefined;
|
|
6
6
|
export {};
|
|
@@ -88,72 +88,12 @@ export declare class LabelImage extends React.Component<LabelImageProps, LabelIm
|
|
|
88
88
|
declare const _default: {
|
|
89
89
|
name: string;
|
|
90
90
|
displayName: string;
|
|
91
|
-
widget: React.ForwardRefExoticComponent<Omit<ChangeableProps & Partial<import("
|
|
92
|
-
apiOptions:
|
|
93
|
-
|
|
94
|
-
onFocusChange?: ((newFocusPath: import("../../types").FocusPath, oldFocusPath: import("../../types").FocusPath, keypadHeight?: number | undefined, focusedElement?: HTMLElement | undefined) => unknown) | undefined;
|
|
95
|
-
GroupMetadataEditor?: React.ComponentType<any> | undefined;
|
|
96
|
-
showAlignmentOptions?: boolean | undefined;
|
|
97
|
-
readOnly?: boolean | undefined;
|
|
98
|
-
answerableCallback?: ((arg1: boolean) => unknown) | undefined;
|
|
99
|
-
getAnotherHint?: (() => unknown) | undefined;
|
|
100
|
-
interactionCallback?: ((widgetData: {
|
|
101
|
-
[widgetId: string]: any;
|
|
102
|
-
}) => void) | undefined;
|
|
103
|
-
groupAnnotator?: ((groupNumber: number, widgetId: string) => React.ReactNode) | undefined;
|
|
104
|
-
imagePlaceholder?: React.ReactNode;
|
|
105
|
-
widgetPlaceholder?: React.ReactNode;
|
|
106
|
-
baseElements?: {
|
|
107
|
-
Link: React.ComponentType<any>;
|
|
108
|
-
} | undefined;
|
|
109
|
-
imagePreloader?: ((dimensions: import("../../types").Dimensions) => React.ReactNode) | undefined;
|
|
110
|
-
trackInteraction?: ((args: {
|
|
111
|
-
type: string;
|
|
112
|
-
id: string;
|
|
113
|
-
correct?: boolean | undefined;
|
|
114
|
-
} & Partial<import("../../types").TrackingGradedGroupExtraArguments> & Partial<{
|
|
115
|
-
visible: number;
|
|
116
|
-
}>) => void) | undefined;
|
|
117
|
-
customKeypad?: boolean | undefined;
|
|
118
|
-
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
119
|
-
isMobile?: boolean | undefined;
|
|
120
|
-
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
121
|
-
hintProgressColor?: string | undefined;
|
|
122
|
-
canScrollPage?: boolean | undefined;
|
|
123
|
-
crossOutEnabled?: boolean | undefined;
|
|
124
|
-
editorChangeDelay?: number | undefined;
|
|
125
|
-
flags?: {
|
|
126
|
-
mafs?: false | ({
|
|
127
|
-
none?: boolean | undefined;
|
|
128
|
-
linear?: boolean | undefined;
|
|
129
|
-
circle?: boolean | undefined;
|
|
130
|
-
polygon?: boolean | undefined;
|
|
131
|
-
point?: boolean | undefined;
|
|
132
|
-
quadratic?: boolean | undefined;
|
|
133
|
-
sinusoid?: boolean | undefined;
|
|
134
|
-
angle?: boolean | undefined;
|
|
135
|
-
"linear-system"?: boolean | undefined;
|
|
136
|
-
ray?: boolean | undefined;
|
|
137
|
-
segment?: boolean | undefined;
|
|
138
|
-
"unlimited-polygon"?: boolean | undefined;
|
|
139
|
-
"unlimited-point"?: boolean | undefined;
|
|
140
|
-
} & {
|
|
141
|
-
"interactive-graph-locked-features-labels"?: boolean | undefined;
|
|
142
|
-
"locked-figures-aria"?: boolean | undefined;
|
|
143
|
-
"locked-point-labels"?: boolean | undefined;
|
|
144
|
-
"locked-line-labels"?: boolean | undefined;
|
|
145
|
-
"locked-vector-labels"?: boolean | undefined;
|
|
146
|
-
"locked-ellipse-labels"?: boolean | undefined;
|
|
147
|
-
"locked-polygon-labels"?: boolean | undefined;
|
|
148
|
-
"locked-function-labels"?: boolean | undefined;
|
|
149
|
-
}) | undefined;
|
|
150
|
-
} | undefined;
|
|
151
|
-
onWidgetStartProps?: ((widgets: import("../../perseus-types").PerseusWidgetsMap) => void) | undefined;
|
|
152
|
-
}>;
|
|
153
|
-
markers: readonly InteractiveMarkerType[];
|
|
91
|
+
widget: React.ForwardRefExoticComponent<Omit<ChangeableProps & Partial<import("../..").PerseusDependenciesV2> & Omit<PerseusLabelImageWidgetOptions, "markers"> & {
|
|
92
|
+
apiOptions: APIOptions;
|
|
93
|
+
markers: ReadonlyArray<InteractiveMarkerType>;
|
|
154
94
|
questionCompleted: boolean;
|
|
155
|
-
preferredPopoverDirection?: PreferredPopoverDirection
|
|
156
|
-
}, keyof import("
|
|
95
|
+
preferredPopoverDirection?: PreferredPopoverDirection;
|
|
96
|
+
}, keyof import("../..").PerseusDependenciesV2> & React.RefAttributes<LabelImage>>;
|
|
157
97
|
accessible: true;
|
|
158
98
|
isLintable: true;
|
|
159
99
|
scorer: typeof scoreLabelImage;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The target for labeling question image with answers.
|
|
5
5
|
*/
|
|
6
|
-
/// <reference path="../../../types/aphrodite.d.ts" />
|
|
7
6
|
import * as React from "react";
|
|
8
7
|
import { PerseusI18nContext } from "../../components/i18n-context";
|
|
9
8
|
import type { InteractiveMarkerType } from "./types";
|
|
@@ -13,8 +13,8 @@ export type ParseState = State & {
|
|
|
13
13
|
};
|
|
14
14
|
declare function getInitialParseState(): ParseState;
|
|
15
15
|
declare const _default: {
|
|
16
|
-
parse: (arg1: string, arg2?: ParseState | null | undefined) => SingleASTNode
|
|
17
|
-
output: (arg1: SingleASTNode
|
|
16
|
+
parse: (arg1: string, arg2?: ParseState | null | undefined) => Array<SingleASTNode>;
|
|
17
|
+
output: (arg1: Array<SingleASTNode>) => React.ReactElement;
|
|
18
18
|
START_REF_PREFIX: string;
|
|
19
19
|
END_REF_PREFIX: string;
|
|
20
20
|
getInitialParseState: typeof getInitialParseState;
|
|
@@ -108,6 +108,6 @@ declare const _default: {
|
|
|
108
108
|
widget: typeof Passage;
|
|
109
109
|
transform: (editorProps: any) => RenderProps;
|
|
110
110
|
isLintable: true;
|
|
111
|
-
scorer: () => import("
|
|
111
|
+
scorer: () => import("../..").PerseusScore;
|
|
112
112
|
};
|
|
113
113
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { ChoiceProps } from "./choice";
|
|
3
3
|
declare const _default: React.ForwardRefExoticComponent<ChoiceProps & {
|
|
4
|
-
showContent?: boolean
|
|
4
|
+
showContent?: boolean;
|
|
5
5
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
export default _default;
|
|
@@ -8,8 +8,8 @@ declare const _default: {
|
|
|
8
8
|
displayName: string;
|
|
9
9
|
accessible: true;
|
|
10
10
|
widget: typeof Radio;
|
|
11
|
-
transform: (widgetOptions: PerseusRadioWidgetOptions, strings: PerseusStrings, problemNum?: number | null
|
|
12
|
-
staticTransform: (widgetOptions: PerseusRadioWidgetOptions, strings: PerseusStrings, problemNum?: number | null
|
|
11
|
+
transform: (widgetOptions: PerseusRadioWidgetOptions, strings: PerseusStrings, problemNum?: number | null) => RenderProps;
|
|
12
|
+
staticTransform: (widgetOptions: PerseusRadioWidgetOptions, strings: PerseusStrings, problemNum?: number | null) => RenderProps;
|
|
13
13
|
version: {
|
|
14
14
|
major: number;
|
|
15
15
|
minor: number;
|
|
@@ -30,6 +30,6 @@ declare const _default: {
|
|
|
30
30
|
defaultAlignment: "block";
|
|
31
31
|
supportedAlignments: ("block" | "full-width" | "float-left" | "float-right")[];
|
|
32
32
|
widget: typeof Video;
|
|
33
|
-
scorer: () => import("
|
|
33
|
+
scorer: () => import("../..").PerseusScore;
|
|
34
34
|
};
|
|
35
35
|
export default _default;
|
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": "
|
|
6
|
+
"version": "45.0.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@khanacademy/kas": "^0.4.2",
|
|
44
44
|
"@khanacademy/keypad-context": "^1.0.4",
|
|
45
45
|
"@khanacademy/kmath": "^0.1.16",
|
|
46
|
-
"@khanacademy/math-input": "^21.1.
|
|
46
|
+
"@khanacademy/math-input": "^21.1.6",
|
|
47
47
|
"@khanacademy/perseus-core": "1.5.3",
|
|
48
48
|
"@khanacademy/perseus-linter": "^1.2.4",
|
|
49
49
|
"@khanacademy/pure-markdown": "^0.3.13",
|