@khanacademy/perseus 71.5.0 → 71.6.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.
@@ -121,6 +121,7 @@ declare const _default: React.ForwardRefExoticComponent<Omit<Pick<SharedRenderer
121
121
  GroupMetadataEditor?: React.ComponentType<any>;
122
122
  showAlignmentOptions?: boolean;
123
123
  readOnly?: boolean;
124
+ editingDisabled?: boolean;
124
125
  answerableCallback?: (arg1: boolean) => unknown;
125
126
  getAnotherHint?: () => unknown;
126
127
  interactionCallback?: (widgetData: {
package/dist/types.d.ts CHANGED
@@ -119,6 +119,11 @@ export type APIOptions = Readonly<{
119
119
  * answered correctly and should no longer be interactive.
120
120
  */
121
121
  readOnly?: boolean;
122
+ /**
123
+ * A boolean that indicates whether the editor interface should be
124
+ * disabled, preventing content creators from making changes.
125
+ */
126
+ editingDisabled?: boolean;
122
127
  answerableCallback?: (arg1: boolean) => unknown;
123
128
  getAnotherHint?: () => unknown;
124
129
  interactionCallback?: (widgetData: {
@@ -327,6 +332,7 @@ export type APIOptionsWithDefaults = Readonly<APIOptions & {
327
332
  isArticle: NonNullable<APIOptions["isArticle"]>;
328
333
  isMobile: NonNullable<APIOptions["isMobile"]>;
329
334
  isMobileApp: NonNullable<APIOptions["isMobileApp"]>;
335
+ editingDisabled: NonNullable<APIOptions["editingDisabled"]>;
330
336
  onFocusChange: NonNullable<APIOptions["onFocusChange"]>;
331
337
  readOnly: NonNullable<APIOptions["readOnly"]>;
332
338
  setDrawingAreaAvailable: NonNullable<APIOptions["setDrawingAreaAvailable"]>;
@@ -73,6 +73,7 @@ export declare class Expression extends React.Component<Props> implements Widget
73
73
  GroupMetadataEditor?: React.ComponentType<any>;
74
74
  showAlignmentOptions?: boolean;
75
75
  readOnly?: boolean;
76
+ editingDisabled?: boolean;
76
77
  answerableCallback?: (arg1: boolean) => unknown;
77
78
  getAnotherHint?: () => unknown;
78
79
  interactionCallback?: (widgetData: {
@@ -109,6 +110,7 @@ export declare class Expression extends React.Component<Props> implements Widget
109
110
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
110
111
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
111
112
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
113
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
112
114
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
113
115
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
114
116
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -158,6 +160,7 @@ declare const _default: {
158
160
  GroupMetadataEditor?: React.ComponentType<any>;
159
161
  showAlignmentOptions?: boolean;
160
162
  readOnly?: boolean;
163
+ editingDisabled?: boolean;
161
164
  answerableCallback?: (arg1: boolean) => unknown;
162
165
  getAnotherHint?: () => unknown;
163
166
  interactionCallback?: (widgetData: {
@@ -194,6 +197,7 @@ declare const _default: {
194
197
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
195
198
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
196
199
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
200
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
197
201
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
198
202
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
199
203
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -230,6 +234,7 @@ declare const _default: {
230
234
  GroupMetadataEditor?: React.ComponentType<any>;
231
235
  showAlignmentOptions?: boolean;
232
236
  readOnly?: boolean;
237
+ editingDisabled?: boolean;
233
238
  answerableCallback?: (arg1: boolean) => unknown;
234
239
  getAnotherHint?: () => unknown;
235
240
  interactionCallback?: (widgetData: {
@@ -266,6 +271,7 @@ declare const _default: {
266
271
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
267
272
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
268
273
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
274
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
269
275
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
270
276
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
271
277
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -64,6 +64,7 @@ declare class Grapher extends React.Component<Props> implements Widget {
64
64
  GroupMetadataEditor?: React.ComponentType<any>;
65
65
  showAlignmentOptions?: boolean;
66
66
  readOnly?: boolean;
67
+ editingDisabled?: boolean;
67
68
  answerableCallback?: (arg1: boolean) => unknown;
68
69
  getAnotherHint?: () => unknown;
69
70
  interactionCallback?: (widgetData: {
@@ -100,6 +101,7 @@ declare class Grapher extends React.Component<Props> implements Widget {
100
101
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
101
102
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
102
103
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
104
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
103
105
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
104
106
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
105
107
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -165,6 +165,7 @@ declare class InteractiveGraph extends React.Component<Props, State> {
165
165
  GroupMetadataEditor?: React.ComponentType<any>;
166
166
  showAlignmentOptions?: boolean;
167
167
  readOnly?: boolean;
168
+ editingDisabled?: boolean;
168
169
  answerableCallback?: (arg1: boolean) => unknown;
169
170
  getAnotherHint?: () => unknown;
170
171
  interactionCallback?: (widgetData: {
@@ -201,6 +202,7 @@ declare class InteractiveGraph extends React.Component<Props, State> {
201
202
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
202
203
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
203
204
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
205
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
204
206
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
205
207
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
206
208
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -124,6 +124,7 @@ declare const _default: {
124
124
  GroupMetadataEditor?: React.ComponentType<any>;
125
125
  showAlignmentOptions?: boolean;
126
126
  readOnly?: boolean;
127
+ editingDisabled?: boolean;
127
128
  answerableCallback?: (arg1: boolean) => unknown;
128
129
  getAnotherHint?: () => unknown;
129
130
  interactionCallback?: (widgetData: {
@@ -160,6 +161,7 @@ declare const _default: {
160
161
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
161
162
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
162
163
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
164
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
163
165
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
164
166
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
165
167
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -48,6 +48,7 @@ declare class MockWidgetComponent extends React.Component<Props> implements Widg
48
48
  GroupMetadataEditor?: React.ComponentType<any>;
49
49
  showAlignmentOptions?: boolean;
50
50
  readOnly?: boolean;
51
+ editingDisabled?: boolean;
51
52
  answerableCallback?: (arg1: boolean) => unknown;
52
53
  getAnotherHint?: () => unknown;
53
54
  interactionCallback?: (widgetData: {
@@ -84,6 +85,7 @@ declare class MockWidgetComponent extends React.Component<Props> implements Widg
84
85
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
85
86
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
86
87
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
88
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
87
89
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
88
90
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
89
91
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -55,6 +55,7 @@ export declare class NumericInput extends React.Component<NumericInputProps> imp
55
55
  GroupMetadataEditor?: React.ComponentType<any>;
56
56
  showAlignmentOptions?: boolean;
57
57
  readOnly?: boolean;
58
+ editingDisabled?: boolean;
58
59
  answerableCallback?: (arg1: boolean) => unknown;
59
60
  getAnotherHint?: () => unknown;
60
61
  interactionCallback?: (widgetData: {
@@ -91,6 +92,7 @@ export declare class NumericInput extends React.Component<NumericInputProps> imp
91
92
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
92
93
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
93
94
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
95
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
94
96
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
95
97
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
96
98
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -18,6 +18,7 @@ export declare const NumericInputComponent: React.ForwardRefExoticComponent<impo
18
18
  GroupMetadataEditor?: React.ComponentType<any>;
19
19
  showAlignmentOptions?: boolean;
20
20
  readOnly?: boolean;
21
+ editingDisabled?: boolean;
21
22
  answerableCallback?: (arg1: boolean) => unknown;
22
23
  getAnotherHint?: () => unknown;
23
24
  interactionCallback?: (widgetData: {
@@ -54,6 +55,7 @@ export declare const NumericInputComponent: React.ForwardRefExoticComponent<impo
54
55
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
55
56
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
56
57
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
58
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
57
59
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
58
60
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
59
61
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -79,6 +81,7 @@ export declare const NumericInputComponent: React.ForwardRefExoticComponent<impo
79
81
  GroupMetadataEditor?: React.ComponentType<any>;
80
82
  showAlignmentOptions?: boolean;
81
83
  readOnly?: boolean;
84
+ editingDisabled?: boolean;
82
85
  answerableCallback?: (arg1: boolean) => unknown;
83
86
  getAnotherHint?: () => unknown;
84
87
  interactionCallback?: (widgetData: {
@@ -115,6 +118,7 @@ export declare const NumericInputComponent: React.ForwardRefExoticComponent<impo
115
118
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
116
119
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
117
120
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
121
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
118
122
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
119
123
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
120
124
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -102,6 +102,7 @@ declare class Plotter extends React.Component<Props, State> implements Widget {
102
102
  GroupMetadataEditor?: React.ComponentType<any>;
103
103
  showAlignmentOptions?: boolean;
104
104
  readOnly?: boolean;
105
+ editingDisabled?: boolean;
105
106
  answerableCallback?: (arg1: boolean) => unknown;
106
107
  getAnotherHint?: () => unknown;
107
108
  interactionCallback?: (widgetData: {
@@ -138,6 +139,7 @@ declare class Plotter extends React.Component<Props, State> implements Widget {
138
139
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
139
140
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
140
141
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
142
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
141
143
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
142
144
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
143
145
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -51,6 +51,7 @@ declare const Radio: React.ForwardRefExoticComponent<RadioProps & {
51
51
  GroupMetadataEditor?: React.ComponentType<any>;
52
52
  showAlignmentOptions?: boolean;
53
53
  readOnly?: boolean;
54
+ editingDisabled?: boolean;
54
55
  answerableCallback?: (arg1: boolean) => unknown;
55
56
  getAnotherHint?: () => unknown;
56
57
  interactionCallback?: (widgetData: {
@@ -87,6 +88,7 @@ declare const Radio: React.ForwardRefExoticComponent<RadioProps & {
87
88
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
88
89
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
89
90
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
91
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
90
92
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
91
93
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
92
94
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -50,6 +50,7 @@ declare class Radio extends RadioOld {
50
50
  GroupMetadataEditor?: React.ComponentType<any>;
51
51
  showAlignmentOptions?: boolean;
52
52
  readOnly?: boolean;
53
+ editingDisabled?: boolean;
53
54
  answerableCallback?: (arg1: boolean) => unknown;
54
55
  getAnotherHint?: () => unknown;
55
56
  interactionCallback?: (widgetData: {
@@ -86,6 +87,7 @@ declare class Radio extends RadioOld {
86
87
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
87
88
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
88
89
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
90
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
89
91
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
90
92
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
91
93
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
@@ -56,6 +56,7 @@ declare class Table extends React.Component<Props> implements Widget {
56
56
  GroupMetadataEditor?: React.ComponentType<any>;
57
57
  showAlignmentOptions?: boolean;
58
58
  readOnly?: boolean;
59
+ editingDisabled?: boolean;
59
60
  answerableCallback?: (arg1: boolean) => unknown;
60
61
  getAnotherHint?: () => unknown;
61
62
  interactionCallback?: (widgetData: {
@@ -92,6 +93,7 @@ declare class Table extends React.Component<Props> implements Widget {
92
93
  isArticle: NonNullable<import("../..").APIOptions["isArticle"]>;
93
94
  isMobile: NonNullable<import("../..").APIOptions["isMobile"]>;
94
95
  isMobileApp: NonNullable<import("../..").APIOptions["isMobileApp"]>;
96
+ editingDisabled: NonNullable<import("../..").APIOptions["editingDisabled"]>;
95
97
  onFocusChange: NonNullable<import("../..").APIOptions["onFocusChange"]>;
96
98
  readOnly: NonNullable<import("../..").APIOptions["readOnly"]>;
97
99
  setDrawingAreaAvailable: NonNullable<import("../..").APIOptions["setDrawingAreaAvailable"]>;
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": "71.5.0",
6
+ "version": "71.6.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -45,12 +45,12 @@
45
45
  "@khanacademy/keypad-context": "3.2.15",
46
46
  "@khanacademy/kmath": "2.2.15",
47
47
  "@khanacademy/math-input": "26.2.17",
48
+ "@khanacademy/perseus-core": "20.1.3",
48
49
  "@khanacademy/perseus-linter": "4.4.5",
49
50
  "@khanacademy/perseus-score": "8.0.4",
50
51
  "@khanacademy/perseus-utils": "2.1.1",
51
52
  "@khanacademy/pure-markdown": "2.2.1",
52
- "@khanacademy/simple-markdown": "2.1.1",
53
- "@khanacademy/perseus-core": "20.1.3"
53
+ "@khanacademy/simple-markdown": "2.1.1"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@khanacademy/wonder-blocks-announcer": "1.0.4",