@zzish/math-rich-input 0.1.49 → 0.1.51
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.js +171 -33
- package/dist/math-rich-input.css +1 -1
- package/dist/standalone.js +1 -1
- package/package.json +1 -1
- package/src/EquationEditor.css +168 -160
- package/src/EquationEditorModal.css +143 -105
- package/src/EquationEditorModal.jsx +165 -24
- package/src/MathRichInput.jsx +1 -0
- package/src/SymbolButton.css +1 -0
- package/src/standalone.js +413 -56
package/package.json
CHANGED
package/src/EquationEditor.css
CHANGED
|
@@ -1,255 +1,263 @@
|
|
|
1
1
|
.EquationEditor {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
height: auto;
|
|
3
|
+
text-align: center;
|
|
4
|
+
cursor: default;
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
.EquationEditor .editableAndCursorButtonsWrapper {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
.EquationEditor .editableWrapper {
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
overflow: auto;
|
|
15
|
+
width: 100%;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
.EquationEditor .cursorButton {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
font-weight: bold;
|
|
21
|
+
color: #663676;
|
|
22
|
+
background: white;
|
|
23
|
+
text-align: center;
|
|
24
|
+
border: 1px solid #663676;
|
|
25
|
+
border-radius: 5px;
|
|
26
|
+
min-width: 40px;
|
|
27
|
+
width: auto;
|
|
28
|
+
height: 40px;
|
|
29
|
+
padding: 0px;
|
|
30
|
+
margin-top: 10px;
|
|
31
|
+
margin-left: 15px;
|
|
32
|
+
margin-right: 15px;
|
|
33
|
+
/* transition: all .2s ease-in-out; */
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
.EquationEditor .centerBox {
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
display: inline-block;
|
|
38
|
+
text-align: center;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
.EquationEditor .editable {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
/* width:auto; */
|
|
43
|
+
text-align: left;
|
|
44
|
+
min-height: 26px;
|
|
45
|
+
min-width: 150px;
|
|
46
|
+
font-size: 20px;
|
|
47
|
+
color: #404040;
|
|
48
|
+
border: 1px solid #b0b0b0;
|
|
49
|
+
border-radius: 5px;
|
|
50
|
+
/* height:36px; */
|
|
51
|
+
padding: 7px 10px 7px 10px;
|
|
52
|
+
margin-top: 6px;
|
|
53
|
+
margin-bottom: 5px;
|
|
54
|
+
cursor: text;
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
.EquationEditor .editable-placeholder {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
position: absolute;
|
|
59
|
+
z-index: -1;
|
|
60
|
+
min-height: 26px;
|
|
61
|
+
min-width: 150px;
|
|
62
|
+
font-size: 15px;
|
|
63
|
+
color: grey;
|
|
64
|
+
/* Note the x translation needs to be updatad programatically if the modal width changes */
|
|
65
|
+
transform: translate(-12px, -36px);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
.EquationEditor .editable:focus-within {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
border-radius: 5px;
|
|
70
|
+
border: 1px solid #663676 !important;
|
|
71
|
+
box-shadow: 0px 0px 0px white;
|
|
72
|
+
/* box-shadow: inset 1px 1px 5px #a0a0a0; */
|
|
71
73
|
}
|
|
72
74
|
|
|
73
75
|
.latexInputAreaWrapper {
|
|
74
|
-
|
|
76
|
+
width: auto;
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
.EquationEditor .katexRenderedInput {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
text-align: left;
|
|
81
|
+
min-height: 30px;
|
|
82
|
+
width: 90%;
|
|
83
|
+
font-size: 16px;
|
|
84
|
+
color: #404040;
|
|
85
|
+
border: 0px solid #b0b0b0;
|
|
86
|
+
border-radius: 5px;
|
|
87
|
+
/* height:36px; */
|
|
88
|
+
padding: 7px 10px 4px 10px;
|
|
89
|
+
margin: 5px 15px;
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
.EquationEditor .latexInput {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
text-align: left;
|
|
94
|
+
height: 88px;
|
|
95
|
+
width: 90%;
|
|
96
|
+
font-size: 16px;
|
|
97
|
+
/* color: #202020; */
|
|
98
|
+
/* background-color: #e0e0e0; */
|
|
99
|
+
/* color: #00ff00;
|
|
98
100
|
background-color: #202020; */
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
color: #007000;
|
|
102
|
+
background-color: #fff;
|
|
103
|
+
border: 1px solid #b0b0b0;
|
|
104
|
+
border-radius: 5px;
|
|
105
|
+
padding: 7px 10px 5px 10px;
|
|
106
|
+
margin-top: 10px;
|
|
107
|
+
box-shadow: 0px 0px 0px white;
|
|
108
|
+
cursor: text;
|
|
106
109
|
}
|
|
107
110
|
|
|
108
111
|
.EquationEditor .latexInput:focus {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
border: 1px solid #663676 !important;
|
|
113
|
+
outline: 0;
|
|
114
|
+
/* outline: 2px solid #663676!important; */ /* Has square corners */
|
|
115
|
+
/* box-shadow: inset 1px 1px 5px #a0a0a0, 0px 0px 3px #663676; */
|
|
113
116
|
}
|
|
114
117
|
|
|
115
118
|
.EquationEditor .insertButton {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
119
|
+
font-size: 14px;
|
|
120
|
+
color: white;
|
|
121
|
+
background: #663676;
|
|
122
|
+
text-align: left;
|
|
123
|
+
border: 0px;
|
|
124
|
+
border-radius: 5px;
|
|
125
|
+
height: 36px;
|
|
126
|
+
padding: 0px 30px;
|
|
127
|
+
margin-top: 5px;
|
|
128
|
+
margin-bottom: 5px;
|
|
129
|
+
margin-left: 5px;
|
|
130
|
+
margin-right: 5px;
|
|
131
|
+
cursor: pointer;
|
|
128
132
|
}
|
|
129
133
|
|
|
130
134
|
.EquationEditor .cancelButton {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
135
|
+
font-size: 14px;
|
|
136
|
+
background: white;
|
|
137
|
+
color: #663676;
|
|
138
|
+
text-align: left;
|
|
139
|
+
border: 1px solid #663676;
|
|
140
|
+
border-radius: 5px;
|
|
141
|
+
height: 36px;
|
|
142
|
+
padding: 0px 30px;
|
|
143
|
+
margin-bottom: 10px;
|
|
144
|
+
margin-left: 5px;
|
|
145
|
+
margin-right: 5px;
|
|
146
|
+
cursor: pointer;
|
|
142
147
|
}
|
|
143
148
|
|
|
144
149
|
.EquationEditor .insertButton:hover {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
150
|
+
color: white;
|
|
151
|
+
background: #461656;
|
|
152
|
+
cursor: pointer;
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
.EquationEditor .recentSymbols-recentText-active {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
font-size: 14px;
|
|
157
|
+
font-weight: bold;
|
|
158
|
+
color: #404040;
|
|
159
|
+
margin-right: 10px;
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
.EquationEditor .recentSymbols-recentText-not-active {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
font-size: 14px;
|
|
164
|
+
font-weight: bold;
|
|
165
|
+
color: #808080;
|
|
166
|
+
margin-top: 10px;
|
|
167
|
+
margin-bottom: 10px;
|
|
163
168
|
}
|
|
164
169
|
|
|
165
170
|
.EquationEditor .tabBar {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
+
background: white;
|
|
172
|
+
text-align: left;
|
|
173
|
+
border: 0px;
|
|
174
|
+
padding: 10px 10px 5px 20px;
|
|
175
|
+
margin: 5px;
|
|
176
|
+
cursor: default;
|
|
171
177
|
}
|
|
172
178
|
|
|
173
179
|
@media (max-width: 500px) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
180
|
+
.EquationEditor .tabBar {
|
|
181
|
+
padding: 5px 0;
|
|
182
|
+
}
|
|
177
183
|
}
|
|
178
184
|
|
|
179
185
|
.EquationEditor .tab {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
font-size: 14px;
|
|
187
|
+
font-weight: bold;
|
|
188
|
+
color: #404040;
|
|
189
|
+
text-align: left;
|
|
190
|
+
border: 0px;
|
|
191
|
+
height: 30px;
|
|
192
|
+
padding: 5px 10px;
|
|
193
|
+
margin: 5px;
|
|
194
|
+
border-bottom: 6px solid #d0d0d0;
|
|
189
195
|
}
|
|
190
196
|
|
|
191
197
|
.EquationEditor .tab:hover {
|
|
192
|
-
|
|
198
|
+
cursor: pointer;
|
|
193
199
|
}
|
|
194
200
|
.EquationEditor .tab-selected {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
font-size: 14px;
|
|
202
|
+
font-weight: bold;
|
|
203
|
+
color: #404040;
|
|
204
|
+
text-align: left;
|
|
205
|
+
border: 0px;
|
|
206
|
+
height: 30px;
|
|
207
|
+
padding: 5px 10px;
|
|
208
|
+
margin: 5px;
|
|
209
|
+
border-bottom: 6px solid #663676;
|
|
204
210
|
}
|
|
205
211
|
|
|
206
212
|
.EquationEditor .recentSymbolsButtonArea {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
+
display: flex;
|
|
214
|
+
justify-content: flex-start;
|
|
215
|
+
width: 486px;
|
|
216
|
+
padding: 2px;
|
|
217
|
+
margin: 5px;
|
|
218
|
+
margin-left: 15px;
|
|
219
|
+
cursor: default;
|
|
213
220
|
}
|
|
214
221
|
|
|
215
222
|
.EquationEditor .symbolButtonAreasOuterContainer {
|
|
216
|
-
|
|
223
|
+
overflow-x: auto;
|
|
217
224
|
}
|
|
218
225
|
|
|
219
226
|
.EquationEditor .symbolButtonAreasInnerContainer {
|
|
220
|
-
|
|
221
|
-
|
|
227
|
+
display: flex;
|
|
228
|
+
width: 2330px;
|
|
222
229
|
}
|
|
223
230
|
|
|
224
231
|
.EquationEditor .symbolButtonArea {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
232
|
+
display: grid;
|
|
233
|
+
grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
|
|
234
|
+
grid-auto-rows: minmax(min-content, max-content);
|
|
235
|
+
grid-gap: 1.5px;
|
|
236
|
+
padding: 12px;
|
|
237
|
+
margin: 0px;
|
|
238
|
+
cursor: default;
|
|
231
239
|
}
|
|
232
240
|
|
|
233
241
|
.EquationEditor .symbolButtonArea-1 {
|
|
234
|
-
|
|
242
|
+
width: 66px;
|
|
235
243
|
}
|
|
236
244
|
|
|
237
245
|
.EquationEditor .symbolButtonArea-2 {
|
|
238
|
-
|
|
246
|
+
width: 108px;
|
|
239
247
|
}
|
|
240
248
|
|
|
241
249
|
.EquationEditor .symbolButtonArea-3 {
|
|
242
|
-
|
|
250
|
+
width: 150px;
|
|
243
251
|
}
|
|
244
252
|
|
|
245
253
|
.EquationEditor .symbolButtonArea-4 {
|
|
246
|
-
|
|
254
|
+
width: 192px;
|
|
247
255
|
}
|
|
248
256
|
|
|
249
257
|
.EquationEditor .symbolButtonArea-5 {
|
|
250
|
-
|
|
258
|
+
width: 234px;
|
|
251
259
|
}
|
|
252
260
|
|
|
253
261
|
.EquationEditor .symbolButtonArea-6 {
|
|
254
|
-
|
|
262
|
+
width: 276px;
|
|
255
263
|
}
|