@khanacademy/perseus 4.0.2 → 6.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 +57 -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/highlighting/highlightable-content.d.ts +4 -4
- package/dist/components/highlighting/highlightable-content.js.flow +4 -7
- package/dist/components/highlighting/ui/highlight-renderer.d.ts +6 -6
- package/dist/components/highlighting/ui/highlight-renderer.js.flow +6 -8
- package/dist/components/highlighting/ui/highlight-set-renderer.d.ts +5 -5
- package/dist/components/highlighting/ui/highlight-set-renderer.js.flow +5 -8
- package/dist/components/highlighting/ui/highlight-tooltip.d.ts +2 -2
- package/dist/components/highlighting/ui/highlight-tooltip.js.flow +2 -4
- package/dist/components/highlighting/ui/highlighting-ui.d.ts +2 -2
- package/dist/components/highlighting/ui/highlighting-ui.js.flow +2 -2
- package/dist/components/highlighting/ui/selection-tracker.d.ts +5 -5
- package/dist/components/highlighting/ui/selection-tracker.js.flow +5 -7
- package/dist/components/highlighting/word-indexer.d.ts +2 -2
- package/dist/components/highlighting/word-indexer.js.flow +2 -2
- package/dist/components/hud.d.ts +8 -14
- package/dist/components/hud.js.flow +7 -14
- package/dist/components/inline-icon.d.ts +27 -3
- package/dist/components/inline-icon.js.flow +26 -3
- 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/simple-keypad-input.d.ts +1 -1
- package/dist/components/simple-keypad-input.js.flow +1 -1
- 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/tex-buttons.d.ts +2 -2
- package/dist/components/tex-buttons.js.flow +2 -2
- package/dist/components/tooltip.d.ts +45 -4
- package/dist/components/tooltip.js.flow +44 -31
- package/dist/error-boundary.d.ts +4 -4
- package/dist/error-boundary.js.flow +4 -6
- package/dist/es/index.css +0 -3
- package/dist/es/index.js +484 -658
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +0 -3
- package/dist/index.js +488 -655
- package/dist/index.js.map +1 -1
- package/dist/perseus-types.d.ts +11 -10
- package/dist/perseus-types.js.flow +11 -10
- 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/__stories__/test-keypad-context-wrapper.d.ts +2 -2
- package/dist/widgets/__stories__/test-keypad-context-wrapper.js.flow +2 -4
- package/dist/widgets/expression.d.ts +2 -2
- package/dist/widgets/expression.js.flow +2 -2
- package/dist/widgets/grapher.d.ts +1 -1
- package/dist/widgets/grapher.js.flow +12 -3
- package/dist/widgets/interaction/element-container.d.ts +5 -4
- package/dist/widgets/interaction/element-container.js.flow +6 -11
- package/dist/widgets/label-image/marker.d.ts +4 -4
- package/dist/widgets/label-image/marker.js.flow +4 -6
- 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/dist/widgets/numeric-input.d.ts +0 -2
- package/dist/widgets/numeric-input.js.flow +0 -4
- package/dist/widgets/radio/base-radio.d.ts +7 -1
- package/dist/widgets/radio/base-radio.js.flow +7 -1
- package/dist/widgets/radio/choice-icon/choice-icon.d.ts +1 -1
- package/dist/widgets/radio/choice-icon/choice-icon.js.flow +1 -1
- package/dist/widgets/radio/choice-icon/cross-out-line.d.ts +2 -2
- package/dist/widgets/radio/choice-icon/cross-out-line.js.flow +2 -2
- package/dist/widgets/radio/focus-ring.d.ts +8 -1
- package/dist/widgets/radio/focus-ring.js.flow +8 -1
- package/dist/widgets/radio/option-status.d.ts +2 -2
- package/dist/widgets/radio/option-status.js.flow +2 -2
- package/dist/widgets/video-transcript-link.d.ts +1 -1
- package/dist/widgets/video-transcript-link.js.flow +1 -1
- package/package.json +4 -4
- package/src/__stories__/item-renderer.stories.tsx +2 -6
- package/src/__stories__/server-item-renderer.stories.tsx +2 -6
- 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__/button-group.stories.tsx +2 -6
- package/src/components/__stories__/fixed-to-responsive.stories.tsx +14 -16
- package/src/components/__stories__/graph.stories.tsx +3 -5
- package/src/components/__stories__/graphie.stories.tsx +3 -5
- package/src/components/__stories__/hud.stories.tsx +2 -6
- package/src/components/__stories__/icon.stories.tsx +1 -1
- package/src/components/__stories__/image-loader.stories.tsx +4 -4
- package/src/components/__stories__/info-tip.stories.tsx +2 -6
- package/src/components/__stories__/inline-icon.stories.tsx +4 -8
- package/src/components/__stories__/input-with-examples.stories.tsx +6 -10
- package/src/components/__stories__/lint.stories.tsx +62 -27
- package/src/components/__stories__/math-input.stories.tsx +4 -8
- package/src/components/__stories__/math-output.stories.tsx +3 -5
- package/src/components/__stories__/multi-button-group.stories.tsx +2 -6
- package/src/components/__stories__/number-input.stories.tsx +6 -8
- package/src/components/__stories__/prop-check-box.stories.tsx +9 -9
- package/src/components/__stories__/range-input.stories.tsx +4 -6
- package/src/components/__stories__/simple-keypad-input.stories.tsx +2 -4
- package/src/components/__stories__/sortable.stories.tsx +20 -20
- package/src/components/__stories__/stub-tag-editor.stories.tsx +5 -9
- package/src/components/__stories__/svg-image.stories.tsx +10 -18
- package/src/components/__stories__/tex.stories.tsx +1 -3
- package/src/components/__stories__/text-buttons.stories.tsx +10 -22
- package/src/components/__stories__/text-input.stories.tsx +4 -10
- package/src/components/__stories__/text-list-editor.stories.tsx +1 -3
- package/src/components/__stories__/tooltip.stories.tsx +52 -0
- package/src/components/__stories__/zoomable-tex.stories.tsx +6 -4
- package/src/components/__stories__/zoomable.stories.tsx +1 -3
- 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/highlighting/highlightable-content.tsx +4 -7
- package/src/components/highlighting/ui/highlight-renderer.tsx +6 -9
- package/src/components/highlighting/ui/highlight-set-renderer.tsx +5 -8
- package/src/components/highlighting/ui/highlight-tooltip.tsx +2 -2
- package/src/components/highlighting/ui/highlighting-ui.tsx +2 -2
- package/src/components/highlighting/ui/selection-tracker.tsx +5 -8
- package/src/components/highlighting/word-indexer.tsx +2 -2
- package/src/components/hud.tsx +104 -115
- package/src/components/inline-icon.tsx +17 -34
- 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 +4 -4
- package/src/components/sortable.tsx +134 -94
- package/src/components/svg-image.tsx +10 -11
- package/src/components/tex-buttons.tsx +2 -2
- package/src/components/tooltip.tsx +189 -171
- package/src/components/visibility-observer/__stories__/visibility-observer.stories.tsx +1 -3
- package/src/error-boundary.tsx +4 -7
- package/src/interactive2/types.ts +2 -2
- package/src/multi-items/__stories__/multi-renderer.stories.tsx +1 -1
- package/src/multi-items/__tests__/__snapshots__/multi-renderer.test.tsx.snap +708 -764
- package/src/multi-items/__tests__/multi-renderer.test.tsx +2 -3
- package/src/perseus-types.ts +13 -12
- package/src/renderer.tsx +11 -22
- package/src/types.ts +0 -18
- package/src/util/graphie.ts +3 -3
- package/src/util/interactive.ts +18 -5
- package/src/util/tex.ts +13 -77
- package/src/util.ts +3 -4
- package/src/widgets/__stories__/categorizer.stories.tsx +1 -1
- package/src/widgets/__stories__/cs-program.stories.tsx +1 -1
- package/src/widgets/__stories__/definition.stories.tsx +3 -7
- package/src/widgets/__stories__/dropdown.stories.tsx +1 -1
- package/src/widgets/__stories__/explanation.stories.tsx +2 -2
- package/src/widgets/__stories__/expression.stories.tsx +5 -11
- package/src/widgets/__stories__/graded-group-set.stories.tsx +1 -1
- package/src/widgets/__stories__/graded-group.stories.tsx +1 -1
- package/src/widgets/__stories__/grapher.stories.tsx +7 -21
- package/src/widgets/__stories__/group.stories.tsx +1 -1
- package/src/widgets/__stories__/iframe.stories.tsx +1 -1
- package/src/widgets/__stories__/image.stories.tsx +1 -1
- package/src/widgets/__stories__/input-number.stories.tsx +3 -12
- package/src/widgets/__stories__/interaction.stories.tsx +1 -1
- package/src/widgets/__stories__/interactive-graph.stories.tsx +9 -9
- package/src/widgets/__stories__/matcher.stories.tsx +1 -1
- package/src/widgets/__stories__/matrix.stories.tsx +1 -1
- package/src/widgets/__stories__/number-line.stories.tsx +1 -1
- package/src/widgets/__stories__/numeric-input.stories.tsx +3 -5
- package/src/widgets/__stories__/orderer.stories.tsx +1 -1
- package/src/widgets/__stories__/passage-ref.stories.tsx +2 -2
- package/src/widgets/__stories__/passage.stories.tsx +3 -9
- package/src/widgets/__stories__/radio.stories.tsx +3 -5
- package/src/widgets/__stories__/sorter.stories.tsx +1 -1
- package/src/widgets/__stories__/test-keypad-context-wrapper.tsx +2 -4
- package/src/widgets/__stories__/transformer.stories.tsx +1 -1
- package/src/widgets/__stories__/unit.stories.tsx +1 -3
- package/src/widgets/__stories__/video-transcript-link.stories.tsx +2 -6
- package/src/widgets/__stories__/video.stories.tsx +1 -1
- package/src/widgets/__testdata__/group.testdata.ts +0 -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__/group.test.tsx +0 -2
- package/src/widgets/__tests__/matcher.test.tsx +33 -9
- package/src/widgets/__tests__/radio/focus-ring.test.tsx +0 -1
- package/src/widgets/expression.tsx +12 -9
- package/src/widgets/grapher.tsx +3 -3
- package/src/widgets/image.tsx +2 -2
- package/src/widgets/interaction/element-container.tsx +7 -8
- package/src/widgets/interactive-graph.tsx +5 -5
- package/src/widgets/label-image/__stories__/answer-choices.stories.tsx +2 -4
- package/src/widgets/label-image/__stories__/marker.stories.tsx +9 -19
- package/src/widgets/label-image/marker.tsx +4 -4
- package/src/widgets/matcher.tsx +43 -24
- package/src/widgets/number-line.tsx +1 -1
- package/src/widgets/numeric-input.tsx +0 -3
- package/src/widgets/passage/passage-markdown.tsx +2 -2
- package/src/widgets/radio/__stories__/base-radio.stories.tsx +11 -19
- package/src/widgets/radio/__stories__/choice-icon.stories.tsx +9 -11
- package/src/widgets/radio/__stories__/choice-none-above.stories.tsx +1 -1
- package/src/widgets/radio/__stories__/choice.stories.tsx +4 -4
- package/src/widgets/radio/__stories__/focus-ring.stories.tsx +1 -1
- package/src/widgets/radio/__stories__/option-status.stories.tsx +2 -4
- package/src/widgets/radio/base-radio.tsx +1 -1
- package/src/widgets/radio/choice-icon/choice-icon.tsx +5 -5
- package/src/widgets/radio/choice-icon/cross-out-line.tsx +1 -3
- package/src/widgets/radio/choice-none-above.tsx +2 -2
- package/src/widgets/radio/choice.tsx +1 -3
- package/src/widgets/radio/focus-ring.tsx +1 -1
- package/src/widgets/radio/option-status.tsx +2 -4
- package/src/widgets/radio/widget.tsx +0 -1
- package/src/widgets/reaction-diagram.tsx +2 -2
- package/src/widgets/simulator.tsx +4 -6
- package/src/widgets/video-transcript-link.tsx +1 -1
- package/{tsconfig.json → tsconfig-build.json} +6 -6
- package/tsconfig-build.tsbuildinfo +1 -0
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -4,191 +4,183 @@ exports[`server item renderer should snapshot: initial render 1`] = `
|
|
|
4
4
|
<div>
|
|
5
5
|
<div>
|
|
6
6
|
<div>
|
|
7
|
-
<
|
|
8
|
-
class="
|
|
7
|
+
<div
|
|
8
|
+
class="perseus-renderer perseus-renderer-responsive"
|
|
9
9
|
>
|
|
10
10
|
<div
|
|
11
|
-
class="
|
|
11
|
+
class="paragraph"
|
|
12
|
+
data-perseus-paragraph-index="0"
|
|
12
13
|
>
|
|
13
14
|
<div
|
|
14
15
|
class="paragraph"
|
|
15
|
-
data-perseus-paragraph-index="0"
|
|
16
16
|
>
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
Enter the number
|
|
18
|
+
<span
|
|
19
|
+
style="white-space: nowrap;"
|
|
19
20
|
>
|
|
20
|
-
|
|
21
|
+
<span />
|
|
21
22
|
<span
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
class="mock-TeX"
|
|
24
|
+
/>
|
|
25
|
+
<span />
|
|
26
|
+
</span>
|
|
27
|
+
-42
|
|
28
|
+
<span
|
|
29
|
+
style="white-space: nowrap;"
|
|
30
|
+
>
|
|
31
|
+
<span />
|
|
31
32
|
<span
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</div>
|
|
33
|
+
class="mock-TeX"
|
|
34
|
+
/>
|
|
35
|
+
<span />
|
|
36
|
+
</span>
|
|
37
|
+
in the box:
|
|
38
|
+
<div
|
|
39
|
+
class="perseus-widget-container widget-nohighlight widget-inline-block"
|
|
40
|
+
>
|
|
41
|
+
<span>
|
|
42
|
+
<div>
|
|
43
|
+
<input
|
|
44
|
+
autocapitalize="off"
|
|
45
|
+
autocomplete="off"
|
|
46
|
+
autocorrect="off"
|
|
47
|
+
class="input_1t4b01j-o_O-LabelMedium_1rew30o-o_O-default_1r2dwp3-o_O-default_1gznapd-o_O-leftAlign_7jg4r4"
|
|
48
|
+
id="input-with-examples-aW5wdXQtbnVtYmVyIDE"
|
|
49
|
+
type="text"
|
|
50
|
+
value=""
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
<div
|
|
54
|
+
style="position: relative; height: 0px; display: none;"
|
|
55
|
+
>
|
|
56
56
|
<div
|
|
57
|
-
|
|
57
|
+
class="tooltipContainer"
|
|
58
|
+
style="position: absolute; left: 0px;"
|
|
58
59
|
>
|
|
59
60
|
<div
|
|
60
|
-
|
|
61
|
-
style="position: absolute; left: 0px;"
|
|
61
|
+
style="display: block; position: relative; visibility: visible; left: 0px; top: -1px; width: 12px; height: 11px; margin-top: -1px; margin-bottom: -2px; z-index: 10;"
|
|
62
62
|
>
|
|
63
63
|
<div
|
|
64
|
-
style="display: block;
|
|
65
|
-
|
|
66
|
-
<div
|
|
67
|
-
style="display: block; height: 0px; width: 0px; position: absolute; left: 0px; top: -1px; border-right: 12px solid transparent; border-bottom: 12px solid #ccc;"
|
|
68
|
-
/>
|
|
69
|
-
<div
|
|
70
|
-
style="display: block; height: 0px; width: 0px; position: absolute; left: 1px; top: 1px; border-right: 10px solid transparent; border-bottom: 10px solid white;"
|
|
71
|
-
/>
|
|
72
|
-
</div>
|
|
64
|
+
style="display: block; height: 0px; width: 0px; position: absolute; left: 0px; top: -1px; border-right: 12px solid transparent; border-bottom: 12px solid #ccc;"
|
|
65
|
+
/>
|
|
73
66
|
<div
|
|
74
|
-
|
|
75
|
-
|
|
67
|
+
style="display: block; height: 0px; width: 0px; position: absolute; left: 1px; top: 1px; border-right: 10px solid transparent; border-bottom: 10px solid white;"
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
<div
|
|
71
|
+
class="perseus-formats-tooltip preview-measure"
|
|
72
|
+
style="position: relative; top: 0px; left: 0px; border: 1px solid #ccc; box-shadow: 0 1px 3px #ccc; z-index: 9;"
|
|
73
|
+
>
|
|
74
|
+
<div
|
|
75
|
+
id="input-with-examples-aW5wdXQtbnVtYmVyIDE"
|
|
76
76
|
>
|
|
77
77
|
<div
|
|
78
|
-
|
|
78
|
+
class="perseus-renderer perseus-renderer-responsive"
|
|
79
79
|
>
|
|
80
|
-
<
|
|
81
|
-
class="
|
|
80
|
+
<div
|
|
81
|
+
class="paragraph"
|
|
82
|
+
data-perseus-paragraph-index="0"
|
|
82
83
|
>
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
1\\ 3/4
|
|
174
|
-
</span>
|
|
175
|
-
<span />
|
|
176
|
-
</span>
|
|
177
|
-
</li>
|
|
178
|
-
</ul>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
</span>
|
|
84
|
+
<ul>
|
|
85
|
+
<li>
|
|
86
|
+
<strong>
|
|
87
|
+
Your answer should be
|
|
88
|
+
</strong>
|
|
89
|
+
</li>
|
|
90
|
+
<li>
|
|
91
|
+
an integer, like
|
|
92
|
+
<span
|
|
93
|
+
style="white-space: nowrap;"
|
|
94
|
+
>
|
|
95
|
+
<span />
|
|
96
|
+
<span
|
|
97
|
+
class="mock-TeX"
|
|
98
|
+
>
|
|
99
|
+
6
|
|
100
|
+
</span>
|
|
101
|
+
<span />
|
|
102
|
+
</span>
|
|
103
|
+
</li>
|
|
104
|
+
<li>
|
|
105
|
+
an
|
|
106
|
+
<em>
|
|
107
|
+
exact
|
|
108
|
+
</em>
|
|
109
|
+
decimal, like
|
|
110
|
+
<span
|
|
111
|
+
style="white-space: nowrap;"
|
|
112
|
+
>
|
|
113
|
+
<span />
|
|
114
|
+
<span
|
|
115
|
+
class="mock-TeX"
|
|
116
|
+
>
|
|
117
|
+
0.75
|
|
118
|
+
</span>
|
|
119
|
+
<span />
|
|
120
|
+
</span>
|
|
121
|
+
</li>
|
|
122
|
+
<li>
|
|
123
|
+
a
|
|
124
|
+
<em>
|
|
125
|
+
simplified proper
|
|
126
|
+
</em>
|
|
127
|
+
fraction, like
|
|
128
|
+
<span
|
|
129
|
+
style="white-space: nowrap;"
|
|
130
|
+
>
|
|
131
|
+
<span />
|
|
132
|
+
<span
|
|
133
|
+
class="mock-TeX"
|
|
134
|
+
>
|
|
135
|
+
3/5
|
|
136
|
+
</span>
|
|
137
|
+
<span />
|
|
138
|
+
</span>
|
|
139
|
+
</li>
|
|
140
|
+
<li>
|
|
141
|
+
a
|
|
142
|
+
<em>
|
|
143
|
+
simplified improper
|
|
144
|
+
</em>
|
|
145
|
+
fraction, like
|
|
146
|
+
<span
|
|
147
|
+
style="white-space: nowrap;"
|
|
148
|
+
>
|
|
149
|
+
<span />
|
|
150
|
+
<span
|
|
151
|
+
class="mock-TeX"
|
|
152
|
+
>
|
|
153
|
+
7/4
|
|
154
|
+
</span>
|
|
155
|
+
<span />
|
|
156
|
+
</span>
|
|
157
|
+
</li>
|
|
158
|
+
<li>
|
|
159
|
+
a mixed number, like
|
|
160
|
+
<span
|
|
161
|
+
style="white-space: nowrap;"
|
|
162
|
+
>
|
|
163
|
+
<span />
|
|
164
|
+
<span
|
|
165
|
+
class="mock-TeX"
|
|
166
|
+
>
|
|
167
|
+
1\\ 3/4
|
|
168
|
+
</span>
|
|
169
|
+
<span />
|
|
170
|
+
</span>
|
|
171
|
+
</li>
|
|
172
|
+
</ul>
|
|
173
|
+
</div>
|
|
182
174
|
</div>
|
|
183
175
|
</div>
|
|
184
176
|
</div>
|
|
185
177
|
</div>
|
|
186
|
-
</
|
|
187
|
-
</
|
|
178
|
+
</div>
|
|
179
|
+
</span>
|
|
188
180
|
</div>
|
|
189
181
|
</div>
|
|
190
182
|
</div>
|
|
191
|
-
</
|
|
183
|
+
</div>
|
|
192
184
|
</div>
|
|
193
185
|
<div
|
|
194
186
|
class="hintsContainer_1g61p95"
|
|
@@ -211,24 +203,20 @@ exports[`server item renderer should snapshot: initial render 1`] = `
|
|
|
211
203
|
>
|
|
212
204
|
1 / 3
|
|
213
205
|
</span>
|
|
214
|
-
<
|
|
215
|
-
class="
|
|
206
|
+
<div
|
|
207
|
+
class="perseus-renderer perseus-renderer-responsive"
|
|
216
208
|
>
|
|
217
209
|
<div
|
|
218
|
-
class="
|
|
210
|
+
class="paragraph"
|
|
211
|
+
data-perseus-paragraph-index="0"
|
|
219
212
|
>
|
|
220
213
|
<div
|
|
221
214
|
class="paragraph"
|
|
222
|
-
data-perseus-paragraph-index="0"
|
|
223
215
|
>
|
|
224
|
-
|
|
225
|
-
class="paragraph"
|
|
226
|
-
>
|
|
227
|
-
Hint #1
|
|
228
|
-
</div>
|
|
216
|
+
Hint #1
|
|
229
217
|
</div>
|
|
230
218
|
</div>
|
|
231
|
-
</
|
|
219
|
+
</div>
|
|
232
220
|
</div>
|
|
233
221
|
<div
|
|
234
222
|
class="perseus-hint-renderer"
|
|
@@ -245,24 +233,20 @@ exports[`server item renderer should snapshot: initial render 1`] = `
|
|
|
245
233
|
>
|
|
246
234
|
2 / 3
|
|
247
235
|
</span>
|
|
248
|
-
<
|
|
249
|
-
class="
|
|
236
|
+
<div
|
|
237
|
+
class="perseus-renderer perseus-renderer-responsive"
|
|
250
238
|
>
|
|
251
239
|
<div
|
|
252
|
-
class="
|
|
240
|
+
class="paragraph"
|
|
241
|
+
data-perseus-paragraph-index="0"
|
|
253
242
|
>
|
|
254
243
|
<div
|
|
255
244
|
class="paragraph"
|
|
256
|
-
data-perseus-paragraph-index="0"
|
|
257
245
|
>
|
|
258
|
-
|
|
259
|
-
class="paragraph"
|
|
260
|
-
>
|
|
261
|
-
Hint #2
|
|
262
|
-
</div>
|
|
246
|
+
Hint #2
|
|
263
247
|
</div>
|
|
264
248
|
</div>
|
|
265
|
-
</
|
|
249
|
+
</div>
|
|
266
250
|
</div>
|
|
267
251
|
<div
|
|
268
252
|
class="perseus-hint-renderer last-hint last-rendered"
|
|
@@ -279,24 +263,20 @@ exports[`server item renderer should snapshot: initial render 1`] = `
|
|
|
279
263
|
>
|
|
280
264
|
3 / 3
|
|
281
265
|
</span>
|
|
282
|
-
<
|
|
283
|
-
class="
|
|
266
|
+
<div
|
|
267
|
+
class="perseus-renderer perseus-renderer-responsive"
|
|
284
268
|
>
|
|
285
269
|
<div
|
|
286
|
-
class="
|
|
270
|
+
class="paragraph"
|
|
271
|
+
data-perseus-paragraph-index="0"
|
|
287
272
|
>
|
|
288
273
|
<div
|
|
289
274
|
class="paragraph"
|
|
290
|
-
data-perseus-paragraph-index="0"
|
|
291
275
|
>
|
|
292
|
-
|
|
293
|
-
class="paragraph"
|
|
294
|
-
>
|
|
295
|
-
Hint #3
|
|
296
|
-
</div>
|
|
276
|
+
Hint #3
|
|
297
277
|
</div>
|
|
298
278
|
</div>
|
|
299
|
-
</
|
|
279
|
+
</div>
|
|
300
280
|
</div>
|
|
301
281
|
</div>
|
|
302
282
|
</div>
|
|
@@ -30,9 +30,7 @@ const HarnassedButtonGroup = (
|
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
export const ButtonsWithNoTitles: React.
|
|
34
|
-
args,
|
|
35
|
-
): React.ReactElement => {
|
|
33
|
+
export const ButtonsWithNoTitles = (args: StoryArgs): React.ReactElement => {
|
|
36
34
|
return (
|
|
37
35
|
<HarnassedButtonGroup
|
|
38
36
|
buttons={[
|
|
@@ -44,9 +42,7 @@ export const ButtonsWithNoTitles: React.FC<StoryArgs> = (
|
|
|
44
42
|
);
|
|
45
43
|
};
|
|
46
44
|
|
|
47
|
-
export const ButtonsWithTitles: React.
|
|
48
|
-
args,
|
|
49
|
-
): React.ReactElement => {
|
|
45
|
+
export const ButtonsWithTitles = (args: StoryArgs): React.ReactElement => {
|
|
50
46
|
return (
|
|
51
47
|
<HarnassedButtonGroup
|
|
52
48
|
buttons={[
|
|
@@ -21,8 +21,8 @@ export default {
|
|
|
21
21
|
title: "Perseus/Components/Fixed to Responsive",
|
|
22
22
|
} as Story;
|
|
23
23
|
|
|
24
|
-
export const SmallImageWithSmallContainer
|
|
25
|
-
args,
|
|
24
|
+
export const SmallImageWithSmallContainer = (
|
|
25
|
+
args: StoryArgs,
|
|
26
26
|
): React.ReactElement => {
|
|
27
27
|
return (
|
|
28
28
|
<FixedToResponsive width={width} height={sizeSmall}>
|
|
@@ -36,8 +36,8 @@ export const SmallImageWithSmallContainer: React.FC<StoryArgs> = (
|
|
|
36
36
|
);
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
export const SmallImageWithMediumContainer
|
|
40
|
-
args,
|
|
39
|
+
export const SmallImageWithMediumContainer = (
|
|
40
|
+
args: StoryArgs,
|
|
41
41
|
): React.ReactElement => {
|
|
42
42
|
return (
|
|
43
43
|
<FixedToResponsive width={width} height={sizeMedium}>
|
|
@@ -51,8 +51,8 @@ export const SmallImageWithMediumContainer: React.FC<StoryArgs> = (
|
|
|
51
51
|
);
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
export const LargeImageWithLargeContainer
|
|
55
|
-
args,
|
|
54
|
+
export const LargeImageWithLargeContainer = (
|
|
55
|
+
args: StoryArgs,
|
|
56
56
|
): React.ReactElement => {
|
|
57
57
|
return (
|
|
58
58
|
<FixedToResponsive width={width} height={sizeLarge}>
|
|
@@ -66,8 +66,8 @@ export const LargeImageWithLargeContainer: React.FC<StoryArgs> = (
|
|
|
66
66
|
);
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
export const LargeImageWithSmallerContainer
|
|
70
|
-
args,
|
|
69
|
+
export const LargeImageWithSmallerContainer = (
|
|
70
|
+
args: StoryArgs,
|
|
71
71
|
): React.ReactElement => {
|
|
72
72
|
return (
|
|
73
73
|
<FixedToResponsive width={width} height={sizeSmall}>
|
|
@@ -81,9 +81,9 @@ export const LargeImageWithSmallerContainer: React.FC<StoryArgs> = (
|
|
|
81
81
|
);
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
export const TwoOverlayedImagesInsteadOneResponsiveContainer
|
|
85
|
-
StoryArgs
|
|
86
|
-
|
|
84
|
+
export const TwoOverlayedImagesInsteadOneResponsiveContainer = (
|
|
85
|
+
args: StoryArgs,
|
|
86
|
+
): React.ReactElement => {
|
|
87
87
|
return (
|
|
88
88
|
<FixedToResponsive width={width} height={sizeSmall}>
|
|
89
89
|
<img
|
|
@@ -104,8 +104,8 @@ export const TwoOverlayedImagesInsteadOneResponsiveContainer: React.FC<
|
|
|
104
104
|
);
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
-
export const HeightConstrainingAnImage
|
|
108
|
-
args,
|
|
107
|
+
export const HeightConstrainingAnImage = (
|
|
108
|
+
args: StoryArgs,
|
|
109
109
|
): React.ReactElement => {
|
|
110
110
|
return (
|
|
111
111
|
<FixedToResponsive
|
|
@@ -123,9 +123,7 @@ export const HeightConstrainingAnImage: React.FC<StoryArgs> = (
|
|
|
123
123
|
);
|
|
124
124
|
};
|
|
125
125
|
|
|
126
|
-
export const AllowingFullBleed: React.
|
|
127
|
-
args,
|
|
128
|
-
): React.ReactElement => {
|
|
126
|
+
export const AllowingFullBleed = (args: StoryArgs): React.ReactElement => {
|
|
129
127
|
return (
|
|
130
128
|
<FixedToResponsive
|
|
131
129
|
width={width}
|
|
@@ -15,15 +15,13 @@ export default {
|
|
|
15
15
|
title: "Perseus/Components/Graph",
|
|
16
16
|
} as Story;
|
|
17
17
|
|
|
18
|
-
export const SquareBoxSizeAndOtherwiseEmpty
|
|
19
|
-
args,
|
|
18
|
+
export const SquareBoxSizeAndOtherwiseEmpty = (
|
|
19
|
+
args: StoryArgs,
|
|
20
20
|
): React.ReactElement => {
|
|
21
21
|
return <Graph box={[size, size]} />;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export const LabeledSquaredBox: React.
|
|
25
|
-
args,
|
|
26
|
-
): React.ReactElement => {
|
|
24
|
+
export const LabeledSquaredBox = (args: StoryArgs): React.ReactElement => {
|
|
27
25
|
return (
|
|
28
26
|
<Graph box={[size, size]} labels={["First label", "Second label"]} />
|
|
29
27
|
);
|
|
@@ -16,8 +16,8 @@ export default {
|
|
|
16
16
|
title: "Perseus/Components/Graphie",
|
|
17
17
|
} as Story;
|
|
18
18
|
|
|
19
|
-
export const SquareBoxSizeAndOtherwiseEmpty
|
|
20
|
-
args,
|
|
19
|
+
export const SquareBoxSizeAndOtherwiseEmpty = (
|
|
20
|
+
args: StoryArgs,
|
|
21
21
|
): React.ReactElement => {
|
|
22
22
|
return (
|
|
23
23
|
<Graphie
|
|
@@ -28,8 +28,6 @@ export const SquareBoxSizeAndOtherwiseEmpty: React.FC<StoryArgs> = (
|
|
|
28
28
|
);
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
export const PieChartGraphieLabels: React.
|
|
32
|
-
args,
|
|
33
|
-
): React.ReactElement => {
|
|
31
|
+
export const PieChartGraphieLabels = (args: StoryArgs): React.ReactElement => {
|
|
34
32
|
return <ItemRendererWithDebugUI item={itemWithPieChart} />;
|
|
35
33
|
};
|
|
@@ -12,9 +12,7 @@ export default {
|
|
|
12
12
|
title: "Perseus/Components/HUD",
|
|
13
13
|
} as Story;
|
|
14
14
|
|
|
15
|
-
export const TestMessageDisabled: React.
|
|
16
|
-
args,
|
|
17
|
-
): React.ReactElement => {
|
|
15
|
+
export const TestMessageDisabled = (args: StoryArgs): React.ReactElement => {
|
|
18
16
|
return (
|
|
19
17
|
<Hud
|
|
20
18
|
fixedPosition={false}
|
|
@@ -25,9 +23,7 @@ export const TestMessageDisabled: React.FC<StoryArgs> = (
|
|
|
25
23
|
);
|
|
26
24
|
};
|
|
27
25
|
|
|
28
|
-
export const TestMessageEnabled: React.
|
|
29
|
-
args,
|
|
30
|
-
): React.ReactElement => {
|
|
26
|
+
export const TestMessageEnabled = (args: StoryArgs): React.ReactElement => {
|
|
31
27
|
return (
|
|
32
28
|
<Hud
|
|
33
29
|
fixedPosition={false}
|
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
},
|
|
55
55
|
} as Story;
|
|
56
56
|
|
|
57
|
-
export const Icon
|
|
57
|
+
export const Icon = (args: StoryArgs): React.ReactElement => (
|
|
58
58
|
<IconComponent
|
|
59
59
|
style={{display: "block"}}
|
|
60
60
|
icon={IconPaths.iconCheck}
|
|
@@ -15,7 +15,7 @@ export default {
|
|
|
15
15
|
title: "Perseus/Components/Image Loader",
|
|
16
16
|
} as Story;
|
|
17
17
|
|
|
18
|
-
export const SvgImage
|
|
18
|
+
export const SvgImage = (args: StoryArgs): React.ReactElement => {
|
|
19
19
|
return (
|
|
20
20
|
<ImageLoader
|
|
21
21
|
src={svgUrl}
|
|
@@ -29,7 +29,7 @@ export const SvgImage: React.FC<StoryArgs> = (args): React.ReactElement => {
|
|
|
29
29
|
);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
export const PngImage
|
|
32
|
+
export const PngImage = (args: StoryArgs): React.ReactElement => {
|
|
33
33
|
return (
|
|
34
34
|
<ImageLoader
|
|
35
35
|
src={imgUrl}
|
|
@@ -43,8 +43,8 @@ export const PngImage: React.FC<StoryArgs> = (args): React.ReactElement => {
|
|
|
43
43
|
);
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
export const InvalidImageWithChildrenForFailedLoading
|
|
47
|
-
args,
|
|
46
|
+
export const InvalidImageWithChildrenForFailedLoading = (
|
|
47
|
+
args: StoryArgs,
|
|
48
48
|
): React.ReactElement => {
|
|
49
49
|
return (
|
|
50
50
|
<ImageLoader
|