@pie-lib/math-input 6.5.15-next.66 → 6.6.1-next.45

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/CHANGELOG.json CHANGED
@@ -1378,5 +1378,110 @@
1378
1378
  "committerDate": "2021-03-19 14:17:26 +0200",
1379
1379
  "isTagged": true,
1380
1380
  "tag": "@pie-lib/math-input@6.5.10"
1381
+ },
1382
+ {
1383
+ "type": "fix",
1384
+ "scope": "math-toolbar",
1385
+ "subject": "Made segment, ray and line more consistent PD-1264",
1386
+ "merge": null,
1387
+ "header": "fix(math-toolbar): Made segment, ray and line more consistent PD-1264",
1388
+ "body": null,
1389
+ "footer": null,
1390
+ "notes": [],
1391
+ "hash": "1a2ad3789f728e056d950a0da336818ea0128da5",
1392
+ "gitTags": "",
1393
+ "committerDate": "2021-08-13 16:44:42 +0300",
1394
+ "isTagged": true,
1395
+ "tag": "@pie-lib/math-input@6.6.0"
1396
+ },
1397
+ {
1398
+ "type": "fix",
1399
+ "scope": "math-input",
1400
+ "subject": "Fixed custom keys behavior and changed label for (),[] and absolute value PD-1251",
1401
+ "merge": null,
1402
+ "header": "fix(math-input): Fixed custom keys behavior and changed label for (),[] and absolute value PD-1251",
1403
+ "body": null,
1404
+ "footer": null,
1405
+ "notes": [],
1406
+ "hash": "39f2ddbcf0c36c1f1f8b134d6e287f885f81fb63",
1407
+ "gitTags": " (origin/fix/math-input-behavior)",
1408
+ "committerDate": "2021-08-12 11:41:38 +0300",
1409
+ "isTagged": true,
1410
+ "tag": "@pie-lib/math-input@6.6.0"
1411
+ },
1412
+ {
1413
+ "type": "fix",
1414
+ "scope": "math-input",
1415
+ "subject": "Fixed arrows button for pits",
1416
+ "merge": null,
1417
+ "header": "fix(math-input): Fixed arrows button for pits",
1418
+ "body": null,
1419
+ "footer": null,
1420
+ "notes": [],
1421
+ "hash": "66dd6a907043ecc2dd1983e90647bab93ce6c831",
1422
+ "gitTags": " (origin/fix/math-toolbar)",
1423
+ "committerDate": "2021-09-07 12:51:16 +0300",
1424
+ "isTagged": true,
1425
+ "tag": "@pie-lib/math-input@6.6.1"
1426
+ },
1427
+ {
1428
+ "type": "fix",
1429
+ "scope": "math-input",
1430
+ "subject": "default latex when received is wrong (2)",
1431
+ "merge": null,
1432
+ "header": "fix(math-input): default latex when received is wrong (2)",
1433
+ "body": null,
1434
+ "footer": null,
1435
+ "notes": [],
1436
+ "hash": "dc71307213d50fde2014df2c561428cd6839d99e",
1437
+ "gitTags": " (origin/fix/math-input-latex)",
1438
+ "committerDate": "2021-09-02 13:17:17 +0300",
1439
+ "isTagged": true,
1440
+ "tag": "@pie-lib/math-input@6.6.1"
1441
+ },
1442
+ {
1443
+ "type": "fix",
1444
+ "scope": "math-input",
1445
+ "subject": "default latex when received is wrong",
1446
+ "merge": null,
1447
+ "header": "fix(math-input): default latex when received is wrong",
1448
+ "body": null,
1449
+ "footer": null,
1450
+ "notes": [],
1451
+ "hash": "d872f607895953a8da50e55e1363088271a81231",
1452
+ "gitTags": "",
1453
+ "committerDate": "2021-09-02 12:56:21 +0300",
1454
+ "isTagged": true,
1455
+ "tag": "@pie-lib/math-input@6.6.1"
1456
+ },
1457
+ {
1458
+ "type": "fix",
1459
+ "scope": "math-input",
1460
+ "subject": "fix e button on advanced algebra math editor PD-1280",
1461
+ "merge": null,
1462
+ "header": "fix(math-input): fix e button on advanced algebra math editor PD-1280",
1463
+ "body": null,
1464
+ "footer": null,
1465
+ "notes": [],
1466
+ "hash": "dbfb53bcfa9663d294a494028ce84f563033d6d5",
1467
+ "gitTags": "",
1468
+ "committerDate": "2021-08-31 13:16:38 +0300",
1469
+ "isTagged": true,
1470
+ "tag": "@pie-lib/math-input@6.6.1"
1471
+ },
1472
+ {
1473
+ "type": "fix",
1474
+ "scope": "math-input",
1475
+ "subject": "render measured angle as m + angle sign PD-368",
1476
+ "merge": null,
1477
+ "header": "fix(math-input): render measured angle as m + angle sign PD-368",
1478
+ "body": null,
1479
+ "footer": null,
1480
+ "notes": [],
1481
+ "hash": "670fb56c8c515cf45e57635454e01ac8290f6d42",
1482
+ "gitTags": " (origin/fix/measured-angle)",
1483
+ "committerDate": "2021-09-14 13:35:44 +0300",
1484
+ "isTagged": true,
1485
+ "tag": "@pie-lib/math-input@6.6.3"
1381
1486
  }
1382
1487
  ]
package/CHANGELOG.md CHANGED
@@ -3,461 +3,267 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [6.5.14](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.12...@pie-lib/math-input@6.5.14) (2021-06-25)
7
-
8
- **Note:** Version bump only for package @pie-lib/math-input
6
+ # [6.6.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.14...@pie-lib/math-input@6.6.0) (2021-08-30)
9
7
 
10
8
 
9
+ ### Bug Fixes
11
10
 
11
+ * **math-input:** Fixed custom keys behavior and changed label for (),[] and absolute value PD-1251 ([39f2ddb](https://github.com/pie-framework/pie-lib/commit/39f2ddb))
12
+ * **math-toolbar:** Made segment, ray and line more consistent PD-1264 ([1a2ad37](https://github.com/pie-framework/pie-lib/commit/1a2ad37))
13
+ * **math-toolbar & math-input:** render parallel sign with bigger font PD-1258 ([418fc28](https://github.com/pie-framework/pie-lib/commit/418fc28))
12
14
 
13
15
 
14
- ## [6.5.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.11...@pie-lib/math-input@6.5.12) (2021-06-25)
16
+ ### Features
15
17
 
16
- **Note:** Version bump only for package @pie-lib/math-input
18
+ * **math-input, math-toolbar:** add long division button in math editor PD-888 ([3056990](https://github.com/pie-framework/pie-lib/commit/3056990))
17
19
 
18
20
 
19
21
 
20
22
 
21
23
 
22
- ## [6.5.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.10...@pie-lib/math-input@6.5.11) (2021-04-06)
24
+ ## [6.5.14](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.12...@pie-lib/math-input@6.5.14) (2021-06-25)
23
25
 
24
26
  **Note:** Version bump only for package @pie-lib/math-input
25
27
 
28
+ ## [6.5.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.11...@pie-lib/math-input@6.5.12) (2021-06-25)
26
29
 
30
+ **Note:** Version bump only for package @pie-lib/math-input
27
31
 
32
+ ## [6.5.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.10...@pie-lib/math-input@6.5.11) (2021-04-06)
28
33
 
34
+ **Note:** Version bump only for package @pie-lib/math-input
29
35
 
30
36
  ## [6.5.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.9...@pie-lib/math-input@6.5.10) (2021-03-22)
31
37
 
32
-
33
38
  ### Bug Fixes
34
39
 
35
- * **math-toolbar:** fix double arrow button style mentioned in PD-48 ([145b060](https://github.com/pie-framework/pie-lib/commit/145b060))
36
-
37
-
38
-
39
-
40
+ - **math-toolbar:** fix double arrow button style mentioned in PD-48 ([145b060](https://github.com/pie-framework/pie-lib/commit/145b060))
40
41
 
41
42
  ## [6.5.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.8...@pie-lib/math-input@6.5.9) (2021-03-15)
42
43
 
43
44
  **Note:** Version bump only for package @pie-lib/math-input
44
45
 
45
-
46
-
47
-
48
-
49
46
  ## [6.5.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.7...@pie-lib/math-input@6.5.8) (2021-03-03)
50
47
 
51
-
52
48
  ### Bug Fixes
53
49
 
54
- * rename the 'Everything' math editor as the 'Miscellaneous' math editor ([6b5c0b3](https://github.com/pie-framework/pie-lib/commit/6b5c0b3))
55
-
56
-
57
-
58
-
50
+ - rename the 'Everything' math editor as the 'Miscellaneous' math editor ([6b5c0b3](https://github.com/pie-framework/pie-lib/commit/6b5c0b3))
59
51
 
60
52
  ## [6.5.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.6...@pie-lib/math-input@6.5.7) (2021-03-02)
61
53
 
62
-
63
54
  ### Bug Fixes
64
55
 
65
- * override math input and math toolbar style for ibx PD-774 ([0969756](https://github.com/pie-framework/pie-lib/commit/0969756))
66
-
67
-
68
-
69
-
56
+ - override math input and math toolbar style for ibx PD-774 ([0969756](https://github.com/pie-framework/pie-lib/commit/0969756))
70
57
 
71
58
  ## [6.5.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.5...@pie-lib/math-input@6.5.6) (2021-03-01)
72
59
 
73
60
  **Note:** Version bump only for package @pie-lib/math-input
74
61
 
75
-
76
-
77
-
78
-
79
62
  ## [6.5.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.4...@pie-lib/math-input@6.5.5) (2021-03-01)
80
63
 
81
-
82
64
  ### Bug Fixes
83
65
 
84
- * In some situations, math editors will not accept keyboard entry. PD-655 ([876de31](https://github.com/pie-framework/pie-lib/commit/876de31))
85
-
86
-
87
-
88
-
66
+ - In some situations, math editors will not accept keyboard entry. PD-655 ([876de31](https://github.com/pie-framework/pie-lib/commit/876de31))
89
67
 
90
68
  ## [6.5.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.3...@pie-lib/math-input@6.5.4) (2021-02-15)
91
69
 
92
-
93
70
  ### Bug Fixes
94
71
 
95
- * demo ([affa119](https://github.com/pie-framework/pie-lib/commit/affa119))
96
-
97
-
98
-
99
-
72
+ - demo ([affa119](https://github.com/pie-framework/pie-lib/commit/affa119))
100
73
 
101
74
  ## [6.5.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.1...@pie-lib/math-input@6.5.3) (2021-02-15)
102
75
 
103
76
  **Note:** Version bump only for package @pie-lib/math-input
104
77
 
105
-
106
-
107
-
108
-
109
78
  ## [6.5.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.5.0...@pie-lib/math-input@6.5.1) (2020-08-11)
110
79
 
111
80
  **Note:** Version bump only for package @pie-lib/math-input
112
81
 
113
-
114
-
115
-
116
-
117
82
  # [6.5.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.20...@pie-lib/math-input@6.5.0) (2020-06-05)
118
83
 
119
-
120
84
  ### Features
121
85
 
122
- * **math-input:** tooltip keypad support added ([7ae60a3](https://github.com/pie-framework/pie-lib/commit/7ae60a3))
123
-
124
-
125
-
126
-
86
+ - **math-input:** tooltip keypad support added ([7ae60a3](https://github.com/pie-framework/pie-lib/commit/7ae60a3))
127
87
 
128
88
  ## [6.4.20](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.19...@pie-lib/math-input@6.4.20) (2020-05-15)
129
89
 
130
-
131
90
  ### Bug Fixes
132
91
 
133
- * Remove duplicated key for Grade 8 - HS. PD-39 ([94497d0](https://github.com/pie-framework/pie-lib/commit/94497d0))
134
-
135
-
136
-
137
-
92
+ - Remove duplicated key for Grade 8 - HS. PD-39 ([94497d0](https://github.com/pie-framework/pie-lib/commit/94497d0))
138
93
 
139
94
  ## [6.4.19](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.18...@pie-lib/math-input@6.4.19) (2020-05-06)
140
95
 
141
96
  **Note:** Version bump only for package @pie-lib/math-input
142
97
 
143
-
144
-
145
-
146
-
147
98
  ## [6.4.18](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.17...@pie-lib/math-input@6.4.18) (2020-05-05)
148
99
 
149
100
  **Note:** Version bump only for package @pie-lib/math-input
150
101
 
151
-
152
-
153
-
154
-
155
102
  ## [6.4.17](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.16...@pie-lib/math-input@6.4.17) (2020-04-28)
156
103
 
157
-
158
104
  ### Bug Fixes
159
105
 
160
- * PD-69: A legacy multi-part item consisting of two equation response interactions appears with no response areas ([fff4ec7](https://github.com/pie-framework/pie-lib/commit/fff4ec7))
161
-
162
-
163
-
164
-
106
+ - PD-69: A legacy multi-part item consisting of two equation response interactions appears with no response areas ([fff4ec7](https://github.com/pie-framework/pie-lib/commit/fff4ec7))
165
107
 
166
108
  ## [6.4.16](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.15...@pie-lib/math-input@6.4.16) (2020-04-27)
167
109
 
168
110
  **Note:** Version bump only for package @pie-lib/math-input
169
111
 
170
-
171
-
172
-
173
-
174
112
  ## [6.4.15](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.14...@pie-lib/math-input@6.4.15) (2020-04-21)
175
113
 
176
-
177
114
  ### Bug Fixes
178
115
 
179
- * PD-155: The "pink" background-color set on .mq-empty is overwritten by mathquill.css with "transparent". Added "important" to prevent this. ([18e4ef7](https://github.com/pie-framework/pie-lib/commit/18e4ef7))
180
- * PD-156: Formatting issues with math editor buttons, specifically in IBX. Updated design for arrows and line, fixed fonts issue (different then expected + various function buttons are capitalized). ([61be51c](https://github.com/pie-framework/pie-lib/commit/61be51c))
181
- * PD-157: In IBX specifically, characters on math editors are too small. (because they are overwritten) ([3792162](https://github.com/pie-framework/pie-lib/commit/3792162))
182
- * PD-158: In Item Preview specifically, in IBX only, the math editor radical button and the "squared" button are not correctly labeled ([12f3cd5](https://github.com/pie-framework/pie-lib/commit/12f3cd5))
183
-
184
-
185
-
186
-
116
+ - PD-155: The "pink" background-color set on .mq-empty is overwritten by mathquill.css with "transparent". Added "important" to prevent this. ([18e4ef7](https://github.com/pie-framework/pie-lib/commit/18e4ef7))
117
+ - PD-156: Formatting issues with math editor buttons, specifically in IBX. Updated design for arrows and line, fixed fonts issue (different then expected + various function buttons are capitalized). ([61be51c](https://github.com/pie-framework/pie-lib/commit/61be51c))
118
+ - PD-157: In IBX specifically, characters on math editors are too small. (because they are overwritten) ([3792162](https://github.com/pie-framework/pie-lib/commit/3792162))
119
+ - PD-158: In Item Preview specifically, in IBX only, the math editor radical button and the "squared" button are not correctly labeled ([12f3cd5](https://github.com/pie-framework/pie-lib/commit/12f3cd5))
187
120
 
188
121
  ## [6.4.14](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.13...@pie-lib/math-input@6.4.14) (2020-04-14)
189
122
 
190
-
191
123
  ### Bug Fixes
192
124
 
193
- * **math-input:** remove extra subscript button from statistics keyset - PD-38 ([17a0659](https://github.com/pie-framework/pie-lib/commit/17a0659))
194
-
195
-
196
-
197
-
125
+ - **math-input:** remove extra subscript button from statistics keyset - PD-38 ([17a0659](https://github.com/pie-framework/pie-lib/commit/17a0659))
198
126
 
199
127
  ## [6.4.13](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.12...@pie-lib/math-input@6.4.13) (2020-04-08)
200
128
 
201
129
  **Note:** Version bump only for package @pie-lib/math-input
202
130
 
203
-
204
-
205
-
206
-
207
131
  ## [6.4.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.11...@pie-lib/math-input@6.4.12) (2020-03-31)
208
132
 
209
-
210
133
  ### Bug Fixes
211
134
 
212
- * remove require (bad es import) ([5c1e025](https://github.com/pie-framework/pie-lib/commit/5c1e025))
213
-
214
-
215
-
216
-
135
+ - remove require (bad es import) ([5c1e025](https://github.com/pie-framework/pie-lib/commit/5c1e025))
217
136
 
218
137
  ## [6.4.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.10...@pie-lib/math-input@6.4.11) (2020-03-31)
219
138
 
220
-
221
139
  ### Bug Fixes
222
140
 
223
- * rm ExportNamespaceSpecifier ([970e2ed](https://github.com/pie-framework/pie-lib/commit/970e2ed))
224
-
225
-
226
-
227
-
141
+ - rm ExportNamespaceSpecifier ([970e2ed](https://github.com/pie-framework/pie-lib/commit/970e2ed))
228
142
 
229
143
  ## [6.4.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.9...@pie-lib/math-input@6.4.10) (2020-03-31)
230
144
 
231
-
232
145
  ### Bug Fixes
233
146
 
234
- * correct module path ([b6b5b6f](https://github.com/pie-framework/pie-lib/commit/b6b5b6f))
235
-
236
-
237
-
238
-
147
+ - correct module path ([b6b5b6f](https://github.com/pie-framework/pie-lib/commit/b6b5b6f))
239
148
 
240
149
  ## [6.4.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.8...@pie-lib/math-input@6.4.9) (2020-03-31)
241
150
 
242
151
  **Note:** Version bump only for package @pie-lib/math-input
243
152
 
244
-
245
-
246
-
247
-
248
153
  ## [6.4.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.7...@pie-lib/math-input@6.4.8) (2020-03-30)
249
154
 
250
155
  **Note:** Version bump only for package @pie-lib/math-input
251
156
 
252
-
253
-
254
-
255
-
256
157
  ## [6.4.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.6...@pie-lib/math-input@6.4.7) (2020-03-30)
257
158
 
258
159
  **Note:** Version bump only for package @pie-lib/math-input
259
160
 
260
-
261
-
262
-
263
-
264
161
  ## [6.4.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.5...@pie-lib/math-input@6.4.6) (2020-03-30)
265
162
 
266
163
  **Note:** Version bump only for package @pie-lib/math-input
267
164
 
268
-
269
-
270
-
271
-
272
165
  ## [6.4.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.4...@pie-lib/math-input@6.4.5) (2020-03-30)
273
166
 
274
167
  **Note:** Version bump only for package @pie-lib/math-input
275
168
 
276
-
277
-
278
-
279
-
280
169
  ## [6.4.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.3...@pie-lib/math-input@6.4.4) (2020-03-30)
281
170
 
282
-
283
171
  ### Bug Fixes
284
172
 
285
- * correct export syntax ([db7fcc0](https://github.com/pie-framework/pie-lib/commit/db7fcc0))
286
-
287
-
288
-
289
-
173
+ - correct export syntax ([db7fcc0](https://github.com/pie-framework/pie-lib/commit/db7fcc0))
290
174
 
291
175
  ## [6.4.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.2...@pie-lib/math-input@6.4.3) (2020-03-30)
292
176
 
293
-
294
177
  ### Bug Fixes
295
178
 
296
- * correct export syntax ([10c40b1](https://github.com/pie-framework/pie-lib/commit/10c40b1))
297
-
298
-
299
-
300
-
179
+ - correct export syntax ([10c40b1](https://github.com/pie-framework/pie-lib/commit/10c40b1))
301
180
 
302
181
  ## [6.4.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.1...@pie-lib/math-input@6.4.2) (2020-03-30)
303
182
 
304
-
305
183
  ### Bug Fixes
306
184
 
307
- * add module prop to package.json ([df40020](https://github.com/pie-framework/pie-lib/commit/df40020))
308
-
309
-
310
-
311
-
185
+ - add module prop to package.json ([df40020](https://github.com/pie-framework/pie-lib/commit/df40020))
312
186
 
313
187
  ## [6.4.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.4.0...@pie-lib/math-input@6.4.1) (2020-03-18)
314
188
 
315
189
  **Note:** Version bump only for package @pie-lib/math-input
316
190
 
317
-
318
-
319
-
320
-
321
191
  # [6.4.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.11...@pie-lib/math-input@6.4.0) (2020-03-06)
322
192
 
323
-
324
193
  ### Bug Fixes
325
194
 
326
- * **math-input:** fix Static rootblock logic, failsafe for finding math block id ch3518 ([08df6db](https://github.com/pie-framework/pie-lib/commit/08df6db))
327
-
195
+ - **math-input:** fix Static rootblock logic, failsafe for finding math block id ch3518 ([08df6db](https://github.com/pie-framework/pie-lib/commit/08df6db))
328
196
 
329
197
  ### Features
330
198
 
331
- * bump @pie-framework/mathquill@^1.0.0 ([d43c5c5](https://github.com/pie-framework/pie-lib/commit/d43c5c5))
332
- * bump @pie-framework/mathquill@^1.1.0 ([31dbed8](https://github.com/pie-framework/pie-lib/commit/31dbed8))
333
-
334
-
335
-
336
-
199
+ - bump @pie-framework/mathquill@^1.0.0 ([d43c5c5](https://github.com/pie-framework/pie-lib/commit/d43c5c5))
200
+ - bump @pie-framework/mathquill@^1.1.0 ([31dbed8](https://github.com/pie-framework/pie-lib/commit/31dbed8))
337
201
 
338
202
  ## [6.3.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.10...@pie-lib/math-input@6.3.11) (2020-02-11)
339
203
 
340
204
  **Note:** Version bump only for package @pie-lib/math-input
341
205
 
342
-
343
-
344
-
345
-
346
206
  ## [6.3.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.9...@pie-lib/math-input@6.3.10) (2020-02-05)
347
207
 
348
-
349
208
  ### Bug Fixes
350
209
 
351
- * 6287: Setting equation editor as a string (eg: '6') works as well (In OT, a math editor for an Equation Response item is missing a critical button as well as many other expected buttons) ([a21f04b](https://github.com/pie-framework/pie-lib/commit/a21f04b))
352
-
353
-
354
-
355
-
210
+ - 6287: Setting equation editor as a string (eg: '6') works as well (In OT, a math editor for an Equation Response item is missing a critical button as well as many other expected buttons) ([a21f04b](https://github.com/pie-framework/pie-lib/commit/a21f04b))
356
211
 
357
212
  ## [6.3.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.8...@pie-lib/math-input@6.3.9) (2020-01-27)
358
213
 
359
-
360
214
  ### Bug Fixes
361
215
 
362
- * 6264: Math editor in OT has button labels that are very small and impact legibility and usability (don't use rem to determine font size, use percentage instead) ([94f9d3b](https://github.com/pie-framework/pie-lib/commit/94f9d3b))
363
- * 6264: Math editor in OT has button labels that are very small and impact legibility and usability (don't use rem to determine font size) ([da50c12](https://github.com/pie-framework/pie-lib/commit/da50c12))
364
-
365
-
366
-
367
-
216
+ - 6264: Math editor in OT has button labels that are very small and impact legibility and usability (don't use rem to determine font size, use percentage instead) ([94f9d3b](https://github.com/pie-framework/pie-lib/commit/94f9d3b))
217
+ - 6264: Math editor in OT has button labels that are very small and impact legibility and usability (don't use rem to determine font size) ([da50c12](https://github.com/pie-framework/pie-lib/commit/da50c12))
368
218
 
369
219
  ## [6.3.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.7...@pie-lib/math-input@6.3.8) (2019-12-19)
370
220
 
371
-
372
221
  ### Bug Fixes
373
222
 
374
- * rm bad import ([fe6673d](https://github.com/pie-framework/pie-lib/commit/fe6673d))
375
-
376
-
377
-
378
-
223
+ - rm bad import ([fe6673d](https://github.com/pie-framework/pie-lib/commit/fe6673d))
379
224
 
380
225
  ## [6.3.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.6...@pie-lib/math-input@6.3.7) (2019-12-18)
381
226
 
382
-
383
227
  ### Bug Fixes
384
228
 
385
- * do not add keys if they already exist in keyset [ch5653] ([fbccf3b](https://github.com/pie-framework/pie-lib/commit/fbccf3b))
386
-
387
-
388
-
389
-
229
+ - do not add keys if they already exist in keyset [ch5653](<[fbccf3b](https://github.com/pie-framework/pie-lib/commit/fbccf3b)>)
390
230
 
391
231
  ## [6.3.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.5...@pie-lib/math-input@6.3.6) (2019-11-05)
392
232
 
393
-
394
233
  ### Bug Fixes
395
234
 
396
- * handle latex parsing errors PIE-145 ([99905ea](https://github.com/pie-framework/pie-lib/commit/99905ea))
397
-
398
-
399
-
400
-
235
+ - handle latex parsing errors PIE-145 ([99905ea](https://github.com/pie-framework/pie-lib/commit/99905ea))
401
236
 
402
237
  ## [6.3.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.4...@pie-lib/math-input@6.3.5) (2019-08-21)
403
238
 
404
239
  **Note:** Version bump only for package @pie-lib/math-input
405
240
 
406
-
407
-
408
-
409
-
410
241
  ## [6.3.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.3...@pie-lib/math-input@6.3.4) (2019-07-08)
411
242
 
412
243
  **Note:** Version bump only for package @pie-lib/math-input
413
244
 
414
-
415
-
416
-
417
-
418
245
  ## [6.3.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.2...@pie-lib/math-input@6.3.3) (2019-07-05)
419
246
 
420
247
  **Note:** Version bump only for package @pie-lib/math-input
421
248
 
422
-
423
-
424
-
425
-
426
249
  ## [6.3.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.1...@pie-lib/math-input@6.3.2) (2019-07-02)
427
250
 
428
251
  **Note:** Version bump only for package @pie-lib/math-input
429
252
 
430
-
431
-
432
-
433
-
434
253
  ## [6.3.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.3.0...@pie-lib/math-input@6.3.1) (2019-06-17)
435
254
 
436
255
  **Note:** Version bump only for package @pie-lib/math-input
437
256
 
438
-
439
-
440
-
441
-
442
257
  # [6.3.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.2.5...@pie-lib/math-input@6.3.0) (2019-06-12)
443
258
 
444
-
445
259
  ### Features
446
260
 
447
- * version bumps ([23eb54f](https://github.com/pie-framework/pie-lib/commit/23eb54f))
448
-
449
-
450
-
451
-
261
+ - version bumps ([23eb54f](https://github.com/pie-framework/pie-lib/commit/23eb54f))
452
262
 
453
263
  ## [6.2.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.2.4...@pie-lib/math-input@6.2.5) (2019-06-05)
454
264
 
455
265
  **Note:** Version bump only for package @pie-lib/math-input
456
266
 
457
-
458
-
459
-
460
-
461
267
  ## [6.2.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-input@6.2.3...@pie-lib/math-input@6.2.4) (2019-05-14)
462
268
 
463
269
  **Note:** Version bump only for package @pie-lib/math-input
@@ -94,6 +94,9 @@ var LatexButton = (0, _styles.withStyles)(function (theme) {
94
94
  marginTop: '0 !important',
95
95
  borderTop: '2px solid black',
96
96
  '&.mq-arrow-both': {
97
+ '& *': {
98
+ lineHeight: '1 !important'
99
+ },
97
100
  '&:before': {
98
101
  fontSize: '80%',
99
102
  left: 'calc(-13%)',
@@ -147,6 +150,13 @@ var LatexButton = (0, _styles.withStyles)(function (theme) {
147
150
  left: '-6px',
148
151
  fontSize: '80% !important',
149
152
  top: '-3px'
153
+ },
154
+ '& .mq-longdiv-inner': {
155
+ borderTop: '1px solid !important',
156
+ paddingTop: '1.5px !important'
157
+ },
158
+ '& .mq-parallelogram': {
159
+ lineHeight: 0.85
150
160
  }
151
161
  },
152
162
  parallelButton: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/keypad/index.jsx"],"names":["log","LatexButton","theme","root","textTransform","padding","margin","fontSize","latexButton","pointerEvents","transform","marginBottom","backgroundColor","palette","secondary","main","borderTop","width","marginTop","left","top","right","minHeight","border","display","parallelButton","fontStyle","props","buttonClass","latex","classes","mqClassName","className","onClick","KeyPad","key","onPress","base","extras","transposed","_","flatten","noDecimal","write","label","baseSet","additionalKeys","onFocus","allKeys","flowKeys","shift","length","style","gridTemplateColumns","Math","floor","keys","map","k","index","buttonClick","bind","common","labelButton","category","comma","dot","disabled","keyIsNotAllowed","command","Icon","icon","React","Component","PropTypes","object","isRequired","string","array","func","bool","styles","fontFamily","gridTemplateRows","gridRowGap","gridColumnGap","gridAutoFlow","holder","position","height","borderRadius","spacing","unit","minWidth","primary","light","operators","comparison","green","lineHeight"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,4BAAN,CAAZ;AAEA,IAAMC,WAAW,GAAG,wBAAW,UAAAC,KAAK;AAAA,SAAK;AACvCC,IAAAA,IAAI,EAAE;AACJC,MAAAA,aAAa,EAAE,MADX;AAEJC,MAAAA,OAAO,EAAE,CAFL;AAGJC,MAAAA,MAAM,EAAE,CAHJ;AAIJC,MAAAA,QAAQ,EAAE;AAJN,KADiC;AAOvCC,IAAAA,WAAW,EAAE;AACXC,MAAAA,aAAa,EAAE,MADJ;AAEXL,MAAAA,aAAa,EAAE,iBAFJ;AAGX,qCAA+B;AAC7BM,QAAAA,SAA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,CAAR,EAAoB,GAApB;AADR;AAFD,KA5CW;AAkDvBjC,IAAAA,KAAK,EAAE;AACL1D,MAAAA,QAAQ,EAAE,iBADL;AAEL4F,MAAAA,UAAU,EAAE;AAFP,KAlDgB;AAsDvBjC,IAAAA,GAAG,EAAE;AACH3D,MAAAA,QAAQ,EAAE,iBADP;AAEH4F,MAAAA,UAAU,EAAE;AAFT,KAtDkB;AA0DvB5B,IAAAA,IAAI,EAAE;AACJkB,MAAAA,MAAM,EAAE;AADJ;AA1DiB,GAAL;AAAA,CAApB;;eA+De,wBAAWR,MAAX,EAAmB/C,MAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@material-ui/core/Button';\nimport IconButton from '@material-ui/core/IconButton';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport { lighten, fade } from '@material-ui/core/styles/colorManipulator';\nimport green from '@material-ui/core/colors/green';\nimport { sortKeys } from './keys-layout';\nimport * as mq from '../mq';\nimport { baseSet } from '../keys';\nimport debug from 'debug';\nimport _ from 'lodash';\n\nconst log = debug('pie-lib:math-inline:keypad');\n\nconst LatexButton = withStyles(theme => ({\n root: {\n textTransform: 'none',\n padding: 0,\n margin: 0,\n fontSize: '110% !important'\n },\n latexButton: {\n pointerEvents: 'none',\n textTransform: 'none !important',\n '& .mq-scaled.mq-sqrt-prefix': {\n transform: 'scale(1, 0.9) !important'\n },\n '& .mq-sup-only .mq-sup': {\n marginBottom: '0.9px !important'\n },\n '& .mq-empty': {\n backgroundColor: `${fade(theme.palette.secondary.main, 0.4)} !important`\n },\n '& .mq-overline .mq-overline-inner': {\n borderTop: '2px solid black'\n },\n '& .mq-overarrow': {\n width: '30px',\n marginTop: '0 !important',\n borderTop: '2px solid black',\n '&.mq-arrow-both': {\n '&:before': {\n fontSize: '80%',\n left: 'calc(-13%)',\n top: '-0.25em'\n },\n '&:after': {\n fontSize: '80% !important',\n right: 'calc(-13%) !important',\n top: '-1.5em'\n },\n '&.mq-empty:before': {\n fontSize: '80%',\n left: 'calc(-13%)',\n top: '-0.25em'\n },\n '&.mq-empty:after': {\n fontSize: '80%',\n right: 'calc(-13%)',\n top: '-0.25em'\n },\n '&.mq-empty': {\n minHeight: '1.4em'\n }\n },\n '&.mq-arrow-right:before': {\n fontSize: '80%',\n right: 'calc(-13%)',\n top: '-0.25em'\n },\n '& .mq-overarrow-inner': {\n border: 'none !important'\n },\n '& .mq-overarrow-inner .mq-overarrow-inner-right': {\n display: 'none !important'\n }\n },\n '& .mq-root-block': {\n padding: '5px'\n },\n '& .mq-overarrow.mq-arrow-both.mq-empty:after': {\n right: '-6px',\n fontSize: '80% !important',\n top: '-3px'\n },\n '& .mq-overarrow.mq-arrow-right.mq-empty:before': {\n right: '-5px',\n fontSize: '80% !important',\n top: '-3px'\n },\n '& .mq-overarrow.mq-arrow-both.mq-empty:before': {\n left: '-6px',\n fontSize: '80% !important',\n top: '-3px'\n }\n },\n parallelButton: {\n fontStyle: 'italic'\n }\n}))(props => {\n let buttonClass;\n\n if (props.latex === '\\\\parallel') {\n buttonClass = classNames(\n props.classes.latexButton,\n props.mqClassName,\n props.classes.parallelButton\n );\n } else {\n buttonClass = classNames(props.classes.latexButton, props.mqClassName);\n }\n return (\n <Button className={classNames(props.classes.root, props.className)} onClick={props.onClick}>\n <mq.Static className={buttonClass} latex={props.latex} />\n </Button>\n );\n});\n\nexport class KeyPad extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n baseSet: PropTypes.array,\n additionalKeys: PropTypes.array,\n onPress: PropTypes.func.isRequired,\n onFocus: PropTypes.func,\n noDecimal: PropTypes.bool\n };\n static defaultProps = {\n baseSet: baseSet,\n noDecimal: false\n };\n\n buttonClick = key => {\n log('[buttonClick]', key);\n const { onPress } = this.props;\n onPress(key);\n };\n\n flowKeys = (base, extras) => {\n const transposed = [...sortKeys(base), ...sortKeys(extras)];\n return _.flatten(transposed);\n };\n\n keyIsNotAllowed = key => {\n const { noDecimal } = this.props;\n\n if (\n ((key.write === '.' && key.label === '.') || (key.write === ',' && key.label === ',')) &&\n noDecimal\n ) {\n return true;\n }\n\n return false;\n };\n\n render() {\n const { classes, className, baseSet, additionalKeys, onFocus } = this.props;\n\n const allKeys = this.flowKeys(baseSet, additionalKeys || []); //, ...sortKeys(additionalKeys)];\n\n const shift = allKeys.length % 5 ? 1 : 0;\n const style = {\n gridTemplateColumns: `repeat(${Math.floor(allKeys.length / 5) +\n shift}, minmax(min-content, 150px))`\n };\n return (\n <div className={classNames(classes.keys, className)} style={style} onFocus={onFocus}>\n {allKeys.map((k, index) => {\n const onClick = this.buttonClick.bind(this, k);\n\n if (!k) {\n return <span key={`empty-${index}`} />;\n }\n\n const common = {\n onClick,\n className: classNames(\n classes.labelButton,\n classes[k.category],\n k.label === ',' && classes.comma,\n k.label === '.' && classes.dot\n ),\n disabled: this.keyIsNotAllowed(k),\n key: `${k.label || k.latex || k.command}-${index}`\n };\n\n if (k.latex) {\n return <LatexButton latex={k.latex} {...common} className={classes.latexButton} />;\n }\n\n if (k.label) {\n return <Button {...common}>{k.label}</Button>;\n } else {\n const Icon = k.icon ? k.icon : 'div';\n\n return (\n <IconButton tabIndex={'-1'} {...common}>\n <Icon className={classes.icon} />\n </IconButton>\n );\n }\n })}\n </div>\n );\n }\n}\n\nconst styles = theme => ({\n keys: {\n '& *': {\n fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important'\n },\n width: '100%',\n display: 'grid',\n gridTemplateRows: 'repeat(5, minmax(40px, 60px))',\n gridRowGap: '0px',\n gridColumnGap: '0px',\n gridAutoFlow: 'column'\n },\n holder: {\n position: 'relative',\n width: '100%',\n height: '100%',\n backgroundColor: '#cef',\n borderRadius: 0,\n padding: `${theme.spacing.unit}px 0 ${theme.spacing.unit}px 0`\n },\n labelButton: {\n minWidth: 'auto',\n fontSize: '140% !important',\n backgroundColor: lighten(theme.palette.primary.light, 0.5),\n '&:hover': {\n backgroundColor: lighten(theme.palette.primary.light, 0.7)\n },\n borderRadius: 0\n },\n latexButton: {\n minWidth: 'auto',\n borderRadius: 0,\n backgroundColor: lighten(theme.palette.primary.light, 0.5),\n '&:hover': {\n backgroundColor: lighten(theme.palette.primary.light, 0.7)\n }\n },\n base: {},\n operators: {\n backgroundColor: lighten(theme.palette.secondary.light, 0.5),\n '&:hover': {\n backgroundColor: lighten(theme.palette.secondary.light, 0.7)\n }\n },\n comparison: {\n backgroundColor: lighten(green[500], 0.5),\n '&:hover': {\n backgroundColor: lighten(green[500], 0.7)\n }\n },\n comma: {\n fontSize: '200% !important',\n lineHeight: '100%'\n },\n dot: {\n fontSize: '200% !important',\n lineHeight: '100%'\n },\n icon: {\n height: '30px'\n }\n});\n\nexport default withStyles(styles)(KeyPad);\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/keypad/index.jsx"],"names":["log","LatexButton","theme","root","textTransform","padding","margin","fontSize","latexButton","pointerEvents","transform","marginBottom","backgroundColor","palette","secondary","main","borderTop","width","marginTop","lineHeight","left","top","right","minHeight","border","display","paddingTop","parallelButton","fontStyle","props","buttonClass","latex","classes","mqClassName","className","onClick","KeyPad","key","onPress","base","extras","transposed","_","flatten","noDecimal","write","label","baseSet","additionalKeys","onFocus","allKeys","flowKeys","shift","length","style","gridTemplateColumns","Math","floor","keys","map","k","index","buttonClick","bind","common","labelButton","category","comma","dot","disabled","keyIsNotAllowed","command","Icon","icon","React","Component","PropTypes","object","isRequired","string","array","func","bool","styles","fontFamily","gridTemplateRows","gridRowGap","gridColumnGap","gridAutoFlow","holder","position","height","borderRadius","spacing","unit","minWidth","primary","light","operators","comparison","green"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,4BAAN,CAAZ;AAEA,IAAMC,WAAW,GAAG,wBAAW,UAAAC,KAAK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F,OAAd,CAAsBC,KAA9B,EAAqC,GAArC;AADR;AAJA,KA7BU;AAqCvB1D,IAAAA,IAAI,EAAE,EArCiB;AAsCvB2D,IAAAA,SAAS,EAAE;AACTtF,MAAAA,eAAe,EAAE,+BAAQV,KAAK,CAACW,OAAN,CAAcC,SAAd,CAAwBmF,KAAhC,EAAuC,GAAvC,CADR;AAET,iBAAW;AACTrF,QAAAA,eAAe,EAAE,+BAAQV,KAAK,CAACW,OAAN,CAAcC,SAAd,CAAwBmF,KAAhC,EAAuC,GAAvC;AADR;AAFF,KAtCY;AA4CvBE,IAAAA,UAAU,EAAE;AACVvF,MAAAA,eAAe,EAAE,+BAAQwF,kBAAM,GAAN,CAAR,EAAoB,GAApB,CADP;AAEV,iBAAW;AACTxF,QAAAA,eAAe,EAAE,+BAAQwF,kBAAM,GAAN,CAAR,EAAoB,GAApB;AADR;AAFD,KA5CW;AAkDvBjC,IAAAA,KAAK,EAAE;AACL5D,MAAAA,QAAQ,EAAE,iBADL;AAELY,MAAAA,UAAU,EAAE;AAFP,KAlDgB;AAsDvBiD,IAAAA,GAAG,EAAE;AACH7D,MAAAA,QAAQ,EAAE,iBADP;AAEHY,MAAAA,UAAU,EAAE;AAFT,KAtDkB;AA0DvBsD,IAAAA,IAAI,EAAE;AACJkB,MAAAA,MAAM,EAAE;AADJ;AA1DiB,GAAL;AAAA,CAApB;;eA+De,wBAAWR,MAAX,EAAmB/C,MAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@material-ui/core/Button';\nimport IconButton from '@material-ui/core/IconButton';\nimport { withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport { lighten, fade } from '@material-ui/core/styles/colorManipulator';\nimport green from '@material-ui/core/colors/green';\nimport { sortKeys } from './keys-layout';\nimport * as mq from '../mq';\nimport { baseSet } from '../keys';\nimport debug from 'debug';\nimport _ from 'lodash';\n\nconst log = debug('pie-lib:math-inline:keypad');\n\nconst LatexButton = withStyles(theme => ({\n root: {\n textTransform: 'none',\n padding: 0,\n margin: 0,\n fontSize: '110% !important'\n },\n latexButton: {\n pointerEvents: 'none',\n textTransform: 'none !important',\n '& .mq-scaled.mq-sqrt-prefix': {\n transform: 'scale(1, 0.9) !important'\n },\n '& .mq-sup-only .mq-sup': {\n marginBottom: '0.9px !important'\n },\n '& .mq-empty': {\n backgroundColor: `${fade(theme.palette.secondary.main, 0.4)} !important`\n },\n '& .mq-overline .mq-overline-inner': {\n borderTop: '2px solid black'\n },\n '& .mq-overarrow': {\n width: '30px',\n marginTop: '0 !important',\n borderTop: '2px solid black',\n '&.mq-arrow-both': {\n '& *': {\n lineHeight: '1 !important'\n },\n '&:before': {\n fontSize: '80%',\n left: 'calc(-13%)',\n top: '-0.25em'\n },\n '&:after': {\n fontSize: '80% !important',\n right: 'calc(-13%) !important',\n top: '-1.5em'\n },\n '&.mq-empty:before': {\n fontSize: '80%',\n left: 'calc(-13%)',\n top: '-0.25em'\n },\n '&.mq-empty:after': {\n fontSize: '80%',\n right: 'calc(-13%)',\n top: '-0.25em'\n },\n '&.mq-empty': {\n minHeight: '1.4em'\n }\n },\n '&.mq-arrow-right:before': {\n fontSize: '80%',\n right: 'calc(-13%)',\n top: '-0.25em'\n },\n '& .mq-overarrow-inner': {\n border: 'none !important'\n },\n '& .mq-overarrow-inner .mq-overarrow-inner-right': {\n display: 'none !important'\n }\n },\n '& .mq-root-block': {\n padding: '5px'\n },\n '& .mq-overarrow.mq-arrow-both.mq-empty:after': {\n right: '-6px',\n fontSize: '80% !important',\n top: '-3px'\n },\n '& .mq-overarrow.mq-arrow-right.mq-empty:before': {\n right: '-5px',\n fontSize: '80% !important',\n top: '-3px'\n },\n '& .mq-overarrow.mq-arrow-both.mq-empty:before': {\n left: '-6px',\n fontSize: '80% !important',\n top: '-3px'\n },\n '& .mq-longdiv-inner': {\n borderTop: '1px solid !important',\n paddingTop: '1.5px !important'\n },\n '& .mq-parallelogram': {\n lineHeight: 0.85\n }\n },\n parallelButton: {\n fontStyle: 'italic'\n }\n}))(props => {\n let buttonClass;\n\n if (props.latex === '\\\\parallel') {\n buttonClass = classNames(\n props.classes.latexButton,\n props.mqClassName,\n props.classes.parallelButton\n );\n } else {\n buttonClass = classNames(props.classes.latexButton, props.mqClassName);\n }\n return (\n <Button className={classNames(props.classes.root, props.className)} onClick={props.onClick}>\n <mq.Static className={buttonClass} latex={props.latex} />\n </Button>\n );\n});\n\nexport class KeyPad extends React.Component {\n static propTypes = {\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n baseSet: PropTypes.array,\n additionalKeys: PropTypes.array,\n onPress: PropTypes.func.isRequired,\n onFocus: PropTypes.func,\n noDecimal: PropTypes.bool\n };\n static defaultProps = {\n baseSet: baseSet,\n noDecimal: false\n };\n\n buttonClick = key => {\n log('[buttonClick]', key);\n const { onPress } = this.props;\n onPress(key);\n };\n\n flowKeys = (base, extras) => {\n const transposed = [...sortKeys(base), ...sortKeys(extras)];\n return _.flatten(transposed);\n };\n\n keyIsNotAllowed = key => {\n const { noDecimal } = this.props;\n\n if (\n ((key.write === '.' && key.label === '.') || (key.write === ',' && key.label === ',')) &&\n noDecimal\n ) {\n return true;\n }\n\n return false;\n };\n\n render() {\n const { classes, className, baseSet, additionalKeys, onFocus } = this.props;\n\n const allKeys = this.flowKeys(baseSet, additionalKeys || []); //, ...sortKeys(additionalKeys)];\n\n const shift = allKeys.length % 5 ? 1 : 0;\n const style = {\n gridTemplateColumns: `repeat(${Math.floor(allKeys.length / 5) +\n shift}, minmax(min-content, 150px))`\n };\n return (\n <div className={classNames(classes.keys, className)} style={style} onFocus={onFocus}>\n {allKeys.map((k, index) => {\n const onClick = this.buttonClick.bind(this, k);\n\n if (!k) {\n return <span key={`empty-${index}`} />;\n }\n\n const common = {\n onClick,\n className: classNames(\n classes.labelButton,\n classes[k.category],\n k.label === ',' && classes.comma,\n k.label === '.' && classes.dot\n ),\n disabled: this.keyIsNotAllowed(k),\n key: `${k.label || k.latex || k.command}-${index}`\n };\n\n if (k.latex) {\n return <LatexButton latex={k.latex} {...common} className={classes.latexButton} />;\n }\n\n if (k.label) {\n return <Button {...common}>{k.label}</Button>;\n } else {\n const Icon = k.icon ? k.icon : 'div';\n\n return (\n <IconButton tabIndex={'-1'} {...common}>\n <Icon className={classes.icon} />\n </IconButton>\n );\n }\n })}\n </div>\n );\n }\n}\n\nconst styles = theme => ({\n keys: {\n '& *': {\n fontFamily: 'Roboto, Helvetica, Arial, sans-serif !important'\n },\n width: '100%',\n display: 'grid',\n gridTemplateRows: 'repeat(5, minmax(40px, 60px))',\n gridRowGap: '0px',\n gridColumnGap: '0px',\n gridAutoFlow: 'column'\n },\n holder: {\n position: 'relative',\n width: '100%',\n height: '100%',\n backgroundColor: '#cef',\n borderRadius: 0,\n padding: `${theme.spacing.unit}px 0 ${theme.spacing.unit}px 0`\n },\n labelButton: {\n minWidth: 'auto',\n fontSize: '140% !important',\n backgroundColor: lighten(theme.palette.primary.light, 0.5),\n '&:hover': {\n backgroundColor: lighten(theme.palette.primary.light, 0.7)\n },\n borderRadius: 0\n },\n latexButton: {\n minWidth: 'auto',\n borderRadius: 0,\n backgroundColor: lighten(theme.palette.primary.light, 0.5),\n '&:hover': {\n backgroundColor: lighten(theme.palette.primary.light, 0.7)\n }\n },\n base: {},\n operators: {\n backgroundColor: lighten(theme.palette.secondary.light, 0.5),\n '&:hover': {\n backgroundColor: lighten(theme.palette.secondary.light, 0.7)\n }\n },\n comparison: {\n backgroundColor: lighten(green[500], 0.5),\n '&:hover': {\n backgroundColor: lighten(green[500], 0.7)\n }\n },\n comma: {\n fontSize: '200% !important',\n lineHeight: '100%'\n },\n dot: {\n fontSize: '200% !important',\n lineHeight: '100%'\n },\n icon: {\n height: '30px'\n }\n});\n\nexport default withStyles(styles)(KeyPad);\n"],"file":"index.js"}
@@ -20,6 +20,7 @@ var eulers = set({
20
20
  name: 'Eulers',
21
21
  label: 'e',
22
22
  latex: 'e',
23
+ command: 'e',
23
24
  category: 'constants'
24
25
  });
25
26
  exports.eulers = eulers;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/keys/constants.js"],"names":["set","pi","name","label","latex","command","category","eulers"],"mappings":";;;;;;;AAAA;;AAEA,IAAMA,GAAG,GAAG,kBAAM,WAAN,CAAZ;AAEO,IAAMC,EAAE,GAAGD,GAAG,CAAC;AACpBE,EAAAA,IAAI,EAAE,IADc;AAEpBC,EAAAA,KAAK,EAAE,GAFa;AAGpBC,EAAAA,KAAK,EAAE,MAHa;AAIpBC,EAAAA,OAAO,EAAE,MAJW;AAKpBC,EAAAA,QAAQ,EAAE;AALU,CAAD,CAAd;;AAQA,IAAMC,MAAM,GAAGP,GAAG,CAAC;AACxBE,EAAAA,IAAI,EAAE,QADkB;AAExBC,EAAAA,KAAK,EAAE,GAFiB;AAGxBC,EAAAA,KAAK,EAAE,GAHiB;AAIxBE,EAAAA,QAAQ,EAAE;AAJc,CAAD,CAAlB","sourcesContent":["import { mkSet } from './utils';\n\nconst set = mkSet('constants');\n\nexport const pi = set({\n name: 'Pi',\n label: 'π',\n latex: '\\\\pi',\n command: '\\\\pi',\n category: 'constants'\n});\n\nexport const eulers = set({\n name: 'Eulers',\n label: 'e',\n latex: 'e',\n category: 'constants'\n});\n"],"file":"constants.js"}
1
+ {"version":3,"sources":["../../src/keys/constants.js"],"names":["set","pi","name","label","latex","command","category","eulers"],"mappings":";;;;;;;AAAA;;AAEA,IAAMA,GAAG,GAAG,kBAAM,WAAN,CAAZ;AAEO,IAAMC,EAAE,GAAGD,GAAG,CAAC;AACpBE,EAAAA,IAAI,EAAE,IADc;AAEpBC,EAAAA,KAAK,EAAE,GAFa;AAGpBC,EAAAA,KAAK,EAAE,MAHa;AAIpBC,EAAAA,OAAO,EAAE,MAJW;AAKpBC,EAAAA,QAAQ,EAAE;AALU,CAAD,CAAd;;AAQA,IAAMC,MAAM,GAAGP,GAAG,CAAC;AACxBE,EAAAA,IAAI,EAAE,QADkB;AAExBC,EAAAA,KAAK,EAAE,GAFiB;AAGxBC,EAAAA,KAAK,EAAE,GAHiB;AAIxBC,EAAAA,OAAO,EAAE,GAJe;AAKxBC,EAAAA,QAAQ,EAAE;AALc,CAAD,CAAlB","sourcesContent":["import { mkSet } from './utils';\n\nconst set = mkSet('constants');\n\nexport const pi = set({\n name: 'Pi',\n label: 'π',\n latex: '\\\\pi',\n command: '\\\\pi',\n category: 'constants'\n});\n\nexport const eulers = set({\n name: 'Eulers',\n label: 'e',\n latex: 'e',\n command: 'e',\n category: 'constants'\n});\n"],"file":"constants.js"}
@@ -76,7 +76,7 @@ exports.overArc = overArc;
76
76
  var measureOfAngle = set({
77
77
  name: 'Measure Of Angle',
78
78
  latex: '\\measuredangle',
79
- command: '\\measuredangle'
79
+ command: ['m', '\\angle']
80
80
  });
81
81
  exports.measureOfAngle = measureOfAngle;
82
82
  var triangle = set({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/keys/geometry.js"],"names":["set","o","category","overline","name","latex","command","overRightArrow","overLeftRightArrow","symbol","segment","write","label","parallel","notParallel","perpindicular","angle","overArc","measureOfAngle","triangle","parallelogram","circledDot","degree","similarTo","congruentTo","notCongruentTo","primeArcminute","doublePrimeArcSecond"],"mappings":";;;;;;;;;;;;;AAAA,IAAMA,GAAG,GAAG,SAANA,GAAM,CAAAC,CAAC;AAAA,2BAAUA,CAAV;AAAaC,IAAAA,QAAQ,EAAE;AAAvB;AAAA,CAAb;;AAEO,IAAMC,QAAQ,GAAGH,GAAG,CAAC;AAC1BI,EAAAA,IAAI,EAAE,UADoB;AAE1BC,EAAAA,KAAK,EAAE,cAFmB;AAG1BC,EAAAA,OAAO,EAAE;AAHiB,CAAD,CAApB;;AAMA,IAAMC,cAAc,GAAGP,GAAG,CAAC;AAChCI,EAAAA,IAAI,EAAE,UAD0B;AAEhCC,EAAAA,KAAK,EAAE,oBAFyB;AAGhCC,EAAAA,OAAO,EAAE;AAHuB,CAAD,CAA1B;;AAMA,IAAME,kBAAkB,GAAGR,GAAG,CAAC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OAD0B;AAEhCQ,EAAAA,KAAK,EAAE,KAFyB;AAGhC;AACAP,EAAAA,KAAK,EAAE,GAJyB;AAKhC;AACAM,EAAAA,KAAK,EAAE;AANyB,CAAD,CAA1B;;AAQA,IAAMgB,oBAAoB,GAAG3B,GAAG,CAAC;AACtCI,EAAAA,IAAI,EAAE,wBADgC;AAEtCC,EAAAA,KAAK,EAAE,GAF+B;AAGtCM,EAAAA,KAAK,EAAE;AAH+B,CAAD,CAAhC","sourcesContent":["const set = o => ({ ...o, category: 'geometry' });\n\nexport const overline = set({\n name: 'Overline',\n latex: '\\\\overline{}',\n command: '\\\\overline'\n});\n\nexport const overRightArrow = set({\n name: 'Overline',\n latex: '\\\\overrightarrow{}',\n command: '\\\\overrightarrow'\n});\n\nexport const overLeftRightArrow = set({\n name: 'Overline',\n latex: '\\\\overleftrightarrow{}',\n symbol: 'AB',\n command: '\\\\overleftrightarrow'\n});\n\nexport const segment = set({\n name: 'Segment',\n latex: '\\\\overleftrightarrow{AB}',\n write: '\\\\overleftrightarrow{AB}',\n label: 'AB'\n});\n\nexport const parallel = set({\n name: 'Parallel',\n latex: '\\\\parallel',\n command: '\\\\parallel'\n});\n\nexport const notParallel = set({\n name: 'Not Parallel',\n latex: '\\\\nparallel',\n command: '\\\\nparallel'\n});\n\nexport const perpindicular = set({\n name: 'Perpendicular',\n latex: '\\\\perp',\n command: '\\\\perpendicular'\n});\n\nexport const angle = set({\n name: 'Angle',\n latex: '\\\\angle',\n command: '\\\\angle'\n});\nexport const overArc = set({\n name: 'Over arc',\n latex: '\\\\overarc{}',\n command: '\\\\overarc'\n});\nexport const measureOfAngle = set({\n name: 'Measure Of Angle',\n latex: '\\\\measuredangle',\n command: '\\\\measuredangle'\n});\n\nexport const triangle = set({\n name: 'Triangle',\n latex: '\\\\triangle',\n command: '\\\\triangle'\n});\n\nexport const parallelogram = set({\n name: 'Parallelogram',\n latex: '\\\\parallelogram',\n command: '\\\\parallelogram'\n});\n\nexport const circledDot = set({\n name: 'Circled Dot',\n latex: '\\\\odot',\n command: '\\\\odot'\n});\n\nexport const degree = set({\n name: 'Degree',\n latex: '\\\\degree',\n command: '\\\\degree'\n});\n\nexport const similarTo = set({\n name: 'Similar To',\n command: '\\\\sim',\n latex: '\\\\sim'\n});\n\nexport const congruentTo = set({\n name: 'Congruent To',\n command: '\\\\cong',\n latex: '\\\\cong'\n});\nexport const notCongruentTo = set({\n name: 'Not Congruent To',\n command: '\\\\ncong',\n latex: '\\\\ncong'\n});\n\nexport const primeArcminute = set({\n name: 'Prime',\n label: 'pam',\n // eslint-disable-next-line\n latex: \"'\",\n // eslint-disable-next-line\n write: \"'\"\n});\nexport const doublePrimeArcSecond = set({\n name: 'Double Prime/Arcsecond',\n latex: '\"',\n write: '\"'\n});\n"],"file":"geometry.js"}
1
+ {"version":3,"sources":["../../src/keys/geometry.js"],"names":["set","o","category","overline","name","latex","command","overRightArrow","overLeftRightArrow","symbol","segment","write","label","parallel","notParallel","perpindicular","angle","overArc","measureOfAngle","triangle","parallelogram","circledDot","degree","similarTo","congruentTo","notCongruentTo","primeArcminute","doublePrimeArcSecond"],"mappings":";;;;;;;;;;;;;AAAA,IAAMA,GAAG,GAAG,SAANA,GAAM,CAAAC,CAAC;AAAA,2BAAUA,CAAV;AAAaC,IAAAA,QAAQ,EAAE;AAAvB;AAAA,CAAb;;AAEO,IAAMC,QAAQ,GAAGH,GAAG,CAAC;AAC1BI,EAAAA,IAAI,EAAE,UADoB;AAE1BC,EAAAA,KAAK,EAAE,cAFmB;AAG1BC,EAAAA,OAAO,EAAE;AAHiB,CAAD,CAApB;;AAMA,IAAMC,cAAc,GAAGP,GAAG,CAAC;AAChCI,EAAAA,IAAI,EAAE,UAD0B;AAEhCC,EAAAA,KAAK,EAAE,oBAFyB;AAGhCC,EAAAA,OAAO,EAAE;AAHuB,CAAD,CAA1B;;AAMA,IAAME,kBAAkB,GAAGR,GAAG,CAAC;AACpCI,EAAAA,IAAI,EAAE,UAD8B;AAEpCC,E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AA,KAAK,EAAE,KAFyB;AAGhC;AACAP,EAAAA,KAAK,EAAE,GAJyB;AAKhC;AACAM,EAAAA,KAAK,EAAE;AANyB,CAAD,CAA1B;;AAQA,IAAMgB,oBAAoB,GAAG3B,GAAG,CAAC;AACtCI,EAAAA,IAAI,EAAE,wBADgC;AAEtCC,EAAAA,KAAK,EAAE,GAF+B;AAGtCM,EAAAA,KAAK,EAAE;AAH+B,CAAD,CAAhC","sourcesContent":["const set = o => ({ ...o, category: 'geometry' });\n\nexport const overline = set({\n name: 'Overline',\n latex: '\\\\overline{}',\n command: '\\\\overline'\n});\n\nexport const overRightArrow = set({\n name: 'Overline',\n latex: '\\\\overrightarrow{}',\n command: '\\\\overrightarrow'\n});\n\nexport const overLeftRightArrow = set({\n name: 'Overline',\n latex: '\\\\overleftrightarrow{}',\n symbol: 'AB',\n command: '\\\\overleftrightarrow'\n});\n\nexport const segment = set({\n name: 'Segment',\n latex: '\\\\overleftrightarrow{AB}',\n write: '\\\\overleftrightarrow{AB}',\n label: 'AB'\n});\n\nexport const parallel = set({\n name: 'Parallel',\n latex: '\\\\parallel',\n command: '\\\\parallel'\n});\n\nexport const notParallel = set({\n name: 'Not Parallel',\n latex: '\\\\nparallel',\n command: '\\\\nparallel'\n});\n\nexport const perpindicular = set({\n name: 'Perpendicular',\n latex: '\\\\perp',\n command: '\\\\perpendicular'\n});\n\nexport const angle = set({\n name: 'Angle',\n latex: '\\\\angle',\n command: '\\\\angle'\n});\nexport const overArc = set({\n name: 'Over arc',\n latex: '\\\\overarc{}',\n command: '\\\\overarc'\n});\nexport const measureOfAngle = set({\n name: 'Measure Of Angle',\n latex: '\\\\measuredangle',\n command: ['m', '\\\\angle']\n});\n\nexport const triangle = set({\n name: 'Triangle',\n latex: '\\\\triangle',\n command: '\\\\triangle'\n});\n\nexport const parallelogram = set({\n name: 'Parallelogram',\n latex: '\\\\parallelogram',\n command: '\\\\parallelogram'\n});\n\nexport const circledDot = set({\n name: 'Circled Dot',\n latex: '\\\\odot',\n command: '\\\\odot'\n});\n\nexport const degree = set({\n name: 'Degree',\n latex: '\\\\degree',\n command: '\\\\degree'\n});\n\nexport const similarTo = set({\n name: 'Similar To',\n command: '\\\\sim',\n latex: '\\\\sim'\n});\n\nexport const congruentTo = set({\n name: 'Congruent To',\n command: '\\\\cong',\n latex: '\\\\cong'\n});\nexport const notCongruentTo = set({\n name: 'Not Congruent To',\n command: '\\\\ncong',\n latex: '\\\\ncong'\n});\n\nexport const primeArcminute = set({\n name: 'Prime',\n label: 'pam',\n // eslint-disable-next-line\n latex: \"'\",\n // eslint-disable-next-line\n write: \"'\"\n});\nexport const doublePrimeArcSecond = set({\n name: 'Double Prime/Arcsecond',\n latex: '\"',\n write: '\"'\n});\n"],"file":"geometry.js"}
@@ -35,6 +35,8 @@ var matrices = _interopRequireWildcard(require("./matrices"));
35
35
 
36
36
  var _digits = _interopRequireDefault(require("./digits"));
37
37
 
38
+ var logic = _interopRequireWildcard(require("./logic"));
39
+
38
40
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
39
41
 
40
42
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } }
@@ -81,12 +83,12 @@ var gradeSets = [{
81
83
  predicate: function predicate(n) {
82
84
  return n >= 3 && n <= 5;
83
85
  },
84
- set: [[comparison.lessThan, comparison.greaterThan], [fractions.xOverBlank, fractions.xBlankBlank], [vars.x]]
86
+ set: [[comparison.lessThan, comparison.greaterThan], [fractions.xOverBlank, fractions.xBlankBlank], [vars.x, logic.longDivision]]
85
87
  }, {
86
88
  predicate: function predicate(n) {
87
89
  return n >= 6 && n <= 7;
88
90
  },
89
- set: [[vars.x, vars.y, exponent.squared, exponent.squareRoot, operators.circleDot], [fractions.xOverBlank, fractions.xBlankBlank, exponent.xToPowerOfN, exponent.nthRoot], [comparison.lessThan, comparison.greaterThan, misc.plusMinus, misc.absValue], [comparison.lessThanEqual, comparison.greaterThanEqual, misc.parenthesis, constants.pi], [trigonometry.sin, trigonometry.cos, trigonometry.tan, geometry.degree]]
91
+ set: [[vars.x, vars.y, exponent.squared, exponent.squareRoot, operators.circleDot], [fractions.xOverBlank, fractions.xBlankBlank, exponent.xToPowerOfN, exponent.nthRoot, logic.longDivision], [comparison.lessThan, comparison.greaterThan, misc.plusMinus, misc.absValue], [comparison.lessThanEqual, comparison.greaterThanEqual, misc.parenthesis, constants.pi], [trigonometry.sin, trigonometry.cos, trigonometry.tan, geometry.degree]]
90
92
  }, {
91
93
  predicate: function predicate(n) {
92
94
  return n >= 8 || n === 'HS';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/keys/grades.js"],"names":["hs","vars","x","y","exponent","squared","squareRoot","theta","fractions","xOverBlank","subSup","subscript","xToPowerOfN","nthRoot","comparison","lessThanEqual","greaterThanEqual","misc","plusMinus","absValue","constants","pi","name","latex","write","parenthesis","brackets","trigonometry","sin","cos","tan","geometry","degree","advancedAlgebra","out","map","arr","push","log","logSubscript","ln","eulers","statisticsSet","statistics","mu","xBar","yBar","sigma","gradeSets","predicate","n","set","lessThan","greaterThan","xBlankBlank","operators","circleDot","primeArcminute","doublePrimeArcSecond","triangle","angle","measureOfAngle","similarTo","congruentTo","sec","csc","cot","overline","overRightArrow","overLeftRightArrow","overArc","superscript","blankOverBlank","percentage","segment","parallel","perpindicular","approx","nApprox","notEqual","notCongruentTo","parallelogram","circledDot","similar","notSimilar","keysForGrade","number","parseInt","isNaN","match","find","gs","ALL_KEYS","Object","values","basicOperators","digits","matrices","normalizeAdditionalKeys","additionalKeys","additionalkey","predefinedKey","key","command","otherNotation"],"mappings":";;;;;;;AAAA;;AACA;;AACA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AAkBO,IAAMiG,uBAAuB,GAAG,SAA1BA,uBAA0B,CAAAC,cAAc,EAAI;AACvD,SAAO,CAACA,cAAc,IAAI,EAAnB,EAAuBhE,GAAvB,CAA2B,UAAAiE,aAAa,EAAI;AAAA,QACzC7E,KADyC,GAC/B6E,aAD+B,CACzC7E,KADyC;AAEjD,QAAM8E,aAAa,GAAG,CAACT,QAAQ,IAAI,EAAb,EAAiBF,IAAjB,CACpB,UAAAY,GAAG;AAAA,aACD/E,KAAK,KAAK+E,GAAG,CAAC/E,KAAd,IACAA,KAAK,KAAK+E,GAAG,CAAC9E,KADd,IAEAD,KAAK,KAAK+E,GAAG,CAACC,OAFd,IAGAhF,KAAK,KAAK+E,GAAG,CAACE,aAJb;AAAA,KADiB,CAAtB;AAQA,WAAOH,aAAa,IAAID,aAAxB;AACD,GAXM,CAAP;AAYD,CAbM","sourcesContent":["import * as comparison from './comparison';\nimport * as vars from './vars';\nimport * as fractions from './fractions';\nimport * as exponent from './exponent';\nimport * as misc from './misc';\nimport * as constants from './constants';\nimport * as trigonometry from './trigonometry';\nimport * as geometry from './geometry';\nimport * as operators from './operators';\nimport * as log from './log';\nimport * as subSup from './sub-sup';\nimport * as statistics from './statistics';\nimport * as basicOperators from './basic-operators';\nimport * as matrices from './matrices';\nimport digits from './digits';\n\nconst hs = [\n [vars.x, vars.y, exponent.squared, exponent.squareRoot, vars.theta],\n [fractions.xOverBlank, subSup.subscript, exponent.xToPowerOfN, exponent.nthRoot],\n [comparison.lessThanEqual, comparison.greaterThanEqual, misc.plusMinus, misc.absValue],\n [constants.pi, { name: 'i', latex: 'i', write: 'i' }, misc.parenthesis, misc.brackets],\n [trigonometry.sin, trigonometry.cos, trigonometry.tan, geometry.degree]\n];\n\nconst advancedAlgebra = (() => {\n const out = [...hs.map(arr => [...arr])];\n\n out[1].push(log.log);\n out[2].push(log.logSubscript);\n out[3].push(log.ln);\n out[4].push(constants.eulers);\n return out;\n})();\n\nconst statisticsSet = (() => {\n const out = [...hs.map(arr => [...arr])];\n out[1].push(statistics.mu);\n out[2].push(statistics.xBar);\n out[3].push(statistics.yBar);\n out[4].push(statistics.sigma);\n return out;\n})();\n\nexport const gradeSets = [\n {\n predicate: n => n >= 3 && n <= 5,\n set: [\n [comparison.lessThan, comparison.greaterThan],\n [fractions.xOverBlank, fractions.xBlankBlank],\n [vars.x]\n ]\n },\n {\n predicate: n => n >= 6 && n <= 7,\n set: [\n [vars.x, vars.y, exponent.squared, exponent.squareRoot, operators.circleDot],\n [fractions.xOverBlank, fractions.xBlankBlank, exponent.xToPowerOfN, exponent.nthRoot],\n [comparison.lessThan, comparison.greaterThan, misc.plusMinus, misc.absValue],\n [comparison.lessThanEqual, comparison.greaterThanEqual, misc.parenthesis, constants.pi],\n [trigonometry.sin, trigonometry.cos, trigonometry.tan, geometry.degree]\n ]\n },\n {\n predicate: n => n >= 8 || n === 'HS',\n set: [\n [vars.x, vars.y, exponent.squared, exponent.squareRoot, operators.circleDot],\n [fractions.xOverBlank, subSup.subscript, exponent.xToPowerOfN, exponent.nthRoot],\n [\n comparison.lessThanEqual,\n comparison.greaterThanEqual,\n misc.plusMinus,\n misc.absValue\n // matrices.singleCellMatrix\n ],\n [\n constants.pi,\n { name: 'i', latex: 'i', write: 'i' },\n misc.parenthesis,\n misc.brackets\n // matrices.doubleCellMatrix\n ],\n [trigonometry.sin, trigonometry.cos, trigonometry.tan, geometry.degree]\n ]\n },\n {\n predicate: 'geometry',\n set: [\n [\n geometry.degree,\n geometry.primeArcminute,\n geometry.doublePrimeArcSecond,\n geometry.triangle,\n fractions.xOverBlank\n ],\n [\n geometry.angle,\n geometry.measureOfAngle,\n geometry.similarTo,\n geometry.congruentTo,\n exponent.squareRoot\n ],\n [trigonometry.sin, trigonometry.cos, trigonometry.tan, trigonometry.sec, exponent.nthRoot],\n [trigonometry.csc, trigonometry.cot, exponent.xToPowerOfN, constants.pi, subSup.subscript],\n [\n geometry.overline,\n geometry.overRightArrow,\n geometry.overLeftRightArrow,\n geometry.overArc,\n vars.theta\n ]\n ]\n },\n {\n predicate: 'miscellaneous',\n set: [\n [\n subSup.superscript,\n subSup.subscript,\n fractions.blankOverBlank,\n misc.percentage,\n geometry.segment,\n geometry.parallel\n ],\n [\n exponent.squareRoot,\n exponent.nthRoot,\n misc.absValue,\n misc.parenthesis,\n geometry.perpindicular,\n geometry.angle\n ],\n [\n comparison.lessThan,\n comparison.greaterThan,\n geometry.degree,\n misc.approx,\n geometry.measureOfAngle,\n geometry.triangle\n ],\n [\n misc.nApprox,\n misc.notEqual,\n geometry.congruentTo,\n geometry.notCongruentTo,\n geometry.parallelogram,\n geometry.circledDot\n ],\n [\n misc.similar,\n misc.notSimilar,\n comparison.lessThanEqual,\n comparison.greaterThanEqual,\n vars.x,\n vars.y\n ]\n ]\n },\n // {\n // predicate: 'everything',\n // set: [\n // [\n // subSup.superscript,\n // subSup.subscript,\n // fractions.blankOverBlank,\n // misc.percentage,\n // geometry.segment,\n // geometry.parallel\n // ],\n // [\n // exponent.squareRoot,\n // exponent.nthRoot,\n // misc.absValue,\n // misc.parenthesis,\n // geometry.perpindicular,\n // geometry.angle\n // ],\n // [\n // comparison.lessThan,\n // comparison.greaterThan,\n // geometry.degree,\n // misc.approx,\n // geometry.measureOfAngle,\n // geometry.triangle\n // ],\n // [\n // misc.nApprox,\n // misc.notEqual,\n // geometry.congruentTo,\n // geometry.notCongruentTo,\n // geometry.parallelogram,\n // geometry.circledDot\n // ],\n // [\n // misc.similar,\n // misc.notSimilar,\n // comparison.lessThanEqual,\n // comparison.greaterThanEqual,\n // vars.x,\n // vars.y\n // ]\n // ]\n // },\n {\n predicate: 'advanced-algebra',\n set: advancedAlgebra\n },\n {\n predicate: 'statistics',\n set: statisticsSet\n }\n];\n\nexport const keysForGrade = n => {\n const number = parseInt(n, 10);\n n = isNaN(number) ? n : number;\n if (!n) {\n return [];\n }\n\n const match = gradeSets.find(gs => {\n if (typeof gs.predicate === 'string') {\n return gs.predicate === n;\n } else {\n return gs.predicate(n);\n }\n });\n\n if (match) {\n return match.set || [];\n }\n};\n\nconst ALL_KEYS = [\n ...Object.values(basicOperators),\n ...Object.values(comparison),\n ...Object.values(constants),\n ...Object.values(digits),\n ...Object.values(exponent),\n ...Object.values(fractions),\n ...Object.values(geometry),\n ...Object.values(log),\n ...Object.values(matrices),\n ...Object.values(misc),\n ...Object.values(operators),\n ...Object.values(statistics),\n ...Object.values(subSup),\n ...Object.values(trigonometry),\n ...Object.values(vars)\n];\n\nexport const normalizeAdditionalKeys = additionalKeys => {\n return (additionalKeys || []).map(additionalkey => {\n const { latex } = additionalkey;\n const predefinedKey = (ALL_KEYS || []).find(\n key =>\n latex === key.latex ||\n latex === key.write ||\n latex === key.command ||\n latex === key.otherNotation\n );\n\n return predefinedKey || additionalkey;\n });\n};\n"],"file":"grades.js"}
1
+ {"version":3,"sources":["../../src/keys/grades.js"],"names":["hs","vars","x","y","exponent","squared","squareRoot","theta","fractions","xOverBlank","subSup","subscript","xToPowerOfN","nthRoot","comparison","lessThanEqual","greaterThanEqual","misc","plusMinus","absValue","constants","pi","name","latex","write","parenthesis","brackets","trigonometry","sin","cos","tan","geometry","degree","advancedAlgebra","out","map","arr","push","log","logSubscript","ln","eulers","statisticsSet","statistics","mu","xBar","yBar","sigma","gradeSets","predicate","n","set","lessThan","greaterThan","xBlankBlank","logic","longDivision","operators","circleDot","primeArcminute","doublePrimeArcSecond","triangle","angle","measureOfAngle","similarTo","congruentTo","sec","csc","cot","overline","overRightArrow","overLeftRightArrow","overArc","superscript","blankOverBlank","percentage","segment","parallel","perpindicular","approx","nApprox","notEqual","notCongruentTo","parallelogram","circledDot","similar","notSimilar","keysForGrade","number","parseInt","isNaN","match","find","gs","ALL_KEYS","Object","values","basicOperators","digits","matrices","normalizeAdditionalKeys","additionalKeys","additionalkey","predefinedKey","key","command","otherNotation"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA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,IAAMmG,uBAAuB,GAAG,SAA1BA,uBAA0B,CAAAC,cAAc,EAAI;AACvD,SAAO,CAACA,cAAc,IAAI,EAAnB,EAAuBlE,GAAvB,CAA2B,UAAAmE,aAAa,EAAI;AAAA,QACzC/E,KADyC,GAC/B+E,aAD+B,CACzC/E,KADyC;AAEjD,QAAMgF,aAAa,GAAG,CAACT,QAAQ,IAAI,EAAb,EAAiBF,IAAjB,CACpB,UAAAY,GAAG;AAAA,aACDjF,KAAK,KAAKiF,GAAG,CAACjF,KAAd,IACAA,KAAK,KAAKiF,GAAG,CAAChF,KADd,IAEAD,KAAK,KAAKiF,GAAG,CAACC,OAFd,IAGAlF,KAAK,KAAKiF,GAAG,CAACE,aAJb;AAAA,KADiB,CAAtB;AAQA,WAAOH,aAAa,IAAID,aAAxB;AACD,GAXM,CAAP;AAYD,CAbM","sourcesContent":["import * as comparison from './comparison';\nimport * as vars from './vars';\nimport * as fractions from './fractions';\nimport * as exponent from './exponent';\nimport * as misc from './misc';\nimport * as constants from './constants';\nimport * as trigonometry from './trigonometry';\nimport * as geometry from './geometry';\nimport * as operators from './operators';\nimport * as log from './log';\nimport * as subSup from './sub-sup';\nimport * as statistics from './statistics';\nimport * as basicOperators from './basic-operators';\nimport * as matrices from './matrices';\nimport digits from './digits';\nimport * as logic from './logic';\n\nconst hs = [\n [vars.x, vars.y, exponent.squared, exponent.squareRoot, vars.theta],\n [fractions.xOverBlank, subSup.subscript, exponent.xToPowerOfN, exponent.nthRoot],\n [comparison.lessThanEqual, comparison.greaterThanEqual, misc.plusMinus, misc.absValue],\n [constants.pi, { name: 'i', latex: 'i', write: 'i' }, misc.parenthesis, misc.brackets],\n [trigonometry.sin, trigonometry.cos, trigonometry.tan, geometry.degree]\n];\n\nconst advancedAlgebra = (() => {\n const out = [...hs.map(arr => [...arr])];\n\n out[1].push(log.log);\n out[2].push(log.logSubscript);\n out[3].push(log.ln);\n out[4].push(constants.eulers);\n return out;\n})();\n\nconst statisticsSet = (() => {\n const out = [...hs.map(arr => [...arr])];\n out[1].push(statistics.mu);\n out[2].push(statistics.xBar);\n out[3].push(statistics.yBar);\n out[4].push(statistics.sigma);\n return out;\n})();\n\nexport const gradeSets = [\n {\n predicate: n => n >= 3 && n <= 5,\n set: [\n [comparison.lessThan, comparison.greaterThan],\n [fractions.xOverBlank, fractions.xBlankBlank],\n [vars.x, logic.longDivision]\n ]\n },\n {\n predicate: n => n >= 6 && n <= 7,\n set: [\n [vars.x, vars.y, exponent.squared, exponent.squareRoot, operators.circleDot],\n [fractions.xOverBlank, fractions.xBlankBlank, exponent.xToPowerOfN, exponent.nthRoot, logic.longDivision],\n [comparison.lessThan, comparison.greaterThan, misc.plusMinus, misc.absValue],\n [comparison.lessThanEqual, comparison.greaterThanEqual, misc.parenthesis, constants.pi],\n [trigonometry.sin, trigonometry.cos, trigonometry.tan, geometry.degree]\n ]\n },\n {\n predicate: n => n >= 8 || n === 'HS',\n set: [\n [vars.x, vars.y, exponent.squared, exponent.squareRoot, operators.circleDot],\n [fractions.xOverBlank, subSup.subscript, exponent.xToPowerOfN, exponent.nthRoot],\n [\n comparison.lessThanEqual,\n comparison.greaterThanEqual,\n misc.plusMinus,\n misc.absValue\n // matrices.singleCellMatrix\n ],\n [\n constants.pi,\n { name: 'i', latex: 'i', write: 'i' },\n misc.parenthesis,\n misc.brackets\n // matrices.doubleCellMatrix\n ],\n [trigonometry.sin, trigonometry.cos, trigonometry.tan, geometry.degree]\n ]\n },\n {\n predicate: 'geometry',\n set: [\n [\n geometry.degree,\n geometry.primeArcminute,\n geometry.doublePrimeArcSecond,\n geometry.triangle,\n fractions.xOverBlank\n ],\n [\n geometry.angle,\n geometry.measureOfAngle,\n geometry.similarTo,\n geometry.congruentTo,\n exponent.squareRoot\n ],\n [trigonometry.sin, trigonometry.cos, trigonometry.tan, trigonometry.sec, exponent.nthRoot],\n [trigonometry.csc, trigonometry.cot, exponent.xToPowerOfN, constants.pi, subSup.subscript],\n [\n geometry.overline,\n geometry.overRightArrow,\n geometry.overLeftRightArrow,\n geometry.overArc,\n vars.theta\n ]\n ]\n },\n {\n predicate: 'miscellaneous',\n set: [\n [\n subSup.superscript,\n subSup.subscript,\n fractions.blankOverBlank,\n misc.percentage,\n geometry.segment,\n geometry.parallel\n ],\n [\n exponent.squareRoot,\n exponent.nthRoot,\n misc.absValue,\n misc.parenthesis,\n geometry.perpindicular,\n geometry.angle\n ],\n [\n comparison.lessThan,\n comparison.greaterThan,\n geometry.degree,\n misc.approx,\n geometry.measureOfAngle,\n geometry.triangle\n ],\n [\n misc.nApprox,\n misc.notEqual,\n geometry.congruentTo,\n geometry.notCongruentTo,\n geometry.parallelogram,\n geometry.circledDot\n ],\n [\n misc.similar,\n misc.notSimilar,\n comparison.lessThanEqual,\n comparison.greaterThanEqual,\n vars.x,\n vars.y\n ]\n ]\n },\n // {\n // predicate: 'everything',\n // set: [\n // [\n // subSup.superscript,\n // subSup.subscript,\n // fractions.blankOverBlank,\n // misc.percentage,\n // geometry.segment,\n // geometry.parallel\n // ],\n // [\n // exponent.squareRoot,\n // exponent.nthRoot,\n // misc.absValue,\n // misc.parenthesis,\n // geometry.perpindicular,\n // geometry.angle\n // ],\n // [\n // comparison.lessThan,\n // comparison.greaterThan,\n // geometry.degree,\n // misc.approx,\n // geometry.measureOfAngle,\n // geometry.triangle\n // ],\n // [\n // misc.nApprox,\n // misc.notEqual,\n // geometry.congruentTo,\n // geometry.notCongruentTo,\n // geometry.parallelogram,\n // geometry.circledDot\n // ],\n // [\n // misc.similar,\n // misc.notSimilar,\n // comparison.lessThanEqual,\n // comparison.greaterThanEqual,\n // vars.x,\n // vars.y\n // ]\n // ]\n // },\n {\n predicate: 'advanced-algebra',\n set: advancedAlgebra\n },\n {\n predicate: 'statistics',\n set: statisticsSet\n }\n];\n\nexport const keysForGrade = n => {\n const number = parseInt(n, 10);\n n = isNaN(number) ? n : number;\n if (!n) {\n return [];\n }\n\n const match = gradeSets.find(gs => {\n if (typeof gs.predicate === 'string') {\n return gs.predicate === n;\n } else {\n return gs.predicate(n);\n }\n });\n\n if (match) {\n return match.set || [];\n }\n};\n\nconst ALL_KEYS = [\n ...Object.values(basicOperators),\n ...Object.values(comparison),\n ...Object.values(constants),\n ...Object.values(digits),\n ...Object.values(exponent),\n ...Object.values(fractions),\n ...Object.values(geometry),\n ...Object.values(log),\n ...Object.values(matrices),\n ...Object.values(misc),\n ...Object.values(operators),\n ...Object.values(statistics),\n ...Object.values(subSup),\n ...Object.values(trigonometry),\n ...Object.values(vars)\n];\n\nexport const normalizeAdditionalKeys = additionalKeys => {\n return (additionalKeys || []).map(additionalkey => {\n const { latex } = additionalkey;\n const predefinedKey = (ALL_KEYS || []).find(\n key =>\n latex === key.latex ||\n latex === key.write ||\n latex === key.command ||\n latex === key.otherNotation\n );\n\n return predefinedKey || additionalkey;\n });\n};\n"],"file":"grades.js"}
package/lib/keys/logic.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.therefore = void 0;
6
+ exports.longDivision = exports.therefore = void 0;
7
7
 
8
8
  var _utils = require("./utils");
9
9
 
@@ -14,4 +14,10 @@ var therefore = set({
14
14
  write: '∴'
15
15
  });
16
16
  exports.therefore = therefore;
17
+ var longDivision = set({
18
+ name: 'Long division',
19
+ latex: '\\longdiv{}',
20
+ command: '\\longdiv'
21
+ });
22
+ exports.longDivision = longDivision;
17
23
  //# sourceMappingURL=logic.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/keys/logic.js"],"names":["set","therefore","name","label","write"],"mappings":";;;;;;;AAAA;;AAEA,IAAMA,GAAG,GAAG,kBAAM,OAAN,CAAZ;AAEO,IAAMC,SAAS,GAAGD,GAAG,CAAC;AAC3BE,EAAAA,IAAI,EAAE,WADqB;AAE3BC,EAAAA,KAAK,EAAE,GAFoB;AAG3BC,EAAAA,KAAK,EAAE;AAHoB,CAAD,CAArB","sourcesContent":["import { mkSet } from './utils';\n\nconst set = mkSet('logic');\n\nexport const therefore = set({\n name: 'Therefore',\n label: '∴',\n write: '∴'\n});\n"],"file":"logic.js"}
1
+ {"version":3,"sources":["../../src/keys/logic.js"],"names":["set","therefore","name","label","write","longDivision","latex","command"],"mappings":";;;;;;;AAAA;;AAEA,IAAMA,GAAG,GAAG,kBAAM,OAAN,CAAZ;AAEO,IAAMC,SAAS,GAAGD,GAAG,CAAC;AAC3BE,EAAAA,IAAI,EAAE,WADqB;AAE3BC,EAAAA,KAAK,EAAE,GAFoB;AAG3BC,EAAAA,KAAK,EAAE;AAHoB,CAAD,CAArB;;AAMA,IAAMC,YAAY,GAAGL,GAAG,CAAC;AAC9BE,EAAAA,IAAI,EAAE,eADwB;AAE9BI,EAAAA,KAAK,EAAE,aAFuB;AAG9BC,EAAAA,OAAO,EAAE;AAHqB,CAAD,CAAxB","sourcesContent":["import { mkSet } from './utils';\n\nconst set = mkSet('logic');\n\nexport const therefore = set({\n name: 'Therefore',\n label: '∴',\n write: '∴'\n});\n\nexport const longDivision = set({\n name: 'Long division',\n latex: '\\\\longdiv{}',\n command: '\\\\longdiv'\n});\n"],"file":"logic.js"}
package/lib/mq/static.js CHANGED
@@ -147,7 +147,13 @@ function (_React$Component) {
147
147
  });
148
148
  }
149
149
 
150
- this.mathField.latex(this.props.latex);
150
+ try {
151
+ this.mathField.parseLatex(this.props.latex);
152
+ this.mathField.latex(this.props.latex);
153
+ } catch (e) {
154
+ // default latex if received has errors
155
+ this.mathField.latex('\\MathQuillMathField[r1]{}');
156
+ }
151
157
  }
152
158
  }, {
153
159
  key: "blur",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/mq/static.jsx"],"names":["MQ","window","MathQuill","getInterface","log","REGEX","WHITESPACE_REGEX","stripSpaces","string","replace","Static","e","rootBlock","target","parentElement","nextSibling","id","parseInt","getAttribute","innerField","mathField","innerFields","find","f","name","props","getFieldName","setInput","onSubFieldFocus","err","console","error","message","update","field","onSubFieldChange","latex","Error","StaticMath","input","handlers","edit","onInputEdit","bind","blur","focus","nextProps","parsedLatex","parseLatex","stripped","newFieldCount","match","length","out","trim","Object","keys","warn","onBlur","className","onFocus","r","React","Component","PropTypes","isRequired","func"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAIA,EAAJ;;AACA,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;AACjCD,EAAAA,EAAE,GAAGE,sBAAUC,YAAV,CAAuB,CAAvB,CAAL;AACD;;AAED,IAAMC,GAAG,GAAG,uBAAM,8BAAN,CAAZ;AACA,IAAMC,KAAK,GAAG,wCAAd;AACA,IAAMC,gBAAgB,GAAG,IAAzB;;AAEA,SAASC,WAAT,GAAkC;AAAA,MAAbC,MAAa,uEAAJ,EAAI;AAChC,SAAOA,MAAM,CAACC,OAAP,CAAeH,gBAAf,EAAiC,EAAjC,CAAP;AACD;AAED;;;;;IAGqBI,M;;;;;;;;;;;;;;;;;;8DA+ET,UAAAC,CAAC,EAAI;AACb,UAAI;AACF,YAAIC,SAAS,GAAGD,CAAC,CAACE,MAAF,CAASC,aAAT,CAAuBC,WAAvC;AACA,YAAIC,EAAE,GAAGC,QAAQ,CAACL,SAAS,CAACM,YAAV,CAAuB,oBAAvB,CAAD,EAA+C,EAA/C,CAAjB;;AAEA,YAAI,CAACF,EAAL,EAAS;AACPJ,UAAAA,SAAS,GAAGA,SAAS,CAACE,aAAtB;AACAE,UAAAA,EAAE,GAAGC,QAAQ,CAACL,SAAS,CAACM,YAAV,CAAuB,oBAAvB,CAAD,EAA+C,EAA/C,CAAb;AACD;;AAED,YAAMC,UAAU,GAAG,MAAKC,SAAL,CAAeC,WAAf,CAA2BC,IAA3B,CAAgC,UAAAC,CAAC;AAAA,iBAAIA,CAAC,CAACP,EAAF,KAASA,EAAb;AAAA,SAAjC,CAAnB;;AAEA,YAAIG,UAAJ,EAAgB;AACd,cAAMK,IAAI,GAAG,MAAKC,KAAL,CAAWC,YAAX,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,QADF;AAQD;;;;EAnHiCC,kBAAMC,S;;;;gBAArBrD,M,eACA;AACjB0B,EAAAA,KAAK,EAAE4B,sBAAUxD,MAAV,CAAiByD,UADP;AAEjBL,EAAAA,OAAO,EAAEI,sBAAUE,IAFF;AAGjBR,EAAAA,MAAM,EAAEM,sBAAUE,IAHD;AAIjBP,EAAAA,SAAS,EAAEK,sBAAUxD,MAJJ;AAKjBkB,EAAAA,YAAY,EAAEsC,sBAAUE,IALP;AAMjB/B,EAAAA,gBAAgB,EAAE6B,sBAAUE,IANX;AAOjBtC,EAAAA,eAAe,EAAEoC,sBAAUE,IAPV;AAQjBvC,EAAAA,QAAQ,EAAEqC,sBAAUE;AARH,C","sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport debug from 'debug';\nimport MathQuill from '@pie-framework/mathquill';\nimport { updateSpans } from '../index';\n\nlet MQ;\nif (typeof window !== 'undefined') {\n MQ = MathQuill.getInterface(2);\n}\n\nconst log = debug('pie-lib:math-input:mq:static');\nconst REGEX = /\\\\MathQuillMathField\\[r\\d*\\]\\{(.*?)\\}/g;\nconst WHITESPACE_REGEX = / /g;\n\nfunction stripSpaces(string = '') {\n return string.replace(WHITESPACE_REGEX, '');\n}\n\n/**\n * Wrapper for MathQuill MQ.MathField.\n */\nexport default class Static extends React.Component {\n static propTypes = {\n latex: PropTypes.string.isRequired,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n className: PropTypes.string,\n getFieldName: PropTypes.func,\n onSubFieldChange: PropTypes.func,\n onSubFieldFocus: PropTypes.func,\n setInput: PropTypes.func\n };\n\n componentDidMount() {\n this.update();\n updateSpans();\n }\n\n componentDidUpdate() {\n this.update();\n updateSpans();\n }\n\n onInputEdit(field) {\n if (!this.mathField) {\n return;\n }\n const name = this.props.getFieldName(field, this.mathField.innerFields);\n if (this.props.onSubFieldChange) {\n this.props.onSubFieldChange(name, field.latex());\n }\n }\n\n update() {\n if (!MQ) {\n throw new Error('MQ is not defined - but component has mounted?');\n }\n // this.input.innerHTML = this.props.latex;\n if (!this.mathField) {\n this.mathField = MQ.StaticMath(this.input, {\n handlers: {\n edit: this.onInputEdit.bind(this)\n }\n });\n }\n\n this.mathField.latex(this.props.latex);\n }\n\n blur() {\n log('blur mathfield');\n this.mathField.blur();\n }\n\n focus() {\n log('focus mathfield...');\n this.mathField.focus();\n }\n\n shouldComponentUpdate(nextProps) {\n try {\n const parsedLatex = this.mathField.parseLatex(nextProps.latex);\n const stripped = stripSpaces(parsedLatex);\n const newFieldCount = (nextProps.latex.match(REGEX) || []).length;\n\n const out =\n stripped !== stripSpaces(this.mathField.latex().trim()) ||\n newFieldCount !== Object.keys(this.mathField.innerFields).length / 2;\n\n log('[shouldComponentUpdate] ', out);\n return out;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Error parsing latex:', e.message, 'skip update');\n // eslint-disable-next-line no-console\n console.warn(e);\n return false;\n }\n }\n\n onFocus = e => {\n try {\n let rootBlock = e.target.parentElement.nextSibling;\n let id = parseInt(rootBlock.getAttribute('mathquill-block-id'), 10);\n\n if (!id) {\n rootBlock = rootBlock.parentElement;\n id = parseInt(rootBlock.getAttribute('mathquill-block-id'), 10);\n }\n\n const innerField = this.mathField.innerFields.find(f => f.id === id);\n\n if (innerField) {\n const name = this.props.getFieldName(innerField, this.mathField.innerFields);\n if (this.props.setInput) {\n this.props.setInput(innerField);\n }\n this.props.onSubFieldFocus(name, innerField);\n }\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('error finding root block', err.message);\n }\n };\n\n render() {\n const { onBlur, className } = this.props;\n\n return (\n <span\n className={className}\n onFocus={this.onFocus}\n onBlur={onBlur}\n ref={r => (this.input = r)}\n />\n );\n }\n}\n"],"file":"static.js"}
1
+ {"version":3,"sources":["../../src/mq/static.jsx"],"names":["MQ","window","MathQuill","getInterface","log","REGEX","WHITESPACE_REGEX","stripSpaces","string","replace","Static","e","rootBlock","target","parentElement","nextSibling","id","parseInt","getAttribute","innerField","mathField","innerFields","find","f","name","props","getFieldName","setInput","onSubFieldFocus","err","console","error","message","update","field","onSubFieldChange","latex","Error","StaticMath","input","handlers","edit","onInputEdit","bind","parseLatex","blur","focus","nextProps","parsedLatex","stripped","newFieldCount","match","length","out","trim","Object","keys","warn","onBlur","className","onFocus","r","React","Component","PropTypes","isRequired","func"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAIA,EAAJ;;AACA,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;AACjCD,EAAAA,EAAE,GAAGE,sBAAUC,YAAV,CAAuB,CAAvB,CAAL;AACD;;AAED,IAAMC,GAAG,GAAG,uBAAM,8BAAN,CAAZ;AACA,IAAMC,KAAK,GAAG,wCAAd;AACA,IAAMC,gBAAgB,GAAG,IAAzB;;AAEA,SAASC,WAAT,GAAkC;AAAA,MAAbC,MAAa,uEAAJ,EAAI;AAChC,SAAOA,MAAM,CAACC,OAAP,CAAeH,gBAAf,EAAiC,EAAjC,CAAP;AACD;AAED;;;;;IAGqBI,M;;;;;;;;;;;;;;;;;;8DAqFT,UAAAC,CAAC,EAAI;AACb,UAAI;AACF,YAAIC,SAAS,GAAGD,CAAC,CAACE,MAAF,CAASC,aAAT,CAAuBC,WAAvC;AACA,YAAIC,EAAE,GAAGC,QAAQ,CAACL,SAAS,CAACM,YAAV,CAAuB,oBAAvB,CAAD,EAA+C,EAA/C,CAAjB;;AAEA,YAAI,CAACF,EAAL,EAAS;AACPJ,UAAAA,SAAS,GAAGA,SAAS,CAACE,aAAtB;AACAE,UAAAA,EAAE,GAAGC,QAAQ,CAACL,SAAS,CAACM,YAAV,CAAuB,oBAAvB,CAAD,EAA+C,EAA/C,CAAb;AACD;;AAED,YAAMC,UAAU,GAAG,MAAKC,SAAL,CAAeC,WAAf,CAA2BC,IAA3B,CAAgC,UAAAC,CAAC;AAAA,iBAAIA,CAAC,CAACP,EAAF,KAASA,EAAb;AAAA,SAAjC,CA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CiC,MADD,eACCA,MADD;AAAA,UACSC,SADT,eACSA,SADT;AAGP,aACE;AACE,QAAA,SAAS,EAAEA,SADb;AAEE,QAAA,OAAO,EAAE,KAAKC,OAFhB;AAGE,QAAA,MAAM,EAAEF,MAHV;AAIE,QAAA,GAAG,EAAE,aAAAG,CAAC;AAAA,iBAAK,MAAI,CAACtB,KAAL,GAAasB,CAAlB;AAAA;AAJR,QADF;AAQD;;;;EAzHiCC,kBAAMC,S;;;;gBAArBrD,M,eACA;AACjB0B,EAAAA,KAAK,EAAE4B,sBAAUxD,MAAV,CAAiByD,UADP;AAEjBL,EAAAA,OAAO,EAAEI,sBAAUE,IAFF;AAGjBR,EAAAA,MAAM,EAAEM,sBAAUE,IAHD;AAIjBP,EAAAA,SAAS,EAAEK,sBAAUxD,MAJJ;AAKjBkB,EAAAA,YAAY,EAAEsC,sBAAUE,IALP;AAMjB/B,EAAAA,gBAAgB,EAAE6B,sBAAUE,IANX;AAOjBtC,EAAAA,eAAe,EAAEoC,sBAAUE,IAPV;AAQjBvC,EAAAA,QAAQ,EAAEqC,sBAAUE;AARH,C","sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport debug from 'debug';\nimport MathQuill from '@pie-framework/mathquill';\nimport { updateSpans } from '../index';\n\nlet MQ;\nif (typeof window !== 'undefined') {\n MQ = MathQuill.getInterface(2);\n}\n\nconst log = debug('pie-lib:math-input:mq:static');\nconst REGEX = /\\\\MathQuillMathField\\[r\\d*\\]\\{(.*?)\\}/g;\nconst WHITESPACE_REGEX = / /g;\n\nfunction stripSpaces(string = '') {\n return string.replace(WHITESPACE_REGEX, '');\n}\n\n/**\n * Wrapper for MathQuill MQ.MathField.\n */\nexport default class Static extends React.Component {\n static propTypes = {\n latex: PropTypes.string.isRequired,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n className: PropTypes.string,\n getFieldName: PropTypes.func,\n onSubFieldChange: PropTypes.func,\n onSubFieldFocus: PropTypes.func,\n setInput: PropTypes.func\n };\n\n componentDidMount() {\n this.update();\n updateSpans();\n }\n\n componentDidUpdate() {\n this.update();\n updateSpans();\n }\n\n onInputEdit(field) {\n if (!this.mathField) {\n return;\n }\n const name = this.props.getFieldName(field, this.mathField.innerFields);\n if (this.props.onSubFieldChange) {\n this.props.onSubFieldChange(name, field.latex());\n }\n }\n\n update() {\n if (!MQ) {\n throw new Error('MQ is not defined - but component has mounted?');\n }\n // this.input.innerHTML = this.props.latex;\n if (!this.mathField) {\n this.mathField = MQ.StaticMath(this.input, {\n handlers: {\n edit: this.onInputEdit.bind(this)\n }\n });\n }\n\n try {\n this.mathField.parseLatex(this.props.latex);\n this.mathField.latex(this.props.latex);\n } catch (e) {\n // default latex if received has errors\n this.mathField.latex('\\\\MathQuillMathField[r1]{}');\n }\n }\n\n blur() {\n log('blur mathfield');\n this.mathField.blur();\n }\n\n focus() {\n log('focus mathfield...');\n this.mathField.focus();\n }\n\n shouldComponentUpdate(nextProps) {\n try {\n const parsedLatex = this.mathField.parseLatex(nextProps.latex);\n const stripped = stripSpaces(parsedLatex);\n const newFieldCount = (nextProps.latex.match(REGEX) || []).length;\n\n const out =\n stripped !== stripSpaces(this.mathField.latex().trim()) ||\n newFieldCount !== Object.keys(this.mathField.innerFields).length / 2;\n\n log('[shouldComponentUpdate] ', out);\n return out;\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn('Error parsing latex:', e.message, 'skip update');\n // eslint-disable-next-line no-console\n console.warn(e);\n return false;\n }\n }\n\n onFocus = e => {\n try {\n let rootBlock = e.target.parentElement.nextSibling;\n let id = parseInt(rootBlock.getAttribute('mathquill-block-id'), 10);\n\n if (!id) {\n rootBlock = rootBlock.parentElement;\n id = parseInt(rootBlock.getAttribute('mathquill-block-id'), 10);\n }\n\n const innerField = this.mathField.innerFields.find(f => f.id === id);\n\n if (innerField) {\n const name = this.props.getFieldName(innerField, this.mathField.innerFields);\n if (this.props.setInput) {\n this.props.setInput(innerField);\n }\n this.props.onSubFieldFocus(name, innerField);\n }\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('error finding root block', err.message);\n }\n };\n\n render() {\n const { onBlur, className } = this.props;\n\n return (\n <span\n className={className}\n onFocus={this.onFocus}\n onBlur={onBlur}\n ref={r => (this.input = r)}\n />\n );\n }\n}\n"],"file":"static.js"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "6.5.15-next.66+e24bae5b",
6
+ "version": "6.6.1-next.45+b91f0971",
7
7
  "main": "lib/index.js",
8
8
  "module": "src/index.jsx",
9
9
  "dependencies": {
@@ -22,5 +22,5 @@
22
22
  "react-dom": "^16.9.0"
23
23
  },
24
24
  "scripts": {},
25
- "gitHead": "e24bae5bcfdddac7daf8b2719a927c3903934ed1"
25
+ "gitHead": "b91f09710e5de270f9c60981da49f7fbf70c9417"
26
26
  }
@@ -41,6 +41,9 @@ const LatexButton = withStyles(theme => ({
41
41
  marginTop: '0 !important',
42
42
  borderTop: '2px solid black',
43
43
  '&.mq-arrow-both': {
44
+ '& *': {
45
+ lineHeight: '1 !important'
46
+ },
44
47
  '&:before': {
45
48
  fontSize: '80%',
46
49
  left: 'calc(-13%)',
@@ -94,6 +97,13 @@ const LatexButton = withStyles(theme => ({
94
97
  left: '-6px',
95
98
  fontSize: '80% !important',
96
99
  top: '-3px'
100
+ },
101
+ '& .mq-longdiv-inner': {
102
+ borderTop: '1px solid !important',
103
+ paddingTop: '1.5px !important'
104
+ },
105
+ '& .mq-parallelogram': {
106
+ lineHeight: 0.85
97
107
  }
98
108
  },
99
109
  parallelButton: {
@@ -14,5 +14,6 @@ export const eulers = set({
14
14
  name: 'Eulers',
15
15
  label: 'e',
16
16
  latex: 'e',
17
+ command: 'e',
17
18
  category: 'constants'
18
19
  });
@@ -57,7 +57,7 @@ export const overArc = set({
57
57
  export const measureOfAngle = set({
58
58
  name: 'Measure Of Angle',
59
59
  latex: '\\measuredangle',
60
- command: '\\measuredangle'
60
+ command: ['m', '\\angle']
61
61
  });
62
62
 
63
63
  export const triangle = set({
@@ -13,6 +13,7 @@ import * as statistics from './statistics';
13
13
  import * as basicOperators from './basic-operators';
14
14
  import * as matrices from './matrices';
15
15
  import digits from './digits';
16
+ import * as logic from './logic';
16
17
 
17
18
  const hs = [
18
19
  [vars.x, vars.y, exponent.squared, exponent.squareRoot, vars.theta],
@@ -47,14 +48,14 @@ export const gradeSets = [
47
48
  set: [
48
49
  [comparison.lessThan, comparison.greaterThan],
49
50
  [fractions.xOverBlank, fractions.xBlankBlank],
50
- [vars.x]
51
+ [vars.x, logic.longDivision]
51
52
  ]
52
53
  },
53
54
  {
54
55
  predicate: n => n >= 6 && n <= 7,
55
56
  set: [
56
57
  [vars.x, vars.y, exponent.squared, exponent.squareRoot, operators.circleDot],
57
- [fractions.xOverBlank, fractions.xBlankBlank, exponent.xToPowerOfN, exponent.nthRoot],
58
+ [fractions.xOverBlank, fractions.xBlankBlank, exponent.xToPowerOfN, exponent.nthRoot, logic.longDivision],
58
59
  [comparison.lessThan, comparison.greaterThan, misc.plusMinus, misc.absValue],
59
60
  [comparison.lessThanEqual, comparison.greaterThanEqual, misc.parenthesis, constants.pi],
60
61
  [trigonometry.sin, trigonometry.cos, trigonometry.tan, geometry.degree]
package/src/keys/logic.js CHANGED
@@ -7,3 +7,9 @@ export const therefore = set({
7
7
  label: '∴',
8
8
  write: '∴'
9
9
  });
10
+
11
+ export const longDivision = set({
12
+ name: 'Long division',
13
+ latex: '\\longdiv{}',
14
+ command: '\\longdiv'
15
+ });
package/src/mq/static.jsx CHANGED
@@ -65,7 +65,13 @@ export default class Static extends React.Component {
65
65
  });
66
66
  }
67
67
 
68
- this.mathField.latex(this.props.latex);
68
+ try {
69
+ this.mathField.parseLatex(this.props.latex);
70
+ this.mathField.latex(this.props.latex);
71
+ } catch (e) {
72
+ // default latex if received has errors
73
+ this.mathField.latex('\\MathQuillMathField[r1]{}');
74
+ }
69
75
  }
70
76
 
71
77
  blur() {