@khanacademy/perseus-core 20.2.0 → 20.3.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.item-splitting.js.map +1 -1
- package/dist/es/index.js +9 -5
- package/dist/es/index.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.item-splitting.js.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils/generators/video-widget-generator.d.ts +2 -0
- package/dist/utils/make-safe-url.d.ts +13 -0
- package/package.json +9 -6
package/dist/types.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export type InteractiveMarkerType = MarkerType & {
|
|
|
27
27
|
focused?: boolean;
|
|
28
28
|
};
|
|
29
29
|
export type Relationship = "eq" | "lt" | "gt" | "le" | "ge";
|
|
30
|
-
export type Alignment = "default" | "block" | "inline-block" | "inline" | "
|
|
30
|
+
export type Alignment = "default" | "block" | "inline-block" | "inline" | "wrap-left" | "wrap-right" | "full-width";
|
|
31
31
|
export type RecursiveReadonly<T> = {
|
|
32
32
|
readonly [K in keyof T]: RecursiveReadonly<T[K]>;
|
|
33
33
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Take the provided URL and make sure it can be parsed, it's of the
|
|
3
|
+
* expected origin, and has the specified locale.
|
|
4
|
+
*
|
|
5
|
+
* If it can't be parsed or if it's not of the expected origin, return null.
|
|
6
|
+
* Setting URL to null will display an error message in the iframe
|
|
7
|
+
*
|
|
8
|
+
* @param urlString - The URL to make safe.
|
|
9
|
+
* @param locale - The locale to use for the URL.
|
|
10
|
+
* @param expectedOrigin - The expected origin of the URL.
|
|
11
|
+
* @returns The safe URL, or null if the URL is not safe.
|
|
12
|
+
*/
|
|
13
|
+
export declare const makeSafeUrl: (urlString: string, locale: string, expectedOrigin: string) => URL | null;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Shared Perseus infrastructure",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "20.
|
|
6
|
+
"version": "20.3.0",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -37,19 +37,22 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"tiny-invariant": "1.3.1",
|
|
40
|
-
"@khanacademy/kas": "2.1.
|
|
41
|
-
"@khanacademy/perseus-utils": "2.1.
|
|
42
|
-
"@khanacademy/pure-markdown": "2.2.
|
|
40
|
+
"@khanacademy/kas": "2.1.6",
|
|
41
|
+
"@khanacademy/perseus-utils": "2.1.4",
|
|
42
|
+
"@khanacademy/pure-markdown": "2.2.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@khanacademy/wonder-stuff-core": "
|
|
45
|
+
"@khanacademy/wonder-stuff-core": "3.0.0",
|
|
46
46
|
"underscore": "1.4.4",
|
|
47
47
|
"perseus-build-settings": "0.9.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@khanacademy/wonder-stuff-core": "^
|
|
50
|
+
"@khanacademy/wonder-stuff-core": "^3.0.0",
|
|
51
51
|
"underscore": "^1.4.4"
|
|
52
52
|
},
|
|
53
53
|
"keywords": [],
|
|
54
|
+
"khan": {
|
|
55
|
+
"catalogHash": "5518368c71607fcf"
|
|
56
|
+
},
|
|
54
57
|
"scripts": {}
|
|
55
58
|
}
|