@kerusiweb/angular 2.3.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -22
- package/README.md +673 -642
- package/fesm2022/kerusiweb-angular.mjs +94 -77
- package/fesm2022/kerusiweb-angular.mjs.map +1 -1
- package/package.json +3 -3
- package/types/kerusiweb-angular.d.ts +57 -48
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kerusiweb-angular.mjs","sources":["../../../projects/angular/src/lib/kerusi-seatmap/kerusi-section.component.ts","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-section.component.html","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-legend.component.ts","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-legend.component.html","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-seat-template.directive.ts","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-seatmap.component.ts","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-seatmap.component.html","../../../projects/angular/src/lib/kerusi-seatmap/index.ts","../../../projects/angular/src/lib/kerusi-state-store.ts","../../../projects/angular/src/public-api.ts","../../../projects/angular/src/kerusiweb-angular.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n input,\r\n output,\r\n TemplateRef,\r\n} from '@angular/core';\r\nimport {\r\n cssVar,\r\n DEFAULT_KERUSI_COLORS,\r\n elementFill,\r\n elementStyle,\r\n elementTextFill,\r\n KerusiSeatmapColors,\r\n PlacedElement,\r\n PlacedSeat,\r\n RenderSection,\r\n resolveSeatGlyph,\r\n resolveSeatStyle,\r\n screenPath,\r\n SeatStyleFn,\r\n SeatTypeStyles,\r\n SectionLayout,\r\n} from '@kerusiweb/core';\r\nimport { SeatTemplateOutletContext } from './kerusi-seat-template.directive';\r\n\r\n/**\r\n * Draws one Kerusi `Section` as a single `<svg>`.\r\n *\r\n * One SVG per section — rather than section groups inside a shared canvas — is\r\n * what makes per-section `aspectRatio` and mixed grid/freeform modes work: each\r\n * gets its own `viewBox` and its own intrinsic proportions, and CSS is free to\r\n * stack, wrap or column them. It also puts the section heading in real DOM,\r\n * where a screen reader can use it as a landmark.\r\n *\r\n * This component holds no state. It takes a placed layout and emits intent.\r\n */\r\n@Component({\r\n selector: 'kerusi-section',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [NgTemplateOutlet],\r\n templateUrl: './kerusi-section.component.html',\r\n styleUrl: './kerusi-section.component.css',\r\n})\r\nexport class KerusiSectionComponent {\r\n readonly section = input.required<RenderSection>();\r\n readonly layout = input.required<SectionLayout>();\r\n\r\n /** Currently selected seat ids. */\r\n readonly selection = input<ReadonlySet<string>>(new Set());\r\n /** The seat holding the section's single tab stop, if any. */\r\n readonly focusedSeatId = input<string | null>(null);\r\n /** Per-seat accessible names, keyed by seat id. */\r\n readonly ariaLabels = input<ReadonlyMap<string, string>>(new Map());\r\n\r\n readonly colors = input<Required<KerusiSeatmapColors>>(DEFAULT_KERUSI_COLORS);\r\n /** Whether an available seat may take its `SeatType.color` (§4.7). */\r\n readonly typeColors = input<boolean>(true);\r\n /** Styles for every seat of a type, keyed by `SeatType.id`. */\r\n readonly seatTypeStyles = input<SeatTypeStyles | undefined>(undefined);\r\n /** A style for one seat, laid over its type's. */\r\n readonly seatStyle = input<SeatStyleFn | undefined>(undefined);\r\n /** Draws the inside of each seat in place of the stock glyph. */\r\n readonly seatTemplate = input<TemplateRef<SeatTemplateOutletContext> | undefined>(undefined);\r\n /** When false, seats render but do not respond to pointer or keyboard. */\r\n readonly interactive = input<boolean>(true);\r\n /**\r\n * CSS pixels per viewBox unit, at the section's natural size.\r\n *\r\n * Without a cap every section stretches to the full container width, so in a\r\n * four-tier theatre the narrow box row would draw seats several times the\r\n * size of the orchestra's. Capping each section at its own intrinsic width\r\n * keeps a seat the same size everywhere; a section too wide to fit still\r\n * scales down to the container.\r\n */\r\n readonly unitScale = input<number>(1);\r\n\r\n readonly seatActivate = output<string>();\r\n readonly seatFocused = output<string>();\r\n readonly seatKeydown = output<KeyboardEvent>();\r\n\r\n protected readonly viewBox = computed(() => `0 0 ${this.layout().width} ${this.layout().height}`);\r\n\r\n /** The section's natural width in CSS pixels; it never draws wider. */\r\n protected readonly naturalWidth = computed(() => this.layout().width * this.unitScale());\r\n\r\n /**\r\n * Every seat with its glyph resolved, once per change of layout, selection or\r\n * theme rather than once per binding per change detection.\r\n */\r\n protected readonly seats = computed(() => {\r\n const selection = this.selection();\r\n const colors = this.colors();\r\n const typeColors = this.typeColors();\r\n const typeStyles = this.seatTypeStyles();\r\n const seatStyle = this.seatStyle();\r\n return this.layout().seats.map((placed) => {\r\n const selected = selection.has(placed.seat.id);\r\n const style = resolveSeatStyle(placed.seat, selected, typeStyles, seatStyle);\r\n return {\r\n placed,\r\n selected,\r\n glyph: resolveSeatGlyph(placed, selected, colors, typeColors, style),\r\n };\r\n });\r\n });\r\n\r\n protected backdrop(): string {\r\n return cssVar('backdrop', this.colors().backdrop);\r\n }\r\n\r\n /** The section's single tab stop; every other seat is reachable by arrow key. */\r\n protected tabIndex(placed: PlacedSeat): number {\r\n if (!this.interactive()) {\r\n return -1;\r\n }\r\n return placed.seat.id === this.focusedSeatId() ? 0 : -1;\r\n }\r\n\r\n protected ariaLabel(placed: PlacedSeat): string {\r\n return this.ariaLabels().get(placed.seat.id) ?? placed.seat.label;\r\n }\r\n\r\n /** SVG rotate() about the item's center; null when it does not rotate. */\r\n protected transform(item: PlacedSeat | PlacedElement): string | null {\r\n return item.rotation ? `rotate(${item.rotation} ${item.centerX} ${item.centerY})` : null;\r\n }\r\n\r\n /** Cancels the parent <g>'s rotation so the label stays upright and stays put. */\r\n protected counterRotate(item: PlacedSeat | PlacedElement): string | null {\r\n return item.rotation ? `rotate(${-item.rotation} ${item.centerX} ${item.centerY})` : null;\r\n }\r\n\r\n // --- elements -------------------------------------------------------------\r\n\r\n protected style(placed: PlacedElement) {\r\n return elementStyle(placed.element.kind);\r\n }\r\n\r\n /** A text element with no label draws nothing, rather than an empty box. */\r\n protected drawsElement(placed: PlacedElement): boolean {\r\n const style = this.style(placed);\r\n return style.shape !== 'text' || (!!placed.element.label && style.showLabel);\r\n }\r\n\r\n /** A label on a shape stays upright; a text element's own label is what rotates. */\r\n protected labelTransform(placed: PlacedElement): string | null {\r\n return this.style(placed).shape === 'text' ? null : this.counterRotate(placed);\r\n }\r\n\r\n protected elementFillOf(placed: PlacedElement): string {\r\n return elementFill(this.style(placed).tone, this.colors());\r\n }\r\n\r\n protected elementTextFillOf(placed: PlacedElement): string {\r\n return elementTextFill(this.style(placed).tone, this.colors());\r\n }\r\n\r\n protected screenPathOf(placed: PlacedElement): string {\r\n return screenPath(placed.x, placed.y, placed.width, placed.height);\r\n }\r\n\r\n /** The corner radius for a rectangular element; a stage reads as squarer. */\r\n protected radiusOf(placed: PlacedElement): number {\r\n return this.style(placed).shape === 'stage' ? 2 : Math.min(placed.height * 0.25, 6);\r\n }\r\n\r\n // --- interaction ----------------------------------------------------------\r\n\r\n protected onSeatClick(placed: PlacedSeat): void {\r\n if (this.interactive()) {\r\n this.seatActivate.emit(placed.seat.id);\r\n }\r\n }\r\n\r\n protected onSeatFocus(placed: PlacedSeat): void {\r\n if (this.interactive()) {\r\n this.seatFocused.emit(placed.seat.id);\r\n }\r\n }\r\n\r\n protected onKeydown(event: KeyboardEvent): void {\r\n if (this.interactive()) {\r\n this.seatKeydown.emit(event);\r\n }\r\n }\r\n}\r\n","<svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"kerusi-section-svg\"\r\n role=\"presentation\"\r\n focusable=\"false\"\r\n [style.--kerusi-focus-ring-input]=\"colors().focusRing\"\r\n [attr.viewBox]=\"viewBox()\"\r\n [style.max-width.px]=\"naturalWidth()\"\r\n preserveAspectRatio=\"xMidYMid meet\"\r\n>\r\n <rect\r\n x=\"0\"\r\n y=\"0\"\r\n [attr.width]=\"layout().width\"\r\n [attr.height]=\"layout().height\"\r\n [style.fill]=\"backdrop()\"\r\n />\r\n\r\n <!-- Elements first, so a screen or stage sits behind the seats it faces. -->\r\n @for (placed of layout().elements; track placed.element.id) {\r\n @if (drawsElement(placed)) {\r\n <g\r\n class=\"kerusi-element kerusi-element--{{ placed.element.kind }}\"\r\n [attr.transform]=\"transform(placed)\"\r\n >\r\n @switch (style(placed).shape) {\r\n @case ('screen') {\r\n <path [attr.d]=\"screenPathOf(placed)\" [style.fill]=\"elementFillOf(placed)\" />\r\n }\r\n @case ('text') {}\r\n @case ('void') {\r\n <rect\r\n class=\"kerusi-element__void\"\r\n [attr.x]=\"placed.x\"\r\n [attr.y]=\"placed.y\"\r\n [attr.width]=\"placed.width\"\r\n [attr.height]=\"placed.height\"\r\n [style.stroke]=\"elementTextFillOf(placed)\"\r\n fill=\"none\"\r\n />\r\n }\r\n @default {\r\n <rect\r\n [attr.x]=\"placed.x\"\r\n [attr.y]=\"placed.y\"\r\n [attr.width]=\"placed.width\"\r\n [attr.height]=\"placed.height\"\r\n [attr.rx]=\"radiusOf(placed)\"\r\n [style.fill]=\"elementFillOf(placed)\"\r\n />\r\n }\r\n }\r\n @if (placed.element.label && style(placed).showLabel) {\r\n <text\r\n class=\"kerusi-element__label\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n [attr.x]=\"placed.centerX\"\r\n [attr.y]=\"placed.centerY\"\r\n [attr.font-size]=\"placed.fontSize\"\r\n [style.fill]=\"elementTextFillOf(placed)\"\r\n [attr.transform]=\"labelTransform(placed)\"\r\n >\r\n {{ placed.element.label }}\r\n </text>\r\n }\r\n </g>\r\n }\r\n }\r\n\r\n <!-- The stock seat drawing. A template rather than inline markup so that a\r\n custom seat template can render it too, as `defaultContent`. Declared\r\n inside the <svg>, so its elements are created in the SVG namespace. -->\r\n <ng-template #stockSeat let-seat>\r\n @let glyph = seat.glyph;\r\n <!-- Tapered toward the back, square at the front, so which way the seat\r\n faces is legible from the outline alone. -->\r\n <path class=\"kerusi-seat__box\" [attr.d]=\"glyph.body.d\" [style.fill]=\"glyph.body.fill\" />\r\n @if (glyph.wash; as wash) {\r\n <!-- Colour stays the seat type's; a taken seat recedes under a wash\r\n instead, so the type colour still reads on a busy map. -->\r\n <path class=\"kerusi-seat__wash\" [attr.d]=\"wash.d\" [style.fill]=\"wash.fill\" />\r\n }\r\n @if (glyph.core; as core) {\r\n <!-- Selection is the one state drawn from two tones: the body above is\r\n the frame, this is the bright core inside it. Whichever way the\r\n host page is themed, one of the two separates from it — which is\r\n why nothing here has to know about the page. -->\r\n <path class=\"kerusi-seat__core\" [attr.d]=\"core.d\" [style.fill]=\"core.fill\" />\r\n }\r\n @if (glyph.occupant; as occupant) {\r\n <!-- Deliberately not counter-rotated: the occupant leans with the\r\n seat. Solid = settled (yours, or sold); hollow = a hold still in\r\n progress. -->\r\n <path\r\n class=\"kerusi-seat__occupant kerusi-seat__occupant--{{ occupant.variant }}\"\r\n [attr.d]=\"occupant.d\"\r\n [attr.stroke-width]=\"occupant.strokeWidth\"\r\n [style.fill]=\"occupant.fill\"\r\n [style.stroke]=\"occupant.stroke\"\r\n />\r\n }\r\n <!-- The halo colour and width are bound here rather than in the\r\n stylesheet: a CSS `var(--kerusi-selected-fg, …)` rule would carry\r\n the library default as its fallback and skip the [colors] tier. -->\r\n <text\r\n class=\"kerusi-seat__label\"\r\n text-anchor=\"middle\"\r\n dominant-baseline=\"central\"\r\n [attr.x]=\"glyph.label.x\"\r\n [attr.y]=\"glyph.label.y\"\r\n [attr.font-size]=\"glyph.label.fontSize\"\r\n [style.fill]=\"glyph.label.fill\"\r\n [style.stroke]=\"glyph.label.halo\"\r\n [attr.stroke-width]=\"glyph.label.haloWidth\"\r\n [attr.transform]=\"glyph.label.transform\"\r\n >\r\n {{ glyph.label.text }}\r\n </text>\r\n @if (glyph.wheelchair; as wheelchair) {\r\n <!-- A corner marker, not a different fill: availability owns the fill. -->\r\n <circle\r\n class=\"kerusi-seat__wheelchair\"\r\n [attr.cx]=\"wheelchair.cx\"\r\n [attr.cy]=\"wheelchair.cy\"\r\n [attr.r]=\"wheelchair.r\"\r\n [style.fill]=\"wheelchair.fill\"\r\n />\r\n }\r\n </ng-template>\r\n\r\n @for (entry of seats(); track entry.placed.seat.id) {\r\n @let placed = entry.placed;\r\n @let glyph = entry.glyph;\r\n @let ctx =\r\n {\r\n placed: placed,\r\n seat: placed.seat,\r\n selected: entry.selected,\r\n glyph: glyph,\r\n defaultContent: stockSeat,\r\n };\r\n <g\r\n [class]=\"glyph.className\"\r\n role=\"button\"\r\n [attr.tabindex]=\"tabIndex(placed)\"\r\n [attr.aria-label]=\"ariaLabel(placed)\"\r\n [attr.aria-pressed]=\"entry.selected\"\r\n [attr.aria-disabled]=\"!placed.seat.selectable\"\r\n [attr.data-seat-id]=\"placed.seat.id\"\r\n [attr.data-seat-type]=\"glyph.data.type\"\r\n [attr.data-seat-status]=\"glyph.data.status\"\r\n [attr.data-section-id]=\"glyph.data.section\"\r\n [attr.data-seat-row]=\"glyph.data.row\"\r\n [attr.data-seat-attributes]=\"glyph.data.attributes\"\r\n [attr.transform]=\"transform(placed)\"\r\n (click)=\"onSeatClick(placed)\"\r\n (focus)=\"onSeatFocus(placed)\"\r\n (keydown)=\"onKeydown($event)\"\r\n >\r\n @if (seatTemplate(); as custom) {\r\n <ng-container *ngTemplateOutlet=\"custom; context: { $implicit: ctx }\" />\r\n <!-- Drawn over the custom content, because that content may have no\r\n .kerusi-seat__box for the stock focus ring to stroke. Only visible\r\n on :focus-visible. -->\r\n <path class=\"kerusi-seat__focus\" [attr.d]=\"glyph.body.d\" />\r\n } @else {\r\n <ng-container *ngTemplateOutlet=\"stockSeat; context: { $implicit: ctx }\" />\r\n }\r\n </g>\r\n }\r\n</svg>\r\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\r\nimport {\r\n cssVar,\r\n DEFAULT_KERUSI_COLORS,\r\n formatMoney,\r\n KerusiSeatmapColors,\r\n legendSwatchFill,\r\n legendSwatchPath,\r\n legendSwatchText,\r\n occupantFillFor,\r\n occupantStrokeFor,\r\n RenderLegendEntry,\r\n seatBodyPath,\r\n SeatOccupantVariant,\r\n seatCoreFill,\r\n SeatTypeStyles,\r\n seatOccupantPath,\r\n seatOccupantStroke,\r\n seatSelectedFrame,\r\n seatWashFill,\r\n} from '@kerusiweb/core';\r\n\r\n/** Which marks, beyond the body fill, a status swatch draws. */\r\ntype StatusKind = 'plain' | 'blocked' | SeatOccupantVariant;\r\n\r\n/** One availability swatch in the legend's second block. */\r\ninterface StatusEntry {\r\n key: string;\r\n label: string;\r\n kind: StatusKind;\r\n /** The swatch body's fill. */\r\n fill: string;\r\n}\r\n\r\n/**\r\n * A key for a seat map: its seat types on one side, its availability states on\r\n * the other.\r\n *\r\n * This ships in the library rather than being left to each application because\r\n * the swatch colors must come from the *same* resolution path as the seat\r\n * fills — `SeatType.color` when the document supplies one, the theme's\r\n * available color when it does not. Re-deriving that in application code is how\r\n * a legend ends up disagreeing with the map it describes.\r\n *\r\n * It is opt-in: `<kerusi-seatmap [showLegend]=\"true\">` renders it inline, or\r\n * use `<kerusi-legend>` directly to place it anywhere.\r\n */\r\n@Component({\r\n selector: 'kerusi-legend',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n templateUrl: './kerusi-legend.component.html',\r\n styleUrl: './kerusi-legend.component.css',\r\n})\r\nexport class KerusiLegendComponent {\r\n /** From `RenderMap.legend`. */\r\n readonly legend = input.required<readonly RenderLegendEntry[]>();\r\n readonly locale = input<string>('en');\r\n readonly colors = input<Required<KerusiSeatmapColors>>(DEFAULT_KERUSI_COLORS);\r\n /** Whether an available seat takes its type color — mirrors the seatmap input. */\r\n readonly typeColors = input<boolean>(true);\r\n /** Mirrors the seatmap input: a type's style is what its swatch shows. */\r\n readonly seatTypeStyles = input<SeatTypeStyles | undefined>(undefined);\r\n readonly showPrices = input<boolean>(true);\r\n /** Hide types no seat in the rendered map actually uses. */\r\n readonly hideUnusedTypes = input<boolean>(true);\r\n\r\n readonly headingSeatTypes = input<string>('Seat types');\r\n readonly headingAvailability = input<string>('Availability');\r\n\r\n protected readonly types = computed(() =>\r\n this.legend().filter((entry) => !this.hideUnusedTypes() || entry.seatCount > 0),\r\n );\r\n\r\n // Colour means seat type; shape means status (see `seatFill`'s doc comment).\r\n // Held and booked swatches share the plain \"available\" body colour — the\r\n // map's colour there is always whatever the seat's own type supplies, which\r\n // the legend has no single value for — and are told apart by their wash and\r\n // occupant figure instead, same as on the map.\r\n protected readonly statuses = computed<StatusEntry[]>(() => {\r\n const c = this.colors();\r\n const available = cssVar('availableBg', c.availableBg);\r\n return [\r\n { key: 'available', label: 'Available', kind: 'plain', fill: available },\r\n {\r\n key: 'selected',\r\n label: 'Selected',\r\n kind: 'selected',\r\n fill: cssVar('selectedBg', c.selectedBg),\r\n },\r\n { key: 'held', label: 'On hold', kind: 'held', fill: available },\r\n { key: 'booked', label: 'Booked', kind: 'booked', fill: available },\r\n { key: 'blocked', label: 'Blocked', kind: 'blocked', fill: cssVar('blockedBg', c.blockedBg) },\r\n ];\r\n });\r\n\r\n // Same token and fallback as an available seat of the type, so a rule that\r\n // sets `--kerusi-seat-fill` on the seats and the legend items keeps them in step.\r\n protected swatch(entry: RenderLegendEntry): string {\r\n return legendSwatchFill(\r\n entry,\r\n this.colors(),\r\n this.typeColors(),\r\n this.seatTypeStyles()?.[entry.id],\r\n );\r\n }\r\n\r\n /** The swatch outline for a type styled with its own shape; `undefined` keeps the square. */\r\n protected typeShape(entry: RenderLegendEntry): string | undefined {\r\n return legendSwatchPath(this.seatTypeStyles()?.[entry.id], this.glyphSize);\r\n }\r\n\r\n protected swatchText(entry: RenderLegendEntry): string {\r\n return legendSwatchText(\r\n entry,\r\n this.colors(),\r\n this.typeColors(),\r\n this.seatTypeStyles()?.[entry.id],\r\n );\r\n }\r\n\r\n // --- status swatches -------------------------------------------------------\r\n //\r\n // Availability is now signalled by shape, not colour, so every status swatch\r\n // (bar \"available\" and \"blocked\") draws the same glyph the map does rather\r\n // than a flat square. A legend that showed only flat colour would teach a\r\n // cue the map no longer uses.\r\n\r\n /** The swatch's viewBox edge; the seat glyph is drawn to fill it. */\r\n protected readonly glyphSize = 16;\r\n\r\n protected readonly glyphBody = seatBodyPath(0, 0, this.glyphSize, this.glyphSize);\r\n\r\n /** The selected swatch's frame width, and the core it leaves inside itself. */\r\n private readonly glyphFrame = seatSelectedFrame(this.glyphSize, this.glyphSize);\r\n private readonly glyphCoreSize = this.glyphSize - this.glyphFrame * 2;\r\n protected readonly glyphCore = seatBodyPath(\r\n 0,\r\n 0,\r\n this.glyphSize,\r\n this.glyphSize,\r\n this.glyphFrame,\r\n );\r\n\r\n protected readonly glyphOccupant = seatOccupantPath(0, 0, this.glyphSize, this.glyphSize);\r\n protected readonly glyphOccupantStroke = seatOccupantStroke(this.glyphSize, this.glyphSize);\r\n\r\n /** The selected swatch's figure sits on the core, so it is drawn to the core. */\r\n private readonly glyphCoreOccupant = seatOccupantPath(\r\n this.glyphFrame,\r\n this.glyphFrame,\r\n this.glyphCoreSize,\r\n this.glyphCoreSize,\r\n );\r\n private readonly glyphCoreOccupantStroke = seatOccupantStroke(\r\n this.glyphCoreSize,\r\n this.glyphCoreSize,\r\n );\r\n\r\n protected occupantPathOf(variant: SeatOccupantVariant): string {\r\n return variant === 'selected' ? this.glyphCoreOccupant : this.glyphOccupant;\r\n }\r\n\r\n protected occupantStrokeWidthOf(variant: SeatOccupantVariant): number {\r\n return variant === 'selected' ? this.glyphCoreOccupantStroke : this.glyphOccupantStroke;\r\n }\r\n\r\n protected hasWash(kind: StatusKind): kind is 'held' | 'booked' {\r\n return kind === 'held' || kind === 'booked';\r\n }\r\n\r\n protected hasOccupant(kind: StatusKind): kind is SeatOccupantVariant {\r\n return kind === 'selected' || kind === 'held' || kind === 'booked';\r\n }\r\n\r\n protected washFillOf(kind: 'held' | 'booked'): string {\r\n return seatWashFill(kind, this.colors());\r\n }\r\n\r\n protected occupantFillOf(variant: SeatOccupantVariant): string {\r\n return occupantFillFor(variant, this.colors());\r\n }\r\n\r\n protected occupantStrokeOf(variant: SeatOccupantVariant): string {\r\n return occupantStrokeFor(variant, this.colors());\r\n }\r\n\r\n protected coreFill(): string {\r\n return seatCoreFill(this.colors());\r\n }\r\n\r\n protected price(entry: RenderLegendEntry): string {\r\n return entry.price ? formatMoney(entry.price, this.locale()) : '';\r\n }\r\n}\r\n","<div class=\"kerusi-legend\">\r\n @if (types().length) {\r\n <div class=\"kerusi-legend__block\">\r\n <h4 class=\"kerusi-legend__heading\">{{ headingSeatTypes() }}</h4>\r\n <ul class=\"kerusi-legend__list\">\r\n @for (entry of types(); track entry.id) {\r\n <li class=\"kerusi-legend__item\" [attr.data-seat-type]=\"entry.id\">\r\n @if (typeShape(entry); as d) {\r\n <!-- A type styled with its own shape keys that shape, not a square. -->\r\n <svg\r\n class=\"kerusi-legend__swatch kerusi-legend__swatch--glyph\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n [attr.viewBox]=\"'0 0 ' + glyphSize + ' ' + glyphSize\"\r\n >\r\n <path [attr.d]=\"d\" [style.fill]=\"swatch(entry)\" />\r\n </svg>\r\n } @else {\r\n <span\r\n class=\"kerusi-legend__swatch\"\r\n aria-hidden=\"true\"\r\n [style.background]=\"swatch(entry)\"\r\n [style.color]=\"swatchText(entry)\"\r\n ></span>\r\n }\r\n <span class=\"kerusi-legend__label\">{{ entry.label }}</span>\r\n @if (showPrices() && price(entry)) {\r\n <span class=\"kerusi-legend__price\">{{ price(entry) }}</span>\r\n }\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n }\r\n\r\n <div class=\"kerusi-legend__block\">\r\n <h4 class=\"kerusi-legend__heading\">{{ headingAvailability() }}</h4>\r\n <ul class=\"kerusi-legend__list\">\r\n @for (status of statuses(); track status.key) {\r\n <li class=\"kerusi-legend__item\">\r\n <!-- Shape carries status now, so every swatch draws the seat glyph\r\n rather than a flat colour — a flat swatch would teach a cue the\r\n map itself no longer uses. -->\r\n <svg\r\n class=\"kerusi-legend__swatch kerusi-legend__swatch--glyph\"\r\n aria-hidden=\"true\"\r\n focusable=\"false\"\r\n [attr.viewBox]=\"'0 0 ' + glyphSize + ' ' + glyphSize\"\r\n >\r\n <path [attr.d]=\"glyphBody\" [style.fill]=\"status.fill\" />\r\n @if (hasWash(status.kind)) {\r\n <path [attr.d]=\"glyphBody\" [style.fill]=\"washFillOf(status.kind)\" opacity=\"0.5\" />\r\n }\r\n @if (status.kind === 'selected') {\r\n <!-- Two tones, same as the map: the body above is the frame, this\r\n is the core inside it. -->\r\n <path [attr.d]=\"glyphCore\" [style.fill]=\"coreFill()\" />\r\n }\r\n @if (hasOccupant(status.kind)) {\r\n <path\r\n [attr.d]=\"occupantPathOf(status.kind)\"\r\n class=\"kerusi-legend__occupant kerusi-legend__occupant--{{ status.kind }}\"\r\n [attr.stroke-width]=\"occupantStrokeWidthOf(status.kind)\"\r\n [style.fill]=\"occupantFillOf(status.kind)\"\r\n [style.stroke]=\"occupantStrokeOf(status.kind)\"\r\n />\r\n }\r\n </svg>\r\n <span class=\"kerusi-legend__label\">{{ status.label }}</span>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n</div>\r\n","import { Directive, inject, TemplateRef } from '@angular/core';\r\nimport { KerusiSeatContext } from '@kerusiweb/core';\r\n\r\n/**\r\n * What a `kerusiSeat` template is handed for each seat (`let-seat`): the seat,\r\n * whether it is selected, the stock glyph core resolved for it, and the stock\r\n * drawing itself.\r\n */\r\nexport interface SeatTemplateContext extends KerusiSeatContext {\r\n /**\r\n * The library's own drawing of this seat. Render it to keep the stock seat,\r\n * or alongside your own marks to add to it:\r\n *\r\n * ```html\r\n * <ng-container *ngTemplateOutlet=\"seat.defaultContent; context: { $implicit: seat }\" />\r\n * ```\r\n */\r\n defaultContent: TemplateRef<SeatTemplateOutletContext>;\r\n}\r\n\r\n/** The context object a seat template is stamped with. */\r\nexport interface SeatTemplateOutletContext {\r\n $implicit: SeatTemplateContext;\r\n}\r\n\r\n/**\r\n * Marks an `<ng-template>` inside `<kerusi-seatmap>` as the drawing for every\r\n * seat. The library keeps each seat's `<g>`, with its role, ARIA state, tab\r\n * stop, rotation and event handlers, and stamps this template inside it.\r\n *\r\n * The template is declared outside any `<svg>`, so Angular cannot tell its\r\n * elements are SVG: prefix each one with `svg:` (`<svg:path>`, `<svg:image>`),\r\n * or it is created as an unknown HTML element and draws nothing.\r\n *\r\n * ```html\r\n * <kerusi-seatmap [map]=\"map\">\r\n * <ng-template kerusiSeat let-seat>\r\n * <ng-container *ngTemplateOutlet=\"seat.defaultContent; context: { $implicit: seat }\" />\r\n * <svg:circle [attr.cx]=\"seat.glyph.box.x\" [attr.cy]=\"seat.glyph.box.y\" r=\"3\" />\r\n * </ng-template>\r\n * </kerusi-seatmap>\r\n * ```\r\n */\r\n@Directive({ selector: 'ng-template[kerusiSeat]' })\r\nexport class KerusiSeatTemplateDirective {\r\n readonly template = inject<TemplateRef<SeatTemplateOutletContext>>(TemplateRef);\r\n\r\n /** Types `let-seat` as a {@link SeatTemplateContext}. */\r\n static ngTemplateContextGuard(\r\n _dir: KerusiSeatTemplateDirective,\r\n ctx: unknown,\r\n ): ctx is SeatTemplateOutletContext {\r\n return true;\r\n }\r\n}\r\n","import { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n computed,\r\n contentChild,\r\n effect,\r\n ElementRef,\r\n inject,\r\n input,\r\n model,\r\n output,\r\n signal,\r\n untracked,\r\n viewChild,\r\n} from '@angular/core';\r\nimport {\r\n buildNavigationGraph,\r\n buildRenderModel,\r\n clampViewport,\r\n computeSectionLayout,\r\n controlStyle,\r\n DEFAULT_MAX_ZOOM,\r\n DEFAULT_SEAT_ARIA_STRINGS,\r\n DisallowedReason,\r\n disallowedAnnouncement,\r\n errorsOf,\r\n expireHolds,\r\n FIT_VIEWPORT,\r\n fitViewport,\r\n formatMoney,\r\n GestureEvent,\r\n GestureState,\r\n IDLE_GESTURE,\r\n isRtlLocale,\r\n isTextEntryTarget,\r\n keyboardViewport,\r\n KerusiControlStrings,\r\n KerusiMap,\r\n KerusiSeatmapColors,\r\n KerusiSession,\r\n KerusiState,\r\n KerusiValidationError,\r\n KerusiViewport,\r\n KerusiViolation,\r\n Money,\r\n NavigationGraph,\r\n reduceGesture,\r\n RenderMap,\r\n RenderSeat,\r\n RenderSection,\r\n resolveColors,\r\n resolveControlStrings,\r\n resolveMapLocale,\r\n revealRect,\r\n SeatAriaStrings,\r\n seatAriaLabel,\r\n SeatRenderStatus,\r\n SeatStyleFn,\r\n SeatTypeStyles,\r\n SectionLayout,\r\n stepViewport,\r\n summarizeSelection,\r\n toggleSeatSelection,\r\n validateDocumentSet,\r\n ViewportPoint,\r\n ViewportSize,\r\n viewportsEqual,\r\n viewportTouchAction,\r\n viewportTransform,\r\n wheelZoomFactor,\r\n zoomLimits,\r\n zoomViewportBy,\r\n zoomViewportTo,\r\n} from '@kerusiweb/core';\r\nimport { KerusiSectionComponent } from './kerusi-section.component';\r\nimport { KerusiLegendComponent } from './kerusi-legend.component';\r\nimport { KerusiSeatTemplateDirective } from './kerusi-seat-template.directive';\r\n\r\n/** How a document with validation errors is handled. */\r\nexport type ValidationMode =\r\n /** Report through `validationIssues` and render anyway. The default. */\r\n | 'collect'\r\n /** Throw a `KerusiValidationError`, as `validateKerusiMap` does. */\r\n | 'throw'\r\n /** Skip validation entirely, for a document validated upstream. */\r\n | 'off';\r\n\r\n/** Per-section rendering overrides, keyed by `Section.id`. */\r\nexport interface SectionRenderOptions {\r\n hidden?: boolean;\r\n /** Overrides `Section.aspectRatio`. */\r\n aspectRatio?: string;\r\n /** Overrides the seat size for this section only. */\r\n seatSize?: number;\r\n /** Overrides the localized `Section.label`. */\r\n label?: string;\r\n}\r\n\r\n/** What a seat event carries. Everything the document knows, already resolved. */\r\nexport interface SeatInteraction {\r\n seat: RenderSeat;\r\n /** The selection after this event. */\r\n selection: readonly string[];\r\n /** Seats whose membership changed, including companions (§4.6). */\r\n changed: readonly string[];\r\n}\r\n\r\nexport interface SeatDisallowed {\r\n seat: RenderSeat;\r\n reason: DisallowedReason;\r\n}\r\n\r\n/**\r\n * Renders a Kerusi seat map.\r\n *\r\n * Takes a `KerusiMap` and its `KerusiState` directly — no adapter, no\r\n * intermediate row model. Each `Section` becomes its own `<svg>` with its own\r\n * layout mode and proportions, seats take their color from the map's legend,\r\n * every seat is keyboard-reachable and announced with its type, price, status\r\n * and §4.3.4 accessibility properties, and selection is an immutable set of\r\n * seat ids the caller can two-way bind.\r\n *\r\n * ```html\r\n * <kerusi-seatmap [map]=\"map\" [state]=\"state\" [(selection)]=\"picked\" />\r\n * ```\r\n *\r\n * Two opt-in features sit on top, both off by default so an existing map is\r\n * unchanged: `[zoomable]` (pinch, wheel and drag, keys `+` `-` `0`, buttons)\r\n * and `[maximizable]` (a full-screen button). Their arithmetic is in\r\n * `@kerusiweb/core`; this class supplies the listeners and the signals.\r\n */\r\n@Component({\r\n selector: 'kerusi-seatmap',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [KerusiSectionComponent, KerusiLegendComponent, NgTemplateOutlet],\r\n templateUrl: './kerusi-seatmap.component.html',\r\n styleUrl: './kerusi-seatmap.component.css',\r\n})\r\nexport class KerusiSeatmapComponent {\r\n private readonly host = inject(ElementRef<HTMLElement>);\r\n\r\n // --- documents ------------------------------------------------------------\r\n\r\n readonly map = input.required<KerusiMap>();\r\n readonly state = input<KerusiState | undefined>(undefined);\r\n /** The optional map↔event join (§5.3). Validated against the map and state. */\r\n readonly session = input<KerusiSession | undefined>(undefined);\r\n\r\n // --- selection ------------------------------------------------------------\r\n\r\n /** Selected seat ids. Two-way: `[(selection)]`, or read-only with `[selection]`. */\r\n readonly selection = model<readonly string[]>([]);\r\n\r\n // --- localization ---------------------------------------------------------\r\n\r\n /** Overrides `KerusiMap.locale` (BCP-47). */\r\n readonly locale = input<string | undefined>(undefined);\r\n /** Right-to-left rendering. `auto` derives it from the resolved locale. */\r\n readonly rtl = input<boolean | 'auto'>('auto');\r\n /** Overrides the built-in English announcement strings. */\r\n readonly ariaStrings = input<SeatAriaStrings>(DEFAULT_SEAT_ARIA_STRINGS);\r\n\r\n // --- appearance -----------------------------------------------------------\r\n\r\n readonly colors = input<KerusiSeatmapColors>({});\r\n /** Let an available seat take its `SeatType.color` (§4.7). */\r\n readonly typeColors = input<boolean>(true);\r\n /**\r\n * Styles for every seat of a type, keyed by `SeatType.id`: fill, label colour\r\n * and classes. Never changes a selected or blocked seat's fill. Also shown in\r\n * the legend.\r\n */\r\n readonly seatTypeStyles = input<SeatTypeStyles | undefined>(undefined);\r\n /**\r\n * A style for one seat, laid over its `seatTypeStyles` entry; return nothing\r\n * to leave a seat be. Never changes a selected or blocked seat's fill.\r\n */\r\n readonly seatStyle = input<SeatStyleFn | undefined>(undefined);\r\n /**\r\n * A `<ng-template kerusiSeat let-seat>` placed inside the map draws the inside\r\n * of every seat in place of the stock glyph. See {@link KerusiSeatTemplateDirective}.\r\n */\r\n protected readonly seatTemplate = contentChild(KerusiSeatTemplateDirective);\r\n /** Grid cell edge, in viewBox units. */\r\n readonly seatSize = input<number>(28);\r\n /** Gap between grid cells, in viewBox units. */\r\n readonly seatGap = input<number>(6);\r\n /** Freeform viewBox width; height follows the section's aspect ratio. */\r\n readonly freeformBasis = input<number>(1000);\r\n /**\r\n * CSS pixels per viewBox unit. Caps each section at its natural size so a\r\n * narrow section and a wide one in the same map draw seats the same size.\r\n */\r\n readonly unitScale = input<number>(1);\r\n readonly showSectionLabels = input<boolean>(true);\r\n readonly showLegend = input<boolean>(false);\r\n readonly showLegendPrices = input<boolean>(true);\r\n\r\n // --- section control ------------------------------------------------------\r\n\r\n /** Render only these sections, in this order. Default: all, by `Section.index`. */\r\n readonly sectionIds = input<readonly string[] | undefined>(undefined);\r\n readonly sectionOverrides = input<Readonly<Record<string, SectionRenderOptions>>>({});\r\n\r\n // --- interaction ----------------------------------------------------------\r\n\r\n /** Statuses in which a seat may be picked. Default: `['available']`. */\r\n readonly selectableStatuses = input<readonly SeatRenderStatus[]>(['available']);\r\n /** `auto` selects a seat's companion closure together (§4.6). */\r\n readonly companionMode = input<'auto' | 'independent'>('auto');\r\n readonly maxSelection = input<number | undefined>(undefined);\r\n /** A final say on selectability, applied after the status test. */\r\n readonly seatSelectable = input<((seat: RenderSeat) => boolean) | undefined>(undefined);\r\n /** When false the map renders read-only: no pointer or keyboard interaction. */\r\n readonly interactive = input<boolean>(true);\r\n /**\r\n * Revert a lapsed `holdExpires` to available on a ticker (§5.1). Off by\r\n * default — a renderer should stay passive unless asked.\r\n */\r\n readonly expireHolds = input<boolean>(false);\r\n readonly expiryIntervalMs = input<number>(1000);\r\n\r\n // --- zoom, pan and maximize (both opt in) ---------------------------------\r\n\r\n /**\r\n * Pinch, Ctrl/Cmd + wheel and drag to zoom and pan, `+` `-` `0` on the keyboard,\r\n * and on-screen buttons. A tap still selects at every zoom level.\r\n */\r\n readonly zoomable = input<boolean>(false);\r\n /** The zoom ceiling, relative to fit-to-container. The floor is always fit. */\r\n readonly maxZoom = input<number>(DEFAULT_MAX_ZOOM);\r\n /**\r\n * The built-in zoom buttons. Turn this off to supply your own, anywhere on the\r\n * page, and call `zoomIn()`, `zoomOut()` and `resetZoom()` on the component.\r\n */\r\n readonly showZoomControls = input<boolean>(true);\r\n /** A button that maximizes the map to fill the screen. */\r\n readonly maximizable = input<boolean>(false);\r\n /** Overrides the built-in English names of the zoom and maximize controls. */\r\n readonly controlStrings = input<Partial<KerusiControlStrings>>({});\r\n\r\n // --- validation -----------------------------------------------------------\r\n\r\n readonly validate = input<ValidationMode>('collect');\r\n\r\n // --- outputs --------------------------------------------------------------\r\n\r\n readonly seatSelect = output<SeatInteraction>();\r\n readonly seatDeselect = output<SeatInteraction>();\r\n readonly seatDisallowed = output<SeatDisallowed>();\r\n readonly seatFocus = output<RenderSeat>();\r\n /** Emitted whenever the documents change, in `collect` mode. */\r\n readonly validationIssues = output<readonly KerusiViolation[]>();\r\n /** The zoom and pan, whenever they change. For a host that persists or shows them. */\r\n readonly viewportChange = output<KerusiViewport>();\r\n readonly maximizedChange = output<boolean>();\r\n\r\n // --- internal state -------------------------------------------------------\r\n\r\n /**\r\n * The seat holding each section's tab stop, keyed by section id.\r\n *\r\n * Per section, not per map: arrow keys never cross a section boundary, so a\r\n * single map-wide tab stop would leave every section after the first\r\n * unreachable by keyboard. Tab moves between sections, arrows move within.\r\n */\r\n private readonly focusedSeatIds = signal<Readonly<Record<string, string>>>({});\r\n private readonly announcement = signal('');\r\n /** Bumped by the hold ticker to force the state to be re-derived. */\r\n private readonly expiryTick = signal(0);\r\n\r\n private readonly viewportState = signal<KerusiViewport>(FIT_VIEWPORT);\r\n private readonly maximizedState = signal(false);\r\n /** True for a discrete change (button, key, reveal), false while a finger or wheel drives. */\r\n protected readonly animated = signal(false);\r\n private readonly viewportEl = viewChild<ElementRef<HTMLElement>>('viewport');\r\n private readonly contentEl = viewChild<ElementRef<HTMLElement>>('content');\r\n private gesture: GestureState = IDLE_GESTURE;\r\n private suppressClick = false;\r\n private gestureBase: KerusiViewport | null = null;\r\n private nativeFullscreen = false;\r\n\r\n /** The current zoom and pan. Read-only: drive it with the methods below. */\r\n readonly viewport = this.viewportState.asReadonly();\r\n /** Whether the map is currently maximized. */\r\n readonly maximized = this.maximizedState.asReadonly();\r\n\r\n constructor() {\r\n effect(() => {\r\n const issues = this.issues();\r\n if (this.validate() !== 'off') {\r\n this.validationIssues.emit(issues);\r\n }\r\n if (this.validate() === 'throw') {\r\n const [first] = errorsOf(issues);\r\n if (first) {\r\n throw new KerusiValidationError(first.message, first.rule, first.id, issues);\r\n }\r\n }\r\n });\r\n\r\n // Keep every section's tab stop pointing at a seat that still exists.\r\n effect(() => {\r\n const model = this.renderMap();\r\n const current = this.focusedSeatIds();\r\n const next: Record<string, string> = {};\r\n let changed = Object.keys(current).length !== model.sections.length;\r\n\r\n for (const section of model.sections) {\r\n const held = current[section.id];\r\n const valid = held && section.seats.some((seat) => seat.id === held);\r\n const resolved = valid ? held : section.seats[0]?.id;\r\n if (resolved) {\r\n next[section.id] = resolved;\r\n changed ||= resolved !== held;\r\n }\r\n }\r\n\r\n if (changed) {\r\n this.focusedSeatIds.set(next);\r\n }\r\n });\r\n\r\n effect((onCleanup) => {\r\n if (!this.expireHolds()) {\r\n return;\r\n }\r\n const handle = setInterval(\r\n () => this.expiryTick.update((n) => n + 1),\r\n this.expiryIntervalMs(),\r\n );\r\n onCleanup(() => clearInterval(handle));\r\n });\r\n\r\n // Gesture listeners go on natively, not through the template: the wheel\r\n // listener must be non-passive to `preventDefault` a page zoom, and the\r\n // click listener must be in the capture phase to swallow the click that\r\n // follows a drag before the seat sees it.\r\n effect((onCleanup) => {\r\n const el = this.viewportEl()?.nativeElement;\r\n if (!el) {\r\n return;\r\n }\r\n const listeners: [string, (event: Event) => void, boolean | AddEventListenerOptions][] = [\r\n ['pointerdown', (e) => this.onPointerDown(e as PointerEvent), false],\r\n ['pointermove', (e) => this.onPointerMove(e as PointerEvent), false],\r\n ['pointerup', (e) => this.onPointerEnd(e as PointerEvent, 'up'), false],\r\n ['pointercancel', (e) => this.onPointerEnd(e as PointerEvent, 'cancel'), false],\r\n ['wheel', (e) => this.onWheel(e as WheelEvent), { passive: false }],\r\n ['click', (e) => this.onClickCapture(e), true],\r\n // Safari reports a trackpad pinch as gesture events, not Ctrl + wheel.\r\n ['gesturestart', (e) => this.onGestureStart(e), { passive: false }],\r\n ['gesturechange', (e) => this.onGestureChange(e as SafariGestureEvent), { passive: false }],\r\n ['gestureend', (e) => this.onGestureEnd(e), { passive: false }],\r\n ];\r\n for (const [type, listener, options] of listeners) {\r\n el.addEventListener(type, listener, options);\r\n }\r\n onCleanup(() => {\r\n for (const [type, listener, options] of listeners) {\r\n el.removeEventListener(type, listener, options);\r\n }\r\n });\r\n });\r\n\r\n // Re-clamp when the box or the ceiling changes: a rotated phone, a\r\n // maximized map, a lowered `maxZoom`.\r\n effect((onCleanup) => {\r\n this.limits();\r\n const view = this.viewportEl()?.nativeElement;\r\n untracked(() => this.reclamp());\r\n if (!view || typeof ResizeObserver === 'undefined') {\r\n return;\r\n }\r\n const observer = new ResizeObserver(() => this.reclamp());\r\n observer.observe(view);\r\n const content = this.contentEl()?.nativeElement;\r\n if (content) {\r\n observer.observe(content);\r\n }\r\n onCleanup(() => observer.disconnect());\r\n });\r\n\r\n // Switching `zoomable` or `maximizable` off puts the map back as it was.\r\n effect(() => {\r\n if (!this.zoomable() && !viewportsEqual(untracked(this.viewportState), FIT_VIEWPORT)) {\r\n this.viewportState.set(FIT_VIEWPORT);\r\n }\r\n });\r\n effect(() => {\r\n if (!this.maximizable() && untracked(this.maximizedState)) {\r\n untracked(() => this.setMaximized(false));\r\n }\r\n });\r\n\r\n // While maximized: freeze the page behind, and follow the browser leaving\r\n // native full screen (Esc) so the two never disagree.\r\n effect((onCleanup) => {\r\n if (!this.maximizedState()) {\r\n return;\r\n }\r\n const host = this.host.nativeElement as HTMLElement;\r\n const doc = host.ownerDocument;\r\n const previousOverflow = doc.body.style.overflow;\r\n doc.body.style.overflow = 'hidden';\r\n\r\n const onFullscreenChange = () => {\r\n if (doc.fullscreenElement === host) {\r\n this.nativeFullscreen = true;\r\n } else if (this.nativeFullscreen) {\r\n this.nativeFullscreen = false;\r\n this.setMaximized(false);\r\n }\r\n };\r\n doc.addEventListener('fullscreenchange', onFullscreenChange);\r\n\r\n onCleanup(() => {\r\n doc.body.style.overflow = previousOverflow;\r\n doc.removeEventListener('fullscreenchange', onFullscreenChange);\r\n this.nativeFullscreen = false;\r\n if (doc.fullscreenElement === host) {\r\n doc.exitFullscreen?.().catch(() => undefined);\r\n }\r\n });\r\n });\r\n }\r\n\r\n // --- derived model --------------------------------------------------------\r\n\r\n protected readonly issues = computed<readonly KerusiViolation[]>(() =>\r\n this.validate() === 'off'\r\n ? []\r\n : validateDocumentSet({\r\n map: this.map(),\r\n state: this.state(),\r\n session: this.session(),\r\n }),\r\n );\r\n\r\n /** The state actually rendered — with lapsed holds reverted when asked. */\r\n private readonly effectiveState = computed<KerusiState | undefined>(() => {\r\n const state = this.state();\r\n if (!state || !this.expireHolds()) {\r\n return state;\r\n }\r\n this.expiryTick();\r\n return expireHolds(state);\r\n });\r\n\r\n protected readonly renderMap = computed<RenderMap>(() =>\r\n buildRenderModel(this.map(), this.effectiveState(), {\r\n locale: this.locale(),\r\n sectionIds: this.visibleSectionIds(),\r\n selectableStatuses: this.selectableStatuses(),\r\n seatSelectable: this.seatSelectable(),\r\n }),\r\n );\r\n\r\n protected readonly resolvedLocale = computed(() => resolveMapLocale(this.map(), this.locale()));\r\n\r\n protected readonly isRtl = computed(() =>\r\n this.rtl() === 'auto' ? isRtlLocale(this.resolvedLocale()) : this.rtl() === true,\r\n );\r\n\r\n protected readonly resolvedColors = computed<Required<KerusiSeatmapColors>>(() =>\r\n resolveColors(this.colors()),\r\n );\r\n\r\n protected readonly selectionSet = computed(() => new Set(this.selection()));\r\n\r\n protected readonly limits = computed(() => zoomLimits(this.maxZoom()));\r\n protected readonly strings = computed(() => resolveControlStrings(this.controlStrings()));\r\n protected readonly controlColors = computed(() => controlStyle(this.colors()));\r\n protected readonly transform = computed(() => viewportTransform(this.viewportState()));\r\n protected readonly touchAction = computed(() =>\r\n viewportTouchAction(this.viewportState(), this.maximizedState()),\r\n );\r\n protected readonly showToolbar = computed(\r\n () => (this.zoomable() && this.showZoomControls()) || this.maximizable(),\r\n );\r\n protected readonly atMaxZoom = computed(\r\n () => this.viewportState().zoom >= this.limits().maxZoom - 1e-4,\r\n );\r\n protected readonly atFit = computed(() => this.viewportState().zoom <= 1 + 1e-4);\r\n\r\n /** Placed geometry per section, keyed by section id. */\r\n protected readonly layouts = computed<ReadonlyMap<string, SectionLayout>>(() => {\r\n const overrides = this.sectionOverrides();\r\n return new Map(\r\n this.renderMap().sections.map((section) => {\r\n const override = overrides[section.id] ?? {};\r\n return [\r\n section.id,\r\n computeSectionLayout(section, {\r\n seatSize: override.seatSize ?? this.seatSize(),\r\n seatGap: this.seatGap(),\r\n freeformBasis: this.freeformBasis(),\r\n aspectRatio: override.aspectRatio,\r\n rtl: this.isRtl(),\r\n }),\r\n ];\r\n }),\r\n );\r\n });\r\n\r\n /** Navigation graphs per section — arrows move within, Tab moves between. */\r\n private readonly graphs = computed<ReadonlyMap<string, NavigationGraph>>(\r\n () =>\r\n new Map(\r\n this.renderMap().sections.map((section) => [\r\n section.id,\r\n buildNavigationGraph(section, { rtl: this.isRtl() }),\r\n ]),\r\n ),\r\n );\r\n\r\n protected readonly ariaLabels = computed<ReadonlyMap<string, string>>(() => {\r\n const locale = this.resolvedLocale();\r\n const strings = this.ariaStrings();\r\n return new Map(\r\n [...this.renderMap().seatsById.values()].map((seat) => [\r\n seat.id,\r\n seatAriaLabel(seat, locale, strings),\r\n ]),\r\n );\r\n });\r\n\r\n protected readonly mapLabel = computed(\r\n () => this.renderMap().name ?? `Seat map ${this.renderMap().id}`,\r\n );\r\n\r\n /** Live-region text: the running selection, or the last disallowed reason. */\r\n protected readonly liveMessage = computed(() => this.announcement());\r\n\r\n /** The selection's seats and total, for callers that want it off the template. */\r\n readonly summary = computed(() => summarizeSelection(this.renderMap(), this.selection()));\r\n\r\n // --- template helpers -----------------------------------------------------\r\n\r\n protected layoutFor(section: RenderSection): SectionLayout {\r\n return this.layouts().get(section.id)!;\r\n }\r\n\r\n protected labelFor(section: RenderSection): string | undefined {\r\n return this.sectionOverrides()[section.id]?.label ?? section.label;\r\n }\r\n\r\n protected labelId(section: RenderSection): string {\r\n return `kerusi-section-${this.renderMap().id}-${section.id}`;\r\n }\r\n\r\n /** The seat holding this section's tab stop. */\r\n protected focusedSeatIn(section: RenderSection): string | null {\r\n return this.focusedSeatIds()[section.id] ?? null;\r\n }\r\n\r\n // --- interaction ----------------------------------------------------------\r\n\r\n protected onSeatActivate(seatId: string): void {\r\n const model = this.renderMap();\r\n const seat = model.seatsById.get(seatId);\r\n if (!seat) {\r\n return;\r\n }\r\n\r\n const outcome = toggleSeatSelection(this.selection(), seatId, {\r\n seatsById: model.seatsById,\r\n companionMode: this.companionMode(),\r\n maxSelection: this.maxSelection(),\r\n });\r\n\r\n if (outcome.kind === 'disallowed') {\r\n this.announce(disallowedAnnouncement(seat, outcome.reason!, this.ariaStrings()));\r\n this.seatDisallowed.emit({ seat, reason: outcome.reason! });\r\n return;\r\n }\r\n\r\n this.selection.set(outcome.selection);\r\n const event: SeatInteraction = {\r\n seat,\r\n selection: outcome.selection,\r\n changed: outcome.changed,\r\n };\r\n (outcome.kind === 'select' ? this.seatSelect : this.seatDeselect).emit(event);\r\n this.announceSelection(outcome.selection);\r\n }\r\n\r\n protected onSeatFocused(seatId: string): void {\r\n const seat = this.renderMap().seatsById.get(seatId);\r\n if (!seat) {\r\n return;\r\n }\r\n this.setFocusedSeat(seat.sectionId, seatId);\r\n this.seatFocus.emit(seat);\r\n if (this.zoomable()) {\r\n this.revealSeat(seatId);\r\n }\r\n }\r\n\r\n /**\r\n * Arrow keys walk the navigation graph, which orders seats by `col` in grid\r\n * and mixed sections — §4.3.1's logical adjacency — so the aisle that is a\r\n * skipped column is stepped across rather than into.\r\n */\r\n protected onKeydown(section: RenderSection, event: KeyboardEvent): void {\r\n const seatId = (event.target as HTMLElement)?.dataset?.['seatId'];\r\n if (!seatId) {\r\n return;\r\n }\r\n\r\n const graph = this.graphs().get(section.id);\r\n const neighbours = graph?.neighbours.get(seatId);\r\n if (!graph) {\r\n return;\r\n }\r\n\r\n let target: string | undefined;\r\n switch (event.key) {\r\n case 'ArrowLeft':\r\n target = neighbours?.left;\r\n break;\r\n case 'ArrowRight':\r\n target = neighbours?.right;\r\n break;\r\n case 'ArrowUp':\r\n target = neighbours?.up;\r\n break;\r\n case 'ArrowDown':\r\n target = neighbours?.down;\r\n break;\r\n case 'Home':\r\n target = event.ctrlKey ? graph.first : neighbours?.rowStart;\r\n break;\r\n case 'End':\r\n target = event.ctrlKey ? graph.last : neighbours?.rowEnd;\r\n break;\r\n case 'PageUp':\r\n target = graph.first;\r\n break;\r\n case 'PageDown':\r\n target = graph.last;\r\n break;\r\n case 'Enter':\r\n case ' ':\r\n event.preventDefault();\r\n this.onSeatActivate(seatId);\r\n return;\r\n case 'Escape':\r\n if (this.selection().length > 0) {\r\n event.preventDefault();\r\n this.selection.set([]);\r\n this.announceSelection([]);\r\n }\r\n return;\r\n default:\r\n return;\r\n }\r\n\r\n if (target) {\r\n event.preventDefault();\r\n this.moveFocusTo(section.id, target);\r\n }\r\n }\r\n\r\n private setFocusedSeat(sectionId: string, seatId: string): void {\r\n if (this.focusedSeatIds()[sectionId] === seatId) {\r\n return;\r\n }\r\n this.focusedSeatIds.update((all) => ({ ...all, [sectionId]: seatId }));\r\n }\r\n\r\n /**\r\n * Moves the roving tab stop, then the DOM focus that follows it.\r\n *\r\n * When zoomable, the browser's own scroll-into-view is suppressed: the map\r\n * moves by transform, so `onSeatFocused` pans it into view instead.\r\n */\r\n private moveFocusTo(sectionId: string, seatId: string): void {\r\n this.setFocusedSeat(sectionId, seatId);\r\n const node = this.seatNode(seatId);\r\n if (this.zoomable()) {\r\n node?.focus?.({ preventScroll: true });\r\n } else {\r\n node?.focus?.();\r\n }\r\n }\r\n\r\n /**\r\n * Seat ids come from the document, so they cannot be interpolated into a\r\n * selector unescaped — and `CSS.escape` is absent in jsdom and under SSR.\r\n * Scanning the rendered nodes avoids both problems.\r\n */\r\n private seatNode(seatId: string): SVGGElement | null {\r\n const nodes = (this.host.nativeElement as HTMLElement).querySelectorAll<SVGGElement>(\r\n '[data-seat-id]',\r\n );\r\n for (const node of Array.from(nodes)) {\r\n if (node.dataset['seatId'] === seatId) {\r\n return node;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n // --- zoom and pan ---------------------------------------------------------\r\n\r\n /** Zooms in one step about the centre. No-op unless `zoomable`. */\r\n zoomIn(): void {\r\n this.stepZoom(1);\r\n }\r\n\r\n /** Zooms out one step about the centre. No-op unless `zoomable`. */\r\n zoomOut(): void {\r\n this.stepZoom(-1);\r\n }\r\n\r\n /** Back to fit-to-container: the map's original view. No-op unless `zoomable`. */\r\n resetZoom(): void {\r\n const measured = this.measure();\r\n if (measured && this.zoomable()) {\r\n this.commit(fitViewport(measured.content, measured.container, this.limits()), true);\r\n }\r\n }\r\n\r\n private stepZoom(direction: 1 | -1): void {\r\n const measured = this.measure();\r\n if (measured && this.zoomable()) {\r\n const next = stepViewport(\r\n this.viewportState(),\r\n direction,\r\n measured.content,\r\n measured.container,\r\n this.limits(),\r\n );\r\n this.commit(next, true);\r\n }\r\n }\r\n\r\n /** Sizes in CSS pixels, read when needed: `offset*` ignores the zoom transform. */\r\n private measure(): { content: ViewportSize; container: ViewportSize } | null {\r\n const view = this.viewportEl()?.nativeElement;\r\n const content = this.contentEl()?.nativeElement;\r\n if (!view || !content) {\r\n return null;\r\n }\r\n return {\r\n container: { width: view.clientWidth, height: view.clientHeight },\r\n content: { width: content.offsetWidth, height: content.offsetHeight },\r\n };\r\n }\r\n\r\n private commit(next: KerusiViewport, animate: boolean): void {\r\n if (viewportsEqual(next, this.viewportState())) {\r\n return;\r\n }\r\n this.animated.set(animate);\r\n this.viewportState.set(next);\r\n this.viewportChange.emit(next);\r\n }\r\n\r\n private reclamp(): void {\r\n const measured = this.measure();\r\n if (measured && this.zoomable()) {\r\n const next = clampViewport(\r\n this.viewportState(),\r\n measured.content,\r\n measured.container,\r\n this.limits(),\r\n );\r\n this.commit(next, false);\r\n }\r\n }\r\n\r\n /** A point in the viewport's own coordinates, which is what the core functions take. */\r\n private containerPoint(event: { clientX: number; clientY: number }): ViewportPoint {\r\n const box = this.viewportEl()!.nativeElement.getBoundingClientRect();\r\n return { x: event.clientX - box.left, y: event.clientY - box.top };\r\n }\r\n\r\n /**\r\n * Pans a seat that took keyboard focus into view. A click or tap also\r\n * focuses the seat, but should not move the map under the finger, so only a\r\n * `:focus-visible` focus counts.\r\n */\r\n private revealSeat(seatId: string): void {\r\n const view = this.viewportEl()?.nativeElement;\r\n const node = this.seatNode(seatId);\r\n const measured = this.measure();\r\n if (!view || !node || !measured || !focusIsVisible(node)) {\r\n return;\r\n }\r\n const seat = node.getBoundingClientRect();\r\n const frame = view.getBoundingClientRect();\r\n const next = revealRect(\r\n this.viewportState(),\r\n {\r\n x: seat.left - frame.left,\r\n y: seat.top - frame.top,\r\n width: seat.width,\r\n height: seat.height,\r\n },\r\n measured.content,\r\n measured.container,\r\n undefined,\r\n this.limits(),\r\n );\r\n this.commit(next, true);\r\n }\r\n\r\n // --- pointer gestures -----------------------------------------------------\r\n\r\n private onPointerDown(event: PointerEvent): void {\r\n if (event.pointerType === 'mouse' && event.button !== 0) {\r\n return;\r\n }\r\n this.suppressClick = false;\r\n this.feedGesture({ type: 'down', id: event.pointerId, point: this.containerPoint(event) });\r\n }\r\n\r\n private onPointerMove(event: PointerEvent): void {\r\n if (this.gesture.ids.length > 0) {\r\n this.feedGesture({ type: 'move', id: event.pointerId, point: this.containerPoint(event) });\r\n }\r\n }\r\n\r\n private onPointerEnd(event: PointerEvent, type: 'up' | 'cancel'): void {\r\n this.feedGesture({ type, id: event.pointerId });\r\n }\r\n\r\n private feedGesture(event: GestureEvent): void {\r\n const measured = this.measure();\r\n if (!measured) {\r\n return;\r\n }\r\n const result = reduceGesture(this.gesture, event, {\r\n viewport: this.viewportState(),\r\n content: measured.content,\r\n container: measured.container,\r\n limits: this.limits(),\r\n });\r\n this.gesture = result.state;\r\n\r\n // Capture only once a tap has become a gesture: capturing on `down` would\r\n // retarget the tap's click away from the seat.\r\n if (result.capture) {\r\n const view = this.viewportEl()?.nativeElement;\r\n for (const id of result.state.ids) {\r\n try {\r\n view?.setPointerCapture(id);\r\n } catch {\r\n // The pointer already ended; nothing to capture.\r\n }\r\n }\r\n }\r\n if (result.viewport !== this.viewportState()) {\r\n this.commit(result.viewport, false);\r\n }\r\n if (result.suppressClick) {\r\n // The click a drag ends with arrives right after `pointerup`, before this timer.\r\n this.suppressClick = true;\r\n setTimeout(() => (this.suppressClick = false));\r\n }\r\n }\r\n\r\n private onClickCapture(event: Event): void {\r\n if (this.suppressClick) {\r\n this.suppressClick = false;\r\n event.stopPropagation();\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n private onWheel(event: WheelEvent): void {\r\n const factor = wheelZoomFactor(event);\r\n const measured = this.measure();\r\n if (factor === null || !measured) {\r\n return; // A plain wheel is the page's to scroll.\r\n }\r\n event.preventDefault();\r\n const next = zoomViewportBy(\r\n this.viewportState(),\r\n factor,\r\n this.containerPoint(event),\r\n measured.content,\r\n measured.container,\r\n this.limits(),\r\n );\r\n this.commit(next, false);\r\n }\r\n\r\n private onGestureStart(event: Event): void {\r\n event.preventDefault();\r\n this.gestureBase = this.viewportState();\r\n }\r\n\r\n private onGestureChange(event: SafariGestureEvent): void {\r\n event.preventDefault();\r\n const measured = this.measure();\r\n if (!this.gestureBase || !measured) {\r\n return;\r\n }\r\n const next = zoomViewportTo(\r\n this.gestureBase,\r\n this.gestureBase.zoom * event.scale,\r\n this.containerPoint(event),\r\n measured.content,\r\n measured.container,\r\n this.limits(),\r\n );\r\n this.commit(next, false);\r\n }\r\n\r\n private onGestureEnd(event: Event): void {\r\n event.preventDefault();\r\n this.gestureBase = null;\r\n }\r\n\r\n // --- keyboard on the map as a whole ----------------------------------------\r\n\r\n /**\r\n * `+` `-` `0` zoom, and arrows pan when the viewport itself has focus; Esc\r\n * leaves a maximized map. A seat's own handler runs first, so an Esc that\r\n * cleared the selection is already `defaultPrevented` and stays at that.\r\n */\r\n protected onRootKeydown(event: KeyboardEvent): void {\r\n if (event.defaultPrevented || isTextEntryTarget(event.target as HTMLElement | null)) {\r\n return;\r\n }\r\n if (this.zoomable()) {\r\n const measured = this.measure();\r\n const next =\r\n measured &&\r\n keyboardViewport(\r\n this.viewportState(),\r\n {\r\n key: event.key,\r\n ctrlKey: event.ctrlKey,\r\n metaKey: event.metaKey,\r\n altKey: event.altKey,\r\n viewportFocused: event.target === this.viewportEl()?.nativeElement,\r\n },\r\n measured.content,\r\n measured.container,\r\n this.limits(),\r\n );\r\n if (next) {\r\n event.preventDefault();\r\n this.commit(next, true);\r\n return;\r\n }\r\n }\r\n if (event.key === 'Escape' && this.maximizedState()) {\r\n event.preventDefault();\r\n this.setMaximized(false);\r\n }\r\n }\r\n\r\n // --- maximize -------------------------------------------------------------\r\n\r\n /** Maximizes or restores the map. Maximizing needs `maximizable`. */\r\n toggleMaximized(): void {\r\n this.setMaximized(!this.maximizedState());\r\n }\r\n\r\n setMaximized(next: boolean): void {\r\n if (next === this.maximizedState() || (next && !this.maximizable())) {\r\n return;\r\n }\r\n this.maximizedState.set(next);\r\n this.maximizedChange.emit(next);\r\n\r\n // Native full screen is an enhancement over the fixed-position layout, which\r\n // is all iPhone Safari offers. It is requested here, inside the click that\r\n // got us here, because browsers only grant it to a user gesture.\r\n const host = this.host.nativeElement as HTMLElement;\r\n const doc = host.ownerDocument;\r\n if (next && !doc.fullscreenElement) {\r\n host.requestFullscreen?.()?.catch(() => undefined);\r\n } else if (!next && doc.fullscreenElement === host) {\r\n doc.exitFullscreen?.()?.catch(() => undefined);\r\n }\r\n }\r\n\r\n private announceSelection(selection: readonly string[]): void {\r\n const strings = this.ariaStrings();\r\n if (selection.length === 0) {\r\n this.announce(strings.selectionEmpty);\r\n return;\r\n }\r\n const { total } = summarizeSelection(this.renderMap(), selection);\r\n this.announce(\r\n strings.selectionSummary(selection.length, formatTotal(total, this.resolvedLocale())),\r\n );\r\n }\r\n\r\n private announce(message: string): void {\r\n // Re-announce an identical message by clearing first; a live region that\r\n // sees no text change stays silent.\r\n this.announcement.set('');\r\n queueMicrotask(() => this.announcement.set(message));\r\n }\r\n\r\n private visibleSectionIds(): readonly string[] | undefined {\r\n const explicit = this.sectionIds();\r\n const overrides = this.sectionOverrides();\r\n const hidden = Object.entries(overrides)\r\n .filter(([, o]) => o.hidden)\r\n .map(([id]) => id);\r\n\r\n if (explicit) {\r\n return explicit.filter((id) => !hidden.includes(id));\r\n }\r\n if (hidden.length === 0) {\r\n return undefined;\r\n }\r\n return (this.map().sections ?? []).map((s) => s.id).filter((id) => !hidden.includes(id));\r\n }\r\n}\r\n\r\nfunction formatTotal(total: Money | undefined, locale: string): string {\r\n return total ? formatMoney(total, locale) : '';\r\n}\r\n\r\n/** Safari's trackpad pinch. Not in lib.dom; `scale` is relative to the gesture's start. */\r\ninterface SafariGestureEvent extends UIEvent {\r\n scale: number;\r\n clientX: number;\r\n clientY: number;\r\n}\r\n\r\n/** `:focus-visible` where the engine knows it; otherwise assume the focus is the keyboard's. */\r\nfunction focusIsVisible(node: Element): boolean {\r\n try {\r\n return node.matches(':focus-visible');\r\n } catch {\r\n return true;\r\n }\r\n}\r\n","<div\r\n class=\"kerusi-seatmap\"\r\n [class.kerusi-seatmap--maximized]=\"maximized()\"\r\n role=\"group\"\r\n [attr.aria-label]=\"mapLabel()\"\r\n [attr.dir]=\"isRtl() ? 'rtl' : null\"\r\n [attr.lang]=\"resolvedLocale()\"\r\n [style.background]=\"maximized() ? controlColors().maximizedBackground : null\"\r\n [style.color]=\"maximized() ? controlColors().maximizedColor : null\"\r\n (keydown)=\"onRootKeydown($event)\"\r\n>\r\n @if (zoomable() || maximizable()) {\r\n <!-- Only when a zoom or maximize feature is on, so a plain map's markup is\r\n exactly what it was before they existed. -->\r\n <div class=\"kerusi-seatmap__stage\">\r\n @if (showToolbar()) {\r\n <div\r\n class=\"kerusi-toolbar\"\r\n role=\"toolbar\"\r\n [attr.aria-label]=\"strings().toolbar\"\r\n [style.--kerusi-focus-ring-input]=\"resolvedColors().focusRing\"\r\n >\r\n @if (zoomable() && showZoomControls()) {\r\n <button\r\n type=\"button\"\r\n class=\"kerusi-control kerusi-control--zoom-in\"\r\n [attr.aria-label]=\"strings().zoomIn\"\r\n [attr.aria-disabled]=\"atMaxZoom()\"\r\n [style.background]=\"controlColors().buttonBackground\"\r\n [style.color]=\"controlColors().buttonColor\"\r\n [style.border-color]=\"controlColors().buttonBorder\"\r\n (click)=\"zoomIn()\"\r\n >\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\r\n <path d=\"M12 5v14M5 12h14\" />\r\n </svg>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"kerusi-control kerusi-control--zoom-out\"\r\n [attr.aria-label]=\"strings().zoomOut\"\r\n [attr.aria-disabled]=\"atFit()\"\r\n [style.background]=\"controlColors().buttonBackground\"\r\n [style.color]=\"controlColors().buttonColor\"\r\n [style.border-color]=\"controlColors().buttonBorder\"\r\n (click)=\"zoomOut()\"\r\n >\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\r\n <path d=\"M5 12h14\" />\r\n </svg>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"kerusi-control kerusi-control--zoom-reset\"\r\n [attr.aria-label]=\"strings().zoomReset\"\r\n [attr.aria-disabled]=\"atFit()\"\r\n [style.background]=\"controlColors().buttonBackground\"\r\n [style.color]=\"controlColors().buttonColor\"\r\n [style.border-color]=\"controlColors().buttonBorder\"\r\n (click)=\"resetZoom()\"\r\n >\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\r\n <path d=\"M3 12a9 9 0 1 0 3-6.7M3 4v5h5\" />\r\n </svg>\r\n </button>\r\n }\r\n @if (maximizable()) {\r\n <button\r\n type=\"button\"\r\n class=\"kerusi-control kerusi-control--maximize\"\r\n [attr.aria-label]=\"maximized() ? strings().restore : strings().maximize\"\r\n [style.background]=\"controlColors().buttonBackground\"\r\n [style.color]=\"controlColors().buttonColor\"\r\n [style.border-color]=\"controlColors().buttonBorder\"\r\n (click)=\"toggleMaximized()\"\r\n >\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\r\n @if (maximized()) {\r\n <path d=\"M9 4v5H4M15 4v5h5M15 20v-5h5M9 20v-5H4\" />\r\n } @else {\r\n <path d=\"M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5\" />\r\n }\r\n </svg>\r\n </button>\r\n }\r\n </div>\r\n }\r\n\r\n @if (zoomable()) {\r\n <div\r\n #viewport\r\n class=\"kerusi-viewport\"\r\n role=\"group\"\r\n tabindex=\"0\"\r\n [attr.aria-label]=\"strings().viewport\"\r\n [style.touch-action]=\"touchAction()\"\r\n [style.--kerusi-focus-ring-input]=\"resolvedColors().focusRing\"\r\n >\r\n <div\r\n #content\r\n class=\"kerusi-viewport__content\"\r\n [class.kerusi-viewport__content--animated]=\"animated()\"\r\n [style.transform]=\"transform()\"\r\n >\r\n <ng-container [ngTemplateOutlet]=\"sections\" />\r\n </div>\r\n </div>\r\n } @else {\r\n <ng-container [ngTemplateOutlet]=\"sections\" />\r\n }\r\n </div>\r\n } @else {\r\n <ng-container [ngTemplateOutlet]=\"sections\" />\r\n }\r\n\r\n @if (showLegend()) {\r\n <kerusi-legend\r\n [legend]=\"renderMap().legend\"\r\n [locale]=\"resolvedLocale()\"\r\n [colors]=\"resolvedColors()\"\r\n [typeColors]=\"typeColors()\"\r\n [seatTypeStyles]=\"seatTypeStyles()\"\r\n [showPrices]=\"showLegendPrices()\"\r\n />\r\n }\r\n\r\n <p class=\"kerusi-sr-only\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveMessage() }}</p>\r\n</div>\r\n\r\n<ng-template #sections>\r\n @for (section of renderMap().sections; track section.id) {\r\n <section\r\n class=\"kerusi-seatmap__section kerusi-seatmap__section--{{ section.layoutMode }}\"\r\n role=\"group\"\r\n [attr.aria-labelledby]=\"labelFor(section) ? labelId(section) : null\"\r\n [attr.aria-label]=\"labelFor(section) ? null : section.id\"\r\n >\r\n @if (showSectionLabels() && labelFor(section)) {\r\n <h3 class=\"kerusi-section-label\" [id]=\"labelId(section)\">{{ labelFor(section) }}</h3>\r\n }\r\n\r\n <kerusi-section\r\n [section]=\"section\"\r\n [layout]=\"layoutFor(section)\"\r\n [selection]=\"selectionSet()\"\r\n [focusedSeatId]=\"focusedSeatIn(section)\"\r\n [ariaLabels]=\"ariaLabels()\"\r\n [colors]=\"resolvedColors()\"\r\n [typeColors]=\"typeColors()\"\r\n [seatTemplate]=\"seatTemplate()?.template\"\r\n [seatStyle]=\"seatStyle()\"\r\n [seatTypeStyles]=\"seatTypeStyles()\"\r\n [unitScale]=\"unitScale()\"\r\n [interactive]=\"interactive()\"\r\n (seatActivate)=\"onSeatActivate($event)\"\r\n (seatFocused)=\"onSeatFocused($event)\"\r\n (seatKeydown)=\"onKeydown(section, $event)\"\r\n />\r\n </section>\r\n }\r\n</ng-template>\r\n","/**\r\n * The Kerusi-native seat map: `<kerusi-seatmap>`, its section renderer, and an\r\n * optional legend.\r\n *\r\n * The selection, theming and announcement helpers they are built from are\r\n * framework-free and live in `@kerusiweb/core`.\r\n */\r\n\r\nexport * from './kerusi-seatmap.component';\r\nexport * from './kerusi-section.component';\r\nexport * from './kerusi-legend.component';\r\nexport * from './kerusi-seat-template.directive';\r\n","import { computed, signal, Signal } from '@angular/core';\r\nimport {\r\n applyStateDeltaOrdered,\r\n DEFAULT_SEQUENCE_READER,\r\n DeltaApplication,\r\n expireHolds,\r\n HeldSeat,\r\n heldSeats as heldSeatsOf,\r\n KerusiState,\r\n KerusiStateDelta,\r\n SequenceReader,\r\n} from '@kerusiweb/core';\r\n\r\n/**\r\n * A signal-backed live view of a {@link KerusiState}.\r\n *\r\n * Construct it directly — `new KerusiStateStore(initialState)` — and feed it\r\n * deltas from whatever transport you use. It is deliberately not an\r\n * `@Injectable`: this is a rendering library, and an application that already\r\n * owns its availability state should keep owning it.\r\n */\r\nexport class KerusiStateStore {\r\n private readonly _state;\r\n private readonly _needsRefetch = signal(false);\r\n private readonly _now;\r\n private readonly clock: () => Date;\r\n private readonly sequenceOf: SequenceReader;\r\n private lastSequence: number | undefined;\r\n\r\n constructor(initial: KerusiState, opts: { now?: () => Date; sequenceOf?: SequenceReader } = {}) {\r\n this._state = signal(initial);\r\n this.clock = opts.now ?? (() => new Date());\r\n this.sequenceOf = opts.sequenceOf ?? DEFAULT_SEQUENCE_READER;\r\n this._now = signal(this.clock());\r\n }\r\n\r\n /** The current availability snapshot. */\r\n get state(): Signal<KerusiState> {\r\n return this._state.asReadonly();\r\n }\r\n\r\n /** The timestamp of the most recently applied document. */\r\n readonly updatedAt = computed(() => this._state().updatedAt);\r\n\r\n /**\r\n * True once a gap was detected in the delta stream. The consumer SHOULD\r\n * re-fetch a full `KerusiState` and hand it to {@link reset} (§5.2).\r\n */\r\n get needsRefetch(): Signal<boolean> {\r\n return this._needsRefetch.asReadonly();\r\n }\r\n\r\n /** Every currently-held seat, with the time left on its hold. */\r\n readonly heldSeats = computed<readonly HeldSeat[]>(() => heldSeatsOf(this._state(), this._now()));\r\n\r\n /** Offers a delta to the store. Returns what happened to it. */\r\n apply(delta: KerusiStateDelta): DeltaApplication {\r\n const result = applyStateDeltaOrdered(this._state(), delta, {\r\n sequenceOf: this.sequenceOf,\r\n lastSequence: this.lastSequence,\r\n });\r\n\r\n if (result.outcome === 'applied' || result.outcome === 'gap') {\r\n this._state.set(result.state);\r\n const seq = this.sequenceOf(delta);\r\n if (seq !== undefined) {\r\n this.lastSequence = seq;\r\n }\r\n }\r\n if (result.outcome === 'gap') {\r\n this._needsRefetch.set(true);\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /**\r\n * Replaces the state wholesale — the post-refetch path. Clears the\r\n * refetch flag and forgets the delta sequence.\r\n */\r\n reset(state: KerusiState): void {\r\n this._state.set(state);\r\n this._needsRefetch.set(false);\r\n this.lastSequence = undefined;\r\n this._now.set(this.clock());\r\n }\r\n\r\n /** Reverts lapsed holds and refreshes `heldSeats` countdowns. */\r\n tick(): void {\r\n const now = this.clock();\r\n this._now.set(now);\r\n const next = expireHolds(this._state(), now);\r\n if (next !== this._state()) {\r\n this._state.set(next);\r\n }\r\n }\r\n\r\n /**\r\n * Runs {@link tick} on an interval. Returns a function that stops it — call\r\n * that from `DestroyRef.onDestroy` or `ngOnDestroy`.\r\n */\r\n startExpiryTicker(intervalMs = 1000): () => void {\r\n const handle = setInterval(() => this.tick(), intervalMs);\r\n return () => clearInterval(handle);\r\n }\r\n}\r\n","/*\r\n * Public API Surface of @kerusiweb/angular\r\n *\r\n * The Angular binding only. Document types, the render model and the view\r\n * helpers live in @kerusiweb/core — import them from there.\r\n */\r\n\r\n// --- Components -------------------------------------------------------------\r\nexport * from './lib/kerusi-seatmap';\r\n\r\n// --- Signal-backed live availability store ---------------------------------\r\nexport * from './lib/kerusi-state-store';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["heldSeatsOf"],"mappings":";;;;;AA4BA;;;;;;;;;;AAUG;MAQU,sBAAsB,CAAA;IACxB,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAAiB;IACzC,MAAM,GAAG,KAAK,CAAC,QAAQ;+EAAiB;;AAGxC,IAAA,SAAS,GAAG,KAAK,CAAsB,IAAI,GAAG,EAAE;kFAAC;;IAEjD,aAAa,GAAG,KAAK,CAAgB,IAAI;sFAAC;;AAE1C,IAAA,UAAU,GAAG,KAAK,CAA8B,IAAI,GAAG,EAAE;mFAAC;IAE1D,MAAM,GAAG,KAAK,CAAgC,qBAAqB;+EAAC;;IAEpE,UAAU,GAAG,KAAK,CAAU,IAAI;mFAAC;;IAEjC,cAAc,GAAG,KAAK,CAA6B,SAAS;uFAAC;;IAE7D,SAAS,GAAG,KAAK,CAA0B,SAAS;kFAAC;;IAErD,YAAY,GAAG,KAAK,CAAqD,SAAS;qFAAC;;IAEnF,WAAW,GAAG,KAAK,CAAU,IAAI;oFAAC;AAC3C;;;;;;;;AAQG;IACM,SAAS,GAAG,KAAK,CAAS,CAAC;kFAAC;IAE5B,YAAY,GAAG,MAAM,EAAU;IAC/B,WAAW,GAAG,MAAM,EAAU;IAC9B,WAAW,GAAG,MAAM,EAAiB;IAE3B,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAA,IAAA,EAAO,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM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AC9B;AAEA,QAAA,OAAO,MAAM;IACf;AAEA;;;AAGG;AACH,IAAA,KAAK,CAAC,KAAkB,EAAA;AACtB,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;AACtB,QAAA,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC;AAC7B,QAAA,IAAI,CAAC,YAAY,GAAG,SAAS;QAC7B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IAC7B;;IAGA,IAAI,GAAA;AACF,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,EAAE;AACxB,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;QAClB,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC;AAC5C,QAAA,IAAI,IAAI,KAAK,IAAI,CAAC,MAAM,EAAE,EAAE;AAC1B,YAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;QACvB;IACF;AAEA;;;AAGG;IACH,iBAAiB,CAAC,UAAU,GAAG,IAAI,EAAA;AACjC,QAAA,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,UAAU,CAAC;AACzD,QAAA,OAAO,MAAM,aAAa,CAAC,MAAM,CAAC;IACpC;AACD;;ACzGD;;;;;AAKG;AAEH;;ACPA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"kerusiweb-angular.mjs","sources":["../../../projects/angular/src/lib/kerusi-seatmap/kerusi-section.component.ts","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-section.component.html","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-legend.component.ts","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-legend.component.html","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-seat-template.directive.ts","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-seatmap.component.ts","../../../projects/angular/src/lib/kerusi-seatmap/kerusi-seatmap.component.html","../../../projects/angular/src/lib/kerusi-seatmap/index.ts","../../../projects/angular/src/lib/kerusi-state-store.ts","../../../projects/angular/src/public-api.ts","../../../projects/angular/src/kerusiweb-angular.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n input,\n output,\n TemplateRef,\n} from '@angular/core';\nimport {\n DEFAULT_KERUSI_COLORS,\n elementFill,\n elementStyle,\n elementTextFill,\n KerusiSeatmapColors,\n PlacedElement,\n PlacedSeat,\n PlacedSection,\n resolveSeatGlyph,\n resolveSeatStyle,\n screenPath,\n SeatStyleFn,\n SeatTypeStyles,\n} from '@kerusiweb/core';\nimport { SeatTemplateOutletContext } from './kerusi-seat-template.directive';\n\n/**\n * Draws one Kerusi `Section` as a `<g>` on the map's shared canvas (D1).\n *\n * Sections are zones on one canvas in rev 15 (§4.1), and two may sit side by\n * side, so a section is a group inside the map's single `<svg>` rather than an\n * SVG of its own. Use it on a `<g>` inside an `<svg>` whose `viewBox` is the\n * canvas: `<g kerusi-section [layout]=\"placed\"></g>`. Its template prefixes\n * every element with `svg:`, because Angular cannot tell from a component's\n * own template that it will be stamped into SVG.\n *\n * This component holds no state. It takes a placed layout and emits intent.\n */\n@Component({\n selector: 'g[kerusi-section]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet],\n templateUrl: './kerusi-section.component.html',\n styleUrl: './kerusi-section.component.css',\n host: {\n class: 'kerusi-section',\n role: 'group',\n '[attr.aria-label]': 'label() ?? layout().section.id',\n '[attr.data-section-id]': 'layout().section.id',\n },\n})\nexport class KerusiSectionComponent {\n /** The section with its seats and elements placed on the map's canvas. */\n readonly layout = input.required<PlacedSection>();\n /** The section's name: its accessible name, and its drawn label when one is shown. */\n readonly label = input<string | undefined>(undefined);\n /**\n * Draw `label` inside the SVG, at the top-left of the section's bounds. Only\n * a section that declares `bounds` gets one (D5); otherwise the label is the\n * group's accessible name alone.\n */\n readonly showLabel = input<boolean>(true);\n\n /** Currently selected seat ids. */\n readonly selection = input<ReadonlySet<string>>(new Set());\n /** The seat holding the section's single tab stop, if any. */\n readonly focusedSeatId = input<string | null>(null);\n /** Per-seat accessible names, keyed by seat id. */\n readonly ariaLabels = input<ReadonlyMap<string, string>>(new Map());\n\n readonly colors = input<Required<KerusiSeatmapColors>>(DEFAULT_KERUSI_COLORS);\n /** Whether an available seat may take its `SeatType.color` (§4.7). */\n readonly typeColors = input<boolean>(true);\n /** Styles for every seat of a type, keyed by `SeatType.id`. */\n readonly seatTypeStyles = input<SeatTypeStyles | undefined>(undefined);\n /** A style for one seat, laid over its type's. */\n readonly seatStyle = input<SeatStyleFn | undefined>(undefined);\n /** Draws the inside of each seat in place of the stock glyph. */\n readonly seatTemplate = input<TemplateRef<SeatTemplateOutletContext> | undefined>(undefined);\n /** When false, seats render but do not respond to pointer or keyboard. */\n readonly interactive = input<boolean>(true);\n\n readonly seatActivate = output<string>();\n readonly seatFocused = output<string>();\n readonly seatKeydown = output<KeyboardEvent>();\n\n /** Whether the label is drawn: asked for, present, and with declared bounds to sit in. */\n protected readonly drawsLabel = computed(\n () => this.showLabel() && !!this.label() && this.layout().section.boundsDeclared,\n );\n\n protected readonly labelFill = computed(() =>\n elementTextFill(elementStyle('label').tone, this.colors()),\n );\n\n /**\n * Every seat with its glyph resolved, once per change of layout, selection or\n * theme rather than once per binding per change detection.\n */\n protected readonly seats = computed(() => {\n const selection = this.selection();\n const colors = this.colors();\n const typeColors = this.typeColors();\n const typeStyles = this.seatTypeStyles();\n const seatStyle = this.seatStyle();\n return this.layout().seats.map((placed) => {\n const selected = selection.has(placed.seat.id);\n const style = resolveSeatStyle(placed.seat, selected, typeStyles, seatStyle);\n return {\n placed,\n selected,\n glyph: resolveSeatGlyph(placed, selected, colors, typeColors, style),\n };\n });\n });\n\n /** The section's single tab stop; every other seat is reachable by arrow key. */\n protected tabIndex(placed: PlacedSeat): number {\n if (!this.interactive()) {\n return -1;\n }\n return placed.seat.id === this.focusedSeatId() ? 0 : -1;\n }\n\n protected ariaLabel(placed: PlacedSeat): string {\n return this.ariaLabels().get(placed.seat.id) ?? placed.seat.label;\n }\n\n /** SVG rotate() about the item's center; null when it does not rotate. */\n protected transform(item: PlacedSeat | PlacedElement): string | null {\n return item.rotation ? `rotate(${item.rotation} ${item.centerX} ${item.centerY})` : null;\n }\n\n /** Cancels the parent <g>'s rotation so the label stays upright and stays put. */\n protected counterRotate(item: PlacedSeat | PlacedElement): string | null {\n return item.rotation ? `rotate(${-item.rotation} ${item.centerX} ${item.centerY})` : null;\n }\n\n // --- elements -------------------------------------------------------------\n\n protected style(placed: PlacedElement) {\n return elementStyle(placed.element.kind);\n }\n\n /** A text element with no label draws nothing, rather than an empty box. */\n protected drawsElement(placed: PlacedElement): boolean {\n const style = this.style(placed);\n return style.shape !== 'text' || (!!placed.element.label && style.showLabel);\n }\n\n /** A label on a shape stays upright; a text element's own label is what rotates. */\n protected labelTransform(placed: PlacedElement): string | null {\n return this.style(placed).shape === 'text' ? null : this.counterRotate(placed);\n }\n\n protected elementFillOf(placed: PlacedElement): string {\n return elementFill(this.style(placed).tone, this.colors());\n }\n\n protected elementTextFillOf(placed: PlacedElement): string {\n return elementTextFill(this.style(placed).tone, this.colors());\n }\n\n protected screenPathOf(placed: PlacedElement): string {\n return screenPath(placed.x, placed.y, placed.width, placed.height);\n }\n\n /** The corner radius for a rectangular element; a stage reads as squarer. */\n protected radiusOf(placed: PlacedElement): number {\n return this.style(placed).shape === 'stage' ? 2 : Math.min(placed.height * 0.25, 6);\n }\n\n // --- interaction ----------------------------------------------------------\n\n protected onSeatClick(placed: PlacedSeat): void {\n if (this.interactive()) {\n this.seatActivate.emit(placed.seat.id);\n }\n }\n\n protected onSeatFocus(placed: PlacedSeat): void {\n if (this.interactive()) {\n this.seatFocused.emit(placed.seat.id);\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n if (this.interactive()) {\n this.seatKeydown.emit(event);\n }\n }\n}\n","<!-- Hidden from assistive technology: the group already carries the same text\n as its accessible name. -->\n@if (drawsLabel()) {\n <svg:text\n class=\"kerusi-section-label\"\n aria-hidden=\"true\"\n text-anchor=\"start\"\n dominant-baseline=\"hanging\"\n [attr.x]=\"layout().labelAnchor.x\"\n [attr.y]=\"layout().labelAnchor.y\"\n [attr.font-size]=\"layout().labelAnchor.fontSize\"\n [style.fill]=\"labelFill()\"\n >\n {{ label() }}\n </svg:text>\n}\n\n<!-- Elements first, so a screen or stage sits behind the seats it faces. -->\n@for (placed of layout().elements; track placed.element.id) {\n @if (drawsElement(placed)) {\n <svg:g\n class=\"kerusi-element kerusi-element--{{ placed.element.kind }}\"\n [attr.transform]=\"transform(placed)\"\n >\n @switch (style(placed).shape) {\n @case ('screen') {\n <svg:path [attr.d]=\"screenPathOf(placed)\" [style.fill]=\"elementFillOf(placed)\" />\n }\n @case ('text') {}\n @case ('void') {\n <svg:rect\n class=\"kerusi-element__void\"\n [attr.x]=\"placed.x\"\n [attr.y]=\"placed.y\"\n [attr.width]=\"placed.width\"\n [attr.height]=\"placed.height\"\n [style.stroke]=\"elementTextFillOf(placed)\"\n fill=\"none\"\n />\n }\n @default {\n <svg:rect\n [attr.x]=\"placed.x\"\n [attr.y]=\"placed.y\"\n [attr.width]=\"placed.width\"\n [attr.height]=\"placed.height\"\n [attr.rx]=\"radiusOf(placed)\"\n [style.fill]=\"elementFillOf(placed)\"\n />\n }\n }\n @if (placed.element.label && style(placed).showLabel) {\n <svg:text\n class=\"kerusi-element__label\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n [attr.x]=\"placed.centerX\"\n [attr.y]=\"placed.centerY\"\n [attr.font-size]=\"placed.fontSize\"\n [style.fill]=\"elementTextFillOf(placed)\"\n [attr.transform]=\"labelTransform(placed)\"\n >\n {{ placed.element.label }}\n </svg:text>\n }\n </svg:g>\n }\n}\n\n<!-- The stock seat drawing. A template rather than inline markup so that a\n custom seat template can render it too, as `defaultContent`. Its `svg:`\n prefixes create its elements in the SVG namespace wherever it is stamped. -->\n<ng-template #stockSeat let-seat>\n @let glyph = seat.glyph;\n <!-- Tapered toward the back, square at the front, so which way the seat\n faces is legible from the outline alone. -->\n <svg:path class=\"kerusi-seat__box\" [attr.d]=\"glyph.body.d\" [style.fill]=\"glyph.body.fill\" />\n @if (glyph.wash; as wash) {\n <!-- Colour stays the seat type's; a taken seat recedes under a wash\n instead, so the type colour still reads on a busy map. -->\n <svg:path class=\"kerusi-seat__wash\" [attr.d]=\"wash.d\" [style.fill]=\"wash.fill\" />\n }\n @if (glyph.core; as core) {\n <!-- Selection is the one state drawn from two tones: the body above is\n the frame, this is the bright core inside it. Whichever way the\n host page is themed, one of the two separates from it — which is\n why nothing here has to know about the page. -->\n <svg:path class=\"kerusi-seat__core\" [attr.d]=\"core.d\" [style.fill]=\"core.fill\" />\n }\n @if (glyph.occupant; as occupant) {\n <!-- Deliberately not counter-rotated: the occupant leans with the\n seat. Solid = settled (yours, or sold); hollow = a hold still in\n progress. -->\n <svg:path\n class=\"kerusi-seat__occupant kerusi-seat__occupant--{{ occupant.variant }}\"\n [attr.d]=\"occupant.d\"\n [attr.stroke-width]=\"occupant.strokeWidth\"\n [style.fill]=\"occupant.fill\"\n [style.stroke]=\"occupant.stroke\"\n />\n }\n <!-- The halo colour and width are bound here rather than in the\n stylesheet: a CSS `var(--kerusi-selected-fg, …)` rule would carry\n the library default as its fallback and skip the [colors] tier. -->\n <svg:text\n class=\"kerusi-seat__label\"\n text-anchor=\"middle\"\n dominant-baseline=\"central\"\n [attr.x]=\"glyph.label.x\"\n [attr.y]=\"glyph.label.y\"\n [attr.font-size]=\"glyph.label.fontSize\"\n [style.fill]=\"glyph.label.fill\"\n [style.stroke]=\"glyph.label.halo\"\n [attr.stroke-width]=\"glyph.label.haloWidth\"\n [attr.transform]=\"glyph.label.transform\"\n >\n {{ glyph.label.text }}\n </svg:text>\n @if (glyph.wheelchair; as wheelchair) {\n <!-- A corner marker, not a different fill: availability owns the fill. -->\n <svg:circle\n class=\"kerusi-seat__wheelchair\"\n [attr.cx]=\"wheelchair.cx\"\n [attr.cy]=\"wheelchair.cy\"\n [attr.r]=\"wheelchair.r\"\n [style.fill]=\"wheelchair.fill\"\n />\n }\n</ng-template>\n\n@for (entry of seats(); track entry.placed.seat.id) {\n @let placed = entry.placed;\n @let glyph = entry.glyph;\n @let ctx =\n {\n placed: placed,\n seat: placed.seat,\n selected: entry.selected,\n glyph: glyph,\n defaultContent: stockSeat,\n };\n <svg:g\n [class]=\"glyph.className\"\n role=\"button\"\n [attr.tabindex]=\"tabIndex(placed)\"\n [attr.aria-label]=\"ariaLabel(placed)\"\n [attr.aria-pressed]=\"entry.selected\"\n [attr.aria-disabled]=\"!placed.seat.selectable\"\n [attr.data-seat-id]=\"placed.seat.id\"\n [attr.data-seat-type]=\"glyph.data.type\"\n [attr.data-seat-status]=\"glyph.data.status\"\n [attr.data-section-id]=\"glyph.data.section\"\n [attr.data-seat-row]=\"glyph.data.row\"\n [attr.data-seat-attributes]=\"glyph.data.attributes\"\n [attr.transform]=\"transform(placed)\"\n (click)=\"onSeatClick(placed)\"\n (focus)=\"onSeatFocus(placed)\"\n (keydown)=\"onKeydown($event)\"\n >\n @if (seatTemplate(); as custom) {\n <ng-container *ngTemplateOutlet=\"custom; context: { $implicit: ctx }\" />\n <!-- Drawn over the custom content, because that content may have no\n .kerusi-seat__box for the stock focus ring to stroke. Only visible\n on :focus-visible. -->\n <svg:path class=\"kerusi-seat__focus\" [attr.d]=\"glyph.body.d\" />\n } @else {\n <ng-container *ngTemplateOutlet=\"stockSeat; context: { $implicit: ctx }\" />\n }\n </svg:g>\n}\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport {\n cssVar,\n DEFAULT_KERUSI_COLORS,\n formatMoney,\n KerusiSeatmapColors,\n legendSwatchFill,\n legendSwatchPath,\n legendSwatchText,\n occupantFillFor,\n occupantStrokeFor,\n RenderLegendEntry,\n seatBodyPath,\n SeatOccupantVariant,\n seatCoreFill,\n SeatTypeStyles,\n seatOccupantPath,\n seatOccupantStroke,\n seatSelectedFrame,\n seatWashFill,\n} from '@kerusiweb/core';\n\n/** Which marks, beyond the body fill, a status swatch draws. */\ntype StatusKind = 'plain' | 'blocked' | SeatOccupantVariant;\n\n/** One availability swatch in the legend's second block. */\ninterface StatusEntry {\n key: string;\n label: string;\n kind: StatusKind;\n /** The swatch body's fill. */\n fill: string;\n}\n\n/**\n * A key for a seat map: its seat types on one side, its availability states on\n * the other.\n *\n * This ships in the library rather than being left to each application because\n * the swatch colors must come from the *same* resolution path as the seat\n * fills — `SeatType.color` when the document supplies one, the theme's\n * available color when it does not. Re-deriving that in application code is how\n * a legend ends up disagreeing with the map it describes.\n *\n * It is opt-in: `<kerusi-seatmap [showLegend]=\"true\">` renders it inline, or\n * use `<kerusi-legend>` directly to place it anywhere.\n */\n@Component({\n selector: 'kerusi-legend',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './kerusi-legend.component.html',\n styleUrl: './kerusi-legend.component.css',\n})\nexport class KerusiLegendComponent {\n /** From `RenderMap.legend`. */\n readonly legend = input.required<readonly RenderLegendEntry[]>();\n readonly locale = input<string>('en');\n readonly colors = input<Required<KerusiSeatmapColors>>(DEFAULT_KERUSI_COLORS);\n /** Whether an available seat takes its type color — mirrors the seatmap input. */\n readonly typeColors = input<boolean>(true);\n /** Mirrors the seatmap input: a type's style is what its swatch shows. */\n readonly seatTypeStyles = input<SeatTypeStyles | undefined>(undefined);\n readonly showPrices = input<boolean>(true);\n /** Hide types no seat in the rendered map actually uses. */\n readonly hideUnusedTypes = input<boolean>(true);\n\n readonly headingSeatTypes = input<string>('Seat types');\n readonly headingAvailability = input<string>('Availability');\n\n protected readonly types = computed(() =>\n this.legend().filter((entry) => !this.hideUnusedTypes() || entry.seatCount > 0),\n );\n\n // Colour means seat type; shape means status (see `seatFill`'s doc comment).\n // Held and booked swatches share the plain \"available\" body colour — the\n // map's colour there is always whatever the seat's own type supplies, which\n // the legend has no single value for — and are told apart by their wash and\n // occupant figure instead, same as on the map.\n protected readonly statuses = computed<StatusEntry[]>(() => {\n const c = this.colors();\n const available = cssVar('availableBg', c.availableBg);\n return [\n { key: 'available', label: 'Available', kind: 'plain', fill: available },\n {\n key: 'selected',\n label: 'Selected',\n kind: 'selected',\n fill: cssVar('selectedBg', c.selectedBg),\n },\n { key: 'held', label: 'On hold', kind: 'held', fill: available },\n { key: 'booked', label: 'Booked', kind: 'booked', fill: available },\n { key: 'blocked', label: 'Blocked', kind: 'blocked', fill: cssVar('blockedBg', c.blockedBg) },\n ];\n });\n\n // Same token and fallback as an available seat of the type, so a rule that\n // sets `--kerusi-seat-fill` on the seats and the legend items keeps them in step.\n protected swatch(entry: RenderLegendEntry): string {\n return legendSwatchFill(\n entry,\n this.colors(),\n this.typeColors(),\n this.seatTypeStyles()?.[entry.id],\n );\n }\n\n /** The swatch outline for a type styled with its own shape; `undefined` keeps the square. */\n protected typeShape(entry: RenderLegendEntry): string | undefined {\n return legendSwatchPath(this.seatTypeStyles()?.[entry.id], this.glyphSize);\n }\n\n protected swatchText(entry: RenderLegendEntry): string {\n return legendSwatchText(\n entry,\n this.colors(),\n this.typeColors(),\n this.seatTypeStyles()?.[entry.id],\n );\n }\n\n // --- status swatches -------------------------------------------------------\n //\n // Availability is now signalled by shape, not colour, so every status swatch\n // (bar \"available\" and \"blocked\") draws the same glyph the map does rather\n // than a flat square. A legend that showed only flat colour would teach a\n // cue the map no longer uses.\n\n /** The swatch's viewBox edge; the seat glyph is drawn to fill it. */\n protected readonly glyphSize = 16;\n\n protected readonly glyphBody = seatBodyPath(0, 0, this.glyphSize, this.glyphSize);\n\n /** The selected swatch's frame width, and the core it leaves inside itself. */\n private readonly glyphFrame = seatSelectedFrame(this.glyphSize, this.glyphSize);\n private readonly glyphCoreSize = this.glyphSize - this.glyphFrame * 2;\n protected readonly glyphCore = seatBodyPath(\n 0,\n 0,\n this.glyphSize,\n this.glyphSize,\n this.glyphFrame,\n );\n\n protected readonly glyphOccupant = seatOccupantPath(0, 0, this.glyphSize, this.glyphSize);\n protected readonly glyphOccupantStroke = seatOccupantStroke(this.glyphSize, this.glyphSize);\n\n /** The selected swatch's figure sits on the core, so it is drawn to the core. */\n private readonly glyphCoreOccupant = seatOccupantPath(\n this.glyphFrame,\n this.glyphFrame,\n this.glyphCoreSize,\n this.glyphCoreSize,\n );\n private readonly glyphCoreOccupantStroke = seatOccupantStroke(\n this.glyphCoreSize,\n this.glyphCoreSize,\n );\n\n protected occupantPathOf(variant: SeatOccupantVariant): string {\n return variant === 'selected' ? this.glyphCoreOccupant : this.glyphOccupant;\n }\n\n protected occupantStrokeWidthOf(variant: SeatOccupantVariant): number {\n return variant === 'selected' ? this.glyphCoreOccupantStroke : this.glyphOccupantStroke;\n }\n\n protected hasWash(kind: StatusKind): kind is 'held' | 'booked' {\n return kind === 'held' || kind === 'booked';\n }\n\n protected hasOccupant(kind: StatusKind): kind is SeatOccupantVariant {\n return kind === 'selected' || kind === 'held' || kind === 'booked';\n }\n\n protected washFillOf(kind: 'held' | 'booked'): string {\n return seatWashFill(kind, this.colors());\n }\n\n protected occupantFillOf(variant: SeatOccupantVariant): string {\n return occupantFillFor(variant, this.colors());\n }\n\n protected occupantStrokeOf(variant: SeatOccupantVariant): string {\n return occupantStrokeFor(variant, this.colors());\n }\n\n protected coreFill(): string {\n return seatCoreFill(this.colors());\n }\n\n protected price(entry: RenderLegendEntry): string {\n return entry.price ? formatMoney(entry.price, this.locale()) : '';\n }\n}\n","<div class=\"kerusi-legend\">\n @if (types().length) {\n <div class=\"kerusi-legend__block\">\n <h4 class=\"kerusi-legend__heading\">{{ headingSeatTypes() }}</h4>\n <ul class=\"kerusi-legend__list\">\n @for (entry of types(); track entry.id) {\n <li class=\"kerusi-legend__item\" [attr.data-seat-type]=\"entry.id\">\n @if (typeShape(entry); as d) {\n <!-- A type styled with its own shape keys that shape, not a square. -->\n <svg\n class=\"kerusi-legend__swatch kerusi-legend__swatch--glyph\"\n aria-hidden=\"true\"\n focusable=\"false\"\n [attr.viewBox]=\"'0 0 ' + glyphSize + ' ' + glyphSize\"\n >\n <path [attr.d]=\"d\" [style.fill]=\"swatch(entry)\" />\n </svg>\n } @else {\n <span\n class=\"kerusi-legend__swatch\"\n aria-hidden=\"true\"\n [style.background]=\"swatch(entry)\"\n [style.color]=\"swatchText(entry)\"\n ></span>\n }\n <span class=\"kerusi-legend__label\">{{ entry.label }}</span>\n @if (showPrices() && price(entry)) {\n <span class=\"kerusi-legend__price\">{{ price(entry) }}</span>\n }\n </li>\n }\n </ul>\n </div>\n }\n\n <div class=\"kerusi-legend__block\">\n <h4 class=\"kerusi-legend__heading\">{{ headingAvailability() }}</h4>\n <ul class=\"kerusi-legend__list\">\n @for (status of statuses(); track status.key) {\n <li class=\"kerusi-legend__item\">\n <!-- Shape carries status now, so every swatch draws the seat glyph\n rather than a flat colour — a flat swatch would teach a cue the\n map itself no longer uses. -->\n <svg\n class=\"kerusi-legend__swatch kerusi-legend__swatch--glyph\"\n aria-hidden=\"true\"\n focusable=\"false\"\n [attr.viewBox]=\"'0 0 ' + glyphSize + ' ' + glyphSize\"\n >\n <path [attr.d]=\"glyphBody\" [style.fill]=\"status.fill\" />\n @if (hasWash(status.kind)) {\n <path [attr.d]=\"glyphBody\" [style.fill]=\"washFillOf(status.kind)\" opacity=\"0.5\" />\n }\n @if (status.kind === 'selected') {\n <!-- Two tones, same as the map: the body above is the frame, this\n is the core inside it. -->\n <path [attr.d]=\"glyphCore\" [style.fill]=\"coreFill()\" />\n }\n @if (hasOccupant(status.kind)) {\n <path\n [attr.d]=\"occupantPathOf(status.kind)\"\n class=\"kerusi-legend__occupant kerusi-legend__occupant--{{ status.kind }}\"\n [attr.stroke-width]=\"occupantStrokeWidthOf(status.kind)\"\n [style.fill]=\"occupantFillOf(status.kind)\"\n [style.stroke]=\"occupantStrokeOf(status.kind)\"\n />\n }\n </svg>\n <span class=\"kerusi-legend__label\">{{ status.label }}</span>\n </li>\n }\n </ul>\n </div>\n</div>\n","import { Directive, inject, TemplateRef } from '@angular/core';\nimport { KerusiSeatContext } from '@kerusiweb/core';\n\n/**\n * What a `kerusiSeat` template is handed for each seat (`let-seat`): the seat,\n * whether it is selected, the stock glyph core resolved for it, and the stock\n * drawing itself.\n */\nexport interface SeatTemplateContext extends KerusiSeatContext {\n /**\n * The library's own drawing of this seat. Render it to keep the stock seat,\n * or alongside your own marks to add to it:\n *\n * ```html\n * <ng-container *ngTemplateOutlet=\"seat.defaultContent; context: { $implicit: seat }\" />\n * ```\n */\n defaultContent: TemplateRef<SeatTemplateOutletContext>;\n}\n\n/** The context object a seat template is stamped with. */\nexport interface SeatTemplateOutletContext {\n $implicit: SeatTemplateContext;\n}\n\n/**\n * Marks an `<ng-template>` inside `<kerusi-seatmap>` as the drawing for every\n * seat. The library keeps each seat's `<g>`, with its role, ARIA state, tab\n * stop, rotation and event handlers, and stamps this template inside it.\n *\n * The template is declared outside any `<svg>`, so Angular cannot tell its\n * elements are SVG: prefix each one with `svg:` (`<svg:path>`, `<svg:image>`),\n * or it is created as an unknown HTML element and draws nothing.\n *\n * ```html\n * <kerusi-seatmap [map]=\"map\">\n * <ng-template kerusiSeat let-seat>\n * <ng-container *ngTemplateOutlet=\"seat.defaultContent; context: { $implicit: seat }\" />\n * <svg:circle [attr.cx]=\"seat.glyph.box.x\" [attr.cy]=\"seat.glyph.box.y\" r=\"3\" />\n * </ng-template>\n * </kerusi-seatmap>\n * ```\n */\n@Directive({ selector: 'ng-template[kerusiSeat]' })\nexport class KerusiSeatTemplateDirective {\n readonly template = inject<TemplateRef<SeatTemplateOutletContext>>(TemplateRef);\n\n /** Types `let-seat` as a {@link SeatTemplateContext}. */\n static ngTemplateContextGuard(\n _dir: KerusiSeatTemplateDirective,\n ctx: unknown,\n ): ctx is SeatTemplateOutletContext {\n return true;\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport {\n buildNavigationGraph,\n buildRenderModel,\n canvasRectToContent,\n clampViewport,\n computeMapLayout,\n controlStyle,\n cssVar,\n DEFAULT_MAX_ZOOM,\n DEFAULT_SEAT_ARIA_STRINGS,\n DisallowedReason,\n disallowedAnnouncement,\n errorsOf,\n expireHolds,\n FIT_VIEWPORT,\n fitViewport,\n formatMoney,\n GestureEvent,\n GestureState,\n IDLE_GESTURE,\n isRtlLocale,\n isTextEntryTarget,\n keyboardViewport,\n KerusiControlStrings,\n KerusiMap,\n KerusiSeatmapColors,\n KerusiSession,\n KerusiState,\n KerusiValidationError,\n KerusiViewport,\n KerusiViolation,\n MapLayout,\n Money,\n NavigationGraph,\n reduceGesture,\n RenderMap,\n RenderSeat,\n RenderSection,\n resolveColors,\n resolveControlStrings,\n resolveMapLocale,\n revealRect,\n SeatAriaStrings,\n seatAriaLabel,\n SeatRenderStatus,\n SeatStyleFn,\n SeatTypeStyles,\n stepViewport,\n summarizeSelection,\n toggleSeatSelection,\n validateDocumentSet,\n viewportForRect,\n ViewportPoint,\n ViewportRect,\n ViewportSize,\n viewportsEqual,\n viewportTouchAction,\n viewportTransform,\n wheelZoomFactor,\n zoomLimits,\n zoomViewportBy,\n zoomViewportTo,\n} from '@kerusiweb/core';\nimport { KerusiSectionComponent } from './kerusi-section.component';\nimport { KerusiLegendComponent } from './kerusi-legend.component';\nimport { KerusiSeatTemplateDirective } from './kerusi-seat-template.directive';\n\n/** How a document with validation errors is handled. */\nexport type ValidationMode =\n /** Report through `validationIssues` and render anyway. The default. */\n | 'collect'\n /** Throw a `KerusiValidationError`, as `validateKerusiMap` does. */\n | 'throw'\n /** Skip validation entirely, for a document validated upstream. */\n | 'off';\n\n/** Per-section rendering overrides, keyed by `Section.id`. */\nexport interface SectionRenderOptions {\n /** Leaves the section out. Its space on the canvas stays empty (D4). */\n hidden?: boolean;\n /** Overrides the localized `Section.label`. */\n label?: string;\n}\n\n/** What a seat event carries. Everything the document knows, already resolved. */\nexport interface SeatInteraction {\n seat: RenderSeat;\n /** The selection after this event. */\n selection: readonly string[];\n /** Seats whose membership changed, including companions (§4.6). */\n changed: readonly string[];\n}\n\nexport interface SeatDisallowed {\n seat: RenderSeat;\n reason: DisallowedReason;\n}\n\n/**\n * Renders a Kerusi seat map.\n *\n * Takes a `KerusiMap` and its `KerusiState` directly — no adapter, no\n * intermediate row model. The map is one `<svg>` whose `viewBox` is the\n * document's canvas (§4.5), each `Section` is a group on it, every seat is\n * drawn exactly where and as large as the document says, seats take their\n * color from the map's legend,\n * every seat is keyboard-reachable and announced with its type, price, status\n * and §4.3.4 accessibility properties, and selection is an immutable set of\n * seat ids the caller can two-way bind.\n *\n * ```html\n * <kerusi-seatmap [map]=\"map\" [state]=\"state\" [(selection)]=\"picked\" />\n * ```\n *\n * Two opt-in features sit on top, both off by default so an existing map is\n * unchanged: `[zoomable]` (pinch, wheel and drag, keys `+` `-` `0`, buttons)\n * and `[maximizable]` (a full-screen button). Their arithmetic is in\n * `@kerusiweb/core`; this class supplies the listeners and the signals.\n */\n@Component({\n selector: 'kerusi-seatmap',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [KerusiSectionComponent, KerusiLegendComponent, NgTemplateOutlet],\n templateUrl: './kerusi-seatmap.component.html',\n styleUrl: './kerusi-seatmap.component.css',\n})\nexport class KerusiSeatmapComponent {\n private readonly host = inject(ElementRef<HTMLElement>);\n\n // --- documents ------------------------------------------------------------\n\n readonly map = input.required<KerusiMap>();\n readonly state = input<KerusiState | undefined>(undefined);\n /** The optional map↔event join (§5.3). Validated against the map and state. */\n readonly session = input<KerusiSession | undefined>(undefined);\n\n // --- selection ------------------------------------------------------------\n\n /** Selected seat ids. Two-way: `[(selection)]`, or read-only with `[selection]`. */\n readonly selection = model<readonly string[]>([]);\n\n // --- localization ---------------------------------------------------------\n\n /** Overrides `KerusiMap.locale` (BCP-47). */\n readonly locale = input<string | undefined>(undefined);\n /** Right-to-left rendering. `auto` derives it from the resolved locale. */\n readonly rtl = input<boolean | 'auto'>('auto');\n /** Overrides the built-in English announcement strings. */\n readonly ariaStrings = input<SeatAriaStrings>(DEFAULT_SEAT_ARIA_STRINGS);\n\n // --- appearance -----------------------------------------------------------\n\n readonly colors = input<KerusiSeatmapColors>({});\n /** Let an available seat take its `SeatType.color` (§4.7). */\n readonly typeColors = input<boolean>(true);\n /**\n * Styles for every seat of a type, keyed by `SeatType.id`: fill, label colour\n * and classes. Never changes a selected or blocked seat's fill. Also shown in\n * the legend.\n */\n readonly seatTypeStyles = input<SeatTypeStyles | undefined>(undefined);\n /**\n * A style for one seat, laid over its `seatTypeStyles` entry; return nothing\n * to leave a seat be. Never changes a selected or blocked seat's fill.\n */\n readonly seatStyle = input<SeatStyleFn | undefined>(undefined);\n /**\n * A `<ng-template kerusiSeat let-seat>` placed inside the map draws the inside\n * of every seat in place of the stock glyph. See {@link KerusiSeatTemplateDirective}.\n */\n protected readonly seatTemplate = contentChild(KerusiSeatTemplateDirective);\n /**\n * CSS pixels per canvas unit, at most: the map never draws wider than\n * `canvas.width × unitScale`, and scales down to a narrower container. The\n * document fixes every seat's size and position (§4.5); this is the only\n * sizing control. Default `1`.\n */\n readonly unitScale = input<number>(1);\n /**\n * Draws each section's label inside the map, at the top-left of its `bounds`.\n * Only sections that declare `bounds` get one; every section's label is its\n * group's accessible name either way. Default `true`.\n */\n readonly showSectionLabels = input<boolean>(true);\n readonly showLegend = input<boolean>(false);\n readonly showLegendPrices = input<boolean>(true);\n\n // --- section control ------------------------------------------------------\n\n /** Render only these sections, in this order. Default: all, by `Section.index`. */\n readonly sectionIds = input<readonly string[] | undefined>(undefined);\n readonly sectionOverrides = input<Readonly<Record<string, SectionRenderOptions>>>({});\n\n // --- interaction ----------------------------------------------------------\n\n /** Statuses in which a seat may be picked. Default: `['available']`. */\n readonly selectableStatuses = input<readonly SeatRenderStatus[]>(['available']);\n /** `auto` selects a seat's companion closure together (§4.6). */\n readonly companionMode = input<'auto' | 'independent'>('auto');\n readonly maxSelection = input<number | undefined>(undefined);\n /** A final say on selectability, applied after the status test. */\n readonly seatSelectable = input<((seat: RenderSeat) => boolean) | undefined>(undefined);\n /** When false the map renders read-only: no pointer or keyboard interaction. */\n readonly interactive = input<boolean>(true);\n /**\n * Revert a lapsed `holdExpires` to available on a ticker (§5.1). Off by\n * default — a renderer should stay passive unless asked.\n */\n readonly expireHolds = input<boolean>(false);\n readonly expiryIntervalMs = input<number>(1000);\n\n // --- zoom, pan and maximize (both opt in) ---------------------------------\n\n /**\n * Pinch, Ctrl/Cmd + wheel and drag to zoom and pan, `+` `-` `0` on the keyboard,\n * and on-screen buttons. A tap still selects at every zoom level.\n */\n readonly zoomable = input<boolean>(false);\n /** The zoom ceiling, relative to fit-to-container. The floor is always fit. */\n readonly maxZoom = input<number>(DEFAULT_MAX_ZOOM);\n /**\n * The built-in zoom buttons. Turn this off to supply your own, anywhere on the\n * page, and call `zoomIn()`, `zoomOut()` and `resetZoom()` on the component.\n */\n readonly showZoomControls = input<boolean>(true);\n /** A button that maximizes the map to fill the screen. */\n readonly maximizable = input<boolean>(false);\n /** Overrides the built-in English names of the zoom and maximize controls. */\n readonly controlStrings = input<Partial<KerusiControlStrings>>({});\n\n // --- validation -----------------------------------------------------------\n\n readonly validate = input<ValidationMode>('collect');\n\n // --- outputs --------------------------------------------------------------\n\n readonly seatSelect = output<SeatInteraction>();\n readonly seatDeselect = output<SeatInteraction>();\n readonly seatDisallowed = output<SeatDisallowed>();\n readonly seatFocus = output<RenderSeat>();\n /** Emitted whenever the documents change, in `collect` mode. */\n readonly validationIssues = output<readonly KerusiViolation[]>();\n /** The zoom and pan, whenever they change. For a host that persists or shows them. */\n readonly viewportChange = output<KerusiViewport>();\n readonly maximizedChange = output<boolean>();\n\n // --- internal state -------------------------------------------------------\n\n /**\n * The seat holding each section's tab stop, keyed by section id.\n *\n * Per section, not per map: arrow keys never cross a section boundary, so a\n * single map-wide tab stop would leave every section after the first\n * unreachable by keyboard. Tab moves between sections, arrows move within.\n */\n private readonly focusedSeatIds = signal<Readonly<Record<string, string>>>({});\n private readonly announcement = signal('');\n /** Bumped by the hold ticker to force the state to be re-derived. */\n private readonly expiryTick = signal(0);\n\n private readonly viewportState = signal<KerusiViewport>(FIT_VIEWPORT);\n private readonly maximizedState = signal(false);\n /** True for a discrete change (button, key, reveal), false while a finger or wheel drives. */\n protected readonly animated = signal(false);\n private readonly viewportEl = viewChild<ElementRef<HTMLElement>>('viewport');\n private readonly contentEl = viewChild<ElementRef<HTMLElement>>('content');\n private gesture: GestureState = IDLE_GESTURE;\n private suppressClick = false;\n private gestureBase: KerusiViewport | null = null;\n private nativeFullscreen = false;\n\n /** The current zoom and pan. Read-only: drive it with the methods below. */\n readonly viewport = this.viewportState.asReadonly();\n /** Whether the map is currently maximized. */\n readonly maximized = this.maximizedState.asReadonly();\n\n constructor() {\n effect(() => {\n const issues = this.issues();\n if (this.validate() !== 'off') {\n this.validationIssues.emit(issues);\n }\n if (this.validate() === 'throw') {\n const [first] = errorsOf(issues);\n if (first) {\n throw new KerusiValidationError(first.message, first.rule, first.id, issues);\n }\n }\n });\n\n // Keep every section's tab stop pointing at a seat that still exists.\n effect(() => {\n const model = this.renderMap();\n const current = this.focusedSeatIds();\n const next: Record<string, string> = {};\n let changed = Object.keys(current).length !== model.sections.length;\n\n for (const section of model.sections) {\n const held = current[section.id];\n const valid = held && section.seats.some((seat) => seat.id === held);\n const resolved = valid ? held : section.seats[0]?.id;\n if (resolved) {\n next[section.id] = resolved;\n changed ||= resolved !== held;\n }\n }\n\n if (changed) {\n this.focusedSeatIds.set(next);\n }\n });\n\n effect((onCleanup) => {\n if (!this.expireHolds()) {\n return;\n }\n const handle = setInterval(\n () => this.expiryTick.update((n) => n + 1),\n this.expiryIntervalMs(),\n );\n onCleanup(() => clearInterval(handle));\n });\n\n // Gesture listeners go on natively, not through the template: the wheel\n // listener must be non-passive to `preventDefault` a page zoom, and the\n // click listener must be in the capture phase to swallow the click that\n // follows a drag before the seat sees it.\n effect((onCleanup) => {\n const el = this.viewportEl()?.nativeElement;\n if (!el) {\n return;\n }\n const listeners: [string, (event: Event) => void, boolean | AddEventListenerOptions][] = [\n ['pointerdown', (e) => this.onPointerDown(e as PointerEvent), false],\n ['pointermove', (e) => this.onPointerMove(e as PointerEvent), false],\n ['pointerup', (e) => this.onPointerEnd(e as PointerEvent, 'up'), false],\n ['pointercancel', (e) => this.onPointerEnd(e as PointerEvent, 'cancel'), false],\n ['wheel', (e) => this.onWheel(e as WheelEvent), { passive: false }],\n ['click', (e) => this.onClickCapture(e), true],\n // Safari reports a trackpad pinch as gesture events, not Ctrl + wheel.\n ['gesturestart', (e) => this.onGestureStart(e), { passive: false }],\n ['gesturechange', (e) => this.onGestureChange(e as SafariGestureEvent), { passive: false }],\n ['gestureend', (e) => this.onGestureEnd(e), { passive: false }],\n ];\n for (const [type, listener, options] of listeners) {\n el.addEventListener(type, listener, options);\n }\n onCleanup(() => {\n for (const [type, listener, options] of listeners) {\n el.removeEventListener(type, listener, options);\n }\n });\n });\n\n // Re-clamp when the box or the ceiling changes: a rotated phone, a\n // maximized map, a lowered `maxZoom`.\n effect((onCleanup) => {\n this.limits();\n const view = this.viewportEl()?.nativeElement;\n untracked(() => this.reclamp());\n if (!view || typeof ResizeObserver === 'undefined') {\n return;\n }\n const observer = new ResizeObserver(() => this.reclamp());\n observer.observe(view);\n const content = this.contentEl()?.nativeElement;\n if (content) {\n observer.observe(content);\n }\n onCleanup(() => observer.disconnect());\n });\n\n // Switching `zoomable` or `maximizable` off puts the map back as it was.\n effect(() => {\n if (!this.zoomable() && !viewportsEqual(untracked(this.viewportState), FIT_VIEWPORT)) {\n this.viewportState.set(FIT_VIEWPORT);\n }\n });\n effect(() => {\n if (!this.maximizable() && untracked(this.maximizedState)) {\n untracked(() => this.setMaximized(false));\n }\n });\n\n // While maximized: freeze the page behind, and follow the browser leaving\n // native full screen (Esc) so the two never disagree.\n effect((onCleanup) => {\n if (!this.maximizedState()) {\n return;\n }\n const host = this.host.nativeElement as HTMLElement;\n const doc = host.ownerDocument;\n const previousOverflow = doc.body.style.overflow;\n doc.body.style.overflow = 'hidden';\n\n const onFullscreenChange = () => {\n if (doc.fullscreenElement === host) {\n this.nativeFullscreen = true;\n } else if (this.nativeFullscreen) {\n this.nativeFullscreen = false;\n this.setMaximized(false);\n }\n };\n doc.addEventListener('fullscreenchange', onFullscreenChange);\n\n onCleanup(() => {\n doc.body.style.overflow = previousOverflow;\n doc.removeEventListener('fullscreenchange', onFullscreenChange);\n this.nativeFullscreen = false;\n if (doc.fullscreenElement === host) {\n doc.exitFullscreen?.().catch(() => undefined);\n }\n });\n });\n }\n\n // --- derived model --------------------------------------------------------\n\n protected readonly issues = computed<readonly KerusiViolation[]>(() =>\n this.validate() === 'off'\n ? []\n : validateDocumentSet({\n map: this.map(),\n state: this.state(),\n session: this.session(),\n }),\n );\n\n /** The state actually rendered — with lapsed holds reverted when asked. */\n private readonly effectiveState = computed<KerusiState | undefined>(() => {\n const state = this.state();\n if (!state || !this.expireHolds()) {\n return state;\n }\n this.expiryTick();\n return expireHolds(state);\n });\n\n protected readonly renderMap = computed<RenderMap>(() =>\n buildRenderModel(this.map(), this.effectiveState(), {\n locale: this.locale(),\n sectionIds: this.visibleSectionIds(),\n selectableStatuses: this.selectableStatuses(),\n seatSelectable: this.seatSelectable(),\n }),\n );\n\n protected readonly resolvedLocale = computed(() => resolveMapLocale(this.map(), this.locale()));\n\n protected readonly isRtl = computed(() =>\n this.rtl() === 'auto' ? isRtlLocale(this.resolvedLocale()) : this.rtl() === true,\n );\n\n protected readonly resolvedColors = computed<Required<KerusiSeatmapColors>>(() =>\n resolveColors(this.colors()),\n );\n\n protected readonly selectionSet = computed(() => new Set(this.selection()));\n\n protected readonly limits = computed(() => zoomLimits(this.maxZoom()));\n protected readonly strings = computed(() => resolveControlStrings(this.controlStrings()));\n protected readonly controlColors = computed(() => controlStyle(this.colors()));\n protected readonly transform = computed(() => viewportTransform(this.viewportState()));\n protected readonly touchAction = computed(() =>\n viewportTouchAction(this.viewportState(), this.maximizedState()),\n );\n protected readonly showToolbar = computed(\n () => (this.zoomable() && this.showZoomControls()) || this.maximizable(),\n );\n protected readonly atMaxZoom = computed(\n () => this.viewportState().zoom >= this.limits().maxZoom - 1e-4,\n );\n protected readonly atFit = computed(() => this.viewportState().zoom <= 1 + 1e-4);\n\n /** Every seat and element placed on the canvas, mirrored as a whole in RTL (D3). */\n protected readonly layout = computed<MapLayout>(() =>\n computeMapLayout(this.renderMap(), { rtl: this.isRtl() }),\n );\n\n protected readonly viewBox = computed(() => `0 0 ${this.layout().width} ${this.layout().height}`);\n\n /** `unitScale` CSS pixels per canvas unit, at most. */\n protected readonly naturalWidth = computed(() => this.layout().width * this.unitScale());\n\n /** The canvas's width over its height, so a maximized map can fit the whole canvas. */\n protected readonly canvasAspect = computed(() =>\n String(this.layout().width / this.layout().height),\n );\n\n protected readonly backdrop = computed(() => cssVar('backdrop', this.resolvedColors().backdrop));\n\n /** Navigation graphs per section — arrows move within, Tab moves between. */\n private readonly graphs = computed<ReadonlyMap<string, NavigationGraph>>(\n () =>\n new Map(\n this.renderMap().sections.map((section) => [\n section.id,\n buildNavigationGraph(section, { rtl: this.isRtl() }),\n ]),\n ),\n );\n\n protected readonly ariaLabels = computed<ReadonlyMap<string, string>>(() => {\n const locale = this.resolvedLocale();\n const strings = this.ariaStrings();\n return new Map(\n [...this.renderMap().seatsById.values()].map((seat) => [\n seat.id,\n seatAriaLabel(seat, locale, strings),\n ]),\n );\n });\n\n protected readonly mapLabel = computed(\n () => this.renderMap().name ?? `Seat map ${this.renderMap().id}`,\n );\n\n /** Live-region text: the running selection, or the last disallowed reason. */\n protected readonly liveMessage = computed(() => this.announcement());\n\n /** The selection's seats and total, for callers that want it off the template. */\n readonly summary = computed(() => summarizeSelection(this.renderMap(), this.selection()));\n\n // --- template helpers -----------------------------------------------------\n\n protected labelFor(section: RenderSection): string | undefined {\n return this.sectionOverrides()[section.id]?.label ?? section.label;\n }\n\n /** The seat holding this section's tab stop. */\n protected focusedSeatIn(section: RenderSection): string | null {\n return this.focusedSeatIds()[section.id] ?? null;\n }\n\n // --- interaction ----------------------------------------------------------\n\n protected onSeatActivate(seatId: string): void {\n const model = this.renderMap();\n const seat = model.seatsById.get(seatId);\n if (!seat) {\n return;\n }\n\n const outcome = toggleSeatSelection(this.selection(), seatId, {\n seatsById: model.seatsById,\n companionMode: this.companionMode(),\n maxSelection: this.maxSelection(),\n });\n\n if (outcome.kind === 'disallowed') {\n this.announce(disallowedAnnouncement(seat, outcome.reason!, this.ariaStrings()));\n this.seatDisallowed.emit({ seat, reason: outcome.reason! });\n return;\n }\n\n this.selection.set(outcome.selection);\n const event: SeatInteraction = {\n seat,\n selection: outcome.selection,\n changed: outcome.changed,\n };\n (outcome.kind === 'select' ? this.seatSelect : this.seatDeselect).emit(event);\n this.announceSelection(outcome.selection);\n }\n\n protected onSeatFocused(seatId: string): void {\n const seat = this.renderMap().seatsById.get(seatId);\n if (!seat) {\n return;\n }\n this.setFocusedSeat(seat.sectionId, seatId);\n this.seatFocus.emit(seat);\n if (this.zoomable()) {\n this.revealSeat(seatId);\n }\n }\n\n /**\n * Arrow keys walk the navigation graph, which follows §4.3.5 adjacency:\n * along a row by `col`, across an aisle (a skipped `col`) rather than into\n * it, and between rows to the seat nearest on the canvas (D6).\n */\n protected onKeydown(section: RenderSection, event: KeyboardEvent): void {\n const seatId = (event.target as HTMLElement)?.dataset?.['seatId'];\n if (!seatId) {\n return;\n }\n\n const graph = this.graphs().get(section.id);\n const neighbours = graph?.neighbours.get(seatId);\n if (!graph) {\n return;\n }\n\n let target: string | undefined;\n switch (event.key) {\n case 'ArrowLeft':\n target = neighbours?.left;\n break;\n case 'ArrowRight':\n target = neighbours?.right;\n break;\n case 'ArrowUp':\n target = neighbours?.up;\n break;\n case 'ArrowDown':\n target = neighbours?.down;\n break;\n case 'Home':\n target = event.ctrlKey ? graph.first : neighbours?.rowStart;\n break;\n case 'End':\n target = event.ctrlKey ? graph.last : neighbours?.rowEnd;\n break;\n case 'PageUp':\n target = graph.first;\n break;\n case 'PageDown':\n target = graph.last;\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n this.onSeatActivate(seatId);\n return;\n case 'Escape':\n if (this.selection().length > 0) {\n event.preventDefault();\n this.selection.set([]);\n this.announceSelection([]);\n }\n return;\n default:\n return;\n }\n\n if (target) {\n event.preventDefault();\n this.moveFocusTo(section.id, target);\n }\n }\n\n private setFocusedSeat(sectionId: string, seatId: string): void {\n if (this.focusedSeatIds()[sectionId] === seatId) {\n return;\n }\n this.focusedSeatIds.update((all) => ({ ...all, [sectionId]: seatId }));\n }\n\n /**\n * Moves the roving tab stop, then the DOM focus that follows it.\n *\n * When zoomable, the browser's own scroll-into-view is suppressed: the map\n * moves by transform, so `onSeatFocused` pans it into view instead.\n */\n private moveFocusTo(sectionId: string, seatId: string): void {\n this.setFocusedSeat(sectionId, seatId);\n const node = this.seatNode(seatId);\n if (this.zoomable()) {\n node?.focus?.({ preventScroll: true });\n } else {\n node?.focus?.();\n }\n }\n\n /**\n * Seat ids come from the document, so they cannot be interpolated into a\n * selector unescaped — and `CSS.escape` is absent in jsdom and under SSR.\n * Scanning the rendered nodes avoids both problems.\n */\n private seatNode(seatId: string): SVGGElement | null {\n const nodes = (this.host.nativeElement as HTMLElement).querySelectorAll<SVGGElement>(\n '[data-seat-id]',\n );\n for (const node of Array.from(nodes)) {\n if (node.dataset['seatId'] === seatId) {\n return node;\n }\n }\n return null;\n }\n\n // --- zoom and pan ---------------------------------------------------------\n\n /** Zooms in one step about the centre. No-op unless `zoomable`. */\n zoomIn(): void {\n this.stepZoom(1);\n }\n\n /** Zooms out one step about the centre. No-op unless `zoomable`. */\n zoomOut(): void {\n this.stepZoom(-1);\n }\n\n /** Back to fit-to-container: the whole canvas. No-op unless `zoomable`. */\n resetZoom(): void {\n const measured = this.measure();\n if (measured && this.zoomable()) {\n this.commit(fitViewport(measured.content, measured.container, this.limits()), true);\n }\n }\n\n /**\n * Zooms to one section: its declared `bounds`, or the box around its seats\n * and elements when it declares none. No-op unless `zoomable`, or for a\n * section that is not rendered.\n */\n zoomToSection(sectionId: string): void {\n const layout = this.layout();\n const placed = layout.sections.find((s) => s.section.id === sectionId);\n if (placed) {\n this.zoomToCanvasRect(placed.bounds, layout);\n }\n }\n\n private zoomToCanvasRect(rect: ViewportRect, canvas: ViewportSize): void {\n const measured = this.measure();\n if (!measured || !this.zoomable() || !(canvas.width > 0 && canvas.height > 0)) {\n return;\n }\n // The map's <svg> is the content's only child and sets its height; its\n // width can stop short of the content's (`unitScale` caps it), so the\n // drawn width comes from the height and the canvas's proportions.\n const drawn = {\n width: (measured.content.height * canvas.width) / canvas.height,\n height: measured.content.height,\n };\n const next = viewportForRect(\n canvasRectToContent(rect, canvas, drawn),\n measured.content,\n measured.container,\n undefined,\n this.limits(),\n );\n this.commit(next, true);\n }\n\n private stepZoom(direction: 1 | -1): void {\n const measured = this.measure();\n if (measured && this.zoomable()) {\n const next = stepViewport(\n this.viewportState(),\n direction,\n measured.content,\n measured.container,\n this.limits(),\n );\n this.commit(next, true);\n }\n }\n\n /** Sizes in CSS pixels, read when needed: `offset*` ignores the zoom transform. */\n private measure(): { content: ViewportSize; container: ViewportSize } | null {\n const view = this.viewportEl()?.nativeElement;\n const content = this.contentEl()?.nativeElement;\n if (!view || !content) {\n return null;\n }\n return {\n container: { width: view.clientWidth, height: view.clientHeight },\n content: { width: content.offsetWidth, height: content.offsetHeight },\n };\n }\n\n private commit(next: KerusiViewport, animate: boolean): void {\n if (viewportsEqual(next, this.viewportState())) {\n return;\n }\n this.animated.set(animate);\n this.viewportState.set(next);\n this.viewportChange.emit(next);\n }\n\n private reclamp(): void {\n const measured = this.measure();\n if (measured && this.zoomable()) {\n const next = clampViewport(\n this.viewportState(),\n measured.content,\n measured.container,\n this.limits(),\n );\n this.commit(next, false);\n }\n }\n\n /** A point in the viewport's own coordinates, which is what the core functions take. */\n private containerPoint(event: { clientX: number; clientY: number }): ViewportPoint {\n const box = this.viewportEl()!.nativeElement.getBoundingClientRect();\n return { x: event.clientX - box.left, y: event.clientY - box.top };\n }\n\n /**\n * Pans a seat that took keyboard focus into view. A click or tap also\n * focuses the seat, but should not move the map under the finger, so only a\n * `:focus-visible` focus counts.\n */\n private revealSeat(seatId: string): void {\n const view = this.viewportEl()?.nativeElement;\n const node = this.seatNode(seatId);\n const measured = this.measure();\n if (!view || !node || !measured || !focusIsVisible(node)) {\n return;\n }\n const seat = node.getBoundingClientRect();\n const frame = view.getBoundingClientRect();\n const next = revealRect(\n this.viewportState(),\n {\n x: seat.left - frame.left,\n y: seat.top - frame.top,\n width: seat.width,\n height: seat.height,\n },\n measured.content,\n measured.container,\n undefined,\n this.limits(),\n );\n this.commit(next, true);\n }\n\n // --- pointer gestures -----------------------------------------------------\n\n private onPointerDown(event: PointerEvent): void {\n if (event.pointerType === 'mouse' && event.button !== 0) {\n return;\n }\n this.suppressClick = false;\n this.feedGesture({ type: 'down', id: event.pointerId, point: this.containerPoint(event) });\n }\n\n private onPointerMove(event: PointerEvent): void {\n if (this.gesture.ids.length > 0) {\n this.feedGesture({ type: 'move', id: event.pointerId, point: this.containerPoint(event) });\n }\n }\n\n private onPointerEnd(event: PointerEvent, type: 'up' | 'cancel'): void {\n this.feedGesture({ type, id: event.pointerId });\n }\n\n private feedGesture(event: GestureEvent): void {\n const measured = this.measure();\n if (!measured) {\n return;\n }\n const result = reduceGesture(this.gesture, event, {\n viewport: this.viewportState(),\n content: measured.content,\n container: measured.container,\n limits: this.limits(),\n });\n this.gesture = result.state;\n\n // Capture only once a tap has become a gesture: capturing on `down` would\n // retarget the tap's click away from the seat.\n if (result.capture) {\n const view = this.viewportEl()?.nativeElement;\n for (const id of result.state.ids) {\n try {\n view?.setPointerCapture(id);\n } catch {\n // The pointer already ended; nothing to capture.\n }\n }\n }\n if (result.viewport !== this.viewportState()) {\n this.commit(result.viewport, false);\n }\n if (result.suppressClick) {\n // The click a drag ends with arrives right after `pointerup`, before this timer.\n this.suppressClick = true;\n setTimeout(() => (this.suppressClick = false));\n }\n }\n\n private onClickCapture(event: Event): void {\n if (this.suppressClick) {\n this.suppressClick = false;\n event.stopPropagation();\n event.preventDefault();\n }\n }\n\n private onWheel(event: WheelEvent): void {\n const factor = wheelZoomFactor(event);\n const measured = this.measure();\n if (factor === null || !measured) {\n return; // A plain wheel is the page's to scroll.\n }\n event.preventDefault();\n const next = zoomViewportBy(\n this.viewportState(),\n factor,\n this.containerPoint(event),\n measured.content,\n measured.container,\n this.limits(),\n );\n this.commit(next, false);\n }\n\n private onGestureStart(event: Event): void {\n event.preventDefault();\n this.gestureBase = this.viewportState();\n }\n\n private onGestureChange(event: SafariGestureEvent): void {\n event.preventDefault();\n const measured = this.measure();\n if (!this.gestureBase || !measured) {\n return;\n }\n const next = zoomViewportTo(\n this.gestureBase,\n this.gestureBase.zoom * event.scale,\n this.containerPoint(event),\n measured.content,\n measured.container,\n this.limits(),\n );\n this.commit(next, false);\n }\n\n private onGestureEnd(event: Event): void {\n event.preventDefault();\n this.gestureBase = null;\n }\n\n // --- keyboard on the map as a whole ----------------------------------------\n\n /**\n * `+` `-` `0` zoom, and arrows pan when the viewport itself has focus; Esc\n * leaves a maximized map. A seat's own handler runs first, so an Esc that\n * cleared the selection is already `defaultPrevented` and stays at that.\n */\n protected onRootKeydown(event: KeyboardEvent): void {\n if (event.defaultPrevented || isTextEntryTarget(event.target as HTMLElement | null)) {\n return;\n }\n if (this.zoomable()) {\n const measured = this.measure();\n const next =\n measured &&\n keyboardViewport(\n this.viewportState(),\n {\n key: event.key,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n altKey: event.altKey,\n viewportFocused: event.target === this.viewportEl()?.nativeElement,\n },\n measured.content,\n measured.container,\n this.limits(),\n );\n if (next) {\n event.preventDefault();\n this.commit(next, true);\n return;\n }\n }\n if (event.key === 'Escape' && this.maximizedState()) {\n event.preventDefault();\n this.setMaximized(false);\n }\n }\n\n // --- maximize -------------------------------------------------------------\n\n /** Maximizes or restores the map. Maximizing needs `maximizable`. */\n toggleMaximized(): void {\n this.setMaximized(!this.maximizedState());\n }\n\n setMaximized(next: boolean): void {\n if (next === this.maximizedState() || (next && !this.maximizable())) {\n return;\n }\n this.maximizedState.set(next);\n this.maximizedChange.emit(next);\n\n // Native full screen is an enhancement over the fixed-position layout, which\n // is all iPhone Safari offers. It is requested here, inside the click that\n // got us here, because browsers only grant it to a user gesture.\n const host = this.host.nativeElement as HTMLElement;\n const doc = host.ownerDocument;\n if (next && !doc.fullscreenElement) {\n host.requestFullscreen?.()?.catch(() => undefined);\n } else if (!next && doc.fullscreenElement === host) {\n doc.exitFullscreen?.()?.catch(() => undefined);\n }\n }\n\n private announceSelection(selection: readonly string[]): void {\n const strings = this.ariaStrings();\n if (selection.length === 0) {\n this.announce(strings.selectionEmpty);\n return;\n }\n const { total } = summarizeSelection(this.renderMap(), selection);\n this.announce(\n strings.selectionSummary(selection.length, formatTotal(total, this.resolvedLocale())),\n );\n }\n\n private announce(message: string): void {\n // Re-announce an identical message by clearing first; a live region that\n // sees no text change stays silent.\n this.announcement.set('');\n queueMicrotask(() => this.announcement.set(message));\n }\n\n private visibleSectionIds(): readonly string[] | undefined {\n const explicit = this.sectionIds();\n const overrides = this.sectionOverrides();\n const hidden = Object.entries(overrides)\n .filter(([, o]) => o.hidden)\n .map(([id]) => id);\n\n if (explicit) {\n return explicit.filter((id) => !hidden.includes(id));\n }\n if (hidden.length === 0) {\n return undefined;\n }\n return (this.map().sections ?? []).map((s) => s.id).filter((id) => !hidden.includes(id));\n }\n}\n\nfunction formatTotal(total: Money | undefined, locale: string): string {\n return total ? formatMoney(total, locale) : '';\n}\n\n/** Safari's trackpad pinch. Not in lib.dom; `scale` is relative to the gesture's start. */\ninterface SafariGestureEvent extends UIEvent {\n scale: number;\n clientX: number;\n clientY: number;\n}\n\n/** `:focus-visible` where the engine knows it; otherwise assume the focus is the keyboard's. */\nfunction focusIsVisible(node: Element): boolean {\n try {\n return node.matches(':focus-visible');\n } catch {\n return true;\n }\n}\n","<div\n class=\"kerusi-seatmap\"\n [class.kerusi-seatmap--maximized]=\"maximized()\"\n role=\"group\"\n [attr.aria-label]=\"mapLabel()\"\n [attr.dir]=\"isRtl() ? 'rtl' : null\"\n [attr.lang]=\"resolvedLocale()\"\n [style.background]=\"maximized() ? controlColors().maximizedBackground : null\"\n [style.color]=\"maximized() ? controlColors().maximizedColor : null\"\n (keydown)=\"onRootKeydown($event)\"\n>\n @if (zoomable() || maximizable()) {\n <!-- Only when a zoom or maximize feature is on, so a plain map's markup is\n exactly what it was before they existed. -->\n <div class=\"kerusi-seatmap__stage\">\n @if (showToolbar()) {\n <div\n class=\"kerusi-toolbar\"\n role=\"toolbar\"\n [attr.aria-label]=\"strings().toolbar\"\n [style.--kerusi-focus-ring-input]=\"resolvedColors().focusRing\"\n >\n @if (zoomable() && showZoomControls()) {\n <button\n type=\"button\"\n class=\"kerusi-control kerusi-control--zoom-in\"\n [attr.aria-label]=\"strings().zoomIn\"\n [attr.aria-disabled]=\"atMaxZoom()\"\n [style.background]=\"controlColors().buttonBackground\"\n [style.color]=\"controlColors().buttonColor\"\n [style.border-color]=\"controlColors().buttonBorder\"\n (click)=\"zoomIn()\"\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M12 5v14M5 12h14\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"kerusi-control kerusi-control--zoom-out\"\n [attr.aria-label]=\"strings().zoomOut\"\n [attr.aria-disabled]=\"atFit()\"\n [style.background]=\"controlColors().buttonBackground\"\n [style.color]=\"controlColors().buttonColor\"\n [style.border-color]=\"controlColors().buttonBorder\"\n (click)=\"zoomOut()\"\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M5 12h14\" />\n </svg>\n </button>\n <button\n type=\"button\"\n class=\"kerusi-control kerusi-control--zoom-reset\"\n [attr.aria-label]=\"strings().zoomReset\"\n [attr.aria-disabled]=\"atFit()\"\n [style.background]=\"controlColors().buttonBackground\"\n [style.color]=\"controlColors().buttonColor\"\n [style.border-color]=\"controlColors().buttonBorder\"\n (click)=\"resetZoom()\"\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n <path d=\"M3 12a9 9 0 1 0 3-6.7M3 4v5h5\" />\n </svg>\n </button>\n }\n @if (maximizable()) {\n <button\n type=\"button\"\n class=\"kerusi-control kerusi-control--maximize\"\n [attr.aria-label]=\"maximized() ? strings().restore : strings().maximize\"\n [style.background]=\"controlColors().buttonBackground\"\n [style.color]=\"controlColors().buttonColor\"\n [style.border-color]=\"controlColors().buttonBorder\"\n (click)=\"toggleMaximized()\"\n >\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\">\n @if (maximized()) {\n <path d=\"M9 4v5H4M15 4v5h5M15 20v-5h5M9 20v-5H4\" />\n } @else {\n <path d=\"M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5\" />\n }\n </svg>\n </button>\n }\n </div>\n }\n\n @if (zoomable()) {\n <div\n #viewport\n class=\"kerusi-viewport\"\n role=\"group\"\n tabindex=\"0\"\n [attr.aria-label]=\"strings().viewport\"\n [style.touch-action]=\"touchAction()\"\n [style.--kerusi-focus-ring-input]=\"resolvedColors().focusRing\"\n [style.--kerusi-canvas-aspect]=\"canvasAspect()\"\n >\n <div\n #content\n class=\"kerusi-viewport__content\"\n [class.kerusi-viewport__content--animated]=\"animated()\"\n [style.transform]=\"transform()\"\n >\n <ng-container [ngTemplateOutlet]=\"drawing\" />\n </div>\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"drawing\" />\n }\n </div>\n } @else {\n <ng-container [ngTemplateOutlet]=\"drawing\" />\n }\n\n @if (showLegend()) {\n <kerusi-legend\n [legend]=\"renderMap().legend\"\n [locale]=\"resolvedLocale()\"\n [colors]=\"resolvedColors()\"\n [typeColors]=\"typeColors()\"\n [seatTypeStyles]=\"seatTypeStyles()\"\n [showPrices]=\"showLegendPrices()\"\n />\n }\n\n <p class=\"kerusi-sr-only\" aria-live=\"polite\" aria-atomic=\"true\">{{ liveMessage() }}</p>\n</div>\n\n<!-- The whole map: one <svg> on the document's canvas, a group per section (D1). -->\n<ng-template #drawing>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"kerusi-seatmap__svg\"\n role=\"presentation\"\n focusable=\"false\"\n [style.--kerusi-focus-ring-input]=\"resolvedColors().focusRing\"\n [attr.viewBox]=\"viewBox()\"\n [style.max-width.px]=\"naturalWidth()\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n <rect\n x=\"0\"\n y=\"0\"\n [attr.width]=\"layout().width\"\n [attr.height]=\"layout().height\"\n [style.fill]=\"backdrop()\"\n />\n <!-- A hidden section's group is simply absent; the canvas keeps its size,\n so its space stays empty (D4). -->\n @for (placed of layout().sections; track placed.section.id) {\n <g\n kerusi-section\n [layout]=\"placed\"\n [label]=\"labelFor(placed.section)\"\n [showLabel]=\"showSectionLabels()\"\n [selection]=\"selectionSet()\"\n [focusedSeatId]=\"focusedSeatIn(placed.section)\"\n [ariaLabels]=\"ariaLabels()\"\n [colors]=\"resolvedColors()\"\n [typeColors]=\"typeColors()\"\n [seatTemplate]=\"seatTemplate()?.template\"\n [seatStyle]=\"seatStyle()\"\n [seatTypeStyles]=\"seatTypeStyles()\"\n [interactive]=\"interactive()\"\n (seatActivate)=\"onSeatActivate($event)\"\n (seatFocused)=\"onSeatFocused($event)\"\n (seatKeydown)=\"onKeydown(placed.section, $event)\"\n ></g>\n }\n </svg>\n</ng-template>\n","/**\n * The Kerusi-native seat map: `<kerusi-seatmap>`, its section renderer, and an\n * optional legend.\n *\n * The selection, theming and announcement helpers they are built from are\n * framework-free and live in `@kerusiweb/core`.\n */\n\nexport * from './kerusi-seatmap.component';\nexport * from './kerusi-section.component';\nexport * from './kerusi-legend.component';\nexport * from './kerusi-seat-template.directive';\n","import { computed, signal, Signal } from '@angular/core';\nimport {\n applyStateDeltaOrdered,\n DEFAULT_SEQUENCE_READER,\n DeltaApplication,\n expireHolds,\n HeldSeat,\n heldSeats as heldSeatsOf,\n KerusiState,\n KerusiStateDelta,\n SequenceReader,\n} from '@kerusiweb/core';\n\n/**\n * A signal-backed live view of a {@link KerusiState}.\n *\n * Construct it directly — `new KerusiStateStore(initialState)` — and feed it\n * deltas from whatever transport you use. It is deliberately not an\n * `@Injectable`: this is a rendering library, and an application that already\n * owns its availability state should keep owning it.\n */\nexport class KerusiStateStore {\n private readonly _state;\n private readonly _needsRefetch = signal(false);\n private readonly _now;\n private readonly clock: () => Date;\n private readonly sequenceOf: SequenceReader;\n private lastSequence: number | undefined;\n\n constructor(initial: KerusiState, opts: { now?: () => Date; sequenceOf?: SequenceReader } = {}) {\n this._state = signal(initial);\n this.clock = opts.now ?? (() => new Date());\n this.sequenceOf = opts.sequenceOf ?? DEFAULT_SEQUENCE_READER;\n this._now = signal(this.clock());\n }\n\n /** The current availability snapshot. */\n get state(): Signal<KerusiState> {\n return this._state.asReadonly();\n }\n\n /** The timestamp of the most recently applied document. */\n readonly updatedAt = computed(() => this._state().updatedAt);\n\n /**\n * True once a gap was detected in the delta stream. The consumer SHOULD\n * re-fetch a full `KerusiState` and hand it to {@link reset} (§5.2).\n */\n get needsRefetch(): Signal<boolean> {\n return this._needsRefetch.asReadonly();\n }\n\n /** Every currently-held seat, with the time left on its hold. */\n readonly heldSeats = computed<readonly HeldSeat[]>(() => heldSeatsOf(this._state(), this._now()));\n\n /** Offers a delta to the store. Returns what happened to it. */\n apply(delta: KerusiStateDelta): DeltaApplication {\n const result = applyStateDeltaOrdered(this._state(), delta, {\n sequenceOf: this.sequenceOf,\n lastSequence: this.lastSequence,\n });\n\n if (result.outcome === 'applied' || result.outcome === 'gap') {\n this._state.set(result.state);\n const seq = this.sequenceOf(delta);\n if (seq !== undefined) {\n this.lastSequence = seq;\n }\n }\n if (result.outcome === 'gap') {\n this._needsRefetch.set(true);\n }\n\n return result;\n }\n\n /**\n * Replaces the state wholesale — the post-refetch path. Clears the\n * refetch flag and forgets the delta sequence.\n */\n reset(state: KerusiState): void {\n this._state.set(state);\n this._needsRefetch.set(false);\n this.lastSequence = undefined;\n this._now.set(this.clock());\n }\n\n /** Reverts lapsed holds and refreshes `heldSeats` countdowns. */\n tick(): void {\n const now = this.clock();\n this._now.set(now);\n const next = expireHolds(this._state(), now);\n if (next !== this._state()) {\n this._state.set(next);\n }\n }\n\n /**\n * Runs {@link tick} on an interval. Returns a function that stops it — call\n * that from `DestroyRef.onDestroy` or `ngOnDestroy`.\n */\n startExpiryTicker(intervalMs = 1000): () => void {\n const handle = setInterval(() => this.tick(), intervalMs);\n return () => clearInterval(handle);\n }\n}\n","/*\n * Public API Surface of @kerusiweb/angular\n *\n * The Angular binding only. Document types, the render model and the view\n * helpers live in @kerusiweb/core — import them from there.\n */\n\n// --- Components -------------------------------------------------------------\nexport * from './lib/kerusi-seatmap';\n\n// --- Signal-backed live availability store ---------------------------------\nexport * from './lib/kerusi-state-store';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["heldSeatsOf"],"mappings":";;;;;AA0BA;;;;;;;;;;;AAWG;MAcU,sBAAsB,CAAA;;IAExB,MAAM,GAAG,KAAK,CAAC,QAAQ;+EAAiB;;IAExC,KAAK,GAAG,KAAK,CAAqB,SAAS;8EAAC;AACrD;;;;AAIG;IACM,SAAS,GAAG,KAAK,CAAU,IAAI;kFAAC;;AAGhC,IAAA,SAAS,GAAG,KAAK,CAAsB,IAAI,GAAG,EAAE;kFAAC;;IAEjD,aAAa,GAAG,KAAK,CAAgB,IAAI;sFAAC;;AAE1C,IAAA,UAAU,GAAG,KAAK,CAA8B,IAAI,GAAG,EAAE;mFAAC;IAE1D,MAAM,GAAG,KAAK,CA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