@khanacademy/perseus 90.2.0 → 91.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/types.d.ts CHANGED
@@ -297,7 +297,6 @@ type WidgetOptions = any;
297
297
  export type WidgetExports<T extends React.ComponentType<any> & Widget = React.ComponentType<any>, TUserInput = Empty> = Readonly<{
298
298
  name: string;
299
299
  displayName: string;
300
- getWidget?: () => T;
301
300
  widget: T;
302
301
  /** Supresses widget from showing up in the dropdown in the content editor */
303
302
  hidden?: boolean;
@@ -15,6 +15,7 @@ type AnswerChoicesProps = {
15
15
  opener: PropsFor<typeof SingleSelect>["opener"];
16
16
  onToggle: (opened: boolean) => unknown;
17
17
  disabled: boolean;
18
+ "aria-required"?: boolean;
18
19
  };
19
20
  declare const AnswerChoices: (props: AnswerChoicesProps) => React.JSX.Element;
20
21
  export default AnswerChoices;
@@ -4,12 +4,10 @@
4
4
  * The target for labeling question image with answers.
5
5
  */
6
6
  import * as React from "react";
7
- import { PerseusI18nContext } from "../../components/i18n-context";
8
7
  import type { CSSProperties } from "aphrodite";
9
8
  type Props = {
10
9
  selected?: string[];
11
10
  showCorrectness?: "correct" | "incorrect";
12
- label: string;
13
11
  showSelected: boolean;
14
12
  showPulsate: boolean;
15
13
  answerSide: "top" | "bottom" | "left" | "right";
@@ -19,8 +17,6 @@ type Props = {
19
17
  hovered: boolean;
20
18
  };
21
19
  export default class Marker extends React.Component<Props> {
22
- static contextType: React.Context<import("../../components/i18n-context").I18nContextType>;
23
- context: React.ContextType<typeof PerseusI18nContext>;
24
20
  _icon: HTMLElement | null | undefined;
25
21
  _mounted: boolean;
26
22
  static defaultProps: {
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ import type { StyleType } from "@khanacademy/wonder-blocks-core";
3
+ type Props = {
4
+ /**
5
+ * The unique identifier for the pill.
6
+ */
7
+ id?: string;
8
+ /**
9
+ * The content to display within the pill.
10
+ */
11
+ children: React.ReactNode;
12
+ /**
13
+ * Called when the pill is clicked.
14
+ */
15
+ onClick?: () => unknown;
16
+ /**
17
+ * Custom styles to add to this pill component.
18
+ */
19
+ style?: StyleType;
20
+ };
21
+ declare const Pill: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement | HTMLButtonElement>>;
22
+ export default Pill;
@@ -1,17 +1,11 @@
1
- import * as React from "react";
2
- import type { PerseusItem } from "@khanacademy/perseus-core";
3
- export declare const mockedAssetItem: PerseusItem;
4
- /**
5
- * This is a Mock Asset Loading Perseus widget, which is used specifically for
6
- * our server-item-renderer tests to test the asset loading callbacks.
7
- */
8
- export declare class MockAssetLoadingWidget extends React.Component<Record<any, any>> {
9
- setAssetStatus: ((assetKey: string, loaded: boolean) => void) | null;
10
- render(): React.ReactNode;
11
- }
1
+ import React from "react";
2
+ import type { Widget } from "../../types";
3
+ export type MockAssetLoadingWidgetHandle = Widget & {
4
+ setAssetStatus: (assetKey: string, loaded: boolean) => void;
5
+ };
12
6
  declare const _default: {
13
7
  name: string;
14
8
  displayName: string;
15
- widget: typeof MockAssetLoadingWidget;
9
+ widget: React.ForwardRefExoticComponent<Omit<Record<any, any>, "ref"> & React.RefAttributes<MockAssetLoadingWidgetHandle>>;
16
10
  };
17
11
  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": "90.2.0",
6
+ "version": "91.0.0",
7
7
  "publishConfig": {
8
8
  "access": "public"
9
9
  },
@@ -35,12 +35,12 @@
35
35
  "tiny-invariant": "1.3.1",
36
36
  "uuid": "^10.0.0",
37
37
  "@khanacademy/kas": "3.0.0",
38
- "@khanacademy/keypad-context": "6.0.3",
39
- "@khanacademy/kmath": "3.0.4",
40
- "@khanacademy/math-input": "30.0.4",
41
- "@khanacademy/perseus-core": "41.1.0",
42
- "@khanacademy/perseus-linter": "6.1.1",
43
- "@khanacademy/perseus-score": "9.0.4",
38
+ "@khanacademy/keypad-context": "6.0.4",
39
+ "@khanacademy/kmath": "3.0.5",
40
+ "@khanacademy/math-input": "30.0.5",
41
+ "@khanacademy/perseus-core": "41.2.0",
42
+ "@khanacademy/perseus-linter": "6.1.2",
43
+ "@khanacademy/perseus-score": "9.0.5",
44
44
  "@khanacademy/perseus-utils": "3.0.0",
45
45
  "@khanacademy/pure-markdown": "3.0.0",
46
46
  "@khanacademy/simple-markdown": "4.0.0"
@@ -60,7 +60,6 @@
60
60
  "@khanacademy/wonder-blocks-layout": "3.1.62",
61
61
  "@khanacademy/wonder-blocks-link": "10.4.1",
62
62
  "@khanacademy/wonder-blocks-modal": "8.9.0",
63
- "@khanacademy/wonder-blocks-pill": "3.1.78",
64
63
  "@khanacademy/wonder-blocks-popover": "7.0.0",
65
64
  "@khanacademy/wonder-blocks-progress-spinner": "3.1.62",
66
65
  "@khanacademy/wonder-blocks-switch": "3.4.14",
@@ -96,7 +95,6 @@
96
95
  "@khanacademy/wonder-blocks-layout": "^3.1.62",
97
96
  "@khanacademy/wonder-blocks-link": "^10.4.1",
98
97
  "@khanacademy/wonder-blocks-modal": "^8.9.0",
99
- "@khanacademy/wonder-blocks-pill": "^3.1.78",
100
98
  "@khanacademy/wonder-blocks-popover": "^7.0.0",
101
99
  "@khanacademy/wonder-blocks-progress-spinner": "^3.1.62",
102
100
  "@khanacademy/wonder-blocks-switch": "^3.4.14",
@@ -117,7 +115,7 @@
117
115
  },
118
116
  "keywords": [],
119
117
  "khan": {
120
- "catalogHash": "e8edf77dbb8ea2a1"
118
+ "catalogHash": "7484f91061a1760b"
121
119
  },
122
120
  "scripts": {}
123
121
  }