@cortex-js/compute-engine 0.12.6 → 0.12.7
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/dist/compute-engine.esm.js +20 -6
- package/dist/compute-engine.js +20 -6
- package/dist/compute-engine.min.esm.js +20 -6
- package/dist/compute-engine.min.js +20 -6
- package/dist/math-json.esm.js +2 -2
- package/dist/math-json.js +2 -2
- package/dist/math-json.min.esm.js +2 -2
- package/dist/math-json.min.js +2 -2
- package/dist/types/common/grapheme-splitter.d.ts +1 -1
- package/dist/types/common/signals.d.ts +1 -1
- package/dist/types/common/utils.d.ts +1 -1
- package/dist/types/compute-engine/assume.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/abstract-boxed-expression.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/box.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-dictionary.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-domain.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-function-definition.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-function.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-number.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-patterns.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-string.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-symbol-definition.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-symbol.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/expression-map.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/order.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/serialize.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/utils.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/validate.d.ts +1 -1
- package/dist/types/compute-engine/compute-engine.d.ts +3 -1
- package/dist/types/compute-engine/cost-function.d.ts +1 -1
- package/dist/types/compute-engine/domain-utils.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-core.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions-inequalities.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-sets.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 +3 -3
- package/dist/types/compute-engine/latex-syntax/latex-syntax.d.ts +4 -1
- package/dist/types/compute-engine/latex-syntax/parse-identifier.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/parse.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/public.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/serialize-number.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/serializer-style.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/serializer.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/tokenizer.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-add.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-divide.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-multiply.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic-power.d.ts +1 -1
- package/dist/types/compute-engine/library/arithmetic.d.ts +1 -1
- package/dist/types/compute-engine/library/calculus.d.ts +1 -1
- package/dist/types/compute-engine/library/collections.d.ts +1 -1
- package/dist/types/compute-engine/library/core.d.ts +1 -1
- package/dist/types/compute-engine/library/domains.d.ts +1 -1
- package/dist/types/compute-engine/library/library.d.ts +1 -1
- package/dist/types/compute-engine/library/logic.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 +1 -1
- 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/trigonometry.d.ts +1 -1
- package/dist/types/compute-engine/library/utils.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 +1 -1
- package/dist/types/compute-engine/public.d.ts +3 -2
- package/dist/types/compute-engine/rules.d.ts +1 -1
- package/dist/types/compute-engine/simplify-rules.d.ts +1 -1
- package/dist/types/compute-engine/solve.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/expand.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/flatten.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/negate.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/polynomials.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/product.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/sum.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/utils.d.ts +1 -1
- package/dist/types/compute-engine.d.ts +2 -2
- package/dist/types/math-json/math-json-format.d.ts +1 -1
- package/dist/types/math-json/utils.d.ts +1 -1
- package/dist/types/math-json.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** CortexJS Compute Engine 0.12.
|
|
1
|
+
/** CortexJS Compute Engine 0.12.7 */
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -7514,12 +7514,12 @@ function indexLatexDictionary(dic, onError) {
|
|
|
7514
7514
|
const result = {
|
|
7515
7515
|
lookahead: 1,
|
|
7516
7516
|
name: /* @__PURE__ */ new Map(),
|
|
7517
|
-
expression:
|
|
7518
|
-
function: /* @__PURE__ */ new Map(),
|
|
7517
|
+
expression: [],
|
|
7519
7518
|
symbol: [],
|
|
7520
7519
|
infix: [],
|
|
7521
7520
|
prefix: [],
|
|
7522
7521
|
postfix: [],
|
|
7522
|
+
function: /* @__PURE__ */ new Map(),
|
|
7523
7523
|
environment: /* @__PURE__ */ new Map(),
|
|
7524
7524
|
matchfix: []
|
|
7525
7525
|
};
|
|
@@ -10445,11 +10445,19 @@ var LatexSyntax = class _LatexSyntax {
|
|
|
10445
10445
|
...DEFAULT_SERIALIZE_LATEX_OPTIONS,
|
|
10446
10446
|
...opts
|
|
10447
10447
|
};
|
|
10448
|
+
this._dictionaryInput = options.dictionary ?? _LatexSyntax.getDictionary();
|
|
10448
10449
|
this._dictionary = indexLatexDictionary(
|
|
10449
|
-
|
|
10450
|
+
this._dictionaryInput,
|
|
10450
10451
|
(sig) => this.onError([sig])
|
|
10451
10452
|
);
|
|
10452
10453
|
}
|
|
10454
|
+
get dictionary() {
|
|
10455
|
+
return this._dictionaryInput;
|
|
10456
|
+
}
|
|
10457
|
+
set dictionary(val) {
|
|
10458
|
+
this._dictionaryInput = val;
|
|
10459
|
+
this._dictionary = indexLatexDictionary(val, (sig) => this.onError([sig]));
|
|
10460
|
+
}
|
|
10453
10461
|
updateOptions(opt) {
|
|
10454
10462
|
for (const k of Object.keys(this.options))
|
|
10455
10463
|
if (k in opt)
|
|
@@ -23717,6 +23725,12 @@ var ComputeEngine = class _ComputeEngine {
|
|
|
23717
23725
|
static getStandardLibrary(categories = "all") {
|
|
23718
23726
|
return getStandardLibrary(categories);
|
|
23719
23727
|
}
|
|
23728
|
+
get latexDictionary() {
|
|
23729
|
+
return this.latexSyntax.dictionary;
|
|
23730
|
+
}
|
|
23731
|
+
set latexDictionary(dic) {
|
|
23732
|
+
this.latexSyntax.dictionary = dic;
|
|
23733
|
+
}
|
|
23720
23734
|
/** After the configuration of the engine has changed, clear the caches
|
|
23721
23735
|
* so that new values can be recalculated.
|
|
23722
23736
|
*
|
|
@@ -24606,10 +24620,10 @@ var ComputeEngine = class _ComputeEngine {
|
|
|
24606
24620
|
};
|
|
24607
24621
|
|
|
24608
24622
|
// src/compute-engine.ts
|
|
24609
|
-
var version = "0.12.
|
|
24623
|
+
var version = "0.12.7";
|
|
24610
24624
|
globalThis[Symbol.for("io.cortexjs.compute-engine")] = {
|
|
24611
24625
|
ComputeEngine: ComputeEngine.prototype.constructor,
|
|
24612
|
-
version: "0.12.
|
|
24626
|
+
version: "0.12.7"
|
|
24613
24627
|
};
|
|
24614
24628
|
export {
|
|
24615
24629
|
ComputeEngine,
|
package/dist/compute-engine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** CortexJS Compute Engine 0.12.
|
|
1
|
+
/** CortexJS Compute Engine 0.12.7 */
|
|
2
2
|
(function(global,factory){typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'],factory):(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ComputeEngine = {}));})(this, (function (exports) { 'use strict';
|
|
3
3
|
var ComputeEngine = (() => {
|
|
4
4
|
var __create = Object.create;
|
|
@@ -7536,12 +7536,12 @@ var ComputeEngine = (() => {
|
|
|
7536
7536
|
const result = {
|
|
7537
7537
|
lookahead: 1,
|
|
7538
7538
|
name: /* @__PURE__ */ new Map(),
|
|
7539
|
-
expression:
|
|
7540
|
-
function: /* @__PURE__ */ new Map(),
|
|
7539
|
+
expression: [],
|
|
7541
7540
|
symbol: [],
|
|
7542
7541
|
infix: [],
|
|
7543
7542
|
prefix: [],
|
|
7544
7543
|
postfix: [],
|
|
7544
|
+
function: /* @__PURE__ */ new Map(),
|
|
7545
7545
|
environment: /* @__PURE__ */ new Map(),
|
|
7546
7546
|
matchfix: []
|
|
7547
7547
|
};
|
|
@@ -10467,11 +10467,19 @@ var ComputeEngine = (() => {
|
|
|
10467
10467
|
...DEFAULT_SERIALIZE_LATEX_OPTIONS,
|
|
10468
10468
|
...opts
|
|
10469
10469
|
};
|
|
10470
|
+
this._dictionaryInput = options.dictionary ?? _LatexSyntax.getDictionary();
|
|
10470
10471
|
this._dictionary = indexLatexDictionary(
|
|
10471
|
-
|
|
10472
|
+
this._dictionaryInput,
|
|
10472
10473
|
(sig) => this.onError([sig])
|
|
10473
10474
|
);
|
|
10474
10475
|
}
|
|
10476
|
+
get dictionary() {
|
|
10477
|
+
return this._dictionaryInput;
|
|
10478
|
+
}
|
|
10479
|
+
set dictionary(val) {
|
|
10480
|
+
this._dictionaryInput = val;
|
|
10481
|
+
this._dictionary = indexLatexDictionary(val, (sig) => this.onError([sig]));
|
|
10482
|
+
}
|
|
10475
10483
|
updateOptions(opt) {
|
|
10476
10484
|
for (const k of Object.keys(this.options))
|
|
10477
10485
|
if (k in opt)
|
|
@@ -23739,6 +23747,12 @@ ${JSON.stringify(entry)}`
|
|
|
23739
23747
|
static getStandardLibrary(categories = "all") {
|
|
23740
23748
|
return getStandardLibrary(categories);
|
|
23741
23749
|
}
|
|
23750
|
+
get latexDictionary() {
|
|
23751
|
+
return this.latexSyntax.dictionary;
|
|
23752
|
+
}
|
|
23753
|
+
set latexDictionary(dic) {
|
|
23754
|
+
this.latexSyntax.dictionary = dic;
|
|
23755
|
+
}
|
|
23742
23756
|
/** After the configuration of the engine has changed, clear the caches
|
|
23743
23757
|
* so that new values can be recalculated.
|
|
23744
23758
|
*
|
|
@@ -24628,10 +24642,10 @@ ${JSON.stringify(entry)}`
|
|
|
24628
24642
|
};
|
|
24629
24643
|
|
|
24630
24644
|
// src/compute-engine.ts
|
|
24631
|
-
var version = "0.12.
|
|
24645
|
+
var version = "0.12.7";
|
|
24632
24646
|
globalThis[Symbol.for("io.cortexjs.compute-engine")] = {
|
|
24633
24647
|
ComputeEngine: ComputeEngine.prototype.constructor,
|
|
24634
|
-
version: "0.12.
|
|
24648
|
+
version: "0.12.7"
|
|
24635
24649
|
};
|
|
24636
24650
|
return __toCommonJS(compute_engine_exports);
|
|
24637
24651
|
})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** CortexJS Compute Engine 0.12.
|
|
1
|
+
/** CortexJS Compute Engine 0.12.7 */
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -7514,12 +7514,12 @@ function indexLatexDictionary(dic, onError) {
|
|
|
7514
7514
|
const result = {
|
|
7515
7515
|
lookahead: 1,
|
|
7516
7516
|
name: /* @__PURE__ */ new Map(),
|
|
7517
|
-
expression:
|
|
7518
|
-
function: /* @__PURE__ */ new Map(),
|
|
7517
|
+
expression: [],
|
|
7519
7518
|
symbol: [],
|
|
7520
7519
|
infix: [],
|
|
7521
7520
|
prefix: [],
|
|
7522
7521
|
postfix: [],
|
|
7522
|
+
function: /* @__PURE__ */ new Map(),
|
|
7523
7523
|
environment: /* @__PURE__ */ new Map(),
|
|
7524
7524
|
matchfix: []
|
|
7525
7525
|
};
|
|
@@ -10445,11 +10445,19 @@ var LatexSyntax = class _LatexSyntax {
|
|
|
10445
10445
|
...DEFAULT_SERIALIZE_LATEX_OPTIONS,
|
|
10446
10446
|
...opts
|
|
10447
10447
|
};
|
|
10448
|
+
this._dictionaryInput = options.dictionary ?? _LatexSyntax.getDictionary();
|
|
10448
10449
|
this._dictionary = indexLatexDictionary(
|
|
10449
|
-
|
|
10450
|
+
this._dictionaryInput,
|
|
10450
10451
|
(sig) => this.onError([sig])
|
|
10451
10452
|
);
|
|
10452
10453
|
}
|
|
10454
|
+
get dictionary() {
|
|
10455
|
+
return this._dictionaryInput;
|
|
10456
|
+
}
|
|
10457
|
+
set dictionary(val) {
|
|
10458
|
+
this._dictionaryInput = val;
|
|
10459
|
+
this._dictionary = indexLatexDictionary(val, (sig) => this.onError([sig]));
|
|
10460
|
+
}
|
|
10453
10461
|
updateOptions(opt) {
|
|
10454
10462
|
for (const k of Object.keys(this.options))
|
|
10455
10463
|
if (k in opt)
|
|
@@ -23713,6 +23721,12 @@ var ComputeEngine = class _ComputeEngine {
|
|
|
23713
23721
|
static getStandardLibrary(categories = "all") {
|
|
23714
23722
|
return getStandardLibrary(categories);
|
|
23715
23723
|
}
|
|
23724
|
+
get latexDictionary() {
|
|
23725
|
+
return this.latexSyntax.dictionary;
|
|
23726
|
+
}
|
|
23727
|
+
set latexDictionary(dic) {
|
|
23728
|
+
this.latexSyntax.dictionary = dic;
|
|
23729
|
+
}
|
|
23716
23730
|
/** After the configuration of the engine has changed, clear the caches
|
|
23717
23731
|
* so that new values can be recalculated.
|
|
23718
23732
|
*
|
|
@@ -24602,10 +24616,10 @@ var ComputeEngine = class _ComputeEngine {
|
|
|
24602
24616
|
};
|
|
24603
24617
|
|
|
24604
24618
|
// src/compute-engine.ts
|
|
24605
|
-
var version = "0.12.
|
|
24619
|
+
var version = "0.12.7";
|
|
24606
24620
|
globalThis[Symbol.for("io.cortexjs.compute-engine")] = {
|
|
24607
24621
|
ComputeEngine: ComputeEngine.prototype.constructor,
|
|
24608
|
-
version: "0.12.
|
|
24622
|
+
version: "0.12.7"
|
|
24609
24623
|
};
|
|
24610
24624
|
export {
|
|
24611
24625
|
ComputeEngine,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** CortexJS Compute Engine 0.12.
|
|
1
|
+
/** CortexJS Compute Engine 0.12.7 */
|
|
2
2
|
(function(global,factory){typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'],factory):(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ComputeEngine = {}));})(this, (function (exports) { 'use strict';
|
|
3
3
|
var ComputeEngine = (() => {
|
|
4
4
|
var __create = Object.create;
|
|
@@ -7536,12 +7536,12 @@ var ComputeEngine = (() => {
|
|
|
7536
7536
|
const result = {
|
|
7537
7537
|
lookahead: 1,
|
|
7538
7538
|
name: /* @__PURE__ */ new Map(),
|
|
7539
|
-
expression:
|
|
7540
|
-
function: /* @__PURE__ */ new Map(),
|
|
7539
|
+
expression: [],
|
|
7541
7540
|
symbol: [],
|
|
7542
7541
|
infix: [],
|
|
7543
7542
|
prefix: [],
|
|
7544
7543
|
postfix: [],
|
|
7544
|
+
function: /* @__PURE__ */ new Map(),
|
|
7545
7545
|
environment: /* @__PURE__ */ new Map(),
|
|
7546
7546
|
matchfix: []
|
|
7547
7547
|
};
|
|
@@ -10467,11 +10467,19 @@ var ComputeEngine = (() => {
|
|
|
10467
10467
|
...DEFAULT_SERIALIZE_LATEX_OPTIONS,
|
|
10468
10468
|
...opts
|
|
10469
10469
|
};
|
|
10470
|
+
this._dictionaryInput = options.dictionary ?? _LatexSyntax.getDictionary();
|
|
10470
10471
|
this._dictionary = indexLatexDictionary(
|
|
10471
|
-
|
|
10472
|
+
this._dictionaryInput,
|
|
10472
10473
|
(sig) => this.onError([sig])
|
|
10473
10474
|
);
|
|
10474
10475
|
}
|
|
10476
|
+
get dictionary() {
|
|
10477
|
+
return this._dictionaryInput;
|
|
10478
|
+
}
|
|
10479
|
+
set dictionary(val) {
|
|
10480
|
+
this._dictionaryInput = val;
|
|
10481
|
+
this._dictionary = indexLatexDictionary(val, (sig) => this.onError([sig]));
|
|
10482
|
+
}
|
|
10475
10483
|
updateOptions(opt) {
|
|
10476
10484
|
for (const k of Object.keys(this.options))
|
|
10477
10485
|
if (k in opt)
|
|
@@ -23735,6 +23743,12 @@ ${JSON.stringify(entry)}`
|
|
|
23735
23743
|
static getStandardLibrary(categories = "all") {
|
|
23736
23744
|
return getStandardLibrary(categories);
|
|
23737
23745
|
}
|
|
23746
|
+
get latexDictionary() {
|
|
23747
|
+
return this.latexSyntax.dictionary;
|
|
23748
|
+
}
|
|
23749
|
+
set latexDictionary(dic) {
|
|
23750
|
+
this.latexSyntax.dictionary = dic;
|
|
23751
|
+
}
|
|
23738
23752
|
/** After the configuration of the engine has changed, clear the caches
|
|
23739
23753
|
* so that new values can be recalculated.
|
|
23740
23754
|
*
|
|
@@ -24624,10 +24638,10 @@ ${JSON.stringify(entry)}`
|
|
|
24624
24638
|
};
|
|
24625
24639
|
|
|
24626
24640
|
// src/compute-engine.ts
|
|
24627
|
-
var version = "0.12.
|
|
24641
|
+
var version = "0.12.7";
|
|
24628
24642
|
globalThis[Symbol.for("io.cortexjs.compute-engine")] = {
|
|
24629
24643
|
ComputeEngine: ComputeEngine.prototype.constructor,
|
|
24630
|
-
version: "0.12.
|
|
24644
|
+
version: "0.12.7"
|
|
24631
24645
|
};
|
|
24632
24646
|
return __toCommonJS(compute_engine_exports);
|
|
24633
24647
|
})();
|
package/dist/math-json.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** CortexJS Compute Engine 0.12.
|
|
1
|
+
/** CortexJS Compute Engine 0.12.7 */
|
|
2
2
|
|
|
3
3
|
// src/math-json/utils.ts
|
|
4
4
|
function isSymbolObject(expr) {
|
|
@@ -239,7 +239,7 @@ function mapArgs(expr, fn) {
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
// src/math-json.ts
|
|
242
|
-
var version = "0.12.
|
|
242
|
+
var version = "0.12.7";
|
|
243
243
|
export {
|
|
244
244
|
applyRecursively,
|
|
245
245
|
dictionary as getDictionary,
|
package/dist/math-json.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** CortexJS MathJSON 0.12.
|
|
1
|
+
/** CortexJS MathJSON 0.12.7 */
|
|
2
2
|
(function(global,factory){typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'],factory):(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.MathJson = {}));})(this, (function (exports) { 'use strict';
|
|
3
3
|
var MathJson = (() => {
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -277,7 +277,7 @@ var MathJson = (() => {
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
// src/math-json.ts
|
|
280
|
-
var version = "0.12.
|
|
280
|
+
var version = "0.12.7";
|
|
281
281
|
return __toCommonJS(math_json_exports);
|
|
282
282
|
})();
|
|
283
283
|
Object.assign(exports, MathJson); Object.defineProperty(exports, '__esModule', { value: true });}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** CortexJS Compute Engine 0.12.
|
|
1
|
+
/** CortexJS Compute Engine 0.12.7 */
|
|
2
2
|
|
|
3
3
|
// src/math-json/utils.ts
|
|
4
4
|
function isSymbolObject(expr) {
|
|
@@ -239,7 +239,7 @@ function mapArgs(expr, fn) {
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
// src/math-json.ts
|
|
242
|
-
var version = "0.12.
|
|
242
|
+
var version = "0.12.7";
|
|
243
243
|
export {
|
|
244
244
|
applyRecursively,
|
|
245
245
|
dictionary as getDictionary,
|
package/dist/math-json.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** CortexJS MathJSON 0.12.
|
|
1
|
+
/** CortexJS MathJSON 0.12.7 */
|
|
2
2
|
(function(global,factory){typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'],factory):(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.MathJson = {}));})(this, (function (exports) { 'use strict';
|
|
3
3
|
var MathJson = (() => {
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -277,7 +277,7 @@ var MathJson = (() => {
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
// src/math-json.ts
|
|
280
|
-
var version = "0.12.
|
|
280
|
+
var version = "0.12.7";
|
|
281
281
|
return __toCommonJS(math_json_exports);
|
|
282
282
|
})();
|
|
283
283
|
Object.assign(exports, MathJson); Object.defineProperty(exports, '__esModule', { value: true });}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export type SignalCode = RuntimeSignalCode | ('invalid-name' | 'expected-predicate' | 'expected-symbol' | 'operator-requires-one-operand' | 'postfix-operator-requires-one-operand' | 'prefix-operator-requires-one-operand' | 'unbalanced-symbols' | 'expected-argument' | 'unexpected-command' | 'cyclic-definition' | 'invalid-supersets' | 'expected-supersets' | 'unknown-domain' | 'duplicate-wikidata' | 'invalid-dictionary-entry' | 'syntax-error');
|
|
3
3
|
export type SignalMessage = SignalCode | [SignalCode, ...any[]];
|
|
4
4
|
export type SignalOrigin = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { Complex } from 'complex.js';
|
|
3
3
|
import { Expression } from '../../math-json/math-json-format';
|
|
4
4
|
import { BoxedExpression, BoxedFunctionDefinition, BoxedRuleSet, BoxedSymbolDefinition, BoxedDomain, EvaluateOptions, IComputeEngine, LatexString, Metadata, NOptions, PatternMatchOptions, SemiBoxedExpression, SimplifyOptions, Substitution, RuntimeScope, DomainCompatibility, DomainLiteral, BoxedBaseDefinition, Rational, BoxedSubstitution } from '../public';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { BoxedExpression, IComputeEngine, EvaluateOptions, NOptions, BoxedRuleSet, SemiBoxedExpression, SimplifyOptions, ReplaceOptions, Substitution, Metadata, PatternMatchOptions, BoxedDomain, BoxedSubstitution } from '../public';
|
|
3
3
|
import { AbstractBoxedExpression } from './abstract-boxed-expression';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { BoxedDomain, BoxedExpression, BoxedSubstitution, DomainCompatibility, DomainConstructor, DomainExpression, DomainLiteral, IComputeEngine, Metadata, PatternMatchOptions } from '../public';
|
|
3
3
|
import { AbstractBoxedExpression } from './abstract-boxed-expression';
|
|
4
4
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare function makeFunctionDefinition(engine: IComputeEngine, name: string, def: FunctionDefinition | BoxedFunctionDefinition): BoxedFunctionDefinition;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { Expression } from '../../math-json/math-json-format';
|
|
3
3
|
import { BoxedExpression, BoxedFunctionDefinition, IComputeEngine, NOptions, BoxedRuleSet, SemiBoxedExpression, SimplifyOptions, Substitution, ReplaceOptions, Metadata, PatternMatchOptions, BoxedDomain, RuntimeScope, BoxedSubstitution, EvaluateOptions } from '../public';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { Complex } from 'complex.js';
|
|
3
3
|
import { Expression } from '../../math-json/math-json-format';
|
|
4
4
|
import { BoxedExpression, BoxedDomain, IComputeEngine, Metadata, NOptions, PatternMatchOptions, Rational, SimplifyOptions, BoxedSubstitution } from '../public';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { AbstractBoxedExpression } from './abstract-boxed-expression';
|
|
3
3
|
import { BoxedExpression, BoxedSubstitution, BoxedDomain, IComputeEngine, LatexString, Metadata, Pattern, PatternMatchOptions, SemiBoxedExpression, Substitution } from '../public';
|
|
4
4
|
export declare class BoxedPattern extends AbstractBoxedExpression implements Pattern {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { AbstractBoxedExpression } from './abstract-boxed-expression';
|
|
3
3
|
import { BoxedExpression, BoxedRuleSet, BoxedSymbolDefinition, IComputeEngine, EvaluateOptions, NOptions, ReplaceOptions, SimplifyOptions, Substitution, Metadata, PatternMatchOptions, BoxedDomain, RuntimeScope, BoxedFunctionDefinition, BoxedBaseDefinition, DomainExpression, BoxedSubstitution } from '../public';
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { Complex } from 'complex.js';
|
|
3
3
|
import { Expression, MathJsonNumber } from '../math-json/math-json-format';
|
|
4
4
|
import type { LibraryCategory, LatexDictionary, LatexDictionaryEntry, LatexString, NumberFormattingOptions, ParseLatexOptions, SerializeLatexOptions } from './latex-syntax/public';
|
|
@@ -157,6 +157,8 @@ export declare class ComputeEngine implements IComputeEngine {
|
|
|
157
157
|
tolerance?: number;
|
|
158
158
|
defaultDomain?: string;
|
|
159
159
|
});
|
|
160
|
+
get latexDictionary(): readonly LatexDictionaryEntry[];
|
|
161
|
+
set latexDictionary(dic: readonly LatexDictionaryEntry[]);
|
|
160
162
|
/** After the configuration of the engine has changed, clear the caches
|
|
161
163
|
* so that new values can be recalculated.
|
|
162
164
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const DEFINITIONS_ALGEBRA: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const DEFINITIONS_ARITHMETIC: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const DEFINITIONS_CALCULUS: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const DEFINITIONS_CORE: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const DEFINITIONS_INEQUALITIES: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const DEFINITIONS_LOGIC: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const DEFINITIONS_OTHERS: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const DEFINITIONS_SETS: LatexDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const DEFINITIONS_TRIGONOMETRY: LatexDictionary;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { WarningSignal } from '../../../common/signals';
|
|
3
3
|
export type CommonEntry = {
|
|
4
4
|
name?: string;
|
|
@@ -56,13 +56,13 @@ export type IndexedLatexDictionaryEntry = IndexedExpressionEntry | IndexedFuncti
|
|
|
56
56
|
export type IndexedLatexDictionary = {
|
|
57
57
|
lookahead: number;
|
|
58
58
|
name: Map<string, IndexedLatexDictionaryEntry>;
|
|
59
|
-
expression: Map<
|
|
60
|
-
function: Map<string, IndexedFunctionEntry[]>;
|
|
59
|
+
expression: (Map<LatexString, IndexedExpressionEntry[]> | null)[];
|
|
61
60
|
symbol: (Map<LatexString, IndexedSymbolEntry[]> | null)[];
|
|
62
61
|
prefix: (Map<LatexString, IndexedPrefixEntry[]> | null)[];
|
|
63
62
|
infix: (Map<LatexString, IndexedInfixEntry[]> | null)[];
|
|
64
63
|
postfix: (Map<LatexString, IndexedPostfixEntry[]> | null)[];
|
|
65
64
|
matchfix: IndexedMatchfixEntry[];
|
|
65
|
+
function: Map<string, IndexedFunctionEntry[]>;
|
|
66
66
|
environment: Map<string, EnvironmentEntry>;
|
|
67
67
|
};
|
|
68
68
|
export declare function indexLatexDictionary(dic: readonly Partial<LatexDictionaryEntry>[], onError: (sig: WarningSignal) => void): IndexedLatexDictionary;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { Serializer } from './serializer';
|
|
3
3
|
import { Expression } from '../../math-json/math-json-format';
|
|
4
4
|
import { WarningSignalHandler } from '../../common/signals';
|
|
@@ -9,12 +9,15 @@ export declare class LatexSyntax {
|
|
|
9
9
|
readonly options: NumberFormattingOptions & ParseLatexOptions & SerializeLatexOptions;
|
|
10
10
|
readonly computeEngine: IComputeEngine;
|
|
11
11
|
private _dictionary;
|
|
12
|
+
private _dictionaryInput;
|
|
12
13
|
private _serializer?;
|
|
13
14
|
constructor(options: Partial<NumberFormattingOptions> & Partial<ParseLatexOptions> & Partial<SerializeLatexOptions> & {
|
|
14
15
|
computeEngine: IComputeEngine;
|
|
15
16
|
dictionary?: readonly LatexDictionaryEntry[];
|
|
16
17
|
onError?: WarningSignalHandler;
|
|
17
18
|
});
|
|
19
|
+
get dictionary(): readonly LatexDictionaryEntry[];
|
|
20
|
+
set dictionary(val: readonly LatexDictionaryEntry[]);
|
|
18
21
|
updateOptions(opt: Partial<NumberFormattingOptions> & Partial<ParseLatexOptions> & Partial<SerializeLatexOptions>): void;
|
|
19
22
|
static getDictionary(category?: LibraryCategory | 'all'): Readonly<LatexDictionary>;
|
|
20
23
|
parse(latex: LatexString): Expression;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { IndexedLatexDictionary, IndexedInfixEntry, IndexedPostfixEntry, IndexedPrefixEntry, IndexedSymbolEntry, IndexedExpressionEntry } from './dictionary/definitions';
|
|
3
3
|
import { IComputeEngine } from '../public';
|
|
4
4
|
import { Expression } from '../../math-json/math-json-format';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare function getApplyFunctionStyle(_expr: Expression, _level: number): 'paren' | 'leftright' | 'big' | 'none';
|
|
3
3
|
export declare function getGroupStyle(_expr: Expression, _level: number): 'paren' | 'leftright' | 'big' | 'none';
|
|
4
4
|
export declare function getRootStyle(_expr: Expression | null, level: number): 'radical' | 'quotient' | 'solidus';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
import { WarningSignalHandler } from '../../common/signals';
|
|
3
3
|
import { NumberFormattingOptions, LatexString, SerializeLatexOptions } from './public';
|
|
4
4
|
import { IndexedLatexDictionary, IndexedSymbolEntry, IndexedFunctionEntry } from './dictionary/definitions';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const ARITHMETIC_LIBRARY: IdTable[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const CALCULUS_LIBRARY: IdTable[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const COLLECTIONS_LIBRARY: IdTable;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const CORE_LIBRARY: IdTable[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const LOGIC_LIBRARY: IdTable;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const POLYNOMIALS_LIBRARY: IdTable[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare function randomExpression(level?: number): Expression;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const RELOP_LIBRARY: IdTable;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const SETS_LIBRARY: IdTable;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const TRIGONOMETRY_LIBRARY: IdTable[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare function isSymbolDefinition(def: BoxedSymbolDefinition | BoxedFunctionDefinition | SymbolDefinition | FunctionDefinition | undefined | null): def is BoxedSymbolDefinition;
|
|
3
3
|
export declare function isFunctionDefinition(def: BoxedSymbolDefinition | BoxedFunctionDefinition | SymbolDefinition | FunctionDefinition | undefined | null): def is BoxedFunctionDefinition;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare function isPrime(n: number): boolean | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
* The most important classes are {@link ComputeEngine} and
|
|
3
3
|
* {@link BoxedExpression}.
|
|
4
4
|
*
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import type { Decimal } from 'decimal.js';
|
|
11
11
|
import type { Complex } from 'complex.js';
|
|
12
12
|
import type { Expression, MathJsonDictionary, MathJsonFunction, MathJsonNumber, MathJsonString, MathJsonSymbol } from '../math-json/math-json-format';
|
|
13
|
-
import type { NumberFormattingOptions, ParseLatexOptions, SerializeLatexOptions } from './latex-syntax/public';
|
|
13
|
+
import type { LatexDictionaryEntry, NumberFormattingOptions, ParseLatexOptions, SerializeLatexOptions } from './latex-syntax/public';
|
|
14
14
|
export * from './latex-syntax/public';
|
|
15
15
|
export type Rational = [number, number] | [bigint, bigint];
|
|
16
16
|
/**
|
|
@@ -1521,6 +1521,7 @@ export interface ComputeEngineStats {
|
|
|
1521
1521
|
}
|
|
1522
1522
|
/** @internal */
|
|
1523
1523
|
export interface IComputeEngine {
|
|
1524
|
+
latexDictionary: readonly LatexDictionaryEntry[];
|
|
1524
1525
|
/** @internal */
|
|
1525
1526
|
readonly _ZERO: BoxedExpression;
|
|
1526
1527
|
/** @internal */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare function distribute(expr: BoxedExpression[]): BoxedExpression;
|
|
3
3
|
/** Use the multinomial theorem (https://en.wikipedia.org/wiki/Multinomial_theorem) to expand the expression.
|
|
4
4
|
* The expression must be a power of a sum of terms.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* 0.12.
|
|
2
|
-
export declare const version = "0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
|
+
export declare const version = "0.12.7";
|
|
3
3
|
export { ComputeEngine } from './compute-engine/compute-engine';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export declare const MISSING: Expression;
|
|
3
3
|
export declare function isNumberExpression(expr: Expression | null): expr is number | string | MathJsonNumber;
|
|
4
4
|
export declare function isNumberObject(expr: Expression | null): expr is MathJsonNumber;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* 0.12.
|
|
1
|
+
/* 0.12.7 */
|
|
2
2
|
export { isSymbolObject, isStringObject, isFunctionObject, isDictionaryObject, stringValue as getStringValue, head, headName, symbol, applyRecursively, mapArgs, op, nops, dictionary as getDictionary, } from './math-json/utils';
|
|
3
|
-
export declare const version = "0.12.
|
|
3
|
+
export declare const version = "0.12.7";
|
package/package.json
CHANGED