@expofp/wayfinding-compiler 0.0.0-experimental.3b0db16 → 0.0.0-stage
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 +2 -445
- package/package.json +3 -34
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -3
- package/dist/lib/attach.d.ts +0 -43
- package/dist/lib/attach.js +0 -199
- package/dist/lib/axes.d.ts +0 -76
- package/dist/lib/axes.js +0 -103
- package/dist/lib/blockers.d.ts +0 -134
- package/dist/lib/blockers.js +0 -289
- package/dist/lib/cell-array.d.ts +0 -14
- package/dist/lib/cell-array.js +0 -25
- package/dist/lib/compile-layer.d.ts +0 -41
- package/dist/lib/compile-layer.js +0 -241
- package/dist/lib/compile-wayfinding.d.ts +0 -90
- package/dist/lib/compile-wayfinding.js +0 -203
- package/dist/lib/connect.d.ts +0 -35
- package/dist/lib/connect.js +0 -206
- package/dist/lib/diagnostics.d.ts +0 -190
- package/dist/lib/diagnostics.js +0 -634
- package/dist/lib/doorways.d.ts +0 -78
- package/dist/lib/doorways.js +0 -331
- package/dist/lib/emit-network.d.ts +0 -47
- package/dist/lib/emit-network.js +0 -105
- package/dist/lib/emit-v1.d.ts +0 -31
- package/dist/lib/emit-v1.js +0 -56
- package/dist/lib/entries.d.ts +0 -123
- package/dist/lib/entries.js +0 -448
- package/dist/lib/floor-grids.d.ts +0 -48
- package/dist/lib/floor-grids.js +0 -185
- package/dist/lib/framing.d.ts +0 -20
- package/dist/lib/framing.js +0 -187
- package/dist/lib/geom/boolean-ops.d.ts +0 -21
- package/dist/lib/geom/boolean-ops.js +0 -1
- package/dist/lib/geom/clipper2-ops.d.ts +0 -7
- package/dist/lib/geom/clipper2-ops.js +0 -50
- package/dist/lib/geom/footprint.d.ts +0 -26
- package/dist/lib/geom/footprint.js +0 -203
- package/dist/lib/geom/frames.d.ts +0 -116
- package/dist/lib/geom/frames.js +0 -233
- package/dist/lib/geom/mesh-outline.d.ts +0 -13
- package/dist/lib/geom/mesh-outline.js +0 -90
- package/dist/lib/geom/normalize.d.ts +0 -28
- package/dist/lib/geom/normalize.js +0 -118
- package/dist/lib/geom/point-key.d.ts +0 -16
- package/dist/lib/geom/point-key.js +0 -15
- package/dist/lib/geom/primitives.d.ts +0 -105
- package/dist/lib/geom/primitives.js +0 -184
- package/dist/lib/geom/split-crossings.d.ts +0 -14
- package/dist/lib/geom/split-crossings.js +0 -171
- package/dist/lib/geom/types.d.ts +0 -9
- package/dist/lib/geom/types.js +0 -1
- package/dist/lib/geom/walls.d.ts +0 -31
- package/dist/lib/geom/walls.js +0 -71
- package/dist/lib/graph-invariants.d.ts +0 -49
- package/dist/lib/graph-invariants.js +0 -129
- package/dist/lib/graph-types.d.ts +0 -143
- package/dist/lib/graph-types.js +0 -7
- package/dist/lib/mask.d.ts +0 -54
- package/dist/lib/mask.js +0 -210
- package/dist/lib/min-heap.d.ts +0 -24
- package/dist/lib/min-heap.js +0 -73
- package/dist/lib/network-build.d.ts +0 -21
- package/dist/lib/network-build.js +0 -4
- package/dist/lib/network-graph.d.ts +0 -80
- package/dist/lib/network-graph.js +0 -467
- package/dist/lib/network-sizes.d.ts +0 -29
- package/dist/lib/network-sizes.js +0 -22
- package/dist/lib/network-store.d.ts +0 -173
- package/dist/lib/network-store.js +0 -430
- package/dist/lib/openings.d.ts +0 -54
- package/dist/lib/openings.js +0 -387
- package/dist/lib/place-path.d.ts +0 -47
- package/dist/lib/place-path.js +0 -346
- package/dist/lib/post-passes.d.ts +0 -31
- package/dist/lib/post-passes.js +0 -305
- package/dist/lib/reachability.d.ts +0 -58
- package/dist/lib/reachability.js +0 -220
- package/dist/lib/report.d.ts +0 -49
- package/dist/lib/report.js +0 -374
- package/dist/lib/router.d.ts +0 -111
- package/dist/lib/router.js +0 -388
- package/dist/lib/runs.d.ts +0 -92
- package/dist/lib/runs.js +0 -232
- package/dist/lib/scale.d.ts +0 -58
- package/dist/lib/scale.js +0 -185
- package/dist/lib/steiner-network.d.ts +0 -19
- package/dist/lib/steiner-network.js +0 -183
- package/dist/lib/strip.d.ts +0 -43
- package/dist/lib/strip.js +0 -200
- package/dist/lib/stubs.d.ts +0 -84
- package/dist/lib/stubs.js +0 -316
- package/dist/lib/transitions.d.ts +0 -72
- package/dist/lib/transitions.js +0 -191
- package/dist/lib/types.d.ts +0 -126
- package/dist/lib/types.js +0 -1
- package/dist/lib/validate-source.d.ts +0 -41
- package/dist/lib/validate-source.js +0 -133
- package/dist/lib/walkable.d.ts +0 -104
- package/dist/lib/walkable.js +0 -140
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import type { FootprintShape } from './geom/footprint.js';
|
|
2
|
-
import type { Vec2 } from './geom/types.js';
|
|
3
|
-
import type { WallEntryFact } from './geom/walls.js';
|
|
4
|
-
import type { InvariantFinding } from './graph-invariants.js';
|
|
5
|
-
import type { RouteNetwork } from './graph-types.js';
|
|
6
|
-
import type { Reachability } from './reachability.js';
|
|
7
|
-
import type { SingleFloorTransition, TransitionOrphan, TransitionPlan } from './transitions.js';
|
|
8
|
-
import type { WayfindingLayerSource } from './types.js';
|
|
9
|
-
import type { SourceIssue } from './validate-source.js';
|
|
10
|
-
import type { WalkableArea } from './walkable.js';
|
|
11
|
-
/** The stage a fact comes from, in the order the compile runs them. */
|
|
12
|
-
export type Stage = 'input' | 'scale' | 'normalize' | 'walkable' | 'network' | 'emit' | 'transitions' | 'reachability' | 'graph';
|
|
13
|
-
/**
|
|
14
|
-
* `error` — the plan or part of it cannot be read; `warning` — part of the result is lost or doubtful;
|
|
15
|
-
* `info` — what a stage did.
|
|
16
|
-
*/
|
|
17
|
-
export type Severity = 'error' | 'warning' | 'info';
|
|
18
|
-
/** The part of the source a fact is about. */
|
|
19
|
-
export interface SourceRef {
|
|
20
|
-
/** Which kind of source object it is. */
|
|
21
|
-
readonly kind: 'layer' | 'destination' | 'wall' | 'transition' | 'transition-stop';
|
|
22
|
-
/** The layer it belongs to. */
|
|
23
|
-
readonly layer?: string;
|
|
24
|
-
/** Index in the source array — a destination in its layer's `destinations`, a wall in `walls`. */
|
|
25
|
-
readonly index?: number;
|
|
26
|
-
/** The id the source gave, when it gave one. */
|
|
27
|
-
readonly id?: string;
|
|
28
|
-
}
|
|
29
|
-
/** Where to look on the plan, in plan units. */
|
|
30
|
-
export type Highlight = {
|
|
31
|
-
readonly type: 'bounds';
|
|
32
|
-
readonly layer: string;
|
|
33
|
-
readonly box: readonly [number, number, number, number];
|
|
34
|
-
} | {
|
|
35
|
-
readonly type: 'point';
|
|
36
|
-
readonly layer: string;
|
|
37
|
-
readonly at: readonly [number, number];
|
|
38
|
-
}
|
|
39
|
-
/** Indices into `graph.lines`. */
|
|
40
|
-
| {
|
|
41
|
-
readonly type: 'lines';
|
|
42
|
-
readonly layer: string;
|
|
43
|
-
readonly lines: readonly number[];
|
|
44
|
-
};
|
|
45
|
-
/** One technical fact of the compile. Plain data. */
|
|
46
|
-
export interface Diagnostic {
|
|
47
|
-
/** Catalog code. */
|
|
48
|
-
readonly code: string;
|
|
49
|
-
/** What the fact says about the plan. */
|
|
50
|
-
readonly severity: Severity;
|
|
51
|
-
/** The stage it comes from. */
|
|
52
|
-
readonly stage: Stage;
|
|
53
|
-
/** One English sentence, technical. */
|
|
54
|
-
readonly message: string;
|
|
55
|
-
/** The layer it belongs to, when it belongs to one. */
|
|
56
|
-
readonly layer?: string;
|
|
57
|
-
/** The source object it is about, when there is one. */
|
|
58
|
-
readonly ref?: SourceRef;
|
|
59
|
-
/** Geometry to draw, in plan units. */
|
|
60
|
-
readonly geometry?: readonly Highlight[];
|
|
61
|
-
/** The stage's own numbers, as it computed them; lengths in meters, areas in m². */
|
|
62
|
-
readonly facts?: Readonly<Record<string, number | string | boolean | readonly number[] | readonly string[]>>;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* One POI's key among the facts: its floor and its place in that floor's source list.
|
|
66
|
-
* @param layer The floor.
|
|
67
|
-
* @param index The source position.
|
|
68
|
-
* @returns The key.
|
|
69
|
-
*/
|
|
70
|
-
export declare function poiKey(layer: string, index: number): string;
|
|
71
|
-
/**
|
|
72
|
-
* The validator's findings as facts of the input stage.
|
|
73
|
-
* @param issues What `validateWayfindingSource` returned.
|
|
74
|
-
* @returns One diagnostic per issue, in the validator's order.
|
|
75
|
-
*/
|
|
76
|
-
export declare function fromSourceIssues(issues: readonly SourceIssue[]): Diagnostic[];
|
|
77
|
-
/**
|
|
78
|
-
* The scale the plan was read at, when the plan did not state one.
|
|
79
|
-
* @param unitsPerMeter The source's `unitsPerMeter`.
|
|
80
|
-
* @returns A fact when the plan was read as meters by default.
|
|
81
|
-
*/
|
|
82
|
-
export declare function fromScale(unitsPerMeter: number | undefined): Diagnostic[];
|
|
83
|
-
/** What normalization did to one layer's drawing; destinations keyed by the id they compiled under. */
|
|
84
|
-
export interface NormalizeFacts {
|
|
85
|
-
/** The raw wall entries the cleaning changed, in entry order. */
|
|
86
|
-
readonly wallEntries: readonly WallEntryFact[];
|
|
87
|
-
/** How each footprint drawn as pieces got its ring. */
|
|
88
|
-
readonly shapes: readonly {
|
|
89
|
-
readonly id: string;
|
|
90
|
-
readonly how: FootprintShape;
|
|
91
|
-
readonly parts: number;
|
|
92
|
-
}[];
|
|
93
|
-
/** Destinations whose rings the walls cut back. */
|
|
94
|
-
readonly clipped: readonly string[];
|
|
95
|
-
/** Destinations made crossable, with the rule that did it and whom it was done for. */
|
|
96
|
-
readonly crossable: readonly {
|
|
97
|
-
readonly id: string;
|
|
98
|
-
readonly by: 'holds-another' | 'stands-before';
|
|
99
|
-
readonly victims?: readonly string[];
|
|
100
|
-
}[];
|
|
101
|
-
/** Entrances reached through a wall: where their docks cross it, in meters. */
|
|
102
|
-
readonly openings: readonly {
|
|
103
|
-
readonly id: string;
|
|
104
|
-
readonly by: 'crossing' | 'doorway' | 'nearby';
|
|
105
|
-
readonly at: readonly Vec2[];
|
|
106
|
-
readonly distance?: number;
|
|
107
|
-
}[];
|
|
108
|
-
/** Entrances inside the building that stand across no wall. */
|
|
109
|
-
readonly entrancesUnopened: readonly string[];
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* What normalization did to one layer's drawing before any geometry was built off it.
|
|
113
|
-
* @param source The layer as given.
|
|
114
|
-
* @param facts What the layer's normalization returned.
|
|
115
|
-
* @param ids The id each source position compiled under.
|
|
116
|
-
* @param unit Plan units per meter, for the facts' geometry.
|
|
117
|
-
* @returns Wall facts in entry order, then POI facts in source order.
|
|
118
|
-
*/
|
|
119
|
-
export declare function fromNormalize(source: WayfindingLayerSource, facts: NormalizeFacts, ids: readonly string[], unit?: number): Diagnostic[];
|
|
120
|
-
/**
|
|
121
|
-
* A floor too large to build routes over: it is left unbuilt rather than run the compile out of memory.
|
|
122
|
-
* @param layer The layer id.
|
|
123
|
-
* @param width The floor's extent across, in meters.
|
|
124
|
-
* @param height The floor's extent down, in meters.
|
|
125
|
-
* @param destinations How many POI the source puts on this floor.
|
|
126
|
-
* @returns One fact about the floor.
|
|
127
|
-
*/
|
|
128
|
-
export declare function fromOversize(layer: string, width: number, height: number, destinations: number): Diagnostic[];
|
|
129
|
-
/**
|
|
130
|
-
* What the walkable stage made of one floor, decided by the stage's counts rather than the rounded area.
|
|
131
|
-
* @param layer The layer id.
|
|
132
|
-
* @param stats The walkable stage's counts.
|
|
133
|
-
* @param destinations How many POI the source puts on this floor.
|
|
134
|
-
* @returns One fact about the floor.
|
|
135
|
-
*/
|
|
136
|
-
export declare function fromWalkable(layer: string, stats: WalkableArea['stats'], destinations: number): Diagnostic[];
|
|
137
|
-
/**
|
|
138
|
-
* What the route-network stage reported for one floor: POI left without a dock, and the part count
|
|
139
|
-
* before the emit.
|
|
140
|
-
* @param source The layer as given.
|
|
141
|
-
* @param stats The network stage's counts.
|
|
142
|
-
* @param unit Plan units per meter, for the facts' geometry.
|
|
143
|
-
* @param ids The id each source position compiled under; the source ids by default.
|
|
144
|
-
* @returns The facts, POI in source order.
|
|
145
|
-
*/
|
|
146
|
-
export declare function fromNetwork(source: WayfindingLayerSource, stats: RouteNetwork['stats'], unit?: number, ids?: readonly string[]): Diagnostic[];
|
|
147
|
-
/**
|
|
148
|
-
* What collapsed on the centimeter grid as one layer's network was emitted as v1 edges.
|
|
149
|
-
* @param source The layer as given.
|
|
150
|
-
* @param collapsed What `emitLayerV1` returned.
|
|
151
|
-
* @param collapsed.collapsedSegments Path segments skipped: both ends snap to one node.
|
|
152
|
-
* @param collapsed.collapsedDocks Docks whose line is lost while their `lineEnd` still stands.
|
|
153
|
-
* @param ids The id each source position compiled under; the source ids by default.
|
|
154
|
-
* @returns One fact for the segments, then one per collapsed dock, in dock order.
|
|
155
|
-
*/
|
|
156
|
-
export declare function fromEmit(source: WayfindingLayerSource, collapsed: {
|
|
157
|
-
collapsedSegments: number;
|
|
158
|
-
collapsedDocks: readonly string[];
|
|
159
|
-
}, ids?: readonly string[]): Diagnostic[];
|
|
160
|
-
/**
|
|
161
|
-
* The stops of a shaft that never reached the graph, and the shafts left joining nothing.
|
|
162
|
-
* @param orphans The orphans, in plan units.
|
|
163
|
-
* @param singleFloor Shafts whose attached stops all stand on one floor.
|
|
164
|
-
* @param unit Plan units per meter, for the shafts' geometry.
|
|
165
|
-
* @returns One fact per stop, then one per such shaft.
|
|
166
|
-
*/
|
|
167
|
-
export declare function fromTransitions(orphans: readonly TransitionOrphan[], singleFloor?: readonly SingleFloorTransition[], unit?: number): Diagnostic[];
|
|
168
|
-
/**
|
|
169
|
-
* Where each transition stop rides in: on the dock of the destination it stands in, or on a pad of its
|
|
170
|
-
* own; and a stop standing in several destinations, which rides in on the smallest.
|
|
171
|
-
* @param plan The stops as `planTransitions` resolved them, in meters.
|
|
172
|
-
* @param unit Plan units per meter, for the geometry.
|
|
173
|
-
* @returns One fact per stop, and a warning per ambiguous one.
|
|
174
|
-
*/
|
|
175
|
-
export declare function fromStops(plan: TransitionPlan, unit: number): Diagnostic[];
|
|
176
|
-
/**
|
|
177
|
-
* What the emitted graph connects, as facts: parts, POI off the main part, POI bound to nothing, and the
|
|
178
|
-
* ends the binding cannot settle.
|
|
179
|
-
* @param reachability What `readReachability` read off the graph.
|
|
180
|
-
* @param facts The input and stage facts so far, to check the binding against.
|
|
181
|
-
* @returns The facts, in part order and then POI order.
|
|
182
|
-
*/
|
|
183
|
-
export declare function fromReachability(reachability: Reachability, facts: readonly Diagnostic[]): Diagnostic[];
|
|
184
|
-
/**
|
|
185
|
-
* The emitted graph's breached invariants as facts of the graph stage; debug mode only.
|
|
186
|
-
* @param findings What `checkGraphInvariants` found.
|
|
187
|
-
* @returns One diagnostic per finding, in the checker's order.
|
|
188
|
-
*/
|
|
189
|
-
export declare function fromGraphInvariants(findings: readonly InvariantFinding[]): Diagnostic[];
|
|
190
|
-
//# sourceMappingURL=diagnostics.d.ts.map
|