@khanacademy/perseus 17.3.2 → 17.3.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/CHANGELOG.md +6 -0
- package/dist/es/index.css +12 -10
- package/dist/es/index.js +1 -1
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +12 -10
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/server-item-renderer.d.ts +5 -5
- package/package.json +1 -1
- package/src/server-item-renderer.tsx +5 -5
- package/src/styles/articles.less +20 -15
- package/tsconfig-build.tsbuildinfo +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as PerseusLinter from "@khanacademy/perseus-linter";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* renderer
|
|
5
|
-
*
|
|
3
|
+
* The main item (aka Exercise) renderer in Perseus. This component renders its
|
|
4
|
+
* question renderer and hints renderer using standard React practices (an
|
|
5
|
+
* earlier ItemRenderer component used to use jQuery and ReactDOM.render()ing
|
|
6
|
+
* to render into elements it didn't own.
|
|
6
7
|
*
|
|
7
|
-
* This
|
|
8
|
-
* exercise.
|
|
8
|
+
* This component is compatible with server-rendering of a perseus exercise.
|
|
9
9
|
*/
|
|
10
10
|
import * as React from "react";
|
|
11
11
|
import Renderer from "./renderer";
|
package/package.json
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import * as PerseusLinter from "@khanacademy/perseus-linter";
|
|
3
3
|
import {StyleSheet, css} from "aphrodite";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* renderer
|
|
7
|
-
*
|
|
5
|
+
* The main item (aka Exercise) renderer in Perseus. This component renders its
|
|
6
|
+
* question renderer and hints renderer using standard React practices (an
|
|
7
|
+
* earlier ItemRenderer component used to use jQuery and ReactDOM.render()ing
|
|
8
|
+
* to render into elements it didn't own.
|
|
8
9
|
*
|
|
9
|
-
* This
|
|
10
|
-
* exercise.
|
|
10
|
+
* This component is compatible with server-rendering of a perseus exercise.
|
|
11
11
|
*/
|
|
12
12
|
import * as React from "react";
|
|
13
13
|
import _ from "underscore";
|
package/src/styles/articles.less
CHANGED
|
@@ -2,7 +2,24 @@
|
|
|
2
2
|
@import "./variables.less";
|
|
3
3
|
@import "./util.less";
|
|
4
4
|
|
|
5
|
-
//
|
|
5
|
+
// Common styles for _all_ of Perseus
|
|
6
|
+
.framework-perseus {
|
|
7
|
+
code {
|
|
8
|
+
font-family: Courier, monospace;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
pre {
|
|
12
|
+
background-color: @gray95;
|
|
13
|
+
border-radius: 4px;
|
|
14
|
+
color: @gray17;
|
|
15
|
+
font-size: 18px;
|
|
16
|
+
padding: 16px;
|
|
17
|
+
white-space: pre;
|
|
18
|
+
overflow: auto;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Desktop Articles
|
|
6
23
|
.framework-perseus.perseus-article:not(.perseus-mobile) {
|
|
7
24
|
@textColor: #21242c;
|
|
8
25
|
.body-text() {
|
|
@@ -190,25 +207,12 @@
|
|
|
190
207
|
}
|
|
191
208
|
}
|
|
192
209
|
|
|
193
|
-
code {
|
|
194
|
-
font-family: Courier, monospace;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
210
|
pre {
|
|
198
|
-
background-color: @gray95;
|
|
199
|
-
border-radius: 4px;
|
|
200
|
-
color: @gray17;
|
|
201
|
-
font-size: 18px;
|
|
202
|
-
padding: 16px;
|
|
203
|
-
white-space: pre;
|
|
204
|
-
overflow: auto;
|
|
205
211
|
margin: 0 -16px 32px -16px;
|
|
206
212
|
}
|
|
207
213
|
}
|
|
208
214
|
|
|
209
|
-
//
|
|
210
|
-
// styles down below. However, those styles are limited to mobile devices
|
|
211
|
-
// only, so this block is for non-mobile devices.
|
|
215
|
+
// Desktop Exercises
|
|
212
216
|
.framework-perseus:not(.perseus-article):not(.perseus-mobile) {
|
|
213
217
|
// Mixins
|
|
214
218
|
.text(@fontSize; @lineHeight; @color) {
|
|
@@ -251,6 +255,7 @@
|
|
|
251
255
|
.choice-text(14px, 1.25);
|
|
252
256
|
}
|
|
253
257
|
|
|
258
|
+
// Mobile Articles and Exercises
|
|
254
259
|
.framework-perseus.perseus-mobile {
|
|
255
260
|
.perseus-article {
|
|
256
261
|
.perseus-widget-container {
|