@seatmap.pro/renderer 1.60.4 → 1.61.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 (3) hide show
  1. package/lib/index.d.ts +203 -233
  2. package/lib/index.js +1 -1
  3. package/package.json +8 -10
package/lib/index.d.ts CHANGED
@@ -82,6 +82,24 @@ interface IBaseSector {
82
82
  * Shape metadata for the sector (GA section shapes with text, color, etc.)
83
83
  */
84
84
  shapes?: ReadonlyArray<IShapeMetadata>;
85
+ /** Label anchor X offset from section center (SEAT-624) */
86
+ labelOffsetX?: number;
87
+ /** Label anchor Y offset from section center (SEAT-624) */
88
+ labelOffsetY?: number;
89
+ /** Label style overrides (SEAT-624) */
90
+ labelStyle?: ILabelStyle;
91
+ }
92
+ /**
93
+ * Label style overrides for GA section labels (SEAT-624).
94
+ */
95
+ interface ILabelStyle {
96
+ fontScale?: number;
97
+ color?: string;
98
+ opacity?: number;
99
+ fontWeight?: 'normal' | 'bold';
100
+ background?: string;
101
+ visible?: boolean;
102
+ showPrice?: boolean;
85
103
  }
86
104
  /**
87
105
  * Shape metadata from the API response.
@@ -91,6 +109,7 @@ interface IShapeMetadata {
91
109
  text?: string;
92
110
  textColor?: string;
93
111
  textPosition?: string;
112
+ fill?: string;
94
113
  width?: number;
95
114
  height?: number;
96
115
  top?: number;
@@ -111,6 +130,8 @@ interface ISchemaDTO {
111
130
  requestTime?: number;
112
131
  responseSize?: number;
113
132
  configuration?: IConfigurationDTO;
133
+ instanceId?: string;
134
+ componentVersion?: string;
114
135
  }
115
136
  /**
116
137
  * Interface representing the venue data transfer object from the API.
@@ -284,6 +305,15 @@ interface RequestMetrics {
284
305
  requestTime: number;
285
306
  responseSize: number;
286
307
  }
308
+ /**
309
+ * Error thrown when the booking API returns a non-2xx response.
310
+ * Preserves the HTTP status and the backend error code (e.g. EVENT_ARCHIVED, EVENT_NOT_PUBLISHED).
311
+ */
312
+ declare class ApiError extends Error {
313
+ readonly status: number;
314
+ readonly errorCode: string | undefined;
315
+ constructor(status: number, statusText: string, errorCode?: string);
316
+ }
287
317
  /**
288
318
  * API client for fetching schema and price data from the booking API.
289
319
  * @hidden
@@ -634,15 +664,47 @@ interface ISectionClickDestEvent {
634
664
  isSectionsMode?: boolean;
635
665
  }
636
666
 
667
+ type GpuTier = 'high' | 'constrained';
668
+ interface GpuProbeResult {
669
+ renderer: string;
670
+ maxTextureSize: number;
671
+ deviceMemory: number | undefined;
672
+ /** Texture upload throughput benchmark score (ms). Lower = faster GPU. -1 if benchmark failed. */
673
+ benchmarkMs: number;
674
+ }
675
+ interface DeviceCapabilities {
676
+ tier: GpuTier;
677
+ maxCanvasDimension: number;
678
+ gpu: GpuProbeResult | null;
679
+ }
680
+
637
681
  /**
682
+ * Label positioning and style data for a section outline (GA, seated, or background-bound).
638
683
  * @hidden
639
684
  */
640
- interface IGaInfo {
685
+ interface ISectionLabelInfo {
641
686
  id: number;
642
687
  name: string;
643
688
  transform: TransformArray;
644
689
  isTable?: boolean;
645
690
  textColor?: string;
691
+ /** Relative offset from section center for label positioning (SEAT-624) */
692
+ labelOffset?: {
693
+ x: number;
694
+ y: number;
695
+ };
696
+ /** Style overrides for the label (SEAT-624) */
697
+ labelStyle?: {
698
+ fontScale?: number;
699
+ color?: string;
700
+ opacity?: number;
701
+ fontWeight?: 'normal' | 'bold';
702
+ background?: string;
703
+ visible?: boolean;
704
+ showPrice?: boolean;
705
+ };
706
+ /** When true, label is centered on shape centroid (no vertical shift above seats) */
707
+ centroid?: boolean;
646
708
  }
647
709
  /**
648
710
  * @hidden
@@ -667,6 +729,9 @@ declare class Context {
667
729
  visibility: IVisibilityStatuses;
668
730
  width: number;
669
731
  height: number;
732
+ physicalWidth: number;
733
+ physicalHeight: number;
734
+ capabilities: DeviceCapabilities;
670
735
  enable3DView: boolean;
671
736
  rotationZ: number;
672
737
  perspectiveZ: number;
@@ -711,7 +776,7 @@ declare class Context {
711
776
  };
712
777
  hoveredSeat?: ISeat;
713
778
  hoveredRow?: IRowDTO;
714
- gaInfo: IGaInfo[];
779
+ sectionLabelInfo: ISectionLabelInfo[];
715
780
  _selectedAt: {
716
781
  [seatId: number]: number;
717
782
  };
@@ -1375,9 +1440,15 @@ interface ILoadProgressEvent {
1375
1440
  * @hidden
1376
1441
  */
1377
1442
  interface IBackgroundImageLoadedEvent {
1378
- type: 'blurred' | 'preview' | 'full';
1443
+ type: 'blurred' | 'preview' | 'full' | 'detail-crop';
1379
1444
  loadTimeMs: number;
1380
1445
  sizeBytes?: number;
1446
+ /** Native image width in pixels */
1447
+ width?: number;
1448
+ /** Native image height in pixels */
1449
+ height?: number;
1450
+ /** Estimated uncompressed GPU VRAM usage in bytes (width * height * 4 for RGBA) */
1451
+ gpuBytes?: number;
1381
1452
  }
1382
1453
  /**
1383
1454
  * Loader display style.
@@ -1398,6 +1469,13 @@ interface ILoaderTheme {
1398
1469
  /**
1399
1470
  * Loader configuration settings.
1400
1471
  */
1472
+ /**
1473
+ * Customizable error message with title and optional subtitle.
1474
+ */
1475
+ interface IErrorMessage {
1476
+ title: string;
1477
+ subtitle?: string;
1478
+ }
1401
1479
  interface ILoaderSettings {
1402
1480
  enabled: boolean;
1403
1481
  style?: LoaderStyle;
@@ -1412,6 +1490,20 @@ interface ILoaderSettings {
1412
1490
  backgroundFull?: string;
1413
1491
  processing?: string;
1414
1492
  };
1493
+ /**
1494
+ * Customizable error messages shown when event loading fails.
1495
+ * Each key corresponds to a backend error code.
1496
+ */
1497
+ errorTexts?: {
1498
+ /** Shown when the event has been archived (HTTP 410). */
1499
+ eventArchived?: IErrorMessage;
1500
+ /** Shown when the event is not published (HTTP 422). */
1501
+ eventNotPublished?: IErrorMessage;
1502
+ /** Shown when the event does not exist (HTTP 404). */
1503
+ eventNotFound?: IErrorMessage;
1504
+ /** Shown for any other API error. */
1505
+ genericError?: IErrorMessage;
1506
+ };
1415
1507
  }
1416
1508
  /**
1417
1509
  * Configuration settings for the renderer.
@@ -1514,10 +1606,6 @@ interface IRendererSettings {
1514
1606
  small: number;
1515
1607
  large: number;
1516
1608
  };
1517
- /**
1518
- * Delay time for loading the next background in milliseconds.
1519
- */
1520
- backgroundLoadStepTime?: number;
1521
1609
  /**
1522
1610
  * If true, disables zoom when clicking on empty space.
1523
1611
  */
@@ -1550,6 +1638,14 @@ interface IRendererSettings {
1550
1638
  * If true, uses WebGL for rendering instead of Canvas.
1551
1639
  */
1552
1640
  switchToWebGL?: boolean;
1641
+ /**
1642
+ * Force the GPU capability tier instead of auto-detecting from device hardware.
1643
+ * 'constrained' enables the two-layer texture system (detail crop on zoom)
1644
+ * and caps canvas dimensions to 2048px.
1645
+ * Also settable via URL parameter `?gpuTier=constrained`.
1646
+ * @hidden
1647
+ */
1648
+ gpuTier?: 'high' | 'constrained';
1553
1649
  /**
1554
1650
  * If true, shows the debug overlay layer (diagnostic lines from sections to venue center).
1555
1651
  */
@@ -1766,6 +1862,17 @@ interface IRendererSettings {
1766
1862
  * @hidden
1767
1863
  */
1768
1864
  onBackgroundImageLoaded?: (event: IBackgroundImageLoadedEvent) => void;
1865
+ /**
1866
+ * Fires when the WebGL context is lost (e.g., GPU memory pressure on mobile).
1867
+ * Host apps can use this to show fallback UI.
1868
+ * @hidden
1869
+ */
1870
+ onWebGLContextLost?: () => void;
1871
+ /**
1872
+ * Fires when the WebGL context is restored after a loss event.
1873
+ * @hidden
1874
+ */
1875
+ onWebGLContextRestored?: () => void;
1769
1876
  /**
1770
1877
  * Fires while panning.
1771
1878
  */
@@ -1866,7 +1973,7 @@ interface ISeatStyle extends IBasicSeatStyle {
1866
1973
  accessible?: IBasicSeatStyle;
1867
1974
  }
1868
1975
  interface IRendererSvgSectionStylesSetting {
1869
- default?: Pick<ISvgSectionStyle, 'sectionName' | 'stroke' | 'cursor'>;
1976
+ default?: Pick<ISvgSectionStyle, 'sectionName' | 'stroke' | 'cursor' | 'bgColor'>;
1870
1977
  unavailable?: ISvgSectionStyle;
1871
1978
  filtered?: ISvgSectionStyle;
1872
1979
  hovered?: ISvgSectionStyle;
@@ -1883,6 +1990,7 @@ interface ISvgSectionStyle {
1883
1990
  width?: string;
1884
1991
  };
1885
1992
  cursor?: string;
1993
+ opacity?: number;
1886
1994
  }
1887
1995
  interface IRendererTheme {
1888
1996
  gridStep?: number;
@@ -1924,10 +2032,10 @@ declare class OutlineLayer {
1924
2032
  private underlayBindedPathAttr;
1925
2033
  private outlineElementCache;
1926
2034
  private stateManager;
1927
- private svgManipulator;
1928
2035
  private outlineRenderer;
1929
2036
  private transformManager;
1930
2037
  private rowsManager;
2038
+ getSvgRoot(): SVGSVGElement;
1931
2039
  setStateChangeCallback(callback: (sectionId: number) => void): void;
1932
2040
  private initializeHoverHandlers;
1933
2041
  constructor(context: Context);
@@ -1965,6 +2073,8 @@ declare class OutlineLayer {
1965
2073
  getSectionElement(id: number | undefined): Element | null;
1966
2074
  getSectionElements(id: number | undefined): Element[];
1967
2075
  getSectionCenter(id: Nullable<number>): Nullable<IPoint>;
2076
+ /** Extract data-font-scale attributes from SVG outline groups. */
2077
+ getFontScales(): Record<string, number>;
1968
2078
  get width(): number;
1969
2079
  get height(): number;
1970
2080
  updateSize(): void;
@@ -1985,6 +2095,7 @@ declare class OutlineLayer {
1985
2095
  * - append outlines to the main svg element
1986
2096
  */
1987
2097
  setBackgroundAsOutline(): void;
2098
+ private createBackgroundSectionLabelInfo;
1988
2099
  private extractSVGBackgroundOutlines;
1989
2100
  cleanSvgInlineStyles(stylesToRemove?: string[]): void;
1990
2101
  updateOutlines(): void;
@@ -1997,9 +2108,13 @@ declare class OutlineLayer {
1997
2108
  createFallbackOutlineRect(section: ISector): SVGRectElement;
1998
2109
  private getRenderContext;
1999
2110
  handleChangeEagleView(isEagleView?: boolean): void;
2111
+ /** @deprecated Use disableSection() instead */
2000
2112
  disableSvgSectionById: (id: number) => void;
2113
+ /** @deprecated Use enableSection() instead */
2001
2114
  enableSvgSectionById: (id: number) => void;
2115
+ /** @deprecated Use filterSection() instead */
2002
2116
  filterSvgSectionById: (id: number) => void;
2117
+ /** @deprecated Use unfilterSection() instead */
2003
2118
  removeFilterSvgSectionById: (id: number) => void;
2004
2119
  update(): void;
2005
2120
  updateAnimationStep(scale: number, translate: IPoint): void;
@@ -2026,11 +2141,13 @@ interface ISectionTransform {
2026
2141
  interface IStageLayer {
2027
2142
  destroy: () => void;
2028
2143
  backgroundElement: HTMLImageElement;
2144
+ /** Full-resolution background image retained in JS heap for detail cropping (constrained devices only) */
2145
+ fullBackgroundImage: HTMLImageElement | null;
2029
2146
  redraw: () => void;
2030
2147
  drawOffscreenCanvas: () => void;
2031
2148
  drawOnscreenCanvas: (scale: number, translate: IPoint) => void;
2032
2149
  getVisibleSeats: () => ISeat[];
2033
- updateSize: () => void;
2150
+ updateSize: (physicalWidth?: number, physicalHeight?: number) => void;
2034
2151
  sectionViewActive: boolean;
2035
2152
  getAnimationState: () => {
2036
2153
  inProgress: boolean;
@@ -2046,6 +2163,10 @@ interface IStageLayer {
2046
2163
  * Should resolve after the first full render finishes.
2047
2164
  */
2048
2165
  captureSeatmap: () => Promise<HTMLImageElement | null>;
2166
+ /** Notify that viewport has settled after animation -- triggers detail crop on constrained devices */
2167
+ onViewportSettled?: () => void;
2168
+ /** Dispose detail texture immediately -- called when animation starts to prevent stale crop flash */
2169
+ disposeDetailTexture?: () => void;
2049
2170
  }
2050
2171
 
2051
2172
  /**
@@ -2398,7 +2519,8 @@ declare class StateManager {
2398
2519
  * Provides core functionality for rendering and interacting with a venue map.
2399
2520
  */
2400
2521
  declare class Renderer implements IRenderer {
2401
- private hammer;
2522
+ private inputHandler;
2523
+ private eventDispatcher;
2402
2524
  private visibilityManager;
2403
2525
  private height;
2404
2526
  private width;
@@ -2417,18 +2539,22 @@ declare class Renderer implements IRenderer {
2417
2539
  private stateManager;
2418
2540
  private service;
2419
2541
  private zoomToFitScale;
2420
- private isTouchMode;
2421
- private pinchStartPoint?;
2422
- private resizeTimer;
2423
- private resizeObserver?;
2424
2542
  protected isRunning: boolean;
2425
2543
  private disableZoomToEmptySpace;
2426
2544
  private switchToWebGL;
2427
- private originalSectionPrices;
2545
+ private viewportSettleTimer;
2428
2546
  private transformAnimator;
2429
- private rotationAnimation;
2547
+ private threeDController;
2548
+ private viewportController;
2549
+ private seatOps;
2550
+ private sectionHelper;
2430
2551
  private refreshMinimap;
2431
2552
  private setMinimapFromSnapshot;
2553
+ /**
2554
+ * Show the minimap and capture a snapshot of the current render.
2555
+ * Called once background + seats + prices are all ready.
2556
+ */
2557
+ protected revealMinimap(): Promise<void>;
2432
2558
  /**
2433
2559
  * Creates a new instance of the Renderer.
2434
2560
  *
@@ -2443,6 +2569,8 @@ declare class Renderer implements IRenderer {
2443
2569
  */
2444
2570
  destroy(): void;
2445
2571
  private syncMarkers;
2572
+ /** Push section label info to the WebGL stage layer (no-op in Canvas2D mode). */
2573
+ private updateSectionLabelData;
2446
2574
  /**
2447
2575
  * Gets the width of the renderer.
2448
2576
  *
@@ -2502,6 +2630,7 @@ declare class Renderer implements IRenderer {
2502
2630
  protected showLoader(): void;
2503
2631
  protected updateLoaderProgress(phase: LoadingPhase, phaseProgress?: number): void;
2504
2632
  protected completeLoader(): void;
2633
+ protected showLoaderError(title: string, subtitle?: string): void;
2505
2634
  /**
2506
2635
  * Sets the interaction mode for the renderer.
2507
2636
  *
@@ -2517,18 +2646,9 @@ declare class Renderer implements IRenderer {
2517
2646
  setSeatsCategory(seats: ISeat[] | number[] | string[], category: number, color?: string): void;
2518
2647
  setGaCategory(sectionId: number, category: number | undefined): void;
2519
2648
  resetCategories(): void;
2520
- /**
2521
- * Returns category's color
2522
- *
2523
- * @param category Category number
2524
- */
2525
2649
  getCategoryColor(category: number): string | undefined;
2526
- private createHammer;
2527
2650
  private changeMachineContext;
2528
- private createMachineService;
2529
- private handleTouchStart;
2530
2651
  private setContextScale;
2531
- private handleDebouncedSeatChange;
2532
2652
  /**
2533
2653
  * Retrieves the available prices.
2534
2654
  *
@@ -2635,7 +2755,6 @@ declare class Renderer implements IRenderer {
2635
2755
  clearMarkers(): void;
2636
2756
  getMarkers(): IMarker[];
2637
2757
  getResolvedMarkers(): IResolvedMarker[];
2638
- private emitSrcEvent;
2639
2758
  private addHandlers;
2640
2759
  private initializeResizeObserver;
2641
2760
  protected setSchemaData(schema: ISchemaDTO): Promise<void>;
@@ -2732,183 +2851,74 @@ declare class Renderer implements IRenderer {
2732
2851
  * @param keys Array of composite seat keys
2733
2852
  */
2734
2853
  removeSeatsFromCartByKeys(keys: string[]): void;
2735
- /**
2736
- * Marks seats as unavailable and removes them from cart.
2737
- *
2738
- * @param ids Array of internal seat IDs
2739
- * @param options Optional configuration object.
2740
- * @param options.resetAll If `true` (default), all seats not in the `ids` array will be unlocked.
2741
- * If `false`, only the seats in the `ids` array will be affected, and the
2742
- * locked state of other seats will remain unchanged.
2743
- */
2744
2854
  disableSeatsByIds(ids: number[], options?: {
2745
2855
  resetAll?: boolean;
2746
2856
  }): void;
2747
- /**
2748
- * Marks disabled seats as available.
2749
- *
2750
- * @param ids Array of internal seat IDs
2751
- */
2752
- enableSeatsByIds(_ids: number[]): void;
2753
- /**
2754
- * Marks seats as unavailable and removes them from cart.
2755
- *
2756
- * @param keys Array of composite seat keys
2757
- */
2857
+ enableSeatsByIds(ids: number[]): void;
2758
2858
  disableSeatsByKeys(keys: string[]): void;
2759
- /**
2760
- * Marks seats as filtered.
2761
- *
2762
- * @param ids Array of internal seat IDs
2763
- */
2764
2859
  filterSeatsByIds(ids: number[]): void;
2765
- /**
2766
- * Marks disabled seats as available.
2767
- *
2768
- * @param ids Array of internal seat IDs
2769
- */
2770
- removeFilter(ids?: number[]): void;
2771
- /**
2772
- * Marks seats as filtered.
2773
- *
2774
- * @param keys Array of composite seat keys
2775
- */
2776
2860
  filterSeatsByKeys(keys: string[]): void;
2777
- /**
2778
- * Convert array of seat keys to array of seat ids
2779
- *
2780
- * @param keys Array of composite seat keys
2781
- */
2861
+ removeFilter(ids?: number[]): void;
2782
2862
  seatKeysToIds(keys: string[]): number[];
2783
- /**
2784
- * Updates seat lock states.
2785
- *
2786
- * @example
2787
- *
2788
- * For example, you can create handler to prevent selection of seats
2789
- * with different special state:
2790
- *
2791
- * ```js
2792
- * const handleCartChange = (cart, prevCart) => {
2793
- * if (!cart.seats.length) {
2794
- * // Unlock all the seats if the cart is empty
2795
- * renderer.updateSeatLocks(s => false);
2796
- * } else if (!prevCart || !prevCart.seats.length) {
2797
- * // Lock seats with different special state
2798
- * const seat = cart.seats[0];
2799
- * renderer.updateSeatLocks(
2800
- * s => (s.special && s.special.s1) !== (seat.special && seat.special.s1)
2801
- * );
2802
- * }
2803
- * };
2804
- * ```
2805
- *
2806
- * @param filter Function should return `true` for seats to lock
2807
- */
2808
2863
  updateSeatLocks(filter: SeatFilter): void;
2809
- /**
2810
- * Returns selected seats
2811
- */
2812
2864
  getSeatSelection(): IExtendedSeat[];
2813
2865
  setSectionSelection(sections?: number[] | string[]): void;
2814
2866
  getSvgSectionBySelection(): IBaseSector[];
2867
+ /** @deprecated Use {@link disableSections} instead. */
2815
2868
  disableSvgSectionsByIds(ids: number[], options?: {
2816
2869
  resetAll?: boolean;
2817
2870
  }): void;
2871
+ /** @deprecated Use {@link enableSections} instead. */
2818
2872
  enableSvgSectionsByIds(ids: number[]): void;
2819
- private updateBackgroundImage;
2873
+ /** @deprecated Use {@link disableSectionsByNames} instead. */
2874
+ disableSvgSectionsByNames(names: string[], options?: {
2875
+ resetAll?: boolean;
2876
+ }): void;
2877
+ /** @deprecated Use {@link enableSectionsByNames} instead. */
2878
+ enableSvgSectionsByNames(names: string[]): void;
2820
2879
  disableSectionsByIds(ids: number[]): void;
2821
2880
  enableSectionsByIds(): void;
2881
+ /** @deprecated Use {@link filterSections} instead. */
2822
2882
  filterSvgSectionsByIds(ids: number[], options?: {
2823
2883
  resetAll?: boolean;
2824
2884
  }): void;
2885
+ /** @deprecated Use {@link removeFilterSections} instead. */
2825
2886
  removeFilterSvgSectionsByIds(ids?: number[]): void;
2826
- disableSvgSectionsByNames(names: string[], options?: {
2887
+ /** Disable sections by IDs, hiding them from interaction. Source-agnostic: works with any outline type. */
2888
+ disableSections(ids: number[], options?: {
2827
2889
  resetAll?: boolean;
2828
2890
  }): void;
2829
- enableSvgSectionsByNames(names: string[]): void;
2891
+ /** Enable sections by IDs, making them interactive again. Source-agnostic: works with any outline type. */
2892
+ enableSections(ids: number[]): void;
2893
+ /** Filter sections by IDs, showing only the specified sections. Source-agnostic: works with any outline type. */
2894
+ filterSections(ids: number[], options?: {
2895
+ resetAll?: boolean;
2896
+ }): void;
2897
+ /** Remove section filter, restoring all sections to visible. Source-agnostic: works with any outline type. */
2898
+ removeFilterSections(ids?: number[]): void;
2899
+ /** Disable sections by name. Source-agnostic: works with any outline type. */
2900
+ disableSectionsByNames(names: string[], options?: {
2901
+ resetAll?: boolean;
2902
+ }): void;
2903
+ /** Enable sections by name. Source-agnostic: works with any outline type. */
2904
+ enableSectionsByNames(names: string[]): void;
2830
2905
  setSeatSelection(seats: number[] | string[] | ISeat[]): void;
2831
2906
  setSelectedGa(ga?: number | string): void;
2832
2907
  getSelectedGa(): ISector | undefined;
2833
- /**
2834
- * Returns sections info
2835
- */
2836
- getSections(): ISector[];
2837
- /**
2838
- * Returns sections ids
2839
- */
2840
- getSectionsKeys(): string[];
2841
- /**
2842
- *
2843
- * @returns Rows data array
2844
- */
2908
+ getSections(): IBaseSector[];
2909
+ getSectionsKeys(): (string | number)[];
2845
2910
  getRows(): IRowDTO[];
2846
- /**
2847
- *
2848
- * @returns Seats data array
2849
- */
2850
2911
  getSeats(): ISeatDTO[];
2851
- /**
2852
- *
2853
- * @returns Row data
2854
- */
2855
2912
  getRowById(id: number): IRowDTO | undefined;
2856
- /**
2857
- * Returns only visible seats with coords relative to canvas
2858
- */
2859
2913
  getVisibleSeats(): ISeat[];
2860
2914
  getSectionsWithCoords(): ISectionWithCoords[];
2861
- private handleDestPan;
2862
- private handleDestRectSelect;
2863
- private handleRectSelectSections;
2864
- private fireSelectedSections;
2865
- private handleDestDeselect;
2866
2915
  private getGaSectionByOutline;
2867
2916
  private getSectionByOutline;
2868
2917
  private buildSectionFromId;
2869
- private getSectorRectByOutline;
2870
- /**
2871
- * Handles pan-zoom destination events from the state machine.
2872
- * Applies the configured interaction zoom strategy when clicking in eagle eye view.
2873
- *
2874
- * @param event - The pan-zoom destination event containing scale, origin, section, and strategy
2875
- * @private
2876
- */
2877
- private handleDestPanZoom;
2878
- /**
2879
- * Attempts to apply a single zoom strategy.
2880
- *
2881
- * @param strategy - The strategy to attempt ('default', 'section', or 'next-scale')
2882
- * @param event - The pan-zoom event containing context for the zoom operation
2883
- * @returns true if the strategy was successfully applied, false if it cannot be applied
2884
- * @private
2885
- */
2886
- private tryZoomStrategy;
2887
- private handleDestSeatSelect;
2888
- private findNearestSeatGroup;
2889
- private handleDestSeatCartSwitch;
2890
- private handleDestSectionClick;
2891
- private handlePinch;
2892
- private normalizePinchScale;
2893
- private handleDestSeatMouseEnter;
2894
- private handleDestSectionMouseEnter;
2895
- private handleDestSeatMouseLeave;
2896
- private handleDestSectionMouseLeave;
2897
- private handleMouseMove;
2898
- private handleMouseMoveOutside;
2899
- private handleMouseLeave;
2900
- private handleWindowResize;
2901
2918
  private updateSize;
2902
- /**
2903
- * Returns current zoom value.
2904
- */
2905
2919
  getZoom(): number;
2906
2920
  zoomIn(): void;
2907
2921
  zoomOut(): void;
2908
- /**
2909
- * Zooms to the specified scale with optional destination center point in background coordinates.
2910
- * If destination is provided, the view will be centered on that point at the end of the animation.
2911
- */
2912
2922
  zoomTo(newScaleCss: number, options?: {
2913
2923
  destination?: IPoint;
2914
2924
  durationMs?: number;
@@ -2916,96 +2926,47 @@ declare class Renderer implements IRenderer {
2916
2926
  zoomToFit(): void;
2917
2927
  clearSectorHighlight(): void;
2918
2928
  highlightSector(id: number | undefined): void;
2919
- private startPanAnimation;
2920
- private calculateAdaptiveFitScale;
2921
- private getSectionZoomTarget;
2922
2929
  zoomToSection(section: string | number, options?: {
2923
2930
  focus?: boolean;
2924
2931
  mode?: 'fit' | 'scale';
2925
2932
  scale?: number;
2926
2933
  }): void;
2927
2934
  zoomToDestination(newScale: number, destination: IPoint, duration?: number): void;
2928
- /**
2929
- * Runs a sequence of composite animations. Each step can include zoom, pan (via destination), and rotation.
2930
- */
2931
2935
  animateSequence(steps: IRendererSequenceStep[]): Promise<void>;
2932
- private getSectionId;
2933
- private startAnimation;
2934
- private cachedDraw;
2936
+ getMinZoom(): number;
2937
+ getMaxZoom(): number;
2938
+ /** Debounced notification to stageLayer that viewport has settled (SEAT-831 detail crop) */
2939
+ private scheduleViewportSettle;
2935
2940
  private redraw;
2941
+ private startAnimation;
2936
2942
  private doTranslate;
2937
- private transformPanDeltaFor3D;
2938
- private calculateLimitedTranslate;
2939
- private calculateLimit;
2940
- seatToExtendedSeat: (seat: ISeat) => IExtendedSeat;
2941
- private calculateRelativeScaledLimitedTranslate;
2943
+ private cachedDraw;
2944
+ private getNextScale;
2942
2945
  private calculateAbsoluteScaledTranslate;
2943
2946
  private calculateRelativeScaledTranslate;
2944
- /**
2945
- * Current approach implies that the seatmap contains proper background
2946
- * Scale and
2947
- *
2948
- * @param background - background object
2949
- * @internal
2950
- */
2951
2947
  private getInitialScaleAndTranslate;
2952
- private getNextScale;
2953
- private getPrevScale;
2954
- private getZoomPresets;
2955
- /**
2956
- * Returns the minimal zoom preset value.
2957
- */
2958
- getMinZoom(): number;
2959
- /**
2960
- * Returns the maximum zoom preset value.
2961
- */
2962
- getMaxZoom(): number;
2948
+ seatToExtendedSeat: (seat: ISeat) => IExtendedSeat;
2963
2949
  viewSection(section: ISection): void;
2964
2950
  private getStageLayer;
2965
- /**
2966
- * Updates 3D view parameters for dynamic perspective changes.
2967
- * Only works when enable3DView is true and WebGL is enabled.
2968
- */
2969
2951
  update3DView(options: {
2970
2952
  rotationZ?: number;
2971
2953
  perspectiveZ?: number;
2972
2954
  tiltX?: number;
2973
2955
  }): void;
2974
- /**
2975
- * Gets current 3D view parameters
2976
- */
2977
2956
  get3DViewParams(): {
2978
2957
  enable3DView: boolean;
2979
2958
  rotationZ: number;
2980
2959
  perspectiveZ: number;
2981
2960
  tiltX: number;
2982
2961
  };
2983
- /**
2984
- * Smoothly animates current 3D parameters to the given target values.
2985
- * Returns a Promise that resolves when the transition completes.
2986
- */
2987
2962
  animateTo3DParams(target: {
2988
2963
  rotationZ?: number;
2989
2964
  perspectiveZ?: number;
2990
2965
  tiltX?: number;
2991
2966
  }, durationMs?: number): Promise<void>;
2992
- /**
2993
- * Animates continuous rotation of the 3D view
2994
- * @param angle - Rotation speed in radians per second (positive for clockwise, negative for counter-clockwise)
2995
- * @returns Animation ID that can be used to stop the animation
2996
- */
2997
2967
  animateRotation(angle: number): number | null;
2998
- /**
2999
- * Stops the current rotation animation
3000
- */
3001
2968
  stopRotationAnimation(): void;
3002
- /**
3003
- * Checks if a rotation animation is currently running
3004
- */
3005
2969
  isRotationAnimationRunning(): boolean;
3006
- /**
3007
- * Gets the current rotation animation ID
3008
- */
3009
2970
  getRotationAnimationId(): number | null;
3010
2971
  /**
3011
2972
  * Sets whether all section outlines should be highlighted.
@@ -3043,6 +3004,15 @@ declare class Renderer implements IRenderer {
3043
3004
  setMinimapPosition(position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'): void;
3044
3005
  }
3045
3006
 
3007
+ declare global {
3008
+ interface Window {
3009
+ __RUNTIME_CONFIG__?: {
3010
+ SENTRY_DSN?: string;
3011
+ SENTRY_ENVIRONMENT?: string;
3012
+ };
3013
+ }
3014
+ }
3015
+
3046
3016
  interface IAdminRendererSettings extends IRendererSettings {
3047
3017
  /**
3048
3018
  * Custom API base URL that overrides the environment-based URL.
@@ -3063,7 +3033,7 @@ interface IAdminRendererSettings extends IRendererSettings {
3063
3033
  * Extends the base Renderer with admin-specific functionality.
3064
3034
  */
3065
3035
  declare class SeatmapAdminRenderer extends Renderer {
3066
- static readonly VERSION = "1.60.4";
3036
+ static readonly VERSION = "1.61.0";
3067
3037
  protected apiClient: BookingApiClient;
3068
3038
  /**
3069
3039
  * Creates a new instance of the AdminRenderer.
@@ -3206,12 +3176,6 @@ interface IBookingRendererSettings extends IRendererSettings {
3206
3176
  * @defaultValue `false`
3207
3177
  */
3208
3178
  switchToWebGL?: boolean;
3209
- /**
3210
- * Sets the delay time for loading the next background.
3211
- *
3212
- * @defaultValue `0`
3213
- */
3214
- backgroundLoadStepTime?: number;
3215
3179
  /**
3216
3180
  * If set to true, renderer will be in debug mode.
3217
3181
  *
@@ -3225,7 +3189,7 @@ interface IBookingRendererSettings extends IRendererSettings {
3225
3189
  * Extends the base Renderer with booking-specific functionality.
3226
3190
  */
3227
3191
  declare class SeatmapBookingRenderer extends Renderer {
3228
- static readonly VERSION = "1.60.4";
3192
+ static readonly VERSION = "1.61.0";
3229
3193
  private apiClient;
3230
3194
  private stats;
3231
3195
  private tags?;
@@ -3286,7 +3250,13 @@ declare class SeatmapBookingRenderer extends Renderer {
3286
3250
  * @returns A promise that resolves when the schema is loaded and rendered
3287
3251
  */
3288
3252
  loadEvent(eventId: string, sectorId?: number): Promise<void>;
3253
+ /** @hidden */
3254
+ static getErrorMessage(error: ApiError, errorTexts?: ILoaderSettings['errorTexts']): {
3255
+ title: string;
3256
+ subtitle: string;
3257
+ };
3289
3258
  private handlePricesLoaded;
3259
+ private logGpuDebugInfo;
3290
3260
  private setupEventHandlers;
3291
3261
  /**
3292
3262
  * Creates a statistics data object for seat selection/deselection events.
@@ -3313,7 +3283,7 @@ declare class SeatmapBookingRenderer extends Renderer {
3313
3283
  * Package version information
3314
3284
  * This file is automatically updated during the build process
3315
3285
  */
3316
- declare const VERSION = "1.60.4";
3286
+ declare const VERSION = "1.61.0";
3317
3287
 
3318
3288
  declare const defaultZoomSettings: IZoomSettings;
3319
3289
  declare const mergeSettings: (defaults: IRendererSettings, settings?: Partial<IRendererSettings>) => IRendererSettings & Partial<IRendererSettings>;
@@ -3356,4 +3326,4 @@ declare class RotationAnimation {
3356
3326
  getAnimation(): IRotationAnimation | null;
3357
3327
  }
3358
3328
 
3359
- export { BookingApiClient, type ById, type ColorById, type ColorSequenceSettings, DataManager, type DataManagerEvent, type DataManagerEventCallback, type DeepPartial, type DestEvent, DestEventType, type IAdminRendererSettings, type IBackgroundImageLoadedEvent, type IBaseSeat, type IBaseSector, type IBasicSeatStyle, type IBeforeSeatDrawEvent, type IBookingRendererSettings, type ICart, type ICartGa, type ICartSeat, type IClickSrcEvent, type IColoredPrice, type IConfigurationDTO, type IDeselectDestEvent, type IDragEndSrcEvent, type IDragMoveSrcEvent, type IDragStartSrcEvent, type IEntityStates, type IExtendedSeat, type ILoadProgressEvent, type ILoaderSettings, type ILoaderTheme, type IMarker, type IMarkerSettings, type IMinimapSettings, type IMouseMoveSrcEvent, type IPanDestEvent, type IPanZoomDestEvent, type IPlainSeatsDTO, type IPngBackgroundDTO, type IPoint, type IPrice, type IPriceDTO, type IPriceId, type IPriceListDTO, type IRectSelectDestEvent, type IRemovedCartGa, type IRenderer, type IRendererAnimation, type IRendererMachineContext, type IRendererSeatStyleSettings, type IRendererSettings, type IRendererSvgSectionStylesSetting, type IRendererTheme, type IResolvedMarker, type IRowDTO, type ISVGBackgroundDTO, type ISchemaDTO, type ISeat, type ISeatCartSwitchDestEvent, type ISeatDTO, type ISeatMetadata, type ISeatMouseEnterDestEvent, type ISeatMouseLeaveDestEvent, type ISeatPriceScheme, type ISeatSelectDestEvent, type ISeatStyle, type ISection, type ISectionClickDestEvent, type ISectionMetadata, type ISectionMouseEnterDestEvent, type ISectionMouseLeaveDestEvent, type ISectionRect, type ISectionWithCoords, type ISector, type ISectorDTO, type IShapeMetadata, type ISpecialPrice, type ISpecialState, type ISvgSectionStyle, type IVenueDTO, type IVisibilitySettings, type IZoomSettings, type InteractionZoomStrategy, type InteractionZoomStrategyType, type LoaderStyle, type LoadingPhase, type MarkerAppearance, type MarkerTarget, type MinimapPosition, type Nullable, Renderer, type RendererMachine, type RendererMachineReducer, type RendererMachineService, RendererSelectMode, RendererTargetType, type RequestMetrics, RotationAnimation, type SeatFilter, type SeatInteractionState, SeatmapAdminRenderer, SeatmapBookingRenderer, type SrcEvent, SrcEventType, StateManager, type StateManagerEvent, type StateManagerEventCallback, type TransformArray, VERSION, convertPricesToColored, convertPricesToColoredById, defaultZoomSettings, mergeSettings, sortPrices };
3329
+ export { ApiError, BookingApiClient, type ById, type ColorById, type ColorSequenceSettings, DataManager, type DataManagerEvent, type DataManagerEventCallback, type DeepPartial, type DestEvent, DestEventType, type IAdminRendererSettings, type IBackgroundImageLoadedEvent, type IBaseSeat, type IBaseSector, type IBasicSeatStyle, type IBeforeSeatDrawEvent, type IBookingRendererSettings, type ICart, type ICartGa, type ICartSeat, type IClickSrcEvent, type IColoredPrice, type IConfigurationDTO, type IDeselectDestEvent, type IDragEndSrcEvent, type IDragMoveSrcEvent, type IDragStartSrcEvent, type IEntityStates, type IErrorMessage, type IExtendedSeat, type ILabelStyle, type ILoadProgressEvent, type ILoaderSettings, type ILoaderTheme, type IMarker, type IMarkerSettings, type IMinimapSettings, type IMouseMoveSrcEvent, type IPanDestEvent, type IPanZoomDestEvent, type IPlainSeatsDTO, type IPngBackgroundDTO, type IPoint, type IPrice, type IPriceDTO, type IPriceId, type IPriceListDTO, type IRectSelectDestEvent, type IRemovedCartGa, type IRenderer, type IRendererAnimation, type IRendererMachineContext, type IRendererSeatStyleSettings, type IRendererSettings, type IRendererSvgSectionStylesSetting, type IRendererTheme, type IResolvedMarker, type IRowDTO, type ISVGBackgroundDTO, type ISchemaDTO, type ISeat, type ISeatCartSwitchDestEvent, type ISeatDTO, type ISeatMetadata, type ISeatMouseEnterDestEvent, type ISeatMouseLeaveDestEvent, type ISeatPriceScheme, type ISeatSelectDestEvent, type ISeatStyle, type ISection, type ISectionClickDestEvent, type ISectionMetadata, type ISectionMouseEnterDestEvent, type ISectionMouseLeaveDestEvent, type ISectionRect, type ISectionWithCoords, type ISector, type ISectorDTO, type IShapeMetadata, type ISpecialPrice, type ISpecialState, type ISvgSectionStyle, type IVenueDTO, type IVisibilitySettings, type IZoomSettings, type InteractionZoomStrategy, type InteractionZoomStrategyType, type LoaderStyle, type LoadingPhase, type MarkerAppearance, type MarkerTarget, type MinimapPosition, type Nullable, Renderer, type RendererMachine, type RendererMachineReducer, type RendererMachineService, RendererSelectMode, RendererTargetType, type RequestMetrics, RotationAnimation, type SeatFilter, type SeatInteractionState, SeatmapAdminRenderer, SeatmapBookingRenderer, type SrcEvent, SrcEventType, StateManager, type StateManagerEvent, type StateManagerEventCallback, type TransformArray, VERSION, convertPricesToColored, convertPricesToColoredById, defaultZoomSettings, mergeSettings, sortPrices };