@seatlayer/core 0.46.0 → 0.47.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.
Files changed (40) hide show
  1. package/dist/chunk-AZODENEL.js +97 -0
  2. package/dist/chunk-AZODENEL.js.map +1 -0
  3. package/dist/chunk-FVCOOLJO.js +335 -0
  4. package/dist/chunk-FVCOOLJO.js.map +1 -0
  5. package/dist/{chunk-5MRJCIZP.js → chunk-TCTAS4Z2.js} +88 -14
  6. package/dist/chunk-TCTAS4Z2.js.map +1 -0
  7. package/dist/{de-UHAOVDS3.js → de-ST4H423D.js} +6 -3
  8. package/dist/{de-UHAOVDS3.js.map → de-ST4H423D.js.map} +1 -1
  9. package/dist/{es-6TJS2L7S.js → es-WEC5NHRT.js} +6 -3
  10. package/dist/{es-6TJS2L7S.js.map → es-WEC5NHRT.js.map} +1 -1
  11. package/dist/{fr-MMSY7FPE.js → fr-SGBFNAQV.js} +6 -3
  12. package/dist/{fr-MMSY7FPE.js.map → fr-SGBFNAQV.js.map} +1 -1
  13. package/dist/index.cjs +251 -39
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +119 -4
  16. package/dist/index.d.ts +119 -4
  17. package/dist/index.js +152 -24
  18. package/dist/index.js.map +1 -1
  19. package/dist/{types-DBnRO2hX.d.cts → types-CE63BK0j.d.cts} +88 -10
  20. package/dist/{types-DBnRO2hX.d.ts → types-CE63BK0j.d.ts} +88 -10
  21. package/dist/view/panoramaDelivery.cjs +126 -0
  22. package/dist/view/panoramaDelivery.cjs.map +1 -0
  23. package/dist/view/panoramaDelivery.d.cts +34 -0
  24. package/dist/view/panoramaDelivery.d.ts +34 -0
  25. package/dist/view/panoramaDelivery.js +17 -0
  26. package/dist/view/panoramaDelivery.js.map +1 -0
  27. package/dist/view3d/crossfade/panorama.cjs +453 -0
  28. package/dist/view3d/crossfade/panorama.cjs.map +1 -0
  29. package/dist/view3d/crossfade/panorama.d.cts +110 -0
  30. package/dist/view3d/crossfade/panorama.d.ts +110 -0
  31. package/dist/view3d/crossfade/panorama.js +30 -0
  32. package/dist/view3d/crossfade/panorama.js.map +1 -0
  33. package/dist/view3d/index.cjs +1161 -128
  34. package/dist/view3d/index.cjs.map +1 -1
  35. package/dist/view3d/index.d.cts +60 -35
  36. package/dist/view3d/index.d.ts +60 -35
  37. package/dist/view3d/index.js +945 -300
  38. package/dist/view3d/index.js.map +1 -1
  39. package/package.json +28 -1
  40. package/dist/chunk-5MRJCIZP.js.map +0 -1
@@ -1,4 +1,5 @@
1
- import { C as ChartDoc, E as ExpandedSeat } from '../types-DBnRO2hX.cjs';
1
+ import { C as ChartDoc, E as ExpandedSeat } from '../types-CE63BK0j.cjs';
2
+ import { SeatView } from './crossfade/panorama.cjs';
2
3
 
3
4
  /**
4
5
  * Dirty-flag render loop. A frame is drawn only while the camera is moving /
@@ -234,6 +235,8 @@ interface SeatInstanceData {
234
235
  * Real seats very nearly touch. See `chairHalfWidth`.
235
236
  */
236
237
  iChairWidth: Float32Array;
238
+ /** 1 = physical chair; 0 = sellable empty wheelchair bay. */
239
+ iPhysicalSeat: Float32Array;
237
240
  /** seatId → instance index (drives targeted availability updates). */
238
241
  idToIndex: Map<string, number>;
239
242
  }
@@ -288,6 +291,15 @@ interface SceneSection {
288
291
  /** What this section faces — the camera approaches from this side. */
289
292
  focalWorld: [number, number, number];
290
293
  }
294
+ /** One authored row resolved for guided large-venue navigation. */
295
+ interface SceneRow {
296
+ id: string;
297
+ label: string;
298
+ sectionId?: string;
299
+ seatCount: number;
300
+ center: [number, number, number];
301
+ radius: number;
302
+ }
291
303
  /** A navigable floor — a logical level of the venue. */
292
304
  interface SceneFloor {
293
305
  index: number;
@@ -329,6 +341,8 @@ interface SceneModel {
329
341
  stages: StageBounds[];
330
342
  /** Seated sections, in authored order — the navigable middle rung. */
331
343
  sections: SceneSection[];
344
+ /** Rows used by the Section → Row → Seat locator. */
345
+ rows: SceneRow[];
332
346
  /**
333
347
  * The venue's floors, in authored order. A single-floor chart reports one.
334
348
  *
@@ -348,44 +362,13 @@ interface SceneModel {
348
362
  interface SceneModelInput {
349
363
  doc: ChartDoc;
350
364
  seats: ExpandedSeat[];
365
+ /** Overrides the chart's active layout without mutating its authored data. */
366
+ eventConfigurationId?: string;
351
367
  /** Optional initial per-seat state (default all available). */
352
368
  initialState?: (seat: ExpandedSeat) => SeatState3D;
353
369
  }
354
370
  declare function buildSceneModel(input: SceneModelInput): SceneModel;
355
371
 
356
- /**
357
- * Slice 3 hand-off — the DOM panorama overlay the fly-to-seat cinematic
358
- * dissolves into. Decoupled by design: the CALLER supplies the equirectangular
359
- * image (via mountVenue3D's getSeatView), so view3d never imports the app's
360
- * panorama generator and the chunk stays lean.
361
- *
362
- * Technique (mirrors SeatPicker.openSeatView, reimplemented small): an equirect
363
- * image panned with `repeat-x`; the initial horizontal offset is set so the
364
- * panorama's bearing matches the final camera yaw — the dissolve reads as the
365
- * same view sharpening, not a cut. CSS opacity fade is compositor-only.
366
- */
367
- interface SeatView {
368
- url: string;
369
- /**
370
- * True when `url` is a SYNTHESISED panorama rather than a real photograph.
371
- *
372
- * It decides which of two very different things the buyer gets, so the caller
373
- * must say rather than the renderer guess. A generated equirect is a picture
374
- * of a 3D scene the renderer already has: at 2048×1024 it covers 106° of
375
- * horizontal view in ~600 source pixels, which a 3072-device-pixel viewport
376
- * magnifies FIVE times, and no amount of art survives that. So a generated
377
- * view is not drawn as an image at all — the camera simply looks around the
378
- * real scene, which has no resolution ceiling.
379
- *
380
- * A real photo has no such substitute and goes on the sphere, where a 5760 or
381
- * 8192-wide capture has three to four times the detail to give.
382
- */
383
- generated?: boolean;
384
- /** Bearing (deg, 0 = facing the focal/stage) the panorama should open centred
385
- * on, to match the camera's final yaw. Default 0 (both face the stage). */
386
- initialBearingDeg?: number;
387
- }
388
-
389
372
  /**
390
373
  * view3d analytics — a tiny, decoupled event emitter for the venue view. The
391
374
  * caller (app/harness) supplies `onAnalytics`; this class owns the per-mount
@@ -395,6 +378,23 @@ interface SeatView {
395
378
  */
396
379
  type Analytics3DCallback = (event: string, props?: Record<string, unknown>) => void;
397
380
 
381
+ interface PreparedVenue3D {
382
+ model: SceneModel;
383
+ buildMs: number;
384
+ source: 'worker' | 'main';
385
+ }
386
+ interface PrepareVenue3DInput {
387
+ doc: ChartDoc;
388
+ seats: ExpandedSeat[];
389
+ eventConfigurationId?: string;
390
+ }
391
+ /**
392
+ * Build the CPU-heavy merged mesh and seat buffers off the UI thread. Worker
393
+ * failure is non-fatal: old browsers and restrictive hosts fall back to the
394
+ * exact same pure compiler on the main thread.
395
+ */
396
+ declare function prepareVenue3D(input: PrepareVenue3DInput): Promise<PreparedVenue3D>;
397
+
398
398
  /**
399
399
  * view3d — the sole dynamic-import boundary for the lazy OGL venue-view chunk.
400
400
  *
@@ -414,10 +414,17 @@ interface Venue3DInput {
414
414
  seats: ExpandedSeat[];
415
415
  /** Optional initial per-seat state (default all available). */
416
416
  initialState?: (seat: ExpandedSeat) => SeatState3D;
417
+ /** CPU scene prepared by `prepareVenue3D`; avoids rebuilding on mount. */
418
+ prepared?: PreparedVenue3D;
417
419
  }
418
420
  interface Venue3DOptions {
419
421
  /** Fired on a tap that hits a seat (GPU color-pick). Not fired on empty taps. */
420
422
  onSeatPick?: (seatId: string) => void;
423
+ /** Overview → section drill state. A stand tap reports its owning section;
424
+ * Overview reports null so host navigation can stay in sync. */
425
+ onSectionFocusChange?: (sectionId: string | null) => void;
426
+ /** Camera target changes, including internal next/previous and Overview UI. */
427
+ onViewTargetChange?: (seatId: string | null) => void;
421
428
  /**
422
429
  * Supplies the view-from-seat panorama for the cinematic hand-off. Decoupled:
423
430
  * the caller (app/harness) owns panorama generation; view3d never imports it.
@@ -432,6 +439,13 @@ interface Venue3DOptions {
432
439
  * rendering. Absent = no events emitted.
433
440
  */
434
441
  onAnalytics?: Analytics3DCallback;
442
+ /**
443
+ * Let portrait overview framing crop the venue's far edges within a bounded
444
+ * landscape fit so seats stay discoverable instead of shrinking the whole
445
+ * bowl to fit. Opt-in because designer/editor previews still prefer strict
446
+ * contain framing; validated for the buyer across `/dev/3d` fixtures.
447
+ */
448
+ portraitOverviewCrop?: boolean;
435
449
  }
436
450
  interface Venue3DStats extends RenderLoopStats {
437
451
  drawCalls: number;
@@ -448,6 +462,8 @@ interface Venue3DHandle {
448
462
  * view-from-seat panorama. Resolves at flight end; a drag cancels it, a second
449
463
  * call retargets, dispose resolves early. Reduced-motion → a short fade. */
450
464
  flyToSeat(seatId: string): Promise<void>;
465
+ /** Cancel a seat flight/panorama and frame the complete venue. */
466
+ focusOverview(): void;
451
467
  resize(): void;
452
468
  stats(): Venue3DStats;
453
469
  loseContextForTest(): void;
@@ -474,6 +490,15 @@ interface Venue3DHandle {
474
490
  * been answered. Returns false for an unknown or empty section.
475
491
  */
476
492
  focusSection(sectionId: string): boolean;
493
+ /** Rows in the venue, optionally narrowed to a section. */
494
+ rows(sectionId?: string): SceneRow[];
495
+ /** Seats in one row, in authored order. */
496
+ seatsInRow(rowId: string): Array<{
497
+ id: string;
498
+ label: string;
499
+ }>;
500
+ /** Frame a row closely enough for its on-demand seat numbers to be legible. */
501
+ focusRow(rowId: string): boolean;
477
502
  /** The venue's floors (id, name, seat count) in authored order. */
478
503
  floors(): SceneFloor[];
479
504
  /**
@@ -489,4 +514,4 @@ interface Venue3DHandle {
489
514
  }
490
515
  declare function mountVenue3D(container: HTMLElement, input: Venue3DInput, opts?: Venue3DOptions): Venue3DHandle;
491
516
 
492
- export { type Analytics3DCallback, type SeatState3D, type SeatView, type Venue3DHandle, type Venue3DInput, type Venue3DOptions, type Venue3DStats, buildSceneModel, mountVenue3D };
517
+ export { type Analytics3DCallback, type SeatState3D, SeatView, type Venue3DHandle, type Venue3DInput, type Venue3DOptions, type Venue3DStats, buildSceneModel, mountVenue3D, prepareVenue3D };
@@ -1,4 +1,5 @@
1
- import { C as ChartDoc, E as ExpandedSeat } from '../types-DBnRO2hX.js';
1
+ import { C as ChartDoc, E as ExpandedSeat } from '../types-CE63BK0j.js';
2
+ import { SeatView } from './crossfade/panorama.js';
2
3
 
3
4
  /**
4
5
  * Dirty-flag render loop. A frame is drawn only while the camera is moving /
@@ -234,6 +235,8 @@ interface SeatInstanceData {
234
235
  * Real seats very nearly touch. See `chairHalfWidth`.
235
236
  */
236
237
  iChairWidth: Float32Array;
238
+ /** 1 = physical chair; 0 = sellable empty wheelchair bay. */
239
+ iPhysicalSeat: Float32Array;
237
240
  /** seatId → instance index (drives targeted availability updates). */
238
241
  idToIndex: Map<string, number>;
239
242
  }
@@ -288,6 +291,15 @@ interface SceneSection {
288
291
  /** What this section faces — the camera approaches from this side. */
289
292
  focalWorld: [number, number, number];
290
293
  }
294
+ /** One authored row resolved for guided large-venue navigation. */
295
+ interface SceneRow {
296
+ id: string;
297
+ label: string;
298
+ sectionId?: string;
299
+ seatCount: number;
300
+ center: [number, number, number];
301
+ radius: number;
302
+ }
291
303
  /** A navigable floor — a logical level of the venue. */
292
304
  interface SceneFloor {
293
305
  index: number;
@@ -329,6 +341,8 @@ interface SceneModel {
329
341
  stages: StageBounds[];
330
342
  /** Seated sections, in authored order — the navigable middle rung. */
331
343
  sections: SceneSection[];
344
+ /** Rows used by the Section → Row → Seat locator. */
345
+ rows: SceneRow[];
332
346
  /**
333
347
  * The venue's floors, in authored order. A single-floor chart reports one.
334
348
  *
@@ -348,44 +362,13 @@ interface SceneModel {
348
362
  interface SceneModelInput {
349
363
  doc: ChartDoc;
350
364
  seats: ExpandedSeat[];
365
+ /** Overrides the chart's active layout without mutating its authored data. */
366
+ eventConfigurationId?: string;
351
367
  /** Optional initial per-seat state (default all available). */
352
368
  initialState?: (seat: ExpandedSeat) => SeatState3D;
353
369
  }
354
370
  declare function buildSceneModel(input: SceneModelInput): SceneModel;
355
371
 
356
- /**
357
- * Slice 3 hand-off — the DOM panorama overlay the fly-to-seat cinematic
358
- * dissolves into. Decoupled by design: the CALLER supplies the equirectangular
359
- * image (via mountVenue3D's getSeatView), so view3d never imports the app's
360
- * panorama generator and the chunk stays lean.
361
- *
362
- * Technique (mirrors SeatPicker.openSeatView, reimplemented small): an equirect
363
- * image panned with `repeat-x`; the initial horizontal offset is set so the
364
- * panorama's bearing matches the final camera yaw — the dissolve reads as the
365
- * same view sharpening, not a cut. CSS opacity fade is compositor-only.
366
- */
367
- interface SeatView {
368
- url: string;
369
- /**
370
- * True when `url` is a SYNTHESISED panorama rather than a real photograph.
371
- *
372
- * It decides which of two very different things the buyer gets, so the caller
373
- * must say rather than the renderer guess. A generated equirect is a picture
374
- * of a 3D scene the renderer already has: at 2048×1024 it covers 106° of
375
- * horizontal view in ~600 source pixels, which a 3072-device-pixel viewport
376
- * magnifies FIVE times, and no amount of art survives that. So a generated
377
- * view is not drawn as an image at all — the camera simply looks around the
378
- * real scene, which has no resolution ceiling.
379
- *
380
- * A real photo has no such substitute and goes on the sphere, where a 5760 or
381
- * 8192-wide capture has three to four times the detail to give.
382
- */
383
- generated?: boolean;
384
- /** Bearing (deg, 0 = facing the focal/stage) the panorama should open centred
385
- * on, to match the camera's final yaw. Default 0 (both face the stage). */
386
- initialBearingDeg?: number;
387
- }
388
-
389
372
  /**
390
373
  * view3d analytics — a tiny, decoupled event emitter for the venue view. The
391
374
  * caller (app/harness) supplies `onAnalytics`; this class owns the per-mount
@@ -395,6 +378,23 @@ interface SeatView {
395
378
  */
396
379
  type Analytics3DCallback = (event: string, props?: Record<string, unknown>) => void;
397
380
 
381
+ interface PreparedVenue3D {
382
+ model: SceneModel;
383
+ buildMs: number;
384
+ source: 'worker' | 'main';
385
+ }
386
+ interface PrepareVenue3DInput {
387
+ doc: ChartDoc;
388
+ seats: ExpandedSeat[];
389
+ eventConfigurationId?: string;
390
+ }
391
+ /**
392
+ * Build the CPU-heavy merged mesh and seat buffers off the UI thread. Worker
393
+ * failure is non-fatal: old browsers and restrictive hosts fall back to the
394
+ * exact same pure compiler on the main thread.
395
+ */
396
+ declare function prepareVenue3D(input: PrepareVenue3DInput): Promise<PreparedVenue3D>;
397
+
398
398
  /**
399
399
  * view3d — the sole dynamic-import boundary for the lazy OGL venue-view chunk.
400
400
  *
@@ -414,10 +414,17 @@ interface Venue3DInput {
414
414
  seats: ExpandedSeat[];
415
415
  /** Optional initial per-seat state (default all available). */
416
416
  initialState?: (seat: ExpandedSeat) => SeatState3D;
417
+ /** CPU scene prepared by `prepareVenue3D`; avoids rebuilding on mount. */
418
+ prepared?: PreparedVenue3D;
417
419
  }
418
420
  interface Venue3DOptions {
419
421
  /** Fired on a tap that hits a seat (GPU color-pick). Not fired on empty taps. */
420
422
  onSeatPick?: (seatId: string) => void;
423
+ /** Overview → section drill state. A stand tap reports its owning section;
424
+ * Overview reports null so host navigation can stay in sync. */
425
+ onSectionFocusChange?: (sectionId: string | null) => void;
426
+ /** Camera target changes, including internal next/previous and Overview UI. */
427
+ onViewTargetChange?: (seatId: string | null) => void;
421
428
  /**
422
429
  * Supplies the view-from-seat panorama for the cinematic hand-off. Decoupled:
423
430
  * the caller (app/harness) owns panorama generation; view3d never imports it.
@@ -432,6 +439,13 @@ interface Venue3DOptions {
432
439
  * rendering. Absent = no events emitted.
433
440
  */
434
441
  onAnalytics?: Analytics3DCallback;
442
+ /**
443
+ * Let portrait overview framing crop the venue's far edges within a bounded
444
+ * landscape fit so seats stay discoverable instead of shrinking the whole
445
+ * bowl to fit. Opt-in because designer/editor previews still prefer strict
446
+ * contain framing; validated for the buyer across `/dev/3d` fixtures.
447
+ */
448
+ portraitOverviewCrop?: boolean;
435
449
  }
436
450
  interface Venue3DStats extends RenderLoopStats {
437
451
  drawCalls: number;
@@ -448,6 +462,8 @@ interface Venue3DHandle {
448
462
  * view-from-seat panorama. Resolves at flight end; a drag cancels it, a second
449
463
  * call retargets, dispose resolves early. Reduced-motion → a short fade. */
450
464
  flyToSeat(seatId: string): Promise<void>;
465
+ /** Cancel a seat flight/panorama and frame the complete venue. */
466
+ focusOverview(): void;
451
467
  resize(): void;
452
468
  stats(): Venue3DStats;
453
469
  loseContextForTest(): void;
@@ -474,6 +490,15 @@ interface Venue3DHandle {
474
490
  * been answered. Returns false for an unknown or empty section.
475
491
  */
476
492
  focusSection(sectionId: string): boolean;
493
+ /** Rows in the venue, optionally narrowed to a section. */
494
+ rows(sectionId?: string): SceneRow[];
495
+ /** Seats in one row, in authored order. */
496
+ seatsInRow(rowId: string): Array<{
497
+ id: string;
498
+ label: string;
499
+ }>;
500
+ /** Frame a row closely enough for its on-demand seat numbers to be legible. */
501
+ focusRow(rowId: string): boolean;
477
502
  /** The venue's floors (id, name, seat count) in authored order. */
478
503
  floors(): SceneFloor[];
479
504
  /**
@@ -489,4 +514,4 @@ interface Venue3DHandle {
489
514
  }
490
515
  declare function mountVenue3D(container: HTMLElement, input: Venue3DInput, opts?: Venue3DOptions): Venue3DHandle;
491
516
 
492
- export { type Analytics3DCallback, type SeatState3D, type SeatView, type Venue3DHandle, type Venue3DInput, type Venue3DOptions, type Venue3DStats, buildSceneModel, mountVenue3D };
517
+ export { type Analytics3DCallback, type SeatState3D, SeatView, type Venue3DHandle, type Venue3DInput, type Venue3DOptions, type Venue3DStats, buildSceneModel, mountVenue3D, prepareVenue3D };