@mark1russell7/packing 0.1.7 → 0.2.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 +1 -1
- package/build/index.d.ts +46 -219
- package/build/index.d.ts.map +1 -1
- package/build/index.js +166 -279
- package/build/index.js.map +1 -1
- package/package.json +5 -2
- package/src/adapters.ts +16 -13
- package/src/check.ts +34 -27
- package/src/contract.ts +30 -192
- package/src/convert.ts +11 -15
- package/src/corpus.ts +3 -3
- package/src/frame.ts +37 -50
- package/src/generators.ts +11 -12
- package/src/index.ts +7 -3
- package/src/layout-input.ts +34 -43
- package/src/measures.ts +12 -15
- package/src/strategy.ts +3 -3
package/README.md
CHANGED
|
@@ -105,7 +105,7 @@ checkHard(input, output); // { "no-overlap": 0, "in-container": 0, "locked-kept"
|
|
|
105
105
|
- `fixed` is `size`, `width`, `height` or `none`. A fixed height turns the axes. The value `none` uses the size search `logSweep`, which wraps `packFree`.
|
|
106
106
|
- Each strategy declares its cells in `supports`. `cellOf(input)` gives the cell of an input. A strategy throws `UnsupportedCell` for an input outside its cells.
|
|
107
107
|
- The strategies of this version do not turn items, read groups or pack shapes. A turnable item, a group or a shape gives `UnsupportedCell`.
|
|
108
|
-
- `checkHard` counts the breaks of the hard rules: `no-overlap`, `in-container`, `locked-kept` and `complete`.
|
|
108
|
+
- `checkHard` counts the breaks of the hard rules: `no-overlap`, `in-container`, `locked-kept` and `complete`. It reads the true shape of each obstacle, as `packHard` of `@mark1russell7/layout-contract` does.
|
|
109
109
|
- `fromRects` and `toRects` connect the interface to the `Rect` objects.
|
|
110
110
|
|
|
111
111
|
`docs/PACKER.md` in the repository gives the interface in full.
|
package/build/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DEFAULT_TOLERANCE, Direction, Direction as Direction$1, EPS, Item, Item as Item$1, LayoutContainer, LayoutContainer as LayoutContainer$1, LayoutEdge, LayoutEdge as LayoutEdge$1, LayoutGenerator, LayoutInput, LayoutInput as LayoutInput$1, Margin, MeasureSpec as MeasureSpec$1, Obstacle, PackHard, PackHard as PackHard$1, PackInput, PackOutput, Placement, Port, RECORD_EPS, Region, Side, Sides, Sides as Sides$1, StageTrace, Tolerance, checkInput, turnPoint, turnPort, turnRegion } from "@mark1russell7/layout-contract";
|
|
1
2
|
/** A mutable two-dimensional vector. */
|
|
2
3
|
export declare class Vector {
|
|
3
4
|
#private;
|
|
@@ -258,186 +259,30 @@ interface MetricsOptions {
|
|
|
258
259
|
* ```
|
|
259
260
|
*/
|
|
260
261
|
export declare function packingMetrics(rects: readonly Rect[], options?: MetricsOptions): PackingMetrics;
|
|
261
|
-
/** A region. The forms and the rules are those of `docs/FORMAT.md`. The y axis points down. */
|
|
262
|
-
type Region = {
|
|
263
|
-
kind: "rect";
|
|
264
|
-
x: number;
|
|
265
|
-
y: number;
|
|
266
|
-
w: number;
|
|
267
|
-
h: number;
|
|
268
|
-
} | {
|
|
269
|
-
kind: "polygon";
|
|
270
|
-
points: [number, number][];
|
|
271
|
-
holes?: [number, number][][];
|
|
272
|
-
} | {
|
|
273
|
-
kind: "circle";
|
|
274
|
-
cx: number;
|
|
275
|
-
cy: number;
|
|
276
|
-
r: number;
|
|
277
|
-
} | {
|
|
278
|
-
kind: "ellipse";
|
|
279
|
-
cx: number;
|
|
280
|
-
cy: number;
|
|
281
|
-
rx: number;
|
|
282
|
-
ry: number;
|
|
283
|
-
};
|
|
284
|
-
/** The container of a packing. */
|
|
285
|
-
interface Container {
|
|
286
|
-
/** The width. Without it, the packer searches the width. */
|
|
287
|
-
w?: number;
|
|
288
|
-
/** The height. Without it, the packer searches the height. */
|
|
289
|
-
h?: number;
|
|
290
|
-
/** The sides that stay: `size` keeps `w` and `h`, `width` keeps `w`, `height` keeps `h`, and `none` searches both. */
|
|
291
|
-
fixed: "size" | "width" | "height" | "none";
|
|
292
|
-
/** The target aspect (the width divided by the height) for the value `none` of `fixed`. The default is 1. */
|
|
293
|
-
aspect?: number;
|
|
294
|
-
/** The weight of the aspect error in the objective. The value 0 gives the least area. The default is 1. */
|
|
295
|
-
aspectWeight?: number;
|
|
296
|
-
/** The shape. Without it, the container is the rectangle from 0, 0 to `w`, `h`. */
|
|
297
|
-
shape?: Region;
|
|
298
|
-
/** The space between the border and the items with their margins. The default is 0. */
|
|
299
|
-
inset?: number;
|
|
300
|
-
}
|
|
301
|
-
/** An obstacle: an area that no item enters. */
|
|
302
|
-
interface Obstacle {
|
|
303
|
-
id: string;
|
|
304
|
-
region: Region;
|
|
305
|
-
/** Without it, the obstacle stays. With it, the packer can move the obstacle for `cost` times the distance. */
|
|
306
|
-
move?: {
|
|
307
|
-
cost: number;
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
/** The margin of an item on each side. */
|
|
311
|
-
interface Margin {
|
|
312
|
-
top: number;
|
|
313
|
-
right: number;
|
|
314
|
-
bottom: number;
|
|
315
|
-
left: number;
|
|
316
|
-
}
|
|
317
|
-
/** A port on the border of an item. */
|
|
318
|
-
interface Port {
|
|
319
|
-
id: string;
|
|
320
|
-
side: "top" | "right" | "bottom" | "left";
|
|
321
|
-
/** The point on the border of the item, relative to its top-left corner. Without it, the router chooses the point. */
|
|
322
|
-
x?: number;
|
|
323
|
-
y?: number;
|
|
324
|
-
}
|
|
325
|
-
/** An item to pack. The file format names it a box. */
|
|
326
|
-
interface Item {
|
|
327
|
-
id: string;
|
|
328
|
-
w: number;
|
|
329
|
-
h: number;
|
|
330
|
-
/** The reading order. Without it, the index in the array is the rank. */
|
|
331
|
-
rank?: number;
|
|
332
|
-
group?: string;
|
|
333
|
-
parent?: string;
|
|
334
|
-
/** A shape relative to the origin of the item. Without it, the item is the rectangle `w` by `h`. */
|
|
335
|
-
shape?: Region;
|
|
336
|
-
/** A locked item keeps `x` and `y`. The packer reads it as an obstacle. */
|
|
337
|
-
locked?: boolean;
|
|
338
|
-
x?: number;
|
|
339
|
-
y?: number;
|
|
340
|
-
/** The value `true` lets the packer turn the item by 90 degrees. The default is `false`. */
|
|
341
|
-
turnable?: boolean;
|
|
342
|
-
/** A ring around the item that no other item and no route enters. The default is 0. */
|
|
343
|
-
margin?: number | Margin;
|
|
344
|
-
/** The ports. The packer keeps them, and turns them with the item. */
|
|
345
|
-
ports?: Port[];
|
|
346
|
-
/** The free data of the item. The packer does not read it, and the turn and the converters keep it. */
|
|
347
|
-
data?: Readonly<Record<string, unknown>>;
|
|
348
|
-
}
|
|
349
|
-
/** The input of a packing: a `layout-input/1` file without `edges`, with `items` for `boxes`. */
|
|
350
|
-
interface PackInput {
|
|
351
|
-
container: Container;
|
|
352
|
-
items: Item[];
|
|
353
|
-
obstacles?: Obstacle[];
|
|
354
|
-
/** The free space between two items with their margins. Routes use this space. The default is 0. */
|
|
355
|
-
gap?: number;
|
|
356
|
-
}
|
|
357
|
-
/** The position of one item after the packing. */
|
|
358
|
-
interface Placement {
|
|
359
|
-
id: string;
|
|
360
|
-
x: number;
|
|
361
|
-
y: number;
|
|
362
|
-
/** The turn: 0 or 90, only for an item with `turnable` set to `true`. */
|
|
363
|
-
turn?: 0 | 90;
|
|
364
|
-
}
|
|
365
|
-
/** The facts of one stage of a packing. */
|
|
366
|
-
interface StageTrace {
|
|
367
|
-
/** The id of the stage, for example `skyline` or `log-sweep`. */
|
|
368
|
-
id: string;
|
|
369
|
-
/** The time of the stage in milliseconds. */
|
|
370
|
-
ms: number;
|
|
371
|
-
/** The measures of the stage, by the names of `docs/FORMAT.md`. */
|
|
372
|
-
measures: Record<string, number>;
|
|
373
|
-
}
|
|
374
|
-
/** The output of a packing. The output does not change the input. */
|
|
375
|
-
interface PackOutput {
|
|
376
|
-
placements: Placement[];
|
|
377
|
-
/** The ids of the items that the packer did not place. */
|
|
378
|
-
overflow: string[];
|
|
379
|
-
/** The size of the container after the packing. For a free size, the size that the search found. */
|
|
380
|
-
size: {
|
|
381
|
-
w: number;
|
|
382
|
-
h: number;
|
|
383
|
-
};
|
|
384
|
-
/** The new positions of the obstacles that moved. */
|
|
385
|
-
moved: {
|
|
386
|
-
id: string;
|
|
387
|
-
x: number;
|
|
388
|
-
y: number;
|
|
389
|
-
}[];
|
|
390
|
-
/** The facts of each stage, for the site and the records. */
|
|
391
|
-
trace: StageTrace[];
|
|
392
|
-
}
|
|
393
|
-
/** The tolerances of the hard rules. */
|
|
394
|
-
interface Tolerance {
|
|
395
|
-
/** The rule `no-overlap`: two boxes overlap only by more than this value. */
|
|
396
|
-
overlap: number;
|
|
397
|
-
/** The router rule that a route does not go through a box. */
|
|
398
|
-
through: number;
|
|
399
|
-
}
|
|
400
|
-
/** The tolerance for the comparison of two numbers in an engine. */
|
|
401
|
-
export declare const EPS = 1e-6;
|
|
402
|
-
/** The tolerance for the comparison of two numbers of a file. The files round to 3 decimals. */
|
|
403
|
-
export declare const RECORD_EPS = .001;
|
|
404
|
-
/** The default tolerances of the hard rules. Each record writes its tolerances in its top-level field `tolerance`. */
|
|
405
|
-
export declare const DEFAULT_TOLERANCE: Readonly<Tolerance>;
|
|
406
262
|
/** This function gives the margin of an item on each side. A number is the same margin on each side. */
|
|
407
|
-
export declare function marginOf(item: Pick<Item, "margin">):
|
|
408
|
-
/** This function gives the point `px`, `py` of an item of height `h` after a turn of 90 degrees clockwise. */
|
|
409
|
-
export declare function turnPoint(px: number, py: number, h: number): [number, number];
|
|
410
|
-
/** This function turns a port of an item of height `h` by 90 degrees clockwise. The side turns from top to right. */
|
|
411
|
-
export declare function turnPort(port: Port, h: number): Port;
|
|
412
|
-
/** This function turns a region relative to an item of height `h` by 90 degrees clockwise. */
|
|
413
|
-
export declare function turnRegion(region: Region, h: number): Region;
|
|
263
|
+
export declare function marginOf(item: Pick<Item$1, "margin">): Sides$1;
|
|
414
264
|
/**
|
|
415
265
|
* This function gives an item after a turn of 90 degrees clockwise, with the y axis down (decision 1 of
|
|
416
266
|
* `docs/PACKER.md`). The width and the height change places. The top-left corner, the id and the other fields stay.
|
|
417
267
|
* The ports, the shape and the margin turn with the item. The function does not change its argument.
|
|
268
|
+
* It is `turnBox` of the contract.
|
|
418
269
|
*/
|
|
419
|
-
export declare function turnItem(item: Item): Item;
|
|
420
|
-
/** The direction of a measure: `lower` when a lower value is better, `higher` when a higher value is better. */
|
|
421
|
-
type Direction = "lower" | "higher";
|
|
270
|
+
export declare function turnItem(item: Item$1): Item$1;
|
|
422
271
|
/** The family of a measure. Each family has a section in `docs/MEASURES.md`. */
|
|
423
272
|
type MeasureFamily = "density" | "aspect" | "order" | "raggedness" | "overflow" | "stability" | "determinism" | "speed";
|
|
424
273
|
/** The id of a measure of the packer. The ids are those of `docs/FORMAT.md`, and `highways` uses the same ids. */
|
|
425
274
|
type MeasureId = "pack.area" | "pack.fill" | "pack.whitespace" | "pack.aspect" | "pack.aspectError" | "pack.order.inversions" | "pack.order.breaks" | "pack.raggedness" | "pack.overflow" | "pack.stability.moved" | "pack.stability.mean" | "pack.stability.q95" | "pack.deterministic" | "pack.search.widths" | "pack.search.ms";
|
|
426
|
-
/**
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
/** The lowest value. */
|
|
433
|
-
min: number;
|
|
434
|
-
/** The highest value. The value `Infinity` tells that the measure has no upper limit. */
|
|
435
|
-
max: number;
|
|
275
|
+
/**
|
|
276
|
+
* The facts of one measure: its family, its unit, its direction and its range.
|
|
277
|
+
* It is `MeasureSpec` of the contract for a packer measure id, with a family.
|
|
278
|
+
*/
|
|
279
|
+
interface MeasureSpec extends MeasureSpec$1<MeasureId> {
|
|
280
|
+
readonly family: MeasureFamily;
|
|
436
281
|
/**
|
|
437
282
|
* The floor is the best value of a guard measure. The floor rule of `docs/PROMOTION.md` of `highways` reads it. Each
|
|
438
283
|
* guard of the packer has the floor 0. A measure without a floor has no floor rule.
|
|
439
284
|
*/
|
|
440
|
-
floor?: number;
|
|
285
|
+
readonly floor?: number;
|
|
441
286
|
/**
|
|
442
287
|
* The tolerance is the absolute tolerance at the floor. A candidate within the tolerance ties with a default at the floor.
|
|
443
288
|
*
|
|
@@ -446,7 +291,7 @@ interface MeasureSpec {
|
|
|
446
291
|
* - `pack.stability.mean` has 0.005 container widths, and `pack.stability.q95` has 0.01. The default often moves no item.
|
|
447
292
|
* - `pack.stability.moved` has 0.02: 2% of the items that stay. On a small change, the default often moves no item.
|
|
448
293
|
*/
|
|
449
|
-
tol?: number;
|
|
294
|
+
readonly tol?: number;
|
|
450
295
|
}
|
|
451
296
|
/** The measures of one layout, by id. `measure` gives them. The values are not rounded. */
|
|
452
297
|
interface LayoutMeasures {
|
|
@@ -528,7 +373,7 @@ export declare function roundMeasures<T extends object>(measures: T): T;
|
|
|
528
373
|
* - When both values are 0, the ratio is 1. When only the divisor is 0, the ratio is `Infinity`.
|
|
529
374
|
* - The values are 0 or more. A negative value or `NaN` throws a `RangeError`.
|
|
530
375
|
*/
|
|
531
|
-
export declare function pairedRatio(candidate: number, current: number, direction: Direction): number;
|
|
376
|
+
export declare function pairedRatio(candidate: number, current: number, direction: Direction$1): number;
|
|
532
377
|
/**
|
|
533
378
|
* This function gives the quantile `q` of a list of numbers, with linear interpolation between the sorted values. The
|
|
534
379
|
* position in the sorted list is `(n - 1) * q`. An empty list or a `q` outside 0 to 1 throws a `RangeError`.
|
|
@@ -703,13 +548,6 @@ export declare function strategy(id: string): Strategy;
|
|
|
703
548
|
* context gets `mulberry32` with the seed. The default seed is 0.
|
|
704
549
|
*/
|
|
705
550
|
export declare function packWith(id: string, input: PackInput, options?: unknown, seed?: number): PackOutput;
|
|
706
|
-
/** The count of the breaks of each hard rule of the packer (`docs/FORMAT.md`). A good run has 0 for each rule. */
|
|
707
|
-
interface HardBreaks {
|
|
708
|
-
"no-overlap": number;
|
|
709
|
-
"in-container": number;
|
|
710
|
-
"locked-kept": number;
|
|
711
|
-
complete: number;
|
|
712
|
-
}
|
|
713
551
|
/**
|
|
714
552
|
* This function counts the breaks of the 4 hard rules of the packer for an output.
|
|
715
553
|
*
|
|
@@ -720,52 +558,38 @@ interface HardBreaks {
|
|
|
720
558
|
* - `complete`: each item with no placement that is not in the overflow. A locked item breaks `locked-kept` in its place.
|
|
721
559
|
*
|
|
722
560
|
* A locked item with no placement stays at its input position for `no-overlap` and `in-container`. A locked item with no
|
|
723
|
-
* `x` or no `y` in the input is
|
|
561
|
+
* `x` or no `y` in the input is a bad input. The rules skip it, as `packHard` of the contract does. `checkInput` finds it.
|
|
724
562
|
*
|
|
725
|
-
* The
|
|
726
|
-
*
|
|
563
|
+
* The test of an obstacle is exact: a circle, an ellipse and a polygon with holes count only their insides, as in `packHard`.
|
|
564
|
+
* The rules read a shape of the container or of an item as its bounding box (decision 5). The bounding box of an item
|
|
565
|
+
* shape is relative to the position of the item. The result has no tolerance in it.
|
|
727
566
|
*/
|
|
728
|
-
export declare function checkHard(input: PackInput, output: PackOutput, tolerance?: Pick<Tolerance, "overlap">):
|
|
729
|
-
/** An edge between two boxes. The router reads it, and the packer ignores it. */
|
|
730
|
-
interface Edge {
|
|
731
|
-
id: string;
|
|
732
|
-
source: string;
|
|
733
|
-
target: string;
|
|
734
|
-
sourcePort?: string;
|
|
735
|
-
targetPort?: string;
|
|
736
|
-
/** The free data of the edge. The packer does not read it. */
|
|
737
|
-
data?: Readonly<Record<string, unknown>>;
|
|
738
|
-
}
|
|
567
|
+
export declare function checkHard(input: PackInput, output: PackOutput, tolerance?: Pick<Tolerance, "overlap">): PackHard$1;
|
|
739
568
|
/** The parameters of a generator: a name and a string or a number for each parameter. */
|
|
740
569
|
type GeneratorParams = Record<string, string | number>;
|
|
741
|
-
/**
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
570
|
+
/**
|
|
571
|
+
* The stamp of a generated input: the generator, its version, the full parameters and the seed.
|
|
572
|
+
* It is `LayoutGenerator` of the contract with a string or a number for each parameter.
|
|
573
|
+
*/
|
|
574
|
+
interface GeneratorStamp extends LayoutGenerator {
|
|
575
|
+
readonly params: Readonly<GeneratorParams>;
|
|
747
576
|
}
|
|
748
|
-
/**
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
577
|
+
/**
|
|
578
|
+
* A generated input file `layout-input/1`. It is a `LayoutInput` with each field that a generator writes.
|
|
579
|
+
* `docs/FORMAT.md` gives each field.
|
|
580
|
+
*/
|
|
581
|
+
interface GeneratedInput extends LayoutInput$1 {
|
|
582
|
+
readonly set: string;
|
|
583
|
+
readonly family: string;
|
|
584
|
+
readonly seed: number;
|
|
755
585
|
/** The origin: `made-up`, `published:<set>` or `known-best:<construction>`. */
|
|
756
|
-
source: string;
|
|
586
|
+
readonly source: string;
|
|
757
587
|
/** The generator of a generated input. A hand-made or published input has `null`. */
|
|
758
|
-
generator: GeneratorStamp | null;
|
|
759
|
-
container:
|
|
760
|
-
|
|
761
|
-
gap?: number;
|
|
762
|
-
boxes: Item[];
|
|
763
|
-
edges: Edge[];
|
|
764
|
-
base?: string;
|
|
765
|
-
change?: string;
|
|
766
|
-
step?: number;
|
|
588
|
+
readonly generator: GeneratorStamp | null;
|
|
589
|
+
readonly container: LayoutContainer$1;
|
|
590
|
+
readonly edges: readonly LayoutEdge$1[];
|
|
767
591
|
/** The first 16 hex characters of the SHA-256 of the canonical form of the other fields. */
|
|
768
|
-
hash: string;
|
|
592
|
+
readonly hash: string;
|
|
769
593
|
}
|
|
770
594
|
/** The layout of the obstacles (`docs/research/TAXONOMY.md`, dimension 3). */
|
|
771
595
|
type ObstacleLayout = "none" | "center" | "scattered" | "wall" | "corridors" | "touching" | "edge";
|
|
@@ -793,11 +617,14 @@ export declare function round3(x: number): number;
|
|
|
793
617
|
*/
|
|
794
618
|
export declare function canonicalJson(value: unknown): string;
|
|
795
619
|
/** This function gives the hash of an input file: the first 16 hex characters of the SHA-256 of its canonical form without `hash`. */
|
|
796
|
-
export declare function hashInput(file:
|
|
620
|
+
export declare function hashInput(file: LayoutInput$1): string;
|
|
797
621
|
/** This function gives the scale of a count: the nearest of 1, 10, 100, 1000 and 10000 on a log scale. The count 0 gives `1`. */
|
|
798
622
|
export declare function countCell(count: number): CountScale;
|
|
799
|
-
/**
|
|
800
|
-
|
|
623
|
+
/**
|
|
624
|
+
* This function gives the packing input of a file. The boxes become the items, and the edges go.
|
|
625
|
+
* A file without a container gets `{ fixed: "none" }`, so the packer picks the size. It is `toPackInput` of the contract.
|
|
626
|
+
*/
|
|
627
|
+
export declare function toPackInput(file: Pick<LayoutInput$1, "container" | "boxes" | "obstacles" | "gap">): PackInput;
|
|
801
628
|
/** A seeded generator of `layout-input/1` files. The same version, parameters and seed give the same file, byte for byte. */
|
|
802
629
|
interface CorpusGenerator<P extends GeneratorParams = GeneratorParams> {
|
|
803
630
|
/** The name. The file writes it in `generator.name`. */
|
|
@@ -815,7 +642,7 @@ interface CorpusGenerator<P extends GeneratorParams = GeneratorParams> {
|
|
|
815
642
|
/** This method gives the cell of each input of the parameters. The cell does not depend on the seed. */
|
|
816
643
|
cell(params?: Partial<P>): CorpusCell;
|
|
817
644
|
/** This method gives the input file of a seed. The `id` is `<set>/<family>/s<seed>`. */
|
|
818
|
-
generate(seed: number, params?: Partial<P>, set?: string):
|
|
645
|
+
generate(seed: number, params?: Partial<P>, set?: string): GeneratedInput;
|
|
819
646
|
}
|
|
820
647
|
/** The parameters of `rect-scattered`. */
|
|
821
648
|
type RectScatteredParams = {
|
|
@@ -903,12 +730,12 @@ interface CorpusManifest {
|
|
|
903
730
|
/** A corpus: the manifest and the input files, in the order of the specs and the seeds. */
|
|
904
731
|
interface Corpus {
|
|
905
732
|
manifest: CorpusManifest;
|
|
906
|
-
inputs:
|
|
733
|
+
inputs: GeneratedInput[];
|
|
907
734
|
}
|
|
908
735
|
/**
|
|
909
736
|
* This function generates a corpus from specs. Each input gets the name of the corpus as its set. The function throws a
|
|
910
737
|
* `RangeError` for an unknown generator, a different version or 2 inputs with the same id.
|
|
911
738
|
*/
|
|
912
739
|
export declare function corpus(name: string, specs: readonly CorpusSpec[]): Corpus;
|
|
913
|
-
export type
|
|
740
|
+
export { type Cell, type ChangeMeasures, type Corpus, type CorpusCell, type CorpusEntry, type CorpusGenerator, type CorpusManifest, type CorpusSpec, type CountScale, DEFAULT_TOLERANCE, type Dimension, type DimensionValue, type Direction, EPS, type EdgeCase, type EdgeCaseParams, type FreeWidthOptions, type FreeWidthResult, type FreeWidthTry, type GeneratedInput, type GeneratorParams, type GeneratorStamp, type Item, type LayoutContainer, type LayoutEdge, type LayoutInput, type LayoutMeasures, type LayoutStrategyOptions, type Margin, type MeasureFamily, type MeasureId, type MeasureOptions, type MeasureSpec, type MetricsOptions, type Obstacle, type ObstacleLayout, type PackContext, type PackHard, type PackInput, type PackLayoutOptions, type PackOptions, type PackOutput, type PackingMetrics, type Placement, type Port, type PushOptions, type PushStrategyOptions, RECORD_EPS, type RectGridParams, type RectScatteredParams, type Region, type ShelfOptions, type Side, type Sides, type SizeDistribution, type SizeSearch, type SortOrder, type StageTrace, type Strategy, type Supports, type Tolerance, type UiParams, checkInput, turnPoint, turnPort, turnRegion };
|
|
914
741
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/vector.ts","../src/rect.ts","../src/order.ts","../src/pack.ts","../src/skyline.ts","../src/shelf.ts","../src/free.ts","../src/push.ts","../src/metrics.ts","../src/contract.ts","../src/measures.ts","../src/strategy.ts","../src/adapters.ts","../src/convert.ts","../src/registry.ts","../src/check.ts","../src/layout-input.ts","../src/generators.ts","../src/corpus.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["Item","Sides","ContractMeasureSpec","Direction","PackHard","LayoutContainer","LayoutEdge","LayoutInput"],"sources":["../src/vector.ts","../src/rect.ts","../src/order.ts","../src/pack.ts","../src/skyline.ts","../src/shelf.ts","../src/free.ts","../src/push.ts","../src/metrics.ts","../src/contract.ts","../src/measures.ts","../src/strategy.ts","../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