@khanacademy/perseus 77.0.2 → 77.0.3
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/components/graphie.d.ts +1 -0
- package/dist/es/index.js +7 -7
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/util/graphie.d.ts +8 -0
- package/dist/widget-type-utils.d.ts +9 -1
- package/package.json +7 -7
package/dist/util/graphie.d.ts
CHANGED
|
@@ -134,6 +134,14 @@ export declare class Graphie {
|
|
|
134
134
|
pageX?: number;
|
|
135
135
|
pageY?: number;
|
|
136
136
|
}>): Coord;
|
|
137
|
+
/**
|
|
138
|
+
* Lazily create a ResizeObserver on this.el so that when the container
|
|
139
|
+
* resizes (e.g. responsive images on window resize) the label margins,
|
|
140
|
+
* padding, and font-size are recalculated.
|
|
141
|
+
*/
|
|
142
|
+
private _ensureResizeObserver;
|
|
143
|
+
private _recalculateLabels;
|
|
144
|
+
cleanup(): void;
|
|
137
145
|
}
|
|
138
146
|
type RangeSpecifier = [Interval, Interval] | Coord | number;
|
|
139
147
|
export declare function normalizeRange(range: RangeSpecifier): [Interval, Interval];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PerseusWidget, type PerseusWidgetsMap } from "@khanacademy/perseus-core";
|
|
1
|
+
import { type PerseusWidget, type PerseusWidgetOptions, type PerseusWidgetsMap } from "@khanacademy/perseus-core";
|
|
2
2
|
/**
|
|
3
3
|
* Get a widget type by a widget's ID
|
|
4
4
|
* (please don't derive type from ID)
|
|
@@ -8,6 +8,14 @@ import { type PerseusWidget, type PerseusWidgetsMap } from "@khanacademy/perseus
|
|
|
8
8
|
* @returns {string} the widget type (ie "radio")
|
|
9
9
|
*/
|
|
10
10
|
export declare function getWidgetTypeByWidgetId(widgetId: string, widgetMap: PerseusWidgetsMap): string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Get the subtype of a widget based on its type and options.
|
|
13
|
+
*
|
|
14
|
+
* @param {string} widgetType the type of the widget (ie "radio", "interactive-graph")
|
|
15
|
+
* @param {Record<string, unknown>} widgetOptions the widget's options/props
|
|
16
|
+
* @returns {string | null} the widget subtype, or null if the widget type has no subtypes
|
|
17
|
+
*/
|
|
18
|
+
export declare function getWidgetSubType(widgetType: string, widgetOptions: PerseusWidgetOptions): string | null;
|
|
11
19
|
export declare function getWidgetSubTypeByWidgetId(widgetId: string, widgetMap: PerseusWidgetsMap): string | null;
|
|
12
20
|
/**
|
|
13
21
|
* Does the content have a specific type of widget?
|
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": "77.0.
|
|
6
|
+
"version": "77.0.3",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
"mafs": "0.19.0",
|
|
42
42
|
"tiny-invariant": "1.3.1",
|
|
43
43
|
"uuid": "^10.0.0",
|
|
44
|
-
"@khanacademy/keypad-context": "3.2.41",
|
|
45
|
-
"@khanacademy/kmath": "2.3.1",
|
|
46
|
-
"@khanacademy/perseus-core": "24.0.0",
|
|
47
44
|
"@khanacademy/kas": "2.2.1",
|
|
45
|
+
"@khanacademy/keypad-context": "3.2.41",
|
|
48
46
|
"@khanacademy/math-input": "26.4.11",
|
|
47
|
+
"@khanacademy/perseus-core": "24.0.0",
|
|
48
|
+
"@khanacademy/kmath": "2.3.1",
|
|
49
49
|
"@khanacademy/perseus-linter": "4.9.1",
|
|
50
|
-
"@khanacademy/perseus-score": "8.5.0",
|
|
51
|
-
"@khanacademy/pure-markdown": "2.2.7",
|
|
52
50
|
"@khanacademy/perseus-utils": "2.1.5",
|
|
53
|
-
"@khanacademy/
|
|
51
|
+
"@khanacademy/pure-markdown": "2.2.7",
|
|
52
|
+
"@khanacademy/simple-markdown": "2.2.2",
|
|
53
|
+
"@khanacademy/perseus-score": "8.5.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@khanacademy/wonder-blocks-announcer": "1.0.6",
|