@khanacademy/perseus-editor 2.6.2 → 2.6.4

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/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.2",
6
+ "version": "2.6.4",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@khanacademy/kas": "^0.3.1",
25
25
  "@khanacademy/kmath": "^0.1.2",
26
- "@khanacademy/perseus": "^8.0.0"
26
+ "@khanacademy/perseus": "^10.0.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@khanacademy/wonder-blocks-button": "^4.1.3",
@@ -4,12 +4,11 @@ import Color from "@khanacademy/wonder-blocks-color";
4
4
  import {StyleSheet} from "aphrodite";
5
5
  import * as React from "react";
6
6
 
7
+ import type {PropsFor} from "@khanacademy/wonder-blocks-core";
8
+
7
9
  const {InlineIcon} = components;
8
10
 
9
- type InlineIconProps = JSX.LibraryManagedAttributes<
10
- typeof InlineIcon,
11
- React.ComponentProps<typeof InlineIcon>
12
- >;
11
+ type InlineIconProps = PropsFor<typeof InlineIcon>;
13
12
 
14
13
  type SectionControlButtonProps = {
15
14
  icon: InlineIconProps;
@@ -867,6 +867,12 @@ class MultiRendererEditor extends React.Component<MultiRendererEditorProps> {
867
867
  item={item}
868
868
  shape={itemShape}
869
869
  apiOptions={apiOptions}
870
+ // Today, with analytics being the only thing in
871
+ // dependencies, we send in a dummy function as we don't
872
+ // want to gather analytics events from within the editor.
873
+ dependencies={{
874
+ analytics: {onAnalyticsEvent: async () => {}},
875
+ }}
870
876
  >
871
877
  {({renderers}) => (
872
878
  <NodeContainer
@@ -7,6 +7,7 @@ import _ from "underscore";
7
7
  import BlurInput from "../components/blur-input";
8
8
 
9
9
  import type {ParsedValue, InputNumber} from "@khanacademy/perseus";
10
+ import type {PropsFor} from "@khanacademy/wonder-blocks-core";
10
11
 
11
12
  const {InfoTip} = components;
12
13
 
@@ -47,30 +48,14 @@ const answerTypes = {
47
48
 
48
49
  type Props = {
49
50
  value: number;
50
- simplify: JSX.LibraryManagedAttributes<
51
- typeof InputNumber.widget,
52
- React.ComponentProps<typeof InputNumber.widget>
53
- >["simplify"];
54
- size: JSX.LibraryManagedAttributes<
55
- typeof InputNumber.widget,
56
- React.ComponentProps<typeof InputNumber.widget>
57
- >["size"];
58
- inexact: JSX.LibraryManagedAttributes<
59
- typeof InputNumber.widget,
60
- React.ComponentProps<typeof InputNumber.widget>
61
- >["reviewModeRubric"]["inexact"];
62
- maxError: JSX.LibraryManagedAttributes<
63
- typeof InputNumber.widget,
64
- React.ComponentProps<typeof InputNumber.widget>
51
+ simplify: PropsFor<typeof InputNumber.widget>["simplify"];
52
+ size: PropsFor<typeof InputNumber.widget>["size"];
53
+ inexact: PropsFor<typeof InputNumber.widget>["reviewModeRubric"]["inexact"];
54
+ maxError: PropsFor<
55
+ typeof InputNumber.widget
65
56
  >["reviewModeRubric"]["maxError"];
66
- answerType: JSX.LibraryManagedAttributes<
67
- typeof InputNumber.widget,
68
- React.ComponentProps<typeof InputNumber.widget>
69
- >["answerType"];
70
- rightAlign: JSX.LibraryManagedAttributes<
71
- typeof InputNumber.widget,
72
- React.ComponentProps<typeof InputNumber.widget>
73
- >["rightAlign"];
57
+ answerType: PropsFor<typeof InputNumber.widget>["answerType"];
58
+ rightAlign: PropsFor<typeof InputNumber.widget>["rightAlign"];
74
59
  onChange: (arg1: {
75
60
  value?: ParsedValue | 0;
76
61
  simplify?: Props["simplify"];
@@ -24,17 +24,14 @@ import type {
24
24
  PerseusInteractiveGraphWidgetOptions,
25
25
  APIOptionsWithDefaults,
26
26
  } from "@khanacademy/perseus";
27
- import type {StyleType} from "@khanacademy/wonder-blocks-core";
27
+ import type {PropsFor, StyleType} from "@khanacademy/wonder-blocks-core";
28
28
 
29
29
  const {InfoTip} = components;
30
30
  const {containerSizeClass, getInteractiveBoxFromSizeClass} = SizingUtils;
31
31
  const DeprecationMixin = Util.DeprecationMixin;
32
32
  const InteractiveGraph = InteractiveGraphWidget.widget;
33
33
 
34
- type InteractiveGraphProps = JSX.LibraryManagedAttributes<
35
- typeof InteractiveGraph,
36
- React.ComponentProps<typeof InteractiveGraph>
37
- >;
34
+ type InteractiveGraphProps = PropsFor<typeof InteractiveGraph>;
38
35
 
39
36
  const defaultBackgroundImage = {
40
37
  url: null,