Wheelchair places the template harness asks for: max(1, ceil(seats x 0.5%)).
function accessibleCount(seats: number): number;Parameters
| Parameter | Type | Description |
|---|---|---|
seats | number |
Returns
number@openseat/core/src/templates/kit/builders/infra.ts
104 venue templates (lazy entry) · Browser + Node
Venue templates: contracts, vocabulary, manifest and taxonomy, registry, search, params, capacity fitting, the TemplateKit, build/summary, placement, schematics, shared builders and the ten venue groups.
venue templates: contracts, vocabulary, manifest and taxonomy, registry, search, params, capacity fitting, the TemplateKit, build/summary, placement, schematics, shared builders and the ten venue groups.
Load this subpath lazily (dynamic import) from editors and apps: booking bundles that import only the root @openseat/core never pull it in.
A separate, lazily loaded entry point of @openseat/core: nothing extra to install, and apps that never import it never download it.
depends on zod
import {
buildTemplate,
searchTemplates,
listVenues,
fitCapacity,
defaultParams,
} from "@openseat/core/templates";Wheelchair places the template harness asks for: max(1, ceil(seats x 0.5%)).
function accessibleCount(seats: number): number;| Parameter | Type | Description |
|---|---|---|
seats | number |
number@openseat/core/src/templates/kit/builders/infra.ts
An "Accessible" standing area (wheelchair places and companions) at 0.5 persons/m², category 'accessible'. places caps the capacity; when the rectangle is too small for them a note says how many fit.
function accessibleZone(
kit: TemplateKitApi,
opts: AccessibleZoneOptions,
): BuilderResult;@openseat/core/src/templates/kit/builders/infra.ts
A named facility drawn as a decor polygon (or an obstacle seats can never overlap, for solid furniture: bar, buffet, FOH, DJ, screen) with a label object, since polygon names are not drawn on the map.
function amenity(
kit: TemplateKitApi,
opts: AmenityOptions,
): BuilderResult;@openseat/core/src/templates/kit/builders/infra.ts
seg + 1 points on a circular arc from a0 to a1 degrees.
| Parameter | Type | Description |
|---|---|---|
c | Point | |
r | number | |
a0 | number | |
a1 | number | |
segoptional | number | Default |
Point[]@openseat/core/src/templates/kit/geometry.ts
count arc wedges between from and to degrees around center, separated by gangways at least gangwayM wide at the front row (the kit's arcRun). Labels: labels[i], else ${labelPrefix}${i + 1}.
function arcWedges(
kit: TemplateKitApi,
opts: ArcWedgesOptions,
): SeatingResult;@openseat/core/src/templates/kit/builders/seating.ts
Area of a polygon given in metres, in m².
function areaM2(pointsM: readonly Point[]): number;@openseat/core/src/templates/kit/geometry.ts
A 400 m athletics track (straights east-west): the track surface, the infield (a football pitch, grass or nothing), lane lines, the finish line and the 100 m start extension west of the home (south) straight.
function athleticsTrack(
kit: TemplateKitApi,
opts?: AthleticsTrackOptions,
): AthleticsTrackResult;| Parameter | Type | Description |
|---|---|---|
kit | TemplateKitApi | |
optsoptional | AthleticsTrackOptions | Default |
@openseat/core/src/templates/kit/builders/fields.ts
function badmintonCourt(
kit: TemplateKitApi,
opts?: CourtOptions,
): FieldResult;@openseat/core/src/templates/kit/builders/fields.ts
Banquet rounds: T60 (1.52 m, 8-10 seats) or T72 (1.83 m, 10-12 seats) on the TABLEGRID.
function banquetRounds(
kit: TemplateKitApi,
opts: BanquetRoundsOptions,
): TableGridResult;@openseat/core/src/templates/kit/builders/tables.ts
function basketballCourt(
kit: TemplateKitApi,
opts?: CourtOptions,
): FieldResult;@openseat/core/src/templates/kit/builders/fields.ts
A dance battle: a circular or square cypher floor (a stage), the audience on 3 sides (north open), 4 sides or an arc round the south, as seated sections, standing bands or seated front rows with standing behind; the judges' table on the north side (not for sale), a DJ booth (an obstacle) and a crew holding zone (a polygon, no inventory).
function battleRing(
kit: TemplateKitApi,
opts?: BattleRingOptions,
): BattleRingResult;@openseat/core/src/templates/kit/builders/stagecraft.ts
Back-to-back booth pairs: blocks blocks of columnsPerBlock booths across, separated by cross aisles, and pairs pairs of rows separated by main aisles. Labels are ${row letter}${n}; the booths at each block row's ends take cornerCategory.
function boothBand(
kit: TemplateKitApi,
opts: BoothBandOptions,
): BoothBlockResult;@openseat/core/src/templates/kit/builders/expo.ts
A plain booth grid; labels ${labelPrefix}${n} row by row; the four corners take cornerCategory.
function boothGrid(
kit: TemplateKitApi,
opts: BoothGridOptions,
): BoothBlockResult;@openseat/core/src/templates/kit/builders/expo.ts
Booths around an ellipse (inner edges touching it), rotated to face the centre. The count is lowered (with a note) until neighbours do not overlap.
function boothRing(
kit: TemplateKitApi,
opts: BoothRingOptions,
): BoothBlockResult;@openseat/core/src/templates/kit/builders/expo.ts
Builds a template layout:
targetCapacity, fits the capacity driver;TemplateKit;metadata.openseat (OpenSeatMeta): units, the template stamp, block stamps, not-for-sale categories and IDs and the indicative INR prices of the categories present. Block stamps are dropped, with a note, when the metadata would exceed 48 KB;zonesOnly, turns every section into a zone (zoneTemplateLayout);Identical input gives a byte-identical serializeLayout; no timestamps are written. setup is a registered setup id or, for tests and fixtures, a definition.
function buildTemplate(
setup: string | SetupDefinition,
input?: Readonly<Record<string, ParamValue>> | null,
opts?: BuildTemplateOptions,
): BuiltTemplate;| Parameter | Type | Description |
|---|---|---|
setup | string | SetupDefinition | |
inputoptional | Readonly<Record<string, ParamValue>> | null | |
optsoptional | BuildTemplateOptions | Default |
// A separate, lazy entry point: buyer pages never load it.
const { buildTemplate, searchTemplates } = await import("@openseat/core/templates");
const [hit] = searchTemplates("farewell banquet", { limit: 1 }); // social.banquet-hall.rounds-dance
const { layout, summary } = buildTemplate("performance.auditorium.annual-day", null, {
name: "Annual Day 2026",
targetCapacity: 400, // fits rows to the audience
zonesOnly: false, // true: "Sections only (no seats)", sold by quantity
});
summary.totalCapacity; // 408
summary.notes; // every clamp, in plain wordsRecipe: start from a venue template
@openseat/core/src/templates/build.ts
Cabaret rounds: small rounds on a staggered grid for sightlines.
function cabaretTables(
kit: TemplateKitApi,
opts: CabaretTablesOptions,
): TableGridResult;@openseat/core/src/templates/kit/builders/tables.ts
An open Catmull-Rom spline through pointsM (centripetal-free, uniform), with samples segments between each pair of points. The first and last points are kept.
| Parameter | Type | Description |
|---|---|---|
pointsM | readonly Point[] | |
samplesoptional | number | Default |
Point[]@openseat/core/src/templates/kit/geometry.ts
Problems with one param spec (and its relation to the others).
@openseat/core/src/templates/registry.ts
Problems with one setup definition on its own.
function checkSetupDefinition(def: SetupDefinition): string[];| Parameter | Type | Description |
|---|---|---|
def | SetupDefinition |
def takes SetupDefinition:
stringnumberstringreadonly ParamSpec[]{ readonly small?: Partial<P>; readonly large?: Partial<P>; }CapacitySpecbooleanstring(params: P, kit: TemplateKitApi) => voidstring[]@openseat/core/src/templates/registry.ts
Every registry rule. Returns human-readable problems; empty when clean.
function checkTemplateRegistry(
opts?: CheckRegistryOptions,
): string[];| Parameter | Type | Description |
|---|---|---|
optsoptional | CheckRegistryOptions | Default |
opts takes CheckRegistryOptions:
1 | 2booleanreadonly SetupDefinition[]readonly VenueManifest[] = VENUE_MANIFESTstring[]@openseat/core/src/templates/registry.ts
Clears the build memo (tests).
function clearCapacityMemo(): void;void@openseat/core/src/templates/capacity.ts
CIELAB chroma; 0 for a malformed colour.
function colourChroma(hex: string): number;| Parameter | Type | Description |
|---|---|---|
hex | string |
number@openseat/core/src/templates/vocab.ts
CIE76 colour difference; Infinity when either colour is malformed.
function colourDeltaE(a: string, b: string): number;| Parameter | Type | Description |
|---|---|---|
a | string | |
b | string |
number@openseat/core/src/templates/vocab.ts
CIELAB (D65) of a #rrggbb colour, or null when it is not one.
function colourToLab(
hex: string,
): { L: number; a: number; b: number } | null;| Parameter | Type | Description |
|---|---|---|
hex | string |
{ L: number; a: number; b: number; } | null@openseat/core/src/templates/vocab.ts
Structural columns (obstacles) on a grid inside zoneM, starting half a pitch in from its edges; columns inside skipM are left out.
function columnGrid(
kit: TemplateKitApi,
opts: ColumnGridOptions,
): ColumnGridResult;@openseat/core/src/templates/kit/builders/infra.ts
A cricket ground: the oval outfield (pitch north-south), the boundary rope, the 30-yard circle, the pitch strip with creases, optional sight screens (obstacles) beyond the boundary at both ends and a pavilion (decor) on the west.
function cricketGround(
kit: TemplateKitApi,
opts?: CricketGroundOptions,
): CricketGroundResult;| Parameter | Type | Description |
|---|---|---|
kit | TemplateKitApi | |
optsoptional | CricketGroundOptions | Default |
@openseat/core/src/templates/kit/builders/fields.ts
Optimal-string-alignment (restricted Damerau-Levenshtein) distance, capped at max + 1.
function damerauDistance(
a: string,
b: string,
max?: number,
): number;| Parameter | Type | Description |
|---|---|---|
a | string | |
b | string | |
maxoptional | number | Default |
number@openseat/core/src/templates/search.ts
A dance floor (decor, or sold as standing at 1.0/m² with standing) and an optional DJ booth (an obstacle) on one side. keepOutM covers both, ready to pass to tableGrid.
function danceFloor(
kit: TemplateKitApi,
opts: DanceFloorOptions,
): DanceFloorResult;@openseat/core/src/templates/kit/builders/ground.ts
function defaultParams(
setup: Pick<SetupDefinition, "params">,
): Record<string, ParamValue>;| Parameter | Type | Description |
|---|---|---|
setup | Pick<SetupDefinition, "params"> |
Record<string, ParamValue>@openseat/core/src/templates/params.ts
Declares a setup with params typed from its ParamSpec tuple. Use as const on the params array.
function defineSetup<const S extends readonly ParamSpec[]>(
d: Omit<SetupDefinition<ParamsOf<S>>, "params" | "build"> & {
readonly params: S;
build(p: ParamsOf<S>, kit: TemplateKitApi): void;
},
): SetupDefinition;S extends readonly ParamSpec[]| Parameter | Type | Description |
|---|---|---|
d | Omit<SetupDefinition<ParamsOf<S>>, "params" | "build"> & { readonly params: S; build(p: ParamsOf<S>, kit: TemplateKitApi): void; } |
@openseat/core/src/templates/types.ts
The density caution text. Summaries compute the same text from GA capacities, so the two merge.
function densityCaution(label: string): string;| Parameter | Type | Description |
|---|---|---|
label | string |
string@openseat/core/src/templates/kit/seats.ts
Classroom desks in runs (desksPerRun side by side, aisles between runs), students on the back edge facing frontSide. Recorded as 'desk-runs'.
function deskRuns(
kit: TemplateKitApi,
opts: DeskRunsOptions,
): TableGridResult;@openseat/core/src/templates/kit/builders/tables.ts
The band between two concentric ellipses from a0 to a1 degrees: the outer arc forwards, then the inner arc back. An inner radius of 0 closes the sector at the centre. A full 360-degree sweep is not supported (it would not be a simple polygon); use two halves.
| Parameter | Type | Description |
|---|---|---|
c | Point | |
rxIn | number | |
ryIn | number | |
rxOut | number | |
ryOut | number | |
a0 | number | |
a1 | number | |
segoptional | number | Default |
Point[]@openseat/core/src/templates/kit/geometry.ts
An end-stage standing show: the stage, a fan pit at the stage front (1.6/m², behind a security moat), a barrier line, the general standing floor (1.4/m²) wrapped round the pit as one U-shaped area with the FOH desk cut out (its area is not counted), the FOH desk itself (an obstacle) and an accessible viewing platform (0.5/m²) at the back of the floor.
function endStageShow(
kit: TemplateKitApi,
opts: EndStageShowOptions,
): EndStageShowResult;@openseat/core/src/templates/kit/builders/ground.ts
A fan-shaped house: concentric bands (price bands, front to back) of arc sections, one per wedge. Each band's front row sits behind the previous band's back row (plus gapAfterM); rows continue across bands.
function fanHouse(
kit: TemplateKitApi,
opts: FanHouseOptions,
): FanHouseResult;@openseat/core/src/templates/kit/builders/seating.ts
A param spec by key, or undefined.
function findParam(
setup: Pick<SetupDefinition, "params">,
key: string,
): ParamSpec | undefined;| Parameter | Type | Description |
|---|---|---|
setup | Pick<SetupDefinition, "params"> | |
key | string |
ParamSpec | undefined@openseat/core/src/templates/params.ts
Finds the driver value whose capacity best matches target, by binary search over the driver's step grid (capacity must be non-decreasing in it). Uses capacity.estimate when present, buildTemplate summaries otherwise (about 8 builds at most, memoised). A target above the max returns the max with a note; below the min returns the min with a note.
function fitCapacity(
setupOrId: string | SetupDefinition,
target: number,
opts?: FitCapacityOptions,
): FitCapacityResult;| Parameter | Type | Description |
|---|---|---|
setupOrId | string | SetupDefinition | |
target | number | |
optsoptional | FitCapacityOptions | Default |
@openseat/core/src/templates/capacity.ts
32-bit FNV-1a hash of a string.
function fnv1a(text: string): number;| Parameter | Type | Description |
|---|---|---|
text | string |
number@openseat/core/src/templates/params.ts
A football pitch (default 105 x 68 m) with boxes, centre circle and penalty spots.
function footballPitch(
kit: TemplateKitApi,
opts?: FootballPitchOptions,
): FieldResult;| Parameter | Type | Description |
|---|---|---|
kit | TemplateKitApi | |
optsoptional | FootballPitchOptions | Default |
@openseat/core/src/templates/kit/builders/fields.ts
Planning capacity of a standing area: floor((area − deduct) × density), at least 1. boundaryUnits is in layout units (unitsPerMetre per metre).
function gaCapacityForArea(
boundaryUnits: readonly Point[],
personsPerM2: number,
unitsPerMetre?: number,
deductM2?: number,
): number;| Parameter | Type | Description |
|---|---|---|
boundaryUnits | readonly Point[] | |
personsPerM2 | number | |
unitsPerMetreoptional | number | Default |
deductM2optional | number | Default |
number@openseat/core/src/templates/kit/geometry.ts
Entrances: explicit gates, and/or north/south/east/west gates spread evenly along the walls of wallsM. Gates on the east and west walls are rotated 90 degrees. Labels continue ${labelPrefix}${n} across the walls (north, east, south, west).
function gates(
kit: TemplateKitApi,
opts: GatesOptions,
): BuilderResult;@openseat/core/src/templates/kit/builders/infra.ts
A manifest setup (implemented or not) by its full id.
function getManifestSetup(
id: string,
): (ManifestSetup & { readonly venueId: string }) | undefined;| Parameter | Type | Description |
|---|---|---|
id | string |
(ManifestSetup & { readonly venueId: string; }) | undefined@openseat/core/src/templates/registry.ts
An implemented setup by its full id.
function getSetup(id: string): VenueSetupTemplate | undefined;@openseat/core/src/templates/registry.ts
function getVenue(id: string): VenueTemplate | undefined;@openseat/core/src/templates/registry.ts
function getVenueManifest(id: string): VenueManifest | undefined;@openseat/core/src/templates/registry.ts
A hockey pitch (91.4 x 55 m): centre line, 23 m lines and shooting circles.
function hockeyPitch(
kit: TemplateKitApi,
opts?: CourtOptions,
): FieldResult;@openseat/core/src/templates/kit/builders/fields.ts
A rectangle grown by d on every side (normalised corners).
@openseat/core/src/templates/kit/builders/infra.ts
function isCategoryVocabId(id: string): id is CategoryVocabId;@openseat/core/src/templates/vocab.ts
True when values has an entry for every param of the setup.
function isCompleteParams(
setup: Pick<SetupDefinition, "params">,
values: ParamValues,
): boolean;| Parameter | Type | Description |
|---|---|---|
setup | Pick<SetupDefinition, "params"> | |
values | ParamValues |
boolean@openseat/core/src/templates/params.ts
True for setups that get the reduced matrix: flagged heavy, or estimated above 8k seats by default.
function isHeavySetup(
setup: Pick<SetupDefinition, "heavy" | "capacity" | "params">,
): boolean;| Parameter | Type | Description |
|---|---|---|
setup | Pick<SetupDefinition, "heavy" | "capacity" | "params"> |
boolean@openseat/core/src/templates/params.ts
Island stands (large booths) on a grid with aisles all round.
function islandGrid(
kit: TemplateKitApi,
opts: IslandGridOptions,
): BoothBlockResult;@openseat/core/src/templates/kit/builders/expo.ts
Joins the manifest with the implemented setup definitions. Every venue is returned; setups holds its implemented setups only, in manifest order.
function joinVenueTemplates(
manifest: readonly VenueManifest[],
definitions: readonly SetupDefinition[],
): VenueTemplate[];| Parameter | Type | Description |
|---|---|---|
manifest | readonly VenueManifest[] | |
definitions | readonly SetupDefinition[] |
@openseat/core/src/templates/registry.ts
Kabaddi: men 13 x 10 m, women 12 x 8 m, with baulk, bonus and lobby lines.
function kabaddiCourt(
kit: TemplateKitApi,
opts?: KabaddiCourtOptions,
): FieldResult;@openseat/core/src/templates/kit/builders/fields.ts
Implemented setups in registry order, optionally of one category.
function listSetups(
categoryId?: TemplateCategoryId,
): VenueSetupTemplate[];@openseat/core/src/templates/registry.ts
Venues in registry order. By default venues with no implemented setup are hidden.
function listVenues(opts?: {
readonly implementedOnly?: boolean;
readonly categoryId?: TemplateCategoryId;
}): VenueTemplate[];| Parameter | Type | Description |
|---|---|---|
optsoptional | { readonly implementedOnly?: boolean; readonly categoryId?: TemplateCategoryId; } | Default |
@openseat/core/src/templates/registry.ts
A row of lounge sets: a coffee table with sofa places on both long sides.
function loungeRow(
kit: TemplateKitApi,
opts: LoungeRowOptions,
): TableGridResult;@openseat/core/src/templates/kit/builders/tables.ts
Metres to layout units, rounded to 1e-3.
function m(metres: number): number;| Parameter | Type | Description |
|---|---|---|
metres | number |
number@openseat/core/src/templates/kit/units.ts
A venue's aliases with the owner's names merged in centrally: the list-A names it is PRIMARY for and its list-B subtype names. Boost venues do not get the list-A name (search scores them separately).
function mergedAliases(venue: VenueManifest): string[];| Parameter | Type | Description |
|---|---|---|
venue | VenueManifest |
venue takes VenueManifest:
stringTemplateCategoryIdstringstringreadonly string[]stringstringreadonly string[]1 | 2readonly ManifestSetup[]string[]@openseat/core/src/templates/registry.ts
mulberry32 PRNG: deterministic floats in [0, 1).
function mulberry32(seed: number): () => number;| Parameter | Type | Description |
|---|---|---|
seed | number |
() => number@openseat/core/src/templates/params.ts
The row label index that follows rows rows starting at start with the kit's alpha labelling (I and O skipped), so a price band behind another continues its letters: nextRowStart(1, 3) = 4 (A-C, then D).
function nextRowStart(start: number, rows: number): number;| Parameter | Type | Description |
|---|---|---|
start | number | |
rows | number |
number@openseat/core/src/templates/kit/builders/infra.ts
Normalised, stemmed tokens of a text, stop words dropped.
function normaliseTokens(text: string): string[];| Parameter | Type | Description |
|---|---|---|
text | string |
string[]@openseat/core/src/templates/search.ts
Named param combinations for the build matrix. Every combo is fully resolved and in range; identical combos are dropped (the first name wins).
Light setups: default, small, large, all-min, all-max, maxCapacity, minCapacity, each numeric param alone at min and at max, each enum option, each boolean flipped, and 6 seeded randoms. Heavy setups: default, small, large, maxCapacity, each param extreme with the rest at default, each enum option, and 4 seeded randoms. Randoms use mulberry32 seeded with FNV-1a of the setup id.
function paramCombos(
setup: Pick<
SetupDefinition,
"id" | "params" | "sizes" | "heavy" | "capacity"
>,
opts?: ParamCombosOptions,
): ParamCombo[];| Parameter | Type | Description |
|---|---|---|
setup | Pick<SetupDefinition, "id" | "params" | "sizes" | "heavy" | "capacity"> | |
optsoptional | ParamCombosOptions | Default |
@openseat/core/src/templates/params.ts
n evenly spaced on-grid values of an int/number param, min and max included.
function paramSweep(
spec: ParamSpec & { kind: "int" | "number" },
n: number,
): number[];@openseat/core/src/templates/params.ts
Places built into target.
replace: the template's layout under the target's id and revision, with metadata = the target's other metadata plus the template's openseat block; the canvas follows the template FRAME rule (venue and objects plus 40, then fitCanvasToContent). removedInventoryIds lists every target inventory key the template does not have, for the editor's destructive-change guard.
insert (built on core's copyInto):
${ns}:${id}, ns the first free of t1, t2…;(2), (3)…, and its seats' public ids are re-derived from it (${label}-${row}-${seat}, the rule seats added later follow);${ns}-${key};inserts (the last 20 are kept);at, or else placed right of the existing content (the arena preset rule); the target's venue and focal point stay;zonesOnly places the template's zone variant in either mode.
function placeTemplate(
target: LayoutDocument,
built: BuiltTemplate,
opts: PlaceTemplateOptions,
): PlaceTemplateResult;| Parameter | Type | Description |
|---|---|---|
target | LayoutDocument | |
built | BuiltTemplate | |
opts | PlaceTemplateOptions |
@openseat/core/src/templates/place.ts
A pool: the deck, the water and lane ropes (long axis east-west unless vertical).
function poolLanes(
kit: TemplateKitApi,
opts?: PoolLanesOptions,
): PoolLanesResult;@openseat/core/src/templates/kit/builders/fields.ts
A metre point in layout units.
@openseat/core/src/templates/kit/units.ts
Ramer-Douglas-Peucker simplification of an open polyline; keeps both ends. Iterative.
@openseat/core/src/templates/kit/geometry.ts
A rectangle's centre, width, height and corners (clockwise from the top-left). Corners may come in any order.
@openseat/core/src/templates/kit/geometry.ts
A rectangle from its centre and size (metres).
function rectM(cx: number, cy: number, w: number, h: number): RectM;@openseat/core/src/templates/kit/builders/infra.ts
Corners of a w x h rectangle centred on the origin, clockwise from the top-left.
function rectPts(w: number, h: number): Point[];@openseat/core/src/templates/kit/geometry.ts
Smallest rectangle containing every given rectangle; a zero rect at the origin for none.
@openseat/core/src/templates/kit/builders/infra.ts
Rebuilds block blockId with params (merged over the stamp's params).
The block is rebuilt in a sub-kit with the stamp's prefix and frame, translated by the drift of the surviving members' centroid (so a block the user moved regenerates where it now is). Per slot:
removedInventoryIds (also when a kept table loses seats). New members get labels that do not clash with kept ones. The stamp (params, frame and slots) and metadata.openseat.notForSale are updated, and vocab categories the new members use are added. An unknown block id returns the layout unchanged.function regenerateBlock(
layout: LayoutDocument,
blockId: string,
params: ParamValues,
): RegenerateBlockResult;@openseat/core/src/templates/kit/builders/blocks.ts
Resolves the params of a build: defaults, then the size preset, then input. Numbers are snapped to their step, then clamped; a bad type or enum value falls back to the default with an issue; unknown keys are dropped. Never throws.
function resolveParams(
setup: Pick<SetupDefinition, "params" | "sizes">,
input?: Readonly<Record<string, unknown>> | null,
size?: TemplateSize,
): ResolvedParams;| Parameter | Type | Description |
|---|---|---|
setup | Pick<SetupDefinition, "params" | "sizes"> | |
inputoptional | Readonly<Record<string, unknown>> | null | |
sizeoptional | TemplateSize | Default |
@openseat/core/src/templates/params.ts
Rounds to 3 decimals, without -0.
function round3(value: number): number;| Parameter | Type | Description |
|---|---|---|
value | number |
number@openseat/core/src/templates/kit/units.ts
A runway show: the main stage (north) with a ramp running south from its front centre, drawn as one thrust stage (with a T crossbar at the head when shape is "T"), the audience on both sides of the ramp (seated sections facing it, with optional front price rows, or standing bands), a press photo pit at the ramp head (not for sale), the judges' table beyond it (not for sale) and a backstage zone (a polygon, no inventory) behind the stage.
function runway(
kit: TemplateKitApi,
opts?: RunwayOptions,
): RunwayResult;@openseat/core/src/templates/kit/builders/stagecraft.ts
The schematic as a standalone SVG string. Presentation attributes only (fill, stroke, stroke-width, fill-opacity): no style attributes or elements, so it renders under a strict Content-Security-Policy.
function schematicToSvg(
s: TemplateSchematic,
opts?: { readonly title?: string },
): string;| Parameter | Type | Description |
|---|---|---|
s | TemplateSchematic | |
optsoptional | { readonly title?: string; } | Default |
string@openseat/core/src/templates/schematic.ts
Searches venue templates. Pure and deterministic. An empty query lists every venue in registry order (score 0). facet keeps venues with at least one setup of that facet and scores only those setups.
function searchTemplates(
rawQuery: string,
opts?: TemplateSearchOptions,
): TemplateSearchHit[];// A separate, lazy entry point: buyer pages never load it.
const { buildTemplate, searchTemplates } = await import("@openseat/core/templates");
const [hit] = searchTemplates("farewell banquet", { limit: 1 }); // social.banquet-hall.rounds-dance
const { layout, summary } = buildTemplate("performance.auditorium.annual-day", null, {
name: "Annual Day 2026",
targetCapacity: 400, // fits rows to the audience
zonesOnly: false, // true: "Sections only (no seats)", sold by quantity
});
summary.totalCapacity; // 408
summary.notes; // every clamp, in plain wordsRecipe: start from a venue template
@openseat/core/src/templates/search.ts
Problems with a set of sellable category colours: missing, malformed, near-grey, or too close to another sellable colour. Empty when fine.
function sellableColourProblems(
categories: readonly {
readonly id: string;
readonly colour?: string | undefined;
}[],
): string[];| Parameter | Type | Description |
|---|---|---|
categories | readonly { readonly id: string; readonly colour?: string | undefined; }[] |
string[]@openseat/core/src/templates/vocab.ts
Snaps to the spec's step grid, THEN clamps to [min, max]; ints are rounded.
function snapParam(
spec: ParamSpec & { kind: "int" | "number" },
value: number,
): number;| Parameter | Type | Description |
|---|---|---|
spec | ParamSpec & { kind: "int" | "number"; } | |
value | number |
number@openseat/core/src/templates/params.ts
A stand of count identical block sections side by side, facing the line through focus from side (convention C4: row A nearest the line, seat 1 at the spectator's left). Labels run left to right from the spectator's view: labels[i], else ${labelPrefix}${i + 1}.
function standAlong(
kit: TemplateKitApi,
opts: StandAlongOptions,
): SeatingResult;@openseat/core/src/templates/kit/builders/seating.ts
Light plural stemming: ies -> y, (s|x|z|ch|sh)es -> drop es, s -> drop s.
function stemToken(word: string): string;| Parameter | Type | Description |
|---|---|---|
word | string |
string@openseat/core/src/templates/search.ts
Counts for the template gallery and the build summary, derived from the objects alone, so they also work on a layout the user has edited:
metadata.openseat.unsellableCategories (the vocabulary's not-for-sale categories when the layout lists none), or covered by metadata.openseat.notForSale (unsellableInventory). unsellableSeats counts those seats; totalCapacity is the sellable seats plus the sellable GA capacity (booths are not people).showSeats: false) sell their capacity instead of their seats: totalCapacity counts the capacity of each one that is for sale, and unsellableSeats the seats beyond it (all of them when the zone is held back). Seats, tables, accessible places and the per-category seat counts still count the seats kept in the document, so a setup's seat and zone variants report the same figures. zones counts zone sections plus GA areas.TEMPLATE_LIMITS.largeLayoutWarn seats. notes is empty here; buildTemplate adds the kit's clamp notes.function summarizeLayout(
layout: LayoutDocument,
upm?: number,
): TemplateSummary;| Parameter | Type | Description |
|---|---|---|
layout | LayoutDocument | |
upmoptional | number | Default |
@openseat/core/src/templates/summary.ts
Reads measure from a build summary.
function summaryMeasure(
summary: TemplateSummary,
measure: CapacitySpec["measure"],
): number;@openseat/core/src/templates/capacity.ts
The TABLEGRID algorithm (see the module comment) over zoneM, recorded as a 'table-grid' block. Pitches are raised (with a note) so neighbouring footprints never touch; count is capped at the free cells.
function tableGrid(
kit: TemplateKitApi,
opts: TableGridOptions,
): TableGridResult;@openseat/core/src/templates/kit/builders/tables.ts
Team tables (hackathons, LAN parties): rect tables with seats on both long sides. Recorded as 'team-tables'.
function teamTables(
kit: TemplateKitApi,
opts: TeamTablesOptions,
): TableGridResult;@openseat/core/src/templates/kit/builders/tables.ts
The schematic of layout in a width x height viewBox (default 320 x 200), fitted with a 4-unit margin. roles (BuiltTemplate.roles) tells surfaces, markings, zones and obstacles apart; without it polygon zIndex decides. At most SCHEMATIC_MAX_BYTES serialised.
function templateSchematic(
layout: LayoutDocument,
roles?: ReadonlyMap<string, ObjectRole>,
opts?: TemplateSchematicOptions,
): TemplateSchematic;| Parameter | Type | Description |
|---|---|---|
layout | LayoutDocument | |
rolesoptional | ReadonlyMap<string, ObjectRole> | |
optsoptional | TemplateSchematicOptions | Default |
@openseat/core/src/templates/schematic.ts
function tennisCourt(
kit: TemplateKitApi,
opts?: CourtOptions,
): FieldResult;@openseat/core/src/templates/kit/builders/fields.ts
A theatre house: columns (left to right from the audience) times tiers (price bands, front to back), each a separate block section. Rows continue across tiers (VIP A-C, Gold D-P…); a cross aisle may separate tiers. Wheelchair places go in the front row of the first tier, sized for each column's seats in every tier.
function theatreBlocks(
kit: TemplateKitApi,
opts: TheatreBlocksOptions,
): TheatreBlocksResult;@openseat/core/src/templates/kit/builders/seating.ts
A point rounded to 1e-3.
@openseat/core/src/templates/kit/units.ts
Layout units to metres, rounded to 1e-3.
function toMetres(units: number, unitsPerMetre?: number): number;| Parameter | Type | Description |
|---|---|---|
units | number | |
unitsPerMetreoptional | number | Default |
number@openseat/core/src/templates/kit/units.ts
A rectangle with a rectangular notch cut into one of its edges (a U shape), e.g. a standing area wrapped around a front-of-house desk. The notch is clipped to the outer rectangle and cut from the edge it is nearest to. A notch that does not overlap the outer rectangle, or that would split it, leaves the plain rectangle.
@openseat/core/src/templates/kit/geometry.ts
True when value is a valid, in-range, on-grid value of spec.
function valueFits(spec: ParamSpec, value: unknown): boolean;@openseat/core/src/templates/registry.ts
The vocab entry for an id, or undefined for ids outside the vocab.
function vocabEntry(id: string): CategoryVocabEntry | undefined;@openseat/core/src/templates/vocab.ts
function volleyballCourt(
kit: TemplateKitApi,
opts?: CourtOptions,
): FieldResult;@openseat/core/src/templates/kit/builders/fields.ts
The zone variant of a built template layout:
toZoneOnlyLayout: loose rows, tables and seats are wrapped into sections, and every section with seats becomes a zone section;metadata.openseat.notForSale (unless its category already holds it back), and a section held back only by its category while some of its seats sold takes their most common sellable category instead;ZONE_CORNER_RADIUS_M); the sections core added are rounded to 1e-3 like every template coordinate;ZONES_SEATED_FOOTNOTE is centred under the content (core createFootnote, sized to the content width), and the canvas grows to fit it;zonesOnly: true.Seats themselves are never changed, so the sellable capacity equals the seat variant's. A layout that is already a zone layout is returned as is.
function zoneTemplateLayout(layout: LayoutDocument): LayoutDocument;@openseat/core/src/templates/zones.ts
Thrown for out-of-range input that cannot be clamped (unknown setup, limits).
class TemplateInputError extends RangeErrorExtends RangeError: its public members apply here too.
| Member | Type | Description |
|---|---|---|
constructorconstructor | (message: string) |
@openseat/core/src/templates/types.ts
class TemplateKit implements TemplateKitApi| Member | Type | Description |
|---|---|---|
prefix | string | |
U | 50 | |
constructorconstructor | (prefix: string) | |
idmethod | (local: string) => string |
|
categorymethod | (id: CategoryVocabId) => string | Registers a vocab category (name and colour from the vocab) and returns its id. |
notemethod | (msg: string) => void | |
cautionmethod | (msg: string) => void | |
notForSalemethod | (ids: readonly string[]) => void | Marks objects individually Not for sale (metadata.openseat.notForSale). |
blockmethod | (p: KitBlockParams) => string | |
arcmethod | (p: KitArcParams) => string | |
arcRunmethod | (p: KitArcRunParams) => string[] | |
arenamethod | (p: KitArenaParams) => { sectionIds: string[]; byTier: string[][]; } | |
roundTablemethod | (p: KitRoundTableParams) => string | |
rectTablemethod | (p: KitRectTableParams) => string | |
boothmethod | (p: KitBoothParams) => string | |
boothGridmethod | (p: KitBoothGridParams) => string[] | |
stagemethod | (p: KitStageParams) => string | A stage: the theme's light-grey stage look (any |
gamethod | (p: KitGaParams) => string | |
polygonmethod | (p: KitPolygonParams) => string | |
decormethod | (p: KitPolygonParams) => string | A polygon with no inventory (zones, furniture). Role defaults to 'decor'. |
pathmethod | (p: KitPathParams) => string | |
labelmethod | (p: KitLabelParams) => string | |
entrancemethod | (p: KitEntranceParams) => string | |
venuemethod | (p: KitVenueParams) => void | |
focalmethod | (at: PtM) => void | |
setCategorymethod | (ids: readonly string[], cat: CategoryVocabId) => void | |
setRowCategorymethod | (sectionId: string, rows: readonly string[], cat: CategoryVocabId) => void | For 1-2 special rows only; seats added later take the section category. |
flagSeatsmethod | (sectionId: string, rowLabel: string, seatLabels: readonly string[], flags: Partial<Accessibility>) => void | |
removeSectionsmethod | (pred: (s: Section) => boolean) => number | |
sectionsmethod | () => readonly Section[] | |
sectionFromSelectionmethod | (ids: readonly string[], opts: { label: string; shape?: "hull" | "bounds"; paddingM?: number; }) => string | null | Wraps existing objects (rows, tables, seats, GA areas) in a new seatless section through core's createSectionFromSelection, outline "bounds" by default, and gives it a kit id ( |
recordBlockmethod | (kind: BlockKind, label: string, params: ParamValues, frameM: { originM: PtM; rotation: number; }, slots: Record<string, string>) => string | Records a regenerable block; returns the block stamp id. |
finishmethod | () => TemplateDraft |
Every member is readonly.
@openseat/core/src/templates/kit/kit.ts
interface AccessibleZoneOptions| Member | Type | Description |
|---|---|---|
rectM | RectM | |
placesoptional | number | Wheelchair places (capacity cap); the area at 0.5/m² bounds it. |
labeloptional | string |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface AmenityOptions| Member | Type | Description |
|---|---|---|
kind | AmenityKind | |
rectM | RectM | |
labeloptional | string | Defaults to the kind's name, e.g. "Toilets". |
solidoptional | boolean | Draws it as an obstacle seats can never overlap. Defaults: bar, buffet, foh, dj, screen. |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface ArcWedgesOptions| Member | Type | Description |
|---|---|---|
center | PtM | |
innerRadiusM | number | |
rows | number | |
from | number | Run start and end angles (degrees). |
to | number | |
count | number | Wedges; clamped by the kit so each is at least 1 degree. |
gangwayMoptional | number | Gangway between wedges at the front row. Default 1.2. Default |
labelsoptional | readonly string[] | |
labelPrefixoptional | string | Default "Block ". Default |
category | CategoryVocabId | |
seatoptional | SeatPresetName | |
seatSpacingMoptional | number | |
rowSpacingMoptional | number | |
rowStartoptional | number | |
edgeMarginMoptional | number | |
accessibleoptional | AccessibleOption |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface AthleticsTrackOptions| Member | Type | Description |
|---|---|---|
atoptional | PtM | |
lanesoptional | number | Lanes; clamped to 4-10. Default 8. Default |
laneWidthMoptional | number | Lane width; default 1.22. |
straightMoptional | number | Straight length; default 84.39. |
bendRadiusMoptional | number | Inner (kerb) bend radius; default 36.5. |
infieldoptional | "football" | "grass" | "none" | Infield: a football pitch, plain grass or nothing. Default "football". Default |
finishoptional | boolean | Draws the finish line. Default true. Default |
sprintExtensionoptional | boolean | Extends the home straight (east side) for the 100 m start. Default true. Default |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface AthleticsTrackResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
surfaceId | string | |
outerHalfWidthM | number | Half extents of the outer lane edge (east-west, north-south). |
outerHalfHeightM | number | |
bendRadiusM | number | Outer lane edge bend radius. |
outerM | RectM | |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface BanquetRoundsOptions extends TableBlockCommonExtends TableBlockCommon
| Member | Type | Description |
|---|---|---|
zoneM | RectM | |
sizeoptional | "T60" | "T72" | T60 (1.52 m, 8-10 seats, pitch 3.4 m) or T72 (1.83 m, 10-12 seats, pitch 3.7 m). Default "T60". Default |
seatsPerTableoptional | number | Seats per table, clamped to the size's range. |
keepOutsMoptional | readonly ShapeM[] | |
clearMoptional | number | |
countoptional | number | |
centreAisleMoptional | number | |
frontSideoptional | CompassSide | |
pitchMoptional | number | Overrides the size's pitch. |
labelPrefixoptional | string | Labels are From Default |
labelStartoptional | number | First table number. Default 1. From Default |
category | CategoryVocabId | From |
categoryByRowoptional | readonly CategoryVocabId[] | Categories of the first rows (front first), e.g. ["vip"]; later rows use From |
bookAsWholeoptional | boolean | Every table is booked as a whole (the table id is its inventory key). Default false. From Default |
blockLabeloptional | string | Block label (block panel and stamp id). Defaults per builder. From |
recordoptional | boolean | Records a regenerable block stamp. Default true. From Default |
accessibleoptional | boolean | number | Wheelchair places at tables: From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface BattleRingOptions| Member | Type | Description |
|---|---|---|
centeroptional | PtM | |
flooroptional | "circle" | "square" | Circular or square cypher floor. Default "circle". Default |
floorSizeMoptional | number | Floor diameter or side; clamped to 6-16. Default 10. Default |
sidesoptional | 3 | 4 | "arc" | Audience on 3 sides (judges' side open), 4 sides, or an arc. Default 3. Default |
arcDegreesoptional | number | Arc sweep in degrees when sides is "arc"; clamped to 90-300. Default 200. Default |
audienceoptional | "seated" | "standing" | "mixed" | Seated rows, standing bands, or seated front rows with standing behind. Default "seated". Default |
rowsoptional | number | Seated rows per side; clamped to 1-20. Default 5. Default |
seatoptional | SeatPresetName | |
categoryoptional | CategoryVocabId | |
standingCategoryoptional | CategoryVocabId | |
standingDepthMoptional | number | Standing band depth. Default 5. Default |
setbackMoptional | number | Floor edge to the first row. Default 1.5. Default |
judgesoptional | number | Judges' seats (not for sale) at a table on the north side; clamped to 1-9. Default 3. Default |
djoptional | boolean | DJ booth decor beside the judges. Default true. Default |
crewZoneoptional | boolean | Crew holding zone (no inventory) in the north-east corner. Default true. Default |
accessibleoptional | AccessibleOption |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface BattleRingResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
floorId | string | |
sectionIds | readonly string[] | |
standingIds | readonly string[] | |
judgesTableId | string | |
djIdoptional | string | |
crewZoneIdoptional | string | |
extentM | RectM | |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
One block kind: its panel label, the params the panel shows, and its build.
interface BlockKindSpec| Member | Type | Description |
|---|---|---|
label | string | |
params | readonly ParamSpec[] | Panel params (a subset of the stored params; the rest are kept as recorded). |
labelKeys | readonly string[] | Params that decide labels: changing one relabels members the user did not rename. |
buildmethod | (kit: TemplateKitApi, params: ParamValues, frameM: { originM: PtM; rotation: number; }) => Record<string, string> | Builds the block in |
Every member is readonly.
@openseat/core/src/templates/kit/builders/blocks.ts
interface BoolParam extends ParamBaseExtends ParamBase
| Member | Type | Description |
|---|---|---|
kind | "boolean" | |
default | boolean | |
key | string | From |
label | string | From |
helpoptional | string | From |
groupoptional | ParamGroup | From |
advancedoptional | boolean | Shown under the "Advanced" disclosure. From |
visibleWhenoptional | { readonly key: string; readonly equals: ParamValue; } | Hidden unless another param has this value. From |
capacityEffectoptional | "up" | "down" | "none" | Direction capacity moves when this param grows; drives the maxCapacity/minCapacity combos. From |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface BoothBandOptions extends BoothBlockCommonExtends BoothBlockCommon
| Member | Type | Description |
|---|---|---|
centerM | PtM | Centre of the whole band. |
columnsPerBlock | number | Booths per block row; clamped to 1-30. |
blocks | number | Blocks side by side, separated by cross aisles; clamped to 1-10. |
pairs | number | Back-to-back pairs of booth rows, separated by main aisles; clamped to 1-10. |
boothWMoptional | number | Booth size; default 3 x 3. |
boothHMoptional | number | |
crossAisleMoptional | number | Aisle between blocks. Default 3. Default |
mainAisleMoptional | number | Aisle between pairs. Default 3. Default |
labelLettersoptional | string | Row letters, one per booth row; default "ABCDEFGH…". Labels are |
rotationoptional | number | Rotation of the whole band about its centre. |
category | CategoryVocabId | From |
cornerCategoryoptional | CategoryVocabId | Category of the booths at block-row ends (corner stalls). From |
sellableoptional | boolean | Booths have inventory (sold as a unit). Default true. From Default |
blockLabeloptional | string | From |
recordoptional | boolean | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface BoothBlockCommon| Member | Type | Description |
|---|---|---|
category | CategoryVocabId | |
cornerCategoryoptional | CategoryVocabId | Category of the booths at block-row ends (corner stalls). |
sellableoptional | boolean | Booths have inventory (sold as a unit). Default true. Default |
blockLabeloptional | string | |
recordoptional | boolean |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface BoothBlockResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
boothIds | readonly string[] | |
blockIdoptional | string | |
extentM | RectM | Outer extent of the booths (axis-aligned, before rotation). |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface BoothGridOptions extends BoothBlockCommonExtends BoothBlockCommon
| Member | Type | Description |
|---|---|---|
centerM | PtM | |
columns | number | |
rows | number | |
boothWMoptional | number | |
boothHMoptional | number | |
gapXMoptional | number | |
gapYMoptional | number | |
labelPrefixoptional | string | Labels are |
labelStartoptional | number | |
rotationoptional | number | |
category | CategoryVocabId | From |
cornerCategoryoptional | CategoryVocabId | Category of the booths at block-row ends (corner stalls). From |
sellableoptional | boolean | Booths have inventory (sold as a unit). Default true. From Default |
blockLabeloptional | string | From |
recordoptional | boolean | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface BoothRingOptions extends BoothBlockCommonExtends BoothBlockCommon
| Member | Type | Description |
|---|---|---|
center | PtM | |
rxM | number | Ellipse radii the booths' inner edges touch. |
ryM | number | |
count | number | Booths around the ring; clamped so neighbours never overlap. |
boothWMoptional | number | |
boothHMoptional | number | |
startAngleoptional | number | Default 0 (first booth on the east). |
sweepoptional | number | Default 360 (a closed ring). |
labelPrefixoptional | string | |
labelStartoptional | number | |
category | CategoryVocabId | From |
cornerCategoryoptional | CategoryVocabId | Category of the booths at block-row ends (corner stalls). From |
sellableoptional | boolean | Booths have inventory (sold as a unit). Default true. From Default |
blockLabeloptional | string | From |
recordoptional | boolean | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
What every builder returns: the ids it created, in creation order.
interface BuilderResult| Member | Type | Description |
|---|---|---|
idsreadonly | readonly string[] |
@openseat/core/src/templates/kit/builders/index.ts
interface BuildTemplateOptions| Member | Type | Description |
|---|---|---|
sizeoptional | TemplateSize | |
layoutIdoptional | string | Defaults to Default |
nameoptional | string | Defaults to "<venue> - <setup>". Default |
idPrefixoptional | string | Object ID prefix; defaults to the setup's idPrefix ("preview" for gallery previews). |
targetCapacityoptional | number | Fits the setup's capacity driver to this capacity first (fitCapacity). |
zonesOnlyoptional | boolean | "Sections only (no seats)": every section becomes a zone sold by quantity ( |
Every member is readonly.
@openseat/core/src/templates/build.ts
interface BuiltTemplate| Member | Type | Description |
|---|---|---|
layout | LayoutDocument | |
summary | TemplateSummary | |
params | ParamValues | |
roles | ReadonlyMap<string, ObjectRole> | Object id -> role. Never persisted. |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface CabaretTablesOptions extends TableBlockCommonExtends TableBlockCommon
| Member | Type | Description |
|---|---|---|
zoneM | RectM | |
radiusMoptional | number | Table radius; default 0.6 (a 1.2 m round). |
seatsPerTableoptional | number | Seats per table, 2-8. Default 5. Default |
pitchMoptional | number | |
keepOutsMoptional | readonly ShapeM[] | |
clearMoptional | number | |
countoptional | number | |
frontSideoptional | CompassSide | |
labelPrefixoptional | string | Labels are From Default |
labelStartoptional | number | First table number. Default 1. From Default |
category | CategoryVocabId | From |
categoryByRowoptional | readonly CategoryVocabId[] | Categories of the first rows (front first), e.g. ["vip"]; later rows use From |
bookAsWholeoptional | boolean | Every table is booked as a whole (the table id is its inventory key). Default false. From Default |
blockLabeloptional | string | Block label (block panel and stamp id). Defaults per builder. From |
recordoptional | boolean | Records a regenerable block stamp. Default true. From Default |
accessibleoptional | boolean | number | Wheelchair places at tables: From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface CapacitySpec| Member | Type | Description |
|---|---|---|
driver | string | Int param key; capacity must be non-decreasing in it. |
measure | "seats" | "ga" | "total" | "tableSeats" | "booths" | What fitCapacity targets: seats, GA capacity, sellable total, table seats or booths. |
estimateoptionalmethod | (p: ParamValues) => number | Fast, build-free estimate of |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface CategoryVocabEntry| Member | Type | Description |
|---|---|---|
name | string | |
colour | string | |
sellable | boolean | |
suggestedPriceINRoptional | number |
Every member is readonly.
@openseat/core/src/templates/vocab.ts
interface CheckRegistryOptions| Member | Type | Description |
|---|---|---|
phaseoptional | 1 | 2 | Phase gate: every category that has at least one implemented setup must implement all of its manifest setups with phase <= this value. |
completeoptional | boolean | Every manifest setup must be implemented (final integration). |
definitionsoptional | readonly SetupDefinition[] | Defaults to the real definitions. |
manifestoptional | readonly VenueManifest[] | Defaults to VENUE_MANIFEST. Default |
Every member is readonly.
@openseat/core/src/templates/registry.ts
interface ColumnGridOptions| Member | Type | Description |
|---|---|---|
zoneM | RectM | |
pitchXM | number | |
pitchYMoptional | number | |
sizeMoptional | number | Column side. Default 0.6. Default |
skipMoptional | readonly RectM[] | Columns inside these are skipped (e.g. a stage). |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface ColumnGridResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
columnsM | readonly RectM[] | Each column's rectangle, for table keep-outs. |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
Common options of the court and pitch builders.
interface CourtOptions| Member | Type | Description |
|---|---|---|
atoptional | PtM | Centre of the playing area. Defaults to (0, 0). |
verticaloptional | boolean | Long axis north-south instead of east-west. |
asoptional | SurfaceAs | Defaults to "stage" for courts (basketball, volleyball, kabaddi, badminton, tennis) and "polygon" for pitches. |
withSurroundoptional | boolean | Adds the run-off surround (a surface polygon under the court). Defaults to true. Default |
labeloptional | string | Surface label; defaults to the sport's name. |
filloptional | string | Surface fill colour; defaults per sport. |
markingsoptional | boolean | Adds line markings (paths). Defaults to true. Default |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface CricketGroundOptions| Member | Type | Description |
|---|---|---|
atoptional | PtM | |
boundaryRadiusMoptional | number | Boundary radius along the pitch (north-south), metres; clamped to 45-90. Default 65. Default |
ratiooptional | number | Across-pitch radius as a fraction of the along-pitch one (0.8-1); default 0.92. |
sightScreensoptional | boolean | Sight screens beyond the boundary at both ends. Default true. Default |
pavilionoptional | boolean | Pavilion block outside the boundary on the west. Default false. Default |
markingsoptional | boolean |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface CricketGroundResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
surfaceId | string | |
rxM | number | Half extents of the boundary oval (east-west, north-south). |
ryM | number | |
outerM | RectM | Outermost extent of everything drawn (sight screens, pavilion). |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface DanceFloorOptions| Member | Type | Description |
|---|---|---|
centerM | PtM | |
widthM | number | |
depthM | number | |
labeloptional | string | |
djoptional | CompassSide | false | Adds a DJ booth (decor) on this side of the floor. |
standingoptional | boolean | Sells the floor as standing (GA at 1.0/m²) instead of drawing decor. Default false. Default |
categoryoptional | CategoryVocabId |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface DanceFloorResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
floorId | string | |
djIdoptional | string | |
keepOutM | RectM | Floor plus DJ booth: pass as a table keep-out. |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface DeskRunsOptions extends TableBlockCommonExtends TableBlockCommon
| Member | Type | Description |
|---|---|---|
zoneM | RectM | Zone the desks fill; the board/stage is on |
deskWidthMoptional | number | Desk width (along the row) and depth. Defaults 1.2 x 0.6. |
deskDepthMoptional | number | |
seatsPerDeskoptional | number | Students per desk, 1-3. Default 2. Default |
desksPerRunoptional | number | Desks side by side in one run before an aisle. Default 3. Default |
aisleMoptional | number | Aisle between runs. Default 1.0. Default |
rowPitchMoptional | number | Row pitch (desk front to desk front). Default 1.6. Default |
rowsoptional | number | Rows / runs wanted (0 = as many as fit). |
runsoptional | number | |
countoptional | number | Desks wanted (0 or absent = every desk); the last row is trimmed centre-out. |
frontSideoptional | CompassSide | |
labelPrefixoptional | string | Labels are From Default |
labelStartoptional | number | First table number. Default 1. From Default |
category | CategoryVocabId | From |
categoryByRowoptional | readonly CategoryVocabId[] | Categories of the first rows (front first), e.g. ["vip"]; later rows use From |
bookAsWholeoptional | boolean | Every table is booked as a whole (the table id is its inventory key). Default false. From Default |
blockLabeloptional | string | Block label (block panel and stamp id). Defaults per builder. From |
recordoptional | boolean | Records a regenerable block stamp. Default true. From Default |
accessibleoptional | boolean | number | Wheelchair places at tables: From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface EndStageShowOptions| Member | Type | Description |
|---|---|---|
stageRectM | RectM | The stage; the audience is on its |
sideoptional | CompassSide | Side of the stage the audience floor is on. Default "south". Default |
stageLabeloptional | string | |
floorM | RectM | The whole standing floor in front of the stage (pit included). |
pitoptional | false | { readonly depthM: number; readonly widthM?: number; readonly density?: number; readonly label?: string; } | Fan pit at the stage front, at 1.6/m² ('fan-pit'). Omit or false for none. |
moatMoptional | number | Gap between the stage front and the pit (security moat). Default 1.5. Default |
barrierGapMoptional | number | Gap between pit and general (barrier line). Default 1. Default |
densityoptional | number | General standing density. Default 1.4 (DENSITY.standing). |
generalLabeloptional | string | |
generalCategoryoptional | CategoryVocabId | |
fohoptional | false | { readonly widthM?: number; readonly depthM?: number; readonly atFraction?: number; } | FOH desk (an obstacle) cut out of the general area, |
accessibleoptional | boolean | Accessible viewing platform (GA, 0.5/m²) at a side of the floor. Default on. |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface EndStageShowResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
stageId | string | |
pitIdoptional | string | |
generalId | string | |
fohIdoptional | string | |
accessibleIdoptional | string | |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
Rendered as a radio segmented control (never a native select).
interface EnumParam extends ParamBaseExtends ParamBase
| Member | Type | Description |
|---|---|---|
kind | "enum" | |
options | readonly { readonly value: string; readonly label: string; }[] | |
default | string | |
key | string | From |
label | string | From |
helpoptional | string | From |
groupoptional | ParamGroup | From |
advancedoptional | boolean | Shown under the "Advanced" disclosure. From |
visibleWhenoptional | { readonly key: string; readonly equals: ParamValue; } | Hidden unless another param has this value. From |
capacityEffectoptional | "up" | "down" | "none" | Direction capacity moves when this param grows; drives the maxCapacity/minCapacity combos. From |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface EventFacet| Member | Type | Description |
|---|---|---|
id | EventFacetId | |
label | string | Chip label, e.g. "Party/DJ". |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface FanBand| Member | Type | Description |
|---|---|---|
rows | number | |
category | CategoryVocabId | |
labeloptional | string | Band label used in section labels, e.g. "Stalls" -> "Stalls Left". |
gapAfterMoptional | number | Gap after this band (cross aisle). Default 0. Default |
rowSpacingMoptional | number | |
seatoptional | SeatPresetName | |
rowPrefixoptional | string |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface FanHouseOptions| Member | Type | Description |
|---|---|---|
center | PtM | Arc centre (usually just behind the stage front). |
firstRadiusM | number | Radius of the first band's front row. |
wedges | readonly FanWedge[] | |
bands | readonly FanBand[] | |
seatoptional | SeatPresetName | |
seatSpacingMoptional | number | |
edgeMarginMoptional | number | |
rowStartoptional | number | |
accessibleoptional | AccessibleOption |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface FanHouseResult extends SeatingResultExtends SeatingResult
| Member | Type | Description |
|---|---|---|
byBand | readonly (readonly string[])[] | Section ids per band, then per wedge. |
outerRadiusM | number | Radius of the outermost row, metres. |
sectionIds | readonly string[] | Section ids, in creation order. From |
depthM | number | Total depth (front row to back row edge) of the seating, metres. From |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface FanWedge| Member | Type | Description |
|---|---|---|
from | number | Start and end angles (degrees, screen convention), end > start. |
to | number | |
label | string |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
Result of a court or pitch builder.
interface FieldResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
surfaceId | string | The playing surface (stage or polygon). |
playM | RectM | The playing area (without surround). |
outerM | RectM | Playing area plus surround: keep seats outside this. |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface FitCapacityOptions| Member | Type | Description |
|---|---|---|
baseoptional | ParamValues | Params the search starts from (other than the driver). Defaults to the setup defaults. |
sizeoptional | TemplateSize | |
measureoptional | (params: ParamValues) => number | Measures one candidate. Defaults to |
Every member is readonly.
@openseat/core/src/templates/capacity.ts
interface FitCapacityResult| Member | Type | Description |
|---|---|---|
params | Record<string, ParamValue> | Resolved params with the driver set. |
achieved | number | Capacity (in |
min | number | Capacity at the driver's min and max. |
max | number | |
exact | boolean |
|
builds | number | Real builds made (estimates and memo hits are free). |
estimated | boolean | True when |
driver | string | |
notes | readonly string[] |
Every member is readonly.
@openseat/core/src/templates/capacity.ts
interface FootballPitchOptions extends CourtOptionsExtends CourtOptions
| Member | Type | Description |
|---|---|---|
lengthMoptional | number | Touchline length; clamped to 50-110. Default 105. Default |
widthMoptional | number | Goal-line width; clamped to 30-75. Default 68. Default |
formatoptional | "11" | "7" | "5" | "5" draws a 5-a-side turf: no penalty arcs, smaller boxes. |
atoptional | PtM | Centre of the playing area. Defaults to (0, 0). From |
verticaloptional | boolean | Long axis north-south instead of east-west. From |
asoptional | SurfaceAs | Defaults to "stage" for courts (basketball, volleyball, kabaddi, badminton, tennis) and "polygon" for pitches. From |
withSurroundoptional | boolean | Adds the run-off surround (a surface polygon under the court). Defaults to true. From Default |
labeloptional | string | Surface label; defaults to the sport's name. From |
filloptional | string | Surface fill colour; defaults per sport. From |
markingsoptional | boolean | Adds line markings (paths). Defaults to true. From Default |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface GatesOptions| Member | Type | Description |
|---|---|---|
gatesoptional | readonly GateSpec[] | Explicit gates. |
wallsMoptional | RectM | Or gates spread evenly on the walls of this rectangle. |
northoptional | number | |
southoptional | number | |
eastoptional | number | |
westoptional | number | |
widthMoptional | number | Default 3. Default |
labelPrefixoptional | string | Default "Gate ". Default |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface GateSpec| Member | Type | Description |
|---|---|---|
labeloptional | string | |
atM | PtM | |
widthMoptional | number | |
rotationoptional | number |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface IntParam extends ParamBaseExtends ParamBase
| Member | Type | Description |
|---|---|---|
kind | "int" | |
min | number | |
max | number | |
default | number | |
stepoptional | number | Defaults to 1. (max - min) must be a multiple of it. Default |
unitoptional | "rows" | "seats" | "sections" | "tables" | "booths" | "courts" | "count" | "persons" | |
key | string | From |
label | string | From |
helpoptional | string | From |
groupoptional | ParamGroup | From |
advancedoptional | boolean | Shown under the "Advanced" disclosure. From |
visibleWhenoptional | { readonly key: string; readonly equals: ParamValue; } | Hidden unless another param has this value. From |
capacityEffectoptional | "up" | "down" | "none" | Direction capacity moves when this param grows; drives the maxCapacity/minCapacity combos. From |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface IslandGridOptions extends BoothBlockCommonExtends BoothBlockCommon
| Member | Type | Description |
|---|---|---|
centerM | PtM | |
columns | number | |
rows | number | |
islandWMoptional | number | Island size; default 6 x 6. |
islandHMoptional | number | |
aisleMoptional | number | Aisle between islands. Default 4. Default |
labelPrefixoptional | string | Default "Island ". Default |
category | CategoryVocabId | From |
cornerCategoryoptional | CategoryVocabId | Category of the booths at block-row ends (corner stalls). From |
sellableoptional | boolean | Booths have inventory (sold as a unit). Default true. From Default |
blockLabeloptional | string | From |
recordoptional | boolean | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface KabaddiCourtOptions extends CourtOptionsExtends CourtOptions
| Member | Type | Description |
|---|---|---|
formatoptional | "men" | "women" | Men 13 x 10 m, women 12 x 8 m. Default "men". Default |
atoptional | PtM | Centre of the playing area. Defaults to (0, 0). From |
verticaloptional | boolean | Long axis north-south instead of east-west. From |
asoptional | SurfaceAs | Defaults to "stage" for courts (basketball, volleyball, kabaddi, badminton, tennis) and "polygon" for pitches. From |
withSurroundoptional | boolean | Adds the run-off surround (a surface polygon under the court). Defaults to true. From Default |
labeloptional | string | Surface label; defaults to the sport's name. From |
filloptional | string | Surface fill colour; defaults per sport. From |
markingsoptional | boolean | Adds line markings (paths). Defaults to true. From Default |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
Wheelchair positions: count seats flagged at the ends of the front or back row.
interface KitAccessible| Member | Type | Description |
|---|---|---|
row | "front" | "back" | |
count | number |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitArcParams extends KitSeatingCommonExtends KitSeatingCommon
| Member | Type | Description |
|---|---|---|
label | string | |
centerM | PtM | |
innerRadiusM | number | |
rows | number | |
startAngle | number | Degrees, screen convention (0 = east, 90 = south); endAngle > startAngle. |
endAngle | number | |
edgeMarginMoptional | number | |
rowSeatsoptional | readonly number[] | |
seatoptional | SeatPresetName | Seat preset; defaults to "chair". From |
seatSpacingMoptional | number | Overrides the preset's seat spacing. From |
rowSpacingMoptional | number | Overrides the preset's row spacing. From |
rowStartoptional | number | First row label index (1 = A); price bands continue it, e.g. 4 = D. From |
rowPrefixoptional | string | From |
seatStartoptional | number | First seat number. Defaults to 1. From Default |
category | CategoryVocabId | From |
labelSizeMoptional | number | Section label font size in metres. From |
accessibleoptional | KitAccessible | From |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitArcRunParams extends Omit<
KitArcParams,
"label" | "startAngle" | "endAngle"
>Extends Omit<KitArcParams, "label" | "startAngle" | "endAngle">
| Member | Type | Description |
|---|---|---|
from | number | Run start angle (degrees). |
to | number | Run end angle (degrees), > from. |
count | number | Number of wedges. |
gangwayM | number | Gangway width between wedges, measured at the INNER (front) radius. |
labels | readonly string[] | One label per wedge. |
seatoptional | "chair" | "stand" | "bleacher" | "vip" | "flat" | "bench" | "desk" | "sofa" | "beanbag" | Seat preset; defaults to "chair". From |
rows | number | From |
rowSeatsoptional | readonly number[] | From |
category | CategoryVocabId | From |
centerM | Point | From |
innerRadiusM | number | From |
edgeMarginMoptional | number | From |
seatSpacingMoptional | number | Overrides the preset's seat spacing. From |
rowSpacingMoptional | number | Overrides the preset's row spacing. From |
rowStartoptional | number | First row label index (1 = A); price bands continue it, e.g. 4 = D. From |
rowPrefixoptional | string | From |
seatStartoptional | number | First seat number. Defaults to 1. From Default |
labelSizeMoptional | number | Section label font size in metres. From |
accessibleoptional | KitAccessible | From |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitArenaParams| Member | Type | Description |
|---|---|---|
center | PtM | |
field | { readonly widthM: number; readonly heightM: number; readonly cornerRadiusM: number; readonly label?: string; } | |
fieldKind | ArenaFieldKind | |
fieldAs | "stage" | "polygon" | "none" | 'stage' keeps the generator's field stage; 'polygon' replaces it with a locked surface polygon; 'none' drops it. |
fieldFilloptional | string | |
tiers | readonly KitArenaTier[] | |
numberingoptional | ArenaNumbering | |
removeBehindoptional | { readonly side: CompassSide; readonly beyondM: number; } | Removes (with contents) every section whose centroid lies more than |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitArenaTier| Member | Type | Description |
|---|---|---|
labeloptional | string | |
firstNumber | number | |
rows | number | |
seatoptional | SeatPresetName | Seat preset for the tier. The kit defaults to 'stand'. |
rowSpacingMoptional | number | |
seatSpacingMoptional | number | |
gapM | number | From the field edge (tier 0) or the previous tier. |
sectionsPerLongSide | number | |
sectionsPerShortSide | number | |
sectionsPerCorner | number | |
extraCornerSectionsoptional | readonly [ number, number, number, number ] | |
aisleWidthM | number | |
category | CategoryVocabId |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitBlockParams extends KitSeatingCommonExtends KitSeatingCommon
| Member | Type | Description |
|---|---|---|
label | string | Unique within the build; also the public seat-id prefix. |
centerMoptional | PtM | Section origin (block centre) in metres. Use this or |
frontMoptional | { readonly focus: PtM; readonly distance: number; readonly side: CompassSide; readonly along?: number; } | Places the block on |
rotationoptional | number | Degrees; overrides the rotation implied by |
rows | number | |
seatsPerRow | number | |
rowSeatsoptional | readonly number[] | Ragged block: slots per row, front row first. |
frontRadiusMoptional | number | Radius of the front row's arc in metres; converted and CLAMPED into blockCurvatureRange with a note. |
aislesoptional | readonly number[] | Slot indices after which an aisle opens. |
aisleWidthMoptional | number | |
alignoptional | "left" | "center" | "right" | |
seatoptional | SeatPresetName | Seat preset; defaults to "chair". From |
seatSpacingMoptional | number | Overrides the preset's seat spacing. From |
rowSpacingMoptional | number | Overrides the preset's row spacing. From |
rowStartoptional | number | First row label index (1 = A); price bands continue it, e.g. 4 = D. From |
rowPrefixoptional | string | From |
seatStartoptional | number | First seat number. Defaults to 1. From Default |
category | CategoryVocabId | From |
labelSizeMoptional | number | Section label font size in metres. From |
accessibleoptional | KitAccessible | From |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitBoothGridParams| Member | Type | Description |
|---|---|---|
originM | PtM | Centre of the first (top-left) booth. |
columns | number | |
rows | number | |
widthM | number | |
heightM | number | |
gapXM | number | |
gapYM | number | |
rotationoptional | number | |
labelPrefixoptional | string | Label is |
startoptional | number | |
category | CategoryVocabId | |
cornerCategoryoptional | CategoryVocabId | Category of the four grid corners (e.g. 'stall-corner'). |
sellableoptional | boolean |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitBoothParams| Member | Type | Description |
|---|---|---|
label | string | |
centerM | PtM | |
widthM | number | |
heightM | number | |
rotationoptional | number | |
category | CategoryVocabId | |
sellableoptional | boolean | Sold as a unit (gets an inventoryId). Defaults to true. Default |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitEntranceParams| Member | Type | Description |
|---|---|---|
labeloptional | string | |
atM | PtM | |
widthM | number | |
rotationoptional | number |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitGaParams| Member | Type | Description |
|---|---|---|
label | string | |
boundaryM | readonly PtM[] | |
density | number | Persons per m² (kit/seats.ts DENSITY values). |
deductM2optional | number | Area (m²) deducted before applying the density, e.g. FOH or columns. |
maxCapacityoptional | number | |
category | CategoryVocabId | |
filloptional | string | |
zIndexoptional | number | |
bigLabeloptional | boolean | Kept for compatibility: a GA area's own centred zone label is its title, so no second big label is added. |
Every member is readonly.
@openseat/core/src/templates/types.ts
How KitLabelParams.avoidSeats may move and shrink a label.
interface KitLabelAvoidSeats| Member | Type | Description |
|---|---|---|
nudgeoptional | PtM | Direction to move the label in (any length; normalised). |
maxNudgeMoptional | number | Furthest the label may move along Default |
minFontSizeMoptional | number | Smallest font size, in metres. Default 1. Default |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitLabelParams| Member | Type | Description |
|---|---|---|
text | string | |
at | PtM | |
fontSizeM | number | |
rotationoptional | number | |
colouroptional | string | |
boldoptional | boolean | |
avoidSeatsoptional | KitLabelAvoidSeats | Keeps the text off seats. When the finished layout has the label's box over a drawn seat, finish() shrinks it (down to |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitPathParams| Member | Type | Description |
|---|---|---|
nameoptional | string | |
pointsM | readonly PtM[] | |
closedoptional | boolean | |
strokeWidthM | number | |
zIndexoptional | number | |
roleoptional | ObjectRole |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitPolygonParams| Member | Type | Description |
|---|---|---|
nameoptional | string | |
pointsM | readonly PtM[] | |
filloptional | string | |
strokeoptional | string | |
zIndexoptional | number | |
lockedoptional | boolean | Defaults to true for surfaces and markings. |
roleoptional | ObjectRole | Defaults: polygon() 'surface', decor() 'decor'. Use 'obstacle' for columns, 'zone' for crew areas. |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitRectTableParams| Member | Type | Description |
|---|---|---|
label | string | |
centerM | PtM | |
widthM | number | |
heightM | number | |
rotationoptional | number | |
seatsPerEdge | { readonly top?: number; readonly right?: number; readonly bottom?: number; readonly left?: number; } | Clamped so edge / (n + 1) >= seat spacing (note recorded). |
seatoptional | SeatPresetName | |
seatOffsetMoptional | number | |
category | CategoryVocabId | |
bookAsWholeoptional | boolean |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitRoundTableParams| Member | Type | Description |
|---|---|---|
label | string | |
centerM | PtM | |
radiusM | number | |
seats | number | |
seatoptional | SeatPresetName | |
seatDistanceMoptional | number | Table centre to seat centre. Defaults to radius + seat radius + 0.15 m. |
startAngleoptional | number | |
category | CategoryVocabId | |
bookAsWholeoptional | boolean |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitStageParams| Member | Type | Description |
|---|---|---|
labeloptional | string | |
rectM | RectM | The stage's box; a thrust, round or semicircle outline fits inside it. |
cornerRadiusMoptional | number | |
shapeoptional | "rect" | "thrust" | "round" | "semicircle" | Outline: "rect" (default), "thrust" (body plus a runway toward +y), "round" or "semicircle" (flat edge north). |
thrustMoptional | { readonly width?: number; readonly depth?: number; } | Thrust only: runway width and depth in metres (defaults: 0.4 x width, 0.45 x height). |
filloptional | string | Fill and stroke apply only to a sports surface ( |
strokeoptional | string | |
fieldoptional | boolean | A sports field or court drawn as a stage (fields.ts |
zIndexoptional | number | |
markingsoptional | "rink" | "court" | "pitch" | |
bigLabeloptional | boolean | Kept for compatibility: a stage's own centred label is its title, so no second big label is added. |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface KitVenueParams| Member | Type | Description |
|---|---|---|
nameoptional | string | |
showNameoptional | boolean | |
shape | "rect" | "ellipse" | |
centerM | PtM | |
widthM | number | |
heightM | number | |
cornerRadiusMoptional | number | |
filloptional | string | |
strokeoptional | string |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface LoungeRowOptions extends TableBlockCommonExtends TableBlockCommon
| Member | Type | Description |
|---|---|---|
centerM | PtM | Centre of the row. |
count | number | Lounge sets in the row; clamped to 1-60. |
alongoptional | "x" | "y" | Row direction. Default "x". Default |
tableWidthMoptional | number | Coffee table size. Defaults 1.2 x 0.6. |
tableDepthMoptional | number | |
seatsPerSideoptional | number | Sofa places on each long side, 1-4. Default 2. Default |
gapMoptional | number | Gap between sets. Default 1.2. Default |
labelPrefixoptional | string | Labels are From Default |
labelStartoptional | number | First table number. Default 1. From Default |
category | CategoryVocabId | From |
categoryByRowoptional | readonly CategoryVocabId[] | Categories of the first rows (front first), e.g. ["vip"]; later rows use From |
bookAsWholeoptional | boolean | Every table is booked as a whole (the table id is its inventory key). Default false. From Default |
blockLabeloptional | string | Block label (block panel and stamp id). Defaults per builder. From |
recordoptional | boolean | Records a regenerable block stamp. Default true. From Default |
accessibleoptional | boolean | number | Wheelchair places at tables: From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface ManifestSetup| Member | Type | Description |
|---|---|---|
key | string | Full template id |
idPrefix | string | Unique short object-id prefix, /^[a-z][a-z0-9]{1,4}$/. |
name | string | |
events | readonly string[] | |
tags | readonly string[] | |
facets | readonly EventFacetId[] | |
phase | 1 | 2 | 1 = milestone M1 (built first), 2 = later. |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface NumberParam extends ParamBaseExtends ParamBase
| Member | Type | Description |
|---|---|---|
kind | "number" | |
min | number | |
max | number | |
default | number | |
step | number | (max - min) must be a multiple of it (epsilon 1e-9). |
unit | "m" | "deg" | "persons/m2" | "m2/person" | |
key | string | From |
label | string | From |
helpoptional | string | From |
groupoptional | ParamGroup | From |
advancedoptional | boolean | Shown under the "Advanced" disclosure. From |
visibleWhenoptional | { readonly key: string; readonly equals: ParamValue; } | Hidden unless another param has this value. From |
capacityEffectoptional | "up" | "down" | "none" | Direction capacity moves when this param grows; drives the maxCapacity/minCapacity combos. From |
Every member is readonly.
@openseat/core/src/templates/types.ts
layout.metadata.openseat. A metadata convention only; no schema change. Serialised size must stay <= TEMPLATE_LIMITS.maxMetaBytes.
interface OpenSeatMeta| Member | Type | Description |
|---|---|---|
unitsPerMetre | 50 | |
templateoptional | TemplateStamp | |
insertsoptional | TemplateStamp[] | At most 20. |
blocksoptional | Record<string, TemplateBlockStamp> | |
unsellableCategoriesoptional | string[] | Vocab ids with sellable:false that the layout uses. |
suggestedPricesoptional | { currency: "INR"; byCategory: Record<string, number>; } | Indicative placeholders only; never host prices. |
notForSaleoptional | string[] | Object ids individually marked Not for sale. A section, row or table also covers its member seats. Every id must exist in the layout. |
pricesoptional | { currency: string; byCategory: Record<string, string>; } | Host price snapshot written by the editor's JSON export and read back on Import. |
@openseat/core/src/templates/types.ts
One entry of the owner's list A (college event venues), verbatim and in the owner's order.
interface OwnerListAEntry| Member | Type | Description |
|---|---|---|
name | string | The owner's venue name, e.g. "Auditoriums". |
events | readonly string[] | The owner's event phrases, e.g. ["Annual days", "cultural fests", ...]. |
eventLine | string | The owner's event line verbatim, e.g. "Annual days, cultural fests, talent shows, and competitions." |
primaryVenueId | string | Venue id the entry opens; search scores it 120. |
boostVenueIds | readonly string[] | Other venues that also serve the entry; search scores them 90. |
Every member is readonly.
@openseat/core/src/templates/types.ts
One row of the owner's list B (main category and its venue subtypes), verbatim.
interface OwnerListBEntry| Member | Type | Description |
|---|---|---|
category | string | The owner's main category name, e.g. "Sports". |
categoryId | TemplateCategoryId | |
subtypes | readonly { readonly name: string; readonly venueId: string; }[] | The owner's subtype names (verbatim), each mapped to a distinct venue. |
Every member is readonly.
@openseat/core/src/templates/types.ts
A resolved, named parameter combination (the build matrix runs every one).
interface ParamCombo| Member | Type | Description |
|---|---|---|
name | string | E.g. "default", "large", "rows=max", "random#3". Used in failure messages. |
params | ParamValues | |
sizeoptional | TemplateSize |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface ParamCombosOptions| Member | Type | Description |
|---|---|---|
heavyoptionalreadonly | boolean | Overrides the heavy detection. |
@openseat/core/src/templates/params.ts
Puts a built template into an existing layout: "replace" swaps the whole document for the template (keeping its id and revision), "insert" adds the template next to what is there, in its own id namespace.
interface PlaceTemplateOptions| Member | Type | Description |
|---|---|---|
mode | "replace" | "insert" | |
atoptional | Point | Insert: centre of the inserted content, in layout units. Default: right of the existing content. |
gapMoptional | number | Insert: gap between the existing content and the template (metres). Default 2 grid cells' worth. |
titleoptional | string | Replace: the layout's new name. Default: the template's name. |
zonesOnlyoptional | boolean | "Sections only (no seats)": places the template's zone variant ( |
Every member is readonly.
@openseat/core/src/templates/place.ts
interface PlaceTemplateResult| Member | Type | Description |
|---|---|---|
layout | LayoutDocument | |
insertedIds | readonly string[] | Top-level ids of the inserted objects (insert), or every top-level id (replace). |
namespace | string | Insert: the id namespace ( |
relabelledSections | readonly { readonly id: string; readonly from: string; readonly to: string; }[] | Sections whose label clashed and got a |
relabelledTables | readonly { readonly id: string; readonly from: string; readonly to: string; }[] | Tables whose label clashed and got a |
mergedCategories | readonly string[] | Template categories that already existed (the existing one wins). |
addedCategories | readonly string[] | Template categories added to the layout. |
removedInventoryIds | readonly string[] | Inventory keys of the target that no longer exist (replace only; insert removes nothing). |
notes | readonly string[] |
Every member is readonly.
@openseat/core/src/templates/place.ts
interface PoolLanesOptions| Member | Type | Description |
|---|---|---|
atoptional | PtM | |
lengthMoptional | number | Pool length; clamped to 20-50. Default 50. Default |
lanesoptional | number | Lanes; clamped to 4-10. Default 8. Default |
laneWidthMoptional | number | Lane width; default 2.5. |
deckMoptional | number | Deck around the water; default 3. |
verticaloptional | boolean |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface PoolLanesResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
surfaceId | string | |
waterM | RectM | |
outerM | RectM | Water plus deck: keep seats outside this. |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
An axis-aligned rectangle in metres, by its min and max corners.
interface RectM| Member | Type | Description |
|---|---|---|
x0 | number | |
y0 | number | |
x1 | number | |
y1 | number |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface RectTableSpec| Member | Type | Description |
|---|---|---|
kind | "rect" | |
widthM | number | |
heightM | number | |
seatsPerEdge | { readonly top?: number; readonly right?: number; readonly bottom?: number; readonly left?: number; } | |
seatoptional | SeatPresetName | |
seatOffsetMoptional | number |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface RegenerateBlockResult| Member | Type | Description |
|---|---|---|
layout | LayoutDocument | |
added | number | Members created (new slots and recreated missing members). |
removed | number | Members removed (slots that no longer exist). |
kept | number | Members kept (same object id). |
removedInventoryIds | readonly string[] | Inventory that disappeared: seat seatIds, booth inventoryIds and whole-table object ids. |
Every member is readonly.
@openseat/core/src/templates/kit/builders/blocks.ts
interface ResolvedParams| Member | Type | Description |
|---|---|---|
params | Record<string, ParamValue> | |
issues | string[] | Clamps, snaps, fallbacks and dropped keys, for the summary notes. |
Every member is readonly.
@openseat/core/src/templates/params.ts
interface RoundTableSpec| Member | Type | Description |
|---|---|---|
kind | "round" | |
radiusM | number | |
seats | number | |
seatDistanceMoptional | number | |
seatoptional | SeatPresetName |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface RunwayOptions| Member | Type | Description |
|---|---|---|
originMoptional | PtM | Main stage front centre (the ramp starts here and runs south). Default (0, 0). |
shapeoptional | "T" | "straight" | "T" adds a crossbar platform at the ramp head. Default "T". Default |
stageWidthMoptional | number | |
stageDepthMoptional | number | |
rampLengthMoptional | number | Ramp length; clamped to 6-40. Default 16. Default |
rampWidthMoptional | number | Ramp width; clamped to 1.2-4. Default 2.4. Default |
crossWidthMoptional | number | T crossbar width and depth. Defaults 7.2 x 2.4. |
crossDepthMoptional | number | |
audienceoptional | "seated" | "standing" | Audience on both sides: seated rows or standing GA. Default "seated". Default |
rowsoptional | number | Seated rows per side; clamped to 1-30. Default 6. Default |
frontRowsoptional | number | Front rows per side in Default |
frontCategoryoptional | CategoryVocabId | |
categoryoptional | CategoryVocabId | |
seatoptional | SeatPresetName | |
setbackMoptional | number | Ramp edge to front row / standing edge. Default 1.5. Default |
standingDepthMoptional | number | Standing band depth per side. Default 6. Default |
photoPitoptional | boolean | Press photo pit (not for sale) at the ramp head. Default true. Default |
photoPitDepthMoptional | number | |
backstageoptional | boolean | Backstage zone (no inventory) behind the main stage. Default true. Default |
backstageDepthMoptional | number | |
judgesoptional | number | Judges (not for sale) at a table beyond the photo pit; 0 = none. Default 3. Default |
accessibleoptional | AccessibleOption |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface RunwayResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
stageId | string | |
rampIds | readonly string[] | |
sectionIds | readonly string[] | |
standingIds | readonly string[] | |
photoPitIdoptional | string | |
backstageIdoptional | string | |
judgesTableIdoptional | string | |
extentM | RectM | Everything the builder drew. |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface SchematicShape| Member | Type | Description |
|---|---|---|
kind | SchematicKind | |
d | string | SVG path data in viewBox units. |
filloptional | string |
|
strokeoptional | string | |
strokeWidthoptional | number | |
opacityoptional | number | Fill opacity, 0-1. |
Every member is readonly.
@openseat/core/src/templates/schematic.ts
interface SeatingResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
sectionIds | readonly string[] | Section ids, in creation order. |
depthM | number | Total depth (front row to back row edge) of the seating, metres. |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
Seat presets and crowd densities used by template builders.
A preset's shape is in layout units (50 per metre), ready for the schema; seatSpacingM and rowSpacingM are centre distances in metres. Every preset leaves at least 1 unit of clearance between neighbouring seats at its own spacings.
interface SeatPreset| Member | Type | Description |
|---|---|---|
shape | SeatShape | |
seatSpacingM | number | |
rowSpacingM | number |
Every member is readonly.
@openseat/core/src/templates/kit/seats.ts
interface SetupDefinition<P extends ParamValues = ParamValues>| Member | Type | Description |
|---|---|---|
id | string | Must exist in VENUE_MANIFEST. |
version | number | Bump on every builder change that alters output. |
description | string | |
params | readonly ParamSpec[] | |
sizesoptional | { readonly small?: Partial<P>; readonly large?: Partial<P>; } | |
capacity | CapacitySpec | |
heavyoptional | boolean | Heavy setups get a reduced build matrix and a 30 s test timeout. |
researchRefoptional | string | |
buildmethod | (params: P, kit: TemplateKitApi) => void | Must not throw for ANY in-range params: clamp and kit.note() instead. |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface StandAlongOptions| Member | Type | Description |
|---|---|---|
focus | PtM | A point on the line the stand faces (pitch edge, stage front). |
side | CompassSide | Which side of the focus the stand sits on. |
frontM | number | Distance from the focus line to the front row, metres. |
count | number | Sections side by side; clamped to 1-40. |
seatsPerRow | number | |
rows | number | |
seatoptional | SeatPresetName | |
seatSpacingMoptional | number | |
rowSpacingMoptional | number | |
gangwayMoptional | number | Gangway between neighbouring sections. Default 1.2. Default |
alongMoptional | number | Shifts the whole stand along the line (metres; +x for north/south, +y for east/west). |
labelsoptional | readonly string[] | One label per section; missing ones become |
labelPrefixoptional | string | Default "Stand ". Default |
category | CategoryVocabId | |
rowStartoptional | number | |
frontRadiusMoptional | number | Front row radius (curved stand); clamped by the kit. |
accessibleoptional | AccessibleOption |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
Options shared by the table builders.
interface TableBlockCommon| Member | Type | Description |
|---|---|---|
labelPrefixoptional | string | Labels are Default |
labelStartoptional | number | First table number. Default 1. Default |
category | CategoryVocabId | |
categoryByRowoptional | readonly CategoryVocabId[] | Categories of the first rows (front first), e.g. ["vip"]; later rows use |
bookAsWholeoptional | boolean | Every table is booked as a whole (the table id is its inventory key). Default false. Default |
blockLabeloptional | string | Block label (block panel and stamp id). Defaults per builder. |
recordoptional | boolean | Records a regenerable block stamp. Default true. Default |
accessibleoptional | boolean | number | Wheelchair places at tables: |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface TableGridOptions extends TableBlockCommonExtends TableBlockCommon
| Member | Type | Description |
|---|---|---|
zoneM | RectM | Zone the table footprints (table plus chairs) must stay inside. |
table | TableSpec | |
pitchXM | number | Centre-to-centre pitch across. |
pitchYMoptional | number | Centre-to-centre pitch front to back. Defaults to pitchXM. |
keepOutsMoptional | readonly ShapeM[] | Footprints touching a keep-out inflated by clearM are dropped. |
clearMoptional | number | Clearance around keep-outs. Default 0.5. Default |
countoptional | number | Tables wanted (0 or absent = every free cell). The last row is trimmed centre-out. |
centreAisleMoptional | number | A centre aisle splitting the columns into two halves. |
staggeroptional | boolean | Shifts every other row by half a pitch (cabaret sightlines). |
frontSideoptional | CompassSide | Where the stage is: rows are numbered from that side. Default "north". Default |
labelPrefixoptional | string | Labels are From Default |
labelStartoptional | number | First table number. Default 1. From Default |
category | CategoryVocabId | From |
categoryByRowoptional | readonly CategoryVocabId[] | Categories of the first rows (front first), e.g. ["vip"]; later rows use From |
bookAsWholeoptional | boolean | Every table is booked as a whole (the table id is its inventory key). Default false. From Default |
blockLabeloptional | string | Block label (block panel and stamp id). Defaults per builder. From |
recordoptional | boolean | Records a regenerable block stamp. Default true. From Default |
accessibleoptional | boolean | number | Wheelchair places at tables: From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface TableGridResult extends BuilderResultExtends BuilderResult
| Member | Type | Description |
|---|---|---|
tableIds | readonly string[] | Table ids in label order (front to back, left to right). |
blockIdoptional | string | Block stamp id, when recorded. |
rows | number | |
columns | number | |
seats | number | Total table seats. |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface TeamTablesOptions extends TableBlockCommonExtends TableBlockCommon
| Member | Type | Description |
|---|---|---|
zoneM | RectM | |
tableWidthMoptional | number | Table size. Defaults 1.8 x 0.9. |
tableDepthMoptional | number | |
seatsPerSideoptional | number | Seats on each long side, 1-6. Default 3. Default |
endSeatsoptional | boolean | A seat at each short end. Default false. Default |
pitchXMoptional | number | Centre pitches; defaults leave about 1.2 m walkways. |
pitchYMoptional | number | |
keepOutsMoptional | readonly ShapeM[] | |
clearMoptional | number | |
countoptional | number | |
frontSideoptional | CompassSide | |
labelPrefixoptional | string | Labels are From Default |
labelStartoptional | number | First table number. Default 1. From Default |
category | CategoryVocabId | From |
categoryByRowoptional | readonly CategoryVocabId[] | Categories of the first rows (front first), e.g. ["vip"]; later rows use From |
bookAsWholeoptional | boolean | Every table is booked as a whole (the table id is its inventory key). Default false. From Default |
blockLabeloptional | string | Block label (block panel and stamp id). Defaults per builder. From |
recordoptional | boolean | Records a regenerable block stamp. Default true. From Default |
accessibleoptional | boolean | number | Wheelchair places at tables: From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
A recorded, regenerable table or booth block.
interface TemplateBlockStamp| Member | Type | Description |
|---|---|---|
kind | BlockKind | |
label | string | |
params | ParamValues | |
frame | { origin: Point; rotation: number; } | |
prefix | string | |
slots | Record<string, string> | slotKey (e.g. "r0c3") -> object id. |
@openseat/core/src/templates/types.ts
interface TemplateCategory| Member | Type | Description |
|---|---|---|
id | TemplateCategoryId | |
name | string | |
description | string | |
order | number | 1-based gallery order. |
Every member is readonly.
@openseat/core/src/templates/types.ts
What kit.finish() hands to buildTemplate (layout units, before the grid shift).
interface TemplateDraft| Member | Type | Description |
|---|---|---|
objects | readonly LayoutObject[] | |
categories | readonly Category[] | Referenced categories only, in first-use order. |
venueoptional | Venue | |
focalPointoptional | Point | |
roles | ReadonlyMap<string, ObjectRole> | |
blocks | Readonly<Record<string, TemplateBlockStamp>> | |
notForSale | readonly string[] | |
notes | readonly string[] | |
cautions | readonly string[] |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface TemplateKitApi| Member | Type | Description |
|---|---|---|
prefix | string | |
U | 50 | |
idmethod | (local: string) => string |
|
categorymethod | (id: CategoryVocabId) => string | Registers a vocab category (name and colour from the vocab) and returns its id. |
blockmethod | (p: KitBlockParams) => string | |
arcmethod | (p: KitArcParams) => string | |
arcRunmethod | (p: KitArcRunParams) => string[] | |
arenamethod | (p: KitArenaParams) => { sectionIds: string[]; byTier: string[][]; } | |
roundTablemethod | (p: KitRoundTableParams) => string | |
rectTablemethod | (p: KitRectTableParams) => string | |
boothGridmethod | (p: KitBoothGridParams) => string[] | |
boothmethod | (p: KitBoothParams) => string | |
stagemethod | (p: KitStageParams) => string | |
gamethod | (p: KitGaParams) => string | |
polygonmethod | (p: KitPolygonParams) => string | |
decormethod | (p: KitPolygonParams) => string | A polygon with no inventory (zones, furniture). Role defaults to 'decor'. |
pathmethod | (p: KitPathParams) => string | |
labelmethod | (p: KitLabelParams) => string | |
entrancemethod | (p: KitEntranceParams) => string | |
venuemethod | (p: KitVenueParams) => void | |
focalmethod | (at: PtM) => void | |
setCategorymethod | (ids: readonly string[], cat: CategoryVocabId) => void | |
setRowCategorymethod | (sectionId: string, rows: readonly string[], cat: CategoryVocabId) => void | For 1-2 special rows only; seats added later take the section category. |
flagSeatsmethod | (sectionId: string, rowLabel: string, seatLabels: readonly string[], flags: Partial<Accessibility>) => void | |
removeSectionsmethod | (pred: (s: Section) => boolean) => number | |
sectionsmethod | () => readonly Section[] | |
sectionFromSelectionmethod | (ids: readonly string[], opts: { label: string; shape?: "hull" | "bounds"; paddingM?: number; }) => string | null | Wraps existing objects (rows, tables, seats, GA areas) in a new seatless section through core's createSectionFromSelection, outline "bounds" by default, and gives it a kit id ( |
recordBlockmethod | (kind: BlockKind, label: string, params: ParamValues, frameM: { originM: PtM; rotation: number; }, slots: Record<string, string>) => string | Records a regenerable block; returns the block stamp id. |
notForSalemethod | (ids: readonly string[]) => void | Marks objects individually Not for sale (metadata.openseat.notForSale). |
notemethod | (msg: string) => void | |
cautionmethod | (msg: string) => void | |
finishmethod | () => TemplateDraft |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface TemplateSchematic| Member | Type | Description |
|---|---|---|
viewBox | string |
|
width | number | |
height | number | |
shapes | readonly SchematicShape[] | Back to front. |
Every member is readonly.
@openseat/core/src/templates/schematic.ts
interface TemplateSchematicOptions| Member | Type | Description |
|---|---|---|
widthoptional | number | |
heightoptional | number |
Every member is readonly.
@openseat/core/src/templates/schematic.ts
interface TemplateSearchHit| Member | Type | Description |
|---|---|---|
venueId | string | |
setupIdoptional | string | The best-scoring setup, when the hit came from a setup's name, events or tags. |
score | number | |
matchedOn | TemplateSearchMatch | |
matchedText | string | The phrase that matched, e.g. "Auditoriums", for "Matched: …". |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface TemplateSearchOptions| Member | Type | Description |
|---|---|---|
categoryIdoptional | TemplateCategoryId | |
facetoptional | EventFacetId | |
limitoptional | number |
Every member is readonly.
@openseat/core/src/templates/types.ts
How a layout was made: lets the gallery re-run it.
interface TemplateStamp| Member | Type | Description |
|---|---|---|
id | string | |
version | number | |
params | ParamValues | |
sizeoptional | TemplateSize | |
targetCapacityoptional | number | |
zonesOnlyoptional | boolean | "Sections only (no seats)": every section is a zone (buildTemplate's |
@openseat/core/src/templates/types.ts
Summary of a built layout. Counting rules (checkTemplateLayout re-derives every count from the objects and requires equality):
unsellableInventory: a not-for-sale category (meta.unsellableCategories, else vocab sellable:false) or an id listed in meta.notForSale (the seat itself, or its row, table or section).interface TemplateSummary| Member | Type | Description |
|---|---|---|
sections | number | |
rows | number | |
seats | number | |
tables | number | |
tableSeats | number | |
booths | number | |
gaAreas | number | |
gaCapacity | number | |
accessible | number | |
unsellableSeats | number | |
totalCapacity | number | Sellable people capacity (seats + GA + zone sections). Equal in a setup's seat and zone variants. |
zones | number | Places sold by quantity: zone sections ( |
footprintM | { width: number; height: number; } | |
byCategory | readonly { id: string; name: string; colour?: string; sellable: boolean; seats: number; gaCapacity: number; booths: number; tables: number; }[] | |
notes | readonly string[] | Clamps and other adjustments. |
cautions | readonly string[] | Density above 1.5/m², allowHighDensity, more than 10k seats. |
@openseat/core/src/templates/types.ts
interface TheatreBlocksOptions| Member | Type | Description |
|---|---|---|
focusoptional | PtM | Stage-front centre. Default (0, 0). |
sideoptional | CompassSide | Side of the focus the house sits on. Default "south". Default |
rowAMoptional | number | Distance from the focus to row A. Default 3. Default |
columns | readonly TheatreColumn[] | Columns left to right (from the audience's view); clamped to 1-12. |
tiers | readonly TheatreTier[] | Price bands front to back; each is a separate section per column. Clamped to 1-8. |
aisleMoptional | number | Aisle between columns. Default 1.2. Default |
crossAisleMoptional | number | Cross aisle between tiers. Default 0 (rows continue at the row spacing). |
seatoptional | SeatPresetName | |
seatSpacingMoptional | number | |
frontRadiusMoptional | number | Curves every block's rows (radius of each block's front row). |
rowStartoptional | number | First row label index (1 = A). Default 1. Default |
accessibleoptional | AccessibleOption |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface TheatreBlocksResult extends SeatingResultExtends SeatingResult
| Member | Type | Description |
|---|---|---|
byTier | readonly (readonly string[])[] | Section ids per tier, then per column. |
tierRows | readonly (readonly string[])[] | Row labels of each tier, e.g. ["A".."C"], ["D".."P"]. |
sectionIds | readonly string[] | Section ids, in creation order. From |
depthM | number | Total depth (front row to back row edge) of the seating, metres. From |
ids | readonly string[] | From |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface TheatreColumn| Member | Type | Description |
|---|---|---|
seats | number | |
labeloptional | string | Column label used in section labels, e.g. "Left". |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface TheatreTier| Member | Type | Description |
|---|---|---|
rows | number | |
category | CategoryVocabId | |
labeloptional | string | Tier label used in section labels, e.g. "VIP" -> "VIP Left". |
seatoptional | SeatPresetName | |
rowSpacingMoptional | number |
Every member is readonly.
@openseat/core/src/templates/kit/builders/index.ts
interface VenueManifest| Member | Type | Description |
|---|---|---|
id | string |
|
categoryId | TemplateCategoryId | |
name | string | |
description | string | |
aliases | readonly string[] | |
footprint | string | |
capacityHint | string | |
relatedoptional | readonly string[] | Setup ids of other venues the gallery also shows under this one. |
phase | 1 | 2 | |
setups | readonly ManifestSetup[] |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface VenueSetupTemplate extends SetupDefinition, ManifestSetupExtends SetupDefinition, ManifestSetup
| Member | Type | Description |
|---|---|---|
venueId | string | |
id | string | Must exist in VENUE_MANIFEST. From |
version | number | Bump on every builder change that alters output. From |
description | string | From |
params | readonly ParamSpec[] | From |
sizesoptional | { readonly small?: Partial<Readonly<Record<string, ParamValue>>>; readonly large?: Partial<Readonly<Record<string, ParamValue>>>; } | From |
capacity | CapacitySpec | From |
heavyoptional | boolean | Heavy setups get a reduced build matrix and a 30 s test timeout. From |
researchRefoptional | string | From |
buildmethod | (params: P, kit: TemplateKitApi) => void | Must not throw for ANY in-range params: clamp and kit.note() instead. From |
key | string | Full template id From |
idPrefix | string | Unique short object-id prefix, /^[a-z][a-z0-9]{1,4}$/. From |
name | string | From |
events | readonly string[] | From |
tags | readonly string[] | From |
facets | readonly EventFacetId[] | From |
phase | 1 | 2 | 1 = milestone M1 (built first), 2 = later. From |
Every member is readonly.
@openseat/core/src/templates/types.ts
interface VenueTemplate extends Omit<VenueManifest, "setups">Extends Omit<VenueManifest, "setups">
| Member | Type | Description |
|---|---|---|
setups | readonly VenueSetupTemplate[] | Implemented setups only. |
id | string |
From |
name | string | From |
categoryId | TemplateCategoryId | From |
description | string | From |
aliases | readonly string[] | From |
footprint | string | From |
capacityHint | string | From |
relatedoptional | readonly string[] | Setup ids of other venues the gallery also shows under this one. From |
phase | 1 | 2 | From |
Every member is readonly.
@openseat/core/src/templates/types.ts
Wheelchair places of a seated builder.
undefined / true: automatic, max(1, ceil(sectionSeats x 0.005)) per section, front row ends.false: none (the setup provides an accessibleZone instead).{ row, count }: exactly as the kit's accessible option, per section.type AccessibleOption = boolean | number | KitAccessible;@openseat/core/src/templates/kit/builders/index.ts
type AmenityKind =
| "toilets"
| "first-aid"
| "bar"
| "buffet"
| "foh"
| "dj"
| "screen"
| "registration"
| "green-room"
| "control"
| "store";@openseat/core/src/templates/kit/builders/index.ts
type BlockKind =
| "table-grid"
| "booth-band"
| "booth-grid"
| "booth-ring"
| "island-grid"
| "desk-runs"
| "team-tables";@openseat/core/src/templates/types.ts
Signature every builder shares.
type Builder<O, R extends BuilderResult = BuilderResult> = (
kit: TemplateKitApi,
opts: O,
) => R;@openseat/core/src/templates/kit/builders/index.ts
type CategoryVocabId = keyof typeof CATEGORY_VOCAB;@openseat/core/src/templates/vocab.ts
type CompassSide = "south" | "north" | "east" | "west";@openseat/core/src/templates/types.ts
type DensityName = keyof typeof DENSITY;@openseat/core/src/templates/kit/seats.ts
type EventFacetId =
| "fest"
| "party"
| "concert"
| "competition"
| "workshop"
| "sports"
| "exhibition"
| "cultural";@openseat/core/src/templates/types.ts
Role of a non-inventory object. Never persisted (BuiltTemplate.roles only).
type ObjectRole = "surface" | "marking" | "zone" | "obstacle" | "decor";@openseat/core/src/templates/types.ts
type ParamGroup =
| "Size"
| "Seating"
| "Stage"
| "Standing"
| "Tables"
| "Stalls"
| "Layout"
| "Pricing"
| "Access";@openseat/core/src/templates/types.ts
Typed params object for a const ParamSpec tuple.
@openseat/core/src/templates/types.ts
type ParamSpec = IntParam | NumberParam | BoolParam | EnumParam;| Discriminant | Type | Description |
|---|---|---|
kind: "int" | IntParam | |
kind: "number" | NumberParam | |
kind: "boolean" | BoolParam | |
kind: "enum" | EnumParam |
@openseat/core/src/templates/types.ts
type ParamValue = number | boolean | string;@openseat/core/src/templates/types.ts
type ParamValues = Readonly<Record<string, ParamValue>>;@openseat/core/src/templates/types.ts
A point in metres.
type PtM = Point;| Member | Type | Description |
|---|---|---|
x | number | |
y | number |
Every member is readonly.
@openseat/core/src/templates/types.ts
type SchematicKind =
| "venue"
| "surface"
| "zone"
| "marking"
| "ga"
| "section"
| "stage"
| "obstacle"
| "table"
| "booth";@openseat/core/src/templates/schematic.ts
type SeatPresetName =
| "chair"
| "stand"
| "bleacher"
| "vip"
| "flat"
| "bench"
| "desk"
| "sofa"
| "beanbag";@openseat/core/src/templates/types.ts
A rectangle or a polygon in metres, used for keep-outs.
@openseat/core/src/templates/kit/builders/index.ts
How a playing surface is drawn: a stage (seats can never overlap it) or a locked surface polygon.
type SurfaceAs = "stage" | "polygon";@openseat/core/src/templates/kit/builders/index.ts
type TableSpec = RoundTableSpec | RectTableSpec;| Discriminant | Type | Description |
|---|---|---|
kind: "round" | RoundTableSpec | |
kind: "rect" | RectTableSpec |
@openseat/core/src/templates/kit/builders/index.ts
type TemplateCategoryId =
| "sports"
| "performance"
| "outdoor"
| "exhibition"
| "social"
| "academic"
| "specialised"
| "cultural"
| "hospitality"
| "unconventional";@openseat/core/src/templates/types.ts
type TemplateSearchMatch =
| "listA"
| "name"
| "alias"
| "boost"
| "event"
| "tag"
| "category"
| "fuzzy";@openseat/core/src/templates/types.ts
type TemplateSize = "small" | "default" | "large";@openseat/core/src/templates/types.ts
academic setups (P5): campus ground, lecture hall, seminar hall, student centre and multipurpose hall.
const ACADEMIC_SETUPS: readonly SetupDefinition[]@openseat/core/src/templates/venues/academic/index.ts
const BLOCK_KINDS: Readonly<Record<BlockKind, BlockKindSpec>>@openseat/core/src/templates/kit/builders/blocks.ts
The category vocabulary: the ONLY category ids template builders may use. The registry and the build matrix enforce it.
Every sellable entry has a colour that is clearly distinct from every other sellable colour (CIE76 ΔE >= SELLABLE_MIN_DELTA_E) and is never near-grey (chroma >= SELLABLE_MIN_CHROMA), so ticket types read apart on the map. Not-for-sale entries use greys on purpose.
suggestedPriceINR values are indicative placeholders only: the editor shows them as input placeholders and never writes them as host prices.
const CATEGORY_VOCAB: {
readonly "fan-pit": {
readonly name: "Fan pit";
readonly colour: "#e11d48";
readonly sellable: true;
readonly suggestedPriceINR: 999;
};
readonly vip: {
readonly name: "VIP";
readonly colour: "#7e22ce";
readonly sellable: true;
readonly suggestedPriceINR: 1499;
};
readonly gold: {
readonly name: "Gold";
readonly colour: "#f59e0b";
readonly sellable: true;
readonly suggestedPriceINR: 799;
};
readonly silver: {
readonly name: "Silver";
readonly colour: "#06b6d4";
readonly sellable: true;
readonly suggestedPriceINR: 499;
};
readonly general: {
readonly name: "General";
readonly colour: "#2563eb";
// … 65 more lines (type truncated)This type is long; its declaration is shortened here.
@openseat/core/src/templates/vocab.ts
Vocab ids in declaration order.
const CATEGORY_VOCAB_IDS: CategoryVocabId[]@openseat/core/src/templates/vocab.ts
cultural setups (P5): community hall, art centre and cultural centre.
const CULTURAL_SETUPS: readonly SetupDefinition[]@openseat/core/src/templates/venues/cultural/index.ts
Planning densities in persons per m², aligned to the National Building Code of India Part 4. They are planning estimates, never approvals.
const DENSITY: {
readonly pit: 1.6;
readonly standing: 1.4;
readonly cocktail: 1;
readonly mixer: 1;
readonly grass: 1;
readonly picnic: 1;
readonly vipLounge: 1;
readonly participants: 0.5;
readonly accessible: 0.5;
readonly expoVisitors: 0.5;
}@openseat/core/src/templates/kit/seats.ts
Densities above this add a summary caution.
const DENSITY_CAUTION_ABOVE = 1.5@openseat/core/src/templates/kit/seats.ts
Event facet chips, in display order.
const EVENT_FACETS: readonly EventFacet[]@openseat/core/src/templates/taxonomy.ts
Exhibition setups (expo hall, convention centre, trade fair hall). Owned by P7 from wave 3.
const EXHIBITION_SETUPS: readonly SetupDefinition[]@openseat/core/src/templates/venues/exhibition/index.ts
Implemented setup definitions per category group.
const GROUP_SETUPS: Readonly<
Record<TemplateCategoryId, readonly SetupDefinition[]>
>@openseat/core/src/templates/venues/index.ts
Seeded random combos per heavy setup.
const HEAVY_RANDOM_COMBOS = 4@openseat/core/src/templates/params.ts
Setups with more default seats than this get the reduced (heavy) build matrix.
const HEAVY_SEAT_THRESHOLD = 8000@openseat/core/src/templates/params.ts
Highest density with the advanced allowHighDensity override; always cautioned.
const HIGH_DENSITY_MAX = 2@openseat/core/src/templates/kit/seats.ts
Hospitality setups (hotel ballroom, resort, banquet garden). Owned by P7 from wave 3.
const HOSPITALITY_SETUPS: readonly SetupDefinition[]@openseat/core/src/templates/venues/hospitality/index.ts
Object-id prefix of a setup.
const ID_PREFIX_PATTERN: RegExp@openseat/core/src/templates/registry.ts
Seeded random combos per light setup.
const LIGHT_RANDOM_COMBOS = 6@openseat/core/src/templates/params.ts
Every manifest setup with its venue id, in registry order.
const MANIFEST_SETUPS: readonly (ManifestSetup & {
readonly venueId: string;
})[]@openseat/core/src/templates/manifest.ts
Most template stamps remembered in metadata.openseat.inserts.
const MAX_TEMPLATE_INSERTS = 20@openseat/core/src/templates/place.ts
Highest standing density a template allows (persons/m²).
const NBC_STANDING_MAX = 1.67@openseat/core/src/templates/kit/seats.ts
Outdoor setups (P6). Milestone M1 (list-A venues) first: open ground, lawn, rooftop and waterfront; then park and festival ground.
const OUTDOOR_SETUPS: readonly SetupDefinition[]@openseat/core/src/templates/venues/outdoor/index.ts
The owner's list A (college event venues), verbatim and in the owner's order. Each entry has exactly one PRIMARY venue (search 120) and optional BOOST venues (search 90). The gallery's "College events" tab lists these.
const OWNER_LIST_A: readonly OwnerListAEntry[]@openseat/core/src/templates/taxonomy.ts
The owner's list B (main category -> venue subtypes), verbatim. 41 subtypes, each mapped to a DISTINCT venue; tests derive the count from this list. Stadium, indoor arena, waterfront and multipurpose hall come from list A only.
const OWNER_LIST_B: readonly OwnerListBEntry[]@openseat/core/src/templates/taxonomy.ts
performance setups (P5): auditorium, theatre, concert hall and amphitheatre.
const PERFORMANCE_SETUPS: readonly SetupDefinition[]@openseat/core/src/templates/venues/performance/index.ts
Largest serialised schematic (JSON, bytes).
const SCHEMATIC_MAX_BYTES = 3072@openseat/core/src/templates/schematic.ts
Template search over the manifest (works before any setup is built).
Normalisation: NFKD, diacritics stripped, lowercase, '&' -> 'and', punctuation and hyphens -> spaces, plural stemming (ies -> y, es, s), stop words dropped. Every phrase is also indexed in joined form (each adjacent token pair concatenated, and the whole phrase compacted), so 'e sports', 'e-sports' and 'esports' all meet, as do 'open mic' and 'openmic'.
Tiered scores (each venue keeps its best; ties go by registry order): list-A phrase on its PRIMARY venue 120; exact name or alias 100; list-A phrase on a BOOST venue 90; name or alias prefix 70; all query tokens in the name, aliases or events 50 + 5 per token; event or tag tokens 15 each; category name 10; fuzzy (Damerau <= 1, tokens of 5+ chars) 20.
const SEARCH_SCORES: {
readonly listAPrimary: 120;
readonly exact: 100;
readonly listABoost: 90;
readonly prefix: 70;
readonly allTokensBase: 50;
readonly allTokensPerToken: 5;
readonly eventTagToken: 15;
readonly category: 10;
readonly fuzzy: 20;
}@openseat/core/src/templates/search.ts
const SEATS: {
readonly chair: {
readonly shape: {
readonly kind: "circle";
readonly radius: 10;
};
readonly seatSpacingM: 0.52;
readonly rowSpacingM: 0.9;
};
readonly stand: {
readonly shape: {
readonly kind: "circle";
readonly radius: 9;
};
readonly seatSpacingM: 0.5;
readonly rowSpacingM: 0.86;
};
readonly bleacher: {
readonly shape: {
readonly kind: "circle";
readonly radius: 9;
};
readonly seatSpacingM: 0.5;
readonly rowSpacingM: 0.8;
};
readonly vip: {
readonly shape: {
readonly kind: "circle";
// … 48 more lines (type truncated)This type is long; its declaration is shortened here.
@openseat/core/src/templates/kit/seats.ts
Minimum CIELAB chroma of a sellable colour (below it reads as grey).
const SELLABLE_MIN_CHROMA = 30@openseat/core/src/templates/vocab.ts
Minimum CIE76 ΔE between two sellable colours.
const SELLABLE_MIN_DELTA_E = 20@openseat/core/src/templates/vocab.ts
Every implemented setup definition, group by group. Joined with the manifest by registry.ts.
const SETUP_DEFINITIONS: readonly SetupDefinition[]@openseat/core/src/templates/venues/index.ts
Full setup (template) id: <cat>.<venue>.<setup>.
const SETUP_ID_PATTERN: RegExp@openseat/core/src/templates/registry.ts
Social setups (banquet hall, nightclub, party hall, farmhouse). Owned by P7 from wave 3.
const SOCIAL_SETUPS: readonly SetupDefinition[]@openseat/core/src/templates/venues/social/index.ts
specialised setups (P4), in manifest order.
const SPECIALISED_SETUPS: readonly SetupDefinition[]@openseat/core/src/templates/venues/specialised/index.ts
sports setups (P4), in manifest order.
const SPORTS_SETUPS: readonly SetupDefinition[]@openseat/core/src/templates/venues/sports/index.ts
The ten template categories (the owner's list B main categories), in gallery order.
const TEMPLATE_CATEGORIES: readonly TemplateCategory[]@openseat/core/src/templates/taxonomy.ts
const TEMPLATE_LIMITS: {
readonly maxSeats: 25000;
readonly maxObjects: 40000;
readonly previewSeatLimit: 10000;
readonly largeLayoutWarn: 10000;
readonly maxMetaBytes: 48000;
}@openseat/core/src/templates/types.ts
Layout units per metre in every template layout.
const TEMPLATE_UNITS_PER_METRE = 50@openseat/core/src/templates/kit/units.ts
Unconventional setups (P6): warehouse, mall atrium, industrial space and hangar.
const UNCONVENTIONAL_SETUPS: readonly SetupDefinition[]@openseat/core/src/templates/venues/unconventional/index.ts
Venue id: <cat>.<venue>.
const VENUE_ID_PATTERN: RegExp@openseat/core/src/templates/registry.ts
const VENUE_MANIFEST: readonly VenueManifest[]@openseat/core/src/templates/manifest.ts
Every venue (implemented or not), in registry order, with merged aliases.
const VENUE_TEMPLATES: readonly VenueTemplate[]@openseat/core/src/templates/registry.ts
Corner rounding of a template's zone sections, in metres.
const ZONE_CORNER_RADIUS_M = 0.4@openseat/core/src/templates/zones.ts
Footnote added under a zone layout whose zones are all seated.
const ZONES_SEATED_FOOTNOTE = "ALL THE SECTIONS ARE SEATED"@openseat/core/src/templates/zones.ts