@sheetxl/formulas 0.8.0-beta.1 → 0.8.0-beta.11

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 (134) hide show
  1. package/README.md +15 -22
  2. package/browser/esm/{BM1YhvA2ppUZ3QLB.mjs → BAu7VttBhgl5A9Ux.mjs} +1 -1
  3. package/{node/esm/CG1Fn8D-2DrQZoD5.mjs → browser/esm/BL3CLO1ngbZPNUSj.mjs} +1 -1
  4. package/{node/esm/-f-RKKojiLg94hp9.mjs → browser/esm/BL5O9xv74605fjZ0.mjs} +51 -11
  5. package/browser/esm/{CVv3DuciDQrnFFeu.mjs → BTOiKBFUYxECGgpN.mjs} +1 -1
  6. package/browser/esm/Bjdqhk-JMohE4sBN.mjs +5722 -0
  7. package/browser/esm/{Bsb5i9Jq-Q8RTmvi.mjs → CCTNn0CmYTRTR9uu.mjs} +1 -1
  8. package/browser/esm/{BzNFsi4RXuJrn_1n.mjs → CJVp8EBHRn_OMdXr.mjs} +1 -1
  9. package/browser/esm/{Cyvobf2wi0quDD3U.mjs → CS2YxGzDK80pF1TP.mjs} +1 -1
  10. package/browser/esm/{0amsHACCOHE_JjXI.mjs → CkvBF6_lFpJ8lzWn.mjs} +1 -1
  11. package/browser/esm/{BYRjnggsufwbb27W.mjs → Cm5b94jC90pgvgEQ.mjs} +1 -1
  12. package/browser/esm/{Cdl7ZalV6WPZHHRE.mjs → CpKG2VMt7bLP4_Az.mjs} +1 -1
  13. package/browser/esm/{BR2ai1V5dGPphpRf.mjs → CpyKqbMxs8fgNUrm.mjs} +2 -5
  14. package/browser/esm/{Ct1gudv1TKk-5FMO.mjs → D0PDit-Emky4tG76.mjs} +48 -2
  15. package/browser/esm/{B3pEie3jQN0SvV5B.mjs → D5lfhEj0O0vGXGIU.mjs} +1 -1
  16. package/browser/esm/{HgVmqQQhKQ_2v0HD.mjs → DE0FWfy3dgRhUs6j.mjs} +2 -2
  17. package/browser/esm/{CWAtVXxcIz86XLzE.mjs → DY3Yp4g7FpjDC4Ux.mjs} +1 -1
  18. package/browser/esm/{DtqLXxtPFISlNoUd.mjs → DatkcV-D0mA7WYmb.mjs} +1 -1
  19. package/{node/esm/C7mAHEhFYDwSEU6O.mjs → browser/esm/Dz2Vh5VXT4u2caUb.mjs} +1 -1
  20. package/browser/esm/{CltdofO5ik8g_wQ8.mjs → LWIfDqgl4BWsGN40.mjs} +1 -1
  21. package/{node/esm/CkG4LZN-kb7plKXG.mjs → browser/esm/TdOBTLcfAEs2lvw1.mjs} +69 -4
  22. package/browser/esm/{DKFABgVKeBMflym9.mjs → _haW8KO4uxcUjPNq.mjs} +1 -1
  23. package/browser/esm/declarations.mjs +106 -0
  24. package/browser/esm/index.mjs +4527 -10911
  25. package/browser/esm/{D2miaIrotHbpdWei.mjs → nW1VYp24XfapwOYa.mjs} +1 -1
  26. package/browser/esm/{B7750ljsJF3qA9kU.mjs → qzngIvn0BfOU7J6v.mjs} +37 -3
  27. package/{node/esm/CCGjvL3YYwY09qF-.mjs → browser/esm/zNQMTF4Mftkd8m3i.mjs} +1 -1
  28. package/licenses/dependencies.txt +0 -33
  29. package/node/esm/515xLSpvB54fgWJI.mjs +5722 -0
  30. package/node/esm/{ZUay0bTGgyrF8e04.mjs → BBP--4zd6B0_Rt4G.mjs} +1 -1
  31. package/{browser/esm/CG1Fn8D-2DrQZoD5.mjs → node/esm/BL3CLO1ngbZPNUSj.mjs} +1 -1
  32. package/node/esm/{CVv3DuciDQrnFFeu.mjs → BTOiKBFUYxECGgpN.mjs} +1 -1
  33. package/node/esm/{DxRD19RVMzj2YvKF.mjs → BjhGKO4xoRsWtL_b.mjs} +1 -1
  34. package/node/esm/{DDajoVNkJB39_Fkx.mjs → CI_lC0jwf_Z5jdqc.mjs} +1 -1
  35. package/node/esm/{BzNFsi4RXuJrn_1n.mjs → CJVp8EBHRn_OMdXr.mjs} +1 -1
  36. package/node/esm/{Cyvobf2wi0quDD3U.mjs → CS2YxGzDK80pF1TP.mjs} +1 -1
  37. package/node/esm/{Cdl7ZalV6WPZHHRE.mjs → CpKG2VMt7bLP4_Az.mjs} +1 -1
  38. package/node/esm/{BR2ai1V5dGPphpRf.mjs → CpyKqbMxs8fgNUrm.mjs} +2 -5
  39. package/node/esm/{Ct1gudv1TKk-5FMO.mjs → D0jAK0A5JwzRhV5i.mjs} +48 -2
  40. package/node/esm/{HgVmqQQhKQ_2v0HD.mjs → DE0FWfy3dgRhUs6j.mjs} +2 -2
  41. package/node/esm/{CWAtVXxcIz86XLzE.mjs → DY3Yp4g7FpjDC4Ux.mjs} +1 -1
  42. package/node/esm/{DtqLXxtPFISlNoUd.mjs → DatkcV-D0mA7WYmb.mjs} +1 -1
  43. package/node/esm/{B8rSUcOwH6g4MUgm.mjs → DgrvMX5JkTolu68g.mjs} +1 -1
  44. package/{browser/esm/C7mAHEhFYDwSEU6O.mjs → node/esm/Dz2Vh5VXT4u2caUb.mjs} +1 -1
  45. package/node/esm/{CltdofO5ik8g_wQ8.mjs → LWIfDqgl4BWsGN40.mjs} +1 -1
  46. package/{browser/esm/CkG4LZN-kb7plKXG.mjs → node/esm/TdOBTLcfAEs2lvw1.mjs} +69 -4
  47. package/node/esm/{DKFABgVKeBMflym9.mjs → _haW8KO4uxcUjPNq.mjs} +1 -1
  48. package/node/esm/declarations.mjs +106 -0
  49. package/node/esm/{2TCIoMd-SYs6i4-N.mjs → euzKAV6QFwFyMtRz.mjs} +1 -1
  50. package/node/esm/index.mjs +4842 -9389
  51. package/node/esm/{D2miaIrotHbpdWei.mjs → nW1VYp24XfapwOYa.mjs} +1 -1
  52. package/{browser/esm/-f-RKKojiLg94hp9.mjs → node/esm/qFHh9pVgQa0ZMumi.mjs} +51 -11
  53. package/node/esm/{B7750ljsJF3qA9kU.mjs → qzngIvn0BfOU7J6v.mjs} +37 -3
  54. package/{browser/esm/CCGjvL3YYwY09qF-.mjs → node/esm/zNQMTF4Mftkd8m3i.mjs} +1 -1
  55. package/package.json +12 -8
  56. package/types/declarations.d.ts +4 -0
  57. package/types/src/.generated/decl/dateTime/Date.decl.d.ts +2 -1
  58. package/types/src/.generated/decl/information/Information.decl.d.ts +2 -1
  59. package/types/src/.generated/decl/lookupReference/Reference.decl.d.ts +2 -1
  60. package/types/src/.generated/decl/mathTrig/Math.decl.d.ts +2 -1
  61. package/types/src/.generated/declarations.d.ts +7 -0
  62. package/types/src/.generated/desc/dateTime/Date.desc.d.ts +2 -1
  63. package/types/src/.generated/desc/information/Information.desc.d.ts +2 -1
  64. package/types/src/.generated/desc/lookupReference/Reference.desc.d.ts +2 -1
  65. package/types/src/.generated/desc/mathTrig/Math.desc.d.ts +2 -1
  66. package/types/src/_utils/AValues.d.ts +30 -0
  67. package/types/src/_utils/AggregateIFS.d.ts +3 -1
  68. package/types/src/_utils/Arithmetic.d.ts +36 -0
  69. package/types/src/_utils/Combinatorics.d.ts +20 -0
  70. package/types/src/_utils/Distributions.d.ts +93 -0
  71. package/types/src/_utils/Errors.d.ts +1 -20
  72. package/types/src/_utils/FirstCell.d.ts +32 -0
  73. package/types/src/_utils/Matrix.d.ts +31 -0
  74. package/types/src/_utils/SpecialFunctions.d.ts +91 -0
  75. package/types/src/_utils/X87.d.ts +28 -0
  76. package/types/src/database/Database.d.ts +25 -25
  77. package/types/src/dateTime/Date.d.ts +250 -41
  78. package/types/src/engineering/Bessel.d.ts +9 -9
  79. package/types/src/engineering/Bitwise.d.ts +35 -35
  80. package/types/src/engineering/Convert.d.ts +3 -3
  81. package/types/src/engineering/Engineering.d.ts +5 -5
  82. package/types/src/engineering/Error.d.ts +9 -9
  83. package/types/src/engineering/Imaginary.d.ts +54 -54
  84. package/types/src/information/Information.d.ts +118 -49
  85. package/types/src/japanese/Date.d.ts +2 -2
  86. package/types/src/japanese/Text.d.ts +1 -1
  87. package/types/src/logical/Logical.d.ts +45 -39
  88. package/types/src/lookupReference/Reference.d.ts +213 -87
  89. package/types/src/mathTrig/Math.d.ts +499 -152
  90. package/types/src/mathTrig/Trig.d.ts +26 -22
  91. package/types/src/operators/Operators.d.ts +15 -15
  92. package/types/src/statistical/Distribution.d.ts +157 -161
  93. package/types/src/statistical/Statistical.d.ts +37 -37
  94. package/types/src/testing/Testing.d.ts +2 -2
  95. package/types/src/text/Text.d.ts +119 -54
  96. package/types/src/thai/Text.d.ts +1 -1
  97. package/types/src/web/FilterXML.d.ts +1 -1
  98. package/types/src/web/Web.d.ts +2 -2
  99. package/browser/cjs/1XrWGMP3GmsQOMIX.cjs +0 -1
  100. package/browser/cjs/49_x589Na12sizKK.cjs +0 -1
  101. package/browser/cjs/4nReftSsKWmnRdtf.cjs +0 -1
  102. package/browser/cjs/507hQYooKKjnRzsZ.cjs +0 -1
  103. package/browser/cjs/BAxVLKkxFgI6cXnR.cjs +0 -1
  104. package/browser/cjs/BK0SCfN_VZYqBxoQ.cjs +0 -1
  105. package/browser/cjs/Btc0Nzu40VYOpzLX.cjs +0 -1
  106. package/browser/cjs/C9C-pr-T_ThweQX9.cjs +0 -1
  107. package/browser/cjs/CJYewYJ5Z3iojl7J.cjs +0 -1
  108. package/browser/cjs/CRx1WvmgBjT8WVyB.cjs +0 -1
  109. package/browser/cjs/CV4KQsHluMqo1I2Q.cjs +0 -1
  110. package/browser/cjs/CXlzsh_WHCOsErJ1.cjs +0 -1
  111. package/browser/cjs/CpJJh4UnFl1_qFui.cjs +0 -1
  112. package/browser/cjs/CrZlUtdX1h2RUnCP.cjs +0 -1
  113. package/browser/cjs/D8-KovdJ0LjxqCe2.cjs +0 -1
  114. package/browser/cjs/DCIlWcGDrp-5PDoA.cjs +0 -1
  115. package/browser/cjs/DDnGLOLTqLFsdUDS.cjs +0 -1
  116. package/browser/cjs/DG2kqsWRUtVugjay.cjs +0 -1
  117. package/browser/cjs/DM7-R_ltoLbA9jde.cjs +0 -1
  118. package/browser/cjs/DNKyaSruDogoBd2H.cjs +0 -1
  119. package/browser/cjs/Du4jBiFxRIF1OjD4.cjs +0 -1
  120. package/browser/cjs/EeOVMRq7TuptFKTc.cjs +0 -1
  121. package/browser/cjs/Kvn916ebqGc4t6hv.cjs +0 -1
  122. package/browser/cjs/aONv0Ys3C8xmnaR8.cjs +0 -1
  123. package/browser/cjs/index.cjs +0 -1
  124. package/browser/cjs/z_rZE1OHFPpdGBh4.cjs +0 -1
  125. package/browser/esm/C9jpXFBeugwmOTbx.mjs +0 -21
  126. package/browser/esm/Crb70T1Sp1S4uzq4.mjs +0 -24
  127. package/node/esm/C9jpXFBeugwmOTbx.mjs +0 -21
  128. package/node/esm/Crb70T1Sp1S4uzq4.mjs +0 -24
  129. package/types/src/.generated/decl/lookupReference/GroupBy.decl.d.ts +0 -4
  130. package/types/src/.generated/decl/lookupReference/PivotBy.decl.d.ts +0 -4
  131. package/types/src/.generated/desc/lookupReference/GroupBy.desc.d.ts +0 -4
  132. package/types/src/.generated/desc/lookupReference/PivotBy.desc.d.ts +0 -4
  133. package/types/src/lookupReference/GroupBy.d.ts +0 -19
  134. package/types/src/lookupReference/PivotBy.d.ts +0 -24
package/README.md CHANGED
@@ -32,7 +32,7 @@ volatility tracking, and full UI integration:
32
32
 
33
33
  ```ts
34
34
  /**
35
- * @summary Returns an array of random numbers.
35
+ * Returns an array of random numbers.
36
36
  * @param rows the number of rows in the returned array.
37
37
  * @param columns the number of columns in the returned array.
38
38
  * @param min the minimum number you would like returned.
@@ -40,29 +40,22 @@ volatility tracking, and full UI integration:
40
40
  * @param integer return an integer or a decimal value. TRUE for an integer, FALSE for a decimal number.
41
41
  */
42
42
  export function RANDARRAY(
43
- rows: number=1,
44
- columns: number=1,
45
- min: number=0,
46
- max: number=1,
47
- integer: boolean=false
48
- ): IRange {
49
- if (rows === 0 || columns === 0) throw FormulaError.BuiltIn.Calc;
50
- if (rows < 0 || columns < 0) throw FormulaError.BuiltIn.Value;
51
- if (min > max) throw FormulaError.BuiltIn.NA;
52
- const entireCoords = FormulaContext.getEntireCoords();
53
- if (rows + 1 > entireCoords.rowEnd || columns + 1 > entireCoords.colEnd) throw FormulaError.BuiltIn.Value;
54
-
55
- FormulaContext.markVolatile();
43
+ rows: Omittable<number>=1,
44
+ columns: Omittable<number>=1,
45
+ min: Omittable<number>=0,
46
+ max: Omittable<number>=1,
47
+ integer: Omittable<boolean>=false
48
+ ): Volatile<IRange> {
49
+ if (min > max) return FormulaError.BuiltIn.Value!;
50
+ const whole = integer === true;
51
+ if (whole && (min !== Math.trunc(min) || max !== Math.trunc(max))) return FormulaError.BuiltIn.Value!;
56
52
 
57
53
  return FormulaContext.createRange(rows, columns, (): number => {
58
- let randomValue = min + Math.random() * (max - min);
59
- // if integer is requested, round the value
60
- if (integer) {
61
- randomValue = Math.floor(randomValue);
62
- // ensure we can actually reach max value (Math.random() is [0,1))
63
- if (randomValue > max) randomValue = max;
64
- }
65
- return randomValue;
54
+ // the draw is the runtime's, so a host can seed it; never `Math.random`
55
+ if (!whole) return min + FormulaContext.getRandom() * (max - min);
56
+ // both ends are inclusive here, and the draw never reaches 1
57
+ const value = min + Math.floor(FormulaContext.getRandom() * (max - min + 1));
58
+ return value > max ? max : value;
66
59
  });
67
60
  };
68
61
  ```
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/formulas - Formulas - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.1
2
+ * @license @sheetxl/formulas - Formulas - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.11
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/formulas - Formulas - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.1
2
+ * @license @sheetxl/formulas - Formulas - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.11
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/formulas - Formulas - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.1
2
+ * @license @sheetxl/formulas - Formulas - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.11
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
@@ -70,15 +70,12 @@ var e = {
70
70
  columns: { d: "The number of columns to drop. A negative value drops from the end of the array." }
71
71
  }
72
72
  },
73
- EXPAND: {
74
- s: "Expands an array to the specified dimensions.",
75
- p: {
76
- array: { d: "The array to expand." },
77
- row: { d: "The number of rows in the expanded array. If missing, rows will not be expanded." },
78
- columns: { d: "The number of columns in the expanded array. If missing, columns will not be expanded." },
79
- padWidth: { d: "The value with which to pad. The default is #N/A." }
80
- }
81
- },
73
+ EXPAND: { p: {
74
+ array: {},
75
+ row: {},
76
+ columns: {},
77
+ padWith: {}
78
+ } },
82
79
  FIELDVALUE: {
83
80
  s: "Extracts a value from a field of a given record.",
84
81
  p: {
@@ -312,5 +309,48 @@ var e = {
312
309
  searchMode: { d: "1=first→last (default), -1=last→first, 2=binary asc, -2=binary desc" }
313
310
  }
314
311
  }
312
+ }, t = {
313
+ MatchType: {
314
+ s: "How MATCH compares the lookup value with the values in the array.",
315
+ m: {
316
+ "Less than": { d: "The largest value that is less than or equal to the lookup value. The array must be sorted in ascending order." },
317
+ "Exact match": { d: "The first value that is exactly equal to the lookup value. The array can be in any order." },
318
+ "Greater than": { d: "The smallest value that is greater than or equal to the lookup value. The array must be sorted in descending order." }
319
+ }
320
+ },
321
+ SortOrder: {
322
+ s: "The direction SORT and SORTBY sort a key in.",
323
+ m: {
324
+ Ascending: { d: "Smallest to largest." },
325
+ Descending: { d: "Largest to smallest." }
326
+ }
327
+ },
328
+ IgnoreValues: {
329
+ s: "Which values to leave out.",
330
+ m: {
331
+ "Keep all values": { d: "Keep every value, blanks and errors included." },
332
+ "Ignore blanks": { d: "Leave out blank cells." },
333
+ "Ignore errors": { d: "Leave out error values." },
334
+ "Ignore blanks and errors": { d: "Leave out blank cells and error values." }
335
+ }
336
+ },
337
+ MatchMode: {
338
+ s: "How XLOOKUP and XMATCH match the lookup value.",
339
+ m: {
340
+ "Exact match": { d: "Only an item equal to the lookup value." },
341
+ "Exact match or next smaller item": { d: "An item equal to the lookup value, or else the next smaller item." },
342
+ "Exact match or next larger item": { d: "An item equal to the lookup value, or else the next larger item." },
343
+ "Wildcard character match": { d: "The lookup value may use *, ? and ~ as wildcards." }
344
+ }
345
+ },
346
+ SearchMode: {
347
+ s: "The order in which XLOOKUP and XMATCH search.",
348
+ m: {
349
+ "Search first-to-last": { d: "Search from the first item to the last." },
350
+ "Search last-to-first": { d: "Search from the last item to the first." },
351
+ "Binary search (sorted ascending order)": { d: "A binary search of items sorted in ascending order." },
352
+ "Binary search (sorted descending order)": { d: "A binary search of items sorted in descending order." }
353
+ }
354
+ }
315
355
  };
316
- export { e as default };
356
+ export { e as default, t as enums };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/formulas - Formulas - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.1
2
+ * @license @sheetxl/formulas - Formulas - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.11
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.