@khanacademy/perseus 10.0.0 → 10.1.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 +24 -0
- package/dist/components/zoomable.d.ts +2 -0
- package/dist/es/index.css +26 -0
- package/dist/es/index.js +114 -114
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +26 -0
- package/dist/index.js +114 -114
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/__snapshots__/renderer.test.tsx.snap +1 -1
- package/src/__tests__/mock-asset-loading-widget.tsx +3 -2
- package/src/__tests__/widgets.test.ts +73 -0
- package/src/components/__stories__/zoomable.stories.tsx +9 -1
- package/src/components/zoomable-tex.tsx +2 -0
- package/src/components/zoomable.tsx +10 -3
- package/src/styles/widgets/image.less +32 -0
- package/src/widgets/__stories__/image.stories.tsx +37 -0
- package/src/widgets/__tests__/__snapshots__/categorizer.test.ts.snap +1 -1
- package/src/widgets/__tests__/__snapshots__/group.test.tsx.snap +2 -2
- package/src/widgets/__tests__/__snapshots__/image.test.ts.snap +9 -11
- package/src/widgets/__tests__/__snapshots__/matrix.test.ts.snap +1 -1
- package/src/widgets/__tests__/__snapshots__/number-line.test.ts.snap +1 -1
- package/src/widgets/expression.tsx +13 -0
- package/src/widgets/image.tsx +8 -31
- package/tsconfig-build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @khanacademy/perseus
|
|
2
2
|
|
|
3
|
+
## 10.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3078825a: Remove animation when math is first drawn on a page
|
|
8
|
+
- 100fb7e5: Update design of image widget's caption
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [3f7be05a]
|
|
13
|
+
- Updated dependencies [810c7bd9]
|
|
14
|
+
- Updated dependencies [b161d004]
|
|
15
|
+
- Updated dependencies [a99a9ca4]
|
|
16
|
+
- @khanacademy/math-input@10.1.1
|
|
17
|
+
|
|
18
|
+
## 10.0.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 5f33560b: Revert type changes made in #694
|
|
23
|
+
- 0f95281c: Restore static methods on `Expression` widget component
|
|
24
|
+
- Updated dependencies [781551f9]
|
|
25
|
+
- @khanacademy/math-input@10.1.0
|
|
26
|
+
|
|
3
27
|
## 10.0.0
|
|
4
28
|
|
|
5
29
|
### Major Changes
|
|
@@ -9,6 +9,7 @@ type Bounds = {
|
|
|
9
9
|
type Props = {
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
animateHeight: boolean;
|
|
12
|
+
disableEntranceAnimation: boolean;
|
|
12
13
|
/**
|
|
13
14
|
* Optional function that allows customizations in zooming.
|
|
14
15
|
*
|
|
@@ -26,6 +27,7 @@ type DefaultProps = {
|
|
|
26
27
|
animateHeight: Props["animateHeight"];
|
|
27
28
|
computeChildBounds: Props["computeChildBounds"];
|
|
28
29
|
readyToMeasure: Props["readyToMeasure"];
|
|
30
|
+
disableEntranceAnimation: Props["disableEntranceAnimation"];
|
|
29
31
|
};
|
|
30
32
|
type State = {
|
|
31
33
|
visible: boolean;
|
package/dist/es/index.css
CHANGED
|
@@ -2799,9 +2799,35 @@ body.mobile .categorizer-container td.category input[type="radio"] + span:active
|
|
|
2799
2799
|
top: calc(50% - 7px);
|
|
2800
2800
|
margin-left: -20px;
|
|
2801
2801
|
}
|
|
2802
|
+
.perseus-image-widget {
|
|
2803
|
+
margin: 0;
|
|
2804
|
+
}
|
|
2802
2805
|
.perseus-image-widget .perseus-image-title {
|
|
2803
2806
|
text-align: center;
|
|
2804
2807
|
}
|
|
2808
|
+
.perseus-image-widget .perseus-image-caption {
|
|
2809
|
+
color: rgba(33, 36, 44, 0.7);
|
|
2810
|
+
max-width: 420px;
|
|
2811
|
+
padding-left: 16px;
|
|
2812
|
+
position: relative;
|
|
2813
|
+
top: -12px;
|
|
2814
|
+
}
|
|
2815
|
+
.perseus-image-widget .perseus-image-caption::before {
|
|
2816
|
+
content: "";
|
|
2817
|
+
position: absolute;
|
|
2818
|
+
top: 0;
|
|
2819
|
+
bottom: 0;
|
|
2820
|
+
left: 0;
|
|
2821
|
+
margin-left: 4px;
|
|
2822
|
+
width: 1px;
|
|
2823
|
+
background-color: rgba(33, 36, 44, 0.5);
|
|
2824
|
+
border: 1px solid rgba(33, 36, 44, 0.5);
|
|
2825
|
+
border-radius: 2px;
|
|
2826
|
+
}
|
|
2827
|
+
.perseus-image-widget .perseus-image-caption .paragraph {
|
|
2828
|
+
font-size: 14px;
|
|
2829
|
+
padding-right: 12px;
|
|
2830
|
+
}
|
|
2805
2831
|
.perseus-image-editor .label-settings td {
|
|
2806
2832
|
padding: 5px 4px;
|
|
2807
2833
|
text-align: center;
|