@mojir/lits 2.1.8 → 2.1.10

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.
Files changed (28) hide show
  1. package/dist/cli/cli.js +380 -30
  2. package/dist/cli/reference/api.d.ts +3 -3
  3. package/dist/cli/reference/index.d.ts +6 -0
  4. package/dist/cli/src/builtin/normalExpressions/categories/namespaces/linearAlgebra/helpers/dot.d.ts +1 -0
  5. package/dist/cli/src/builtin/normalExpressions/categories/namespaces/linearAlgebra/helpers/getUnit.d.ts +2 -0
  6. package/dist/cli/src/builtin/normalExpressions/categories/namespaces/linearAlgebra/helpers/scale.d.ts +1 -0
  7. package/dist/cli/src/builtin/normalExpressions/categories/namespaces/linearAlgebra/helpers/subtract.d.ts +1 -0
  8. package/dist/cli/src/typeGuards/annotatedArrays.d.ts +4 -0
  9. package/dist/cli/src/utils/index.d.ts +1 -1
  10. package/dist/index.esm.js +379 -29
  11. package/dist/index.esm.js.map +1 -1
  12. package/dist/index.js +379 -29
  13. package/dist/index.js.map +1 -1
  14. package/dist/lits.iife.js +379 -29
  15. package/dist/lits.iife.js.map +1 -1
  16. package/dist/reference/api.d.ts +3 -3
  17. package/dist/reference/index.d.ts +6 -0
  18. package/dist/src/builtin/normalExpressions/categories/namespaces/linearAlgebra/helpers/dot.d.ts +1 -0
  19. package/dist/src/builtin/normalExpressions/categories/namespaces/linearAlgebra/helpers/getUnit.d.ts +2 -0
  20. package/dist/src/builtin/normalExpressions/categories/namespaces/linearAlgebra/helpers/scale.d.ts +1 -0
  21. package/dist/src/builtin/normalExpressions/categories/namespaces/linearAlgebra/helpers/subtract.d.ts +1 -0
  22. package/dist/src/typeGuards/annotatedArrays.d.ts +4 -0
  23. package/dist/src/utils/index.d.ts +1 -1
  24. package/dist/testFramework.esm.js +193 -28
  25. package/dist/testFramework.esm.js.map +1 -1
  26. package/dist/testFramework.js +193 -28
  27. package/dist/testFramework.js.map +1 -1
  28. package/package.json +1 -1
package/dist/cli/cli.js CHANGED
@@ -92,7 +92,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
92
92
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
93
93
  };
94
94
 
95
- var version = "2.1.8";
95
+ var version = "2.1.10";
96
96
 
97
97
  function getCodeMarker(sourceCodeInfo) {
98
98
  if (!sourceCodeInfo.position || !sourceCodeInfo.code)
@@ -824,7 +824,7 @@ function deepEqual(a, b, sourceCodeInfo) {
824
824
  if (a === b)
825
825
  return true;
826
826
  if (typeof a === 'number' && typeof b === 'number')
827
- return Math.abs(a - b) < Number.EPSILON;
827
+ return Math.abs(a - b) < 1e-10;
828
828
  if (Array.isArray(a) && Array.isArray(b)) {
829
829
  if (a.length !== b.length)
830
830
  return false;
@@ -843,7 +843,7 @@ function deepEqual(a, b, sourceCodeInfo) {
843
843
  return false;
844
844
  for (var i = 0; i < aKeys.length; i += 1) {
845
845
  var key = asString(aKeys[i], sourceCodeInfo);
846
- if (!deepEqual(toAny(a[key]), toAny(b[key]), sourceCodeInfo))
846
+ if (!deepEqual(a[key], b[key], sourceCodeInfo))
847
847
  return false;
848
848
  }
849
849
  return true;
@@ -2308,6 +2308,28 @@ function assertVector(vector, sourceCodeInfo) {
2308
2308
  throw new LitsError("Expected a vector, but got ".concat(vector), sourceCodeInfo);
2309
2309
  }
2310
2310
  }
2311
+ function is2dVector(vector) {
2312
+ if (!isVector(vector)) {
2313
+ return false;
2314
+ }
2315
+ return vector.length === 2;
2316
+ }
2317
+ function assert2dVector(vector, sourceCodeInfo) {
2318
+ if (!is2dVector(vector)) {
2319
+ throw new LitsError("Expected a 2d vector, but got ".concat(vector), sourceCodeInfo);
2320
+ }
2321
+ }
2322
+ function is3dVector(vector) {
2323
+ if (!isVector(vector)) {
2324
+ return false;
2325
+ }
2326
+ return vector.length === 3;
2327
+ }
2328
+ function assert3dVector(vector, sourceCodeInfo) {
2329
+ if (!is3dVector(vector)) {
2330
+ throw new LitsError("Expected a 3d vector, but got ".concat(vector), sourceCodeInfo);
2331
+ }
2332
+ }
2311
2333
  function assertNonEmptyVector(vector, sourceCodeInfo) {
2312
2334
  assertVector(vector, sourceCodeInfo);
2313
2335
  if (vector.length === 0) {
@@ -4688,6 +4710,24 @@ var gridNormalExpression = {
4688
4710
  },
4689
4711
  paramCount: 1,
4690
4712
  },
4713
+ 'grid:fill': {
4714
+ evaluate: function (_a, sourceCodeInfo) {
4715
+ var _b = __read(_a, 3), rows = _b[0], cols = _b[1], value = _b[2];
4716
+ assertNumber(rows, sourceCodeInfo, { integer: true, positive: true });
4717
+ assertNumber(cols, sourceCodeInfo, { integer: true, positive: true });
4718
+ assertAny(value, sourceCodeInfo);
4719
+ var result = [];
4720
+ for (var i = 0; i < rows; i += 1) {
4721
+ var row = [];
4722
+ for (var j = 0; j < cols; j += 1) {
4723
+ row.push(value);
4724
+ }
4725
+ result.push(row);
4726
+ }
4727
+ return result;
4728
+ },
4729
+ paramCount: 3,
4730
+ },
4691
4731
  'grid:generate': {
4692
4732
  evaluate: function (_a, sourceCodeInfo, contextStack, _b) {
4693
4733
  var _c = __read(_a, 3), rows = _c[0], cols = _c[1], generator = _c[2];
@@ -6632,7 +6672,137 @@ function extractOverlappingSegments(vectorA, vectorB, lag) {
6632
6672
  return [segmentA, segmentB];
6633
6673
  }
6634
6674
 
6675
+ function getUnit(value, sourceCodeInfo) {
6676
+ if (value.length === 0) {
6677
+ return value;
6678
+ }
6679
+ var length = Math.sqrt(value.reduce(function (acc, item) { return acc + Math.pow(item, 2); }, 0));
6680
+ if (approxZero(length)) {
6681
+ throw new LitsError('The vector must not be zero', sourceCodeInfo);
6682
+ }
6683
+ return value.map(function (item) { return item / length; });
6684
+ }
6685
+
6686
+ function dot(vector1, vector2) {
6687
+ return vector1.reduce(function (acc, item, index) { return acc + item * vector2[index]; }, 0);
6688
+ }
6689
+
6690
+ function subtract(vector1, vector2) {
6691
+ return vector1.map(function (item, index) { return item - vector2[index]; });
6692
+ }
6693
+
6694
+ function scale(vector, scalar) {
6695
+ return vector.map(function (item) { return item * scalar; });
6696
+ }
6697
+
6635
6698
  var linearAlgebraNormalExpression = {
6699
+ 'lin:rotate2d': {
6700
+ evaluate: function (_a, sourceCodeInfo) {
6701
+ var _b = __read(_a, 2), vector = _b[0], radians = _b[1];
6702
+ assert2dVector(vector, sourceCodeInfo);
6703
+ if (isZeroVector(vector)) {
6704
+ return vector;
6705
+ }
6706
+ assertNumber(radians, sourceCodeInfo, { finite: true });
6707
+ var cosTheta = Math.cos(radians);
6708
+ var sinTheta = Math.sin(radians);
6709
+ return [
6710
+ vector[0] * cosTheta - vector[1] * sinTheta,
6711
+ vector[0] * sinTheta + vector[1] * cosTheta,
6712
+ ];
6713
+ },
6714
+ paramCount: 2,
6715
+ },
6716
+ 'lin:rotate3d': {
6717
+ evaluate: function (_a, sourceCodeInfo) {
6718
+ var _b = __read(_a, 3), vector = _b[0], axis = _b[1], radians = _b[2];
6719
+ assert3dVector(vector, sourceCodeInfo);
6720
+ if (isZeroVector(vector)) {
6721
+ return vector;
6722
+ }
6723
+ assertNumber(radians, sourceCodeInfo, { finite: true });
6724
+ assert3dVector(axis, sourceCodeInfo);
6725
+ if (isZeroVector(axis)) {
6726
+ throw new LitsError('Rotation axis must not be zero', sourceCodeInfo);
6727
+ }
6728
+ var cosTheta = Math.cos(radians);
6729
+ var sinTheta = Math.sin(radians);
6730
+ var _c = __read(getUnit(axis, sourceCodeInfo), 3), u = _c[0], v = _c[1], w = _c[2];
6731
+ var dotProduct = vector[0] * u + vector[1] * v + vector[2] * w;
6732
+ return [
6733
+ dotProduct * u * (1 - cosTheta) + vector[0] * cosTheta + (-w * vector[1] + v * vector[2]) * sinTheta,
6734
+ dotProduct * v * (1 - cosTheta) + vector[1] * cosTheta + (w * vector[0] - u * vector[2]) * sinTheta,
6735
+ dotProduct * w * (1 - cosTheta) + vector[2] * cosTheta + (-v * vector[0] + u * vector[1]) * sinTheta,
6736
+ ];
6737
+ },
6738
+ paramCount: 3,
6739
+ },
6740
+ 'lin:reflect': {
6741
+ evaluate: function (_a, sourceCodeInfo) {
6742
+ var _b = __read(_a, 2), vector = _b[0], normal = _b[1];
6743
+ assertVector(vector, sourceCodeInfo);
6744
+ assertVector(normal, sourceCodeInfo);
6745
+ if (vector.length !== normal.length) {
6746
+ throw new LitsError('Vectors must be of the same length', sourceCodeInfo);
6747
+ }
6748
+ if (isZeroVector(normal)) {
6749
+ throw new LitsError('Reflection normal must not be zero', sourceCodeInfo);
6750
+ }
6751
+ if (isZeroVector(vector)) {
6752
+ return vector;
6753
+ }
6754
+ var unitNormal = getUnit(normal, sourceCodeInfo);
6755
+ var doubleDot = 2 * dot(vector, unitNormal);
6756
+ return subtract(vector, scale(unitNormal, doubleDot));
6757
+ },
6758
+ paramCount: 2,
6759
+ },
6760
+ 'lin:refract': {
6761
+ evaluate: function (_a, sourceCodeInfo) {
6762
+ var _b = __read(_a, 3), vector = _b[0], normal = _b[1], eta = _b[2];
6763
+ assertVector(vector, sourceCodeInfo);
6764
+ assertVector(normal, sourceCodeInfo);
6765
+ assertNumber(eta, sourceCodeInfo, { finite: true, positive: true });
6766
+ if (vector.length !== normal.length) {
6767
+ throw new LitsError('Vectors must be of the same length', sourceCodeInfo);
6768
+ }
6769
+ if (isZeroVector(normal)) {
6770
+ throw new LitsError('Refraction normal must not be zero', sourceCodeInfo);
6771
+ }
6772
+ if (isZeroVector(vector)) {
6773
+ return vector;
6774
+ }
6775
+ // Make sure vectors are normalized
6776
+ var normalizedV = getUnit(vector, sourceCodeInfo);
6777
+ var normalizedNormal = getUnit(normal, sourceCodeInfo);
6778
+ // Calculate dot product between incident vector and normal
6779
+ var dotProduct = dot(normalizedV, normalizedNormal);
6780
+ // Calculate discriminant
6781
+ var discriminant = 1 - eta * eta * (1 - dotProduct * dotProduct);
6782
+ // Check for total internal reflection
6783
+ if (discriminant < 0) {
6784
+ return vector; // Total internal reflection occurs
6785
+ }
6786
+ // Calculate the refracted vector
6787
+ var scaledIncident = scale(normalizedV, eta);
6788
+ var scaledNormal = scale(normalizedNormal, eta * dotProduct + Math.sqrt(discriminant));
6789
+ return subtract(scaledIncident, scaledNormal);
6790
+ },
6791
+ paramCount: 3,
6792
+ },
6793
+ 'lin:lerp': {
6794
+ evaluate: function (_a, sourceCodeInfo) {
6795
+ var _b = __read(_a, 3), vectorA = _b[0], vectorB = _b[1], t = _b[2];
6796
+ assertVector(vectorA, sourceCodeInfo);
6797
+ assertVector(vectorB, sourceCodeInfo);
6798
+ assertNumber(t, sourceCodeInfo, { finite: true });
6799
+ if (vectorA.length !== vectorB.length) {
6800
+ throw new LitsError('Vectors must be of the same length', sourceCodeInfo);
6801
+ }
6802
+ return vectorA.map(function (val, i) { return val + (vectorB[i] - val) * t; });
6803
+ },
6804
+ paramCount: 3,
6805
+ },
6636
6806
  'lin:dot': {
6637
6807
  evaluate: function (_a, sourceCodeInfo) {
6638
6808
  var _b = __read(_a, 2), vectorA = _b[0], vectorB = _b[1];
@@ -6641,7 +6811,7 @@ var linearAlgebraNormalExpression = {
6641
6811
  if (vectorA.length !== vectorB.length) {
6642
6812
  throw new LitsError('Vectors must be of the same length', sourceCodeInfo);
6643
6813
  }
6644
- return vectorA.reduce(function (acc, val, i) { return acc + val * vectorB[i]; }, 0);
6814
+ return dot(vectorA, vectorB);
6645
6815
  },
6646
6816
  paramCount: 2,
6647
6817
  },
@@ -6722,16 +6892,10 @@ var linearAlgebraNormalExpression = {
6722
6892
  evaluate: function (_a, sourceCodeInfo) {
6723
6893
  var _b = __read(_a, 1), vector = _b[0];
6724
6894
  assertVector(vector, sourceCodeInfo);
6725
- if (vector.length === 0) {
6726
- return [];
6727
- }
6728
- var norm = Math.sqrt(vector.reduce(function (acc, val) { return acc + Math.pow(val, 2); }, 0));
6729
- if (norm === 0) {
6730
- return vector.map(function () { return 0; });
6731
- }
6732
- return vector.map(function (val) { return val / norm; });
6895
+ return getUnit(vector, sourceCodeInfo);
6733
6896
  },
6734
6897
  paramCount: 1,
6898
+ aliases: ['lin:unit', 'lin:normalize'],
6735
6899
  },
6736
6900
  'lin:normalize-log': {
6737
6901
  evaluate: function (_a, sourceCodeInfo) {
@@ -6858,7 +7022,7 @@ var linearAlgebraNormalExpression = {
6858
7022
  return Math.sqrt(vector.reduce(function (acc, val) { return acc + val * val; }, 0));
6859
7023
  },
6860
7024
  paramCount: 1,
6861
- aliases: ['lin:l2-norm', 'lin:magnitude'],
7025
+ aliases: ['lin:l2-norm', 'lin:length'],
6862
7026
  },
6863
7027
  'lin:manhattan-distance': {
6864
7028
  evaluate: function (_a, sourceCodeInfo) {
@@ -12328,6 +12492,7 @@ function evaluateReservedSymbol(node) {
12328
12492
  return asNonUndefined(value, node[2]);
12329
12493
  }
12330
12494
  function evaluateNormalExpression(node, contextStack) {
12495
+ var _a, _b;
12331
12496
  var sourceCodeInfo = node[2];
12332
12497
  var paramNodes = node[1][1];
12333
12498
  var params = [];
@@ -12353,14 +12518,14 @@ function evaluateNormalExpression(node, contextStack) {
12353
12518
  var nameSymbol = node[1][0];
12354
12519
  if (placeholders.length > 0) {
12355
12520
  var fn = evaluateNode(nameSymbol, contextStack);
12356
- var partialFunction = {
12357
- '^^fn^^': true,
12358
- 'function': asFunctionLike(fn, sourceCodeInfo),
12359
- 'functionType': 'Partial',
12360
- params: params,
12361
- placeholders: placeholders,
12362
- sourceCodeInfo: sourceCodeInfo,
12363
- };
12521
+ var partialFunction = (_a = {},
12522
+ _a[FUNCTION_SYMBOL] = true,
12523
+ _a.function = asFunctionLike(fn, sourceCodeInfo),
12524
+ _a.functionType = 'Partial',
12525
+ _a.params = params,
12526
+ _a.placeholders = placeholders,
12527
+ _a.sourceCodeInfo = sourceCodeInfo,
12528
+ _a);
12364
12529
  return partialFunction;
12365
12530
  }
12366
12531
  if (isNormalBuiltinSymbolNode(nameSymbol)) {
@@ -12380,14 +12545,14 @@ function evaluateNormalExpression(node, contextStack) {
12380
12545
  var fnNode = node[1][0];
12381
12546
  var fn = asFunctionLike(evaluateNode(fnNode, contextStack), sourceCodeInfo);
12382
12547
  if (placeholders.length > 0) {
12383
- var partialFunction = {
12384
- '^^fn^^': true,
12385
- 'function': asFunctionLike(fn, sourceCodeInfo),
12386
- 'functionType': 'Partial',
12387
- params: params,
12388
- placeholders: placeholders,
12389
- sourceCodeInfo: sourceCodeInfo,
12390
- };
12548
+ var partialFunction = (_b = {},
12549
+ _b[FUNCTION_SYMBOL] = true,
12550
+ _b.function = asFunctionLike(fn, sourceCodeInfo),
12551
+ _b.functionType = 'Partial',
12552
+ _b.params = params,
12553
+ _b.placeholders = placeholders,
12554
+ _b.sourceCodeInfo = sourceCodeInfo,
12555
+ _b);
12391
12556
  return partialFunction;
12392
12557
  }
12393
12558
  return executeFunction(fn, params, contextStack, sourceCodeInfo);
@@ -15104,6 +15269,7 @@ var api = {
15104
15269
  'grid:row',
15105
15270
  'grid:col',
15106
15271
  'grid:shape',
15272
+ 'grid:fill',
15107
15273
  'grid:generate',
15108
15274
  'grid:reshape',
15109
15275
  'grid:transpose',
@@ -15195,6 +15361,11 @@ var api = {
15195
15361
  'vec:smape'
15196
15362
  ], __read(getVectorReductionNames('mean')), false), __read(getVectorReductionNames('median')), false), __read(getVectorReductionNames('variance')), false), __read(getVectorReductionNames('sample-variance')), false), __read(getVectorReductionNames('sum')), false), __read(getVectorReductionNames('prod')), false), __read(getVectorReductionNames('min')), false), __read(getVectorReductionNames('max')), false), __read(getVectorReductionNames('stdev')), false), __read(getVectorReductionNames('sample-stdev')), false), __read(getVectorReductionNames('iqr')), false), __read(getVectorReductionNames('span')), false), __read(getVectorReductionNames('geometric-mean')), false), __read(getVectorReductionNames('harmonic-mean')), false), __read(getVectorReductionNames('skewness')), false), __read(getVectorReductionNames('sample-skewness')), false), __read(getVectorReductionNames('kurtosis')), false), __read(getVectorReductionNames('sample-kurtosis')), false), __read(getVectorReductionNames('excess-kurtosis')), false), __read(getVectorReductionNames('sample-excess-kurtosis')), false), __read(getVectorReductionNames('rms')), false), __read(getVectorReductionNames('mad')), false), __read(getVectorReductionNames('medad')), false), __read(getVectorReductionNames('gini-coefficient')), false), __read(getVectorReductionNames('entropy')), false), __read(getVectorReductionNames('skewness')), false),
15197
15363
  linAlg: [
15364
+ 'lin:reflect',
15365
+ 'lin:refract',
15366
+ 'lin:lerp',
15367
+ 'lin:rotate2d',
15368
+ 'lin:rotate3d',
15198
15369
  'lin:dot',
15199
15370
  'lin:cross',
15200
15371
  'lin:normalize-minmax',
@@ -19044,6 +19215,36 @@ var gridReference = {
19044
19215
  "grid:shape(".concat(exampleGrid3, ")"),
19045
19216
  ],
19046
19217
  },
19218
+ 'grid:fill': {
19219
+ title: 'grid:fill',
19220
+ category: 'Grid',
19221
+ linkName: 'grid-colon-fill',
19222
+ returns: {
19223
+ type: 'grid',
19224
+ },
19225
+ args: {
19226
+ rows: {
19227
+ type: 'integer',
19228
+ description: 'The number of rows in the grid.',
19229
+ },
19230
+ cols: {
19231
+ type: 'integer',
19232
+ description: 'The number of columns in the grid.',
19233
+ },
19234
+ value: {
19235
+ type: 'any',
19236
+ description: 'The value to fill the grid with.',
19237
+ },
19238
+ },
19239
+ variants: [
19240
+ { argumentNames: ['rows', 'cols', 'value'] },
19241
+ ],
19242
+ description: 'Creates a grid of the specified size, filled with the specified value.',
19243
+ examples: [
19244
+ 'grid:fill(2, 3, 0)',
19245
+ 'grid:fill(2, 3, "x")',
19246
+ ],
19247
+ },
19047
19248
  'grid:generate': {
19048
19249
  title: 'grid:generate',
19049
19250
  category: 'Grid',
@@ -23266,6 +23467,150 @@ var vectorReference = __assign(__assign(__assign(__assign(__assign(__assign(__as
23266
23467
  } });
23267
23468
 
23268
23469
  var linAlgReference = {
23470
+ 'lin:reflect': {
23471
+ title: 'lin:reflect',
23472
+ category: 'Linear Algebra',
23473
+ description: 'Reflects a vector across a given axis.',
23474
+ linkName: 'lin-colon-reflect',
23475
+ returns: {
23476
+ type: 'vector',
23477
+ },
23478
+ args: {
23479
+ a: {
23480
+ type: 'vector',
23481
+ description: 'Vector to reflect.',
23482
+ },
23483
+ b: {
23484
+ type: 'vector',
23485
+ description: 'Axis of reflection.',
23486
+ },
23487
+ },
23488
+ variants: [
23489
+ { argumentNames: ['a', 'b'] },
23490
+ ],
23491
+ examples: [
23492
+ 'lin:reflect([1, 2], [0, 1])',
23493
+ 'lin:reflect([1, 2, 3], [0, 0, 1])',
23494
+ ],
23495
+ },
23496
+ 'lin:refract': {
23497
+ title: 'lin:refract',
23498
+ category: 'Linear Algebra',
23499
+ description: 'Refracts a vector across a given axis.',
23500
+ linkName: 'lin-colon-refract',
23501
+ returns: {
23502
+ type: 'vector',
23503
+ },
23504
+ args: {
23505
+ vector: {
23506
+ type: 'vector',
23507
+ description: 'Vector to refract.',
23508
+ },
23509
+ axis: {
23510
+ type: 'vector',
23511
+ description: 'Axis of refraction.',
23512
+ },
23513
+ eta: {
23514
+ type: 'number',
23515
+ description: 'Refraction index.',
23516
+ },
23517
+ },
23518
+ variants: [
23519
+ { argumentNames: ['vector', 'axis', 'eta'] },
23520
+ ],
23521
+ examples: [
23522
+ 'lin:refract([1, 2], [0, 1], 1.5)',
23523
+ 'lin:refract([1, 2, 3], [0, 0, 1], 1.5)',
23524
+ ],
23525
+ },
23526
+ 'lin:lerp': {
23527
+ title: 'lin:lerp',
23528
+ category: 'Linear Algebra',
23529
+ description: 'Performs linear interpolation between two vectors.',
23530
+ linkName: 'lin-colon-lerp',
23531
+ returns: {
23532
+ type: 'vector',
23533
+ },
23534
+ args: {
23535
+ a: {
23536
+ type: 'vector',
23537
+ description: 'Start vector.',
23538
+ },
23539
+ b: {
23540
+ type: 'vector',
23541
+ description: 'End vector.',
23542
+ },
23543
+ t: {
23544
+ type: 'number',
23545
+ description: 'Interpolation factor (0 to 1).',
23546
+ },
23547
+ },
23548
+ variants: [
23549
+ { argumentNames: ['a', 'b', 't'] },
23550
+ ],
23551
+ examples: [
23552
+ 'lin:lerp([1, 2], [3, 4], 0.5)',
23553
+ 'lin:lerp([1, 2], [3, 4], 2)',
23554
+ 'lin:lerp([1, 2], [3, 4], -1)',
23555
+ 'lin:lerp([1, 2, 3], [4, 5, 6], 0.25)',
23556
+ ],
23557
+ },
23558
+ 'lin:rotate2d': {
23559
+ title: 'lin:rotate2d',
23560
+ category: 'Linear Algebra',
23561
+ description: 'Rotates a 2D vector by a given angle in radians.',
23562
+ linkName: 'lin-colon-rotate2d',
23563
+ returns: {
23564
+ type: 'vector',
23565
+ },
23566
+ args: {
23567
+ a: {
23568
+ type: 'vector',
23569
+ description: 'Vector to rotate.',
23570
+ },
23571
+ b: {
23572
+ type: 'number',
23573
+ description: 'Angle in b.',
23574
+ },
23575
+ },
23576
+ variants: [
23577
+ { argumentNames: ['a', 'b'] },
23578
+ ],
23579
+ examples: [
23580
+ 'lin:rotate2d([1, 0], PI / 2)',
23581
+ 'lin:rotate2d([0, 1], PI)',
23582
+ ],
23583
+ },
23584
+ 'lin:rotate3d': {
23585
+ title: 'lin:rotate3d',
23586
+ category: 'Linear Algebra',
23587
+ description: 'Rotates a 3D vector around a given axis by a given angle in radians.',
23588
+ linkName: 'lin-colon-rotate3d',
23589
+ returns: {
23590
+ type: 'vector',
23591
+ },
23592
+ args: {
23593
+ v: {
23594
+ type: 'vector',
23595
+ description: 'Vector to rotate.',
23596
+ },
23597
+ axis: {
23598
+ type: 'vector',
23599
+ description: 'Axis of rotation.',
23600
+ },
23601
+ radians: {
23602
+ type: 'number',
23603
+ description: 'Angle in radians.',
23604
+ },
23605
+ },
23606
+ variants: [
23607
+ { argumentNames: ['v', 'axis', 'radians'] },
23608
+ ],
23609
+ examples: [
23610
+ 'lin:rotate3d([1, 0, 0], [0, 1, 0], PI / 2)',
23611
+ 'lin:rotate3d([0, 1, 0], [1, 0, 0], PI)',
23612
+ ],
23613
+ },
23269
23614
  'lin:dot': {
23270
23615
  title: 'lin:dot',
23271
23616
  category: 'Linear Algebra',
@@ -23440,11 +23785,16 @@ var linAlgReference = {
23440
23785
  ],
23441
23786
  examples: [
23442
23787
  'lin:normalize-l2([1, 2, 3])',
23788
+ 'lin:unit([1, 2, 3])',
23443
23789
  'lin:normalize-l2([1, 2, -3])',
23444
23790
  'lin:normalize-l2([1, 2, 3, 4])',
23445
23791
  'lin:normalize-l2([1, 2, -3, 4])',
23446
23792
  'lin:normalize-l2([1, 2, 3, 40, 50])',
23447
23793
  ],
23794
+ aliases: [
23795
+ 'lin:unit',
23796
+ 'lin:normalize',
23797
+ ],
23448
23798
  },
23449
23799
  'lin:normalize-log': {
23450
23800
  title: 'lin:normalize-log',
@@ -23622,7 +23972,7 @@ var linAlgReference = {
23622
23972
  ],
23623
23973
  aliases: [
23624
23974
  'lin:l2-norm',
23625
- 'lin:magnitude',
23975
+ 'lin:length',
23626
23976
  ],
23627
23977
  },
23628
23978
  'lin:manhattan-distance': {
@@ -12,10 +12,10 @@ export declare const api: {
12
12
  readonly string: readonly ["string-repeat", "str", "number", "lower-case", "upper-case", "trim", "trim-left", "trim-right", "pad-left", "pad-right", "split", "split-lines", "template", "to-char-code", "from-char-code", "encode-base64", "decode-base64", "encode-uri-component", "decode-uri-component", "join", "capitalize", "blank?"];
13
13
  readonly bitwise: readonly ["<<", ">>", ">>>", "bit-not", "&", "bit-and-not", "|", "xor", "bit-flip", "bit-clear", "bit-set", "bit-test"];
14
14
  readonly assert: readonly ["assert", "assert=", "assert!=", "assert-gt", "assert-lt", "assert-gte", "assert-lte", "assert-true", "assert-false", "assert-truthy", "assert-falsy", "assert-null", "assert-throws", "assert-throws-error", "assert-not-throws"];
15
- readonly grid: readonly ["grid:every?", "grid:some?", "grid:every-row?", "grid:some-row?", "grid:every-col?", "grid:some-col?", "grid:row", "grid:col", "grid:shape", "grid:generate", "grid:reshape", "grid:transpose", "grid:flip-h", "grid:flip-v", "grid:rotate", "grid:reverse-rows", "grid:reverse-cols", "grid:slice", "grid:slice-rows", "grid:slice-cols", "grid:splice-rows", "grid:splice-cols", "grid:concat-rows", "grid:concat-cols", "grid:map", "grid:mapi", "grid:reduce", "grid:reducei", "grid:push-rows", "grid:unshift-rows", "grid:pop-row", "grid:shift-row", "grid:push-cols", "grid:unshift-cols", "grid:pop-col", "grid:shift-col", "grid:from-array"];
15
+ readonly grid: readonly ["grid:every?", "grid:some?", "grid:every-row?", "grid:some-row?", "grid:every-col?", "grid:some-col?", "grid:row", "grid:col", "grid:shape", "grid:fill", "grid:generate", "grid:reshape", "grid:transpose", "grid:flip-h", "grid:flip-v", "grid:rotate", "grid:reverse-rows", "grid:reverse-cols", "grid:slice", "grid:slice-rows", "grid:slice-cols", "grid:splice-rows", "grid:splice-cols", "grid:concat-rows", "grid:concat-cols", "grid:map", "grid:mapi", "grid:reduce", "grid:reducei", "grid:push-rows", "grid:unshift-rows", "grid:pop-row", "grid:shift-row", "grid:push-cols", "grid:unshift-cols", "grid:pop-col", "grid:shift-col", "grid:from-array"];
16
16
  readonly matrix: readonly ["mat:mul", "mat:det", "mat:inv", "mat:adj", "mat:cofactor", "mat:minor", "mat:trace", "mat:symmetric?", "mat:triangular?", "mat:upper-triangular?", "mat:lower-triangular?", "mat:diagonal?", "mat:square?", "mat:orthogonal?", "mat:identity?", "mat:invertible?", "mat:hilbert", "mat:vandermonde", "mat:band", "mat:banded?", "mat:rank", "mat:frobenius-norm", "mat:1-norm", "mat:inf-norm", "mat:max-norm"];
17
17
  readonly vector: readonly ["vec:monotonic?", "vec:strictly-monotonic?", "vec:increasing?", "vec:decreasing?", "vec:strictly-increasing?", "vec:strictly-decreasing?", "vec:median", "vec:mode", "vec:min-index", "vec:max-index", "vec:sort-indices", "vec:count-values", "vec:linspace", "vec:ones", "vec:zeros", "vec:fill", "vec:generate", "vec:cumsum", "vec:cumprod", "vec:quartiles", "vec:percentile", "vec:quantile", "vec:histogram", "vec:ecdf", "vec:outliers?", "vec:outliers", "vec:bincount", "vec:winsorize", "vec:mse", "vec:mae", "vec:rmse", "vec:smape", "vec:mean", "vec:moving-mean", "vec:centered-moving-mean", "vec:running-mean", "vec:median", "vec:moving-median", "vec:centered-moving-median", "vec:running-median", "vec:variance", "vec:moving-variance", "vec:centered-moving-variance", "vec:running-variance", "vec:sample-variance", "vec:moving-sample-variance", "vec:centered-moving-sample-variance", "vec:running-sample-variance", "vec:sum", "vec:moving-sum", "vec:centered-moving-sum", "vec:running-sum", "vec:prod", "vec:moving-prod", "vec:centered-moving-prod", "vec:running-prod", "vec:min", "vec:moving-min", "vec:centered-moving-min", "vec:running-min", "vec:max", "vec:moving-max", "vec:centered-moving-max", "vec:running-max", "vec:stdev", "vec:moving-stdev", "vec:centered-moving-stdev", "vec:running-stdev", "vec:sample-stdev", "vec:moving-sample-stdev", "vec:centered-moving-sample-stdev", "vec:running-sample-stdev", "vec:iqr", "vec:moving-iqr", "vec:centered-moving-iqr", "vec:running-iqr", "vec:span", "vec:moving-span", "vec:centered-moving-span", "vec:running-span", "vec:geometric-mean", "vec:moving-geometric-mean", "vec:centered-moving-geometric-mean", "vec:running-geometric-mean", "vec:harmonic-mean", "vec:moving-harmonic-mean", "vec:centered-moving-harmonic-mean", "vec:running-harmonic-mean", "vec:skewness", "vec:moving-skewness", "vec:centered-moving-skewness", "vec:running-skewness", "vec:sample-skewness", "vec:moving-sample-skewness", "vec:centered-moving-sample-skewness", "vec:running-sample-skewness", "vec:kurtosis", "vec:moving-kurtosis", "vec:centered-moving-kurtosis", "vec:running-kurtosis", "vec:sample-kurtosis", "vec:moving-sample-kurtosis", "vec:centered-moving-sample-kurtosis", "vec:running-sample-kurtosis", "vec:excess-kurtosis", "vec:moving-excess-kurtosis", "vec:centered-moving-excess-kurtosis", "vec:running-excess-kurtosis", "vec:sample-excess-kurtosis", "vec:moving-sample-excess-kurtosis", "vec:centered-moving-sample-excess-kurtosis", "vec:running-sample-excess-kurtosis", "vec:rms", "vec:moving-rms", "vec:centered-moving-rms", "vec:running-rms", "vec:mad", "vec:moving-mad", "vec:centered-moving-mad", "vec:running-mad", "vec:medad", "vec:moving-medad", "vec:centered-moving-medad", "vec:running-medad", "vec:gini-coefficient", "vec:moving-gini-coefficient", "vec:centered-moving-gini-coefficient", "vec:running-gini-coefficient", "vec:entropy", "vec:moving-entropy", "vec:centered-moving-entropy", "vec:running-entropy", "vec:skewness", "vec:moving-skewness", "vec:centered-moving-skewness", "vec:running-skewness"];
18
- readonly linAlg: readonly ["lin:dot", "lin:cross", "lin:normalize-minmax", "lin:normalize-zscore", "lin:normalize-robust", "lin:normalize-l1", "lin:normalize-l2", "lin:normalize-log", "lin:angle", "lin:projection", "lin:orthogonal?", "lin:parallel?", "lin:collinear?", "lin:cosine-similarity", "lin:euclidean-distance", "lin:euclidean-norm", "lin:manhattan-distance", "lin:manhattan-norm", "lin:hamming-distance", "lin:hamming-norm", "lin:chebyshev-distance", "lin:chebyshev-norm", "lin:minkowski-distance", "lin:minkowski-norm", "lin:cov", "lin:corr", "lin:spearman-corr", "lin:pearson-corr", "lin:kendall-tau", "lin:autocorrelation", "lin:cross-correlation", "lin:rref", "lin:solve"];
18
+ readonly linAlg: readonly ["lin:reflect", "lin:refract", "lin:lerp", "lin:rotate2d", "lin:rotate3d", "lin:dot", "lin:cross", "lin:normalize-minmax", "lin:normalize-zscore", "lin:normalize-robust", "lin:normalize-l1", "lin:normalize-l2", "lin:normalize-log", "lin:angle", "lin:projection", "lin:orthogonal?", "lin:parallel?", "lin:collinear?", "lin:cosine-similarity", "lin:euclidean-distance", "lin:euclidean-norm", "lin:manhattan-distance", "lin:manhattan-norm", "lin:hamming-distance", "lin:hamming-norm", "lin:chebyshev-distance", "lin:chebyshev-norm", "lin:minkowski-distance", "lin:minkowski-norm", "lin:cov", "lin:corr", "lin:spearman-corr", "lin:pearson-corr", "lin:kendall-tau", "lin:autocorrelation", "lin:cross-correlation", "lin:rref", "lin:solve"];
19
19
  readonly numberTheory: readonly ["nth:abundant-seq", "nth:abundant-nth", "nth:abundant-take-while", "nth:abundant?", "nth:bell-seq", "nth:bell-nth", "nth:bell-take-while", "nth:bell?", "nth:catalan-seq", "nth:catalan-nth", "nth:catalan-take-while", "nth:catalan?", "nth:composite-seq", "nth:composite-nth", "nth:composite-take-while", "nth:composite?", "nth:factorial-seq", "nth:factorial-nth", "nth:factorial-take-while", "nth:factorial?", "nth:fibonacci-seq", "nth:fibonacci-nth", "nth:fibonacci-take-while", "nth:fibonacci?", "nth:geometric-seq", "nth:geometric-nth", "nth:geometric-take-while", "nth:geometric?", "nth:golomb-seq", "nth:golomb-nth", "nth:golomb-take-while", "nth:golomb?", "nth:happy-seq", "nth:happy-nth", "nth:happy-take-while", "nth:happy?", "nth:look-and-say-seq", "nth:look-and-say-nth", "nth:look-and-say-take-while", "nth:look-and-say?", "nth:lucas-seq", "nth:lucas-nth", "nth:lucas-take-while", "nth:lucas?", "nth:lucky-seq", "nth:lucky-nth", "nth:lucky-take-while", "nth:lucky?", "nth:mersenne-seq", "nth:mersenne-nth", "nth:mersenne-take-while", "nth:mersenne?", "nth:padovan-seq", "nth:padovan-nth", "nth:padovan-take-while", "nth:padovan?", "nth:partition-seq", "nth:partition-nth", "nth:partition-take-while", "nth:partition?", "nth:pell-seq", "nth:pell-nth", "nth:pell-take-while", "nth:pell?", "nth:perfect-seq", "nth:perfect-nth", "nth:perfect-take-while", "nth:perfect?", "nth:perfect-cube-seq", "nth:perfect-cube-nth", "nth:perfect-cube-take-while", "nth:perfect-cube?", "nth:perfect-power-seq", "nth:perfect-power-nth", "nth:perfect-power-take-while", "nth:perfect-power?", "nth:perfect-square-seq", "nth:perfect-square-nth", "nth:perfect-square-take-while", "nth:perfect-square?", "nth:polygonal-seq", "nth:polygonal-nth", "nth:polygonal-take-while", "nth:polygonal?", "nth:prime-seq", "nth:prime-nth", "nth:prime-take-while", "nth:prime?", "nth:recaman-seq", "nth:recaman-nth", "nth:recaman-take-while", "nth:recaman?", "nth:sylvester-seq", "nth:sylvester-nth", "nth:sylvester-take-while", "nth:sylvester?", "nth:thue-morse-seq", "nth:thue-morse-nth", "nth:thue-morse-take-while", "nth:thue-morse?", "nth:tribonacci-seq", "nth:tribonacci-nth", "nth:tribonacci-take-while", "nth:tribonacci?", "nth:collatz-seq", "nth:juggler-seq", "nth:bernoulli-seq", "nth:bernoulli-take-while", "nth:bernoulli-nth", "nth:combinations", "nth:count-combinations", "nth:derangements", "nth:count-derangements", "nth:divisors", "nth:count-divisors", "nth:proper-divisors", "nth:count-proper-divisors", "nth:prime-factors", "nth:count-prime-factors", "nth:distinct-prime-factors", "nth:count-distinct-prime-factors", "nth:factorial", "nth:partitions", "nth:count-partitions", "nth:permutations", "nth:count-permutations", "nth:power-set", "nth:count-power-set", "nth:coprime?", "nth:divisible-by?", "nth:gcd", "nth:lcm", "nth:multinomial", "nth:amicable?", "nth:euler-totient", "nth:mobius", "nth:mertens", "nth:sigma", "nth:carmichael-lambda", "nth:cartesian-product", "nth:perfect-power", "nth:mod-exp", "nth:mod-inv", "nth:extended-gcd", "nth:chinese-remainder", "nth:stirling-first", "nth:stirling-second"];
20
20
  readonly random: readonly ["!:random", "!:random-int", "!:random-int-inclusive", "!:random-float", "!:random-boolean", "!:random-item", "!:random-sample", "!:random-sample-unique", "!:shuffle", "!:random-normal", "!:random-exponential", "!:random-binomial", "!:random-poisson", "!:random-gamma", "!:random-pareto", "!:uuid", "!:random-char", "!:random-string", "!:random-id", "!:random-color"];
21
21
  readonly shorthand: ["-short-regexp", "-short-fn"];
@@ -44,7 +44,7 @@ export type NormalExpressionName = CollectionApiName | ArrayApiName | SequenceAp
44
44
  export type FunctionName = NormalExpressionName | SpecialExpressionsApiName;
45
45
  export type ShorthandName = typeof api.shorthand[number];
46
46
  export type DatatypeName = typeof api.datatype[number];
47
- declare const apiNames: readonly ["filter", "map", "reduce", "reduce-right", "reductions", "count", "get", "get-in", "contains?", "assoc", "assoc-in", "++", "not-empty", "every?", "not-every?", "any?", "not-any?", "update", "update-in", "range", "repeat", "flatten", "mapcat", "nth", "push", "pop", "unshift", "shift", "slice", "splice", "position", "index-of", "last-index-of", "some", "reverse", "first", "second", "last", "rest", "next", "take", "take-last", "take-while", "drop", "drop-last", "drop-while", "sort", "sort-by", "distinct", "remove", "remove-at", "split-at", "split-with", "frequencies", "group-by", "partition", "partition-all", "partition-by", "starts-with?", "ends-with?", "interleave", "interpose", "+", "-", "*", "/", "~", "mod", "rem", "quot", "inc", "dec", "sqrt", "cbrt", "^", "round", "trunc", "floor", "ceil", "min", "max", "abs", "sign", "ln", "log2", "log10", "sin", "cos", "tan", "asin", "acos", "atan", "sinh", "cosh", "tanh", "asinh", "acosh", "atanh", "|>", "apply", "identity", "comp", "constantly", "juxt", "complement", "every-pred", "some-pred", "fnull", "≠", "=", "<", ">", "≤", "≥", "!", "write!", "iso-date->epoch", "epoch->iso-date", "boolean", "compare", "identical?", "json-parse", "json-stringify", "dissoc", "keys", "vals", "entries", "find", "merge", "merge-with", "zipmap", "select-keys", "boolean?", "null?", "number?", "string?", "function?", "integer?", "array?", "object?", "coll?", "seq?", "regexp?", "zero?", "pos?", "neg?", "even?", "odd?", "finite?", "nan?", "negative-infinity?", "positive-infinity?", "false?", "true?", "empty?", "not-empty?", "vector?", "grid?", "matrix?", "regexp", "match", "replace", "replace-all", "string-repeat", "str", "number", "lower-case", "upper-case", "trim", "trim-left", "trim-right", "pad-left", "pad-right", "split", "split-lines", "template", "to-char-code", "from-char-code", "encode-base64", "decode-base64", "encode-uri-component", "decode-uri-component", "join", "capitalize", "blank?", "<<", ">>", ">>>", "bit-not", "&", "bit-and-not", "|", "xor", "bit-flip", "bit-clear", "bit-set", "bit-test", "assert", "assert=", "assert!=", "assert-gt", "assert-lt", "assert-gte", "assert-lte", "assert-true", "assert-false", "assert-truthy", "assert-falsy", "assert-null", "assert-throws", "assert-throws-error", "assert-not-throws", "mat:mul", "mat:det", "mat:inv", "mat:adj", "mat:cofactor", "mat:minor", "mat:trace", "mat:symmetric?", "mat:triangular?", "mat:upper-triangular?", "mat:lower-triangular?", "mat:diagonal?", "mat:square?", "mat:orthogonal?", "mat:identity?", "mat:invertible?", "mat:hilbert", "mat:vandermonde", "mat:band", "mat:banded?", "mat:rank", "mat:frobenius-norm", "mat:1-norm", "mat:inf-norm", "mat:max-norm", "vec:monotonic?", "vec:strictly-monotonic?", "vec:increasing?", "vec:decreasing?", "vec:strictly-increasing?", "vec:strictly-decreasing?", "vec:median", "vec:mode", "vec:min-index", "vec:max-index", "vec:sort-indices", "vec:count-values", "vec:linspace", "vec:ones", "vec:zeros", "vec:fill", "vec:generate", "vec:cumsum", "vec:cumprod", "vec:quartiles", "vec:percentile", "vec:quantile", "vec:histogram", "vec:ecdf", "vec:outliers?", "vec:outliers", "vec:bincount", "vec:winsorize", "vec:mse", "vec:mae", "vec:rmse", "vec:smape", "vec:mean", "vec:moving-mean", "vec:centered-moving-mean", "vec:running-mean", "vec:median", "vec:moving-median", "vec:centered-moving-median", "vec:running-median", "vec:variance", "vec:moving-variance", "vec:centered-moving-variance", "vec:running-variance", "vec:sample-variance", "vec:moving-sample-variance", "vec:centered-moving-sample-variance", "vec:running-sample-variance", "vec:sum", "vec:moving-sum", "vec:centered-moving-sum", "vec:running-sum", "vec:prod", "vec:moving-prod", "vec:centered-moving-prod", "vec:running-prod", "vec:min", "vec:moving-min", "vec:centered-moving-min", "vec:running-min", "vec:max", "vec:moving-max", "vec:centered-moving-max", "vec:running-max", "vec:stdev", "vec:moving-stdev", "vec:centered-moving-stdev", "vec:running-stdev", "vec:sample-stdev", "vec:moving-sample-stdev", "vec:centered-moving-sample-stdev", "vec:running-sample-stdev", "vec:iqr", "vec:moving-iqr", "vec:centered-moving-iqr", "vec:running-iqr", "vec:span", "vec:moving-span", "vec:centered-moving-span", "vec:running-span", "vec:geometric-mean", "vec:moving-geometric-mean", "vec:centered-moving-geometric-mean", "vec:running-geometric-mean", "vec:harmonic-mean", "vec:moving-harmonic-mean", "vec:centered-moving-harmonic-mean", "vec:running-harmonic-mean", "vec:skewness", "vec:moving-skewness", "vec:centered-moving-skewness", "vec:running-skewness", "vec:sample-skewness", "vec:moving-sample-skewness", "vec:centered-moving-sample-skewness", "vec:running-sample-skewness", "vec:kurtosis", "vec:moving-kurtosis", "vec:centered-moving-kurtosis", "vec:running-kurtosis", "vec:sample-kurtosis", "vec:moving-sample-kurtosis", "vec:centered-moving-sample-kurtosis", "vec:running-sample-kurtosis", "vec:excess-kurtosis", "vec:moving-excess-kurtosis", "vec:centered-moving-excess-kurtosis", "vec:running-excess-kurtosis", "vec:sample-excess-kurtosis", "vec:moving-sample-excess-kurtosis", "vec:centered-moving-sample-excess-kurtosis", "vec:running-sample-excess-kurtosis", "vec:rms", "vec:moving-rms", "vec:centered-moving-rms", "vec:running-rms", "vec:mad", "vec:moving-mad", "vec:centered-moving-mad", "vec:running-mad", "vec:medad", "vec:moving-medad", "vec:centered-moving-medad", "vec:running-medad", "vec:gini-coefficient", "vec:moving-gini-coefficient", "vec:centered-moving-gini-coefficient", "vec:running-gini-coefficient", "vec:entropy", "vec:moving-entropy", "vec:centered-moving-entropy", "vec:running-entropy", "vec:skewness", "vec:moving-skewness", "vec:centered-moving-skewness", "vec:running-skewness", "lin:dot", "lin:cross", "lin:normalize-minmax", "lin:normalize-zscore", "lin:normalize-robust", "lin:normalize-l1", "lin:normalize-l2", "lin:normalize-log", "lin:angle", "lin:projection", "lin:orthogonal?", "lin:parallel?", "lin:collinear?", "lin:cosine-similarity", "lin:euclidean-distance", "lin:euclidean-norm", "lin:manhattan-distance", "lin:manhattan-norm", "lin:hamming-distance", "lin:hamming-norm", "lin:chebyshev-distance", "lin:chebyshev-norm", "lin:minkowski-distance", "lin:minkowski-norm", "lin:cov", "lin:corr", "lin:spearman-corr", "lin:pearson-corr", "lin:kendall-tau", "lin:autocorrelation", "lin:cross-correlation", "lin:rref", "lin:solve", "grid:every?", "grid:some?", "grid:every-row?", "grid:some-row?", "grid:every-col?", "grid:some-col?", "grid:row", "grid:col", "grid:shape", "grid:generate", "grid:reshape", "grid:transpose", "grid:flip-h", "grid:flip-v", "grid:rotate", "grid:reverse-rows", "grid:reverse-cols", "grid:slice", "grid:slice-rows", "grid:slice-cols", "grid:splice-rows", "grid:splice-cols", "grid:concat-rows", "grid:concat-cols", "grid:map", "grid:mapi", "grid:reduce", "grid:reducei", "grid:push-rows", "grid:unshift-rows", "grid:pop-row", "grid:shift-row", "grid:push-cols", "grid:unshift-cols", "grid:pop-col", "grid:shift-col", "grid:from-array", "nth:abundant-seq", "nth:abundant-nth", "nth:abundant-take-while", "nth:abundant?", "nth:bell-seq", "nth:bell-nth", "nth:bell-take-while", "nth:bell?", "nth:catalan-seq", "nth:catalan-nth", "nth:catalan-take-while", "nth:catalan?", "nth:composite-seq", "nth:composite-nth", "nth:composite-take-while", "nth:composite?", "nth:factorial-seq", "nth:factorial-nth", "nth:factorial-take-while", "nth:factorial?", "nth:fibonacci-seq", "nth:fibonacci-nth", "nth:fibonacci-take-while", "nth:fibonacci?", "nth:geometric-seq", "nth:geometric-nth", "nth:geometric-take-while", "nth:geometric?", "nth:golomb-seq", "nth:golomb-nth", "nth:golomb-take-while", "nth:golomb?", "nth:happy-seq", "nth:happy-nth", "nth:happy-take-while", "nth:happy?", "nth:look-and-say-seq", "nth:look-and-say-nth", "nth:look-and-say-take-while", "nth:look-and-say?", "nth:lucas-seq", "nth:lucas-nth", "nth:lucas-take-while", "nth:lucas?", "nth:lucky-seq", "nth:lucky-nth", "nth:lucky-take-while", "nth:lucky?", "nth:mersenne-seq", "nth:mersenne-nth", "nth:mersenne-take-while", "nth:mersenne?", "nth:padovan-seq", "nth:padovan-nth", "nth:padovan-take-while", "nth:padovan?", "nth:partition-seq", "nth:partition-nth", "nth:partition-take-while", "nth:partition?", "nth:pell-seq", "nth:pell-nth", "nth:pell-take-while", "nth:pell?", "nth:perfect-seq", "nth:perfect-nth", "nth:perfect-take-while", "nth:perfect?", "nth:perfect-cube-seq", "nth:perfect-cube-nth", "nth:perfect-cube-take-while", "nth:perfect-cube?", "nth:perfect-power-seq", "nth:perfect-power-nth", "nth:perfect-power-take-while", "nth:perfect-power?", "nth:perfect-square-seq", "nth:perfect-square-nth", "nth:perfect-square-take-while", "nth:perfect-square?", "nth:polygonal-seq", "nth:polygonal-nth", "nth:polygonal-take-while", "nth:polygonal?", "nth:prime-seq", "nth:prime-nth", "nth:prime-take-while", "nth:prime?", "nth:recaman-seq", "nth:recaman-nth", "nth:recaman-take-while", "nth:recaman?", "nth:sylvester-seq", "nth:sylvester-nth", "nth:sylvester-take-while", "nth:sylvester?", "nth:thue-morse-seq", "nth:thue-morse-nth", "nth:thue-morse-take-while", "nth:thue-morse?", "nth:tribonacci-seq", "nth:tribonacci-nth", "nth:tribonacci-take-while", "nth:tribonacci?", "nth:collatz-seq", "nth:juggler-seq", "nth:bernoulli-seq", "nth:bernoulli-take-while", "nth:bernoulli-nth", "nth:combinations", "nth:count-combinations", "nth:derangements", "nth:count-derangements", "nth:divisors", "nth:count-divisors", "nth:proper-divisors", "nth:count-proper-divisors", "nth:prime-factors", "nth:count-prime-factors", "nth:distinct-prime-factors", "nth:count-distinct-prime-factors", "nth:factorial", "nth:partitions", "nth:count-partitions", "nth:permutations", "nth:count-permutations", "nth:power-set", "nth:count-power-set", "nth:coprime?", "nth:divisible-by?", "nth:gcd", "nth:lcm", "nth:multinomial", "nth:amicable?", "nth:euler-totient", "nth:mobius", "nth:mertens", "nth:sigma", "nth:carmichael-lambda", "nth:cartesian-product", "nth:perfect-power", "nth:mod-exp", "nth:mod-inv", "nth:extended-gcd", "nth:chinese-remainder", "nth:stirling-first", "nth:stirling-second", "!:random", "!:random-int", "!:random-int-inclusive", "!:random-float", "!:random-boolean", "!:random-item", "!:random-sample", "!:random-sample-unique", "!:shuffle", "!:random-normal", "!:random-exponential", "!:random-binomial", "!:random-poisson", "!:random-gamma", "!:random-pareto", "!:uuid", "!:random-char", "!:random-string", "!:random-id", "!:random-color", "-short-regexp", "-short-fn", "-type-number", "-type-string", "-type-object", "-type-array", "-type-vector", "-type-matrix", "-type-grid", "-type-boolean", "-type-function", "-type-integer", "-type-any", "-type-null", "-type-collection", "-type-sequence", "-type-regexp", "-type-never"];
47
+ declare const apiNames: readonly ["filter", "map", "reduce", "reduce-right", "reductions", "count", "get", "get-in", "contains?", "assoc", "assoc-in", "++", "not-empty", "every?", "not-every?", "any?", "not-any?", "update", "update-in", "range", "repeat", "flatten", "mapcat", "nth", "push", "pop", "unshift", "shift", "slice", "splice", "position", "index-of", "last-index-of", "some", "reverse", "first", "second", "last", "rest", "next", "take", "take-last", "take-while", "drop", "drop-last", "drop-while", "sort", "sort-by", "distinct", "remove", "remove-at", "split-at", "split-with", "frequencies", "group-by", "partition", "partition-all", "partition-by", "starts-with?", "ends-with?", "interleave", "interpose", "+", "-", "*", "/", "~", "mod", "rem", "quot", "inc", "dec", "sqrt", "cbrt", "^", "round", "trunc", "floor", "ceil", "min", "max", "abs", "sign", "ln", "log2", "log10", "sin", "cos", "tan", "asin", "acos", "atan", "sinh", "cosh", "tanh", "asinh", "acosh", "atanh", "|>", "apply", "identity", "comp", "constantly", "juxt", "complement", "every-pred", "some-pred", "fnull", "≠", "=", "<", ">", "≤", "≥", "!", "write!", "iso-date->epoch", "epoch->iso-date", "boolean", "compare", "identical?", "json-parse", "json-stringify", "dissoc", "keys", "vals", "entries", "find", "merge", "merge-with", "zipmap", "select-keys", "boolean?", "null?", "number?", "string?", "function?", "integer?", "array?", "object?", "coll?", "seq?", "regexp?", "zero?", "pos?", "neg?", "even?", "odd?", "finite?", "nan?", "negative-infinity?", "positive-infinity?", "false?", "true?", "empty?", "not-empty?", "vector?", "grid?", "matrix?", "regexp", "match", "replace", "replace-all", "string-repeat", "str", "number", "lower-case", "upper-case", "trim", "trim-left", "trim-right", "pad-left", "pad-right", "split", "split-lines", "template", "to-char-code", "from-char-code", "encode-base64", "decode-base64", "encode-uri-component", "decode-uri-component", "join", "capitalize", "blank?", "<<", ">>", ">>>", "bit-not", "&", "bit-and-not", "|", "xor", "bit-flip", "bit-clear", "bit-set", "bit-test", "assert", "assert=", "assert!=", "assert-gt", "assert-lt", "assert-gte", "assert-lte", "assert-true", "assert-false", "assert-truthy", "assert-falsy", "assert-null", "assert-throws", "assert-throws-error", "assert-not-throws", "mat:mul", "mat:det", "mat:inv", "mat:adj", "mat:cofactor", "mat:minor", "mat:trace", "mat:symmetric?", "mat:triangular?", "mat:upper-triangular?", "mat:lower-triangular?", "mat:diagonal?", "mat:square?", "mat:orthogonal?", "mat:identity?", "mat:invertible?", "mat:hilbert", "mat:vandermonde", "mat:band", "mat:banded?", "mat:rank", "mat:frobenius-norm", "mat:1-norm", "mat:inf-norm", "mat:max-norm", "vec:monotonic?", "vec:strictly-monotonic?", "vec:increasing?", "vec:decreasing?", "vec:strictly-increasing?", "vec:strictly-decreasing?", "vec:median", "vec:mode", "vec:min-index", "vec:max-index", "vec:sort-indices", "vec:count-values", "vec:linspace", "vec:ones", "vec:zeros", "vec:fill", "vec:generate", "vec:cumsum", "vec:cumprod", "vec:quartiles", "vec:percentile", "vec:quantile", "vec:histogram", "vec:ecdf", "vec:outliers?", "vec:outliers", "vec:bincount", "vec:winsorize", "vec:mse", "vec:mae", "vec:rmse", "vec:smape", "vec:mean", "vec:moving-mean", "vec:centered-moving-mean", "vec:running-mean", "vec:median", "vec:moving-median", "vec:centered-moving-median", "vec:running-median", "vec:variance", "vec:moving-variance", "vec:centered-moving-variance", "vec:running-variance", "vec:sample-variance", "vec:moving-sample-variance", "vec:centered-moving-sample-variance", "vec:running-sample-variance", "vec:sum", "vec:moving-sum", "vec:centered-moving-sum", "vec:running-sum", "vec:prod", "vec:moving-prod", "vec:centered-moving-prod", "vec:running-prod", "vec:min", "vec:moving-min", "vec:centered-moving-min", "vec:running-min", "vec:max", "vec:moving-max", "vec:centered-moving-max", "vec:running-max", "vec:stdev", "vec:moving-stdev", "vec:centered-moving-stdev", "vec:running-stdev", "vec:sample-stdev", "vec:moving-sample-stdev", "vec:centered-moving-sample-stdev", "vec:running-sample-stdev", "vec:iqr", "vec:moving-iqr", "vec:centered-moving-iqr", "vec:running-iqr", "vec:span", "vec:moving-span", "vec:centered-moving-span", "vec:running-span", "vec:geometric-mean", "vec:moving-geometric-mean", "vec:centered-moving-geometric-mean", "vec:running-geometric-mean", "vec:harmonic-mean", "vec:moving-harmonic-mean", "vec:centered-moving-harmonic-mean", "vec:running-harmonic-mean", "vec:skewness", "vec:moving-skewness", "vec:centered-moving-skewness", "vec:running-skewness", "vec:sample-skewness", "vec:moving-sample-skewness", "vec:centered-moving-sample-skewness", "vec:running-sample-skewness", "vec:kurtosis", "vec:moving-kurtosis", "vec:centered-moving-kurtosis", "vec:running-kurtosis", "vec:sample-kurtosis", "vec:moving-sample-kurtosis", "vec:centered-moving-sample-kurtosis", "vec:running-sample-kurtosis", "vec:excess-kurtosis", "vec:moving-excess-kurtosis", "vec:centered-moving-excess-kurtosis", "vec:running-excess-kurtosis", "vec:sample-excess-kurtosis", "vec:moving-sample-excess-kurtosis", "vec:centered-moving-sample-excess-kurtosis", "vec:running-sample-excess-kurtosis", "vec:rms", "vec:moving-rms", "vec:centered-moving-rms", "vec:running-rms", "vec:mad", "vec:moving-mad", "vec:centered-moving-mad", "vec:running-mad", "vec:medad", "vec:moving-medad", "vec:centered-moving-medad", "vec:running-medad", "vec:gini-coefficient", "vec:moving-gini-coefficient", "vec:centered-moving-gini-coefficient", "vec:running-gini-coefficient", "vec:entropy", "vec:moving-entropy", "vec:centered-moving-entropy", "vec:running-entropy", "vec:skewness", "vec:moving-skewness", "vec:centered-moving-skewness", "vec:running-skewness", "lin:reflect", "lin:refract", "lin:lerp", "lin:rotate2d", "lin:rotate3d", "lin:dot", "lin:cross", "lin:normalize-minmax", "lin:normalize-zscore", "lin:normalize-robust", "lin:normalize-l1", "lin:normalize-l2", "lin:normalize-log", "lin:angle", "lin:projection", "lin:orthogonal?", "lin:parallel?", "lin:collinear?", "lin:cosine-similarity", "lin:euclidean-distance", "lin:euclidean-norm", "lin:manhattan-distance", "lin:manhattan-norm", "lin:hamming-distance", "lin:hamming-norm", "lin:chebyshev-distance", "lin:chebyshev-norm", "lin:minkowski-distance", "lin:minkowski-norm", "lin:cov", "lin:corr", "lin:spearman-corr", "lin:pearson-corr", "lin:kendall-tau", "lin:autocorrelation", "lin:cross-correlation", "lin:rref", "lin:solve", "grid:every?", "grid:some?", "grid:every-row?", "grid:some-row?", "grid:every-col?", "grid:some-col?", "grid:row", "grid:col", "grid:shape", "grid:fill", "grid:generate", "grid:reshape", "grid:transpose", "grid:flip-h", "grid:flip-v", "grid:rotate", "grid:reverse-rows", "grid:reverse-cols", "grid:slice", "grid:slice-rows", "grid:slice-cols", "grid:splice-rows", "grid:splice-cols", "grid:concat-rows", "grid:concat-cols", "grid:map", "grid:mapi", "grid:reduce", "grid:reducei", "grid:push-rows", "grid:unshift-rows", "grid:pop-row", "grid:shift-row", "grid:push-cols", "grid:unshift-cols", "grid:pop-col", "grid:shift-col", "grid:from-array", "nth:abundant-seq", "nth:abundant-nth", "nth:abundant-take-while", "nth:abundant?", "nth:bell-seq", "nth:bell-nth", "nth:bell-take-while", "nth:bell?", "nth:catalan-seq", "nth:catalan-nth", "nth:catalan-take-while", "nth:catalan?", "nth:composite-seq", "nth:composite-nth", "nth:composite-take-while", "nth:composite?", "nth:factorial-seq", "nth:factorial-nth", "nth:factorial-take-while", "nth:factorial?", "nth:fibonacci-seq", "nth:fibonacci-nth", "nth:fibonacci-take-while", "nth:fibonacci?", "nth:geometric-seq", "nth:geometric-nth", "nth:geometric-take-while", "nth:geometric?", "nth:golomb-seq", "nth:golomb-nth", "nth:golomb-take-while", "nth:golomb?", "nth:happy-seq", "nth:happy-nth", "nth:happy-take-while", "nth:happy?", "nth:look-and-say-seq", "nth:look-and-say-nth", "nth:look-and-say-take-while", "nth:look-and-say?", "nth:lucas-seq", "nth:lucas-nth", "nth:lucas-take-while", "nth:lucas?", "nth:lucky-seq", "nth:lucky-nth", "nth:lucky-take-while", "nth:lucky?", "nth:mersenne-seq", "nth:mersenne-nth", "nth:mersenne-take-while", "nth:mersenne?", "nth:padovan-seq", "nth:padovan-nth", "nth:padovan-take-while", "nth:padovan?", "nth:partition-seq", "nth:partition-nth", "nth:partition-take-while", "nth:partition?", "nth:pell-seq", "nth:pell-nth", "nth:pell-take-while", "nth:pell?", "nth:perfect-seq", "nth:perfect-nth", "nth:perfect-take-while", "nth:perfect?", "nth:perfect-cube-seq", "nth:perfect-cube-nth", "nth:perfect-cube-take-while", "nth:perfect-cube?", "nth:perfect-power-seq", "nth:perfect-power-nth", "nth:perfect-power-take-while", "nth:perfect-power?", "nth:perfect-square-seq", "nth:perfect-square-nth", "nth:perfect-square-take-while", "nth:perfect-square?", "nth:polygonal-seq", "nth:polygonal-nth", "nth:polygonal-take-while", "nth:polygonal?", "nth:prime-seq", "nth:prime-nth", "nth:prime-take-while", "nth:prime?", "nth:recaman-seq", "nth:recaman-nth", "nth:recaman-take-while", "nth:recaman?", "nth:sylvester-seq", "nth:sylvester-nth", "nth:sylvester-take-while", "nth:sylvester?", "nth:thue-morse-seq", "nth:thue-morse-nth", "nth:thue-morse-take-while", "nth:thue-morse?", "nth:tribonacci-seq", "nth:tribonacci-nth", "nth:tribonacci-take-while", "nth:tribonacci?", "nth:collatz-seq", "nth:juggler-seq", "nth:bernoulli-seq", "nth:bernoulli-take-while", "nth:bernoulli-nth", "nth:combinations", "nth:count-combinations", "nth:derangements", "nth:count-derangements", "nth:divisors", "nth:count-divisors", "nth:proper-divisors", "nth:count-proper-divisors", "nth:prime-factors", "nth:count-prime-factors", "nth:distinct-prime-factors", "nth:count-distinct-prime-factors", "nth:factorial", "nth:partitions", "nth:count-partitions", "nth:permutations", "nth:count-permutations", "nth:power-set", "nth:count-power-set", "nth:coprime?", "nth:divisible-by?", "nth:gcd", "nth:lcm", "nth:multinomial", "nth:amicable?", "nth:euler-totient", "nth:mobius", "nth:mertens", "nth:sigma", "nth:carmichael-lambda", "nth:cartesian-product", "nth:perfect-power", "nth:mod-exp", "nth:mod-inv", "nth:extended-gcd", "nth:chinese-remainder", "nth:stirling-first", "nth:stirling-second", "!:random", "!:random-int", "!:random-int-inclusive", "!:random-float", "!:random-boolean", "!:random-item", "!:random-sample", "!:random-sample-unique", "!:shuffle", "!:random-normal", "!:random-exponential", "!:random-binomial", "!:random-poisson", "!:random-gamma", "!:random-pareto", "!:uuid", "!:random-char", "!:random-string", "!:random-id", "!:random-color", "-short-regexp", "-short-fn", "-type-number", "-type-string", "-type-object", "-type-array", "-type-vector", "-type-matrix", "-type-grid", "-type-boolean", "-type-function", "-type-integer", "-type-any", "-type-null", "-type-collection", "-type-sequence", "-type-regexp", "-type-never"];
48
48
  export type ApiName = typeof apiNames[number];
49
49
  export declare function isApiName(arg: string): arg is ApiName;
50
50
  export declare const categoryRecord: {