@mark1russell7/vex 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,6 +47,7 @@ The types know the fields of the records and the ops of each domain. `root.from(
47
47
 
48
48
  - [`@mark1russell7/vex-domains`](https://www.npmjs.com/package/@mark1russell7/vex-domains): 2D vectors, colors, angles, numbers and booleans
49
49
  - [`@mark1russell7/vex-testkit`](https://www.npmjs.com/package/@mark1russell7/vex-testkit): property tests for the laws of your domains
50
+ - [`@mark1russell7/vex-compiler`](https://www.npmjs.com/package/@mark1russell7/vex-compiler): generated JavaScript for your programs, with the results of the interpreter
50
51
 
51
52
  ## License
52
53
 
package/build/index.d.ts CHANGED
@@ -22,7 +22,7 @@ type Optional$1<T> = None | Some<T>;
22
22
  */
23
23
  export type ErrorCode = "#REF!" | "#N/A" | "#VALUE!" | "#NAME?" | "#NUM!" | "#CALC!" | "#ARGS" | "#CYCLE!" | "#DEPTH!";
24
24
  /** The cause of an error, in more detail than the code. */
25
- export type ErrorKind = "unknown-key" | "not-a-pair" | "out-of-bounds" | "no-offset" | "no-grid" | "no-tree" | "missing-field" | "empty" | "not-instance" | "kind-mismatch" | "unknown-op" | "unbound" | "not-finite" | "invalid-value" | "threw" | "undefined-result" | "args" | "cycle" | "depth" | "bad-expression";
25
+ export type ErrorKind = "unknown-key" | "not-a-pair" | "out-of-bounds" | "no-offset" | "no-grid" | "no-tree" | "no-table" | "no-graph" | "missing-field" | "empty" | "not-instance" | "kind-mismatch" | "unknown-op" | "unbound" | "not-finite" | "invalid-value" | "threw" | "undefined-result" | "args" | "cycle" | "depth" | "bad-expression" | "limit";
26
26
  /**
27
27
  * This function tells if an exception is the report of the engine that the call stack is full. V8 and JavaScriptCore
28
28
  * throw a `RangeError`. SpiderMonkey throws an `InternalError` ("too much recursion").
@@ -113,13 +113,16 @@ export declare const chainResult: <T, U>(r: Result<T>, f: (value: T) => Result<U
113
113
  * The expression IR of Vex. It is plain JSON data. Its first three kinds (`lit`, `ref`, `app`) have the same
114
114
  * shape as the expressions of `render`.
115
115
  */
116
- /** One move of an address. The moves of an address apply in order, from the focus of the evaluation. */
116
+ /**
117
+ * One move of an address. The moves of an address apply in order, from the focus of the evaluation. The key of `key`
118
+ * and the position of `index` can be an expression, which evaluates before the moves (NAV.COMPUTED).
119
+ */
117
120
  export type Move = {
118
121
  readonly t: "key";
119
- readonly key: string;
122
+ readonly key: string | Expr;
120
123
  } | {
121
124
  readonly t: "index";
122
- readonly i: number;
125
+ readonly i: number | Expr;
123
126
  } | {
124
127
  readonly t: "other";
125
128
  } | {
@@ -130,6 +133,16 @@ export type Move = {
130
133
  } | {
131
134
  readonly t: "parent";
132
135
  };
136
+ /** A move with a fixed key or position: a move with no expression. */
137
+ export type FixedMove = Exclude<Move, {
138
+ readonly t: "key" | "index";
139
+ }> | {
140
+ readonly t: "key";
141
+ readonly key: string;
142
+ } | {
143
+ readonly t: "index";
144
+ readonly i: number;
145
+ };
133
146
  /** An address: a list of moves. The empty list is the focus. */
134
147
  export type Addr = readonly Move[];
135
148
  /** An axis: the relation between a position and the targets that a body reads. */
@@ -150,6 +163,19 @@ export type Axis = {
150
163
  readonly t: "descendants";
151
164
  } | {
152
165
  readonly t: "siblings";
166
+ } | {
167
+ readonly t: "window";
168
+ readonly from: number;
169
+ readonly to: number;
170
+ } | {
171
+ readonly t: "table";
172
+ readonly name: string;
173
+ } | {
174
+ readonly t: "successors";
175
+ } | {
176
+ readonly t: "predecessors";
177
+ } | {
178
+ readonly t: "reachable";
153
179
  } | {
154
180
  readonly t: "where";
155
181
  readonly axis: Axis;
@@ -182,11 +208,29 @@ export type Expr = {
182
208
  readonly axis: Axis;
183
209
  readonly body: Expr;
184
210
  readonly at?: Addr;
211
+ } | {
212
+ readonly tag: "fold";
213
+ readonly axis: Axis;
214
+ readonly init: Names;
215
+ readonly step: Names;
216
+ readonly result: Expr;
217
+ readonly at?: Addr;
218
+ } | {
219
+ readonly tag: "iterate";
220
+ readonly limit: number;
221
+ readonly init: Names;
222
+ readonly step: Names;
223
+ readonly until?: Expr;
224
+ readonly result: Expr;
185
225
  } | {
186
226
  readonly tag: "ext";
187
227
  readonly kind: string;
188
228
  readonly data: unknown;
189
229
  };
230
+ /** The names of a loop and an expression for each (LOOP.NAMES). */
231
+ export type Names = Readonly<Record<string, Expr>>;
232
+ /** The largest number of steps of `iterate` (ITERATE.LIMIT). */
233
+ export declare const MAX_ITERATIONS = 1e5;
190
234
  /** The tag of an expression kind. */
191
235
  export type ExprTag = Expr["tag"];
192
236
  /** An expression of one kind. */
@@ -212,20 +256,38 @@ export declare const rec: (fields: Readonly<Record<string, Expr>>) => ExprOf<"re
212
256
  * targets from the key of that address, not from the focus.
213
257
  */
214
258
  export declare function each(axis: Axis, body: Expr, at?: Addr): ExprOf<"each">;
259
+ /**
260
+ * This function makes a fold: a step at each target of `axis`, in order. `init` gives the names and their first
261
+ * values, and `step` gives the next values. `result` gives the value from the last values (LOOP.NAMES, FOLD.ORDER).
262
+ */
263
+ export declare function fold(axis: Axis, init: Names, step: Names, result: Expr, at?: Addr): ExprOf<"fold">;
264
+ /**
265
+ * This function makes an iteration: up to `limit` steps. `init` gives the names and their first values, and `step`
266
+ * gives the next values. A true `until` stops it, and `result` gives the value (ITERATE.LIMIT, ITERATE.UNTIL).
267
+ */
268
+ export declare function iterate(limit: number, init: Names, step: Names, result: Expr, until?: Expr): ExprOf<"iterate">;
215
269
  /** This function makes an expression of an extension kind. */
216
270
  export declare const ext: (kind: string, data: unknown) => ExprOf<"ext">;
217
- /** The move to an absolute key. */
218
- export declare const key: (k: string) => Move;
219
- /** The move to a position in the key order. */
220
- export declare const index: (i: number) => Move;
271
+ /** The move to an absolute key. The key can be an expression that gives a text. */
272
+ export declare function key(k: string): FixedMove;
273
+ export declare function key(k: string | Expr): Move;
274
+ /** The move to a position in the key order. The position can be an expression that gives a number. */
275
+ export declare function index(i: number): FixedMove;
276
+ export declare function index(i: number | Expr): Move;
277
+ /** This function gives the expression of a move with a computed key or position, or `undefined`. */
278
+ export declare function moveExpr(m: Move): Expr | undefined;
279
+ /** This function gives the expressions of the computed moves of an address, in the order of the moves. */
280
+ export declare const addrExprs: (at: Addr | undefined) => readonly Expr[];
281
+ /** This function tells if each move of an address is fixed. */
282
+ export declare const isFixedAddr: (at: Addr | undefined) => at is readonly FixedMove[];
221
283
  /** The move to the other key of a space with two keys. */
222
- export declare const other: Move;
284
+ export declare const other: FixedMove;
223
285
  /** The relative move in an array (one number) or a grid (two numbers). */
224
- export declare const offset: (...d: readonly number[]) => Move;
286
+ export declare const offset: (...d: readonly number[]) => FixedMove;
225
287
  /** The move back to the origin of the evaluation. */
226
- export declare const origin: Move;
288
+ export declare const origin: FixedMove;
227
289
  /** The move to the parent of the focus in a tree space. */
228
- export declare const parent: Move;
290
+ export declare const parent: FixedMove;
229
291
  /** The axes. */
230
292
  export declare const axes: {
231
293
  /** Each key of the space. */
@@ -244,21 +306,46 @@ export declare const axes: {
244
306
  readonly descendants: Axis;
245
307
  /** The other children of the parent of the focus. For a root, the other roots. */
246
308
  readonly siblings: Axis;
309
+ /**
310
+ * The keys at the offsets from `from` to `to` of the focus, in order: a window of rows. The offset 0 is the focus. In
311
+ * a tree space, the offsets go among the siblings. An offset outside the space has no target.
312
+ */
313
+ readonly window: (from: number, to: number) => Axis;
314
+ /**
315
+ * Each key of the table `name` of the evaluation, in key order. The body evaluates in the space of that table, and
316
+ * there the origin is the target.
317
+ */
318
+ readonly table: (name: string) => Axis;
319
+ /** The keys at the ends of the edges from the focus, in a graph space. In a tree space, the children. */
320
+ readonly successors: Axis;
321
+ /** The keys with an edge to the focus, in key order. In a tree space, the parent. */
322
+ readonly predecessors: Axis;
323
+ /** Each key that a path of edges reaches from the focus, in breadth-first order, without the focus. */
324
+ readonly reachable: Axis;
247
325
  /** The targets of `axis` where `test` gives `true`. */
248
326
  readonly where: (axis: Axis, test: Expr) => Axis;
249
327
  };
250
- /** This function tells if a value is a valid move. */
328
+ /** This function tells if a value is a valid move. The expression of a computed move must be valid too. */
251
329
  export declare function isMove(u: unknown): u is Move;
252
330
  /** This function tells if a value is a valid axis. It checks the tests of `where` too. */
253
331
  export declare function isAxis(u: unknown): u is Axis;
254
332
  /** This function tells if a value is a valid expression. It checks the whole tree. */
255
333
  export declare function isExpr(u: unknown): u is Expr;
256
- /** This function gives the child expressions of an expression, in the order of their child index. */
334
+ /**
335
+ * This function gives the reason that a value is not a valid expression, or `undefined` for a valid expression
336
+ * (EVAL.SHAPE). An expression from a newer version of Vex can have a tag that this version does not know. Unlike
337
+ * `isExpr`, it accepts a number that is not whole in a move or in a window, because it has a meaning at run time.
338
+ */
339
+ export declare function shapeError(u: unknown): string | undefined;
340
+ /**
341
+ * This function gives the child expressions of an expression, in the order of their child index. The expressions of
342
+ * the computed moves of an address come last. They evaluate at the position of their node, also for an axis.
343
+ */
257
344
  export declare function children(e: Expr): readonly Expr[];
258
345
  //#endregion
259
346
  //#region src/space.d.ts
260
347
  /** The kind of a space. The kind sets which moves and axes are valid. */
261
- export type SpaceKind = "record" | "array" | "grid" | "tree";
348
+ export type SpaceKind = "record" | "array" | "grid" | "tree" | "graph";
262
349
  /**
263
350
  * A space: an immutable collection of records with keys. A Vex program evaluates at one key of a space.
264
351
  * Nothing changes a space after it is made.
@@ -267,6 +354,11 @@ export interface Space<K extends string = string, O = unknown> {
267
354
  readonly kind: SpaceKind;
268
355
  /** The keys, in their order. */
269
356
  readonly keys: readonly K[];
357
+ /**
358
+ * The record of each key, in the order of `keys` (SPACE.RECORDS). A compiler reads a record by its index with it.
359
+ * A space without it gives each record with `get` only.
360
+ */
361
+ readonly records?: readonly (O | undefined)[];
270
362
  /** This function tells if the space has the key `k`. */
271
363
  has(k: string): k is K;
272
364
  /** This function gives the record at the key `k`, or `undefined`. */
@@ -279,12 +371,15 @@ export interface Space<K extends string = string, O = unknown> {
279
371
  parentOf?(k: string): K | undefined;
280
372
  /** The children of the key `k` in a tree space, in key order. Other spaces do not have it. */
281
373
  childrenOf?(k: string): readonly K[];
374
+ /** The keys at the ends of the edges from `k`, in a graph space or a tree space. Other spaces do not have it. */
375
+ successorsOf?(k: string): readonly K[];
376
+ /** The keys with an edge to `k`, in key order, in a graph space or a tree space. Other spaces do not have it. */
377
+ predecessorsOf?(k: string): readonly K[];
282
378
  }
283
379
  /** The key type of a grid space. */
284
380
  export type GridKey = `${number},${number}`;
285
381
  /** The key type of an array space. */
286
382
  export type ArrayKey = `${number}`;
287
- /** The constructors of spaces. */
288
383
  export declare const space: {
289
384
  /** This function makes a space from the entries of an object. The keys are the property names. */
290
385
  readonly record: <const R extends Readonly<Record<string, unknown>>>(records: R) => Space<keyof R & string, R[keyof R]>;
@@ -297,6 +392,11 @@ export declare const space: {
297
392
  * with the parent `null`, is a root. A parent that is not a key, or a cycle of parents, throws a `TypeError`.
298
393
  */
299
394
  readonly tree: <const R extends Readonly<Record<string, unknown>>>(records: R, parents: Readonly<Partial<Record<keyof R & string, (keyof R & string) | null>>>) => Space<keyof R & string, R[keyof R]>;
395
+ /**
396
+ * This function makes a graph space: the records by key, and the edges from each key, in order. An edge to a key
397
+ * that is not in the graph throws a `TypeError`. A graph can have cycles, and an edge can go from a key to itself.
398
+ */
399
+ readonly graph: <const R extends Readonly<Record<string, unknown>>>(records: R, edges: Readonly<Partial<Record<keyof R & string, readonly (keyof R & string)[]>>>) => Space<keyof R & string, R[keyof R]>;
300
400
  };
301
401
  /** The position of an evaluation: the key where it started, and the key where relative references read. */
302
402
  export interface Position {
@@ -304,9 +404,14 @@ export interface Position {
304
404
  readonly focus: string;
305
405
  }
306
406
  /** This function applies one move to the focus. It gives the new focus, or a `#REF!` error. */
307
- export declare function applyMove(s: Space, at: Position, m: Move): Result<string>;
407
+ export declare function applyMove(s: Space, at: Position, m: FixedMove): Result<string>;
408
+ /**
409
+ * This function gives the fixed moves of an address. `values` has the value of the expression of each computed move,
410
+ * in order (NAV.COMPUTED). A key that is not a text, or a position that is not a number, gives `#VALUE!`.
411
+ */
412
+ export declare function fixAddr(addr: Addr, values: readonly unknown[], at: Position): Result<readonly FixedMove[]>;
308
413
  /** This function applies the moves of an address in order. It gives the key where the address points. */
309
- export declare function resolveAddr(s: Space, at: Position, addr: Addr | undefined): Result<string>;
414
+ export declare function resolveAddr(s: Space, at: Position, addr: readonly FixedMove[] | undefined): Result<string>;
310
415
  /**
311
416
  * This function gives the targets of a base axis at a focus. It does not handle `where`, because the
312
417
  * interpreter must evaluate the test.
@@ -324,6 +429,8 @@ export declare function axisTargets(s: Space, at: Position, a: Exclude<Axis, {
324
429
  export type Law = "commutative" | "associative" | "idempotent";
325
430
  /** The kind of a parameter. The interpreter checks the arguments of an op that declares its parameters. */
326
431
  export type ParamKind = "domain" | "number" | "boolean" | "string" | "any";
432
+ /** The kind of the result of an op: a kind of a parameter, or `domain:Name` for a value of the domain `Name`. */
433
+ export type ReturnKind = ParamKind | `domain:${string}`;
327
434
  /** The description of one op of a domain. */
328
435
  export interface OpSpec<D = never> {
329
436
  /**
@@ -339,7 +446,15 @@ export interface OpSpec<D = never> {
339
446
  readonly liftScalar?: boolean | readonly boolean[];
340
447
  /** The kinds of the parameters after the receiver. When set, the interpreter checks the arguments. */
341
448
  readonly params?: readonly ParamKind[];
449
+ /**
450
+ * The kind of the result: `domain` for a value of this domain, and `domain:Name` for a value of the domain `Name`. A
451
+ * compiler reads it to know the kinds of the values of a program (KIND.RETURNS). The interpreter does not check it,
452
+ * and the law checker of the test kit does.
453
+ */
454
+ readonly returns?: ReturnKind;
342
455
  }
456
+ /** A JavaScript type of primitive values that a domain can accept. */
457
+ export type PrimitiveKind = "number" | "string" | "boolean";
343
458
  /** The type of an op that lifts number arguments. Use it to type the ops of a domain under `isolatedDeclarations`. */
344
459
  export type LiftedOp<D> = OpSpec<D> & {
345
460
  readonly liftScalar: true;
@@ -359,6 +474,11 @@ export interface DomainSpec<Name extends string, D, Ops extends Readonly<Record<
359
474
  readonly name: Name;
360
475
  /** The runtime test for the values of the domain. It must not give false positives. */
361
476
  readonly is: (u: unknown) => u is D;
477
+ /**
478
+ * The JavaScript type of the values of the domain, if `is` accepts each value of that type and no other value
479
+ * (KIND.PRIMITIVE). A compiler then finds the op of such a value before a run.
480
+ */
481
+ readonly primitive?: PrimitiveKind;
362
482
  /** The ops of the domain, with their metadata. */
363
483
  readonly ops: Ops;
364
484
  /** With `"all"`, each method of a value is an op, also without an entry in `ops`. The default is `"declared"`. */
@@ -373,6 +493,11 @@ export interface DomainSpec<Name extends string, D, Ops extends Readonly<Record<
373
493
  readonly encode?: (d: D) => unknown;
374
494
  /** The value of a JSON form that `encode` made. */
375
495
  readonly decode?: (json: unknown) => D;
496
+ /**
497
+ * Some values of the domain. A compiler gives them to an op and to its copy in a module: the two must give the same
498
+ * results (KIND.DOMAIN).
499
+ */
500
+ readonly samples?: () => readonly D[];
376
501
  }
377
502
  /** A domain. Make one with `defineDomain`. */
378
503
  export interface Domain<Name extends string = string, D = unknown, Ops extends Readonly<Record<string, OpSpec<D>>> = Readonly<Record<string, OpSpec<D>>>> extends DomainSpec<Name, D, Ops> {
@@ -487,6 +612,8 @@ export interface EvalOptions {
487
612
  readonly extensions?: Readonly<Record<string, ExtHandler>>;
488
613
  /** Variables that the program can read with `v(name)`. */
489
614
  readonly vars?: Readonly<Record<string, unknown>>;
615
+ /** The other spaces of the evaluation, by name. The axis `table(name)` reads them. */
616
+ readonly tables?: Readonly<Record<string, Space>>;
490
617
  /** A receiver of trace events. */
491
618
  readonly trace?: TraceSink;
492
619
  }
@@ -497,7 +624,7 @@ export declare const SPECIAL_FORMS: ReadonlySet<string>;
497
624
  /** The options that a compiled program keeps: the domains, the free functions and the extension handlers. */
498
625
  export type CompileOptions = Pick<EvalOptions, "domains" | "fns" | "extensions">;
499
626
  /** The options of one run of a compiled program. */
500
- export type RunOptions = Pick<EvalOptions, "space" | "origin" | "vars" | "trace">;
627
+ export type RunOptions = Pick<EvalOptions, "space" | "origin" | "vars" | "trace" | "tables">;
501
628
  /**
502
629
  * A compiled program: the expression as a tree of functions. A program evaluates many times at different origins,
503
630
  * and over different spaces, without a new walk of the expression.
@@ -523,6 +650,12 @@ export declare function compile(expr: Expr, opts?: CompileOptions): Program;
523
650
  export declare function evaluate(expr: Expr, opts: EvalOptions): Result<unknown>;
524
651
  /** This function evaluates an expression and records a trace of each node. */
525
652
  export declare function explain(expr: Expr, opts: Omit<EvalOptions, "trace">): Trace;
653
+ /** This function tells if a segment of a path can name a field. A compiler uses the same rule as the interpreter. */
654
+ export declare const isFieldName: (seg: string) => boolean;
655
+ /** This function runs the `is` test of a domain. A test that throws counts as `false`. */
656
+ export declare function safeIs(d: AnyDomain, value: unknown): boolean;
657
+ /** This function tells if an argument has the kind of a parameter of an op of the domain `domain`. */
658
+ export declare function matchesKind(kind: ParamKind, value: unknown, domain: AnyDomain): boolean;
526
659
  /** This function gives a short name for the type of a value, for error messages. */
527
660
  export declare function describeType(u: unknown): string;
528
661
  /** This function gives the label of a node, for traces. */
@@ -551,7 +684,8 @@ export interface Dependency {
551
684
  }
552
685
  /**
553
686
  * This function gives the static reads of an expression. A host can use them to recompute a program only
554
- * when a field that it reads changes.
687
+ * when a field that it reads changes. A computed move reads a key that only a run knows. Its address keeps the
688
+ * expression, and the reads of that expression are in the list too (NAV.COMPUTED).
555
689
  */
556
690
  export declare function deps(e: Expr): readonly Dependency[];
557
691
  //#endregion
@@ -627,15 +761,41 @@ export declare function traversal<K extends string, T>(items: readonly Traversal
627
761
  //#region src/sheet.d.ts
628
762
  /** The extension kind of a cell reference. */
629
763
  export declare const CELL_KIND = "vex.cell";
630
- /** The data of a cell reference: the column, and the address from the focus. */
764
+ /**
765
+ * The data of a cell reference: the column, and the address from the focus. The data of an extension is not an
766
+ * expression, so the address has only fixed moves.
767
+ */
631
768
  export interface CellRef {
632
769
  readonly column: string;
633
- readonly at: Addr;
770
+ readonly at: readonly FixedMove[];
634
771
  }
635
772
  /** This function makes a cell reference: the column `column` at the address `at` from the focus. */
636
- export declare const cell: (column: string, at?: Addr) => Expr;
637
- /** The options of a sheet run: the evaluation options without the origin and the trace. */
638
- export type SheetOptions = Omit<EvalOptions, "origin" | "trace">;
773
+ export declare const cell: (column: string, at?: readonly FixedMove[]) => Expr;
774
+ /** The formulas of single cells: for each column, the formula of each key that has its own formula. */
775
+ export type CellFormulas = ReadonlyMap<string, ReadonlyMap<string, Expr>>;
776
+ /** A table of a run: its space, the formulas of its columns, and the formulas of its cells. */
777
+ export interface SheetTable {
778
+ readonly space: Space;
779
+ readonly columns: ReadonlyMap<string, Expr>;
780
+ readonly cells?: CellFormulas;
781
+ }
782
+ /** The options of a sheet run: the evaluation options without the origin and the trace, and the tables. */
783
+ export type SheetOptions = Omit<EvalOptions, "origin" | "trace" | "tables"> & {
784
+ /** The cells with their own formula. The formula of a cell replaces the formula of its column at its key. */
785
+ readonly cells?: CellFormulas;
786
+ /** The name of this table, so the axis `table(name)` in a formula of another table can read it. */
787
+ readonly name?: string;
788
+ /** The other tables, by name (SHEET.TABLES). A cell reference reads the table of the space where it evaluates. */
789
+ readonly tables?: ReadonlyMap<string, SheetTable>;
790
+ /**
791
+ * The compiler of the formulas of the columns (SHEET.COMPILE), for example `tiered` of `@mark1russell7/vex-compiler`.
792
+ * Without a compiler, the interpreter evaluates each formula. The compiled program must give the results of the
793
+ * interpreter.
794
+ */
795
+ readonly compile?: CompileFn;
796
+ };
797
+ /** A compiler of the formulas of the columns of a run. */
798
+ export type CompileFn = (expr: Expr, options: CompileOptions) => Program;
639
799
  /**
640
800
  * One run of a sheet. It keeps the result of each cell that it evaluated. The space does not change, so a cell has
641
801
  * one result in a run.
@@ -650,23 +810,34 @@ export type SheetOptions = Omit<EvalOptions, "origin" | "trace">;
650
810
  * cell, and the cell that reads it pauses. A paused evaluation reads no other cell and changes no state of the
651
811
  * search. The run then evaluates the started cell from its own list, and it evaluates the paused cell again after
652
812
  * that cell. A formula is pure (EVAL.PURE), so the second evaluation gives the result of one evaluation.
813
+ *
814
+ * A run can have more tables (SHEET.TABLES). Each table has its own space, and one search covers the cells of all
815
+ * the tables. Thus a cycle across tables gives `#CYCLE!` too.
653
816
  */
654
817
  export declare class SheetRun {
655
818
  #private;
656
819
  /** `budget` is the budget of the stack in estimated frames. A test can make it small, so the run pauses often. */
657
820
  constructor(columns: ReadonlyMap<string, Expr>, opts: SheetOptions, budget?: number);
658
821
  /**
659
- * This method gives the result of one cell: the column `column` at the key `key`. A read from a host first evaluates
660
- * the column at the keys before `key`, in key order. Thus a recurrence over the keys reads finished cells.
822
+ * This method gives the result of one cell: the column `column` at the key `key` of the main table, or of the table
823
+ * `table`. A read from a host first evaluates the column at the keys before `key`, in key order. Thus a recurrence
824
+ * over the keys reads finished cells.
825
+ */
826
+ cell(column: string, key: string, table?: string): Result<unknown>;
827
+ /** This method evaluates one cell with a trace of the nodes of its program. The result is the result of the cell. */
828
+ explain(column: string, key: string, table?: string): Trace;
829
+ /**
830
+ * This method evaluates each cell of the table `table`, or of the main table (SHEET.FILL). Each column comes after
831
+ * the columns that it reads, and the keys of a column come in the order of its reads from itself. Thus most reads
832
+ * find a finished cell. An evaluation that reads a cell that is not finished has no effect, and the search then
833
+ * evaluates its cell. A read of a cell gives the same result after a fill.
661
834
  */
662
- cell(column: string, key: string): Result<unknown>;
663
- /** This method evaluates one cell with a trace of the nodes of its column. The result is the result of the cell. */
664
- explain(column: string, key: string): Trace;
835
+ fill(table?: string): void;
665
836
  /**
666
837
  * This method evaluates the column `column` at each key before `key`, in key order. A recurrence over the keys,
667
838
  * for example a running total, then reads finished cells.
668
839
  */
669
- warm(column: string, key: string): void;
840
+ warm(column: string, key: string, table?: string): void;
670
841
  }
671
842
  //#endregion
672
843
  //#region src/builder.d.ts
@@ -771,10 +942,16 @@ export interface ChainBase<Ctx extends ChainContext, T> {
771
942
  all(): Traversal<Ctx["keys"], T>;
772
943
  /** This method gives a chain whose value is a field of the record at the current address. */
773
944
  from<P extends keyof Ctx["record"] & string>(field: P): ChainOf<Ctx, NonNullable<Ctx["record"][P]>>;
774
- /** Navigation: later field references read at the key `k`. */
775
- to(k: Ctx["keys"]): ChainOf<Ctx, T>;
776
- /** Navigation: later field references read at the key with this position in the key order. */
777
- index(i: number): ChainOf<Ctx, T>;
945
+ /**
946
+ * Navigation: later field references read at the key `k`. A chain of a text gives the key, and it evaluates at the
947
+ * focus before the moves (NAV.COMPUTED).
948
+ */
949
+ to(k: Ctx["keys"] | ChainBase<Ctx, string>): ChainOf<Ctx, T>;
950
+ /**
951
+ * Navigation: later field references read at the key with this position in the key order. A chain of a number gives
952
+ * the position, and it evaluates at the focus before the moves (NAV.COMPUTED).
953
+ */
954
+ index(i: number | ChainBase<Ctx, number>): ChainOf<Ctx, T>;
778
955
  /** Navigation: later field references read at a relative position in an array or a grid. */
779
956
  offset(...d: readonly number[]): ChainOf<Ctx, T>;
780
957
  /** Navigation: later field references read at the origin again. */
@@ -795,6 +972,13 @@ export interface ChainBase<Ctx extends ChainContext, T> {
795
972
  call<N extends CallableFns<Ctx, T>>(name: N, ...args: CallArgs<Ctx, N>): ChainOf<Ctx, CallReturn<Ctx, N>>;
796
973
  /** This method evaluates each branch with the current value, and gives a record of the results. */
797
974
  fork<const B extends Readonly<Record<string, (c: ChainOf<Ctx, T>) => ChainBase<Ctx, unknown>>>>(branches: B): ChainOf<Ctx, { readonly [N in keyof B]: ValueOf<ReturnType<B[N]>>; }>;
975
+ /**
976
+ * This method makes up to `limit` steps (ITERATE.LIMIT). `init` gives the names and their first values, and `step`
977
+ * gives the next values. A true `until` stops the steps (ITERATE.UNTIL). `result` gives the value of the chain.
978
+ */
979
+ iterate<const I extends Readonly<Record<string, unknown>>, R>(limit: number, init: I, step: (vars: LoopVars<Ctx, I>) => NoInfer<LoopStep<Ctx, I>>, result: (vars: LoopVars<Ctx, I>) => ArgInput<R, Ctx, false>, opts?: {
980
+ readonly until?: (vars: LoopVars<Ctx, I>) => ArgInput<boolean, Ctx, false>;
981
+ }): ChainOf<Ctx, R>;
798
982
  /** This method binds names for the body. The body gets a variable token for each name. */
799
983
  with<const B extends Readonly<Record<string, unknown>>, U>(binds: B, body: (c: ChainOf<Ctx, T>, vars: { readonly [N in keyof B]: Arg<ArgValue<Ctx, B[N]>>; }) => ChainBase<Ctx, U>): ChainOf<Ctx, U>;
800
984
  /** The others axis: the body evaluates at each key except the focus. Its start value is the current value. */
@@ -811,6 +995,22 @@ export interface ChainBase<Ctx extends ChainContext, T> {
811
995
  descendants<U>(body: (c: ChainOf<Ctx, T>) => ChainBase<Ctx, U>, opts?: AxisOpts<Ctx, T>): ListChain<Ctx, U>;
812
996
  /** The siblings axis of a tree space: the other children of the parent, or the other roots for a root. */
813
997
  siblings<U>(body: (c: ChainOf<Ctx, T>) => ChainBase<Ctx, U>, opts?: AxisOpts<Ctx, T>): ListChain<Ctx, U>;
998
+ /**
999
+ * The window axis of an array space or a tree space: the keys at the offsets from `from` to `to` of the focus, in
1000
+ * order. The offset 0 is the focus. An offset outside the space has no target.
1001
+ */
1002
+ window<U>(from: number, to: number, body: (c: ChainOf<Ctx, T>) => ChainBase<Ctx, U>, opts?: AxisOpts<Ctx, T>): ListChain<Ctx, U>;
1003
+ /**
1004
+ * The table axis: the body evaluates at each key of the table `name` of the evaluation, in the space of that table.
1005
+ * The body reads the fields of that table, but the types of the chain are the types of this space.
1006
+ */
1007
+ table<U>(name: string, body: (c: ChainOf<Ctx, T>) => ChainBase<Ctx, U>, opts?: AxisOpts<Ctx, T>): ListChain<Ctx, U>;
1008
+ /** The successors axis of a graph space: the ends of the edges from the focus. In a tree space, the children. */
1009
+ successors<U>(body: (c: ChainOf<Ctx, T>) => ChainBase<Ctx, U>, opts?: AxisOpts<Ctx, T>): ListChain<Ctx, U>;
1010
+ /** The predecessors axis of a graph space: the keys with an edge to the focus. In a tree space, the parent. */
1011
+ predecessors<U>(body: (c: ChainOf<Ctx, T>) => ChainBase<Ctx, U>, opts?: AxisOpts<Ctx, T>): ListChain<Ctx, U>;
1012
+ /** The reachable axis of a graph space: each key that a path of edges reaches, in breadth-first order. */
1013
+ reachable<U>(body: (c: ChainOf<Ctx, T>) => ChainBase<Ctx, U>, opts?: AxisOpts<Ctx, T>): ListChain<Ctx, U>;
814
1014
  }
815
1015
  /** The options of an axis. */
816
1016
  export interface AxisOpts<Ctx extends ChainContext, T> {
@@ -838,10 +1038,21 @@ export type ArgValue<Ctx extends ChainContext, A> = A extends Arg<infer T> ? T :
838
1038
  readonly kind: "vex.chain";
839
1039
  } ? ValueOf<A> : A extends keyof Ctx["record"] & string ? NonNullable<Ctx["record"][A]> : A;
840
1040
  /** A chain whose value is a list: the result of an axis. */
1041
+ /** The type of a value of a name of a loop: a literal of `init` gives its primitive type. */
1042
+ type LoopValue<Ctx extends ChainContext, A> = ArgValue<Ctx, A> extends (infer T) ? (T extends number ? number : T extends string ? string : T extends boolean ? boolean : T) : never;
1043
+ /** The names of a loop of the builder: a chain of the value of each name of `init` (LOOP.NAMES). */
1044
+ export type LoopVars<Ctx extends ChainContext, I> = { readonly [N in keyof I]: ChainOf<Ctx, LoopValue<Ctx, I[N]>>; };
1045
+ /** The next values of a step of a loop: a value for some of the names of `init`. */
1046
+ export type LoopStep<Ctx extends ChainContext, I> = { readonly [N in keyof I]?: ArgInput<LoopValue<Ctx, I[N]>, Ctx, false>; };
841
1047
  export interface ListChain<Ctx extends ChainContext, U> {
842
1048
  readonly kind: "vex.list-chain";
843
1049
  /** The expression of the chain, as plain data. */
844
1050
  readonly program: Expr;
1051
+ /**
1052
+ * This method folds the items in the order of the axis (FOLD.ORDER). `init` gives the names and their first values.
1053
+ * `step` gives the next values from the names and the item, a chain at the target. `result` gives the value.
1054
+ */
1055
+ fold<const I extends Readonly<Record<string, unknown>>, R>(init: I, step: (vars: LoopVars<Ctx, I>, item: ChainOf<Ctx, U>) => NoInfer<LoopStep<Ctx, I>>, result: (vars: LoopVars<Ctx, I>) => ArgInput<R, Ctx, false>): ChainOf<Ctx, R>;
845
1056
  count(opts?: ListOpts): ChainOf<Ctx, number>;
846
1057
  sum(this: ListChain<Ctx, number>, opts?: ListOpts): ChainOf<Ctx, number>;
847
1058
  mean(this: ListChain<Ctx, number>, opts?: ListOpts): ChainOf<Ctx, number>;
@@ -903,11 +1114,12 @@ export interface Root<Ctx extends ChainContext> {
903
1114
  export interface SheetRoot<Ctx extends ChainContext, Cols> extends Root<Ctx> {
904
1115
  /**
905
1116
  * This method makes a cell reference: the column `column` at the key `at`, or at the address `at` from the focus.
906
- * Without `at`, it reads at the focus. The type is the type of a column before this one.
1117
+ * The address has only fixed moves. Without `at`, it reads at the focus. The type is the type of a column before
1118
+ * this one.
907
1119
  */
908
- cell<N extends keyof Cols & string>(column: N, at?: Ctx["keys"] | Addr): Arg<Cols[N]>;
1120
+ cell<N extends keyof Cols & string>(column: N, at?: Ctx["keys"] | readonly FixedMove[]): Arg<Cols[N]>;
909
1121
  /** This method makes a cell reference to any column, also this column or a later one. The caller gives the type. */
910
- cell<T>(column: string, at?: Ctx["keys"] | Addr): Arg<T>;
1122
+ cell<T>(column: string, at?: Ctx["keys"] | readonly FixedMove[]): Arg<T>;
911
1123
  }
912
1124
  /** One row of a sheet: the key and the result of each column. */
913
1125
  export interface SheetRow<K extends string, Cols> {
@@ -930,8 +1142,15 @@ export interface Sheet<Ctx extends ChainContext, Cols, Decl = object> {
930
1142
  * `cell` and its type: the column itself (a recurrence) or a later column. It has no effect at run time.
931
1143
  */
932
1144
  declare<D extends Readonly<Record<string, unknown>>>(): Sheet<Ctx, Cols, Decl & D>;
1145
+ /**
1146
+ * This method gives a new sheet in which the cell of the column `column` at the key `k` has its own formula. That
1147
+ * formula replaces the formula of the column at the key `k`. It must give a value of the type of the column.
1148
+ */
1149
+ cellFormula<const N extends keyof (Cols & Decl) & string>(k: Ctx["keys"], column: N, formula: (r: SheetRoot<Ctx, Cols & Decl>) => ChainBase<Ctx, (Cols & Decl)[N]>): Sheet<Ctx, Cols, Decl>;
933
1150
  /** The program of each column. */
934
1151
  readonly columns: Readonly<Record<string, Expr>>;
1152
+ /** The program of each cell with its own formula, by column and then by key. */
1153
+ readonly cellFormulas: Readonly<Record<string, Readonly<Record<string, Expr>>>>;
935
1154
  /** This method evaluates one cell, and gives the error if there is one. */
936
1155
  result<N extends keyof Cols & string>(k: Ctx["keys"], column: N): Result<Cols[N]>;
937
1156
  /** This method evaluates one cell. An error gives `none`. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["Optional","FamilyOptional"],"sources":["../../../node_modules/.pnpm/@mark1russell7+optional@https+++codeload.github.com+mark1russell7+optional+tar.gz+1c649_51d63135d3a4bb347c942166e3e4ba82/node_modules/@mark1russell7/optional/dist/index.d.ts","../src/errors.ts","../src/result.ts","../src/ir.ts","../src/space.ts","../src/domain.ts","../src/list.ts","../src/trace.ts","../src/evaluate.ts","../src/deps.ts","../src/json.ts","../src/traversal.ts","../src/sheet.ts","../src/builder.ts"],"ignoreList":[0],"mappings":";;;;;;KAKY;WACC;;;KAGD,KAAK;WACJ;WACA,OAAO;;;KAGRA,WAAS,KAAK,OAAO,KAAK;;;;;;;YCV1B;;YAGA;;;;;wBAiDI,gBAAgB;;qBAMnB,eAAgB,GAAG;;iBAGf;;WAEN,MAAM;;WAEN,MAAM;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA,kBAAkB;;WAElB;;;iBAIM;WACN;WACA;WACA;WACA;WACA,kBAAkB;WAClB;;;qBAIE,SAAU,MAAM,cAAY;;wBAGzB,SAAS,MAAM,WAAW,iBAAiB,UAAS,eAAoB;;qBAe3E,cAAe,GAAG;;;;;;;;YC3GnB,SAAS,KAAKC,WAAe;;YAG7B,OAAO;WAAgB;WAAmB,OAAO;;WAAiB;WAAoB,OAAO;;;qBAK5F,OAAQ,GAAG,OAAO,MAAI,SAAS;;qBAG/B,OAAQ,gBAAc,SAAS;;qBAG/B,KAAM,GAAG,OAAO,MAAI,OAAO;;qBAG3B,OAAQ,WAAW,OAAO,aAAW,OAAO;;qBAG5C,SAAU,GAAG,GAA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B,GAAG,GAAG,MAAM,GAAG,KAAK;aAAgB,SAAS;aAAc,MAAM;aAAY,QAAQ,MAAM;aAAa,KAAK;;;WAE3H,SAAS;;;;;;wBA6WJ,UAAU,qBAAqB,gBAC1C,SAAS,MACX,SAAS;EAAS,kBAAkB,UAAU,UAAU,OAAO,SAAS,WAAW,KAAK,SAAS,KAAK;;;YAe7F,cAAc,MAAM,YAAY"}
1
+ {"version":3,"file":"index.d.ts","names":["Optional","FamilyOptional"],"sources":["../../../node_modules/.pnpm/@mark1russell7+optional@https+++codeload.github.com+mark1russell7+optional+tar.gz+1c649_51d63135d3a4bb347c942166e3e4ba82/node_modules/@mark1russell7/optional/dist/index.d.ts","../src/errors.ts","../src/result.ts","../src/ir.ts","../src/space.ts","../src/domain.ts","../src/list.ts","../src/trace.ts","../src/evaluate.ts","../src/deps.ts","../src/json.ts","../src/traversal.ts","../src/sheet.ts","../src/builder.ts"],"ignoreList":[0],"mappings":";;;;;;KAKY;WACC;;;KAGD,KAAK;WACJ;WACA,OAAO;;;KAGRA,WAAS,KAAK,OAAO,KAAK;;;;;;;YCV1B;;YAGA;;;;;wBAuDI,gBAAgB;;qBAMnB,eAAgB,GAAG;;iBAGf;;WAEN,MAAM;;WAEN,MAAM;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA,kBAAkB;;WAElB;;;iBAIM;WACN;WACA;WACA;WACA;WACA,kBAAkB;WAClB;;;qBAIE,SAAU,MAAM,cAAY;;wBAGzB,SAAS,MAAM,WAAW,iBAAiB,UAAS,eAAoB;;qBAe3E,cAAe,GAAG;;;;;;;;YCjHnB,SAAS,KAAKC,WAAe;;YAG7B,OAAO;WAAgB;WAAmB,OAAO;;WAAiB;WAAoB,OAAO;;;qBAK5F,OAAQ,GAAG,OAAO,MAAI,SAAS;;qBAG/B,OAAQ,gBAAc,SAAS;;qBAG/B,KAAM,GAAG,OAAO,MAAI,OAAO;;qBAG3B,OAAQ,WAAW,OAAO,aAAW,OAAO;;qBAG5C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