@seatlayer/core 0.53.0 → 0.55.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-BwarniiK.d.ts +109 -0
- package/dist/categoryInventory-D3qPwfKz.d.cts +109 -0
- package/dist/chunk-55NOSZK5.js +1 -0
- package/dist/chunk-6VTTBC5F.js +1 -0
- package/dist/chunk-6XJN4REG.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-DNGP2HDT.js +1 -0
- package/dist/chunk-EQM4FFN5.js +1 -0
- package/dist/chunk-HHM3PB66.js +1 -0
- package/dist/chunk-PXWKSYCK.js +1 -0
- package/dist/chunk-VDZ24QVV.js +1 -0
- package/dist/chunk-VI2CLV3Y.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/{de-75NWRKC5.js → de-WPX4D3SY.js} +1 -1
- package/dist/{es-BM7EJ7PW.js → es-6KAJQVVX.js} +1 -1
- package/dist/{fr-HPXQHIB4.js → fr-5DTMRBN5.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +85 -534
- package/dist/index.d.ts +85 -534
- package/dist/index.js +1 -1
- package/dist/labeling-BmCzW50y.d.ts +90 -0
- package/dist/labeling-VfJBEOn0.d.cts +90 -0
- package/dist/layout-ClQkmixY.d.ts +181 -0
- package/dist/layout-Dlv5bIf2.d.cts +181 -0
- package/dist/renderedQuality-B3jgdgPO.d.ts +113 -0
- package/dist/renderedQuality-bDkUOyBL.d.cts +113 -0
- package/dist/renderer-B_g-W_QB.d.ts +534 -0
- package/dist/renderer-DySMcKAR.d.cts +534 -0
- package/dist/sections-DIzgtDjF.d.ts +123 -0
- package/dist/sections-Dna1nZgR.d.cts +123 -0
- package/dist/segmentedRowModel-BNXEUeHp.d.cts +75 -0
- package/dist/segmentedRowModel-COXw4GCh.d.ts +75 -0
- package/dist/ticketRestrictions-CzchbX_o.d.cts +72 -0
- package/dist/ticketRestrictions-DaYOCpEw.d.ts +72 -0
- package/dist/{types-tLOunI-B.d.cts → types-DTSG6_Hq.d.cts} +238 -761
- package/dist/{types-tLOunI-B.d.ts → types-DTSG6_Hq.d.ts} +238 -761
- package/dist/view3d/crossfade/panorama.d.cts +1 -1
- package/dist/view3d/crossfade/panorama.d.ts +1 -1
- package/dist/view3d/index.cjs +27 -27
- package/dist/view3d/index.d.cts +109 -2
- package/dist/view3d/index.d.ts +109 -2
- package/dist/view3d/index.js +26 -26
- package/package.json +94 -5
- package/dist/chunk-54A7LIL5.js +0 -1
|
@@ -0,0 +1,534 @@
|
|
|
1
|
+
import { P as Point, A as AccessibilityType, f as SeatCommercialAttributes, a as SeatViewMetadata, g as ResolvedSeatConfidenceEvidence, L as LabelStyle, C as ChartDoc } from './types-DTSG6_Hq.cjs';
|
|
2
|
+
|
|
3
|
+
interface ExpandedSeat {
|
|
4
|
+
/** Stable id: `${rowId}:${index}` */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Public label: `${rowLabel}-${seatNumber}` */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Buyer-facing copy; absent on legacy charts, where `label` is displayed. */
|
|
9
|
+
displayLabel?: string;
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
rowId: string;
|
|
13
|
+
/** Owning logical section and navigation zone, resolved once at expand time. */
|
|
14
|
+
sectionId?: string;
|
|
15
|
+
zoneId?: string;
|
|
16
|
+
/** Zone focal when authored, otherwise the active floor/chart legacy fallback. */
|
|
17
|
+
focalPoint?: Point;
|
|
18
|
+
/** Buyer-facing segmented-row identity. `rowId` stays the physical owner id. */
|
|
19
|
+
logicalRowId?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Seat order inside the logical row. A deliberate missing integer is inserted
|
|
22
|
+
* at every aisle boundary, so numerical adjacency cannot bridge a gap.
|
|
23
|
+
*/
|
|
24
|
+
logicalSeatIndex?: number;
|
|
25
|
+
categoryKey: string;
|
|
26
|
+
/** 'booth' units render as blocks (dimensions looked up via rowId = booth id). */
|
|
27
|
+
kind?: 'seat' | 'booth';
|
|
28
|
+
/** True when the seat has any accessibility accommodation — renderer rings/dims these. */
|
|
29
|
+
accessible?: boolean;
|
|
30
|
+
/** Specific accessibility accommodations (absent = none) — picker badges/filters these. */
|
|
31
|
+
accessibility?: AccessibilityType[];
|
|
32
|
+
/** Physical wheelchair provision resolved from the seat override. */
|
|
33
|
+
wheelchairSpaceType?: 'seat-present' | 'no-seat';
|
|
34
|
+
commercial?: SeatCommercialAttributes;
|
|
35
|
+
/** Organizer-supplied view-from-seat image (inherited from the row). */
|
|
36
|
+
viewUrl?: string;
|
|
37
|
+
/** Calibration/truth inherited from the same scope that supplied `viewUrl`. */
|
|
38
|
+
viewMeta?: SeatViewMetadata;
|
|
39
|
+
/** Closest configuration-valid evidence plus its engine-resolved coverage. */
|
|
40
|
+
confidenceEvidence?: ResolvedSeatConfidenceEvidence;
|
|
41
|
+
/** Per-seat label size/color override; absent = inherit the row/theme default. */
|
|
42
|
+
labelStyle?: LabelStyle;
|
|
43
|
+
/**
|
|
44
|
+
* Real-world eye height in metres above the focal/stage datum, resolved at
|
|
45
|
+
* expand time from the owning section's `{height, rake}` + drawn depth (Phase B2).
|
|
46
|
+
* Feeds the auto-360° generator's stage-pitch math. Absent ⇒ flat seated eye
|
|
47
|
+
* height (legacy / seats in no section) — so old charts stay pixel-identical.
|
|
48
|
+
*/
|
|
49
|
+
eyeHeightM?: number;
|
|
50
|
+
}
|
|
51
|
+
type SeatStatus = 'free' | 'held' | 'booked' | 'not_for_sale';
|
|
52
|
+
/** Buyer canvas projection. Perspective is a view-only projected-2.5D lane. */
|
|
53
|
+
type RendererViewMode = 'flat' | 'isometric' | 'perspective';
|
|
54
|
+
interface RendererCallbacks {
|
|
55
|
+
onSelect?: (seat: ExpandedSeat) => void;
|
|
56
|
+
onDeselect?: (seat: ExpandedSeat) => void;
|
|
57
|
+
/** Buyer tried to add a seat after the active selection cap was reached. */
|
|
58
|
+
onSelectionLimit?: (maxSelection: number) => void;
|
|
59
|
+
/** seat is null when the pointer leaves any seat. */
|
|
60
|
+
onHover?: (seat: ExpandedSeat | null) => void;
|
|
61
|
+
/** Keyboard focus moved to a seat (arrow-key navigation) — for screen-reader announcements. */
|
|
62
|
+
onFocusSeat?: (seat: ExpandedSeat | null) => void;
|
|
63
|
+
/** Called ~1×/sec with the measured frames-per-second. */
|
|
64
|
+
onFps?: (fps: number) => void;
|
|
65
|
+
/** Fired when a GA area is clicked (quantity picking is UI-side). */
|
|
66
|
+
onGAClick?: (areaId: string) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Fired when a tap lands on a section outline while seats are NOT the active
|
|
69
|
+
* rung (i.e. zoomed out, section/zone LOD). The host glides in + shows a
|
|
70
|
+
* section-summary card instead of trying to select a 4px seat (Slice 5).
|
|
71
|
+
*/
|
|
72
|
+
onSectionTap?: (sectionId: string) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Fired when a seat/deck is tapped in the 3D all-floors stacked overview — the
|
|
75
|
+
* host drops back to the flat 2D map on that floor ("tap a deck to enter").
|
|
76
|
+
*/
|
|
77
|
+
onDeckTap?: (floorId: string) => void;
|
|
78
|
+
/** Fired after any pan/zoom/resize settles — re-anchor screen-space overlays. */
|
|
79
|
+
onViewChange?: () => void;
|
|
80
|
+
/**
|
|
81
|
+
* Organizer manage-mode only (`manageMode` + `marqueeSelect`): fired on
|
|
82
|
+
* pointer-UP after a rubber-band marquee drag, or a ⌘A/Escape bulk shortcut,
|
|
83
|
+
* with the FULL current selection (selectable seats only). The host toolbar
|
|
84
|
+
* reads this to drive bulk block/unblock. Never fires when manageMode is off.
|
|
85
|
+
*/
|
|
86
|
+
onMarquee?: (seats: ExpandedSeat[]) => void;
|
|
87
|
+
}
|
|
88
|
+
/** Far-zoom level-of-detail rung: whole zones → section blocks → individual seats. */
|
|
89
|
+
type LodRung = 'zones' | 'sections' | 'seats';
|
|
90
|
+
interface RendererOptions extends RendererCallbacks {
|
|
91
|
+
/**
|
|
92
|
+
* Internal fixed-output mode used by the free maker's PNG/PDF pipeline.
|
|
93
|
+
* It disables interaction, ResizeObserver, animation/FPS work and overview
|
|
94
|
+
* bitmap caching while keeping the ordinary buyer renderer unchanged.
|
|
95
|
+
*/
|
|
96
|
+
exportMode?: boolean;
|
|
97
|
+
/** Max seats selectable at once (default 10). */
|
|
98
|
+
maxSelection?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Buyer-surface fit refinement: on containers much taller than the venue's
|
|
101
|
+
* projection (phones in portrait), zoomToFit may zoom past the strict
|
|
102
|
+
* width-contain by a bounded amount (≤30%) so the venue is not a thin band
|
|
103
|
+
* in a dark field. The overflow crops equally on both sides and the buyer
|
|
104
|
+
* pans freely. Off for the designer and export pipeline, which must always
|
|
105
|
+
* show the complete chart.
|
|
106
|
+
*/
|
|
107
|
+
portraitFitCrop?: boolean;
|
|
108
|
+
/** Only these statuses are clickable (default ['free']). */
|
|
109
|
+
selectableStatuses?: SeatStatus[];
|
|
110
|
+
/**
|
|
111
|
+
* Opt-in host behaviour flag — the renderer's own click/selection logic is
|
|
112
|
+
* unchanged (it still selects + fires `onSelect` immediately, so the seat
|
|
113
|
+
* highlights right away). When true, the host (e.g. PublicEventPage) treats
|
|
114
|
+
* that `onSelect` as a pending candidate and shows a confirm card instead of
|
|
115
|
+
* pushing straight into the cart; `deselect([seat.id])` on Cancel un-highlights.
|
|
116
|
+
*/
|
|
117
|
+
confirmSelection?: boolean;
|
|
118
|
+
/** ISO 4217 currency for on-map prices ("FROM …"); defaults to money.DEFAULT_CURRENCY.
|
|
119
|
+
* Locale for grouping/symbol placement comes from the active i18n locale. */
|
|
120
|
+
currency?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Organizer manage surface (SDK SeatManager). Opt-in — enables the manage-mode
|
|
123
|
+
* gestures (marquee, ⌘A/Escape) and the bulk-selection helpers. Buyer pan /
|
|
124
|
+
* pinch / tap and every existing code path are byte-identical when this is
|
|
125
|
+
* false (every manage branch is gated on it). Default false.
|
|
126
|
+
*/
|
|
127
|
+
manageMode?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* When `manageMode` is on, a mouse/pen primary-button drag at the seats rung
|
|
130
|
+
* draws a rubber-band marquee that bulk-selects the seats it covers (emitting
|
|
131
|
+
* `onMarquee` on pointer-up) instead of panning. Touch keeps single-finger
|
|
132
|
+
* pan (pinch to zoom); a middle-button drag pans with a mouse. Disabled below
|
|
133
|
+
* the seats rung (zoom in first). No effect unless `manageMode` is also set.
|
|
134
|
+
*/
|
|
135
|
+
marqueeSelect?: boolean;
|
|
136
|
+
}
|
|
137
|
+
type RenderedLabelHiddenReason = 'below-minimum-size' | 'outside-viewport' | 'dimmed-or-unavailable' | 'clutter-or-fit' | 'renderer-hidden';
|
|
138
|
+
/** Browser-renderer evidence used by visual QA and catalog release gates. */
|
|
139
|
+
interface RenderedBookableLabelEvidence {
|
|
140
|
+
seatId: string;
|
|
141
|
+
label: string;
|
|
142
|
+
kind: 'seat' | 'booth';
|
|
143
|
+
/** Painted inventory silhouette. Empty wheelchair bays are deliberately
|
|
144
|
+
* square, while physical seats retain the ordinary circular marker. */
|
|
145
|
+
markerShape: 'circle' | 'square' | 'booth';
|
|
146
|
+
/** Physical wheelchair provision represented by this inventory unit. */
|
|
147
|
+
wheelchairSpaceType?: 'seat-present' | 'no-seat';
|
|
148
|
+
categoryKey: string;
|
|
149
|
+
sectionId?: string;
|
|
150
|
+
zoneId?: string;
|
|
151
|
+
status: SeatStatus;
|
|
152
|
+
selected: boolean;
|
|
153
|
+
visible: boolean;
|
|
154
|
+
renderedFontPx: number;
|
|
155
|
+
fill: string;
|
|
156
|
+
ink: string;
|
|
157
|
+
opacity: number;
|
|
158
|
+
/** Buyer-visible accessibility glyph evidence. Filter emphasis uses a
|
|
159
|
+
* screen-space minimum so wheelchair provision remains recognizable at fit. */
|
|
160
|
+
accessibilityMarker?: {
|
|
161
|
+
glyphVisible: boolean;
|
|
162
|
+
glyphWidthPx: number;
|
|
163
|
+
emphasizedByFilter: boolean;
|
|
164
|
+
};
|
|
165
|
+
/** Direct Konva shape bounds and the production near-miss rescue combined. */
|
|
166
|
+
pointerTarget: {
|
|
167
|
+
active: boolean;
|
|
168
|
+
directWidthPx: number;
|
|
169
|
+
directHeightPx: number;
|
|
170
|
+
effectiveMinimumPx: number;
|
|
171
|
+
};
|
|
172
|
+
/** Centre of the painted unit, even when its text is intentionally hidden. */
|
|
173
|
+
screenCenter: {
|
|
174
|
+
x: number;
|
|
175
|
+
y: number;
|
|
176
|
+
};
|
|
177
|
+
screenBox?: {
|
|
178
|
+
x: number;
|
|
179
|
+
y: number;
|
|
180
|
+
width: number;
|
|
181
|
+
height: number;
|
|
182
|
+
};
|
|
183
|
+
hiddenReason?: RenderedLabelHiddenReason;
|
|
184
|
+
}
|
|
185
|
+
interface RenderedHierarchyLabelEvidence {
|
|
186
|
+
id: string;
|
|
187
|
+
kind: 'section' | 'zone';
|
|
188
|
+
role: 'name' | 'availability' | 'price';
|
|
189
|
+
label: string;
|
|
190
|
+
visible: boolean;
|
|
191
|
+
renderedFontPx: number;
|
|
192
|
+
opacity: number;
|
|
193
|
+
fill: string;
|
|
194
|
+
ink: string;
|
|
195
|
+
/** Independent geometric containment check for section-owned text. */
|
|
196
|
+
fitsContainer?: boolean;
|
|
197
|
+
screenBox?: {
|
|
198
|
+
x: number;
|
|
199
|
+
y: number;
|
|
200
|
+
width: number;
|
|
201
|
+
height: number;
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
interface RenderedFreeTextEvidence {
|
|
205
|
+
objectId: string;
|
|
206
|
+
kind: 'free-text' | 'stage' | 'table' | 'decor' | 'ga-label' | 'ga-capacity';
|
|
207
|
+
text: string;
|
|
208
|
+
visible: boolean;
|
|
209
|
+
renderedFontPx: number;
|
|
210
|
+
ink: string;
|
|
211
|
+
background: string;
|
|
212
|
+
opacity: number;
|
|
213
|
+
screenBox?: {
|
|
214
|
+
x: number;
|
|
215
|
+
y: number;
|
|
216
|
+
width: number;
|
|
217
|
+
height: number;
|
|
218
|
+
};
|
|
219
|
+
hiddenReason?: 'below-minimum-size' | 'outside-viewport' | 'renderer-hidden';
|
|
220
|
+
}
|
|
221
|
+
interface RenderedRowLabelEvidence {
|
|
222
|
+
text: string;
|
|
223
|
+
visible: boolean;
|
|
224
|
+
renderedFontPx: number;
|
|
225
|
+
ink: string;
|
|
226
|
+
screenBox?: {
|
|
227
|
+
x: number;
|
|
228
|
+
y: number;
|
|
229
|
+
width: number;
|
|
230
|
+
height: number;
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
interface RenderedGAAreaEvidence {
|
|
234
|
+
areaId: string;
|
|
235
|
+
label: string;
|
|
236
|
+
capacity: number;
|
|
237
|
+
categoryKey: string;
|
|
238
|
+
/** Owning logical section when the rendered GA surface is section-contained. */
|
|
239
|
+
sectionId?: string;
|
|
240
|
+
visible: boolean;
|
|
241
|
+
interactive: boolean;
|
|
242
|
+
opacity: number;
|
|
243
|
+
fill: string;
|
|
244
|
+
effectiveBackground: string;
|
|
245
|
+
screenBox?: {
|
|
246
|
+
x: number;
|
|
247
|
+
y: number;
|
|
248
|
+
width: number;
|
|
249
|
+
height: number;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
interface RendererQualityEvidence {
|
|
253
|
+
viewport: {
|
|
254
|
+
width: number;
|
|
255
|
+
height: number;
|
|
256
|
+
};
|
|
257
|
+
/** Runtime projection actually used for the pixels and hit graph below. */
|
|
258
|
+
projection: RendererViewMode;
|
|
259
|
+
/** Phase-C proof metadata. Present only in the projected-2.5D lane. */
|
|
260
|
+
perspective?: {
|
|
261
|
+
model: 'pinhole-exact-seat-anchors';
|
|
262
|
+
sectionSurfaceModel: 'tangent-plane';
|
|
263
|
+
exactSeatAnchorCount: number;
|
|
264
|
+
depthSorted: true;
|
|
265
|
+
};
|
|
266
|
+
canvasBackground: string;
|
|
267
|
+
effectiveScale: number;
|
|
268
|
+
rung: LodRung;
|
|
269
|
+
minimumVisibleLabelPx: number;
|
|
270
|
+
totalLabelledBookableUnits: number;
|
|
271
|
+
visibleLabels: number;
|
|
272
|
+
hiddenLabels: number;
|
|
273
|
+
/** Seats/table-seats/booths plus the full GA capacity. */
|
|
274
|
+
totalBookableUnits: number;
|
|
275
|
+
selectionRingSeatIds: string[];
|
|
276
|
+
selectionRingColor: string;
|
|
277
|
+
focusedSectionId: string | null;
|
|
278
|
+
focusBackdropVisible: boolean;
|
|
279
|
+
categoryFilterKeys: string[] | null;
|
|
280
|
+
/** Exact scene-graph proof for the clean section-first overview contract. */
|
|
281
|
+
overviewStyle: {
|
|
282
|
+
visibleSectionShells: number;
|
|
283
|
+
categoryPaintedSectionShells: number;
|
|
284
|
+
visibleCategoryDetailOutlines: number;
|
|
285
|
+
visibleSectionRowHints: number;
|
|
286
|
+
visibleSectionAvailabilityLabels: number;
|
|
287
|
+
visibleSectionGADetails: number;
|
|
288
|
+
};
|
|
289
|
+
labels: RenderedBookableLabelEvidence[];
|
|
290
|
+
gaAreas: RenderedGAAreaEvidence[];
|
|
291
|
+
hierarchyLabels: RenderedHierarchyLabelEvidence[];
|
|
292
|
+
freeTextLabels: RenderedFreeTextEvidence[];
|
|
293
|
+
rowLabels: RenderedRowLabelEvidence[];
|
|
294
|
+
}
|
|
295
|
+
interface ISeatmapRenderer {
|
|
296
|
+
/** Replace the chart. Resets selection and statuses, zooms to fit.
|
|
297
|
+
* `opts.floorId` picks which floor to render on a multi-floor chart (Batch 5). */
|
|
298
|
+
setChart(doc: ChartDoc, opts?: {
|
|
299
|
+
floorId?: string;
|
|
300
|
+
}): void;
|
|
301
|
+
/** Bulk status update; re-renders affected seats only. */
|
|
302
|
+
setStatus(seatIds: string[], status: SeatStatus): void;
|
|
303
|
+
/** Organizer event-category override: repaint existing inventory ids without
|
|
304
|
+
* rebuilding geometry, camera, or selection. Unknown ids/keys are ignored. */
|
|
305
|
+
setSeatCategories?(assignments: Record<string, string>): void;
|
|
306
|
+
/**
|
|
307
|
+
* Mark the active buyer's own held seats. They remain server-status `held`,
|
|
308
|
+
* but render with the buyer selection treatment instead of the anonymous
|
|
309
|
+
* unavailable treatment used for another buyer's hold.
|
|
310
|
+
*/
|
|
311
|
+
setOwnedHold?(seatIds: string[] | null): void;
|
|
312
|
+
/**
|
|
313
|
+
* Mark one selected seat as the buyer's pending confirmation candidate.
|
|
314
|
+
* The candidate receives a strong focus halo while unrelated seats recede;
|
|
315
|
+
* pass null after Select/Cancel. This is visual only and never mutates the
|
|
316
|
+
* renderer selection.
|
|
317
|
+
*/
|
|
318
|
+
setSelectionFocus?(seatId: string | null): void;
|
|
319
|
+
/**
|
|
320
|
+
* SYNCHRONOUS repaint that bypasses requestAnimationFrame. Konva's batchDraw()
|
|
321
|
+
* (used by setStatus and friends) schedules the actual paint on the next rAF
|
|
322
|
+
* tick, which Chrome throttles/pauses on hidden, backgrounded, or occluded
|
|
323
|
+
* tabs — so a seat-status delta updates the scene graph but the pixels never
|
|
324
|
+
* change until the tab is foregrounded again. forceDraw() paints the affected
|
|
325
|
+
* layers immediately (Layer.draw() is synchronous) and flushes any pending
|
|
326
|
+
* cache-debounce, so a caller (visibilitychange catch-up, or an opted-in
|
|
327
|
+
* always-live board) can guarantee the canvas reflects current state
|
|
328
|
+
* regardless of tab visibility. No-op difference in the foreground.
|
|
329
|
+
*/
|
|
330
|
+
forceDraw(): void;
|
|
331
|
+
getStatus(seatId: string): SeatStatus;
|
|
332
|
+
getSelection(): ExpandedSeat[];
|
|
333
|
+
clearSelection(): void;
|
|
334
|
+
/** Update the buyer selection cap without rebuilding the chart or camera. */
|
|
335
|
+
setMaxSelection?(maxSelection: number): void;
|
|
336
|
+
/**
|
|
337
|
+
* Programmatically restore free seats (for example an Undo action). Added
|
|
338
|
+
* seats respect the active cap and do not reopen a confirmation popover.
|
|
339
|
+
*/
|
|
340
|
+
select?(seatIds: string[]): ExpandedSeat[];
|
|
341
|
+
/**
|
|
342
|
+
* Dynamically update organizer-only interaction without rebuilding the
|
|
343
|
+
* renderer. No buyer surface calls this; every behavior remains gated by
|
|
344
|
+
* `manageMode` exactly as it is at construction time.
|
|
345
|
+
*/
|
|
346
|
+
setManageInteraction?(options: {
|
|
347
|
+
manageMode: boolean;
|
|
348
|
+
marqueeSelect: boolean;
|
|
349
|
+
selectableStatuses: SeatStatus[];
|
|
350
|
+
maxSelection?: number;
|
|
351
|
+
}): void;
|
|
352
|
+
/** Organizer-only section heat overlay. Values are normalized 0..1. */
|
|
353
|
+
setSectionHeat?(scores: Record<string, number> | null): void;
|
|
354
|
+
/**
|
|
355
|
+
* Manage-mode bulk selection helpers (no-op / empty unless `manageMode`).
|
|
356
|
+
* They select the matching SELECTABLE seats (respecting `selectableStatuses`
|
|
357
|
+
* + closed sections), union with the current selection, and return the seats
|
|
358
|
+
* they added — the SDK SeatManager expands category/row/section picks to
|
|
359
|
+
* labels and drives one batched block/unblock from them.
|
|
360
|
+
*/
|
|
361
|
+
selectAllSelectable?(): ExpandedSeat[];
|
|
362
|
+
selectByLabels?(labels: string[]): ExpandedSeat[];
|
|
363
|
+
/** Exact-render QA only: select one server-chosen unit without label ambiguity. */
|
|
364
|
+
setEvidenceSelection?(seatId: string): boolean;
|
|
365
|
+
/** Selectable seats belonging to a section OR zone id (no selection side-effect). */
|
|
366
|
+
getSelectableInSection?(sectionId: string): ExpandedSeat[];
|
|
367
|
+
/** Programmatic deselect of specific seats (e.g. chip × in the cart). */
|
|
368
|
+
deselect(seatIds: string[]): void;
|
|
369
|
+
/**
|
|
370
|
+
* Brief attention pulse on a seat (a ring that expands + fades once) — used to
|
|
371
|
+
* signal live activity, e.g. a seat "just taken" by another buyer via a WS
|
|
372
|
+
* delta. Purely visual; no state change. `color` overrides the default.
|
|
373
|
+
*/
|
|
374
|
+
flashSeat(seatId: string, color?: string): void;
|
|
375
|
+
/**
|
|
376
|
+
* Brief organizer attention pulse around a whole section. This is a visual
|
|
377
|
+
* overlay only: it never changes section geometry, hit targets, selection, or
|
|
378
|
+
* the active camera. Useful for grouped realtime operations at venue overview.
|
|
379
|
+
*/
|
|
380
|
+
flashSection?(sectionId: string, color?: string): void;
|
|
381
|
+
zoomToFit(): void;
|
|
382
|
+
/** Refit the active section when focused; otherwise frame the current floor/view. */
|
|
383
|
+
refitCurrentView?(): void;
|
|
384
|
+
/** Zoom in one step about the viewport center, clamped to the usual zoom bounds. */
|
|
385
|
+
zoomIn(): void;
|
|
386
|
+
/** Zoom out one step about the viewport center, clamped to the usual zoom bounds. */
|
|
387
|
+
zoomOut(): void;
|
|
388
|
+
/** Individually status-managed seats/table-seats/booths; excludes GA capacity. */
|
|
389
|
+
seatCount(): number;
|
|
390
|
+
/** Seats/table-seats/booths plus the full capacity of rendered GA areas. */
|
|
391
|
+
bookableCount(): number;
|
|
392
|
+
/**
|
|
393
|
+
* Maps a chart-space point (or a seat, by its x/y) to container-relative
|
|
394
|
+
* screen pixels, using the current stage scale/position. Lets host UI anchor
|
|
395
|
+
* DOM overlays (confirm card, tooltip) over a live seat and re-anchor them
|
|
396
|
+
* on `onViewChange`.
|
|
397
|
+
*/
|
|
398
|
+
worldToScreen(point: Point): {
|
|
399
|
+
x: number;
|
|
400
|
+
y: number;
|
|
401
|
+
};
|
|
402
|
+
/** When on, dim non-accessible free seats so accessible seats stand out. */
|
|
403
|
+
setAccessibleFilter(on: boolean): void;
|
|
404
|
+
/**
|
|
405
|
+
* Dim free seats that lack ANY of these accessibility types. `null` clears the
|
|
406
|
+
* filter; `[]` means "any accessible seat" (same as setAccessibleFilter(true)).
|
|
407
|
+
*/
|
|
408
|
+
setAccessibilityFilter(types: AccessibilityType[] | null): void;
|
|
409
|
+
/** Legend hover-highlight: dim free seats of other categories (null clears). */
|
|
410
|
+
setCategoryHighlight?(key: string | null): void;
|
|
411
|
+
/** Price-band filter (F4): dim free seats whose category is NOT in `keys`
|
|
412
|
+
* (null clears). The widget resolves which categories fall in the band. */
|
|
413
|
+
setCategoryFilter?(keys: string[] | null): void;
|
|
414
|
+
/** Smoothly frame the currently available seats in these categories. `null`
|
|
415
|
+
* returns to the full chart. Used after an explicit buyer price-filter action. */
|
|
416
|
+
focusCategories?(keys: string[] | null): void;
|
|
417
|
+
/** Dim the seats of these section/zone ids (organizer manager: held-back inventory). */
|
|
418
|
+
setDimmedSections?(ids: string[] | null): void;
|
|
419
|
+
/**
|
|
420
|
+
* Phase 2 event-level section states: mark these section/zone ids `closed` —
|
|
421
|
+
* flat grey block, seats greyed + not pickable, section stays rendered.
|
|
422
|
+
* `null`/empty clears. (Distinct from the buyer's applyHidden seat-strip.)
|
|
423
|
+
*/
|
|
424
|
+
setClosedSections?(ids: string[] | null): void;
|
|
425
|
+
/**
|
|
426
|
+
* AXS section-focus: dim + desaturate every other section, draw a calm backdrop
|
|
427
|
+
* behind this section, and glide the camera to frame it. Seat-picking is gated
|
|
428
|
+
* until seats are large enough on screen (≥ LABEL_SCALE). Slice 5 / Phase 2 §4.
|
|
429
|
+
*/
|
|
430
|
+
focusSection?(id: string): void;
|
|
431
|
+
/** Clear an AXS section focus (restore full-bowl brightness + drop backdrop). */
|
|
432
|
+
clearSectionFocus?(): void;
|
|
433
|
+
/** The currently AXS-focused section id, or null. */
|
|
434
|
+
getFocusedSection?(): string | null;
|
|
435
|
+
/** World-space rect currently visible in the viewport (minimap viewport frame). */
|
|
436
|
+
getVisibleWorldRect?(): {
|
|
437
|
+
x: number;
|
|
438
|
+
y: number;
|
|
439
|
+
width: number;
|
|
440
|
+
height: number;
|
|
441
|
+
};
|
|
442
|
+
/** Axis-aligned world bounds of all seats + section outlines (minimap frame). */
|
|
443
|
+
getWorldBounds?(): {
|
|
444
|
+
x: number;
|
|
445
|
+
y: number;
|
|
446
|
+
width: number;
|
|
447
|
+
height: number;
|
|
448
|
+
};
|
|
449
|
+
/** Current rendered (not raw-source) geometry for an interactive overview.
|
|
450
|
+
* Multi-floor overview transforms are already applied to these coordinates. */
|
|
451
|
+
getMinimapSnapshot?(): RendererMinimapSnapshot;
|
|
452
|
+
/** Pan without changing zoom so `point` becomes the viewport centre. */
|
|
453
|
+
panToWorld?(point: Point): void;
|
|
454
|
+
/**
|
|
455
|
+
* Colorblind-safe mode: category hues switch to an Okabe-Ito palette and
|
|
456
|
+
* booked seats render hollow (a non-color cue), so seat state never relies
|
|
457
|
+
* on hue alone. Off (the default) renders exactly as before.
|
|
458
|
+
*/
|
|
459
|
+
setColorblindSafe?(on: boolean): void;
|
|
460
|
+
/**
|
|
461
|
+
* Switch the projection. `'flat'` = normal top-down; `'isometric'` = the
|
|
462
|
+
* legacy affine preview; `'perspective'` = projected 2.5D with exact pinhole
|
|
463
|
+
* seat anchors/native hit shapes and bounded per-section tangent surfaces.
|
|
464
|
+
* Purely visual — the chart is authored flat.
|
|
465
|
+
*/
|
|
466
|
+
setViewMode?(mode: RendererViewMode): void;
|
|
467
|
+
/** Current projection (defaults to 'flat' when unimplemented). */
|
|
468
|
+
getViewMode?(): RendererViewMode;
|
|
469
|
+
/** Multi-floor (Batch 5): switch the shown floor; list floors; read the active id. */
|
|
470
|
+
setActiveFloor?(floorId: string): void;
|
|
471
|
+
getFloors?(): {
|
|
472
|
+
id: string;
|
|
473
|
+
name: string;
|
|
474
|
+
}[];
|
|
475
|
+
getActiveFloorId?(): string;
|
|
476
|
+
/** Render all floors stacked (3D overview) vs the active floor. No-op single-floor. */
|
|
477
|
+
setStacked?(on: boolean): void;
|
|
478
|
+
isStacked?(): boolean;
|
|
479
|
+
/** Render every floor in its authored 2D coordinates so the buyer can choose a level. */
|
|
480
|
+
setFloorOverview?(on: boolean): void;
|
|
481
|
+
isFloorOverview?(): boolean;
|
|
482
|
+
/**
|
|
483
|
+
* Section id whose outline contains a container-relative screen point (or null).
|
|
484
|
+
* Feeds the far-zoom "tap a section to zoom in" flow (Slice 5).
|
|
485
|
+
*/
|
|
486
|
+
sectionAt?(clientPoint: Point): string | null;
|
|
487
|
+
/** Seat ids belonging to a section — for the section-summary card (Slice 5). */
|
|
488
|
+
sectionMembers?(id: string): string[];
|
|
489
|
+
/**
|
|
490
|
+
* Smoothly glide (pan+zoom) the camera to frame a section (by id) or a world-
|
|
491
|
+
* space bounds rect over a calm easeInOutCubic glide. `prefers-reduced-motion` snaps.
|
|
492
|
+
* A pointer-down (grab/pan) cancels an in-flight glide. Slice 5 "glide in".
|
|
493
|
+
*/
|
|
494
|
+
focusRegion?(target: string | {
|
|
495
|
+
x: number;
|
|
496
|
+
y: number;
|
|
497
|
+
width: number;
|
|
498
|
+
height: number;
|
|
499
|
+
}, opts?: {
|
|
500
|
+
animate?: boolean;
|
|
501
|
+
minScale?: number;
|
|
502
|
+
durationMs?: number;
|
|
503
|
+
}): void;
|
|
504
|
+
/** Current LOD rung derived from zoom (for the ZONES/SECTIONS/SEATS pill). */
|
|
505
|
+
getRung?(): LodRung;
|
|
506
|
+
/** Jump the camera to a rung's zoom band, centred on the chart (glided). */
|
|
507
|
+
setRung?(rung: LodRung): void;
|
|
508
|
+
/** Read actual browser-rendered label visibility, size, fill, ink and state.
|
|
509
|
+
* Pure diagnostic: it never changes chart or renderer state. */
|
|
510
|
+
getRenderedQualityEvidence(): RendererQualityEvidence;
|
|
511
|
+
destroy(): void;
|
|
512
|
+
}
|
|
513
|
+
interface RendererMinimapSection {
|
|
514
|
+
id: string;
|
|
515
|
+
label: string;
|
|
516
|
+
outline: Point[];
|
|
517
|
+
floorId?: string;
|
|
518
|
+
state: 'selected' | 'available' | 'inactive';
|
|
519
|
+
active: boolean;
|
|
520
|
+
}
|
|
521
|
+
interface RendererMinimapSeat {
|
|
522
|
+
x: number;
|
|
523
|
+
y: number;
|
|
524
|
+
categoryKey: string;
|
|
525
|
+
state: 'selected' | 'available' | 'inactive';
|
|
526
|
+
}
|
|
527
|
+
interface RendererMinimapSnapshot {
|
|
528
|
+
sections: RendererMinimapSection[];
|
|
529
|
+
seats: RendererMinimapSeat[];
|
|
530
|
+
}
|
|
531
|
+
/** localStorage key the Designer writes and the Picker reads. */
|
|
532
|
+
declare const CHART_STORAGE_KEY = "seatmap.chart";
|
|
533
|
+
|
|
534
|
+
export { CHART_STORAGE_KEY as C, type ExpandedSeat as E, type ISeatmapRenderer as I, type LodRung as L, type RendererQualityEvidence as R, type SeatStatus as S, type RenderedFreeTextEvidence as a, type RendererOptions as b, type RendererViewMode as c, type RendererMinimapSnapshot as d, type RendererCallbacks as e, type RenderedBookableLabelEvidence as f, type RenderedGAAreaEvidence as g, type RenderedHierarchyLabelEvidence as h, type RenderedLabelHiddenReason as i, type RenderedRowLabelEvidence as j, type RendererMinimapSeat as k, type RendererMinimapSection as l };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { d as SectionObject, C as ChartDoc } from './types-DTSG6_Hq.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Real-world scale primitives — the ONE place the app fixes chart-unit ↔ metre ↔
|
|
5
|
+
* renderer-world scale, and the section 3D-geometry resolver that rides on it.
|
|
6
|
+
*
|
|
7
|
+
* Everything that converts between chart units, metres, and renderer "world"
|
|
8
|
+
* units derives from {@link METRES_PER_CHART_UNIT}. Renderer world units and
|
|
9
|
+
* chart units are 1:1, so metres → world is exactly {@link CHART_UNITS_PER_METRE}
|
|
10
|
+
* (the single m→world conversion constant Phase B consumers use).
|
|
11
|
+
*
|
|
12
|
+
* This is a leaf module (types only) so both `layout.ts` and `sections.ts` can
|
|
13
|
+
* import it without the two forming an import cycle.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Metres of front-edge height one elevation tier represents. Chosen (not guessed)
|
|
18
|
+
* so `elevation × TIER_HEIGHT_M` metres, scaled back through
|
|
19
|
+
* {@link CHART_UNITS_PER_METRE}, equals the legacy `elevation × LIFT_PER_STEP`
|
|
20
|
+
* world lift exactly — an un-authored chart stays pixel-identical. ≈ 1.329 m/tier.
|
|
21
|
+
*/
|
|
22
|
+
declare const TIER_HEIGHT_M: number;
|
|
23
|
+
/**
|
|
24
|
+
* Resolve a section's real 3D geometry, applying the legacy-elevation fallback so
|
|
25
|
+
* old charts and new charts share ONE code path. Every consumer (iso lift, 360°
|
|
26
|
+
* eye-height, author lint, any 2D depth cue) must call this and never read the raw
|
|
27
|
+
* {@link SectionObject.height}/{@link SectionObject.rake} fields — that is what
|
|
28
|
+
* keeps un-authored charts rendering identically to today.
|
|
29
|
+
*
|
|
30
|
+
* - `height`: authored absolute metres if present, else owning-floor base height
|
|
31
|
+
* plus `elevation × TIER_HEIGHT_M`.
|
|
32
|
+
* - `rake`: authored degrees if present, else 0 (flat).
|
|
33
|
+
*
|
|
34
|
+
* Malformed values are bounded here as a last defensive barrier. Structural
|
|
35
|
+
* validation still reports them so drafts can be repaired instead of silently
|
|
36
|
+
* persisting a renderer-only interpretation.
|
|
37
|
+
*
|
|
38
|
+
* Pure — no document mutation, no side effects.
|
|
39
|
+
*/
|
|
40
|
+
interface SectionGeometryContext {
|
|
41
|
+
/** Absolute physical height of the owning floor above the venue datum. */
|
|
42
|
+
floorBaseHeightM?: number;
|
|
43
|
+
}
|
|
44
|
+
declare function sectionGeometry(section: Pick<SectionObject, 'elevation' | 'height' | 'rake'>, context?: SectionGeometryContext): {
|
|
45
|
+
height: number;
|
|
46
|
+
rake: number;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Section membership + hide/show resolution (Batch 3.3).
|
|
51
|
+
*
|
|
52
|
+
* A `SectionObject` is a polygon drawn over existing seat objects; an object
|
|
53
|
+
* "belongs" to a section when its visual centre (`objectCenter`) falls inside
|
|
54
|
+
* the section outline, first section in doc order winning. This is the same
|
|
55
|
+
* spatial notion `objectCenter`'s doc-comment describes, resolved once here so
|
|
56
|
+
* BOTH the event manager (Sections tab counts) and the buyer picker (omit
|
|
57
|
+
* hidden seats) agree on which seats live in which section.
|
|
58
|
+
*
|
|
59
|
+
* Hiding is per-EVENT (the EventDO holds the hidden id set), not a chart edit —
|
|
60
|
+
* so a republish of the chart never disturbs it. A hidden id may be a section
|
|
61
|
+
* id, a zone id (hides every section in the zone), or `UNGROUPED_ID` (the
|
|
62
|
+
* catch-all bucket of seat objects that sit in no section).
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/** Synthetic section id for seat objects that fall in no drawn section. */
|
|
66
|
+
declare const UNGROUPED_ID = "__ungrouped__";
|
|
67
|
+
/**
|
|
68
|
+
* A per section/zone availability window (Batch 3.4). Wire-compatible with the
|
|
69
|
+
* EventDO's own `AvailabilityRule`. Absence of a rule for an id = on sale.
|
|
70
|
+
* 'hidden' — manual: hidden until the organizer reveals it (3.3).
|
|
71
|
+
* 'timed' — hidden until `revealAt` (epoch ms), then auto-reveals.
|
|
72
|
+
* 'threshold' — auto-reveals once the on-sale inventory is `thresholdPct`% sold.
|
|
73
|
+
* 'closed' — visible to buyers but not purchasable (rendered flat grey);
|
|
74
|
+
* unlike 'hidden', the seats stay on the map, just off sale.
|
|
75
|
+
* `labels` are the seat labels the id governs, so a threshold's denominator can
|
|
76
|
+
* exclude still-hidden seats.
|
|
77
|
+
*/
|
|
78
|
+
interface AvailabilityRule {
|
|
79
|
+
mode: 'hidden' | 'timed' | 'threshold' | 'closed';
|
|
80
|
+
revealAt?: number;
|
|
81
|
+
thresholdPct?: number;
|
|
82
|
+
labels?: string[];
|
|
83
|
+
}
|
|
84
|
+
interface SectionNode {
|
|
85
|
+
/** Section id (a `SectionObject.id`, or `UNGROUPED_ID`). */
|
|
86
|
+
id: string;
|
|
87
|
+
label: string;
|
|
88
|
+
/** Zone id this section points at (`SectionObject.zone`), if any. */
|
|
89
|
+
zone?: string;
|
|
90
|
+
/** Total seats across the member objects. */
|
|
91
|
+
seatCount: number;
|
|
92
|
+
/** Ids of the seat-bearing objects that belong to this section. */
|
|
93
|
+
objectIds: string[];
|
|
94
|
+
/** Seat labels across the member objects (for availability-rule denominators). */
|
|
95
|
+
seatLabels: string[];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Resolve section membership for a chart. Returns one node per drawn section
|
|
99
|
+
* (doc order), a synthetic "Ungrouped" node for loose seat objects (null when
|
|
100
|
+
* every seat sits in a section), and the object→section id map.
|
|
101
|
+
*/
|
|
102
|
+
declare function computeSections(doc: ChartDoc): {
|
|
103
|
+
sections: SectionNode[];
|
|
104
|
+
ungrouped: SectionNode | null;
|
|
105
|
+
/** seat-object id → owning section id (or `UNGROUPED_ID`). */
|
|
106
|
+
objectToSection: Map<string, string>;
|
|
107
|
+
};
|
|
108
|
+
/** Is a drawn section hidden under `hidden` — directly, or via its zone? */
|
|
109
|
+
declare function isSectionHidden(s: SectionObject, hidden: ReadonlySet<string>): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* The set of seat-object ids to omit from the buyer view for a given hidden id
|
|
112
|
+
* set. An object is hidden when its owning section is hidden (directly or via
|
|
113
|
+
* zone), or it is ungrouped and the catch-all bucket is hidden.
|
|
114
|
+
*/
|
|
115
|
+
declare function hiddenObjectIds(doc: ChartDoc, hidden: ReadonlySet<string>): Set<string>;
|
|
116
|
+
/**
|
|
117
|
+
* A copy of the doc with hidden sections' member objects removed, plus the
|
|
118
|
+
* hidden section overlays themselves (so no empty block renders). Returns the
|
|
119
|
+
* SAME reference when nothing is hidden — callers can skip a re-render on `===`.
|
|
120
|
+
*/
|
|
121
|
+
declare function applyHidden(doc: ChartDoc, hidden: ReadonlySet<string>): ChartDoc;
|
|
122
|
+
|
|
123
|
+
export { type AvailabilityRule as A, type SectionNode as S, TIER_HEIGHT_M as T, UNGROUPED_ID as U, applyHidden as a, computeSections as c, hiddenObjectIds as h, isSectionHidden as i, sectionGeometry as s };
|