@seatmap-fyi/map-domain 0.1.0-alpha.48 → 0.1.0-alpha.51

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 (42) hide show
  1. package/dist/arc-fan-rebuild.d.ts +9 -5
  2. package/dist/arc-fan-rebuild.js +78 -14
  3. package/dist/arc-fan-section-layout.d.ts +11 -0
  4. package/dist/arc-fan-section-layout.js +54 -0
  5. package/dist/arc-fan.interface.d.ts +18 -1
  6. package/dist/categories.d.ts +11 -2
  7. package/dist/categories.js +42 -10
  8. package/dist/editor-state.d.ts +2 -0
  9. package/dist/editor-state.js +3 -0
  10. package/dist/floors.d.ts +1 -1
  11. package/dist/floors.js +4 -9
  12. package/dist/geometry/decoration-bounds.d.ts +6 -1
  13. package/dist/geometry/decoration-bounds.js +23 -1
  14. package/dist/geometry/geometry.d.ts +4 -0
  15. package/dist/geometry/geometry.js +37 -10
  16. package/dist/geometry/inventory-outline.d.ts +8 -0
  17. package/dist/geometry/inventory-outline.js +46 -0
  18. package/dist/geometry/seat-shape.js +4 -4
  19. package/dist/geometry/seating-layout.d.ts +1 -0
  20. package/dist/geometry/seating-layout.js +7 -0
  21. package/dist/geometry/three-point-arc.d.ts +10 -0
  22. package/dist/geometry/three-point-arc.js +32 -0
  23. package/dist/geometry/venue-outline.js +44 -9
  24. package/dist/issues.d.ts +2 -0
  25. package/dist/issues.js +2 -0
  26. package/dist/layers.js +20 -4
  27. package/dist/media.d.ts +16 -2
  28. package/dist/media.js +19 -0
  29. package/dist/physical-document.interface.d.ts +77 -7
  30. package/dist/physical-document.interface.js +19 -0
  31. package/dist/schema.d.ts +174 -5
  32. package/dist/schema.js +82 -16
  33. package/dist/section-growth.d.ts +3 -3
  34. package/dist/section-growth.interface.d.ts +10 -2
  35. package/dist/section-growth.js +83 -36
  36. package/dist/section-layout.d.ts +9 -3
  37. package/dist/section-layout.js +2 -0
  38. package/dist/table-layout.d.ts +2 -1
  39. package/dist/table-layout.js +21 -13
  40. package/dist/validation.d.ts +1 -0
  41. package/dist/validation.js +13 -16
  42. package/package.json +9 -1
@@ -0,0 +1,46 @@
1
+ import { memberEnvelope } from "./venue-outline.js";
2
+ import { LayoutUnitM } from "./units.js";
3
+ const paddingM = 22 * LayoutUnitM;
4
+ const coordinateToleranceM = 1e-7;
5
+ function vertexMean(points) {
6
+ return points.reduce((sum, point) => ({ x: sum.x + point.x / points.length, y: sum.y + point.y / points.length }), {
7
+ x: 0,
8
+ y: 0,
9
+ });
10
+ }
11
+ function padInventoryHull(hull) {
12
+ if (hull.length < 3)
13
+ return null;
14
+ const center = vertexMean(hull);
15
+ return {
16
+ outer: hull.map((point) => {
17
+ const dx = point.x - center.x;
18
+ const dy = point.y - center.y;
19
+ const factor = paddingM / Math.hypot(dx, dy);
20
+ return { x: point.x + dx * factor, y: point.y + dy * factor };
21
+ }),
22
+ holes: [],
23
+ };
24
+ }
25
+ /** The editable inventory envelope uses 22 layout units of radial padding. */
26
+ export function paddedSectionOutline(points) {
27
+ return padInventoryHull(memberEnvelope(points, 0).outer);
28
+ }
29
+ function sameRing(actual, expected, toleranceM) {
30
+ const count = actual.length;
31
+ const samePoint = (a, b) => Math.hypot(a.x - b.x, a.y - b.y) <= toleranceM;
32
+ return (count === expected.length &&
33
+ actual.some((point, start) => samePoint(point, expected[0]) &&
34
+ [1, -1].some((direction) => expected.every((expectedPoint, index) => samePoint(expectedPoint, actual[(start + direction * index + count) % count])))));
35
+ }
36
+ /** Confirm an exact generated envelope and retain its authored coordinates for history. */
37
+ export function matchesPaddedSectionOutline(points, actual, { toWorld, toleranceM = coordinateToleranceM } = {}) {
38
+ if (!actual ||
39
+ actual.holes.length ||
40
+ actual.edgeCurvature?.some(Boolean) ||
41
+ actual.cornerRounding ||
42
+ actual.cornerRadiusM)
43
+ return false;
44
+ const expected = paddedSectionOutline(points);
45
+ return (expected !== null && sameRing(actual.outer, toWorld ? expected.outer.map(toWorld) : expected.outer, toleranceM));
46
+ }
@@ -32,10 +32,10 @@ const furniture = {
32
32
  polygon(0.08, 0.08, 0.19, 0.08, 0.3, 0.42, 0.19, 0.42),
33
33
  ],
34
34
  [SeatShape.Folding]: [
35
- polygon(-0.3, -0.42, 0.3, -0.42, 0.25, -0.2, -0.25, -0.2),
36
- polygon(-0.315, -0.14, 0.315, -0.14, 0.26, 0.02, -0.26, 0.02),
37
- polygon(-0.2, 0.0, -0.1, -0.02, 0.2, 0.42, 0.08, 0.42),
38
- polygon(0.1, -0.02, 0.2, 0.0, -0.08, 0.42, -0.2, 0.42),
35
+ polygon(-0.3, -0.44, 0.3, -0.44, 0.25, -0.2, -0.25, -0.2),
36
+ rectangle(-0.32, -0.15, 0.64, 0.18, 0.04),
37
+ polygon(-0.24, 0.02, -0.12, 0.02, -0.15, 0.44, -0.265, 0.44),
38
+ polygon(0.12, 0.02, 0.24, 0.02, 0.265, 0.44, 0.15, 0.44),
39
39
  ],
40
40
  [SeatShape.Armchair]: [
41
41
  rectangle(-0.34, -0.4, 0.68, 0.46, 0.08),
@@ -6,6 +6,7 @@ export declare enum TableSide {
6
6
  Bottom = "bottom",
7
7
  Left = "left"
8
8
  }
9
+ export declare function rectangularChairOrder(recipe: RectangularTable["recipe"]): readonly TableSide[];
9
10
  export declare function rowStaggerOffset(recipe: StraightRows["recipe"], index: number): number;
10
11
  /** A lane shift is derived from the recipe. The row offset remains an independent edit. */
11
12
  export declare function rowPlacementOffset(group: RowsGeometry, index: number, offset?: PointM): PointM;
@@ -7,6 +7,13 @@ export var TableSide;
7
7
  TableSide["Bottom"] = "bottom";
8
8
  TableSide["Left"] = "left";
9
9
  })(TableSide || (TableSide = {}));
10
+ const clockwiseTableSides = Object.values(TableSide);
11
+ const sideOrderedTableSides = [TableSide.Top, TableSide.Bottom, TableSide.Left, TableSide.Right];
12
+ export function rectangularChairOrder(recipe) {
13
+ return recipe.chairDistribution === TableChairDistribution.EqualSegments
14
+ ? sideOrderedTableSides
15
+ : clockwiseTableSides;
16
+ }
10
17
  export function rowStaggerOffset(recipe, index) {
11
18
  const lane = index % 2 === 0 ? RowStagger.First : RowStagger.Second;
12
19
  return recipe.stagger === lane ? recipe.seatPitchM / 2 : 0;
@@ -0,0 +1,10 @@
1
+ import type { PointM } from "../physical-document.interface.js";
2
+ export declare function arcThroughPoints(first: PointM, middle: PointM, last: PointM): {
3
+ center: {
4
+ x: number;
5
+ y: number;
6
+ };
7
+ radius: number;
8
+ startRad: number;
9
+ sweepRad: number;
10
+ } | null;
@@ -0,0 +1,32 @@
1
+ function positiveAngle(angle) {
2
+ const turn = Math.PI * 2;
3
+ return ((angle % turn) + turn) % turn;
4
+ }
5
+ export function arcThroughPoints(first, middle, last) {
6
+ const x = last.x - first.x;
7
+ const y = last.y - first.y;
8
+ const chord = Math.hypot(x, y);
9
+ if (!chord)
10
+ return null;
11
+ const axis = { x: x / chord, y: y / chord };
12
+ const dx = middle.x - first.x;
13
+ const dy = middle.y - first.y;
14
+ const along = dx * axis.x + dy * axis.y;
15
+ const across = dy * axis.x - dx * axis.y;
16
+ if (Math.abs(across) <= Number.EPSILON * chord)
17
+ return null;
18
+ // In chord coordinates the centre lies halfway between the endpoints.
19
+ const offset = (along * (along - chord) + across * across) / (2 * across);
20
+ const center = {
21
+ x: first.x + x / 2 - offset * axis.y,
22
+ y: first.y + y / 2 + offset * axis.x,
23
+ };
24
+ const radius = Math.hypot(chord / 2, offset);
25
+ const startRad = Math.atan2(first.y - center.y, first.x - center.x);
26
+ const endRad = positiveAngle(Math.atan2(last.y - center.y, last.x - center.x) - startRad);
27
+ const middleRad = positiveAngle(Math.atan2(middle.y - center.y, middle.x - center.x) - startRad);
28
+ if (!Number.isFinite(radius) || !endRad || !middleRad || middleRad === endRad)
29
+ return null;
30
+ const sweepRad = middleRad < endRad ? endRad : endRad - Math.PI * 2;
31
+ return { center, radius, startRad, sweepRad };
32
+ }
@@ -1,4 +1,4 @@
1
- import { polygonContour } from "./polygon-curves.js";
1
+ import { PolygonVertexLimit, polygonContour, sideCurvePoint } from "./polygon-curves.js";
2
2
  import { pointsBounds, containsPoint } from "./primitives.js";
3
3
  import { ellipseSegments } from "./ellipse.js";
4
4
  import TinyQueue from "tinyqueue";
@@ -72,9 +72,36 @@ export function memberEnvelope(points, paddingM = 0.15) {
72
72
  return { outer, holes: [] };
73
73
  }
74
74
  const labelSearchPrecisionM = 1.5 * LayoutUnitM;
75
+ const curvedLabelSearchPrecisionM = 1.25 * LayoutUnitM;
76
+ const labelCurveSampleSpacingM = 2 * LayoutUnitM;
75
77
  const labelInitialCellLimit = 64;
76
78
  const labelSearchRoundoff = 16 * Number.EPSILON;
77
79
  const labelPoints = new WeakMap();
80
+ function curvedLabelContour(source) {
81
+ const { edgeCurvature, outer, holes, cornerRounding, cornerRadiusM } = source;
82
+ if (!edgeCurvature?.some(Boolean) || cornerRounding || cornerRadiusM)
83
+ return null;
84
+ const segments = outer.map((start, index) => {
85
+ const curvature = edgeCurvature[index];
86
+ if (!curvature)
87
+ return 1;
88
+ const end = outer[(index + 1) % outer.length];
89
+ const chord = Math.hypot(end.x - start.x, end.y - start.y);
90
+ // The two outer legs of the equivalent cubic share a normal offset.
91
+ const controlLength = (chord * (1 + 2 * Math.hypot(1, (2 * curvature) / 100))) / 3;
92
+ return Math.max(1, Math.ceil(controlLength / labelCurveSampleSpacingM));
93
+ });
94
+ if (segments.reduce((count, side) => count + side, 0) > PolygonVertexLimit)
95
+ return null;
96
+ const contour = outer.flatMap((start, index) => {
97
+ const count = segments[index];
98
+ if (count === 1)
99
+ return [start];
100
+ const end = outer[(index + 1) % outer.length];
101
+ return Array.from({ length: count }, (_, step) => sideCurvePoint(start, end, edgeCurvature[index], step / count));
102
+ });
103
+ return { outer: contour, holes };
104
+ }
78
105
  function outlineClearance(polygon, point) {
79
106
  let distanceSquared = Infinity;
80
107
  for (const ring of [polygon.outer, ...polygon.holes]) {
@@ -112,23 +139,31 @@ export function interiorLabelPoint(source) {
112
139
  const cached = labelPoints.get(source);
113
140
  if (cached)
114
141
  return cached;
115
- const polygon = polygonContour(source);
142
+ const labelContour = curvedLabelContour(source);
143
+ const polygon = labelContour ?? polygonContour(source);
144
+ const precisionM = labelContour ? curvedLabelSearchPrecisionM : labelSearchPrecisionM;
116
145
  const bounds = pointsBounds(polygon.outer);
117
146
  const width = bounds.maxX - bounds.minX, height = bounds.maxY - bounds.minY;
118
147
  const roundoffM = Math.max(width, height, Math.abs(bounds.minX), Math.abs(bounds.minY), Math.abs(bounds.maxX), Math.abs(bounds.maxY)) * labelSearchRoundoff;
119
148
  const cell = (center, halfWidthM, halfHeightM) => {
120
149
  const distanceM = outlineClearance(polygon, center);
121
- return { center, halfWidthM, halfHeightM, distanceM, maximumM: distanceM + Math.hypot(halfWidthM, halfHeightM) };
150
+ return {
151
+ center,
152
+ halfWidthM,
153
+ halfHeightM,
154
+ distanceM,
155
+ maximumM: distanceM + Math.hypot(halfWidthM, halfHeightM),
156
+ };
122
157
  };
123
- let best = cell(outlineCentroid(polygon), 0, 0);
124
158
  const center = cell({ x: (bounds.minX + bounds.maxX) / 2, y: (bounds.minY + bounds.maxY) / 2 }, 0, 0);
159
+ let best = labelContour ? center : cell(outlineCentroid(polygon), 0, 0);
125
160
  if (center.distanceM > best.distanceM + roundoffM)
126
161
  best = center;
127
- // A boundary vertex is an admissible initial point when both centroids fall in a void.
162
+ // A boundary vertex is admissible when the initial candidate falls in a void.
128
163
  if (best.distanceM < 0)
129
164
  best = cell(polygon.outer[0], 0, 0);
130
165
  // No inscribed circle can exceed half the smaller bounding-box dimension.
131
- if (Math.min(width, height) / 2 - best.distanceM <= labelSearchPrecisionM) {
166
+ if (Math.min(width, height) / 2 - best.distanceM <= precisionM) {
132
167
  labelPoints.set(source, best.center);
133
168
  return best.center;
134
169
  }
@@ -139,7 +174,7 @@ export function interiorLabelPoint(source) {
139
174
  });
140
175
  const smallerSpanM = Math.min(width, height);
141
176
  const coarsening = 2 ** Math.max(0, Math.ceil(Math.log2(Math.max(width, height) / smallerSpanM / labelInitialCellLimit)));
142
- const sizeM = Math.max(labelSearchPrecisionM, smallerSpanM * coarsening);
177
+ const sizeM = Math.max(precisionM, smallerSpanM * coarsening);
143
178
  const halfWidthM = Math.min(sizeM, width) / 2, halfHeightM = Math.min(sizeM, height) / 2;
144
179
  for (let x = bounds.minX; x < bounds.maxX; x += sizeM) {
145
180
  for (let y = bounds.minY; y < bounds.maxY; y += sizeM) {
@@ -150,9 +185,9 @@ export function interiorLabelPoint(source) {
150
185
  const current = queue.pop();
151
186
  if (current.distanceM > best.distanceM + roundoffM)
152
187
  best = current;
153
- if (smallerSpanM / 2 - best.distanceM <= labelSearchPrecisionM)
188
+ if (smallerSpanM / 2 - best.distanceM <= precisionM)
154
189
  break;
155
- if (current.maximumM - best.distanceM <= labelSearchPrecisionM)
190
+ if (current.maximumM - best.distanceM <= precisionM)
156
191
  continue;
157
192
  const halfWidth = current.halfWidthM / 2, halfHeight = current.halfHeightM / 2;
158
193
  if (current.halfWidthM > current.halfHeightM) {
package/dist/issues.d.ts CHANGED
@@ -14,6 +14,7 @@ export declare enum IssueCode {
14
14
  UnknownSeatCategory = "UNKNOWN_SEAT_CATEGORY",
15
15
  MissingCategory = "MISSING_CATEGORY",
16
16
  MissingCategoryPrice = "MISSING_CATEGORY_PRICE",
17
+ MixedCategoryInventory = "MIXED_CATEGORY_INVENTORY",
17
18
  UnsupportedVersion = "UNSUPPORTED_VERSION",
18
19
  WorldBounds = "WORLD_BOUNDS",
19
20
  DuplicateLabel = "DUPLICATE_LABEL",
@@ -23,6 +24,7 @@ export declare enum IssueCode {
23
24
  InvalidCompanion = "INVALID_COMPANION",
24
25
  InvalidLabel = "INVALID_LABEL",
25
26
  MissingLabel = "MISSING_LABEL",
27
+ ReferencePlanCoverage = "REFERENCE_PLAN_COVERAGE",
26
28
  MissingAsset = "MISSING_ASSET",
27
29
  CurveOverrun = "CURVE_OVERRUN",
28
30
  SeatOverlap = "SEAT_OVERLAP",
package/dist/issues.js CHANGED
@@ -14,6 +14,7 @@ export var IssueCode;
14
14
  IssueCode["UnknownSeatCategory"] = "UNKNOWN_SEAT_CATEGORY";
15
15
  IssueCode["MissingCategory"] = "MISSING_CATEGORY";
16
16
  IssueCode["MissingCategoryPrice"] = "MISSING_CATEGORY_PRICE";
17
+ IssueCode["MixedCategoryInventory"] = "MIXED_CATEGORY_INVENTORY";
17
18
  IssueCode["UnsupportedVersion"] = "UNSUPPORTED_VERSION";
18
19
  IssueCode["WorldBounds"] = "WORLD_BOUNDS";
19
20
  IssueCode["DuplicateLabel"] = "DUPLICATE_LABEL";
@@ -23,6 +24,7 @@ export var IssueCode;
23
24
  IssueCode["InvalidCompanion"] = "INVALID_COMPANION";
24
25
  IssueCode["InvalidLabel"] = "INVALID_LABEL";
25
26
  IssueCode["MissingLabel"] = "MISSING_LABEL";
27
+ IssueCode["ReferencePlanCoverage"] = "REFERENCE_PLAN_COVERAGE";
26
28
  IssueCode["MissingAsset"] = "MISSING_ASSET";
27
29
  IssueCode["CurveOverrun"] = "CURVE_OVERRUN";
28
30
  IssueCode["SeatOverlap"] = "SEAT_OVERLAP";
package/dist/layers.js CHANGED
@@ -1,4 +1,5 @@
1
- import { SeatingKind } from "./physical-document.interface.js";
1
+ import { ReferencePlanLayer, SeatingKind, } from "./physical-document.interface.js";
2
+ import { isReferencePlan } from "./media.js";
2
3
  const catalogs = new WeakMap();
3
4
  /**
4
5
  * @method layerCatalog
@@ -52,6 +53,14 @@ export function layerCatalog(document) {
52
53
  for (const list of siblings.values()) {
53
54
  list.sort((a, b) => a.zIndex - b.zIndex || a.ownerId.localeCompare(b.ownerId) || a.rowIndex - b.rowIndex);
54
55
  }
56
+ // Reserve private plan paint positions around the chart without changing sibling stacking commands.
57
+ const referenceLayers = new Map(document.decorations
58
+ .filter(isReferencePlan)
59
+ .map((plan) => [plan.id, plan.referenceLayer ?? ReferencePlanLayer.BelowChart]));
60
+ let aboveReference = 0;
61
+ for (const list of siblings.values())
62
+ aboveReference += list.length;
63
+ let belowReference = -referenceLayers.size;
55
64
  const order = new Map();
56
65
  const runs = new Map();
57
66
  let previousOwner = null;
@@ -62,17 +71,24 @@ export function layerCatalog(document) {
62
71
  visit(entry.id);
63
72
  }
64
73
  else {
65
- order.set(entry.id, ordinal);
74
+ const referenceLayer = referenceLayers.get(entry.id);
75
+ if (referenceLayer) {
76
+ const position = referenceLayer === ReferencePlanLayer.AboveChart ? aboveReference++ : belowReference++;
77
+ order.set(entry.id, position);
78
+ runs.set(entry.ownerId, [{ ids: [entry.id], order: position }]);
79
+ continue;
80
+ }
81
+ const position = ordinal++;
82
+ order.set(entry.id, position);
66
83
  const ownerRuns = runs.get(entry.ownerId) ?? [];
67
84
  if (previousOwner === entry.ownerId) {
68
85
  ownerRuns[ownerRuns.length - 1].ids.push(entry.id);
69
86
  }
70
87
  else {
71
- ownerRuns.push({ ids: [entry.id], order: ordinal });
88
+ ownerRuns.push({ ids: [entry.id], order: position });
72
89
  }
73
90
  runs.set(entry.ownerId, ownerRuns);
74
91
  previousOwner = entry.ownerId;
75
- ordinal++;
76
92
  }
77
93
  }
78
94
  };
package/dist/media.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { BuyerPhoto, PhysicalDocumentV1, UUID } from "./physical-document.interface.js";
1
+ import { DecorationKind } from "./physical-document.interface.js";
2
+ import type { BuyerPhoto, Decoration, PhysicalDocumentV1, UUID, VenueBuyerPhoto } from "./physical-document.interface.js";
2
3
  import type { DocumentSeat } from "./catalog.js";
3
4
  export declare enum MediaScope {
4
5
  Artwork = "artwork",
@@ -16,12 +17,25 @@ export type MediaReference = Readonly<{
16
17
  }>;
17
18
  /** All live consumers share resource identity, including photos on gap slots. */
18
19
  export declare function mediaReferences(document: PhysicalDocumentV1): readonly MediaReference[];
20
+ type ReferencePlan = Extract<Decoration, {
21
+ kind: DecorationKind.Image;
22
+ }> & {
23
+ referencePlan: true;
24
+ };
25
+ export declare function isReferencePlan(decoration: Decoration): decoration is ReferencePlan;
26
+ /** Reference plans are for authoring. Keep only resources referenced by remaining buyer-visible content. */
27
+ export declare function withoutReferencePlans(document: PhysicalDocumentV1): PhysicalDocumentV1;
19
28
  export type ResolvedBuyerPhoto = {
20
29
  scope: MediaScope.Generated;
21
30
  } | {
22
- scope: Exclude<MediaScope, MediaScope.Generated | MediaScope.Artwork>;
31
+ scope: MediaScope.Venue;
32
+ ownerId: UUID;
33
+ photo: VenueBuyerPhoto;
34
+ } | {
35
+ scope: MediaScope.Seat | MediaScope.Row | MediaScope.Section;
23
36
  ownerId: UUID;
24
37
  photo: BuyerPhoto;
25
38
  };
26
39
  /** Resolve the primary inventory address; overlapping editing scopes do not change inheritance. */
27
40
  export declare function buyerPhotoForSeat(document: PhysicalDocumentV1, seat: DocumentSeat): ResolvedBuyerPhoto;
41
+ export {};
package/dist/media.js CHANGED
@@ -58,6 +58,25 @@ export function mediaReferences(document) {
58
58
  documentReferences.set(document, result);
59
59
  return result;
60
60
  }
61
+ export function isReferencePlan(decoration) {
62
+ return decoration.kind === DecorationKind.Image && decoration.referencePlan === true;
63
+ }
64
+ const buyerDocuments = new WeakMap();
65
+ /** Reference plans are for authoring. Keep only resources referenced by remaining buyer-visible content. */
66
+ export function withoutReferencePlans(document) {
67
+ const cached = buyerDocuments.get(document);
68
+ if (cached)
69
+ return cached;
70
+ const planAssets = new Set(document.decorations.filter(isReferencePlan).map((plan) => plan.assetId));
71
+ if (!planAssets.size)
72
+ return document;
73
+ const decorations = document.decorations.filter((decoration) => !isReferencePlan(decoration));
74
+ const publicAssetIds = new Set(mediaReferences({ ...document, decorations }).map((reference) => reference.assetId));
75
+ const assets = document.assets.filter((asset) => !planAssets.has(asset.id) || publicAssetIds.has(asset.id));
76
+ const visible = { ...document, decorations, assets };
77
+ buyerDocuments.set(document, visible);
78
+ return visible;
79
+ }
61
80
  /** Resolve the primary inventory address; overlapping editing scopes do not change inheritance. */
62
81
  export function buyerPhotoForSeat(document, seat) {
63
82
  if (seat.slot.buyerPhoto)
@@ -135,6 +135,21 @@ export type MapCategory = {
135
135
  export type BuyerPhoto = {
136
136
  assetId: UUID;
137
137
  };
138
+ export declare const VenuePhotoLimit: {
139
+ readonly BearingDeg: 360;
140
+ readonly PitchDeg: 35;
141
+ readonly SourceLabel: 100;
142
+ };
143
+ export type VenueBuyerPhoto = BuyerPhoto & {
144
+ initialBearingDeg?: number;
145
+ initialPitchDeg?: number;
146
+ capturedAt?: string;
147
+ sourceLabel?: string;
148
+ sourceDimensions?: {
149
+ width: number;
150
+ height: number;
151
+ };
152
+ };
138
153
  export type SeatSlot = {
139
154
  buyerPhoto?: BuyerPhoto;
140
155
  gap?: boolean;
@@ -282,8 +297,21 @@ export type InventoryNaming = {
282
297
  code: string;
283
298
  name?: string;
284
299
  };
300
+ export declare enum TableChairNumberFormat {
301
+ Prefixed = "prefixed",
302
+ Number = "number",
303
+ Letter = "letter"
304
+ }
305
+ export type TableChairNumbering = {
306
+ startAt: number;
307
+ direction: LabelDirection.Forward | LabelDirection.Reverse;
308
+ format: TableChairNumberFormat;
309
+ };
285
310
  export type TableLabels = InventoryNaming & {
311
+ /** The physical booking sequence is independent of buyer-facing numbering. */
286
312
  chairs: LabelSequence;
313
+ chairNumbering?: TableChairNumbering;
314
+ buyerNoun?: string;
287
315
  tableStyle: LabelStyle;
288
316
  };
289
317
  export declare enum TableBookingMode {
@@ -330,18 +358,22 @@ export type RoundTableRecipe = {
330
358
  automaticSize?: boolean;
331
359
  seatArcDeg?: number;
332
360
  };
361
+ export type TableChairSideSelection = {
362
+ top: boolean;
363
+ bottom: boolean;
364
+ left: boolean;
365
+ right: boolean;
366
+ };
333
367
  export type LongTableLayout = {
334
368
  recipe: RectangularTableRecipe;
335
- sides: {
336
- top: boolean;
337
- bottom: boolean;
338
- left: boolean;
339
- right: boolean;
340
- };
369
+ sides?: TableChairSideSelection;
341
370
  };
342
371
  export type RectangularTable = GroupBase & {
372
+ surfaceColor?: string;
343
373
  selling?: TableSelling;
344
374
  roundLayout?: RoundTableRecipe;
375
+ /** Side preference set by editing the saved table, independent of the placed chair counts. */
376
+ conversionSides?: TableChairSideSelection;
345
377
  kind: SeatingKind.Rectangular;
346
378
  recipe: RectangularTableRecipe;
347
379
  labels: TableLabels;
@@ -353,6 +385,7 @@ export type RectangularTable = GroupBase & {
353
385
  };
354
386
  };
355
387
  export type RoundTable = GroupBase & {
388
+ surfaceColor?: string;
356
389
  selling?: TableSelling;
357
390
  longLayout?: LongTableLayout;
358
391
  kind: SeatingKind.Round;
@@ -389,6 +422,34 @@ export type DecorationStyle = {
389
422
  stroke?: Paint;
390
423
  strokeWidthM?: number;
391
424
  };
425
+ export type StageLabelStyle = {
426
+ color?: string;
427
+ fontFamily?: string;
428
+ underline?: boolean;
429
+ };
430
+ export declare enum ReferencePlanLayer {
431
+ BelowChart = "below-chart",
432
+ AboveChart = "above-chart"
433
+ }
434
+ /** The reference-plan picker accepts PDFs with up to 100 pages. */
435
+ export declare const ReferencePlanPageLimit = 100;
436
+ /** Authored source details for the private raster, which is the only stored artwork. */
437
+ export type ReferencePlanSource = {
438
+ fileName: string;
439
+ page?: number;
440
+ };
441
+ /** Fractions of the full image, with the origin at its upper-left corner. */
442
+ export type ReferencePlanCrop = {
443
+ left: number;
444
+ top: number;
445
+ width: number;
446
+ height: number;
447
+ };
448
+ export type ReferencePlanCalibration = {
449
+ firstPx: PointM;
450
+ secondPx: PointM;
451
+ distanceM: number;
452
+ };
392
453
  export type Decoration = DrawableBase & ({
393
454
  kind: DecorationKind.Text;
394
455
  text: string;
@@ -414,12 +475,20 @@ export type Decoration = DrawableBase & ({
414
475
  kind: DecorationKind.Polygon;
415
476
  boundary: PolygonM;
416
477
  gate?: GateDetails;
478
+ stage?: {
479
+ labelStyle?: StageLabelStyle;
480
+ };
417
481
  } | {
418
482
  kind: DecorationKind.Icon;
419
483
  iconId: VenueGlyph;
420
484
  sizeM: SizeM;
421
485
  } | {
422
486
  kind: DecorationKind.Image;
487
+ referencePlan?: true;
488
+ referenceSource?: ReferencePlanSource;
489
+ referenceLayer?: ReferencePlanLayer;
490
+ referenceCrop?: ReferencePlanCrop;
491
+ referenceCalibration?: ReferencePlanCalibration;
423
492
  assetId: UUID;
424
493
  sizeM: SizeM;
425
494
  opacity: number;
@@ -517,10 +586,11 @@ export type VenueZone = {
517
586
  focalPoint?: PointM;
518
587
  };
519
588
  export type PhysicalDocumentV1 = {
520
- buyerPhoto?: BuyerPhoto;
589
+ buyerPhoto?: VenueBuyerPhoto;
521
590
  schemaVersion: 1;
522
591
  mapId: UUID;
523
592
  name: string;
593
+ venueName?: string;
524
594
  coordinateSystem: {
525
595
  unit: "metre";
526
596
  xAxis: "right";
@@ -62,6 +62,12 @@ export var SeatShape;
62
62
  SeatShape["Stool"] = "stool";
63
63
  SeatShape["Bench"] = "bench";
64
64
  })(SeatShape || (SeatShape = {}));
65
+ // The hosted Whole-venue calibration clamps typed input to these limits.
66
+ export const VenuePhotoLimit = {
67
+ BearingDeg: 360,
68
+ PitchDeg: 35,
69
+ SourceLabel: 100,
70
+ };
65
71
  export var RowEnds;
66
72
  (function (RowEnds) {
67
73
  RowEnds["Start"] = "start";
@@ -91,6 +97,12 @@ export var RowJoin;
91
97
  RowJoin["Aisle"] = "aisle";
92
98
  RowJoin["Continuous"] = "continuous";
93
99
  })(RowJoin || (RowJoin = {}));
100
+ export var TableChairNumberFormat;
101
+ (function (TableChairNumberFormat) {
102
+ TableChairNumberFormat["Prefixed"] = "prefixed";
103
+ TableChairNumberFormat["Number"] = "number";
104
+ TableChairNumberFormat["Letter"] = "letter";
105
+ })(TableChairNumberFormat || (TableChairNumberFormat = {}));
94
106
  export var TableBookingMode;
95
107
  (function (TableBookingMode) {
96
108
  TableBookingMode["Individual"] = "individual";
@@ -108,6 +120,13 @@ export var TableChairDistribution;
108
120
  TableChairDistribution["Interior"] = "interior";
109
121
  TableChairDistribution["EqualSegments"] = "equalSegments";
110
122
  })(TableChairDistribution || (TableChairDistribution = {}));
123
+ export var ReferencePlanLayer;
124
+ (function (ReferencePlanLayer) {
125
+ ReferencePlanLayer["BelowChart"] = "below-chart";
126
+ ReferencePlanLayer["AboveChart"] = "above-chart";
127
+ })(ReferencePlanLayer || (ReferencePlanLayer = {}));
128
+ /** The reference-plan picker accepts PDFs with up to 100 pages. */
129
+ export const ReferencePlanPageLimit = 100;
111
130
  export var SectionOutlineRole;
112
131
  (function (SectionOutlineRole) {
113
132
  SectionOutlineRole["Boundary"] = "boundary";