@seatlayer/react 0.111.0 → 0.113.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,8 +30,9 @@ selects and **holds**, and your trusted server **books** the hold.
30
30
  your styles own.
31
31
  - `SeatPicker`: the complete buyer experience: map, legend, tray, pricing, and
32
32
  the checkout hand-off.
33
- - `SeasonPicker`: fixed-inclusion Season selection and returning-holder intent
34
- with the same typed lifecycle and imperative-handle conventions.
33
+ - `SeasonPicker`: season tickets. The buyer picks a seat once and holds it on
34
+ every date of the season; returning holders can say they will renew. Same
35
+ typed lifecycle and imperative handle as the other components.
35
36
  - `SeatManager`: the organizer control room, for dashboards that monitor and
36
37
  block live inventory.
37
38
  - `EmbeddedDesigner`: a hosted chart Designer inside your own application.
@@ -53,6 +54,45 @@ selects and **holds**, and your trusted server **books** the hold.
53
54
  npm install @seatlayer/react
54
55
  ```
55
56
 
57
+ ## Upgrading to 0.113.0
58
+
59
+ Nothing needs a code change, and no type changed. What a buyer sees:
60
+
61
+ - **A short server stall heals on its own.** A hold, release or resume that
62
+ gets no answer is sent again (at most three tries, seven seconds of waiting),
63
+ and the map's first load tries again for up to about 30 seconds while the
64
+ picker says it is taking longer. A real outage still ends on the same panel
65
+ and Try again button, only later.
66
+ - **"Check your connection and try again."** A hold or best-available that
67
+ still gets no answer says this and keeps the selection, where it used to say
68
+ the seats were taken.
69
+ - **One version of the SDK.** If your app also installs `@seatlayer/js`
70
+ itself, move it to 0.113.0 as well.
71
+
72
+ ## Upgrading to 0.112.0
73
+
74
+ Nothing needs a code change. Four things to know:
75
+
76
+ - **`SeatingChart` now honours `enable3D`, `enable3DCrowd` and
77
+ `touchNavigation3D`.** Before 0.112.0 it ignored them. If your page already
78
+ passes one, it takes effect when you upgrade: `enable3D={false}` hides the 3D
79
+ view, `enable3DCrowd={false}` leaves standing areas an empty floor in 3D, and
80
+ `touchNavigation3D="classic"` keeps the earlier touch gestures. Unset, `true`
81
+ and `"map"` change nothing. `SeatPicker` and `SeasonPicker` already honoured
82
+ all three.
83
+ - **Changing one of the three after mount rebuilds the chart.** A page that
84
+ drives `enable3D` from state, for example from the screen width, now remounts
85
+ the chart each time the value changes, as a change of `event` or `locale`
86
+ does. Set it once where you can.
87
+ - **Types.** `SeatPickerHandle` gains a required `markBooked`, and
88
+ `SeatManagerHandle` gains required `setMarkedObjects`, `setClosedObjects` and
89
+ `setChannelSeats`. Code that builds its own object of these types, such as a
90
+ test double, must add them. Use through a ref is unaffected.
91
+ - **One version of the SDK.** `@seatlayer/js` and `@seatlayer/core` are
92
+ dependencies of this package, pinned to the same version. If your app also
93
+ installs `@seatlayer/js` itself, move it to 0.112.0 as well; an older direct
94
+ install leaves two copies of the SDK in your bundle.
95
+
56
96
  ## Quick start
57
97
 
58
98
  ```tsx
@@ -85,7 +125,7 @@ await chart.current?.releaseLabels(['A-12']); // keep the remainder hel
85
125
  await chart.current?.release(); // release the current hold
86
126
  ```
87
127
 
88
- ### Fixed renewable Season
128
+ ### Season tickets: the same seat on every date
89
129
 
90
130
  ```tsx
91
131
  const season = useRef<SeasonPickerHandle>(null);
@@ -113,6 +153,9 @@ the buyer chooses a type per seat before the hold, and the handoff's `seats`
113
153
  lists each seat's `priceTypeKey`. `holdSameSeat(labels, operationId,
114
154
  { 'A-2': 'child' })` names them yourself; a label left out is adult.
115
155
 
156
+ The Season picker takes the same three 3D props as the seating chart:
157
+ `enable3D`, `enable3DCrowd` and `touchNavigation3D`. Changing one rebuilds it.
158
+
116
159
  The picker opens on step 1, the package with its dates and prices. Pass
117
160
  `package="spl_half"` (the package's key) to open on that package instead of the
118
161
  Season's first one; a host token is already bound to one package, so it ignores
@@ -169,6 +212,7 @@ The full-experience `SeatPicker` exposes the canonical safe widget controls thro
169
212
  | `setSelectableObjects()`, `setMaxSelection()`, `getSelectionValidity()` | Update selection policy and inspect exact-count validity. |
170
213
  | `bestAvailable(qty, categoryKey?, options?)` | Pick and hold server-authoritative seats; options support `preferPremium` and `zoneId`. |
171
214
  | `getCurrentHold()`, `resumeHold()`, `removeHeldTicket()`, `release()` | Inspect and manage the active hold. |
215
+ | `markBooked(holdId?)` | Your page booked the held seats itself: the picker shows its booked state, calls `onBooked` once and unticks that hold's seats. Resolves `false`, changing nothing, for another hold id, no active hold or an unmounted picker. It never books or releases on the server. Right after a rebuild the picker restores a live hold asynchronously: call `markBooked` after `onHoldRestored`, or call it again when it resolves `false` while you expect a hold (see the note under this table). `SeatPicker` only: the `SeatingChart` wrappers (React, Vue, Angular) do not have it. |
172
216
  | `setMapTheme()`, `setEventDetailsHidden()`, `setPricing()` | Update host-owned presentation without remounting or losing a hold. |
173
217
  | `isColorblindSafe()`, `setColorblindSafe()` | Read and update the shared buyer accessibility preference. |
174
218
  | `getViewMode()`, `setViewMode()` | Read and update the 2D map projection. |
@@ -176,6 +220,12 @@ The full-experience `SeatPicker` exposes the canonical safe widget controls thro
176
220
  | `refreshAccess()` | Re-acquire a private buyer-access session. |
177
221
  | `destroy()` | Intentionally omitted: React owns teardown through component unmount. |
178
222
 
223
+ **`markBooked` after a rebuild.** When the picker rebuilds (a prop change that
224
+ remounts it, or a page reload), it restores a live hold asynchronously.
225
+ `markBooked(holdId)` called before the hold is back resolves `false`, and the
226
+ restored hold then offers checkout again. Call it after `onHoldRestored` fires,
227
+ or call it again when it resolves `false` while you expect a hold.
228
+
179
229
  ### Buyer WebMCP tools
180
230
 
181
231
  Set `webMcp` on `SeatPicker` to let a compatible in-browser assistant describe
@@ -219,6 +269,9 @@ Extends the vanilla SDK options minus `container` (the component owns its own mo
219
269
  | `selectableObjects` | `string[] \| null` | Buyer-selectable allow-list. |
220
270
  | `numberOfPlacesToSelect` | `number?` | Exact count required for a valid selection. |
221
271
  | `selectionValidators` | `PickerSelectionValidator[]?` | Minimum, consecutive-seat, and no-orphan guards. |
272
+ | `enable3D` | `boolean?` | Offer the 3D venue view. On by default; `false` hides it. |
273
+ | `enable3DCrowd` | `boolean?` | The standing crowd in 3D. Drawn by default; `false` turns it off. |
274
+ | `touchNavigation3D` | `'map' \| 'classic'?` | How fingers move the 3D view. `'map'` by default; `'classic'` keeps the older gestures. |
222
275
  | `onSelectionChange` | `(seats) => void` | Fires when the selection changes. |
223
276
  | `onSelectionValidityChange` | `(state) => void` | Rule state and typed `violations` after selection changes. |
224
277
  | `onHold` | `(result) => void` | Fires when seats are held; hand `holdId` to your server. |
@@ -292,6 +345,10 @@ and reports the matched sections through the React callback and ref methods.
292
345
  />
293
346
  ```
294
347
 
348
+ `markedObjects={['B-12']}` rings seats in ink (paint only), for example a
349
+ guest's current seat while you move them; a new array moves the rings in place,
350
+ and the ref's `setMarkedObjects(labels)` does the same.
351
+
295
352
  Token rotation and tool changes preserve the live renderer, camera, selection,
296
353
  WebSocket, and DOM. The component responds to its own container, including
297
354
  compact embeds, and the buyer SDK remains unchanged when manager options are off.
@@ -439,23 +496,33 @@ throwing, so a ref used one frame early is safe.
439
496
 
440
497
  ## Frequently asked questions
441
498
 
499
+ ### Which React seating chart component can I use?
500
+
501
+ `@seatlayer/react` gives you a complete seat picker (`SeatPicker`) or the map
502
+ alone (`SeatingChart`), with live availability, seat holds, best available,
503
+ season tickets and, on every plan, a 3D view from each seat for venues up to
504
+ 60,000 seats. A 200,000-seat stadium chart is ready in 1.95 s on desktop, and
505
+ the same charts run in Vue, Angular, iOS, Android, Flutter and React Native.
506
+ You pay only for sold seats, and your own server and payment provider keep the
507
+ order and the money.
508
+
442
509
  ### How do I add a seat map to a React app?
443
510
 
444
- Install `@seatlayer/react`, render `<SeatingChart event="ev_…" />` inside a
445
- container with a definite height, and read the buyer's choice from
446
- `onSelectionChange`. That is a complete interactive seating chart with live
447
- availability; the quick start above is the whole integration, and the
448
- [seat-picker documentation](https://docs.seatlayer.io/buyer-sdk/seat-picker/)
449
- covers props, events, holds, and checkout in depth.
511
+ Install `@seatlayer/react` and render `SeatPicker` for the whole buyer flow:
512
+ live availability, a priced tray, seat holds with a timer, best available, the
513
+ 3D view from each seat on charts up to 60,000 seats, and the checkout hand-off.
514
+ For the map alone inside your own UI, render `SeatingChart` and read the
515
+ buyer's choice from `onSelectionChange`. Give the container a definite height
516
+ and pass your event key and publishable key; your server then books the hold.
450
517
 
451
518
  ### Is this a real React component or an iframe?
452
519
 
453
- `SeatingChart`, `SeatPicker`, and `SeatManager` are real React components that
454
- render a plain `<div>` into your own tree, with no iframe, no portal, and no
455
- stylesheet of their own to fight with. `EmbeddedDesigner` is the one exception:
456
- the organizer Designer is deliberately hosted in a sandboxed iframe so no
457
- Designer credential ever reaches your bundle. If you *want* an iframe for the
458
- buyer picker, `attachPickerFrame` is exported for that.
520
+ `SeatingChart`, `SeatPicker` and `SeatManager` are real React components that
521
+ render into a plain `<div>` in your own tree, with no iframe. `EmbeddedDesigner`
522
+ is the one exception: the organizer Designer runs in an iframe served by
523
+ SeatLayer and opened with a short-lived session URL from your backend, so your
524
+ secret key never reaches the browser. If you want an iframe for the buyer
525
+ picker, `attachPickerFrame` is exported for that.
459
526
 
460
527
  ### What is the difference between `SeatPicker` and `SeatingChart`?
461
528
 
@@ -467,30 +534,28 @@ and drop to `SeatingChart` when your design system owns the chrome.
467
534
 
468
535
  ### How do temporary seat holds work?
469
536
 
470
- When a buyer commits to a selection, `hold()` reserves that inventory against
471
- concurrent buyers for a limited checkout window and returns an opaque `holdId`.
472
- The hold lapses on its own if checkout never completes. `onHoldExpired` tells
537
+ In the SeatLayer picker, a buyer's seats are held when they go to checkout;
538
+ with the bare chart, your code calls `hold()`, which reserves that inventory
539
+ against concurrent buyers for a limited checkout window and returns an opaque
540
+ `holdId`. The hold lapses on its own if checkout never completes. `onHoldExpired` tells
473
541
  the app to return the buyer to the map, and `resumeHold()` restores it after a
474
542
  same-tab checkout navigation or a reload. This is what prevents double-selling
475
543
  without locking seats forever.
476
544
 
477
545
  ### Can I use my own payment provider?
478
546
 
479
- Yes. Nothing in this package takes a payment. The browser hands you a `holdId`
480
- and a self-contained `CheckoutHandoff` with the priced line items, your backend
481
- charges through whatever provider you already use, and it then books the hold
482
- through the
483
- [server-side checkout flow](https://docs.seatlayer.io/buyer-sdk/holds-and-checkout/).
484
- The opt-in `checkout: 'hosted'` mode exists for hosts with no backend at all;
485
- without it, no payment code is downloaded.
547
+ Yes. By default nothing in this package takes a payment: the browser hands you
548
+ a `holdId` and a `CheckoutHandoff` with the priced line items, and your backend
549
+ charges through the provider you already use, then books the hold. For a host
550
+ with no backend, the opt-in `checkout: 'hosted'` mode sends the buyer through
551
+ SeatLayer's checkout instead; without it, no payment code is downloaded.
486
552
 
487
553
  ### Can I evaluate it without a SeatLayer account?
488
554
 
489
- You can explore a live seating chart in the browser at the
490
- [buyer seat-map demo](https://app.seatlayer.io/demo/play/grand-theatre) with no
491
- account. Rendering your own venue needs an event key, because the chart and its
492
- availability are served by the SeatLayer API: create a free test event for
493
- that, which books no real inventory.
555
+ Yes. The live Grand Theatre demo runs in your browser with no account. To show
556
+ your own venue you need an event key, and test mode is free with no time limit
557
+ and no card: test events, holds and webhooks work like production and use no
558
+ credits.
494
559
 
495
560
  ### Does it work with Next.js and other React frameworks?
496
561
 
@@ -499,19 +564,37 @@ there, so a server render emits the empty container. This package ships no
499
564
  `'use client'` banner of its own, so in the App Router mark your own component
500
565
  that imports it, or load it through `next/dynamic` with `ssr: false`.
501
566
 
567
+ ### How much does the SeatLayer SDK cost?
568
+
569
+ Building and testing is free, and going live costs $0. You pay one credit per
570
+ sold seat: the first 100 sold seats each month are free, then 10¢ down to 5¢ a
571
+ seat, with no subscription, and credits you buy never expire. Browsing the map,
572
+ holds and the 3D view never use a credit.
573
+
574
+ ### Can I sell season tickets with it?
575
+
576
+ Yes. `SeasonPicker` holds the same seat on every date of a season in one step,
577
+ with best available across every date and a price type such as adult or child
578
+ for each seat, and returning holders can tell you they will renew. The hand-off
579
+ carries no price; by default your server applies the package price and books
580
+ it, and the opt-in `checkout: 'hosted'` takes the payment through SeatLayer's
581
+ checkout instead, into the organizer's own payment account. `SeasonPicker` is in `@seatlayer/react` 0.72.0 and newer.
582
+
502
583
  ## Continue your React integration
503
584
 
504
585
  - [Follow the buyer SDK installation guide](https://docs.seatlayer.io/buyer-sdk/install/)
505
586
  for the full browser integration, options, and events.
506
587
  - [Build a React or Next.js seating chart](https://docs.seatlayer.io/buyer-sdk/react-seating-chart/)
507
588
  with the framework-specific tutorial and client-mounting guidance.
589
+ - [Read the seat picker documentation](https://docs.seatlayer.io/buyer-sdk/seat-picker/)
590
+ for props, events, holds, and checkout in depth.
508
591
  - [Connect seat holds to secure server-side checkout](https://docs.seatlayer.io/buyer-sdk/holds-and-checkout/)
509
592
  without putting booking credentials in the browser.
510
593
  - [Run the complete checkout example](https://docs.seatlayer.io/examples/complete-checkout/)
511
594
  to connect a buyer hold id to payment and idempotent booking.
512
595
  - [Compare SeatLayer's mobile seat map SDKs](https://docs.seatlayer.io/buyer-sdk/mobile/)
513
- when the same event also has to render in native iOS, Android, Flutter, or
514
- React Native apps.
596
+ when the same event also has to appear in your iOS, Android, Flutter or React
597
+ Native app.
515
598
  - [Read the embedded Designer guide](https://docs.seatlayer.io/platform/embedded-designer/)
516
599
  to let organizers draw their own venues inside your product.
517
600
  - [Explore the 3D seating chart](https://seatlayer.io/3d-seat-map/) for the
@@ -28,6 +28,7 @@ var SeatManager = forwardRef(
28
28
  unavailableObjectsSelectable,
29
29
  unavailableObjects,
30
30
  unavailableObjectsReason,
31
+ markedObjects,
31
32
  categoryPrices,
32
33
  maxSelectedObjects,
33
34
  numberOfPlacesToSelect,
@@ -60,6 +61,7 @@ var SeatManager = forwardRef(
60
61
  unavailableObjectsSelectable,
61
62
  unavailableObjects,
62
63
  unavailableObjectsReason,
64
+ markedObjects,
63
65
  categoryPrices,
64
66
  maxSelectedObjects,
65
67
  numberOfPlacesToSelect,
@@ -115,6 +117,8 @@ var SeatManager = forwardRef(
115
117
  onOpenOrder: callbacks.current.onOpenOrder ? (order) => callbacks.current.onOpenOrder?.(order) : void 0,
116
118
  onActionComplete: (r) => callbacks.current.onActionComplete?.(r),
117
119
  onConnectionChange: (s) => callbacks.current.onConnectionChange?.(s),
120
+ // Read once at mount: whether the panel offers Open seats at all.
121
+ ...props.onOpenSeats ? { onOpenSeats: () => callbacks.current.onOpenSeats?.() } : {},
118
122
  onRoomStateChange: (s) => callbacks.current.onRoomStateChange?.(s),
119
123
  onError: (e) => callbacks.current.onError?.(e)
120
124
  });
@@ -171,6 +175,9 @@ var SeatManager = forwardRef(
171
175
  useEffect(() => {
172
176
  managerRef.current?.setUnavailableObjects(unavailableObjects ?? [], unavailableObjectsReason);
173
177
  }, [unavailableObjects, unavailableObjectsReason]);
178
+ useEffect(() => {
179
+ managerRef.current?.setMarkedObjects(markedObjects ?? []);
180
+ }, [markedObjects]);
174
181
  useEffect(() => {
175
182
  managerRef.current?.setCategoryPrices(categoryPrices);
176
183
  }, [categoryPrices]);
@@ -210,6 +217,7 @@ var SeatManager = forwardRef(
210
217
  setSelectableObjects: (labels) => managerRef.current?.setSelectableObjects(labels),
211
218
  setUnavailableObjectsSelectable: (enabled) => managerRef.current?.setUnavailableObjectsSelectable(enabled),
212
219
  setUnavailableObjects: (labels, reason) => managerRef.current?.setUnavailableObjects(labels, reason),
220
+ setMarkedObjects: (labels) => managerRef.current?.setMarkedObjects(labels),
213
221
  setCategoryPrices: (prices) => managerRef.current?.setCategoryPrices(prices),
214
222
  setObjectSelectable: (predicate) => managerRef.current?.setObjectSelectable(predicate),
215
223
  setMaxSelectedObjects: (max) => managerRef.current?.setMaxSelectedObjects(max),
@@ -227,7 +235,9 @@ var SeatManager = forwardRef(
227
235
  getConnection: () => managerRef.current?.getConnection() ?? null,
228
236
  setHoldTtl: (ms) => managerRef.current?.setHoldTtl(ms) ?? Promise.resolve(),
229
237
  zoomToFit: () => managerRef.current?.zoomToFit(),
230
- showObjects: (labels, name) => managerRef.current?.showObjects(labels, name)
238
+ showObjects: (labels, name) => managerRef.current?.showObjects(labels, name),
239
+ setClosedObjects: (labels) => managerRef.current?.setClosedObjects(labels),
240
+ setChannelSeats: (seats) => managerRef.current?.setChannelSeats(seats)
231
241
  }),
232
242
  []
233
243
  );
@@ -238,4 +248,4 @@ var SeatManager = forwardRef(
238
248
  export {
239
249
  SeatManager
240
250
  };
241
- //# sourceMappingURL=chunk-G2IR4R37.js.map
251
+ //# sourceMappingURL=chunk-GEZQG3MZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/SeatManager.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n SeatManager as CoreSeatManager,\n type SeatManagerOptions,\n type SeatManagerMode,\n type EventScopedManageToken,\n type SeatManagerTallies,\n type SeatManagerSale,\n type SeatManagerActivity,\n type SeatManagerActionResult,\n type SeatManagerConnection,\n type SeatManagerRoomState,\n type SeatManagerFilteredSection,\n type SeatManagerSelectionValidity,\n type SeatManagerCategoryPrice,\n type EventTableBookingMode,\n type ReportResult,\n type ControlRoomSnapshot,\n type LogEntry,\n type ExpandedSeat,\n// `@seatlayer/js/manager`, NOT the bare `@seatlayer/js` barrel. The barrel is a\n// buyer SDK that also exports the cockpit, so importing the cockpit through it\n// drags SeatPicker, SeatingChart, EmbeddedDesigner and the engine code only\n// those reach into every bundle that renders a control room. See the header of\n// `@seatlayer/js`'s `src/manager.ts` for the measurement.\n} from '@seatlayer/js/manager';\n\nexport type {\n SeatManagerOptions,\n SeatManagerMode,\n EventScopedManageToken,\n SeatManagerTallies,\n SeatManagerSale,\n SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\n SeatManagerRoomState,\n SeatManagerFilteredSection,\n SeatManagerSelectionValidity,\n SeatManagerCategoryPrice,\n EventTableBookingMode,\n} from '@seatlayer/js/manager';\n\n/** Imperative handle for the organizer manage board. */\nexport interface SeatManagerHandle {\n setMode(mode: SeatManagerMode): void;\n setToken(token: EventScopedManageToken, expiresAt?: number): void;\n setHeatOverlay(enabled: boolean): void;\n setFollowLive(enabled: boolean): void;\n setTrendWindow(windowMinutes: number): Promise<ControlRoomSnapshot>;\n enterFullscreen(): Promise<void>;\n exitFullscreen(): Promise<void>;\n isFullscreen(): boolean;\n block(labels?: string[], opts?: { releaseAt?: number; reason?: string }): Promise<void>;\n unblock(labels?: string[]): Promise<void>;\n unblockAll(): Promise<void>;\n cancelBooking(labels: string[], bookingRef: string): Promise<void>;\n setCategory(categoryKey: string, labels?: string[]): Promise<void>;\n setTableBooking(\n tableIds: string[],\n mode: EventTableBookingMode,\n bounds?: { minOccupancy?: number; maxOccupancy?: number },\n ): Promise<void>;\n selectAll(): ExpandedSeat[];\n selectSection(sectionId: string): ExpandedSeat[];\n selectByLabels(labels: string[]): ExpandedSeat[];\n selectObjects(labels: string[]): ExpandedSeat[];\n deselectObjects(labels: string[]): ExpandedSeat[];\n selectCategories(keys: string[]): ExpandedSeat[];\n deselectCategories(keys: string[]): ExpandedSeat[];\n setSelectableObjects(labels: string[]): void;\n setUnavailableObjectsSelectable(enabled: boolean): void;\n /** Replace the labels shown as unavailable (and their hover word) without remounting. */\n setUnavailableObjects(labels: readonly string[], reason?: string): void;\n /** Replace the labels ringed in ink (paint only) without remounting. */\n setMarkedObjects(labels: readonly string[]): void;\n /** Replace the prices the map's hover shows: a map overrides, null hides, undefined uses the chart's. */\n setCategoryPrices(prices: Record<string, SeatManagerCategoryPrice> | null | undefined): void;\n setObjectSelectable(predicate: SeatManagerOptions['isObjectSelectable']): void;\n setMaxSelectedObjects(max: number | undefined): void;\n setNumberOfPlacesToSelect(required: number | undefined): void;\n getSelectionValidity(): SeatManagerSelectionValidity | null;\n setFilteredSection(label: string): SeatManagerFilteredSection[];\n clearFilteredSection(): void;\n /** Frame matching sections in any mode, without filtering or touching the selection. */\n focusSection(label: string): SeatManagerFilteredSection[];\n getFilteredSections(): SeatManagerFilteredSection[];\n clearSelection(): void;\n getSelection(): ExpandedSeat[];\n getReport(): Promise<ReportResult>;\n getControlRoomSnapshot(windowMinutes?: number): Promise<ControlRoomSnapshot>;\n getLog(opts?: { limit?: number; before?: number }): Promise<{ entries: LogEntry[]; nextBefore: number | null }>;\n setHoldTtl(ms: number | null): Promise<void>;\n /**\n * Realtime link state plus the \"as of\" behind the numbers on screen.\n *\n * Null only before the manager has mounted. Pair with the `onConnectionChange`\n * prop: the callback gives the edges, this gives the answer on demand — which\n * is what a host needs on tab focus, when no transition is coming.\n */\n getConnection(): SeatManagerConnection | null;\n zoomToFit(): void;\n /** Light these seats and frame them, named in the legend; null clears (CR18). */\n showObjects(labels: readonly string[] | null, name?: string): void;\n /** The Closed seats, drawn hollow with \"Not for sale\" on their card; [] clears (CR26). */\n setClosedObjects(labels: readonly string[]): void;\n /** The legend's channel line and each seat's channel name, from the event's own channels (CR26). */\n setChannelSeats(seats: SeatManagerOptions['channelSeats']): void;\n}\n\nexport interface SeatManagerProps extends Omit<SeatManagerOptions, 'container'> {\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * React wrapper around the framework-agnostic {@link CoreSeatManager}. Give the\n * wrapping div a size (it fills its box — a war-room board wants a big one) and\n * the manager lays out the live map + KPI bar + rails inside it. Rebuilt only\n * when the event identity / apiBase changes. Tokens, declared capabilities,\n * theme, fallback currency, background liveness, and callbacks are updated in\n * place without tearing the board down.\n */\nexport const SeatManager = forwardRef<SeatManagerHandle, SeatManagerProps>(\n function SeatManager(props, ref) {\n const {\n className, style, apiBase, eventKey, token, tokenExpiresAt,\n mode, currency, keepLiveWhileHidden, followLive, capabilities,\n selectedObjects, selectableObjects, unavailableObjectsSelectable,\n unavailableObjects, unavailableObjectsReason, markedObjects, categoryPrices,\n maxSelectedObjects, numberOfPlacesToSelect, isObjectSelectable, tools, chrome, kpis, timeZone,\n } = props;\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n const managerRef = useRef<CoreSeatManager | null>(null);\n\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n const manager = new CoreSeatManager({\n container: el,\n apiBase,\n eventKey,\n token,\n tokenExpiresAt,\n mode,\n currency,\n keepLiveWhileHidden,\n followLive,\n capabilities,\n selectedObjects,\n selectableObjects,\n unavailableObjectsSelectable,\n unavailableObjects,\n unavailableObjectsReason,\n markedObjects,\n categoryPrices,\n maxSelectedObjects,\n numberOfPlacesToSelect,\n isObjectSelectable,\n // Which tools the cockpit offers (Watch / Manage / Host tools). Read\n // once at mount like `capabilities`: hosts decide this per surface,\n // not per render.\n tools,\n // `minimal` = just the map (a host with its own search, totals and\n // actions). Read once at mount, like `tools`.\n chrome,\n // false when the host shows the numbers in its own header (CR04). Read once at mount.\n kpis,\n // The event's clock for every time the room shows (audit M8). Read once at mount.\n timeZone,\n // \"Ask an admin of <organisation>\" (CR16). Read once at mount.\n organizationName: callbacks.current.organizationName,\n // The host's sale facts (CR18); updated in place below.\n sale: callbacks.current.sale,\n // The host's overlays over the map (CR18 resale strip); updated in place below.\n mapInsets: callbacks.current.mapInsets,\n theme: callbacks.current.theme,\n // Light / dark / follow the operator's own preference. Applied before\n // first paint so a cockpit asked for light never flashes the war-room\n // dark on the way in.\n themeMode: callbacks.current.themeMode,\n // Where a link opens the room (board CR24): read once at mount, like `mode`.\n colourBy: callbacks.current.colourBy,\n focusSection: callbacks.current.focusSection,\n focusSeat: callbacks.current.focusSeat,\n focusSeats: callbacks.current.focusSeats,\n focusCategory: callbacks.current.focusCategory,\n arrivedFrom: callbacks.current.arrivedFrom,\n onOpenTrend: callbacks.current.onOpenTrend ? (focus) => callbacks.current.onOpenTrend?.(focus) : undefined,\n onOpenDesigner: callbacks.current.onOpenDesigner ? () => callbacks.current.onOpenDesigner?.() : undefined,\n onReady: () => callbacks.current.onReady?.(),\n onTallies: (t: SeatManagerTallies) => callbacks.current.onTallies?.(t),\n onActivity: (activity: SeatManagerActivity) => callbacks.current.onActivity?.(activity),\n onControlRoom: (snapshot: ControlRoomSnapshot) => callbacks.current.onControlRoom?.(snapshot),\n onTokenRefresh: callbacks.current.onTokenRefresh ? async () => callbacks.current.onTokenRefresh!() : undefined,\n onModeChange: (nextMode) => callbacks.current.onModeChange?.(nextMode),\n onFollowLiveChange: (enabled) => callbacks.current.onFollowLiveChange?.(enabled),\n onSelectionChange: (s: ExpandedSeat[]) => callbacks.current.onSelectionChange?.(s),\n onObjectSelected: (object) => callbacks.current.onObjectSelected?.(object),\n onObjectDeselected: (object) => callbacks.current.onObjectDeselected?.(object),\n onSelectionValidityChange: (state) => callbacks.current.onSelectionValidityChange?.(state),\n onSelectionValid: (state) => callbacks.current.onSelectionValid?.(state),\n onSelectionInvalid: (state) => callbacks.current.onSelectionInvalid?.(state),\n onSelectionLimit: (max) => callbacks.current.onSelectionLimit?.(max),\n onFilteredSectionChange: (sections) => callbacks.current.onFilteredSectionChange?.(sections),\n onAreaClick: (area) => callbacks.current.onAreaClick?.(area),\n // Only a host that can show an order gets the search's \"Open order\".\n onOpenOrder: callbacks.current.onOpenOrder ? (order: { id: string; displayRef: string }) => callbacks.current.onOpenOrder?.(order) : undefined,\n onActionComplete: (r: SeatManagerActionResult) => callbacks.current.onActionComplete?.(r),\n onConnectionChange: (s: SeatManagerConnection) => callbacks.current.onConnectionChange?.(s),\n // Read once at mount: whether the panel offers Open seats at all.\n ...(props.onOpenSeats ? { onOpenSeats: () => callbacks.current.onOpenSeats?.() } : {}),\n onRoomStateChange: (s) => callbacks.current.onRoomStateChange?.(s),\n onError: (e: unknown) => callbacks.current.onError?.(e),\n });\n managerRef.current = manager;\n void manager.render();\n\n return () => {\n manager.destroy();\n managerRef.current = null;\n };\n // Rebuild only on identity change (not on every callback change).\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [apiBase, eventKey]);\n\n // Rotate credentials without losing camera, selection, realtime state or DOM.\n useEffect(() => {\n managerRef.current?.setToken(token, tokenExpiresAt);\n }, [token, tokenExpiresAt]);\n\n useEffect(() => {\n managerRef.current?.setCapabilities(capabilities);\n }, [capabilities]);\n\n useEffect(() => {\n managerRef.current?.setCurrency(currency);\n }, [currency]);\n\n useEffect(() => {\n managerRef.current?.setTheme(props.theme);\n }, [props.theme]);\n\n // By value: a host that rebuilds the object each render costs no repaint.\n const sale = props.sale;\n useEffect(() => {\n managerRef.current?.setSale(sale);\n }, [sale?.status, sale?.tone, sale?.openedAt, sale?.pageUrl]); // eslint-disable-line react-hooks/exhaustive-deps\n\n // By value: a host that rebuilds the object each render costs no refit.\n const insets = props.mapInsets;\n useEffect(() => {\n managerRef.current?.setMapInsets(insets ?? null);\n }, [insets?.top, insets?.right, insets?.bottom, insets?.left]); // eslint-disable-line react-hooks/exhaustive-deps\n\n // Reflected in place: the cockpit keeps the operator's selection, the\n // camera and the realtime socket across a mode change.\n useEffect(() => {\n managerRef.current?.setThemeMode(props.themeMode);\n }, [props.themeMode]);\n\n useEffect(() => {\n managerRef.current?.setKeepLiveWhileHidden(keepLiveWhileHidden);\n }, [keepLiveWhileHidden]);\n\n useEffect(() => {\n managerRef.current?.setTokenRefresh(\n props.onTokenRefresh ? async () => callbacks.current.onTokenRefresh!() : undefined,\n );\n }, [!!props.onTokenRefresh]);\n\n // Reflect a controlled `mode` prop onto the live instance without rebuilding.\n useEffect(() => {\n if (mode) managerRef.current?.setMode(mode);\n }, [mode]);\n\n useEffect(() => {\n if (followLive != null) managerRef.current?.setFollowLive(followLive);\n }, [followLive]);\n\n useEffect(() => {\n managerRef.current?.setSelectableObjects(selectableObjects ?? []);\n }, [selectableObjects]);\n\n useEffect(() => {\n managerRef.current?.setUnavailableObjectsSelectable(unavailableObjectsSelectable ?? true);\n }, [unavailableObjectsSelectable]);\n\n // Repainted in place: the listed seats change colour, nothing remounts.\n // The manager ignores a list with the same labels, so a host that rebuilds\n // the array each render costs no repaint.\n useEffect(() => {\n managerRef.current?.setUnavailableObjects(unavailableObjects ?? [], unavailableObjectsReason);\n }, [unavailableObjects, unavailableObjectsReason]);\n\n // Rings move in place. With nothing marked the map is never touched.\n useEffect(() => {\n managerRef.current?.setMarkedObjects(markedObjects ?? []);\n }, [markedObjects]);\n\n // Hover prices change in place. The renderer ignores an equal price map,\n // so a host that rebuilds the object each render costs no repaint.\n useEffect(() => {\n managerRef.current?.setCategoryPrices(categoryPrices);\n }, [categoryPrices]);\n\n useEffect(() => {\n managerRef.current?.setMaxSelectedObjects(maxSelectedObjects);\n }, [maxSelectedObjects]);\n\n useEffect(() => {\n managerRef.current?.setNumberOfPlacesToSelect(numberOfPlacesToSelect);\n }, [numberOfPlacesToSelect]);\n\n useEffect(() => {\n managerRef.current?.setObjectSelectable(isObjectSelectable);\n }, [isObjectSelectable]);\n\n useImperativeHandle(\n ref,\n (): SeatManagerHandle => ({\n setMode: (m) => managerRef.current?.setMode(m),\n setToken: (nextToken, expiresAt) => managerRef.current?.setToken(nextToken, expiresAt),\n setHeatOverlay: (enabled) => managerRef.current?.setHeatOverlay(enabled),\n setFollowLive: (enabled) => managerRef.current?.setFollowLive(enabled),\n setTrendWindow: (windowMinutes) => managerRef.current?.setTrendWindow(windowMinutes)\n ?? Promise.reject(new Error('not ready')),\n enterFullscreen: () => managerRef.current?.enterFullscreen() ?? Promise.resolve(),\n exitFullscreen: () => managerRef.current?.exitFullscreen() ?? Promise.resolve(),\n isFullscreen: () => managerRef.current?.isFullscreen() ?? false,\n block: (labels, opts) => managerRef.current?.block(labels, opts) ?? Promise.resolve(),\n unblock: (labels) => managerRef.current?.unblock(labels) ?? Promise.resolve(),\n unblockAll: () => managerRef.current?.unblockAll() ?? Promise.resolve(),\n cancelBooking: (labels, bookingRef) => managerRef.current?.cancelBooking(labels, bookingRef) ?? Promise.resolve(),\n setCategory: (categoryKey, labels) => managerRef.current?.setCategory(categoryKey, labels) ?? Promise.resolve(),\n setTableBooking: (tableIds, nextMode, bounds) => managerRef.current?.setTableBooking(tableIds, nextMode, bounds)\n ?? Promise.resolve(),\n selectAll: () => managerRef.current?.selectAll() ?? [],\n selectSection: (id) => managerRef.current?.selectSection(id) ?? [],\n selectByLabels: (labels) => managerRef.current?.selectByLabels(labels) ?? [],\n selectObjects: (labels) => managerRef.current?.selectObjects(labels) ?? [],\n deselectObjects: (labels) => managerRef.current?.deselectObjects(labels) ?? [],\n selectCategories: (keys) => managerRef.current?.selectCategories(keys) ?? [],\n deselectCategories: (keys) => managerRef.current?.deselectCategories(keys) ?? [],\n setSelectableObjects: (labels) => managerRef.current?.setSelectableObjects(labels),\n setUnavailableObjectsSelectable: (enabled) => managerRef.current?.setUnavailableObjectsSelectable(enabled),\n setUnavailableObjects: (labels, reason) => managerRef.current?.setUnavailableObjects(labels, reason),\n setMarkedObjects: (labels) => managerRef.current?.setMarkedObjects(labels),\n setCategoryPrices: (prices) => managerRef.current?.setCategoryPrices(prices),\n setObjectSelectable: (predicate) => managerRef.current?.setObjectSelectable(predicate),\n setMaxSelectedObjects: (max) => managerRef.current?.setMaxSelectedObjects(max),\n setNumberOfPlacesToSelect: (required) => managerRef.current?.setNumberOfPlacesToSelect(required),\n getSelectionValidity: () => managerRef.current?.getSelectionValidity() ?? null,\n setFilteredSection: (label) => managerRef.current?.setFilteredSection(label) ?? [],\n clearFilteredSection: () => managerRef.current?.clearFilteredSection(),\n focusSection: (label) => managerRef.current?.focusSection(label) ?? [],\n getFilteredSections: () => managerRef.current?.getFilteredSections() ?? [],\n clearSelection: () => managerRef.current?.clearSelection(),\n getSelection: () => managerRef.current?.getSelection() ?? [],\n getReport: () => managerRef.current?.getReport() ?? Promise.reject(new Error('not ready')),\n getControlRoomSnapshot: (windowMinutes) => managerRef.current?.getControlRoomSnapshot(windowMinutes)\n ?? Promise.reject(new Error('not ready')),\n getLog: (opts) => managerRef.current?.getLog(opts) ?? Promise.resolve({ entries: [], nextBefore: null }),\n getConnection: () => managerRef.current?.getConnection() ?? null,\n setHoldTtl: (ms) => managerRef.current?.setHoldTtl(ms) ?? Promise.resolve(),\n zoomToFit: () => managerRef.current?.zoomToFit(),\n showObjects: (labels, name) => managerRef.current?.showObjects(labels, name),\n setClosedObjects: (labels) => managerRef.current?.setClosedObjects(labels),\n setChannelSeats: (seats) => managerRef.current?.setChannelSeats(seats),\n }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE,eAAe;AAAA,OAuBV;AAiWI;AA/PJ,IAAM,cAAc;AAAA,EACzB,SAASA,aAAY,OAAO,KAAK;AAC/B,UAAM;AAAA,MACJ;AAAA,MAAW;AAAA,MAAO;AAAA,MAAS;AAAA,MAAU;AAAA,MAAO;AAAA,MAC5C;AAAA,MAAM;AAAA,MAAU;AAAA,MAAqB;AAAA,MAAY;AAAA,MACjD;AAAA,MAAiB;AAAA,MAAmB;AAAA,MACpC;AAAA,MAAoB;AAAA,MAA0B;AAAA,MAAe;AAAA,MAC7D;AAAA,MAAoB;AAAA,MAAwB;AAAA,MAAoB;AAAA,MAAO;AAAA,MAAQ;AAAA,MAAM;AAAA,IACvF,IAAI;AAEJ,UAAM,eAAe,OAA8B,IAAI;AACvD,UAAM,aAAa,OAA+B,IAAI;AAEtD,UAAM,YAAY,OAAO,KAAK;AAC9B,cAAU,UAAU;AAEpB,cAAU,MAAM;AACd,YAAM,KAAK,aAAa;AACxB,UAAI,CAAC,GAAI;AAET,YAAM,UAAU,IAAI,gBAAgB;AAAA,QAClC,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA;AAAA;AAAA,QAIA;AAAA;AAAA;AAAA,QAGA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA,kBAAkB,UAAU,QAAQ;AAAA;AAAA,QAEpC,MAAM,UAAU,QAAQ;AAAA;AAAA,QAExB,WAAW,UAAU,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SAAS,mBAAmB,KAAK,KAAK,CAAC;AAAA,QACjF,sBAAsB,MAAM,WAAW,SAAS,qBAAqB;AAAA,QACrE,cAAc,CAAC,UAAU,WAAW,SAAS,aAAa,KAAK,KAAK,CAAC;AAAA,QACrE,qBAAqB,MAAM,WAAW,SAAS,oBAAoB,KAAK,CAAC;AAAA,QACzE,gBAAgB,MAAM,WAAW,SAAS,eAAe;AAAA,QACzD,cAAc,MAAM,WAAW,SAAS,aAAa,KAAK,CAAC;AAAA,QAC3D,WAAW,MAAM,WAAW,SAAS,UAAU,KAAK,QAAQ,OAAO,IAAI,MAAM,WAAW,CAAC;AAAA,QACzF,wBAAwB,CAAC,kBAAkB,WAAW,SAAS,uBAAuB,aAAa,KAC9F,QAAQ,OAAO,IAAI,MAAM,WAAW,CAAC;AAAA,QAC1C,QAAQ,CAAC,SAAS,WAAW,SAAS,OAAO,IAAI,KAAK,QAAQ,QAAQ,EAAE,SAAS,CAAC,GAAG,YAAY,KAAK,CAAC;AAAA,QACvG,eAAe,MAAM,WAAW,SAAS,cAAc,KAAK;AAAA,QAC5D,YAAY,CAAC,OAAO,WAAW,SAAS,WAAW,EAAE,KAAK,QAAQ,QAAQ;AAAA,QAC1E,WAAW,MAAM,WAAW,SAAS,UAAU;AAAA,QAC/C,aAAa,CAAC,QAAQ,SAAS,WAAW,SAAS,YAAY,QAAQ,IAAI;AAAA,QAC3E,kBAAkB,CAAC,WAAW,WAAW,SAAS,iBAAiB,MAAM;AAAA,QACzE,iBAAiB,CAAC,UAAU,WAAW,SAAS,gBAAgB,KAAK;AAAA,MACvE;AAAA,MACA,CAAC;AAAA,IACH;AAEA,WAAO,oBAAC,SAAI,KAAK,cAAc,WAAsB,OAAc;AAAA,EACrE;AACF;","names":["SeatManager"]}
package/dist/index.cjs CHANGED
@@ -51,7 +51,10 @@ var SeatingChart = (0, import_react.forwardRef)(
51
51
  currency,
52
52
  colorblindSafe,
53
53
  initialView,
54
- errorDisplay
54
+ errorDisplay,
55
+ enable3D,
56
+ enable3DCrowd,
57
+ touchNavigation3D
55
58
  } = props;
56
59
  const containerRef = (0, import_react.useRef)(null);
57
60
  const chartRef = (0, import_react.useRef)(null);
@@ -76,6 +79,9 @@ var SeatingChart = (0, import_react.forwardRef)(
76
79
  colorblindSafe,
77
80
  initialView,
78
81
  errorDisplay,
82
+ enable3D,
83
+ enable3DCrowd,
84
+ touchNavigation3D,
79
85
  messages: callbacks.current.messages,
80
86
  seatTooltip: props.seatTooltip,
81
87
  // Read through the ref so a host may pass the provider as an inline
@@ -108,7 +114,7 @@ var SeatingChart = (0, import_react.forwardRef)(
108
114
  chart.destroy();
109
115
  chartRef.current = null;
110
116
  };
111
- }, [event, apiBase, maxSelection, numberOfPlacesToSelect, selectionValidators, publicKey, locale, currency, colorblindSafe, initialView, errorDisplay]);
117
+ }, [event, apiBase, maxSelection, numberOfPlacesToSelect, selectionValidators, publicKey, locale, currency, colorblindSafe, initialView, errorDisplay, enable3D, enable3DCrowd, touchNavigation3D]);
112
118
  (0, import_react.useImperativeHandle)(ref, () => (0, import_js.bindSeatingChartHandle)(() => chartRef.current), []);
113
119
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: containerRef, className, style });
114
120
  }
@@ -253,6 +259,7 @@ var SeatPicker = (0, import_react3.forwardRef)(
253
259
  getCurrentHold: () => pickerRef.current?.getCurrentHold() ?? null,
254
260
  resumeHold: (holdId) => pickerRef.current?.resumeHold(holdId) ?? Promise.resolve(null),
255
261
  removeHeldTicket: (label) => pickerRef.current?.removeHeldTicket(label) ?? Promise.resolve(false),
262
+ markBooked: (holdId) => pickerRef.current?.markBooked(holdId) ?? Promise.resolve(false),
256
263
  release: () => pickerRef.current?.release() ?? Promise.resolve(),
257
264
  holdSelection: () => pickerRef.current?.holdSelection() ?? Promise.resolve({ ok: false, reason: "nothing_selected", message: "" }),
258
265
  refreshAccess: () => pickerRef.current?.refreshAccess() ?? Promise.resolve(false),
@@ -401,6 +408,7 @@ var SeatManager = (0, import_react5.forwardRef)(
401
408
  unavailableObjectsSelectable,
402
409
  unavailableObjects,
403
410
  unavailableObjectsReason,
411
+ markedObjects,
404
412
  categoryPrices,
405
413
  maxSelectedObjects,
406
414
  numberOfPlacesToSelect,
@@ -433,6 +441,7 @@ var SeatManager = (0, import_react5.forwardRef)(
433
441
  unavailableObjectsSelectable,
434
442
  unavailableObjects,
435
443
  unavailableObjectsReason,
444
+ markedObjects,
436
445
  categoryPrices,
437
446
  maxSelectedObjects,
438
447
  numberOfPlacesToSelect,
@@ -488,6 +497,8 @@ var SeatManager = (0, import_react5.forwardRef)(
488
497
  onOpenOrder: callbacks.current.onOpenOrder ? (order) => callbacks.current.onOpenOrder?.(order) : void 0,
489
498
  onActionComplete: (r) => callbacks.current.onActionComplete?.(r),
490
499
  onConnectionChange: (s) => callbacks.current.onConnectionChange?.(s),
500
+ // Read once at mount: whether the panel offers Open seats at all.
501
+ ...props.onOpenSeats ? { onOpenSeats: () => callbacks.current.onOpenSeats?.() } : {},
491
502
  onRoomStateChange: (s) => callbacks.current.onRoomStateChange?.(s),
492
503
  onError: (e) => callbacks.current.onError?.(e)
493
504
  });
@@ -544,6 +555,9 @@ var SeatManager = (0, import_react5.forwardRef)(
544
555
  (0, import_react5.useEffect)(() => {
545
556
  managerRef.current?.setUnavailableObjects(unavailableObjects ?? [], unavailableObjectsReason);
546
557
  }, [unavailableObjects, unavailableObjectsReason]);
558
+ (0, import_react5.useEffect)(() => {
559
+ managerRef.current?.setMarkedObjects(markedObjects ?? []);
560
+ }, [markedObjects]);
547
561
  (0, import_react5.useEffect)(() => {
548
562
  managerRef.current?.setCategoryPrices(categoryPrices);
549
563
  }, [categoryPrices]);
@@ -583,6 +597,7 @@ var SeatManager = (0, import_react5.forwardRef)(
583
597
  setSelectableObjects: (labels) => managerRef.current?.setSelectableObjects(labels),
584
598
  setUnavailableObjectsSelectable: (enabled) => managerRef.current?.setUnavailableObjectsSelectable(enabled),
585
599
  setUnavailableObjects: (labels, reason) => managerRef.current?.setUnavailableObjects(labels, reason),
600
+ setMarkedObjects: (labels) => managerRef.current?.setMarkedObjects(labels),
586
601
  setCategoryPrices: (prices) => managerRef.current?.setCategoryPrices(prices),
587
602
  setObjectSelectable: (predicate) => managerRef.current?.setObjectSelectable(predicate),
588
603
  setMaxSelectedObjects: (max) => managerRef.current?.setMaxSelectedObjects(max),
@@ -600,7 +615,9 @@ var SeatManager = (0, import_react5.forwardRef)(
600
615
  getConnection: () => managerRef.current?.getConnection() ?? null,
601
616
  setHoldTtl: (ms) => managerRef.current?.setHoldTtl(ms) ?? Promise.resolve(),
602
617
  zoomToFit: () => managerRef.current?.zoomToFit(),
603
- showObjects: (labels, name) => managerRef.current?.showObjects(labels, name)
618
+ showObjects: (labels, name) => managerRef.current?.showObjects(labels, name),
619
+ setClosedObjects: (labels) => managerRef.current?.setClosedObjects(labels),
620
+ setChannelSeats: (seats) => managerRef.current?.setChannelSeats(seats)
604
621
  }),
605
622
  []
606
623
  );