@pie-lib/math-toolbar 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -52
- package/package.json +5 -4
- package/src/editor-and-pad.jsx +1 -1
- package/lib/done-button.js +0 -68
- package/lib/done-button.js.map +0 -1
- package/lib/editor-and-pad.js +0 -575
- package/lib/editor-and-pad.js.map +0 -1
- package/lib/index.js +0 -287
- package/lib/index.js.map +0 -1
- package/lib/math-preview.js +0 -240
- package/lib/math-preview.js.map +0 -1
- package/lib/shared/index.js +0 -136
- package/lib/utils.js +0 -21
- package/lib/utils.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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
|
-
# [1.
|
|
6
|
+
# [1.16.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.16.0) (2025-07-31)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
# [1.
|
|
14
|
+
# [1.15.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.15.0) (2025-07-31)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
# [1.
|
|
22
|
+
# [1.14.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.14.0) (2025-07-31)
|
|
23
23
|
|
|
24
24
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
# [1.
|
|
30
|
+
# [1.15.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.15.0) (2025-07-31)
|
|
31
31
|
|
|
32
32
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
33
33
|
|
|
@@ -35,7 +35,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
# [1.
|
|
38
|
+
# [1.14.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.14.0) (2025-07-31)
|
|
39
39
|
|
|
40
40
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
41
41
|
|
|
@@ -43,7 +43,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
# [1.
|
|
46
|
+
# [1.13.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.13.0) (2025-07-31)
|
|
47
47
|
|
|
48
48
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
49
49
|
|
|
@@ -51,118 +51,90 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
# [1.
|
|
54
|
+
# [1.13.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.13.0) (2025-07-31)
|
|
55
55
|
|
|
56
56
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
57
57
|
|
|
58
|
+
# [1.14.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.14.0) (2025-07-31)
|
|
58
59
|
|
|
60
|
+
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
59
61
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
# [1.12.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.5) (2025-07-25)
|
|
62
|
+
# [1.13.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.13.0) (2025-07-31)
|
|
63
63
|
|
|
64
64
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
65
65
|
|
|
66
|
+
# [1.12.0-beta.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.8) (2025-07-25)
|
|
66
67
|
|
|
68
|
+
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
67
69
|
|
|
70
|
+
# [1.12.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.7) (2025-07-25)
|
|
68
71
|
|
|
72
|
+
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
69
73
|
|
|
70
|
-
# [1.12.0-beta.
|
|
74
|
+
# [1.12.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.7) (2025-07-25)
|
|
71
75
|
|
|
72
76
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
73
77
|
|
|
78
|
+
# [1.12.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.6) (2025-07-25)
|
|
74
79
|
|
|
80
|
+
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
75
81
|
|
|
82
|
+
# [1.12.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.6) (2025-07-25)
|
|
76
83
|
|
|
84
|
+
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
77
85
|
|
|
78
|
-
# [1.12.0-beta.
|
|
86
|
+
# [1.12.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.5) (2025-07-25)
|
|
79
87
|
|
|
80
88
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
81
89
|
|
|
90
|
+
# [1.12.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.5) (2025-07-25)
|
|
82
91
|
|
|
92
|
+
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
83
93
|
|
|
94
|
+
# [1.12.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.4) (2025-07-25)
|
|
84
95
|
|
|
96
|
+
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
85
97
|
|
|
86
98
|
# [1.12.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.3) (2025-07-25)
|
|
87
99
|
|
|
88
100
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
89
101
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
102
|
# [1.12.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.4) (2025-07-23)
|
|
95
103
|
|
|
96
104
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
97
105
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
106
|
# [1.12.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.3) (2025-07-23)
|
|
103
107
|
|
|
104
108
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
105
109
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
110
|
# [1.12.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.3) (2025-07-20)
|
|
111
111
|
|
|
112
112
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
114
|
# [1.12.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.2) (2025-07-20)
|
|
119
115
|
|
|
120
116
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
121
117
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
118
|
# [1.12.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.1) (2025-07-20)
|
|
127
119
|
|
|
128
120
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
129
121
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
122
|
# [1.12.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.2) (2025-07-20)
|
|
135
123
|
|
|
136
124
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
137
125
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
126
|
# [1.12.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.1) (2025-07-20)
|
|
143
127
|
|
|
144
128
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
145
129
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
130
|
# [1.12.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.1) (2025-07-20)
|
|
151
131
|
|
|
152
132
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
153
133
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
134
|
# [1.12.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.12.0-beta.0) (2025-07-20)
|
|
159
135
|
|
|
160
136
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
161
137
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
138
|
# [1.13.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.13.0-beta.0) (2025-07-15)
|
|
167
139
|
|
|
168
140
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.16.0",
|
|
7
7
|
"description": "Math toolbar for editing math equations",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"math",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@material-ui/core": "^3.8.3",
|
|
21
21
|
"@material-ui/icons": "^3.0.2",
|
|
22
|
-
"@pie-lib/math-input": "
|
|
22
|
+
"@pie-lib/math-input": "^6.16.0",
|
|
23
|
+
"@pie-lib/render-ui": "^4.20.0",
|
|
23
24
|
"classnames": "^2.2.6",
|
|
24
25
|
"debug": "^4.1.1",
|
|
25
26
|
"keycode": "^2.2.0",
|
|
@@ -31,8 +32,8 @@
|
|
|
31
32
|
"react-dom": "^16.9.0"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@pie-lib/test-utils": "
|
|
35
|
+
"@pie-lib/test-utils": "^0.7.0"
|
|
35
36
|
},
|
|
36
37
|
"scripts": {},
|
|
37
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "889a13bfea2c768b8a3a6eabfc6fe7b7725aa832"
|
|
38
39
|
}
|
package/src/editor-and-pad.jsx
CHANGED
|
@@ -9,7 +9,7 @@ import Select from '@material-ui/core/Select';
|
|
|
9
9
|
import isEqual from 'lodash/isEqual';
|
|
10
10
|
|
|
11
11
|
import { HorizontalKeypad, mq, updateSpans } from '@pie-lib/math-input';
|
|
12
|
-
import { color, InputContainer } from '
|
|
12
|
+
import { color, InputContainer } from '@pie-lib/render-ui';
|
|
13
13
|
import { markFractionBaseSuperscripts } from './utils';
|
|
14
14
|
|
|
15
15
|
const { commonMqFontStyles, commonMqKeyboardStyles, longdivStyles, supsubStyles } = mq.CommonMqStyles;
|
package/lib/done-button.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.RawDoneButton = exports.DoneButton = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
15
|
-
|
|
16
|
-
var _Check = _interopRequireDefault(require("@material-ui/icons/Check"));
|
|
17
|
-
|
|
18
|
-
var _styles = require("@material-ui/core/styles");
|
|
19
|
-
|
|
20
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
-
|
|
22
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
23
|
-
|
|
24
|
-
var RawDoneButton = function RawDoneButton(_ref) {
|
|
25
|
-
var classes = _ref.classes,
|
|
26
|
-
onClick = _ref.onClick,
|
|
27
|
-
hideBackground = _ref.hideBackground;
|
|
28
|
-
return /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
29
|
-
"aria-label": "Done",
|
|
30
|
-
className: classes.iconRoot,
|
|
31
|
-
onClick: onClick,
|
|
32
|
-
classes: {
|
|
33
|
-
label: classes.label,
|
|
34
|
-
root: (0, _classnames["default"])(classes.iconRoot, (0, _defineProperty2["default"])({}, classes.hideBackground, hideBackground))
|
|
35
|
-
}
|
|
36
|
-
}, /*#__PURE__*/_react["default"].createElement(_Check["default"], null));
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
exports.RawDoneButton = RawDoneButton;
|
|
40
|
-
RawDoneButton.propTypes = {
|
|
41
|
-
classes: _propTypes["default"].object.isRequired,
|
|
42
|
-
onClick: _propTypes["default"].func
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
var styles = function styles(theme) {
|
|
46
|
-
return {
|
|
47
|
-
iconRoot: {
|
|
48
|
-
verticalAlign: 'top',
|
|
49
|
-
width: '28px',
|
|
50
|
-
height: '28px',
|
|
51
|
-
color: '#00bb00'
|
|
52
|
-
},
|
|
53
|
-
hideBackground: {
|
|
54
|
-
backgroundColor: theme.palette.common.white,
|
|
55
|
-
'&:hover': {
|
|
56
|
-
backgroundColor: theme.palette.grey[200]
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
label: {
|
|
60
|
-
position: 'absolute',
|
|
61
|
-
top: '2px'
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
var DoneButton = (0, _styles.withStyles)(styles)(RawDoneButton);
|
|
67
|
-
exports.DoneButton = DoneButton;
|
|
68
|
-
//# sourceMappingURL=done-button.js.map
|
package/lib/done-button.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/done-button.jsx"],"names":["RawDoneButton","classes","onClick","hideBackground","iconRoot","label","root","propTypes","PropTypes","object","isRequired","func","styles","theme","verticalAlign","width","height","color","backgroundColor","palette","common","white","grey","position","top","DoneButton"],"mappings":";;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAgB;AAAA,MAAGC,OAAH,QAAGA,OAAH;AAAA,MAAYC,OAAZ,QAAYA,OAAZ;AAAA,MAAqBC,cAArB,QAAqBA,cAArB;AAAA,sBAC3B,gCAAC,sBAAD;AACE,kBAAW,MADb;AAEE,IAAA,SAAS,EAAEF,OAAO,CAACG,QAFrB;AAGE,IAAA,OAAO,EAAEF,OAHX;AAIE,IAAA,OAAO,EAAE;AACPG,MAAAA,KAAK,EAAEJ,OAAO,CAACI,KADR;AAEPC,MAAAA,IAAI,EAAE,4BAAWL,OAAO,CAACG,QAAnB,uCAAgCH,OAAO,CAACE,cAAxC,EAAyDA,cAAzD;AAFC;AAJX,kBASE,gCAAC,iBAAD,OATF,CAD2B;AAAA,CAAtB;;;AAcPH,aAAa,CAACO,SAAd,GAA0B;AACxBN,EAAAA,OAAO,EAAEO,sBAAUC,MAAV,CAAiBC,UADF;AAExBR,EAAAA,OAAO,EAAEM,sBAAUG;AAFK,CAA1B;;AAKA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;AAAA,SAAY;AACzBT,IAAAA,QAAQ,EAAE;AACRU,MAAAA,aAAa,EAAE,KADP;AAERC,MAAAA,KAAK,EAAE,MAFC;AAGRC,MAAAA,MAAM,EAAE,MAHA;AAIRC,MAAAA,KAAK,EAAE;AAJC,KADe;AAOzBd,IAAAA,cAAc,EAAE;AACde,MAAAA,eAAe,EAAEL,KAAK,CAACM,OAAN,CAAcC,MAAd,CAAqBC,KADxB;AAGd,iBAAW;AACTH,QAAAA,eAAe,EAAEL,KAAK,CAACM,OAAN,CAAcG,IAAd,CAAmB,GAAnB;AADR;AAHG,KAPS;AAczBjB,IAAAA,KAAK,EAAE;AACLkB,MAAAA,QAAQ,EAAE,UADL;AAELC,MAAAA,GAAG,EAAE;AAFA;AAdkB,GAAZ;AAAA,CAAf;;AAmBO,IAAMC,UAAU,GAAG,wBAAWb,MAAX,EAAmBZ,aAAnB,CAAnB","sourcesContent":["import React from 'react';\n\nimport IconButton from '@material-ui/core/IconButton';\nimport Check from '@material-ui/icons/Check';\nimport { withStyles } from '@material-ui/core/styles';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport const RawDoneButton = ({ classes, onClick, hideBackground }) => (\n <IconButton\n aria-label=\"Done\"\n className={classes.iconRoot}\n onClick={onClick}\n classes={{\n label: classes.label,\n root: classNames(classes.iconRoot, { [classes.hideBackground]: hideBackground }),\n }}\n >\n <Check />\n </IconButton>\n);\n\nRawDoneButton.propTypes = {\n classes: PropTypes.object.isRequired,\n onClick: PropTypes.func,\n};\n\nconst styles = (theme) => ({\n iconRoot: {\n verticalAlign: 'top',\n width: '28px',\n height: '28px',\n color: '#00bb00',\n },\n hideBackground: {\n backgroundColor: theme.palette.common.white,\n\n '&:hover': {\n backgroundColor: theme.palette.grey[200],\n },\n },\n label: {\n position: 'absolute',\n top: '2px',\n },\n});\nexport const DoneButton = withStyles(styles)(RawDoneButton);\n"],"file":"done-button.js"}
|