@seatmap.pro/renderer 1.69.10 → 1.70.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/lib/index.d.ts CHANGED
@@ -25,6 +25,16 @@ interface IBaseSeat {
25
25
  * The Y coordinate of the seat within its section.
26
26
  */
27
27
  y: number;
28
+ /**
29
+ * Untransformed grid X coordinate of the seat, relative to its section.
30
+ * Populated on demand for a single section during block selection.
31
+ */
32
+ ix?: number;
33
+ /**
34
+ * Untransformed grid Y coordinate of the seat, relative to its section.
35
+ * Populated on demand for a single section during block selection.
36
+ */
37
+ iy?: number;
28
38
  /**
29
39
  * The name or number of the seat.
30
40
  */
@@ -121,6 +131,7 @@ interface IShapeMetadata {
121
131
  order?: number;
122
132
  fontScale?: number;
123
133
  }
134
+ type BrandingLevel = 'watermark' | 'interrupted';
124
135
  /**
125
136
  * Interface representing the schema data transfer object from the API.
126
137
  * @hidden
@@ -136,6 +147,7 @@ interface ISchemaDTO {
136
147
  configuration?: IConfigurationDTO;
137
148
  instanceId?: string;
138
149
  componentVersion?: string;
150
+ branding?: BrandingLevel;
139
151
  }
140
152
  /**
141
153
  * Interface representing the venue data transfer object from the API.
@@ -161,6 +173,17 @@ interface IPlainSeatsDTO {
161
173
  sectorIds: [];
162
174
  names: string[];
163
175
  }
176
+ /**
177
+ * Untransformed grid coordinates for the seats of a single section, fetched on
178
+ * demand. The arrays are aligned by index: seat `ids[i]` sits at grid cell
179
+ * (`ix[i]`, `iy[i]`).
180
+ * @hidden
181
+ */
182
+ interface ISectionGridDTO {
183
+ ids: number[];
184
+ ix: number[];
185
+ iy: number[];
186
+ }
164
187
  /**
165
188
  * Interface representing the base seat data transfer object from the API.
166
189
  * Contains the core properties of a seat as received from the backend.
@@ -183,7 +206,14 @@ interface IRowDTO {
183
206
  * Contains the core properties of a sector as received from the backend.
184
207
  * @hidden
185
208
  */
186
- type ISectorDTO = IBaseSector;
209
+ type ISectorDTO = Omit<IBaseSector, 'labelStyle'> & {
210
+ /**
211
+ * Label style overrides as sent by the API: a JSON string (SEAT-624 wire format).
212
+ * Normalize with `withParsedLabelStyle` before putting a sector into the renderer
213
+ * context, which types it as the parsed {@link ILabelStyle} object (SEAT-1069).
214
+ */
215
+ labelStyle?: string | ILabelStyle;
216
+ };
187
217
  /**
188
218
  * Interface representing the SVG background data transfer object from the API.
189
219
  * @hidden
@@ -282,6 +312,19 @@ type IPngFromUrl = {
282
312
  path: string;
283
313
  status: string;
284
314
  };
315
+ /**
316
+ * Type representing the tile grid sliced from the full-size background.
317
+ * @hidden
318
+ */
319
+ type ITileGrid = {
320
+ size: number;
321
+ cols: number;
322
+ rows: number;
323
+ width: number;
324
+ height: number;
325
+ path: string;
326
+ status: string;
327
+ };
285
328
  /**
286
329
  * Interface representing PNG background images in different resolutions.
287
330
  * @hidden
@@ -290,6 +333,8 @@ interface IPngBackgroundDTO {
290
333
  blurred: IBlurred;
291
334
  preview: IPngFromUrl;
292
335
  full: IPngFromUrl;
336
+ tiles?: ITileGrid;
337
+ lods?: IPngFromUrl[];
293
338
  }
294
339
 
295
340
  /**
@@ -343,6 +388,18 @@ declare class BookingApiClient {
343
388
  * @param eventId Event GUID
344
389
  */
345
390
  fetchSchemaForEvent(eventId: string): Promise<ISchemaDTO>;
391
+ /**
392
+ * Returns the untransformed grid coordinates for a single section of an event's schema.
393
+ * @param eventId Event GUID
394
+ * @param sectorId Section (sector) id
395
+ */
396
+ fetchSectionGridForEvent(eventId: string, sectorId: number): Promise<ISectionGridDTO>;
397
+ /**
398
+ * Returns the untransformed grid coordinates for a single section of a schema.
399
+ * @param schemaId Schema id
400
+ * @param sectorId Section (sector) id
401
+ */
402
+ fetchSectionGridForSchema(schemaId: number, sectorId: number): Promise<ISectionGridDTO>;
346
403
  private unpackSchemaDTO;
347
404
  /**
348
405
  * Return prices information
@@ -364,7 +421,6 @@ declare class BookingApiClient {
364
421
  * @param url Relative API endpoint URL, e.g. 'event/prices/?id=XXX'
365
422
  */
366
423
  requestPlain<T extends RequestMetrics>(url: string): Promise<T>;
367
- private restoreSeats;
368
424
  private restoreIds;
369
425
  }
370
426
 
@@ -415,6 +471,8 @@ interface IVisibilityStatuses {
415
471
  */
416
472
  interface IRendererMachineContext {
417
473
  mode?: string;
474
+ temporaryPan?: boolean;
475
+ viewportLocked?: boolean;
418
476
  scale: number;
419
477
  isEagleView: boolean;
420
478
  events: DestEvent[];
@@ -746,12 +804,21 @@ declare class Context {
746
804
  rotationZ: number;
747
805
  perspectiveZ: number;
748
806
  tiltX: number;
807
+ viewportLocked: boolean;
749
808
  private _seats;
750
809
  seatsIndex: KDBush;
810
+ flattenBackup: Map<number, {
811
+ x: number;
812
+ y: number;
813
+ }> | null;
814
+ flattenedSectionId: number | null;
751
815
  seatsById: ById<ISeat>;
752
816
  seatsByRowId: {
753
817
  [rowId: number]: ISeat[];
754
818
  };
819
+ seatsBySectionId: {
820
+ [sectionId: number]: ISeat[];
821
+ };
755
822
  rowsById: ById<IRowDTO>;
756
823
  sectionsById: ById<ISector>;
757
824
  pricesById: ById<IColoredPrice>;
@@ -772,6 +839,8 @@ declare class Context {
772
839
  private _pricesDTO;
773
840
  private _selectedSeatIds;
774
841
  private _selectedGaId?;
842
+ private _sectionsByName?;
843
+ private _rowsByKey?;
775
844
  underlay: {
776
845
  svgString?: Nullable<string>;
777
846
  viewBox: {
@@ -793,6 +862,8 @@ declare class Context {
793
862
  _deselectedAt: {
794
863
  [seatId: number]: number;
795
864
  };
865
+ overlayVersion: number;
866
+ bumpOverlayVersion(): void;
796
867
  constructor(element: HTMLElement, settings: IRendererSettings, redrawHandler: () => void);
797
868
  set selectedSeatIds(value: number[]);
798
869
  get selectedSeatIds(): number[];
@@ -812,6 +883,10 @@ declare class Context {
812
883
  initCart(cart: ICart): void;
813
884
  get seats(): ISeat[];
814
885
  set seats(value: ISeat[]);
886
+ rangeSeats(x1: number, y1: number, x2: number, y2: number): ISeat[];
887
+ rebuildSeatsIndex(): void;
888
+ replaceSeatsPreservingPositions(value: ISeat[]): void;
889
+ private rebuildSeatLookups;
815
890
  getPositionByOffset: (offset: IPoint) => IPoint;
816
891
  getOffsetByPosition: (position: IPoint) => IPoint;
817
892
  addGaToCart(ga: ICartGa): void;
@@ -843,8 +918,11 @@ declare class Context {
843
918
  height: number;
844
919
  }, mode: RendererSelectMode): void;
845
920
  repairSeat: (s: ICartSeat) => ICartSeat | undefined;
921
+ private uniquePriceForAmount;
846
922
  afterCartUpdate: () => void;
847
923
  repairGa: (ga: ICartGa) => ICartGa | undefined;
924
+ private getSectionByName;
925
+ private getRowBySectionAndNumber;
848
926
  findSeatByKey(key: string): ISeat | undefined;
849
927
  getCart(): ICart;
850
928
  isSeatInCart(seatId: number): boolean;
@@ -875,6 +953,23 @@ declare class Context {
875
953
  }) => ISeat | undefined;
876
954
  }
877
955
 
956
+ type HotkeysSetting = false | Partial<Record<string, string | null>>;
957
+
958
+ /**
959
+ * Outline source meaning:
960
+ * - svg: bound to the background svg
961
+ * - fallback: fallback outline generated from seats
962
+ * - shape: editor-made basic shapes
963
+ * - auto: editor-generated outline
964
+ */
965
+ type OutlineSource = 'svg' | 'shape' | 'auto' | 'fallback';
966
+ interface OutlineStates {
967
+ highlighted?: boolean;
968
+ selected?: boolean;
969
+ unavailable?: boolean;
970
+ filtered?: boolean;
971
+ }
972
+
878
973
  type Nullable<T> = T | null | undefined;
879
974
  type DeepPartial<T> = T extends object ? {
880
975
  [P in keyof T]?: DeepPartial<T[P]>;
@@ -959,7 +1054,8 @@ interface ISection {
959
1054
  */
960
1055
  rect: ISectionRect;
961
1056
  /**
962
- * The price for the section.
1057
+ * The price for the section, parsed as a number from its price label.
1058
+ * Preserves decimals (e.g. `12.5`) and is undefined when the label is non-numeric.
963
1059
  */
964
1060
  price?: number;
965
1061
  priceId?: IPriceId;
@@ -1061,7 +1157,8 @@ interface ISectionWithCoords {
1061
1157
  */
1062
1158
  rect: ISectionRect;
1063
1159
  /**
1064
- * The price for the section.
1160
+ * The price for the section, parsed as a number from its price label.
1161
+ * Preserves decimals (e.g. `12.5`) and is undefined when the label is non-numeric.
1065
1162
  */
1066
1163
  price?: number | undefined;
1067
1164
  /**
@@ -1107,7 +1204,8 @@ interface ICartSeat {
1107
1204
  */
1108
1205
  key: string;
1109
1206
  /**
1110
- * The price of the seat.
1207
+ * The price of the seat, parsed as a number from its price label.
1208
+ * Preserves decimals (e.g. `12.5`) and is undefined when the label is non-numeric.
1111
1209
  */
1112
1210
  price?: number;
1113
1211
  /**
@@ -1178,7 +1276,8 @@ interface ICartGa {
1178
1276
  */
1179
1277
  count: number;
1180
1278
  /**
1181
- * The price per GA ticket.
1279
+ * The price per GA ticket, parsed as a number from its price label.
1280
+ * Preserves decimals (e.g. `12.5`) and is undefined when the label is non-numeric.
1182
1281
  */
1183
1282
  price?: number;
1184
1283
  }
@@ -1522,6 +1621,14 @@ interface ILoaderSettings {
1522
1621
  genericError?: IErrorMessage;
1523
1622
  };
1524
1623
  }
1624
+ /**
1625
+ * Configuration settings for the "Powered by Seatmap.pro" branding overlay.
1626
+ */
1627
+ interface IWatermarkSettings {
1628
+ position?: 'bottom-left' | 'bottom-right';
1629
+ interruptionTitle?: string;
1630
+ interruptionSubtitle?: string;
1631
+ }
1525
1632
  /**
1526
1633
  * Configuration settings for the renderer.
1527
1634
  * Defines various options that control the behavior and appearance of the renderer.
@@ -1584,6 +1691,13 @@ interface IRendererSettings {
1584
1691
  * Use visibilitySettings instead
1585
1692
  */
1586
1693
  seatSelectionMinZoom?: number;
1694
+ /**
1695
+ * Keyboard shortcut configuration. Set to `false` to disable all hotkeys,
1696
+ * or remap/disable individual bindings by action id. Only the admin
1697
+ * renderer currently registers hotkey bindings; setting this on a booking
1698
+ * renderer has no effect.
1699
+ */
1700
+ hotkeys?: HotkeysSetting;
1587
1701
  /**
1588
1702
  * Maximum number of seats that can be selected.
1589
1703
  */
@@ -1689,6 +1803,7 @@ interface IRendererSettings {
1689
1803
  * Minimap configuration settings.
1690
1804
  */
1691
1805
  minimap?: IMinimapSettings;
1806
+ watermark?: IWatermarkSettings;
1692
1807
  /**
1693
1808
  * Loader configuration settings.
1694
1809
  * Controls the loading overlay with progress bar during event loading.
@@ -2010,13 +2125,25 @@ interface IBasicSeatStyle {
2010
2125
  interface ISeatStyle extends IBasicSeatStyle {
2011
2126
  accessible?: IBasicSeatStyle;
2012
2127
  }
2013
- interface IRendererSvgSectionStylesSetting {
2128
+ interface ISvgSectionStateStyles {
2014
2129
  default?: Pick<ISvgSectionStyle, 'sectionName' | 'stroke' | 'cursor' | 'bgColor'>;
2015
2130
  unavailable?: ISvgSectionStyle;
2016
2131
  filtered?: ISvgSectionStyle;
2017
2132
  hovered?: ISvgSectionStyle;
2018
2133
  selected?: ISvgSectionStyle;
2019
2134
  }
2135
+ interface IRendererSvgSectionStylesSetting extends ISvgSectionStateStyles {
2136
+ /**
2137
+ * Per-outline-source style overrides. Section outlines are tagged by source
2138
+ * (`svg`, `shape`, `auto`, `fallback`); a source entry overrides the flat
2139
+ * styles above for that source only, leaving the others on the global styles.
2140
+ * Use it to style, for example, hover on auto-generated seat-section outlines
2141
+ * (`fallback` / `auto`) differently from user zones (`svg`). Applies to the SVG
2142
+ * outline styling; in WebGL overlay mode the hover ring color still comes from
2143
+ * the flat `hovered.stroke.color`.
2144
+ */
2145
+ bySource?: Partial<Record<OutlineSource, ISvgSectionStateStyles>>;
2146
+ }
2020
2147
  interface ISvgSectionStyle {
2021
2148
  sectionName?: {
2022
2149
  color?: string;
@@ -2042,27 +2169,11 @@ interface IRendererTheme {
2042
2169
  svgSectionStyles?: IRendererSvgSectionStylesSetting;
2043
2170
  }
2044
2171
 
2045
- /**
2046
- * Outline source meaning:
2047
- * - svg: bound to the background svg
2048
- * - fallback: fallback outline generated from seats
2049
- * - shape: editor-made basic shapes
2050
- * - auto: editor-generated outline
2051
- */
2052
- type OutlineSource = 'svg' | 'shape' | 'auto' | 'fallback';
2053
- interface OutlineStates {
2054
- highlighted?: boolean;
2055
- selected?: boolean;
2056
- unavailable?: boolean;
2057
- filtered?: boolean;
2058
- }
2059
-
2060
2172
  /**
2061
2173
  * @hidden
2062
2174
  */
2063
2175
  declare class OutlineLayer {
2064
2176
  svgElement: SVGSVGElement;
2065
- private outlineRect;
2066
2177
  private context;
2067
2178
  private originalSvg;
2068
2179
  private backgroundSVG;
@@ -2143,7 +2254,6 @@ declare class OutlineLayer {
2143
2254
  private createOrGetOutlineShapes;
2144
2255
  private appendFallbackOutlines;
2145
2256
  private appendShapeOutlines;
2146
- private getOutlineRects;
2147
2257
  createFallbackOutlineRect(section: ISector): SVGRectElement;
2148
2258
  private getRenderContext;
2149
2259
  handleChangeEagleView(isEagleView?: boolean): void;
@@ -2159,14 +2269,54 @@ declare class OutlineLayer {
2159
2269
  updateAnimationStep(scale: number, translate: IPoint): void;
2160
2270
  hide(): void;
2161
2271
  show(): void;
2272
+ hideShapes(): void;
2273
+ showShapes(): void;
2162
2274
  private getContextSvg;
2163
2275
  forceUpdate(): void;
2164
2276
  private apply3DTransforms;
2165
2277
  appendRowsOverlay(rowsFragment: string, css?: string): void;
2166
2278
  }
2167
2279
 
2280
+ /**
2281
+ * @hidden
2282
+ */
2283
+ declare abstract class Layer {
2284
+ protected readonly context: Context;
2285
+ private canvas;
2286
+ protected ctx: CanvasRenderingContext2D;
2287
+ protected offscreenCanvas: HTMLCanvasElement;
2288
+ protected offscreenCtx: CanvasRenderingContext2D;
2289
+ protected isDebug: boolean;
2290
+ /** Physical (device-pixel) canvas width, set by updateSize */
2291
+ physicalWidth: number;
2292
+ /** Physical (device-pixel) canvas height, set by updateSize */
2293
+ physicalHeight: number;
2294
+ private lastFrameTime;
2295
+ private spinnerAnimationId;
2296
+ private spinnerRotation;
2297
+ private spinningSeats;
2298
+ constructor(context: Context);
2299
+ get width(): number;
2300
+ get height(): number;
2301
+ destroy(): void;
2302
+ updateSize(physicalWidth?: number, physicalHeight?: number): void;
2303
+ protected redraw(): void;
2304
+ protected abstract renderContent(): void;
2305
+ protected _renderSeat(ctx: CanvasRenderingContext2D, seat: ISeat, style: ISeatStyle, state: SeatInteractionState): void;
2306
+ protected drawPoint(ctx: CanvasRenderingContext2D, point: IPoint, color?: string): void;
2307
+ drawOffscreenCanvas(): void;
2308
+ drawOnscreenCanvas(scale: number, translate: IPoint): void;
2309
+ protected addSpinningSeat(seatId: string): void;
2310
+ removeSpinningSeat(seatId: string): void;
2311
+ protected isSpinningSeat(seatId: string): boolean;
2312
+ protected startSpinnerAnimation(): void;
2313
+ protected renderSeat(ctx: CanvasRenderingContext2D, seat: ISeat): void;
2314
+ protected renderHoveredSeat(ctx: CanvasRenderingContext2D, seat: ISeat): void;
2315
+ protected renderSelectedSeat(ctx: CanvasRenderingContext2D, seat: ISeat): void;
2316
+ }
2317
+
2168
2318
  interface IRendererZoomControls {
2169
- zoomToFit: () => void;
2319
+ zoomToFit: () => Promise<void>;
2170
2320
  getSectionsWithCoords: () => ISectionWithCoords[];
2171
2321
  }
2172
2322
  interface ISectionTransform {
@@ -2176,12 +2326,80 @@ interface ISectionTransform {
2176
2326
  section: IPoint;
2177
2327
  skewAngle: number;
2178
2328
  }
2329
+ interface ISectionAnimation {
2330
+ startTime?: number;
2331
+ duration: number;
2332
+ frame?: number;
2333
+ skewAngle: number;
2334
+ rotationAngle: number;
2335
+ inProgress: boolean;
2336
+ }
2337
+ /**
2338
+ * @hidden
2339
+ */
2340
+ declare class SectionViewLayer extends Layer {
2341
+ backgroundElement: HTMLImageElement;
2342
+ protected backgroundSuppressed: boolean;
2343
+ sectionViewActive: boolean;
2344
+ sectionId: number | null;
2345
+ sectionViewTransform: ISectionTransform;
2346
+ protected _renderSeat(ctx: CanvasRenderingContext2D, seat: ISeat, style: ISeatStyle, state: SeatInteractionState): void;
2347
+ private animation;
2348
+ private rotationPromise?;
2349
+ private rotationResolve?;
2350
+ private reversePromise?;
2351
+ private cancelPendingFrame;
2352
+ private finishRotation;
2353
+ drawOffscreenCanvas(): void;
2354
+ drawOnscreenCanvas(scale: number, translate: IPoint): void;
2355
+ redraw(): void;
2356
+ rotationAnimation(): Promise<unknown>;
2357
+ reverseRotationAnimation(): Promise<unknown>;
2358
+ private setAnimateSection;
2359
+ private setSectionCoords;
2360
+ private setCenterPoint;
2361
+ private setRotationAngle;
2362
+ private getSectionUpdatedCoords;
2363
+ getCoordsAfterRotation<T = IPoint>(point: T): T;
2364
+ setTransformationState(state: ISectionTransform): void;
2365
+ setAnimationState(state: ISectionAnimation): void;
2366
+ getAnimationState(): ISectionAnimation;
2367
+ getAnimationPoint(): {
2368
+ x: number;
2369
+ y: number;
2370
+ };
2371
+ private applySkew;
2372
+ renderContent(): void;
2373
+ setBackgroundSuppressed(suppressed: boolean): void;
2374
+ /**
2375
+ * @hidden
2376
+ *
2377
+ * @param section
2378
+ *
2379
+ * Entrypoint for the section view animation start
2380
+ */
2381
+ applySectionViewAnimation(section: ISectionWithCoords, options: IRendererZoomControls): Promise<boolean>;
2382
+ resetSectionViewState(): void;
2383
+ protected rotate(ctx: CanvasRenderingContext2D, angle: number, center: IPoint, bgImage: HTMLImageElement): void;
2384
+ }
2385
+
2386
+ interface DetailLevel {
2387
+ path: string;
2388
+ width: number;
2389
+ }
2390
+ interface DetailTiles {
2391
+ grid: ITileGrid;
2392
+ width: number;
2393
+ height: number;
2394
+ levels: DetailLevel[];
2395
+ }
2179
2396
 
2180
2397
  interface IStageLayer {
2181
2398
  destroy: () => void;
2182
2399
  backgroundElement: HTMLImageElement;
2183
2400
  /** Full-resolution background image retained in JS heap for on-demand detail cropping (all WebGL devices). */
2184
2401
  fullBackgroundImage: HTMLImageElement | null;
2402
+ detailTiles?: DetailTiles | null;
2185
2403
  redraw: () => void;
2186
2404
  drawOffscreenCanvas: () => void;
2187
2405
  drawOnscreenCanvas: (scale: number, translate: IPoint) => void;
@@ -2204,8 +2422,10 @@ interface IStageLayer {
2204
2422
  captureSeatmap: () => Promise<HTMLImageElement | null>;
2205
2423
  /** Notify that viewport has settled after animation -- triggers detail crop update on WebGL devices */
2206
2424
  onViewportSettled?: () => void;
2425
+ setBackgroundSuppressed: (suppressed: boolean) => void;
2207
2426
  /** Dispose detail texture immediately -- called when animation starts to prevent stale crop flash */
2208
2427
  disposeDetailTexture?: () => void;
2428
+ setTransformAnimating?: (active: boolean) => void;
2209
2429
  }
2210
2430
 
2211
2431
  /**
@@ -2478,8 +2698,8 @@ interface IRendererAnimation {
2478
2698
  toTiltX?: number;
2479
2699
  fromPerspectiveZ?: number;
2480
2700
  toPerspectiveZ?: number;
2481
- /** Called once when the animation finishes */
2482
- onComplete?: () => void;
2701
+ /** Called once when the animation finishes; completed is false when interrupted */
2702
+ onComplete?: (completed: boolean) => void;
2483
2703
  }
2484
2704
  interface IRendererSequenceStep {
2485
2705
  zoomTo?: number;
@@ -2553,6 +2773,145 @@ declare class StateManager {
2553
2773
  destroy(): void;
2554
2774
  }
2555
2775
 
2776
+ declare class SeatStateEngine {
2777
+ private readonly stateBySeat;
2778
+ private readonly seatsByState;
2779
+ setState(seatIds: number[], stateKey: string): void;
2780
+ clearState(seatIds: number[]): void;
2781
+ clearAll(): void;
2782
+ getState(seatId: number): string | undefined;
2783
+ hasAny(): boolean;
2784
+ getAssignedSeatIds(): number[];
2785
+ filterAssigned(seats: ISeat[]): ISeat[];
2786
+ isBlocked(seatId: number, styles: SeatStylesMap | undefined): boolean;
2787
+ private removeAssignment;
2788
+ }
2789
+
2790
+ interface SeatStateLayerDeps {
2791
+ getContext: () => Context;
2792
+ getEngine: () => SeatStateEngine;
2793
+ getStyles: () => SeatStylesMap | undefined;
2794
+ getVisibleSeats: () => ISeat[];
2795
+ isOverlaySuppressed: () => boolean;
2796
+ }
2797
+ declare class SeatStateLayer {
2798
+ private readonly deps;
2799
+ private container;
2800
+ private readonly nodes;
2801
+ private lastReconcileAt;
2802
+ constructor(deps: SeatStateLayerDeps);
2803
+ sync(): void;
2804
+ drawOnscreen(animScale: number, animTranslate: IPoint): void;
2805
+ refreshPositions(seatIds: number[]): void;
2806
+ destroy(): void;
2807
+ private ensureContainer;
2808
+ private updateTransform;
2809
+ private reconcile;
2810
+ private mountNode;
2811
+ private appendDefault;
2812
+ private appendCustom;
2813
+ private numberEl;
2814
+ private svgSrc;
2815
+ private seatSize;
2816
+ private positionNode;
2817
+ }
2818
+
2819
+ /**
2820
+ * @hidden
2821
+ */
2822
+ declare class SelectionLayer extends SectionViewLayer {
2823
+ static readonly PRICE_DOT_ANCHOR_THRESHOLD = 28;
2824
+ static computePriceDotPosition(args: {
2825
+ isTextHidden: boolean;
2826
+ labelDx: number;
2827
+ labelDy: number;
2828
+ sectorBulletShiftY: number;
2829
+ }): {
2830
+ x: number;
2831
+ y: number;
2832
+ };
2833
+ private gaFontScales;
2834
+ private selectionRect?;
2835
+ private getContextSvg;
2836
+ updateGaFontScales(): void;
2837
+ showSelectionRect(rect: {
2838
+ x: number;
2839
+ y: number;
2840
+ width: number;
2841
+ height: number;
2842
+ }): void;
2843
+ hideSelectionRect(): void;
2844
+ renderContent(): void;
2845
+ drawOnscreenCanvas(scale: number, translate: IPoint): void;
2846
+ private renderGaTitles;
2847
+ private renderSelectionRect;
2848
+ /**
2849
+ * Applies CSS 3D transforms to the selection layer canvas to match OutlineLayer in view3D mode
2850
+ */
2851
+ protected apply3DTransforms(): void;
2852
+ }
2853
+
2854
+ interface SectionHelperDeps {
2855
+ getContext: () => Context;
2856
+ getStageLayer: () => IStageLayer;
2857
+ getSelectionLayer: () => SelectionLayer | null;
2858
+ getOutlineLayer: () => OutlineLayer;
2859
+ getDataManager: () => DataManager;
2860
+ getSeatIds: (seats: ISeat[] | number[] | string[]) => number[];
2861
+ removeGaFromCart: (removedGa: {
2862
+ sectorId: number;
2863
+ price?: number;
2864
+ }) => void;
2865
+ }
2866
+ /**
2867
+ * Manages section-level operations: SVG section enable/disable/filter,
2868
+ * section selection, GA selection, outline resolution, and data accessors.
2869
+ */
2870
+ declare class SectionHelper {
2871
+ private readonly deps;
2872
+ private originalSectionPrices;
2873
+ constructor(deps: SectionHelperDeps);
2874
+ getSections(): ISector[];
2875
+ getSectionsKeys(): (string | number)[];
2876
+ getRows(): IRowDTO[];
2877
+ getSeats(): ISeatDTO[];
2878
+ getRowById(id: number): IRowDTO | undefined;
2879
+ getVisibleSeats(): ISeat[];
2880
+ getSectionsWithCoords(): ISectionWithCoords[];
2881
+ getSeatSelection(): IExtendedSeat[];
2882
+ setSeatSelection(seats: number[] | string[] | ISeat[]): void;
2883
+ applySeatSelection(ids: number[], mode: RendererSelectMode): void;
2884
+ selectSeatBlock(anchorSeatId: number, focusSeatId: number, mode?: RendererSelectMode): boolean;
2885
+ selectAllSeats(): void;
2886
+ /**
2887
+ * Replaces the current section selection: clears all outline selection
2888
+ * attributes, then selects the resolved ids. An empty list clears everything.
2889
+ */
2890
+ setSectionSelection(sections?: number[] | string[]): void;
2891
+ getSvgSectionBySelection(): ISectorDTO[];
2892
+ setSelectedGa(ga?: number | string): void;
2893
+ getSelectedGa(): ISector | undefined;
2894
+ disableSvgSectionsByIds(ids: number[], options?: {
2895
+ resetAll?: boolean;
2896
+ }): void;
2897
+ enableSvgSectionsByIds(ids: number[]): void;
2898
+ disableSvgSectionsByNames(names: string[], options?: {
2899
+ resetAll?: boolean;
2900
+ }): void;
2901
+ enableSvgSectionsByNames(names: string[]): void;
2902
+ disableSectionsByIds(ids: number[]): void;
2903
+ enableSectionsByIds(): void;
2904
+ filterSvgSectionsByIds(ids: number[], options?: {
2905
+ resetAll?: boolean;
2906
+ }): void;
2907
+ removeFilterSvgSectionsByIds(ids?: number[]): void;
2908
+ getGaSectionByOutline(target: HTMLElement | EventTarget): ISection | undefined;
2909
+ getSectionByOutline(target: HTMLElement | EventTarget): ISection | undefined;
2910
+ buildSectionFromId(sectionId: number): ISection | undefined;
2911
+ getSectorRectByOutline(target: HTMLElement | EventTarget): ISectionRect;
2912
+ private updateBackgroundImage;
2913
+ }
2914
+
2556
2915
  /**
2557
2916
  * Base Renderer class that implements the IRenderer interface.
2558
2917
  * Provides core functionality for rendering and interacting with a venue map.
@@ -2588,7 +2947,8 @@ declare class Renderer implements IRenderer {
2588
2947
  private threeDController;
2589
2948
  private viewportController;
2590
2949
  private seatOps;
2591
- private sectionHelper;
2950
+ protected sectionHelper: SectionHelper;
2951
+ protected getSeatStateLayer(): SeatStateLayer;
2592
2952
  private refreshMinimap;
2593
2953
  private setMinimapFromSnapshot;
2594
2954
  /**
@@ -2679,6 +3039,7 @@ declare class Renderer implements IRenderer {
2679
3039
  * @returns Whether the mode was set successfully
2680
3040
  */
2681
3041
  setMode(mode: string): boolean;
3042
+ protected setTemporaryPan(active: boolean): void;
2682
3043
  getMode(): string | undefined;
2683
3044
  setHeight(height: number): void;
2684
3045
  setGroupSize(groupSize: number): void;
@@ -2690,7 +3051,7 @@ declare class Renderer implements IRenderer {
2690
3051
  setGaCategory(sectionId: number, category: number | undefined): void;
2691
3052
  resetCategories(): void;
2692
3053
  getCategoryColor(category: number): string | undefined;
2693
- private changeMachineContext;
3054
+ protected changeMachineContext(changes: Partial<IRendererMachineContext>): void;
2694
3055
  private setContextScale;
2695
3056
  /**
2696
3057
  * Retrieves the available prices.
@@ -2800,6 +3161,7 @@ declare class Renderer implements IRenderer {
2800
3161
  getResolvedMarkers(): IResolvedMarker[];
2801
3162
  private addHandlers;
2802
3163
  private initializeResizeObserver;
3164
+ protected onBeforeSchemaReplace(): void;
2803
3165
  protected setSchemaData(schema: ISchemaDTO): Promise<void>;
2804
3166
  /**
2805
3167
  * Sets external prices to seats
@@ -2906,7 +3268,7 @@ declare class Renderer implements IRenderer {
2906
3268
  updateSeatLocks(filter: SeatFilter): void;
2907
3269
  getSeatSelection(): IExtendedSeat[];
2908
3270
  setSectionSelection(sections?: number[] | string[]): void;
2909
- getSvgSectionBySelection(): IBaseSector[];
3271
+ getSvgSectionBySelection(): ISectorDTO[];
2910
3272
  /** @deprecated Use {@link disableSections} instead. */
2911
3273
  disableSvgSectionsByIds(ids: number[], options?: {
2912
3274
  resetAll?: boolean;
@@ -2948,7 +3310,7 @@ declare class Renderer implements IRenderer {
2948
3310
  setSeatSelection(seats: number[] | string[] | ISeat[]): void;
2949
3311
  setSelectedGa(ga?: number | string): void;
2950
3312
  getSelectedGa(): ISector | undefined;
2951
- getSections(): IBaseSector[];
3313
+ getSections(): ISector[];
2952
3314
  getSectionsKeys(): (string | number)[];
2953
3315
  getRows(): IRowDTO[];
2954
3316
  getSeats(): ISeatDTO[];
@@ -2978,9 +3340,10 @@ declare class Renderer implements IRenderer {
2978
3340
  animateSequence(steps: IRendererSequenceStep[]): Promise<void>;
2979
3341
  getMinZoom(): number;
2980
3342
  getMaxZoom(): number;
3343
+ private cancelViewportSettle;
2981
3344
  /** Debounced notification to stageLayer that viewport has settled (SEAT-831 detail crop) */
2982
3345
  private scheduleViewportSettle;
2983
- private redraw;
3346
+ protected redraw(): void;
2984
3347
  private startAnimation;
2985
3348
  private doTranslate;
2986
3349
  private cachedDraw;
@@ -3061,6 +3424,39 @@ interface IAdminRendererSettings extends IRendererSettings {
3061
3424
  * Can be 'local', 'stage', or 'production' (default).
3062
3425
  */
3063
3426
  env?: string;
3427
+ /**
3428
+ * Called whenever flat section view is entered or exited, including when it is
3429
+ * discarded on renderer teardown or a schema reload.
3430
+ *
3431
+ * Receives the id of the section that is now flattened, or `null` when the view
3432
+ * has returned to normal.
3433
+ */
3434
+ onFlatSectionViewChange?: (sectionId: number | null) => void;
3435
+ }
3436
+ /**
3437
+ * Interface for the Admin Renderer functionality.
3438
+ * Extends the base renderer interface with admin-specific methods.
3439
+ */
3440
+ interface IAdminRenderer extends IRenderer {
3441
+ /**
3442
+ * Loads an event by its ID.
3443
+ *
3444
+ * @param eventId - The ID of the event to load
3445
+ * @returns A promise that resolves when the event is loaded
3446
+ */
3447
+ loadEvent: (eventId: string) => Promise<void>;
3448
+ /**
3449
+ * Flattens a single section onto its seating grid, or exits the flat view.
3450
+ *
3451
+ * Requesting the section that is already flattened resolves `true` and does
3452
+ * nothing, so the call never toggles the view off.
3453
+ *
3454
+ * @param sectionId - The id of the section to flatten, or `null` to exit
3455
+ * @returns A promise resolving `true` when the view is flat for that section,
3456
+ * or when `null` was passed; `false` when the section cannot be flattened
3457
+ * (general admission, tables, an unknown id, or a section with no grid)
3458
+ */
3459
+ setFlatSectionView: (sectionId: number | null) => Promise<boolean>;
3064
3460
  }
3065
3461
  /**
3066
3462
  * Admin Renderer class for seatmap administration.
@@ -3069,14 +3465,13 @@ interface IAdminRendererSettings extends IRendererSettings {
3069
3465
  declare class SeatmapAdminRenderer extends Renderer {
3070
3466
  static readonly VERSION: string;
3071
3467
  protected apiClient: BookingApiClient;
3072
- private pointerOverStage;
3073
- private readonly spacePan;
3074
- private readonly onStageEnter;
3075
- private readonly onStageLeave;
3076
- private readonly onKeyDown;
3077
- private readonly onKeyUp;
3078
- private readonly onWindowBlur;
3079
- private static isEditableTarget;
3468
+ private hotkeys?;
3469
+ private gridSource?;
3470
+ private readonly loadedGridSections;
3471
+ private backdropOverlay;
3472
+ private rowSeatLabelOverlay;
3473
+ private labelOverlaySvgRoot?;
3474
+ private flattenController?;
3080
3475
  /**
3081
3476
  * Creates a new instance of the AdminRenderer.
3082
3477
  *
@@ -3113,6 +3508,16 @@ declare class SeatmapAdminRenderer extends Renderer {
3113
3508
  * ```
3114
3509
  */
3115
3510
  constructor(element: HTMLElement, settings?: IAdminRendererSettings);
3511
+ private beginTemporaryPan;
3512
+ private endTemporaryPan;
3513
+ private beginFlatten;
3514
+ private endFlatten;
3515
+ clearSelection(): void;
3516
+ selectAllSeats(): void;
3517
+ private getLabelViewBoxOffset;
3518
+ private syncLabelOverlay;
3519
+ setFlatSectionView(sectionId: number | null): Promise<boolean>;
3520
+ protected onBeforeSchemaReplace(): void;
3116
3521
  destroy(): void;
3117
3522
  /**
3118
3523
  * Sets the interaction mode for the component and updates visibility of the outline layer.
@@ -3190,6 +3595,24 @@ declare class SeatmapAdminRenderer extends Renderer {
3190
3595
  * @returns A promise that resolves when the data fetching is completed
3191
3596
  */
3192
3597
  loadSchema(schemaId: number): Promise<void>;
3598
+ /**
3599
+ * Selects the rectangular block of seats spanning the section-local grid
3600
+ * coordinates between an anchor seat and a focus seat.
3601
+ *
3602
+ * @example
3603
+ * ```js
3604
+ * renderer.selectSeatBlock(anchorSeatId, focusSeatId);
3605
+ * renderer.selectSeatBlock(anchorSeatId, focusSeatId, RendererSelectMode.ADD);
3606
+ * ```
3607
+ *
3608
+ * @param anchorSeatId - ID of the seat where the block selection starts
3609
+ * @param focusSeatId - ID of the seat where the block selection ends
3610
+ * @param mode - Selection algebra to apply (defaults to `RendererSelectMode.REPLACE`)
3611
+ * @returns A promise resolving to `false` if either seat is unknown, the seats belong to
3612
+ * different sections, or grid coordinates are unavailable; `true` otherwise
3613
+ */
3614
+ selectSeatBlock(anchorSeatId: number, focusSeatId: number, mode?: RendererSelectMode): Promise<boolean>;
3615
+ private ensureSectionGrid;
3193
3616
  }
3194
3617
 
3195
3618
  interface IBookingRendererSettings extends IRendererSettings {
@@ -3245,6 +3668,8 @@ declare class SeatmapBookingRenderer extends Renderer {
3245
3668
  private tags?;
3246
3669
  private lastSentViewBox?;
3247
3670
  private debugOverlay?;
3671
+ private poweredByOverlay?;
3672
+ private interruptionOverlay?;
3248
3673
  /**
3249
3674
  * Creates a new instance of the SeatmapBookingRenderer.
3250
3675
  *
@@ -3302,6 +3727,7 @@ declare class SeatmapBookingRenderer extends Renderer {
3302
3727
  * those requests fail. Use the onSchemaDataLoaded callback for a first-paint hook.
3303
3728
  */
3304
3729
  loadEvent(eventId: string, sectorId?: number): Promise<void>;
3730
+ private applyBrandingOverlay;
3305
3731
  /** @hidden */
3306
3732
  static getErrorMessage(error: ApiError, errorTexts?: ILoaderSettings['errorTexts']): {
3307
3733
  title: string;
@@ -3337,6 +3763,8 @@ declare class SeatmapBookingRenderer extends Renderer {
3337
3763
  */
3338
3764
  declare const VERSION: string;
3339
3765
 
3766
+ type AdminHotkeyAction = 'pan' | 'clearSelection' | 'selectAll' | 'zoomIn' | 'zoomOut' | 'zoomToFit' | 'flatSection';
3767
+
3340
3768
  declare const defaultZoomSettings: IZoomSettings;
3341
3769
  declare const mergeSettings: (defaults: IRendererSettings, settings?: Partial<IRendererSettings>) => IRendererSettings & Partial<IRendererSettings>;
3342
3770
 
@@ -3378,4 +3806,4 @@ declare class RotationAnimation {
3378
3806
  getAnimation(): IRotationAnimation | null;
3379
3807
  }
3380
3808
 
3381
- export { ApiError, BookingApiClient, type BuiltinSeatStateKey, 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 ICustomSeatStyle, 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 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 ISeatStateRenderArgs, 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, type SeatStylesMap, SeatmapAdminRenderer, SeatmapBookingRenderer, type SrcEvent, SrcEventType, StateManager, type StateManagerEvent, type StateManagerEventCallback, type TransformArray, VERSION, convertPricesToColored, convertPricesToColoredById, defaultZoomSettings, emptyPriceList, mergeSettings, sortPrices };
3809
+ export { type AdminHotkeyAction, ApiError, BookingApiClient, type BrandingLevel, type BuiltinSeatStateKey, type ById, type ColorById, type ColorSequenceSettings, DataManager, type DataManagerEvent, type DataManagerEventCallback, type DeepPartial, type DestEvent, DestEventType, type HotkeysSetting, type IAdminRenderer, 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 ICustomSeatStyle, 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 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 ISeatStateRenderArgs, type ISeatStyle, type ISection, type ISectionClickDestEvent, type ISectionGridDTO, type ISectionMetadata, type ISectionMouseEnterDestEvent, type ISectionMouseLeaveDestEvent, type ISectionRect, type ISectionWithCoords, type ISector, type ISectorDTO, type IShapeMetadata, type ISpecialPrice, type ISpecialState, type ISvgSectionStateStyles, type ISvgSectionStyle, type ITileGrid, type IVenueDTO, type IVisibilitySettings, type IWatermarkSettings, 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, type SeatStylesMap, SeatmapAdminRenderer, SeatmapBookingRenderer, type SrcEvent, SrcEventType, StateManager, type StateManagerEvent, type StateManagerEventCallback, type TransformArray, VERSION, convertPricesToColored, convertPricesToColoredById, defaultZoomSettings, emptyPriceList, mergeSettings, sortPrices };