@khanacademy/math-input 0.3.2 → 0.5.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 (176) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/{build/math-input.css → dist/es/index.css} +0 -150
  4. package/dist/es/index.js +2 -0
  5. package/dist/es/index.js.map +1 -0
  6. package/dist/index.css +586 -0
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.js +2 -0
  9. package/dist/index.js.flow +2 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/strings.js +71 -0
  12. package/index.html +20 -0
  13. package/less/echo.less +56 -0
  14. package/less/main.less +5 -0
  15. package/less/overrides.less +129 -0
  16. package/less/popover.less +22 -0
  17. package/less/tabbar.less +6 -0
  18. package/package.json +38 -70
  19. package/src/actions/index.js +57 -0
  20. package/src/components/__tests__/gesture-state-machine_test.js +437 -0
  21. package/src/components/__tests__/node-manager_test.js +89 -0
  22. package/src/components/__tests__/two-page-keypad_test.js +42 -0
  23. package/src/components/app.js +73 -0
  24. package/src/components/common-style.js +47 -0
  25. package/src/components/compute-layout-parameters.js +157 -0
  26. package/src/components/corner-decal.js +56 -0
  27. package/src/components/echo-manager.js +160 -0
  28. package/src/components/empty-keypad-button.js +49 -0
  29. package/src/components/expression-keypad.js +323 -0
  30. package/src/components/fraction-keypad.js +176 -0
  31. package/src/components/gesture-manager.js +226 -0
  32. package/src/components/gesture-state-machine.js +283 -0
  33. package/src/components/icon.js +74 -0
  34. package/src/components/iconography/arrow.js +22 -0
  35. package/src/components/iconography/backspace.js +29 -0
  36. package/src/components/iconography/cdot.js +29 -0
  37. package/src/components/iconography/cos.js +30 -0
  38. package/src/components/iconography/cube-root.js +36 -0
  39. package/src/components/iconography/dismiss.js +25 -0
  40. package/src/components/iconography/divide.js +34 -0
  41. package/src/components/iconography/down.js +16 -0
  42. package/src/components/iconography/equal.js +33 -0
  43. package/src/components/iconography/exp-2.js +29 -0
  44. package/src/components/iconography/exp-3.js +29 -0
  45. package/src/components/iconography/exp.js +29 -0
  46. package/src/components/iconography/frac.js +44 -0
  47. package/src/components/iconography/geq.js +33 -0
  48. package/src/components/iconography/gt.js +33 -0
  49. package/src/components/iconography/index.js +45 -0
  50. package/src/components/iconography/jump-into-numerator.js +41 -0
  51. package/src/components/iconography/jump-out-base.js +30 -0
  52. package/src/components/iconography/jump-out-denominator.js +41 -0
  53. package/src/components/iconography/jump-out-exponent.js +30 -0
  54. package/src/components/iconography/jump-out-numerator.js +41 -0
  55. package/src/components/iconography/jump-out-parentheses.js +33 -0
  56. package/src/components/iconography/left-paren.js +33 -0
  57. package/src/components/iconography/left.js +16 -0
  58. package/src/components/iconography/leq.js +33 -0
  59. package/src/components/iconography/ln.js +29 -0
  60. package/src/components/iconography/log-n.js +29 -0
  61. package/src/components/iconography/log.js +29 -0
  62. package/src/components/iconography/lt.js +33 -0
  63. package/src/components/iconography/minus.js +32 -0
  64. package/src/components/iconography/neq.js +33 -0
  65. package/src/components/iconography/parens.js +33 -0
  66. package/src/components/iconography/percent.js +49 -0
  67. package/src/components/iconography/period.js +26 -0
  68. package/src/components/iconography/plus.js +32 -0
  69. package/src/components/iconography/radical.js +36 -0
  70. package/src/components/iconography/right-paren.js +33 -0
  71. package/src/components/iconography/right.js +16 -0
  72. package/src/components/iconography/sin.js +30 -0
  73. package/src/components/iconography/sqrt.js +32 -0
  74. package/src/components/iconography/tan.js +30 -0
  75. package/src/components/iconography/times.js +33 -0
  76. package/src/components/iconography/up.js +16 -0
  77. package/src/components/input/__tests__/context-tracking_test.js +177 -0
  78. package/src/components/input/__tests__/math-wrapper.jsx +33 -0
  79. package/src/components/input/__tests__/mathquill_test.js +747 -0
  80. package/src/components/input/cursor-contexts.js +29 -0
  81. package/src/components/input/cursor-handle.js +137 -0
  82. package/src/components/input/drag-listener.js +75 -0
  83. package/src/components/input/math-input.js +924 -0
  84. package/src/components/input/math-wrapper.js +959 -0
  85. package/src/components/input/scroll-into-view.js +72 -0
  86. package/src/components/keypad/button-assets.js +492 -0
  87. package/src/components/keypad/button.js +106 -0
  88. package/src/components/keypad/button.stories.js +27 -0
  89. package/src/components/keypad/index.js +64 -0
  90. package/src/components/keypad/keypad-page-items.js +106 -0
  91. package/src/components/keypad/keypad-pages.stories.js +32 -0
  92. package/src/components/keypad/keypad.stories.js +35 -0
  93. package/src/components/keypad/numeric-input-page.js +100 -0
  94. package/src/components/keypad/pre-algebra-page.js +98 -0
  95. package/src/components/keypad/trigonometry-page.js +90 -0
  96. package/src/components/keypad-button.js +366 -0
  97. package/src/components/keypad-container.js +303 -0
  98. package/src/components/keypad.js +154 -0
  99. package/src/components/many-keypad-button.js +44 -0
  100. package/src/components/math-icon.js +65 -0
  101. package/src/components/multi-symbol-grid.js +182 -0
  102. package/src/components/multi-symbol-popover.js +59 -0
  103. package/src/components/navigation-pad.js +139 -0
  104. package/src/components/node-manager.js +129 -0
  105. package/src/components/popover-manager.js +76 -0
  106. package/src/components/popover-state-machine.js +173 -0
  107. package/src/components/prop-types.js +82 -0
  108. package/src/components/provided-keypad.js +99 -0
  109. package/src/components/styles.js +38 -0
  110. package/src/components/svg-icon.js +25 -0
  111. package/src/components/tabbar/__tests__/tabbar_test.js +65 -0
  112. package/src/components/tabbar/icons.js +69 -0
  113. package/src/components/tabbar/item.js +138 -0
  114. package/src/components/tabbar/tabbar.js +61 -0
  115. package/src/components/tabbar/tabbar.stories.js +60 -0
  116. package/src/components/tabbar/types.js +3 -0
  117. package/src/components/text-icon.js +52 -0
  118. package/src/components/touchable-keypad-button.js +146 -0
  119. package/src/components/two-page-keypad.js +99 -0
  120. package/src/components/velocity-tracker.js +76 -0
  121. package/src/components/z-indexes.js +9 -0
  122. package/src/consts.js +74 -0
  123. package/src/data/key-configs.js +349 -0
  124. package/src/data/keys.js +72 -0
  125. package/src/demo.js +8 -0
  126. package/src/fake-react-native-web/index.js +12 -0
  127. package/src/fake-react-native-web/text.js +56 -0
  128. package/src/fake-react-native-web/view.js +91 -0
  129. package/src/index.js +13 -0
  130. package/src/native-app.js +84 -0
  131. package/src/store/index.js +505 -0
  132. package/src/utils.js +18 -0
  133. package/tools/svg-to-react/convert.py +111 -0
  134. package/tools/svg-to-react/icons/math-keypad-icon-0.svg +32 -0
  135. package/tools/svg-to-react/icons/math-keypad-icon-1.svg +32 -0
  136. package/tools/svg-to-react/icons/math-keypad-icon-2.svg +32 -0
  137. package/tools/svg-to-react/icons/math-keypad-icon-3.svg +32 -0
  138. package/tools/svg-to-react/icons/math-keypad-icon-4.svg +32 -0
  139. package/tools/svg-to-react/icons/math-keypad-icon-5.svg +32 -0
  140. package/tools/svg-to-react/icons/math-keypad-icon-6.svg +32 -0
  141. package/tools/svg-to-react/icons/math-keypad-icon-7.svg +32 -0
  142. package/tools/svg-to-react/icons/math-keypad-icon-8.svg +32 -0
  143. package/tools/svg-to-react/icons/math-keypad-icon-9.svg +32 -0
  144. package/tools/svg-to-react/icons/math-keypad-icon-addition.svg +34 -0
  145. package/tools/svg-to-react/icons/math-keypad-icon-cos.svg +38 -0
  146. package/tools/svg-to-react/icons/math-keypad-icon-delete.svg +36 -0
  147. package/tools/svg-to-react/icons/math-keypad-icon-dismiss.svg +36 -0
  148. package/tools/svg-to-react/icons/math-keypad-icon-division.svg +36 -0
  149. package/tools/svg-to-react/icons/math-keypad-icon-equals-not.svg +50 -0
  150. package/tools/svg-to-react/icons/math-keypad-icon-equals.svg +48 -0
  151. package/tools/svg-to-react/icons/math-keypad-icon-exponent-2.svg +38 -0
  152. package/tools/svg-to-react/icons/math-keypad-icon-exponent-3.svg +38 -0
  153. package/tools/svg-to-react/icons/math-keypad-icon-exponent.svg +38 -0
  154. package/tools/svg-to-react/icons/math-keypad-icon-fraction.svg +42 -0
  155. package/tools/svg-to-react/icons/math-keypad-icon-greater-than.svg +46 -0
  156. package/tools/svg-to-react/icons/math-keypad-icon-jump-out-base.svg +44 -0
  157. package/tools/svg-to-react/icons/math-keypad-icon-jump-out-denominator.svg +48 -0
  158. package/tools/svg-to-react/icons/math-keypad-icon-jump-out-exponent.svg +44 -0
  159. package/tools/svg-to-react/icons/math-keypad-icon-jump-out-parentheses.svg +44 -0
  160. package/tools/svg-to-react/icons/math-keypad-icon-less-than.svg +46 -0
  161. package/tools/svg-to-react/icons/math-keypad-icon-log-10.svg +36 -0
  162. package/tools/svg-to-react/icons/math-keypad-icon-log-e.svg +36 -0
  163. package/tools/svg-to-react/icons/math-keypad-icon-log.svg +38 -0
  164. package/tools/svg-to-react/icons/math-keypad-icon-multiplication-cross.svg +40 -0
  165. package/tools/svg-to-react/icons/math-keypad-icon-multiplication-dot.svg +38 -0
  166. package/tools/svg-to-react/icons/math-keypad-icon-percent.svg +42 -0
  167. package/tools/svg-to-react/icons/math-keypad-icon-radical-2.svg +36 -0
  168. package/tools/svg-to-react/icons/math-keypad-icon-radical-3.svg +38 -0
  169. package/tools/svg-to-react/icons/math-keypad-icon-radical.svg +38 -0
  170. package/tools/svg-to-react/icons/math-keypad-icon-radix-character.svg +32 -0
  171. package/tools/svg-to-react/icons/math-keypad-icon-sin.svg +38 -0
  172. package/tools/svg-to-react/icons/math-keypad-icon-subtraction.svg +32 -0
  173. package/tools/svg-to-react/icons/math-keypad-icon-tan.svg +38 -0
  174. package/tools/svg-to-react/symbol_map.py +41 -0
  175. package/LICENSE.txt +0 -21
  176. package/build/math-input.js +0 -1
package/dist/index.css ADDED
@@ -0,0 +1,586 @@
1
+ /**
2
+ * Styles for managing the popover animations.
3
+ *
4
+ * Ideally, we'd be generating these styles with Aphrodite (along with
5
+ * CSSTransitionGroup's support for custom classnames), but the generated
6
+ * styles have issues on mobile Safari.
7
+ * See: https://github.com/Khan/aphrodite/issues/68.
8
+ *
9
+ * If the animation durations change, the corresponding values in
10
+ * echo-manager.js must change as well.
11
+ */
12
+ /*
13
+ * MathQuill v0.10.1 http://mathquill.com
14
+ * by Han, Jeanine, and Mary maintainers@mathquill.com
15
+ *
16
+ * This Source Code Form is subject to the terms of the
17
+ * Mozilla Public License, v. 2.0. If a copy of the MPL
18
+ * was not distributed with this file, You can obtain
19
+ * one at http://mozilla.org/MPL/2.0/.
20
+ */
21
+ @font-face {
22
+ font-family: Symbola;
23
+ src: url(/fonts/Symbola.eot);
24
+ src: local("Symbola Regular"), local("Symbola"), url(/fonts/Symbola.woff2) format("woff2"), url(/fonts/Symbola.woff) format("woff"), url(/fonts/Symbola.ttf) format("truetype"), url(/fonts/Symbola.otf) format("opentype"), url(/fonts/Symbola.svg#Symbola) format("svg");
25
+ }
26
+ .mq-editable-field {
27
+ display: -moz-inline-box;
28
+ display: inline-block;
29
+ }
30
+ .mq-editable-field .mq-cursor {
31
+ border-left: 1px solid black;
32
+ margin-left: -1px;
33
+ position: relative;
34
+ z-index: 1;
35
+ padding: 0;
36
+ display: -moz-inline-box;
37
+ display: inline-block;
38
+ }
39
+ .mq-editable-field .mq-cursor.mq-blink {
40
+ visibility: hidden;
41
+ }
42
+ .mq-editable-field,
43
+ .mq-math-mode .mq-editable-field {
44
+ border: 1px solid gray;
45
+ }
46
+ .mq-editable-field.mq-focused,
47
+ .mq-math-mode .mq-editable-field.mq-focused {
48
+ -webkit-box-shadow: #8bd 0 0 1px 2px, inset #6ae 0 0 2px 0;
49
+ -moz-box-shadow: #8bd 0 0 1px 2px, inset #6ae 0 0 2px 0;
50
+ box-shadow: #8bd 0 0 1px 2px, inset #6ae 0 0 2px 0;
51
+ border-color: #709AC0;
52
+ border-radius: 1px;
53
+ }
54
+ .mq-math-mode .mq-editable-field {
55
+ margin: 1px;
56
+ }
57
+ .mq-editable-field .mq-latex-command-input {
58
+ color: inherit;
59
+ font-family: "Courier New", monospace;
60
+ border: 1px solid gray;
61
+ padding-right: 1px;
62
+ margin-right: 1px;
63
+ margin-left: 2px;
64
+ }
65
+ .mq-editable-field .mq-latex-command-input.mq-empty {
66
+ background: transparent;
67
+ }
68
+ .mq-editable-field .mq-latex-command-input.mq-hasCursor {
69
+ border-color: ActiveBorder;
70
+ }
71
+ .mq-editable-field.mq-empty:after,
72
+ .mq-editable-field.mq-text-mode:after,
73
+ .mq-math-mode .mq-empty:after {
74
+ visibility: hidden;
75
+ content: 'c';
76
+ }
77
+ .mq-editable-field .mq-cursor:only-child:after,
78
+ .mq-editable-field .mq-textarea + .mq-cursor:last-child:after {
79
+ visibility: hidden;
80
+ content: 'c';
81
+ }
82
+ .mq-editable-field .mq-text-mode .mq-cursor:only-child:after {
83
+ content: '';
84
+ }
85
+ .mq-editable-field.mq-text-mode {
86
+ overflow-x: auto;
87
+ overflow-y: hidden;
88
+ }
89
+ .mq-root-block,
90
+ .mq-math-mode .mq-root-block {
91
+ display: -moz-inline-box;
92
+ display: inline-block;
93
+ width: 100%;
94
+ padding: 2px;
95
+ -webkit-box-sizing: border-box;
96
+ -moz-box-sizing: border-box;
97
+ box-sizing: border-box;
98
+ white-space: nowrap;
99
+ overflow: hidden;
100
+ vertical-align: middle;
101
+ }
102
+ .mq-math-mode {
103
+ font-variant: normal;
104
+ font-weight: normal;
105
+ font-style: normal;
106
+ font-size: 115%;
107
+ line-height: 1;
108
+ display: -moz-inline-box;
109
+ display: inline-block;
110
+ }
111
+ .mq-math-mode .mq-non-leaf,
112
+ .mq-math-mode .mq-scaled {
113
+ display: -moz-inline-box;
114
+ display: inline-block;
115
+ }
116
+ .mq-math-mode var,
117
+ .mq-math-mode .mq-text-mode,
118
+ .mq-math-mode .mq-nonSymbola {
119
+ font-family: "Times New Roman", Symbola, serif;
120
+ line-height: .9;
121
+ }
122
+ .mq-math-mode * {
123
+ font-size: inherit;
124
+ line-height: inherit;
125
+ margin: 0;
126
+ padding: 0;
127
+ border-color: black;
128
+ -webkit-user-select: none;
129
+ -moz-user-select: none;
130
+ user-select: none;
131
+ box-sizing: border-box;
132
+ }
133
+ .mq-math-mode .mq-empty {
134
+ background: #ccc;
135
+ }
136
+ .mq-math-mode .mq-empty.mq-root-block {
137
+ background: transparent;
138
+ }
139
+ .mq-math-mode.mq-empty {
140
+ background: transparent;
141
+ }
142
+ .mq-math-mode .mq-text-mode {
143
+ display: inline-block;
144
+ }
145
+ .mq-math-mode .mq-text-mode.mq-hasCursor {
146
+ box-shadow: inset darkgray 0 .1em .2em;
147
+ padding: 0 .1em;
148
+ margin: 0 -0.1em;
149
+ min-width: 1ex;
150
+ }
151
+ .mq-math-mode .mq-font {
152
+ font: 1em "Times New Roman", Symbola, serif;
153
+ }
154
+ .mq-math-mode .mq-font * {
155
+ font-family: inherit;
156
+ font-style: inherit;
157
+ }
158
+ .mq-math-mode b,
159
+ .mq-math-mode b.mq-font {
160
+ font-weight: bolder;
161
+ }
162
+ .mq-math-mode var,
163
+ .mq-math-mode i,
164
+ .mq-math-mode i.mq-font {
165
+ font-style: italic;
166
+ }
167
+ .mq-math-mode var.mq-f {
168
+ margin-right: 0.2em;
169
+ margin-left: 0.1em;
170
+ }
171
+ .mq-math-mode .mq-roman var.mq-f {
172
+ margin: 0;
173
+ }
174
+ .mq-math-mode big {
175
+ font-size: 200%;
176
+ }
177
+ .mq-math-mode .mq-roman {
178
+ font-style: normal;
179
+ }
180
+ .mq-math-mode .mq-sans-serif {
181
+ font-family: sans-serif, Symbola, serif;
182
+ }
183
+ .mq-math-mode .mq-monospace {
184
+ font-family: monospace, Symbola, serif;
185
+ }
186
+ .mq-math-mode .mq-overline {
187
+ border-top: 1px solid black;
188
+ margin-top: 1px;
189
+ }
190
+ .mq-math-mode .mq-underline {
191
+ border-bottom: 1px solid black;
192
+ margin-bottom: 1px;
193
+ }
194
+ .mq-math-mode .mq-binary-operator {
195
+ padding: 0 0.2em;
196
+ display: -moz-inline-box;
197
+ display: inline-block;
198
+ }
199
+ .mq-math-mode .mq-supsub {
200
+ text-align: left;
201
+ font-size: 90%;
202
+ vertical-align: -0.5em;
203
+ }
204
+ .mq-math-mode .mq-supsub.mq-limit {
205
+ font-size: 80%;
206
+ vertical-align: -0.4em;
207
+ }
208
+ .mq-math-mode .mq-supsub.mq-sup-only {
209
+ vertical-align: .5em;
210
+ }
211
+ .mq-math-mode .mq-supsub.mq-sup-only .mq-sup {
212
+ display: inline-block;
213
+ vertical-align: text-bottom;
214
+ }
215
+ .mq-math-mode .mq-supsub .mq-sup {
216
+ display: block;
217
+ }
218
+ .mq-math-mode .mq-supsub .mq-sub {
219
+ display: block;
220
+ float: left;
221
+ }
222
+ .mq-math-mode .mq-supsub.mq-limit .mq-sub {
223
+ margin-left: -0.25em;
224
+ }
225
+ .mq-math-mode .mq-supsub .mq-binary-operator {
226
+ padding: 0 .1em;
227
+ }
228
+ .mq-math-mode .mq-supsub .mq-fraction {
229
+ font-size: 70%;
230
+ }
231
+ .mq-math-mode sup.mq-nthroot {
232
+ font-size: 80%;
233
+ vertical-align: 0.8em;
234
+ margin-right: -0.6em;
235
+ margin-left: .2em;
236
+ min-width: .5em;
237
+ }
238
+ .mq-math-mode .mq-paren {
239
+ padding: 0 .1em;
240
+ vertical-align: top;
241
+ -webkit-transform-origin: center .06em;
242
+ -moz-transform-origin: center .06em;
243
+ -ms-transform-origin: center .06em;
244
+ -o-transform-origin: center .06em;
245
+ transform-origin: center .06em;
246
+ }
247
+ .mq-math-mode .mq-paren.mq-ghost {
248
+ color: silver;
249
+ }
250
+ .mq-math-mode .mq-paren + span {
251
+ margin-top: .1em;
252
+ margin-bottom: .1em;
253
+ }
254
+ .mq-math-mode .mq-array {
255
+ vertical-align: middle;
256
+ text-align: center;
257
+ }
258
+ .mq-math-mode .mq-array > span {
259
+ display: block;
260
+ }
261
+ .mq-math-mode .mq-operator-name {
262
+ font-family: Symbola, "Times New Roman", serif;
263
+ line-height: .9;
264
+ font-style: normal;
265
+ }
266
+ .mq-math-mode var.mq-operator-name.mq-first {
267
+ padding-left: .2em;
268
+ }
269
+ .mq-math-mode var.mq-operator-name.mq-last,
270
+ .mq-math-mode .mq-supsub.mq-after-operator-name {
271
+ padding-right: .2em;
272
+ }
273
+ .mq-math-mode .mq-fraction {
274
+ font-size: 90%;
275
+ text-align: center;
276
+ vertical-align: -0.4em;
277
+ padding: 0 .2em;
278
+ }
279
+ .mq-math-mode .mq-fraction,
280
+ .mq-math-mode .mq-large-operator,
281
+ .mq-math-mode x:-moz-any-link {
282
+ display: -moz-groupbox;
283
+ }
284
+ .mq-math-mode .mq-fraction,
285
+ .mq-math-mode .mq-large-operator,
286
+ .mq-math-mode x:-moz-any-link,
287
+ .mq-math-mode x:default {
288
+ display: inline-block;
289
+ }
290
+ .mq-math-mode .mq-numerator,
291
+ .mq-math-mode .mq-denominator {
292
+ display: block;
293
+ }
294
+ .mq-math-mode .mq-numerator {
295
+ padding: 0 0.1em;
296
+ }
297
+ .mq-math-mode .mq-denominator {
298
+ border-top: 1px solid;
299
+ float: right;
300
+ width: 100%;
301
+ padding: 0.1em;
302
+ }
303
+ .mq-math-mode .mq-sqrt-prefix {
304
+ padding-top: 0;
305
+ position: relative;
306
+ top: 0.1em;
307
+ vertical-align: top;
308
+ -webkit-transform-origin: top;
309
+ -moz-transform-origin: top;
310
+ -ms-transform-origin: top;
311
+ -o-transform-origin: top;
312
+ transform-origin: top;
313
+ }
314
+ .mq-math-mode .mq-sqrt-stem {
315
+ border-top: 1px solid;
316
+ margin-top: 1px;
317
+ padding-left: .15em;
318
+ padding-right: .2em;
319
+ margin-right: .1em;
320
+ padding-top: 1px;
321
+ }
322
+ .mq-math-mode .mq-vector-prefix {
323
+ display: block;
324
+ text-align: center;
325
+ line-height: .25em;
326
+ margin-bottom: -0.1em;
327
+ font-size: 0.75em;
328
+ }
329
+ .mq-math-mode .mq-vector-stem {
330
+ display: block;
331
+ }
332
+ .mq-math-mode .mq-large-operator {
333
+ vertical-align: -0.2em;
334
+ padding: .2em;
335
+ text-align: center;
336
+ }
337
+ .mq-math-mode .mq-large-operator .mq-from,
338
+ .mq-math-mode .mq-large-operator big,
339
+ .mq-math-mode .mq-large-operator .mq-to {
340
+ display: block;
341
+ }
342
+ .mq-math-mode .mq-large-operator .mq-from,
343
+ .mq-math-mode .mq-large-operator .mq-to {
344
+ font-size: 80%;
345
+ }
346
+ .mq-math-mode .mq-large-operator .mq-from {
347
+ float: right;
348
+ /* take out of normal flow to manipulate baseline */
349
+ width: 100%;
350
+ }
351
+ .mq-math-mode,
352
+ .mq-math-mode .mq-editable-field {
353
+ cursor: text;
354
+ font-family: Symbola, "Times New Roman", serif;
355
+ }
356
+ .mq-math-mode .mq-overarrow {
357
+ border-top: 1px solid black;
358
+ margin-top: 1px;
359
+ padding-top: 0.2em;
360
+ }
361
+ .mq-math-mode .mq-overarrow:before {
362
+ display: block;
363
+ position: relative;
364
+ top: -0.34em;
365
+ font-size: 0.5em;
366
+ line-height: 0em;
367
+ content: '\27A4';
368
+ text-align: right;
369
+ }
370
+ .mq-math-mode .mq-overarrow.mq-arrow-left:before {
371
+ -moz-transform: scaleX(-1);
372
+ -o-transform: scaleX(-1);
373
+ -webkit-transform: scaleX(-1);
374
+ transform: scaleX(-1);
375
+ filter: FlipH;
376
+ -ms-filter: "FlipH";
377
+ }
378
+ .mq-math-mode .mq-selection,
379
+ .mq-editable-field .mq-selection,
380
+ .mq-math-mode .mq-selection .mq-non-leaf,
381
+ .mq-editable-field .mq-selection .mq-non-leaf,
382
+ .mq-math-mode .mq-selection .mq-scaled,
383
+ .mq-editable-field .mq-selection .mq-scaled {
384
+ background: #B4D5FE !important;
385
+ background: Highlight !important;
386
+ color: HighlightText;
387
+ border-color: HighlightText;
388
+ }
389
+ .mq-math-mode .mq-selection .mq-matrixed,
390
+ .mq-editable-field .mq-selection .mq-matrixed {
391
+ background: #39F !important;
392
+ }
393
+ .mq-math-mode .mq-selection .mq-matrixed-container,
394
+ .mq-editable-field .mq-selection .mq-matrixed-container {
395
+ filter: progid:DXImageTransform.Microsoft.Chroma(color='#3399FF') !important;
396
+ }
397
+ .mq-math-mode .mq-selection.mq-blur,
398
+ .mq-editable-field .mq-selection.mq-blur,
399
+ .mq-math-mode .mq-selection.mq-blur .mq-non-leaf,
400
+ .mq-editable-field .mq-selection.mq-blur .mq-non-leaf,
401
+ .mq-math-mode .mq-selection.mq-blur .mq-scaled,
402
+ .mq-editable-field .mq-selection.mq-blur .mq-scaled,
403
+ .mq-math-mode .mq-selection.mq-blur .mq-matrixed,
404
+ .mq-editable-field .mq-selection.mq-blur .mq-matrixed {
405
+ background: #D4D4D4 !important;
406
+ color: black;
407
+ border-color: black;
408
+ }
409
+ .mq-math-mode .mq-selection.mq-blur .mq-matrixed-container,
410
+ .mq-editable-field .mq-selection.mq-blur .mq-matrixed-container {
411
+ filter: progid:DXImageTransform.Microsoft.Chroma(color='#D4D4D4') !important;
412
+ }
413
+ .mq-editable-field .mq-textarea,
414
+ .mq-math-mode .mq-textarea {
415
+ position: relative;
416
+ -webkit-user-select: text;
417
+ -moz-user-select: text;
418
+ user-select: text;
419
+ }
420
+ .mq-editable-field .mq-textarea *,
421
+ .mq-math-mode .mq-textarea *,
422
+ .mq-editable-field .mq-selectable,
423
+ .mq-math-mode .mq-selectable {
424
+ -webkit-user-select: text;
425
+ -moz-user-select: text;
426
+ user-select: text;
427
+ position: absolute;
428
+ clip: rect(1em 1em 1em 1em);
429
+ -webkit-transform: scale(0);
430
+ -moz-transform: scale(0);
431
+ -ms-transform: scale(0);
432
+ -o-transform: scale(0);
433
+ transform: scale(0);
434
+ resize: none;
435
+ width: 1px;
436
+ height: 1px;
437
+ }
438
+ .mq-math-mode .mq-matrixed {
439
+ background: white;
440
+ display: -moz-inline-box;
441
+ display: inline-block;
442
+ }
443
+ .mq-math-mode .mq-matrixed-container {
444
+ filter: progid:DXImageTransform.Microsoft.Chroma(color='white');
445
+ margin-top: -0.1em;
446
+ }
447
+ .echo-slide-and-fade-enter {
448
+ opacity: 1 !important;
449
+ transform: translate3d(0, 0, 0) !important;
450
+ }
451
+ .echo-slide-and-fade-enter.echo-slide-and-fade-enter-active {
452
+ opacity: 0 !important;
453
+ transform: translate3d(0, -33%, 0) !important;
454
+ /**
455
+ * TODO(charlie): These times are intentionally different, which means
456
+ * that the animation really "ends" after 400ms
457
+ * cubic-bezier(1, 0, 0.9, 1) (since the opacity goes to 0), even though
458
+ * the transform doesn't complete. There's probably a way to achieve the
459
+ * same effect by manipulating the transform's Bezier curve and total
460
+ * displacement.
461
+ */
462
+ transition: transform 800ms cubic-bezier(0, 1, 0.25, 1), opacity 400ms cubic-bezier(1, 0, 0.9, 1) !important;
463
+ }
464
+ .echo-fade-only-enter {
465
+ opacity: 1 !important;
466
+ }
467
+ .echo-fade-only-enter.echo-fade-only-enter-active {
468
+ opacity: 0 !important;
469
+ transition: opacity 300ms cubic-bezier(0.25, 0, 0.75, 1) !important;
470
+ }
471
+ .echo-long-fade-only-enter {
472
+ opacity: 1 !important;
473
+ }
474
+ .echo-long-fade-only-enter.echo-long-fade-only-enter-active {
475
+ opacity: 0 !important;
476
+ transition: opacity 400ms cubic-bezier(0.75, 0, 0.75, 1) !important;
477
+ }
478
+ .keypad-input {
479
+ outline: none !important;
480
+ }
481
+ .keypad-input .mq-editable-field .mq-root-block {
482
+ overflow-x: scroll;
483
+ }
484
+ .keypad-input .mq-editable-field .mq-cursor:not(:only-child),
485
+ .keypad-input .mq-editable-field .mq-root-block.mq-hasCursor > .mq-cursor:only-child {
486
+ /* HACK(charlie): Magic numbers to properly size and position the vertical
487
+ cursor, which is visible whenever the cursor is not alone in its parent,
488
+ with the exception that it's also visible when the entire input is
489
+ empty. */
490
+ height: 20px !important;
491
+ width: 2px;
492
+ margin-top: -5px !important;
493
+ vertical-align: middle !important;
494
+ border-radius: 1px !important;
495
+ }
496
+ .keypad-input .mq-editable-field .mq-cursor {
497
+ border-left: 2px solid #1865f2 !important;
498
+ margin-left: -1px !important;
499
+ margin-right: -1px !important;
500
+ opacity: 1 !important;
501
+ transition: opacity 500ms ease-out !important;
502
+ visibility: visible !important;
503
+ }
504
+ .keypad-input .mq-editable-field .mq-cursor.mq-blink {
505
+ opacity: 0 !important;
506
+ transition: opacity 500ms ease-in !important;
507
+ visibility: visible !important;
508
+ }
509
+ .keypad-input .mq-editable-field .mq-non-leaf .mq-cursor:only-child {
510
+ border: 2px solid !important;
511
+ border-color: #1865f2 !important;
512
+ border-radius: 1px;
513
+ opacity: 1 !important;
514
+ padding: 0 4px 0 4px;
515
+ transition: border-color 500ms ease-out !important;
516
+ }
517
+ .keypad-input .mq-editable-field .mq-non-leaf .mq-cursor:only-child.mq-blink {
518
+ border-color: #1865f2 !important;
519
+ opacity: 1 !important;
520
+ transition: border-color 500ms ease-in !important;
521
+ }
522
+ .keypad-input .mq-empty {
523
+ background: transparent !important;
524
+ }
525
+ .keypad-input .mq-empty:not(.mq-root-block):after,
526
+ .keypad-input .mq-hasCursor:empty:not(.mq-root-block):after {
527
+ border: 2px solid rgba(33, 36, 44, 0.16);
528
+ border-radius: 1px;
529
+ color: transparent;
530
+ display: inline-block;
531
+ margin-left: -1px;
532
+ margin-right: -1px;
533
+ padding: 0 4px 0 4px;
534
+ visibility: visible !important;
535
+ }
536
+ .keypad-input .mq-selection .mq-empty:not(.mq-root-block):after {
537
+ border-color: white;
538
+ }
539
+ .keypad-input .mq-hasCursor:empty:not(.mq-root-block):after {
540
+ content: 'c';
541
+ }
542
+ .keypad-input .mq-math-mode .mq-selection .mq-non-leaf,
543
+ .keypad-input .mq-editable-field .mq-selection .mq-non-leaf {
544
+ background: #1865f2 !important;
545
+ border-color: white !important;
546
+ color: white !important;
547
+ }
548
+ .keypad-input .mq-math-mode .mq-selection .mq-scaled,
549
+ .keypad-input .mq-editable-field .mq-selection .mq-scaled {
550
+ background: transparent !important;
551
+ border-color: transparent !important;
552
+ color: white !important;
553
+ }
554
+ .keypad-input .mq-selection {
555
+ background: #1865f2 !important;
556
+ border-color: white !important;
557
+ color: white !important;
558
+ display: inline-block !important;
559
+ }
560
+ .keypad-container .katex {
561
+ color: inherit !important;
562
+ }
563
+ /**
564
+ * Styles for managing the popover animations.
565
+ *
566
+ * Ideally, we'd be generating these styles with Aphrodite (along with
567
+ * CSSTransitionGroup's support for custom classnames), but the generated
568
+ * styles have issues on mobile Safari.
569
+ * See: https://github.com/Khan/aphrodite/issues/68.
570
+ *
571
+ * If the animation durations change, the corresponding values in
572
+ * popover-manager.js must change as well.
573
+ */
574
+ .popover-enter {
575
+ opacity: 0 !important;
576
+ }
577
+ .popover-enter.popover-enter-active {
578
+ opacity: 1 !important;
579
+ transition: opacity 200ms ease-out !important;
580
+ }
581
+ .tabbar_item {
582
+ background-color: red;
583
+ }
584
+ .tabbar_item:focus {
585
+ background-color: green;
586
+ }
@@ -0,0 +1,2 @@
1
+ // @flow
2
+ export * from "../src/index.js";