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