@khanacademy/math-input 0.0.0-PR442-20230403162612

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