@mark1russell7/layout-contract 0.3.2 → 0.3.4

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 FAMILY_ANY_KIND, A as shapesOf, B as PackInputOptions, C as itemShapeOf, Ct as marginSides, D as shapeKindsOf, E as shapeKindProblem, Et as translate, 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, P as LayoutContainer, Q as Declares, R as Obstacle, S as isShapeKind, St as grow, T as shapeKindOf, Tt as regionArea, 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, k as shapeSupportProblems, 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 overlapOf, x as checkShapes, xt as boundsOf, y as ShapeSupport, yt as Side, z as PackInput } from "./measures-BLoTbQwB.js";
1
+ import { $ as FAMILY_ANY_KIND, A as shapesOf, B as PackInputOptions, C as itemShapeOf, Ct as grow, D as shapeKindsOf, Dt as toRect, E as shapeKindProblem, Et as regionArea, 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 toSizedRect, 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, k as shapeSupportProblems, kt as translate, 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-WwacWhot.js";
2
2
  /** The epsilon for the float compares in an engine. */
3
3
  export declare const EPS = 1e-6;
4
4
  /**
@@ -1152,5 +1152,5 @@ export declare const EDGES_STEP: CorpusStep;
1152
1152
  * The steps `container`, `obstacles` and `boxes` each have a stream of `stepRandom`. Each value is a whole number, so the family is `exact`.
1153
1153
  */
1154
1154
  export declare const RECT_SCATTERED: CorpusFamily<LayoutInput>;
1155
- 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, SplitCorpus, SplitFold, Verdict, boundsOf, boxArea, canonicalInput, checkDeclared, checkShapes, checkSplit, compareMeasure, corpusHashOf, declaredClaimOf, declaredCounts, familyOf, grow, isShapeKind, itemShapeOf, leaveOneSeedOut, marginSides, minEffectOf, overlapOf, packLinks, portPoint, regionArea, ruleLevel, shapeKindOf, shapeKindProblem, shapeKindsOf, shapeLevel, shapeSupportProblems, shapesOf, splitFileName, splitFolds, toPackInput, translate };
1155
+ 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, portPoint, regionArea, ruleLevel, shapeKindOf, shapeKindProblem, shapeKindsOf, shapeLevel, shapeSupportProblems, shapesOf, splitFileName, splitFolds, toPackInput, toRect, toSizedRect, translate };
1156
1156
  //# 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/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,MAAM;;WAEN;WACA;;;;;;YAOC,WAAW,SAAS;;iBAGf;WACN;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;YAIC,WAAW,KAAK;;;;;wBAMZ,eAAe,OAAO,aAAa,KAAK,WAAW;;;;;;wBAkDnD,kBAAkB;;;;;;wBA8BlB,kBAAkB,iBAAiB;;wBC9JnC,WAAW,KAAK,YAAY;;;;;;;;wBAc5B,cAAc,gBAAgB,aAAa,oBAA+C,oBAAoB;;iBAkD7G;;;;;WAKN;;;;;;;;;;wBAWK,aAAa,OAAO,aAAa,oBAA+C,UAAS;;wBAsBzF,oBAAoB,gBAAgB,aAAa;;iBAehD;WACN;WACA;WACA;WACA;;;;;;;;qBASE,0BAA0B,mBAAmB;;w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B,cAAc,UAAS,iBAAsB,aAAa;;;;;qBA+D5H,YAAY;;;;;;qBAoBZ,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/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,MAAM;;WAEN;WACA;;;;;;YAOC,WAAW,SAAS;;iBAGf;WACN;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;YAIC,WAAW,KAAK;;;;;wBAMZ,eAAe,OAAO,aAAa,KAAK,WAAW;;;;;;wBAkDnD,kBAAkB;;;;;;wBA8BlB,kBAAkB,iBAAiB;;wBC9JnC,WAAW,KAAK,YAAY;;;;;;;;wBAc5B,cAAc,gBAAgB,aAAa,oBAA+C,oBAAoB;;iBAkD7G;;;;;WAKN;;;;;;;;;;wBAWK,aAAa,OAAO,aAAa,oBAA+C,UAAS;;wBAsBzF,oBAAoB,gBAAgB,aAAa;;iBAehD;WACN;W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O;;;;;;;wBAWV,cAAc,MAAM,aAAa,cAAc,gBAAgB,cAAc,UAAS,iBAAsB,aAAa;;;;;qBA+D5H,YAAY;;;;;;qBAoBZ,gBAAgB,aAAa"}
package/build/index.js CHANGED
@@ -7,6 +7,24 @@ const SIDES = [
7
7
  "bottom",
8
8
  "left"
9
9
  ];
10
+ /** This function gives the `Rect` of a `SizedRect`. It copies each number, and it does not round. */
11
+ function toRect(rect) {
12
+ return {
13
+ x: rect.x,
14
+ y: rect.y,
15
+ w: rect.width,
16
+ h: rect.height
17
+ };
18
+ }
19
+ /** This function gives the `SizedRect` of a `Rect`. It copies each number, and it does not round. */
20
+ function toSizedRect(rect) {
21
+ return {
22
+ x: rect.x,
23
+ y: rect.y,
24
+ width: rect.w,
25
+ height: rect.h
26
+ };
27
+ }
10
28
  /** This function gives the value of each side of a margin. No margin gives 0 on each side. */
11
29
  function marginSides(margin) {
12
30
  if (margin === void 0) return {
@@ -138,7 +156,7 @@ function overlapOf(a, b) {
138
156
  * The declared shape kinds, in their order. Only `rect` has all of its geometry.
139
157
  * `polygon` and `circle` have their bounding box and their exact area. `free` has its bounding box only.
140
158
  */
141
- const SHAPE_KINDS = Object.freeze([
159
+ const SHAPE_KINDS = /* @__PURE__ */ Object.freeze([
142
160
  {
143
161
  id: "rect",
144
162
  fields: ["w", "h"],
@@ -198,9 +216,9 @@ const SHAPE_KINDS = Object.freeze([
198
216
  }
199
217
  ]);
200
218
  /** The ids of `SHAPE_KINDS`, in their order. */
201
- const SHAPE_KIND_IDS = Object.freeze(SHAPE_KINDS.map((k) => k.id));
219
+ const SHAPE_KIND_IDS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ SHAPE_KINDS.map((k) => k.id));
202
220
  /** The shape kinds of a measure or a rule without `shapes`. The contract measured only rectangles before L46. */
203
- const DEFAULT_SHAPES = Object.freeze(["rect"]);
221
+ const DEFAULT_SHAPES = /* @__PURE__ */ Object.freeze(["rect"]);
204
222
  /** This function gives the level of a rule on a shape kind. A kind of `shapesOf` is `exact`, a kind of `safe` is `safe`, and another kind is `none`. It does not read `bound`. */
205
223
  function ruleLevel(rule, kind) {
206
224
  if (shapesOf(rule).includes(kind)) return "exact";
@@ -354,7 +372,7 @@ const RECORD_EPS = .001;
354
372
  * The default tolerance of each rule. The packer is exact, so `overlap` is one unit of the rounding.
355
373
  * Routes are sampled curves that follow the margin line, so `through` is larger.
356
374
  */
357
- const DEFAULT_TOLERANCE = Object.freeze({
375
+ const DEFAULT_TOLERANCE = /* @__PURE__ */ Object.freeze({
358
376
  overlap: .001,
359
377
  through: .5
360
378
  });
@@ -821,7 +839,7 @@ function countPortsOffBorder(boxes, eps = RECORD_EPS) {
821
839
  * 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.
822
840
  * `locked-kept` and `complete` read only the positions and the ids, so they support each kind.
823
841
  */
824
- const PACK_HARD_RULES = Object.freeze([
842
+ const PACK_HARD_RULES = /* @__PURE__ */ Object.freeze([
825
843
  {
826
844
  id: "no-overlap",
827
845
  shapes: ["rect"],
@@ -1105,7 +1123,7 @@ const AREA = ["rect"];
1105
1123
  * The specs of the joint measures, in the order of `docs/JOINT-MEASURES.md`.
1106
1124
  * `joint.fill` and `joint.straight.length` read the area of each box, so they support only `rect`. `docs/SHAPES.md` tells the reasons.
1107
1125
  */
1108
- const JOINT_MEASURES = Object.freeze([
1126
+ const JOINT_MEASURES = /* @__PURE__ */ Object.freeze([
1109
1127
  {
1110
1128
  id: "joint.fill",
1111
1129
  minEffect: .001,
@@ -1249,7 +1267,7 @@ function compareMeasure(candidate, baseline, spec) {
1249
1267
  /** The depth of the strip of each side, as a share of the container. For `top` and `bottom`, it is a share of the height. For `left` and `right`, it is a share of the width. */
1250
1268
  const BALANCE_SIDE_DEPTH = .25;
1251
1269
  /** The suffixes of the balance and stability measures, in the order of `docs/BALANCE.md`. */
1252
- const BALANCE_MEASURE_SUFFIXES = Object.freeze([
1270
+ const BALANCE_MEASURE_SUFFIXES = /* @__PURE__ */ Object.freeze([
1253
1271
  "balance.gapCv",
1254
1272
  "balance.centroidOffset",
1255
1273
  "balance.side.top",
@@ -1588,7 +1606,7 @@ function randomInt(r, lo, hi) {
1588
1606
  }
1589
1607
  // src/edges.ts
1590
1608
  /** The mean count of the edges of each box for each value of `edgeDensity`. */
1591
- const EDGE_DENSITY = Object.freeze({
1609
+ const EDGE_DENSITY = /* @__PURE__ */ Object.freeze({
1592
1610
  sparse: .5,
1593
1611
  medium: 1.5,
1594
1612
  dense: 4
@@ -2653,7 +2671,7 @@ function supportsProblems(supports, at) {
2653
2671
  /** This function tells if an option supports each shape kind of the list. */
2654
2672
  const supportsShapes = (o, shapes) => shapes === void 0 || o.supports?.shape === void 0 || shapes.every((k) => o.supports.shape.includes(k));
2655
2673
  /** The shape kinds that the members of an option with `view: "bounds"` see: a bounding box is a `rect`. */
2656
- const BOUNDS_VIEW = Object.freeze(["rect"]);
2674
+ const BOUNDS_VIEW = /* @__PURE__ */ Object.freeze(["rect"]);
2657
2675
  /**
2658
2676
  * This function gives the shape kinds of the members of a meta option. With `view: "bounds"`, a list with a kind becomes `BOUNDS_VIEW`.
2659
2677
  * Without a list, or with an empty list, the value does not change.
@@ -3664,7 +3682,7 @@ function familyKind(name, version) {
3664
3682
  return `${name}@${version}`;
3665
3683
  }
3666
3684
  /** The default key of a family in a manifest: the kind of the cell alone. It is the map form of `FamilyBy` with the entry `"*"`. */
3667
- const DEFAULT_FAMILY_BY = Object.freeze({ "*": Object.freeze([]) });
3685
+ const DEFAULT_FAMILY_BY = /* @__PURE__ */ Object.freeze({ "*": /* @__PURE__ */ Object.freeze([]) });
3668
3686
  /** This function gives an `enum` dimension. */
3669
3687
  const choice = (name, values, value, meaning, engines) => Object.freeze({
3670
3688
  name,
@@ -3686,6 +3704,14 @@ const range = (name, kind, limits, meaning, engines) => Object.freeze({
3686
3704
  meaning,
3687
3705
  engines: Object.freeze([...engines])
3688
3706
  });
3707
+ /**
3708
+ * This function gives a dimension with the condition `when`, as a frozen object.
3709
+ * A spread in the literal of `CORPUS_DIMENSIONS` is a side effect for a bundler, so the copy is in this function.
3710
+ */
3711
+ const withWhen = (dimension, when) => Object.freeze({
3712
+ ...dimension,
3713
+ when
3714
+ });
3689
3715
  const P = "packing";
3690
3716
  const H = "highways";
3691
3717
  const J = "joint";
@@ -3693,8 +3719,8 @@ const J = "joint";
3693
3719
  * The shared dimension table. A family takes a dimension of it with `sharedDimension`, or declares its own dimension.
3694
3720
  * The coverage table of each dimension and each engine is in `docs/CORPUS.md`.
3695
3721
  */
3696
- const CORPUS_DIMENSIONS = Object.freeze({
3697
- count: range("count", "int", {
3722
+ const CORPUS_DIMENSIONS = /* @__PURE__ */ Object.freeze({
3723
+ count: /* @__PURE__ */ range("count", "int", {
3698
3724
  min: 0,
3699
3725
  max: 1e5,
3700
3726
  value: 100,
@@ -3711,7 +3737,7 @@ const CORPUS_DIMENSIONS = Object.freeze({
3711
3737
  H,
3712
3738
  J
3713
3739
  ]),
3714
- sizes: choice("sizes", [
3740
+ sizes: /* @__PURE__ */ choice("sizes", [
3715
3741
  "identical",
3716
3742
  "nearIdentical",
3717
3743
  "uniform",
@@ -3719,19 +3745,19 @@ const CORPUS_DIMENSIONS = Object.freeze({
3719
3745
  "bimodal",
3720
3746
  "extremeAspect"
3721
3747
  ], "uniform", "The distribution of the sizes of the items.", [P, J]),
3722
- aspect: range("aspect", "real", {
3748
+ aspect: /* @__PURE__ */ range("aspect", "real", {
3723
3749
  min: .25,
3724
3750
  max: 4,
3725
3751
  value: 1,
3726
3752
  scale: "log"
3727
3753
  }, "The width over the height of a container with no fixed size.", [P]),
3728
- density: range("density", "real", {
3754
+ density: /* @__PURE__ */ range("density", "real", {
3729
3755
  min: .05,
3730
3756
  max: 1,
3731
3757
  value: .4,
3732
3758
  scale: "linear"
3733
3759
  }, "The area of the items over the area of the frame of the container.", [P]),
3734
- obstacles: choice("obstacles", [
3760
+ obstacles: /* @__PURE__ */ choice("obstacles", [
3735
3761
  "none",
3736
3762
  "center",
3737
3763
  "scattered",
@@ -3740,14 +3766,14 @@ const CORPUS_DIMENSIONS = Object.freeze({
3740
3766
  "touching",
3741
3767
  "edge"
3742
3768
  ], "none", "The layout of the fixed obstacles.", [P, J]),
3743
- containerSize: choice("containerSize", [
3769
+ containerSize: /* @__PURE__ */ choice("containerSize", [
3744
3770
  "fixed",
3745
3771
  "freeHeight",
3746
3772
  "freeWidth",
3747
3773
  "freeAspect",
3748
3774
  "freeArea"
3749
3775
  ], "fixed", "The sides of the container that the engine can change.", [P, J]),
3750
- containerShape: choice("containerShape", [
3776
+ containerShape: /* @__PURE__ */ choice("containerShape", [
3751
3777
  "rect",
3752
3778
  "convex",
3753
3779
  "polygon",
@@ -3755,19 +3781,19 @@ const CORPUS_DIMENSIONS = Object.freeze({
3755
3781
  "ellipse",
3756
3782
  "holes"
3757
3783
  ], "rect", "The kind of the shape of the container.", [P, J]),
3758
- shape: choice("shape", SHAPE_KIND_IDS, "rect", "The shape kind of each item: a `ShapeKind` of `shapes.ts`.", [P]),
3759
- order: choice("order", ["free", "soft"], "free", "The reading order of the items: no order, or a rank on each item.", [P]),
3760
- groups: choice("groups", [
3784
+ shape: /* @__PURE__ */ choice("shape", SHAPE_KIND_IDS, "rect", "The shape kind of each item: a `ShapeKind` of `shapes.ts`.", [P]),
3785
+ order: /* @__PURE__ */ choice("order", ["free", "soft"], "free", "The reading order of the items: no order, or a rank on each item.", [P]),
3786
+ groups: /* @__PURE__ */ choice("groups", [
3761
3787
  "none",
3762
3788
  "flat",
3763
3789
  "nested"
3764
3790
  ], "none", "The groups of the items: no groups, one level, or groups in groups.", [H, J]),
3765
- edgeDensity: choice("edgeDensity", [
3791
+ edgeDensity: /* @__PURE__ */ choice("edgeDensity", [
3766
3792
  "sparse",
3767
3793
  "medium",
3768
3794
  "dense"
3769
3795
  ], "medium", "The mean count of the edges of each item: 0.5, 1.5 or 4.", [H, J]),
3770
- edgeShape: choice("edgeShape", [
3796
+ edgeShape: /* @__PURE__ */ choice("edgeShape", [
3771
3797
  "random",
3772
3798
  "clustered",
3773
3799
  "hubChain",
@@ -3776,30 +3802,27 @@ const CORPUS_DIMENSIONS = Object.freeze({
3776
3802
  "tree",
3777
3803
  "bundled"
3778
3804
  ], "random", "The topology of the edges.", [H, J]),
3779
- ports: choice("ports", [
3805
+ ports: /* @__PURE__ */ choice("ports", [
3780
3806
  "free",
3781
3807
  "sides",
3782
3808
  "fixed"
3783
3809
  ], "free", "The ports of the edges: free, a side for each end, or fixed ports.", [H, J]),
3784
- hubBy: Object.freeze({
3785
- ...choice("hubBy", ["area", "random"], "area", "The order of the hubs of the shapes hubs and tree: the largest item first, or random.", [J]),
3786
- when: Object.freeze({
3787
- param: "edgeShape",
3788
- in: Object.freeze(["hubs", "tree"])
3789
- })
3790
- }),
3791
- spacing: choice("spacing", [
3810
+ hubBy: /* @__PURE__ */ withWhen(/* @__PURE__ */ choice("hubBy", ["area", "random"], "area", "The order of the hubs of the shapes hubs and tree: the largest item first, or random.", [J]), /* @__PURE__ */ Object.freeze({
3811
+ param: "edgeShape",
3812
+ in: /* @__PURE__ */ Object.freeze(["hubs", "tree"])
3813
+ })),
3814
+ spacing: /* @__PURE__ */ choice("spacing", [
3792
3815
  "stress",
3793
3816
  "gap",
3794
3817
  "margin",
3795
3818
  "both"
3796
3819
  ], "both", "The split of the route clearance between the margins and the gap. `stress` has neither.", [J]),
3797
- margin: range("margin", "real", {
3820
+ margin: /* @__PURE__ */ range("margin", "real", {
3798
3821
  min: 0,
3799
3822
  max: 32,
3800
3823
  value: 0
3801
3824
  }, "The margin of each item, in units.", [P, J]),
3802
- gap: range("gap", "real", {
3825
+ gap: /* @__PURE__ */ range("gap", "real", {
3803
3826
  min: 0,
3804
3827
  max: 32,
3805
3828
  value: 0
@@ -4311,7 +4334,7 @@ function composeFamily(base, steps, options = {}) {
4311
4334
  });
4312
4335
  }
4313
4336
  /** The dimensions of `EDGES_STEP`: the parameters of `edgeStep`, from the shared table. */
4314
- const EDGE_DIMENSIONS = Object.freeze([
4337
+ const EDGE_DIMENSIONS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ [
4315
4338
  "edgeDensity",
4316
4339
  "edgeShape",
4317
4340
  "groups",
@@ -4339,7 +4362,7 @@ function edgeParams(d) {
4339
4362
  * The step `edges` of `edgeStep` (version 1), as a corpus step. Its family part is `e-<edgeDensity>.<edgeShape>.<groups>.<ports>`.
4340
4363
  * The value `random` of `hubBy` adds the part `.hub-random`.
4341
4364
  */
4342
- const EDGES_STEP = Object.freeze({
4365
+ const EDGES_STEP = /* @__PURE__ */ Object.freeze({
4343
4366
  name: "edges",
4344
4367
  version: 1,
4345
4368
  owner: "layout-contract",
@@ -4357,12 +4380,12 @@ const XCHECK_SET = "xcheck-v1";
4357
4380
  * It is the one copy of the generator of `docs/FORMAT.md` of `packing`. Its input is the input of `packing`, byte for byte.
4358
4381
  * The steps `container`, `obstacles` and `boxes` each have a stream of `stepRandom`. Each value is a whole number, so the family is `exact`.
4359
4382
  */
4360
- const RECT_SCATTERED = Object.freeze({
4383
+ const RECT_SCATTERED = /* @__PURE__ */ Object.freeze({
4361
4384
  name: "rect-scattered",
4362
4385
  version: 1,
4363
4386
  owner: "layout-contract",
4364
4387
  meaning: "Rectangle obstacles at random places in a fixed rectangle container, and boxes of random sizes.",
4365
- dimensions: Object.freeze([sharedDimension("count", { default: 40 })]),
4388
+ dimensions: /* @__PURE__ */ Object.freeze([/* @__PURE__ */ sharedDimension("count", { default: 40 })]),
4366
4389
  seeding: "stepRandom(seed, container) gives w and h. stepRandom(seed, obstacles) gives n, then ow, oh, x and y of each obstacle. stepRandom(seed, boxes) gives bw and bh of each box.",
4367
4390
  crossEngine: "exact",
4368
4391
  generate(seed, dims, context) {
@@ -4429,6 +4452,6 @@ const RECT_SCATTERED = Object.freeze({
4429
4452
  };
4430
4453
  }
4431
4454
  });
4432
- export { BALANCE_MEASURE_SUFFIXES, BALANCE_SIDE_DEPTH, CORPUS_DIMENSIONS, DEFAULT_FAMILY_BY, DEFAULT_RNG, DEFAULT_SHAPES, DEFAULT_TOLERANCE, EDGES_STEP, EDGE_DENSITY, EDGE_STEP_VERSION, EPS, FAMILY_ANY_KIND, INVALIDATED_FIELD, JOINT_MEASURES, JOINT_MOVED_MIN, PACK_HARD_RULES, RECORD_EPS, RECORD_SCALE, RECT_SCATTERED, SHAPE_KINDS, SHAPE_KIND_IDS, SIDES, SPLIT_SCHEMA, STRATEGY_SPACE_SCHEMA, VERDICT_DRAWS, VERDICT_EXACT_CAP, VERDICT_EXACT_MAX, VERDICT_RUNS, VERDICT_SEED, applyPack, balanceMeasureSpecs, balanceMeasures, balanceOf, boundsOf, boxArea, canonicalConfig, canonicalInput, canonicalJson, checkConfig, checkDeclared, checkInput, checkLayoutRecord, checkShapes, checkSpace, checkSplit, compareMeasure, composeFamily, configId, corpusHashOf, countObstacleHits, countOutside, countOverlaps, countPortsOffBorder, createFamilyRegistry, declaredClaimOf, declaredCounts, dimensionAt, dimensionSupports, dimensionUnit, documentHash, edgeStep, enumerateSpace, exercised, familyKind, familyOf, fnv1a32, grow, isShapeKind, itemShapeOf, joinConfigs, leaveOneSeedOut, levelsOf, marginSides, minEffectOf, mulberry32, nearestGaps, outputGroups, outputHash, overlapOf, ownerDimension, packHard, packLinks, paramActive, paramLevels, paramProblem, paramValue, parseLayoutRecord, perChange, pickMoves, placedRect, portPoint, portfolio, procrustesOf, productSpace, randomInt, rectInRegion, regionArea, regionHitsRect, resolveDimensions, ruleLevel, selectBest, sha256Hex, shapeKindOf, shapeKindProblem, shapeKindsOf, shapeLevel, shapeSupportProblems, shapesOf, sharedDimension, spaceShapeKinds, spaceSize, splitConfig, splitFileName, splitFolds, stepRandom, toLayoutRecord, toPackInput, translate, turnBox, turnMargin, turnPoint, turnPort, turnRegion, turnSide, verdict };
4455
+ export { BALANCE_MEASURE_SUFFIXES, BALANCE_SIDE_DEPTH, CORPUS_DIMENSIONS, DEFAULT_FAMILY_BY, DEFAULT_RNG, DEFAULT_SHAPES, DEFAULT_TOLERANCE, EDGES_STEP, EDGE_DENSITY, EDGE_STEP_VERSION, EPS, FAMILY_ANY_KIND, INVALIDATED_FIELD, JOINT_MEASURES, JOINT_MOVED_MIN, PACK_HARD_RULES, RECORD_EPS, RECORD_SCALE, RECT_SCATTERED, SHAPE_KINDS, SHAPE_KIND_IDS, SIDES, SPLIT_SCHEMA, STRATEGY_SPACE_SCHEMA, VERDICT_DRAWS, VERDICT_EXACT_CAP, VERDICT_EXACT_MAX, VERDICT_RUNS, VERDICT_SEED, applyPack, balanceMeasureSpecs, balanceMeasures, balanceOf, boundsOf, boxArea, canonicalConfig, canonicalInput, canonicalJson, checkConfig, checkDeclared, checkInput, checkLayoutRecord, checkShapes, checkSpace, checkSplit, compareMeasure, composeFamily, configId, corpusHashOf, countObstacleHits, countOutside, countOverlaps, countPortsOffBorder, createFamilyRegistry, declaredClaimOf, declaredCounts, dimensionAt, dimensionSupports, dimensionUnit, documentHash, edgeStep, enumerateSpace, exercised, familyKind, familyOf, fnv1a32, grow, isShapeKind, itemShapeOf, joinConfigs, leaveOneSeedOut, levelsOf, marginSides, minEffectOf, mulberry32, nearestGaps, outputGroups, outputHash, overlapOf, ownerDimension, packHard, packLinks, paramActive, paramLevels, paramProblem, paramValue, parseLayoutRecord, perChange, pickMoves, placedRect, portPoint, portfolio, procrustesOf, productSpace, randomInt, rectInRegion, regionArea, regionHitsRect, resolveDimensions, ruleLevel, selectBest, sha256Hex, shapeKindOf, shapeKindProblem, shapeKindsOf, shapeLevel, shapeSupportProblems, shapesOf, sharedDimension, spaceShapeKinds, spaceSize, splitConfig, splitFileName, splitFolds, stepRandom, toLayoutRecord, toPackInput, toRect, toSizedRect, translate, turnBox, turnMargin, turnPoint, turnPort, turnRegion, turnSide, verdict };
4433
4456
 
4434
4457
  //# sourceMappingURL=index.js.map