@pie-lib/math-toolbar 1.31.2 → 1.31.3-next.155
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 +7 -78
- package/esm/package.json +3 -0
- package/lib/done-button.js +34 -51
- package/lib/done-button.js.map +1 -1
- package/lib/editor-and-pad.js +286 -333
- package/lib/editor-and-pad.js.map +1 -1
- package/lib/index.js +64 -110
- package/lib/index.js.map +1 -1
- package/lib/math-preview.js +138 -185
- package/lib/math-preview.js.map +1 -1
- package/lib/utils.js +1 -5
- package/lib/utils.js.map +1 -1
- package/package.json +19 -11
- package/src/__tests__/editor-and-pad.test.js +10 -19
- package/src/__tests__/index.test.js +11 -18
- package/src/__tests__/math-preview.test.js +16 -25
- package/src/done-button.jsx +27 -33
- package/src/editor-and-pad.jsx +230 -231
- package/src/index.jsx +11 -15
- package/src/math-preview.jsx +124 -139
- package/src/__tests__/__snapshots__/editor-and-pad.test.js.snap +0 -31
- package/src/__tests__/__snapshots__/index.test.js.snap +0 -30
- package/src/__tests__/__snapshots__/math-preview.test.js.snap +0 -23
package/CHANGELOG.md
CHANGED
|
@@ -7,156 +7,85 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
10
|
## [1.31.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.27.2...@pie-lib/math-toolbar@1.31.1) (2025-10-22)
|
|
15
11
|
|
|
16
|
-
|
|
17
12
|
### Bug Fixes
|
|
18
13
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
- bump config-ui PD-5265 ([77d0c78](https://github.com/pie-framework/pie-lib/commit/77d0c78cacfa57e93ed17e7a7f1257f4a9cf6ab3))
|
|
24
15
|
|
|
25
16
|
# [1.31.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.30.0...@pie-lib/math-toolbar@1.31.0) (2025-10-16)
|
|
26
17
|
|
|
27
18
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
28
19
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
20
|
# [1.30.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.27.0...@pie-lib/math-toolbar@1.30.0) (2025-10-16)
|
|
34
21
|
|
|
35
22
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
36
23
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
24
|
# [1.29.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.27.0...@pie-lib/math-toolbar@1.29.0) (2025-10-16)
|
|
42
25
|
|
|
43
26
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
44
27
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
28
|
# [1.28.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.27.0...@pie-lib/math-toolbar@1.28.0) (2025-10-16)
|
|
50
29
|
|
|
51
30
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
52
31
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
32
|
## [1.27.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.27.1...@pie-lib/math-toolbar@1.27.2) (2025-10-14)
|
|
58
33
|
|
|
59
34
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
60
35
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
36
|
## [1.27.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.27.0...@pie-lib/math-toolbar@1.27.1) (2025-10-09)
|
|
66
37
|
|
|
67
38
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
68
39
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
40
|
# [1.27.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.27.0) (2025-09-25)
|
|
74
41
|
|
|
75
|
-
|
|
76
42
|
### Bug Fixes
|
|
77
43
|
|
|
78
|
-
|
|
79
|
-
|
|
44
|
+
- fixed pie-lib/icons import [PD-5126](<[dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f)>)
|
|
80
45
|
|
|
81
46
|
### Features
|
|
82
47
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
48
|
+
- split pie-toolbox into multiple packages [PD-5126](<[7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2)>)
|
|
88
49
|
|
|
89
50
|
# [1.26.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.25.0...@pie-lib/math-toolbar@1.26.0) (2025-09-18)
|
|
90
51
|
|
|
91
52
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
92
53
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
54
|
# [1.25.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.24.0...@pie-lib/math-toolbar@1.25.0) (2025-09-18)
|
|
98
55
|
|
|
99
56
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
100
57
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
58
|
# [1.24.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.24.0) (2025-09-18)
|
|
106
59
|
|
|
107
|
-
|
|
108
60
|
### Bug Fixes
|
|
109
61
|
|
|
110
|
-
|
|
111
|
-
|
|
62
|
+
- fixed pie-lib/icons import [PD-5126](<[dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f)>)
|
|
112
63
|
|
|
113
64
|
### Features
|
|
114
65
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
66
|
+
- split pie-toolbox into multiple packages [PD-5126](<[7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2)>)
|
|
120
67
|
|
|
121
68
|
# [1.23.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.22.0...@pie-lib/math-toolbar@1.23.0) (2025-09-17)
|
|
122
69
|
|
|
123
70
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
124
71
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
72
|
# [1.22.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.21.0...@pie-lib/math-toolbar@1.22.0) (2025-09-17)
|
|
130
73
|
|
|
131
74
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
132
75
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
76
|
# [1.21.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.20.1...@pie-lib/math-toolbar@1.21.0) (2025-09-17)
|
|
138
77
|
|
|
139
78
|
**Note:** Version bump only for package @pie-lib/math-toolbar
|
|
140
79
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
80
|
## [1.20.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.20.1) (2025-08-11)
|
|
146
81
|
|
|
147
|
-
|
|
148
82
|
### Bug Fixes
|
|
149
83
|
|
|
150
|
-
|
|
151
|
-
|
|
84
|
+
- fixed pie-lib/icons import [PD-5126](<[dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f)>)
|
|
152
85
|
|
|
153
86
|
### Features
|
|
154
87
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
88
|
+
- split pie-toolbox into multiple packages [PD-5126](<[7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2)>)
|
|
160
89
|
|
|
161
90
|
# [1.20.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/math-toolbar@1.11.30...@pie-lib/math-toolbar@1.20.0) (2025-08-07)
|
|
162
91
|
|
package/esm/package.json
ADDED
package/lib/done-button.js
CHANGED
|
@@ -1,68 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.RawDoneButton = exports.DoneButton = void 0;
|
|
9
|
-
|
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var _Check = _interopRequireDefault(require("@material-ui/icons/Check"));
|
|
17
|
-
|
|
18
|
-
var _styles = require("@material-ui/core/styles");
|
|
19
|
-
|
|
10
|
+
var _IconButton = _interopRequireDefault(require("@mui/material/IconButton"));
|
|
11
|
+
var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
|
|
12
|
+
var _styles = require("@mui/material/styles");
|
|
20
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
+
var StyledIconButton = (0, _styles.styled)(_IconButton["default"])(function (_ref) {
|
|
17
|
+
var theme = _ref.theme,
|
|
18
|
+
hideBackground = _ref.hideBackground;
|
|
19
|
+
return _objectSpread(_objectSpread({
|
|
20
|
+
verticalAlign: 'top',
|
|
21
|
+
width: '28px',
|
|
22
|
+
height: '28px',
|
|
23
|
+
color: '#00bb00'
|
|
24
|
+
}, hideBackground && {
|
|
25
|
+
backgroundColor: theme.palette.common.white,
|
|
26
|
+
'&:hover': {
|
|
27
|
+
backgroundColor: theme.palette.grey[200]
|
|
28
|
+
}
|
|
29
|
+
}), {}, {
|
|
30
|
+
'& .MuiIconButton-label': {
|
|
31
|
+
position: 'absolute',
|
|
32
|
+
top: '2px'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
var RawDoneButton = exports.RawDoneButton = function RawDoneButton(_ref2) {
|
|
37
|
+
var onClick = _ref2.onClick,
|
|
38
|
+
hideBackground = _ref2.hideBackground;
|
|
39
|
+
return /*#__PURE__*/_react["default"].createElement(StyledIconButton, {
|
|
29
40
|
"aria-label": "Done",
|
|
30
|
-
className: classes.iconRoot,
|
|
31
41
|
onClick: onClick,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
root: (0, _classnames["default"])(classes.iconRoot, (0, _defineProperty2["default"])({}, classes.hideBackground, hideBackground))
|
|
35
|
-
}
|
|
42
|
+
hideBackground: hideBackground,
|
|
43
|
+
size: "large"
|
|
36
44
|
}, /*#__PURE__*/_react["default"].createElement(_Check["default"], null));
|
|
37
45
|
};
|
|
38
|
-
|
|
39
|
-
exports.RawDoneButton = RawDoneButton;
|
|
40
46
|
RawDoneButton.propTypes = {
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
onClick: _propTypes["default"].func,
|
|
48
|
+
hideBackground: _propTypes["default"].bool
|
|
43
49
|
};
|
|
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;
|
|
50
|
+
var DoneButton = exports.DoneButton = RawDoneButton;
|
|
68
51
|
//# sourceMappingURL=done-button.js.map
|
package/lib/done-button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"done-button.js","names":["_react","_interopRequireDefault","require","_IconButton","_Check","_styles","_propTypes","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","StyledIconButton","styled","IconButton","_ref","theme","hideBackground","verticalAlign","width","height","color","backgroundColor","palette","common","white","grey","position","top","RawDoneButton","exports","_ref2","onClick","createElement","size","propTypes","PropTypes","func","bool","DoneButton"],"sources":["../src/done-button.jsx"],"sourcesContent":["import React from 'react';\n\nimport IconButton from '@mui/material/IconButton';\nimport Check from '@mui/icons-material/Check';\nimport { styled } from '@mui/material/styles';\nimport PropTypes from 'prop-types';\n\nconst StyledIconButton = styled(IconButton)(({ theme, hideBackground }) => ({\n verticalAlign: 'top',\n width: '28px',\n height: '28px',\n color: '#00bb00',\n ...(hideBackground && {\n backgroundColor: theme.palette.common.white,\n '&:hover': {\n backgroundColor: theme.palette.grey[200],\n },\n }),\n '& .MuiIconButton-label': {\n position: 'absolute',\n top: '2px',\n },\n}));\n\nexport const RawDoneButton = ({ onClick, hideBackground }) => (\n <StyledIconButton\n aria-label=\"Done\"\n onClick={onClick}\n hideBackground={hideBackground}\n size=\"large\"\n >\n <Check />\n </StyledIconButton>\n);\n\nRawDoneButton.propTypes = {\n onClick: PropTypes.func,\n hideBackground: PropTypes.bool,\n};\n\nexport const DoneButton = RawDoneButton;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAmC,SAAAK,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,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