@pie-lib/math-input-mathlive 1.1.5-beta.4 → 1.1.5-beta.6

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/src/mf/static.jsx CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  trackPlaceholderCaret,
12
12
  } from '../mathlive-instance';
13
13
  import { toMathLive, fromMathLive, fieldIds } from '../latex-bridge';
14
- import { placeholderStyles, rootIndexStyles } from './common-styles';
14
+ import { placeholderStyles, rootIndexStyles, parallelStyles } from './common-styles';
15
15
 
16
16
  const log = debug('pie-lib:math-input-mathlive:static');
17
17
 
@@ -22,6 +22,7 @@ const Holder = styled('span')({
22
22
  // Readable radical index - display mode renders in the light DOM, so the
23
23
  // shadow-root copy of this rule does not reach it.
24
24
  ...rootIndexStyles,
25
+ ...parallelStyles,
25
26
  '& math-field': {
26
27
  display: 'inline-block',
27
28
  border: 'none',
@@ -101,6 +102,8 @@ export default class Static extends React.Component {
101
102
  // Without this the spacebar does nothing: MathLive's mathModeSpace
102
103
  // defaults to an empty string.
103
104
  this.mathField.mathModeSpace = MATH_MODE_SPACE;
105
+ // Same as the editor: stay in the exponent after a digit (see mf/input.jsx).
106
+ this.mathField.smartSuperscript = false;
104
107
  this.mathField.value = toMathLive(this.props.latex);
105
108
 
106
109
  // The mathfield renders in shadow DOM, so page CSS cannot reach it - the