@seatmap-fyi/map-domain 0.1.0-alpha.3 → 0.1.0-alpha.4

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.
@@ -0,0 +1,30 @@
1
+ import { SeatingKind, type RoundTable, type RectangularTable, type LongTableLayout, type RoundTableRecipe } from "./types.js";
2
+ import type { TableInventory } from "./selling.js";
3
+ export declare const TableLayoutUnitM: number;
4
+ export declare const TableLayoutDefaults: {
5
+ readonly chairSizeM: number;
6
+ readonly chairGapM: number;
7
+ };
8
+ export declare const TableLayoutLimits: {
9
+ readonly chairs: 40;
10
+ readonly arcMin: 120;
11
+ readonly arcMax: 360;
12
+ readonly radiusMinM: 0.6;
13
+ readonly radiusMaxM: 3.7;
14
+ readonly widthMinM: 0.9;
15
+ readonly widthMaxM: 7.3;
16
+ readonly heightMinM: 0.7;
17
+ readonly heightMaxM: 5.5;
18
+ };
19
+ export declare const TableChairSides: readonly ["top", "bottom", "left", "right"];
20
+ export declare function defaultRoundTableRecipe(): RoundTableRecipe;
21
+ export declare function defaultLongTableLayout(): LongTableLayout;
22
+ /** Shared by committed count reconciliation and placement previews. */
23
+ export declare function automaticTableRadiusM(count: number, arcDeg: number): number;
24
+ export declare function resizeRoundTable(table: RoundTable): RoundTable;
25
+ export declare function setRoundTableAutomaticSize(table: RoundTable, automaticSize: boolean): RoundTable;
26
+ export declare function setRoundTableArc(table: RoundTable, requested: number): RoundTable;
27
+ export declare function setRoundTableRadius(table: RoundTable, requested: number): RoundTable;
28
+ export declare function setLongTableDimensions(table: RectangularTable, widthM: number, depthM: number): RectangularTable;
29
+ /** Shape changes retain inventory identity, personal overrides and the inactive shape settings. */
30
+ export declare function changeTableShape(table: TableInventory, kind: SeatingKind.Round | SeatingKind.Rectangular): TableInventory;
@@ -0,0 +1,142 @@
1
+ import { SeatingKind, TableChairDistribution, } from "./types.js";
2
+ // The retained normal-UI exports and table transform specimen use 24 units per .55m.
3
+ export const TableLayoutUnitM = 0.55 / 24;
4
+ export const TableLayoutDefaults = {
5
+ chairSizeM: 18 * TableLayoutUnitM,
6
+ chairGapM: 7 * TableLayoutUnitM,
7
+ };
8
+ export const TableLayoutLimits = {
9
+ chairs: 40,
10
+ arcMin: 120,
11
+ arcMax: 360,
12
+ radiusMinM: 0.6,
13
+ radiusMaxM: 3.7,
14
+ widthMinM: 0.9,
15
+ widthMaxM: 7.3,
16
+ heightMinM: 0.7,
17
+ heightMaxM: 5.5,
18
+ };
19
+ export const TableChairSides = ["top", "bottom", "left", "right"];
20
+ export function defaultRoundTableRecipe() {
21
+ return {
22
+ diameterM: 72 * TableLayoutUnitM,
23
+ chairGapM: TableLayoutDefaults.chairGapM,
24
+ startAngleDeg: 0,
25
+ automaticSize: true,
26
+ seatArcDeg: 360,
27
+ };
28
+ }
29
+ export function defaultLongTableLayout() {
30
+ return {
31
+ recipe: {
32
+ widthM: 80 * TableLayoutUnitM,
33
+ depthM: 50 * TableLayoutUnitM,
34
+ chairGapM: TableLayoutDefaults.chairGapM,
35
+ chairDistribution: TableChairDistribution.EqualSegments,
36
+ },
37
+ sides: { top: true, bottom: true, left: false, right: false },
38
+ };
39
+ }
40
+ /** Shared by committed count reconciliation and placement previews. */
41
+ export function automaticTableRadiusM(count, arcDeg) {
42
+ return (Math.min(160, Math.max(36, (count * 4 * 360) / arcDeg)) * TableLayoutUnitM);
43
+ }
44
+ export function resizeRoundTable(table) {
45
+ if (!table.recipe.automaticSize)
46
+ return table;
47
+ const diameterM = 2 *
48
+ automaticTableRadiusM(table.chairs.length, table.recipe.seatArcDeg ?? 360);
49
+ if (diameterM === table.recipe.diameterM)
50
+ return table;
51
+ return { ...table, recipe: { ...table.recipe, diameterM } };
52
+ }
53
+ export function setRoundTableAutomaticSize(table, automaticSize) {
54
+ if (!!table.recipe.automaticSize === automaticSize)
55
+ return table;
56
+ return resizeRoundTable({
57
+ ...table,
58
+ recipe: { ...table.recipe, automaticSize },
59
+ });
60
+ }
61
+ export function setRoundTableArc(table, requested) {
62
+ const seatArcDeg = Math.min(360, Math.max(120, Math.round(requested)));
63
+ if (seatArcDeg === table.recipe.seatArcDeg)
64
+ return table;
65
+ return resizeRoundTable({
66
+ ...table,
67
+ recipe: { ...table.recipe, seatArcDeg },
68
+ });
69
+ }
70
+ function dimensionM(requested, minimum, maximum) {
71
+ const units = Math.min(maximum, Math.max(minimum, Math.round(requested / TableLayoutUnitM)));
72
+ return units * TableLayoutUnitM;
73
+ }
74
+ export function setRoundTableRadius(table, requested) {
75
+ if (table.recipe.automaticSize)
76
+ return table;
77
+ const diameterM = 2 * dimensionM(requested, 24, 160);
78
+ return diameterM === table.recipe.diameterM
79
+ ? table
80
+ : { ...table, recipe: { ...table.recipe, diameterM } };
81
+ }
82
+ export function setLongTableDimensions(table, widthM, depthM) {
83
+ const recipe = {
84
+ ...table.recipe,
85
+ widthM: dimensionM(widthM, 40, 320),
86
+ depthM: dimensionM(depthM, 30, 240),
87
+ };
88
+ return recipe.widthM === table.recipe.widthM &&
89
+ recipe.depthM === table.recipe.depthM
90
+ ? table
91
+ : { ...table, recipe };
92
+ }
93
+ /** Shape changes retain inventory identity, personal overrides and the inactive shape settings. */
94
+ export function changeTableShape(table, kind) {
95
+ if (table.kind === kind)
96
+ return table;
97
+ if (table.kind === SeatingKind.Rectangular) {
98
+ const { recipe, chairsBySide, roundLayout, ...base } = table;
99
+ const chairs = TableChairSides.flatMap((side) => chairsBySide[side]);
100
+ return resizeRoundTable({
101
+ ...base,
102
+ kind: SeatingKind.Round,
103
+ chairs,
104
+ recipe: {
105
+ ...(roundLayout ?? defaultRoundTableRecipe()),
106
+ automaticSize: true,
107
+ },
108
+ longLayout: {
109
+ recipe,
110
+ sides: {
111
+ top: !!chairsBySide.top.length,
112
+ bottom: !!chairsBySide.bottom.length,
113
+ left: !!chairsBySide.left.length,
114
+ right: !!chairsBySide.right.length,
115
+ },
116
+ },
117
+ });
118
+ }
119
+ const { recipe, chairs, longLayout, ...base } = table;
120
+ const layout = longLayout ?? defaultLongTableLayout();
121
+ const sides = TableChairSides.filter((side) => layout.sides[side]);
122
+ let offset = 0;
123
+ const chairsBySide = {
124
+ top: [],
125
+ bottom: [],
126
+ left: [],
127
+ right: [],
128
+ };
129
+ for (const [index, side] of sides.entries()) {
130
+ const count = Math.floor(chairs.length / sides.length) +
131
+ (index < chairs.length % sides.length ? 1 : 0);
132
+ chairsBySide[side] = chairs.slice(offset, offset + count);
133
+ offset += count;
134
+ }
135
+ return {
136
+ ...base,
137
+ kind: SeatingKind.Rectangular,
138
+ recipe: layout.recipe,
139
+ chairsBySide,
140
+ roundLayout: recipe,
141
+ };
142
+ }
package/dist/types.d.ts CHANGED
@@ -29,11 +29,16 @@ export declare enum NumberingScheme {
29
29
  Numeric = "numeric",
30
30
  Odd = "odd",
31
31
  Even = "even",
32
- Alphabetic = "alphabetic"
32
+ Alphabetic = "alphabetic",
33
+ LowerAlphabetic = "lowerAlphabetic",
34
+ Roman = "roman",
35
+ OutsideIn = "outsideIn",
36
+ InsideOut = "insideOut"
33
37
  }
34
38
  export declare enum LabelDirection {
35
39
  Forward = "forward",
36
- Reverse = "reverse"
40
+ Reverse = "reverse",
41
+ Centre = "centre"
37
42
  }
38
43
  export type LabelSequence = {
39
44
  scheme: NumberingScheme;
@@ -41,10 +46,16 @@ export type LabelSequence = {
41
46
  direction: LabelDirection;
42
47
  prefix?: string;
43
48
  suffix?: string;
49
+ /** Last-seat anchoring retains the first-seat start for a later mode switch. */
50
+ numberFrom?: "first" | "last";
51
+ lastAt?: number;
44
52
  };
45
53
  export type LabelStyle = {
46
54
  visible: boolean;
47
55
  fontSizeM: number;
56
+ color?: string;
57
+ style?: "plain" | "pill";
58
+ rotationDeg?: number;
48
59
  };
49
60
  export declare enum RowLabelPosition {
50
61
  Left = "left",
@@ -53,15 +64,72 @@ export declare enum RowLabelPosition {
53
64
  }
54
65
  export type RowLabelStyle = LabelStyle & {
55
66
  position: RowLabelPosition;
67
+ style?: "plain" | "pill";
68
+ rotationDeg?: number;
56
69
  };
70
+ export declare enum AccessNeed {
71
+ Companion = "companion",
72
+ LimitedMobility = "limitedMobility",
73
+ AisleTransfer = "aisleTransfer",
74
+ StepFree = "stepFree",
75
+ PlusSize = "plusSize",
76
+ LiftUpArmrest = "liftUpArmrest",
77
+ HearingLoop = "hearingLoop",
78
+ LiveCaptions = "liveCaptions",
79
+ SignLanguageView = "signLanguageView",
80
+ LowVision = "lowVision",
81
+ SensoryFriendly = "sensoryFriendly"
82
+ }
57
83
  export type SeatAttributes = {
58
- accessible?: boolean;
84
+ wheelchair?: "seat" | "space";
85
+ accessNeeds?: AccessNeed[];
86
+ obstructedView?: boolean;
87
+ premium?: boolean;
59
88
  restrictedView?: boolean;
60
- hearingAssistance?: boolean;
61
- semiAmbulatory?: boolean;
62
89
  companionForSeatId?: UUID;
63
90
  };
91
+ export declare enum TicketRestriction {
92
+ Anyone = "anyone",
93
+ Child = "child",
94
+ Senior = "senior",
95
+ Student = "student",
96
+ Companion = "companion",
97
+ Membership = "membership",
98
+ Custom = "custom"
99
+ }
100
+ export declare const TicketOptionLimit = 20;
101
+ export type CategoryTicketOption = {
102
+ id: UUID;
103
+ name: string;
104
+ price: number;
105
+ restriction?: TicketRestriction;
106
+ guidance?: string;
107
+ };
108
+ export declare enum SeatShape {
109
+ Circle = "circle",
110
+ Theatre = "theatre",
111
+ Dining = "dining",
112
+ Folding = "folding",
113
+ Armchair = "armchair",
114
+ Recliner = "recliner",
115
+ Stool = "stool",
116
+ Bench = "bench"
117
+ }
118
+ export type MapCategory = {
119
+ id: UUID;
120
+ name: string;
121
+ color: string;
122
+ defaultPrice?: number | null;
123
+ onSale?: boolean;
124
+ ticketOptions?: CategoryTicketOption[];
125
+ seatShape?: SeatShape;
126
+ };
64
127
  export type SeatSlot = {
128
+ gap?: boolean;
129
+ buyerNote?: string;
130
+ labelStyle?: LabelStyle;
131
+ seatShape?: SeatShape;
132
+ categoryId?: UUID | null;
65
133
  id: UUID;
66
134
  labelOverride?: string;
67
135
  attributes?: SeatAttributes;
@@ -71,11 +139,32 @@ export type SeatSlot = {
71
139
  sizeM?: SizeM;
72
140
  };
73
141
  };
142
+ export declare enum RowEnds {
143
+ Start = "start",
144
+ End = "end",
145
+ Both = "both",
146
+ None = "none"
147
+ }
148
+ /** Independent row recipe, in group-local metres with the first seat as origin. */
149
+ export type RowLayout = {
150
+ originM: PointM;
151
+ seatPitchM: number;
152
+ curveDeg: number;
153
+ rotationDeg: number;
154
+ seatRotationOffsetDeg?: number;
155
+ };
74
156
  export type RowSlot = {
157
+ buyerNoun?: string;
158
+ buyerNote?: string;
159
+ labelStyle?: RowLabelStyle;
160
+ categoryId?: UUID | null;
75
161
  id: UUID;
76
162
  labelOverride?: string;
163
+ bookingLabel?: string;
77
164
  offsetM?: PointM;
78
165
  seatSequenceOverride?: LabelSequence;
166
+ layout?: RowLayout;
167
+ aisleSeats?: RowEnds;
79
168
  seats: SeatSlot[];
80
169
  };
81
170
  export type DrawableBase = {
@@ -85,6 +174,7 @@ export type DrawableBase = {
85
174
  zIndex: number;
86
175
  };
87
176
  export type GroupBase = DrawableBase & {
177
+ categoryId?: UUID | null;
88
178
  name: string;
89
179
  sectionId: UUID | null;
90
180
  seatSizeM: SizeM;
@@ -106,17 +196,34 @@ export declare enum LabelAlignment {
106
196
  Center = "center",
107
197
  Right = "right"
108
198
  }
109
- export type StraightRows = GroupBase & {
199
+ export declare enum RowJoin {
200
+ Aisle = "aisle",
201
+ Continuous = "continuous"
202
+ }
203
+ /** Logical membership of physical rows with their own RowLayout geometry. */
204
+ export type SegmentedRow = {
205
+ id: UUID;
206
+ label: string;
207
+ sequence: LabelSequence;
208
+ smoothCorners?: boolean;
209
+ parts: {
210
+ rowId: UUID;
211
+ joinBefore: RowJoin | null;
212
+ }[];
213
+ };
214
+ type RowsBase = GroupBase & {
215
+ labels: RowsLabels;
216
+ rows: RowSlot[];
217
+ };
218
+ export type StraightRows = RowsBase & {
110
219
  kind: SeatingKind.Straight;
111
220
  recipe: {
112
221
  seatPitchM: number;
113
222
  rowPitchM: number;
114
223
  rowAlignment?: RowAlignment;
115
224
  };
116
- labels: RowsLabels;
117
- rows: RowSlot[];
118
225
  };
119
- export type CurvedRows = GroupBase & {
226
+ export type CurvedRows = RowsBase & {
120
227
  kind: SeatingKind.Curved;
121
228
  recipe: {
122
229
  innerRadiusM: number;
@@ -132,22 +239,71 @@ export type CurvedRows = GroupBase & {
132
239
  seatPitchM: number;
133
240
  };
134
241
  };
135
- labels: RowsLabels;
136
- rows: RowSlot[];
137
242
  };
243
+ export type RowInventory = StraightRows | CurvedRows;
138
244
  export type TableLabels = {
139
245
  table: string;
140
246
  chairs: LabelSequence;
141
247
  tableStyle: LabelStyle;
142
248
  };
249
+ export declare enum TableBookingMode {
250
+ Individual = "individual",
251
+ Whole = "whole",
252
+ Party = "party"
253
+ }
254
+ export declare enum StandingBookingMode {
255
+ Standing = "standing",
256
+ Whole = "whole",
257
+ Party = "party"
258
+ }
259
+ export type PartySize = {
260
+ minGuests: number;
261
+ maxGuests: number;
262
+ };
263
+ export type TableSelling = {
264
+ mode: TableBookingMode.Individual | TableBookingMode.Whole;
265
+ } | ({
266
+ mode: TableBookingMode.Party;
267
+ } & PartySize);
268
+ export type StandingSelling = {
269
+ mode: StandingBookingMode.Standing | StandingBookingMode.Whole;
270
+ wheelchairPlaces: number;
271
+ } | ({
272
+ mode: StandingBookingMode.Party;
273
+ wheelchairPlaces: number;
274
+ } & PartySize);
275
+ export declare enum TableChairDistribution {
276
+ Interior = "interior",
277
+ EqualSegments = "equalSegments"
278
+ }
279
+ export type RectangularTableRecipe = {
280
+ widthM: number;
281
+ depthM: number;
282
+ chairGapM: number;
283
+ chairPitchM?: number;
284
+ chairDistribution?: TableChairDistribution;
285
+ };
286
+ export type RoundTableRecipe = {
287
+ diameterM: number;
288
+ chairGapM: number;
289
+ startAngleDeg: number;
290
+ automaticSize?: boolean;
291
+ seatArcDeg?: number;
292
+ };
293
+ export type LongTableLayout = {
294
+ recipe: RectangularTableRecipe;
295
+ sides: {
296
+ top: boolean;
297
+ bottom: boolean;
298
+ left: boolean;
299
+ right: boolean;
300
+ };
301
+ };
143
302
  export type RectangularTable = GroupBase & {
303
+ selling?: TableSelling;
304
+ roundLayout?: RoundTableRecipe;
144
305
  kind: SeatingKind.Rectangular;
145
- recipe: {
146
- widthM: number;
147
- depthM: number;
148
- chairGapM: number;
149
- chairPitchM?: number;
150
- };
306
+ recipe: RectangularTableRecipe;
151
307
  labels: TableLabels;
152
308
  chairsBySide: {
153
309
  top: SeatSlot[];
@@ -157,18 +313,16 @@ export type RectangularTable = GroupBase & {
157
313
  };
158
314
  };
159
315
  export type RoundTable = GroupBase & {
316
+ selling?: TableSelling;
317
+ longLayout?: LongTableLayout;
160
318
  kind: SeatingKind.Round;
161
- recipe: {
162
- diameterM: number;
163
- chairGapM: number;
164
- startAngleDeg: number;
165
- };
319
+ recipe: RoundTableRecipe;
166
320
  labels: TableLabels;
167
321
  chairs: SeatSlot[];
168
322
  };
169
323
  export type SeatingGroup = StraightRows | CurvedRows | RectangularTable | RoundTable;
170
- export type GeneralAdmission = DrawableBase & {
171
- kind: AreaKind.GeneralAdmission;
324
+ type InventoryAreaBase = DrawableBase & {
325
+ categoryId?: UUID | null;
172
326
  sectionId: UUID | null;
173
327
  label: string;
174
328
  labelStyle: LabelStyle;
@@ -183,6 +337,12 @@ export type GeneralAdmission = DrawableBase & {
183
337
  boundary: PolygonM;
184
338
  };
185
339
  };
340
+ export type InventoryArea = InventoryAreaBase & ({
341
+ kind: AreaKind.GeneralAdmission;
342
+ selling?: StandingSelling;
343
+ } | {
344
+ kind: AreaKind.Booth;
345
+ });
186
346
  export type DecorationStyle = {
187
347
  fill?: Paint;
188
348
  stroke?: Paint;
@@ -228,6 +388,8 @@ export declare enum SectionOutlineRole {
228
388
  Overview = "overview"
229
389
  }
230
390
  export type Section = {
391
+ /** Default for inventory subsequently drawn inside this section. */
392
+ categoryId?: UUID | null;
231
393
  id: UUID;
232
394
  label: string;
233
395
  displayLabel?: string;
@@ -255,10 +417,12 @@ export type PhysicalDocumentV1 = {
255
417
  rotation: "clockwise";
256
418
  };
257
419
  background: Paint;
420
+ categories?: MapCategory[];
258
421
  sections: Section[];
259
422
  collections: Collection[];
260
423
  seatingGroups: SeatingGroup[];
261
- areas: GeneralAdmission[];
424
+ segmentedRows?: SegmentedRow[];
425
+ areas: InventoryArea[];
262
426
  decorations: Decoration[];
263
427
  assets: AssetRef[];
264
428
  };
@@ -288,7 +452,8 @@ export declare enum DecorationKind {
288
452
  Image = "image"
289
453
  }
290
454
  export declare enum AreaKind {
291
- GeneralAdmission = "generalAdmission"
455
+ GeneralAdmission = "generalAdmission",
456
+ Booth = "booth"
292
457
  }
293
458
  export declare enum VenueGlyph {
294
459
  Stage = "stage",
@@ -306,8 +471,9 @@ export declare enum CurveMode {
306
471
  Sweep = "fixedSweep",
307
472
  Pitch = "fixedPitch"
308
473
  }
309
- export type Drawable = SeatingGroup | GeneralAdmission | Decoration | Collection;
474
+ export type Drawable = SeatingGroup | InventoryArea | Decoration | Collection;
310
475
  export type EntityRef = {
311
476
  family: EntityFamily;
312
477
  id: UUID;
313
478
  };
479
+ export {};
package/dist/types.js CHANGED
@@ -9,11 +9,16 @@ export var NumberingScheme;
9
9
  NumberingScheme["Odd"] = "odd";
10
10
  NumberingScheme["Even"] = "even";
11
11
  NumberingScheme["Alphabetic"] = "alphabetic";
12
+ NumberingScheme["LowerAlphabetic"] = "lowerAlphabetic";
13
+ NumberingScheme["Roman"] = "roman";
14
+ NumberingScheme["OutsideIn"] = "outsideIn";
15
+ NumberingScheme["InsideOut"] = "insideOut";
12
16
  })(NumberingScheme || (NumberingScheme = {}));
13
17
  export var LabelDirection;
14
18
  (function (LabelDirection) {
15
19
  LabelDirection["Forward"] = "forward";
16
20
  LabelDirection["Reverse"] = "reverse";
21
+ LabelDirection["Centre"] = "centre";
17
22
  })(LabelDirection || (LabelDirection = {}));
18
23
  export var RowLabelPosition;
19
24
  (function (RowLabelPosition) {
@@ -21,6 +26,49 @@ export var RowLabelPosition;
21
26
  RowLabelPosition["Right"] = "right";
22
27
  RowLabelPosition["Both"] = "both";
23
28
  })(RowLabelPosition || (RowLabelPosition = {}));
29
+ export var AccessNeed;
30
+ (function (AccessNeed) {
31
+ AccessNeed["Companion"] = "companion";
32
+ AccessNeed["LimitedMobility"] = "limitedMobility";
33
+ AccessNeed["AisleTransfer"] = "aisleTransfer";
34
+ AccessNeed["StepFree"] = "stepFree";
35
+ AccessNeed["PlusSize"] = "plusSize";
36
+ AccessNeed["LiftUpArmrest"] = "liftUpArmrest";
37
+ AccessNeed["HearingLoop"] = "hearingLoop";
38
+ AccessNeed["LiveCaptions"] = "liveCaptions";
39
+ AccessNeed["SignLanguageView"] = "signLanguageView";
40
+ AccessNeed["LowVision"] = "lowVision";
41
+ AccessNeed["SensoryFriendly"] = "sensoryFriendly";
42
+ })(AccessNeed || (AccessNeed = {}));
43
+ export var TicketRestriction;
44
+ (function (TicketRestriction) {
45
+ TicketRestriction["Anyone"] = "anyone";
46
+ TicketRestriction["Child"] = "child";
47
+ TicketRestriction["Senior"] = "senior";
48
+ TicketRestriction["Student"] = "student";
49
+ TicketRestriction["Companion"] = "companion";
50
+ TicketRestriction["Membership"] = "membership";
51
+ TicketRestriction["Custom"] = "custom";
52
+ })(TicketRestriction || (TicketRestriction = {}));
53
+ export const TicketOptionLimit = 20;
54
+ export var SeatShape;
55
+ (function (SeatShape) {
56
+ SeatShape["Circle"] = "circle";
57
+ SeatShape["Theatre"] = "theatre";
58
+ SeatShape["Dining"] = "dining";
59
+ SeatShape["Folding"] = "folding";
60
+ SeatShape["Armchair"] = "armchair";
61
+ SeatShape["Recliner"] = "recliner";
62
+ SeatShape["Stool"] = "stool";
63
+ SeatShape["Bench"] = "bench";
64
+ })(SeatShape || (SeatShape = {}));
65
+ export var RowEnds;
66
+ (function (RowEnds) {
67
+ RowEnds["Start"] = "start";
68
+ RowEnds["End"] = "end";
69
+ RowEnds["Both"] = "both";
70
+ RowEnds["None"] = "none";
71
+ })(RowEnds || (RowEnds = {}));
24
72
  export var RowAlignment;
25
73
  (function (RowAlignment) {
26
74
  RowAlignment["Start"] = "start";
@@ -33,6 +81,28 @@ export var LabelAlignment;
33
81
  LabelAlignment["Center"] = "center";
34
82
  LabelAlignment["Right"] = "right";
35
83
  })(LabelAlignment || (LabelAlignment = {}));
84
+ export var RowJoin;
85
+ (function (RowJoin) {
86
+ RowJoin["Aisle"] = "aisle";
87
+ RowJoin["Continuous"] = "continuous";
88
+ })(RowJoin || (RowJoin = {}));
89
+ export var TableBookingMode;
90
+ (function (TableBookingMode) {
91
+ TableBookingMode["Individual"] = "individual";
92
+ TableBookingMode["Whole"] = "whole";
93
+ TableBookingMode["Party"] = "party";
94
+ })(TableBookingMode || (TableBookingMode = {}));
95
+ export var StandingBookingMode;
96
+ (function (StandingBookingMode) {
97
+ StandingBookingMode["Standing"] = "standing";
98
+ StandingBookingMode["Whole"] = "whole";
99
+ StandingBookingMode["Party"] = "party";
100
+ })(StandingBookingMode || (StandingBookingMode = {}));
101
+ export var TableChairDistribution;
102
+ (function (TableChairDistribution) {
103
+ TableChairDistribution["Interior"] = "interior";
104
+ TableChairDistribution["EqualSegments"] = "equalSegments";
105
+ })(TableChairDistribution || (TableChairDistribution = {}));
36
106
  export var SectionOutlineRole;
37
107
  (function (SectionOutlineRole) {
38
108
  SectionOutlineRole["Boundary"] = "boundary";
@@ -69,6 +139,7 @@ export var DecorationKind;
69
139
  export var AreaKind;
70
140
  (function (AreaKind) {
71
141
  AreaKind["GeneralAdmission"] = "generalAdmission";
142
+ AreaKind["Booth"] = "booth";
72
143
  })(AreaKind || (AreaKind = {}));
73
144
  export var VenueGlyph;
74
145
  (function (VenueGlyph) {
@@ -1,8 +1,10 @@
1
1
  import { SeatingKind } from "./types.js";
2
2
  import { SectionOutlineRole, ShapeKind, DecorationKind, } from "./types.js";
3
3
  import { IssueCode, IssueSeverity, issue, issueKey, } from "./issues.js";
4
+ import { documentGroupSeats } from "./catalog.js";
5
+ import { rowSegments, changedSegmentGroups } from "./row-segments.js";
4
6
  import { labelKey, sequenceLabel } from "./labels.js";
5
- import { footprint, footprintInside, generateGroup, invalidPolygon, worldMatrices, } from "./geometry/geometry.js";
7
+ import { footprint, footprintInside, invalidPolygon, worldMatrices, } from "./geometry/geometry.js";
6
8
  import { curveWarnings, CurveWarningKind } from "./geometry/curve-warnings.js";
7
9
  import { capacity } from "./schema.js";
8
10
  /** Label equality and collision ownership live here; consumers only project issues. */
@@ -65,10 +67,15 @@ export class ValidationIndex {
65
67
  if (g.kind === SeatingKind.Straight || g.kind === SeatingKind.Curved)
66
68
  for (let i = 0; i < g.rows.length; i++) {
67
69
  const row = g.rows[i];
70
+ const segment = rowSegments(this.document).get(row.id);
71
+ if (segment && segment.partIndex !== 0)
72
+ continue;
68
73
  entries.push({
69
- id: row.id,
74
+ id: segment?.row.id ?? row.id,
70
75
  ownerId: g.id,
71
- label: row.labelOverride ?? sequenceLabel(g.labels.rows, i, g.rows.length),
76
+ label: segment?.row.label ??
77
+ row.labelOverride ??
78
+ sequenceLabel(g.labels.rows, i, g.rows.length),
72
79
  scope: `rows:${section}`,
73
80
  field: `${row.id}.label`,
74
81
  });
@@ -90,12 +97,14 @@ export class ValidationIndex {
90
97
  ? worldMatrices(this.document).get(g.id)
91
98
  : undefined;
92
99
  let outside = false;
93
- for (const s of generateGroup(g)) {
100
+ for (const s of documentGroupSeats(this.document, g)) {
101
+ if (s.slot.gap)
102
+ continue;
94
103
  entries.push({
95
104
  id: s.id,
96
105
  ownerId: g.id,
97
106
  label: s.label,
98
- scope: `chairs:${s.rowId ?? g.id}`,
107
+ scope: `chairs:${s.logicalRowId ?? s.rowId ?? g.id}`,
99
108
  field: `${s.id}.label`,
100
109
  });
101
110
  this.seats.set(s.id, {
@@ -189,10 +198,14 @@ export class ValidationIndex {
189
198
  update(document, changedGroupIds, refreshMetadata = false) {
190
199
  const before = this.document;
191
200
  this.document = document;
192
- for (const id of changedGroupIds)
201
+ const affected = new Set([
202
+ ...changedGroupIds,
203
+ ...changedSegmentGroups(before, document),
204
+ ]);
205
+ for (const id of affected)
193
206
  this.remove(id);
194
207
  for (const g of document.seatingGroups)
195
- if (changedGroupIds.has(g.id))
208
+ if (affected.has(g.id))
196
209
  this.indexGroup(g);
197
210
  if (refreshMetadata) {
198
211
  this.remove(document.mapId);