@seatlayer/core 0.30.1 → 0.32.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/dist/{chunk-FGS67GT3.js → chunk-MGC5BVAD.js} +156 -33
- package/dist/chunk-MGC5BVAD.js.map +1 -0
- package/dist/index.cjs +209 -44
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -5
- package/dist/index.d.ts +28 -5
- package/dist/index.js +61 -13
- package/dist/index.js.map +1 -1
- package/dist/{types-CG2pEDoI.d.cts → types-DO_J5DtX.d.cts} +27 -1
- package/dist/{types-CG2pEDoI.d.ts → types-DO_J5DtX.d.ts} +27 -1
- package/dist/view3d/index.cjs +1484 -404
- package/dist/view3d/index.cjs.map +1 -1
- package/dist/view3d/index.d.cts +53 -2
- package/dist/view3d/index.d.ts +53 -2
- package/dist/view3d/index.js +1487 -413
- package/dist/view3d/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-FGS67GT3.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AccessibilityType, S as SeatOverride, R as RowObject, L as LabelStyle, a as RectTableSide, C as ChartDoc, b as ChartObject, B as BoothObject, E as ExpandedSeat, T as TableObject, F as Floor, P as Point, c as SectionObject, d as RectTableSeatCounts, G as GAAreaObject, e as GAInventorySegment, f as RendererQualityEvidence, g as RenderedFreeTextEvidence, I as ISeatmapRenderer, h as RendererOptions, i as SeatStatus, j as RendererViewMode, k as LodRung, l as CategoryTier, m as SeatCommercialAttributes, n as RendererCallbacks } from './types-
|
|
2
|
-
export { o as ACCESSIBILITY_RING_COLOR, p as ACCESSIBILITY_TYPES, q as AccessibilityMeta, r as CHART_STORAGE_KEY, s as Category, t as ChartReferenceImage, u as ChartTheme, v as CubicPath, D as DecorImageObject, w as LABEL_STYLE_MAX_SIZE, x as LABEL_STYLE_MIN_SIZE, y as LabelPresentation, z as ReferenceAccessibilitySource, H as ReferenceCalibration, J as ReferenceCategorySource, K as ReferenceDerivedScale, M as ReferenceInventoryExclusionSource, N as ReferenceInventorySource, O as ReferenceScanProposal, Q as ReferenceScanRowProposal, U as ReferenceScanSectionProposal, V as ReferenceSeatSeed, W as ReferenceSectionTraceBatchInput, X as ReferenceSectionTraceBatchProposal, Y as ReferenceSectionTraceInput, Z as ReferenceSectionTraceProposal, _ as RenderedBookableLabelEvidence, $ as RenderedGAAreaEvidence, a0 as RenderedHierarchyLabelEvidence, a1 as RenderedLabelHiddenReason, a2 as
|
|
1
|
+
import { A as AccessibilityType, S as SeatOverride, R as RowObject, L as LabelStyle, a as RectTableSide, C as ChartDoc, b as ChartObject, B as BoothObject, E as ExpandedSeat, T as TableObject, F as Floor, P as Point, c as SectionObject, d as RectTableSeatCounts, G as GAAreaObject, e as GAInventorySegment, f as RendererQualityEvidence, g as RenderedFreeTextEvidence, I as ISeatmapRenderer, h as RendererOptions, i as SeatStatus, j as RendererViewMode, k as LodRung, l as CategoryTier, m as SeatCommercialAttributes, n as RendererCallbacks } from './types-DO_J5DtX.cjs';
|
|
2
|
+
export { o as ACCESSIBILITY_RING_COLOR, p as ACCESSIBILITY_TYPES, q as AccessibilityMeta, r as CHART_STORAGE_KEY, s as Category, t as ChartReferenceImage, u as ChartTheme, v as CubicPath, D as DecorImageObject, w as LABEL_STYLE_MAX_SIZE, x as LABEL_STYLE_MIN_SIZE, y as LabelPresentation, z as ReferenceAccessibilitySource, H as ReferenceCalibration, J as ReferenceCategorySource, K as ReferenceDerivedScale, M as ReferenceInventoryExclusionSource, N as ReferenceInventorySource, O as ReferenceScanProposal, Q as ReferenceScanRowProposal, U as ReferenceScanSectionProposal, V as ReferenceSeatSeed, W as ReferenceSectionTraceBatchInput, X as ReferenceSectionTraceBatchProposal, Y as ReferenceSectionTraceInput, Z as ReferenceSectionTraceProposal, _ as RenderedBookableLabelEvidence, $ as RenderedGAAreaEvidence, a0 as RenderedHierarchyLabelEvidence, a1 as RenderedLabelHiddenReason, a2 as SEAT_COMMERCIAL_MARKS, a3 as SURROUNDINGS_SHAPE_ROLES, a4 as SeatCommercialMark, a5 as SeatCommercialMeta, a6 as SectionOutlinePath, a7 as SectionPathSegment, a8 as SelectionLayer, a9 as ShapeLineCap, aa as ShapeLineEnding, ab as ShapeLineJoin, ac as ShapeObject, ad as TextObject, ae as ZoneDef, af as accessibilityMeta, ag as accessibilityRingColor, ah as layerOf, ai as seatCommercialMeta } from './types-DO_J5DtX.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Pure geometry helpers — no Konva, no DOM. Turns the parametric chart
|
|
@@ -84,7 +84,22 @@ declare function expandBooth(b: BoothObject): ExpandedSeat[];
|
|
|
84
84
|
/** Ray-cast point-in-polygon test — odd crossings ⇒ inside. */
|
|
85
85
|
declare function pointInPolygon(p: Point, poly: Point[]): boolean;
|
|
86
86
|
declare function pointInPolygonWithHoles(p: Point, outer: Point[], holes: Point[][] | undefined): boolean;
|
|
87
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Stable interior label anchor: the centre of the largest circle that fits in
|
|
89
|
+
* the polygon (holes excluded).
|
|
90
|
+
*
|
|
91
|
+
* This used to return the average-of-vertices centroid whenever that happened
|
|
92
|
+
* to be inside, and only fell back to a coarse 24×24 grid search when it was
|
|
93
|
+
* not. "Inside" is a much weaker property than "has room": on a traced arena
|
|
94
|
+
* the outer arc of a wedge carries dozens of sampled vertices and the radial
|
|
95
|
+
* edges carry two, so the average is dragged onto the arc and the label pill —
|
|
96
|
+
* far wider than a point — straddled the boundary into the next section.
|
|
97
|
+
* Measured on the 36-section traced arena corpus, 15 of 36 anchors had under
|
|
98
|
+
* 75% of the clearance actually available, some as little as 43%.
|
|
99
|
+
*
|
|
100
|
+
* `polygonInscribedAnchor` is deterministic and coordinate-free, so callers may
|
|
101
|
+
* memoize it on geometry alone.
|
|
102
|
+
*/
|
|
88
103
|
declare function polygonLabelPoint(outer: Point[], holes: Point[][] | undefined): Point;
|
|
89
104
|
/**
|
|
90
105
|
* Visual centre of any object — used for spatial section membership and for
|
|
@@ -957,8 +972,16 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
957
972
|
/** One semantic section gets one overview label, even across split contours. */
|
|
958
973
|
private dedupeLogicalSectionLabels;
|
|
959
974
|
/**
|
|
960
|
-
* Keep transitional zone pills from covering section names
|
|
961
|
-
*
|
|
975
|
+
* Keep transitional zone pills from covering section names, and keep section
|
|
976
|
+
* names off each other.
|
|
977
|
+
*
|
|
978
|
+
* This used to assume section labels "do not collide by construction",
|
|
979
|
+
* because each is proven to fit inside its own shell. That holds only while
|
|
980
|
+
* shells are disjoint. Hand-traced and imported plans routinely produce
|
|
981
|
+
* shells that touch or overlap slightly along a shared edge, and a label
|
|
982
|
+
* fitted into one can then land under its neighbour's — which is exactly the
|
|
983
|
+
* unreadable smear a 36-section arena showed. Section labels now block each
|
|
984
|
+
* other too, largest shell first so the big stands keep their names.
|
|
962
985
|
*/
|
|
963
986
|
private decollideRungLabels;
|
|
964
987
|
/** Set a centred label's world fontSize (for a target screen px) and re-anchor it. */
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AccessibilityType, S as SeatOverride, R as RowObject, L as LabelStyle, a as RectTableSide, C as ChartDoc, b as ChartObject, B as BoothObject, E as ExpandedSeat, T as TableObject, F as Floor, P as Point, c as SectionObject, d as RectTableSeatCounts, G as GAAreaObject, e as GAInventorySegment, f as RendererQualityEvidence, g as RenderedFreeTextEvidence, I as ISeatmapRenderer, h as RendererOptions, i as SeatStatus, j as RendererViewMode, k as LodRung, l as CategoryTier, m as SeatCommercialAttributes, n as RendererCallbacks } from './types-
|
|
2
|
-
export { o as ACCESSIBILITY_RING_COLOR, p as ACCESSIBILITY_TYPES, q as AccessibilityMeta, r as CHART_STORAGE_KEY, s as Category, t as ChartReferenceImage, u as ChartTheme, v as CubicPath, D as DecorImageObject, w as LABEL_STYLE_MAX_SIZE, x as LABEL_STYLE_MIN_SIZE, y as LabelPresentation, z as ReferenceAccessibilitySource, H as ReferenceCalibration, J as ReferenceCategorySource, K as ReferenceDerivedScale, M as ReferenceInventoryExclusionSource, N as ReferenceInventorySource, O as ReferenceScanProposal, Q as ReferenceScanRowProposal, U as ReferenceScanSectionProposal, V as ReferenceSeatSeed, W as ReferenceSectionTraceBatchInput, X as ReferenceSectionTraceBatchProposal, Y as ReferenceSectionTraceInput, Z as ReferenceSectionTraceProposal, _ as RenderedBookableLabelEvidence, $ as RenderedGAAreaEvidence, a0 as RenderedHierarchyLabelEvidence, a1 as RenderedLabelHiddenReason, a2 as
|
|
1
|
+
import { A as AccessibilityType, S as SeatOverride, R as RowObject, L as LabelStyle, a as RectTableSide, C as ChartDoc, b as ChartObject, B as BoothObject, E as ExpandedSeat, T as TableObject, F as Floor, P as Point, c as SectionObject, d as RectTableSeatCounts, G as GAAreaObject, e as GAInventorySegment, f as RendererQualityEvidence, g as RenderedFreeTextEvidence, I as ISeatmapRenderer, h as RendererOptions, i as SeatStatus, j as RendererViewMode, k as LodRung, l as CategoryTier, m as SeatCommercialAttributes, n as RendererCallbacks } from './types-DO_J5DtX.js';
|
|
2
|
+
export { o as ACCESSIBILITY_RING_COLOR, p as ACCESSIBILITY_TYPES, q as AccessibilityMeta, r as CHART_STORAGE_KEY, s as Category, t as ChartReferenceImage, u as ChartTheme, v as CubicPath, D as DecorImageObject, w as LABEL_STYLE_MAX_SIZE, x as LABEL_STYLE_MIN_SIZE, y as LabelPresentation, z as ReferenceAccessibilitySource, H as ReferenceCalibration, J as ReferenceCategorySource, K as ReferenceDerivedScale, M as ReferenceInventoryExclusionSource, N as ReferenceInventorySource, O as ReferenceScanProposal, Q as ReferenceScanRowProposal, U as ReferenceScanSectionProposal, V as ReferenceSeatSeed, W as ReferenceSectionTraceBatchInput, X as ReferenceSectionTraceBatchProposal, Y as ReferenceSectionTraceInput, Z as ReferenceSectionTraceProposal, _ as RenderedBookableLabelEvidence, $ as RenderedGAAreaEvidence, a0 as RenderedHierarchyLabelEvidence, a1 as RenderedLabelHiddenReason, a2 as SEAT_COMMERCIAL_MARKS, a3 as SURROUNDINGS_SHAPE_ROLES, a4 as SeatCommercialMark, a5 as SeatCommercialMeta, a6 as SectionOutlinePath, a7 as SectionPathSegment, a8 as SelectionLayer, a9 as ShapeLineCap, aa as ShapeLineEnding, ab as ShapeLineJoin, ac as ShapeObject, ad as TextObject, ae as ZoneDef, af as accessibilityMeta, ag as accessibilityRingColor, ah as layerOf, ai as seatCommercialMeta } from './types-DO_J5DtX.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Pure geometry helpers — no Konva, no DOM. Turns the parametric chart
|
|
@@ -84,7 +84,22 @@ declare function expandBooth(b: BoothObject): ExpandedSeat[];
|
|
|
84
84
|
/** Ray-cast point-in-polygon test — odd crossings ⇒ inside. */
|
|
85
85
|
declare function pointInPolygon(p: Point, poly: Point[]): boolean;
|
|
86
86
|
declare function pointInPolygonWithHoles(p: Point, outer: Point[], holes: Point[][] | undefined): boolean;
|
|
87
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Stable interior label anchor: the centre of the largest circle that fits in
|
|
89
|
+
* the polygon (holes excluded).
|
|
90
|
+
*
|
|
91
|
+
* This used to return the average-of-vertices centroid whenever that happened
|
|
92
|
+
* to be inside, and only fell back to a coarse 24×24 grid search when it was
|
|
93
|
+
* not. "Inside" is a much weaker property than "has room": on a traced arena
|
|
94
|
+
* the outer arc of a wedge carries dozens of sampled vertices and the radial
|
|
95
|
+
* edges carry two, so the average is dragged onto the arc and the label pill —
|
|
96
|
+
* far wider than a point — straddled the boundary into the next section.
|
|
97
|
+
* Measured on the 36-section traced arena corpus, 15 of 36 anchors had under
|
|
98
|
+
* 75% of the clearance actually available, some as little as 43%.
|
|
99
|
+
*
|
|
100
|
+
* `polygonInscribedAnchor` is deterministic and coordinate-free, so callers may
|
|
101
|
+
* memoize it on geometry alone.
|
|
102
|
+
*/
|
|
88
103
|
declare function polygonLabelPoint(outer: Point[], holes: Point[][] | undefined): Point;
|
|
89
104
|
/**
|
|
90
105
|
* Visual centre of any object — used for spatial section membership and for
|
|
@@ -957,8 +972,16 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
957
972
|
/** One semantic section gets one overview label, even across split contours. */
|
|
958
973
|
private dedupeLogicalSectionLabels;
|
|
959
974
|
/**
|
|
960
|
-
* Keep transitional zone pills from covering section names
|
|
961
|
-
*
|
|
975
|
+
* Keep transitional zone pills from covering section names, and keep section
|
|
976
|
+
* names off each other.
|
|
977
|
+
*
|
|
978
|
+
* This used to assume section labels "do not collide by construction",
|
|
979
|
+
* because each is proven to fit inside its own shell. That holds only while
|
|
980
|
+
* shells are disjoint. Hand-traced and imported plans routinely produce
|
|
981
|
+
* shells that touch or overlap slightly along a shared edge, and a label
|
|
982
|
+
* fitted into one can then land under its neighbour's — which is exactly the
|
|
983
|
+
* unreadable smear a 36-section arena showed. Section labels now block each
|
|
984
|
+
* other too, largest shell first so the big stands keep their names.
|
|
962
985
|
*/
|
|
963
986
|
private decollideRungLabels;
|
|
964
987
|
/** Set a centred label's world fontSize (for a target screen px) and re-anchor it. */
|
package/dist/index.js
CHANGED
|
@@ -7,12 +7,14 @@ import {
|
|
|
7
7
|
LABEL_STYLE_MIN_SIZE,
|
|
8
8
|
METRES_PER_CHART_UNIT,
|
|
9
9
|
SEATED_EYE_HEIGHT_M,
|
|
10
|
+
SEAT_COMMERCIAL_MARKS,
|
|
10
11
|
SURROUNDINGS_SHAPE_ROLES,
|
|
11
12
|
TIER_HEIGHT_M,
|
|
12
13
|
accessibilityMeta,
|
|
13
14
|
accessibilityRingColor,
|
|
14
15
|
allObjects,
|
|
15
16
|
chartBounds,
|
|
17
|
+
distanceToRings,
|
|
16
18
|
expandBooth,
|
|
17
19
|
expandChart,
|
|
18
20
|
expandRow,
|
|
@@ -27,15 +29,17 @@ import {
|
|
|
27
29
|
pointInPolygon,
|
|
28
30
|
pointInPolygonWithHoles,
|
|
29
31
|
polygonLabelPoint,
|
|
32
|
+
polygonNetArea,
|
|
30
33
|
rowInventoryCount,
|
|
31
34
|
rowSeatPositions,
|
|
35
|
+
seatCommercialMeta,
|
|
32
36
|
seatLabelPart,
|
|
33
37
|
sectionElevationTier,
|
|
34
38
|
sectionGeometry,
|
|
35
39
|
stackFloors,
|
|
36
40
|
tableInventoryCount,
|
|
37
41
|
tableSeatCountsBySide
|
|
38
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-MGC5BVAD.js";
|
|
39
43
|
|
|
40
44
|
// src/core/ga.ts
|
|
41
45
|
var PREFIX = "__sl_ga__";
|
|
@@ -1389,7 +1393,7 @@ var ISO_SQUASH = 0.58;
|
|
|
1389
1393
|
var ISO_TWEEN_MS = 320;
|
|
1390
1394
|
var CAMERA_GLIDE_MS = 650;
|
|
1391
1395
|
var BLOCK_FILL_ALPHA = 1;
|
|
1392
|
-
var SECTION_STROKE_PX =
|
|
1396
|
+
var SECTION_STROKE_PX = 1;
|
|
1393
1397
|
var LIGHT_OVERVIEW_SECTION_FILL = "#e5e7eb";
|
|
1394
1398
|
var LIGHT_OVERVIEW_SECTION_STROKE = "#c7cbd1";
|
|
1395
1399
|
var LIGHT_OVERVIEW_SECTION_INK = "#595f69";
|
|
@@ -1402,6 +1406,7 @@ var DARK_OVERVIEW_FOCAL_FILL = "#374151";
|
|
|
1402
1406
|
var DARK_OVERVIEW_FOCAL_STROKE = "#64748b";
|
|
1403
1407
|
var SECTION_LABEL_PX = 20;
|
|
1404
1408
|
var MIN_SECTION_LABEL_PX = 12;
|
|
1409
|
+
var SECTION_LABEL_SHRINK_STEPS = [0.85, 0.72, 0.62];
|
|
1405
1410
|
var ZONE_LABEL_PX = 18;
|
|
1406
1411
|
var ZONE_SUB_PX = 12;
|
|
1407
1412
|
var HIERARCHY_PILL_BACKGROUND = "#111827";
|
|
@@ -1576,7 +1581,6 @@ function rotatedRectFitsPolygon(center, width, height, rotation, outer, holes) {
|
|
|
1576
1581
|
}
|
|
1577
1582
|
function polygonLabelCandidates(outer, holes, preferred) {
|
|
1578
1583
|
const bounds2 = polyBounds(outer);
|
|
1579
|
-
const centre = { x: bounds2.x + bounds2.width / 2, y: bounds2.y + bounds2.height / 2 };
|
|
1580
1584
|
const points = [preferred];
|
|
1581
1585
|
for (let row = 1; row < 12; row += 1) {
|
|
1582
1586
|
for (let column = 1; column < 12; column += 1) {
|
|
@@ -1587,7 +1591,8 @@ function polygonLabelCandidates(outer, holes, preferred) {
|
|
|
1587
1591
|
if (pointInPolygonWithHoles(point, outer, holes)) points.push(point);
|
|
1588
1592
|
}
|
|
1589
1593
|
}
|
|
1590
|
-
|
|
1594
|
+
const rings = [outer, ...holes];
|
|
1595
|
+
return points.map((point) => ({ point, room: distanceToRings(point, rings) })).sort((left, right) => right.room - left.room).map((entry) => entry.point).filter((point, index, all) => index === all.findIndex((other) => Math.abs(other.x - point.x) < 1e-6 && Math.abs(other.y - point.y) < 1e-6));
|
|
1591
1596
|
}
|
|
1592
1597
|
function roundedPolygonSubpath(context, points, radius) {
|
|
1593
1598
|
const n = points.length;
|
|
@@ -4429,7 +4434,7 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
4429
4434
|
const outlineTint = obj.color ?? this.zoneColor.get(obj.zone ?? "") ?? "#3a4358";
|
|
4430
4435
|
const outlinePoly = polygonWithHolesShape(obj.outline, obj.holes, {
|
|
4431
4436
|
stroke: rgba(outlineTint, 0.5),
|
|
4432
|
-
strokeWidth: 1
|
|
4437
|
+
strokeWidth: 1,
|
|
4433
4438
|
fill: rgba(outlineTint, 0.08),
|
|
4434
4439
|
listening: false
|
|
4435
4440
|
}, obj.outlinePath);
|
|
@@ -4484,6 +4489,7 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
4484
4489
|
holes: obj.holes ?? [],
|
|
4485
4490
|
centroid: centroid2,
|
|
4486
4491
|
labelAnchors: polygonLabelCandidates(obj.outline, obj.holes ?? [], centroid2),
|
|
4492
|
+
labelArea: polygonNetArea(obj.outline, obj.holes),
|
|
4487
4493
|
zone: obj.zone,
|
|
4488
4494
|
memberIds,
|
|
4489
4495
|
total: memberIds.length,
|
|
@@ -4735,8 +4741,16 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
4735
4741
|
}
|
|
4736
4742
|
}
|
|
4737
4743
|
/**
|
|
4738
|
-
* Keep transitional zone pills from covering section names
|
|
4739
|
-
*
|
|
4744
|
+
* Keep transitional zone pills from covering section names, and keep section
|
|
4745
|
+
* names off each other.
|
|
4746
|
+
*
|
|
4747
|
+
* This used to assume section labels "do not collide by construction",
|
|
4748
|
+
* because each is proven to fit inside its own shell. That holds only while
|
|
4749
|
+
* shells are disjoint. Hand-traced and imported plans routinely produce
|
|
4750
|
+
* shells that touch or overlap slightly along a shared edge, and a label
|
|
4751
|
+
* fitted into one can then land under its neighbour's — which is exactly the
|
|
4752
|
+
* unreadable smear a 36-section arena showed. Section labels now block each
|
|
4753
|
+
* other too, largest shell first so the big stands keep their names.
|
|
4740
4754
|
*/
|
|
4741
4755
|
decollideRungLabels(sx) {
|
|
4742
4756
|
const GAP = 4;
|
|
@@ -4762,20 +4776,39 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
4762
4776
|
}
|
|
4763
4777
|
}
|
|
4764
4778
|
for (const sec of this.sections) {
|
|
4765
|
-
if (sec.nameLabel.opacity() > 0.05)
|
|
4779
|
+
if (sec.nameLabel.opacity() > 0.05) {
|
|
4780
|
+
cands.push({ node: sec.nameLabel, tier: 1, section: true, area: sec.labelArea, box: boxOf(sec.nameLabel) });
|
|
4781
|
+
}
|
|
4766
4782
|
}
|
|
4767
4783
|
if (cands.length < 2) return;
|
|
4768
|
-
cands.sort((a, b) => a.tier - b.tier || a.box.y - b.box.y || a.box.x - b.box.x);
|
|
4784
|
+
cands.sort((a, b) => a.tier - b.tier || (b.area ?? 0) - (a.area ?? 0) || a.box.y - b.box.y || a.box.x - b.box.x);
|
|
4769
4785
|
const kept = [];
|
|
4770
4786
|
const collides = (b) => kept.some(
|
|
4771
4787
|
(k) => b.x < k.x + k.w + GAP && k.x < b.x + b.w + GAP && b.y < k.y + k.h + GAP && k.y < b.y + b.h + GAP
|
|
4772
4788
|
);
|
|
4773
4789
|
for (const c of cands) {
|
|
4774
|
-
if (collides(c.box)) {
|
|
4775
|
-
c.node.opacity(0);
|
|
4776
|
-
} else if (!c.section) {
|
|
4790
|
+
if (!collides(c.box)) {
|
|
4777
4791
|
kept.push(c.box);
|
|
4792
|
+
continue;
|
|
4793
|
+
}
|
|
4794
|
+
let placed = false;
|
|
4795
|
+
if (c.section) {
|
|
4796
|
+
const fontSize = c.node.fontSize();
|
|
4797
|
+
const y = c.node.y();
|
|
4798
|
+
for (const factor of SECTION_LABEL_SHRINK_STEPS) {
|
|
4799
|
+
const candidate = fontSize * factor;
|
|
4800
|
+
if (candidate * sx < MIN_SECTION_LABEL_PX) break;
|
|
4801
|
+
this.sizeLabel(c.node, candidate, y);
|
|
4802
|
+
const box = boxOf(c.node);
|
|
4803
|
+
if (!collides(box)) {
|
|
4804
|
+
kept.push(box);
|
|
4805
|
+
placed = true;
|
|
4806
|
+
break;
|
|
4807
|
+
}
|
|
4808
|
+
}
|
|
4809
|
+
if (!placed) this.sizeLabel(c.node, fontSize, y);
|
|
4778
4810
|
}
|
|
4811
|
+
if (!placed) c.node.opacity(0);
|
|
4779
4812
|
}
|
|
4780
4813
|
}
|
|
4781
4814
|
/** Set a centred label's world fontSize (for a target screen px) and re-anchor it. */
|
|
@@ -5396,7 +5429,20 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
5396
5429
|
visible,
|
|
5397
5430
|
renderedFontPx,
|
|
5398
5431
|
fill: typeof fill === "string" ? fill : "",
|
|
5399
|
-
|
|
5432
|
+
// When no label node exists (the seat is unlabelled at this zoom), fall
|
|
5433
|
+
// back to the ink this seat WOULD be painted with — the same expression
|
|
5434
|
+
// the seat-level evidence below uses — not to the raw theme default.
|
|
5435
|
+
//
|
|
5436
|
+
// The old fallback reported `DEF_SEAT_LABEL` (#0b1220) regardless of the
|
|
5437
|
+
// seat's paint, so a held seat with no label read as dark ink on
|
|
5438
|
+
// HELD_FILL (#6b7280) = 3.87:1 and a booked one as 1.82:1 against
|
|
5439
|
+
// TAKEN_FILL. That is a contrast violation the renderer never commits:
|
|
5440
|
+
// `seatLabelInk` runs every real label through `stateAwareBookableLabelInk`,
|
|
5441
|
+
// which returns #ffffff for both of those fills. A catalog visual audit
|
|
5442
|
+
// read this fallback as though it were painted and reported a
|
|
5443
|
+
// bookable-state contrast failure on 46 of 50 templates that does not
|
|
5444
|
+
// exist on screen.
|
|
5445
|
+
ink: typeof ink === "string" ? ink : shape ? this.seatLabelInk(seat, shape) : this.seatPreferredLabelInk(seat),
|
|
5400
5446
|
opacity: rounded(opacity),
|
|
5401
5447
|
...accessGlyph ? {
|
|
5402
5448
|
accessibilityMarker: {
|
|
@@ -8858,6 +8904,7 @@ export {
|
|
|
8858
8904
|
MAX_GA_CAPACITY,
|
|
8859
8905
|
PickerController,
|
|
8860
8906
|
RENDERED_QUALITY_REPORT_VERSION,
|
|
8907
|
+
SEAT_COMMERCIAL_MARKS,
|
|
8861
8908
|
SUPPORTED_LOCALES,
|
|
8862
8909
|
SURROUNDINGS_SHAPE_ROLES,
|
|
8863
8910
|
SeatmapRenderer,
|
|
@@ -8903,6 +8950,7 @@ export {
|
|
|
8903
8950
|
resolveLocale,
|
|
8904
8951
|
rowInventoryCount,
|
|
8905
8952
|
rowSeatPositions,
|
|
8953
|
+
seatCommercialMeta,
|
|
8906
8954
|
seatLabelPart,
|
|
8907
8955
|
sectionGeometry,
|
|
8908
8956
|
setLocale,
|