@seatlayer/core 0.30.1 → 0.32.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.
@@ -1,4 +1,4 @@
1
- import { C as ChartDoc, E as ExpandedSeat } from '../types-CG2pEDoI.cjs';
1
+ import { C as ChartDoc, E as ExpandedSeat } from '../types-DO_J5DtX.cjs';
2
2
 
3
3
  /**
4
4
  * Dirty-flag render loop. A frame is drawn only while the camera is moving /
@@ -104,7 +104,7 @@ interface Theme3D {
104
104
  * unreadable confetti.
105
105
  */
106
106
 
107
- type LabelKind = 'zone' | 'section' | 'annotation' | 'booth';
107
+ type LabelKind = 'zone' | 'section' | 'ga' | 'annotation' | 'booth' | 'row' | 'seat';
108
108
  interface SceneLabel {
109
109
  id: string;
110
110
  kind: LabelKind;
@@ -188,6 +188,29 @@ interface SeatInstanceData {
188
188
  iRing: Float32Array;
189
189
  /** float per instance: owning floor index, for per-floor isolation. */
190
190
  iFloor: Float32Array;
191
+ /**
192
+ * float per instance: facing yaw in radians, for the near-field chair mesh.
193
+ *
194
+ * A billboard dot has no front, so nothing here ever needed a direction. A
195
+ * chair does, and getting it wrong is worse than drawing nothing — a row of
196
+ * seats with their backs to the stage reads as a mistake immediately.
197
+ *
198
+ * Left at zero by this builder and filled by `sceneModel`, which is the layer
199
+ * that knows what each seat FACES (its floor's focal point). Direct callers
200
+ * and tests that build instances without a scene get zeros, which is a
201
+ * well-defined "facing +Z" rather than an undefined attribute.
202
+ */
203
+ iYaw: Float32Array;
204
+ /**
205
+ * float per instance: half-width of this seat's near-field CHAIR, world metres.
206
+ *
207
+ * Deliberately not `iMaxRadius`. That value is the dot's ceiling — conservative
208
+ * by design so round dots stay visually apart, and clamped to
209
+ * SEAT_DOT_RADIUS_M on top of that. Sizing a chair from it gave 0.34 m chairs
210
+ * under 0.95 m backs: an aspect ratio near 3:1, which reads as a headstone.
211
+ * Real seats very nearly touch. See `chairHalfWidth`.
212
+ */
213
+ iChairWidth: Float32Array;
191
214
  /** seatId → instance index (drives targeted availability updates). */
192
215
  idToIndex: Map<string, number>;
193
216
  }
@@ -217,6 +240,23 @@ interface SceneZone {
217
240
  /** What this zone faces — its authored focal, else the venue's. */
218
241
  focalWorld: [number, number, number];
219
242
  }
243
+ /**
244
+ * One seated section, resolved for navigation — the middle rung of the venue
245
+ * ladder, between a zone and a seat. A chart with no zones authored still has
246
+ * sections, so this is the level at which every venue can be navigated.
247
+ */
248
+ interface SceneSection {
249
+ id: string;
250
+ /** Buyer-facing name, matching the section label. */
251
+ label: string;
252
+ seatCount: number;
253
+ /** World-metre centre of the section's seats (camera target). */
254
+ center: [number, number, number];
255
+ /** Half-diagonal of its seat footprint, world metres (camera fit). */
256
+ radius: number;
257
+ /** What this section faces — the camera approaches from this side. */
258
+ focalWorld: [number, number, number];
259
+ }
220
260
  /** A navigable floor — a logical level of the venue. */
221
261
  interface SceneFloor {
222
262
  index: number;
@@ -246,6 +286,8 @@ interface SceneModel {
246
286
  focalWorld: [number, number, number];
247
287
  /** The venue's zones, in authored order. Empty when the chart has none. */
248
288
  zones: SceneZone[];
289
+ /** Seated sections, in authored order — the navigable middle rung. */
290
+ sections: SceneSection[];
249
291
  /**
250
292
  * The venue's floors, in authored order. A single-floor chart reports one.
251
293
  *
@@ -367,6 +409,15 @@ interface Venue3DHandle {
367
409
  * means the seats face the camera rather than presenting their backs.
368
410
  */
369
411
  focusZone(zoneId: string): boolean;
412
+ /** The venue's seated sections (id, name, seat count) in authored order. */
413
+ sections(): SceneSection[];
414
+ /**
415
+ * Frame a section — the middle rung of the venue ladder, and the one every
416
+ * chart has. Zones are optional and a chart may author none or one; sections
417
+ * are what a buyer picks between when "which part of the venue" has already
418
+ * been answered. Returns false for an unknown or empty section.
419
+ */
420
+ focusSection(sectionId: string): boolean;
370
421
  /** The venue's floors (id, name, seat count) in authored order. */
371
422
  floors(): SceneFloor[];
372
423
  /**
@@ -1,4 +1,4 @@
1
- import { C as ChartDoc, E as ExpandedSeat } from '../types-CG2pEDoI.js';
1
+ import { C as ChartDoc, E as ExpandedSeat } from '../types-DO_J5DtX.js';
2
2
 
3
3
  /**
4
4
  * Dirty-flag render loop. A frame is drawn only while the camera is moving /
@@ -104,7 +104,7 @@ interface Theme3D {
104
104
  * unreadable confetti.
105
105
  */
106
106
 
107
- type LabelKind = 'zone' | 'section' | 'annotation' | 'booth';
107
+ type LabelKind = 'zone' | 'section' | 'ga' | 'annotation' | 'booth' | 'row' | 'seat';
108
108
  interface SceneLabel {
109
109
  id: string;
110
110
  kind: LabelKind;
@@ -188,6 +188,29 @@ interface SeatInstanceData {
188
188
  iRing: Float32Array;
189
189
  /** float per instance: owning floor index, for per-floor isolation. */
190
190
  iFloor: Float32Array;
191
+ /**
192
+ * float per instance: facing yaw in radians, for the near-field chair mesh.
193
+ *
194
+ * A billboard dot has no front, so nothing here ever needed a direction. A
195
+ * chair does, and getting it wrong is worse than drawing nothing — a row of
196
+ * seats with their backs to the stage reads as a mistake immediately.
197
+ *
198
+ * Left at zero by this builder and filled by `sceneModel`, which is the layer
199
+ * that knows what each seat FACES (its floor's focal point). Direct callers
200
+ * and tests that build instances without a scene get zeros, which is a
201
+ * well-defined "facing +Z" rather than an undefined attribute.
202
+ */
203
+ iYaw: Float32Array;
204
+ /**
205
+ * float per instance: half-width of this seat's near-field CHAIR, world metres.
206
+ *
207
+ * Deliberately not `iMaxRadius`. That value is the dot's ceiling — conservative
208
+ * by design so round dots stay visually apart, and clamped to
209
+ * SEAT_DOT_RADIUS_M on top of that. Sizing a chair from it gave 0.34 m chairs
210
+ * under 0.95 m backs: an aspect ratio near 3:1, which reads as a headstone.
211
+ * Real seats very nearly touch. See `chairHalfWidth`.
212
+ */
213
+ iChairWidth: Float32Array;
191
214
  /** seatId → instance index (drives targeted availability updates). */
192
215
  idToIndex: Map<string, number>;
193
216
  }
@@ -217,6 +240,23 @@ interface SceneZone {
217
240
  /** What this zone faces — its authored focal, else the venue's. */
218
241
  focalWorld: [number, number, number];
219
242
  }
243
+ /**
244
+ * One seated section, resolved for navigation — the middle rung of the venue
245
+ * ladder, between a zone and a seat. A chart with no zones authored still has
246
+ * sections, so this is the level at which every venue can be navigated.
247
+ */
248
+ interface SceneSection {
249
+ id: string;
250
+ /** Buyer-facing name, matching the section label. */
251
+ label: string;
252
+ seatCount: number;
253
+ /** World-metre centre of the section's seats (camera target). */
254
+ center: [number, number, number];
255
+ /** Half-diagonal of its seat footprint, world metres (camera fit). */
256
+ radius: number;
257
+ /** What this section faces — the camera approaches from this side. */
258
+ focalWorld: [number, number, number];
259
+ }
220
260
  /** A navigable floor — a logical level of the venue. */
221
261
  interface SceneFloor {
222
262
  index: number;
@@ -246,6 +286,8 @@ interface SceneModel {
246
286
  focalWorld: [number, number, number];
247
287
  /** The venue's zones, in authored order. Empty when the chart has none. */
248
288
  zones: SceneZone[];
289
+ /** Seated sections, in authored order — the navigable middle rung. */
290
+ sections: SceneSection[];
249
291
  /**
250
292
  * The venue's floors, in authored order. A single-floor chart reports one.
251
293
  *
@@ -367,6 +409,15 @@ interface Venue3DHandle {
367
409
  * means the seats face the camera rather than presenting their backs.
368
410
  */
369
411
  focusZone(zoneId: string): boolean;
412
+ /** The venue's seated sections (id, name, seat count) in authored order. */
413
+ sections(): SceneSection[];
414
+ /**
415
+ * Frame a section — the middle rung of the venue ladder, and the one every
416
+ * chart has. Zones are optional and a chart may author none or one; sections
417
+ * are what a buyer picks between when "which part of the venue" has already
418
+ * been answered. Returns false for an unknown or empty section.
419
+ */
420
+ focusSection(sectionId: string): boolean;
370
421
  /** The venue's floors (id, name, seat count) in authored order. */
371
422
  floors(): SceneFloor[];
372
423
  /**