@cortex-js/compute-engine 0.55.6 → 0.57.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/dist/compile.esm.js +1224 -179
- package/dist/compile.min.esm.js +290 -91
- package/dist/compile.min.umd.cjs +291 -92
- package/dist/compile.umd.cjs +1224 -179
- package/dist/compute-engine.esm.js +1973 -306
- package/dist/compute-engine.min.esm.js +301 -102
- package/dist/compute-engine.min.umd.cjs +301 -102
- package/dist/compute-engine.umd.cjs +1973 -306
- package/dist/core.esm.js +1972 -305
- package/dist/core.min.esm.js +300 -101
- package/dist/core.min.umd.cjs +300 -101
- package/dist/core.umd.cjs +1972 -305
- package/dist/interval.esm.js +360 -19
- package/dist/interval.min.esm.js +6 -6
- package/dist/interval.min.umd.cjs +6 -6
- package/dist/interval.umd.cjs +360 -19
- package/dist/latex-syntax.esm.js +427 -25
- package/dist/latex-syntax.min.esm.js +7 -7
- package/dist/latex-syntax.min.umd.cjs +7 -7
- package/dist/latex-syntax.umd.cjs +427 -25
- package/dist/math-json.esm.js +2 -2
- package/dist/math-json.min.esm.js +2 -2
- package/dist/math-json.min.umd.cjs +2 -2
- package/dist/math-json.umd.cjs +2 -2
- package/dist/numerics.esm.js +4 -2
- package/dist/numerics.min.esm.js +3 -3
- package/dist/numerics.min.umd.cjs +3 -3
- package/dist/numerics.umd.cjs +4 -2
- package/dist/types/big-decimal/big-decimal.d.ts +1 -1
- package/dist/types/big-decimal/index.d.ts +1 -1
- package/dist/types/big-decimal/transcendentals.d.ts +1 -1
- package/dist/types/big-decimal/utils.d.ts +1 -1
- 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 +1 -1
- package/dist/types/common/type/primitive.d.ts +1 -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 +2 -2
- package/dist/types/common/type/utils.d.ts +1 -1
- package/dist/types/common/utils.d.ts +1 -1
- package/dist/types/compile.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 +6 -1
- package/dist/types/compute-engine/boxed-expression/apply.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/arithmetic-add.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/arithmetic-mul-div.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/arithmetic-power.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/ascii-math.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-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-operator-definition.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.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-tensor.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/boxed-value-definition.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/cache.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/canonical-utils.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/canonical.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/compare.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/constants.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/expand.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/expression-map.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/factor.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/flatten.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/hold.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/inequality-bounds.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/init-lazy-refs.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/invisible-operator.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/match.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/negate.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/numerics.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/order.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/pattern-utils.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/polynomial-degree.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/polynomials.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/predicates.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/rules.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/serialize.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/sgn.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/simplify.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/solve-linear-system.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/solve.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/stochastic-equal.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/trigonometry.d.ts +1 -1
- package/dist/types/compute-engine/boxed-expression/type-guards.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/collection-utils.d.ts +1 -1
- package/dist/types/compute-engine/compilation/base-compiler.d.ts +55 -6
- package/dist/types/compute-engine/compilation/compile-expression.d.ts +1 -1
- package/dist/types/compute-engine/compilation/constant-folding.d.ts +1 -1
- package/dist/types/compute-engine/compilation/glsl-target.d.ts +1 -1
- package/dist/types/compute-engine/compilation/gpu-target.d.ts +15 -5
- package/dist/types/compute-engine/compilation/interval-javascript-target.d.ts +1 -1
- package/dist/types/compute-engine/compilation/javascript-target.d.ts +25 -3
- package/dist/types/compute-engine/compilation/python-target.d.ts +1 -1
- package/dist/types/compute-engine/compilation/types.d.ts +1 -1
- package/dist/types/compute-engine/compilation/wgsl-target.d.ts +1 -1
- package/dist/types/compute-engine/cost-function.d.ts +1 -1
- package/dist/types/compute-engine/engine-assumptions.d.ts +1 -1
- package/dist/types/compute-engine/engine-cache.d.ts +1 -1
- package/dist/types/compute-engine/engine-common-symbols.d.ts +1 -1
- package/dist/types/compute-engine/engine-compilation-targets.d.ts +1 -1
- package/dist/types/compute-engine/engine-configuration-lifecycle.d.ts +1 -1
- package/dist/types/compute-engine/engine-declarations.d.ts +1 -1
- package/dist/types/compute-engine/engine-expression-entrypoints.d.ts +1 -1
- package/dist/types/compute-engine/engine-extension-contracts.d.ts +1 -1
- package/dist/types/compute-engine/engine-library-bootstrap.d.ts +1 -1
- package/dist/types/compute-engine/engine-numeric-configuration.d.ts +1 -1
- package/dist/types/compute-engine/engine-runtime-state.d.ts +1 -1
- package/dist/types/compute-engine/engine-scope.d.ts +1 -1
- package/dist/types/compute-engine/engine-sequences.d.ts +1 -1
- package/dist/types/compute-engine/engine-simplification-rules.d.ts +1 -1
- package/dist/types/compute-engine/engine-startup-coordinator.d.ts +1 -1
- package/dist/types/compute-engine/engine-type-resolver.d.ts +1 -1
- package/dist/types/compute-engine/engine-validation-entrypoints.d.ts +1 -1
- package/dist/types/compute-engine/free-functions.d.ts +1 -1
- package/dist/types/compute-engine/function-utils.d.ts +1 -1
- package/dist/types/compute-engine/global-types.d.ts +1 -1
- package/dist/types/compute-engine/index.d.ts +24 -3
- 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/default-dictionary.d.ts +4 -3
- 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-colors.d.ts +10 -0
- 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-units.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/definitions.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/dictionary/indexed-types.d.ts +9 -1
- package/dist/types/compute-engine/latex-syntax/latex-syntax.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/parse-number.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/parse-symbol.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/parse.d.ts +1 -1
- package/dist/types/compute-engine/latex-syntax/serialize-dms.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/latex-syntax/types.d.ts +40 -1
- package/dist/types/compute-engine/latex-syntax/utils.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 +5 -3
- package/dist/types/compute-engine/library/colors.d.ts +1 -1
- 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/fractals.d.ts +1 -1
- package/dist/types/compute-engine/library/library.d.ts +1 -1
- package/dist/types/compute-engine/library/linear-algebra.d.ts +1 -1
- package/dist/types/compute-engine/library/logic-analysis.d.ts +1 -1
- package/dist/types/compute-engine/library/logic.d.ts +1 -1
- 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/quantity-arithmetic.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/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 +1 -1
- package/dist/types/compute-engine/library/unit-data.d.ts +1 -1
- package/dist/types/compute-engine/library/units.d.ts +1 -1
- package/dist/types/compute-engine/library/utils.d.ts +1 -1
- package/dist/types/compute-engine/numeric-value/big-numeric-value.d.ts +1 -1
- package/dist/types/compute-engine/numeric-value/exact-numeric-value.d.ts +1 -1
- package/dist/types/compute-engine/numeric-value/machine-numeric-value.d.ts +1 -1
- package/dist/types/compute-engine/numeric-value/types.d.ts +1 -1
- package/dist/types/compute-engine/numerics/bigint.d.ts +1 -1
- package/dist/types/compute-engine/numerics/expression.d.ts +1 -1
- package/dist/types/compute-engine/numerics/interval.d.ts +1 -1
- package/dist/types/compute-engine/numerics/linear-algebra.d.ts +1 -1
- 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 +1 -1
- package/dist/types/compute-engine/numerics/richardson.d.ts +1 -1
- package/dist/types/compute-engine/numerics/special-functions.d.ts +1 -1
- package/dist/types/compute-engine/numerics/statistics.d.ts +1 -1
- package/dist/types/compute-engine/numerics/strings.d.ts +1 -1
- package/dist/types/compute-engine/numerics/types.d.ts +1 -1
- package/dist/types/compute-engine/numerics/unit-data.d.ts +1 -1
- package/dist/types/compute-engine/oeis.d.ts +1 -1
- package/dist/types/compute-engine/sequence.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/antiderivative.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/derivative.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/distribute.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/fu-cost.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/fu-transforms.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/fu.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/logic-utils.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-abs.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-divide.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-factorial.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-hyperbolic.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-infinity.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-log.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-logic.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-power.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-product.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-rules.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-sum.d.ts +1 -1
- package/dist/types/compute-engine/symbolic/simplify-trig.d.ts +1 -1
- package/dist/types/compute-engine/tensor/tensor-fields.d.ts +1 -1
- package/dist/types/compute-engine/tensor/tensors.d.ts +1 -1
- package/dist/types/compute-engine/types-definitions.d.ts +1 -1
- package/dist/types/compute-engine/types-engine.d.ts +23 -2
- package/dist/types/compute-engine/types-evaluation.d.ts +1 -1
- package/dist/types/compute-engine/types-expression.d.ts +1 -1
- package/dist/types/compute-engine/types-kernel-evaluation.d.ts +1 -1
- package/dist/types/compute-engine/types-kernel-serialization.d.ts +1 -1
- package/dist/types/compute-engine/types-serialization.d.ts +1 -1
- package/dist/types/compute-engine/types.d.ts +1 -1
- package/dist/types/compute-engine.d.ts +1 -2
- package/dist/types/core.d.ts +1 -1
- package/dist/types/interval.d.ts +1 -1
- package/dist/types/latex-syntax.d.ts +2 -2
- package/dist/types/math-json/symbols.d.ts +1 -1
- package/dist/types/math-json/types.d.ts +1 -1
- package/dist/types/math-json/utils.d.ts +1 -1
- package/dist/types/math-json.d.ts +2 -2
- package/dist/types/numerics.d.ts +1 -1
- package/package.json +2 -2
package/dist/interval.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Interval 0.
|
|
1
|
+
/** Interval 0.57.0 */
|
|
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.Interval = {}));})(this, (function (exports) { 'use strict';
|
|
3
3
|
var Interval = (() => {
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -3238,6 +3238,7 @@ var Interval = (() => {
|
|
|
3238
3238
|
];
|
|
3239
3239
|
var VALUE_TYPES = [
|
|
3240
3240
|
"value",
|
|
3241
|
+
"color",
|
|
3241
3242
|
...COLLECTION_TYPES,
|
|
3242
3243
|
...SCALAR_TYPES
|
|
3243
3244
|
];
|
|
@@ -4889,6 +4890,7 @@ var Interval = (() => {
|
|
|
4889
4890
|
symbol: [],
|
|
4890
4891
|
boolean: [],
|
|
4891
4892
|
string: [],
|
|
4893
|
+
color: [],
|
|
4892
4894
|
expression: EXPRESSION_TYPES
|
|
4893
4895
|
};
|
|
4894
4896
|
function isPrimitiveSubtype(lhs, rhs) {
|
|
@@ -6039,6 +6041,64 @@ var Interval = (() => {
|
|
|
6039
6041
|
}
|
|
6040
6042
|
|
|
6041
6043
|
// src/compute-engine/latex-syntax/dictionary/definitions-core.ts
|
|
6044
|
+
var COMPONENT_ACCESS_HEADS = {
|
|
6045
|
+
x: "First",
|
|
6046
|
+
y: "Second",
|
|
6047
|
+
z: "Third",
|
|
6048
|
+
real: "Real",
|
|
6049
|
+
re: "Real",
|
|
6050
|
+
imag: "Imaginary",
|
|
6051
|
+
im: "Imaginary",
|
|
6052
|
+
count: "Length",
|
|
6053
|
+
total: "Sum",
|
|
6054
|
+
max: "Max",
|
|
6055
|
+
min: "Min"
|
|
6056
|
+
};
|
|
6057
|
+
function memberHead(name) {
|
|
6058
|
+
return COMPONENT_ACCESS_HEADS[name] ?? null;
|
|
6059
|
+
}
|
|
6060
|
+
function parseComponentAccess(parser, lhs) {
|
|
6061
|
+
parser.skipVisualSpace();
|
|
6062
|
+
if (parser.match("\\operatorname")) {
|
|
6063
|
+
const name = parser.parseStringGroup();
|
|
6064
|
+
if (name === null) return null;
|
|
6065
|
+
const head = memberHead(name.trim());
|
|
6066
|
+
if (head === null) return null;
|
|
6067
|
+
return [head, lhs];
|
|
6068
|
+
}
|
|
6069
|
+
const tok = parser.peek;
|
|
6070
|
+
if (typeof tok === "string" && tok.startsWith("\\")) {
|
|
6071
|
+
const bare = tok.slice(1);
|
|
6072
|
+
const head = memberHead(bare);
|
|
6073
|
+
if (head !== null) {
|
|
6074
|
+
parser.nextToken();
|
|
6075
|
+
return [head, lhs];
|
|
6076
|
+
}
|
|
6077
|
+
return null;
|
|
6078
|
+
}
|
|
6079
|
+
if (typeof tok === "string" && /^[a-zA-Z]$/.test(tok)) {
|
|
6080
|
+
const head = memberHead(tok);
|
|
6081
|
+
if (head === null) return null;
|
|
6082
|
+
parser.nextToken();
|
|
6083
|
+
return [head, lhs];
|
|
6084
|
+
}
|
|
6085
|
+
return null;
|
|
6086
|
+
}
|
|
6087
|
+
function parseWhenRestriction(parser, lhs, close) {
|
|
6088
|
+
parser.addBoundary(close);
|
|
6089
|
+
parser.skipVisualSpace();
|
|
6090
|
+
const cond = parser.parseExpression({ minPrec: 0 });
|
|
6091
|
+
if (cond === null) {
|
|
6092
|
+
parser.removeBoundary();
|
|
6093
|
+
return null;
|
|
6094
|
+
}
|
|
6095
|
+
parser.skipVisualSpace();
|
|
6096
|
+
if (!parser.matchBoundary()) {
|
|
6097
|
+
parser.removeBoundary();
|
|
6098
|
+
return null;
|
|
6099
|
+
}
|
|
6100
|
+
return ["When", lhs, cond];
|
|
6101
|
+
}
|
|
6042
6102
|
function parseSequence(parser, terminator, lhs, prec, sep) {
|
|
6043
6103
|
if (terminator && terminator.minPrec >= prec) return null;
|
|
6044
6104
|
const result = lhs ? [lhs] : ["Nothing"];
|
|
@@ -6510,6 +6570,15 @@ var Interval = (() => {
|
|
|
6510
6570
|
}
|
|
6511
6571
|
},
|
|
6512
6572
|
{ name: "LatexTokens", serialize: serializeLatexTokens },
|
|
6573
|
+
// Component-access postfix: expr.member (C3)
|
|
6574
|
+
// The '.' trigger is consumed before the parse function is called.
|
|
6575
|
+
// Precedence 850 > 810 (At/indexing) so .x chains tightly.
|
|
6576
|
+
{
|
|
6577
|
+
kind: "postfix",
|
|
6578
|
+
precedence: 850,
|
|
6579
|
+
latexTrigger: ["."],
|
|
6580
|
+
parse: parseComponentAccess
|
|
6581
|
+
},
|
|
6513
6582
|
{
|
|
6514
6583
|
name: "At",
|
|
6515
6584
|
kind: "postfix",
|
|
@@ -6530,6 +6599,29 @@ var Interval = (() => {
|
|
|
6530
6599
|
latexTrigger: ["\\left", "\\lbrack"],
|
|
6531
6600
|
parse: parseAt("\\right", "\\rbrack")
|
|
6532
6601
|
},
|
|
6602
|
+
// When-restriction: `expr\left\{cond\right\}` → `When(expr, cond)` (D3)
|
|
6603
|
+
{
|
|
6604
|
+
name: "When",
|
|
6605
|
+
kind: "postfix",
|
|
6606
|
+
precedence: 800,
|
|
6607
|
+
latexTrigger: ["\\left", "\\{"],
|
|
6608
|
+
parse: (parser, lhs) => parseWhenRestriction(parser, lhs, ["\\right", "\\}"]),
|
|
6609
|
+
serialize: (serializer, expr) => {
|
|
6610
|
+
const e = operand(expr, 1);
|
|
6611
|
+
const cond = operand(expr, 2);
|
|
6612
|
+
if (!e || !cond) return "";
|
|
6613
|
+
const clauses = operator(cond) === "And" ? operands(cond) ?? [] : [cond];
|
|
6614
|
+
const inner = clauses.map((c) => `\\left\\{${serializer.serialize(c)}\\right\\}`).join("");
|
|
6615
|
+
return `${serializer.serialize(e)}${inner}`;
|
|
6616
|
+
}
|
|
6617
|
+
},
|
|
6618
|
+
// When-restriction: bare `expr\{cond\}` → `When(expr, cond)`
|
|
6619
|
+
{
|
|
6620
|
+
kind: "postfix",
|
|
6621
|
+
precedence: 800,
|
|
6622
|
+
latexTrigger: ["\\{"],
|
|
6623
|
+
parse: (parser, lhs) => parseWhenRestriction(parser, lhs, ["\\}"])
|
|
6624
|
+
},
|
|
6533
6625
|
{
|
|
6534
6626
|
kind: "postfix",
|
|
6535
6627
|
latexTrigger: ["_"],
|
|
@@ -6612,6 +6704,29 @@ var Interval = (() => {
|
|
|
6612
6704
|
return "";
|
|
6613
6705
|
}
|
|
6614
6706
|
},
|
|
6707
|
+
// Additional triggers for Range: `...`, `\ldots`, and `\dots` are
|
|
6708
|
+
// equivalent to `..` when used as infix operators (e.g. `[1...9]`).
|
|
6709
|
+
// No `name` field here — names must be unique per the dictionary rules;
|
|
6710
|
+
// the first Range entry owns the name. When there is no LHS the symbol
|
|
6711
|
+
// entries near the top of the file still fire (ContinuationPlaceholder).
|
|
6712
|
+
{
|
|
6713
|
+
latexTrigger: [".", ".", "."],
|
|
6714
|
+
kind: "infix",
|
|
6715
|
+
precedence: 800,
|
|
6716
|
+
parse: parseRange
|
|
6717
|
+
},
|
|
6718
|
+
{
|
|
6719
|
+
latexTrigger: ["\\ldots"],
|
|
6720
|
+
kind: "infix",
|
|
6721
|
+
precedence: 800,
|
|
6722
|
+
parse: parseRange
|
|
6723
|
+
},
|
|
6724
|
+
{
|
|
6725
|
+
latexTrigger: ["\\dots"],
|
|
6726
|
+
kind: "infix",
|
|
6727
|
+
precedence: 800,
|
|
6728
|
+
parse: parseRange
|
|
6729
|
+
},
|
|
6615
6730
|
{
|
|
6616
6731
|
latexTrigger: [";"],
|
|
6617
6732
|
kind: "infix",
|
|
@@ -6796,13 +6911,24 @@ var Interval = (() => {
|
|
|
6796
6911
|
const args = operands(expr);
|
|
6797
6912
|
if (!args || args.length < 2) return "";
|
|
6798
6913
|
const body = args[0];
|
|
6799
|
-
const
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6914
|
+
const elements = args.slice(1);
|
|
6915
|
+
const allElements = elements.every((e) => operator(e) === "Element");
|
|
6916
|
+
if (!allElements) {
|
|
6917
|
+
return joinLatex([
|
|
6918
|
+
"\\operatorname{Loop}(",
|
|
6919
|
+
serializer.serialize(body),
|
|
6920
|
+
", ",
|
|
6921
|
+
serializer.serialize(elements[0]),
|
|
6922
|
+
")"
|
|
6923
|
+
]);
|
|
6924
|
+
}
|
|
6925
|
+
if (elements.length === 1) {
|
|
6926
|
+
const elem = elements[0];
|
|
6927
|
+
const index = operand(elem, 1);
|
|
6928
|
+
const coll = operand(elem, 2);
|
|
6929
|
+
if (operator(coll) === "Range") {
|
|
6930
|
+
const lo = operand(coll, 1);
|
|
6931
|
+
const hi = operand(coll, 2);
|
|
6806
6932
|
return joinLatex([
|
|
6807
6933
|
"\\text{for }",
|
|
6808
6934
|
serializer.serialize(index),
|
|
@@ -6814,13 +6940,27 @@ var Interval = (() => {
|
|
|
6814
6940
|
serializer.serialize(body)
|
|
6815
6941
|
]);
|
|
6816
6942
|
}
|
|
6943
|
+
return joinLatex([
|
|
6944
|
+
serializer.serialize(body),
|
|
6945
|
+
" \\operatorname{for} ",
|
|
6946
|
+
serializer.serialize(index),
|
|
6947
|
+
" = ",
|
|
6948
|
+
serializer.serialize(coll)
|
|
6949
|
+
]);
|
|
6817
6950
|
}
|
|
6951
|
+
const bindings = elements.map((elem) => {
|
|
6952
|
+
const name = operand(elem, 1);
|
|
6953
|
+
const coll = operand(elem, 2);
|
|
6954
|
+
return joinLatex([
|
|
6955
|
+
serializer.serialize(name),
|
|
6956
|
+
" = ",
|
|
6957
|
+
serializer.serialize(coll)
|
|
6958
|
+
]);
|
|
6959
|
+
}).join(", ");
|
|
6818
6960
|
return joinLatex([
|
|
6819
|
-
"\\operatorname{Loop}(",
|
|
6820
6961
|
serializer.serialize(body),
|
|
6821
|
-
"
|
|
6822
|
-
|
|
6823
|
-
")"
|
|
6962
|
+
" \\operatorname{for} ",
|
|
6963
|
+
bindings
|
|
6824
6964
|
]);
|
|
6825
6965
|
}
|
|
6826
6966
|
},
|
|
@@ -6853,6 +6993,18 @@ var Interval = (() => {
|
|
|
6853
6993
|
precedence: 245,
|
|
6854
6994
|
parse: (parser, until) => parseForExpression(parser, until)
|
|
6855
6995
|
},
|
|
6996
|
+
// \operatorname{for} as postfix infix (list comprehension):
|
|
6997
|
+
// `body \operatorname{for} x = L_1, y = L_2`
|
|
6998
|
+
// Precedence 19 — just below comma (20) so the body is allowed to use
|
|
6999
|
+
// any operator (including comma sequencing) up to the keyword, and the
|
|
7000
|
+
// bindings can be comma-separated below us.
|
|
7001
|
+
{
|
|
7002
|
+
symbolTrigger: "for",
|
|
7003
|
+
kind: "infix",
|
|
7004
|
+
associativity: "none",
|
|
7005
|
+
precedence: 19,
|
|
7006
|
+
parse: (parser, lhs, until) => parseForComprehension(parser, lhs, until)
|
|
7007
|
+
},
|
|
6856
7008
|
// \operatorname{break}
|
|
6857
7009
|
{
|
|
6858
7010
|
symbolTrigger: "break",
|
|
@@ -7057,7 +7209,10 @@ var Interval = (() => {
|
|
|
7057
7209
|
if (!sym || !parser.getSymbolType(sym).matches("function")) return null;
|
|
7058
7210
|
parser.addBoundary([")"]);
|
|
7059
7211
|
const expr = parser.parseExpression(until);
|
|
7060
|
-
if (!parser.matchBoundary())
|
|
7212
|
+
if (!parser.matchBoundary()) {
|
|
7213
|
+
parser.removeBoundary();
|
|
7214
|
+
return null;
|
|
7215
|
+
}
|
|
7061
7216
|
if (!parser.match("<}>")) return null;
|
|
7062
7217
|
return ["Derivative", lhs, expr];
|
|
7063
7218
|
}
|
|
@@ -7498,7 +7653,12 @@ var Interval = (() => {
|
|
|
7498
7653
|
if (isEmptySequence(body)) return ["List"];
|
|
7499
7654
|
const h = operator(body);
|
|
7500
7655
|
if (h === "Range" || h === "Linspace") return body;
|
|
7501
|
-
if (h === "Sequence")
|
|
7656
|
+
if (h === "Sequence") {
|
|
7657
|
+
const elems = operands(body);
|
|
7658
|
+
const inferred = tryInferRangeFromElements(elems, parser);
|
|
7659
|
+
if (inferred) return inferred;
|
|
7660
|
+
return ["List", ...elems];
|
|
7661
|
+
}
|
|
7502
7662
|
if (h === "Delimiter") {
|
|
7503
7663
|
const delim = stringValue(operand(body, 2)) ?? "...";
|
|
7504
7664
|
if (delim === ";" || delim === ".;.") {
|
|
@@ -7511,12 +7671,37 @@ var Interval = (() => {
|
|
|
7511
7671
|
}
|
|
7512
7672
|
if (delim === "," || delim === ".,.") {
|
|
7513
7673
|
body = operand(body, 1);
|
|
7514
|
-
if (operator(body) === "Sequence")
|
|
7674
|
+
if (operator(body) === "Sequence") {
|
|
7675
|
+
const elems = operands(body);
|
|
7676
|
+
const inferred = tryInferRangeFromElements(elems, parser);
|
|
7677
|
+
if (inferred) return inferred;
|
|
7678
|
+
return ["List", ...elems];
|
|
7679
|
+
}
|
|
7515
7680
|
return ["List", body ?? "Nothing"];
|
|
7516
7681
|
}
|
|
7517
7682
|
}
|
|
7518
7683
|
return ["List", body];
|
|
7519
7684
|
}
|
|
7685
|
+
function tryInferRangeFromElements(elems, parser) {
|
|
7686
|
+
if (elems.length < 4) return null;
|
|
7687
|
+
const penultimate = elems[elems.length - 2];
|
|
7688
|
+
if (symbol(penultimate) !== "ContinuationPlaceholder") return null;
|
|
7689
|
+
const samples = elems.slice(0, -2);
|
|
7690
|
+
const endExpr = elems[elems.length - 1];
|
|
7691
|
+
if (samples.length < 2) return null;
|
|
7692
|
+
const sampleNums = samples.map(machineValue);
|
|
7693
|
+
if (sampleNums.some((n) => n === null)) return null;
|
|
7694
|
+
const nums = sampleNums;
|
|
7695
|
+
const step = nums[nums.length - 1] - nums[nums.length - 2];
|
|
7696
|
+
const tol = parser.options.tolerance;
|
|
7697
|
+
if (Math.abs(step) < tol)
|
|
7698
|
+
return parser.error("degenerate-range-step", parser.index);
|
|
7699
|
+
for (let i = 1; i < nums.length; i++) {
|
|
7700
|
+
if (Math.abs(nums[i] - nums[i - 1] - step) > tol)
|
|
7701
|
+
return parser.error("inconsistent-range-samples", parser.index);
|
|
7702
|
+
}
|
|
7703
|
+
return ["Range", nums[0], endExpr, step];
|
|
7704
|
+
}
|
|
7520
7705
|
function serializeList(serializer, expr) {
|
|
7521
7706
|
if (nops(expr) > 1 && operands(expr).every((x) => {
|
|
7522
7707
|
const op = operator(x);
|
|
@@ -7768,6 +7953,35 @@ var Interval = (() => {
|
|
|
7768
7953
|
["Element", index, ["Range", lower, upper]]
|
|
7769
7954
|
];
|
|
7770
7955
|
}
|
|
7956
|
+
function parseForComprehension(parser, lhs, until) {
|
|
7957
|
+
const bindingTerminator = {
|
|
7958
|
+
minPrec: 21,
|
|
7959
|
+
// Above comma (20) and ; (19), so `x = L_1` is captured whole
|
|
7960
|
+
condition: (p) => {
|
|
7961
|
+
if (until?.condition?.(p)) return true;
|
|
7962
|
+
const saved = p.index;
|
|
7963
|
+
p.skipVisualSpace();
|
|
7964
|
+
const isComma = p.peek === ",";
|
|
7965
|
+
p.index = saved;
|
|
7966
|
+
return isComma;
|
|
7967
|
+
}
|
|
7968
|
+
};
|
|
7969
|
+
const elements = [];
|
|
7970
|
+
do {
|
|
7971
|
+
parser.skipVisualSpace();
|
|
7972
|
+
const binding = parser.parseExpression(bindingTerminator);
|
|
7973
|
+
if (binding === null) break;
|
|
7974
|
+
const op = operator(binding);
|
|
7975
|
+
if (op !== "Equal" && op !== "Assign") return null;
|
|
7976
|
+
const name = operand(binding, 1);
|
|
7977
|
+
const list = operand(binding, 2);
|
|
7978
|
+
if (!name || !list) return null;
|
|
7979
|
+
elements.push(["Element", name, list]);
|
|
7980
|
+
parser.skipVisualSpace();
|
|
7981
|
+
} while (parser.match(","));
|
|
7982
|
+
if (elements.length === 0) return null;
|
|
7983
|
+
return ["Loop", lhs, ...elements];
|
|
7984
|
+
}
|
|
7771
7985
|
function parseWhereExpression(parser, lhs, until) {
|
|
7772
7986
|
const bindingTerminator = {
|
|
7773
7987
|
minPrec: 21,
|
|
@@ -9656,6 +9870,8 @@ var Interval = (() => {
|
|
|
9656
9870
|
precedence: DIVISION_PRECEDENCE,
|
|
9657
9871
|
parse: "Mod"
|
|
9658
9872
|
},
|
|
9873
|
+
// Function-style alias: `\operatorname{mod}(a, b)`
|
|
9874
|
+
{ latexTrigger: "\\operatorname{mod}", parse: "Mod" },
|
|
9659
9875
|
{
|
|
9660
9876
|
latexTrigger: "\\pmod",
|
|
9661
9877
|
kind: "prefix",
|
|
@@ -9896,6 +10112,13 @@ var Interval = (() => {
|
|
|
9896
10112
|
const rhs = serializer.wrap(operand(expr, 2), ADDITION_PRECEDENCE + 3);
|
|
9897
10113
|
return joinLatex([lhs, "-", rhs]);
|
|
9898
10114
|
}
|
|
10115
|
+
},
|
|
10116
|
+
// Euclidean distance between two points (tuples of numbers).
|
|
10117
|
+
{
|
|
10118
|
+
name: "Distance",
|
|
10119
|
+
latexTrigger: ["\\operatorname{distance}"],
|
|
10120
|
+
kind: "function",
|
|
10121
|
+
serialize: (serializer, expr) => "\\operatorname{distance}" + serializer.wrapArguments(expr)
|
|
9899
10122
|
}
|
|
9900
10123
|
];
|
|
9901
10124
|
function getIndexAssignment(expr, upper) {
|
|
@@ -11320,7 +11543,9 @@ var Interval = (() => {
|
|
|
11320
11543
|
if (!expr || !symbol(expr)) return null;
|
|
11321
11544
|
return ["Mean", expr];
|
|
11322
11545
|
}
|
|
11323
|
-
}
|
|
11546
|
+
},
|
|
11547
|
+
// Function-style alias: `\operatorname{var}(...)`
|
|
11548
|
+
{ latexTrigger: "\\operatorname{var}", parse: "Variance" }
|
|
11324
11549
|
];
|
|
11325
11550
|
|
|
11326
11551
|
// src/compute-engine/numerics/unit-data.ts
|
|
@@ -12328,7 +12553,7 @@ var Interval = (() => {
|
|
|
12328
12553
|
36: "\\qquad"
|
|
12329
12554
|
}[v] ?? "";
|
|
12330
12555
|
}
|
|
12331
|
-
}
|
|
12556
|
+
},
|
|
12332
12557
|
// if (
|
|
12333
12558
|
// [
|
|
12334
12559
|
// '\\!',
|
|
@@ -12352,6 +12577,121 @@ var Interval = (() => {
|
|
|
12352
12577
|
// name: '',
|
|
12353
12578
|
// trigger: '\\check',
|
|
12354
12579
|
// },
|
|
12580
|
+
// ---------------------------------------------------------------------------
|
|
12581
|
+
// Function-style aliases for collection / random operators that some
|
|
12582
|
+
// notations write in lowercase (e.g. `\operatorname{shuffle}(L)`).
|
|
12583
|
+
// The capitalized library entries already exist; these are pure parse
|
|
12584
|
+
// aliases so the lowercase names don't land in `unsupported-operator`.
|
|
12585
|
+
// ---------------------------------------------------------------------------
|
|
12586
|
+
{ latexTrigger: "\\operatorname{random}", parse: "Random" },
|
|
12587
|
+
{ latexTrigger: "\\operatorname{shuffle}", parse: "Shuffle" },
|
|
12588
|
+
{ latexTrigger: "\\operatorname{repeat}", parse: "Repeat" },
|
|
12589
|
+
{ latexTrigger: "\\operatorname{join}", parse: "Join" },
|
|
12590
|
+
// ---------------------------------------------------------------------------
|
|
12591
|
+
// Geometric primitive heads. Registered as known typed heads so consumers
|
|
12592
|
+
// can branch on the operator name; CE itself doesn't render them. The
|
|
12593
|
+
// library entries (with no evaluator) live in `library/core.ts`.
|
|
12594
|
+
// ---------------------------------------------------------------------------
|
|
12595
|
+
{
|
|
12596
|
+
name: "Triangle",
|
|
12597
|
+
latexTrigger: ["\\operatorname{triangle}"],
|
|
12598
|
+
kind: "function",
|
|
12599
|
+
serialize: (serializer, expr) => "\\operatorname{triangle}" + serializer.wrapArguments(expr)
|
|
12600
|
+
},
|
|
12601
|
+
// Desmos's geometric `vector(p1, p2)` — a directed segment between two
|
|
12602
|
+
// points. Routed to a dedicated head (not the existing column-vector
|
|
12603
|
+
// `Vector`, which has a narrower `(number+) -> vector` signature).
|
|
12604
|
+
{
|
|
12605
|
+
name: "GeometricVector",
|
|
12606
|
+
latexTrigger: ["\\operatorname{vector}"],
|
|
12607
|
+
kind: "function",
|
|
12608
|
+
serialize: (serializer, expr) => "\\operatorname{vector}" + serializer.wrapArguments(expr)
|
|
12609
|
+
},
|
|
12610
|
+
{
|
|
12611
|
+
name: "Sphere",
|
|
12612
|
+
latexTrigger: ["\\operatorname{sphere}"],
|
|
12613
|
+
kind: "function",
|
|
12614
|
+
serialize: (serializer, expr) => "\\operatorname{sphere}" + serializer.wrapArguments(expr)
|
|
12615
|
+
},
|
|
12616
|
+
{
|
|
12617
|
+
name: "Segment",
|
|
12618
|
+
latexTrigger: ["\\operatorname{segment}"],
|
|
12619
|
+
kind: "function",
|
|
12620
|
+
serialize: (serializer, expr) => "\\operatorname{segment}" + serializer.wrapArguments(expr)
|
|
12621
|
+
}
|
|
12622
|
+
];
|
|
12623
|
+
|
|
12624
|
+
// src/compute-engine/latex-syntax/dictionary/definitions-colors.ts
|
|
12625
|
+
var DEFINITIONS_COLORS = [
|
|
12626
|
+
// Color constructors (one per colorspace, preserves space on evaluation)
|
|
12627
|
+
{
|
|
12628
|
+
name: "Rgb",
|
|
12629
|
+
latexTrigger: ["\\operatorname{rgb}"],
|
|
12630
|
+
kind: "function",
|
|
12631
|
+
serialize: (serializer, expr) => "\\operatorname{rgb}" + serializer.wrapArguments(expr)
|
|
12632
|
+
},
|
|
12633
|
+
{
|
|
12634
|
+
name: "Hsv",
|
|
12635
|
+
latexTrigger: ["\\operatorname{hsv}"],
|
|
12636
|
+
kind: "function",
|
|
12637
|
+
serialize: (serializer, expr) => "\\operatorname{hsv}" + serializer.wrapArguments(expr)
|
|
12638
|
+
},
|
|
12639
|
+
{
|
|
12640
|
+
name: "Hsl",
|
|
12641
|
+
latexTrigger: ["\\operatorname{hsl}"],
|
|
12642
|
+
kind: "function",
|
|
12643
|
+
serialize: (serializer, expr) => "\\operatorname{hsl}" + serializer.wrapArguments(expr)
|
|
12644
|
+
},
|
|
12645
|
+
{
|
|
12646
|
+
name: "Oklab",
|
|
12647
|
+
latexTrigger: ["\\operatorname{oklab}"],
|
|
12648
|
+
kind: "function",
|
|
12649
|
+
serialize: (serializer, expr) => "\\operatorname{oklab}" + serializer.wrapArguments(expr)
|
|
12650
|
+
},
|
|
12651
|
+
{
|
|
12652
|
+
name: "Oklch",
|
|
12653
|
+
latexTrigger: ["\\operatorname{oklch}"],
|
|
12654
|
+
kind: "function",
|
|
12655
|
+
serialize: (serializer, expr) => "\\operatorname{oklch}" + serializer.wrapArguments(expr)
|
|
12656
|
+
},
|
|
12657
|
+
// Conversion functions (color → color in the named space)
|
|
12658
|
+
{
|
|
12659
|
+
name: "AsRgb",
|
|
12660
|
+
latexTrigger: ["\\operatorname{asRgb}"],
|
|
12661
|
+
kind: "function",
|
|
12662
|
+
serialize: (serializer, expr) => "\\operatorname{asRgb}" + serializer.wrapArguments(expr)
|
|
12663
|
+
},
|
|
12664
|
+
{
|
|
12665
|
+
name: "AsHsv",
|
|
12666
|
+
latexTrigger: ["\\operatorname{asHsv}"],
|
|
12667
|
+
kind: "function",
|
|
12668
|
+
serialize: (serializer, expr) => "\\operatorname{asHsv}" + serializer.wrapArguments(expr)
|
|
12669
|
+
},
|
|
12670
|
+
{
|
|
12671
|
+
name: "AsHsl",
|
|
12672
|
+
latexTrigger: ["\\operatorname{asHsl}"],
|
|
12673
|
+
kind: "function",
|
|
12674
|
+
serialize: (serializer, expr) => "\\operatorname{asHsl}" + serializer.wrapArguments(expr)
|
|
12675
|
+
},
|
|
12676
|
+
{
|
|
12677
|
+
name: "AsOklab",
|
|
12678
|
+
latexTrigger: ["\\operatorname{asOklab}"],
|
|
12679
|
+
kind: "function",
|
|
12680
|
+
serialize: (serializer, expr) => "\\operatorname{asOklab}" + serializer.wrapArguments(expr)
|
|
12681
|
+
},
|
|
12682
|
+
{
|
|
12683
|
+
name: "AsOklch",
|
|
12684
|
+
latexTrigger: ["\\operatorname{asOklch}"],
|
|
12685
|
+
kind: "function",
|
|
12686
|
+
serialize: (serializer, expr) => "\\operatorname{asOklch}" + serializer.wrapArguments(expr)
|
|
12687
|
+
},
|
|
12688
|
+
// Perceptual difference (returns a scalar in [0, ~1])
|
|
12689
|
+
{
|
|
12690
|
+
name: "ColorDelta",
|
|
12691
|
+
latexTrigger: ["\\operatorname{colorDelta}"],
|
|
12692
|
+
kind: "function",
|
|
12693
|
+
serialize: (serializer, expr) => "\\operatorname{colorDelta}" + serializer.wrapArguments(expr)
|
|
12694
|
+
}
|
|
12355
12695
|
];
|
|
12356
12696
|
|
|
12357
12697
|
// src/compute-engine/latex-syntax/dictionary/default-dictionary.ts
|
|
@@ -12382,7 +12722,8 @@ var Interval = (() => {
|
|
|
12382
12722
|
...DEFINITIONS_STATISTICS,
|
|
12383
12723
|
...DEFINITIONS_UNITS,
|
|
12384
12724
|
...DEFINITIONS_OTHERS,
|
|
12385
|
-
...DEFINITIONS_PHYSICS
|
|
12725
|
+
...DEFINITIONS_PHYSICS,
|
|
12726
|
+
...DEFINITIONS_COLORS
|
|
12386
12727
|
];
|
|
12387
12728
|
|
|
12388
12729
|
// src/math-json/symbols.ts
|
|
@@ -13524,7 +13865,7 @@ var Interval = (() => {
|
|
|
13524
13865
|
};
|
|
13525
13866
|
|
|
13526
13867
|
// src/interval.ts
|
|
13527
|
-
var version = "0.
|
|
13868
|
+
var version = "0.57.0";
|
|
13528
13869
|
return __toCommonJS(interval_exports);
|
|
13529
13870
|
})();
|
|
13530
13871
|
/*! Bundled license information:
|