@sheetxl/primitives 0.8.0-beta.17 → 0.8.0-beta.19

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.8.0-beta.17
2
+ * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.8.0-beta.19
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: MIT
@@ -465,7 +465,6 @@ var v = class {
465
465
  getSheetCount() {
466
466
  return 1;
467
467
  }
468
- markVolatile() {}
469
468
  defer(e, t) {}
470
469
  formatResults(e) {}
471
470
  filterHidden(e, t) {
@@ -655,9 +654,6 @@ var v = class {
655
654
  getSheetCount() {
656
655
  return this._getScope().getSheetCount?.() ?? 1;
657
656
  }
658
- markVolatile() {
659
- this._getScope().markVolatile?.();
660
- }
661
657
  defer(e, t) {
662
658
  return this._getScope().defer?.(e, t);
663
659
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.8.0-beta.17
2
+ * @license @sheetxl/primitives - Primitives - Base types for SheetXL functions. - v0.8.0-beta.19
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: MIT
@@ -470,7 +470,6 @@ var f = class {
470
470
  getSheetCount() {
471
471
  return 1;
472
472
  }
473
- markVolatile() {}
474
473
  defer(e, t) {}
475
474
  formatResults(e) {}
476
475
  filterHidden(e, t) {
@@ -660,9 +659,6 @@ var f = class {
660
659
  getSheetCount() {
661
660
  return this._getScope().getSheetCount?.() ?? 1;
662
661
  }
663
- markVolatile() {
664
- this._getScope().markVolatile?.();
665
- }
666
662
  defer(e, t) {
667
663
  return this._getScope().defer?.(e, t);
668
664
  }
@@ -782,5 +778,5 @@ var f = class {
782
778
  sensitivity: "base",
783
779
  numeric: !0
784
780
  })
785
- }), k = new P();
786
- export { T as DEFAULT_LOCALE_PROFILE, k as FormulaContext, n as FormulaError, t as IRange, o as IRangeStats, a as InteropScalarType, f as Observable, e as Scalar, s as ScalarType, P as ScopedFormulaContext, A as StubbedFormulaContext, i as ValueKind, l as WildCard, d as isLazyValue };
781
+ }), v = new P();
782
+ export { T as DEFAULT_LOCALE_PROFILE, v as FormulaContext, n as FormulaError, t as IRange, o as IRangeStats, a as InteropScalarType, f as Observable, e as Scalar, s as ScalarType, P as ScopedFormulaContext, A as StubbedFormulaContext, i as ValueKind, l as WildCard, d as isLazyValue };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sheetxl/primitives",
3
3
  "description": "Primitives - Base types for SheetXL functions.",
4
- "version": "0.8.0-beta.17",
4
+ "version": "0.8.0-beta.19",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "exports": {
@@ -62,8 +62,6 @@ export declare class StubbedFormulaContext implements IFormulaContext {
62
62
  getSheetIndex(sheet?: string | IReferenceRange): number;
63
63
  /** @inheritdoc IFormulaContext.getSheetCount */
64
64
  getSheetCount(): number | null;
65
- /** @inheritdoc IFormulaContext.markVolatile */
66
- markVolatile(): void;
67
65
  /** @inheritdoc IFormulaContext.defer */
68
66
  defer(_executor: IFormulaContext.DeferExecutor, _payload?: unknown): unknown;
69
67
  /** @inheritdoc IFormulaContext.formatResults */
@@ -240,8 +238,6 @@ export declare class ScopedFormulaContext implements IFormulaContext {
240
238
  getSheetIndex(sheet?: string | IReferenceRange): number;
241
239
  /** @inheritdoc IFormulaContext.getSheetCount */
242
240
  getSheetCount(): number | null;
243
- /** @inheritdoc IFormulaContext.markVolatile */
244
- markVolatile(): void;
245
241
  /** @inheritdoc IFormulaContext.defer */
246
242
  defer(executor: IFormulaContext.DeferExecutor, payload?: unknown): unknown;
247
243
  /** @inheritdoc IFormulaContext.formatResults */
@@ -29,7 +29,7 @@ import { IRichData } from './IRichData';
29
29
  *
30
30
  * | Category | Key methods |
31
31
  * |---|---|
32
- * | Evaluation lifecycle | `markVolatile`, `getRow`, `getColumn`, `getEntireCoords`, `getRandom` |
32
+ * | Evaluation lifecycle | `getRow`, `getColumn`, `getEntireCoords`, `getRandom` |
33
33
  * | Answering later | `defer` |
34
34
  * | Argument reflection | `getArgs` |
35
35
  * | Output hints | `formatResults` |
@@ -277,14 +277,6 @@ export interface IFormulaContext {
277
277
  * chosen one. When a range is returned every cell takes the same format.
278
278
  */
279
279
  formatResults(numFmt: string): void;
280
- /**
281
- * Marks this function as volatile, so it re-evaluates on every calculation.
282
- *
283
- * @remarks
284
- * Call this when the result depends on something outside the arguments, such as the clock.
285
- * A function can also be declared volatile in its registration instead.
286
- */
287
- markVolatile(): void;
288
280
  /**
289
281
  * Coerces a value to a serial date.
290
282
  *
@@ -468,15 +460,14 @@ export interface IFormulaContext {
468
460
  * @remarks
469
461
  * Always read the clock through this, never `Date.now()`. The time is fixed for the whole
470
462
  * calculation pass, so every cell in one pass agrees, collaborators evaluating the same
471
- * workbook agree, and tests can pin it. Pair it with {@link markVolatile} so the function
463
+ * workbook agree, and tests can pin it. Pair it with `Volatile<T>` so the function
472
464
  * picks up a fresh time on the next pass.
473
465
  *
474
466
  * This is a calendar clock, not a stopwatch — use `performance.now()` to measure elapsed time.
475
467
  *
476
468
  * @example
477
469
  * ```typescript
478
- * export function NOW(): number {
479
- * FormulaContext.markVolatile();
470
+ * export function NOW(): Volatile<number> {
480
471
  * return FormulaContext.getNow();
481
472
  * }
482
473
  * ```
@@ -1044,7 +1035,7 @@ export declare namespace IFormulaContext {
1044
1035
  * @remarks
1045
1036
  * Valid for as long as the executor runs, across every `await`. The ambient `FormulaContext`
1046
1037
  * is not: it belongs to the cell being evaluated, and an executor runs after that evaluation
1047
- * ends. What needs a cell (`getRow`, `getReference`, `getValueAt`, `defer`, `markVolatile`,
1038
+ * ends. What needs a cell (`getRow`, `getReference`, `getValueAt`, `defer`,
1048
1039
  * `formatResults`, `getRandom`) throws here; {@link getRandom} is the executor's own.
1049
1040
  */
1050
1041
  getFormulaContext(): IFormulaContext;