@pie-element/math-templated 3.4.10-next.6 → 3.5.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/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.4.2/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.11.2/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.4.3/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_math_input, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_correct_answer_toggle} from "../../../@pie-lib/pie-toolbox-module@5.11.3/module/index.js";
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
5
5
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -6105,16 +6105,16 @@ Transition.ENTERED = 3;
6105
6105
  Transition.EXITING = 4;
6106
6106
  var _default$2$ = (0, _reactLifecyclesCompat.polyfill)(Transition);
6107
6107
  Transition$1.default = _default$2$;
6108
- var utils$7 = {};
6109
- Object.defineProperty(utils$7, "__esModule", {
6108
+ var utils$8 = {};
6109
+ Object.defineProperty(utils$8, "__esModule", {
6110
6110
  value: true
6111
6111
  });
6112
- utils$7.getTransitionProps = getTransitionProps;
6113
- utils$7.reflow = void 0;
6112
+ utils$8.getTransitionProps = getTransitionProps;
6113
+ utils$8.reflow = void 0;
6114
6114
  var reflow = function reflow(node) {
6115
6115
  return node.scrollTop;
6116
6116
  };
6117
- utils$7.reflow = reflow;
6117
+ utils$8.reflow = reflow;
6118
6118
  function getTransitionProps(props, options) {
6119
6119
  var timeout = props.timeout, _props$style = props.style, style = _props$style === void 0 ? {} : _props$style;
6120
6120
  return {
@@ -6140,7 +6140,7 @@ var _react$2J = _interopRequireDefault$3y(require$$8$J);
6140
6140
  var _propTypes$1$ = _interopRequireDefault$3y(require$$9$W);
6141
6141
  var _Transition$6 = _interopRequireDefault$3y(Transition$1);
6142
6142
  var _withTheme$6 = _interopRequireDefault$3y(withTheme);
6143
- var _utils$1G = utils$7;
6143
+ var _utils$1G = utils$8;
6144
6144
  function getScale(value) {
6145
6145
  return ("scale(").concat(value, ", ").concat(Math.pow(value, 2), ")");
6146
6146
  }
@@ -137051,7 +137051,7 @@ var _propTypes$1V = _interopRequireDefault$3i(require$$9$N);
137051
137051
  var _Transition$5 = _interopRequireDefault$3i(Transition$1);
137052
137052
  var _transitions$7 = transitions;
137053
137053
  var _withTheme$5 = _interopRequireDefault$3i(withTheme);
137054
- var _utils$1D = utils$7;
137054
+ var _utils$1D = utils$8;
137055
137055
  var styles$1F = {
137056
137056
  entering: {
137057
137057
  opacity: 1
@@ -139217,7 +139217,7 @@ var _Transition$3 = _interopRequireDefault$3a(Transition$1);
139217
139217
  var _utils$1z = require$$16$4;
139218
139218
  var _withStyles$1q = _interopRequireDefault$3a(withStyles);
139219
139219
  var _transitions$6 = transitions;
139220
- var _utils2$3 = utils$7;
139220
+ var _utils2$3 = utils$8;
139221
139221
  var styles$1z = function styles(theme) {
139222
139222
  return {
139223
139223
  container: {
@@ -141924,13 +141924,13 @@ InputLabel$1.default = _default$2r;
141924
141924
  var index$1v = getDefaultExportFromCjs(InputLabel$2);
141925
141925
  var FormControl$2 = {};
141926
141926
  var FormControl$1 = {};
141927
- var utils$6 = {};
141928
- Object.defineProperty(utils$6, "__esModule", {
141927
+ var utils$7 = {};
141928
+ Object.defineProperty(utils$7, "__esModule", {
141929
141929
  value: true
141930
141930
  });
141931
- utils$6.hasValue = hasValue;
141932
- utils$6.isFilled = isFilled;
141933
- utils$6.isAdornedStart = isAdornedStart;
141931
+ utils$7.hasValue = hasValue;
141932
+ utils$7.isFilled = isFilled;
141933
+ utils$7.isAdornedStart = isAdornedStart;
141934
141934
  function hasValue(value) {
141935
141935
  return value != null && !(Array.isArray(value) && value.length === 0);
141936
141936
  }
@@ -141961,7 +141961,7 @@ var _react$2h = _interopRequireDefault$2S(require$$9$F);
141961
141961
  var _propTypes$1G = _interopRequireDefault$2S(require$$10$z);
141962
141962
  var _classnames$1i = _interopRequireDefault$2S(require$$11$s);
141963
141963
  var _utils$1s = require$$16$4;
141964
- var _utils2$2 = utils$6;
141964
+ var _utils2$2 = utils$7;
141965
141965
  var _withStyles$1j = _interopRequireDefault$2S(withStyles);
141966
141966
  var _helpers$q = helpers;
141967
141967
  var _reactHelpers$9 = reactHelpers;
@@ -146791,6 +146791,18 @@ const require$$18$3 = _dll_classnames;
146791
146791
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleImageLoad", function () {
146792
146792
  _this.updateDimensions();
146793
146793
  });
146794
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleTouchStart", function (e) {
146795
+ e.preventDefault();
146796
+ _this.touchStartTimer = setTimeout(function () {
146797
+ _this.startDrag();
146798
+ }, 300);
146799
+ });
146800
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "startDrag", function () {
146801
+ var _this$props = _this.props, connectDragSource = _this$props.connectDragSource, disabled = _this$props.disabled;
146802
+ if (!disabled) {
146803
+ connectDragSource(_this.rootRef);
146804
+ }
146805
+ });
146794
146806
  _this.state = {
146795
146807
  height: 0,
146796
146808
  width: 0
@@ -146814,6 +146826,11 @@ const require$$18$3 = _dll_classnames;
146814
146826
  key: "componentDidMount",
146815
146827
  value: function componentDidMount() {
146816
146828
  this.handleElements();
146829
+ if (this.rootRef) {
146830
+ this.rootRef.addEventListener('touchstart', this.handleTouchStart, {
146831
+ passive: false
146832
+ });
146833
+ }
146817
146834
  }
146818
146835
  }, {
146819
146836
  key: "componentDidUpdate",
@@ -146832,6 +146849,13 @@ const require$$18$3 = _dll_classnames;
146832
146849
  this.handleElements();
146833
146850
  }
146834
146851
  }
146852
+ }, {
146853
+ key: "componentWillUnmount",
146854
+ value: function componentWillUnmount() {
146855
+ if (this.rootRef) {
146856
+ this.rootRef.removeEventListener('touchstart', this.handleTouchStart);
146857
+ }
146858
+ }
146835
146859
  }, {
146836
146860
  key: "updateDimensions",
146837
146861
  value: function updateDimensions() {
@@ -146883,7 +146907,7 @@ const require$$18$3 = _dll_classnames;
146883
146907
  key: "render",
146884
146908
  value: function render() {
146885
146909
  var _this3 = this, _classnames2;
146886
- var _this$props = this.props, disabled = _this$props.disabled, choice = _this$props.choice, classes = _this$props.classes, isOver = _this$props.isOver, dragItem = _this$props.dragItem, correct = _this$props.correct;
146910
+ var _this$props2 = this.props, disabled = _this$props2.disabled, choice = _this$props2.choice, classes = _this$props2.classes, isOver = _this$props2.isOver, dragItem = _this$props2.dragItem, correct = _this$props2.correct;
146887
146911
  var draggedLabel = dragItem && isOver && dragItem.choice.value;
146888
146912
  var label = choice && choice.value;
146889
146913
  return _react["default"].createElement(_Chip["default"], {
@@ -154178,7 +154202,7 @@ var _Transition$1 = _interopRequireDefault$2m(Transition$1);
154178
154202
  var _ownerWindow = _interopRequireDefault$2m(ownerWindow$1);
154179
154203
  var _withTheme$4 = _interopRequireDefault$2m(withTheme);
154180
154204
  var _transitions$4 = transitions;
154181
- var _utils$1e = utils$7;
154205
+ var _utils$1e = utils$8;
154182
154206
  var GUTTER = 24;
154183
154207
  function getTranslateValue(props, node) {
154184
154208
  var direction = props.direction;
@@ -155479,7 +155503,7 @@ var _withFormControlContext$5 = _interopRequireDefault$2e(withFormControlContext
155479
155503
  var _withStyles$Q = _interopRequireDefault$2e(withStyles);
155480
155504
  var _reactHelpers$3 = reactHelpers;
155481
155505
  var _Textarea = _interopRequireDefault$2e(Textarea$1);
155482
- var _utils2$1 = utils$6;
155506
+ var _utils2$1 = utils$7;
155483
155507
  var styles$Y = function styles(theme) {
155484
155508
  var light = theme.palette.type === 'light';
155485
155509
  var placeholder = {
@@ -159979,7 +160003,7 @@ var _classnames$p = _interopRequireDefault$1C(require$$13$5);
159979
160003
  var _warning$4 = _interopRequireDefault$1C(warning_1);
159980
160004
  var _utils$V = require$$16$4;
159981
160005
  var _Menu = _interopRequireDefault$1C(Menu$1);
159982
- var _utils2 = utils$6;
160006
+ var _utils2 = utils$7;
159983
160007
  var _reactHelpers$1 = reactHelpers;
159984
160008
  function areEqualValues(a, b) {
159985
160009
  if ((0, _typeof2.default)(b) === 'object' && b !== null) {
@@ -161629,7 +161653,7 @@ var _reactDom$2 = _interopRequireDefault$1o(require$$12$9);
161629
161653
  var _Drawer = _interopRequireWildcard$4(Drawer$1);
161630
161654
  var _transitions$1 = transitions;
161631
161655
  var _withTheme$2 = _interopRequireDefault$1o(withTheme);
161632
- var _utils$Q = utils$7;
161656
+ var _utils$Q = utils$8;
161633
161657
  var _NoSsr = _interopRequireDefault$1o(NoSsr$2);
161634
161658
  var _SwipeArea = _interopRequireDefault$1o(SwipeArea$1);
161635
161659
  var UNCERTAINTY_THRESHOLD = 3;
@@ -164315,7 +164339,7 @@ var _propTypes$4 = _interopRequireDefault$10(require$$9$d);
164315
164339
  var _Transition = _interopRequireDefault$10(Transition$1);
164316
164340
  var _transitions = transitions;
164317
164341
  var _withTheme = _interopRequireDefault$10(withTheme);
164318
- var _utils$G = utils$7;
164342
+ var _utils$G = utils$8;
164319
164343
  var styles$5 = {
164320
164344
  entering: {
164321
164345
  transform: 'scale(1)'
@@ -165910,13 +165934,13 @@ var greaterThanEqual = set$f({
165910
165934
  });
165911
165935
  comparison$2.greaterThanEqual = greaterThanEqual;
165912
165936
  var vars$1 = {};
165913
- var utils$5 = {};
165937
+ var utils$6 = {};
165914
165938
  const require$$3$b = _dll_lodash;
165915
165939
  var _interopRequireDefault$W = interopRequireDefault.exports;
165916
- Object.defineProperty(utils$5, "__esModule", {
165940
+ Object.defineProperty(utils$6, "__esModule", {
165917
165941
  value: true
165918
165942
  });
165919
- utils$5.transformToKeySetStructure = utils$5.toKey = utils$5.toArray = utils$5.mkSet = utils$5.extendKeySet = void 0;
165943
+ utils$6.transformToKeySetStructure = utils$6.toKey = utils$6.toArray = utils$6.mkSet = utils$6.extendKeySet = void 0;
165920
165944
  var _toConsumableArray2$2 = _interopRequireDefault$W(toConsumableArray$1.exports);
165921
165945
  var _defineProperty2$5 = _interopRequireDefault$W(defineProperty$5.exports);
165922
165946
  var _lodash = _interopRequireDefault$W(require$$3$b);
@@ -165948,13 +165972,13 @@ var mkSet = function mkSet(category) {
165948
165972
  });
165949
165973
  };
165950
165974
  };
165951
- utils$5.mkSet = mkSet;
165975
+ utils$6.mkSet = mkSet;
165952
165976
  var toArray = function toArray(o) {
165953
165977
  return Object.keys(o).map(function (k) {
165954
165978
  return o[k];
165955
165979
  });
165956
165980
  };
165957
- utils$5.toArray = toArray;
165981
+ utils$6.toArray = toArray;
165958
165982
  var toKey = function toKey(category) {
165959
165983
  return function (v) {
165960
165984
  if (typeof v === 'string') {
@@ -165971,7 +165995,7 @@ var toKey = function toKey(category) {
165971
165995
  }
165972
165996
  };
165973
165997
  };
165974
- utils$5.toKey = toKey;
165998
+ utils$6.toKey = toKey;
165975
165999
  var transformToKeySetStructure = function transformToKeySetStructure() {
165976
166000
  var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
165977
166001
  var structure = [];
@@ -165989,7 +166013,7 @@ var transformToKeySetStructure = function transformToKeySetStructure() {
165989
166013
  }
165990
166014
  return structure;
165991
166015
  };
165992
- utils$5.transformToKeySetStructure = transformToKeySetStructure;
166016
+ utils$6.transformToKeySetStructure = transformToKeySetStructure;
165993
166017
  var latexAndNameDontExist = function latexAndNameDontExist(base) {
165994
166018
  return function (k) {
165995
166019
  var flattened = _lodash["default"].flatten(base);
@@ -166019,12 +166043,12 @@ var extendKeySet = function extendKeySet() {
166019
166043
  }
166020
166044
  return _final;
166021
166045
  };
166022
- utils$5.extendKeySet = extendKeySet;
166046
+ utils$6.extendKeySet = extendKeySet;
166023
166047
  Object.defineProperty(vars$1, "__esModule", {
166024
166048
  value: true
166025
166049
  });
166026
166050
  vars$1.y = vars$1.x = vars$1.theta = void 0;
166027
- var _utils$F = utils$5;
166051
+ var _utils$F = utils$6;
166028
166052
  var set$e = (0, _utils$F.mkSet)('vars');
166029
166053
  var x = set$e({
166030
166054
  name: 'X',
@@ -166049,7 +166073,7 @@ Object.defineProperty(fractions$2, "__esModule", {
166049
166073
  value: true
166050
166074
  });
166051
166075
  fractions$2.xOverBlank = fractions$2.xBlankBlank = fractions$2.blankOverBlank = void 0;
166052
- var _utils$E = utils$5;
166076
+ var _utils$E = utils$6;
166053
166077
  var set$d = (0, _utils$E.mkSet)('fractions');
166054
166078
  var blankOverBlank = set$d({
166055
166079
  name: 'blank/blank',
@@ -166079,7 +166103,7 @@ Object.defineProperty(exponent$2, "__esModule", {
166079
166103
  value: true
166080
166104
  });
166081
166105
  exponent$2.xToPowerOfN = exponent$2.squared = exponent$2.squareRoot = exponent$2.nthRoot = void 0;
166082
- var _utils$D = utils$5;
166106
+ var _utils$D = utils$6;
166083
166107
  var set$c = (0, _utils$D.mkSet)('exponent');
166084
166108
  var squared = set$c({
166085
166109
  name: 'Squared',
@@ -166111,7 +166135,7 @@ Object.defineProperty(misc$2, "__esModule", {
166111
166135
  value: true
166112
166136
  });
166113
166137
  misc$2.similar = misc$2.plusMinus = misc$2.percentage = misc$2.parenthesis = misc$2.notSimilar = misc$2.notEqual = misc$2.nApprox = misc$2.brackets = misc$2.approx = misc$2.absValue = void 0;
166114
- var _utils$C = utils$5;
166138
+ var _utils$C = utils$6;
166115
166139
  var set$b = (0, _utils$C.mkSet)('misc');
166116
166140
  var plusMinus = set$b({
166117
166141
  name: 'Plus or Minus',
@@ -166181,7 +166205,7 @@ Object.defineProperty(constants$2, "__esModule", {
166181
166205
  value: true
166182
166206
  });
166183
166207
  constants$2.pi = constants$2.infinity = constants$2.halfInfinity = constants$2.eulers = void 0;
166184
- var _utils$B = utils$5;
166208
+ var _utils$B = utils$6;
166185
166209
  var set$a = (0, _utils$B.mkSet)('constants');
166186
166210
  var pi = set$a({
166187
166211
  name: 'Pi',
@@ -166220,7 +166244,7 @@ Object.defineProperty(trigonometry$1, "__esModule", {
166220
166244
  value: true
166221
166245
  });
166222
166246
  trigonometry$1.tan = trigonometry$1.sin = trigonometry$1.sec = trigonometry$1.csc = trigonometry$1.cot = trigonometry$1.cos = void 0;
166223
- var _utils$A = utils$5;
166247
+ var _utils$A = utils$6;
166224
166248
  var set$9 = (0, _utils$A.mkSet)('trigonometry');
166225
166249
  var sin = set$9({
166226
166250
  name: 'sine',
@@ -166443,7 +166467,7 @@ Object.defineProperty(operators$1, "__esModule", {
166443
166467
  value: true
166444
166468
  });
166445
166469
  operators$1.circleDot = void 0;
166446
- var _utils$z = utils$5;
166470
+ var _utils$z = utils$6;
166447
166471
  var set$7 = (0, _utils$z.mkSet)('operators');
166448
166472
  var circleDot = set$7({
166449
166473
  name: 'CircleDot',
@@ -166457,7 +166481,7 @@ Object.defineProperty(log$4, "__esModule", {
166457
166481
  value: true
166458
166482
  });
166459
166483
  log$4.logSubscript = log$4.log = log$4.ln = void 0;
166460
- var _utils$y = utils$5;
166484
+ var _utils$y = utils$6;
166461
166485
  var set$6 = (0, _utils$y.mkSet)('log');
166462
166486
  var log$3 = set$6({
166463
166487
  name: 'Log',
@@ -166485,7 +166509,7 @@ Object.defineProperty(subSup$1, "__esModule", {
166485
166509
  value: true
166486
166510
  });
166487
166511
  subSup$1.superscript = subSup$1.subscript = void 0;
166488
- var _utils$x = utils$5;
166512
+ var _utils$x = utils$6;
166489
166513
  var set$5 = (0, _utils$x.mkSet)('sub-sup');
166490
166514
  var superscript = set$5({
166491
166515
  name: 'Superscript',
@@ -166504,7 +166528,7 @@ Object.defineProperty(statistics$1, "__esModule", {
166504
166528
  value: true
166505
166529
  });
166506
166530
  statistics$1.yBar = statistics$1.xBar = statistics$1.smallSigma = statistics$1.sigma = statistics$1.mu = void 0;
166507
- var _utils$w = utils$5;
166531
+ var _utils$w = utils$6;
166508
166532
  var set$4 = (0, _utils$w.mkSet)('statistics');
166509
166533
  var xBar = set$4({
166510
166534
  name: 'X Bar',
@@ -166563,7 +166587,7 @@ Object.defineProperty(basicOperators$1, "__esModule", {
166563
166587
  });
166564
166588
  basicOperators$1.plus = basicOperators$1.multiply = basicOperators$1.minus = basicOperators$1.equals = basicOperators$1.divide = void 0;
166565
166589
  var _chars$2 = chars;
166566
- var _utils$v = utils$5;
166590
+ var _utils$v = utils$6;
166567
166591
  var set$3 = (0, _utils$v.mkSet)('operators');
166568
166592
  var equals = set$3({
166569
166593
  write: '=',
@@ -166598,7 +166622,7 @@ Object.defineProperty(matrices$1, "__esModule", {
166598
166622
  value: true
166599
166623
  });
166600
166624
  matrices$1.singleCellMatrix = matrices$1.doubleCellMatrix = void 0;
166601
- var _utils$u = utils$5;
166625
+ var _utils$u = utils$6;
166602
166626
  var set$2 = (0, _utils$u.mkSet)('matrices');
166603
166627
  var singleCellMatrix = set$2({
166604
166628
  name: 'Single Cell Matrix',
@@ -166667,7 +166691,7 @@ Object.defineProperty(logic$1, "__esModule", {
166667
166691
  value: true
166668
166692
  });
166669
166693
  logic$1.therefore = logic$1.longDivision = void 0;
166670
- var _utils$t = utils$5;
166694
+ var _utils$t = utils$6;
166671
166695
  var set$1 = (0, _utils$t.mkSet)('logic');
166672
166696
  var therefore = set$1({
166673
166697
  name: 'Therefore',
@@ -166687,7 +166711,7 @@ Object.defineProperty(navigation, "__esModule", {
166687
166711
  });
166688
166712
  navigation.right = navigation.left = void 0;
166689
166713
  var _chars$1 = chars;
166690
- var _utils$s = utils$5;
166714
+ var _utils$s = utils$6;
166691
166715
  var set = (0, _utils$s.mkSet)('navigation');
166692
166716
  var left = set({
166693
166717
  label: _chars$1.LEFT_ARROW,
@@ -168150,7 +168174,7 @@ const require$$9$8 = _dll_prop_types;
168150
168174
  var _react = _interopRequireDefault(require$$8$8);
168151
168175
  var _propTypes = _interopRequireDefault(require$$9$8);
168152
168176
  var _grades = grades;
168153
- var _utils = utils$5;
168177
+ var _utils = utils$6;
168154
168178
  var _keypad = _interopRequireDefault(keypad);
168155
168179
  function _createSuper(Derived) {
168156
168180
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
@@ -168342,6 +168366,22 @@ getDefaultExportFromCjs(horizontalKeypad);
168342
168366
  exports.removeBrackets = removeBrackets;
168343
168367
  })(mathInput);
168344
168368
  getDefaultExportFromCjs(mathInput);
168369
+ var utils$5 = {};
168370
+ Object.defineProperty(utils$5, "__esModule", {
168371
+ value: true
168372
+ });
168373
+ utils$5.markFractionBaseSuperscripts = void 0;
168374
+ var markFractionBaseSuperscripts = function markFractionBaseSuperscripts() {
168375
+ document.querySelectorAll('.mq-supsub.mq-sup-only').forEach(function (supsub) {
168376
+ var prev = supsub.previousElementSibling;
168377
+ if (prev && prev.classList.contains('mq-non-leaf') && prev.querySelector('.mq-fraction')) {
168378
+ supsub.classList.add('mq-after-fraction-group');
168379
+ } else {
168380
+ supsub.classList.remove('mq-after-fraction-group');
168381
+ }
168382
+ });
168383
+ };
168384
+ utils$5.markFractionBaseSuperscripts = markFractionBaseSuperscripts;
168345
168385
  const require$$9$7 = _dll_react;
168346
168386
  const require$$10$9 = _dll_debug;
168347
168387
  const require$$11$6 = _dll_prop_types;
@@ -168371,6 +168411,7 @@ const {isEqual: require$$18$2} = _dll_lodash;
168371
168411
  var _MenuItem = _interopRequireDefault(MenuItem$2);
168372
168412
  var _Select = _interopRequireDefault(Select$2);
168373
168413
  var _isEqual = _interopRequireDefault(require$$18$2);
168414
+ var _utils = utils$5;
168374
168415
  function _createSuper(Derived) {
168375
168416
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
168376
168417
  return function _createSuperInternal() {
@@ -168493,6 +168534,7 @@ const {isEqual: require$$18$2} = _dll_lodash;
168493
168534
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onEditorChange", function (latex) {
168494
168535
  var _this$props2 = _this.props, onChange = _this$props2.onChange, noDecimal = _this$props2.noDecimal;
168495
168536
  (0, _mathInput.updateSpans)();
168537
+ (0, _utils.markFractionBaseSuperscripts)();
168496
168538
  _this.updateDisable(true);
168497
168539
  if (noDecimal && (latex.indexOf('.') !== -1 || latex.indexOf(',') !== -1) && _this.input) {
168498
168540
  _this.input.clear();
@@ -168785,6 +168827,12 @@ const {isEqual: require$$18$2} = _dll_lodash;
168785
168827
  marginBottom: '0px !important'
168786
168828
  }
168787
168829
  },
168830
+ '& .mq-math-mode .mq-fraction + .mq-supsub.mq-sup-only': {
168831
+ verticalAlign: '0.4em !important'
168832
+ },
168833
+ '& .mq-math-mode .mq-supsub.mq-sup-only.mq-after-fraction-group': {
168834
+ verticalAlign: '0.4em !important'
168835
+ },
168788
168836
  '& .mq-math-mode .mq-denominator': {
168789
168837
  marginTop: '-5px !important',
168790
168838
  padding: '0.5em 0.1em 0.1em !important'
@@ -169047,6 +169095,7 @@ const require$$11$5 = _dll_prop_types;
169047
169095
  var _styles = styles$1I;
169048
169096
  var _propTypes = _interopRequireDefault(require$$11$5);
169049
169097
  var _mathInput = mathInput;
169098
+ var _utils = utils$5;
169050
169099
  function _createSuper(Derived) {
169051
169100
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
169052
169101
  return function _createSuperInternal() {
@@ -169080,6 +169129,18 @@ const require$$11$5 = _dll_prop_types;
169080
169129
  return _super.apply(this, arguments);
169081
169130
  }
169082
169131
  (0, _createClass2["default"])(RawMathPreview, [{
169132
+ key: "componentDidMount",
169133
+ value: function componentDidMount() {
169134
+ (0, _utils.markFractionBaseSuperscripts)();
169135
+ }
169136
+ }, {
169137
+ key: "componentDidUpdate",
169138
+ value: function componentDidUpdate(prevProps) {
169139
+ if (this.props.node.data.get('latex') !== prevProps.node.data.get('latex')) {
169140
+ (0, _utils.markFractionBaseSuperscripts)();
169141
+ }
169142
+ }
169143
+ }, {
169083
169144
  key: "render",
169084
169145
  value: function render() {
169085
169146
  log('[render] data: ', this.props.node.data);
@@ -169207,6 +169268,12 @@ const require$$11$5 = _dll_prop_types;
169207
169268
  marginBottom: '0px !important'
169208
169269
  }
169209
169270
  },
169271
+ '& .mq-math-mode .mq-fraction + .mq-supsub.mq-sup-only': {
169272
+ verticalAlign: '0.4em !important'
169273
+ },
169274
+ '& .mq-math-mode .mq-supsub.mq-sup-only.mq-after-fraction-group': {
169275
+ verticalAlign: '0.4em !important'
169276
+ },
169210
169277
  '& .mq-overarrow-inner': {
169211
169278
  paddingTop: '0 !important',
169212
169279
  border: 'none !important'
@@ -176070,7 +176137,7 @@ var _interopRequireDefault$a = interopRequireDefault.exports;
176070
176137
  Object.defineProperty(serialization, "__esModule", {
176071
176138
  value: true
176072
176139
  });
176073
- serialization.valueToHtml = serialization.reduceMultipleBrs = serialization.reactAttributes = serialization.parseStyleString = serialization.htmlToValue = serialization.getBase64 = serialization.extraCSSRulesOpts = serialization.TEXT_RULE = serialization.INLINE_TAGS = void 0;
176140
+ serialization.valueToHtml = serialization.reduceMultipleBrs = serialization.reactAttributes = serialization.parseStyleString = serialization.htmlToValue = serialization.handleHtml = serialization.getBase64 = serialization.extraCSSRulesOpts = serialization.TEXT_RULE = serialization.INLINE_TAGS = void 0;
176074
176141
  var _defineProperty2$1 = _interopRequireDefault$a(defineProperty$5.exports);
176075
176142
  var _slateHtmlSerializer = _interopRequireDefault$a(require$$2$C);
176076
176143
  var _react$a = _interopRequireDefault$a(require$$3$3);
@@ -176545,9 +176612,13 @@ var fixHtmlCode = function fixHtmlCode(markup) {
176545
176612
  parseNode(wrapperEl);
176546
176613
  return wrapperEl.innerHTML;
176547
176614
  };
176615
+ var handleHtml = function handleHtml(html) {
176616
+ return fixHtmlCode(reduceRedundantNewLineCharacters(reduceMultipleBrs(html)));
176617
+ };
176618
+ serialization.handleHtml = handleHtml;
176548
176619
  var htmlToValue = function htmlToValue(html) {
176549
176620
  try {
176550
- return serializer.deserialize(fixHtmlCode(reduceRedundantNewLineCharacters(reduceMultipleBrs(html))));
176621
+ return serializer.deserialize(handleHtml(html));
176551
176622
  } catch (e) {
176552
176623
  console.log("Couldn't parse html: ", e);
176553
176624
  return {};
@@ -179253,7 +179324,7 @@ const require$$21 = _dll_debug;
179253
179324
  exports.serialization = serialization$1;
179254
179325
  var _insertImageHandler = _interopRequireDefault(insertImageHandler);
179255
179326
  var _plugins = plugins;
179256
- var _excluded = ["customPlugins"];
179327
+ var _excluded = ["customPlugins", "showParagraphs"];
179257
179328
  function _getRequireWildcardCache(nodeInterop) {
179258
179329
  if (typeof WeakMap !== "function") return null;
179259
179330
  var cacheBabelInterop = new WeakMap();
@@ -180103,11 +180174,13 @@ const require$$21 = _dll_debug;
180103
180174
  }, {
180104
180175
  key: "render",
180105
180176
  value: function render() {
180106
- var _classNames, _this4 = this, _value$document;
180107
- var _this$props2 = this.props, disabled = _this$props2.disabled, spellCheck = _this$props2.spellCheck, highlightShape = _this$props2.highlightShape, classes = _this$props2.classes, className = _this$props2.className, placeholder = _this$props2.placeholder, pluginProps = _this$props2.pluginProps, onKeyDown = _this$props2.onKeyDown;
180177
+ var _classNames, _this4 = this, _value$document, _classNames2;
180178
+ var _this$props2 = this.props, disabled = _this$props2.disabled, spellCheck = _this$props2.spellCheck, highlightShape = _this$props2.highlightShape, classes = _this$props2.classes, className = _this$props2.className;
180179
+ _this$props2.isEditor;
180180
+ var placeholder = _this$props2.placeholder, pluginProps = _this$props2.pluginProps, onKeyDown = _this$props2.onKeyDown;
180108
180181
  var _ref4 = pluginProps || ({});
180109
180182
  _ref4.customPlugins;
180110
- var otherPluginProps = (0, _objectWithoutProperties2["default"])(_ref4, _excluded);
180183
+ var showParagraphs = _ref4.showParagraphs, otherPluginProps = (0, _objectWithoutProperties2["default"])(_ref4, _excluded);
180111
180184
  var _this$state4 = this.state, value = _this$state4.value, focusedNode = _this$state4.focusedNode, toolbarOpts = _this$state4.toolbarOpts, dialog = _this$state4.dialog, scheduled = _this$state4.scheduled;
180112
180185
  log('[render] value: ', value);
180113
180186
  var sizeStyle = this.buildSizeStyle();
@@ -180163,7 +180236,7 @@ const require$$21 = _dll_debug;
180163
180236
  readOnly: disabled,
180164
180237
  spellCheck: spellCheck,
180165
180238
  autoCorrect: spellCheck,
180166
- className: (0, _classnames["default"])((0, _defineProperty2["default"])({}, classes.noPadding, toolbarOpts === null || toolbarOpts === void 0 ? void 0 : toolbarOpts.noPadding), classes.slateEditor),
180239
+ className: (0, _classnames["default"])((_classNames2 = {}, (0, _defineProperty2["default"])(_classNames2, classes.noPadding, toolbarOpts === null || toolbarOpts === void 0 ? void 0 : toolbarOpts.noPadding), (0, _defineProperty2["default"])(_classNames2, classes.showParagraph, showParagraphs && !showParagraphs.disabled), _classNames2), classes.slateEditor),
180167
180240
  style: {
180168
180241
  minHeight: sizeStyle.minHeight,
180169
180242
  height: sizeStyle.height,
@@ -180226,6 +180299,7 @@ const require$$21 = _dll_debug;
180226
180299
  autoWidthToolbar: _propTypes["default"].bool,
180227
180300
  pluginProps: _propTypes["default"].any,
180228
180301
  placeholder: _propTypes["default"].string,
180302
+ isEditor: _propTypes["default"].bool,
180229
180303
  responseAreaProps: _propTypes["default"].shape({
180230
180304
  type: _propTypes["default"].oneOf(['explicit-constructed-response', 'inline-dropdown', 'drag-in-the-blank', 'math-templated']),
180231
180305
  options: _propTypes["default"].object,
@@ -180275,7 +180349,8 @@ const require$$21 = _dll_debug;
180275
180349
  toolbarOpts: defaultToolbarOpts,
180276
180350
  responseAreaProps: defaultResponseAreaProps,
180277
180351
  languageCharactersProps: defaultLanguageCharactersProps,
180278
- extraCSSRules: null
180352
+ extraCSSRules: null,
180353
+ isEditor: false
180279
180354
  });
180280
180355
  var styles = {
180281
180356
  withBg: {
@@ -180312,6 +180387,13 @@ const require$$21 = _dll_debug;
180312
180387
  border: '1px solid #dfe2e5'
180313
180388
  }
180314
180389
  },
180390
+ showParagraph: {
180391
+ '& > div:has(+ div)::after': {
180392
+ display: 'block',
180393
+ content: '"¶"',
180394
+ color: '#146EB3'
180395
+ }
180396
+ },
180315
180397
  toolbarOnTop: {
180316
180398
  marginTop: '45px'
180317
180399
  },
@@ -180496,7 +180578,7 @@ const require$$15 = _dll_debug;
180496
180578
  });
180497
180579
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function (value, done) {
180498
180580
  var html = (0, _serialization.valueToHtml)(value);
180499
- var htmlParsed = (0, _parseHtml.parseDegrees)(html);
180581
+ var htmlParsed = (0, _serialization.handleHtml)((0, _parseHtml.parseDegrees)(html));
180500
180582
  if (html !== _this.props.markup && _this.props.onChange) {
180501
180583
  _this.props.onChange(htmlParsed);
180502
180584
  }
@@ -180558,7 +180640,7 @@ const require$$15 = _dll_debug;
180558
180640
  return;
180559
180641
  }
180560
180642
  var v = (0, _serialization.htmlToValue)(props.markup);
180561
- var current = (0, _serialization.htmlToValue)(props.markup);
180643
+ var current = (0, _serialization.htmlToValue)(this.props.markup);
180562
180644
  if (v.equals && !v.equals(current)) {
180563
180645
  this.setState({
180564
180646
  value: v
@@ -4,11 +4,11 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "3.4.2"
7
+ "version": "3.4.3"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
11
- "version": "5.11.2"
11
+ "version": "5.11.3"
12
12
  }
13
13
  ]
14
14
  }