@khanacademy/perseus 13.0.0 → 13.2.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/CHANGELOG.md +32 -0
- package/dist/es/index.css +0 -7
- package/dist/es/index.js +13 -1
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +0 -7
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/renderer.d.ts +2 -2
- package/dist/widgets/matcher.d.ts +1 -1
- package/package.json +35 -35
- package/src/__stories__/hints-renderer.stories.tsx +41 -44
- package/src/__tests__/__snapshots__/renderer.test.tsx.snap +9 -33
- package/src/__tests__/renderer-api.test.tsx +35 -52
- package/src/renderer.tsx +2 -2
- package/src/styles/khan-exercise.css +0 -2
- package/src/styles/perseus-renderer.less +0 -7
- package/src/widgets/__stories__/video.stories.tsx +9 -1
- package/src/widgets/__testdata__/video.testdata.ts +40 -0
- package/src/widgets/__tests__/__snapshots__/dropdown.test.ts.snap +6 -22
- package/src/widgets/__tests__/__snapshots__/graded-group-set-jipt.test.ts.snap +3 -3
- package/src/widgets/__tests__/__snapshots__/graded-group-set.test.ts.snap +1 -1
- package/src/widgets/__tests__/__snapshots__/graded-group.test.ts.snap +1 -1
- package/src/widgets/__tests__/__snapshots__/radio.test.ts.snap +4 -4
- package/src/widgets/__tests__/matcher.test.tsx +1 -1
- package/src/widgets/__tests__/video.test.ts +17 -1
- package/src/widgets/matcher.tsx +1 -1
- package/src/widgets/radio/choice.tsx +1 -0
- package/src/widgets/video.tsx +11 -0
- package/tsconfig-build.tsbuildinfo +1 -1
package/dist/index.css
CHANGED
|
@@ -130,8 +130,6 @@ div.definition {
|
|
|
130
130
|
|
|
131
131
|
#problemarea {
|
|
132
132
|
font-size: 14px;
|
|
133
|
-
width: 70%;
|
|
134
|
-
min-height: 378px;
|
|
135
133
|
position: relative;
|
|
136
134
|
float: left;
|
|
137
135
|
padding-bottom: 38px;
|
|
@@ -2366,11 +2364,6 @@ img.zoom-img {
|
|
|
2366
2364
|
.framework-perseus.perseus-mobile .perseus-input-right-align .keypad-input {
|
|
2367
2365
|
text-align: right;
|
|
2368
2366
|
}
|
|
2369
|
-
.framework-perseus #problemarea input,
|
|
2370
|
-
.framework-perseus #problemarea button {
|
|
2371
|
-
position: relative;
|
|
2372
|
-
z-index: 3;
|
|
2373
|
-
}
|
|
2374
2367
|
.framework-perseus div.paragraph {
|
|
2375
2368
|
font-family: "Lato", sans-serif;
|
|
2376
2369
|
font-weight: 400;
|
package/dist/index.js
CHANGED
|
@@ -23001,6 +23001,7 @@ const styles$r = aphrodite.StyleSheet.create({
|
|
|
23001
23001
|
padding: intermediateCheckboxPadding,
|
|
23002
23002
|
paddingTop: 0,
|
|
23003
23003
|
marginLeft: 54,
|
|
23004
|
+
color: Color__default["default"].offBlack64,
|
|
23004
23005
|
[mediaQueries.smOrSmaller]: {
|
|
23005
23006
|
padding: intermediateCheckboxPaddingPhone,
|
|
23006
23007
|
paddingTop: 0
|
|
@@ -44070,6 +44071,7 @@ const DEFAULT_HEIGHT = 720;
|
|
|
44070
44071
|
const KA_EMBED = "{host}/embed_video?slug={slug}" + "&internal_video_only=1";
|
|
44071
44072
|
const IS_URL = /^https?:\/\//;
|
|
44072
44073
|
const IS_KA_SITE = /(khanacademy\.org|localhost)/;
|
|
44074
|
+
const IS_VIMEO = /(vimeo\.com)/;
|
|
44073
44075
|
|
|
44074
44076
|
// exports has no 'transform'
|
|
44075
44077
|
|
|
@@ -44117,6 +44119,16 @@ class Video extends React__namespace.Component {
|
|
|
44117
44119
|
let url;
|
|
44118
44120
|
if (IS_URL.test(location)) {
|
|
44119
44121
|
url = location;
|
|
44122
|
+
if (IS_VIMEO.test(url)) {
|
|
44123
|
+
// If this is a vimeo video, we need to add the query string
|
|
44124
|
+
// parameter "dnt" so that analytics/tracking cookies aren't set.
|
|
44125
|
+
// https://help.vimeo.com/hc/en-us/articles/12426260232977-Player-parameters-overview
|
|
44126
|
+
if (url.indexOf("?") === -1) {
|
|
44127
|
+
url += "?dnt=1";
|
|
44128
|
+
} else {
|
|
44129
|
+
url += "&dnt=1";
|
|
44130
|
+
}
|
|
44131
|
+
}
|
|
44120
44132
|
} else {
|
|
44121
44133
|
url = KA_EMBED.replace("{slug}", location);
|
|
44122
44134
|
let embedHostname = "https://www.khanacademy.org";
|
|
@@ -44197,7 +44209,7 @@ const init = function (options) {
|
|
|
44197
44209
|
|
|
44198
44210
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
44199
44211
|
const libName = "@khanacademy/perseus";
|
|
44200
|
-
const libVersion = "13.
|
|
44212
|
+
const libVersion = "13.2.0";
|
|
44201
44213
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
44202
44214
|
|
|
44203
44215
|
const apiVersion = {
|