@cortex-js/compute-engine 0.35.6 → 0.50.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 +121 -5
- package/dist/compute-engine.esm.js +50435 -44944
- package/dist/compute-engine.min.esm.js +1072 -69
- package/dist/compute-engine.min.umd.js +1072 -69
- package/dist/compute-engine.umd.js +50540 -45049
- package/dist/math-json.esm.js +2 -2
- package/dist/math-json.min.esm.js +2 -2
- package/dist/math-json.min.umd.js +2 -2
- package/dist/math-json.umd.js +2 -2
- package/dist/types/common/ansi-codes.d.ts +1 -1
- package/dist/types/common/configuration-change.d.ts +1 -1
- package/dist/types/common/fuzzy-string-match.d.ts +1 -1
- package/dist/types/common/grapheme-splitter.d.ts +1 -1
- package/dist/types/common/interruptible.d.ts +1 -1
- package/dist/types/common/one-of.d.ts +1 -1
- package/dist/types/common/signals.d.ts +1 -1
- package/dist/types/common/type/ast-nodes.d.ts +1 -1
- package/dist/types/common/type/boxed-type.d.ts +1 -1
- package/dist/types/common/type/lexer.d.ts +1 -1
- package/dist/types/common/type/parse.d.ts +1 -1
- package/dist/types/common/type/parser.d.ts +8 -1
- package/dist/types/common/type/primitive.d.ts +2 -1
- package/dist/types/common/type/reduce.d.ts +1 -1
- package/dist/types/common/type/serialize.d.ts +1 -1
- package/dist/types/common/type/subtype.d.ts +1 -1
- package/dist/types/common/type/type-builder.d.ts +1 -1
- package/dist/types/common/type/types.d.ts +1 -1
- package/dist/types/common/type/utils.d.ts +3 -2
- package/dist/types/common/utils.d.ts +1 -1
- package/dist/types/compute-engine/assume.d.ts +4 -22
- package/dist/types/compute-engine/boxed-expression/abstract-boxed-expression.d.ts +63 -76
- package/dist/types/compute-engine/boxed-expression/apply.d.ts +4 -4
- package/dist/types/compute-engine/boxed-expression/arithmetic-add.d.ts +15 -6
- package/dist/types/compute-engine/boxed-expression/arithmetic-mul-div.d.ts +72 -6
- package/dist/types/compute-engine/boxed-expression/arithmetic-power.d.ts +8 -8
- package/dist/types/compute-engine/boxed-expression/ascii-math.d.ts +5 -8
- package/dist/types/compute-engine/boxed-expression/box.d.ts +63 -8
- package/dist/types/compute-engine/boxed-expression/boxed-dictionary.d.ts +13 -12
- package/dist/types/compute-engine/boxed-expression/boxed-function.d.ts +44 -43
- package/dist/types/compute-engine/boxed-expression/boxed-number.d.ts +31 -30
- package/dist/types/compute-engine/boxed-expression/boxed-operator-definition.d.ts +18 -18
- package/dist/types/compute-engine/boxed-expression/boxed-patterns.d.ts +5 -37
- package/dist/types/compute-engine/boxed-expression/boxed-string.d.ts +5 -4
- package/dist/types/compute-engine/boxed-expression/boxed-symbol.d.ts +34 -33
- package/dist/types/compute-engine/boxed-expression/boxed-tensor.d.ts +34 -33
- package/dist/types/compute-engine/boxed-expression/boxed-value-definition.d.ts +8 -8
- package/dist/types/compute-engine/boxed-expression/cache.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/canonical-utils.d.ts +2 -2
- package/dist/types/compute-engine/boxed-expression/canonical.d.ts +2 -2
- package/dist/types/compute-engine/boxed-expression/compare.d.ts +4 -4
- package/dist/types/compute-engine/boxed-expression/constants.d.ts +6 -0
- package/dist/types/compute-engine/boxed-expression/expand.d.ts +4 -5
- package/dist/types/compute-engine/boxed-expression/expression-map.d.ts +9 -9
- package/dist/types/compute-engine/boxed-expression/factor.d.ts +7 -7
- package/dist/types/compute-engine/boxed-expression/flatten.d.ts +4 -13
- package/dist/types/compute-engine/boxed-expression/hold.d.ts +3 -3
- package/dist/types/compute-engine/boxed-expression/inequality-bounds.d.ts +21 -0
- package/dist/types/compute-engine/boxed-expression/invisible-operator.d.ts +4 -0
- package/dist/types/compute-engine/boxed-expression/match.d.ts +2 -2
- package/dist/types/compute-engine/boxed-expression/negate.d.ts +4 -4
- package/dist/types/compute-engine/boxed-expression/numerics.d.ts +8 -8
- package/dist/types/compute-engine/boxed-expression/order.d.ts +14 -14
- package/dist/types/compute-engine/boxed-expression/pattern-utils.d.ts +41 -0
- package/dist/types/compute-engine/boxed-expression/polynomial-degree.d.ts +18 -0
- package/dist/types/compute-engine/boxed-expression/polynomials.d.ts +12 -35
- package/dist/types/compute-engine/boxed-expression/predicates.d.ts +2 -0
- package/dist/types/compute-engine/boxed-expression/rules.d.ts +51 -51
- package/dist/types/compute-engine/boxed-expression/serialize.d.ts +3 -3
- package/dist/types/compute-engine/boxed-expression/sgn.d.ts +2 -2
- package/dist/types/compute-engine/boxed-expression/simplify.d.ts +2 -2
- package/dist/types/compute-engine/boxed-expression/solve-linear-system.d.ts +8 -8
- package/dist/types/compute-engine/boxed-expression/solve.d.ts +3 -11
- package/dist/types/compute-engine/boxed-expression/trigonometry.d.ts +7 -7
- package/dist/types/compute-engine/boxed-expression/type-guards.d.ts +31 -0
- package/dist/types/compute-engine/boxed-expression/utils.d.ts +13 -13
- package/dist/types/compute-engine/boxed-expression/validate.d.ts +10 -10
- package/dist/types/compute-engine/collection-utils.d.ts +4 -4
- package/dist/types/compute-engine/compilation/base-compiler.d.ts +3 -3
- package/dist/types/compute-engine/compilation/compile-expression.d.ts +25 -0
- package/dist/types/compute-engine/compilation/glsl-target.d.ts +12 -41
- package/dist/types/compute-engine/compilation/gpu-target.d.ts +50 -0
- package/dist/types/compute-engine/compilation/interval-glsl-target.d.ts +11 -11
- package/dist/types/compute-engine/compilation/interval-javascript-target.d.ts +7 -7
- package/dist/types/compute-engine/compilation/interval-wgsl-target.d.ts +54 -0
- package/dist/types/compute-engine/compilation/javascript-target.d.ts +6 -6
- package/dist/types/compute-engine/compilation/python-target.d.ts +61 -0
- package/dist/types/compute-engine/compilation/types.d.ts +27 -22
- package/dist/types/compute-engine/compilation/wgsl-target.d.ts +41 -0
- package/dist/types/compute-engine/cost-function.d.ts +3 -3
- package/dist/types/compute-engine/engine-assumptions.d.ts +6 -0
- package/dist/types/compute-engine/engine-cache.d.ts +6 -0
- package/dist/types/compute-engine/engine-common-symbols.d.ts +6 -0
- package/dist/types/compute-engine/engine-compilation-targets.d.ts +17 -0
- package/dist/types/compute-engine/engine-configuration-lifecycle.d.ts +15 -0
- package/dist/types/compute-engine/engine-declarations.d.ts +19 -0
- package/dist/types/compute-engine/engine-expression-entrypoints.d.ts +44 -0
- package/dist/types/compute-engine/engine-extension-contracts.d.ts +9 -0
- package/dist/types/compute-engine/engine-latex-dictionary-state.d.ts +13 -0
- package/dist/types/compute-engine/engine-library-bootstrap.d.ts +6 -0
- package/dist/types/compute-engine/engine-numeric-configuration.d.ts +34 -0
- package/dist/types/compute-engine/engine-parse-entrypoint.d.ts +7 -0
- package/dist/types/compute-engine/engine-runtime-state.d.ts +19 -0
- package/dist/types/compute-engine/engine-scope.d.ts +13 -0
- package/dist/types/compute-engine/engine-sequences.d.ts +14 -0
- package/dist/types/compute-engine/engine-simplification-rules.d.ts +15 -0
- package/dist/types/compute-engine/engine-startup-coordinator.d.ts +28 -0
- package/dist/types/compute-engine/engine-type-resolver.d.ts +12 -0
- package/dist/types/compute-engine/engine-validation-entrypoints.d.ts +13 -0
- package/dist/types/compute-engine/free-functions.d.ts +20 -0
- package/dist/types/compute-engine/function-utils.d.ts +10 -10
- package/dist/types/compute-engine/global-types.d.ts +5 -3301
- package/dist/types/compute-engine/index.d.ts +155 -112
- package/dist/types/compute-engine/interval/arithmetic.d.ts +1 -1
- package/dist/types/compute-engine/interval/comparison.d.ts +1 -1
- package/dist/types/compute-engine/interval/elementary.d.ts +1 -1
- package/dist/types/compute-engine/interval/index.d.ts +1 -1
- package/dist/types/compute-engine/interval/trigonometric.d.ts +1 -1
- package/dist/types/compute-engine/interval/types.d.ts +1 -1
- package/dist/types/compute-engine/interval/util.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-algebra.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-arithmetic.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-calculus.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-complex.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-core.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-linear-algebra.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-logic.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-other.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-relational-operators.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-sets.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-statistics.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-symbols.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-trigonometry.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions.d.ts +4 -80
- package/dist/types/compute-engine/latex-syntax/dictionary/indexed-types.d.ts +83 -0
- package/dist/types/compute-engine/latex-syntax/parse-number.d.ts +28 -0
- package/dist/types/compute-engine/latex-syntax/parse-symbol.d.ts +2 -2
- package/dist/types/compute-engine/latex-syntax/parse.d.ts +23 -33
- package/dist/types/compute-engine/latex-syntax/serialize-number.d.ts +2 -2
- package/dist/types/compute-engine/latex-syntax/serializer-style.d.ts +8 -8
- package/dist/types/compute-engine/latex-syntax/serializer.d.ts +15 -15
- package/dist/types/compute-engine/latex-syntax/tokenizer.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/types.d.ts +73 -53
- package/dist/types/compute-engine/latex-syntax/utils.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic.d.ts +1 -2
- package/dist/types/compute-engine/library/calculus.d.ts +1 -1
- package/dist/types/compute-engine/library/collections.d.ts +4 -4
- package/dist/types/compute-engine/library/combinatorics.d.ts +1 -1
- package/dist/types/compute-engine/library/complex.d.ts +1 -1
- package/dist/types/compute-engine/library/control-structures.d.ts +1 -1
- package/dist/types/compute-engine/library/core.d.ts +1 -1
- package/dist/types/compute-engine/library/library.d.ts +19 -6
- package/dist/types/compute-engine/library/linear-algebra.d.ts +1 -1
- package/dist/types/compute-engine/library/logic-analysis.d.ts +19 -32
- package/dist/types/compute-engine/library/logic.d.ts +1 -5
- package/dist/types/compute-engine/library/number-theory.d.ts +1 -1
- package/dist/types/compute-engine/library/polynomials.d.ts +1 -1
- package/dist/types/compute-engine/library/random-expression.d.ts +2 -2
- package/dist/types/compute-engine/library/relational-operator.d.ts +1 -1
- package/dist/types/compute-engine/library/sets.d.ts +1 -1
- package/dist/types/compute-engine/library/statistics.d.ts +1 -1
- package/dist/types/compute-engine/library/trigonometry.d.ts +1 -1
- package/dist/types/compute-engine/library/type-handlers.d.ts +4 -0
- package/dist/types/compute-engine/library/utils.d.ts +12 -12
- package/dist/types/compute-engine/numeric-value/big-numeric-value.d.ts +5 -5
- package/dist/types/compute-engine/numeric-value/exact-numeric-value.d.ts +5 -5
- package/dist/types/compute-engine/numeric-value/machine-numeric-value.d.ts +5 -5
- package/dist/types/compute-engine/numeric-value/types.d.ts +2 -3
- package/dist/types/compute-engine/numerics/bigint.d.ts +1 -1
- package/dist/types/compute-engine/numerics/expression.d.ts +3 -3
- package/dist/types/compute-engine/numerics/interval.d.ts +2 -2
- package/dist/types/compute-engine/numerics/monte-carlo.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric-bigint.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric-bignum.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric-complex.d.ts +1 -1
- package/dist/types/compute-engine/numerics/numeric.d.ts +1 -1
- package/dist/types/compute-engine/numerics/primes.d.ts +1 -1
- package/dist/types/compute-engine/numerics/rationals.d.ts +4 -4
- package/dist/types/compute-engine/numerics/richardson.d.ts +1 -1
- package/dist/types/compute-engine/numerics/special-functions.d.ts +120 -1
- package/dist/types/compute-engine/numerics/statistics.d.ts +1 -2
- package/dist/types/compute-engine/numerics/strings.d.ts +1 -1
- package/dist/types/compute-engine/numerics/types.d.ts +3 -1
- package/dist/types/compute-engine/oeis.d.ts +3 -3
- package/dist/types/compute-engine/sequence.d.ts +13 -13
- package/dist/types/compute-engine/symbolic/antiderivative.d.ts +2 -2
- package/dist/types/compute-engine/symbolic/derivative.d.ts +3 -3
- package/dist/types/compute-engine/symbolic/distribute.d.ts +2 -2
- package/dist/types/compute-engine/symbolic/fu-cost.d.ts +6 -6
- package/dist/types/compute-engine/symbolic/fu-transforms.d.ts +46 -46
- package/dist/types/compute-engine/symbolic/fu.d.ts +4 -4
- package/dist/types/compute-engine/symbolic/logic-utils.d.ts +54 -0
- package/dist/types/compute-engine/symbolic/simplify-abs.d.ts +4 -4
- package/dist/types/compute-engine/symbolic/simplify-divide.d.ts +2 -2
- package/dist/types/compute-engine/symbolic/simplify-hyperbolic.d.ts +2 -2
- package/dist/types/compute-engine/symbolic/simplify-infinity.d.ts +2 -2
- package/dist/types/compute-engine/symbolic/simplify-log.d.ts +2 -2
- package/dist/types/compute-engine/symbolic/simplify-logic.d.ts +5 -0
- package/dist/types/compute-engine/symbolic/simplify-power.d.ts +2 -2
- package/dist/types/compute-engine/symbolic/simplify-product.d.ts +2 -2
- package/dist/types/compute-engine/symbolic/simplify-rules.d.ts +65 -4
- package/dist/types/compute-engine/symbolic/simplify-sum.d.ts +2 -2
- package/dist/types/compute-engine/symbolic/simplify-trig.d.ts +2 -2
- package/dist/types/compute-engine/tensor/tensor-fields.d.ts +42 -42
- package/dist/types/compute-engine/tensor/tensors.d.ts +4 -4
- package/dist/types/compute-engine/types-definitions.d.ts +900 -0
- package/dist/types/compute-engine/types-engine.d.ts +375 -0
- package/dist/types/compute-engine/types-evaluation.d.ts +67 -0
- package/dist/types/compute-engine/types-expression.d.ts +1655 -0
- package/dist/types/compute-engine/types-kernel-evaluation.d.ts +164 -0
- package/dist/types/compute-engine/types-kernel-serialization.d.ts +147 -0
- package/dist/types/compute-engine/types-serialization.d.ts +23 -0
- package/dist/types/compute-engine/types.d.ts +2 -2
- package/dist/types/compute-engine.d.ts +16 -3
- package/dist/types/math-json/symbols.d.ts +1 -1
- package/dist/types/math-json/types.d.ts +3 -3
- package/dist/types/math-json/utils.d.ts +31 -31
- package/dist/types/math-json.d.ts +2 -2
- package/package.json +8 -1
- package/dist/types/compute-engine/boxed-expression/product.d.ts +0 -66
- package/dist/types/compute-engine/boxed-expression/terms.d.ts +0 -10
- package/dist/types/compute-engine/library/invisible-operator.d.ts +0 -4
- package/dist/types/compute-engine/library/logic-utils.d.ts +0 -54
|
@@ -1,97 +1,21 @@
|
|
|
1
|
-
/* 0.
|
|
2
|
-
import {
|
|
3
|
-
export type CommonEntry
|
|
4
|
-
|
|
5
|
-
name?: string;
|
|
6
|
-
serialize?: SerializeHandler;
|
|
7
|
-
/** Note: not all kinds have a `latexTrigger` or `symbolTrigger`.
|
|
8
|
-
* For example, matchfix operators use `openTrigger`/`closeTrigger`
|
|
9
|
-
*/
|
|
10
|
-
latexTrigger?: LatexString;
|
|
11
|
-
symbolTrigger?: string;
|
|
12
|
-
};
|
|
13
|
-
export type IndexedSymbolEntry = CommonEntry & {
|
|
14
|
-
kind: 'symbol';
|
|
15
|
-
precedence: Precedence;
|
|
16
|
-
parse: ExpressionParseHandler;
|
|
17
|
-
};
|
|
1
|
+
/* 0.50.0 */
|
|
2
|
+
import { LatexDictionaryEntry } from '../types';
|
|
3
|
+
export type { CommonEntry, IndexedSymbolEntry, IndexedExpressionEntry, IndexedFunctionEntry, IndexedMatchfixEntry, IndexedInfixEntry, IndexedPrefixEntry, IndexedPostfixEntry, IndexedEnvironmentEntry, IndexedLatexDictionaryEntry, IndexedLatexDictionary, } from './indexed-types';
|
|
4
|
+
import type { IndexedSymbolEntry, IndexedExpressionEntry, IndexedFunctionEntry, IndexedMatchfixEntry, IndexedInfixEntry, IndexedPostfixEntry, IndexedEnvironmentEntry, IndexedLatexDictionaryEntry, IndexedLatexDictionary } from './indexed-types';
|
|
18
5
|
/** @internal */
|
|
19
6
|
export declare function isIndexedSymbolEntry(entry: IndexedLatexDictionaryEntry): entry is IndexedSymbolEntry;
|
|
20
|
-
export type IndexedExpressionEntry = CommonEntry & {
|
|
21
|
-
kind: 'expression';
|
|
22
|
-
precedence: Precedence;
|
|
23
|
-
parse: ExpressionParseHandler;
|
|
24
|
-
};
|
|
25
7
|
/** @internal */
|
|
26
8
|
export declare function isIndexedExpressionEntry(entry: IndexedLatexDictionaryEntry): entry is IndexedExpressionEntry;
|
|
27
|
-
/**
|
|
28
|
-
* A function has the following form:
|
|
29
|
-
* - a prefix such as `\mathrm` or `\operatorname`
|
|
30
|
-
* - a trigger string, such as `gcd`
|
|
31
|
-
* - some postfix operators such as `\prime`
|
|
32
|
-
* - an optional list of arguments in an enclosure (parentheses)
|
|
33
|
-
*
|
|
34
|
-
* Functions of this type are indexed in the dictionary by their trigger string.
|
|
35
|
-
*/
|
|
36
|
-
export type IndexedFunctionEntry = CommonEntry & {
|
|
37
|
-
kind: 'function';
|
|
38
|
-
parse: ExpressionParseHandler;
|
|
39
|
-
};
|
|
40
9
|
/** @internal */
|
|
41
10
|
export declare function isIndexedFunctionEntry(entry: IndexedLatexDictionaryEntry): entry is IndexedFunctionEntry;
|
|
42
|
-
export type IndexedMatchfixEntry = CommonEntry & {
|
|
43
|
-
kind: 'matchfix';
|
|
44
|
-
openTrigger: Delimiter | LatexToken[];
|
|
45
|
-
closeTrigger: Delimiter | LatexToken[];
|
|
46
|
-
parse: MatchfixParseHandler;
|
|
47
|
-
};
|
|
48
11
|
/** @internal */
|
|
49
12
|
export declare function isIndexedMatchfixEntry(entry: IndexedLatexDictionaryEntry): entry is IndexedMatchfixEntry;
|
|
50
|
-
export type IndexedInfixEntry = CommonEntry & {
|
|
51
|
-
kind: 'infix';
|
|
52
|
-
associativity: 'right' | 'left' | 'none' | 'any';
|
|
53
|
-
precedence: Precedence;
|
|
54
|
-
parse: InfixParseHandler;
|
|
55
|
-
};
|
|
56
13
|
/** @internal */
|
|
57
14
|
export declare function isIndexedInfixdEntry(entry: IndexedLatexDictionaryEntry): entry is IndexedInfixEntry;
|
|
58
|
-
export type IndexedPrefixEntry = CommonEntry & {
|
|
59
|
-
kind: 'prefix';
|
|
60
|
-
precedence: Precedence;
|
|
61
|
-
parse: ExpressionParseHandler;
|
|
62
|
-
};
|
|
63
15
|
/** @internal */
|
|
64
16
|
export declare function isIndexedPrefixedEntry(entry: IndexedLatexDictionaryEntry): entry is IndexedPostfixEntry;
|
|
65
|
-
export type IndexedPostfixEntry = CommonEntry & {
|
|
66
|
-
kind: 'postfix';
|
|
67
|
-
precedence: Precedence;
|
|
68
|
-
parse: PostfixParseHandler;
|
|
69
|
-
};
|
|
70
17
|
/** @internal */
|
|
71
18
|
export declare function isIndexedPostfixEntry(entry: IndexedLatexDictionaryEntry): entry is IndexedPostfixEntry;
|
|
72
|
-
export type IndexedEnvironmentEntry = CommonEntry & {
|
|
73
|
-
kind: 'environment';
|
|
74
|
-
parse: EnvironmentParseHandler;
|
|
75
|
-
};
|
|
76
19
|
/** @internal */
|
|
77
20
|
export declare function isIndexedEnvironmentEntry(entry: IndexedLatexDictionaryEntry): entry is IndexedEnvironmentEntry;
|
|
78
|
-
/** @internal */
|
|
79
|
-
export type IndexedLatexDictionaryEntry = IndexedExpressionEntry | IndexedFunctionEntry | IndexedSymbolEntry | IndexedMatchfixEntry | IndexedInfixEntry | IndexedPrefixEntry | IndexedPostfixEntry | IndexedEnvironmentEntry;
|
|
80
|
-
/** @internal */
|
|
81
|
-
export type IndexedLatexDictionary = {
|
|
82
|
-
ids: Map<string, IndexedLatexDictionaryEntry>;
|
|
83
|
-
lookahead: number;
|
|
84
|
-
defs: IndexedLatexDictionaryEntry[];
|
|
85
|
-
matchfixByOpen: Map<string, IndexedMatchfixEntry[]>;
|
|
86
|
-
infixByTrigger: Map<string, IndexedInfixEntry[]>;
|
|
87
|
-
prefixByTrigger: Map<string, IndexedPrefixEntry[]>;
|
|
88
|
-
postfixByTrigger: Map<string, IndexedPostfixEntry[]>;
|
|
89
|
-
functionByTrigger: Map<string, IndexedFunctionEntry[]>;
|
|
90
|
-
symbolByTrigger: Map<string, IndexedSymbolEntry[]>;
|
|
91
|
-
expressionByTrigger: Map<string, IndexedExpressionEntry[]>;
|
|
92
|
-
};
|
|
93
21
|
export declare function indexLatexDictionary(dic: Readonly<Partial<LatexDictionaryEntry>[]>, onError: (sig: WarningSignal) => void): IndexedLatexDictionary;
|
|
94
|
-
export declare const DEFAULT_LATEX_DICTIONARY: {
|
|
95
|
-
[category in LibraryCategory]?: LatexDictionary;
|
|
96
|
-
};
|
|
97
|
-
export declare function getLatexDictionary(category?: LibraryCategory | 'all'): readonly Readonly<LatexDictionaryEntry>[];
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* 0.50.0 */
|
|
2
|
+
* Type definitions for the indexed LaTeX dictionary.
|
|
3
|
+
*
|
|
4
|
+
* These are separated from definitions.ts to break a circular dependency:
|
|
5
|
+
* types.ts needs these types for the Serializer interface, while definitions.ts
|
|
6
|
+
* needs types from types.ts. This file is a leaf module imported by both.
|
|
7
|
+
*/
|
|
8
|
+
import type { Delimiter, EnvironmentParseHandler, ExpressionParseHandler, InfixParseHandler, LatexString, LatexToken, MatchfixParseHandler, PostfixParseHandler, Precedence, SerializeHandler } from '../types';
|
|
9
|
+
export type CommonEntry = {
|
|
10
|
+
/** Note: a name is required if a serialize handler is provided */
|
|
11
|
+
name?: string;
|
|
12
|
+
serialize?: SerializeHandler;
|
|
13
|
+
/** Note: not all kinds have a `latexTrigger` or `symbolTrigger`.
|
|
14
|
+
* For example, matchfix operators use `openTrigger`/`closeTrigger`
|
|
15
|
+
*/
|
|
16
|
+
latexTrigger?: LatexString;
|
|
17
|
+
symbolTrigger?: string;
|
|
18
|
+
};
|
|
19
|
+
export type IndexedSymbolEntry = CommonEntry & {
|
|
20
|
+
kind: 'symbol';
|
|
21
|
+
precedence: Precedence;
|
|
22
|
+
parse: ExpressionParseHandler;
|
|
23
|
+
};
|
|
24
|
+
export type IndexedExpressionEntry = CommonEntry & {
|
|
25
|
+
kind: 'expression';
|
|
26
|
+
precedence: Precedence;
|
|
27
|
+
parse: ExpressionParseHandler;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* A function has the following form:
|
|
31
|
+
* - a prefix such as `\mathrm` or `\operatorname`
|
|
32
|
+
* - a trigger string, such as `gcd`
|
|
33
|
+
* - some postfix operators such as `\prime`
|
|
34
|
+
* - an optional list of arguments in an enclosure (parentheses)
|
|
35
|
+
*
|
|
36
|
+
* Functions of this type are indexed in the dictionary by their trigger string.
|
|
37
|
+
*/
|
|
38
|
+
export type IndexedFunctionEntry = CommonEntry & {
|
|
39
|
+
kind: 'function';
|
|
40
|
+
parse: ExpressionParseHandler;
|
|
41
|
+
arguments?: 'enclosure' | 'implicit';
|
|
42
|
+
};
|
|
43
|
+
export type IndexedMatchfixEntry = CommonEntry & {
|
|
44
|
+
kind: 'matchfix';
|
|
45
|
+
openTrigger: Delimiter | LatexToken[];
|
|
46
|
+
closeTrigger: Delimiter | LatexToken[];
|
|
47
|
+
parse: MatchfixParseHandler;
|
|
48
|
+
};
|
|
49
|
+
export type IndexedInfixEntry = CommonEntry & {
|
|
50
|
+
kind: 'infix';
|
|
51
|
+
associativity: 'right' | 'left' | 'none' | 'any';
|
|
52
|
+
precedence: Precedence;
|
|
53
|
+
parse: InfixParseHandler;
|
|
54
|
+
};
|
|
55
|
+
export type IndexedPrefixEntry = CommonEntry & {
|
|
56
|
+
kind: 'prefix';
|
|
57
|
+
precedence: Precedence;
|
|
58
|
+
parse: ExpressionParseHandler;
|
|
59
|
+
};
|
|
60
|
+
export type IndexedPostfixEntry = CommonEntry & {
|
|
61
|
+
kind: 'postfix';
|
|
62
|
+
precedence: Precedence;
|
|
63
|
+
parse: PostfixParseHandler;
|
|
64
|
+
};
|
|
65
|
+
export type IndexedEnvironmentEntry = CommonEntry & {
|
|
66
|
+
kind: 'environment';
|
|
67
|
+
parse: EnvironmentParseHandler;
|
|
68
|
+
};
|
|
69
|
+
/** @internal */
|
|
70
|
+
export type IndexedLatexDictionaryEntry = IndexedExpressionEntry | IndexedFunctionEntry | IndexedSymbolEntry | IndexedMatchfixEntry | IndexedInfixEntry | IndexedPrefixEntry | IndexedPostfixEntry | IndexedEnvironmentEntry;
|
|
71
|
+
/** @internal */
|
|
72
|
+
export type IndexedLatexDictionary = {
|
|
73
|
+
ids: Map<string, IndexedLatexDictionaryEntry>;
|
|
74
|
+
lookahead: number;
|
|
75
|
+
defs: IndexedLatexDictionaryEntry[];
|
|
76
|
+
matchfixByOpen: Map<string, IndexedMatchfixEntry[]>;
|
|
77
|
+
infixByTrigger: Map<string, IndexedInfixEntry[]>;
|
|
78
|
+
prefixByTrigger: Map<string, IndexedPrefixEntry[]>;
|
|
79
|
+
postfixByTrigger: Map<string, IndexedPostfixEntry[]>;
|
|
80
|
+
functionByTrigger: Map<string, IndexedFunctionEntry[]>;
|
|
81
|
+
symbolByTrigger: Map<string, IndexedSymbolEntry[]>;
|
|
82
|
+
expressionByTrigger: Map<string, IndexedExpressionEntry[]>;
|
|
83
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* 0.50.0 */
|
|
2
|
+
* Number parsing extracted from the _Parser class for modularity.
|
|
3
|
+
*
|
|
4
|
+
* All functions take a `Parser` interface and a `NumberFormatTokens` config
|
|
5
|
+
* that holds the pre-tokenized formatting strings from ParseLatexOptions.
|
|
6
|
+
*/
|
|
7
|
+
import type { MathJsonExpression } from '../../math-json/types';
|
|
8
|
+
import type { LatexToken, Parser } from './types';
|
|
9
|
+
/**
|
|
10
|
+
* Pre-tokenized formatting strings used during number parsing.
|
|
11
|
+
* Created once in the _Parser constructor from ParseLatexOptions.
|
|
12
|
+
*/
|
|
13
|
+
export interface NumberFormatTokens {
|
|
14
|
+
decimalSeparatorTokens: LatexToken[];
|
|
15
|
+
wholeDigitGroupSeparatorTokens: LatexToken[];
|
|
16
|
+
fractionalDigitGroupSeparatorTokens: LatexToken[];
|
|
17
|
+
exponentProductTokens: LatexToken[];
|
|
18
|
+
beginExponentMarkerTokens: LatexToken[];
|
|
19
|
+
endExponentMarkerTokens: LatexToken[];
|
|
20
|
+
truncationMarkerTokens: LatexToken[];
|
|
21
|
+
}
|
|
22
|
+
/** Parse repeating decimal notation (parentheses, vinculum, arc, dots). */
|
|
23
|
+
export declare function parseRepeatingDecimal(parser: Parser, fmt: NumberFormatTokens): string;
|
|
24
|
+
/**
|
|
25
|
+
* Parse a number, with an optional sign, exponent, decimal marker,
|
|
26
|
+
* repeating decimals, etc.
|
|
27
|
+
*/
|
|
28
|
+
export declare function parseNumber(parser: Parser, fmt: NumberFormatTokens): MathJsonExpression | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.50.0 */
|
|
2
2
|
import { Parser } from './types';
|
|
3
3
|
/** For error handling, if we have a symbol prefix, assume
|
|
4
4
|
* the symbol is invalid (it would have been captured by
|
|
5
5
|
* `matchSymbol()` otherwise) and return an error expression */
|
|
6
|
-
export declare function parseInvalidSymbol(parser: Parser):
|
|
6
|
+
export declare function parseInvalidSymbol(parser: Parser): MathJsonExpression | null;
|
|
7
7
|
/**
|
|
8
8
|
* Match a symbol.
|
|
9
9
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.50.0 */
|
|
2
2
|
import { ParseLatexOptions, LatexToken, Terminator, Parser, SymbolTable } from './types';
|
|
3
3
|
import type { IndexedLatexDictionary, IndexedLatexDictionaryEntry, IndexedInfixEntry, IndexedPostfixEntry, IndexedPrefixEntry, IndexedSymbolEntry, IndexedExpressionEntry, IndexedFunctionEntry } from './dictionary/definitions';
|
|
4
4
|
import { BoxedType } from '../../common/type/boxed-type';
|
|
@@ -68,6 +68,7 @@ export declare class _Parser implements Parser {
|
|
|
68
68
|
private _lastPeek;
|
|
69
69
|
private _peekCounter;
|
|
70
70
|
constructor(tokens: LatexToken[], dictionary: IndexedLatexDictionary, options: Readonly<ParseLatexOptions>);
|
|
71
|
+
private _numberFormatTokens;
|
|
71
72
|
getSymbolType(id: MathJsonSymbol): BoxedType;
|
|
72
73
|
hasSubscriptEvaluate(id: MathJsonSymbol): boolean;
|
|
73
74
|
get peek(): LatexToken;
|
|
@@ -88,7 +89,7 @@ export declare class _Parser implements Parser {
|
|
|
88
89
|
addBoundary(boundary: LatexToken[]): void;
|
|
89
90
|
removeBoundary(): void;
|
|
90
91
|
matchBoundary(): boolean;
|
|
91
|
-
boundaryError(msg: string | [string, ...
|
|
92
|
+
boundaryError(msg: string | [string, ...MathJsonExpression[]]): MathJsonExpression;
|
|
92
93
|
/**
|
|
93
94
|
* Performance optimization: determines if we can skip expensive re-parsing
|
|
94
95
|
* for matchfix boundary mismatches.
|
|
@@ -175,9 +176,9 @@ export declare class _Parser implements Parser {
|
|
|
175
176
|
*
|
|
176
177
|
*/
|
|
177
178
|
private matchDelimiter;
|
|
178
|
-
parseGroup():
|
|
179
|
-
parseOptionalGroup():
|
|
180
|
-
parseToken():
|
|
179
|
+
parseGroup(): MathJsonExpression | null;
|
|
180
|
+
parseOptionalGroup(): MathJsonExpression | null;
|
|
181
|
+
parseToken(): MathJsonExpression | null;
|
|
181
182
|
/**
|
|
182
183
|
* Parse an expression in a tabular format, where rows are separated by `\\`
|
|
183
184
|
* and columns by `&`.
|
|
@@ -185,7 +186,7 @@ export declare class _Parser implements Parser {
|
|
|
185
186
|
* Return rows of sparse columns: empty rows are indicated with `Nothing`,
|
|
186
187
|
* and empty cells are also indicated with `Nothing`.
|
|
187
188
|
*/
|
|
188
|
-
parseTabular(): null |
|
|
189
|
+
parseTabular(): null | MathJsonExpression[][];
|
|
189
190
|
/** Match a string used as a LaTeX symbol, for example an environment
|
|
190
191
|
* name.
|
|
191
192
|
* Not suitable for general purpose text, e.g. argument of a `\text{}
|
|
@@ -197,25 +198,8 @@ export declare class _Parser implements Parser {
|
|
|
197
198
|
/** Parse an environment: `\begin{env}...\end{end}`
|
|
198
199
|
*/
|
|
199
200
|
private parseEnvironment;
|
|
200
|
-
/** If the next token matches a `-` sign, return '-', otherwise return '+'
|
|
201
|
-
*
|
|
202
|
-
*/
|
|
203
|
-
private parseOptionalSign;
|
|
204
|
-
/** Parse a sequence of decimal digits. The part indicates which
|
|
205
|
-
* grouping separator should be expected.
|
|
206
|
-
*/
|
|
207
|
-
private parseDecimalDigits;
|
|
208
|
-
/** The 'part' argument is used to dermine what grouping separator
|
|
209
|
-
* should be expected.
|
|
210
|
-
*/
|
|
211
|
-
private parseSignedInteger;
|
|
212
|
-
private parseExponent;
|
|
213
201
|
parseRepeatingDecimal(): string;
|
|
214
|
-
|
|
215
|
-
* Parse a number, with an optional sign, exponent, decimal marker,
|
|
216
|
-
* repeating decimals, etc...
|
|
217
|
-
*/
|
|
218
|
-
parseNumber(): Expression | null;
|
|
202
|
+
parseNumber(): MathJsonExpression | null;
|
|
219
203
|
private parsePrefixOperator;
|
|
220
204
|
private parseInfixOperator;
|
|
221
205
|
/**
|
|
@@ -228,13 +212,13 @@ export declare class _Parser implements Parser {
|
|
|
228
212
|
* (i.e. we interpret `\cos 2x + 1` as `\cos(2x) + 1`)
|
|
229
213
|
*
|
|
230
214
|
*/
|
|
231
|
-
parseArguments(kind?: 'enclosure' | 'implicit', until?: Readonly<Terminator>): ReadonlyArray<
|
|
215
|
+
parseArguments(kind?: 'enclosure' | 'implicit', until?: Readonly<Terminator>): ReadonlyArray<MathJsonExpression> | null;
|
|
232
216
|
/**
|
|
233
217
|
* An enclosure is an opening matchfix operator, an optional expression,
|
|
234
218
|
* optionally followed multiple times by a separator and another expression,
|
|
235
219
|
* and finally a closing matching operator.
|
|
236
220
|
*/
|
|
237
|
-
parseEnclosure():
|
|
221
|
+
parseEnclosure(): MathJsonExpression | null;
|
|
238
222
|
/**
|
|
239
223
|
* A generic expression is used for dictionary entries that do
|
|
240
224
|
* some complex (non-standard) parsing. This includes trig functions (to
|
|
@@ -247,7 +231,7 @@ export declare class _Parser implements Parser {
|
|
|
247
231
|
* (`\prime`...) and some arguments.
|
|
248
232
|
*/
|
|
249
233
|
private parseFunction;
|
|
250
|
-
parseSymbol(until?: Readonly<Terminator>):
|
|
234
|
+
parseSymbol(until?: Readonly<Terminator>): MathJsonExpression | null;
|
|
251
235
|
/**
|
|
252
236
|
* In non-strict mode, try to parse a bare function name followed by parentheses.
|
|
253
237
|
* This allows syntax like `sin(x)` instead of requiring `\sin(x)`.
|
|
@@ -255,6 +239,12 @@ export declare class _Parser implements Parser {
|
|
|
255
239
|
* Returns the parsed function call or null if not a bare function.
|
|
256
240
|
*/
|
|
257
241
|
private tryParseBareFunction;
|
|
242
|
+
private static readonly BARE_SYMBOL_MAP;
|
|
243
|
+
/**
|
|
244
|
+
* In non-strict mode, try to parse a bare symbol name like a Greek letter
|
|
245
|
+
* or special constant (e.g., `alpha`, `pi`, `oo`, `ii`).
|
|
246
|
+
*/
|
|
247
|
+
private tryParseBareSymbol;
|
|
258
248
|
/**
|
|
259
249
|
* Parse a sequence superfix/subfix operator, e.g. `^{*}`
|
|
260
250
|
*
|
|
@@ -267,7 +257,7 @@ export declare class _Parser implements Parser {
|
|
|
267
257
|
*
|
|
268
258
|
*/
|
|
269
259
|
private parseSupsub;
|
|
270
|
-
parsePostfixOperator(lhs:
|
|
260
|
+
parsePostfixOperator(lhs: MathJsonExpression | null, until?: Readonly<Terminator>): MathJsonExpression | null;
|
|
271
261
|
/**
|
|
272
262
|
* This method can be invoked when we know we're in an error situation,
|
|
273
263
|
* for example when there are tokens remaining after we've finished parsing.
|
|
@@ -281,7 +271,7 @@ export declare class _Parser implements Parser {
|
|
|
281
271
|
* to any entry in the LaTeX dictionary, or ran into it in an unexpected
|
|
282
272
|
* context (postfix operator lacking an argument, for example)
|
|
283
273
|
*/
|
|
284
|
-
parseSyntaxError():
|
|
274
|
+
parseSyntaxError(): MathJsonExpression;
|
|
285
275
|
/**
|
|
286
276
|
* <primary> :=
|
|
287
277
|
* (<number> | <symbol> | <environment> | <matchfix-expr>)
|
|
@@ -309,12 +299,12 @@ export declare class _Parser implements Parser {
|
|
|
309
299
|
* Stop when an operator of precedence less than `until.minPrec`
|
|
310
300
|
* is encountered
|
|
311
301
|
*/
|
|
312
|
-
parseExpression(until?: Readonly<Terminator>):
|
|
302
|
+
parseExpression(until?: Readonly<Terminator>): MathJsonExpression | null;
|
|
313
303
|
/**
|
|
314
304
|
* Add LaTeX or other requested metadata to the expression
|
|
315
305
|
*/
|
|
316
|
-
decorate(expr:
|
|
317
|
-
error(code: string | [string, ...
|
|
306
|
+
decorate(expr: MathJsonExpression | null, start: number): MathJsonExpression | null;
|
|
307
|
+
error(code: string | [string, ...MathJsonExpression[]], fromToken: number): MathJsonExpression;
|
|
318
308
|
private isFunctionOperator;
|
|
319
309
|
/**
|
|
320
310
|
* Check if a symbol looks like a predicate in First-Order Logic.
|
|
@@ -333,4 +323,4 @@ export declare class _Parser implements Parser {
|
|
|
333
323
|
*/
|
|
334
324
|
getDefs(kind: string): Iterable<IndexedLatexDictionaryEntry>;
|
|
335
325
|
}
|
|
336
|
-
export declare function parse(latex: string, dictionary: IndexedLatexDictionary, options: Readonly<ParseLatexOptions>):
|
|
326
|
+
export declare function parse(latex: string, dictionary: IndexedLatexDictionary, options: Readonly<ParseLatexOptions>): MathJsonExpression | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.50.0 */
|
|
2
2
|
import { NumberSerializationFormat } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* @param expr - A number, can be represented as a string
|
|
@@ -6,7 +6,7 @@ import { NumberSerializationFormat } from './types';
|
|
|
6
6
|
* @return A textual representation of the number, formatted according to the
|
|
7
7
|
* `options`
|
|
8
8
|
*/
|
|
9
|
-
export declare function serializeNumber(expr:
|
|
9
|
+
export declare function serializeNumber(expr: MathJsonExpression | null, options: NumberSerializationFormat): string;
|
|
10
10
|
/**
|
|
11
11
|
* `value` is a base-10 number, possibly a floating point number with an
|
|
12
12
|
* exponent, i.e. "0.31415e1"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.50.0 */
|
|
2
2
|
import { DelimiterScale } from './types';
|
|
3
|
-
export declare function getApplyFunctionStyle(_expr:
|
|
4
|
-
export declare function getGroupStyle(_expr:
|
|
5
|
-
export declare function getRootStyle(_expr:
|
|
6
|
-
export declare function getFractionStyle(expr:
|
|
7
|
-
export declare function getLogicStyle(_expr:
|
|
8
|
-
export declare function getPowerStyle(_expr:
|
|
9
|
-
export declare function getNumericSetStyle(_expr:
|
|
3
|
+
export declare function getApplyFunctionStyle(_expr: MathJsonExpression, _level: number): DelimiterScale;
|
|
4
|
+
export declare function getGroupStyle(_expr: MathJsonExpression, _level: number): DelimiterScale;
|
|
5
|
+
export declare function getRootStyle(_expr: MathJsonExpression | null, level: number): 'radical' | 'quotient' | 'solidus';
|
|
6
|
+
export declare function getFractionStyle(expr: MathJsonExpression, level: number): 'quotient' | 'block-quotient' | 'inline-quotient' | 'inline-solidus' | 'nice-solidus' | 'reciprocal' | 'factor';
|
|
7
|
+
export declare function getLogicStyle(_expr: MathJsonExpression, _level: number): 'word' | 'boolean' | 'uppercase-word' | 'punctuation';
|
|
8
|
+
export declare function getPowerStyle(_expr: MathJsonExpression, _level: number): 'root' | 'solidus' | 'quotient';
|
|
9
|
+
export declare function getNumericSetStyle(_expr: MathJsonExpression, _level: number): 'compact' | 'regular' | 'interval' | 'set-builder';
|
|
10
10
|
export declare function latexTemplate(s: string, lhs: string, rhs: string): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.
|
|
1
|
+
/* 0.50.0 */
|
|
2
2
|
import { LatexString, SerializeLatexOptions, DelimiterScale } from './types';
|
|
3
3
|
import type { IndexedLatexDictionary, IndexedLatexDictionaryEntry } from './dictionary/definitions';
|
|
4
4
|
export declare class Serializer {
|
|
@@ -11,7 +11,7 @@ export declare class Serializer {
|
|
|
11
11
|
* of precedence less than or equal to prec, wrap it in some parens.
|
|
12
12
|
* @todo: don't wrap Abs, Floor, Ceil, Delimiter
|
|
13
13
|
*/
|
|
14
|
-
wrap(expr:
|
|
14
|
+
wrap(expr: MathJsonExpression | null | undefined, prec?: number): string;
|
|
15
15
|
/**
|
|
16
16
|
* If this is a "short" expression, wrap it.
|
|
17
17
|
* Do not wrap symbols, positive numbers or functions.
|
|
@@ -19,19 +19,19 @@ export declare class Serializer {
|
|
|
19
19
|
* This is called by the serializer for power and division (i.e. "(a+1)/b")
|
|
20
20
|
*
|
|
21
21
|
*/
|
|
22
|
-
wrapShort(expr:
|
|
22
|
+
wrapShort(expr: MathJsonExpression | null | undefined): string;
|
|
23
23
|
wrapString(s: string, style: DelimiterScale, fence?: string): string;
|
|
24
|
-
wrapArguments(expr:
|
|
25
|
-
serializeSymbol(expr:
|
|
26
|
-
serializeFunction(expr:
|
|
27
|
-
serialize(expr:
|
|
28
|
-
applyFunctionStyle(expr:
|
|
29
|
-
groupStyle(expr:
|
|
30
|
-
rootStyle(expr:
|
|
31
|
-
fractionStyle(expr:
|
|
32
|
-
logicStyle(expr:
|
|
33
|
-
powerStyle(expr:
|
|
34
|
-
numericSetStyle(expr:
|
|
24
|
+
wrapArguments(expr: MathJsonExpression): string;
|
|
25
|
+
serializeSymbol(expr: MathJsonExpression, def?: IndexedLatexDictionaryEntry): LatexString;
|
|
26
|
+
serializeFunction(expr: MathJsonExpression, def?: IndexedLatexDictionaryEntry): LatexString;
|
|
27
|
+
serialize(expr: MathJsonExpression | null | undefined): LatexString;
|
|
28
|
+
applyFunctionStyle(expr: MathJsonExpression, level: number): DelimiterScale;
|
|
29
|
+
groupStyle(expr: MathJsonExpression, level: number): DelimiterScale;
|
|
30
|
+
rootStyle(expr: MathJsonExpression, level: number): 'radical' | 'quotient' | 'solidus';
|
|
31
|
+
fractionStyle(expr: MathJsonExpression, level: number): 'quotient' | 'block-quotient' | 'inline-quotient' | 'inline-solidus' | 'nice-solidus' | 'reciprocal' | 'factor';
|
|
32
|
+
logicStyle(expr: MathJsonExpression, level: number): 'word' | 'boolean' | 'uppercase-word' | 'punctuation';
|
|
33
|
+
powerStyle(expr: MathJsonExpression, level: number): 'root' | 'solidus' | 'quotient';
|
|
34
|
+
numericSetStyle(expr: MathJsonExpression, level: number): 'compact' | 'regular' | 'interval' | 'set-builder';
|
|
35
35
|
}
|
|
36
36
|
export declare function appendLatex(src: string, s: string): string;
|
|
37
|
-
export declare function serializeLatex(expr:
|
|
37
|
+
export declare function serializeLatex(expr: MathJsonExpression | null, dict: IndexedLatexDictionary, options: Readonly<SerializeLatexOptions>): string;
|