@pie-lib/math-toolbar 1.28.1 → 1.28.4
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/esm/index.css +847 -0
- package/esm/index.js +426 -1
- package/esm/index.js.map +1 -1
- package/package.json +5 -5
package/esm/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import isEqual from 'lodash/isEqual';
|
|
|
10
10
|
import { mq, updateSpans, HorizontalKeypad } from '@pie-lib/math-input';
|
|
11
11
|
import { InputContainer, color } from '@pie-lib/render-ui';
|
|
12
12
|
import IconButton from '@material-ui/core/IconButton';
|
|
13
|
-
import
|
|
13
|
+
import require$$3 from '@material-ui/core/SvgIcon';
|
|
14
14
|
|
|
15
15
|
function _extends() {
|
|
16
16
|
_extends = Object.assign || function (target) {
|
|
@@ -548,6 +548,431 @@ const styles$2 = theme => ({
|
|
|
548
548
|
|
|
549
549
|
var EditorAndPad$1 = withStyles(styles$2)(EditorAndPad);
|
|
550
550
|
|
|
551
|
+
function getDefaultExportFromCjs (x) {
|
|
552
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
var Check$1 = {};
|
|
556
|
+
|
|
557
|
+
var interopRequireDefault = {exports: {}};
|
|
558
|
+
|
|
559
|
+
var hasRequiredInteropRequireDefault;
|
|
560
|
+
|
|
561
|
+
function requireInteropRequireDefault () {
|
|
562
|
+
if (hasRequiredInteropRequireDefault) return interopRequireDefault.exports;
|
|
563
|
+
hasRequiredInteropRequireDefault = 1;
|
|
564
|
+
(function (module) {
|
|
565
|
+
function _interopRequireDefault(obj) {
|
|
566
|
+
return obj && obj.__esModule ? obj : {
|
|
567
|
+
"default": obj
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
572
|
+
} (interopRequireDefault));
|
|
573
|
+
return interopRequireDefault.exports;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
var createSvgIcon = {};
|
|
577
|
+
|
|
578
|
+
var pure = {};
|
|
579
|
+
|
|
580
|
+
var shouldUpdate = {};
|
|
581
|
+
|
|
582
|
+
var inheritsLoose = {exports: {}};
|
|
583
|
+
|
|
584
|
+
var setPrototypeOf = {exports: {}};
|
|
585
|
+
|
|
586
|
+
var hasRequiredSetPrototypeOf;
|
|
587
|
+
|
|
588
|
+
function requireSetPrototypeOf () {
|
|
589
|
+
if (hasRequiredSetPrototypeOf) return setPrototypeOf.exports;
|
|
590
|
+
hasRequiredSetPrototypeOf = 1;
|
|
591
|
+
(function (module) {
|
|
592
|
+
function _setPrototypeOf(o, p) {
|
|
593
|
+
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
594
|
+
o.__proto__ = p;
|
|
595
|
+
return o;
|
|
596
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
597
|
+
return _setPrototypeOf(o, p);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
601
|
+
} (setPrototypeOf));
|
|
602
|
+
return setPrototypeOf.exports;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
var hasRequiredInheritsLoose;
|
|
606
|
+
|
|
607
|
+
function requireInheritsLoose () {
|
|
608
|
+
if (hasRequiredInheritsLoose) return inheritsLoose.exports;
|
|
609
|
+
hasRequiredInheritsLoose = 1;
|
|
610
|
+
(function (module) {
|
|
611
|
+
var setPrototypeOf = requireSetPrototypeOf();
|
|
612
|
+
|
|
613
|
+
function _inheritsLoose(subClass, superClass) {
|
|
614
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
615
|
+
subClass.prototype.constructor = subClass;
|
|
616
|
+
setPrototypeOf(subClass, superClass);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
module.exports = _inheritsLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
620
|
+
} (inheritsLoose));
|
|
621
|
+
return inheritsLoose.exports;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
var setDisplayName = {};
|
|
625
|
+
|
|
626
|
+
var setStatic = {};
|
|
627
|
+
|
|
628
|
+
var hasRequiredSetStatic;
|
|
629
|
+
|
|
630
|
+
function requireSetStatic () {
|
|
631
|
+
if (hasRequiredSetStatic) return setStatic;
|
|
632
|
+
hasRequiredSetStatic = 1;
|
|
633
|
+
|
|
634
|
+
setStatic.__esModule = true;
|
|
635
|
+
setStatic.default = void 0;
|
|
636
|
+
|
|
637
|
+
var setStatic$1 = function setStatic(key, value) {
|
|
638
|
+
return function (BaseComponent) {
|
|
639
|
+
/* eslint-disable no-param-reassign */
|
|
640
|
+
BaseComponent[key] = value;
|
|
641
|
+
/* eslint-enable no-param-reassign */
|
|
642
|
+
|
|
643
|
+
return BaseComponent;
|
|
644
|
+
};
|
|
645
|
+
};
|
|
646
|
+
|
|
647
|
+
var _default = setStatic$1;
|
|
648
|
+
setStatic.default = _default;
|
|
649
|
+
return setStatic;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
var hasRequiredSetDisplayName;
|
|
653
|
+
|
|
654
|
+
function requireSetDisplayName () {
|
|
655
|
+
if (hasRequiredSetDisplayName) return setDisplayName;
|
|
656
|
+
hasRequiredSetDisplayName = 1;
|
|
657
|
+
|
|
658
|
+
var _interopRequireDefault = requireInteropRequireDefault();
|
|
659
|
+
|
|
660
|
+
setDisplayName.__esModule = true;
|
|
661
|
+
setDisplayName.default = void 0;
|
|
662
|
+
|
|
663
|
+
var _setStatic = _interopRequireDefault(requireSetStatic());
|
|
664
|
+
|
|
665
|
+
var setDisplayName$1 = function setDisplayName(displayName) {
|
|
666
|
+
return (0, _setStatic.default)('displayName', displayName);
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
var _default = setDisplayName$1;
|
|
670
|
+
setDisplayName.default = _default;
|
|
671
|
+
return setDisplayName;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
var wrapDisplayName = {};
|
|
675
|
+
|
|
676
|
+
var getDisplayName = {};
|
|
677
|
+
|
|
678
|
+
var hasRequiredGetDisplayName;
|
|
679
|
+
|
|
680
|
+
function requireGetDisplayName () {
|
|
681
|
+
if (hasRequiredGetDisplayName) return getDisplayName;
|
|
682
|
+
hasRequiredGetDisplayName = 1;
|
|
683
|
+
|
|
684
|
+
getDisplayName.__esModule = true;
|
|
685
|
+
getDisplayName.default = void 0;
|
|
686
|
+
|
|
687
|
+
var getDisplayName$1 = function getDisplayName(Component) {
|
|
688
|
+
if (typeof Component === 'string') {
|
|
689
|
+
return Component;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
if (!Component) {
|
|
693
|
+
return undefined;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
return Component.displayName || Component.name || 'Component';
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
var _default = getDisplayName$1;
|
|
700
|
+
getDisplayName.default = _default;
|
|
701
|
+
return getDisplayName;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
var hasRequiredWrapDisplayName;
|
|
705
|
+
|
|
706
|
+
function requireWrapDisplayName () {
|
|
707
|
+
if (hasRequiredWrapDisplayName) return wrapDisplayName;
|
|
708
|
+
hasRequiredWrapDisplayName = 1;
|
|
709
|
+
|
|
710
|
+
var _interopRequireDefault = requireInteropRequireDefault();
|
|
711
|
+
|
|
712
|
+
wrapDisplayName.__esModule = true;
|
|
713
|
+
wrapDisplayName.default = void 0;
|
|
714
|
+
|
|
715
|
+
var _getDisplayName = _interopRequireDefault(requireGetDisplayName());
|
|
716
|
+
|
|
717
|
+
var wrapDisplayName$1 = function wrapDisplayName(BaseComponent, hocName) {
|
|
718
|
+
return hocName + "(" + (0, _getDisplayName.default)(BaseComponent) + ")";
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
var _default = wrapDisplayName$1;
|
|
722
|
+
wrapDisplayName.default = _default;
|
|
723
|
+
return wrapDisplayName;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
var hasRequiredShouldUpdate;
|
|
727
|
+
|
|
728
|
+
function requireShouldUpdate () {
|
|
729
|
+
if (hasRequiredShouldUpdate) return shouldUpdate;
|
|
730
|
+
hasRequiredShouldUpdate = 1;
|
|
731
|
+
|
|
732
|
+
var _interopRequireDefault = requireInteropRequireDefault();
|
|
733
|
+
|
|
734
|
+
shouldUpdate.__esModule = true;
|
|
735
|
+
shouldUpdate.default = void 0;
|
|
736
|
+
|
|
737
|
+
var _inheritsLoose2 = _interopRequireDefault(requireInheritsLoose());
|
|
738
|
+
|
|
739
|
+
var _react = React;
|
|
740
|
+
|
|
741
|
+
var _setDisplayName = _interopRequireDefault(requireSetDisplayName());
|
|
742
|
+
|
|
743
|
+
var _wrapDisplayName = _interopRequireDefault(requireWrapDisplayName());
|
|
744
|
+
|
|
745
|
+
var shouldUpdate$1 = function shouldUpdate(test) {
|
|
746
|
+
return function (BaseComponent) {
|
|
747
|
+
var factory = (0, _react.createFactory)(BaseComponent);
|
|
748
|
+
|
|
749
|
+
var ShouldUpdate =
|
|
750
|
+
/*#__PURE__*/
|
|
751
|
+
function (_Component) {
|
|
752
|
+
(0, _inheritsLoose2.default)(ShouldUpdate, _Component);
|
|
753
|
+
|
|
754
|
+
function ShouldUpdate() {
|
|
755
|
+
return _Component.apply(this, arguments) || this;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
var _proto = ShouldUpdate.prototype;
|
|
759
|
+
|
|
760
|
+
_proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
|
|
761
|
+
return test(this.props, nextProps);
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
_proto.render = function render() {
|
|
765
|
+
return factory(this.props);
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
return ShouldUpdate;
|
|
769
|
+
}(_react.Component);
|
|
770
|
+
|
|
771
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
772
|
+
return (0, _setDisplayName.default)((0, _wrapDisplayName.default)(BaseComponent, 'shouldUpdate'))(ShouldUpdate);
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
return ShouldUpdate;
|
|
776
|
+
};
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
var _default = shouldUpdate$1;
|
|
780
|
+
shouldUpdate.default = _default;
|
|
781
|
+
return shouldUpdate;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
var shallowEqual = {};
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
788
|
+
*
|
|
789
|
+
* This source code is licensed under the MIT license found in the
|
|
790
|
+
* LICENSE file in the root directory of this source tree.
|
|
791
|
+
*
|
|
792
|
+
* @typechecks
|
|
793
|
+
*
|
|
794
|
+
*/
|
|
795
|
+
|
|
796
|
+
var shallowEqual_1;
|
|
797
|
+
var hasRequiredShallowEqual$1;
|
|
798
|
+
|
|
799
|
+
function requireShallowEqual$1 () {
|
|
800
|
+
if (hasRequiredShallowEqual$1) return shallowEqual_1;
|
|
801
|
+
hasRequiredShallowEqual$1 = 1;
|
|
802
|
+
|
|
803
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
807
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
808
|
+
*/
|
|
809
|
+
function is(x, y) {
|
|
810
|
+
// SameValue algorithm
|
|
811
|
+
if (x === y) {
|
|
812
|
+
// Steps 1-5, 7-10
|
|
813
|
+
// Steps 6.b-6.e: +0 != -0
|
|
814
|
+
// Added the nonzero y check to make Flow happy, but it is redundant
|
|
815
|
+
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
|
816
|
+
} else {
|
|
817
|
+
// Step 6.a: NaN == NaN
|
|
818
|
+
return x !== x && y !== y;
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* Performs equality by iterating through keys on an object and returning false
|
|
824
|
+
* when any key has values which are not strictly equal between the arguments.
|
|
825
|
+
* Returns true when the values of all keys are strictly equal.
|
|
826
|
+
*/
|
|
827
|
+
function shallowEqual(objA, objB) {
|
|
828
|
+
if (is(objA, objB)) {
|
|
829
|
+
return true;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
|
833
|
+
return false;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
var keysA = Object.keys(objA);
|
|
837
|
+
var keysB = Object.keys(objB);
|
|
838
|
+
|
|
839
|
+
if (keysA.length !== keysB.length) {
|
|
840
|
+
return false;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
// Test for A's keys different from B.
|
|
844
|
+
for (var i = 0; i < keysA.length; i++) {
|
|
845
|
+
if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
|
846
|
+
return false;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
return true;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
shallowEqual_1 = shallowEqual;
|
|
854
|
+
return shallowEqual_1;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
var hasRequiredShallowEqual;
|
|
858
|
+
|
|
859
|
+
function requireShallowEqual () {
|
|
860
|
+
if (hasRequiredShallowEqual) return shallowEqual;
|
|
861
|
+
hasRequiredShallowEqual = 1;
|
|
862
|
+
|
|
863
|
+
var _interopRequireDefault = requireInteropRequireDefault();
|
|
864
|
+
|
|
865
|
+
shallowEqual.__esModule = true;
|
|
866
|
+
shallowEqual.default = void 0;
|
|
867
|
+
|
|
868
|
+
var _shallowEqual = _interopRequireDefault(requireShallowEqual$1());
|
|
869
|
+
|
|
870
|
+
var _default = _shallowEqual.default;
|
|
871
|
+
shallowEqual.default = _default;
|
|
872
|
+
return shallowEqual;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
var hasRequiredPure;
|
|
876
|
+
|
|
877
|
+
function requirePure () {
|
|
878
|
+
if (hasRequiredPure) return pure;
|
|
879
|
+
hasRequiredPure = 1;
|
|
880
|
+
|
|
881
|
+
var _interopRequireDefault = requireInteropRequireDefault();
|
|
882
|
+
|
|
883
|
+
pure.__esModule = true;
|
|
884
|
+
pure.default = void 0;
|
|
885
|
+
|
|
886
|
+
var _shouldUpdate = _interopRequireDefault(requireShouldUpdate());
|
|
887
|
+
|
|
888
|
+
var _shallowEqual = _interopRequireDefault(requireShallowEqual());
|
|
889
|
+
|
|
890
|
+
var _setDisplayName = _interopRequireDefault(requireSetDisplayName());
|
|
891
|
+
|
|
892
|
+
var _wrapDisplayName = _interopRequireDefault(requireWrapDisplayName());
|
|
893
|
+
|
|
894
|
+
var pure$1 = function pure(BaseComponent) {
|
|
895
|
+
var hoc = (0, _shouldUpdate.default)(function (props, nextProps) {
|
|
896
|
+
return !(0, _shallowEqual.default)(props, nextProps);
|
|
897
|
+
});
|
|
898
|
+
|
|
899
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
900
|
+
return (0, _setDisplayName.default)((0, _wrapDisplayName.default)(BaseComponent, 'pure'))(hoc(BaseComponent));
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
return hoc(BaseComponent);
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
var _default = pure$1;
|
|
907
|
+
pure.default = _default;
|
|
908
|
+
return pure;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
var hasRequiredCreateSvgIcon;
|
|
912
|
+
|
|
913
|
+
function requireCreateSvgIcon () {
|
|
914
|
+
if (hasRequiredCreateSvgIcon) return createSvgIcon;
|
|
915
|
+
hasRequiredCreateSvgIcon = 1;
|
|
916
|
+
|
|
917
|
+
var _interopRequireDefault = requireInteropRequireDefault();
|
|
918
|
+
|
|
919
|
+
Object.defineProperty(createSvgIcon, "__esModule", {
|
|
920
|
+
value: true
|
|
921
|
+
});
|
|
922
|
+
createSvgIcon.default = void 0;
|
|
923
|
+
|
|
924
|
+
var _react = _interopRequireDefault(React);
|
|
925
|
+
|
|
926
|
+
var _pure = _interopRequireDefault(requirePure());
|
|
927
|
+
|
|
928
|
+
var _SvgIcon = _interopRequireDefault(require$$3);
|
|
929
|
+
|
|
930
|
+
function createSvgIcon$1(path, displayName) {
|
|
931
|
+
var Icon = function Icon(props) {
|
|
932
|
+
return _react.default.createElement(_SvgIcon.default, props, path);
|
|
933
|
+
};
|
|
934
|
+
|
|
935
|
+
Icon.displayName = "".concat(displayName, "Icon");
|
|
936
|
+
Icon = (0, _pure.default)(Icon);
|
|
937
|
+
Icon.muiName = 'SvgIcon';
|
|
938
|
+
return Icon;
|
|
939
|
+
}
|
|
940
|
+
var _default = createSvgIcon$1;
|
|
941
|
+
createSvgIcon.default = _default;
|
|
942
|
+
return createSvgIcon;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
var hasRequiredCheck;
|
|
946
|
+
|
|
947
|
+
function requireCheck () {
|
|
948
|
+
if (hasRequiredCheck) return Check$1;
|
|
949
|
+
hasRequiredCheck = 1;
|
|
950
|
+
|
|
951
|
+
var _interopRequireDefault = requireInteropRequireDefault();
|
|
952
|
+
|
|
953
|
+
Object.defineProperty(Check$1, "__esModule", {
|
|
954
|
+
value: true
|
|
955
|
+
});
|
|
956
|
+
Check$1.default = void 0;
|
|
957
|
+
|
|
958
|
+
var _react = _interopRequireDefault(React);
|
|
959
|
+
|
|
960
|
+
var _createSvgIcon = _interopRequireDefault(/*@__PURE__*/ requireCreateSvgIcon());
|
|
961
|
+
|
|
962
|
+
var _default = (0, _createSvgIcon.default)(_react.default.createElement(_react.default.Fragment, null, _react.default.createElement("path", {
|
|
963
|
+
fill: "none",
|
|
964
|
+
d: "M0 0h24v24H0z"
|
|
965
|
+
}), _react.default.createElement("path", {
|
|
966
|
+
d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
|
|
967
|
+
})), 'Check');
|
|
968
|
+
|
|
969
|
+
Check$1.default = _default;
|
|
970
|
+
return Check$1;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
var CheckExports = /*@__PURE__*/ requireCheck();
|
|
974
|
+
var Check = /*@__PURE__*/getDefaultExportFromCjs(CheckExports);
|
|
975
|
+
|
|
551
976
|
const RawDoneButton = ({
|
|
552
977
|
classes,
|
|
553
978
|
onClick,
|