@seatlayer/core 0.53.0 → 0.54.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/README.md +2 -2
- package/dist/categoryInventory-B4xo7hE2.d.ts +109 -0
- package/dist/categoryInventory-lRtu3VjD.d.cts +109 -0
- package/dist/chunk-3QLFGEQY.js +1 -0
- package/dist/chunk-55NOSZK5.js +1 -0
- package/dist/chunk-6LIPQU4G.js +1 -0
- package/dist/chunk-6VTTBC5F.js +1 -0
- package/dist/chunk-7PT7OQUO.js +1 -0
- package/dist/chunk-AQKYUJBX.js +1 -0
- package/dist/chunk-CXF32VPG.js +1 -0
- package/dist/chunk-DDE7IOFT.js +1 -0
- package/dist/chunk-EQM4FFN5.js +1 -0
- package/dist/chunk-EYROIZGQ.js +1 -0
- package/dist/chunk-QUKWJQLR.js +1 -0
- package/dist/chunk-VDZ24QVV.js +1 -0
- package/dist/core/chart-ops/index.cjs +1 -0
- package/dist/core/chart-ops/index.d.cts +1235 -0
- package/dist/core/chart-ops/index.d.ts +1235 -0
- package/dist/core/chart-ops/index.js +1 -0
- package/dist/core/color.cjs +1 -0
- package/dist/core/color.d.cts +192 -0
- package/dist/core/color.d.ts +192 -0
- package/dist/core/color.js +1 -0
- package/dist/core/inventory/index.cjs +1 -0
- package/dist/core/inventory/index.d.cts +209 -0
- package/dist/core/inventory/index.d.ts +209 -0
- package/dist/core/inventory/index.js +1 -0
- package/dist/core/layout/index.cjs +1 -0
- package/dist/core/layout/index.d.cts +376 -0
- package/dist/core/layout/index.d.ts +376 -0
- package/dist/core/layout/index.js +1 -0
- package/dist/core/quality/index.cjs +1 -0
- package/dist/core/quality/index.d.cts +132 -0
- package/dist/core/quality/index.d.ts +132 -0
- package/dist/core/quality/index.js +1 -0
- package/dist/core/render-assets/index.cjs +1 -0
- package/dist/core/render-assets/index.d.cts +99 -0
- package/dist/core/render-assets/index.d.ts +99 -0
- package/dist/core/render-assets/index.js +1 -0
- package/dist/core/seatConfidence.cjs +1 -1
- package/dist/core/seatConfidence.d.cts +1 -1
- package/dist/core/seatConfidence.d.ts +1 -1
- package/dist/core/seatConfidence.js +1 -1
- package/dist/core/sections/index.cjs +1 -0
- package/dist/core/sections/index.d.cts +346 -0
- package/dist/core/sections/index.d.ts +346 -0
- package/dist/core/sections/index.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +39 -533
- package/dist/index.d.ts +39 -533
- package/dist/index.js +1 -1
- package/dist/labeling-CsPt1mC_.d.cts +90 -0
- package/dist/labeling-w8bl86cb.d.ts +90 -0
- package/dist/layout-B5UYbwnv.d.ts +181 -0
- package/dist/layout-YFmuxw_M.d.cts +181 -0
- package/dist/renderedQuality-CugJarFp.d.cts +113 -0
- package/dist/renderedQuality-DbZM034G.d.ts +113 -0
- package/dist/renderer-DhUHFtsI.d.cts +531 -0
- package/dist/renderer-IBi9YKWR.d.ts +531 -0
- package/dist/sections-B7cDF0Nq.d.cts +123 -0
- package/dist/sections-mLOZrGrI.d.ts +123 -0
- package/dist/segmentedRowModel-BPTnJ7Tz.d.ts +75 -0
- package/dist/segmentedRowModel-CGoH684F.d.cts +75 -0
- package/dist/ticketRestrictions-BwAebpSK.d.cts +72 -0
- package/dist/ticketRestrictions-ChHJwvTq.d.ts +72 -0
- package/dist/{types-tLOunI-B.d.cts → types-COfJorq_.d.cts} +233 -757
- package/dist/{types-tLOunI-B.d.ts → types-COfJorq_.d.ts} +233 -757
- package/dist/view3d/crossfade/panorama.d.cts +1 -1
- package/dist/view3d/crossfade/panorama.d.ts +1 -1
- package/dist/view3d/index.cjs +25 -25
- package/dist/view3d/index.d.cts +2 -1
- package/dist/view3d/index.d.ts +2 -1
- package/dist/view3d/index.js +27 -27
- package/package.json +94 -5
- package/dist/chunk-54A7LIL5.js +0 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { d as SectionObject, C as ChartDoc } from './types-COfJorq_.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Real-world scale primitives — the ONE place the app fixes chart-unit ↔ metre ↔
|
|
5
|
+
* renderer-world scale, and the section 3D-geometry resolver that rides on it.
|
|
6
|
+
*
|
|
7
|
+
* Everything that converts between chart units, metres, and renderer "world"
|
|
8
|
+
* units derives from {@link METRES_PER_CHART_UNIT}. Renderer world units and
|
|
9
|
+
* chart units are 1:1, so metres → world is exactly {@link CHART_UNITS_PER_METRE}
|
|
10
|
+
* (the single m→world conversion constant Phase B consumers use).
|
|
11
|
+
*
|
|
12
|
+
* This is a leaf module (types only) so both `layout.ts` and `sections.ts` can
|
|
13
|
+
* import it without the two forming an import cycle.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Metres of front-edge height one elevation tier represents. Chosen (not guessed)
|
|
18
|
+
* so `elevation × TIER_HEIGHT_M` metres, scaled back through
|
|
19
|
+
* {@link CHART_UNITS_PER_METRE}, equals the legacy `elevation × LIFT_PER_STEP`
|
|
20
|
+
* world lift exactly — an un-authored chart stays pixel-identical. ≈ 1.329 m/tier.
|
|
21
|
+
*/
|
|
22
|
+
declare const TIER_HEIGHT_M: number;
|
|
23
|
+
/**
|
|
24
|
+
* Resolve a section's real 3D geometry, applying the legacy-elevation fallback so
|
|
25
|
+
* old charts and new charts share ONE code path. Every consumer (iso lift, 360°
|
|
26
|
+
* eye-height, author lint, any 2D depth cue) must call this and never read the raw
|
|
27
|
+
* {@link SectionObject.height}/{@link SectionObject.rake} fields — that is what
|
|
28
|
+
* keeps un-authored charts rendering identically to today.
|
|
29
|
+
*
|
|
30
|
+
* - `height`: authored absolute metres if present, else owning-floor base height
|
|
31
|
+
* plus `elevation × TIER_HEIGHT_M`.
|
|
32
|
+
* - `rake`: authored degrees if present, else 0 (flat).
|
|
33
|
+
*
|
|
34
|
+
* Malformed values are bounded here as a last defensive barrier. Structural
|
|
35
|
+
* validation still reports them so drafts can be repaired instead of silently
|
|
36
|
+
* persisting a renderer-only interpretation.
|
|
37
|
+
*
|
|
38
|
+
* Pure — no document mutation, no side effects.
|
|
39
|
+
*/
|
|
40
|
+
interface SectionGeometryContext {
|
|
41
|
+
/** Absolute physical height of the owning floor above the venue datum. */
|
|
42
|
+
floorBaseHeightM?: number;
|
|
43
|
+
}
|
|
44
|
+
declare function sectionGeometry(section: Pick<SectionObject, 'elevation' | 'height' | 'rake'>, context?: SectionGeometryContext): {
|
|
45
|
+
height: number;
|
|
46
|
+
rake: number;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Section membership + hide/show resolution (Batch 3.3).
|
|
51
|
+
*
|
|
52
|
+
* A `SectionObject` is a polygon drawn over existing seat objects; an object
|
|
53
|
+
* "belongs" to a section when its visual centre (`objectCenter`) falls inside
|
|
54
|
+
* the section outline, first section in doc order winning. This is the same
|
|
55
|
+
* spatial notion `objectCenter`'s doc-comment describes, resolved once here so
|
|
56
|
+
* BOTH the event manager (Sections tab counts) and the buyer picker (omit
|
|
57
|
+
* hidden seats) agree on which seats live in which section.
|
|
58
|
+
*
|
|
59
|
+
* Hiding is per-EVENT (the EventDO holds the hidden id set), not a chart edit —
|
|
60
|
+
* so a republish of the chart never disturbs it. A hidden id may be a section
|
|
61
|
+
* id, a zone id (hides every section in the zone), or `UNGROUPED_ID` (the
|
|
62
|
+
* catch-all bucket of seat objects that sit in no section).
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
/** Synthetic section id for seat objects that fall in no drawn section. */
|
|
66
|
+
declare const UNGROUPED_ID = "__ungrouped__";
|
|
67
|
+
/**
|
|
68
|
+
* A per section/zone availability window (Batch 3.4). Wire-compatible with the
|
|
69
|
+
* EventDO's own `AvailabilityRule`. Absence of a rule for an id = on sale.
|
|
70
|
+
* 'hidden' — manual: hidden until the organizer reveals it (3.3).
|
|
71
|
+
* 'timed' — hidden until `revealAt` (epoch ms), then auto-reveals.
|
|
72
|
+
* 'threshold' — auto-reveals once the on-sale inventory is `thresholdPct`% sold.
|
|
73
|
+
* 'closed' — visible to buyers but not purchasable (rendered flat grey);
|
|
74
|
+
* unlike 'hidden', the seats stay on the map, just off sale.
|
|
75
|
+
* `labels` are the seat labels the id governs, so a threshold's denominator can
|
|
76
|
+
* exclude still-hidden seats.
|
|
77
|
+
*/
|
|
78
|
+
interface AvailabilityRule {
|
|
79
|
+
mode: 'hidden' | 'timed' | 'threshold' | 'closed';
|
|
80
|
+
revealAt?: number;
|
|
81
|
+
thresholdPct?: number;
|
|
82
|
+
labels?: string[];
|
|
83
|
+
}
|
|
84
|
+
interface SectionNode {
|
|
85
|
+
/** Section id (a `SectionObject.id`, or `UNGROUPED_ID`). */
|
|
86
|
+
id: string;
|
|
87
|
+
label: string;
|
|
88
|
+
/** Zone id this section points at (`SectionObject.zone`), if any. */
|
|
89
|
+
zone?: string;
|
|
90
|
+
/** Total seats across the member objects. */
|
|
91
|
+
seatCount: number;
|
|
92
|
+
/** Ids of the seat-bearing objects that belong to this section. */
|
|
93
|
+
objectIds: string[];
|
|
94
|
+
/** Seat labels across the member objects (for availability-rule denominators). */
|
|
95
|
+
seatLabels: string[];
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Resolve section membership for a chart. Returns one node per drawn section
|
|
99
|
+
* (doc order), a synthetic "Ungrouped" node for loose seat objects (null when
|
|
100
|
+
* every seat sits in a section), and the object→section id map.
|
|
101
|
+
*/
|
|
102
|
+
declare function computeSections(doc: ChartDoc): {
|
|
103
|
+
sections: SectionNode[];
|
|
104
|
+
ungrouped: SectionNode | null;
|
|
105
|
+
/** seat-object id → owning section id (or `UNGROUPED_ID`). */
|
|
106
|
+
objectToSection: Map<string, string>;
|
|
107
|
+
};
|
|
108
|
+
/** Is a drawn section hidden under `hidden` — directly, or via its zone? */
|
|
109
|
+
declare function isSectionHidden(s: SectionObject, hidden: ReadonlySet<string>): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* The set of seat-object ids to omit from the buyer view for a given hidden id
|
|
112
|
+
* set. An object is hidden when its owning section is hidden (directly or via
|
|
113
|
+
* zone), or it is ungrouped and the catch-all bucket is hidden.
|
|
114
|
+
*/
|
|
115
|
+
declare function hiddenObjectIds(doc: ChartDoc, hidden: ReadonlySet<string>): Set<string>;
|
|
116
|
+
/**
|
|
117
|
+
* A copy of the doc with hidden sections' member objects removed, plus the
|
|
118
|
+
* hidden section overlays themselves (so no empty block renders). Returns the
|
|
119
|
+
* SAME reference when nothing is hidden — callers can skip a re-render on `===`.
|
|
120
|
+
*/
|
|
121
|
+
declare function applyHidden(doc: ChartDoc, hidden: ReadonlySet<string>): ChartDoc;
|
|
122
|
+
|
|
123
|
+
export { type AvailabilityRule as A, type SectionNode as S, TIER_HEIGHT_M as T, UNGROUPED_ID as U, applyHidden as a, computeSections as c, hiddenObjectIds as h, isSectionHidden as i, sectionGeometry as s };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { P as Point, R as RowObject, c as ChartObject } from './types-COfJorq_.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The segmented-row model — one logical row made of several physical rows.
|
|
5
|
+
*
|
|
6
|
+
* A segmented row is drawn as a chain of nodes and stored as N physical
|
|
7
|
+
* `RowObject`s tied together by `segmentedRow` metadata. Two questions have to
|
|
8
|
+
* be answered consistently or the feature lies to somebody:
|
|
9
|
+
*
|
|
10
|
+
* 1. **At draft time** — given the author's nodes, exactly which components,
|
|
11
|
+
* seat counts and pitches will be committed? (`segmentedRowComponents`)
|
|
12
|
+
* 2. **At read time** — given stored physical rows, what is the logical row they
|
|
13
|
+
* form, and where does each component sit inside its numbering?
|
|
14
|
+
* (`resolveSegmentedRowGroups`)
|
|
15
|
+
*
|
|
16
|
+
* These lived apart — (1) in `rowDraft.ts` next to the ghost preview, (2) in
|
|
17
|
+
* `layout.ts` next to buyer expansion — which is precisely how the canvas came
|
|
18
|
+
* to number a segmented row `1-7` / `1-6` while buyers correctly saw
|
|
19
|
+
* `A-1…A-13`. They are two halves of one rule, so they live in one module.
|
|
20
|
+
*
|
|
21
|
+
* The standing rule this module exists to enforce: **the ghost preview and the
|
|
22
|
+
* commit share one resolver.** A preview that can lie is a bug.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** One physical component of a segmented (node-drawn) row. */
|
|
26
|
+
interface SegmentedRowComponent {
|
|
27
|
+
origin: Point;
|
|
28
|
+
/** Bearing in degrees, matching RowObject.rotation. */
|
|
29
|
+
rotation: number;
|
|
30
|
+
seatCount: number;
|
|
31
|
+
/** Pitch is per-component: each span divides evenly into whole seats. */
|
|
32
|
+
seatSpacing: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Resolve node points into the exact components `finishSegmentedRowDrawing`
|
|
36
|
+
* commits, so the ghost preview and the committed rows always agree.
|
|
37
|
+
*
|
|
38
|
+
* `boundaries[i]` describes the junction BEFORE component i+1. The first
|
|
39
|
+
* component owns the first node's seat; every later component starts one pitch
|
|
40
|
+
* after its junction so a continuous bend never double-books a seat, and a
|
|
41
|
+
* declared break skips two pitches to leave a visible aisle.
|
|
42
|
+
*/
|
|
43
|
+
declare function segmentedRowComponents(points: readonly Point[], boundaries: readonly ('continuous' | 'break')[], seatSpacing: number): SegmentedRowComponent[];
|
|
44
|
+
/** Seat centres for a resolved component, in seat order. */
|
|
45
|
+
declare function segmentedRowComponentSeats(component: SegmentedRowComponent): Point[];
|
|
46
|
+
/** Total seats a segmented draft would commit — the number the badge shows. */
|
|
47
|
+
declare function segmentedRowSeatTotal(components: readonly SegmentedRowComponent[]): number;
|
|
48
|
+
/** Resolved logical placement of one physical component inside a segmented row. */
|
|
49
|
+
interface SegmentedRowPlacement {
|
|
50
|
+
groupId: string;
|
|
51
|
+
/** Buyer adjacency index base (a declared aisle break costs one index). */
|
|
52
|
+
adjacencyOffset: number;
|
|
53
|
+
/** Continuous seat-numbering base across the whole logical row. */
|
|
54
|
+
displayOffset: number;
|
|
55
|
+
displayLabel: string;
|
|
56
|
+
totalSeats: number;
|
|
57
|
+
canonical: RowObject;
|
|
58
|
+
viewFromSeatUrl?: string;
|
|
59
|
+
viewFromSeatMeta?: RowObject['viewFromSeatMeta'];
|
|
60
|
+
confidenceEvidence?: RowObject['confidenceEvidence'];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Group physical rows into their logical segmented rows, keyed by physical row id.
|
|
64
|
+
*
|
|
65
|
+
* Resolves only complete, internally coherent groups. Malformed metadata is
|
|
66
|
+
* surfaced by validation and deliberately falls back to physical-row semantics,
|
|
67
|
+
* so a corrupt document can never make buyer adjacency more permissive than the
|
|
68
|
+
* legacy model.
|
|
69
|
+
*
|
|
70
|
+
* Shared by buyer expansion AND the Designer canvas so a segmented row cannot be
|
|
71
|
+
* numbered one way for buyers and another way for the author.
|
|
72
|
+
*/
|
|
73
|
+
declare function resolveSegmentedRowGroups(objects: readonly ChartObject[]): Map<string, SegmentedRowPlacement>;
|
|
74
|
+
|
|
75
|
+
export { type SegmentedRowPlacement as S, type SegmentedRowComponent as a, segmentedRowComponents as b, segmentedRowSeatTotal as c, resolveSegmentedRowGroups as r, segmentedRowComponentSeats as s };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { P as Point, R as RowObject, c as ChartObject } from './types-COfJorq_.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The segmented-row model — one logical row made of several physical rows.
|
|
5
|
+
*
|
|
6
|
+
* A segmented row is drawn as a chain of nodes and stored as N physical
|
|
7
|
+
* `RowObject`s tied together by `segmentedRow` metadata. Two questions have to
|
|
8
|
+
* be answered consistently or the feature lies to somebody:
|
|
9
|
+
*
|
|
10
|
+
* 1. **At draft time** — given the author's nodes, exactly which components,
|
|
11
|
+
* seat counts and pitches will be committed? (`segmentedRowComponents`)
|
|
12
|
+
* 2. **At read time** — given stored physical rows, what is the logical row they
|
|
13
|
+
* form, and where does each component sit inside its numbering?
|
|
14
|
+
* (`resolveSegmentedRowGroups`)
|
|
15
|
+
*
|
|
16
|
+
* These lived apart — (1) in `rowDraft.ts` next to the ghost preview, (2) in
|
|
17
|
+
* `layout.ts` next to buyer expansion — which is precisely how the canvas came
|
|
18
|
+
* to number a segmented row `1-7` / `1-6` while buyers correctly saw
|
|
19
|
+
* `A-1…A-13`. They are two halves of one rule, so they live in one module.
|
|
20
|
+
*
|
|
21
|
+
* The standing rule this module exists to enforce: **the ghost preview and the
|
|
22
|
+
* commit share one resolver.** A preview that can lie is a bug.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/** One physical component of a segmented (node-drawn) row. */
|
|
26
|
+
interface SegmentedRowComponent {
|
|
27
|
+
origin: Point;
|
|
28
|
+
/** Bearing in degrees, matching RowObject.rotation. */
|
|
29
|
+
rotation: number;
|
|
30
|
+
seatCount: number;
|
|
31
|
+
/** Pitch is per-component: each span divides evenly into whole seats. */
|
|
32
|
+
seatSpacing: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Resolve node points into the exact components `finishSegmentedRowDrawing`
|
|
36
|
+
* commits, so the ghost preview and the committed rows always agree.
|
|
37
|
+
*
|
|
38
|
+
* `boundaries[i]` describes the junction BEFORE component i+1. The first
|
|
39
|
+
* component owns the first node's seat; every later component starts one pitch
|
|
40
|
+
* after its junction so a continuous bend never double-books a seat, and a
|
|
41
|
+
* declared break skips two pitches to leave a visible aisle.
|
|
42
|
+
*/
|
|
43
|
+
declare function segmentedRowComponents(points: readonly Point[], boundaries: readonly ('continuous' | 'break')[], seatSpacing: number): SegmentedRowComponent[];
|
|
44
|
+
/** Seat centres for a resolved component, in seat order. */
|
|
45
|
+
declare function segmentedRowComponentSeats(component: SegmentedRowComponent): Point[];
|
|
46
|
+
/** Total seats a segmented draft would commit — the number the badge shows. */
|
|
47
|
+
declare function segmentedRowSeatTotal(components: readonly SegmentedRowComponent[]): number;
|
|
48
|
+
/** Resolved logical placement of one physical component inside a segmented row. */
|
|
49
|
+
interface SegmentedRowPlacement {
|
|
50
|
+
groupId: string;
|
|
51
|
+
/** Buyer adjacency index base (a declared aisle break costs one index). */
|
|
52
|
+
adjacencyOffset: number;
|
|
53
|
+
/** Continuous seat-numbering base across the whole logical row. */
|
|
54
|
+
displayOffset: number;
|
|
55
|
+
displayLabel: string;
|
|
56
|
+
totalSeats: number;
|
|
57
|
+
canonical: RowObject;
|
|
58
|
+
viewFromSeatUrl?: string;
|
|
59
|
+
viewFromSeatMeta?: RowObject['viewFromSeatMeta'];
|
|
60
|
+
confidenceEvidence?: RowObject['confidenceEvidence'];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Group physical rows into their logical segmented rows, keyed by physical row id.
|
|
64
|
+
*
|
|
65
|
+
* Resolves only complete, internally coherent groups. Malformed metadata is
|
|
66
|
+
* surfaced by validation and deliberately falls back to physical-row semantics,
|
|
67
|
+
* so a corrupt document can never make buyer adjacency more permissive than the
|
|
68
|
+
* legacy model.
|
|
69
|
+
*
|
|
70
|
+
* Shared by buyer expansion AND the Designer canvas so a segmented row cannot be
|
|
71
|
+
* numbered one way for buyers and another way for the author.
|
|
72
|
+
*/
|
|
73
|
+
declare function resolveSegmentedRowGroups(objects: readonly ChartObject[]): Map<string, SegmentedRowPlacement>;
|
|
74
|
+
|
|
75
|
+
export { type SegmentedRowPlacement as S, type SegmentedRowComponent as a, segmentedRowComponents as b, segmentedRowSeatTotal as c, resolveSegmentedRowGroups as r, segmentedRowComponentSeats as s };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { C as ChartDoc, G as GAAreaObject, k as GAInventorySegment, l as CategoryTier } from './types-COfJorq_.cjs';
|
|
2
|
+
import { E as ExpandedSeat } from './renderer-DhUHFtsI.cjs';
|
|
3
|
+
|
|
4
|
+
declare const MAX_GA_CAPACITY = 100000;
|
|
5
|
+
declare const MAX_EVENT_INVENTORY = 100000;
|
|
6
|
+
/** Stable internal inventory label for one unit of a GA area's capacity. */
|
|
7
|
+
declare function gaUnitLabel(areaId: string, index: number): string;
|
|
8
|
+
/** Strict, bounded validation for durable Join Areas inventory provenance. */
|
|
9
|
+
declare function validGAInventorySegments(area: GAAreaObject): boolean;
|
|
10
|
+
/** Canonical source ranges. Invalid explicit provenance intentionally yields no
|
|
11
|
+
* labels: chart validation blocks publication instead of inventing identities. */
|
|
12
|
+
declare function gaInventorySegments(area: GAAreaObject): GAInventorySegment[];
|
|
13
|
+
declare function gaUnitLabels(area: GAAreaObject): string[];
|
|
14
|
+
/** Append-only capacity semantics for an already joined GA surface. */
|
|
15
|
+
declare function growJoinedGAInventory(area: GAAreaObject, nextCapacity: number): GAInventorySegment[] | undefined;
|
|
16
|
+
declare function gaAreasOf(doc: ChartDoc): GAAreaObject[];
|
|
17
|
+
declare function isGaUnitLabel(label: string): boolean;
|
|
18
|
+
|
|
19
|
+
interface TicketSelection {
|
|
20
|
+
label: string;
|
|
21
|
+
tierId?: string | null;
|
|
22
|
+
}
|
|
23
|
+
interface CompanionSelectionIssue {
|
|
24
|
+
code: 'companion_pair_required';
|
|
25
|
+
labels: string[];
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
interface TicketOptionApplicabilityIssue {
|
|
29
|
+
code: 'ticket_option_not_applicable';
|
|
30
|
+
labels: string[];
|
|
31
|
+
message: string;
|
|
32
|
+
}
|
|
33
|
+
interface NotForSaleSelectionIssue {
|
|
34
|
+
code: 'not_for_sale';
|
|
35
|
+
labels: string[];
|
|
36
|
+
message: string;
|
|
37
|
+
}
|
|
38
|
+
type TicketSelectionIssue = CompanionSelectionIssue | TicketOptionApplicabilityIssue | NotForSaleSelectionIssue;
|
|
39
|
+
type TicketTierResolution = {
|
|
40
|
+
kind: 'none';
|
|
41
|
+
} | {
|
|
42
|
+
kind: 'resolved';
|
|
43
|
+
tier: CategoryTier;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'invalid';
|
|
46
|
+
};
|
|
47
|
+
declare function ticketOptionNotApplicableIssue(labels: string[]): TicketOptionApplicabilityIssue;
|
|
48
|
+
declare function ticketTierAppliesToSeat(tier: CategoryTier, seat: Pick<ExpandedSeat, 'label' | 'accessibility'>): boolean;
|
|
49
|
+
/** Ticket choices that are genuinely applicable to this native inventory unit. */
|
|
50
|
+
declare function applicableTicketTiers(doc: ChartDoc, seat: Pick<ExpandedSeat, 'label' | 'categoryKey' | 'accessibility'>): CategoryTier[];
|
|
51
|
+
/**
|
|
52
|
+
* One deterministic default for every buyer path. A category without tiers
|
|
53
|
+
* keeps its ordinary category price. A tiered category resolves an omitted id
|
|
54
|
+
* to its first applicable authored tier and fails closed when none applies.
|
|
55
|
+
*/
|
|
56
|
+
declare function resolveTicketTierForSeat(doc: ChartDoc, seat: Pick<ExpandedSeat, 'label' | 'categoryKey' | 'accessibility'>, tierId?: string | null): TicketTierResolution;
|
|
57
|
+
/**
|
|
58
|
+
* Enforce only the companion relationship the chart states explicitly. A
|
|
59
|
+
* display name such as "Companion" is deliberately not semantic evidence.
|
|
60
|
+
* The paired wheelchair place must be selected and adjacent in the authored
|
|
61
|
+
* logical row; aisle gaps therefore cannot accidentally satisfy the rule.
|
|
62
|
+
*/
|
|
63
|
+
declare function companionSelectionIssue(doc: ChartDoc, selections: readonly TicketSelection[]): CompanionSelectionIssue | null;
|
|
64
|
+
/**
|
|
65
|
+
* Shared buyer/server ticket validation. Applicability is checked before the
|
|
66
|
+
* companion relationship so a forged tier id cannot be disguised as a pairing
|
|
67
|
+
* problem. Unknown labels/tier ids remain the caller's ordinary invalid-selection
|
|
68
|
+
* concern; this function owns only explicit chart semantics.
|
|
69
|
+
*/
|
|
70
|
+
declare function ticketSelectionIssue(doc: ChartDoc, selections: readonly TicketSelection[]): TicketSelectionIssue | null;
|
|
71
|
+
|
|
72
|
+
export { type CompanionSelectionIssue as C, MAX_EVENT_INVENTORY as M, type NotForSaleSelectionIssue as N, type TicketOptionApplicabilityIssue as T, MAX_GA_CAPACITY as a, type TicketSelection as b, type TicketSelectionIssue as c, type TicketTierResolution as d, applicableTicketTiers as e, companionSelectionIssue as f, gaAreasOf as g, gaInventorySegments as h, gaUnitLabel as i, gaUnitLabels as j, growJoinedGAInventory as k, isGaUnitLabel as l, ticketSelectionIssue as m, ticketTierAppliesToSeat as n, resolveTicketTierForSeat as r, ticketOptionNotApplicableIssue as t, validGAInventorySegments as v };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { C as ChartDoc, G as GAAreaObject, k as GAInventorySegment, l as CategoryTier } from './types-COfJorq_.js';
|
|
2
|
+
import { E as ExpandedSeat } from './renderer-IBi9YKWR.js';
|
|
3
|
+
|
|
4
|
+
declare const MAX_GA_CAPACITY = 100000;
|
|
5
|
+
declare const MAX_EVENT_INVENTORY = 100000;
|
|
6
|
+
/** Stable internal inventory label for one unit of a GA area's capacity. */
|
|
7
|
+
declare function gaUnitLabel(areaId: string, index: number): string;
|
|
8
|
+
/** Strict, bounded validation for durable Join Areas inventory provenance. */
|
|
9
|
+
declare function validGAInventorySegments(area: GAAreaObject): boolean;
|
|
10
|
+
/** Canonical source ranges. Invalid explicit provenance intentionally yields no
|
|
11
|
+
* labels: chart validation blocks publication instead of inventing identities. */
|
|
12
|
+
declare function gaInventorySegments(area: GAAreaObject): GAInventorySegment[];
|
|
13
|
+
declare function gaUnitLabels(area: GAAreaObject): string[];
|
|
14
|
+
/** Append-only capacity semantics for an already joined GA surface. */
|
|
15
|
+
declare function growJoinedGAInventory(area: GAAreaObject, nextCapacity: number): GAInventorySegment[] | undefined;
|
|
16
|
+
declare function gaAreasOf(doc: ChartDoc): GAAreaObject[];
|
|
17
|
+
declare function isGaUnitLabel(label: string): boolean;
|
|
18
|
+
|
|
19
|
+
interface TicketSelection {
|
|
20
|
+
label: string;
|
|
21
|
+
tierId?: string | null;
|
|
22
|
+
}
|
|
23
|
+
interface CompanionSelectionIssue {
|
|
24
|
+
code: 'companion_pair_required';
|
|
25
|
+
labels: string[];
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
interface TicketOptionApplicabilityIssue {
|
|
29
|
+
code: 'ticket_option_not_applicable';
|
|
30
|
+
labels: string[];
|
|
31
|
+
message: string;
|
|
32
|
+
}
|
|
33
|
+
interface NotForSaleSelectionIssue {
|
|
34
|
+
code: 'not_for_sale';
|
|
35
|
+
labels: string[];
|
|
36
|
+
message: string;
|
|
37
|
+
}
|
|
38
|
+
type TicketSelectionIssue = CompanionSelectionIssue | TicketOptionApplicabilityIssue | NotForSaleSelectionIssue;
|
|
39
|
+
type TicketTierResolution = {
|
|
40
|
+
kind: 'none';
|
|
41
|
+
} | {
|
|
42
|
+
kind: 'resolved';
|
|
43
|
+
tier: CategoryTier;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'invalid';
|
|
46
|
+
};
|
|
47
|
+
declare function ticketOptionNotApplicableIssue(labels: string[]): TicketOptionApplicabilityIssue;
|
|
48
|
+
declare function ticketTierAppliesToSeat(tier: CategoryTier, seat: Pick<ExpandedSeat, 'label' | 'accessibility'>): boolean;
|
|
49
|
+
/** Ticket choices that are genuinely applicable to this native inventory unit. */
|
|
50
|
+
declare function applicableTicketTiers(doc: ChartDoc, seat: Pick<ExpandedSeat, 'label' | 'categoryKey' | 'accessibility'>): CategoryTier[];
|
|
51
|
+
/**
|
|
52
|
+
* One deterministic default for every buyer path. A category without tiers
|
|
53
|
+
* keeps its ordinary category price. A tiered category resolves an omitted id
|
|
54
|
+
* to its first applicable authored tier and fails closed when none applies.
|
|
55
|
+
*/
|
|
56
|
+
declare function resolveTicketTierForSeat(doc: ChartDoc, seat: Pick<ExpandedSeat, 'label' | 'categoryKey' | 'accessibility'>, tierId?: string | null): TicketTierResolution;
|
|
57
|
+
/**
|
|
58
|
+
* Enforce only the companion relationship the chart states explicitly. A
|
|
59
|
+
* display name such as "Companion" is deliberately not semantic evidence.
|
|
60
|
+
* The paired wheelchair place must be selected and adjacent in the authored
|
|
61
|
+
* logical row; aisle gaps therefore cannot accidentally satisfy the rule.
|
|
62
|
+
*/
|
|
63
|
+
declare function companionSelectionIssue(doc: ChartDoc, selections: readonly TicketSelection[]): CompanionSelectionIssue | null;
|
|
64
|
+
/**
|
|
65
|
+
* Shared buyer/server ticket validation. Applicability is checked before the
|
|
66
|
+
* companion relationship so a forged tier id cannot be disguised as a pairing
|
|
67
|
+
* problem. Unknown labels/tier ids remain the caller's ordinary invalid-selection
|
|
68
|
+
* concern; this function owns only explicit chart semantics.
|
|
69
|
+
*/
|
|
70
|
+
declare function ticketSelectionIssue(doc: ChartDoc, selections: readonly TicketSelection[]): TicketSelectionIssue | null;
|
|
71
|
+
|
|
72
|
+
export { type CompanionSelectionIssue as C, MAX_EVENT_INVENTORY as M, type NotForSaleSelectionIssue as N, type TicketOptionApplicabilityIssue as T, MAX_GA_CAPACITY as a, type TicketSelection as b, type TicketSelectionIssue as c, type TicketTierResolution as d, applicableTicketTiers as e, companionSelectionIssue as f, gaAreasOf as g, gaInventorySegments as h, gaUnitLabel as i, gaUnitLabels as j, growJoinedGAInventory as k, isGaUnitLabel as l, ticketSelectionIssue as m, ticketTierAppliesToSeat as n, resolveTicketTierForSeat as r, ticketOptionNotApplicableIssue as t, validGAInventorySegments as v };
|