@khanacademy/perseus-editor 2.6.0 → 2.6.2
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/CHANGELOG.md +24 -0
- package/dist/article-editor.d.ts +1 -2
- package/dist/components/form-wrapped-text-field.d.ts +1 -10
- package/dist/components/graph-points-count-selector.d.ts +1 -1
- package/dist/es/index.js +414 -436
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +411 -435
- package/dist/index.js.map +1 -1
- package/dist/widgets/input-number-editor.d.ts +1 -2
- package/dist/widgets/interactive-graph-editor.d.ts +48 -47
- package/dist/widgets/plotter-editor.d.ts +47 -23
- package/package.json +12 -12
- package/src/__stories__/editor.stories.tsx +3 -1
- package/src/__tests__/i18n.test.ts +1 -1
- package/src/article-editor.tsx +13 -14
- package/src/components/checkbox.tsx +2 -1
- package/src/components/dropdown-option.tsx +13 -12
- package/src/components/form-wrapped-text-field.tsx +5 -2
- package/src/components/graph-points-count-selector.tsx +3 -1
- package/src/components/graph-settings.tsx +1 -1
- package/src/components/hover-behavior.ts +2 -2
- package/src/components/json-editor.tsx +2 -2
- package/src/components/sortable.tsx +1 -1
- package/src/components/util.ts +1 -1
- package/src/components/widget-editor.tsx +8 -7
- package/src/diffs/__tests__/structured-item-diff.test.ts +8 -8
- package/src/diffs/renderer-diff.tsx +3 -3
- package/src/diffs/split-diff.ts +2 -2
- package/src/diffs/structured-item-diff.tsx +11 -10
- package/src/diffs/text-diff.tsx +1 -1
- package/src/diffs/widget-diff.tsx +2 -2
- package/src/editor-page.tsx +8 -8
- package/src/editor.tsx +37 -36
- package/src/hint-editor.tsx +28 -27
- package/src/i18n.ts +4 -4
- package/src/iframe-content-renderer.tsx +10 -10
- package/src/item-editor.tsx +4 -4
- package/src/katex-mhchem/parser.js +24 -24
- package/src/multirenderer-editor.tsx +11 -11
- package/src/widgets/__stories__/label-image-editor.stories.tsx +1 -0
- package/src/widgets/__stories__/radio-editor.stories.tsx +1 -0
- package/src/widgets/categorizer-editor.tsx +3 -3
- package/src/widgets/cs-program-editor.tsx +2 -2
- package/src/widgets/definition-editor.tsx +3 -2
- package/src/widgets/dropdown-editor.tsx +9 -8
- package/src/widgets/example-graphie-widget-editor.tsx +1 -1
- package/src/widgets/example-graphie-widget.tsx +2 -2
- package/src/widgets/example-widget-editor.tsx +2 -2
- package/src/widgets/example-widget.tsx +4 -3
- package/src/widgets/explanation-editor.tsx +4 -3
- package/src/widgets/expression-editor.tsx +9 -9
- package/src/widgets/graded-group-editor.tsx +7 -6
- package/src/widgets/graded-group-set-editor.tsx +3 -3
- package/src/widgets/grapher-editor.tsx +3 -2
- package/src/widgets/group-editor.tsx +4 -3
- package/src/widgets/iframe-editor.tsx +5 -4
- package/src/widgets/input-number-editor.tsx +6 -6
- package/src/widgets/interaction-editor.tsx +103 -102
- package/src/widgets/interactive-graph-editor.tsx +12 -8
- package/src/widgets/label-image/marker.tsx +2 -1
- package/src/widgets/label-image/question-markers.tsx +1 -1
- package/src/widgets/lights-puzzle-editor.tsx +5 -4
- package/src/widgets/matrix-editor.tsx +2 -2
- package/src/widgets/measurer-editor.tsx +7 -6
- package/src/widgets/molecule-editor.tsx +2 -2
- package/src/widgets/number-line-editor.tsx +2 -1
- package/src/widgets/numeric-input-editor.tsx +2 -2
- package/src/widgets/orderer-editor.tsx +3 -2
- package/src/widgets/passage-editor.tsx +3 -3
- package/src/widgets/passage-ref-editor.tsx +4 -3
- package/src/widgets/passage-ref-target-editor.tsx +1 -1
- package/src/widgets/plotter-editor.tsx +253 -243
- package/src/widgets/radio/editor.tsx +3 -3
- package/src/widgets/reaction-diagram-editor.tsx +5 -5
- package/src/widgets/sequence-editor.tsx +1 -1
- package/src/widgets/simple-markdown-tester-editor.tsx +4 -3
- package/src/widgets/simple-markdown-tester.tsx +2 -2
- package/src/widgets/simulator-editor.tsx +1 -1
- package/src/widgets/sorter-editor.tsx +2 -1
- package/src/widgets/table-editor.tsx +1 -1
- package/src/widgets/transformer-editor.tsx +10 -10
- package/src/widgets/unit-editor.tsx +5 -5
- package/tsconfig-build.tsbuildinfo +1 -1
- package/dist/all-editors.js.flow +0 -8
- package/dist/all-widgets.js.flow +0 -34
- package/dist/article-editor.js.flow +0 -72
- package/dist/components/blur-input.js.flow +0 -25
- package/dist/components/checkbox.js.flow +0 -26
- package/dist/components/device-framer.js.flow +0 -20
- package/dist/components/drag-target.js.flow +0 -8
- package/dist/components/dropdown-option.js.flow +0 -49
- package/dist/components/form-wrapped-text-field.js.flow +0 -45
- package/dist/components/graph-points-count-selector.js.flow +0 -12
- package/dist/components/graph-settings.js.flow +0 -8
- package/dist/components/graph-type-selector.js.flow +0 -12
- package/dist/components/hover-behavior.js.flow +0 -48
- package/dist/components/json-editor.js.flow +0 -8
- package/dist/components/link.js.flow +0 -50
- package/dist/components/section-control-button.js.flow +0 -25
- package/dist/components/segment-count-selector.js.flow +0 -11
- package/dist/components/simple-button.js.flow +0 -18
- package/dist/components/sortable.js.flow +0 -8
- package/dist/components/util.js.flow +0 -9
- package/dist/components/viewport-resizer.js.flow +0 -22
- package/dist/components/widget-editor.js.flow +0 -91
- package/dist/components/widget-select.js.flow +0 -16
- package/dist/diffs/article-diff.js.flow +0 -71
- package/dist/diffs/item-diff.js.flow +0 -41
- package/dist/diffs/renderer-diff.js.flow +0 -25
- package/dist/diffs/split-diff.js.flow +0 -8
- package/dist/diffs/string-array-diff.js.flow +0 -11
- package/dist/diffs/structured-item-diff.js.flow +0 -37
- package/dist/diffs/tags-diff.js.flow +0 -24
- package/dist/diffs/text-diff.js.flow +0 -21
- package/dist/diffs/widget-diff-performer.js.flow +0 -8
- package/dist/diffs/widget-diff.js.flow +0 -31
- package/dist/editor-page.js.flow +0 -72
- package/dist/editor.js.flow +0 -96
- package/dist/hint-editor.js.flow +0 -87
- package/dist/i18n.js.flow +0 -13
- package/dist/iframe-content-renderer.js.flow +0 -28
- package/dist/index.js.flow +0 -23
- package/dist/item-editor.js.flow +0 -46
- package/dist/item-extras-editor.js.flow +0 -23
- package/dist/katex-error-view.js.flow +0 -24
- package/dist/multirenderer-editor.js.flow +0 -46
- package/dist/stateful-article-editor.js.flow +0 -16
- package/dist/stateful-editor-page.js.flow +0 -8
- package/dist/testing-widgets.js.flow +0 -34
- package/dist/util/points.js.flow +0 -9
- package/dist/util/register-all-widgets-and-editors-for-testing.js.flow +0 -7
- package/dist/widgets/categorizer-editor.js.flow +0 -62
- package/dist/widgets/cs-program-editor.js.flow +0 -25
- package/dist/widgets/definition-editor.js.flow +0 -23
- package/dist/widgets/dropdown-editor.js.flow +0 -37
- package/dist/widgets/example-graphie-widget-editor.js.flow +0 -25
- package/dist/widgets/example-graphie-widget.js.flow +0 -102
- package/dist/widgets/example-widget-editor.js.flow +0 -26
- package/dist/widgets/example-widget.js.flow +0 -86
- package/dist/widgets/explanation-editor.js.flow +0 -27
- package/dist/widgets/expression-editor.js.flow +0 -43
- package/dist/widgets/graded-group-editor.js.flow +0 -68
- package/dist/widgets/graded-group-set-editor.js.flow +0 -66
- package/dist/widgets/grapher-editor.js.flow +0 -21
- package/dist/widgets/group-editor.js.flow +0 -64
- package/dist/widgets/iframe-editor.js.flow +0 -24
- package/dist/widgets/image-editor.js.flow +0 -8
- package/dist/widgets/input-number-editor.js.flow +0 -77
- package/dist/widgets/interaction/constraint-editor.js.flow +0 -35
- package/dist/widgets/interaction-editor.js.flow +0 -36
- package/dist/widgets/interactive-graph-editor.js.flow +0 -5803
- package/dist/widgets/label-image/answer-choices.js.flow +0 -16
- package/dist/widgets/label-image/behavior.js.flow +0 -17
- package/dist/widgets/label-image/marker.js.flow +0 -32
- package/dist/widgets/label-image/question-markers.js.flow +0 -23
- package/dist/widgets/label-image/select-image.js.flow +0 -13
- package/dist/widgets/label-image-editor.js.flow +0 -44
- package/dist/widgets/lights-puzzle-editor.js.flow +0 -34
- package/dist/widgets/matcher-editor.js.flow +0 -28
- package/dist/widgets/matrix-editor.js.flow +0 -26
- package/dist/widgets/measurer-editor.js.flow +0 -42
- package/dist/widgets/molecule-editor.js.flow +0 -23
- package/dist/widgets/number-line-editor.js.flow +0 -45
- package/dist/widgets/numeric-input-editor.js.flow +0 -8
- package/dist/widgets/orderer-editor.js.flow +0 -30
- package/dist/widgets/passage-editor.js.flow +0 -24
- package/dist/widgets/passage-ref-editor.js.flow +0 -17
- package/dist/widgets/passage-ref-target-editor.js.flow +0 -22
- package/dist/widgets/plotter-editor.js.flow +0 -53
- package/dist/widgets/radio/editor.js.flow +0 -81
- package/dist/widgets/reaction-diagram-editor.js.flow +0 -26
- package/dist/widgets/sequence-editor.js.flow +0 -73
- package/dist/widgets/simple-markdown-tester-editor.js.flow +0 -23
- package/dist/widgets/simple-markdown-tester.js.flow +0 -61
- package/dist/widgets/simulator-editor.js.flow +0 -26
- package/dist/widgets/sorter-editor.js.flow +0 -22
- package/dist/widgets/table-editor.js.flow +0 -24
- package/dist/widgets/transformer-editor.js.flow +0 -17
- package/dist/widgets/unit-editor.js.flow +0 -41
- package/dist/widgets/video-editor.js.flow +0 -25
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { InputNumber } from "@khanacademy/perseus";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
import type { ParsedValue } from "@khanacademy/perseus";
|
|
2
|
+
import type { ParsedValue, InputNumber } from "@khanacademy/perseus";
|
|
4
3
|
type Props = {
|
|
5
4
|
value: number;
|
|
6
5
|
simplify: JSX.LibraryManagedAttributes<typeof InputNumber.widget, React.ComponentProps<typeof InputNumber.widget>>["simplify"];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { SizingUtils
|
|
1
|
+
import { SizingUtils } from "@khanacademy/perseus";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import type { PerseusImageBackground, PerseusInteractiveGraphWidgetOptions, APIOptionsWithDefaults } from "@khanacademy/perseus";
|
|
3
4
|
declare const InteractiveGraph: {
|
|
4
5
|
new (props: (PerseusInteractiveGraphWidgetOptions & {
|
|
5
6
|
widgetId: string;
|
|
@@ -30,7 +31,7 @@ declare const InteractiveGraph: {
|
|
|
30
31
|
} & Record<string, unknown>) => void) | undefined;
|
|
31
32
|
customKeypad?: boolean | undefined;
|
|
32
33
|
useV2Keypad?: boolean | undefined;
|
|
33
|
-
nativeKeypadProxy?: (() =>
|
|
34
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
34
35
|
isMobile?: boolean | undefined;
|
|
35
36
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
36
37
|
useDraftEditor?: boolean | undefined;
|
|
@@ -99,7 +100,7 @@ declare const InteractiveGraph: {
|
|
|
99
100
|
} & Record<string, unknown>) => void) | undefined;
|
|
100
101
|
customKeypad?: boolean | undefined;
|
|
101
102
|
useV2Keypad?: boolean | undefined;
|
|
102
|
-
nativeKeypadProxy?: (() =>
|
|
103
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
103
104
|
isMobile?: boolean | undefined;
|
|
104
105
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
105
106
|
useDraftEditor?: boolean | undefined;
|
|
@@ -188,7 +189,7 @@ declare const InteractiveGraph: {
|
|
|
188
189
|
} & Record<string, unknown>) => void) | undefined;
|
|
189
190
|
customKeypad?: boolean | undefined;
|
|
190
191
|
useV2Keypad?: boolean | undefined;
|
|
191
|
-
nativeKeypadProxy?: (() =>
|
|
192
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
192
193
|
isMobile?: boolean | undefined;
|
|
193
194
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
194
195
|
useDraftEditor?: boolean | undefined;
|
|
@@ -258,7 +259,7 @@ declare const InteractiveGraph: {
|
|
|
258
259
|
} & Record<string, unknown>) => void) | undefined;
|
|
259
260
|
customKeypad?: boolean | undefined;
|
|
260
261
|
useV2Keypad?: boolean | undefined;
|
|
261
|
-
nativeKeypadProxy?: (() =>
|
|
262
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
262
263
|
isMobile?: boolean | undefined;
|
|
263
264
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
264
265
|
useDraftEditor?: boolean | undefined;
|
|
@@ -328,7 +329,7 @@ declare const InteractiveGraph: {
|
|
|
328
329
|
} & Record<string, unknown>) => void) | undefined;
|
|
329
330
|
customKeypad?: boolean | undefined;
|
|
330
331
|
useV2Keypad?: boolean | undefined;
|
|
331
|
-
nativeKeypadProxy?: (() =>
|
|
332
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
332
333
|
isMobile?: boolean | undefined;
|
|
333
334
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
334
335
|
useDraftEditor?: boolean | undefined;
|
|
@@ -406,7 +407,7 @@ declare const InteractiveGraph: {
|
|
|
406
407
|
} & Record<string, unknown>) => void) | undefined;
|
|
407
408
|
customKeypad?: boolean | undefined;
|
|
408
409
|
useV2Keypad?: boolean | undefined;
|
|
409
|
-
nativeKeypadProxy?: (() =>
|
|
410
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
410
411
|
isMobile?: boolean | undefined;
|
|
411
412
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
412
413
|
useDraftEditor?: boolean | undefined;
|
|
@@ -523,7 +524,7 @@ declare const InteractiveGraph: {
|
|
|
523
524
|
} & Record<string, unknown>) => void) | undefined;
|
|
524
525
|
customKeypad?: boolean | undefined;
|
|
525
526
|
useV2Keypad?: boolean | undefined;
|
|
526
|
-
nativeKeypadProxy?: (() =>
|
|
527
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
527
528
|
isMobile?: boolean | undefined;
|
|
528
529
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
529
530
|
useDraftEditor?: boolean | undefined;
|
|
@@ -598,7 +599,7 @@ declare const InteractiveGraph: {
|
|
|
598
599
|
} & Record<string, unknown>) => void) | undefined;
|
|
599
600
|
customKeypad?: boolean | undefined;
|
|
600
601
|
useV2Keypad?: boolean | undefined;
|
|
601
|
-
nativeKeypadProxy?: (() =>
|
|
602
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
602
603
|
isMobile?: boolean | undefined;
|
|
603
604
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
604
605
|
useDraftEditor?: boolean | undefined;
|
|
@@ -670,7 +671,7 @@ declare const InteractiveGraph: {
|
|
|
670
671
|
} & Record<string, unknown>) => void) | undefined;
|
|
671
672
|
customKeypad?: boolean | undefined;
|
|
672
673
|
useV2Keypad?: boolean | undefined;
|
|
673
|
-
nativeKeypadProxy?: (() =>
|
|
674
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
674
675
|
isMobile?: boolean | undefined;
|
|
675
676
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
676
677
|
useDraftEditor?: boolean | undefined;
|
|
@@ -741,7 +742,7 @@ declare const InteractiveGraph: {
|
|
|
741
742
|
} & Record<string, unknown>) => void) | undefined;
|
|
742
743
|
customKeypad?: boolean | undefined;
|
|
743
744
|
useV2Keypad?: boolean | undefined;
|
|
744
|
-
nativeKeypadProxy?: (() =>
|
|
745
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
745
746
|
isMobile?: boolean | undefined;
|
|
746
747
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
747
748
|
useDraftEditor?: boolean | undefined;
|
|
@@ -811,7 +812,7 @@ declare const InteractiveGraph: {
|
|
|
811
812
|
} & Record<string, unknown>) => void) | undefined;
|
|
812
813
|
customKeypad?: boolean | undefined;
|
|
813
814
|
useV2Keypad?: boolean | undefined;
|
|
814
|
-
nativeKeypadProxy?: (() =>
|
|
815
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
815
816
|
isMobile?: boolean | undefined;
|
|
816
817
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
817
818
|
useDraftEditor?: boolean | undefined;
|
|
@@ -881,7 +882,7 @@ declare const InteractiveGraph: {
|
|
|
881
882
|
} & Record<string, unknown>) => void) | undefined;
|
|
882
883
|
customKeypad?: boolean | undefined;
|
|
883
884
|
useV2Keypad?: boolean | undefined;
|
|
884
|
-
nativeKeypadProxy?: (() =>
|
|
885
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
885
886
|
isMobile?: boolean | undefined;
|
|
886
887
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
887
888
|
useDraftEditor?: boolean | undefined;
|
|
@@ -952,7 +953,7 @@ declare const InteractiveGraph: {
|
|
|
952
953
|
} & Record<string, unknown>) => void) | undefined;
|
|
953
954
|
customKeypad?: boolean | undefined;
|
|
954
955
|
useV2Keypad?: boolean | undefined;
|
|
955
|
-
nativeKeypadProxy?: (() =>
|
|
956
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
956
957
|
isMobile?: boolean | undefined;
|
|
957
958
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
958
959
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1041,7 +1042,7 @@ declare const InteractiveGraph: {
|
|
|
1041
1042
|
} & Record<string, unknown>) => void) | undefined;
|
|
1042
1043
|
customKeypad?: boolean | undefined;
|
|
1043
1044
|
useV2Keypad?: boolean | undefined;
|
|
1044
|
-
nativeKeypadProxy?: (() =>
|
|
1045
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1045
1046
|
isMobile?: boolean | undefined;
|
|
1046
1047
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1047
1048
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1111,7 +1112,7 @@ declare const InteractiveGraph: {
|
|
|
1111
1112
|
} & Record<string, unknown>) => void) | undefined;
|
|
1112
1113
|
customKeypad?: boolean | undefined;
|
|
1113
1114
|
useV2Keypad?: boolean | undefined;
|
|
1114
|
-
nativeKeypadProxy?: (() =>
|
|
1115
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1115
1116
|
isMobile?: boolean | undefined;
|
|
1116
1117
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1117
1118
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1181,7 +1182,7 @@ declare const InteractiveGraph: {
|
|
|
1181
1182
|
} & Record<string, unknown>) => void) | undefined;
|
|
1182
1183
|
customKeypad?: boolean | undefined;
|
|
1183
1184
|
useV2Keypad?: boolean | undefined;
|
|
1184
|
-
nativeKeypadProxy?: (() =>
|
|
1185
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1185
1186
|
isMobile?: boolean | undefined;
|
|
1186
1187
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1187
1188
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1259,7 +1260,7 @@ declare const InteractiveGraph: {
|
|
|
1259
1260
|
} & Record<string, unknown>) => void) | undefined;
|
|
1260
1261
|
customKeypad?: boolean | undefined;
|
|
1261
1262
|
useV2Keypad?: boolean | undefined;
|
|
1262
|
-
nativeKeypadProxy?: (() =>
|
|
1263
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1263
1264
|
isMobile?: boolean | undefined;
|
|
1264
1265
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1265
1266
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1376,7 +1377,7 @@ declare const InteractiveGraph: {
|
|
|
1376
1377
|
} & Record<string, unknown>) => void) | undefined;
|
|
1377
1378
|
customKeypad?: boolean | undefined;
|
|
1378
1379
|
useV2Keypad?: boolean | undefined;
|
|
1379
|
-
nativeKeypadProxy?: (() =>
|
|
1380
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1380
1381
|
isMobile?: boolean | undefined;
|
|
1381
1382
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1382
1383
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1451,7 +1452,7 @@ declare const InteractiveGraph: {
|
|
|
1451
1452
|
} & Record<string, unknown>) => void) | undefined;
|
|
1452
1453
|
customKeypad?: boolean | undefined;
|
|
1453
1454
|
useV2Keypad?: boolean | undefined;
|
|
1454
|
-
nativeKeypadProxy?: (() =>
|
|
1455
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1455
1456
|
isMobile?: boolean | undefined;
|
|
1456
1457
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1457
1458
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1523,7 +1524,7 @@ declare const InteractiveGraph: {
|
|
|
1523
1524
|
} & Record<string, unknown>) => void) | undefined;
|
|
1524
1525
|
customKeypad?: boolean | undefined;
|
|
1525
1526
|
useV2Keypad?: boolean | undefined;
|
|
1526
|
-
nativeKeypadProxy?: (() =>
|
|
1527
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1527
1528
|
isMobile?: boolean | undefined;
|
|
1528
1529
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1529
1530
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1594,7 +1595,7 @@ declare const InteractiveGraph: {
|
|
|
1594
1595
|
} & Record<string, unknown>) => void) | undefined;
|
|
1595
1596
|
customKeypad?: boolean | undefined;
|
|
1596
1597
|
useV2Keypad?: boolean | undefined;
|
|
1597
|
-
nativeKeypadProxy?: (() =>
|
|
1598
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1598
1599
|
isMobile?: boolean | undefined;
|
|
1599
1600
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1600
1601
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1664,7 +1665,7 @@ declare const InteractiveGraph: {
|
|
|
1664
1665
|
} & Record<string, unknown>) => void) | undefined;
|
|
1665
1666
|
customKeypad?: boolean | undefined;
|
|
1666
1667
|
useV2Keypad?: boolean | undefined;
|
|
1667
|
-
nativeKeypadProxy?: (() =>
|
|
1668
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1668
1669
|
isMobile?: boolean | undefined;
|
|
1669
1670
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1670
1671
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1734,7 +1735,7 @@ declare const InteractiveGraph: {
|
|
|
1734
1735
|
} & Record<string, unknown>) => void) | undefined;
|
|
1735
1736
|
customKeypad?: boolean | undefined;
|
|
1736
1737
|
useV2Keypad?: boolean | undefined;
|
|
1737
|
-
nativeKeypadProxy?: (() =>
|
|
1738
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1738
1739
|
isMobile?: boolean | undefined;
|
|
1739
1740
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1740
1741
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1820,7 +1821,7 @@ declare const InteractiveGraph: {
|
|
|
1820
1821
|
} & Record<string, unknown>) => void) | undefined;
|
|
1821
1822
|
customKeypad?: boolean | undefined;
|
|
1822
1823
|
useV2Keypad?: boolean | undefined;
|
|
1823
|
-
nativeKeypadProxy?: (() =>
|
|
1824
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1824
1825
|
isMobile?: boolean | undefined;
|
|
1825
1826
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1826
1827
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1890,7 +1891,7 @@ declare const InteractiveGraph: {
|
|
|
1890
1891
|
} & Record<string, unknown>) => void) | undefined;
|
|
1891
1892
|
customKeypad?: boolean | undefined;
|
|
1892
1893
|
useV2Keypad?: boolean | undefined;
|
|
1893
|
-
nativeKeypadProxy?: (() =>
|
|
1894
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1894
1895
|
isMobile?: boolean | undefined;
|
|
1895
1896
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1896
1897
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1960,7 +1961,7 @@ declare const InteractiveGraph: {
|
|
|
1960
1961
|
} & Record<string, unknown>) => void) | undefined;
|
|
1961
1962
|
customKeypad?: boolean | undefined;
|
|
1962
1963
|
useV2Keypad?: boolean | undefined;
|
|
1963
|
-
nativeKeypadProxy?: (() =>
|
|
1964
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
1964
1965
|
isMobile?: boolean | undefined;
|
|
1965
1966
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
1966
1967
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2030,7 +2031,7 @@ declare const InteractiveGraph: {
|
|
|
2030
2031
|
} & Record<string, unknown>) => void) | undefined;
|
|
2031
2032
|
customKeypad?: boolean | undefined;
|
|
2032
2033
|
useV2Keypad?: boolean | undefined;
|
|
2033
|
-
nativeKeypadProxy?: (() =>
|
|
2034
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2034
2035
|
isMobile?: boolean | undefined;
|
|
2035
2036
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2036
2037
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2100,7 +2101,7 @@ declare const InteractiveGraph: {
|
|
|
2100
2101
|
} & Record<string, unknown>) => void) | undefined;
|
|
2101
2102
|
customKeypad?: boolean | undefined;
|
|
2102
2103
|
useV2Keypad?: boolean | undefined;
|
|
2103
|
-
nativeKeypadProxy?: (() =>
|
|
2104
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2104
2105
|
isMobile?: boolean | undefined;
|
|
2105
2106
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2106
2107
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2170,7 +2171,7 @@ declare const InteractiveGraph: {
|
|
|
2170
2171
|
} & Record<string, unknown>) => void) | undefined;
|
|
2171
2172
|
customKeypad?: boolean | undefined;
|
|
2172
2173
|
useV2Keypad?: boolean | undefined;
|
|
2173
|
-
nativeKeypadProxy?: (() =>
|
|
2174
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2174
2175
|
isMobile?: boolean | undefined;
|
|
2175
2176
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2176
2177
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2241,7 +2242,7 @@ declare const InteractiveGraph: {
|
|
|
2241
2242
|
} & Record<string, unknown>) => void) | undefined;
|
|
2242
2243
|
customKeypad?: boolean | undefined;
|
|
2243
2244
|
useV2Keypad?: boolean | undefined;
|
|
2244
|
-
nativeKeypadProxy?: (() =>
|
|
2245
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2245
2246
|
isMobile?: boolean | undefined;
|
|
2246
2247
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2247
2248
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2311,7 +2312,7 @@ declare const InteractiveGraph: {
|
|
|
2311
2312
|
} & Record<string, unknown>) => void) | undefined;
|
|
2312
2313
|
customKeypad?: boolean | undefined;
|
|
2313
2314
|
useV2Keypad?: boolean | undefined;
|
|
2314
|
-
nativeKeypadProxy?: (() =>
|
|
2315
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2315
2316
|
isMobile?: boolean | undefined;
|
|
2316
2317
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2317
2318
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2381,7 +2382,7 @@ declare const InteractiveGraph: {
|
|
|
2381
2382
|
} & Record<string, unknown>) => void) | undefined;
|
|
2382
2383
|
customKeypad?: boolean | undefined;
|
|
2383
2384
|
useV2Keypad?: boolean | undefined;
|
|
2384
|
-
nativeKeypadProxy?: (() =>
|
|
2385
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2385
2386
|
isMobile?: boolean | undefined;
|
|
2386
2387
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2387
2388
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2451,7 +2452,7 @@ declare const InteractiveGraph: {
|
|
|
2451
2452
|
} & Record<string, unknown>) => void) | undefined;
|
|
2452
2453
|
customKeypad?: boolean | undefined;
|
|
2453
2454
|
useV2Keypad?: boolean | undefined;
|
|
2454
|
-
nativeKeypadProxy?: (() =>
|
|
2455
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2455
2456
|
isMobile?: boolean | undefined;
|
|
2456
2457
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2457
2458
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2521,7 +2522,7 @@ declare const InteractiveGraph: {
|
|
|
2521
2522
|
} & Record<string, unknown>) => void) | undefined;
|
|
2522
2523
|
customKeypad?: boolean | undefined;
|
|
2523
2524
|
useV2Keypad?: boolean | undefined;
|
|
2524
|
-
nativeKeypadProxy?: (() =>
|
|
2525
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2525
2526
|
isMobile?: boolean | undefined;
|
|
2526
2527
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2527
2528
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2591,7 +2592,7 @@ declare const InteractiveGraph: {
|
|
|
2591
2592
|
} & Record<string, unknown>) => void) | undefined;
|
|
2592
2593
|
customKeypad?: boolean | undefined;
|
|
2593
2594
|
useV2Keypad?: boolean | undefined;
|
|
2594
|
-
nativeKeypadProxy?: (() =>
|
|
2595
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2595
2596
|
isMobile?: boolean | undefined;
|
|
2596
2597
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2597
2598
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2661,7 +2662,7 @@ declare const InteractiveGraph: {
|
|
|
2661
2662
|
} & Record<string, unknown>) => void) | undefined;
|
|
2662
2663
|
customKeypad?: boolean | undefined;
|
|
2663
2664
|
useV2Keypad?: boolean | undefined;
|
|
2664
|
-
nativeKeypadProxy?: (() =>
|
|
2665
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2665
2666
|
isMobile?: boolean | undefined;
|
|
2666
2667
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2667
2668
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2731,7 +2732,7 @@ declare const InteractiveGraph: {
|
|
|
2731
2732
|
} & Record<string, unknown>) => void) | undefined;
|
|
2732
2733
|
customKeypad?: boolean | undefined;
|
|
2733
2734
|
useV2Keypad?: boolean | undefined;
|
|
2734
|
-
nativeKeypadProxy?: (() =>
|
|
2735
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2735
2736
|
isMobile?: boolean | undefined;
|
|
2736
2737
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2737
2738
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2801,7 +2802,7 @@ declare const InteractiveGraph: {
|
|
|
2801
2802
|
} & Record<string, unknown>) => void) | undefined;
|
|
2802
2803
|
customKeypad?: boolean | undefined;
|
|
2803
2804
|
useV2Keypad?: boolean | undefined;
|
|
2804
|
-
nativeKeypadProxy?: (() =>
|
|
2805
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2805
2806
|
isMobile?: boolean | undefined;
|
|
2806
2807
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2807
2808
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2871,7 +2872,7 @@ declare const InteractiveGraph: {
|
|
|
2871
2872
|
} & Record<string, unknown>) => void) | undefined;
|
|
2872
2873
|
customKeypad?: boolean | undefined;
|
|
2873
2874
|
useV2Keypad?: boolean | undefined;
|
|
2874
|
-
nativeKeypadProxy?: (() =>
|
|
2875
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2875
2876
|
isMobile?: boolean | undefined;
|
|
2876
2877
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2877
2878
|
useDraftEditor?: boolean | undefined;
|
|
@@ -2941,7 +2942,7 @@ declare const InteractiveGraph: {
|
|
|
2941
2942
|
} & Record<string, unknown>) => void) | undefined;
|
|
2942
2943
|
customKeypad?: boolean | undefined;
|
|
2943
2944
|
useV2Keypad?: boolean | undefined;
|
|
2944
|
-
nativeKeypadProxy?: (() =>
|
|
2945
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
2945
2946
|
isMobile?: boolean | undefined;
|
|
2946
2947
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
2947
2948
|
useDraftEditor?: boolean | undefined;
|
|
@@ -3011,7 +3012,7 @@ declare const InteractiveGraph: {
|
|
|
3011
3012
|
} & Record<string, unknown>) => void) | undefined;
|
|
3012
3013
|
customKeypad?: boolean | undefined;
|
|
3013
3014
|
useV2Keypad?: boolean | undefined;
|
|
3014
|
-
nativeKeypadProxy?: (() =>
|
|
3015
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
3015
3016
|
isMobile?: boolean | undefined;
|
|
3016
3017
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
3017
3018
|
useDraftEditor?: boolean | undefined;
|
|
@@ -3081,7 +3082,7 @@ declare const InteractiveGraph: {
|
|
|
3081
3082
|
} & Record<string, unknown>) => void) | undefined;
|
|
3082
3083
|
customKeypad?: boolean | undefined;
|
|
3083
3084
|
useV2Keypad?: boolean | undefined;
|
|
3084
|
-
nativeKeypadProxy?: (() =>
|
|
3085
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
3085
3086
|
isMobile?: boolean | undefined;
|
|
3086
3087
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
3087
3088
|
useDraftEditor?: boolean | undefined;
|
|
@@ -3151,7 +3152,7 @@ declare const InteractiveGraph: {
|
|
|
3151
3152
|
} & Record<string, unknown>) => void) | undefined;
|
|
3152
3153
|
customKeypad?: boolean | undefined;
|
|
3153
3154
|
useV2Keypad?: boolean | undefined;
|
|
3154
|
-
nativeKeypadProxy?: (() =>
|
|
3155
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
3155
3156
|
isMobile?: boolean | undefined;
|
|
3156
3157
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
3157
3158
|
useDraftEditor?: boolean | undefined;
|
|
@@ -3221,7 +3222,7 @@ declare const InteractiveGraph: {
|
|
|
3221
3222
|
} & Record<string, unknown>) => void) | undefined;
|
|
3222
3223
|
customKeypad?: boolean | undefined;
|
|
3223
3224
|
useV2Keypad?: boolean | undefined;
|
|
3224
|
-
nativeKeypadProxy?: (() =>
|
|
3225
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
3225
3226
|
isMobile?: boolean | undefined;
|
|
3226
3227
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
3227
3228
|
useDraftEditor?: boolean | undefined;
|
|
@@ -3291,7 +3292,7 @@ declare const InteractiveGraph: {
|
|
|
3291
3292
|
} & Record<string, unknown>) => void) | undefined;
|
|
3292
3293
|
customKeypad?: boolean | undefined;
|
|
3293
3294
|
useV2Keypad?: boolean | undefined;
|
|
3294
|
-
nativeKeypadProxy?: (() =>
|
|
3295
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
3295
3296
|
isMobile?: boolean | undefined;
|
|
3296
3297
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
3297
3298
|
useDraftEditor?: boolean | undefined;
|
|
@@ -3362,7 +3363,7 @@ declare const InteractiveGraph: {
|
|
|
3362
3363
|
} & Record<string, unknown>) => void) | undefined;
|
|
3363
3364
|
customKeypad?: boolean | undefined;
|
|
3364
3365
|
useV2Keypad?: boolean | undefined;
|
|
3365
|
-
nativeKeypadProxy?: (() =>
|
|
3366
|
+
nativeKeypadProxy?: ((blur: () => void) => import("@khanacademy/math-input").KeypadAPI) | undefined;
|
|
3366
3367
|
isMobile?: boolean | undefined;
|
|
3367
3368
|
setDrawingAreaAvailable?: ((arg1: boolean) => unknown) | undefined;
|
|
3368
3369
|
useDraftEditor?: boolean | undefined;
|
|
@@ -1,32 +1,55 @@
|
|
|
1
|
-
import PropTypes from "prop-types";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
type
|
|
2
|
+
declare const plotTypes: string[];
|
|
3
|
+
type PlotType = typeof plotTypes[number];
|
|
4
|
+
declare const editingStates: string[];
|
|
5
|
+
type EditingState = typeof editingStates[number];
|
|
6
|
+
type Props = {
|
|
7
|
+
type: PlotType;
|
|
8
|
+
labels: Array<string>;
|
|
9
|
+
categories: ReadonlyArray<string | number>;
|
|
10
|
+
scaleY: number;
|
|
11
|
+
maxY: number;
|
|
12
|
+
snapsPerLine: number;
|
|
13
|
+
picSize: number;
|
|
14
|
+
picBoxHeight: number;
|
|
15
|
+
picUrl: string;
|
|
16
|
+
plotDimensions: ReadonlyArray<number>;
|
|
17
|
+
labelInterval: number;
|
|
18
|
+
starting: ReadonlyArray<number>;
|
|
19
|
+
correct: ReadonlyArray<number>;
|
|
20
|
+
static: boolean;
|
|
21
|
+
onChange: any;
|
|
22
|
+
};
|
|
23
|
+
type DefaultProps = {
|
|
24
|
+
scaleY: Props["scaleY"];
|
|
25
|
+
maxY: Props["maxY"];
|
|
26
|
+
snapsPerLine: Props["snapsPerLine"];
|
|
27
|
+
correct: Props["correct"];
|
|
28
|
+
starting: Props["starting"];
|
|
29
|
+
type: Props["type"];
|
|
30
|
+
labels: Props["labels"];
|
|
31
|
+
categories: Props["categories"];
|
|
32
|
+
picSize: Props["picSize"];
|
|
33
|
+
picBoxHeight: Props["picBoxHeight"];
|
|
34
|
+
plotDimensions: Props["plotDimensions"];
|
|
35
|
+
labelInterval: Props["labelInterval"];
|
|
36
|
+
picUrl: Props["picUrl"];
|
|
37
|
+
};
|
|
38
|
+
type State = {
|
|
39
|
+
editing: EditingState;
|
|
40
|
+
pic: any;
|
|
41
|
+
loadedUrl: string | null;
|
|
42
|
+
minX: number | null;
|
|
43
|
+
maxX: number | null;
|
|
44
|
+
tickStep: number | null;
|
|
45
|
+
};
|
|
5
46
|
declare class PlotterEditor extends React.Component<Props, State> {
|
|
6
|
-
static propTypes: {
|
|
7
|
-
readonly type: PropTypes.Requireable<string>;
|
|
8
|
-
readonly labels: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
9
|
-
readonly categories: PropTypes.Requireable<(NonNullable<string | number | null | undefined> | null | undefined)[]>;
|
|
10
|
-
readonly scaleY: PropTypes.Requireable<number>;
|
|
11
|
-
readonly maxY: PropTypes.Requireable<number>;
|
|
12
|
-
readonly snapsPerLine: PropTypes.Requireable<number>;
|
|
13
|
-
readonly picSize: PropTypes.Requireable<number>;
|
|
14
|
-
readonly pixBoxHeight: PropTypes.Requireable<number>;
|
|
15
|
-
readonly picUrl: PropTypes.Requireable<string>;
|
|
16
|
-
readonly plotDimensions: PropTypes.Requireable<(number | null | undefined)[]>;
|
|
17
|
-
readonly labelInterval: PropTypes.Requireable<number>;
|
|
18
|
-
readonly starting: PropTypes.Requireable<(number | null | undefined)[]>;
|
|
19
|
-
readonly correct: PropTypes.Requireable<(number | null | undefined)[]>;
|
|
20
|
-
readonly static: PropTypes.Requireable<boolean>;
|
|
21
|
-
readonly onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
-
};
|
|
23
47
|
static widgetName: "plotter";
|
|
24
|
-
static defaultProps:
|
|
48
|
+
static defaultProps: DefaultProps;
|
|
25
49
|
state: State;
|
|
26
50
|
UNSAFE_componentWillMount(): void;
|
|
27
51
|
UNSAFE_componentWillReceiveProps(nextProps: any): void;
|
|
28
52
|
fetchPic: (arg1: string) => any;
|
|
29
|
-
render(): React.ReactNode;
|
|
30
53
|
handleChangeTickStep: (arg1: number) => void;
|
|
31
54
|
handleChangeRange: (arg1: [number, number]) => void;
|
|
32
55
|
changeLabelInterval: (arg1: number) => void;
|
|
@@ -38,8 +61,9 @@ declare class PlotterEditor extends React.Component<Props, State> {
|
|
|
38
61
|
changeScale: (arg1: any) => void;
|
|
39
62
|
changeMax: (arg1: any) => void;
|
|
40
63
|
changeSnaps: (arg1: any) => void;
|
|
41
|
-
changeEditing: (arg1:
|
|
64
|
+
changeEditing: (arg1: EditingState) => void;
|
|
42
65
|
setCategoriesFromScale: () => void;
|
|
43
66
|
serialize: () => any;
|
|
67
|
+
render(): React.ReactNode;
|
|
44
68
|
}
|
|
45
69
|
export default PlotterEditor;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Perseus editors",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "2.6.
|
|
6
|
+
"version": "2.6.2",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -22,36 +22,36 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@khanacademy/kas": "^0.3.1",
|
|
25
|
-
"@khanacademy/kmath": "^0.1.
|
|
26
|
-
"@khanacademy/perseus": "^
|
|
25
|
+
"@khanacademy/kmath": "^0.1.2",
|
|
26
|
+
"@khanacademy/perseus": "^8.0.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@khanacademy/wonder-blocks-button": "^4.
|
|
30
|
-
"@khanacademy/wonder-blocks-clickable": "^
|
|
29
|
+
"@khanacademy/wonder-blocks-button": "^4.1.3",
|
|
30
|
+
"@khanacademy/wonder-blocks-clickable": "^4.0.0",
|
|
31
31
|
"@khanacademy/wonder-blocks-color": "^2.0.1",
|
|
32
|
-
"@khanacademy/wonder-blocks-core": "^
|
|
32
|
+
"@khanacademy/wonder-blocks-core": "^6.0.0",
|
|
33
33
|
"@khanacademy/wonder-blocks-i18n": "^2.0.2",
|
|
34
34
|
"@khanacademy/wonder-blocks-spacing": "^4.0.1",
|
|
35
|
-
"@khanacademy/wonder-blocks-typography": "^2.
|
|
35
|
+
"@khanacademy/wonder-blocks-typography": "^2.1.3",
|
|
36
36
|
"aphrodite": "^1.2.5",
|
|
37
37
|
"classnames": "^1.1.4",
|
|
38
38
|
"create-react-class": "^15.6.3",
|
|
39
39
|
"jquery": "^2.1.1",
|
|
40
40
|
"katex": "^0.11.1",
|
|
41
|
-
"perseus-build-settings": "^0.
|
|
41
|
+
"perseus-build-settings": "^0.2.0",
|
|
42
42
|
"prop-types": "^15.6.1",
|
|
43
43
|
"react": "16.14.0",
|
|
44
44
|
"react-dom": "16.14.0",
|
|
45
45
|
"underscore": "^1.4.4"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@khanacademy/wonder-blocks-button": "^4.
|
|
49
|
-
"@khanacademy/wonder-blocks-clickable": "^
|
|
48
|
+
"@khanacademy/wonder-blocks-button": "^4.1.3",
|
|
49
|
+
"@khanacademy/wonder-blocks-clickable": "^4.0.0",
|
|
50
50
|
"@khanacademy/wonder-blocks-color": "^2.0.1",
|
|
51
|
-
"@khanacademy/wonder-blocks-core": "^
|
|
51
|
+
"@khanacademy/wonder-blocks-core": "^6.0.0",
|
|
52
52
|
"@khanacademy/wonder-blocks-i18n": "^2.0.2",
|
|
53
53
|
"@khanacademy/wonder-blocks-spacing": "^4.0.1",
|
|
54
|
-
"@khanacademy/wonder-blocks-typography": "^2.
|
|
54
|
+
"@khanacademy/wonder-blocks-typography": "^2.1.3",
|
|
55
55
|
"aphrodite": "^1.2.5",
|
|
56
56
|
"classnames": "^1.1.4",
|
|
57
57
|
"create-react-class": "^15.6.3",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable react/prop-types */
|
|
2
|
-
import {ApiOptions
|
|
2
|
+
import {ApiOptions} from "@khanacademy/perseus";
|
|
3
3
|
import {View} from "@khanacademy/wonder-blocks-core";
|
|
4
4
|
import {action} from "@storybook/addon-actions";
|
|
5
5
|
import * as React from "react";
|
|
@@ -9,6 +9,8 @@ import {question1} from "../__testdata__/input-number.testdata";
|
|
|
9
9
|
import Editor from "../editor";
|
|
10
10
|
import {registerAllWidgetsAndEditorsForTesting} from "../util/register-all-widgets-and-editors-for-testing";
|
|
11
11
|
|
|
12
|
+
import type {PerseusRenderer} from "@khanacademy/perseus";
|
|
13
|
+
|
|
12
14
|
registerAllWidgetsAndEditorsForTesting(); // SIDE_EFFECTY!!!! :cry:
|
|
13
15
|
|
|
14
16
|
export default {
|
|
@@ -449,7 +449,7 @@ const exerciseImagesEverywhere = {
|
|
|
449
449
|
// from exerciseImagesEverywhere, but include the question and hints as if they
|
|
450
450
|
// were paragraphs in the article.
|
|
451
451
|
const articleImagesEverywhere = [exerciseImagesEverywhere.question].concat(
|
|
452
|
-
// @ts-expect-error
|
|
452
|
+
// @ts-expect-error - TS2769 - No overload matches this call.
|
|
453
453
|
exerciseImagesEverywhere.hints,
|
|
454
454
|
);
|
|
455
455
|
|