@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.
Files changed (249) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/components/fixed-to-responsive.d.ts +27 -1
  3. package/dist/components/fixed-to-responsive.js.flow +27 -1
  4. package/dist/components/graph.d.ts +42 -26
  5. package/dist/components/graph.js.flow +42 -28
  6. package/dist/components/graphie.d.ts +34 -22
  7. package/dist/components/graphie.js.flow +37 -24
  8. package/dist/components/highlighting/highlightable-content.d.ts +4 -4
  9. package/dist/components/highlighting/highlightable-content.js.flow +4 -7
  10. package/dist/components/highlighting/ui/highlight-renderer.d.ts +6 -6
  11. package/dist/components/highlighting/ui/highlight-renderer.js.flow +6 -8
  12. package/dist/components/highlighting/ui/highlight-set-renderer.d.ts +5 -5
  13. package/dist/components/highlighting/ui/highlight-set-renderer.js.flow +5 -8
  14. package/dist/components/highlighting/ui/highlight-tooltip.d.ts +2 -2
  15. package/dist/components/highlighting/ui/highlight-tooltip.js.flow +2 -4
  16. package/dist/components/highlighting/ui/highlighting-ui.d.ts +2 -2
  17. package/dist/components/highlighting/ui/highlighting-ui.js.flow +2 -2
  18. package/dist/components/highlighting/ui/selection-tracker.d.ts +5 -5
  19. package/dist/components/highlighting/ui/selection-tracker.js.flow +5 -7
  20. package/dist/components/highlighting/word-indexer.d.ts +2 -2
  21. package/dist/components/highlighting/word-indexer.js.flow +2 -2
  22. package/dist/components/hud.d.ts +8 -14
  23. package/dist/components/hud.js.flow +7 -14
  24. package/dist/components/inline-icon.d.ts +27 -3
  25. package/dist/components/inline-icon.js.flow +26 -3
  26. package/dist/components/lint.d.ts +41 -13
  27. package/dist/components/lint.js.flow +42 -13
  28. package/dist/components/math-output.d.ts +15 -11
  29. package/dist/components/math-output.js.flow +15 -11
  30. package/dist/components/simple-keypad-input.d.ts +1 -1
  31. package/dist/components/simple-keypad-input.js.flow +1 -1
  32. package/dist/components/sortable.d.ts +17 -9
  33. package/dist/components/sortable.js.flow +22 -9
  34. package/dist/components/svg-image.d.ts +5 -3
  35. package/dist/components/svg-image.js.flow +5 -3
  36. package/dist/components/tex-buttons.d.ts +2 -2
  37. package/dist/components/tex-buttons.js.flow +2 -2
  38. package/dist/components/tooltip.d.ts +45 -4
  39. package/dist/components/tooltip.js.flow +44 -31
  40. package/dist/error-boundary.d.ts +4 -4
  41. package/dist/error-boundary.js.flow +4 -6
  42. package/dist/es/index.css +0 -3
  43. package/dist/es/index.js +484 -658
  44. package/dist/es/index.js.map +1 -1
  45. package/dist/index.css +0 -3
  46. package/dist/index.js +488 -655
  47. package/dist/index.js.map +1 -1
  48. package/dist/perseus-types.d.ts +11 -10
  49. package/dist/perseus-types.js.flow +11 -10
  50. package/dist/renderer.d.ts +2 -2
  51. package/dist/renderer.js.flow +1 -3
  52. package/dist/styles/shared.d.ts +0 -1
  53. package/dist/styles/shared.js.flow +0 -1
  54. package/dist/types.d.ts +0 -10
  55. package/dist/types.js.flow +0 -13
  56. package/dist/util/a11y.d.ts +0 -1
  57. package/dist/util/a11y.js.flow +0 -1
  58. package/dist/util/interactive.d.ts +2 -0
  59. package/dist/util/interactive.js.flow +2 -0
  60. package/dist/util.d.ts +3 -3
  61. package/dist/util.js.flow +4 -3
  62. package/dist/widgets/__stories__/test-keypad-context-wrapper.d.ts +2 -2
  63. package/dist/widgets/__stories__/test-keypad-context-wrapper.js.flow +2 -4
  64. package/dist/widgets/expression.d.ts +2 -2
  65. package/dist/widgets/expression.js.flow +2 -2
  66. package/dist/widgets/grapher.d.ts +1 -1
  67. package/dist/widgets/grapher.js.flow +12 -3
  68. package/dist/widgets/interaction/element-container.d.ts +5 -4
  69. package/dist/widgets/interaction/element-container.js.flow +6 -11
  70. package/dist/widgets/label-image/marker.d.ts +4 -4
  71. package/dist/widgets/label-image/marker.js.flow +4 -6
  72. package/dist/widgets/matcher.d.ts +7 -3
  73. package/dist/widgets/matcher.js.flow +7 -3
  74. package/dist/widgets/number-line.d.ts +1 -1
  75. package/dist/widgets/number-line.js.flow +1 -1
  76. package/dist/widgets/numeric-input.d.ts +0 -2
  77. package/dist/widgets/numeric-input.js.flow +0 -4
  78. package/dist/widgets/radio/base-radio.d.ts +7 -1
  79. package/dist/widgets/radio/base-radio.js.flow +7 -1
  80. package/dist/widgets/radio/choice-icon/choice-icon.d.ts +1 -1
  81. package/dist/widgets/radio/choice-icon/choice-icon.js.flow +1 -1
  82. package/dist/widgets/radio/choice-icon/cross-out-line.d.ts +2 -2
  83. package/dist/widgets/radio/choice-icon/cross-out-line.js.flow +2 -2
  84. package/dist/widgets/radio/focus-ring.d.ts +8 -1
  85. package/dist/widgets/radio/focus-ring.js.flow +8 -1
  86. package/dist/widgets/radio/option-status.d.ts +2 -2
  87. package/dist/widgets/radio/option-status.js.flow +2 -2
  88. package/dist/widgets/video-transcript-link.d.ts +1 -1
  89. package/dist/widgets/video-transcript-link.js.flow +1 -1
  90. package/package.json +4 -4
  91. package/src/__stories__/item-renderer.stories.tsx +2 -6
  92. package/src/__stories__/server-item-renderer.stories.tsx +2 -6
  93. package/src/__tests__/__snapshots__/item-renderer.test.tsx.snap +151 -159
  94. package/src/__tests__/__snapshots__/renderer.test.tsx.snap +358 -394
  95. package/src/__tests__/__snapshots__/server-item-renderer.test.tsx.snap +169 -189
  96. package/src/components/__stories__/button-group.stories.tsx +2 -6
  97. package/src/components/__stories__/fixed-to-responsive.stories.tsx +14 -16
  98. package/src/components/__stories__/graph.stories.tsx +3 -5
  99. package/src/components/__stories__/graphie.stories.tsx +3 -5
  100. package/src/components/__stories__/hud.stories.tsx +2 -6
  101. package/src/components/__stories__/icon.stories.tsx +1 -1
  102. package/src/components/__stories__/image-loader.stories.tsx +4 -4
  103. package/src/components/__stories__/info-tip.stories.tsx +2 -6
  104. package/src/components/__stories__/inline-icon.stories.tsx +4 -8
  105. package/src/components/__stories__/input-with-examples.stories.tsx +6 -10
  106. package/src/components/__stories__/lint.stories.tsx +62 -27
  107. package/src/components/__stories__/math-input.stories.tsx +4 -8
  108. package/src/components/__stories__/math-output.stories.tsx +3 -5
  109. package/src/components/__stories__/multi-button-group.stories.tsx +2 -6
  110. package/src/components/__stories__/number-input.stories.tsx +6 -8
  111. package/src/components/__stories__/prop-check-box.stories.tsx +9 -9
  112. package/src/components/__stories__/range-input.stories.tsx +4 -6
  113. package/src/components/__stories__/simple-keypad-input.stories.tsx +2 -4
  114. package/src/components/__stories__/sortable.stories.tsx +20 -20
  115. package/src/components/__stories__/stub-tag-editor.stories.tsx +5 -9
  116. package/src/components/__stories__/svg-image.stories.tsx +10 -18
  117. package/src/components/__stories__/tex.stories.tsx +1 -3
  118. package/src/components/__stories__/text-buttons.stories.tsx +10 -22
  119. package/src/components/__stories__/text-input.stories.tsx +4 -10
  120. package/src/components/__stories__/text-list-editor.stories.tsx +1 -3
  121. package/src/components/__stories__/tooltip.stories.tsx +52 -0
  122. package/src/components/__stories__/zoomable-tex.stories.tsx +6 -4
  123. package/src/components/__stories__/zoomable.stories.tsx +1 -3
  124. package/src/components/__tests__/__snapshots__/sortable.test.tsx.snap +114 -30
  125. package/src/components/__tests__/__snapshots__/sorter.test.tsx.snap +172 -204
  126. package/src/components/__tests__/sortable.test.tsx +54 -16
  127. package/src/components/__tests__/sorter.test.tsx +12 -9
  128. package/src/components/fixed-to-responsive.tsx +43 -38
  129. package/src/components/graph.tsx +95 -81
  130. package/src/components/graphie.tsx +62 -32
  131. package/src/components/highlighting/highlightable-content.tsx +4 -7
  132. package/src/components/highlighting/ui/highlight-renderer.tsx +6 -9
  133. package/src/components/highlighting/ui/highlight-set-renderer.tsx +5 -8
  134. package/src/components/highlighting/ui/highlight-tooltip.tsx +2 -2
  135. package/src/components/highlighting/ui/highlighting-ui.tsx +2 -2
  136. package/src/components/highlighting/ui/selection-tracker.tsx +5 -8
  137. package/src/components/highlighting/word-indexer.tsx +2 -2
  138. package/src/components/hud.tsx +104 -115
  139. package/src/components/inline-icon.tsx +17 -34
  140. package/src/components/input-with-examples.tsx +4 -4
  141. package/src/components/lint.tsx +47 -41
  142. package/src/components/math-output.tsx +17 -11
  143. package/src/components/simple-keypad-input.tsx +4 -4
  144. package/src/components/sortable.tsx +134 -94
  145. package/src/components/svg-image.tsx +10 -11
  146. package/src/components/tex-buttons.tsx +2 -2
  147. package/src/components/tooltip.tsx +189 -171
  148. package/src/components/visibility-observer/__stories__/visibility-observer.stories.tsx +1 -3
  149. package/src/error-boundary.tsx +4 -7
  150. package/src/interactive2/types.ts +2 -2
  151. package/src/multi-items/__stories__/multi-renderer.stories.tsx +1 -1
  152. package/src/multi-items/__tests__/__snapshots__/multi-renderer.test.tsx.snap +708 -764
  153. package/src/multi-items/__tests__/multi-renderer.test.tsx +2 -3
  154. package/src/perseus-types.ts +13 -12
  155. package/src/renderer.tsx +11 -22
  156. package/src/types.ts +0 -18
  157. package/src/util/graphie.ts +3 -3
  158. package/src/util/interactive.ts +18 -5
  159. package/src/util/tex.ts +13 -77
  160. package/src/util.ts +3 -4
  161. package/src/widgets/__stories__/categorizer.stories.tsx +1 -1
  162. package/src/widgets/__stories__/cs-program.stories.tsx +1 -1
  163. package/src/widgets/__stories__/definition.stories.tsx +3 -7
  164. package/src/widgets/__stories__/dropdown.stories.tsx +1 -1
  165. package/src/widgets/__stories__/explanation.stories.tsx +2 -2
  166. package/src/widgets/__stories__/expression.stories.tsx +5 -11
  167. package/src/widgets/__stories__/graded-group-set.stories.tsx +1 -1
  168. package/src/widgets/__stories__/graded-group.stories.tsx +1 -1
  169. package/src/widgets/__stories__/grapher.stories.tsx +7 -21
  170. package/src/widgets/__stories__/group.stories.tsx +1 -1
  171. package/src/widgets/__stories__/iframe.stories.tsx +1 -1
  172. package/src/widgets/__stories__/image.stories.tsx +1 -1
  173. package/src/widgets/__stories__/input-number.stories.tsx +3 -12
  174. package/src/widgets/__stories__/interaction.stories.tsx +1 -1
  175. package/src/widgets/__stories__/interactive-graph.stories.tsx +9 -9
  176. package/src/widgets/__stories__/matcher.stories.tsx +1 -1
  177. package/src/widgets/__stories__/matrix.stories.tsx +1 -1
  178. package/src/widgets/__stories__/number-line.stories.tsx +1 -1
  179. package/src/widgets/__stories__/numeric-input.stories.tsx +3 -5
  180. package/src/widgets/__stories__/orderer.stories.tsx +1 -1
  181. package/src/widgets/__stories__/passage-ref.stories.tsx +2 -2
  182. package/src/widgets/__stories__/passage.stories.tsx +3 -9
  183. package/src/widgets/__stories__/radio.stories.tsx +3 -5
  184. package/src/widgets/__stories__/sorter.stories.tsx +1 -1
  185. package/src/widgets/__stories__/test-keypad-context-wrapper.tsx +2 -4
  186. package/src/widgets/__stories__/transformer.stories.tsx +1 -1
  187. package/src/widgets/__stories__/unit.stories.tsx +1 -3
  188. package/src/widgets/__stories__/video-transcript-link.stories.tsx +2 -6
  189. package/src/widgets/__stories__/video.stories.tsx +1 -1
  190. package/src/widgets/__testdata__/group.testdata.ts +0 -2
  191. package/src/widgets/__tests__/__snapshots__/categorizer.test.ts.snap +717 -773
  192. package/src/widgets/__tests__/__snapshots__/cs-program.test.ts.snap +28 -36
  193. package/src/widgets/__tests__/__snapshots__/definition.test.ts.snap +52 -60
  194. package/src/widgets/__tests__/__snapshots__/dropdown.test.ts.snap +100 -108
  195. package/src/widgets/__tests__/__snapshots__/explanation.test.ts.snap +212 -260
  196. package/src/widgets/__tests__/__snapshots__/graded-group-set-jipt.test.ts.snap +613 -641
  197. package/src/widgets/__tests__/__snapshots__/graded-group-set.test.ts.snap +249 -261
  198. package/src/widgets/__tests__/__snapshots__/graded-group.test.ts.snap +671 -735
  199. package/src/widgets/__tests__/__snapshots__/grapher.test.ts.snap +2676 -2684
  200. package/src/widgets/__tests__/__snapshots__/group.test.tsx.snap +938 -1002
  201. package/src/widgets/__tests__/__snapshots__/iframe.test.ts.snap +28 -36
  202. package/src/widgets/__tests__/__snapshots__/image.test.ts.snap +227 -255
  203. package/src/widgets/__tests__/__snapshots__/input-number.test.ts.snap +353 -357
  204. package/src/widgets/__tests__/__snapshots__/interaction.test.ts.snap +255 -259
  205. package/src/widgets/__tests__/__snapshots__/interactive-graph.test.ts.snap +2401 -2433
  206. package/src/widgets/__tests__/__snapshots__/matcher.test.tsx.snap +600 -756
  207. package/src/widgets/__tests__/__snapshots__/matrix.test.ts.snap +420 -428
  208. package/src/widgets/__tests__/__snapshots__/number-line.test.ts.snap +762 -770
  209. package/src/widgets/__tests__/__snapshots__/numeric-input.test.ts.snap +373 -393
  210. package/src/widgets/__tests__/__snapshots__/orderer.test.ts.snap +116 -148
  211. package/src/widgets/__tests__/__snapshots__/passage-ref.test.ts.snap +289 -301
  212. package/src/widgets/__tests__/__snapshots__/passage.test.tsx.snap +1679 -1711
  213. package/src/widgets/__tests__/__snapshots__/radio.test.ts.snap +2692 -2960
  214. package/src/widgets/__tests__/__snapshots__/video.test.ts.snap +90 -98
  215. package/src/widgets/__tests__/group.test.tsx +0 -2
  216. package/src/widgets/__tests__/matcher.test.tsx +33 -9
  217. package/src/widgets/__tests__/radio/focus-ring.test.tsx +0 -1
  218. package/src/widgets/expression.tsx +12 -9
  219. package/src/widgets/grapher.tsx +3 -3
  220. package/src/widgets/image.tsx +2 -2
  221. package/src/widgets/interaction/element-container.tsx +7 -8
  222. package/src/widgets/interactive-graph.tsx +5 -5
  223. package/src/widgets/label-image/__stories__/answer-choices.stories.tsx +2 -4
  224. package/src/widgets/label-image/__stories__/marker.stories.tsx +9 -19
  225. package/src/widgets/label-image/marker.tsx +4 -4
  226. package/src/widgets/matcher.tsx +43 -24
  227. package/src/widgets/number-line.tsx +1 -1
  228. package/src/widgets/numeric-input.tsx +0 -3
  229. package/src/widgets/passage/passage-markdown.tsx +2 -2
  230. package/src/widgets/radio/__stories__/base-radio.stories.tsx +11 -19
  231. package/src/widgets/radio/__stories__/choice-icon.stories.tsx +9 -11
  232. package/src/widgets/radio/__stories__/choice-none-above.stories.tsx +1 -1
  233. package/src/widgets/radio/__stories__/choice.stories.tsx +4 -4
  234. package/src/widgets/radio/__stories__/focus-ring.stories.tsx +1 -1
  235. package/src/widgets/radio/__stories__/option-status.stories.tsx +2 -4
  236. package/src/widgets/radio/base-radio.tsx +1 -1
  237. package/src/widgets/radio/choice-icon/choice-icon.tsx +5 -5
  238. package/src/widgets/radio/choice-icon/cross-out-line.tsx +1 -3
  239. package/src/widgets/radio/choice-none-above.tsx +2 -2
  240. package/src/widgets/radio/choice.tsx +1 -3
  241. package/src/widgets/radio/focus-ring.tsx +1 -1
  242. package/src/widgets/radio/option-status.tsx +2 -4
  243. package/src/widgets/radio/widget.tsx +0 -1
  244. package/src/widgets/reaction-diagram.tsx +2 -2
  245. package/src/widgets/simulator.tsx +4 -6
  246. package/src/widgets/video-transcript-link.tsx +1 -1
  247. package/{tsconfig.json → tsconfig-build.json} +6 -6
  248. package/tsconfig-build.tsbuildinfo +1 -0
  249. package/tsconfig.tsbuildinfo +0 -1
@@ -2,74 +2,66 @@
2
2
 
3
3
  exports[`cs-program widget should snapshot on mobile: first mobile render 1`] = `
4
4
  <div>
5
- <span
6
- class="mock-KatexProvider"
5
+ <div
6
+ class="perseus-renderer perseus-renderer-responsive"
7
7
  >
8
8
  <div
9
- class="perseus-renderer perseus-renderer-responsive"
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
15
  <div
16
- class="paragraph"
16
+ class="perseus-widget-container widget-nohighlight widget-block"
17
17
  >
18
18
  <div
19
- class="perseus-widget-container widget-nohighlight widget-block"
19
+ class="widthOverride_1vdzrqd-o_O-container_1v2yujs"
20
20
  >
21
- <div
22
- class="widthOverride_1vdzrqd-o_O-container_1v2yujs"
23
- >
24
- <iframe
25
- allowfullscreen=""
26
- class="perseus-scratchpad"
27
- sandbox="allow-popups allow-same-origin allow-scripts allow-top-navigation"
28
- src="http://localhost:8081/computer-programming/program/6293105639817216/embedded?embed=yes&author=no&editor=no&width=688&buttons=no&settings=%7B%7D"
29
- style="height: 540px; width: 100%;"
30
- />
31
- </div>
21
+ <iframe
22
+ allowfullscreen=""
23
+ class="perseus-scratchpad"
24
+ sandbox="allow-popups allow-same-origin allow-scripts allow-top-navigation"
25
+ src="http://localhost:8081/computer-programming/program/6293105639817216/embedded?embed=yes&author=no&editor=no&width=688&buttons=no&settings=%7B%7D"
26
+ style="height: 540px; width: 100%;"
27
+ />
32
28
  </div>
33
29
  </div>
34
30
  </div>
35
31
  </div>
36
- </span>
32
+ </div>
37
33
  </div>
38
34
  `;
39
35
 
40
36
  exports[`cs-program widget should snapshot: first render 1`] = `
41
37
  <div>
42
- <span
43
- class="mock-KatexProvider"
38
+ <div
39
+ class="perseus-renderer perseus-renderer-responsive"
44
40
  >
45
41
  <div
46
- class="perseus-renderer perseus-renderer-responsive"
42
+ class="paragraph"
43
+ data-perseus-paragraph-index="0"
47
44
  >
48
45
  <div
49
46
  class="paragraph"
50
- data-perseus-paragraph-index="0"
51
47
  >
52
48
  <div
53
- class="paragraph"
49
+ class="perseus-widget-container widget-nohighlight widget-block"
54
50
  >
55
51
  <div
56
- class="perseus-widget-container widget-nohighlight widget-block"
52
+ class="widthOverride_1vdzrqd-o_O-container_1v2yujs"
57
53
  >
58
- <div
59
- class="widthOverride_1vdzrqd-o_O-container_1v2yujs"
60
- >
61
- <iframe
62
- allowfullscreen=""
63
- class="perseus-scratchpad"
64
- sandbox="allow-popups allow-same-origin allow-scripts allow-top-navigation"
65
- src="http://localhost:8081/computer-programming/program/6293105639817216/embedded?embed=yes&author=no&editor=no&width=688&buttons=no&settings=%7B%7D"
66
- style="height: 540px; width: 100%;"
67
- />
68
- </div>
54
+ <iframe
55
+ allowfullscreen=""
56
+ class="perseus-scratchpad"
57
+ sandbox="allow-popups allow-same-origin allow-scripts allow-top-navigation"
58
+ src="http://localhost:8081/computer-programming/program/6293105639817216/embedded?embed=yes&author=no&editor=no&width=688&buttons=no&settings=%7B%7D"
59
+ style="height: 540px; width: 100%;"
60
+ />
69
61
  </div>
70
62
  </div>
71
63
  </div>
72
64
  </div>
73
- </span>
65
+ </div>
74
66
  </div>
75
67
  `;
@@ -2,104 +2,96 @@
2
2
 
3
3
  exports[`Definition widget should have a default snapshot: first render 1`] = `
4
4
  <div>
5
- <span
6
- class="mock-KatexProvider"
5
+ <div
6
+ class="perseus-renderer perseus-renderer-responsive"
7
7
  >
8
8
  <div
9
- class="perseus-renderer perseus-renderer-responsive"
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
- <div
16
- class="paragraph"
17
- >
18
- Read the excerpt and answer the question below.
19
- </div>
15
+ Read the excerpt and answer the question below.
20
16
  </div>
17
+ </div>
18
+ <div
19
+ class="paragraph"
20
+ data-perseus-paragraph-index="1"
21
+ >
21
22
  <div
22
23
  class="paragraph"
23
- data-perseus-paragraph-index="1"
24
24
  >
25
+ The Governor and Council of the Massachusetts had much conference many days; and at last . . . . concluded a peace and friendship with
25
26
  <div
26
- class="paragraph"
27
+ class="perseus-widget-container widget-nohighlight perseus-widget__definition widget-inline"
27
28
  >
28
- The Governor and Council of the Massachusetts had much conference many days; and at last . . . . concluded a peace and friendship with
29
- <div
30
- class="perseus-widget-container widget-nohighlight perseus-widget__definition widget-inline"
29
+ <button
30
+ aria-controls="uid-popover-0-wb-id"
31
+ aria-disabled="false"
32
+ aria-expanded="false"
33
+ class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4"
34
+ id="uid-popover-0-wb-id-anchor"
35
+ type="button"
31
36
  >
32
- <button
33
- aria-controls="uid-popover-0-wb-id"
34
- aria-disabled="false"
35
- aria-expanded="false"
36
- class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4"
37
- id="uid-popover-0-wb-id-anchor"
38
- type="button"
37
+ <span
38
+ style="color: rgb(24, 101, 242);"
39
39
  >
40
- <span
41
- style="color: rgb(24, 101, 242);"
42
- >
43
- the Pequots
44
- </span>
45
- </button>
46
- </div>
47
- , upon these conditions.
40
+ the Pequots
41
+ </span>
42
+ </button>
48
43
  </div>
44
+ , upon these conditions.
49
45
  </div>
50
46
  </div>
51
- </span>
47
+ </div>
52
48
  </div>
53
49
  `;
54
50
 
55
51
  exports[`Definition widget should have an open state snapshot: open state 1`] = `
56
52
  <div>
57
- <span
58
- class="mock-KatexProvider"
53
+ <div
54
+ class="perseus-renderer perseus-renderer-responsive"
59
55
  >
60
56
  <div
61
- class="perseus-renderer perseus-renderer-responsive"
57
+ class="paragraph"
58
+ data-perseus-paragraph-index="0"
62
59
  >
63
60
  <div
64
61
  class="paragraph"
65
- data-perseus-paragraph-index="0"
66
62
  >
67
- <div
68
- class="paragraph"
69
- >
70
- Read the excerpt and answer the question below.
71
- </div>
63
+ Read the excerpt and answer the question below.
72
64
  </div>
65
+ </div>
66
+ <div
67
+ class="paragraph"
68
+ data-perseus-paragraph-index="1"
69
+ >
73
70
  <div
74
71
  class="paragraph"
75
- data-perseus-paragraph-index="1"
76
72
  >
73
+ The Governor and Council of the Massachusetts had much conference many days; and at last . . . . concluded a peace and friendship with
77
74
  <div
78
- class="paragraph"
75
+ class="perseus-widget-container widget-nohighlight perseus-widget__definition widget-inline"
79
76
  >
80
- The Governor and Council of the Massachusetts had much conference many days; and at last . . . . concluded a peace and friendship with
81
- <div
82
- class="perseus-widget-container widget-nohighlight perseus-widget__definition widget-inline"
77
+ <button
78
+ aria-controls="uid-popover-1-wb-id"
79
+ aria-disabled="false"
80
+ aria-expanded="true"
81
+ class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4"
82
+ id="uid-popover-1-wb-id-anchor"
83
+ type="button"
83
84
  >
84
- <button
85
- aria-controls="uid-popover-1-wb-id"
86
- aria-disabled="false"
87
- aria-expanded="true"
88
- class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4"
89
- id="uid-popover-1-wb-id-anchor"
90
- type="button"
85
+ <span
86
+ style="color: rgb(24, 101, 242); border-bottom: 2px solid #1865f2;"
91
87
  >
92
- <span
93
- style="color: rgb(24, 101, 242); border-bottom: 2px solid #1865f2;"
94
- >
95
- the Pequots
96
- </span>
97
- </button>
98
- </div>
99
- , upon these conditions.
88
+ the Pequots
89
+ </span>
90
+ </button>
100
91
  </div>
92
+ , upon these conditions.
101
93
  </div>
102
94
  </div>
103
- </span>
95
+ </div>
104
96
  </div>
105
97
  `;
@@ -2,156 +2,148 @@
2
2
 
3
3
  exports[`Dropdown widget should snapshot when opened: dropdown open 1`] = `
4
4
  <div>
5
- <span
6
- class="mock-KatexProvider"
5
+ <div
6
+ class="perseus-renderer perseus-renderer-responsive"
7
7
  >
8
8
  <div
9
- class="perseus-renderer perseus-renderer-responsive"
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
+ The total number of boxes the forklift can carry is
15
16
  <div
16
- class="paragraph"
17
+ class="perseus-widget-container widget-nohighlight widget-inline-block"
17
18
  >
18
- The total number of boxes the forklift can carry is
19
- <div
20
- class="perseus-widget-container widget-nohighlight widget-inline-block"
21
- >
22
- <div>
23
- <div
24
- class="default_xu2jcg-o_O-menuWrapper_wvrnr4"
19
+ <div>
20
+ <div
21
+ class="default_xu2jcg-o_O-menuWrapper_wvrnr4"
22
+ >
23
+ <span
24
+ aria-atomic="true"
25
+ aria-live="polite"
26
+ aria-relevant="additions text"
27
+ class="srOnly_19bpjuy"
28
+ data-test-id="dropdown-live-region"
29
+ >
30
+ 3 items
31
+ </span>
32
+ <button
33
+ aria-expanded="true"
34
+ aria-haspopup="listbox"
35
+ class="button_vr44p2-o_O-shared_u51dsh-o_O-default_kjzwx1-o_O-focus_1qpi544"
36
+ type="button"
25
37
  >
26
38
  <span
27
- aria-atomic="true"
28
- aria-live="polite"
29
- aria-relevant="additions text"
30
- class="srOnly_19bpjuy"
31
- data-test-id="dropdown-live-region"
39
+ class="text_f1191h-o_O-LabelMedium_1rew30o-o_O-text_16ujc3c"
32
40
  >
33
- 3 items
41
+ greater/less than or equal to
34
42
  </span>
35
- <button
36
- aria-expanded="true"
37
- aria-haspopup="listbox"
38
- class="button_vr44p2-o_O-shared_u51dsh-o_O-default_kjzwx1-o_O-focus_1qpi544"
39
- type="button"
43
+ <svg
44
+ aria-hidden="true"
45
+ class="svg_aeiopc-o_O-caret_ntkmq"
46
+ height="16"
47
+ viewBox="0 0 16 16"
48
+ width="16"
40
49
  >
41
- <span
42
- class="text_f1191h-o_O-LabelMedium_1rew30o-o_O-text_16ujc3c"
43
- >
44
- greater/less than or equal to
45
- </span>
46
- <svg
47
- aria-hidden="true"
48
- class="svg_aeiopc-o_O-caret_ntkmq"
49
- height="16"
50
- viewBox="0 0 16 16"
51
- width="16"
52
- >
53
- <path
54
- d="M8 8.586l3.293-3.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L8 8.586z"
55
- fill="rgba(33,36,44,0.64)"
56
- />
57
- </svg>
58
- </button>
59
- </div>
50
+ <path
51
+ d="M8 8.586l3.293-3.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L8 8.586z"
52
+ fill="rgba(33,36,44,0.64)"
53
+ />
54
+ </svg>
55
+ </button>
60
56
  </div>
61
57
  </div>
62
-
58
+ </div>
59
+
60
+ <span
61
+ style="white-space: nowrap;"
62
+ >
63
+ <span />
63
64
  <span
64
- style="white-space: nowrap;"
65
+ class="mock-TeX"
65
66
  >
66
- <span />
67
- <span
68
- class="mock-TeX"
69
- >
70
- 60
71
- </span>
72
- <span />
67
+ 60
73
68
  </span>
74
- .
75
- </div>
69
+ <span />
70
+ </span>
71
+ .
76
72
  </div>
77
73
  </div>
78
- </span>
74
+ </div>
79
75
  </div>
80
76
  `;
81
77
 
82
78
  exports[`Dropdown widget should snapshot: initial render 1`] = `
83
79
  <div>
84
- <span
85
- class="mock-KatexProvider"
80
+ <div
81
+ class="perseus-renderer perseus-renderer-responsive"
86
82
  >
87
83
  <div
88
- class="perseus-renderer perseus-renderer-responsive"
84
+ class="paragraph"
85
+ data-perseus-paragraph-index="0"
89
86
  >
90
87
  <div
91
88
  class="paragraph"
92
- data-perseus-paragraph-index="0"
93
89
  >
90
+ The total number of boxes the forklift can carry is
94
91
  <div
95
- class="paragraph"
92
+ class="perseus-widget-container widget-nohighlight widget-inline-block"
96
93
  >
97
- The total number of boxes the forklift can carry is
98
- <div
99
- class="perseus-widget-container widget-nohighlight widget-inline-block"
100
- >
101
- <div>
102
- <div
103
- class="default_xu2jcg-o_O-menuWrapper_wvrnr4"
94
+ <div>
95
+ <div
96
+ class="default_xu2jcg-o_O-menuWrapper_wvrnr4"
97
+ >
98
+ <span
99
+ aria-atomic="true"
100
+ aria-live="polite"
101
+ aria-relevant="additions text"
102
+ class="srOnly_19bpjuy"
103
+ data-test-id="dropdown-live-region"
104
+ />
105
+ <button
106
+ aria-expanded="false"
107
+ aria-haspopup="listbox"
108
+ class="button_vr44p2-o_O-shared_u51dsh-o_O-default_kjzwx1"
109
+ type="button"
104
110
  >
105
111
  <span
106
- aria-atomic="true"
107
- aria-live="polite"
108
- aria-relevant="additions text"
109
- class="srOnly_19bpjuy"
110
- data-test-id="dropdown-live-region"
111
- />
112
- <button
113
- aria-expanded="false"
114
- aria-haspopup="listbox"
115
- class="button_vr44p2-o_O-shared_u51dsh-o_O-default_kjzwx1"
116
- type="button"
112
+ class="text_f1191h-o_O-LabelMedium_1rew30o-o_O-text_16ujc3c"
113
+ >
114
+ greater/less than or equal to
115
+ </span>
116
+ <svg
117
+ aria-hidden="true"
118
+ class="svg_aeiopc-o_O-caret_ntkmq"
119
+ height="16"
120
+ viewBox="0 0 16 16"
121
+ width="16"
117
122
  >
118
- <span
119
- class="text_f1191h-o_O-LabelMedium_1rew30o-o_O-text_16ujc3c"
120
- >
121
- greater/less than or equal to
122
- </span>
123
- <svg
124
- aria-hidden="true"
125
- class="svg_aeiopc-o_O-caret_ntkmq"
126
- height="16"
127
- viewBox="0 0 16 16"
128
- width="16"
129
- >
130
- <path
131
- d="M8 8.586l3.293-3.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L8 8.586z"
132
- fill="rgba(33,36,44,0.64)"
133
- />
134
- </svg>
135
- </button>
136
- </div>
123
+ <path
124
+ d="M8 8.586l3.293-3.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L8 8.586z"
125
+ fill="rgba(33,36,44,0.64)"
126
+ />
127
+ </svg>
128
+ </button>
137
129
  </div>
138
130
  </div>
139
-
131
+ </div>
132
+
133
+ <span
134
+ style="white-space: nowrap;"
135
+ >
136
+ <span />
140
137
  <span
141
- style="white-space: nowrap;"
138
+ class="mock-TeX"
142
139
  >
143
- <span />
144
- <span
145
- class="mock-TeX"
146
- >
147
- 60
148
- </span>
149
- <span />
140
+ 60
150
141
  </span>
151
- .
152
- </div>
142
+ <span />
143
+ </span>
144
+ .
153
145
  </div>
154
146
  </div>
155
- </span>
147
+ </div>
156
148
  </div>
157
149
  `;