@zzish/math-rich-input 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +253 -0
- package/babel.config.js +6 -0
- package/dist/index.js +23034 -0
- package/dist/math-rich-input.css +923 -0
- package/package.json +44 -0
- package/rollup.config.js +31 -0
- package/src/AccentBar.css +169 -0
- package/src/AccentBar.jsx +771 -0
- package/src/EquationEditor.css +258 -0
- package/src/EquationEditor.jsx +583 -0
- package/src/EquationEditorModal.css +164 -0
- package/src/EquationEditorModal.jsx +81 -0
- package/src/MathRichArea.jsx +103 -0
- package/src/MathRichInput.css +63 -0
- package/src/MathRichInput.jsx +1651 -0
- package/src/SymbolButton.css +130 -0
- package/src/SymbolButton.jsx +96 -0
- package/src/Toolbar.css +142 -0
- package/src/Toolbar.jsx +219 -0
- package/src/equationEditorButtonsHelper.js +590 -0
- package/src/index.js +5 -0
- package/src/katexHelper.js +39 -0
- package/src/mathRichInputHelper.js +785 -0
- package/src/mimeTypeHelper.js +201 -0
|
@@ -0,0 +1,923 @@
|
|
|
1
|
+
.MathRichInput-Container {
|
|
2
|
+
margin:10px;
|
|
3
|
+
border-radius:5px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.MathRichInput-Container:focus-within {
|
|
7
|
+
background-color: white!important;
|
|
8
|
+
outline: 0px;
|
|
9
|
+
border:1px solid #663676;
|
|
10
|
+
/* box-shadow: inset 1px 1px 5px #a0a0a0; */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.MathRichInput-scrollview {
|
|
14
|
+
display:flex;
|
|
15
|
+
overflow:scroll;
|
|
16
|
+
border-radius:5px;
|
|
17
|
+
overflow: overlay;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.MathRichInput P {
|
|
21
|
+
padding:0px;
|
|
22
|
+
margin:0px
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.MathRichInput {
|
|
26
|
+
font-size: 18px;
|
|
27
|
+
padding: 10px;
|
|
28
|
+
width: 100%;
|
|
29
|
+
border-radius: 5px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.MathRichInput:focus {
|
|
33
|
+
outline:0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.MathRichInput .katex {
|
|
37
|
+
border:0px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.MathRichInput .base { /* Combine the katex and base class name to ensure the whole equation is surrounded */
|
|
41
|
+
background-color: #f0f0f0;
|
|
42
|
+
border: 0px;
|
|
43
|
+
border: 1px dotted #D0D0D0;
|
|
44
|
+
border-radius: 5px;
|
|
45
|
+
padding: 2px 2px 2px 2px;
|
|
46
|
+
margin: 0px 2px 0px 2px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.katex .mathnormal {
|
|
50
|
+
/* font-family: KaTeX_Caligraphic; */
|
|
51
|
+
font-family: KaTeX_Math;
|
|
52
|
+
font-style: italic;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.MathRichInput .katex-error {
|
|
56
|
+
background-color: #f0f0f0;
|
|
57
|
+
border: 0px;
|
|
58
|
+
border: 1px dotted #ff8080;
|
|
59
|
+
border-radius: 5px;
|
|
60
|
+
padding: 2px 2px 2px 2px;
|
|
61
|
+
margin: 0px 2px 0px 2px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Note that the top left position of the toolbar is set programatically in componentDidMount */
|
|
65
|
+
|
|
66
|
+
.Toolbar {
|
|
67
|
+
position: fixed;
|
|
68
|
+
z-index: 1;
|
|
69
|
+
/* width:270px; */
|
|
70
|
+
height:42px;
|
|
71
|
+
background-color: white;
|
|
72
|
+
border: 1px solid #d0d0d0;
|
|
73
|
+
border-radius: 5px;
|
|
74
|
+
box-shadow: 1px 1px 5px #a0a0a0;
|
|
75
|
+
animation: 0.5s fadeIn1;
|
|
76
|
+
animation-fill-mode: forwards;
|
|
77
|
+
top: 0px;
|
|
78
|
+
left: 0px; /* important to set this so that toolbar initially renders full width */
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@keyframes fadeIn1 {
|
|
82
|
+
0% {
|
|
83
|
+
opacity: 0;
|
|
84
|
+
}
|
|
85
|
+
100% {
|
|
86
|
+
opacity: 1.0;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.Toolbar-button {
|
|
91
|
+
font-family:sans-serif;
|
|
92
|
+
font-size: 16px;
|
|
93
|
+
width:40px;
|
|
94
|
+
height: 36px;
|
|
95
|
+
background-color: white;
|
|
96
|
+
border-radius: 5px;
|
|
97
|
+
border: 0px;
|
|
98
|
+
padding: 1px;
|
|
99
|
+
margin: 2px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
.Toolbar-button:hover {
|
|
104
|
+
color: white;
|
|
105
|
+
background: #663676;
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.Toolbar-button:active {
|
|
110
|
+
background: #808080;
|
|
111
|
+
color: white;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.TB-narrow {
|
|
116
|
+
width:30px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.TB-wide {
|
|
120
|
+
width:46px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.TB-up4 {
|
|
124
|
+
position: relative;
|
|
125
|
+
top:-4px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.TB-selected {
|
|
129
|
+
background: #D0D0D0;
|
|
130
|
+
color: black;
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
animation: 0.2s TB-fadeIn;
|
|
133
|
+
animation-fill-mode: forwards;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.TB-selected:hover {
|
|
137
|
+
color: white;
|
|
138
|
+
background: #663676;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@keyframes TB-fadeIn {
|
|
143
|
+
00% {
|
|
144
|
+
background: white;
|
|
145
|
+
}
|
|
146
|
+
100% {
|
|
147
|
+
background: #D0D0D0;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
/* Tooltip text */
|
|
153
|
+
.Toolbar-button .tooltiptext {
|
|
154
|
+
font-weight: normal;
|
|
155
|
+
visibility: hidden;
|
|
156
|
+
width: 100px;
|
|
157
|
+
background-color: #222;
|
|
158
|
+
color: #fff;
|
|
159
|
+
/*font-weight: bold;*/
|
|
160
|
+
font-size: 12px;
|
|
161
|
+
text-align: center;
|
|
162
|
+
padding: 4px 10px;
|
|
163
|
+
border-radius: 6px;
|
|
164
|
+
|
|
165
|
+
/* Position the tooltip text - see examples below! */
|
|
166
|
+
position: absolute;
|
|
167
|
+
z-index: 2;
|
|
168
|
+
top: -90%; /* Must leave a small gap between tooltip and button */
|
|
169
|
+
left: 50px;
|
|
170
|
+
|
|
171
|
+
/* transform: translate (50%,0%); */
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Show the tooltip text when you mouse over the tooltip container */
|
|
175
|
+
.Toolbar-button:hover .tooltiptext {
|
|
176
|
+
animation: 0.8s fadeIn2;
|
|
177
|
+
animation-fill-mode: forwards;
|
|
178
|
+
visibility: visible;
|
|
179
|
+
/* width: 100px; */
|
|
180
|
+
/* top: -90%; */ /* Must leave a small gap between tooltip and button */
|
|
181
|
+
/* left: 20%; */
|
|
182
|
+
/* margin-left: -50px; */
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@keyframes fadeIn2 {
|
|
186
|
+
00% {
|
|
187
|
+
opacity: 0;
|
|
188
|
+
}
|
|
189
|
+
70% {
|
|
190
|
+
opacity: 0;
|
|
191
|
+
}
|
|
192
|
+
100% {
|
|
193
|
+
visibility: visible;
|
|
194
|
+
opacity: 0.9;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* .tooltip {
|
|
199
|
+
position: relative;
|
|
200
|
+
display: inline-block;
|
|
201
|
+
border-bottom: 1px dotted black; /* If you want dots under the hoverable text
|
|
202
|
+
} */
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
.EquationEditorModal-background {
|
|
208
|
+
position: fixed;
|
|
209
|
+
top: 0;
|
|
210
|
+
left: 0;
|
|
211
|
+
width:100%;
|
|
212
|
+
height: 100%;
|
|
213
|
+
background: black;
|
|
214
|
+
z-index: 99;
|
|
215
|
+
animation: 0.3s shade;
|
|
216
|
+
animation-fill-mode: forwards;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
@keyframes shade {
|
|
220
|
+
00% {
|
|
221
|
+
opacity: 0;
|
|
222
|
+
}
|
|
223
|
+
100% {
|
|
224
|
+
opacity: 0.6;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.EquationEditorModal {
|
|
229
|
+
background: white;
|
|
230
|
+
border:1px solid #808080;
|
|
231
|
+
border-radius:10px;
|
|
232
|
+
box-shadow: 0px 2px 5px 1px #a0a0a0;
|
|
233
|
+
position:fixed;
|
|
234
|
+
max-width:500px;
|
|
235
|
+
width: 98%;
|
|
236
|
+
top:50%;
|
|
237
|
+
left:50%;
|
|
238
|
+
/* transform: translate(-50%,-50%); */
|
|
239
|
+
z-index: 100;
|
|
240
|
+
animation: 0.3s rise;
|
|
241
|
+
animation-fill-mode: forwards;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@keyframes rise {
|
|
245
|
+
00% {
|
|
246
|
+
transform: translate(-50%,100%);
|
|
247
|
+
opacity:0.0;
|
|
248
|
+
}
|
|
249
|
+
100% {
|
|
250
|
+
transform: translate(-50%,-50%);
|
|
251
|
+
opacity:1.0;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.EquationEditorModal-mobile {
|
|
256
|
+
background: white;
|
|
257
|
+
border:1px solid #808080;
|
|
258
|
+
border-radius:10px;
|
|
259
|
+
box-shadow: 0px 2px 5px 1px #a0a0a0;
|
|
260
|
+
position:fixed;
|
|
261
|
+
max-width:500px;
|
|
262
|
+
width: 99%;
|
|
263
|
+
top:0%;
|
|
264
|
+
left:50%;
|
|
265
|
+
transform: translate(-50%, 1px);
|
|
266
|
+
z-index: 100;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.EquationEditorModal .title {
|
|
270
|
+
font-size: 14px;
|
|
271
|
+
color: #404040;
|
|
272
|
+
text-align: left;
|
|
273
|
+
background: #E0E0E0;
|
|
274
|
+
border:0px;
|
|
275
|
+
border-radius:5px 5px 0px 0px;
|
|
276
|
+
height:30px;
|
|
277
|
+
padding:20px 0px 5px 20px;
|
|
278
|
+
margin:0px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.EquationEditorModal-mobile .title {
|
|
282
|
+
font-size: 14px;
|
|
283
|
+
color: #404040;
|
|
284
|
+
text-align: left;
|
|
285
|
+
background: #E0E0E0;
|
|
286
|
+
border:0px;
|
|
287
|
+
border-radius:5px 5px 0px 0px;
|
|
288
|
+
height:30px;
|
|
289
|
+
padding:20px 0px 5px 20px;
|
|
290
|
+
margin:0px;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.EquationEditorModal .expertModeSwitch {
|
|
294
|
+
/* background: url(images/settings-icon.png) no-repeat; */
|
|
295
|
+
float:right;
|
|
296
|
+
/* width:36px;
|
|
297
|
+
height:36px; */
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.EquationEditorModal .expertModeSwitch .switch{
|
|
301
|
+
margin-right:10px;
|
|
302
|
+
margin-left:10px;
|
|
303
|
+
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* The switch - the box around the slider */
|
|
307
|
+
.switch {
|
|
308
|
+
position: relative;
|
|
309
|
+
display: inline-block;
|
|
310
|
+
width: 35px;
|
|
311
|
+
height: 22px;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/* Hide default HTML checkbox */
|
|
315
|
+
.switch input {
|
|
316
|
+
opacity: 0;
|
|
317
|
+
width: 0;
|
|
318
|
+
height: 0;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* The slider */
|
|
322
|
+
.slider {
|
|
323
|
+
position: absolute;
|
|
324
|
+
cursor: pointer;
|
|
325
|
+
top: 0;
|
|
326
|
+
left: 0;
|
|
327
|
+
right: 0;
|
|
328
|
+
bottom: 0;
|
|
329
|
+
background-color: #ccc;
|
|
330
|
+
-webkit-transition: .4s;
|
|
331
|
+
transition: .4s;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.slider:before {
|
|
335
|
+
position: absolute;
|
|
336
|
+
content: "";
|
|
337
|
+
height: 14px;
|
|
338
|
+
width: 14px;
|
|
339
|
+
left: 4px;
|
|
340
|
+
bottom: 4px;
|
|
341
|
+
background-color: white;
|
|
342
|
+
-webkit-transition: .4s;
|
|
343
|
+
transition: .4s;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
input:checked + .slider {
|
|
347
|
+
background-color: #663676;
|
|
348
|
+
;
|
|
349
|
+
/* background-color: #2196F3; */
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
input:focus + .slider {
|
|
353
|
+
box-shadow: 0 0 1px #2196F3;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
input:checked + .slider:before {
|
|
357
|
+
-webkit-transform: translateX(13px);
|
|
358
|
+
-ms-transform: translateX(13px);
|
|
359
|
+
transform: translateX(13px);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* Rounded sliders */
|
|
363
|
+
.slider.round {
|
|
364
|
+
border-radius: 18px;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.slider.round:before {
|
|
368
|
+
border-radius: 50%;
|
|
369
|
+
}
|
|
370
|
+
/* Note that the top left position of the accent bar is set programatically in componentDidMount */
|
|
371
|
+
|
|
372
|
+
.AccentBar {
|
|
373
|
+
position: fixed;
|
|
374
|
+
z-index: 1;
|
|
375
|
+
width:348px; /* max of 346px to ensure fits on Moto G4 mobile device screens */
|
|
376
|
+
background-color: white;
|
|
377
|
+
border: 1px solid #d0d0d0;
|
|
378
|
+
border-radius: 5px;
|
|
379
|
+
box-shadow: 1px 1px 5px #a0a0a0;
|
|
380
|
+
padding:5px;
|
|
381
|
+
animation: 0.4s fadeIn1;
|
|
382
|
+
animation-fill-mode: forwards;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.AccentBar-compact {
|
|
386
|
+
position: fixed;
|
|
387
|
+
z-index: 1;
|
|
388
|
+
background-color: white;
|
|
389
|
+
border: 1px solid #d0d0d0;
|
|
390
|
+
border-radius: 5px;
|
|
391
|
+
box-shadow: 1px 1px 5px #a0a0a0;
|
|
392
|
+
padding:5px;
|
|
393
|
+
top:0px;
|
|
394
|
+
left:0px; /* Important to set this default so that accent bar renders to optimal width */
|
|
395
|
+
animation: 0.4s fadeIn1;
|
|
396
|
+
animation-fill-mode: forwards;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.AccentBar-outerContainer {
|
|
400
|
+
overflow-y:scroll;
|
|
401
|
+
border-radius:5px;
|
|
402
|
+
overflow: overlay;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.AccentBar-innerContainer {
|
|
406
|
+
height:350px; /* Height of overall box */
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
@keyframes fadeIn1 {
|
|
410
|
+
0% {
|
|
411
|
+
opacity: 0;
|
|
412
|
+
}
|
|
413
|
+
100% {
|
|
414
|
+
opacity: 1.0;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.AccentBar .type-a-letter {
|
|
419
|
+
color: #A0A0A0;
|
|
420
|
+
font-family:sans-serif;
|
|
421
|
+
font-size: 14px;
|
|
422
|
+
font-weight: bold;
|
|
423
|
+
height: 36px;
|
|
424
|
+
padding-top:12px;
|
|
425
|
+
padding-left:20px;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.AccentBar-button {
|
|
429
|
+
font-family:sans-serif;
|
|
430
|
+
font-size: 17px;
|
|
431
|
+
width:40px;
|
|
432
|
+
height: 36px;
|
|
433
|
+
background: #f4f4f4;
|
|
434
|
+
border-radius: 5px;
|
|
435
|
+
border: 0px;
|
|
436
|
+
padding: 1px;
|
|
437
|
+
margin: 6px;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.AB-compact {
|
|
441
|
+
margin: 0px;
|
|
442
|
+
background: white;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.AB-narrow {
|
|
446
|
+
width:30px;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.AccentBar-button:hover {
|
|
450
|
+
/* filter: saturate(2.0); */
|
|
451
|
+
color: white;
|
|
452
|
+
background: #663676;
|
|
453
|
+
cursor: pointer;
|
|
454
|
+
box-shadow: 1px 1px 3px #808080;
|
|
455
|
+
animation: 2s grow;
|
|
456
|
+
animation-fill-mode: forwards;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
@keyframes grow {
|
|
460
|
+
00% {
|
|
461
|
+
transform: scale(1);
|
|
462
|
+
box-shadow: 0px 0px 0px #808080;
|
|
463
|
+
}
|
|
464
|
+
10% {
|
|
465
|
+
transform: scale(1.3);
|
|
466
|
+
box-shadow: 1px 1px 3px #808080;
|
|
467
|
+
}
|
|
468
|
+
90% {
|
|
469
|
+
transform: scale(1.3);
|
|
470
|
+
box-shadow: 1px 1px 3px #808080;
|
|
471
|
+
}
|
|
472
|
+
100% {
|
|
473
|
+
transform: scale(1.8);
|
|
474
|
+
box-shadow: 1px 1px 3px #808080;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.AccentBar-button:active {
|
|
479
|
+
background: #808080;
|
|
480
|
+
color: white;
|
|
481
|
+
cursor: pointer;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.AccentBar .tabBar {
|
|
485
|
+
background: white;
|
|
486
|
+
text-align: left;
|
|
487
|
+
border:0px;
|
|
488
|
+
padding:0px 0px 10px 0px;
|
|
489
|
+
margin:5px;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.AccentBar .tab {
|
|
493
|
+
font-size: 14px;
|
|
494
|
+
font-weight: bold;
|
|
495
|
+
color: #404040;
|
|
496
|
+
text-align: left;
|
|
497
|
+
border:0px;
|
|
498
|
+
height:30px;
|
|
499
|
+
padding:2px 5px 2px 5px;
|
|
500
|
+
margin:2px;
|
|
501
|
+
border-bottom: 4px solid #d0d0d0;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.AccentBar .tab:hover {
|
|
505
|
+
cursor:pointer
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.AccentBar .tab-selected {
|
|
509
|
+
font-size: 14px;
|
|
510
|
+
font-weight: bold;
|
|
511
|
+
color: #404040;
|
|
512
|
+
text-align: left;
|
|
513
|
+
border:0px;
|
|
514
|
+
height:30px;
|
|
515
|
+
padding:2px 5px 2px 5px;
|
|
516
|
+
margin:2px;
|
|
517
|
+
border-bottom: 4px solid #663676;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.AccentBar .section-label {
|
|
521
|
+
font-size: 13px;
|
|
522
|
+
font-weight: bold;
|
|
523
|
+
/* color: #A0A0A0; */
|
|
524
|
+
color: #663676;
|
|
525
|
+
margin-top:8px;
|
|
526
|
+
margin-left:8px;
|
|
527
|
+
margin-bottom:4px;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.AccentBar .replace-section {
|
|
531
|
+
min-height: 70px;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.AccentBar .tabArea {
|
|
535
|
+
animation: 0.4s fadeIn1;
|
|
536
|
+
animation-fill-mode: forwards;
|
|
537
|
+
}.EquationEditor {
|
|
538
|
+
/* max-width:500px; */
|
|
539
|
+
height:auto;
|
|
540
|
+
text-align: center;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.EquationEditor .editableAndCursorButtonsWrapper {
|
|
544
|
+
display: flex;
|
|
545
|
+
align-items: center;
|
|
546
|
+
justify-content: center;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.EquationEditor .editableWrapper {
|
|
550
|
+
overflow: auto;
|
|
551
|
+
width:100%;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.EquationEditor .cursorButton {
|
|
555
|
+
font-size: 14px;
|
|
556
|
+
font-weight: bold;
|
|
557
|
+
color: #663676;
|
|
558
|
+
background: white;
|
|
559
|
+
text-align: center;
|
|
560
|
+
border:1px solid #663676;
|
|
561
|
+
border-radius: 5px;
|
|
562
|
+
min-width:40px;
|
|
563
|
+
width:auto;
|
|
564
|
+
height:40px;
|
|
565
|
+
padding:0px;
|
|
566
|
+
margin-top: 10px;
|
|
567
|
+
margin-left:15px;
|
|
568
|
+
margin-right:15px;
|
|
569
|
+
/* transition: all .2s ease-in-out; */
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
.EquationEditor .centerBox {
|
|
573
|
+
display:inline-block;
|
|
574
|
+
text-align:center;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.EquationEditor .editable {
|
|
578
|
+
/* width:auto; */
|
|
579
|
+
text-align: left;
|
|
580
|
+
min-height:26px;
|
|
581
|
+
min-width:150px;
|
|
582
|
+
font-size: 20px;
|
|
583
|
+
color: #404040;
|
|
584
|
+
border: 1px solid #B0B0B0;
|
|
585
|
+
border-radius:5px;
|
|
586
|
+
/* height:36px; */
|
|
587
|
+
padding:7px 10px 7px 10px;
|
|
588
|
+
margin-top:6px;
|
|
589
|
+
margin-bottom:5px;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.EquationEditor .editable-placeholder {
|
|
593
|
+
position: absolute;
|
|
594
|
+
z-index: -1;
|
|
595
|
+
min-height:26px;
|
|
596
|
+
min-width:150px;
|
|
597
|
+
font-size: 15px;
|
|
598
|
+
color:grey;
|
|
599
|
+
/* Note the x translation needs to be updatad programatically if the modal width changes */
|
|
600
|
+
transform: translate(-12px,-36px)
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.EquationEditor .editable:focus-within {
|
|
604
|
+
border-radius:5px;
|
|
605
|
+
border: 1px solid #663676!important;
|
|
606
|
+
box-shadow: 0px 0px 0px white;
|
|
607
|
+
/* box-shadow: inset 1px 1px 5px #a0a0a0; */
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.latexInputAreaWrapper {
|
|
611
|
+
width:auto;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.EquationEditor .katexRenderedInput {
|
|
615
|
+
text-align: left;
|
|
616
|
+
min-height:30px;
|
|
617
|
+
width:90%;
|
|
618
|
+
font-size: 16px;
|
|
619
|
+
color: #404040;
|
|
620
|
+
border: 0px solid #B0B0B0;
|
|
621
|
+
border-radius:5px;
|
|
622
|
+
/* height:36px; */
|
|
623
|
+
padding:7px 10px 4px 10px;
|
|
624
|
+
margin:5px 15px 5px 15px;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
.EquationEditor .latexInput {
|
|
628
|
+
text-align: left;
|
|
629
|
+
height:88px;
|
|
630
|
+
width:90%;
|
|
631
|
+
font-size: 16px;
|
|
632
|
+
/* color: #202020; */
|
|
633
|
+
/* background-color: #e0e0e0; */
|
|
634
|
+
/* color: #00ff00;
|
|
635
|
+
background-color: #202020; */
|
|
636
|
+
color: #007000;
|
|
637
|
+
background-color: #e0e0e0;
|
|
638
|
+
border: 1px solid #B0B0B0;
|
|
639
|
+
border-radius:5px;
|
|
640
|
+
padding:7px 10px 5px 10px;
|
|
641
|
+
margin-top:10px;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.EquationEditor .latexInput:focus {
|
|
645
|
+
border: 1px solid #663676!important;
|
|
646
|
+
outline: 0;
|
|
647
|
+
/* outline: 2px solid #663676!important; */ /* Has square corners */
|
|
648
|
+
/* box-shadow: inset 1px 1px 5px #a0a0a0, 0px 0px 3px #663676; */
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
.EquationEditor .insertButton {
|
|
652
|
+
font-size: 14px;
|
|
653
|
+
color: white;
|
|
654
|
+
background: #663676;
|
|
655
|
+
text-align: left;
|
|
656
|
+
border:0px;
|
|
657
|
+
border-radius:5px;
|
|
658
|
+
height:36px;
|
|
659
|
+
padding:0px 30px 0px 30px;
|
|
660
|
+
margin-top:5px;
|
|
661
|
+
margin-bottom:5px;
|
|
662
|
+
margin-left:5px;
|
|
663
|
+
margin-right:5px;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
.EquationEditor .cancelButton {
|
|
667
|
+
font-size: 14px;
|
|
668
|
+
background: white;
|
|
669
|
+
color: #663676;
|
|
670
|
+
text-align: left;
|
|
671
|
+
border:1px solid #663676;
|
|
672
|
+
border-radius:5px;
|
|
673
|
+
height:36px;
|
|
674
|
+
padding:0px 30px 0px 30px;
|
|
675
|
+
margin-bottom:10px;
|
|
676
|
+
margin-left:5px;
|
|
677
|
+
margin-right:5px;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.EquationEditor .insertButton:hover {
|
|
681
|
+
color: white;
|
|
682
|
+
background: #461656;
|
|
683
|
+
cursor: pointer;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.EquationEditor .recentSymbols-recentText-active {
|
|
687
|
+
font-size: 14px;
|
|
688
|
+
font-weight: bold;
|
|
689
|
+
color: #404040;
|
|
690
|
+
margin-right: 10px;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.EquationEditor .recentSymbols-recentText-not-active {
|
|
694
|
+
font-size: 14px;
|
|
695
|
+
font-weight: bold;
|
|
696
|
+
color: #808080;
|
|
697
|
+
margin-top: 10px;
|
|
698
|
+
margin-bottom: 10px;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.EquationEditor .tabBar {
|
|
702
|
+
background: white;
|
|
703
|
+
text-align: left;
|
|
704
|
+
border:0px;
|
|
705
|
+
padding:10px 10px 5px 20px;
|
|
706
|
+
margin:5px;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.EquationEditor .tab {
|
|
710
|
+
font-size: 14px;
|
|
711
|
+
font-weight: bold;
|
|
712
|
+
color: #404040;
|
|
713
|
+
text-align: left;
|
|
714
|
+
border:0px;
|
|
715
|
+
height:30px;
|
|
716
|
+
padding:5px 10px 5px 10px;
|
|
717
|
+
margin:5px;
|
|
718
|
+
border-bottom: 6px solid #d0d0d0;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.EquationEditor .tab:hover {
|
|
722
|
+
cursor:pointer
|
|
723
|
+
}
|
|
724
|
+
.EquationEditor .tab-selected {
|
|
725
|
+
font-size: 14px;
|
|
726
|
+
font-weight: bold;
|
|
727
|
+
color: #404040;
|
|
728
|
+
text-align: left;
|
|
729
|
+
border:0px;
|
|
730
|
+
height:30px;
|
|
731
|
+
padding:5px 10px 5px 10px;
|
|
732
|
+
margin:5px;
|
|
733
|
+
border-bottom: 6px solid #663676;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.EquationEditor .recentSymbolsButtonArea {
|
|
737
|
+
text-align: left;
|
|
738
|
+
width:486px;
|
|
739
|
+
padding:2px 2px 2px 2px;
|
|
740
|
+
margin:5px;
|
|
741
|
+
margin-left:15px;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.EquationEditor .symbolButtonAreasOuterContainer {
|
|
745
|
+
overflow-x: auto;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.EquationEditor .symbolButtonAreasInnerContainer {
|
|
749
|
+
display: flex;
|
|
750
|
+
width: 2330px;
|
|
751
|
+
/* align-items: stretch; */
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
.EquationEditor .symbolButtonArea-1 {
|
|
755
|
+
text-align: left;
|
|
756
|
+
width:42px;
|
|
757
|
+
padding:12px 12px 12px 12px;
|
|
758
|
+
margin:0px;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.EquationEditor .symbolButtonArea-2 {
|
|
762
|
+
text-align: left;
|
|
763
|
+
width:84px;
|
|
764
|
+
padding:12px 12px 12px 12px;
|
|
765
|
+
margin:0px;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.EquationEditor .symbolButtonArea-3 {
|
|
769
|
+
text-align: left;
|
|
770
|
+
width:126px;
|
|
771
|
+
padding:12px 12px 12px 12px;
|
|
772
|
+
margin:0px;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
.EquationEditor .symbolButtonArea-4 {
|
|
776
|
+
text-align: left;
|
|
777
|
+
width:168px;
|
|
778
|
+
padding:12px 12px 12px 12px;
|
|
779
|
+
margin:0px;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.EquationEditor .symbolButtonArea-5 {
|
|
783
|
+
text-align: left;
|
|
784
|
+
width:210px;
|
|
785
|
+
padding:12px 12px 12px 12px;
|
|
786
|
+
margin:0px;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.EquationEditor .symbolButtonArea-6 {
|
|
790
|
+
text-align: left;
|
|
791
|
+
width:252px;
|
|
792
|
+
padding:12px 12px 12px 12px;
|
|
793
|
+
margin:0px;
|
|
794
|
+
}/* Fixes is a katex bug where horizontal lines are not rendering */
|
|
795
|
+
/* .frac-line {
|
|
796
|
+
background-color: #404040;
|
|
797
|
+
height:0.03em;
|
|
798
|
+
}
|
|
799
|
+
.overline-line {
|
|
800
|
+
background-color: #404040;
|
|
801
|
+
height:0.03em;
|
|
802
|
+
} */
|
|
803
|
+
|
|
804
|
+
.SymbolButton {
|
|
805
|
+
overflow: hidden; /* Important to fix a bug where katex renders parts of the equation outside the box */
|
|
806
|
+
font-size: 14px;
|
|
807
|
+
font-weight: bold;
|
|
808
|
+
color: #202020;
|
|
809
|
+
background: #e0e0e0;
|
|
810
|
+
text-align: center;
|
|
811
|
+
border:0px;
|
|
812
|
+
border-radius: 5px;
|
|
813
|
+
width:36px;
|
|
814
|
+
height:36px;
|
|
815
|
+
padding:1px 1px 1px 1px;
|
|
816
|
+
margin:3px;
|
|
817
|
+
/* transition: all .2s ease-in-out; */
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
.SymbolButton:hover {
|
|
822
|
+
filter: saturate(2.0);
|
|
823
|
+
color: black;
|
|
824
|
+
/* transform: scale(1.3); */
|
|
825
|
+
cursor: pointer;
|
|
826
|
+
box-shadow: 1px 1px 3px #808080;
|
|
827
|
+
animation: 2s grow;
|
|
828
|
+
animation-fill-mode: forwards;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
@keyframes grow {
|
|
832
|
+
00% {
|
|
833
|
+
transform: scale(1);
|
|
834
|
+
box-shadow: 0px 0px 0px #808080;
|
|
835
|
+
}
|
|
836
|
+
10% {
|
|
837
|
+
transform: scale(1.3);
|
|
838
|
+
box-shadow: 1px 1px 3px #808080;
|
|
839
|
+
}
|
|
840
|
+
90% {
|
|
841
|
+
transform: scale(1.3);
|
|
842
|
+
box-shadow: 1px 1px 3px #808080;
|
|
843
|
+
}
|
|
844
|
+
100% {
|
|
845
|
+
transform: scale(1.8);
|
|
846
|
+
box-shadow: 1px 1px 3px #808080;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
.SymbolButton:active {
|
|
851
|
+
background: #808080;
|
|
852
|
+
color: white;
|
|
853
|
+
transform: scale(1.3);
|
|
854
|
+
cursor: pointer;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
.SymbolButton-fadeIn {
|
|
858
|
+
opacity:1;
|
|
859
|
+
width:100px;
|
|
860
|
+
height:100px;
|
|
861
|
+
transition: width 0.5s, height 0.5s, opacity 0.5s 0.5s;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
.highlight-0{
|
|
865
|
+
background: #ebc9eb;
|
|
866
|
+
/* background: #80e0e0; */
|
|
867
|
+
}
|
|
868
|
+
/*
|
|
869
|
+
.highlight-1{
|
|
870
|
+
background: #c0e0e0;
|
|
871
|
+
}
|
|
872
|
+
/* .highlight-2{
|
|
873
|
+
background: #c0e0e0;
|
|
874
|
+
} */
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
.highlight-operators{
|
|
878
|
+
background: #F8e8D8;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
.highlight-angles{
|
|
882
|
+
background: #cceded;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
.highlight-greeklower{
|
|
886
|
+
background: #F8e8D8;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.highlight-greekupper{
|
|
890
|
+
background: #cceded;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.highlight-misc{
|
|
894
|
+
background: #F8e8D8;
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
.highlight-sets{
|
|
898
|
+
background: #cceded;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
.highlight-chemistry{
|
|
902
|
+
background: #F8e8D8;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
.highlight-elements{
|
|
906
|
+
background: #cceded;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.highlight-physics2{
|
|
910
|
+
background: #F8e8D8;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
.highlight-physics3{
|
|
914
|
+
background: #cceded;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
.highlight-expert{
|
|
918
|
+
background: #f4d6f5;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.highlight-matrices{
|
|
922
|
+
background: #f4d6f5;
|
|
923
|
+
}
|