@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/lib/keypad/index.js +36 -12
- package/lib/keypad/index.js.map +1 -1
- package/lib/latex-bridge.js +11 -1
- package/lib/latex-bridge.js.map +1 -1
- package/lib/mathlive-instance.js +4 -1
- package/lib/mathlive-instance.js.map +1 -1
- package/lib/mf/common-styles.js +17 -2
- package/lib/mf/common-styles.js.map +1 -1
- package/lib/mf/index.js +6 -0
- package/lib/mf/index.js.map +1 -1
- package/lib/mf/input.js +5 -0
- package/lib/mf/input.js.map +1 -1
- package/lib/mf/static.js +4 -2
- package/lib/mf/static.js.map +1 -1
- package/package.json +1 -1
- package/src/keypad/index.jsx +18 -3
- package/src/latex-bridge.js +12 -1
- package/src/mathlive-instance.js +8 -2
- package/src/mf/common-styles.js +19 -0
- package/src/mf/index.js +2 -0
- package/src/mf/input.jsx +5 -0
- package/src/mf/static.jsx +4 -1
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
|