@khanacademy/perseus 2.0.1 → 3.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/CHANGELOG.md +17 -0
- package/dist/es/index.css +2 -66
- package/dist/es/index.js +18698 -18817
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +2 -66
- package/dist/index.js +18750 -18869
- package/dist/index.js.map +1 -1
- package/package.json +34 -34
- package/src/components/graph.jsx +0 -2
- package/src/components/math-input.jsx +163 -152
- package/src/components/tex-buttons.jsx +7 -9
- package/src/components/tooltip.jsx +0 -3
- package/src/components/zoomable.jsx +0 -10
- package/src/hint-renderer.jsx +4 -7
- package/src/interactive2/movable-point.jsx +0 -4
- package/src/interactive2/wrapped-ellipse.js +0 -1
- package/src/perseus-api.jsx +0 -7
- package/src/styles/articles.less +0 -4
- package/src/styles/khan-exercise.css +1 -33
- package/src/styles/perseus-renderer.less +1 -10
- package/src/styles/widgets/expression.less +0 -2
- package/src/styles/widgets/orderer.less +1 -1
- package/src/styles/widgets/plotter.less +0 -4
- package/src/styles/widgets/sortable.less +0 -14
- package/src/types.js +0 -6
- package/src/widgets/__stories__/unit.stories.jsx +0 -16
- package/src/widgets/__tests__/__snapshots__/input-number_test.jsx.snap +0 -481
- package/src/widgets/__tests__/__snapshots__/number-line_test.jsx.snap +1 -1
- package/src/widgets/__tests__/__snapshots__/unit_test.jsx.snap +20 -0
- package/src/widgets/__tests__/__snapshots__/video_test.jsx.snap +2 -2
- package/src/widgets/__tests__/expression_test.jsx +0 -10
- package/src/widgets/__tests__/input-number_test.jsx +0 -8
- package/src/widgets/__tests__/numeric-input_test.jsx +0 -11
- package/src/widgets/__tests__/unit_test.jsx +146 -121
- package/src/widgets/expression.jsx +2 -25
- package/src/widgets/input-number.jsx +2 -12
- package/src/widgets/matrix.jsx +4 -20
- package/src/widgets/number-line.jsx +0 -3
- package/src/widgets/numeric-input.jsx +1 -8
- package/src/widgets/radio/choice.jsx +2 -11
- package/src/widgets/simulator.jsx +2 -8
- package/src/widgets/table.jsx +0 -8
- package/src/widgets/transformer.jsx +0 -4
- package/src/widgets/unit.jsx +36 -51
- package/src/widgets/__tests__/__snapshots__/expression_test.jsx.snap +0 -38
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @khanacademy/perseus
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 8ca2a1a6: API change: remove staticRender from ApiOptions
|
|
8
|
+
|
|
9
|
+
## 2.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 2c843b38: Update to use wonder-blocks deps after migrating wonder-blocks to TS
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [2c843b38]
|
|
18
|
+
- @khanacademy/math-input@0.6.8
|
|
19
|
+
|
|
3
20
|
## 2.0.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/es/index.css
CHANGED
|
@@ -16,8 +16,6 @@ div.subhint {
|
|
|
16
16
|
border: 1px solid #aaaaaa;
|
|
17
17
|
background: #f9f9f9;
|
|
18
18
|
display: none;
|
|
19
|
-
-moz-border-radius: 4px;
|
|
20
|
-
-webkit-border-radius: 4px;
|
|
21
19
|
border-radius: 4px;
|
|
22
20
|
margin-left: 20px;
|
|
23
21
|
margin-right: 20px;
|
|
@@ -39,8 +37,6 @@ div.definition {
|
|
|
39
37
|
border: 1px solid #aaaaaa;
|
|
40
38
|
background: #f9f9f9;
|
|
41
39
|
display: none;
|
|
42
|
-
-moz-border-radius: 4px;
|
|
43
|
-
-webkit-border-radius: 4px;
|
|
44
40
|
border-radius: 4px;
|
|
45
41
|
margin-left: 20px;
|
|
46
42
|
margin-right: 20px;
|
|
@@ -152,9 +148,6 @@ body.debug .graphie { outline: 1px dashed #fdd; }
|
|
|
152
148
|
padding-bottom: 40px;
|
|
153
149
|
}
|
|
154
150
|
#scratchpad div {
|
|
155
|
-
-moz-box-sizing: border-box;
|
|
156
|
-
-ms-box-sizing: border-box;
|
|
157
|
-
-webkit-box-sizing: border-box;
|
|
158
151
|
box-sizing: border-box;
|
|
159
152
|
border: 1px solid #ccc;
|
|
160
153
|
height: 100%;
|
|
@@ -232,7 +225,6 @@ body.debug .graphie { outline: 1px dashed #fdd; }
|
|
|
232
225
|
|
|
233
226
|
#answer_area .calculator .history input {
|
|
234
227
|
box-sizing: border-box;
|
|
235
|
-
-moz-box-sizing: border-box;
|
|
236
228
|
display: block;
|
|
237
229
|
font: inherit;
|
|
238
230
|
margin: 5px 3px 3px;
|
|
@@ -362,8 +354,6 @@ body.debug .graphie { outline: 1px dashed #fdd; }
|
|
|
362
354
|
list-style: none;
|
|
363
355
|
border: 1px solid rgba(0, 0, 0, 0.3);
|
|
364
356
|
padding-left: 10px;
|
|
365
|
-
-moz-border-radius: 5px;
|
|
366
|
-
-webkit-border-radius: 5px;
|
|
367
357
|
border-radius: 5px;
|
|
368
358
|
line-height: 22px;
|
|
369
359
|
margin-bottom: 3px;
|
|
@@ -407,8 +397,6 @@ var, div.graphie {
|
|
|
407
397
|
padding: 2px 5px;
|
|
408
398
|
border: 1px solid #999;
|
|
409
399
|
border-radius: 4px;
|
|
410
|
-
-webkit-border-radius: 4px;
|
|
411
|
-
-moz-border-radius: 4px;
|
|
412
400
|
float: left;
|
|
413
401
|
cursor: pointer;
|
|
414
402
|
color: white;
|
|
@@ -606,7 +594,7 @@ html.exercise-browser {
|
|
|
606
594
|
top: 12px;
|
|
607
595
|
padding: 0px;
|
|
608
596
|
border: none;
|
|
609
|
-
|
|
597
|
+
box-shadow: none;
|
|
610
598
|
overflow: visible;
|
|
611
599
|
}
|
|
612
600
|
|
|
@@ -729,9 +717,6 @@ html.exercise-browser {
|
|
|
729
717
|
|
|
730
718
|
#timelinecontainer .simple-button {
|
|
731
719
|
-webkit-user-select: none;
|
|
732
|
-
-khtml-user-select: none;
|
|
733
|
-
-moz-user-select: none;
|
|
734
|
-
-o-user-select: none;
|
|
735
720
|
user-select: none;
|
|
736
721
|
white-space: nowrap;
|
|
737
722
|
}
|
|
@@ -754,8 +739,6 @@ html.exercise-browser {
|
|
|
754
739
|
width: 200px;
|
|
755
740
|
height: 100px;
|
|
756
741
|
border: 1px solid #aaa;
|
|
757
|
-
-webkit-box-shadow: 0 0 3px #ccc;
|
|
758
|
-
-moz-box-shadow: 0 0 3px #ccc;
|
|
759
742
|
box-shadow: 0 0 3px #ccc;
|
|
760
743
|
margin-left: 14px; /* to line up with other titles */
|
|
761
744
|
margin-bottom: 8px;
|
|
@@ -800,8 +783,6 @@ html.exercise-browser {
|
|
|
800
783
|
z-index: 2;
|
|
801
784
|
|
|
802
785
|
box-shadow: 0 1px 2px #ccc;
|
|
803
|
-
-moz-box-shadow: 0 1px 2px #ccc;
|
|
804
|
-
-webkit-box-shadow: 0 1px 2px #ccc;
|
|
805
786
|
}
|
|
806
787
|
|
|
807
788
|
.sortable > ul {
|
|
@@ -813,8 +794,6 @@ html.exercise-browser {
|
|
|
813
794
|
border: 1px solid #b9b9b9;
|
|
814
795
|
border-bottom-color: #939393;
|
|
815
796
|
border-radius: 4px;
|
|
816
|
-
-moz-border-radius: 4px;
|
|
817
|
-
-webkit-border-radius: 4px;
|
|
818
797
|
cursor: pointer;
|
|
819
798
|
margin-right: 4px;
|
|
820
799
|
min-width: 65px;
|
|
@@ -823,9 +802,6 @@ html.exercise-browser {
|
|
|
823
802
|
font-size: 1.2em;
|
|
824
803
|
float: left;
|
|
825
804
|
-webkit-user-select: none;
|
|
826
|
-
-khtml-user-select: none;
|
|
827
|
-
-moz-user-select: none;
|
|
828
|
-
-o-user-select: none;
|
|
829
805
|
user-select: none;
|
|
830
806
|
}
|
|
831
807
|
|
|
@@ -844,10 +820,6 @@ html.exercise-browser {
|
|
|
844
820
|
.sortable > ul > li:hover {
|
|
845
821
|
border-color: #ffa500;
|
|
846
822
|
box-shadow: 0 0 4px #c56f00;
|
|
847
|
-
-moz-box-shadow: 0 0 4px #c56f00;
|
|
848
|
-
-ms-box-shadow: 0 0 4px #c56f00;
|
|
849
|
-
-o-box-shadow: 0 0 4px #c56f00;
|
|
850
|
-
-webkit-box-shadow: 0 0 4px #c56f00;
|
|
851
823
|
}
|
|
852
824
|
|
|
853
825
|
.sortable > ul > li:active, .sortable > ul > li.dragging {
|
|
@@ -861,8 +833,6 @@ html.exercise-browser {
|
|
|
861
833
|
border: 0;
|
|
862
834
|
border-bottom: 0;
|
|
863
835
|
box-shadow: 0 0 0;
|
|
864
|
-
-moz-box-shadow: 0 0 0;
|
|
865
|
-
-webkit-box-shadow: 0 0 0;
|
|
866
836
|
padding-right: 0;
|
|
867
837
|
}
|
|
868
838
|
|
|
@@ -895,8 +865,6 @@ html.exercise-browser {
|
|
|
895
865
|
.qhint {
|
|
896
866
|
border: 1px solid #aaaaaa;
|
|
897
867
|
background: #f9f9f9;
|
|
898
|
-
-moz-border-radius: 4px;
|
|
899
|
-
-webkit-border-radius: 4px;
|
|
900
868
|
border-radius: 4px;
|
|
901
869
|
margin-right: 20px;
|
|
902
870
|
margin-bottom: 20px;
|
|
@@ -2183,8 +2151,6 @@ img.zoom-img {
|
|
|
2183
2151
|
cursor: -moz-zoom-out;
|
|
2184
2152
|
}
|
|
2185
2153
|
.zoom-transition {
|
|
2186
|
-
-webkit-transition: transform 300ms ease;
|
|
2187
|
-
-ms-transition: transform 300ms ease;
|
|
2188
2154
|
transition: transform 300ms ease;
|
|
2189
2155
|
}
|
|
2190
2156
|
.zoom-overlay {
|
|
@@ -2214,8 +2180,6 @@ img.zoom-img {
|
|
|
2214
2180
|
bottom: 0;
|
|
2215
2181
|
background: white;
|
|
2216
2182
|
opacity: 0;
|
|
2217
|
-
-webkit-transition: opacity 300ms;
|
|
2218
|
-
-ms-transition: opacity 300ms;
|
|
2219
2183
|
transition: opacity 300ms;
|
|
2220
2184
|
}
|
|
2221
2185
|
.zoom-overlay-open > .zoom-backdrop {
|
|
@@ -2228,10 +2192,7 @@ img.zoom-img {
|
|
|
2228
2192
|
margin-top: 48px;
|
|
2229
2193
|
}
|
|
2230
2194
|
.no-select {
|
|
2231
|
-
-moz-user-select: -moz-none;
|
|
2232
|
-
-khtml-user-select: none;
|
|
2233
2195
|
-webkit-user-select: none;
|
|
2234
|
-
-o-user-select: none;
|
|
2235
2196
|
user-select: none;
|
|
2236
2197
|
}
|
|
2237
2198
|
.blank-background {
|
|
@@ -2252,10 +2213,7 @@ img.zoom-img {
|
|
|
2252
2213
|
background: #ffffff;
|
|
2253
2214
|
}
|
|
2254
2215
|
.graphie {
|
|
2255
|
-
-moz-user-select: -moz-none;
|
|
2256
|
-
-khtml-user-select: none;
|
|
2257
2216
|
-webkit-user-select: none;
|
|
2258
|
-
-o-user-select: none;
|
|
2259
2217
|
user-select: none;
|
|
2260
2218
|
}
|
|
2261
2219
|
.perseus-interactive,
|
|
@@ -2645,8 +2603,6 @@ body.mobile .categorizer-container td.category input[type="radio"] + span:active
|
|
|
2645
2603
|
overflow-y: hidden;
|
|
2646
2604
|
}
|
|
2647
2605
|
.perseus-widget-expression-old > .output > .placeholder > .error {
|
|
2648
|
-
-webkit-border-radius: 10px;
|
|
2649
|
-
-moz-border-radius: 10px;
|
|
2650
2606
|
border-radius: 10px;
|
|
2651
2607
|
background: #f7f7f7;
|
|
2652
2608
|
border: 1px solid #ddd;
|
|
@@ -2941,6 +2897,7 @@ body.mobile .perseus-matrix .math-output {
|
|
|
2941
2897
|
padding: 0 10px;
|
|
2942
2898
|
cursor: pointer;
|
|
2943
2899
|
position: relative;
|
|
2900
|
+
-webkit-user-select: none;
|
|
2944
2901
|
user-select: none;
|
|
2945
2902
|
width: auto;
|
|
2946
2903
|
display: flex;
|
|
@@ -2988,7 +2945,6 @@ body.mobile .perseus-matrix .math-output {
|
|
|
2988
2945
|
.orderer.layout-vertical .bank,
|
|
2989
2946
|
.orderer.layout-vertical .draggable-box {
|
|
2990
2947
|
box-sizing: border-box;
|
|
2991
|
-
-moz-box-sizing: border-box;
|
|
2992
2948
|
float: left;
|
|
2993
2949
|
max-width: 50%;
|
|
2994
2950
|
}
|
|
@@ -3095,11 +3051,7 @@ body.sat-section .perseus-widget-passage {
|
|
|
3095
3051
|
position: absolute;
|
|
3096
3052
|
}
|
|
3097
3053
|
.perseus-widget-plotter span.rotate {
|
|
3098
|
-
-moz-transform: rotate(-90deg);
|
|
3099
|
-
-o-transform: rotate(-90deg);
|
|
3100
|
-
-webkit-transform: rotate(-90deg);
|
|
3101
3054
|
transform: rotate(-90deg);
|
|
3102
|
-
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
|
|
3103
3055
|
}
|
|
3104
3056
|
.set-from-scale-box {
|
|
3105
3057
|
border: 2px solid #EEEEEE;
|
|
@@ -3192,8 +3144,6 @@ body.sat-section .perseus-widget-passage {
|
|
|
3192
3144
|
border: 1px solid #ccc;
|
|
3193
3145
|
border-bottom: 1px solid #aaa;
|
|
3194
3146
|
box-shadow: 0 1px 2px #ccc;
|
|
3195
|
-
-moz-box-shadow: 0 1px 2px #ccc;
|
|
3196
|
-
-webkit-box-shadow: 0 1px 2px #ccc;
|
|
3197
3147
|
}
|
|
3198
3148
|
.draggy-boxy-thing .cards-area {
|
|
3199
3149
|
position: relative;
|
|
@@ -3206,12 +3156,6 @@ body.sat-section .perseus-widget-passage {
|
|
|
3206
3156
|
border: 1px solid #b9b9b9;
|
|
3207
3157
|
border-bottom-color: #939393;
|
|
3208
3158
|
border-radius: 4px;
|
|
3209
|
-
-moz-border-radius: 4px;
|
|
3210
|
-
-webkit-border-radius: 4px;
|
|
3211
|
-
-webkit-user-select: none;
|
|
3212
|
-
-khtml-user-select: none;
|
|
3213
|
-
-moz-user-select: none;
|
|
3214
|
-
-o-user-select: none;
|
|
3215
3159
|
cursor: pointer;
|
|
3216
3160
|
touch-action: none;
|
|
3217
3161
|
}
|
|
@@ -3242,8 +3186,6 @@ body.sat-section .perseus-widget-passage {
|
|
|
3242
3186
|
border: 1px solid #b9b9b9;
|
|
3243
3187
|
border-bottom-color: #939393;
|
|
3244
3188
|
border-radius: 4px;
|
|
3245
|
-
-moz-border-radius: 4px;
|
|
3246
|
-
-webkit-border-radius: 4px;
|
|
3247
3189
|
height: 100%;
|
|
3248
3190
|
width: 100%;
|
|
3249
3191
|
z-index: -1;
|
|
@@ -3254,10 +3196,6 @@ body.sat-section .perseus-widget-passage {
|
|
|
3254
3196
|
.draggy-boxy-thing .card:hover {
|
|
3255
3197
|
border-color: #ffa500;
|
|
3256
3198
|
box-shadow: 0 0 4px #c78100;
|
|
3257
|
-
-moz-box-shadow: 0 0 4px #c78100;
|
|
3258
|
-
-ms-box-shadow: 0 0 4px #c78100;
|
|
3259
|
-
-o-box-shadow: 0 0 4px #c78100;
|
|
3260
|
-
-webkit-box-shadow: 0 0 4px #c78100;
|
|
3261
3199
|
}
|
|
3262
3200
|
.perseus-sortable div.paragraph {
|
|
3263
3201
|
margin: 0;
|
|
@@ -3359,8 +3297,6 @@ body.mobile .framework-perseus table.perseus-widget-table-of-values.non-markdown
|
|
|
3359
3297
|
transition: all 0.15s;
|
|
3360
3298
|
}
|
|
3361
3299
|
.perseus-widget-container.widget-highlight {
|
|
3362
|
-
-webkit-box-shadow: 0px 0px 0px 2px #ffa500;
|
|
3363
|
-
-moz-box-shadow: 0px 0px 0px 2px #ffa500;
|
|
3364
3300
|
box-shadow: 0px 0px 0px 2px #ffa500;
|
|
3365
3301
|
transition: all 0.15s;
|
|
3366
3302
|
}
|