@seatlayer/core 0.53.0 → 0.54.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 +2 -2
- package/dist/categoryInventory-B4xo7hE2.d.ts +109 -0
- package/dist/categoryInventory-lRtu3VjD.d.cts +109 -0
- package/dist/chunk-3QLFGEQY.js +1 -0
- package/dist/chunk-55NOSZK5.js +1 -0
- package/dist/chunk-6LIPQU4G.js +1 -0
- package/dist/chunk-6VTTBC5F.js +1 -0
- package/dist/chunk-7PT7OQUO.js +1 -0
- package/dist/chunk-AQKYUJBX.js +1 -0
- package/dist/chunk-CXF32VPG.js +1 -0
- package/dist/chunk-DDE7IOFT.js +1 -0
- package/dist/chunk-EQM4FFN5.js +1 -0
- package/dist/chunk-EYROIZGQ.js +1 -0
- package/dist/chunk-QUKWJQLR.js +1 -0
- package/dist/chunk-VDZ24QVV.js +1 -0
- package/dist/core/chart-ops/index.cjs +1 -0
- package/dist/core/chart-ops/index.d.cts +1235 -0
- package/dist/core/chart-ops/index.d.ts +1235 -0
- package/dist/core/chart-ops/index.js +1 -0
- package/dist/core/color.cjs +1 -0
- package/dist/core/color.d.cts +192 -0
- package/dist/core/color.d.ts +192 -0
- package/dist/core/color.js +1 -0
- package/dist/core/inventory/index.cjs +1 -0
- package/dist/core/inventory/index.d.cts +209 -0
- package/dist/core/inventory/index.d.ts +209 -0
- package/dist/core/inventory/index.js +1 -0
- package/dist/core/layout/index.cjs +1 -0
- package/dist/core/layout/index.d.cts +376 -0
- package/dist/core/layout/index.d.ts +376 -0
- package/dist/core/layout/index.js +1 -0
- package/dist/core/quality/index.cjs +1 -0
- package/dist/core/quality/index.d.cts +132 -0
- package/dist/core/quality/index.d.ts +132 -0
- package/dist/core/quality/index.js +1 -0
- package/dist/core/render-assets/index.cjs +1 -0
- package/dist/core/render-assets/index.d.cts +99 -0
- package/dist/core/render-assets/index.d.ts +99 -0
- package/dist/core/render-assets/index.js +1 -0
- package/dist/core/seatConfidence.cjs +1 -1
- package/dist/core/seatConfidence.d.cts +1 -1
- package/dist/core/seatConfidence.d.ts +1 -1
- package/dist/core/seatConfidence.js +1 -1
- package/dist/core/sections/index.cjs +1 -0
- package/dist/core/sections/index.d.cts +346 -0
- package/dist/core/sections/index.d.ts +346 -0
- package/dist/core/sections/index.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +39 -533
- package/dist/index.d.ts +39 -533
- package/dist/index.js +1 -1
- package/dist/labeling-CsPt1mC_.d.cts +90 -0
- package/dist/labeling-w8bl86cb.d.ts +90 -0
- package/dist/layout-B5UYbwnv.d.ts +181 -0
- package/dist/layout-YFmuxw_M.d.cts +181 -0
- package/dist/renderedQuality-CugJarFp.d.cts +113 -0
- package/dist/renderedQuality-DbZM034G.d.ts +113 -0
- package/dist/renderer-DhUHFtsI.d.cts +531 -0
- package/dist/renderer-IBi9YKWR.d.ts +531 -0
- package/dist/sections-B7cDF0Nq.d.cts +123 -0
- package/dist/sections-mLOZrGrI.d.ts +123 -0
- package/dist/segmentedRowModel-BPTnJ7Tz.d.ts +75 -0
- package/dist/segmentedRowModel-CGoH684F.d.cts +75 -0
- package/dist/ticketRestrictions-BwAebpSK.d.cts +72 -0
- package/dist/ticketRestrictions-ChHJwvTq.d.ts +72 -0
- package/dist/{types-tLOunI-B.d.cts → types-COfJorq_.d.cts} +233 -757
- package/dist/{types-tLOunI-B.d.ts → types-COfJorq_.d.ts} +233 -757
- package/dist/view3d/crossfade/panorama.d.cts +1 -1
- package/dist/view3d/crossfade/panorama.d.ts +1 -1
- package/dist/view3d/index.cjs +25 -25
- package/dist/view3d/index.d.cts +2 -1
- package/dist/view3d/index.d.ts +2 -1
- package/dist/view3d/index.js +27 -27
- package/package.json +94 -5
- package/dist/chunk-54A7LIL5.js +0 -1
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { P as Point, R as RowObject, S as SeatOverride } from '../../types-COfJorq_.js';
|
|
2
|
+
export { D as DEFAULT_SECTION_CORNER_SMOOTHING, M as MAX_EDGE_SAGITTA_RATIO, R as RelabelOptions, S as SectionOutlineDerivation, i as indexLabel, r as relabelRows, a as reverseSectionOutlinePath, s as sampleSectionOutlinePath, b as sectionCornerSmoothingPath, c as sectionOutlinePathFrom, d as sectionPathSegmentEnd, t as toBijectiveBase, e as toLetters, f as toRoman, g as transformSectionOutlinePath, h as translateSectionOutlinePath, v as validSectionOutlinePath } from '../../labeling-w8bl86cb.js';
|
|
3
|
+
export { SeatConfidenceDisclosure, seatConfidenceDisclosure } from '../seatConfidence.js';
|
|
4
|
+
import { S as SegmentedRowPlacement } from '../../segmentedRowModel-BPTnJ7Tz.js';
|
|
5
|
+
export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from '../../sections-mLOZrGrI.js';
|
|
6
|
+
import { E as ExpandedSeat } from '../../renderer-IBi9YKWR.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* THE bowl resolver — whether a floor's stands wrap a centre, and the smooth
|
|
10
|
+
* radial profile they wrap it with.
|
|
11
|
+
*
|
|
12
|
+
* A chart authors sections one at a time, and the 3D scene builder draws them
|
|
13
|
+
* one at a time, so a venue that is physically ONE continuous bowl renders as
|
|
14
|
+
* discrete blocks with dark voids between them. This module recovers the fact
|
|
15
|
+
* the author never states: these stands are rings of one bowl, and the bowl has
|
|
16
|
+
* a continuous inner edge, outer edge and deck level at every bearing — filled
|
|
17
|
+
* across the aisles and vomitories that separate the authored sections.
|
|
18
|
+
*
|
|
19
|
+
* Pure — no renderer types, no GL — for the same reason `venueStructure.ts` is:
|
|
20
|
+
* one resolver, consumed by the 3D scene (continuous bowl deck + derived shell)
|
|
21
|
+
* and by anything added later, so no consumer re-derives "is this a bowl" its
|
|
22
|
+
* own way. It is measured entirely from SEAT ROWS, never from section outlines:
|
|
23
|
+
* outlines carry authored margins and decoration, while rows are where the deck
|
|
24
|
+
* truthfully is (the lesson `surface.ts` already encodes).
|
|
25
|
+
*
|
|
26
|
+
* ## Model
|
|
27
|
+
*
|
|
28
|
+
* - The CENTRE is what the seating was struck about — the median of per-row
|
|
29
|
+
* circle fits when the rows are arcs (`fitCircle`, shared with the concentric
|
|
30
|
+
* model in `venueStructure`), else the seat centroid. Never the focal point:
|
|
31
|
+
* an end-stage hall's focal is the stage, not the bowl centre.
|
|
32
|
+
* - Bearings are binned (cw from +y, matching `templateGeom.polar`). Each ring
|
|
33
|
+
* of stands contributes, per bin, its innermost/outermost row radius, the
|
|
34
|
+
* deck level of each, and a small radial level profile in between.
|
|
35
|
+
* - Sections cluster into RINGS by radial-interval overlap, so a lower bowl,
|
|
36
|
+
* a loge line and an upper tier stay three rings instead of one smeared
|
|
37
|
+
* annulus.
|
|
38
|
+
* - Aisle/vomitory gaps up to {@link GAP_FILL_BINS} bins are interpolated —
|
|
39
|
+
* that interpolation IS the continuity this module exists to provide. Larger
|
|
40
|
+
* gaps split a ring into open arcs (an end-stage horseshoe keeps its mouth).
|
|
41
|
+
* - Everything is rejected unless it is genuinely annular: a cinema's or a
|
|
42
|
+
* ballroom's seats surround their own centroid with no hole in the middle,
|
|
43
|
+
* and must not grow a bowl around themselves.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/** One authored row (or one level ribbon) as the fit consumes it. */
|
|
47
|
+
interface BowlRowSample {
|
|
48
|
+
readonly pts: readonly Point[];
|
|
49
|
+
/** World-metre deck level of this row. */
|
|
50
|
+
readonly levelM: number;
|
|
51
|
+
}
|
|
52
|
+
interface BowlSectionSamples {
|
|
53
|
+
readonly sectionId: string;
|
|
54
|
+
/** The section's resolved rows. Callers pass stands only (no table patches). */
|
|
55
|
+
readonly rows: readonly BowlRowSample[];
|
|
56
|
+
}
|
|
57
|
+
/** A contiguous covered run of bearing bins within one ring. */
|
|
58
|
+
interface BowlArc {
|
|
59
|
+
/** First covered bin index. */
|
|
60
|
+
readonly startBin: number;
|
|
61
|
+
/** Number of covered bins (may wrap past the bin count). */
|
|
62
|
+
readonly binCount: number;
|
|
63
|
+
/** True when the ring is covered at every bearing — a full closed bowl. */
|
|
64
|
+
readonly closed: boolean;
|
|
65
|
+
/** Per covered bin, sampled at the bin-centre bearing: */
|
|
66
|
+
readonly innerR: Float64Array;
|
|
67
|
+
readonly outerR: Float64Array;
|
|
68
|
+
readonly frontLevelM: Float64Array;
|
|
69
|
+
readonly topLevelM: Float64Array;
|
|
70
|
+
/**
|
|
71
|
+
* Per covered bin, the radial deck profile: knot radii (ascending) with the
|
|
72
|
+
* deck level at each. `levelAt` interpolates within these, so a ring holding
|
|
73
|
+
* two radially-stacked blocks with a cross-aisle keeps its true step instead
|
|
74
|
+
* of a straight front-to-back chord that could rise above a real deck.
|
|
75
|
+
*/
|
|
76
|
+
readonly profiles: ReadonlyArray<{
|
|
77
|
+
rs: readonly number[];
|
|
78
|
+
ls: readonly number[];
|
|
79
|
+
}>;
|
|
80
|
+
}
|
|
81
|
+
interface BowlRing {
|
|
82
|
+
readonly arcs: readonly BowlArc[];
|
|
83
|
+
readonly sectionIds: readonly string[];
|
|
84
|
+
/** Median radii, chart units — the ring's identity for callers and tests. */
|
|
85
|
+
readonly innerRMedian: number;
|
|
86
|
+
readonly outerRMedian: number;
|
|
87
|
+
}
|
|
88
|
+
interface BowlFit {
|
|
89
|
+
readonly centre: Point;
|
|
90
|
+
readonly binCount: number;
|
|
91
|
+
/** Degrees per bin. */
|
|
92
|
+
readonly binStepDeg: number;
|
|
93
|
+
/** Rings ordered inner to outer. */
|
|
94
|
+
readonly rings: readonly BowlRing[];
|
|
95
|
+
}
|
|
96
|
+
/** Bearing of `p` about `c`, degrees cw from +y in [0, 360) — the inverse of
|
|
97
|
+
* `templateGeom.polar`. */
|
|
98
|
+
declare function bearingDeg(c: Point, p: Point): number;
|
|
99
|
+
/**
|
|
100
|
+
* Resolve the continuous bowl profile of one floor's stands, or null when the
|
|
101
|
+
* floor is not a bowl.
|
|
102
|
+
*
|
|
103
|
+
* `sections` should carry only resolved multi-row stands (the caller filters
|
|
104
|
+
* flats and table patches — they can be ON a bowl floor without being bowl).
|
|
105
|
+
*
|
|
106
|
+
* `focal` is the floor's focal point when known. A bowl WRAPS what people look
|
|
107
|
+
* at; a hall whose fitted "hole" is merely its own cross-aisle (a cinema reads
|
|
108
|
+
* annular about the walkway between its front and back blocks) has its focal
|
|
109
|
+
* far outside that hole, and is rejected.
|
|
110
|
+
*/
|
|
111
|
+
declare function fitBowlProfile(sections: readonly BowlSectionSamples[], focal?: Point): BowlFit | null;
|
|
112
|
+
/**
|
|
113
|
+
* Deck level of `arc` at (bearing, radius), world metres — the radial profile
|
|
114
|
+
* of the two nearest bins, blended by bearing. Returns the nearest covered
|
|
115
|
+
* value when the query lies outside the arc's angular span.
|
|
116
|
+
*/
|
|
117
|
+
declare function arcLevelAt(fit: BowlFit, arc: BowlArc, bearing: number, r: number): number;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* A section's RAKE FIELD — the scalar "depth" that its seating rises along.
|
|
121
|
+
*
|
|
122
|
+
* ## The defect this exists to fix
|
|
123
|
+
*
|
|
124
|
+
* Both the eye-height model (`layout.ts`) and the 3D seating surface
|
|
125
|
+
* (`view3d/scene/surface.ts`) used to raise a seat by its radial distance from
|
|
126
|
+
* ONE venue focal point. That is only correct when a section's rows are
|
|
127
|
+
* concentric arcs about that focal.
|
|
128
|
+
*
|
|
129
|
+
* Measured on the amphitheatre gallery, whose rows are straight blocks: a single
|
|
130
|
+
* row's seats span a radial-distance range of 105 chart units on the
|
|
131
|
+
* centre-facing blocks and 240 on the side blocks. Since height is a function of
|
|
132
|
+
* that distance, one row's seats landed at DIFFERENT heights — a within-row deck
|
|
133
|
+
* spread of 2.30 m on the side blocks against 1.05 m on the centre-facing ones.
|
|
134
|
+
* On screen the rows visibly tilt, and the tilt differs block to block, which is
|
|
135
|
+
* exactly the left/right asymmetry the owner reported.
|
|
136
|
+
*
|
|
137
|
+
* ## Why a per-section AXIS is not enough
|
|
138
|
+
*
|
|
139
|
+
* The first attempt fitted one straight rake axis per section by PCA over its row
|
|
140
|
+
* centroids, and scored it against the radial model. It did not fix the
|
|
141
|
+
* amphitheatre, because `sec-gall` is a SINGLE section containing six wedge
|
|
142
|
+
* blocks at six different orientations. No single axis — straight or radial —
|
|
143
|
+
* fits them all, so the fit correctly fell back to radial and the tilt survived.
|
|
144
|
+
* Sections containing several blocks are normal, not exotic.
|
|
145
|
+
*
|
|
146
|
+
* ## The model that does work
|
|
147
|
+
*
|
|
148
|
+
* Depth is defined by the section's OWN ROWS. Each row gets one depth value (the
|
|
149
|
+
* mean distance of its seats from the focal), and the field at an arbitrary point
|
|
150
|
+
* is an inverse-distance blend of the nearest rows' depths.
|
|
151
|
+
*
|
|
152
|
+
* The properties that matter:
|
|
153
|
+
*
|
|
154
|
+
* - **Exact on a row.** A point on a row has zero distance to it, so it takes
|
|
155
|
+
* that row's depth exactly and every seat in the row lands at ONE height.
|
|
156
|
+
* The tilt cannot come back, whatever the row's orientation.
|
|
157
|
+
* - **Orientation-free.** Straight blocks, arcs, fans, in-the-round and blocks
|
|
158
|
+
* at six different angles in one section all work, because nothing is fitted
|
|
159
|
+
* to a direction.
|
|
160
|
+
* - **Continuous.** It is a field over the plane, not a per-seat lookup. The 3D
|
|
161
|
+
* cap is tessellated at points BETWEEN seats and needs a value and a gradient
|
|
162
|
+
* there; a per-row lookup would leave the deck undefined between rows and put
|
|
163
|
+
* the seats back off the surface they stand on.
|
|
164
|
+
*
|
|
165
|
+
* That last point is why quantising per row inside `assignEyeHeights` was tried
|
|
166
|
+
* and removed: the renderer cannot follow a step function it has no definition
|
|
167
|
+
* for, and the two models diverging is the trap that made every offset constant
|
|
168
|
+
* chart-specific.
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
/** A resolved row: its seats as an ordered polyline, plus its depth ordinate. */
|
|
172
|
+
interface RakeRowFit {
|
|
173
|
+
/** The row's seats, ordered along the row. */
|
|
174
|
+
readonly pts: readonly Point[];
|
|
175
|
+
/** Mean distance of the row's seats from the focal — what rise is a function of. */
|
|
176
|
+
readonly depth: number;
|
|
177
|
+
}
|
|
178
|
+
interface SectionRake {
|
|
179
|
+
readonly kind: 'radial' | 'rows';
|
|
180
|
+
/** Depth ordinate at a chart-unit point; rise is a function of this. */
|
|
181
|
+
depthAt(x: number, y: number): number;
|
|
182
|
+
/** Unit gradient direction of `depthAt` — turns a rake angle into a normal. */
|
|
183
|
+
gradientAt(x: number, y: number): readonly [number, number];
|
|
184
|
+
/** Number of rows the field was built from (0 for the radial fallback). */
|
|
185
|
+
readonly rowCount: number;
|
|
186
|
+
/**
|
|
187
|
+
* The section's rows, ORDERED BY DEPTH (front first).
|
|
188
|
+
*
|
|
189
|
+
* The deck is built directly from these — one level ribbon per row — rather
|
|
190
|
+
* than by tessellating `depthAt`. See `deckBands.ts` for why: a section holding
|
|
191
|
+
* several blocks at different heights has a genuine cliff between them, and no
|
|
192
|
+
* continuous field can be both level on every row and trackable by refinement.
|
|
193
|
+
*/
|
|
194
|
+
readonly rows: readonly RakeRowFit[];
|
|
195
|
+
/** Index into `rows` of the row nearest a point, or -1 when there are none. */
|
|
196
|
+
nearestRow(x: number, y: number): number;
|
|
197
|
+
}
|
|
198
|
+
/** One row's member points, in any order. */
|
|
199
|
+
interface RakeRow {
|
|
200
|
+
points: Point[];
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Build a section's rake field from its rows.
|
|
204
|
+
*
|
|
205
|
+
* `rows` should be the section's member seats grouped by row. With fewer than two
|
|
206
|
+
* usable rows there is nothing to build a field from, so the radial model is kept
|
|
207
|
+
* — which is also how every chart behaved before this, leaving a row-less or
|
|
208
|
+
* single-row section unchanged.
|
|
209
|
+
*/
|
|
210
|
+
declare function buildSectionRake(rows: RakeRow[], focal: Point): SectionRake;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The seat NUMBER part of a row seat's label (the row prefix is prepended by the
|
|
214
|
+
* caller). Applies the row's numbering scheme, direction, step, start and label
|
|
215
|
+
* prefix. Labels only — never geometry. See `RowObject.seatNumbering.scheme`.
|
|
216
|
+
*/
|
|
217
|
+
declare function seatLabelPart(row: RowObject, i: number): string;
|
|
218
|
+
/**
|
|
219
|
+
* The synthetic row that DISPLAY numbering is computed against.
|
|
220
|
+
*
|
|
221
|
+
* A segmented component must number as though it were the whole logical row:
|
|
222
|
+
* the logical row's total seat count and label, so that scheme, direction,
|
|
223
|
+
* `endAt` and `center` ranking all resolve across the full span rather than
|
|
224
|
+
* restarting inside each component. Combined with the component's
|
|
225
|
+
* `displayOffset`, this is what makes `A-1…A-13` continuous.
|
|
226
|
+
*
|
|
227
|
+
* Every surface that renders a display label must go through this rather than
|
|
228
|
+
* assembling the same object inline — three copies of it are exactly how canvas
|
|
229
|
+
* and buyer drifted apart.
|
|
230
|
+
*/
|
|
231
|
+
declare function logicalNumberingRow(placement: SegmentedRowPlacement): RowObject;
|
|
232
|
+
/**
|
|
233
|
+
* The seat's BOOKING IDENTITY. Always physical: the storing row's label and the
|
|
234
|
+
* physical index within it. A seat-level override wins because it was authored
|
|
235
|
+
* deliberately.
|
|
236
|
+
*/
|
|
237
|
+
declare function seatInventoryLabel(row: RowObject, physicalIndex: number, override?: SeatOverride): string;
|
|
238
|
+
/**
|
|
239
|
+
* The seat's HUMAN-FACING label.
|
|
240
|
+
*
|
|
241
|
+
* With no `placement` this is the physical label under the row's own display
|
|
242
|
+
* prefix. With a `placement` the seat numbers against the logical row at its
|
|
243
|
+
* component's offset — the identical construction buyer expansion uses, so the
|
|
244
|
+
* author and the buyer can never see different seat numbers.
|
|
245
|
+
*
|
|
246
|
+
* A seat-level `displayLabel` override remains the highest-precedence copy.
|
|
247
|
+
*/
|
|
248
|
+
declare function seatDisplayLabel(row: RowObject, physicalIndex: number, placement?: SegmentedRowPlacement, override?: SeatOverride): string;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* THE structure resolver — what a chart's seats actually form, geometrically.
|
|
252
|
+
*
|
|
253
|
+
* A chart is authored in 2D as sections, rows and seats. Rendering it in 3D needs
|
|
254
|
+
* a level above that which the author never states: which rows belong to the same
|
|
255
|
+
* physical STAND, which of them is that stand's front row, and how deep into the
|
|
256
|
+
* stand each row sits. Every height in the venue follows from those three facts.
|
|
257
|
+
*
|
|
258
|
+
* This module resolves them, once, from the authored geometry alone. It is pure —
|
|
259
|
+
* no renderer types, no GL — so the same structure feeds the 3D surface, the
|
|
260
|
+
* eye-height model in `layout.ts`, and anything added later (labels, LOD
|
|
261
|
+
* streaming, per-block camera framing) without any of them re-deriving it. That
|
|
262
|
+
* matters because re-derivation is this codebase's most expensive bug class:
|
|
263
|
+
* three surfaces held apart by offsets, and a cap and its seats measured from
|
|
264
|
+
* different datums, both came from two files computing the same fact differently.
|
|
265
|
+
*
|
|
266
|
+
* ## Why blocks, and why depth is measured inside one
|
|
267
|
+
*
|
|
268
|
+
* A section is not a stand. The amphitheatre's `sec-gall` is a single section
|
|
269
|
+
* holding six wedge blocks that wrap the bowl; the arena's tiers are four blocks
|
|
270
|
+
* each. Height used to be a function of distance from the venue focal, which is
|
|
271
|
+
* wrong for exactly this reason — the side blocks of a tier sit further from the
|
|
272
|
+
* focal than the centre blocks, so they were raised as though they were further
|
|
273
|
+
* back. Measured on `sec-gall`, authored at 6.20 m: its six blocks started at
|
|
274
|
+
* 6.35, 6.37, 8.18, 8.23, 10.60 and 10.65 m. The side wedges were **4.4 m too
|
|
275
|
+
* high**, and that is the tilt-and-lift the owner could see.
|
|
276
|
+
*
|
|
277
|
+
* Depth is therefore measured WITHIN a block, from that block's own front row:
|
|
278
|
+
*
|
|
279
|
+
* level(row) = section.height + blockDepth(row) · tan(rake)
|
|
280
|
+
*
|
|
281
|
+
* so every block of a tier starts at the tier's authored height, and rows rise by
|
|
282
|
+
* the real spacing between them. A venue whose tier is genuinely flat authors
|
|
283
|
+
* `rake = 0` and every row lands on the same level — the same model, no special
|
|
284
|
+
* case, which is what lets one code path serve a stepped bowl and a flat terrace.
|
|
285
|
+
*/
|
|
286
|
+
|
|
287
|
+
/** A row resolved into its stand. */
|
|
288
|
+
interface ResolvedRow {
|
|
289
|
+
/** The row's authored id, or a synthetic one for a seat that has none. */
|
|
290
|
+
id: string;
|
|
291
|
+
/** The row's seats as an ordered polyline (the shape the deck is built on). */
|
|
292
|
+
pts: Point[];
|
|
293
|
+
/** Indices into the input seat array, parallel to nothing — for attribution. */
|
|
294
|
+
seatIndices: number[];
|
|
295
|
+
/** Which block (stand) this row belongs to, within its section. */
|
|
296
|
+
blockId: number;
|
|
297
|
+
/** 0 for the block's front row, then 1, 2, … going back. */
|
|
298
|
+
ordinal: number;
|
|
299
|
+
/**
|
|
300
|
+
* Distance back from the block's FRONT row, chart units, accumulated over the
|
|
301
|
+
* real gaps between consecutive rows.
|
|
302
|
+
*
|
|
303
|
+
* Not the ordinal times a nominal pitch: a stand with an aisle break or a
|
|
304
|
+
* widening row gap should rise over that gap, and accumulating the measured
|
|
305
|
+
* spacing keeps the drawn deck on the seats. Not distance from the venue focal
|
|
306
|
+
* either — that is the defect described above.
|
|
307
|
+
*/
|
|
308
|
+
blockDepth: number;
|
|
309
|
+
/** Mean distance of the row's seats from the venue focal (front-row ordering). */
|
|
310
|
+
focalDistance: number;
|
|
311
|
+
}
|
|
312
|
+
interface ResolvedSection {
|
|
313
|
+
sectionId: string;
|
|
314
|
+
/** Rows ordered by block, then front-to-back within the block. */
|
|
315
|
+
rows: ResolvedRow[];
|
|
316
|
+
/** Number of distinct blocks found. */
|
|
317
|
+
blockCount: number;
|
|
318
|
+
}
|
|
319
|
+
/** Perpendicular distance from a point to a polyline, chart units. */
|
|
320
|
+
declare function distanceToPolyline(pts: readonly Point[], x: number, y: number): number;
|
|
321
|
+
/**
|
|
322
|
+
* Least-squares circle through a set of points (Kåsa fit), or null if degenerate.
|
|
323
|
+
*
|
|
324
|
+
* Used to find the centre a section's rows were struck about, which is NOT the
|
|
325
|
+
* chart's focal point. The amphitheatre makes this concrete: its rows are arcs
|
|
326
|
+
* about a centre `C`, while `focalPoint` is the stage at {0, 75}. Measuring depth
|
|
327
|
+
* from the focal therefore varied ALONG each arc — the original row tilt — and
|
|
328
|
+
* made concentric rows look radial to every heuristic downstream.
|
|
329
|
+
*
|
|
330
|
+
* The focal is where the audience LOOKS. The row centre is what the seating was
|
|
331
|
+
* drawn around. Conflating them is the mistake underneath several of the defects
|
|
332
|
+
* in this file's history.
|
|
333
|
+
*/
|
|
334
|
+
declare function fitCircle(pts: readonly Point[]): {
|
|
335
|
+
cx: number;
|
|
336
|
+
cy: number;
|
|
337
|
+
} | null;
|
|
338
|
+
/**
|
|
339
|
+
* Resolve one section's seats into blocks and depth-ordered rows.
|
|
340
|
+
*
|
|
341
|
+
* `seatIndices` are indices into the caller's own seat array, so a caller can
|
|
342
|
+
* attribute the result back without this module knowing what it is attributing to.
|
|
343
|
+
*/
|
|
344
|
+
declare function resolveSection(sectionId: string, seats: readonly ExpandedSeat[], seatIndices: readonly number[], focal: Point): ResolvedSection;
|
|
345
|
+
|
|
346
|
+
export { type BowlArc, type BowlFit, type BowlRing, type BowlRowSample, type BowlSectionSamples, type RakeRow, type RakeRowFit, type ResolvedRow, type ResolvedSection, type SectionRake, arcLevelAt, bearingDeg, buildSectionRake, distanceToPolyline, fitBowlProfile, fitCircle, logicalNumberingRow, resolveSection, seatDisplayLabel, seatInventoryLabel, seatLabelPart };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as D}from"../../chunk-EQM4FFN5.js";import{a as E,b as F,c as G,d as H}from"../../chunk-55NOSZK5.js";import{j as y,k as z,l as A,m as B,n as C}from"../../chunk-AQKYUJBX.js";import{A as e,B as f,C as m,D as p,E as t,F as x,G as a,H as b,M as c,N as d,O as g,P as h,Q as i,R as j,S as k,T as l,U as n,X as q,fa as s,ga as u,ha as v,ia as w,y as o,z as r}from"../../chunk-VDZ24QVV.js";export{p as DEFAULT_SECTION_CORNER_SMOOTHING,x as MAX_EDGE_SAGITTA_RATIO,q as TIER_HEIGHT_M,y as UNGROUPED_ID,C as applyHidden,H as arcLevelAt,F as bearingDeg,E as buildSectionRake,z as computeSections,u as distanceToPolyline,G as fitBowlProfile,v as fitCircle,B as hiddenObjectIds,d as indexLabel,A as isSectionHidden,k as logicalNumberingRow,i as relabelRows,w as resolveSection,b as reverseSectionOutlinePath,e as sampleSectionOutlinePath,D as seatConfidenceDisclosure,n as seatDisplayLabel,l as seatInventoryLabel,j as seatLabelPart,t as sectionCornerSmoothingPath,s as sectionGeometry,a as sectionOutlinePathFrom,o as sectionPathSegmentEnd,c as toBijectiveBase,g as toLetters,h as toRoman,m as transformSectionOutlinePath,f as translateSectionOutlinePath,r as validSectionOutlinePath};
|