@mark1russell7/layout-contract 0.9.1 → 0.9.3

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/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as CorpusSplit, A as shapeKindsOf, At as overlapOf, B as LayoutInput, C as checkShapes, Ct as Sides, D as ruleLevel, Dt as dropIndex, E as itemShapeOf, Et as crossingPoint, F as LayoutBox, Ft as toSizedRect, G as PairGap, H as PackInput, I as LayoutCell, It as translate, J as packLinks, K as Port, L as LayoutContainer, M as shapeSupportProblems, Mt as regionArea, N as shapesOf, Nt as segmentsCross, O as shapeKindOf, Ot as grow, P as Item, Pt as toRect, 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 pointSegmentDistance, k as shapeKindProblem, kt as marginSides, 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-DGKAulWv.js";
1
+ import { $ as CorpusSplit, A as shapeKindsOf, At as overlapOf, B as LayoutInput, C as checkShapes, Ct as Sides, D as ruleLevel, Dt as dropIndex, E as itemShapeOf, Et as crossingPoint, F as LayoutBox, Ft as toRect, G as PairGap, H as PackInput, I as LayoutCell, It as toSizedRect, J as packLinks, K as Port, L as LayoutContainer, Lt as translate, M as shapeSupportProblems, Mt as regionArea, N as shapesOf, Nt as segmentsCross, O as shapeKindOf, Ot as grow, P as Item, Pt as snapRect, 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 pointSegmentDistance, k as shapeKindProblem, kt as marginSides, 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-O-NfAbmJ.js";
2
2
  import { AnyOption, BooleanOption, DeclaredStrategy, EnumOption, EnumerateOptions, EnumerateOptions as EnumerateOptions$1, GridOptions, KindOptions, KindOptions as KindOptions$1, ListItem, MemberRule, NoDefault, NoDefaultReason, NumberOption, OptionDeclaration, OptionIssue, OptionRef, OptionScale, OptionSchema, OptionSetting, OptionSupports, ParamKind, ParamValue, ParamWhen, STRATEGY_SPACE_SCHEMA, SampleOptions, ShapeFilter, SpaceConstraint, SpaceParam, SpaceSize, SpaceSize as SpaceSize$1, SpaceSizeOptions, SpaceSizeOptions as SpaceSizeOptions$1, SpaceStage, StageChoice, StageOption, StrategyConfig, StrategyConfig as StrategyConfig$1, StrategySpace, StrategySpace as StrategySpace$1, SweepOptions, ValueOption, canonicalConfig, checkConfig, checkOptions, checkSchema, clampOptions, configId, declarationIssues, joinConfigs, listOptions, optionDefaults, optionIssue, paramActive, paramLevels, paramProblem, paramValue, productSpace, splitConfig, sweepGrid, sweepOf, sweepValues } from "@mark1russell7/strategy-space";
3
3
  /** The epsilon for the float compares in an engine. */
4
4
  export declare const EPS = 1e-6;
@@ -788,6 +788,57 @@ export declare function pickMoves(trace: Pick<PortfolioTrace, "picked">): {
788
788
  * It also throws a `RangeError` for an empty list of members, or for two members with the same id.
789
789
  */
790
790
  export declare function portfolio<I, O>(id: string, members: readonly Member<I, O>[] | ((input: I) => readonly Member<I, O>[]), key: PortfolioKey<I, O>, options?: PortfolioOptions): Portfolio<I, O>;
791
+ /** The schema of a corpus manifest. */
792
+ export declare const CORPUS_MANIFEST_SCHEMA = "layout-corpus/1";
793
+ /** The held-out split of a portfolio report: a seed, or `all` when each input is held out. */
794
+ export type HeldOut = number | "all";
795
+ /** The claims of a corpus that each bench reads. `declared` is the count of the inputs of each declared property. */
796
+ export interface ManifestClaims {
797
+ readonly declared?: DeclaredClaim;
798
+ }
799
+ /**
800
+ * A corpus manifest: the name, the specs of the inputs and, as an option, the held-out split, the claims and the inputs.
801
+ * `Spec`, `Claims` and `Input` are the types of the bench that writes the manifest.
802
+ */
803
+ export interface CorpusManifest<Spec = unknown, Claims extends object = ManifestClaims, Input = unknown> {
804
+ readonly schema: typeof CORPUS_MANIFEST_SCHEMA;
805
+ readonly corpus: string;
806
+ readonly heldOut?: HeldOut;
807
+ readonly claims?: Claims;
808
+ readonly specs: readonly Spec[];
809
+ readonly inputs?: readonly Input[];
810
+ }
811
+ /**
812
+ * The form of a JSON value on one line.
813
+ * With `spaced`, a space comes after each colon and each comma. With `compact`, the text is the text of `JSON.stringify`.
814
+ */
815
+ export type JsonStyle = "spaced" | "compact";
816
+ /** This function gives a JSON value on one line, in the style `style`. The keys of an object keep their order. */
817
+ export declare function lineJson(value: unknown, style?: JsonStyle): string;
818
+ /** One field of a manifest text. */
819
+ export interface ManifestField {
820
+ readonly key: string;
821
+ /** The value. With `rows`, it is an array, and each item gets its own line. */
822
+ readonly value: unknown;
823
+ readonly rows?: boolean;
824
+ /** The style of the value or of each item. The default is the style of the options. */
825
+ readonly style?: JsonStyle;
826
+ }
827
+ /** The options of `manifestText`. */
828
+ export interface ManifestTextOptions {
829
+ /** The style of each field with no style of its own. The default is `spaced`. */
830
+ readonly style?: JsonStyle;
831
+ /** The text of a list with no item: `[]` (the default), or `[` and `]` with an empty line between them. */
832
+ readonly emptyRows?: "brackets" | "line";
833
+ }
834
+ /** This function gives the text of a manifest: `{`, one line for each field in the order of `fields`, `}` and a newline. */
835
+ export declare function manifestText(fields: readonly ManifestField[], options?: ManifestTextOptions): string;
836
+ /**
837
+ * This function gives the text of a corpus manifest.
838
+ * The fields come in the order `schema`, `corpus`, `heldOut`, `claims`, `specs` and `inputs`. A field with no value is not in the text.
839
+ * `specs` and `inputs` have one line for each item.
840
+ */
841
+ export declare function corpusManifestText<Spec, Claims extends object, Input>(manifest: CorpusManifest<Spec, Claims, Input>, options?: ManifestTextOptions): string;
791
842
  /**
792
843
  * This function checks a space with `checkSpace` of `@mark1russell7/strategy-space`.
793
844
  * Without `kinds`, a shape kind of a `supports` that is not in `SHAPE_KIND_IDS` gives the claim `shape`.
@@ -1423,5 +1474,5 @@ export declare const CIRCLE_SCATTERED: CorpusFamily<LayoutInput>;
1423
1474
  * The steps `container`, `obstacles` and `boxes` each have a stream of `stepRandom`. Each value is a whole number, so the family is `exact`.
1424
1475
  */
1425
1476
  export declare const RECT_SCATTERED: CorpusFamily<LayoutInput>;
1426
- export { type AnyOption, type BooleanOption, ClaimBreak, CorpusEntry, CorpusSplit, DEFAULT_SHAPES, DeclaredClaim, type DeclaredStrategy, Declares, Direction, type EnumOption, type EnumerateOptions, FAMILY_ANY_KIND, FamilyBy, FamilyCell, type GridOptions, Item, JOINT_MEASURES, JOINT_MOVED_MIN, JointMeasureId, type KindOptions, LayoutBox, LayoutCell, LayoutContainer, LayoutEdge, LayoutGenerator, LayoutInput, type ListItem, Margin, MeasureSpec, type MemberRule, type NoDefault, type NoDefaultReason, type NumberOption, Obstacle, type OptionDeclaration, type OptionIssue, type OptionRef, type OptionScale, type OptionSchema, type OptionSetting, type OptionSupports, PackInput, PackInputOptions, PackLink, PairGap, type ParamKind, type ParamValue, type ParamWhen, Point, Port, Rect, Region, RuleLevel, SHAPE_KINDS, SHAPE_KIND_IDS, SIDES, SPLIT_SCHEMA, STRATEGY_SPACE_SCHEMA, type SampleOptions, ShapeBound, ShapeCheck, type ShapeFilter, ShapeGeometry, ShapeInput, ShapeKind, ShapeKindSpec, ShapeLevel, ShapeLimit, ShapeSupport, Side, Sides, SizedRect, type SpaceConstraint, type SpaceParam, type SpaceSize, type SpaceSizeOptions, type SpaceStage, SplitCorpus, SplitFold, type StageChoice, type StageOption, type StrategyConfig, type StrategySpace, type SweepOptions, type ValueOption, Verdict, boundsOf, boxArea, canonicalConfig, canonicalInput, checkConfig, checkDeclared, checkOptions, checkSchema, checkShapes, checkSplit, clampOptions, compareMeasure, configId, corpusHashOf, crossingPoint, declarationIssues, declaredClaimOf, declaredCounts, dropIndex, familyOf, grow, inputShapeLevel, isShapeKind, itemShapeOf, joinConfigs, leaveOneSeedOut, listOptions, marginSides, minEffectOf, optionDefaults, optionIssue, overlapOf, packLinks, paramActive, paramLevels, paramProblem, paramValue, pointSegmentDistance, portPoint, productSpace, regionArea, ruleLevel, segmentsCross, shapeKindOf, shapeKindProblem, shapeKindsOf, shapeLevel, shapeSupportProblems, shapesOf, splitConfig, splitFileName, splitFolds, sweepGrid, sweepOf, sweepValues, toPackInput, toRect, toSizedRect, translate };
1477
+ export { type AnyOption, type BooleanOption, ClaimBreak, CorpusEntry, CorpusSplit, DEFAULT_SHAPES, DeclaredClaim, type DeclaredStrategy, Declares, Direction, type EnumOption, type EnumerateOptions, FAMILY_ANY_KIND, FamilyBy, FamilyCell, type GridOptions, Item, JOINT_MEASURES, JOINT_MOVED_MIN, JointMeasureId, type KindOptions, LayoutBox, LayoutCell, LayoutContainer, LayoutEdge, LayoutGenerator, LayoutInput, type ListItem, Margin, MeasureSpec, type MemberRule, type NoDefault, type NoDefaultReason, type NumberOption, Obstacle, type OptionDeclaration, type OptionIssue, type OptionRef, type OptionScale, type OptionSchema, type OptionSetting, type OptionSupports, PackInput, PackInputOptions, PackLink, PairGap, type ParamKind, type ParamValue, type ParamWhen, Point, Port, Rect, Region, RuleLevel, SHAPE_KINDS, SHAPE_KIND_IDS, SIDES, SPLIT_SCHEMA, STRATEGY_SPACE_SCHEMA, type SampleOptions, ShapeBound, ShapeCheck, type ShapeFilter, ShapeGeometry, ShapeInput, ShapeKind, ShapeKindSpec, ShapeLevel, ShapeLimit, ShapeSupport, Side, Sides, SizedRect, type SpaceConstraint, type SpaceParam, type SpaceSize, type SpaceSizeOptions, type SpaceStage, SplitCorpus, SplitFold, type StageChoice, type StageOption, type StrategyConfig, type StrategySpace, type SweepOptions, type ValueOption, Verdict, boundsOf, boxArea, canonicalConfig, canonicalInput, checkConfig, checkDeclared, checkOptions, checkSchema, checkShapes, checkSplit, clampOptions, compareMeasure, configId, corpusHashOf, crossingPoint, declarationIssues, declaredClaimOf, declaredCounts, dropIndex, familyOf, grow, inputShapeLevel, isShapeKind, itemShapeOf, joinConfigs, leaveOneSeedOut, listOptions, marginSides, minEffectOf, optionDefaults, optionIssue, overlapOf, packLinks, paramActive, paramLevels, paramProblem, paramValue, pointSegmentDistance, portPoint, productSpace, regionArea, ruleLevel, segmentsCross, shapeKindOf, shapeKindProblem, shapeKindsOf, shapeLevel, shapeSupportProblems, shapesOf, snapRect, splitConfig, splitFileName, splitFolds, sweepGrid, sweepOf, sweepValues, toPackInput, toRect, toSizedRect, translate };
1427
1478
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["StrategySpace","KindOptions","SpaceSizeOptions","SpaceSize","EnumerateOptions","StrategyConfig"],"sources":["../src/tolerance.ts","../src/output.ts","../src/record.ts","../src/rules.ts","../src/turn.ts","../src/balance.ts","../src/frame.ts","../src/strategy.ts","../src/random.ts","../src/edges.ts","../src/hash.ts","../src/portfolio.ts","../src/strategy-space.ts","../src/strategy-catalog.ts","../src/verdict.ts","../src/families.ts"],"mappings":";;;qBACa;;qBAGA;;;;;qBAMA;;;;;qBAMA;;;;;iBAMI;;WAEN;;WAEA;;;;;;qBAOE,mBAAmB;;iBC5Bf;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;;WAE7B;;;;;;;WAOA;;WAEA;;WAEA;;WAEA;;;;;;WAMA;;WAEA;;WAEA;;WAEA;;;;;WAKA;;WAEA,MAAM;;WAEN;WACA;;;;;;WAMA,UAAU;;;;;;iBAOJ;;WAEN,MAAM,SAAS;;WAEf,IAAI,SAAS;;WAEb,cAAc,SAAS;;WAEvB;;;;;;YAOC,WAAW,SAAS;;iBAGf;WACN;WACA;WACA;;WAEA;;WAEA;;WAEA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;;;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;;;;;;;;;qBAuBf,kBAAkB,aAAa;;;;;;qBAqD/B,gBAAgB,aAAa"}
1
+ {"version":3,"file":"index.d.ts","names":["StrategySpace","KindOptions","SpaceSizeOptions","SpaceSize","EnumerateOptions","StrategyConfig"],"sources":["../src/tolerance.ts","../src/output.ts","../src/record.ts","../src/rules.ts","../src/turn.ts","../src/balance.ts","../src/frame.ts","../src/strategy.ts","../src/random.ts","../src/edges.ts","../src/hash.ts","../src/portfolio.ts","../src/corpus-manifest.ts","../src/strategy-space.ts","../src/strategy-catalog.ts","../src/verdict.ts","../src/families.ts"],"mappings":";;;qBACa;;qBAGA;;;;;qBAMA;;;;;qBAMA;;;;;iBAMI;;WAEN;;WAEA;;;;;;qBAOE,mBAAmB;;iBC5Bf;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,O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,OAAO;;;;;;;wBAWV,cAAc,MAAM,aAAa,cAAc,gBAAgB,cAAc,UAAS,iBAAsB,aAAa;;;;;qBA+D5H,YAAY;;;;qBA0BZ,eAAe;;;;;;;;;qBAuBf,kBAAkB,aAAa;;;;;;qBAqD/B,gBAAgB,aAAa"}
package/build/index.js CHANGED
@@ -27,6 +27,22 @@ function toSizedRect(rect) {
27
27
  height: rect.h
28
28
  };
29
29
  }
30
+ /** This function rounds a number to a whole number with `Math.round`. It gives 0, not -0, for a small negative number. */
31
+ const roundEdge = (value) => Math.round(value) + 0;
32
+ /**
33
+ * This function gives a rectangle on whole pixels. It rounds each edge with `Math.round`, not the size. Thus two
34
+ * rectangles that touch still touch after the rounding, and no gap or overlap of one pixel comes between them.
35
+ */
36
+ function snapRect(rect) {
37
+ const x = roundEdge(rect.x);
38
+ const y = roundEdge(rect.y);
39
+ return {
40
+ x,
41
+ y,
42
+ w: roundEdge(rect.x + rect.w) - x,
43
+ h: roundEdge(rect.y + rect.h) - y
44
+ };
45
+ }
30
46
  /** This function gives the value of each side of a margin. No margin gives 0 on each side. */
31
47
  function marginSides(margin) {
32
48
  if (margin === void 0) return {
@@ -3031,6 +3047,65 @@ function leaveOneSeedOut(seeds) {
3031
3047
  heldOut: [s]
3032
3048
  }));
3033
3049
  }
3050
+ // src/corpus-manifest.ts
3051
+ /** The schema of a corpus manifest. */
3052
+ const CORPUS_MANIFEST_SCHEMA = "layout-corpus/1";
3053
+ /** This function gives a JSON value on one line, in the style `style`. The keys of an object keep their order. */
3054
+ function lineJson(value, style = "spaced") {
3055
+ if (style === "compact") return JSON.stringify(value);
3056
+ if (Array.isArray(value)) return `[${value.map((v) => lineJson(v)).join(", ")}]`;
3057
+ if (value !== null && typeof value === "object") return `{${Object.entries(value).map(([k, v]) => `${JSON.stringify(k)}: ${lineJson(v)}`).join(", ")}}`;
3058
+ return JSON.stringify(value);
3059
+ }
3060
+ /** This function gives the text of a manifest: `{`, one line for each field in the order of `fields`, `}` and a newline. */
3061
+ function manifestText(fields, options = {}) {
3062
+ const keys = /* @__PURE__ */ new Set();
3063
+ return `{\n${fields.map((field, i) => {
3064
+ if (keys.has(field.key)) throw new RangeError(`manifestText: the key ${field.key} occurs two times.`);
3065
+ keys.add(field.key);
3066
+ const style = field.style ?? options.style ?? "spaced";
3067
+ const end = i === fields.length - 1 ? "" : ",";
3068
+ const head = ` ${JSON.stringify(field.key)}: `;
3069
+ if (field.rows !== true) return `${head}${lineJson(field.value, style)}${end}`;
3070
+ if (!Array.isArray(field.value)) throw new RangeError(`manifestText: the field ${field.key} has rows, so its value is an array.`);
3071
+ if (field.value.length === 0 && options.emptyRows !== "line") return `${head}[]${end}`;
3072
+ return `${head}[\n${field.value.map((item) => ` ${lineJson(item, style)}`).join(",\n")}\n ]${end}`;
3073
+ }).join("\n")}\n}\n`;
3074
+ }
3075
+ /**
3076
+ * This function gives the text of a corpus manifest.
3077
+ * The fields come in the order `schema`, `corpus`, `heldOut`, `claims`, `specs` and `inputs`. A field with no value is not in the text.
3078
+ * `specs` and `inputs` have one line for each item.
3079
+ */
3080
+ function corpusManifestText(manifest, options = {}) {
3081
+ if (manifest.schema !== "layout-corpus/1") throw new RangeError(`corpusManifestText: the schema is ${String(manifest.schema)}, not ${CORPUS_MANIFEST_SCHEMA}.`);
3082
+ const fields = [{
3083
+ key: "schema",
3084
+ value: manifest.schema
3085
+ }, {
3086
+ key: "corpus",
3087
+ value: manifest.corpus
3088
+ }];
3089
+ if (manifest.heldOut !== void 0) fields.push({
3090
+ key: "heldOut",
3091
+ value: manifest.heldOut
3092
+ });
3093
+ if (manifest.claims !== void 0) fields.push({
3094
+ key: "claims",
3095
+ value: manifest.claims
3096
+ });
3097
+ fields.push({
3098
+ key: "specs",
3099
+ value: manifest.specs,
3100
+ rows: true
3101
+ });
3102
+ if (manifest.inputs !== void 0) fields.push({
3103
+ key: "inputs",
3104
+ value: manifest.inputs,
3105
+ rows: true
3106
+ });
3107
+ return manifestText(fields, options);
3108
+ }
3034
3109
  // src/strategy-space.ts
3035
3110
  /** This function gives the known shape kinds of a check: the list of the caller, or `SHAPE_KIND_IDS`. */
3036
3111
  const withKinds = (options) => ({
@@ -5055,6 +5130,6 @@ const RECT_SCATTERED = /* @__PURE__ */ Object.freeze({
5055
5130
  };
5056
5131
  }
5057
5132
  });
5058
- export { BALANCE_MEASURE_SUFFIXES, BALANCE_SIDE_DEPTH, CIRCLE_SCATTERED, CORPUS_DIMENSIONS, DEFAULT_FAMILY_BY, DEFAULT_RNG, DEFAULT_SHAPES, DEFAULT_TOLERANCE, EDGES_STEP, EDGE_DENSITY, EDGE_KEY_STEP, EDGE_KEY_STEP_VERSION, EDGE_STEP_VERSION, EPS, EPS_STEPS, FAMILY_ANY_KIND, FRAME_SCHEMA, FRAME_STATES, HARD_RULE_VERSION, INVALIDATED_FIELD, JOINT_MEASURES, JOINT_MOVED_MIN, NODE_POSITIONS_DIMENSION, OUTPUT_CLASS_MIN_INPUTS, OUTPUT_GRID_PROPERTIES, OUTPUT_NEAR_WHOLE, PACK_HARD_RULES, RECORD_EPS, RECORD_SCALE, RECT_SCATTERED, REFUSED_PROBE, SHAPE_KINDS, SHAPE_KIND_IDS, SIDES, SPLIT_SCHEMA, STRATEGY_CATALOG_SCHEMA, STRATEGY_CATALOG_SCHEMAS, STRATEGY_SPACE_SCHEMA, VERDICT_DRAWS, VERDICT_EXACT_CAP, VERDICT_EXACT_MAX, VERDICT_RUNS, VERDICT_SEED, applyPack, balanceMeasureSpecs, balanceMeasures, balanceOf, boundsOf, boxArea, canonicalConfig, canonicalInput, canonicalJson, carryRecord, catalogChoices, catalogDefaults, catalogKey, catalogOptions, checkCatalog, checkConfig, checkDeclared, checkInput, checkLayoutRecord, checkOptions, checkSchema, checkShapes, checkSpace, checkSplit, circleOverlaps, circlesOutside, clampOptions, compareMeasure, composeFamily, configId, corpusHashOf, countLinksThroughShapes, countObstacleHits, countOutside, countOverlaps, countPortsOffBorder, createFamilyRegistry, crossingPoint, declarationIssues, declaredClaimOf, declaredCounts, decodeOptionValue, dimensionAt, dimensionSupports, dimensionUnit, documentHash, dropIndex, edgeKeyStep, edgeStep, encodeOptionValue, enumerateSpace, exercised, familyKind, familyOf, fingerprintOf, fixedPointMove, fnv1a32, frameAt, frameMove, frameOf, grow, hardRuleOf, inputShapeLevel, isShapeKind, itemShapeOf, joinConfigs, leaveOneSeedOut, levelsOf, listOptions, marginSides, minEffectOf, mulberry32, nearestGaps, optionDefaults, optionIssue, outputGridClass, outputGroups, outputHash, outputOf, overlapOf, ownerDimension, packHard, packLinks, packOutputForm, paramActive, paramLevels, paramProblem, paramValue, parseLayoutRecord, parseStrategyCatalog, perChange, pickMoves, placedCircle, placedRect, pointSegmentDistance, portPoint, portfolio, probeHash, procrustesOf, productSpace, randomInt, rectInRegion, regionArea, regionHitsRect, resolveDimensions, ruleLevel, segmentThroughShape, segmentsCross, selectBest, sha256Hex, shapeKindOf, shapeKindProblem, shapeKindsOf, shapeLevel, shapeSupportProblems, shapesOf, shapesOverlap, sharedDimension, spaceShapeKinds, spaceSize, splitConfig, splitFileName, splitFolds, stepRandom, sweepGrid, sweepOf, sweepValues, toLayoutRecord, toPackInput, toRect, toSizedRect, translate, turnBox, turnMargin, turnPoint, turnPort, turnRegion, turnSide, verdict, writeStrategyCatalog };
5133
+ export { BALANCE_MEASURE_SUFFIXES, BALANCE_SIDE_DEPTH, CIRCLE_SCATTERED, CORPUS_DIMENSIONS, CORPUS_MANIFEST_SCHEMA, DEFAULT_FAMILY_BY, DEFAULT_RNG, DEFAULT_SHAPES, DEFAULT_TOLERANCE, EDGES_STEP, EDGE_DENSITY, EDGE_KEY_STEP, EDGE_KEY_STEP_VERSION, EDGE_STEP_VERSION, EPS, EPS_STEPS, FAMILY_ANY_KIND, FRAME_SCHEMA, FRAME_STATES, HARD_RULE_VERSION, INVALIDATED_FIELD, JOINT_MEASURES, JOINT_MOVED_MIN, NODE_POSITIONS_DIMENSION, OUTPUT_CLASS_MIN_INPUTS, OUTPUT_GRID_PROPERTIES, OUTPUT_NEAR_WHOLE, PACK_HARD_RULES, RECORD_EPS, RECORD_SCALE, RECT_SCATTERED, REFUSED_PROBE, SHAPE_KINDS, SHAPE_KIND_IDS, SIDES, SPLIT_SCHEMA, STRATEGY_CATALOG_SCHEMA, STRATEGY_CATALOG_SCHEMAS, STRATEGY_SPACE_SCHEMA, VERDICT_DRAWS, VERDICT_EXACT_CAP, VERDICT_EXACT_MAX, VERDICT_RUNS, VERDICT_SEED, applyPack, balanceMeasureSpecs, balanceMeasures, balanceOf, boundsOf, boxArea, canonicalConfig, canonicalInput, canonicalJson, carryRecord, catalogChoices, catalogDefaults, catalogKey, catalogOptions, checkCatalog, checkConfig, checkDeclared, checkInput, checkLayoutRecord, checkOptions, checkSchema, checkShapes, checkSpace, checkSplit, circleOverlaps, circlesOutside, clampOptions, compareMeasure, composeFamily, configId, corpusHashOf, corpusManifestText, countLinksThroughShapes, countObstacleHits, countOutside, countOverlaps, countPortsOffBorder, createFamilyRegistry, crossingPoint, declarationIssues, declaredClaimOf, declaredCounts, decodeOptionValue, dimensionAt, dimensionSupports, dimensionUnit, documentHash, dropIndex, edgeKeyStep, edgeStep, encodeOptionValue, enumerateSpace, exercised, familyKind, familyOf, fingerprintOf, fixedPointMove, fnv1a32, frameAt, frameMove, frameOf, grow, hardRuleOf, inputShapeLevel, isShapeKind, itemShapeOf, joinConfigs, leaveOneSeedOut, levelsOf, lineJson, listOptions, manifestText, marginSides, minEffectOf, mulberry32, nearestGaps, optionDefaults, optionIssue, outputGridClass, outputGroups, outputHash, outputOf, overlapOf, ownerDimension, packHard, packLinks, packOutputForm, paramActive, paramLevels, paramProblem, paramValue, parseLayoutRecord, parseStrategyCatalog, perChange, pickMoves, placedCircle, placedRect, pointSegmentDistance, portPoint, portfolio, probeHash, procrustesOf, productSpace, randomInt, rectInRegion, regionArea, regionHitsRect, resolveDimensions, ruleLevel, segmentThroughShape, segmentsCross, selectBest, sha256Hex, shapeKindOf, shapeKindProblem, shapeKindsOf, shapeLevel, shapeSupportProblems, shapesOf, shapesOverlap, sharedDimension, snapRect, spaceShapeKinds, spaceSize, splitConfig, splitFileName, splitFolds, stepRandom, sweepGrid, sweepOf, sweepValues, toLayoutRecord, toPackInput, toRect, toSizedRect, translate, turnBox, turnMargin, turnPoint, turnPort, turnRegion, turnSide, verdict, writeStrategyCatalog };
5059
5134
 
5060
5135
  //# sourceMappingURL=index.js.map