@sheetxl/formulas 0.7.28-beta.4 → 0.8.0-beta.1

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 (59) hide show
  1. package/browser/cjs/index.cjs +1 -1
  2. package/browser/esm/{BIxWkCV-r5U5zPnQ.mjs → -f-RKKojiLg94hp9.mjs} +1 -1
  3. package/browser/esm/{DIUPlZfIoj507k-C.mjs → 0amsHACCOHE_JjXI.mjs} +1 -1
  4. package/browser/esm/{AuzqFslmIMxseCn8.mjs → B3pEie3jQN0SvV5B.mjs} +1 -1
  5. package/browser/esm/{K0CU2XaCnJJwh9a5.mjs → B7750ljsJF3qA9kU.mjs} +1 -1
  6. package/browser/esm/{jFM2MqBdxFWP6QmN.mjs → BM1YhvA2ppUZ3QLB.mjs} +1 -1
  7. package/browser/esm/{CB4iUafw8x-4z_ff.mjs → BR2ai1V5dGPphpRf.mjs} +1 -1
  8. package/browser/esm/{ec8i9mVgadWEbuYy.mjs → BYRjnggsufwbb27W.mjs} +1 -1
  9. package/browser/esm/{DNz39xRoqy8IPYb3.mjs → Bsb5i9Jq-Q8RTmvi.mjs} +1 -1
  10. package/{node/esm/DQXZXiayIDbfnOUM.mjs → browser/esm/BzNFsi4RXuJrn_1n.mjs} +1 -1
  11. package/browser/esm/{DiV1y5wtlmlsRDfm.mjs → C7mAHEhFYDwSEU6O.mjs} +1 -1
  12. package/browser/esm/{BebVPCumXxQqABDP.mjs → C9jpXFBeugwmOTbx.mjs} +1 -1
  13. package/browser/esm/{CWI62PClHru85-mL.mjs → CCGjvL3YYwY09qF-.mjs} +1 -1
  14. package/{node/esm/B2zbBC2YuaYszbHd.mjs → browser/esm/CG1Fn8D-2DrQZoD5.mjs} +1 -1
  15. package/browser/esm/{BM0KaGfI1Lqav17f.mjs → CVv3DuciDQrnFFeu.mjs} +1 -1
  16. package/browser/esm/{Co7O0P5yM1i0exNK.mjs → CWAtVXxcIz86XLzE.mjs} +1 -1
  17. package/browser/esm/{VRXC1SwOYSkv1Vs4.mjs → Cdl7ZalV6WPZHHRE.mjs} +1 -1
  18. package/{node/esm/Ctxig2_c-GErg911.mjs → browser/esm/CkG4LZN-kb7plKXG.mjs} +1 -1
  19. package/{node/esm/BXyQ76W9hObzOdf2.mjs → browser/esm/CltdofO5ik8g_wQ8.mjs} +1 -1
  20. package/browser/esm/{74anAHR6YDREjbgI.mjs → Crb70T1Sp1S4uzq4.mjs} +1 -1
  21. package/{node/esm/wDeMNrClyQscDTwZ.mjs → browser/esm/Ct1gudv1TKk-5FMO.mjs} +1 -1
  22. package/{node/esm/DjFalvyAcEOwNagC.mjs → browser/esm/Cyvobf2wi0quDD3U.mjs} +1 -1
  23. package/{node/esm/B2b-ZmAhe94pNDT0.mjs → browser/esm/D2miaIrotHbpdWei.mjs} +1 -1
  24. package/browser/esm/{BHG0YIMg5kOV3mNl.mjs → DKFABgVKeBMflym9.mjs} +1 -1
  25. package/{node/esm/ymPI-MJUjuYe2n5v.mjs → browser/esm/DtqLXxtPFISlNoUd.mjs} +1 -1
  26. package/{node/esm/CmxGNGhfoNTz4Ku7.mjs → browser/esm/HgVmqQQhKQ_2v0HD.mjs} +1 -1
  27. package/browser/esm/index.mjs +1023 -1020
  28. package/node/esm/{BIxWkCV-r5U5zPnQ.mjs → -f-RKKojiLg94hp9.mjs} +1 -1
  29. package/node/esm/{DcSbVdpEmRbpaZf0.mjs → 2TCIoMd-SYs6i4-N.mjs} +1 -1
  30. package/node/esm/{K0CU2XaCnJJwh9a5.mjs → B7750ljsJF3qA9kU.mjs} +1 -1
  31. package/node/esm/{8_dh9QnzvNBCvWpp.mjs → B8rSUcOwH6g4MUgm.mjs} +1 -1
  32. package/node/esm/{CB4iUafw8x-4z_ff.mjs → BR2ai1V5dGPphpRf.mjs} +1 -1
  33. package/{browser/esm/DQXZXiayIDbfnOUM.mjs → node/esm/BzNFsi4RXuJrn_1n.mjs} +1 -1
  34. package/node/esm/{DiV1y5wtlmlsRDfm.mjs → C7mAHEhFYDwSEU6O.mjs} +1 -1
  35. package/node/esm/{BebVPCumXxQqABDP.mjs → C9jpXFBeugwmOTbx.mjs} +1 -1
  36. package/node/esm/{CWI62PClHru85-mL.mjs → CCGjvL3YYwY09qF-.mjs} +1 -1
  37. package/{browser/esm/B2zbBC2YuaYszbHd.mjs → node/esm/CG1Fn8D-2DrQZoD5.mjs} +1 -1
  38. package/node/esm/{BM0KaGfI1Lqav17f.mjs → CVv3DuciDQrnFFeu.mjs} +1 -1
  39. package/node/esm/{Co7O0P5yM1i0exNK.mjs → CWAtVXxcIz86XLzE.mjs} +1 -1
  40. package/node/esm/{VRXC1SwOYSkv1Vs4.mjs → Cdl7ZalV6WPZHHRE.mjs} +1 -1
  41. package/{browser/esm/Ctxig2_c-GErg911.mjs → node/esm/CkG4LZN-kb7plKXG.mjs} +1 -1
  42. package/{browser/esm/BXyQ76W9hObzOdf2.mjs → node/esm/CltdofO5ik8g_wQ8.mjs} +1 -1
  43. package/node/esm/{74anAHR6YDREjbgI.mjs → Crb70T1Sp1S4uzq4.mjs} +1 -1
  44. package/{browser/esm/wDeMNrClyQscDTwZ.mjs → node/esm/Ct1gudv1TKk-5FMO.mjs} +1 -1
  45. package/{browser/esm/DjFalvyAcEOwNagC.mjs → node/esm/Cyvobf2wi0quDD3U.mjs} +1 -1
  46. package/{browser/esm/B2b-ZmAhe94pNDT0.mjs → node/esm/D2miaIrotHbpdWei.mjs} +1 -1
  47. package/node/esm/{D1iK18Nn8mRQo6Fk.mjs → DDajoVNkJB39_Fkx.mjs} +1 -1
  48. package/node/esm/{BHG0YIMg5kOV3mNl.mjs → DKFABgVKeBMflym9.mjs} +1 -1
  49. package/{browser/esm/ymPI-MJUjuYe2n5v.mjs → node/esm/DtqLXxtPFISlNoUd.mjs} +1 -1
  50. package/node/esm/{Dnrd8jP_j1AWCUX6.mjs → DxRD19RVMzj2YvKF.mjs} +1 -1
  51. package/{browser/esm/CmxGNGhfoNTz4Ku7.mjs → node/esm/HgVmqQQhKQ_2v0HD.mjs} +1 -1
  52. package/node/esm/{BsBiI5HHw7jjXgp5.mjs → ZUay0bTGgyrF8e04.mjs} +1 -1
  53. package/node/esm/index.mjs +1066 -1065
  54. package/package.json +3 -3
  55. package/types/src/_utils/AggregateIFS.d.ts +2 -2
  56. package/types/src/_utils/Errors.d.ts +1 -1
  57. package/types/src/information/Information.d.ts +6 -6
  58. package/types/src/lookupReference/Reference.d.ts +4 -4
  59. package/types/src/mathTrig/Math.d.ts +6 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/formulas",
3
3
  "description": "Formulas - TypeScript formulas compatible with Excel built-ins.",
4
- "version": "0.7.28-beta.4",
4
+ "version": "0.8.0-beta.1",
5
5
  "license": "SEE LICENSE IN <LICENSE>",
6
6
  "type": "module",
7
7
  "exports": {
@@ -37,8 +37,8 @@
37
37
  "formulas"
38
38
  ],
39
39
  "dependencies": {
40
- "@sheetxl/primitives": "^0.7.28-beta.4",
41
- "@sheetxl/scripting": "^0.7.28-beta.4",
40
+ "@sheetxl/primitives": "^0.8.0-beta.1",
41
+ "@sheetxl/scripting": "^0.8.0-beta.1",
42
42
  "bahttext": "^2.4.0",
43
43
  "bessel": "^1.0.2",
44
44
  "jstat": "^1.9.6"
@@ -31,9 +31,9 @@ import { IRange, IFormulaContext, IReferenceRange, Scalar } from '@sheetxl/primi
31
31
  *
32
32
  * Blanks keep their meaning through `emptyFold`: whether a blank matches is a constant per
33
33
  * criteria (`evaluator(null)`), so the blank positions contribute one term stated once rather
34
- * than a million evaluations. Measured, `COUNTIFS(A:A,"<>10")` is 1,048,576 and
34
+ * than a million evaluations. `COUNTIFS(A:A,"<>10")` is 1,048,576 and
35
35
  * `COUNTIFS(A:A,"<>10",B:B,">0")` is the handful B has members at — the second pair rejects
36
- * blanks, so the blank term drops out on its own (probe-criteria-blank.ps1).
36
+ * blanks, so the blank term drops out on its own.
37
37
  */
38
38
  export declare function aggregateIFS(context: IFormulaContext, pairs: readonly [criteriaRange: IReferenceRange | IRange, criteria: Scalar][], aggregateFn: (accumulator: Scalar, value: Scalar) => Scalar, aggRange: IRange | undefined, noMatchDefault: Scalar, emptyFold: ((accumulator: Scalar, count: number) => Scalar) | null): Scalar;
39
39
  //# sourceMappingURL=AggregateIFS.d.ts.map
@@ -4,7 +4,7 @@ import { IRange, Scalar } from '@sheetxl/primitives';
4
4
  * for functions that cannot use the engine's reject default. Call it once per range, in
5
5
  * ARGUMENT order, where a function takes several.
6
6
  *
7
- * Three reasons a function ends up here, all measured:
7
+ * Three reasons a function ends up here:
8
8
  * * its policy depends on a runtime argument (SUBTOTAL/AGGREGATE options),
9
9
  * * or on which rows matched (the database family),
10
10
  * * or one of its own verdicts OUTRANKS a member error, so the scan has to run after that check
@@ -33,16 +33,16 @@ export declare function ISBLANK(value: AcceptError<Scalar>): boolean;
33
33
  *
34
34
  * @remarks
35
35
  * A TEXT predicate, despite the name — it asks whether text spells a date, not whether a value
36
- * is one. Measured in Sheets 2026-08-19: every number is FALSE at every serial, `0`, `1`,
37
- * `2958465` and `-1` alike, and so is `DATEVALUE("1/1/2020")`, whose declared return is a
38
- * number. Booleans and blanks are FALSE; errors propagate with their identity. Text is TRUE
39
- * when the parser accepts the WHOLE string — a bare `"July"` and `"2/30/2020"` are FALSE.
36
+ * is one. In Sheets every number is FALSE at every serial, `0`, `1`, `2958465` and `-1` alike,
37
+ * and so is `DATEVALUE("1/1/2020")`, whose declared return is a number. Booleans and blanks are
38
+ * FALSE; errors propagate with their identity. Text is TRUE when the parser accepts the WHOLE
39
+ * string — a bare `"July"` and `"2/30/2020"` are FALSE.
40
40
  *
41
41
  * Where Sheets and Excel disagree on a SPELLING, Excel wins here: `ISDATE("July 20 1969")` is
42
42
  * FALSE (Excel wants the comma in month-day-year order), `ISDATE("Feb 30")` is TRUE (Excel
43
43
  * reads a number that cannot be a day as a 2-digit year — Feb 1930), and `ISDATE("1969-20-07")`
44
44
  * is FALSE (year-first is year-month-day with a four-digit year; Sheets takes year-day-month,
45
- * Excel does not). All measured, all the opposite of Sheets, and all inherited rather than
45
+ * Excel does not). All three are the opposite of Sheets, and all are inherited rather than
46
46
  * decided here: this shares the `DATEVALUE` parser, and that parser answers to Excel.
47
47
  *
48
48
  * **`ISDATE(A1)` on a date cell is FALSE here and TRUE in Sheets — deliberately.** Sheets reads
@@ -51,7 +51,7 @@ export declare function ISBLANK(value: AcceptError<Scalar>): boolean;
51
51
  * does not treat a format edit as a change that dirties anything — so a format-reading `ISDATE`
52
52
  * would answer correctly once and then go stale on the next reformat. Reading the value instead
53
53
  * (any serial-range number is a date) was the alternative, and it was rejected: it would have
54
- * contradicted six measured results to buy back one, and called `ISDATE(42)` a date.
54
+ * contradicted six of the Sheets results above to buy back one, and called `ISDATE(42)` a date.
55
55
  *
56
56
  * Sheets also answers TRUE for `ISDATE(TODAY())` and `ISDATE(TIME(13,0,0))` — there the
57
57
  * argument's static type is a date, which is why `DATEVALUE` differs from `TODAY` there despite
@@ -164,7 +164,7 @@ export declare function LOOKUP(lookupValue: Scalar, lookupVector: AcceptRefError
164
164
  * @param lookupArray is a contiguous range of cells containing possible lookup values, an array of values, or a reference to an array.
165
165
  * @param matchType is a number 1, 0, or -1 indicating which value to return.
166
166
  */
167
- export declare function MATCH(lookupValue: AcceptError<IRange>, lookupArray: AcceptRefError<IRange>, matchType?: Omittable<number, 0>): Scalar;
167
+ export declare function MATCH(lookupValue: AcceptError<Scalar>, lookupArray: AcceptRefError<IRange>, matchType?: Omittable<number, 0>): Scalar;
168
168
  /**
169
169
  * @summary Returns a reference to a range that is a given number of rows and columns from a given reference.
170
170
  * @param reference is the reference from which you want to base the offset, a reference to a cell or range of adjacent cells.
@@ -199,7 +199,7 @@ export declare function RTD(progId: string, server: string, topic: string[]): Sc
199
199
  * @param sortOrder a number indicating the desired sort order; 1 for ascending order (default), -1 for descending order.
200
200
  * @param byCol a logical value indicating the desired sort direction: FALSE to sort by row (default), TRUE to sort by column.
201
201
  */
202
- export declare function SORT(array: AcceptError<IRange>, sortIndex?: Omittable<Flatten<number>>, sortOrder?: Omittable<Flatten<number>>, byCol?: boolean): IRange;
202
+ export declare function SORT(array: AcceptError<IRange>, sortIndex?: Omittable<AcceptRefError<IRange>>, sortOrder?: Omittable<AcceptRefError<IRange>>, byCol?: boolean): IRange;
203
203
  /**
204
204
  * @summary Sorts a range or array based on the values in a corresponding range or array.
205
205
  * @param array the range or array to sort.
@@ -284,7 +284,7 @@ export declare function WRAPROWS(vector: AcceptError<IRange>, wrapCount: number,
284
284
  * @param matchMode 0=exact (default), -1=exact/next-smaller, 1=exact/next-larger, 2=wildcard
285
285
  * @param searchMode 1=first→last (default), -1=last→first, 2=binary asc, -2=binary desc
286
286
  */
287
- export declare function XLOOKUP(lookupValue: AcceptError<IRange>, lookupArray: AcceptRefError<IRange>, returnArray: AcceptError<IRange>, ifNotFound?: Omittable<AcceptError<Scalar>>, matchMode?: number, searchMode?: Omittable<number>): IReferenceRange;
287
+ export declare function XLOOKUP(lookupValue: AcceptError<Scalar>, lookupArray: AcceptRefError<IRange>, returnArray: AcceptError<IRange>, ifNotFound?: Omittable<AcceptError<Scalar>>, matchMode?: number, searchMode?: Omittable<number>): IReferenceRange;
288
288
  /**
289
289
  * @summary Returns the relative position of an item in an array. By default, an exact match is required.
290
290
  * @param lookupValue is the value to search for.
@@ -292,5 +292,5 @@ export declare function XLOOKUP(lookupValue: AcceptError<IRange>, lookupArray: A
292
292
  * @param matchMode 0=exact (default), -1=exact/next-smaller, 1=exact/next-larger, 2=wildcard
293
293
  * @param searchMode 1=first→last (default), -1=last→first, 2=binary asc, -2=binary desc
294
294
  */
295
- export declare function XMATCH(lookupValue: AcceptError<IRange>, lookupArray: AcceptRefError<IRange>, matchMode?: number, searchMode?: Omittable<number>): Scalar;
295
+ export declare function XMATCH(lookupValue: AcceptError<Scalar>, lookupArray: AcceptRefError<IRange>, matchMode?: number, searchMode?: Omittable<number>): Scalar;
296
296
  //# sourceMappingURL=Reference.d.ts.map
@@ -161,8 +161,9 @@ export declare function FLOOR_PRECISE(number: number, significance?: Omittable<n
161
161
  /**
162
162
  * @summary Returns the greatest common divisor.
163
163
  * @param number are 1 to 255 values.
164
+ * @compat atp
164
165
  */
165
- export declare function GCD(number: Scalar[]): number;
166
+ export declare function GCD(number: number[]): number;
166
167
  /**
167
168
  * @summary Rounds a number down to the nearest integer.
168
169
  * @param number is the real number you want to round down to an integer.
@@ -179,8 +180,9 @@ export declare function ISO_CEILING(number: number, significance?: number): numb
179
180
  /**
180
181
  * @summary Returns the least common multiple.
181
182
  * @param number are 1 to 255 values for which you want the least common multiple.
183
+ * @compat atp
182
184
  */
183
- export declare function LCM(number: Scalar[]): number;
185
+ export declare function LCM(number: number[]): number;
184
186
  /**
185
187
  * @summary Returns the natural logarithm of a number.
186
188
  * @param number is the positive real number for which you want the natural logarithm.
@@ -228,6 +230,7 @@ export declare function MROUND(number: number, multiple: number): number;
228
230
  /**
229
231
  * @summary Returns the multinomial of a set of numbers.
230
232
  * @param number are 1 to 255 values for which you want the multinomial.
233
+ * @compat atp
231
234
  */
232
235
  export declare function MULTINOMIAL(number: number[]): number;
233
236
  /**
@@ -330,7 +333,7 @@ export declare function SEQUENCE(rows: Omittable<number>, columns?: Omittable<nu
330
333
  * @param m is the step by which to increase n for each term in the series.
331
334
  * @param coefficients is a set of coefficients by which each successive power of x is multiplied.
332
335
  */
333
- export declare function SERIESSUM(x: number, n: number, m: number, coefficients: IRange<number>): number;
336
+ export declare function SERIESSUM(x: number, n: number, m: number, coefficients: IRange): number;
334
337
  /**
335
338
  * @summary Returns the sign of a number: 1 if the number is positive, zero if the number is zero, or -1 if the number is negative.
336
339
  * @param number is any real number.