@seatlayer/core 0.53.0 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +2 -2
  2. package/dist/categoryInventory-BwarniiK.d.ts +109 -0
  3. package/dist/categoryInventory-D3qPwfKz.d.cts +109 -0
  4. package/dist/chunk-55NOSZK5.js +1 -0
  5. package/dist/chunk-6VTTBC5F.js +1 -0
  6. package/dist/chunk-6XJN4REG.js +1 -0
  7. package/dist/chunk-7PT7OQUO.js +1 -0
  8. package/dist/chunk-AQKYUJBX.js +1 -0
  9. package/dist/chunk-CXF32VPG.js +1 -0
  10. package/dist/chunk-DNGP2HDT.js +1 -0
  11. package/dist/chunk-EQM4FFN5.js +1 -0
  12. package/dist/chunk-HHM3PB66.js +1 -0
  13. package/dist/chunk-PXWKSYCK.js +1 -0
  14. package/dist/chunk-VDZ24QVV.js +1 -0
  15. package/dist/chunk-VI2CLV3Y.js +1 -0
  16. package/dist/core/chart-ops/index.cjs +1 -0
  17. package/dist/core/chart-ops/index.d.cts +1235 -0
  18. package/dist/core/chart-ops/index.d.ts +1235 -0
  19. package/dist/core/chart-ops/index.js +1 -0
  20. package/dist/core/color.cjs +1 -0
  21. package/dist/core/color.d.cts +192 -0
  22. package/dist/core/color.d.ts +192 -0
  23. package/dist/core/color.js +1 -0
  24. package/dist/core/inventory/index.cjs +1 -0
  25. package/dist/core/inventory/index.d.cts +209 -0
  26. package/dist/core/inventory/index.d.ts +209 -0
  27. package/dist/core/inventory/index.js +1 -0
  28. package/dist/core/layout/index.cjs +1 -0
  29. package/dist/core/layout/index.d.cts +376 -0
  30. package/dist/core/layout/index.d.ts +376 -0
  31. package/dist/core/layout/index.js +1 -0
  32. package/dist/core/quality/index.cjs +1 -0
  33. package/dist/core/quality/index.d.cts +132 -0
  34. package/dist/core/quality/index.d.ts +132 -0
  35. package/dist/core/quality/index.js +1 -0
  36. package/dist/core/render-assets/index.cjs +1 -0
  37. package/dist/core/render-assets/index.d.cts +99 -0
  38. package/dist/core/render-assets/index.d.ts +99 -0
  39. package/dist/core/render-assets/index.js +1 -0
  40. package/dist/core/seatConfidence.cjs +1 -1
  41. package/dist/core/seatConfidence.d.cts +1 -1
  42. package/dist/core/seatConfidence.d.ts +1 -1
  43. package/dist/core/seatConfidence.js +1 -1
  44. package/dist/core/sections/index.cjs +1 -0
  45. package/dist/core/sections/index.d.cts +346 -0
  46. package/dist/core/sections/index.d.ts +346 -0
  47. package/dist/core/sections/index.js +1 -0
  48. package/dist/{de-75NWRKC5.js → de-WPX4D3SY.js} +1 -1
  49. package/dist/{es-BM7EJ7PW.js → es-6KAJQVVX.js} +1 -1
  50. package/dist/{fr-HPXQHIB4.js → fr-5DTMRBN5.js} +1 -1
  51. package/dist/index.cjs +1 -1
  52. package/dist/index.d.cts +85 -534
  53. package/dist/index.d.ts +85 -534
  54. package/dist/index.js +1 -1
  55. package/dist/labeling-BmCzW50y.d.ts +90 -0
  56. package/dist/labeling-VfJBEOn0.d.cts +90 -0
  57. package/dist/layout-ClQkmixY.d.ts +181 -0
  58. package/dist/layout-Dlv5bIf2.d.cts +181 -0
  59. package/dist/renderedQuality-B3jgdgPO.d.ts +113 -0
  60. package/dist/renderedQuality-bDkUOyBL.d.cts +113 -0
  61. package/dist/renderer-B_g-W_QB.d.ts +534 -0
  62. package/dist/renderer-DySMcKAR.d.cts +534 -0
  63. package/dist/sections-DIzgtDjF.d.ts +123 -0
  64. package/dist/sections-Dna1nZgR.d.cts +123 -0
  65. package/dist/segmentedRowModel-BNXEUeHp.d.cts +75 -0
  66. package/dist/segmentedRowModel-COXw4GCh.d.ts +75 -0
  67. package/dist/ticketRestrictions-CzchbX_o.d.cts +72 -0
  68. package/dist/ticketRestrictions-DaYOCpEw.d.ts +72 -0
  69. package/dist/{types-tLOunI-B.d.cts → types-DTSG6_Hq.d.cts} +238 -761
  70. package/dist/{types-tLOunI-B.d.ts → types-DTSG6_Hq.d.ts} +238 -761
  71. package/dist/view3d/crossfade/panorama.d.cts +1 -1
  72. package/dist/view3d/crossfade/panorama.d.ts +1 -1
  73. package/dist/view3d/index.cjs +27 -27
  74. package/dist/view3d/index.d.cts +109 -2
  75. package/dist/view3d/index.d.ts +109 -2
  76. package/dist/view3d/index.js +26 -26
  77. package/package.json +94 -5
  78. package/dist/chunk-54A7LIL5.js +0 -1
@@ -0,0 +1,90 @@
1
+ import { i as SectionOutlinePath, P as Point, j as SectionPathSegment } from './types-DTSG6_Hq.js';
2
+
3
+ declare function sectionPathSegmentEnd(segment: SectionPathSegment): Point;
4
+ /** Validate finite, continuous closed-path geometry without trusting renderer
5
+ * behaviour. Arc endpoints must lie on their declared circle. */
6
+ declare function validSectionOutlinePath(path: SectionOutlinePath): boolean;
7
+ /** Deterministic polygon sample used by validation, hit testing, diff, and old
8
+ * clients. The returned loop omits the duplicate closing point. */
9
+ declare function sampleSectionOutlinePath(path: SectionOutlinePath, maxStep?: number): Point[];
10
+ declare function translateSectionOutlinePath(path: SectionOutlinePath, dx: number, dy: number): SectionOutlinePath;
11
+ /** Apply a similarity transform. Callers provide the point transform and the
12
+ * absolute radius scale; reflections toggle arc direction. */
13
+ declare function transformSectionOutlinePath(path: SectionOutlinePath, transform: (point: Point) => Point, radiusScale?: number, reflected?: boolean): SectionOutlinePath;
14
+ /** Default corner-smoothing strength applied automatically when a hand-clicked
15
+ * polygon section is closed. Wide, gently-angled corners round; sharp structural
16
+ * corners stay crisp, so a rectangle drawn as a polygon is left untouched. */
17
+ declare const DEFAULT_SECTION_CORNER_SMOOTHING = 45;
18
+ /**
19
+ * Build a smooth closed {@link SectionOutlinePath} by rounding the wide corners
20
+ * of a hand-clicked polygon. The polygon stays authoritative — this is a purely
21
+ * additive rendered curve. Returns `null` when nothing qualifies (strength 0, a
22
+ * degenerate polygon, or no corner wide enough), letting the caller keep the raw
23
+ * straight polygon. Deterministic: same input always yields the same path.
24
+ */
25
+ declare function sectionCornerSmoothingPath(polygon: Point[], strength: number, options?: {
26
+ wideAngleThresholdDeg?: number;
27
+ }): SectionOutlinePath | null;
28
+ /**
29
+ * Largest bow, as a fraction of the edge's own length, at curvature ±100. Half
30
+ * the chord reads as a strong arc while staying well short of a shape that folds
31
+ * back on itself.
32
+ */
33
+ declare const MAX_EDGE_SAGITTA_RATIO = 0.5;
34
+ interface SectionOutlineDerivation {
35
+ /** 0–100. Rounds corners wider than the threshold. */
36
+ cornerSmoothing?: number;
37
+ /**
38
+ * One entry per edge of the clicked polygon, -100..100, 0 = straight. Edge `i`
39
+ * runs from vertex `i` to vertex `i+1`. Positive bows to the LEFT of that
40
+ * direction; the sign is relative to edge direction, never to world axes, so
41
+ * curvature survives rotate / flip / mirror untouched.
42
+ */
43
+ edgeCurvature?: readonly number[];
44
+ wideAngleThresholdDeg?: number;
45
+ }
46
+ /**
47
+ * Derive the rendered outline from the clicked polygon plus its coordinate-free
48
+ * shaping (corner smoothing and per-edge curvature).
49
+ *
50
+ * The polygon stays authoritative — this is purely a rendered curve, so zeroing
51
+ * the shaping restores the exact clicked shape. Deterministic: same input always
52
+ * yields the same path. Returns `null` when there is nothing to draw beyond the
53
+ * raw polygon, letting the caller keep the straight outline.
54
+ */
55
+ declare function sectionOutlinePathFrom(polygon: Point[], derivation: SectionOutlineDerivation): SectionOutlinePath | null;
56
+ /** Reverse a closed path without changing its painted boundary. */
57
+ declare function reverseSectionOutlinePath(path: SectionOutlinePath): SectionOutlinePath;
58
+
59
+ /**
60
+ * Pure row/seat labeling helpers used by the designer's "relabel" tools
61
+ * (e.g. bulk-renumber rows A, B, C… or 1, 2, 3…). No dependencies.
62
+ */
63
+ interface RelabelOptions {
64
+ scheme: 'letters' | 'numbers';
65
+ /** 1-based start: letters 1=A; numbers 1=1. */
66
+ startAt: number;
67
+ /** Letters only: skip I and O (common theatre convention). */
68
+ skipAmbiguous?: boolean;
69
+ /** Apply labels in reverse order over the given array. */
70
+ reverse?: boolean;
71
+ }
72
+ /**
73
+ * Bijective base-N conversion: 0 -> first letter, N -> second letter's
74
+ * first repeat cycle (e.g. base26: 25 -> 'Z', 26 -> 'AA').
75
+ */
76
+ declare function toBijectiveBase(index: number, alphabet: string): string;
77
+ declare function indexLabel(i: number, opts: RelabelOptions): string;
78
+ /**
79
+ * Alphabetic label for a 1-based value (1 -> 'A', 26 -> 'Z', 27 -> 'AA').
80
+ * Uppercase by default; `lower` gives the a,b,c… variant. Values ≤ 0 clamp to 'A'.
81
+ */
82
+ declare function toLetters(value: number, lower?: boolean): string;
83
+ /** Uppercase Roman numeral for a positive integer (1 -> 'I', 4 -> 'IV', 9 -> 'IX').
84
+ * Non-positive / non-finite inputs fall back to their decimal string. */
85
+ declare function toRoman(value: number): string;
86
+ declare function relabelRows<T extends {
87
+ label: string;
88
+ }>(rows: T[], opts: RelabelOptions): T[];
89
+
90
+ export { DEFAULT_SECTION_CORNER_SMOOTHING as D, MAX_EDGE_SAGITTA_RATIO as M, type RelabelOptions as R, type SectionOutlineDerivation as S, reverseSectionOutlinePath as a, sectionCornerSmoothingPath as b, sectionOutlinePathFrom as c, sectionPathSegmentEnd as d, toLetters as e, toRoman as f, transformSectionOutlinePath as g, translateSectionOutlinePath as h, indexLabel as i, relabelRows as r, sampleSectionOutlinePath as s, toBijectiveBase as t, validSectionOutlinePath as v };
@@ -0,0 +1,90 @@
1
+ import { i as SectionOutlinePath, P as Point, j as SectionPathSegment } from './types-DTSG6_Hq.cjs';
2
+
3
+ declare function sectionPathSegmentEnd(segment: SectionPathSegment): Point;
4
+ /** Validate finite, continuous closed-path geometry without trusting renderer
5
+ * behaviour. Arc endpoints must lie on their declared circle. */
6
+ declare function validSectionOutlinePath(path: SectionOutlinePath): boolean;
7
+ /** Deterministic polygon sample used by validation, hit testing, diff, and old
8
+ * clients. The returned loop omits the duplicate closing point. */
9
+ declare function sampleSectionOutlinePath(path: SectionOutlinePath, maxStep?: number): Point[];
10
+ declare function translateSectionOutlinePath(path: SectionOutlinePath, dx: number, dy: number): SectionOutlinePath;
11
+ /** Apply a similarity transform. Callers provide the point transform and the
12
+ * absolute radius scale; reflections toggle arc direction. */
13
+ declare function transformSectionOutlinePath(path: SectionOutlinePath, transform: (point: Point) => Point, radiusScale?: number, reflected?: boolean): SectionOutlinePath;
14
+ /** Default corner-smoothing strength applied automatically when a hand-clicked
15
+ * polygon section is closed. Wide, gently-angled corners round; sharp structural
16
+ * corners stay crisp, so a rectangle drawn as a polygon is left untouched. */
17
+ declare const DEFAULT_SECTION_CORNER_SMOOTHING = 45;
18
+ /**
19
+ * Build a smooth closed {@link SectionOutlinePath} by rounding the wide corners
20
+ * of a hand-clicked polygon. The polygon stays authoritative — this is a purely
21
+ * additive rendered curve. Returns `null` when nothing qualifies (strength 0, a
22
+ * degenerate polygon, or no corner wide enough), letting the caller keep the raw
23
+ * straight polygon. Deterministic: same input always yields the same path.
24
+ */
25
+ declare function sectionCornerSmoothingPath(polygon: Point[], strength: number, options?: {
26
+ wideAngleThresholdDeg?: number;
27
+ }): SectionOutlinePath | null;
28
+ /**
29
+ * Largest bow, as a fraction of the edge's own length, at curvature ±100. Half
30
+ * the chord reads as a strong arc while staying well short of a shape that folds
31
+ * back on itself.
32
+ */
33
+ declare const MAX_EDGE_SAGITTA_RATIO = 0.5;
34
+ interface SectionOutlineDerivation {
35
+ /** 0–100. Rounds corners wider than the threshold. */
36
+ cornerSmoothing?: number;
37
+ /**
38
+ * One entry per edge of the clicked polygon, -100..100, 0 = straight. Edge `i`
39
+ * runs from vertex `i` to vertex `i+1`. Positive bows to the LEFT of that
40
+ * direction; the sign is relative to edge direction, never to world axes, so
41
+ * curvature survives rotate / flip / mirror untouched.
42
+ */
43
+ edgeCurvature?: readonly number[];
44
+ wideAngleThresholdDeg?: number;
45
+ }
46
+ /**
47
+ * Derive the rendered outline from the clicked polygon plus its coordinate-free
48
+ * shaping (corner smoothing and per-edge curvature).
49
+ *
50
+ * The polygon stays authoritative — this is purely a rendered curve, so zeroing
51
+ * the shaping restores the exact clicked shape. Deterministic: same input always
52
+ * yields the same path. Returns `null` when there is nothing to draw beyond the
53
+ * raw polygon, letting the caller keep the straight outline.
54
+ */
55
+ declare function sectionOutlinePathFrom(polygon: Point[], derivation: SectionOutlineDerivation): SectionOutlinePath | null;
56
+ /** Reverse a closed path without changing its painted boundary. */
57
+ declare function reverseSectionOutlinePath(path: SectionOutlinePath): SectionOutlinePath;
58
+
59
+ /**
60
+ * Pure row/seat labeling helpers used by the designer's "relabel" tools
61
+ * (e.g. bulk-renumber rows A, B, C… or 1, 2, 3…). No dependencies.
62
+ */
63
+ interface RelabelOptions {
64
+ scheme: 'letters' | 'numbers';
65
+ /** 1-based start: letters 1=A; numbers 1=1. */
66
+ startAt: number;
67
+ /** Letters only: skip I and O (common theatre convention). */
68
+ skipAmbiguous?: boolean;
69
+ /** Apply labels in reverse order over the given array. */
70
+ reverse?: boolean;
71
+ }
72
+ /**
73
+ * Bijective base-N conversion: 0 -> first letter, N -> second letter's
74
+ * first repeat cycle (e.g. base26: 25 -> 'Z', 26 -> 'AA').
75
+ */
76
+ declare function toBijectiveBase(index: number, alphabet: string): string;
77
+ declare function indexLabel(i: number, opts: RelabelOptions): string;
78
+ /**
79
+ * Alphabetic label for a 1-based value (1 -> 'A', 26 -> 'Z', 27 -> 'AA').
80
+ * Uppercase by default; `lower` gives the a,b,c… variant. Values ≤ 0 clamp to 'A'.
81
+ */
82
+ declare function toLetters(value: number, lower?: boolean): string;
83
+ /** Uppercase Roman numeral for a positive integer (1 -> 'I', 4 -> 'IV', 9 -> 'IX').
84
+ * Non-positive / non-finite inputs fall back to their decimal string. */
85
+ declare function toRoman(value: number): string;
86
+ declare function relabelRows<T extends {
87
+ label: string;
88
+ }>(rows: T[], opts: RelabelOptions): T[];
89
+
90
+ export { DEFAULT_SECTION_CORNER_SMOOTHING as D, MAX_EDGE_SAGITTA_RATIO as M, type RelabelOptions as R, type SectionOutlineDerivation as S, reverseSectionOutlinePath as a, sectionCornerSmoothingPath as b, sectionOutlinePathFrom as c, sectionPathSegmentEnd as d, toLetters as e, toRoman as f, transformSectionOutlinePath as g, translateSectionOutlinePath as h, indexLabel as i, relabelRows as r, sampleSectionOutlinePath as s, toBijectiveBase as t, validSectionOutlinePath as v };
@@ -0,0 +1,181 @@
1
+ import { A as AccessibilityType, S as SeatOverride, R as RowObject, a as SeatViewMetadata, L as LabelStyle, b as RectTableSide, C as ChartDoc, c as ChartObject, B as BoothObject, T as TableObject, P as Point, F as Floor, d as SectionObject, e as RectTableSeatCounts } from './types-DTSG6_Hq.js';
2
+ import { S as SegmentedRowPlacement } from './segmentedRowModel-COXw4GCh.js';
3
+ import { E as ExpandedSeat } from './renderer-B_g-W_QB.js';
4
+
5
+ /**
6
+ * Pure geometry helpers — no Konva, no DOM. Turns the parametric chart
7
+ * document into concrete seat coordinates and computes bounding boxes.
8
+ */
9
+
10
+ /**
11
+ * Expand a parametric row into seat positions.
12
+ *
13
+ * Straight (curve === 0): seat i sits at local (i·spacing, 0).
14
+ *
15
+ * Curved: seats lie on a circular arc. Per-seat angular step is
16
+ * `curve/(seatCount-1)`; radius is derived so the chord between neighbours
17
+ * equals seatSpacing → radius = spacing / (2·sin(step/2)). Seat 0 sits at the
18
+ * bottom of the arc (local origin) with the circle centre directly above it at
19
+ * (0,-radius); increasing index sweeps toward +x while the ends rise toward -y,
20
+ * i.e. positive curve is concave toward -y (a row wrapping a stage above it).
21
+ * Local points are then rotated by `rotation` and translated to `origin`.
22
+ *
23
+ * Numbering (labels only, never geometry): `seatNumbering.direction === 'rtl'`
24
+ * numbers from the far physical end; `step === 2` produces odd/even numbering
25
+ * (start at 1 → 1,3,5…; start at 2 → 2,4,6…).
26
+ */
27
+ /** Base (pre-override) seat centre per index — shared by expandRow + designer edit mode. */
28
+ declare function rowSeatPositions(row: RowObject): Point[];
29
+ /** Sellable row slots: skipped slots are absent; empty wheelchair bays remain. */
30
+ declare function rowInventoryCount(row: RowObject): number;
31
+ /**
32
+ * Every seat slot of a row INCLUDING skipped ones (designer seat-edit mode uses
33
+ * this to draw un-skip handles). Overrides (dx/dy/label/categoryKey) are applied
34
+ * but a skipped slot is flagged, not omitted.
35
+ */
36
+ interface RowSeatSlot {
37
+ index: number;
38
+ x: number;
39
+ y: number;
40
+ label: string;
41
+ displayLabel: string;
42
+ categoryKey: string;
43
+ skipped: boolean;
44
+ accessible: boolean;
45
+ accessibility: AccessibilityType[];
46
+ wheelchairSpaceType?: SeatOverride['wheelchairSpaceType'];
47
+ commercial?: RowObject['commercial'];
48
+ viewUrl?: string;
49
+ viewMeta?: SeatViewMetadata;
50
+ labelStyle?: LabelStyle;
51
+ }
52
+ /** Every authored table-chair slot, including skipped inventory. This mirrors
53
+ * row seat slots so Designer, MCP and buyer/event expansion share one semantic
54
+ * source while retaining the table's stable numeric slot identity. */
55
+ interface TableSeatSlot extends RowSeatSlot {
56
+ side?: RectTableSide;
57
+ }
58
+ /**
59
+ * Seat slots for one physical row.
60
+ *
61
+ * `placement` makes the slots read as part of a logical segmented row: labels
62
+ * continue across components (`A-8`, not a second `A-1`) using the logical row's
63
+ * numbering scheme and total seat count.
64
+ */
65
+ declare function expandRowSlots(row: RowObject, placement?: SegmentedRowPlacement): RowSeatSlot[];
66
+ declare function expandRow(row: RowObject): ExpandedSeat[];
67
+ /**
68
+ * Expand a table into its perimeter seats.
69
+ *
70
+ * Round: seats spread evenly on a circle of radius `radius + 16`, the first at
71
+ * angle `rotation` (degrees, clockwise from +x). Rect: seats line the top and
72
+ * bottom edges (split evenly, any remainder to the top), 16u outside the edge,
73
+ * the whole set rotated about the table centre.
74
+ */
75
+ /** Legacy rect tables distribute aggregate capacity round-robin across enabled
76
+ * sides, then emit chairs in canonical top/bottom/left/right order. */
77
+ declare function tableSeatCountsBySide(t: TableObject): RectTableSeatCounts;
78
+ /** Expand every authored table chair, including skipped slots needed by the
79
+ * Designer to restore inventory. */
80
+ declare function expandTableSlots(t: TableObject): TableSeatSlot[];
81
+ /** Sellable individual table chairs. Grouped tables own one atomic inventory
82
+ * unit elsewhere and therefore retain their full authored chair capacity. */
83
+ declare function tableInventoryCount(t: TableObject): number;
84
+ declare function expandTable(t: TableObject): ExpandedSeat[];
85
+ /** Expand a booth into its single bookable block unit. */
86
+ declare function expandBooth(b: BoothObject): ExpandedSeat[];
87
+ /** Ray-cast point-in-polygon test — odd crossings ⇒ inside. */
88
+ declare function pointInPolygon(p: Point, poly: Point[]): boolean;
89
+ declare function pointInPolygonWithHoles(p: Point, outer: Point[], holes: Point[][] | undefined): boolean;
90
+ /**
91
+ * Stable interior label anchor: the centre of the largest circle that fits in
92
+ * the polygon (holes excluded).
93
+ *
94
+ * This used to return the average-of-vertices centroid whenever that happened
95
+ * to be inside, and only fell back to a coarse 24×24 grid search when it was
96
+ * not. "Inside" is a much weaker property than "has room": on a traced arena
97
+ * the outer arc of a wedge carries dozens of sampled vertices and the radial
98
+ * edges carry two, so the average is dragged onto the arc and the label pill —
99
+ * far wider than a point — straddled the boundary into the next section.
100
+ * Measured on the 36-section traced arena corpus, 15 of 36 anchors had under
101
+ * 75% of the clearance actually available, some as little as 43%.
102
+ *
103
+ * `polygonInscribedAnchor` is deterministic and coordinate-free, so callers may
104
+ * memoize it on geometry alone.
105
+ */
106
+ declare function polygonLabelPoint(outer: Point[], holes: Point[][] | undefined): Point;
107
+ /**
108
+ * Visual centre of any object — used for spatial section membership and for
109
+ * rotating an object about its centre. Rows: centroid of expanded seats (or
110
+ * origin when empty); tables/booths: centre; GA/section: polygon centroid;
111
+ * shape: bbox centre; text: its position.
112
+ */
113
+ declare function objectCenter(o: ChartObject): Point;
114
+ /**
115
+ * Resolve one bookable object's owning physical section using the canonical
116
+ * first-match rule. Generated reference inventory may name a logical section,
117
+ * but that provenance is trusted only when the stored geometry confirms it.
118
+ * Keeping this primitive in layout lets section inventory, category painting,
119
+ * and buyer view inheritance share one ownership decision.
120
+ */
121
+ declare function owningSectionForObject(objects: ChartObject[], object: ChartObject): SectionObject | undefined;
122
+ /**
123
+ * Normalized floor list (Batch 5): a multi-floor chart's `floors`, or a synthetic
124
+ * single floor wrapping a single-floor chart's `objects`. Every consumer that needs
125
+ * to reason about floors goes through this so single-floor charts stay untouched.
126
+ */
127
+ declare function floorsOf(doc: ChartDoc): Floor[];
128
+ /** Objects of one floor by id (defaults to the first floor). */
129
+ declare function floorObjects(doc: ChartDoc, floorId?: string): ChartObject[];
130
+ /** Every object across ALL floors — the whole venue (single-floor = `doc.objects`). */
131
+ declare function allObjects(doc: ChartDoc): ChartObject[];
132
+ /** A copy of an object translated by (dx, dy) — every coordinate field shifted. */
133
+ declare function translateObject(o: ChartObject, dx: number, dy: number): ChartObject;
134
+ /**
135
+ * Multi-floor 3D stack (Batch 5): flatten every floor into ONE doc with floor `i`
136
+ * lifted by `i * spread` in −y, so the isometric view shows the floors as stacked
137
+ * decks (ground at the bottom). Returns a single-floor doc (no `floors`). Meant
138
+ * only for the 3D overview render — 2D still shows one floor via `floorObjects`.
139
+ */
140
+ declare function stackFloors(doc: ChartDoc, spread?: number): ChartDoc;
141
+ /**
142
+ * Build the buyer-facing 2D overview of a multi-floor chart.
143
+ *
144
+ * Floors commonly reuse the same drawing origin (a balcony is authored over
145
+ * the stalls it overlooks). Flattening those source coordinates makes a valid
146
+ * import look corrupt because every level is painted on top of every other
147
+ * level. This projection packs complete floors into a compact, content-aware
148
+ * grid. Each floor receives one rigid translation: no seat, row, section,
149
+ * annotation, gap, or rotation changes, and the canonical document is never
150
+ * mutated.
151
+ */
152
+ declare function layoutFloorOverview(doc: ChartDoc): ChartDoc;
153
+ /**
154
+ * Rigid per-floor translations used by the buyer's complete-venue overview.
155
+ *
156
+ * Kept as a pure public helper so 2D and 3D can present the same non-overlapping
157
+ * level arrangement without either renderer rewriting the authored chart. A
158
+ * zero translation is returned for a single-floor document.
159
+ */
160
+ declare function floorOverviewTranslations(doc: ChartDoc): Point[];
161
+ interface ExpandChartOptions {
162
+ /** Physical height for a single-floor projection extracted from a multi-floor
163
+ * document. Full multi-floor documents resolve each floor directly. */
164
+ floorBaseHeightM?: number;
165
+ /** Resolve per-seat 3D eye heights (default true). Two-dimensional consumers
166
+ * such as thumbnails can disable this expensive stand-structure pass. */
167
+ resolveEyeHeights?: boolean;
168
+ }
169
+ /** Expand every seat-bearing object across all floors (rows, tables, booths).
170
+ * Multi-floor ownership is resolved one floor at a time: local coordinates may
171
+ * overlap between floors and must never assign a seat to another floor's section. */
172
+ declare function expandChart(doc: ChartDoc, options?: ExpandChartOptions): ExpandedSeat[];
173
+ /** Axis-aligned bounds over every object plus the background image, with padding. */
174
+ declare function chartBounds(doc: ChartDoc): {
175
+ x: number;
176
+ y: number;
177
+ width: number;
178
+ height: number;
179
+ };
180
+
181
+ export { type ExpandChartOptions as E, type RowSeatSlot as R, type TableSeatSlot as T, allObjects as a, expandChart as b, chartBounds as c, expandRow as d, expandBooth as e, expandRowSlots as f, expandTable as g, expandTableSlots as h, floorObjects as i, floorOverviewTranslations as j, floorsOf as k, layoutFloorOverview as l, owningSectionForObject as m, pointInPolygonWithHoles as n, objectCenter as o, pointInPolygon as p, polygonLabelPoint as q, rowInventoryCount as r, rowSeatPositions as s, stackFloors as t, tableInventoryCount as u, tableSeatCountsBySide as v, translateObject as w };
@@ -0,0 +1,181 @@
1
+ import { A as AccessibilityType, S as SeatOverride, R as RowObject, a as SeatViewMetadata, L as LabelStyle, b as RectTableSide, C as ChartDoc, c as ChartObject, B as BoothObject, T as TableObject, P as Point, F as Floor, d as SectionObject, e as RectTableSeatCounts } from './types-DTSG6_Hq.cjs';
2
+ import { S as SegmentedRowPlacement } from './segmentedRowModel-BNXEUeHp.cjs';
3
+ import { E as ExpandedSeat } from './renderer-DySMcKAR.cjs';
4
+
5
+ /**
6
+ * Pure geometry helpers — no Konva, no DOM. Turns the parametric chart
7
+ * document into concrete seat coordinates and computes bounding boxes.
8
+ */
9
+
10
+ /**
11
+ * Expand a parametric row into seat positions.
12
+ *
13
+ * Straight (curve === 0): seat i sits at local (i·spacing, 0).
14
+ *
15
+ * Curved: seats lie on a circular arc. Per-seat angular step is
16
+ * `curve/(seatCount-1)`; radius is derived so the chord between neighbours
17
+ * equals seatSpacing → radius = spacing / (2·sin(step/2)). Seat 0 sits at the
18
+ * bottom of the arc (local origin) with the circle centre directly above it at
19
+ * (0,-radius); increasing index sweeps toward +x while the ends rise toward -y,
20
+ * i.e. positive curve is concave toward -y (a row wrapping a stage above it).
21
+ * Local points are then rotated by `rotation` and translated to `origin`.
22
+ *
23
+ * Numbering (labels only, never geometry): `seatNumbering.direction === 'rtl'`
24
+ * numbers from the far physical end; `step === 2` produces odd/even numbering
25
+ * (start at 1 → 1,3,5…; start at 2 → 2,4,6…).
26
+ */
27
+ /** Base (pre-override) seat centre per index — shared by expandRow + designer edit mode. */
28
+ declare function rowSeatPositions(row: RowObject): Point[];
29
+ /** Sellable row slots: skipped slots are absent; empty wheelchair bays remain. */
30
+ declare function rowInventoryCount(row: RowObject): number;
31
+ /**
32
+ * Every seat slot of a row INCLUDING skipped ones (designer seat-edit mode uses
33
+ * this to draw un-skip handles). Overrides (dx/dy/label/categoryKey) are applied
34
+ * but a skipped slot is flagged, not omitted.
35
+ */
36
+ interface RowSeatSlot {
37
+ index: number;
38
+ x: number;
39
+ y: number;
40
+ label: string;
41
+ displayLabel: string;
42
+ categoryKey: string;
43
+ skipped: boolean;
44
+ accessible: boolean;
45
+ accessibility: AccessibilityType[];
46
+ wheelchairSpaceType?: SeatOverride['wheelchairSpaceType'];
47
+ commercial?: RowObject['commercial'];
48
+ viewUrl?: string;
49
+ viewMeta?: SeatViewMetadata;
50
+ labelStyle?: LabelStyle;
51
+ }
52
+ /** Every authored table-chair slot, including skipped inventory. This mirrors
53
+ * row seat slots so Designer, MCP and buyer/event expansion share one semantic
54
+ * source while retaining the table's stable numeric slot identity. */
55
+ interface TableSeatSlot extends RowSeatSlot {
56
+ side?: RectTableSide;
57
+ }
58
+ /**
59
+ * Seat slots for one physical row.
60
+ *
61
+ * `placement` makes the slots read as part of a logical segmented row: labels
62
+ * continue across components (`A-8`, not a second `A-1`) using the logical row's
63
+ * numbering scheme and total seat count.
64
+ */
65
+ declare function expandRowSlots(row: RowObject, placement?: SegmentedRowPlacement): RowSeatSlot[];
66
+ declare function expandRow(row: RowObject): ExpandedSeat[];
67
+ /**
68
+ * Expand a table into its perimeter seats.
69
+ *
70
+ * Round: seats spread evenly on a circle of radius `radius + 16`, the first at
71
+ * angle `rotation` (degrees, clockwise from +x). Rect: seats line the top and
72
+ * bottom edges (split evenly, any remainder to the top), 16u outside the edge,
73
+ * the whole set rotated about the table centre.
74
+ */
75
+ /** Legacy rect tables distribute aggregate capacity round-robin across enabled
76
+ * sides, then emit chairs in canonical top/bottom/left/right order. */
77
+ declare function tableSeatCountsBySide(t: TableObject): RectTableSeatCounts;
78
+ /** Expand every authored table chair, including skipped slots needed by the
79
+ * Designer to restore inventory. */
80
+ declare function expandTableSlots(t: TableObject): TableSeatSlot[];
81
+ /** Sellable individual table chairs. Grouped tables own one atomic inventory
82
+ * unit elsewhere and therefore retain their full authored chair capacity. */
83
+ declare function tableInventoryCount(t: TableObject): number;
84
+ declare function expandTable(t: TableObject): ExpandedSeat[];
85
+ /** Expand a booth into its single bookable block unit. */
86
+ declare function expandBooth(b: BoothObject): ExpandedSeat[];
87
+ /** Ray-cast point-in-polygon test — odd crossings ⇒ inside. */
88
+ declare function pointInPolygon(p: Point, poly: Point[]): boolean;
89
+ declare function pointInPolygonWithHoles(p: Point, outer: Point[], holes: Point[][] | undefined): boolean;
90
+ /**
91
+ * Stable interior label anchor: the centre of the largest circle that fits in
92
+ * the polygon (holes excluded).
93
+ *
94
+ * This used to return the average-of-vertices centroid whenever that happened
95
+ * to be inside, and only fell back to a coarse 24×24 grid search when it was
96
+ * not. "Inside" is a much weaker property than "has room": on a traced arena
97
+ * the outer arc of a wedge carries dozens of sampled vertices and the radial
98
+ * edges carry two, so the average is dragged onto the arc and the label pill —
99
+ * far wider than a point — straddled the boundary into the next section.
100
+ * Measured on the 36-section traced arena corpus, 15 of 36 anchors had under
101
+ * 75% of the clearance actually available, some as little as 43%.
102
+ *
103
+ * `polygonInscribedAnchor` is deterministic and coordinate-free, so callers may
104
+ * memoize it on geometry alone.
105
+ */
106
+ declare function polygonLabelPoint(outer: Point[], holes: Point[][] | undefined): Point;
107
+ /**
108
+ * Visual centre of any object — used for spatial section membership and for
109
+ * rotating an object about its centre. Rows: centroid of expanded seats (or
110
+ * origin when empty); tables/booths: centre; GA/section: polygon centroid;
111
+ * shape: bbox centre; text: its position.
112
+ */
113
+ declare function objectCenter(o: ChartObject): Point;
114
+ /**
115
+ * Resolve one bookable object's owning physical section using the canonical
116
+ * first-match rule. Generated reference inventory may name a logical section,
117
+ * but that provenance is trusted only when the stored geometry confirms it.
118
+ * Keeping this primitive in layout lets section inventory, category painting,
119
+ * and buyer view inheritance share one ownership decision.
120
+ */
121
+ declare function owningSectionForObject(objects: ChartObject[], object: ChartObject): SectionObject | undefined;
122
+ /**
123
+ * Normalized floor list (Batch 5): a multi-floor chart's `floors`, or a synthetic
124
+ * single floor wrapping a single-floor chart's `objects`. Every consumer that needs
125
+ * to reason about floors goes through this so single-floor charts stay untouched.
126
+ */
127
+ declare function floorsOf(doc: ChartDoc): Floor[];
128
+ /** Objects of one floor by id (defaults to the first floor). */
129
+ declare function floorObjects(doc: ChartDoc, floorId?: string): ChartObject[];
130
+ /** Every object across ALL floors — the whole venue (single-floor = `doc.objects`). */
131
+ declare function allObjects(doc: ChartDoc): ChartObject[];
132
+ /** A copy of an object translated by (dx, dy) — every coordinate field shifted. */
133
+ declare function translateObject(o: ChartObject, dx: number, dy: number): ChartObject;
134
+ /**
135
+ * Multi-floor 3D stack (Batch 5): flatten every floor into ONE doc with floor `i`
136
+ * lifted by `i * spread` in −y, so the isometric view shows the floors as stacked
137
+ * decks (ground at the bottom). Returns a single-floor doc (no `floors`). Meant
138
+ * only for the 3D overview render — 2D still shows one floor via `floorObjects`.
139
+ */
140
+ declare function stackFloors(doc: ChartDoc, spread?: number): ChartDoc;
141
+ /**
142
+ * Build the buyer-facing 2D overview of a multi-floor chart.
143
+ *
144
+ * Floors commonly reuse the same drawing origin (a balcony is authored over
145
+ * the stalls it overlooks). Flattening those source coordinates makes a valid
146
+ * import look corrupt because every level is painted on top of every other
147
+ * level. This projection packs complete floors into a compact, content-aware
148
+ * grid. Each floor receives one rigid translation: no seat, row, section,
149
+ * annotation, gap, or rotation changes, and the canonical document is never
150
+ * mutated.
151
+ */
152
+ declare function layoutFloorOverview(doc: ChartDoc): ChartDoc;
153
+ /**
154
+ * Rigid per-floor translations used by the buyer's complete-venue overview.
155
+ *
156
+ * Kept as a pure public helper so 2D and 3D can present the same non-overlapping
157
+ * level arrangement without either renderer rewriting the authored chart. A
158
+ * zero translation is returned for a single-floor document.
159
+ */
160
+ declare function floorOverviewTranslations(doc: ChartDoc): Point[];
161
+ interface ExpandChartOptions {
162
+ /** Physical height for a single-floor projection extracted from a multi-floor
163
+ * document. Full multi-floor documents resolve each floor directly. */
164
+ floorBaseHeightM?: number;
165
+ /** Resolve per-seat 3D eye heights (default true). Two-dimensional consumers
166
+ * such as thumbnails can disable this expensive stand-structure pass. */
167
+ resolveEyeHeights?: boolean;
168
+ }
169
+ /** Expand every seat-bearing object across all floors (rows, tables, booths).
170
+ * Multi-floor ownership is resolved one floor at a time: local coordinates may
171
+ * overlap between floors and must never assign a seat to another floor's section. */
172
+ declare function expandChart(doc: ChartDoc, options?: ExpandChartOptions): ExpandedSeat[];
173
+ /** Axis-aligned bounds over every object plus the background image, with padding. */
174
+ declare function chartBounds(doc: ChartDoc): {
175
+ x: number;
176
+ y: number;
177
+ width: number;
178
+ height: number;
179
+ };
180
+
181
+ export { type ExpandChartOptions as E, type RowSeatSlot as R, type TableSeatSlot as T, allObjects as a, expandChart as b, chartBounds as c, expandRow as d, expandBooth as e, expandRowSlots as f, expandTable as g, expandTableSlots as h, floorObjects as i, floorOverviewTranslations as j, floorsOf as k, layoutFloorOverview as l, owningSectionForObject as m, pointInPolygonWithHoles as n, objectCenter as o, pointInPolygon as p, polygonLabelPoint as q, rowInventoryCount as r, rowSeatPositions as s, stackFloors as t, tableInventoryCount as u, tableSeatCountsBySide as v, translateObject as w };
@@ -0,0 +1,113 @@
1
+ import { R as RendererQualityEvidence, a as RenderedFreeTextEvidence } from './renderer-B_g-W_QB.js';
2
+
3
+ declare const RENDERED_QUALITY_REPORT_VERSION = 3;
4
+ type RenderedEvidenceState = 'overview' | 'interaction';
5
+ type RenderedQualityFindingCode = 'bookable-label-undersized' | 'bookable-label-contrast-low' | 'bookable-label-collision' | 'hierarchy-label-undersized' | 'hierarchy-label-contrast-low' | 'hierarchy-label-outside-section' | 'hierarchy-label-collision' | 'hierarchy-bookable-collision' | 'overview-section-category-paint' | 'overview-category-detail-visible' | 'overview-row-hints-visible' | 'overview-availability-clutter' | 'overview-ga-detail-visible' | 'free-text-undersized' | 'free-text-contrast-low' | 'free-text-collision' | 'free-text-bookable-collision' | 'free-text-hierarchy-collision' | 'ga-contrast-low' | 'detail-rung-missing' | 'detail-inventory-not-visible' | 'pointer-target-undersized' | 'pointer-target-inactive' | 'selected-state-missing' | 'selected-state-contrast-low' | 'held-state-missing' | 'booked-state-missing' | 'status-state-indistinct' | 'section-focus-missing' | 'category-filter-missing' | 'category-filter-ineffective' | 'target-category-not-visible' | 'target-category-filter-mismatch';
6
+ interface RenderedQualitySample {
7
+ primaryId: string;
8
+ primaryLabel: string;
9
+ secondaryId?: string;
10
+ secondaryLabel?: string;
11
+ measured?: number;
12
+ minimum?: number;
13
+ }
14
+ interface RenderedQualityFinding {
15
+ code: RenderedQualityFindingCode;
16
+ message: string;
17
+ count: number;
18
+ samples: RenderedQualitySample[];
19
+ }
20
+ interface RenderedQualityReport {
21
+ version: typeof RENDERED_QUALITY_REPORT_VERSION;
22
+ passed: boolean;
23
+ state: RenderedEvidenceState;
24
+ /** Server-selected category exercised by a category-specific detail scene. */
25
+ targetCategoryKey: string | null;
26
+ /** Exact overview checks discharged by this browser-rendered report. */
27
+ resolvedRules: string[];
28
+ viewport: {
29
+ width: number;
30
+ height: number;
31
+ };
32
+ canvasBackground: string;
33
+ effectiveScale: number;
34
+ rung: RendererQualityEvidence['rung'];
35
+ inventory: {
36
+ totalBookableUnits: number;
37
+ totalLabelledBookableUnits: number;
38
+ visibleBookableLabels: number;
39
+ hiddenBookableLabels: number;
40
+ visibleHierarchyLabels: number;
41
+ visibleFreeTextLabels: number;
42
+ visibleGAAreas: number;
43
+ };
44
+ overviewStyle?: RendererQualityEvidence['overviewStyle'];
45
+ /**
46
+ * Coordinate-free identity evidence from the exact buyer scene. The Worker
47
+ * uses this to compare persisted reference semantics with what Chromium
48
+ * actually painted, without exposing screen boxes or accepting geometry.
49
+ */
50
+ composition: {
51
+ hierarchy: Array<{
52
+ id: string;
53
+ kind: 'section' | 'zone';
54
+ label: string;
55
+ visible: boolean;
56
+ }>;
57
+ labelledObjects: Array<{
58
+ objectId: string;
59
+ kind: RenderedFreeTextEvidence['kind'];
60
+ text: string;
61
+ visible: boolean;
62
+ }>;
63
+ gaAreas: Array<{
64
+ areaId: string;
65
+ label: string;
66
+ categoryKey: string;
67
+ sectionId?: string;
68
+ visible: boolean;
69
+ }>;
70
+ bookableSectionIds: string[];
71
+ categoryKeys: string[];
72
+ /** Categories whose non-dimmed bookable paint is visible in this scene. */
73
+ activeCategoryKeys: string[];
74
+ };
75
+ metrics: {
76
+ minimumRenderedBookableLabelPx: number | null;
77
+ minimumBookableLabelContrast: number | null;
78
+ minimumRenderedHierarchyLabelPx: number | null;
79
+ minimumHierarchyLabelContrast: number | null;
80
+ minimumRenderedFreeTextPx: number | null;
81
+ minimumFreeTextContrast: number | null;
82
+ minimumGAContrast: number | null;
83
+ minimumEffectivePointerTargetPx: number | null;
84
+ selectedRingContrast: number | null;
85
+ };
86
+ interaction: {
87
+ applicable: {
88
+ detail: boolean;
89
+ pointer: boolean;
90
+ held: boolean;
91
+ booked: boolean;
92
+ sectionFocus: boolean;
93
+ categoryFilter: boolean;
94
+ };
95
+ selectedUnits: number;
96
+ heldUnits: number;
97
+ bookedUnits: number;
98
+ activePointerTargets: number;
99
+ focusedSectionId: string | null;
100
+ focusBackdropVisible: boolean;
101
+ categoryFilterKeys: string[] | null;
102
+ };
103
+ findings: RenderedQualityFinding[];
104
+ }
105
+ /**
106
+ * Inspect what the buyer renderer actually decided to paint at one exact
107
+ * viewport. This is deliberately downstream of ChartDoc validation: screen
108
+ * size, LOD visibility, fitted hierarchy text, transient paint, and label
109
+ * collisions cannot be proven from stored geometry alone.
110
+ */
111
+ declare function inspectRenderedQualityEvidence(evidence: RendererQualityEvidence, state?: RenderedEvidenceState, targetCategoryKey?: string | null): RenderedQualityReport;
112
+
113
+ export { RENDERED_QUALITY_REPORT_VERSION as R, type RenderedEvidenceState as a, type RenderedQualityFinding as b, type RenderedQualityFindingCode as c, type RenderedQualityReport as d, type RenderedQualitySample as e, inspectRenderedQualityEvidence as i };