@zzish/math-rich-input 0.1.44 → 0.1.46
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/dist/index.css +1 -0
- package/dist/math-rich-input.css +142 -128
- package/package.json +5 -2
- package/rollup.config.js +8 -3
- package/src/MathRichInput.css +14 -0
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.SymbolButton{background:#e0e0e0;border:0;border-radius:5px;color:#202020;display:inline-block;font-size:14px;font-weight:700;height:36px;margin:3px 3px auto;overflow:hidden;padding:1px;text-align:center;width:36px}.SymbolButton:hover{animation:grow 2s;animation-fill-mode:forwards;box-shadow:1px 1px 3px grey;color:#000;cursor:pointer;filter:saturate(2)}.SymbolButton:active{background:grey;color:#fff;cursor:pointer;transform:scale(1.3)}.SymbolButton-fadeIn{height:100px;opacity:1;transition:width .5s,height .5s,opacity .5s .5s;width:100px}.highlight-0{background:#ebc9eb}.highlight-operators{background:#f8e8d8}.highlight-angles{background:#cceded}.highlight-greeklower{background:#f8e8d8}.highlight-greekupper{background:#cceded}.highlight-misc{background:#f8e8d8}.highlight-sets{background:#cceded}.highlight-chemistry{background:#f8e8d8}.highlight-elements{background:#cceded}.highlight-physics2{background:#f8e8d8}.highlight-physics3{background:#cceded}.highlight-expert,.highlight-matrices{background:#f4d6f5}.EquationEditor{height:auto;text-align:center}.EquationEditor .editableAndCursorButtonsWrapper{align-items:center;display:flex;justify-content:center}.EquationEditor .editableWrapper{overflow:auto;width:100%}.EquationEditor .cursorButton{background:#fff;border:1px solid #663676;border-radius:5px;color:#663676;font-size:14px;font-weight:700;height:40px;margin-left:15px;margin-right:15px;margin-top:10px;min-width:40px;padding:0;text-align:center;width:auto}.EquationEditor .centerBox{display:inline-block;text-align:center}.EquationEditor .editable{border:1px solid #b0b0b0;border-radius:5px;color:#404040;font-size:20px;margin-bottom:5px;margin-top:6px;min-height:26px;min-width:150px;padding:7px 10px;text-align:left}.EquationEditor .editable-placeholder{color:grey;font-size:15px;min-height:26px;min-width:150px;position:absolute;transform:translate(-12px,-36px);z-index:-1}.EquationEditor .editable:focus-within{border:1px solid #663676!important;border-radius:5px;box-shadow:0 0 0 #fff}.latexInputAreaWrapper{width:auto}.EquationEditor .katexRenderedInput{border:0 solid #b0b0b0;border-radius:5px;color:#404040;font-size:16px;margin:5px 15px;min-height:30px;padding:7px 10px 4px;text-align:left;width:90%}.EquationEditor .latexInput{background-color:#fff;border:1px solid #b0b0b0;border-radius:5px;box-shadow:0 0 0 #fff;color:#007000;font-size:16px;height:88px;margin-top:10px;padding:7px 10px 5px;text-align:left;width:90%}.EquationEditor .latexInput:focus{border:1px solid #663676!important;outline:0}.EquationEditor .insertButton{background:#663676;border:0;border-radius:5px;color:#fff;font-size:14px;height:36px;margin:5px;padding:0 30px;text-align:left}.EquationEditor .cancelButton{background:#fff;border:1px solid #663676;border-radius:5px;color:#663676;font-size:14px;height:36px;margin-bottom:10px;margin-left:5px;margin-right:5px;padding:0 30px;text-align:left}.EquationEditor .insertButton:hover{background:#461656;color:#fff;cursor:pointer}.EquationEditor .recentSymbols-recentText-active{color:#404040;font-size:14px;font-weight:700;margin-right:10px}.EquationEditor .recentSymbols-recentText-not-active{color:grey;font-size:14px;font-weight:700;margin-bottom:10px;margin-top:10px}.EquationEditor .tabBar{background:#fff;border:0;margin:5px;padding:10px 10px 5px 20px;text-align:left}@media (max-width:500px){.EquationEditor .tabBar{padding:5px 0}}.EquationEditor .tab{border:0;border-bottom:6px solid #d0d0d0;color:#404040;font-size:14px;font-weight:700;height:30px;margin:5px;padding:5px 10px;text-align:left}.EquationEditor .tab:hover{cursor:pointer}.EquationEditor .tab-selected{border:0;border-bottom:6px solid #663676;color:#404040;font-size:14px;font-weight:700;height:30px;margin:5px;padding:5px 10px;text-align:left}.EquationEditor .recentSymbolsButtonArea{display:flex;justify-content:flex-start;margin:5px 5px 5px 15px;padding:2px;width:486px}.EquationEditor .symbolButtonAreasOuterContainer{overflow-x:auto}.EquationEditor .symbolButtonAreasInnerContainer{display:flex;width:2330px}.EquationEditor .symbolButtonArea{grid-gap:1.5px;display:grid;grid-auto-rows:minmax(min-content,max-content);grid-template-columns:repeat(auto-fill,minmax(36px,1fr));margin:0;padding:12px}.EquationEditor .symbolButtonArea-1{width:66px}.EquationEditor .symbolButtonArea-2{width:108px}.EquationEditor .symbolButtonArea-3{width:150px}.EquationEditor .symbolButtonArea-4{width:192px}.EquationEditor .symbolButtonArea-5{width:234px}.EquationEditor .symbolButtonArea-6{width:276px}.EquationEditorModal-background{animation:shade .3s;animation-fill-mode:forwards;background:#000;height:100%;left:0;position:fixed;top:0;width:100%;z-index:99}@keyframes shade{00%{opacity:0}to{opacity:.6}}.EquationEditorModal{animation:rise .3s;animation-fill-mode:forwards;background:#fff;border:1px solid grey;border-radius:10px;box-shadow:0 2px 5px 1px #a0a0a0;left:50%;max-width:500px;position:fixed;top:50%;width:98%;z-index:100}@keyframes rise{00%{opacity:0;transform:translate(-50%,100%)}to{opacity:1;transform:translate(-50%,-50%)}}.EquationEditorModal-mobile{background:#fff;border:1px solid grey;border-radius:10px;box-shadow:0 2px 5px 1px #a0a0a0;left:50%;max-width:500px;position:fixed;top:0;transform:translate(-50%,1px);width:99%;z-index:100}.EquationEditorModal .title,.EquationEditorModal-mobile .title{background:#e0e0e0;border:0;border-radius:5px 5px 0 0;color:#404040;display:flex;font-size:14px;justify-content:space-between;margin:0;padding:15px;text-align:left}.EquationEditorModal-mobile .title{height:30px}.expertModeSwitch{align-items:center;display:flex;flex-direction:row}.EquationEditorModal .expertModeSwitch .switch{margin-left:10px}.EquationEditorModal .switch{display:inline-block;height:22px;margin-bottom:0;padding:0;position:relative;width:35px}.EquationEditorModal .switch input{height:0;opacity:0;width:0}.EquationEditorModal .slider{background-color:#ccc;bottom:0;cursor:pointer;left:0;position:absolute;right:0;top:0;transition:.4s}.EquationEditorModal .slider:before{background-color:#fff;bottom:4px;content:"";height:14px;left:4px;position:absolute;transition:.4s;width:14px}.EquationEditorModal input:checked+.slider{background-color:#663676}.EquationEditorModal input:focus+.slider{box-shadow:0 0 1px #2196f3}.EquationEditorModal input:checked+.slider:before{transform:translateX(13px)}.EquationEditorModal .slider.round{border-radius:18px}.EquationEditorModal .slider.round:before{border-radius:50%}.AccentBar{padding:8px;width:360px}.AccentBar,.AccentBar-compact{animation:fadeIn1 .4s;animation-fill-mode:forwards;background-color:#fff;border:1px solid #d0d0d0;border-radius:5px;box-shadow:1px 1px 5px #a0a0a0;color:#000;position:absolute;z-index:1}.AccentBar-compact{display:flex;padding:5px}.AccentBar-outerContainer{border-radius:5px;overflow-y:scroll}.AccentBar-innerContainer{height:350px}.AccentBar .symbols-grid{grid-gap:3px;display:grid;grid-auto-rows:minmax(min-content,max-content);grid-template-columns:repeat(auto-fill,minmax(36px,1fr))}.AccentBar .insert-grid{padding:5px}.AccentBar .type-a-letter{color:#a0a0a0;font-family:sans-serif;font-size:14px;font-weight:700;grid-column:1/-1;height:36px;padding-left:20px;padding-top:12px}.AccentBar-button{background:#f4f4f4;border:0;border-radius:5px;font-family:sans-serif;font-size:17px;height:36px;padding:1px;width:40px}.AB-compact{background:#fff;margin:0}.AB-narrow{width:36px}.AccentBar-button:hover{animation:grow 2s;animation-fill-mode:forwards;background:#663676;box-shadow:1px 1px 3px grey;color:#fff;cursor:pointer}@keyframes grow{00%{box-shadow:0 0 0 grey;transform:scale(1)}10%{box-shadow:1px 1px 3px grey;transform:scale(1.3)}90%{box-shadow:1px 1px 3px grey;transform:scale(1.3)}to{box-shadow:1px 1px 3px grey;transform:scale(1.8)}}.AccentBar-button:active{background:grey;color:#fff;cursor:pointer}.AccentBar .tabBar{background:#fff;border:0;padding:10px 0;text-align:left}.AccentBar .tab{border:0;border-bottom:4px solid #d0d0d0;color:#404040;font-size:14px;font-weight:700;height:30px;margin:2px;padding:2px 5px;text-align:left}.AccentBar .tab:hover{cursor:pointer}.AccentBar .tab-selected{border:0;border-bottom:4px solid #663676;color:#404040;font-size:14px;font-weight:700;height:30px;margin:2px;padding:2px 5px;text-align:left}.AccentBar .section-label{color:#663676;font-size:13px;font-weight:700;grid-column:1/-1;margin-bottom:4px;margin-left:8px;margin-top:8px}.AccentBar .replace-section{min-height:70px}.AccentBar .tabArea{animation:fadeIn1 .4s;animation-fill-mode:forwards}.Toolbar{animation:fadeIn1 .5s;animation-fill-mode:forwards;background-color:#fff;border:1px solid #d0d0d0;border-radius:5px;box-shadow:1px 1px 5px #a0a0a0;color:#000;display:flex;height:42px;position:absolute;z-index:10}@keyframes fadeIn1{0%{opacity:0}to{opacity:1}}.Toolbar-button{background-color:#fff;border:0;border-radius:5px;font-family:sans-serif;font-size:16px;height:36px;margin:2px;padding:1px;width:40px}.Toolbar-button:hover{background:#663676;color:#fff;cursor:pointer}.Toolbar-button:active{background:grey;color:#fff;cursor:pointer}.TB-narrow{width:30px}.TB-wide{width:46px}.TB-selected{animation:TB-fadeIn .2s;animation-fill-mode:forwards;background:#d0d0d0;color:#000;cursor:pointer}.TB-selected:hover{background:#663676;color:#fff;cursor:pointer}@keyframes TB-fadeIn{00%{background:#fff}to{background:#d0d0d0}}.Toolbar-button .tooltiptext{background-color:#222;border-radius:6px;color:#fff;font-size:12px;font-weight:400;left:50px;padding:4px 10px;position:absolute;text-align:center;top:-90%;visibility:hidden;width:100px;z-index:11}.Toolbar-button:hover .tooltiptext{animation:fadeIn2 .8s;animation-fill-mode:forwards;visibility:visible}@keyframes fadeIn2{00%{opacity:0}70%{opacity:0}to{opacity:.9;visibility:visible}}*,:after,:before{box-sizing:border-box}.MathRichInput-Container{border-radius:5px;width:100%}.MathRichInput-scrollview{border-radius:5px;display:flex;position:relative}.MathRichInput p{margin:0;padding:0}.MathRichInput{background-color:#fff;border-radius:5px;font-size:18px;overflow-x:scroll;overflow:overlay;padding:10px;width:100%}.MathRichInput:empty:before{color:#acb6c0;content:attr(data-placeholder);font-size:15px}.MathRichInput:empty:focus:before{content:""}.MathRichInput:focus{outline:0}.MathRichInput .katex{border:0}.MathRichInput .base{background-color:#f0f0f0;border:1px dotted #d0d0d0;border-radius:5px;margin:0 2px;padding:2px}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.MathRichInput .katex-error{background-color:#f0f0f0;border:1px dotted #ff8080;border-radius:5px;margin:0 2px;padding:2px}.MathRichInput-Container :focus-within{background-color:#fff;outline:0}.MathRichInput-Container.dark :focus-within{background:none;border:none;outline:0}.MathRichInput-Container.dark .MathRichInput{background:none;border:none;color:#fff}.MathRichInput-Container.dark .MathRichInput .base,.MathRichInput-Container.dark .MathRichInput .katex{background:none}.MathRichInput-Container.dark .MathRichInput:focus{background:none;border:none}.MathRichInput-Container.question-edit-input .MathRichInput{border-radius:12px;font-size:32px;font-weight:400}.MathRichInput-Container.question-edit-input .MathRichInput:focus{background:hsla(0,0%,100%,.1);border:none}.MathRichInput-Container.answer-edit-input .MathRichInput{font-size:16px;font-weight:400}.MathRichInput-Container.explanation-input .MathRichInput,.MathRichInput-Container.hint-input .MathRichInput{color:#322e33;font-size:16px;font-weight:400}.MathRichInput-Container.explanation-input .MathRichInput .base,.MathRichInput-Container.hint-input .MathRichInput .base{border:1px dotted #322e33}
|
package/dist/math-rich-input.css
CHANGED
|
@@ -123,138 +123,21 @@
|
|
|
123
123
|
font-size: 16px;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
}
|
|
127
|
-
/* Note that the top left position of the toolbar is set programatically in componentDidMount */
|
|
128
|
-
|
|
129
|
-
.Toolbar {
|
|
130
|
-
position: absolute;
|
|
131
|
-
z-index: 10;
|
|
132
|
-
display: flex;
|
|
133
|
-
height: 42px;
|
|
134
|
-
background-color: white;
|
|
135
|
-
border: 1px solid #d0d0d0;
|
|
136
|
-
border-radius: 5px;
|
|
137
|
-
box-shadow: 1px 1px 5px #a0a0a0;
|
|
138
|
-
animation: 0.5s fadeIn1;
|
|
139
|
-
animation-fill-mode: forwards;
|
|
140
|
-
color: black;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
@keyframes fadeIn1 {
|
|
144
|
-
0% {
|
|
145
|
-
opacity: 0;
|
|
146
|
-
}
|
|
147
|
-
100% {
|
|
148
|
-
opacity: 1;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
126
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
border: 0px;
|
|
160
|
-
padding: 1px;
|
|
161
|
-
margin: 2px;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.Toolbar-button:hover {
|
|
165
|
-
color: white;
|
|
166
|
-
background: #663676;
|
|
167
|
-
cursor: pointer;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.Toolbar-button:active {
|
|
171
|
-
background: #808080;
|
|
172
|
-
color: white;
|
|
173
|
-
cursor: pointer;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.TB-narrow {
|
|
177
|
-
width: 30px;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.TB-wide {
|
|
181
|
-
width: 46px;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.TB-selected {
|
|
185
|
-
background: #d0d0d0;
|
|
186
|
-
color: black;
|
|
187
|
-
cursor: pointer;
|
|
188
|
-
animation: 0.2s TB-fadeIn;
|
|
189
|
-
animation-fill-mode: forwards;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.TB-selected:hover {
|
|
193
|
-
color: white;
|
|
194
|
-
background: #663676;
|
|
195
|
-
cursor: pointer;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
@keyframes TB-fadeIn {
|
|
199
|
-
00% {
|
|
200
|
-
background: white;
|
|
201
|
-
}
|
|
202
|
-
100% {
|
|
203
|
-
background: #d0d0d0;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/* Tooltip text */
|
|
208
|
-
.Toolbar-button .tooltiptext {
|
|
209
|
-
font-weight: normal;
|
|
210
|
-
visibility: hidden;
|
|
211
|
-
width: 100px;
|
|
212
|
-
background-color: #222;
|
|
213
|
-
color: #fff;
|
|
214
|
-
/*font-weight: bold;*/
|
|
215
|
-
font-size: 12px;
|
|
216
|
-
text-align: center;
|
|
217
|
-
padding: 4px 10px;
|
|
218
|
-
border-radius: 6px;
|
|
219
|
-
|
|
220
|
-
/* Position the tooltip text - see examples below! */
|
|
221
|
-
position: absolute;
|
|
222
|
-
z-index: 11;
|
|
223
|
-
top: -90%; /* Must leave a small gap between tooltip and button */
|
|
224
|
-
left: 50px;
|
|
225
|
-
|
|
226
|
-
/* transform: translate (50%,0%); */
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/* Show the tooltip text when you mouse over the tooltip container */
|
|
230
|
-
.Toolbar-button:hover .tooltiptext {
|
|
231
|
-
animation: 0.8s fadeIn2;
|
|
232
|
-
animation-fill-mode: forwards;
|
|
233
|
-
visibility: visible;
|
|
234
|
-
/* width: 100px; */
|
|
235
|
-
/* top: -90%; */ /* Must leave a small gap between tooltip and button */
|
|
236
|
-
/* left: 20%; */
|
|
237
|
-
/* margin-left: -50px; */
|
|
238
|
-
}
|
|
127
|
+
&.hint-input,
|
|
128
|
+
&.explanation-input {
|
|
129
|
+
.MathRichInput {
|
|
130
|
+
font-weight: 400;
|
|
131
|
+
font-size: 16px;
|
|
132
|
+
/* text-decoration: underline dotted; */
|
|
133
|
+
color: #322e33;
|
|
239
134
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
70% {
|
|
245
|
-
opacity: 0;
|
|
246
|
-
}
|
|
247
|
-
100% {
|
|
248
|
-
visibility: visible;
|
|
249
|
-
opacity: 0.9;
|
|
135
|
+
.base {
|
|
136
|
+
border: 1px dotted #322e33;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
250
139
|
}
|
|
251
140
|
}
|
|
252
|
-
|
|
253
|
-
/* .tooltip {
|
|
254
|
-
position: relative;
|
|
255
|
-
display: inline-block;
|
|
256
|
-
border-bottom: 1px dotted black; /* If you want dots under the hoverable text
|
|
257
|
-
} */
|
|
258
141
|
.EquationEditorModal-background {
|
|
259
142
|
position: fixed;
|
|
260
143
|
top: 0;
|
|
@@ -418,6 +301,137 @@
|
|
|
418
301
|
.EquationEditorModal .slider.round:before {
|
|
419
302
|
border-radius: 50%;
|
|
420
303
|
}
|
|
304
|
+
/* Note that the top left position of the toolbar is set programatically in componentDidMount */
|
|
305
|
+
|
|
306
|
+
.Toolbar {
|
|
307
|
+
position: absolute;
|
|
308
|
+
z-index: 10;
|
|
309
|
+
display: flex;
|
|
310
|
+
height: 42px;
|
|
311
|
+
background-color: white;
|
|
312
|
+
border: 1px solid #d0d0d0;
|
|
313
|
+
border-radius: 5px;
|
|
314
|
+
box-shadow: 1px 1px 5px #a0a0a0;
|
|
315
|
+
animation: 0.5s fadeIn1;
|
|
316
|
+
animation-fill-mode: forwards;
|
|
317
|
+
color: black;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
@keyframes fadeIn1 {
|
|
321
|
+
0% {
|
|
322
|
+
opacity: 0;
|
|
323
|
+
}
|
|
324
|
+
100% {
|
|
325
|
+
opacity: 1;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.Toolbar-button {
|
|
330
|
+
font-family: sans-serif;
|
|
331
|
+
font-size: 16px;
|
|
332
|
+
width: 40px;
|
|
333
|
+
height: 36px;
|
|
334
|
+
background-color: white;
|
|
335
|
+
border-radius: 5px;
|
|
336
|
+
border: 0px;
|
|
337
|
+
padding: 1px;
|
|
338
|
+
margin: 2px;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.Toolbar-button:hover {
|
|
342
|
+
color: white;
|
|
343
|
+
background: #663676;
|
|
344
|
+
cursor: pointer;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
.Toolbar-button:active {
|
|
348
|
+
background: #808080;
|
|
349
|
+
color: white;
|
|
350
|
+
cursor: pointer;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.TB-narrow {
|
|
354
|
+
width: 30px;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.TB-wide {
|
|
358
|
+
width: 46px;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.TB-selected {
|
|
362
|
+
background: #d0d0d0;
|
|
363
|
+
color: black;
|
|
364
|
+
cursor: pointer;
|
|
365
|
+
animation: 0.2s TB-fadeIn;
|
|
366
|
+
animation-fill-mode: forwards;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.TB-selected:hover {
|
|
370
|
+
color: white;
|
|
371
|
+
background: #663676;
|
|
372
|
+
cursor: pointer;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
@keyframes TB-fadeIn {
|
|
376
|
+
00% {
|
|
377
|
+
background: white;
|
|
378
|
+
}
|
|
379
|
+
100% {
|
|
380
|
+
background: #d0d0d0;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/* Tooltip text */
|
|
385
|
+
.Toolbar-button .tooltiptext {
|
|
386
|
+
font-weight: normal;
|
|
387
|
+
visibility: hidden;
|
|
388
|
+
width: 100px;
|
|
389
|
+
background-color: #222;
|
|
390
|
+
color: #fff;
|
|
391
|
+
/*font-weight: bold;*/
|
|
392
|
+
font-size: 12px;
|
|
393
|
+
text-align: center;
|
|
394
|
+
padding: 4px 10px;
|
|
395
|
+
border-radius: 6px;
|
|
396
|
+
|
|
397
|
+
/* Position the tooltip text - see examples below! */
|
|
398
|
+
position: absolute;
|
|
399
|
+
z-index: 11;
|
|
400
|
+
top: -90%; /* Must leave a small gap between tooltip and button */
|
|
401
|
+
left: 50px;
|
|
402
|
+
|
|
403
|
+
/* transform: translate (50%,0%); */
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* Show the tooltip text when you mouse over the tooltip container */
|
|
407
|
+
.Toolbar-button:hover .tooltiptext {
|
|
408
|
+
animation: 0.8s fadeIn2;
|
|
409
|
+
animation-fill-mode: forwards;
|
|
410
|
+
visibility: visible;
|
|
411
|
+
/* width: 100px; */
|
|
412
|
+
/* top: -90%; */ /* Must leave a small gap between tooltip and button */
|
|
413
|
+
/* left: 20%; */
|
|
414
|
+
/* margin-left: -50px; */
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
@keyframes fadeIn2 {
|
|
418
|
+
00% {
|
|
419
|
+
opacity: 0;
|
|
420
|
+
}
|
|
421
|
+
70% {
|
|
422
|
+
opacity: 0;
|
|
423
|
+
}
|
|
424
|
+
100% {
|
|
425
|
+
visibility: visible;
|
|
426
|
+
opacity: 0.9;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/* .tooltip {
|
|
431
|
+
position: relative;
|
|
432
|
+
display: inline-block;
|
|
433
|
+
border-bottom: 1px dotted black; /* If you want dots under the hoverable text
|
|
434
|
+
} */
|
|
421
435
|
/* Note that the top left position of the accent bar is set programatically in componentDidMount */
|
|
422
436
|
|
|
423
437
|
.AccentBar {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zzish/math-rich-input",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.46",
|
|
4
4
|
"description": "React component for user to enter rich text with embedded math equations.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,8 +37,11 @@
|
|
|
37
37
|
"@rollup/plugin-babel": "^5.3.0",
|
|
38
38
|
"@rollup/plugin-commonjs": "^17.1.0",
|
|
39
39
|
"@rollup/plugin-node-resolve": "^11.2.0",
|
|
40
|
+
"postcss": "^8.4.38",
|
|
41
|
+
"postcss-nested": "^6.0.1",
|
|
40
42
|
"rollup": "^2.41.4",
|
|
41
|
-
"rollup-plugin-css-only": "^3.1.0"
|
|
43
|
+
"rollup-plugin-css-only": "^3.1.0",
|
|
44
|
+
"rollup-plugin-postcss": "^4.0.2"
|
|
42
45
|
},
|
|
43
46
|
"peerDependencies": {
|
|
44
47
|
"react": "^16.14.0 || ^17.0.0 || ^18.0.0",
|
package/rollup.config.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { babel } from "@rollup/plugin-babel";
|
|
2
2
|
import { nodeResolve } from "@rollup/plugin-node-resolve";
|
|
3
3
|
import commonjs from "@rollup/plugin-commonjs";
|
|
4
|
-
import
|
|
4
|
+
import postcss from "rollup-plugin-postcss";
|
|
5
|
+
import nested from "postcss-nested"; // To handle nested rules
|
|
5
6
|
|
|
6
7
|
const extensions = [".js", ".jsx"];
|
|
7
8
|
|
|
@@ -12,8 +13,12 @@ export default {
|
|
|
12
13
|
format: "cjs",
|
|
13
14
|
},
|
|
14
15
|
plugins: [
|
|
15
|
-
nodeResolve({
|
|
16
|
-
|
|
16
|
+
nodeResolve({ mainFields: ["module", "main", "browser"] }),
|
|
17
|
+
postcss({
|
|
18
|
+
extensions: [".css"],
|
|
19
|
+
plugins: [nested()], // Process nested rules
|
|
20
|
+
extract: true, // Extract to a file
|
|
21
|
+
minimize: true, // Minimize the output
|
|
17
22
|
output: "math-rich-input.css",
|
|
18
23
|
}),
|
|
19
24
|
babel({
|
package/src/MathRichInput.css
CHANGED
|
@@ -123,4 +123,18 @@
|
|
|
123
123
|
font-size: 16px;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
+
|
|
127
|
+
&.hint-input,
|
|
128
|
+
&.explanation-input {
|
|
129
|
+
.MathRichInput {
|
|
130
|
+
font-weight: 400;
|
|
131
|
+
font-size: 16px;
|
|
132
|
+
/* text-decoration: underline dotted; */
|
|
133
|
+
color: #322e33;
|
|
134
|
+
|
|
135
|
+
.base {
|
|
136
|
+
border: 1px dotted #322e33;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
126
140
|
}
|