@seatlayer/core 0.52.0 → 0.53.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 (51) hide show
  1. package/LICENSE +16 -17
  2. package/README.md +8 -18
  3. package/dist/chunk-54A7LIL5.js +1 -0
  4. package/dist/chunk-IJI4WU57.js +1 -0
  5. package/dist/chunk-XPPT3OGQ.js +1 -0
  6. package/dist/core/seatConfidence.cjs +1 -76
  7. package/dist/core/seatConfidence.js +1 -51
  8. package/dist/de-75NWRKC5.js +1 -0
  9. package/dist/es-BM7EJ7PW.js +1 -0
  10. package/dist/fr-HPXQHIB4.js +1 -0
  11. package/dist/index.cjs +1 -12717
  12. package/dist/index.d.cts +38 -53
  13. package/dist/index.d.ts +38 -53
  14. package/dist/index.js +1 -10235
  15. package/dist/picker/minimapGeometry.cjs +1 -80
  16. package/dist/picker/minimapGeometry.js +1 -52
  17. package/dist/view/panoramaDelivery.cjs +1 -126
  18. package/dist/view/panoramaDelivery.js +1 -17
  19. package/dist/view3d/crossfade/panorama.cjs +1 -459
  20. package/dist/view3d/crossfade/panorama.d.cts +1 -3
  21. package/dist/view3d/crossfade/panorama.d.ts +1 -3
  22. package/dist/view3d/crossfade/panorama.js +1 -30
  23. package/dist/view3d/index.cjs +27 -7929
  24. package/dist/view3d/index.d.cts +62 -21
  25. package/dist/view3d/index.d.ts +62 -21
  26. package/dist/view3d/index.js +27 -7062
  27. package/package.json +2 -7
  28. package/dist/chunk-AZODENEL.js +0 -97
  29. package/dist/chunk-AZODENEL.js.map +0 -1
  30. package/dist/chunk-BE3F7CT3.js +0 -341
  31. package/dist/chunk-BE3F7CT3.js.map +0 -1
  32. package/dist/chunk-UID7KN44.js +0 -1569
  33. package/dist/chunk-UID7KN44.js.map +0 -1
  34. package/dist/core/seatConfidence.cjs.map +0 -1
  35. package/dist/core/seatConfidence.js.map +0 -1
  36. package/dist/de-YGODYJ3E.js +0 -292
  37. package/dist/de-YGODYJ3E.js.map +0 -1
  38. package/dist/es-VMBTGVFQ.js +0 -292
  39. package/dist/es-VMBTGVFQ.js.map +0 -1
  40. package/dist/fr-SLBE2ULB.js +0 -292
  41. package/dist/fr-SLBE2ULB.js.map +0 -1
  42. package/dist/index.cjs.map +0 -1
  43. package/dist/index.js.map +0 -1
  44. package/dist/picker/minimapGeometry.cjs.map +0 -1
  45. package/dist/picker/minimapGeometry.js.map +0 -1
  46. package/dist/view/panoramaDelivery.cjs.map +0 -1
  47. package/dist/view/panoramaDelivery.js.map +0 -1
  48. package/dist/view3d/crossfade/panorama.cjs.map +0 -1
  49. package/dist/view3d/crossfade/panorama.js.map +0 -1
  50. package/dist/view3d/index.cjs.map +0 -1
  51. package/dist/view3d/index.js.map +0 -1
@@ -1,18 +1,6 @@
1
1
  import { C as ChartDoc, E as ExpandedSeat } from '../types-tLOunI-B.cjs';
2
2
  import { SeatView } from './crossfade/panorama.cjs';
3
3
 
4
- /**
5
- * Dirty-flag render loop. A frame is drawn only while the camera is moving /
6
- * damping or an availability update arrived; when idle, no rAF is scheduled at
7
- * all (zero CPU/GPU when parked). Tracks an FPS EMA over frames actually
8
- * rendered — it reads as "idle" when nothing is scheduled.
9
- */
10
- interface RenderLoopStats {
11
- fps: number;
12
- rendered: number;
13
- idle: boolean;
14
- }
15
-
16
4
  /**
17
5
  * view3d palette + seat-state model — the single source of colour truth for the
18
6
  * OGL venue view. Pure data (no GPU, no DOM) so the scene builder and the unit
@@ -21,6 +9,7 @@ interface RenderLoopStats {
21
9
  * Look brief (docs/3d-usp-strategy §3): desaturated cool greys for structure,
22
10
  * one warm accent for the stage, availability colours only on seats.
23
11
  */
12
+
24
13
  type SeatState3D = 'available' | 'held' | 'sold' | 'selected' | 'dimmed';
25
14
  type RGB = [number, number, number];
26
15
  /** Structure palette — cool desaturated greys + one warm stage accent. */
@@ -398,6 +387,34 @@ interface SceneModelInput {
398
387
  /** Optional initial per-seat state (default all available). */
399
388
  initialState?: (seat: ExpandedSeat) => SeatState3D;
400
389
  }
390
+
391
+ /**
392
+ * The JS-side source of truth for the 3D scene — a pure, GPU-free description
393
+ * built once from the chart's existing height contract. Everything the renderer
394
+ * uploads (merged solid geometry, the instanced seat cloud, camera-framing
395
+ * bounds, the seat-state colour LUT) is derived here, so it survives a WebGL
396
+ * context loss: on `webglcontextrestored` the renderer simply re-uploads from
397
+ * this model without recomputing anything.
398
+ *
399
+ * Feeds 100% from `sectionGeometry` / `Floor.baseHeightM` / `ExpandedSeat`
400
+ * (docs/3d-program-workorder §Architecture) — no new chart data is invented.
401
+ *
402
+ * This module is the ORCHESTRATOR and the public face of `scene/model/`: it
403
+ * sequences the passes and re-exports every type and helper the rest of the
404
+ * codebase, the tests and the SDK import from `scene/sceneModel`. The passes
405
+ * themselves live in `scene/model/` — see `docs/architecture` for the layering:
406
+ *
407
+ * types the shapes everything below is described in
408
+ * paint AO + how an authored colour becomes an architectural tone
409
+ * footprints configuration filtering, floor units, plan-space polygons
410
+ * shapeArchitecture décor vocabulary → architecture, and coplanar claims
411
+ * objectBuilders one prism per booth / table / shape / décor / GA area
412
+ * tiers per-section decks and the per-floor bowl
413
+ * labels zones, sections, rows and everything worth naming
414
+ * floors per-level boxes, and the per-seat floor attribute
415
+ * bounds chart footprint, ground datum, render + overview volumes
416
+ */
417
+
401
418
  declare function buildSceneModel(input: SceneModelInput): SceneModel;
402
419
 
403
420
  /**
@@ -440,16 +457,26 @@ interface PrepareVenue3DInput {
440
457
  declare function prepareVenue3D(input: PrepareVenue3DInput): Promise<PreparedVenue3D>;
441
458
 
442
459
  /**
443
- * view3d the sole dynamic-import boundary for the lazy OGL venue-view chunk.
444
- *
445
- * const { mountVenue3D } = await import('../view3d');
446
- * const handle = mountVenue3D(container, { doc, seats }, { onSeatPick, getSeatView });
447
- * await handle.flyToSeat(seatId);
460
+ * Dirty-flag render loop. A frame is drawn only while the camera is moving /
461
+ * damping or an availability update arrived; when idle, no rAF is scheduled at
462
+ * all (zero CPU/GPU when parked). Tracks an FPS EMA over frames actually
463
+ * rendered it reads as "idle" when nothing is scheduled.
464
+ */
465
+ interface RenderLoopStats {
466
+ fps: number;
467
+ rendered: number;
468
+ idle: boolean;
469
+ }
470
+
471
+ /**
472
+ * The public contract of the lazy venue-view chunk: what you mount it with
473
+ * (`Venue3DInput`), how you configure it (`Venue3DOptions`), and what you get
474
+ * back (`Venue3DHandle`).
448
475
  *
449
- * Read-only 3D of any chart, fed entirely from the existing height contract.
450
- * Slice 1: orbit camera, extruded tiers/stage/GA, instanced seat dots, sub-range
451
- * availability, dispose + context-loss survival. Slice 2: GPU color-pick. Slice
452
- * 3: the fly-to-seat cinematic that dissolves into the view-from-seat panorama.
476
+ * Split out of `index.ts` so the mount closure and the UI/interaction modules
477
+ * can share them without importing the entry. `index.ts` re-exports all four —
478
+ * that is the path the SDK (`@seatlayer/core/view3d`), the picker, the designer
479
+ * preview and the harness import from, and it must never move.
453
480
  */
454
481
 
455
482
  interface Venue3DInput {
@@ -565,6 +592,20 @@ interface Venue3DHandle {
565
592
  */
566
593
  focusFloor(index: number | null): boolean;
567
594
  }
595
+
596
+ /**
597
+ * view3d — the sole dynamic-import boundary for the lazy OGL venue-view chunk.
598
+ *
599
+ * const { mountVenue3D } = await import('../view3d');
600
+ * const handle = mountVenue3D(container, { doc, seats }, { onSeatPick, getSeatView });
601
+ * await handle.flyToSeat(seatId);
602
+ *
603
+ * Read-only 3D of any chart, fed entirely from the existing height contract.
604
+ * Slice 1: orbit camera, extruded tiers/stage/GA, instanced seat dots, sub-range
605
+ * availability, dispose + context-loss survival. Slice 2: GPU color-pick. Slice
606
+ * 3: the fly-to-seat cinematic that dissolves into the view-from-seat panorama.
607
+ */
608
+
568
609
  declare function mountVenue3D(container: HTMLElement, input: Venue3DInput, opts?: Venue3DOptions): Venue3DHandle;
569
610
 
570
611
  export { type Analytics3DCallback, type Scene3DPrepSource, type SeatState3D, SeatView, type Venue3DHandle, type Venue3DInput, type Venue3DOptions, type Venue3DStats, buildSceneModel, mountVenue3D, prepareVenue3D };
@@ -1,18 +1,6 @@
1
1
  import { C as ChartDoc, E as ExpandedSeat } from '../types-tLOunI-B.js';
2
2
  import { SeatView } from './crossfade/panorama.js';
3
3
 
4
- /**
5
- * Dirty-flag render loop. A frame is drawn only while the camera is moving /
6
- * damping or an availability update arrived; when idle, no rAF is scheduled at
7
- * all (zero CPU/GPU when parked). Tracks an FPS EMA over frames actually
8
- * rendered — it reads as "idle" when nothing is scheduled.
9
- */
10
- interface RenderLoopStats {
11
- fps: number;
12
- rendered: number;
13
- idle: boolean;
14
- }
15
-
16
4
  /**
17
5
  * view3d palette + seat-state model — the single source of colour truth for the
18
6
  * OGL venue view. Pure data (no GPU, no DOM) so the scene builder and the unit
@@ -21,6 +9,7 @@ interface RenderLoopStats {
21
9
  * Look brief (docs/3d-usp-strategy §3): desaturated cool greys for structure,
22
10
  * one warm accent for the stage, availability colours only on seats.
23
11
  */
12
+
24
13
  type SeatState3D = 'available' | 'held' | 'sold' | 'selected' | 'dimmed';
25
14
  type RGB = [number, number, number];
26
15
  /** Structure palette — cool desaturated greys + one warm stage accent. */
@@ -398,6 +387,34 @@ interface SceneModelInput {
398
387
  /** Optional initial per-seat state (default all available). */
399
388
  initialState?: (seat: ExpandedSeat) => SeatState3D;
400
389
  }
390
+
391
+ /**
392
+ * The JS-side source of truth for the 3D scene — a pure, GPU-free description
393
+ * built once from the chart's existing height contract. Everything the renderer
394
+ * uploads (merged solid geometry, the instanced seat cloud, camera-framing
395
+ * bounds, the seat-state colour LUT) is derived here, so it survives a WebGL
396
+ * context loss: on `webglcontextrestored` the renderer simply re-uploads from
397
+ * this model without recomputing anything.
398
+ *
399
+ * Feeds 100% from `sectionGeometry` / `Floor.baseHeightM` / `ExpandedSeat`
400
+ * (docs/3d-program-workorder §Architecture) — no new chart data is invented.
401
+ *
402
+ * This module is the ORCHESTRATOR and the public face of `scene/model/`: it
403
+ * sequences the passes and re-exports every type and helper the rest of the
404
+ * codebase, the tests and the SDK import from `scene/sceneModel`. The passes
405
+ * themselves live in `scene/model/` — see `docs/architecture` for the layering:
406
+ *
407
+ * types the shapes everything below is described in
408
+ * paint AO + how an authored colour becomes an architectural tone
409
+ * footprints configuration filtering, floor units, plan-space polygons
410
+ * shapeArchitecture décor vocabulary → architecture, and coplanar claims
411
+ * objectBuilders one prism per booth / table / shape / décor / GA area
412
+ * tiers per-section decks and the per-floor bowl
413
+ * labels zones, sections, rows and everything worth naming
414
+ * floors per-level boxes, and the per-seat floor attribute
415
+ * bounds chart footprint, ground datum, render + overview volumes
416
+ */
417
+
401
418
  declare function buildSceneModel(input: SceneModelInput): SceneModel;
402
419
 
403
420
  /**
@@ -440,16 +457,26 @@ interface PrepareVenue3DInput {
440
457
  declare function prepareVenue3D(input: PrepareVenue3DInput): Promise<PreparedVenue3D>;
441
458
 
442
459
  /**
443
- * view3d the sole dynamic-import boundary for the lazy OGL venue-view chunk.
444
- *
445
- * const { mountVenue3D } = await import('../view3d');
446
- * const handle = mountVenue3D(container, { doc, seats }, { onSeatPick, getSeatView });
447
- * await handle.flyToSeat(seatId);
460
+ * Dirty-flag render loop. A frame is drawn only while the camera is moving /
461
+ * damping or an availability update arrived; when idle, no rAF is scheduled at
462
+ * all (zero CPU/GPU when parked). Tracks an FPS EMA over frames actually
463
+ * rendered it reads as "idle" when nothing is scheduled.
464
+ */
465
+ interface RenderLoopStats {
466
+ fps: number;
467
+ rendered: number;
468
+ idle: boolean;
469
+ }
470
+
471
+ /**
472
+ * The public contract of the lazy venue-view chunk: what you mount it with
473
+ * (`Venue3DInput`), how you configure it (`Venue3DOptions`), and what you get
474
+ * back (`Venue3DHandle`).
448
475
  *
449
- * Read-only 3D of any chart, fed entirely from the existing height contract.
450
- * Slice 1: orbit camera, extruded tiers/stage/GA, instanced seat dots, sub-range
451
- * availability, dispose + context-loss survival. Slice 2: GPU color-pick. Slice
452
- * 3: the fly-to-seat cinematic that dissolves into the view-from-seat panorama.
476
+ * Split out of `index.ts` so the mount closure and the UI/interaction modules
477
+ * can share them without importing the entry. `index.ts` re-exports all four —
478
+ * that is the path the SDK (`@seatlayer/core/view3d`), the picker, the designer
479
+ * preview and the harness import from, and it must never move.
453
480
  */
454
481
 
455
482
  interface Venue3DInput {
@@ -565,6 +592,20 @@ interface Venue3DHandle {
565
592
  */
566
593
  focusFloor(index: number | null): boolean;
567
594
  }
595
+
596
+ /**
597
+ * view3d — the sole dynamic-import boundary for the lazy OGL venue-view chunk.
598
+ *
599
+ * const { mountVenue3D } = await import('../view3d');
600
+ * const handle = mountVenue3D(container, { doc, seats }, { onSeatPick, getSeatView });
601
+ * await handle.flyToSeat(seatId);
602
+ *
603
+ * Read-only 3D of any chart, fed entirely from the existing height contract.
604
+ * Slice 1: orbit camera, extruded tiers/stage/GA, instanced seat dots, sub-range
605
+ * availability, dispose + context-loss survival. Slice 2: GPU color-pick. Slice
606
+ * 3: the fly-to-seat cinematic that dissolves into the view-from-seat panorama.
607
+ */
608
+
568
609
  declare function mountVenue3D(container: HTMLElement, input: Venue3DInput, opts?: Venue3DOptions): Venue3DHandle;
569
610
 
570
611
  export { type Analytics3DCallback, type Scene3DPrepSource, type SeatState3D, SeatView, type Venue3DHandle, type Venue3DInput, type Venue3DOptions, type Venue3DStats, buildSceneModel, mountVenue3D, prepareVenue3D };