@zzish/math-rich-input 0.1.4 → 0.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzish/math-rich-input",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "React component for user to enter rich text with embedded math equations.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,8 +17,6 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "katex": "^0.12.0",
20
- "react": "^17.0.1",
21
- "react-dom": "^17.0.1",
22
20
  "react-mathquill": "^1.0.1",
23
21
  "react-transition-group": "^4.4.1",
24
22
  "web-vitals": "^0.2.4"
package/rollup.config.js CHANGED
@@ -14,14 +14,14 @@ export default {
14
14
  plugins: [
15
15
  nodeResolve({ main: true }),
16
16
  css({
17
- output: "math-rich-input.css"
17
+ output: "math-rich-input.css",
18
18
  }),
19
- babel({
19
+ babel({
20
20
  babelHelpers: "bundled",
21
- exclude: "node_modules/**",
21
+ exclude: "node_modules/**",
22
22
  extensions,
23
23
  presets: ["@babel/env", "@babel/react"],
24
- plugins: ["@babel/plugin-proposal-class-properties"]
24
+ plugins: ["@babel/plugin-proposal-class-properties"],
25
25
  }),
26
26
  commonjs({
27
27
  extensions,
package/src/AccentBar.css CHANGED
@@ -1,16 +1,15 @@
1
-
2
1
  /* Note that the top left position of the accent bar is set programatically in componentDidMount */
3
2
 
4
3
  .AccentBar {
5
4
  position: fixed;
6
5
  z-index: 1;
7
- width:348px; /* max of 346px to ensure fits on Moto G4 mobile device screens */
8
- background-color: white;
6
+ width: 360px;
7
+ background-color: #fff;
9
8
  border: 1px solid #d0d0d0;
10
9
  border-radius: 5px;
11
10
  box-shadow: 1px 1px 5px #a0a0a0;
12
- padding:5px;
13
- animation: 0.4s fadeIn1;
11
+ padding: 5px;
12
+ animation: 0.4s fadeIn1;
14
13
  animation-fill-mode: forwards;
15
14
  }
16
15
 
@@ -21,52 +20,62 @@
21
20
  border: 1px solid #d0d0d0;
22
21
  border-radius: 5px;
23
22
  box-shadow: 1px 1px 5px #a0a0a0;
24
- padding:5px;
25
- top:0px;
26
- left:0px; /* Important to set this default so that accent bar renders to optimal width */
27
- animation: 0.4s fadeIn1;
23
+ padding: 5px;
24
+ top: 0px;
25
+ left: 0px; /* Important to set this default so that accent bar renders to optimal width */
26
+ animation: 0.4s fadeIn1;
28
27
  animation-fill-mode: forwards;
29
28
  }
30
29
 
31
30
  .AccentBar-outerContainer {
32
- overflow-y:scroll;
33
- border-radius:5px;
34
- overflow: overlay;
31
+ overflow-y: scroll;
32
+ border-radius: 5px;
35
33
  }
36
34
 
37
35
  .AccentBar-innerContainer {
38
- height:350px; /* Height of overall box */
36
+ height: 350px;
39
37
  }
40
38
 
41
39
  @keyframes fadeIn1 {
42
40
  0% {
43
41
  opacity: 0;
44
- }
42
+ }
45
43
  100% {
46
- opacity: 1.0;
44
+ opacity: 1;
47
45
  }
48
46
  }
49
47
 
48
+ .AccentBar .symbols-grid {
49
+ display: grid;
50
+ grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
51
+ grid-auto-rows: minmax(min-content, max-content);
52
+ grid-gap: 3px;
53
+ }
54
+
55
+ .AccentBar .insert-grid {
56
+ padding: 5px;
57
+ }
58
+
50
59
  .AccentBar .type-a-letter {
51
- color: #A0A0A0;
52
- font-family:sans-serif;
60
+ grid-column: 1/-1;
61
+ color: #a0a0a0;
62
+ font-family: sans-serif;
53
63
  font-size: 14px;
54
64
  font-weight: bold;
55
65
  height: 36px;
56
- padding-top:12px;
57
- padding-left:20px;
66
+ padding-top: 12px;
67
+ padding-left: 20px;
58
68
  }
59
69
 
60
70
  .AccentBar-button {
61
- font-family:sans-serif;
71
+ font-family: sans-serif;
62
72
  font-size: 17px;
63
- width:40px;
73
+ width: 40px;
64
74
  height: 36px;
65
75
  background: #f4f4f4;
66
76
  border-radius: 5px;
67
77
  border: 0px;
68
78
  padding: 1px;
69
- margin: 6px;
70
79
  }
71
80
 
72
81
  .AB-compact {
@@ -75,16 +84,15 @@
75
84
  }
76
85
 
77
86
  .AB-narrow {
78
- width:30px;
87
+ width: 36px;
79
88
  }
80
89
 
81
90
  .AccentBar-button:hover {
82
- /* filter: saturate(2.0); */
83
91
  color: white;
84
92
  background: #663676;
85
93
  cursor: pointer;
86
94
  box-shadow: 1px 1px 3px #808080;
87
- animation: 2s grow;
95
+ animation: 2s grow;
88
96
  animation-fill-mode: forwards;
89
97
  }
90
98
 
@@ -92,7 +100,7 @@
92
100
  00% {
93
101
  transform: scale(1);
94
102
  box-shadow: 0px 0px 0px #808080;
95
- }
103
+ }
96
104
  10% {
97
105
  transform: scale(1.3);
98
106
  box-shadow: 1px 1px 3px #808080;
@@ -116,9 +124,8 @@
116
124
  .AccentBar .tabBar {
117
125
  background: white;
118
126
  text-align: left;
119
- border:0px;
120
- padding:0px 0px 10px 0px;
121
- margin:5px;
127
+ border: 0px;
128
+ padding: 10px 0;
122
129
  }
123
130
 
124
131
  .AccentBar .tab {
@@ -126,15 +133,15 @@
126
133
  font-weight: bold;
127
134
  color: #404040;
128
135
  text-align: left;
129
- border:0px;
130
- height:30px;
131
- padding:2px 5px 2px 5px;
132
- margin:2px;
136
+ border: 0px;
137
+ height: 30px;
138
+ padding: 2px 5px 2px 5px;
139
+ margin: 2px;
133
140
  border-bottom: 4px solid #d0d0d0;
134
141
  }
135
142
 
136
143
  .AccentBar .tab:hover {
137
- cursor:pointer
144
+ cursor: pointer;
138
145
  }
139
146
 
140
147
  .AccentBar .tab-selected {
@@ -142,21 +149,21 @@
142
149
  font-weight: bold;
143
150
  color: #404040;
144
151
  text-align: left;
145
- border:0px;
146
- height:30px;
147
- padding:2px 5px 2px 5px;
148
- margin:2px;
152
+ border: 0px;
153
+ height: 30px;
154
+ padding: 2px 5px 2px 5px;
155
+ margin: 2px;
149
156
  border-bottom: 4px solid #663676;
150
157
  }
151
158
 
152
159
  .AccentBar .section-label {
160
+ grid-column: 1/-1;
153
161
  font-size: 13px;
154
162
  font-weight: bold;
155
- /* color: #A0A0A0; */
156
163
  color: #663676;
157
- margin-top:8px;
158
- margin-left:8px;
159
- margin-bottom:4px;
164
+ margin-top: 8px;
165
+ margin-left: 8px;
166
+ margin-bottom: 4px;
160
167
  }
161
168
 
162
169
  .AccentBar .replace-section {
@@ -166,4 +173,4 @@
166
173
  .AccentBar .tabArea {
167
174
  animation: 0.4s fadeIn1;
168
175
  animation-fill-mode: forwards;
169
- }
176
+ }