@mark1russell7/layout-contract 0.3.12 → 0.5.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
@@ -30,10 +30,10 @@ The package has one runtime dependency: `@mark1russell7/rigor-generators`, the h
30
30
  | The strategy space | `StrategySpace`, `SpaceStage`, `StageOption`, `OptionSupports`, `ShapeFilter`, `SpaceParam`, `ParamWhen`, `MemberRule`, `SpaceConstraint`, `OptionRef`, `StrategyConfig`, `StageChoice`, `ParamKind`, `ParamValue`, `STRATEGY_SPACE_SCHEMA` |
31
31
  | The space functions | `checkSpace`, `checkConfig`, `canonicalConfig`, `configId`, `spaceSize`, `spaceShapeKinds`, `paramLevels`, `enumerateSpace`, `productSpace`, `joinConfigs`, `splitConfig`, `SpaceSize`, `SpaceSizeOptions`, `EnumerateOptions`, `GridOptions`, `SampleOptions` |
32
32
  | The option declarations | `OptionSchema`, `OptionDeclaration`, `AnyOption`, `NumberOption`, `BooleanOption`, `EnumOption`, `ValueOption`, `ListItem`, `NoDefault`, `DeclaredStrategy`, `listOptions`, `optionDefaults`, `checkOptions`, `clampOptions`, `sweepValues`, `sweepOf`, `sweepGrid`, `checkSchema` |
33
- | The strategy catalog | `StrategyCatalog`, `StrategyCatalogSource`, `CatalogEntry`, `ParamRoute`, `StrategyMember`, `CatalogLimit`, `STRATEGY_CATALOG_SCHEMA`, `NODE_POSITIONS_DIMENSION`, `parseStrategyCatalog`, `writeStrategyCatalog`, `checkCatalog`, `catalogDefaults`, `catalogOptions`, `catalogChoices`, `catalogKey`, `decodeOptionValue`, `encodeOptionValue` |
33
+ | The strategy catalog | `StrategyCatalog`, `StrategyCatalogSource`, `CatalogEntry`, `ParamRoute`, `StrategyMember`, `CatalogLimit`, `OutputRow`, `OutputEvidence`, `OutputGridClass`, `OutputGridCounts`, `StrategyCatalogSchema`, `STRATEGY_CATALOG_SCHEMA`, `STRATEGY_CATALOG_SCHEMAS`, `OUTPUT_GRID_PROPERTIES`, `OUTPUT_NEAR_WHOLE`, `OUTPUT_CLASS_MIN_INPUTS`, `NODE_POSITIONS_DIMENSION`, `outputGridClass`, `parseStrategyCatalog`, `writeStrategyCatalog`, `checkCatalog`, `catalogDefaults`, `catalogOptions`, `catalogChoices`, `catalogKey`, `decodeOptionValue`, `encodeOptionValue` |
34
34
  | The turn | `turnBox`, `turnPort`, `turnMargin`, `turnRegion`, `turnSide`, `turnPoint` |
35
35
  | The tolerances | `EPS`, `RECORD_EPS`, `RECORD_SCALE`, `Tolerance`, `DEFAULT_TOLERANCE` |
36
- | The hard rules | `countOverlaps`, `countObstacleHits`, `regionHitsRect`, `rectInRegion`, `countOutside`, `ContainerTest`, `countPortsOffBorder`, `packHard`, `PackHard`, `PACK_HARD_RULES`, `placedRect`, `checkInput` |
36
+ | The hard rules | `HARD_RULE_VERSION`, `shapesOverlap`, `circleOverlaps`, `circlesOutside`, `placedCircle`, `PlacedCircle`, `countOverlaps`, `countObstacleHits`, `regionHitsRect`, `rectInRegion`, `countOutside`, `ContainerTest`, `countPortsOffBorder`, `packHard`, `PackHard`, `PACK_HARD_RULES`, `placedRect`, `checkInput` |
37
37
 
38
38
  ## The rules
39
39
 
@@ -54,9 +54,10 @@ The package has one runtime dependency: `@mark1russell7/rigor-generators`, the h
54
54
  - `portPoint(box, port)` gives the point of a port, relative to the top-left corner of the box. A port without a fixed point gives `undefined`, because the router picks the point.
55
55
  - A turn changes `along` of `left` and `right` to `1 - along`, because the start of the side moves to its other end. `along` of `top` and `bottom` stays.
56
56
  - An input without `along` keeps its hash.
57
- - **The hard rules of a pack.** `no-overlap` counts the pairs of boxes and the pairs of a box and an obstacle. A pair of `pairGaps` uses its gap in place of the margins. A locked box without a placement, or with a move of more than `RECORD_EPS`, breaks `locked-kept`. `checkInput` refuses a locked box without a position. Another box without a placement and not in `overflow` breaks `complete`.
58
- - **The container rule.** `in-container` counts each box that goes out of the container made smaller by `inset`. The box counts with its margin. By default, a shaped container counts as its bounding box.
59
- - **The exact container.** Give `{ exactContainer: true }` to `packHard` or `countOutside`. Then a box of a shaped container with the size `fixed` must stay inside the shape. A cut corner, a notch and a hole count. A container with a free side keeps the bounding test. The default changes to the exact test at the next breaking version.
57
+ - **The hard rules of a pack.** `no-overlap` counts the pairs of boxes and the pairs of a box and an obstacle. Two circles count by the distance of their centers, and each other pair counts by its bounding boxes. A pair of `pairGaps` uses its gap in place of the margins. A locked box without a placement, or with a move of more than `RECORD_EPS`, breaks `locked-kept`. `checkInput` refuses a locked box without a position. Another box without a placement and not in `overflow` breaks `complete`.
58
+ - **The container rule.** `in-container` counts each box that goes out of the container made smaller by `inset`. The box counts with its margin. A circle in a circle container counts by distance, also when the size is free.
59
+ - **The exact container.** Since 0.4.0, a box of a shaped container with the size `fixed` must stay inside the shape. A cut corner, a notch and a hole count. A container with a free side keeps the bounding test. Give `{ exactContainer: false }` to `packHard` or `countOutside` for the bounding test on each shape.
60
+ - **The version of the rules.** `HARD_RULE_VERSION` is 2. A record states the version in `hardRule`, and `hardRuleOf` gives 1 for a record without the field. On version 1, a count on a circle is an upper bound.
60
61
  - **The shape kinds.** An item is a `rect`, a `polygon`, a `circle` or a `free` shape. Each measure and rule declares its kinds. `checkShapes` refuses the other kinds. `docs/SHAPES.md` tells the rules.
61
62
  - `regionArea(region)` gives the exact area of a region. `boxArea(box)` gives the exact area of a box, or `undefined` for a `free` box. A box with an ellipse shape is `free`.
62
63
  - `ShapeSupport.safe` lists the kinds with a safe count: an upper bound that does not miss a break. `ruleLevel(rule, kind)` gives `exact`, `safe` or `none`.
package/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as FAMILY_ANY_KIND, A as shapesOf, At as toSizedRect, B as PackInputOptions, C as itemShapeOf, Ct as grow, D as shapeKindsOf, Dt as regionArea, E as shapeKindProblem, Et as pointSegmentDistance, F as LayoutEdge, G as packLinks, H as PairGap, I as LayoutGenerator, J as ClaimBreak, K as portPoint, L as LayoutInput, M as LayoutBox, N as LayoutCell, O as shapeLevel, Ot as segmentsCross, P as LayoutContainer, Q as Declares, R as Obstacle, S as isShapeKind, St as boundsOf, T as shapeKindOf, Tt as overlapOf, U as Port, V as PackLink, W as canonicalInput, X as CorpusSplit, Y as CorpusEntry, Z as DeclaredClaim, _ as ShapeKindSpec, _t as Region, a as MeasureSpec, at as checkDeclared, b as boxArea, bt as Sides, c as minEffectOf, ct as declaredClaimOf, d as SHAPE_KINDS, dt as leaveOneSeedOut, et as FamilyBy, f as SHAPE_KIND_IDS, ft as splitFileName, g as ShapeKind, gt as Rect, h as ShapeGeometry, ht as Point, i as JointMeasureId, it as SplitFold, j as Item, jt as translate, k as shapeSupportProblems, kt as toRect, l as DEFAULT_SHAPES, lt as declaredCounts, m as ShapeCheck, mt as Margin, n as JOINT_MEASURES, nt as SPLIT_SCHEMA, o as Verdict, ot as checkSplit, p as ShapeBound, pt as splitFolds, q as toPackInput, r as JOINT_MOVED_MIN, rt as SplitCorpus, s as compareMeasure, st as corpusHashOf, t as Direction, tt as FamilyCell, u as RuleLevel, ut as familyOf, v as ShapeLevel, vt as SIDES, w as ruleLevel, wt as marginSides, x as checkShapes, xt as SizedRect, y as ShapeSupport, yt as Side, z as PackInput } from "./measures-C-Tuv8GU.js";
1
+ import { $ as CorpusSplit, A as shapeKindsOf, At as regionArea, B as LayoutInput, C as checkShapes, Ct as Sides, D as ruleLevel, Dt as marginSides, E as itemShapeOf, Et as grow, F as LayoutBox, G as PairGap, H as PackInput, I as LayoutCell, J as packLinks, K as Port, L as LayoutContainer, M as shapeSupportProblems, Mt as toRect, N as shapesOf, Nt as toSizedRect, O as shapeKindOf, Ot as overlapOf, P as Item, Pt as translate, Q as CorpusEntry, R as LayoutEdge, S as boxArea, St as Side, T as isShapeKind, Tt as boundsOf, U as PackInputOptions, V as Obstacle, W as PackLink, X as toPackInput, Y as portPoint, Z as ClaimBreak, _ as ShapeKind, _t as Margin, a as MeasureSpec, at as SPLIT_SCHEMA, b as ShapeLimit, bt as Region, c as minEffectOf, ct as checkDeclared, d as SHAPE_KINDS, dt as declaredClaimOf, et as DeclaredClaim, f as SHAPE_KIND_IDS, ft as declaredCounts, g as ShapeInput, gt as splitFolds, h as ShapeGeometry, ht as splitFileName, i as JointMeasureId, it as FamilyCell, j as shapeLevel, jt as segmentsCross, k as shapeKindProblem, kt as pointSegmentDistance, l as DEFAULT_SHAPES, lt as checkSplit, m as ShapeCheck, mt as leaveOneSeedOut, n as JOINT_MEASURES, nt as FAMILY_ANY_KIND, o as Verdict, ot as SplitCorpus, p as ShapeBound, pt as familyOf, q as canonicalInput, r as JOINT_MOVED_MIN, rt as FamilyBy, s as compareMeasure, st as SplitFold, t as Direction, tt as Declares, u as RuleLevel, ut as corpusHashOf, v as ShapeKindSpec, vt as Point, w as inputShapeLevel, wt as SizedRect, x as ShapeSupport, xt as SIDES, y as ShapeLevel, yt as Rect, z as LayoutGenerator } from "./measures-KWg_was6.js";
2
2
  /** The epsilon for the float compares in an engine. */
3
3
  export declare const EPS = 1e-6;
4
4
  /**
@@ -90,6 +90,8 @@ export interface LayoutRecord {
90
90
  readonly hard: Readonly<Record<string, number>>;
91
91
  /** The tolerance of each hard rule of the run. */
92
92
  readonly tolerance?: Readonly<Partial<Tolerance>>;
93
+ /** The version of the rules that made the counts of `hard`: `HARD_RULE_VERSION` at the run. `hardRuleOf` reads it. */
94
+ readonly hardRule?: number;
93
95
  /**
94
96
  * The value is `true` when two runs with the same seed give the same positions.
95
97
  * A skipped record has `null`, because no run made a claim. Each other record has a boolean.
@@ -151,6 +153,11 @@ export type RunFacts = Omit<LayoutRecord, "schema" | "input" | "inputHash" | "se
151
153
  * The input also gives `shapes`. An input with only `rect` boxes gets no `shapes`, so its record does not change.
152
154
  */
153
155
  export declare function toLayoutRecord(input: LayoutInput, run: RunFacts): LayoutRecord;
156
+ /**
157
+ * This function gives the version of the rules that made the counts of `hard` of a record. A record without `hardRule` has version 1.
158
+ * On version 1, a count on a circle is by its bounding box. So it is an upper bound, and a count over 0 proves nothing.
159
+ */
160
+ export declare function hardRuleOf(record: Pick<LayoutRecord, "hardRule">): number;
154
161
  /**
155
162
  * This function gives the problems of one `layout-record/1` value. An empty list means a good record.
156
163
  * A record that has `skipped` has `deterministic: null`. An old skipped record with a boolean is also correct.
@@ -166,27 +173,70 @@ export declare function parseLayoutRecord(value: unknown): LayoutRecord;
166
173
  /** This function gives the area of a placed box: its shape or its rectangle, at its position. A box without a position gives `undefined`. */
167
174
  export declare function placedRect(box: LayoutBox): Rect | undefined;
168
175
  /**
169
- * This function counts the pairs of placed boxes whose insides, with their margins, overlap by more than `tolerance` on each axis.
170
- * A box with a shape counts as its bounding box. That area is larger, thus the count is safe.
176
+ * The version of the rules that count `no-overlap` and `in-container`. A record states it in `LayoutRecord.hardRule`.
177
+ *
178
+ * - Version 1 counts each shape by its bounding box. On a circle, that count is an upper bound. A count over 0 proves nothing.
179
+ * - Version 2 counts two circles, and a circle in a circle container, by the distance of the centers. The other pairs stay on the bounding box.
180
+ */
181
+ export declare const HARD_RULE_VERSION = 2;
182
+ /** A circle at its place on the board: its center and its radius, without a margin. */
183
+ export interface PlacedCircle {
184
+ readonly cx: number;
185
+ readonly cy: number;
186
+ readonly r: number;
187
+ }
188
+ /** This function gives the circle of a placed box. A box without a position, or with another shape, gives `undefined`. */
189
+ export declare function placedCircle(box: LayoutBox): PlacedCircle | undefined;
190
+ /**
191
+ * This function tells if two placed boxes break `no-overlap`. It is the rule for one pair of `countOverlaps`.
192
+ *
193
+ * - Two circles break the rule when their centers are nearer than the two radii and the two margins, less `tolerance`. The margin of a circle is the largest side of its margin.
194
+ * - Another pair breaks the rule when the bounding boxes with their margins overlap by more than `tolerance` on each axis. With a shape that is not a rectangle, this test is an upper bound.
195
+ * - With `gap`, the gap replaces the two margins. Two circles are then apart by the two radii and the gap. For another pair, one box grows by the gap.
196
+ * - A box without a position does not overlap.
197
+ */
198
+ export declare function shapesOverlap(a: LayoutBox, b: LayoutBox, tolerance?: number, gap?: number): boolean;
199
+ /**
200
+ * This function counts the pairs of placed boxes that break `no-overlap`. `shapesOverlap` is the rule for one pair.
201
+ * Two circles count by the distance of their centers. Each other pair counts by the bounding boxes, so a circle beside another shape is an upper bound (roadmap item L107).
171
202
  *
172
203
  * A pair of `pairGaps`, in either order, uses its `gap` in place of the two margins. One box grows by the gap, and the other box does not grow.
173
204
  * Thus the pair breaks the rule only when the boxes are nearer than the gap on each axis. The other pairs do not change.
174
205
  */
175
206
  export declare function countOverlaps(boxes: readonly LayoutBox[], tolerance?: number, pairGaps?: readonly PairGap[]): number;
207
+ /**
208
+ * This function counts the pairs of placed circles that break `no-overlap`, by the distance of their centers. Each other box does not count.
209
+ *
210
+ * - Two circles break the rule when their centers are nearer than the two radii, the two margins and `gap`, less `tolerance`.
211
+ * - The margin of a circle is the largest side of its margin.
212
+ * - A pair of `pairGaps` is apart by the two radii and its gap, in place of the margins and `gap`.
213
+ * - `gap` has the default 0. The rule `no-overlap` does not read `LayoutInput.gap`, so `countOverlaps` gives no value. An engine that keeps the gap between circles gives it here.
214
+ */
215
+ export declare function circleOverlaps(boxes: readonly LayoutBox[], tolerance?: number, pairGaps?: readonly PairGap[], gap?: number): number;
176
216
  /** The options of the container test of `countOutside` and `packHard`. */
177
217
  export interface ContainerTest {
178
218
  /**
179
219
  * With `true`, a box of a shaped container with the size `fixed` must stay inside the shape, not only inside its bounding box.
180
- * The default is `false`. The default changes to `true` at the next breaking version.
220
+ * A circle in a circle container is tested by distance. The default is `true` since 0.4.0. With `false`, only the bounding box counts.
181
221
  */
182
222
  readonly exactContainer?: boolean;
183
223
  }
224
+ /**
225
+ * This function counts the placed circles that go out of a circle container, by the distance of the centers.
226
+ *
227
+ * - The reach of a circle is the sum of the center distance, the radius, the largest side of the margin and the inset.
228
+ * - A circle breaks the rule when its reach is more than the container radius plus `tolerance`.
229
+ * - A container with a free size reads its radius from `w`, and its center is the corner of the shape plus that radius. `applyPack` writes that `w`.
230
+ * - Each other box does not count. The function throws a `RangeError` for a container that is not a circle.
231
+ */
232
+ export declare function circlesOutside(input: LayoutInput, tolerance?: number): number;
184
233
  /**
185
234
  * This function counts the placed boxes that go out of the container.
186
235
  * Each box with its margin must stay inside the container made smaller by `inset`. Only the fixed sides of the size count. A shaped container counts as its bounding box.
187
236
  *
188
- * With `exactContainer`, a box of a shaped container with the size `fixed` also counts when `rectInRegion` tells that it is not inside the shape.
237
+ * With `exactContainer`, the default, a box of a shaped container with the size `fixed` also counts when it is not inside the shape, by `rectInRegion`.
189
238
  * For that test, the box grows by `inset` and becomes smaller by `tolerance` on each side. A shaped container with a free side keeps the bounding test only.
239
+ * A circle in a circle container does not use `rectInRegion`. It counts by distance, as in `circlesOutside`, also when the size is free.
190
240
  * An input without a container gives 0.
191
241
  */
192
242
  export declare function countOutside(input: LayoutInput, tolerance?: number, options?: ContainerTest): number;
@@ -201,8 +251,8 @@ export interface PackHard {
201
251
  }
202
252
  /**
203
253
  * The hard rules of a pack, with the shape kinds that each rule supports.
204
- * `no-overlap` and `in-container` test the bounding box of a shape. That count is exact only for a `rect`.
205
- * For the other kinds, the count is safe: a shape is inside its bounding box, so the count is an upper bound. A count of 0 tells that the rule has no break.
254
+ * `no-overlap` and `in-container` are exact for a `rect` and a `circle`. `limit` tells the inputs where the count of a circle is only safe (roadmap item L107).
255
+ * For the other kinds, these rules test the bounding box. The count is safe: a shape is inside its bounding box, so the count is an upper bound. A count of 0 tells that the rule has no break.
206
256
  * `locked-kept` and `complete` read only the positions and the ids, so they support each kind.
207
257
  */
208
258
  export declare const PACK_HARD_RULES: readonly ShapeSupport<keyof PackHard>[];
@@ -221,7 +271,7 @@ export declare function countObstacleHits(boxes: readonly LayoutBox[], obstacles
221
271
  /**
222
272
  * This function gives the count of each hard rule of the output of a packer.
223
273
  * It applies the output with `applyPack`. Only the placed boxes and the locked boxes count for the overlaps and the container.
224
- * `no-overlap` counts the pairs of boxes and the pairs of a box and an obstacle. A pair of `pairGaps` uses its gap in place of the margins.
274
+ * `no-overlap` counts the pairs of boxes and the pairs of a box and an obstacle. A pair of `pairGaps` uses its gap in place of the margins. `HARD_RULE_VERSION` tells the version of these counts.
225
275
  *
226
276
  * A locked box without a placement, or with a move of more than `RECORD_EPS`, breaks `locked-kept`.
227
277
  * A locked box without a position in the input is a bad input, not a break. `checkInput` finds it.
@@ -996,8 +1046,12 @@ export declare function declarationIssues(key: string, d: AnyOption): string[];
996
1046
  * A good schema gives an empty list.
997
1047
  */
998
1048
  export declare function checkSchema(strategy: DeclaredStrategy): string[];
999
- /** The schema of a strategy catalog. A new field is a new version of the schema. */
1000
- export declare const STRATEGY_CATALOG_SCHEMA = "strategy-catalog/1";
1049
+ /** The newest schema of a strategy catalog. A new field is a new version of the schema. */
1050
+ export declare const STRATEGY_CATALOG_SCHEMA = "strategy-catalog/2";
1051
+ /** The schemas that `parseStrategyCatalog` reads, oldest first. Schema 2 adds the field `output` of an entry. */
1052
+ export declare const STRATEGY_CATALOG_SCHEMAS: readonly ["strategy-catalog/1", "strategy-catalog/2"];
1053
+ /** The name of one schema of a strategy catalog. */
1054
+ export type StrategyCatalogSchema = (typeof STRATEGY_CATALOG_SCHEMAS)[number];
1001
1055
  /**
1002
1056
  * The dimension of `supports` that tells who owns the positions of the nodes. The value `host` means that the strategy keeps the positions that the host gives.
1003
1057
  * The value `engine` means that the strategy can set them. A strategy that moves nodes has only `engine`. A `SupportProbe` tests the claim with a run.
@@ -1014,6 +1068,48 @@ export interface CatalogLimit {
1014
1068
  }
1015
1069
  /** The kind of a strategy: it places on its own, it wraps other strategies, or it is for one shape of item. */
1016
1070
  export type StrategyKind = "single" | "composite" | "shape";
1071
+ /** The output properties that tell if the numbers of a result are whole: the positions and the sizes. The parser examines the class of these properties. */
1072
+ export declare const OUTPUT_GRID_PROPERTIES: readonly string[];
1073
+ /** The class of a grid property of an output. */
1074
+ export type OutputGridClass = "whole" | "near-whole" | "fractional" | "untested";
1075
+ /** The largest distance from a whole number for a near-whole value. A value at a larger distance is fractional. */
1076
+ export declare const OUTPUT_NEAR_WHOLE = 1e-9;
1077
+ /** The fewest packed inputs for the class `whole` or `near-whole`. A fraction needs no such count, because one counterexample is a proof. */
1078
+ export declare const OUTPUT_CLASS_MIN_INPUTS = 30;
1079
+ /** What one read of an output covers. The row states no promise beyond this evidence. */
1080
+ export interface OutputEvidence {
1081
+ /** The count of inputs that the strategy packed in this read. */
1082
+ readonly inputs: number;
1083
+ /** The count of inputs with a fractional value of the property. A grid property must have this field. */
1084
+ readonly fractionalInputs?: number;
1085
+ /** The count of inputs with a near-whole value and no fractional value of the property. A grid property must have this field. */
1086
+ readonly nearWholeInputs?: number;
1087
+ /** The input family or the study of the read. */
1088
+ readonly source: string;
1089
+ /** The name of the options of the read, for example `default`. */
1090
+ readonly optionSet: string;
1091
+ /** The version of the catalog that the read used. */
1092
+ readonly catalogVersion: string;
1093
+ }
1094
+ /** One property of the output of a strategy, as a read found it. An entry has one row for each pair of `property` and `optionSet`. */
1095
+ export interface OutputRow {
1096
+ /** The property, for example `position-grid`. */
1097
+ readonly property: string;
1098
+ /** The class of the property. For a grid property, `outputGridClass` gives the only class that the evidence permits. */
1099
+ readonly class: string;
1100
+ readonly evidence: OutputEvidence;
1101
+ }
1102
+ /** The counts that decide the class of a grid property. */
1103
+ export interface OutputGridCounts {
1104
+ readonly inputs: number;
1105
+ readonly fractionalInputs: number;
1106
+ readonly nearWholeInputs: number;
1107
+ }
1108
+ /**
1109
+ * This function gives the class of a grid property from its counts. One fractional input gives `fractional` at any count.
1110
+ * With no fraction, fewer than `OUTPUT_CLASS_MIN_INPUTS` inputs give `untested`. Each other read gives `near-whole` or `whole`.
1111
+ */
1112
+ export declare function outputGridClass(counts: OutputGridCounts): OutputGridClass;
1017
1113
  /** One strategy of a catalog. */
1018
1114
  export interface CatalogEntry {
1019
1115
  /** The key is unique in the catalog: `<step>/<id>` with a step, else `id`. */
@@ -1039,6 +1135,8 @@ export interface CatalogEntry {
1039
1135
  readonly optIn: boolean;
1040
1136
  /** The value `true` tells that the strategy is a baseline of a bench. It has `optIn` true, and a chooser does not offer it. */
1041
1137
  readonly baseline?: true;
1138
+ /** The reads of the output of the strategy. A file with this field has the schema 2. */
1139
+ readonly output?: readonly OutputRow[];
1042
1140
  /** The declarations of the options, in the order of a form. */
1043
1141
  readonly options: Readonly<Record<string, AnyOption>>;
1044
1142
  }
@@ -1050,7 +1148,7 @@ export interface StrategyCatalogSource {
1050
1148
  }
1051
1149
  /** A catalog document: the form that `writeStrategyCatalog` writes and `parseStrategyCatalog` reads. */
1052
1150
  export interface StrategyCatalog extends StrategyCatalogSource {
1053
- readonly schema: typeof STRATEGY_CATALOG_SCHEMA;
1151
+ readonly schema: StrategyCatalogSchema;
1054
1152
  /** The npm version of the engine. */
1055
1153
  readonly version: string;
1056
1154
  }
@@ -1143,7 +1241,7 @@ export declare function catalogKey(id: string, step?: string): string;
1143
1241
  */
1144
1242
  export declare function catalogChoices(strategies: readonly CatalogEntry[], declaration?: AnyOption | ListItem): readonly CatalogEntry[];
1145
1243
  /**
1146
- * This function reads a catalog from parsed JSON. It refuses each unknown field and each other schema.
1244
+ * This function reads a catalog from parsed JSON, in each schema of `STRATEGY_CATALOG_SCHEMAS`. It refuses each unknown field and each other schema.
1147
1245
  * It gives the catalog with its `Infinity` values restored, or the list of all faults.
1148
1246
  */
1149
1247
  export declare function parseStrategyCatalog(value: unknown): StrategyCatalogParse;
@@ -1156,6 +1254,7 @@ export declare function decodeOptionValue(value: unknown, declaration: AnyOption
1156
1254
  export declare function encodeOptionValue(value: unknown, declaration: AnyOption | ListItem): unknown;
1157
1255
  /**
1158
1256
  * This function gives the text of the catalog file, sorted by key. The same source and version give the same bytes.
1257
+ * The file has the oldest schema that holds it, so a catalog with no `output` stays valid for a reader of the schema 1.
1159
1258
  * The caller gives the version from `package.json`. The function throws an error if the file breaks a rule of the format.
1160
1259
  */
1161
1260
  export declare function writeStrategyCatalog(source: StrategyCatalogSource, version: string): string;
@@ -1550,5 +1649,5 @@ export declare const EDGE_KEY_STEP: CorpusStep;
1550
1649
  * The steps `container`, `obstacles` and `boxes` each have a stream of `stepRandom`. Each value is a whole number, so the family is `exact`.
1551
1650
  */
1552
1651
  export declare const RECT_SCATTERED: CorpusFamily<LayoutInput>;
1553
- export { ClaimBreak, CorpusEntry, CorpusSplit, DEFAULT_SHAPES, DeclaredClaim, Declares, Direction, FAMILY_ANY_KIND, FamilyBy, FamilyCell, Item, JOINT_MEASURES, JOINT_MOVED_MIN, JointMeasureId, LayoutBox, LayoutCell, LayoutContainer, LayoutEdge, LayoutGenerator, LayoutInput, Margin, MeasureSpec, Obstacle, PackInput, PackInputOptions, PackLink, PairGap, Point, Port, Rect, Region, RuleLevel, SHAPE_KINDS, SHAPE_KIND_IDS, SIDES, SPLIT_SCHEMA, ShapeBound, ShapeCheck, ShapeGeometry, ShapeKind, ShapeKindSpec, ShapeLevel, ShapeSupport, Side, Sides, SizedRect, SplitCorpus, SplitFold, Verdict, boundsOf, boxArea, canonicalInput, checkDeclared, checkShapes, checkSplit, compareMeasure, corpusHashOf, declaredClaimOf, declaredCounts, familyOf, grow, isShapeKind, itemShapeOf, leaveOneSeedOut, marginSides, minEffectOf, overlapOf, packLinks, pointSegmentDistance, portPoint, regionArea, ruleLevel, segmentsCross, shapeKindOf, shapeKindProblem, shapeKindsOf, shapeLevel, shapeSupportProblems, shapesOf, splitFileName, splitFolds, toPackInput, toRect, toSizedRect, translate };
1652
+ export { ClaimBreak, CorpusEntry, CorpusSplit, DEFAULT_SHAPES, DeclaredClaim, Declares, Direction, FAMILY_ANY_KIND, FamilyBy, FamilyCell, Item, JOINT_MEASURES, JOINT_MOVED_MIN, JointMeasureId, LayoutBox, LayoutCell, LayoutContainer, LayoutEdge, LayoutGenerator, LayoutInput, Margin, MeasureSpec, Obstacle, PackInput, PackInputOptions, PackLink, PairGap, Point, Port, Rect, Region, RuleLevel, SHAPE_KINDS, SHAPE_KIND_IDS, SIDES, SPLIT_SCHEMA, ShapeBound, ShapeCheck, ShapeGeometry, ShapeInput, ShapeKind, ShapeKindSpec, ShapeLevel, ShapeLimit, ShapeSupport, Side, Sides, SizedRect, SplitCorpus, SplitFold, Verdict, boundsOf, boxArea, canonicalInput, checkDeclared, checkShapes, checkSplit, compareMeasure, corpusHashOf, declaredClaimOf, declaredCounts, familyOf, grow, inputShapeLevel, isShapeKind, itemShapeOf, leaveOneSeedOut, marginSides, minEffectOf, overlapOf, packLinks, pointSegmentDistance, portPoint, regionArea, ruleLevel, segmentsCross, shapeKindOf, shapeKindProblem, shapeKindsOf, shapeLevel, shapeSupportProblems, shapesOf, splitFileName, splitFolds, toPackInput, toRect, toSizedRect, translate };
1554
1653
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/tolerance.ts","../src/output.ts","../src/record.ts","../src/rules.ts","../src/turn.ts","../src/balance.ts","../src/strategy.ts","../src/random.ts","../src/edges.ts","../src/hash.ts","../src/portfolio.ts","../src/strategy-space.ts","../src/strategy-options.ts","../src/strategy-catalog.ts","../src/verdict.ts","../src/families.ts"],"mappings":";;qBACa;;;;;qBAMA;;;;;qBAMA;;;;;iBAMI;;WAEN;;WAEA;;;;;;qBAOE,mBAAmB;;iBCzBf;WACN;WACA;WACA;WACA;;;iBAIM;WACN;WACA;WACA,WAAW,SAAS;;;iBAId;WACN,qBAAqB;;WAErB;;WAEA;aAAiB;aAAoB;;;WAErC;aAA2B;aAAqB;aAAoB;;WACpE,iBAAiB;;;;;;;wBAQZ,UAAU,OAAO,aAAa,QAAQ,aAAa;;YC/BvD;;iBAGK;WACN;WACA,OAAO;WACP;WACA;;WAEA,SAAS,SAAS;WAClB;;WAEA;;WAEA;WACA;WACA;WACA;WACA;;WAEA,kBAAkB;;WAElB,UAAU,SAAS;;WAEnB,MAAM,SAAS;;WAEf,YAAY,SAAS,QAAQ;;;;;WAK7B;;WAEA;;WAEA;;WAEA;;;;;WAKA;;WAEA;;WAEA;;WAEA;;;;;WAKA;;WAEA,M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AU,eAAe,UAAU;;EAEvD,UAAU,cAAc,UAAU;;EAElC,cAAc,cAAc,mBAAmB;;EAE/C,MAAM,cAAc,oBAAoB,cAAc,OAAO,SAAS,eAAe;;EAErF,YAAY;;;qBAID,mBAAmB;;;;;qBAwCnB,mBAAmB,SAAS,eAAe;;;;;wBA4BxC,gBAAgB,cAAc,QAAO,QAAQ,mBAAwB;;YAUzE,qBAAqB,KAAK;;;;;;wBAOtB,eAAe,cAAc,MAAM,qBAAqB;;;;;wBA+BxD,kBAAkB,KAAK,iBAAiB;;;;;wBA+FxC,YAAY,KAAK,YAAY;;wBAa7B,cAAc,KAAK,YAAY;;;;;;wBAsB/B,SAAS,KAAK,iBAAiB,iBAAiB;;;;;;;;wBAsChD,kBACd,qBAAqB,mBACrB,OAAM,SAAS,eAAe,cAC9B,gBACA,cACC;;wBA8Ha,qBAAqB,IAAI,aAAa,WAAU,SAAS,aAAa,MAAW,eAAe;;iBA2G/F;WACN;WACA;;WAEA;WACA;;WAEA,qBAAqB;;WAErB;WACA,aAAa;;WAEb,cAAc,MAAM;;EAE7B,MAAM,OAAO,aAAa,cAAc,MAAM,kBAAkB;;;iBAIjD;;WAEN;;WAEA;WACA;;WAEA,QAAQ,OAAO;;;;;;;wBAWV,cAAc,MAAM,aAAa,cAAc,gBAAgB,cAAc,UAAS,iBAAsB,aAAa;;;;;qBA+D5H,YAAY;;;;qBA0BZ,eAAe;;;;;;qBAoBf,gBAAgB,aAAa"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/tolerance.ts","../src/output.ts","../src/record.ts","../src/rules.ts","../src/turn.ts","../src/balance.ts","../src/strategy.ts","../src/random.ts","../src/edges.ts","../src/hash.ts","../src/portfolio.ts","../src/strategy-space.ts","../src/strategy-options.ts","../src/strategy-catalog.ts","../src/verdict.ts","../src/families.ts"],"mappings":";;qBACa;;;;;qBAMA;;;;;qBAMA;;;;;iBAMI;;WAEN;;WAEA;;;;;;qBAOE,mBAAmB;;iBCzBf;WAC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