@seatmap.pro/renderer 1.57.0 → 1.58.6
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 +475 -42
- package/lib/index.js +1 -1
- package/package.json +4 -4
package/lib/index.d.ts
CHANGED
|
@@ -353,6 +353,7 @@ interface IVisibilityStatus {
|
|
|
353
353
|
interface IVisibilityStatuses {
|
|
354
354
|
outline: IVisibilityStatus;
|
|
355
355
|
seat: IVisibilityStatus;
|
|
356
|
+
marker: IVisibilityStatus;
|
|
356
357
|
}
|
|
357
358
|
|
|
358
359
|
/**
|
|
@@ -374,6 +375,8 @@ interface IRendererMachineContext {
|
|
|
374
375
|
tiltX?: number;
|
|
375
376
|
getWidth?: () => number;
|
|
376
377
|
getHeight?: () => number;
|
|
378
|
+
/** Zoom strategy configuration for eagle eye view interactions */
|
|
379
|
+
interactionZoomStrategy?: InteractionZoomStrategy;
|
|
377
380
|
}
|
|
378
381
|
/**
|
|
379
382
|
* @hidden
|
|
@@ -526,15 +529,23 @@ interface IRectSelectDestEvent {
|
|
|
526
529
|
};
|
|
527
530
|
}
|
|
528
531
|
/**
|
|
532
|
+
* Pan-zoom destination event.
|
|
533
|
+
* Triggered when clicking in eagle eye view to zoom into the venue.
|
|
529
534
|
* @hidden
|
|
530
535
|
*/
|
|
531
536
|
interface IPanZoomDestEvent {
|
|
532
537
|
type: DestEventType.PAN_ZOOM;
|
|
538
|
+
/** Target zoom scale */
|
|
533
539
|
scale: number;
|
|
540
|
+
/** Origin point in viewport coordinates */
|
|
534
541
|
origin?: {
|
|
535
542
|
x: number;
|
|
536
543
|
y: number;
|
|
537
544
|
};
|
|
545
|
+
/** Section at the clicked point, if any */
|
|
546
|
+
section?: ISection;
|
|
547
|
+
/** Zoom strategy to apply */
|
|
548
|
+
strategy?: InteractionZoomStrategy;
|
|
538
549
|
}
|
|
539
550
|
/**
|
|
540
551
|
* @hidden
|
|
@@ -635,6 +646,8 @@ declare class Context {
|
|
|
635
646
|
translate: IPoint;
|
|
636
647
|
isEagleView: boolean;
|
|
637
648
|
visibility: IVisibilityStatuses;
|
|
649
|
+
width: number;
|
|
650
|
+
height: number;
|
|
638
651
|
enable3DView: boolean;
|
|
639
652
|
rotationZ: number;
|
|
640
653
|
perspectiveZ: number;
|
|
@@ -859,6 +872,57 @@ interface ISection {
|
|
|
859
872
|
*/
|
|
860
873
|
type?: string | null;
|
|
861
874
|
}
|
|
875
|
+
/**
|
|
876
|
+
* Visual and interaction states that can be applied to entities
|
|
877
|
+
*/
|
|
878
|
+
interface IEntityStates {
|
|
879
|
+
highlighted: boolean;
|
|
880
|
+
selected: boolean;
|
|
881
|
+
unavailable: boolean;
|
|
882
|
+
filtered: boolean;
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Metadata for a section including visual states, bounds, and rendering info
|
|
886
|
+
*/
|
|
887
|
+
interface ISectionMetadata {
|
|
888
|
+
id: number;
|
|
889
|
+
name: string;
|
|
890
|
+
guid?: string;
|
|
891
|
+
type?: string;
|
|
892
|
+
elementCount: number;
|
|
893
|
+
seatCount?: number;
|
|
894
|
+
priceId?: number | string;
|
|
895
|
+
isGa?: boolean;
|
|
896
|
+
disabled?: boolean;
|
|
897
|
+
filtered?: boolean;
|
|
898
|
+
bounds?: DOMRect | null;
|
|
899
|
+
center?: {
|
|
900
|
+
x: number;
|
|
901
|
+
y: number;
|
|
902
|
+
} | null;
|
|
903
|
+
centerOutsideViewBox?: boolean;
|
|
904
|
+
outlineSource?: 'svg' | 'shape' | 'auto' | 'fallback';
|
|
905
|
+
states: IEntityStates;
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* Metadata for a seat including visual states, position, and availability
|
|
909
|
+
*/
|
|
910
|
+
interface ISeatMetadata {
|
|
911
|
+
id: number;
|
|
912
|
+
key: string;
|
|
913
|
+
sectionId: number;
|
|
914
|
+
sectionName?: string;
|
|
915
|
+
row?: string;
|
|
916
|
+
seat?: string;
|
|
917
|
+
x: number;
|
|
918
|
+
y: number;
|
|
919
|
+
priceId?: number | string;
|
|
920
|
+
available: boolean;
|
|
921
|
+
locked?: boolean;
|
|
922
|
+
filtered?: boolean;
|
|
923
|
+
inCart: boolean;
|
|
924
|
+
states: IEntityStates;
|
|
925
|
+
}
|
|
862
926
|
/**
|
|
863
927
|
* Interface representing a section with additional coordinate information.
|
|
864
928
|
* Extends ISection with absolute x and y coordinates.
|
|
@@ -1077,9 +1141,23 @@ interface IVisibleSetting {
|
|
|
1077
1141
|
visible?: IRange;
|
|
1078
1142
|
selectable?: IRange;
|
|
1079
1143
|
}
|
|
1144
|
+
/**
|
|
1145
|
+
* Visibility settings for different elements based on zoom level.
|
|
1146
|
+
*/
|
|
1080
1147
|
interface IVisibilitySettings {
|
|
1148
|
+
/**
|
|
1149
|
+
* Visibility configuration for seats.
|
|
1150
|
+
*/
|
|
1081
1151
|
seats?: IVisibleSetting;
|
|
1152
|
+
/**
|
|
1153
|
+
* Visibility configuration for section outlines.
|
|
1154
|
+
*/
|
|
1082
1155
|
outlines?: IVisibleSetting;
|
|
1156
|
+
/**
|
|
1157
|
+
* Visibility configuration for custom markers.
|
|
1158
|
+
* Controls when markers are visible and interactive based on zoom level.
|
|
1159
|
+
*/
|
|
1160
|
+
markers?: IVisibleSetting;
|
|
1083
1161
|
}
|
|
1084
1162
|
/**
|
|
1085
1163
|
* Minimap position options.
|
|
@@ -1103,6 +1181,12 @@ interface IMinimapSettings {
|
|
|
1103
1181
|
* @default 200
|
|
1104
1182
|
*/
|
|
1105
1183
|
width?: number;
|
|
1184
|
+
/**
|
|
1185
|
+
* Maximum minimap height as a percentage (0..100) of the seatmap container height.
|
|
1186
|
+
* When set and the computed minimap height exceeds this limit, minimap width is reduced proportionally
|
|
1187
|
+
* to preserve the venue aspect ratio.
|
|
1188
|
+
*/
|
|
1189
|
+
maxHeightPercent?: number;
|
|
1106
1190
|
/**
|
|
1107
1191
|
* Opacity of the minimap.
|
|
1108
1192
|
* @default 0.8
|
|
@@ -1146,6 +1230,105 @@ interface IMinimapSettings {
|
|
|
1146
1230
|
* @default true
|
|
1147
1231
|
*/
|
|
1148
1232
|
showCartPins?: boolean;
|
|
1233
|
+
/**
|
|
1234
|
+
* Show custom markers on the minimap.
|
|
1235
|
+
* @default true
|
|
1236
|
+
*/
|
|
1237
|
+
showMarkers?: boolean;
|
|
1238
|
+
}
|
|
1239
|
+
type MarkerTarget = {
|
|
1240
|
+
type: 'seat';
|
|
1241
|
+
seatId: number;
|
|
1242
|
+
} | {
|
|
1243
|
+
type: 'section';
|
|
1244
|
+
sectionId: number;
|
|
1245
|
+
} | {
|
|
1246
|
+
type: 'point';
|
|
1247
|
+
x: number;
|
|
1248
|
+
y: number;
|
|
1249
|
+
};
|
|
1250
|
+
type MarkerAppearance = {
|
|
1251
|
+
type: 'pin';
|
|
1252
|
+
color?: string;
|
|
1253
|
+
} | {
|
|
1254
|
+
type: 'circle';
|
|
1255
|
+
radius?: number;
|
|
1256
|
+
color?: string;
|
|
1257
|
+
label?: string;
|
|
1258
|
+
} | {
|
|
1259
|
+
type: 'custom';
|
|
1260
|
+
svg: string;
|
|
1261
|
+
width?: number;
|
|
1262
|
+
height?: number;
|
|
1263
|
+
};
|
|
1264
|
+
interface IMarker {
|
|
1265
|
+
id: string;
|
|
1266
|
+
target: MarkerTarget;
|
|
1267
|
+
appearance?: MarkerAppearance;
|
|
1268
|
+
showOnCanvas?: boolean;
|
|
1269
|
+
showOnMinimap?: boolean;
|
|
1270
|
+
interactive?: boolean;
|
|
1271
|
+
data?: Record<string, unknown>;
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Individual zoom strategy option for eagle eye view interactions.
|
|
1275
|
+
*
|
|
1276
|
+
* @public
|
|
1277
|
+
*/
|
|
1278
|
+
type InteractionZoomStrategyType = 'default' | 'section' | 'next-scale';
|
|
1279
|
+
/**
|
|
1280
|
+
* Zoom strategy configuration for eagle eye view interactions.
|
|
1281
|
+
* Can be a single strategy or an array of strategies for fallback behavior.
|
|
1282
|
+
*
|
|
1283
|
+
* When an array is provided, strategies are tried in order until one succeeds.
|
|
1284
|
+
* If all strategies fail, falls back to default zoom behavior (scale 1).
|
|
1285
|
+
*
|
|
1286
|
+
* The `'section'` strategy only works in eagle eye view. When already zoomed to a section,
|
|
1287
|
+
* it will fall through to the next strategy, enabling progressive zoom behavior.
|
|
1288
|
+
*
|
|
1289
|
+
* @example
|
|
1290
|
+
* ```typescript
|
|
1291
|
+
* // Single strategy
|
|
1292
|
+
* interactionZoomStrategy: 'section'
|
|
1293
|
+
*
|
|
1294
|
+
* // Progressive zoom with fallback
|
|
1295
|
+
* interactionZoomStrategy: ['section', 'next-scale']
|
|
1296
|
+
* // First click (eagle view): zooms to section
|
|
1297
|
+
* // Second click (at section): zooms to next scale step
|
|
1298
|
+
* ```
|
|
1299
|
+
*
|
|
1300
|
+
* @public
|
|
1301
|
+
*/
|
|
1302
|
+
type InteractionZoomStrategy = InteractionZoomStrategyType | InteractionZoomStrategyType[];
|
|
1303
|
+
/**
|
|
1304
|
+
* Default settings for markers.
|
|
1305
|
+
*/
|
|
1306
|
+
interface IMarkerSettings {
|
|
1307
|
+
/**
|
|
1308
|
+
* Default appearance for markers when not specified per-marker.
|
|
1309
|
+
* @default { type: 'pin' }
|
|
1310
|
+
*/
|
|
1311
|
+
defaultAppearance?: MarkerAppearance;
|
|
1312
|
+
/**
|
|
1313
|
+
* Whether markers are shown on the main canvas by default.
|
|
1314
|
+
* @default true
|
|
1315
|
+
*/
|
|
1316
|
+
defaultShowOnCanvas?: boolean;
|
|
1317
|
+
/**
|
|
1318
|
+
* Whether markers are shown on the minimap by default.
|
|
1319
|
+
* @default true
|
|
1320
|
+
*/
|
|
1321
|
+
defaultShowOnMinimap?: boolean;
|
|
1322
|
+
/**
|
|
1323
|
+
* Whether markers are interactive (clickable/hoverable) by default.
|
|
1324
|
+
* @default false
|
|
1325
|
+
*/
|
|
1326
|
+
defaultInteractive?: boolean;
|
|
1327
|
+
}
|
|
1328
|
+
interface IResolvedMarker {
|
|
1329
|
+
marker: IMarker;
|
|
1330
|
+
x: number;
|
|
1331
|
+
y: number;
|
|
1149
1332
|
}
|
|
1150
1333
|
/**
|
|
1151
1334
|
* Loading phase identifiers for progress tracking.
|
|
@@ -1232,6 +1415,7 @@ interface IRendererSettings {
|
|
|
1232
1415
|
* Theme settings for the renderer.
|
|
1233
1416
|
*/
|
|
1234
1417
|
theme?: IRendererTheme;
|
|
1418
|
+
markers?: IMarkerSettings;
|
|
1235
1419
|
/**
|
|
1236
1420
|
* Delay in milliseconds for debounced events.
|
|
1237
1421
|
*/
|
|
@@ -1244,6 +1428,11 @@ interface IRendererSettings {
|
|
|
1244
1428
|
* Fixed height for the renderer in pixels.
|
|
1245
1429
|
*/
|
|
1246
1430
|
height?: number;
|
|
1431
|
+
/**
|
|
1432
|
+
* Fixed width for the renderer in pixels.
|
|
1433
|
+
* If not provided, the renderer will use the container element's width.
|
|
1434
|
+
*/
|
|
1435
|
+
width?: number;
|
|
1247
1436
|
/**
|
|
1248
1437
|
* Initial padding around the venue when first loaded.
|
|
1249
1438
|
*/
|
|
@@ -1271,6 +1460,33 @@ interface IRendererSettings {
|
|
|
1271
1460
|
* Duration of zoom animations in milliseconds.
|
|
1272
1461
|
*/
|
|
1273
1462
|
zoomAnimationDuration?: number;
|
|
1463
|
+
/**
|
|
1464
|
+
* Zoom mode for zoomToSection method.
|
|
1465
|
+
* 'fit' - Adaptively fit section to screen with padding
|
|
1466
|
+
* 'scale' - Zoom to a specific scale value
|
|
1467
|
+
* @default 'fit'
|
|
1468
|
+
*/
|
|
1469
|
+
zoomToSectionMode?: 'fit' | 'scale';
|
|
1470
|
+
/**
|
|
1471
|
+
* Default scale value when zoomToSectionMode is 'scale' and no custom scale provided.
|
|
1472
|
+
* @default 1.0
|
|
1473
|
+
*/
|
|
1474
|
+
zoomToSectionDefaultScale?: number;
|
|
1475
|
+
/**
|
|
1476
|
+
* Padding percentage around section when fitting to screen (0.0 to 1.0).
|
|
1477
|
+
* 0.1 means 10% padding on all sides.
|
|
1478
|
+
* @default 0.1
|
|
1479
|
+
*/
|
|
1480
|
+
zoomToSectionFitPadding?: number;
|
|
1481
|
+
/**
|
|
1482
|
+
* Threshold dimensions for adaptive zoom behavior.
|
|
1483
|
+
* Small sections get capped zoom, large sections get minimum zoom.
|
|
1484
|
+
* @default { small: 200, large: 1000 }
|
|
1485
|
+
*/
|
|
1486
|
+
zoomToSectionAdaptiveThreshold?: {
|
|
1487
|
+
small: number;
|
|
1488
|
+
large: number;
|
|
1489
|
+
};
|
|
1274
1490
|
/**
|
|
1275
1491
|
* Delay time for loading the next background in milliseconds.
|
|
1276
1492
|
*/
|
|
@@ -1336,6 +1552,44 @@ interface IRendererSettings {
|
|
|
1336
1552
|
* Option to configure visibility settings
|
|
1337
1553
|
*/
|
|
1338
1554
|
visibilitySettings?: IVisibilitySettings;
|
|
1555
|
+
/**
|
|
1556
|
+
* Zoom strategy when clicking on the canvas in eagle eye view.
|
|
1557
|
+
* Can be a single strategy or an array of strategies for fallback behavior.
|
|
1558
|
+
*
|
|
1559
|
+
* Available strategies:
|
|
1560
|
+
* - `'default'`: Zoom to scale 1.0 (current behavior)
|
|
1561
|
+
* - `'section'`: Zoom to the clicked section using adaptive fit (only works in eagle eye view)
|
|
1562
|
+
* - `'next-scale'`: Zoom to the next scale step in zoom presets
|
|
1563
|
+
*
|
|
1564
|
+
* When multiple strategies are provided, they are tried in order.
|
|
1565
|
+
* The first strategy that can be applied is executed.
|
|
1566
|
+
* If all strategies fail, falls back to default zoom behavior.
|
|
1567
|
+
*
|
|
1568
|
+
* **Note:** The `'section'` strategy only works when in eagle eye view (zoomed out).
|
|
1569
|
+
* If already zoomed to a section, clicking again will fall through to the next strategy,
|
|
1570
|
+
* allowing progressive zoom (e.g., section → next-scale → deeper zoom).
|
|
1571
|
+
*
|
|
1572
|
+
* @example Single strategy
|
|
1573
|
+
* ```typescript
|
|
1574
|
+
* interactionZoomStrategy: 'section'
|
|
1575
|
+
* ```
|
|
1576
|
+
*
|
|
1577
|
+
* @example Multiple strategies with progressive zoom
|
|
1578
|
+
* ```typescript
|
|
1579
|
+
* interactionZoomStrategy: ['section', 'next-scale']
|
|
1580
|
+
* // First click: zooms to section (from eagle view)
|
|
1581
|
+
* // Second click: zooms to next scale (already at section, falls through)
|
|
1582
|
+
* ```
|
|
1583
|
+
*
|
|
1584
|
+
* @example Explicit fallback to default
|
|
1585
|
+
* ```typescript
|
|
1586
|
+
* interactionZoomStrategy: ['section', 'default']
|
|
1587
|
+
* // Tries to zoom to section first, if no section clicked or not in eagle view, zooms to scale 1
|
|
1588
|
+
* ```
|
|
1589
|
+
*
|
|
1590
|
+
* @default 'default'
|
|
1591
|
+
*/
|
|
1592
|
+
interactionZoomStrategy?: InteractionZoomStrategy;
|
|
1339
1593
|
/**
|
|
1340
1594
|
* Rises when the mouse pointer moves above a seat.
|
|
1341
1595
|
*
|
|
@@ -1402,6 +1656,9 @@ interface IRendererSettings {
|
|
|
1402
1656
|
* Cart state is passed as a param to the handler (see ICart).
|
|
1403
1657
|
*/
|
|
1404
1658
|
onCartChange?: (cart: ICart, prevCart?: ICart) => void;
|
|
1659
|
+
onMarkerClick?: (marker: IMarker, event: MouseEvent) => void;
|
|
1660
|
+
onMarkerMouseEnter?: (marker: IMarker) => void;
|
|
1661
|
+
onMarkerMouseLeave?: (marker: IMarker) => void;
|
|
1405
1662
|
/**
|
|
1406
1663
|
* Fires when the mouse pointer moves above a section.
|
|
1407
1664
|
*
|
|
@@ -1490,6 +1747,28 @@ interface IRendererSettings {
|
|
|
1490
1747
|
*/
|
|
1491
1748
|
onBeforeSeatDraw?: (event: IBeforeSeatDrawEvent) => ISeatStyle;
|
|
1492
1749
|
lockedSeatsFilter?: (seat: ISeat) => boolean;
|
|
1750
|
+
/**
|
|
1751
|
+
* Suppress console warnings for deprecated API methods.
|
|
1752
|
+
* Useful for gradual migration in production environments.
|
|
1753
|
+
* @default false
|
|
1754
|
+
*/
|
|
1755
|
+
suppressDeprecationWarnings?: boolean;
|
|
1756
|
+
/**
|
|
1757
|
+
* Control visibility of outline types based on source.
|
|
1758
|
+
* Each source can be set to 'always', 'eagle-only', or 'hidden'.
|
|
1759
|
+
*
|
|
1760
|
+
* Source meanings:
|
|
1761
|
+
* - svg: bound to the background svg
|
|
1762
|
+
* - fallback: fallback outline generated from seats
|
|
1763
|
+
* - shape: editor-made basic shapes
|
|
1764
|
+
* - auto: editor-generated outline
|
|
1765
|
+
*/
|
|
1766
|
+
outlineVisibility?: {
|
|
1767
|
+
auto?: 'always' | 'eagle-only' | 'hidden';
|
|
1768
|
+
fallback?: 'always' | 'eagle-only' | 'hidden';
|
|
1769
|
+
svg?: 'always' | 'eagle-only' | 'hidden';
|
|
1770
|
+
shape?: 'always' | 'eagle-only' | 'hidden';
|
|
1771
|
+
};
|
|
1493
1772
|
}
|
|
1494
1773
|
/**
|
|
1495
1774
|
* Represents the possible interaction states of a seat.
|
|
@@ -1582,43 +1861,69 @@ interface IRendererTheme {
|
|
|
1582
1861
|
}
|
|
1583
1862
|
|
|
1584
1863
|
/**
|
|
1585
|
-
*
|
|
1864
|
+
* Outline source meaning:
|
|
1865
|
+
* - svg: bound to the background svg
|
|
1866
|
+
* - fallback: fallback outline generated from seats
|
|
1867
|
+
* - shape: editor-made basic shapes
|
|
1868
|
+
* - auto: editor-generated outline
|
|
1586
1869
|
*/
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
transform?: string;
|
|
1870
|
+
type OutlineSource = 'svg' | 'shape' | 'auto' | 'fallback';
|
|
1871
|
+
interface OutlineStates {
|
|
1872
|
+
highlighted?: boolean;
|
|
1873
|
+
selected?: boolean;
|
|
1874
|
+
unavailable?: boolean;
|
|
1875
|
+
filtered?: boolean;
|
|
1594
1876
|
}
|
|
1877
|
+
|
|
1595
1878
|
/**
|
|
1596
1879
|
* @hidden
|
|
1597
1880
|
*/
|
|
1598
1881
|
declare class OutlineLayer {
|
|
1599
1882
|
svgElement: SVGSVGElement;
|
|
1600
|
-
private outlineShapes;
|
|
1601
1883
|
private outlineRect;
|
|
1602
1884
|
private context;
|
|
1603
|
-
private rowsOverlayElement?;
|
|
1604
1885
|
private originalSvg;
|
|
1605
1886
|
private backgroundSVG;
|
|
1606
1887
|
private hasBackgroundOutline;
|
|
1607
1888
|
private underlayBindedPathAttr;
|
|
1608
|
-
private
|
|
1889
|
+
private outlineElementCache;
|
|
1890
|
+
private stateManager;
|
|
1891
|
+
private svgManipulator;
|
|
1892
|
+
private outlineRenderer;
|
|
1893
|
+
private transformManager;
|
|
1894
|
+
private rowsManager;
|
|
1895
|
+
setStateChangeCallback(callback: (sectionId: number) => void): void;
|
|
1896
|
+
private initializeHoverHandlers;
|
|
1609
1897
|
constructor(context: Context);
|
|
1610
1898
|
destroy(): void;
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
highlightSection(id
|
|
1615
|
-
|
|
1899
|
+
applyOutlineAttributes(element: Element, source: OutlineSource, section: ISector): void;
|
|
1900
|
+
setOutlineStates(id: number | undefined, states: OutlineStates | null): void;
|
|
1901
|
+
getOutlineStates(id: number): IEntityStates | undefined;
|
|
1902
|
+
highlightSection(id?: number, clear?: boolean): void;
|
|
1903
|
+
selectSection(id?: number): void;
|
|
1904
|
+
unselectSection(id?: number): void;
|
|
1905
|
+
disableSection(id?: number): void;
|
|
1906
|
+
enableSection(id?: number): void;
|
|
1907
|
+
clearSectionHighlight(id?: number): void;
|
|
1908
|
+
filterSection(id?: number): void;
|
|
1909
|
+
unfilterSection(id?: number): void;
|
|
1910
|
+
private warnDeprecated;
|
|
1911
|
+
/** @deprecated Use selectSection() instead */
|
|
1912
|
+
setSectionSelection(id?: number): void;
|
|
1913
|
+
/** @deprecated Use highlightSection() instead */
|
|
1914
|
+
highlightGa(id?: number): void;
|
|
1915
|
+
/** @deprecated Use highlightSection() instead */
|
|
1916
|
+
focusSection(id?: number): void;
|
|
1917
|
+
/** @deprecated Use clearSectionHighlight() instead */
|
|
1616
1918
|
clearSectionFocus(): void;
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
private addClassName;
|
|
1919
|
+
/** @deprecated Use highlightSection() for programmatic hover or rely on native :hover */
|
|
1920
|
+
highlightAllSections(): void;
|
|
1620
1921
|
getSectionRect(id: Nullable<number>): Nullable<DOMRect>;
|
|
1621
|
-
|
|
1922
|
+
private checkCenterInViewBox;
|
|
1923
|
+
private getElementScreenRectInSvg;
|
|
1924
|
+
getSectionElement(id: number | undefined): Element | null;
|
|
1925
|
+
getSectionElements(id: number | undefined): Element[];
|
|
1926
|
+
getSectionCenter(id: Nullable<number>): Nullable<IPoint>;
|
|
1622
1927
|
get width(): number;
|
|
1623
1928
|
get height(): number;
|
|
1624
1929
|
updateSize(): void;
|
|
@@ -1642,15 +1947,15 @@ declare class OutlineLayer {
|
|
|
1642
1947
|
private extractSVGBackgroundOutlines;
|
|
1643
1948
|
cleanSvgInlineStyles(stylesToRemove?: string[]): void;
|
|
1644
1949
|
updateOutlines(): void;
|
|
1645
|
-
private
|
|
1950
|
+
private appendFallbackAndUnderlayOutlines;
|
|
1951
|
+
private getExcludedSectionIds;
|
|
1646
1952
|
private createOrGetOutlineShapes;
|
|
1647
|
-
private
|
|
1648
|
-
private
|
|
1953
|
+
private appendFallbackOutlines;
|
|
1954
|
+
private appendShapeOutlines;
|
|
1649
1955
|
private getOutlineRects;
|
|
1650
|
-
|
|
1651
|
-
|
|
1956
|
+
createFallbackOutlineRect(section: ISector): SVGRectElement;
|
|
1957
|
+
private getRenderContext;
|
|
1652
1958
|
handleChangeEagleView(isEagleView?: boolean): void;
|
|
1653
|
-
createGaInfo: (gaGroups: SVGGElement[]) => IGaInfo[];
|
|
1654
1959
|
disableSvgSectionById: (id: number) => void;
|
|
1655
1960
|
enableSvgSectionById: (id: number) => void;
|
|
1656
1961
|
filterSvgSectionById: (id: number) => void;
|
|
@@ -1660,20 +1965,8 @@ declare class OutlineLayer {
|
|
|
1660
1965
|
hide(): void;
|
|
1661
1966
|
show(): void;
|
|
1662
1967
|
private getContextSvg;
|
|
1663
|
-
/**
|
|
1664
|
-
* Force update the outline layer with current 3D transforms
|
|
1665
|
-
* Similar to forceRedraw in WebGL layer
|
|
1666
|
-
*/
|
|
1667
1968
|
forceUpdate(): void;
|
|
1668
|
-
/**
|
|
1669
|
-
* Applies 3D transforms to the SVG outline layer
|
|
1670
|
-
* Implements the same rotation logic as the WebGL shaders
|
|
1671
|
-
*/
|
|
1672
1969
|
private apply3DTransforms;
|
|
1673
|
-
/**
|
|
1674
|
-
* Appends rows overlay (SVG fragment) into the outline SVG container.
|
|
1675
|
-
* If an overlay already exists, it will be replaced.
|
|
1676
|
-
*/
|
|
1677
1970
|
appendRowsOverlay(rowsFragment: string, css?: string): void;
|
|
1678
1971
|
}
|
|
1679
1972
|
|
|
@@ -1977,6 +2270,11 @@ interface IRenderer {
|
|
|
1977
2270
|
* @param position - The position to set ('top-left', 'top-right', 'bottom-left', 'bottom-right')
|
|
1978
2271
|
*/
|
|
1979
2272
|
setMinimapPosition?: (position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right') => void;
|
|
2273
|
+
addMarker: (marker: IMarker) => void;
|
|
2274
|
+
removeMarker: (markerId: string) => void;
|
|
2275
|
+
clearMarkers: () => void;
|
|
2276
|
+
getMarkers: () => IMarker[];
|
|
2277
|
+
getResolvedMarkers: () => IResolvedMarker[];
|
|
1980
2278
|
}
|
|
1981
2279
|
interface IRenderer {
|
|
1982
2280
|
/**
|
|
@@ -1993,6 +2291,69 @@ interface IRenderer {
|
|
|
1993
2291
|
}) => void;
|
|
1994
2292
|
}
|
|
1995
2293
|
|
|
2294
|
+
type DataManagerEvent = 'sectionsChanged' | 'seatsChanged' | 'dataInvalidated' | 'dataLoaded';
|
|
2295
|
+
type DataManagerEventCallback = (entityId?: number) => void;
|
|
2296
|
+
/**
|
|
2297
|
+
* Data Manager - Read-only access to cached entity metadata
|
|
2298
|
+
* Aggregates data from various renderer layers without DOM access
|
|
2299
|
+
*/
|
|
2300
|
+
declare class DataManager {
|
|
2301
|
+
private context;
|
|
2302
|
+
private outlineLayer;
|
|
2303
|
+
private sectionMetadataCache;
|
|
2304
|
+
private seatMetadataCache;
|
|
2305
|
+
private dirtySections;
|
|
2306
|
+
private dirtySeats;
|
|
2307
|
+
private allSectionsDirty;
|
|
2308
|
+
private allSeatsDirty;
|
|
2309
|
+
private eventCallbacks;
|
|
2310
|
+
constructor(context: Context);
|
|
2311
|
+
setOutlineLayer(outlineLayer: OutlineLayer): void;
|
|
2312
|
+
on(event: DataManagerEvent, callback: DataManagerEventCallback): void;
|
|
2313
|
+
off(event: DataManagerEvent, callback: DataManagerEventCallback): void;
|
|
2314
|
+
private emit;
|
|
2315
|
+
getSectionMetadata(sectionId: number): ISectionMetadata | null;
|
|
2316
|
+
getAllSectionMetadata(): ISectionMetadata[];
|
|
2317
|
+
getSectionOutlineElements(sectionId: number): Element[];
|
|
2318
|
+
private rebuildSection;
|
|
2319
|
+
private rebuildAllSections;
|
|
2320
|
+
getSeatMetadata(seatId: number): ISeatMetadata | null;
|
|
2321
|
+
getAllSeatMetadata(sectionId?: number): ISeatMetadata[];
|
|
2322
|
+
private rebuildSeat;
|
|
2323
|
+
private rebuildAllSeats;
|
|
2324
|
+
invalidateSection(sectionId: number): void;
|
|
2325
|
+
invalidateSections(): void;
|
|
2326
|
+
invalidateSeat(seatId: number): void;
|
|
2327
|
+
invalidateSeats(): void;
|
|
2328
|
+
invalidateAll(): void;
|
|
2329
|
+
notifyDataLoaded(): void;
|
|
2330
|
+
refresh(): void;
|
|
2331
|
+
destroy(): void;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
type StateManagerEvent = 'sectionStateChanged' | 'seatStateChanged';
|
|
2335
|
+
type StateManagerEventCallback = (entityId: number) => void;
|
|
2336
|
+
/**
|
|
2337
|
+
* State Manager - Handles mutations of visual/interaction states
|
|
2338
|
+
* Manages state changes and emits events
|
|
2339
|
+
*/
|
|
2340
|
+
declare class StateManager {
|
|
2341
|
+
private outlineLayer;
|
|
2342
|
+
private eventCallbacks;
|
|
2343
|
+
constructor();
|
|
2344
|
+
setOutlineLayer(outlineLayer: OutlineLayer): void;
|
|
2345
|
+
notifySectionStateChanged(sectionId: number): void;
|
|
2346
|
+
on(event: StateManagerEvent, callback: StateManagerEventCallback): void;
|
|
2347
|
+
off(event: StateManagerEvent, callback: StateManagerEventCallback): void;
|
|
2348
|
+
private emit;
|
|
2349
|
+
updateSectionState(sectionId: number, states: Partial<IEntityStates>): void;
|
|
2350
|
+
toggleSectionState(sectionId: number, stateType: keyof IEntityStates): boolean;
|
|
2351
|
+
getSectionStates(sectionId: number): IEntityStates | null;
|
|
2352
|
+
clearSectionStates(sectionId: number): void;
|
|
2353
|
+
clearAllHighlights(): void;
|
|
2354
|
+
destroy(): void;
|
|
2355
|
+
}
|
|
2356
|
+
|
|
1996
2357
|
/**
|
|
1997
2358
|
* Base Renderer class that implements the IRenderer interface.
|
|
1998
2359
|
* Provides core functionality for rendering and interacting with a venue map.
|
|
@@ -2007,13 +2368,20 @@ declare class Renderer implements IRenderer {
|
|
|
2007
2368
|
protected stageLayer: IStageLayer;
|
|
2008
2369
|
private selectionLayer;
|
|
2009
2370
|
protected outlineLayer: OutlineLayer;
|
|
2371
|
+
private outlineLayerForMarkers?;
|
|
2010
2372
|
private minimapLayer?;
|
|
2011
2373
|
private loaderLayer?;
|
|
2374
|
+
private markerLayer;
|
|
2375
|
+
private markerManager;
|
|
2376
|
+
private markerUnsubscribe?;
|
|
2377
|
+
private dataManager;
|
|
2378
|
+
private stateManager;
|
|
2012
2379
|
private service;
|
|
2013
2380
|
private zoomToFitScale;
|
|
2014
2381
|
private isTouchMode;
|
|
2015
2382
|
private pinchStartPoint?;
|
|
2016
2383
|
private resizeTimer;
|
|
2384
|
+
private resizeObserver?;
|
|
2017
2385
|
protected isRunning: boolean;
|
|
2018
2386
|
private disableZoomToEmptySpace;
|
|
2019
2387
|
private switchToWebGL;
|
|
@@ -2035,6 +2403,7 @@ declare class Renderer implements IRenderer {
|
|
|
2035
2403
|
* This includes removing event listeners, canceling animations, and destroying canvas layers.
|
|
2036
2404
|
*/
|
|
2037
2405
|
destroy(): void;
|
|
2406
|
+
private syncMarkers;
|
|
2038
2407
|
/**
|
|
2039
2408
|
* Gets the width of the renderer.
|
|
2040
2409
|
*
|
|
@@ -2053,6 +2422,44 @@ declare class Renderer implements IRenderer {
|
|
|
2053
2422
|
* @returns The version string
|
|
2054
2423
|
*/
|
|
2055
2424
|
getVersion(): string;
|
|
2425
|
+
/**
|
|
2426
|
+
* Get the data manager for read-only access to entity metadata
|
|
2427
|
+
* Use this to query section/seat data without DOM access
|
|
2428
|
+
*
|
|
2429
|
+
* @example
|
|
2430
|
+
* ```typescript
|
|
2431
|
+
* // Get all sections (after data is loaded)
|
|
2432
|
+
* const sections = renderer.getDataManager().getAllSectionMetadata();
|
|
2433
|
+
*
|
|
2434
|
+
* // Wait for data to be loaded
|
|
2435
|
+
* renderer.getDataManager().on('dataLoaded', () => {
|
|
2436
|
+
* const sections = renderer.getDataManager().getAllSectionMetadata();
|
|
2437
|
+
* console.log('Data loaded:', sections);
|
|
2438
|
+
* });
|
|
2439
|
+
*
|
|
2440
|
+
* // Subscribe to data changes
|
|
2441
|
+
* renderer.getDataManager().on('sectionsChanged', () => {
|
|
2442
|
+
* console.log('Sections data updated');
|
|
2443
|
+
* });
|
|
2444
|
+
* ```
|
|
2445
|
+
*/
|
|
2446
|
+
getDataManager(): DataManager;
|
|
2447
|
+
/**
|
|
2448
|
+
* Get the state manager for manipulating visual states
|
|
2449
|
+
* Use this to change highlight/selection/availability states
|
|
2450
|
+
*
|
|
2451
|
+
* @example
|
|
2452
|
+
* ```typescript
|
|
2453
|
+
* // Toggle section highlight
|
|
2454
|
+
* renderer.getStateManager().toggleSectionState(sectionId, 'highlighted');
|
|
2455
|
+
*
|
|
2456
|
+
* // Subscribe to state changes
|
|
2457
|
+
* renderer.getStateManager().on('sectionStateChanged', (sectionId) => {
|
|
2458
|
+
* console.log('Section state changed:', sectionId);
|
|
2459
|
+
* });
|
|
2460
|
+
* ```
|
|
2461
|
+
*/
|
|
2462
|
+
getStateManager(): StateManager;
|
|
2056
2463
|
protected showLoader(): void;
|
|
2057
2464
|
protected updateLoaderProgress(phase: LoadingPhase, phaseProgress?: number): void;
|
|
2058
2465
|
protected completeLoader(): void;
|
|
@@ -2184,8 +2591,14 @@ declare class Renderer implements IRenderer {
|
|
|
2184
2591
|
* @returns Returns selected seats and GA ticket count
|
|
2185
2592
|
*/
|
|
2186
2593
|
getCart(): ICart;
|
|
2594
|
+
addMarker(marker: IMarker): void;
|
|
2595
|
+
removeMarker(markerId: string): void;
|
|
2596
|
+
clearMarkers(): void;
|
|
2597
|
+
getMarkers(): IMarker[];
|
|
2598
|
+
getResolvedMarkers(): IResolvedMarker[];
|
|
2187
2599
|
private emitSrcEvent;
|
|
2188
2600
|
private addHandlers;
|
|
2601
|
+
private initializeResizeObserver;
|
|
2189
2602
|
protected setSchemaData(schema: ISchemaDTO): Promise<void>;
|
|
2190
2603
|
/**
|
|
2191
2604
|
* Sets external prices to seats
|
|
@@ -2412,7 +2825,23 @@ declare class Renderer implements IRenderer {
|
|
|
2412
2825
|
private getGaSectionByOutline;
|
|
2413
2826
|
private getSectionByOutline;
|
|
2414
2827
|
private getSectorRectByOutline;
|
|
2828
|
+
/**
|
|
2829
|
+
* Handles pan-zoom destination events from the state machine.
|
|
2830
|
+
* Applies the configured interaction zoom strategy when clicking in eagle eye view.
|
|
2831
|
+
*
|
|
2832
|
+
* @param event - The pan-zoom destination event containing scale, origin, section, and strategy
|
|
2833
|
+
* @private
|
|
2834
|
+
*/
|
|
2415
2835
|
private handleDestPanZoom;
|
|
2836
|
+
/**
|
|
2837
|
+
* Attempts to apply a single zoom strategy.
|
|
2838
|
+
*
|
|
2839
|
+
* @param strategy - The strategy to attempt ('default', 'section', or 'next-scale')
|
|
2840
|
+
* @param event - The pan-zoom event containing context for the zoom operation
|
|
2841
|
+
* @returns true if the strategy was successfully applied, false if it cannot be applied
|
|
2842
|
+
* @private
|
|
2843
|
+
*/
|
|
2844
|
+
private tryZoomStrategy;
|
|
2416
2845
|
private handleDestSeatSelect;
|
|
2417
2846
|
private findNearestSeatGroup;
|
|
2418
2847
|
private handleDestSeatCartSwitch;
|
|
@@ -2446,8 +2875,12 @@ declare class Renderer implements IRenderer {
|
|
|
2446
2875
|
clearSectorHighlight(): void;
|
|
2447
2876
|
highlightSector(id: number | undefined): void;
|
|
2448
2877
|
private startPanAnimation;
|
|
2878
|
+
private calculateAdaptiveFitScale;
|
|
2879
|
+
private getSectionZoomTarget;
|
|
2449
2880
|
zoomToSection(section: string | number, options?: {
|
|
2450
2881
|
focus?: boolean;
|
|
2882
|
+
mode?: 'fit' | 'scale';
|
|
2883
|
+
scale?: number;
|
|
2451
2884
|
}): void;
|
|
2452
2885
|
zoomToDestination(newScale: number, destination: IPoint, duration?: number): void;
|
|
2453
2886
|
/**
|
|
@@ -2588,7 +3021,7 @@ interface IAdminRendererSettings extends IRendererSettings {
|
|
|
2588
3021
|
* Extends the base Renderer with admin-specific functionality.
|
|
2589
3022
|
*/
|
|
2590
3023
|
declare class SeatmapAdminRenderer extends Renderer {
|
|
2591
|
-
static readonly VERSION = "1.
|
|
3024
|
+
static readonly VERSION = "1.58.6";
|
|
2592
3025
|
protected apiClient: BookingApiClient;
|
|
2593
3026
|
/**
|
|
2594
3027
|
* Creates a new instance of the AdminRenderer.
|
|
@@ -2742,7 +3175,7 @@ interface IBookingRendererSettings extends IRendererSettings {
|
|
|
2742
3175
|
* Extends the base Renderer with booking-specific functionality.
|
|
2743
3176
|
*/
|
|
2744
3177
|
declare class SeatmapBookingRenderer extends Renderer {
|
|
2745
|
-
static readonly VERSION = "1.
|
|
3178
|
+
static readonly VERSION = "1.58.6";
|
|
2746
3179
|
private apiClient;
|
|
2747
3180
|
private stats;
|
|
2748
3181
|
private tags?;
|
|
@@ -2830,7 +3263,7 @@ declare class SeatmapBookingRenderer extends Renderer {
|
|
|
2830
3263
|
* Package version information
|
|
2831
3264
|
* This file is automatically updated during the build process
|
|
2832
3265
|
*/
|
|
2833
|
-
declare const VERSION = "1.
|
|
3266
|
+
declare const VERSION = "1.58.6";
|
|
2834
3267
|
|
|
2835
3268
|
declare const defaultZoomSettings: IZoomSettings;
|
|
2836
3269
|
declare const mergeSettings: (defaults: IRendererSettings, settings?: Partial<IRendererSettings>) => IRendererSettings & Partial<IRendererSettings>;
|
|
@@ -2873,4 +3306,4 @@ declare class RotationAnimation {
|
|
|
2873
3306
|
getAnimation(): IRotationAnimation | null;
|
|
2874
3307
|
}
|
|
2875
3308
|
|
|
2876
|
-
export { BookingApiClient, type ById, type ColorById, type ColorSequenceSettings, 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 IExtendedSeat, type ILoadProgressEvent, type ILoaderSettings, type ILoaderTheme, 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 IRowDTO, type ISVGBackgroundDTO, type ISchemaDTO, type ISeat, type ISeatCartSwitchDestEvent, type ISeatDTO, type ISeatMouseEnterDestEvent, type ISeatMouseLeaveDestEvent, type ISeatPriceScheme, type ISeatSelectDestEvent, type ISeatStyle, type ISection, type ISectionClickDestEvent, type ISectionMouseEnterDestEvent, type ISectionMouseLeaveDestEvent, type ISectionRect, type ISectionWithCoords, type ISector, type ISectorDTO, type ISpecialPrice, type ISpecialState, type ISvgSectionStyle, type IVenueDTO, type IVisibilitySettings, type IZoomSettings, type LoaderStyle, type LoadingPhase, 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, type TransformArray, VERSION, convertPricesToColored, convertPricesToColoredById, defaultZoomSettings, mergeSettings, sortPrices };
|
|
3309
|
+
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 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 };
|