@khanacademy/perseus 5.0.0 → 6.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 +62 -0
- package/dist/components/fixed-to-responsive.d.ts +27 -1
- package/dist/components/fixed-to-responsive.js.flow +27 -1
- package/dist/components/graph.d.ts +42 -26
- package/dist/components/graph.js.flow +42 -28
- package/dist/components/graphie.d.ts +34 -22
- package/dist/components/graphie.js.flow +37 -24
- package/dist/components/hud.d.ts +8 -14
- package/dist/components/hud.js.flow +7 -14
- package/dist/components/inline-icon.d.ts +9 -19
- package/dist/components/inline-icon.js.flow +26 -13
- package/dist/components/lint.d.ts +41 -13
- package/dist/components/lint.js.flow +42 -13
- package/dist/components/math-output.d.ts +15 -11
- package/dist/components/math-output.js.flow +15 -11
- package/dist/components/sortable.d.ts +17 -9
- package/dist/components/sortable.js.flow +22 -9
- package/dist/components/svg-image.d.ts +5 -3
- package/dist/components/svg-image.js.flow +5 -3
- package/dist/components/tooltip.d.ts +45 -4
- package/dist/components/tooltip.js.flow +44 -31
- package/dist/es/index.css +0 -3
- package/dist/es/index.js +478 -649
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +0 -3
- package/dist/index.js +482 -646
- package/dist/index.js.map +1 -1
- package/dist/perseus-types.d.ts +11 -9
- package/dist/perseus-types.js.flow +11 -9
- package/dist/renderer.d.ts +2 -2
- package/dist/renderer.js.flow +1 -3
- package/dist/styles/shared.d.ts +0 -1
- package/dist/styles/shared.js.flow +0 -1
- package/dist/types.d.ts +0 -10
- package/dist/types.js.flow +0 -13
- package/dist/util/a11y.d.ts +0 -1
- package/dist/util/a11y.js.flow +0 -1
- package/dist/util/interactive.d.ts +2 -0
- package/dist/util/interactive.js.flow +2 -0
- package/dist/util.d.ts +3 -3
- package/dist/util.js.flow +4 -3
- package/dist/widgets/grapher.d.ts +1 -1
- package/dist/widgets/grapher.js.flow +12 -3
- package/dist/widgets/matcher.d.ts +7 -3
- package/dist/widgets/matcher.js.flow +7 -3
- package/dist/widgets/number-line.d.ts +1 -1
- package/dist/widgets/number-line.js.flow +1 -1
- package/package.json +2 -2
- package/src/__tests__/__snapshots__/item-renderer.test.tsx.snap +151 -159
- package/src/__tests__/__snapshots__/renderer.test.tsx.snap +358 -394
- package/src/__tests__/__snapshots__/server-item-renderer.test.tsx.snap +169 -189
- package/src/components/__stories__/lint.stories.tsx +56 -21
- package/src/components/__stories__/sortable.stories.tsx +5 -5
- package/src/components/__stories__/tooltip.stories.tsx +52 -0
- package/src/components/__tests__/__snapshots__/sortable.test.tsx.snap +114 -30
- package/src/components/__tests__/__snapshots__/sorter.test.tsx.snap +172 -204
- package/src/components/__tests__/sortable.test.tsx +54 -16
- package/src/components/__tests__/sorter.test.tsx +12 -9
- package/src/components/fixed-to-responsive.tsx +43 -38
- package/src/components/graph.tsx +95 -81
- package/src/components/graphie.tsx +62 -32
- package/src/components/hud.tsx +104 -115
- package/src/components/inline-icon.tsx +15 -32
- package/src/components/input-with-examples.tsx +4 -4
- package/src/components/lint.tsx +47 -41
- package/src/components/math-output.tsx +17 -11
- package/src/components/simple-keypad-input.tsx +2 -2
- package/src/components/sortable.tsx +134 -94
- package/src/components/svg-image.tsx +10 -11
- package/src/components/tooltip.tsx +189 -171
- package/src/interactive2/types.ts +2 -2
- package/src/mixins/provide-keypad.tsx +2 -2
- package/src/multi-items/__tests__/__snapshots__/multi-renderer.test.tsx.snap +708 -764
- package/src/perseus-types.ts +13 -9
- package/src/renderer.tsx +11 -22
- package/src/types.ts +0 -18
- package/src/util/interactive.ts +18 -5
- package/src/util/tex.ts +13 -77
- package/src/util.ts +3 -4
- package/src/widgets/__stories__/test-keypad-context-wrapper.tsx +2 -2
- package/src/widgets/__tests__/__snapshots__/categorizer.test.ts.snap +717 -773
- package/src/widgets/__tests__/__snapshots__/cs-program.test.ts.snap +28 -36
- package/src/widgets/__tests__/__snapshots__/definition.test.ts.snap +52 -60
- package/src/widgets/__tests__/__snapshots__/dropdown.test.ts.snap +100 -108
- package/src/widgets/__tests__/__snapshots__/explanation.test.ts.snap +212 -260
- package/src/widgets/__tests__/__snapshots__/graded-group-set-jipt.test.ts.snap +613 -641
- package/src/widgets/__tests__/__snapshots__/graded-group-set.test.ts.snap +249 -261
- package/src/widgets/__tests__/__snapshots__/graded-group.test.ts.snap +671 -735
- package/src/widgets/__tests__/__snapshots__/grapher.test.ts.snap +2676 -2684
- package/src/widgets/__tests__/__snapshots__/group.test.tsx.snap +938 -1002
- package/src/widgets/__tests__/__snapshots__/iframe.test.ts.snap +28 -36
- package/src/widgets/__tests__/__snapshots__/image.test.ts.snap +227 -255
- package/src/widgets/__tests__/__snapshots__/input-number.test.ts.snap +353 -357
- package/src/widgets/__tests__/__snapshots__/interaction.test.ts.snap +255 -259
- package/src/widgets/__tests__/__snapshots__/interactive-graph.test.ts.snap +2401 -2433
- package/src/widgets/__tests__/__snapshots__/matcher.test.tsx.snap +600 -756
- package/src/widgets/__tests__/__snapshots__/matrix.test.ts.snap +420 -428
- package/src/widgets/__tests__/__snapshots__/number-line.test.ts.snap +762 -770
- package/src/widgets/__tests__/__snapshots__/numeric-input.test.ts.snap +373 -393
- package/src/widgets/__tests__/__snapshots__/orderer.test.ts.snap +116 -148
- package/src/widgets/__tests__/__snapshots__/passage-ref.test.ts.snap +289 -301
- package/src/widgets/__tests__/__snapshots__/passage.test.tsx.snap +1679 -1711
- package/src/widgets/__tests__/__snapshots__/radio.test.ts.snap +2692 -2960
- package/src/widgets/__tests__/__snapshots__/video.test.ts.snap +90 -98
- package/src/widgets/__tests__/matcher.test.tsx +33 -9
- package/src/widgets/expression.tsx +9 -6
- package/src/widgets/grapher.tsx +3 -3
- package/src/widgets/image.tsx +2 -2
- package/src/widgets/interactive-graph.tsx +5 -5
- package/src/widgets/matcher.tsx +43 -24
- package/src/widgets/number-line.tsx +1 -1
- package/src/widgets/simulator.tsx +4 -6
- package/{tsconfig.json → tsconfig-build.json} +6 -6
- package/tsconfig-build.tsbuildinfo +1 -0
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -2,68 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`iframe widget should snapshot on mobile: first mobile render 1`] = `
|
|
4
4
|
<div>
|
|
5
|
-
<
|
|
6
|
-
class="
|
|
5
|
+
<div
|
|
6
|
+
class="perseus-renderer perseus-renderer-responsive"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
|
-
class="
|
|
9
|
+
class="paragraph"
|
|
10
|
+
data-perseus-paragraph-index="0"
|
|
10
11
|
>
|
|
11
12
|
<div
|
|
12
13
|
class="paragraph"
|
|
13
|
-
data-perseus-paragraph-index="0"
|
|
14
14
|
>
|
|
15
|
+
Try matching the target image
|
|
16
|
+
|
|
15
17
|
<div
|
|
16
|
-
class="
|
|
18
|
+
class="perseus-widget-container widget-nohighlight widget-block"
|
|
17
19
|
>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
allowfullscreen=""
|
|
25
|
-
sandbox="allow-same-origin allow-scripts allow-top-navigation"
|
|
26
|
-
src="https://www.khanacademy.org/computer-programming/program/4960944252/embedded?buttons=no&embed=yes&editor=no&author=no&width=410&height=410&origin=origin-test-interface&settings=%7B%22hue%22%3A%22210%22%2C%22subdivisions%22%3A%220%22%2C%22zoom%22%3A%222%22%2C%22seed%22%3A%226%22%7D"
|
|
27
|
-
style="width: 410px; height: 410px;"
|
|
28
|
-
/>
|
|
29
|
-
</div>
|
|
20
|
+
<iframe
|
|
21
|
+
allowfullscreen=""
|
|
22
|
+
sandbox="allow-same-origin allow-scripts allow-top-navigation"
|
|
23
|
+
src="https://www.khanacademy.org/computer-programming/program/4960944252/embedded?buttons=no&embed=yes&editor=no&author=no&width=410&height=410&origin=origin-test-interface&settings=%7B%22hue%22%3A%22210%22%2C%22subdivisions%22%3A%220%22%2C%22zoom%22%3A%222%22%2C%22seed%22%3A%226%22%7D"
|
|
24
|
+
style="width: 410px; height: 410px;"
|
|
25
|
+
/>
|
|
30
26
|
</div>
|
|
31
27
|
</div>
|
|
32
28
|
</div>
|
|
33
|
-
</
|
|
29
|
+
</div>
|
|
34
30
|
</div>
|
|
35
31
|
`;
|
|
36
32
|
|
|
37
33
|
exports[`iframe widget should snapshot: first render 1`] = `
|
|
38
34
|
<div>
|
|
39
|
-
<
|
|
40
|
-
class="
|
|
35
|
+
<div
|
|
36
|
+
class="perseus-renderer perseus-renderer-responsive"
|
|
41
37
|
>
|
|
42
38
|
<div
|
|
43
|
-
class="
|
|
39
|
+
class="paragraph"
|
|
40
|
+
data-perseus-paragraph-index="0"
|
|
44
41
|
>
|
|
45
42
|
<div
|
|
46
43
|
class="paragraph"
|
|
47
|
-
data-perseus-paragraph-index="0"
|
|
48
44
|
>
|
|
45
|
+
Try matching the target image
|
|
46
|
+
|
|
49
47
|
<div
|
|
50
|
-
class="
|
|
48
|
+
class="perseus-widget-container widget-nohighlight widget-block"
|
|
51
49
|
>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
allowfullscreen=""
|
|
59
|
-
sandbox="allow-same-origin allow-scripts allow-top-navigation"
|
|
60
|
-
src="https://www.khanacademy.org/computer-programming/program/4960944252/embedded?buttons=no&embed=yes&editor=no&author=no&width=410&height=410&origin=origin-test-interface&settings=%7B%22hue%22%3A%22210%22%2C%22subdivisions%22%3A%220%22%2C%22zoom%22%3A%222%22%2C%22seed%22%3A%226%22%7D"
|
|
61
|
-
style="width: 410px; height: 410px;"
|
|
62
|
-
/>
|
|
63
|
-
</div>
|
|
50
|
+
<iframe
|
|
51
|
+
allowfullscreen=""
|
|
52
|
+
sandbox="allow-same-origin allow-scripts allow-top-navigation"
|
|
53
|
+
src="https://www.khanacademy.org/computer-programming/program/4960944252/embedded?buttons=no&embed=yes&editor=no&author=no&width=410&height=410&origin=origin-test-interface&settings=%7B%22hue%22%3A%22210%22%2C%22subdivisions%22%3A%220%22%2C%22zoom%22%3A%222%22%2C%22seed%22%3A%226%22%7D"
|
|
54
|
+
style="width: 410px; height: 410px;"
|
|
55
|
+
/>
|
|
64
56
|
</div>
|
|
65
57
|
</div>
|
|
66
58
|
</div>
|
|
67
|
-
</
|
|
59
|
+
</div>
|
|
68
60
|
</div>
|
|
69
61
|
`;
|