@khanacademy/perseus 80.0.0 → 81.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/es/index.js +10 -10
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/renderer.new.d.ts +2 -2
- package/dist/renderer.old.d.ts +2 -2
- package/dist/types.d.ts +1 -1
- package/dist/widgets/image/image.class.d.ts +1 -30
- package/package.json +44 -44
package/dist/renderer.new.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ type Props = Partial<React.ContextType<typeof DependenciesContext>> & {
|
|
|
60
60
|
type State = {
|
|
61
61
|
translationLintErrors: ReadonlyArray<string>;
|
|
62
62
|
widgetInfo: Readonly<PerseusWidgetsMap>;
|
|
63
|
-
jiptContent:
|
|
63
|
+
jiptContent: string | null;
|
|
64
64
|
};
|
|
65
65
|
type DefaultProps = Required<Pick<Props, "alwaysUpdate" | "content" | "findExternalWidgets" | "images" | "linterContext" | "onRender" | "showSolutions" | "reviewMode" | "widgets">>;
|
|
66
66
|
declare class Renderer extends React.Component<Props, State> implements GetPromptJSONInterface {
|
|
@@ -148,7 +148,7 @@ declare class Renderer extends React.Component<Props, State> implements GetPromp
|
|
|
148
148
|
_onWidgetBlur: (id: string, blurPath: FocusPath) => void;
|
|
149
149
|
getContent: (props: Props, state: State) => any;
|
|
150
150
|
shouldRenderJiptPlaceholder: (props: Props, state: State) => boolean;
|
|
151
|
-
replaceJiptContent
|
|
151
|
+
replaceJiptContent(content: string, paragraphIndex?: number): void;
|
|
152
152
|
outputMarkdown: (ast: any, state: WidgetState) => React.ReactElement;
|
|
153
153
|
outputNested: (ast: any, state: WidgetState) => React.ReactElement;
|
|
154
154
|
outputNode: (node: any, nestedOutput: any, state: WidgetState) => any | null | React.ReactElement<React.ComponentProps<"div">> | React.ReactElement<React.ComponentProps<"span">> | React.ReactNode;
|
package/dist/renderer.old.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export type Props = Partial<React.ContextType<typeof DependenciesContext>> & {
|
|
|
60
60
|
type State = {
|
|
61
61
|
translationLintErrors: ReadonlyArray<string>;
|
|
62
62
|
widgetInfo: Readonly<PerseusWidgetsMap>;
|
|
63
|
-
jiptContent:
|
|
63
|
+
jiptContent: string | null;
|
|
64
64
|
};
|
|
65
65
|
type DefaultProps = Required<Pick<Props, "alwaysUpdate" | "content" | "findExternalWidgets" | "images" | "linterContext" | "onRender" | "showSolutions" | "reviewMode" | "widgets">>;
|
|
66
66
|
/**
|
|
@@ -159,7 +159,7 @@ declare class Renderer extends React.Component<Props, State> implements GetPromp
|
|
|
159
159
|
_onWidgetBlur: (id: string, blurPath: FocusPath) => void;
|
|
160
160
|
getContent: (props: Props, state: State) => any;
|
|
161
161
|
shouldRenderJiptPlaceholder: (props: Props, state: State) => boolean;
|
|
162
|
-
replaceJiptContent
|
|
162
|
+
replaceJiptContent(content: string, paragraphIndex?: number): void;
|
|
163
163
|
outputMarkdown: (ast: any, state: WidgetState) => React.ReactElement;
|
|
164
164
|
outputNested: (ast: any, state: WidgetState) => React.ReactElement;
|
|
165
165
|
outputNode: (node: any, nestedOutput: any, state: WidgetState) => any | null | React.ReactElement<React.ComponentProps<"div">> | React.ReactElement<React.ComponentProps<"span">> | React.ReactNode;
|
package/dist/types.d.ts
CHANGED
|
@@ -192,7 +192,7 @@ export type JiptLabelStore = {
|
|
|
192
192
|
addLabel: (label?: GraphieLabelElement, useMath?: boolean) => void;
|
|
193
193
|
};
|
|
194
194
|
export interface JiptRenderer {
|
|
195
|
-
replaceJiptContent
|
|
195
|
+
replaceJiptContent(content: string, paragraphIndex?: number): void;
|
|
196
196
|
}
|
|
197
197
|
type JiptTranslationComponents = {
|
|
198
198
|
addComponent: (renderer: JiptRenderer) => number;
|
|
@@ -3,39 +3,10 @@ import { PerseusI18nContext } from "../../components/i18n-context";
|
|
|
3
3
|
import type { WidgetProps, Widget } from "../../types";
|
|
4
4
|
import type { ImagePromptJSON } from "../../widget-ai-utils/image/image-ai-utils";
|
|
5
5
|
import type { PerseusImageWidgetOptions } from "@khanacademy/perseus-core";
|
|
6
|
-
type
|
|
7
|
-
export interface ImageWidgetProps extends ExternalProps {
|
|
8
|
-
alignment: NonNullable<ExternalProps["alignment"]>;
|
|
9
|
-
title: NonNullable<ExternalProps["title"]>;
|
|
10
|
-
range: NonNullable<ExternalProps["range"]>;
|
|
11
|
-
box: NonNullable<ExternalProps["box"]>;
|
|
12
|
-
backgroundImage: NonNullable<ExternalProps["backgroundImage"]>;
|
|
13
|
-
scale: NonNullable<ExternalProps["scale"]>;
|
|
14
|
-
labels: NonNullable<ExternalProps["labels"]>;
|
|
15
|
-
alt: NonNullable<ExternalProps["alt"]>;
|
|
16
|
-
longDescription: NonNullable<ExternalProps["longDescription"]>;
|
|
17
|
-
decorative: NonNullable<ExternalProps["decorative"]>;
|
|
18
|
-
caption: NonNullable<ExternalProps["caption"]>;
|
|
19
|
-
linterContext: NonNullable<ExternalProps["linterContext"]>;
|
|
20
|
-
}
|
|
21
|
-
interface DefaultProps extends Partial<ImageWidgetProps> {
|
|
22
|
-
alignment: ImageWidgetProps["alignment"];
|
|
23
|
-
title: ImageWidgetProps["title"];
|
|
24
|
-
range: ImageWidgetProps["range"];
|
|
25
|
-
box: ImageWidgetProps["box"];
|
|
26
|
-
backgroundImage: ImageWidgetProps["backgroundImage"];
|
|
27
|
-
scale: ImageWidgetProps["scale"];
|
|
28
|
-
labels: ImageWidgetProps["labels"];
|
|
29
|
-
alt: ImageWidgetProps["alt"];
|
|
30
|
-
longDescription: ImageWidgetProps["longDescription"];
|
|
31
|
-
decorative: ImageWidgetProps["decorative"];
|
|
32
|
-
caption: ImageWidgetProps["caption"];
|
|
33
|
-
linterContext: ImageWidgetProps["linterContext"];
|
|
34
|
-
}
|
|
6
|
+
export type ImageWidgetProps = WidgetProps<PerseusImageWidgetOptions>;
|
|
35
7
|
declare class ImageWidget extends React.Component<ImageWidgetProps> implements Widget {
|
|
36
8
|
static contextType: React.Context<import("../../components/i18n-context").I18nContextType>;
|
|
37
9
|
context: React.ContextType<typeof PerseusI18nContext>;
|
|
38
|
-
static defaultProps: DefaultProps;
|
|
39
10
|
isWidget: true;
|
|
40
11
|
getPromptJSON(): ImagePromptJSON;
|
|
41
12
|
render(): React.ReactNode;
|
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": "81.0.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -43,39 +43,39 @@
|
|
|
43
43
|
"tiny-invariant": "1.3.1",
|
|
44
44
|
"uuid": "^10.0.0",
|
|
45
45
|
"@khanacademy/kas": "2.2.3",
|
|
46
|
-
"@khanacademy/keypad-context": "3.2.
|
|
47
|
-
"@khanacademy/kmath": "2.4.
|
|
48
|
-
"@khanacademy/math-input": "26.6.
|
|
49
|
-
"@khanacademy/perseus-core": "
|
|
50
|
-
"@khanacademy/perseus-linter": "5.1.
|
|
51
|
-
"@khanacademy/perseus-score": "8.12.
|
|
46
|
+
"@khanacademy/keypad-context": "3.2.74",
|
|
47
|
+
"@khanacademy/kmath": "2.4.33",
|
|
48
|
+
"@khanacademy/math-input": "26.6.2",
|
|
49
|
+
"@khanacademy/perseus-core": "32.0.0",
|
|
50
|
+
"@khanacademy/perseus-linter": "5.1.14",
|
|
51
|
+
"@khanacademy/perseus-score": "8.12.6",
|
|
52
52
|
"@khanacademy/perseus-utils": "2.1.5",
|
|
53
53
|
"@khanacademy/pure-markdown": "2.3.0",
|
|
54
54
|
"@khanacademy/simple-markdown": "2.2.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@khanacademy/wonder-blocks-announcer": "1.1.1",
|
|
58
|
-
"@khanacademy/wonder-blocks-banner": "5.1.
|
|
59
|
-
"@khanacademy/wonder-blocks-button": "11.7.
|
|
60
|
-
"@khanacademy/wonder-blocks-clickable": "8.2.
|
|
58
|
+
"@khanacademy/wonder-blocks-banner": "5.1.9",
|
|
59
|
+
"@khanacademy/wonder-blocks-button": "11.7.5",
|
|
60
|
+
"@khanacademy/wonder-blocks-clickable": "8.2.7",
|
|
61
61
|
"@khanacademy/wonder-blocks-core": "12.4.4",
|
|
62
62
|
"@khanacademy/wonder-blocks-data": "15.0.2",
|
|
63
|
-
"@khanacademy/wonder-blocks-dropdown": "10.11.
|
|
64
|
-
"@khanacademy/wonder-blocks-form": "7.6.
|
|
65
|
-
"@khanacademy/wonder-blocks-icon": "5.3.
|
|
66
|
-
"@khanacademy/wonder-blocks-icon-button": "11.4.
|
|
67
|
-
"@khanacademy/wonder-blocks-labeled-field": "4.1.
|
|
68
|
-
"@khanacademy/wonder-blocks-layout": "3.1.
|
|
69
|
-
"@khanacademy/wonder-blocks-link": "10.3.
|
|
70
|
-
"@khanacademy/wonder-blocks-modal": "8.7.
|
|
71
|
-
"@khanacademy/wonder-blocks-pill": "3.1.
|
|
72
|
-
"@khanacademy/wonder-blocks-popover": "6.3.
|
|
73
|
-
"@khanacademy/wonder-blocks-progress-spinner": "3.1.
|
|
74
|
-
"@khanacademy/wonder-blocks-switch": "3.4.
|
|
63
|
+
"@khanacademy/wonder-blocks-dropdown": "10.11.6",
|
|
64
|
+
"@khanacademy/wonder-blocks-form": "7.6.8",
|
|
65
|
+
"@khanacademy/wonder-blocks-icon": "5.3.21",
|
|
66
|
+
"@khanacademy/wonder-blocks-icon-button": "11.4.3",
|
|
67
|
+
"@khanacademy/wonder-blocks-labeled-field": "4.1.7",
|
|
68
|
+
"@khanacademy/wonder-blocks-layout": "3.1.58",
|
|
69
|
+
"@khanacademy/wonder-blocks-link": "10.3.7",
|
|
70
|
+
"@khanacademy/wonder-blocks-modal": "8.7.9",
|
|
71
|
+
"@khanacademy/wonder-blocks-pill": "3.1.71",
|
|
72
|
+
"@khanacademy/wonder-blocks-popover": "6.3.9",
|
|
73
|
+
"@khanacademy/wonder-blocks-progress-spinner": "3.1.58",
|
|
74
|
+
"@khanacademy/wonder-blocks-switch": "3.4.7",
|
|
75
75
|
"@khanacademy/wonder-blocks-timing": "7.1.0",
|
|
76
|
-
"@khanacademy/wonder-blocks-tokens": "17.
|
|
77
|
-
"@khanacademy/wonder-blocks-tooltip": "4.1.
|
|
78
|
-
"@khanacademy/wonder-blocks-typography": "5.0.
|
|
76
|
+
"@khanacademy/wonder-blocks-tokens": "17.1.0",
|
|
77
|
+
"@khanacademy/wonder-blocks-tooltip": "4.1.84",
|
|
78
|
+
"@khanacademy/wonder-blocks-typography": "5.0.1",
|
|
79
79
|
"@khanacademy/wonder-stuff-core": "3.0.0",
|
|
80
80
|
"@phosphor-icons/core": "2.0.2",
|
|
81
81
|
"@popperjs/core": "2.10.2",
|
|
@@ -92,27 +92,27 @@
|
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@khanacademy/wonder-blocks-announcer": "^1.1.1",
|
|
95
|
-
"@khanacademy/wonder-blocks-banner": "^5.1.
|
|
96
|
-
"@khanacademy/wonder-blocks-button": "^11.7.
|
|
97
|
-
"@khanacademy/wonder-blocks-clickable": "^8.2.
|
|
95
|
+
"@khanacademy/wonder-blocks-banner": "^5.1.9",
|
|
96
|
+
"@khanacademy/wonder-blocks-button": "^11.7.5",
|
|
97
|
+
"@khanacademy/wonder-blocks-clickable": "^8.2.7",
|
|
98
98
|
"@khanacademy/wonder-blocks-core": "^12.4.4",
|
|
99
99
|
"@khanacademy/wonder-blocks-data": "^15.0.2",
|
|
100
|
-
"@khanacademy/wonder-blocks-dropdown": "^10.11.
|
|
101
|
-
"@khanacademy/wonder-blocks-form": "^7.6.
|
|
102
|
-
"@khanacademy/wonder-blocks-icon": "^5.3.
|
|
103
|
-
"@khanacademy/wonder-blocks-icon-button": "^11.4.
|
|
104
|
-
"@khanacademy/wonder-blocks-labeled-field": "^4.1.
|
|
105
|
-
"@khanacademy/wonder-blocks-layout": "^3.1.
|
|
106
|
-
"@khanacademy/wonder-blocks-link": "^10.3.
|
|
107
|
-
"@khanacademy/wonder-blocks-modal": "^8.7.
|
|
108
|
-
"@khanacademy/wonder-blocks-pill": "^3.1.
|
|
109
|
-
"@khanacademy/wonder-blocks-popover": "^6.3.
|
|
110
|
-
"@khanacademy/wonder-blocks-progress-spinner": "^3.1.
|
|
111
|
-
"@khanacademy/wonder-blocks-switch": "^3.4.
|
|
100
|
+
"@khanacademy/wonder-blocks-dropdown": "^10.11.6",
|
|
101
|
+
"@khanacademy/wonder-blocks-form": "^7.6.8",
|
|
102
|
+
"@khanacademy/wonder-blocks-icon": "^5.3.21",
|
|
103
|
+
"@khanacademy/wonder-blocks-icon-button": "^11.4.3",
|
|
104
|
+
"@khanacademy/wonder-blocks-labeled-field": "^4.1.7",
|
|
105
|
+
"@khanacademy/wonder-blocks-layout": "^3.1.58",
|
|
106
|
+
"@khanacademy/wonder-blocks-link": "^10.3.7",
|
|
107
|
+
"@khanacademy/wonder-blocks-modal": "^8.7.9",
|
|
108
|
+
"@khanacademy/wonder-blocks-pill": "^3.1.71",
|
|
109
|
+
"@khanacademy/wonder-blocks-popover": "^6.3.9",
|
|
110
|
+
"@khanacademy/wonder-blocks-progress-spinner": "^3.1.58",
|
|
111
|
+
"@khanacademy/wonder-blocks-switch": "^3.4.7",
|
|
112
112
|
"@khanacademy/wonder-blocks-timing": "^7.1.0",
|
|
113
|
-
"@khanacademy/wonder-blocks-tokens": "^17.
|
|
114
|
-
"@khanacademy/wonder-blocks-tooltip": "^4.1.
|
|
115
|
-
"@khanacademy/wonder-blocks-typography": "^5.0.
|
|
113
|
+
"@khanacademy/wonder-blocks-tokens": "^17.1.0",
|
|
114
|
+
"@khanacademy/wonder-blocks-tooltip": "^4.1.84",
|
|
115
|
+
"@khanacademy/wonder-blocks-typography": "^5.0.1",
|
|
116
116
|
"@khanacademy/wonder-stuff-core": "^3.0.0",
|
|
117
117
|
"@phosphor-icons/core": "^2.0.2",
|
|
118
118
|
"@popperjs/core": "^2.10.2",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
},
|
|
128
128
|
"keywords": [],
|
|
129
129
|
"khan": {
|
|
130
|
-
"catalogHash": "
|
|
130
|
+
"catalogHash": "1680f43b40dfea22"
|
|
131
131
|
},
|
|
132
132
|
"scripts": {}
|
|
133
133
|
}
|