rapier-math 2.2.0 → 2.4.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/README.md +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.mjs +1 -1
- package/dist/rapier-math.js +567 -143
- package/docs/api.md +6 -2
- package/docs/font-source.md +17 -11
- package/docs/math-components.json +6 -6
- package/docs/math-resources.json +45 -39
- package/package.json +1 -1
- package/src/math/api.js +2 -2
- package/src/math/browser.js +28 -17
- package/src/math/build-font.py +153 -226
- package/src/math/classic.js +1 -1
- package/src/math/font.js +66 -33
- package/src/math/layout.js +69 -29
- package/src/math/mathml.js +19 -12
- package/src/math/package-layout.mjs +1 -0
- package/src/math/parser.js +347 -32
- package/src/math/responsive.js +10 -7
- package/src/math/source.js +8 -3
- package/src/math/symbols.js +19 -9
- package/src/math/variants.js +2 -2
- package/src/tools/build-math.mjs +3 -3
- package/tests/typeset.mjs +172 -0
package/README.md
CHANGED
|
@@ -48,4 +48,4 @@ licensed under the GUST Font License. [LICENSE](LICENSE) contains both complete
|
|
|
48
48
|
[Component provenance](docs/math-components.json) and [source hashes](docs/math-resources.json)
|
|
49
49
|
travel with the package.
|
|
50
50
|
|
|
51
|
-
Version 2.
|
|
51
|
+
Version 2.4.0. Classic payload: 691650 bytes; gzip (level 9): 405497 bytes.
|
package/dist/index.d.ts
CHANGED
|
@@ -9,11 +9,19 @@ export interface MathError {
|
|
|
9
9
|
commandTruncated?: boolean;
|
|
10
10
|
/** True only when refused oversized source is not embedded in diagnostic SVG. */
|
|
11
11
|
sourceOmitted?: boolean;
|
|
12
|
+
/** For an unknown command or environment: the known name one or two edits away, such as `\\frac` for `\\farc`. */
|
|
13
|
+
suggestion?: string;
|
|
12
14
|
}
|
|
13
15
|
export interface RenderOptions {
|
|
14
16
|
displayMode?: boolean;
|
|
15
17
|
maxWidth?: number;
|
|
16
18
|
screen?: {fontSize: number; pixelRatio: number; dark: boolean};
|
|
19
|
+
/** Mend what is unfinished where a person is typing: at `caret`, or at the end. */
|
|
20
|
+
preview?: boolean;
|
|
21
|
+
/** With preview: the UTF-16 offset where the person is typing. */
|
|
22
|
+
caret?: number;
|
|
23
|
+
/** Mark each symbol with `data-math-at`, its UTF-16 offset in the source. */
|
|
24
|
+
spans?: boolean;
|
|
17
25
|
}
|
|
18
26
|
export interface RenderResult {
|
|
19
27
|
svg: string;
|
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import {parseMathTex as parse} from '../src/math/parser.js';
|
|
3
3
|
import {renderMath as render, mathRenderToString as renderToString} from '../src/math/api.js';
|
|
4
4
|
import {mathFit as fit, mathObserve as observe} from '../src/math/browser.js';
|
|
5
|
-
const version = "2.
|
|
5
|
+
const version = "2.4.0";
|
|
6
6
|
export {version, parse, render, renderToString, fit, observe};
|
|
7
7
|
export default Object.freeze({version, parse, render, renderToString, fit, observe});
|