@seatlayer/react 0.48.1 → 0.49.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 +22 -1
- package/dist/{chunk-LDGWXUUS.js → chunk-3O4YZE4V.js} +18 -1
- package/dist/chunk-3O4YZE4V.js.map +1 -0
- package/dist/index.cjs +67 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -6
- package/dist/index.d.ts +26 -6
- package/dist/index.js +51 -8
- package/dist/index.js.map +1 -1
- package/dist/manager.cjs +17 -0
- package/dist/manager.cjs.map +1 -1
- package/dist/manager.d.cts +6 -5
- package/dist/manager.d.ts +6 -5
- package/dist/manager.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-LDGWXUUS.js.map +0 -1
package/README.md
CHANGED
|
@@ -52,6 +52,24 @@ await chart.current?.releaseLabels(['A-12']); // keep the remainder hel
|
|
|
52
52
|
await chart.current?.release(); // release the current hold
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
### Full SeatPicker imperative contract
|
|
56
|
+
|
|
57
|
+
The full-experience `SeatPicker` exposes the canonical safe widget controls through
|
|
58
|
+
`SeatPickerHandle`:
|
|
59
|
+
|
|
60
|
+
| React ref method | Contract |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| `close()` | Logically close the picker. The host should still unmount the React component. |
|
|
63
|
+
| `getSelection()` | Read the current priced selection. |
|
|
64
|
+
| `bestAvailable(qty, categoryKey?, options?)` | Pick and hold server-authoritative seats; options support `preferPremium` and `zoneId`. |
|
|
65
|
+
| `getCurrentHold()`, `resumeHold()`, `removeHeldTicket()`, `release()` | Inspect and manage the active hold. |
|
|
66
|
+
| `setMapTheme()`, `setEventDetailsHidden()`, `setPricing()` | Update host-owned presentation without remounting or losing a hold. |
|
|
67
|
+
| `isColorblindSafe()`, `setColorblindSafe()` | Read and update the shared buyer accessibility preference. |
|
|
68
|
+
| `getViewMode()`, `setViewMode()` | Read and update the 2D map projection. |
|
|
69
|
+
| `getBuyerView()`, `setBuyerView()` | Switch between the map and interactive 3D venue, including optional camera intent. |
|
|
70
|
+
| `refreshAccess()` | Re-acquire a private buyer-access session. |
|
|
71
|
+
| `destroy()` | Intentionally omitted: React owns teardown through component unmount. |
|
|
72
|
+
|
|
55
73
|
## Props
|
|
56
74
|
|
|
57
75
|
Extends the vanilla SDK options minus `container` (the component owns its own mount).
|
|
@@ -81,7 +99,10 @@ Built on [`@seatlayer/js`](https://www.npmjs.com/package/@seatlayer/js).
|
|
|
81
99
|
## Embed the live control room
|
|
82
100
|
|
|
83
101
|
Use `SeatManager` with a short-lived, event-scoped manage token minted by your
|
|
84
|
-
backend.
|
|
102
|
+
backend. The `token` prop accepts an `mse_` browser grant; tenant `sk_` secrets
|
|
103
|
+
are unsupported in React/browser code and must stay on your server. Keep the
|
|
104
|
+
grant in memory, never in a URL, browser storage, or logs. Monitor, Inspect,
|
|
105
|
+
Block/unblock, fullscreen, presence, exact configured
|
|
85
106
|
booked value, booking velocity, and the **Booking momentum** overlay are one
|
|
86
107
|
shared package surface—not host-owned tabs.
|
|
87
108
|
Block mode includes explicit multi-select category controls plus a searchable,
|
|
@@ -65,6 +65,23 @@ var SeatManager = forwardRef(
|
|
|
65
65
|
useEffect(() => {
|
|
66
66
|
managerRef.current?.setToken(token, tokenExpiresAt);
|
|
67
67
|
}, [token, tokenExpiresAt]);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
managerRef.current?.setCapabilities(capabilities);
|
|
70
|
+
}, [capabilities]);
|
|
71
|
+
useEffect(() => {
|
|
72
|
+
managerRef.current?.setCurrency(currency);
|
|
73
|
+
}, [currency]);
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
managerRef.current?.setTheme(props.theme);
|
|
76
|
+
}, [props.theme]);
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
managerRef.current?.setKeepLiveWhileHidden(keepLiveWhileHidden);
|
|
79
|
+
}, [keepLiveWhileHidden]);
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
managerRef.current?.setTokenRefresh(
|
|
82
|
+
props.onTokenRefresh ? async () => callbacks.current.onTokenRefresh() : void 0
|
|
83
|
+
);
|
|
84
|
+
}, [!!props.onTokenRefresh]);
|
|
68
85
|
useEffect(() => {
|
|
69
86
|
if (mode) managerRef.current?.setMode(mode);
|
|
70
87
|
}, [mode]);
|
|
@@ -107,4 +124,4 @@ var SeatManager = forwardRef(
|
|
|
107
124
|
export {
|
|
108
125
|
SeatManager
|
|
109
126
|
};
|
|
110
|
-
//# sourceMappingURL=chunk-
|
|
127
|
+
//# sourceMappingURL=chunk-3O4YZE4V.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 SeatManagerActivity,\n type SeatManagerActionResult,\n type SeatManagerConnection,\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 SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\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 selectAll(): ExpandedSeat[];\n selectSection(sectionId: string): ExpandedSeat[];\n selectByLabels(labels: string[]): ExpandedSeat[];\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}\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 } = 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 theme: callbacks.current.theme,\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 onActionComplete: (r: SeatManagerActionResult) => callbacks.current.onActionComplete?.(r),\n onConnectionChange: (s: SeatManagerConnection) => callbacks.current.onConnectionChange?.(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 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 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 selectAll: () => managerRef.current?.selectAll() ?? [],\n selectSection: (id) => managerRef.current?.selectSection(id) ?? [],\n selectByLabels: (labels) => managerRef.current?.selectByLabels(labels) ?? [],\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 }),\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,OAiBV;AAmLI;AAxHJ,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,IACnD,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,OAAO,UAAU,QAAQ;AAAA,QACzB,SAAS,MAAM,UAAU,QAAQ,UAAU;AAAA,QAC3C,WAAW,CAAC,MAA0B,UAAU,QAAQ,YAAY,CAAC;AAAA,QACrE,YAAY,CAAC,aAAkC,UAAU,QAAQ,aAAa,QAAQ;AAAA,QACtF,eAAe,CAAC,aAAkC,UAAU,QAAQ,gBAAgB,QAAQ;AAAA,QAC5F,gBAAgB,UAAU,QAAQ,iBAAiB,YAAY,UAAU,QAAQ,eAAgB,IAAI;AAAA,QACrG,cAAc,CAAC,aAAa,UAAU,QAAQ,eAAe,QAAQ;AAAA,QACrE,oBAAoB,CAAC,YAAY,UAAU,QAAQ,qBAAqB,OAAO;AAAA,QAC/E,mBAAmB,CAAC,MAAsB,UA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,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,MACjD;AAAA,MACA,CAAC;AAAA,IACH;AAEA,WAAO,oBAAC,SAAI,KAAK,cAAc,WAAsB,OAAc;AAAA,EACrE;AACF;","names":["SeatManager"]}
|
package/dist/index.cjs
CHANGED
|
@@ -35,7 +35,19 @@ var import_js = require("@seatlayer/js");
|
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var SeatingChart = (0, import_react.forwardRef)(
|
|
37
37
|
function SeatingChart2(props, ref) {
|
|
38
|
-
const {
|
|
38
|
+
const {
|
|
39
|
+
className,
|
|
40
|
+
style,
|
|
41
|
+
event,
|
|
42
|
+
apiBase,
|
|
43
|
+
maxSelection,
|
|
44
|
+
publicKey,
|
|
45
|
+
locale,
|
|
46
|
+
currency,
|
|
47
|
+
colorblindSafe,
|
|
48
|
+
initialView,
|
|
49
|
+
errorDisplay
|
|
50
|
+
} = props;
|
|
39
51
|
const containerRef = (0, import_react.useRef)(null);
|
|
40
52
|
const chartRef = (0, import_react.useRef)(null);
|
|
41
53
|
const callbacks = (0, import_react.useRef)(props);
|
|
@@ -52,6 +64,8 @@ var SeatingChart = (0, import_react.forwardRef)(
|
|
|
52
64
|
locale,
|
|
53
65
|
currency,
|
|
54
66
|
colorblindSafe,
|
|
67
|
+
initialView,
|
|
68
|
+
errorDisplay,
|
|
55
69
|
messages: callbacks.current.messages,
|
|
56
70
|
// Read through the ref so a host may pass the provider as an inline
|
|
57
71
|
// arrow without its new identity tearing the canvas down each render.
|
|
@@ -77,7 +91,7 @@ var SeatingChart = (0, import_react.forwardRef)(
|
|
|
77
91
|
chart.destroy();
|
|
78
92
|
chartRef.current = null;
|
|
79
93
|
};
|
|
80
|
-
}, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe]);
|
|
94
|
+
}, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, initialView, errorDisplay]);
|
|
81
95
|
(0, import_react.useImperativeHandle)(
|
|
82
96
|
ref,
|
|
83
97
|
() => ({
|
|
@@ -149,7 +163,16 @@ var EmbeddedDesigner = (0, import_react2.forwardRef)(
|
|
|
149
163
|
designer.destroy();
|
|
150
164
|
designerRef.current = null;
|
|
151
165
|
};
|
|
152
|
-
}, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy, props.showLoadingState, props.loadingTimeoutMs, props.autoResize
|
|
166
|
+
}, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy, props.showLoadingState, props.loadingTimeoutMs, props.autoResize]);
|
|
167
|
+
(0, import_react2.useEffect)(() => {
|
|
168
|
+
designerRef.current?.setSizing(props.height, props.minHeight);
|
|
169
|
+
}, [props.height, props.minHeight]);
|
|
170
|
+
(0, import_react2.useEffect)(() => {
|
|
171
|
+
designerRef.current?.setRelaunchPolicy(
|
|
172
|
+
props.onRequestRelaunch ? () => callbacks.current.onRequestRelaunch?.() : void 0,
|
|
173
|
+
props.autoRenewSession
|
|
174
|
+
);
|
|
175
|
+
}, [!!props.onRequestRelaunch, props.autoRenewSession]);
|
|
153
176
|
(0, import_react2.useImperativeHandle)(ref, () => ({
|
|
154
177
|
setDesignerUrl: (designerUrl) => {
|
|
155
178
|
designerRef.current?.setDesignerUrl(designerUrl);
|
|
@@ -169,6 +192,7 @@ var SeatPicker = (0, import_react3.forwardRef)(
|
|
|
169
192
|
const { className, style, event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout } = props;
|
|
170
193
|
const containerRef = (0, import_react3.useRef)(null);
|
|
171
194
|
const pickerRef = (0, import_react3.useRef)(null);
|
|
195
|
+
const closeRef = (0, import_react3.useRef)(null);
|
|
172
196
|
const callbacks = (0, import_react3.useRef)(props);
|
|
173
197
|
callbacks.current = props;
|
|
174
198
|
(0, import_react3.useEffect)(() => {
|
|
@@ -198,22 +222,41 @@ var SeatPicker = (0, import_react3.forwardRef)(
|
|
|
198
222
|
onOrderConfirmed: (order) => callbacks.current.onOrderConfirmed?.(order)
|
|
199
223
|
});
|
|
200
224
|
pickerRef.current = picker;
|
|
225
|
+
let closed = false;
|
|
226
|
+
const close = () => {
|
|
227
|
+
if (closed) return;
|
|
228
|
+
closed = true;
|
|
229
|
+
if (pickerRef.current === picker) pickerRef.current = null;
|
|
230
|
+
picker.close();
|
|
231
|
+
};
|
|
232
|
+
closeRef.current = close;
|
|
201
233
|
void picker.render();
|
|
202
234
|
return () => {
|
|
203
|
-
picker.destroy();
|
|
204
|
-
pickerRef.current = null;
|
|
235
|
+
if (!closed) picker.destroy();
|
|
236
|
+
if (pickerRef.current === picker) pickerRef.current = null;
|
|
237
|
+
if (closeRef.current === close) closeRef.current = null;
|
|
205
238
|
};
|
|
206
239
|
}, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout]);
|
|
207
240
|
(0, import_react3.useImperativeHandle)(
|
|
208
241
|
ref,
|
|
209
242
|
() => ({
|
|
243
|
+
close: () => closeRef.current?.(),
|
|
210
244
|
getSelection: () => pickerRef.current?.getSelection() ?? [],
|
|
211
|
-
bestAvailable: (qty, categoryKey) => pickerRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),
|
|
245
|
+
bestAvailable: (qty, categoryKey, options) => pickerRef.current?.bestAvailable(qty, categoryKey, options) ?? Promise.resolve(null),
|
|
212
246
|
getCurrentHold: () => pickerRef.current?.getCurrentHold() ?? null,
|
|
213
247
|
resumeHold: (holdId) => pickerRef.current?.resumeHold(holdId) ?? Promise.resolve(null),
|
|
214
248
|
removeHeldTicket: (label) => pickerRef.current?.removeHeldTicket(label) ?? Promise.resolve(false),
|
|
215
249
|
release: () => pickerRef.current?.release() ?? Promise.resolve(),
|
|
216
|
-
refreshAccess: () => pickerRef.current?.refreshAccess() ?? Promise.resolve(false)
|
|
250
|
+
refreshAccess: () => pickerRef.current?.refreshAccess() ?? Promise.resolve(false),
|
|
251
|
+
setMapTheme: (map) => pickerRef.current?.setMapTheme(map),
|
|
252
|
+
setEventDetailsHidden: (hidden) => pickerRef.current?.setEventDetailsHidden(hidden),
|
|
253
|
+
setPricing: (pricing) => pickerRef.current?.setPricing(pricing),
|
|
254
|
+
isColorblindSafe: () => pickerRef.current?.isColorblindSafe() ?? false,
|
|
255
|
+
setColorblindSafe: (on) => pickerRef.current?.setColorblindSafe(on),
|
|
256
|
+
setViewMode: (mode) => pickerRef.current?.setViewMode(mode),
|
|
257
|
+
getViewMode: () => pickerRef.current?.getViewMode() ?? "flat",
|
|
258
|
+
getBuyerView: () => pickerRef.current?.getBuyerView() ?? "map",
|
|
259
|
+
setBuyerView: (view, options) => pickerRef.current?.setBuyerView(view, options)
|
|
217
260
|
}),
|
|
218
261
|
[]
|
|
219
262
|
);
|
|
@@ -285,6 +328,23 @@ var SeatManager = (0, import_react4.forwardRef)(
|
|
|
285
328
|
(0, import_react4.useEffect)(() => {
|
|
286
329
|
managerRef.current?.setToken(token, tokenExpiresAt);
|
|
287
330
|
}, [token, tokenExpiresAt]);
|
|
331
|
+
(0, import_react4.useEffect)(() => {
|
|
332
|
+
managerRef.current?.setCapabilities(capabilities);
|
|
333
|
+
}, [capabilities]);
|
|
334
|
+
(0, import_react4.useEffect)(() => {
|
|
335
|
+
managerRef.current?.setCurrency(currency);
|
|
336
|
+
}, [currency]);
|
|
337
|
+
(0, import_react4.useEffect)(() => {
|
|
338
|
+
managerRef.current?.setTheme(props.theme);
|
|
339
|
+
}, [props.theme]);
|
|
340
|
+
(0, import_react4.useEffect)(() => {
|
|
341
|
+
managerRef.current?.setKeepLiveWhileHidden(keepLiveWhileHidden);
|
|
342
|
+
}, [keepLiveWhileHidden]);
|
|
343
|
+
(0, import_react4.useEffect)(() => {
|
|
344
|
+
managerRef.current?.setTokenRefresh(
|
|
345
|
+
props.onTokenRefresh ? async () => callbacks.current.onTokenRefresh() : void 0
|
|
346
|
+
);
|
|
347
|
+
}, [!!props.onTokenRefresh]);
|
|
288
348
|
(0, import_react4.useEffect)(() => {
|
|
289
349
|
if (mode) managerRef.current?.setMode(mode);
|
|
290
350
|
}, [mode]);
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/SeatingChart.tsx","../src/EmbeddedDesigner.tsx","../src/SeatPicker.tsx","../src/SeatManager.tsx"],"sourcesContent":["/**\n * @seatlayer/react — the React wrapper for the SeatLayer embed SDK.\n */\nexport { SeatingChart } from './SeatingChart';\nexport { EmbeddedDesigner } from './EmbeddedDesigner';\nexport type {\n SeatingChartProps,\n SeatingChartHandle,\n SelectedSeat,\n HoldResult,\n BestAvailableResult,\n GAAreaAvailability,\n HoldLineItem,\n} from './SeatingChart';\nexport type { EmbeddedDesignerProps, EmbeddedDesignerHandle, EmbeddedDesignerMessage } from './EmbeddedDesigner';\nexport { SeatPicker } from './SeatPicker';\nexport type {\n SeatPickerHandle,\n SeatPickerProps,\n SeatPickerOptions,\n SeatPickerTheme,\n CheckoutHandoff,\n CheckoutLineItem,\n} from './SeatPicker';\n// The framework-agnostic widget class — for the one-call modal (SeatPickerWidget.open()).\nexport { SeatPicker as SeatPickerWidget } from '@seatlayer/js';\n// Host-side embed helper: grows the iframe on `seatlayer:height` and pins it on\n// `seatlayer:fullscreen`. React hosts depend on this package alone, so it has to\n// be reachable here rather than only from @seatlayer/js.\nexport { attachPickerFrame } from '@seatlayer/js';\n\n// Organizer control room: Monitor + Inspect + bulk Block/unblock on one renderer.\nexport { SeatManager } from './SeatManager';\nexport type {\n SeatManagerHandle,\n SeatManagerProps,\n SeatManagerOptions,\n SeatManagerMode,\n SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n} from './SeatManager';\nexport type { ControlRoomActivityEntry, ControlRoomSectionMetric, ControlRoomSnapshot } from '@seatlayer/js';\n// Sales Channels — buyer access sessions for private channel inventory.\nexport type {\n BuyerAccessToken,\n BuyerAccessTokenProvider,\n BuyerAccessRefreshReason,\n BuyerAccessUnavailableReason,\n BuyerAccessExpiredEvent,\n BuyerAccessUnavailableEvent,\n SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n","import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n SeatingChart as CoreSeatingChart,\n type SeatingChartOptions,\n type SelectedSeat,\n type HoldResult,\n type BestAvailableResult,\n type GAAreaAvailability,\n type HoldLineItem,\n} from '@seatlayer/js';\n\nexport type { SelectedSeat, HoldResult, BestAvailableResult, GAAreaAvailability, HoldLineItem } from '@seatlayer/js';\nexport type { SeatHoverDetails } from '@seatlayer/js';\n\n/** Imperative handle exposed via `ref` — call these to drive the picker from your app. */\nexport interface SeatingChartHandle {\n /** Hold the current selection. Resolves the hold, or `null` on a 409 conflict. */\n hold(options?: { ttlMs?: number }): Promise<HoldResult | null>;\n /** Restore an active hold by its opaque id. */\n resumeHold(holdId: string): Promise<HoldResult | null>;\n /** Current active hold known to the chart. */\n getCurrentHold(): HoldResult | null;\n /** GA areas with live remaining capacity. */\n getGAAreas(): GAAreaAvailability[];\n /** Atomically hold a quantity from one GA area. */\n holdGA(areaId: string, qty: number, options?: { tierId?: string | null; ttlMs?: number }): Promise<HoldResult | null>;\n /** Ask the server for the `qty` best free seats and hold them atomically. */\n bestAvailable(qty: number, categoryKey?: string): Promise<BestAvailableResult | null>;\n /** Release the current hold (if any). */\n release(): Promise<void>;\n /** Release some held labels while keeping the remainder active. */\n releaseLabels(labels: string[]): Promise<boolean>;\n /** The current selection, with prices resolved from the chart categories. */\n getSelection(): SelectedSeat[];\n /**\n * Choose a ticket tier for a selected seat (e.g. Adult → Child). Available\n * `tiers` are on each `SelectedSeat`; `tierId=null` reverts to the default.\n */\n setSeatTier(seatId: string, tierId: string | null): void;\n /**\n * Floors of a multi-floor chart — `[{ id, name }]` (single-floor charts\n * return one entry; empty before render()). Pair with setFloor().\n */\n getFloors(): { id: string; name: string }[];\n /** Switch the shown floor (2D). Warns + no-ops on single-floor charts. */\n setFloor(floorId: string): void;\n /** Toggle colorblind-safe rendering at runtime (see the `colorblindSafe` prop). */\n setColorblindSafe(on: boolean): void;\n /** Zoom in one step (same increment as the wheel/pinch gesture). */\n zoomIn(): void;\n /** Zoom out one step. */\n zoomOut(): void;\n /** Reset the camera so the whole chart fits the container. */\n zoomToFit(): void;\n /**\n * Re-acquire the buyer access session after your app re-authorizes the buyer\n * (Sales Channels). Resolves false when the chart is not access-scoped.\n */\n refreshAccess(): Promise<boolean>;\n}\n\nexport interface SeatingChartProps extends Omit<SeatingChartOptions, 'container'> {\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * React wrapper around the framework-agnostic `@seatlayer/js` SDK.\n *\n * The underlying canvas is created once and torn down on unmount. Callback props\n * (`onSelectionChange`, `onHold`, `onError`, `onDeckTap`, `onHint`) may change\n * freely between renders without re-mounting the canvas — only `event`,\n * `apiBase`, `maxSelection`, `publicKey`, `locale`, `currency`, and\n * `colorblindSafe` trigger a rebuild. (`messages` is read once per mount;\n * changing it alone does not re-apply.)\n */\nexport const SeatingChart = forwardRef<SeatingChartHandle, SeatingChartProps>(\n function SeatingChart(props, ref) {\n const { className, style, event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe } = props;\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n const chartRef = useRef<CoreSeatingChart | null>(null);\n\n // Always call the latest callbacks without rebuilding the chart.\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n const chart = new CoreSeatingChart({\n container: el,\n event,\n apiBase,\n maxSelection,\n publicKey,\n locale,\n currency,\n colorblindSafe,\n messages: callbacks.current.messages,\n // Read through the ref so a host may pass the provider as an inline\n // arrow without its new identity tearing the canvas down each render.\n buyerAccessTokenProvider: props.buyerAccessTokenProvider\n ? (context) => callbacks.current.buyerAccessTokenProvider!(context)\n : undefined,\n buyerAccessToken: callbacks.current.buyerAccessToken,\n onAccessExpired: (state) => callbacks.current.onAccessExpired?.(state),\n onAccessUnavailable: (state) => callbacks.current.onAccessUnavailable?.(state),\n onSelectedObjectUnavailable: (state) =>\n callbacks.current.onSelectedObjectUnavailable?.(state),\n onSelectionChange: (seats) => callbacks.current.onSelectionChange?.(seats),\n onHold: (result) => callbacks.current.onHold?.(result),\n onHoldRestored: (result) => callbacks.current.onHoldRestored?.(result),\n onHoldExpired: () => callbacks.current.onHoldExpired?.(),\n onGAClick: (area) => callbacks.current.onGAClick?.(area),\n onError: (err) => callbacks.current.onError?.(err),\n onDeckTap: (floorId) => callbacks.current.onDeckTap?.(floorId),\n onHint: (message) => callbacks.current.onHint?.(message),\n seatTooltip: props.seatTooltip,\n onSeatHover: (details) => callbacks.current.onSeatHover?.(details),\n });\n chartRef.current = chart;\n void chart.render();\n\n return () => {\n chart.destroy();\n chartRef.current = null;\n };\n // Rebuild only when the identity of the chart changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe]);\n\n useImperativeHandle(\n ref,\n (): SeatingChartHandle => ({\n hold: (options) => chartRef.current?.hold(options) ?? Promise.resolve(null),\n resumeHold: (holdId) => chartRef.current?.resumeHold(holdId) ?? Promise.resolve(null),\n getCurrentHold: () => chartRef.current?.getCurrentHold() ?? null,\n getGAAreas: () => chartRef.current?.getGAAreas() ?? [],\n holdGA: (areaId, qty, options) => chartRef.current?.holdGA(areaId, qty, options) ?? Promise.resolve(null),\n bestAvailable: (qty, categoryKey) =>\n chartRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),\n release: () => chartRef.current?.release() ?? Promise.resolve(),\n releaseLabels: (labels) => chartRef.current?.releaseLabels(labels) ?? Promise.resolve(false),\n getSelection: () => chartRef.current?.getSelection() ?? [],\n setSeatTier: (seatId, tierId) => chartRef.current?.setSeatTier(seatId, tierId),\n getFloors: () => chartRef.current?.getFloors() ?? [],\n setFloor: (floorId) => chartRef.current?.setFloor(floorId),\n setColorblindSafe: (on) => chartRef.current?.setColorblindSafe(on),\n zoomIn: () => chartRef.current?.zoomIn(),\n zoomOut: () => chartRef.current?.zoomOut(),\n zoomToFit: () => chartRef.current?.zoomToFit(),\n refreshAccess: () => chartRef.current?.refreshAccess() ?? Promise.resolve(false),\n }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n","import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n EmbeddedDesigner as CoreEmbeddedDesigner,\n type EmbeddedDesignerMessage,\n} from '@seatlayer/js';\n\nexport type { EmbeddedDesignerMessage } from '@seatlayer/js';\n\nexport interface EmbeddedDesignerHandle {\n /** Recreate the iframe with a newly-minted session URL. */\n setDesignerUrl(designerUrl: string): void;\n /** The currently mounted iframe, if any. */\n getIframe(): HTMLIFrameElement | null;\n}\n\nexport interface EmbeddedDesignerProps {\n /** Short-lived `designerUrl` returned by your backend. Never pass an `sk_` key. */\n designerUrl: string;\n expectedChartId?: string;\n expectedWorkspaceId?: string;\n title?: string;\n className?: string;\n style?: CSSProperties;\n iframeClassName?: string;\n iframeStyle?: Partial<CSSStyleDeclaration>;\n allow?: string;\n referrerPolicy?: ReferrerPolicy;\n /**\n * Show the built-in branded loading skeleton and error/expiry card inside the\n * container while the Designer boots. Defaults to `true`. Set `false` when you\n * render your own loading and error chrome.\n */\n showLoadingState?: boolean;\n /**\n * If the Designer never posts `ready` within this many milliseconds, the host\n * shows the error card with a timeout message. Defaults to `20000`.\n */\n loadingTimeoutMs?: number;\n /**\n * How the iframe is sized. `'fill'` (the default) is **container-aware**: if the\n * container has a definite height (a sized block, `flex-1 min-h-0`, a resolved\n * `%`) the Designer fills 100% of it and tracks its size via a `ResizeObserver`;\n * if the container is content-sized (full-page usage) the Designer fills the\n * viewport (`window.innerHeight` minus the iframe's top offset). Either way the\n * result is clamped to `minHeight` and re-probed on resize. Heights are applied\n * with `!important` so a host theme can't override them. Pass a number for a\n * fixed pixel height you manage yourself.\n */\n height?: 'fill' | number;\n /** Lower bound for `'fill'` sizing. Defaults to `480`. */\n minHeight?: number;\n /**\n * Legacy content-height auto-grow via the `seatlayer.designer.resize`\n * protocol. Only honored when `height` is a number; with the default\n * `height: 'fill'` the resize messages are ignored and the SDK sizes the iframe\n * to the container or viewport.\n */\n autoResize?: boolean;\n /**\n * Called when the user presses \"Try again\" on the error card. Mint a fresh\n * session and set the new `designerUrl` (recreating the iframe returns it to\n * the loading state). When omitted, \"Try again\" reloads the current URL.\n *\n * When supplied, it also powers automatic session renewal — see\n * {@link EmbeddedDesignerProps.autoRenewSession}.\n */\n onRequestRelaunch?: () => void;\n /**\n * Keep long editing sessions alive with no expiry wall. When you supply\n * `onRequestRelaunch`, the SDK schedules a silent relaunch shortly before the\n * session's `expiresAt` (mint a fresh session and update `designerUrl` in your\n * `onRequestRelaunch` handler), and makes one automatic recovery attempt if an\n * expiry error still slips through before showing the \"Try again\" card. Defaults\n * to `true` whenever `onRequestRelaunch` is provided; a no-op without it. Set\n * `false` to keep the fully manual \"Try again\" behavior.\n */\n autoRenewSession?: boolean;\n onReady?: (message: EmbeddedDesignerMessage) => void;\n onSaved?: (message: EmbeddedDesignerMessage) => void;\n onPublished?: (message: EmbeddedDesignerMessage) => void;\n onClose?: (message: EmbeddedDesignerMessage) => void;\n onError?: (message: EmbeddedDesignerMessage) => void;\n}\n\n/**\n * Native-feeling React host for the secure SeatLayer Designer iframe.\n * A new `designerUrl` always recreates the iframe, so a new fragment token can\n * never retain state from an earlier chart session.\n */\nexport const EmbeddedDesigner = forwardRef<EmbeddedDesignerHandle, EmbeddedDesignerProps>(\n function EmbeddedDesigner(props, ref) {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const designerRef = useRef<CoreEmbeddedDesigner | null>(null);\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n const designer = new CoreEmbeddedDesigner({\n designerUrl: props.designerUrl,\n container,\n expectedChartId: props.expectedChartId,\n expectedWorkspaceId: props.expectedWorkspaceId,\n title: props.title,\n className: props.iframeClassName,\n style: props.iframeStyle,\n allow: props.allow,\n referrerPolicy: props.referrerPolicy,\n showLoadingState: props.showLoadingState,\n loadingTimeoutMs: props.loadingTimeoutMs,\n height: props.height,\n minHeight: props.minHeight,\n autoResize: props.autoResize,\n autoRenewSession: props.autoRenewSession,\n // Only forward a relaunch hook when the host supplied one, so the core's\n // \"reload the same URL in place\" fallback still applies otherwise.\n onRequestRelaunch: props.onRequestRelaunch\n ? () => callbacks.current.onRequestRelaunch?.()\n : undefined,\n onReady: (message) => callbacks.current.onReady?.(message),\n onSaved: (message) => callbacks.current.onSaved?.(message),\n onPublished: (message) => callbacks.current.onPublished?.(message),\n onClose: (message) => callbacks.current.onClose?.(message),\n onError: (message) => callbacks.current.onError?.(message),\n });\n designer.mount();\n designerRef.current = designer;\n return () => {\n designer.destroy();\n designerRef.current = null;\n };\n // Session/chart identity changes must recreate the iframe. Callback changes are\n // picked up from the ref without reloading an in-progress Designer session.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy, props.showLoadingState, props.loadingTimeoutMs, props.autoResize, props.autoRenewSession]);\n\n useImperativeHandle(ref, () => ({\n setDesignerUrl: (designerUrl) => { designerRef.current?.setDesignerUrl(designerUrl); },\n getIframe: () => designerRef.current?.getIframe() ?? null,\n }), []);\n\n return <div ref={containerRef} className={props.className} style={props.style} />;\n },\n);\n","import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n SeatPicker as CoreSeatPicker,\n type SeatPickerOptions,\n type SeatPickerTheme,\n type SelectedSeat,\n type HoldResult,\n} from '@seatlayer/js';\n\nexport type { SeatPickerOptions, SeatPickerTheme, CheckoutHandoff, CheckoutLineItem } from '@seatlayer/js';\n\n/** Imperative handle for the full-experience picker widget. */\nexport interface SeatPickerHandle {\n /** Current selection with resolved prices. */\n getSelection(): SelectedSeat[];\n /** Server-side best seats + hold, reflected in the widget tray. */\n bestAvailable(qty: number, categoryKey?: string): Promise<HoldResult | null>;\n /** Current active/restored hold reflected in the tray. */\n getCurrentHold(): HoldResult | null;\n /** Restore an active hold by its opaque id. */\n resumeHold(holdId: string): Promise<HoldResult | null>;\n /** Remove one held ticket while preserving the remainder. */\n removeHeldTicket(label: string): Promise<boolean>;\n /** Release the current hold (if any) and reset the tray. */\n release(): Promise<void>;\n /**\n * Re-acquire the buyer access session after your app re-authorizes the buyer\n * (Sales Channels). Resolves false when the picker is not access-scoped.\n */\n refreshAccess(): Promise<boolean>;\n}\n\nexport interface SeatPickerProps extends Omit<SeatPickerOptions, 'container'> {\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * React wrapper around the full SeatPicker widget (header · live price panel ·\n * tray · GA · hold countdown · toasts). The widget is container-adaptive: give\n * the wrapping div a size and it lays itself out for that box (side panel wide,\n * bottom sheet narrow). For the one-call modal, use `SeatPicker.open()` from\n * `@seatlayer/js` directly.\n */\nexport const SeatPicker = forwardRef<SeatPickerHandle, SeatPickerProps>(\n function SeatPicker(props, ref) {\n const { className, style, event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout } = props;\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n const pickerRef = useRef<CoreSeatPicker | null>(null);\n\n // Always call the latest callbacks without rebuilding the widget.\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n // Forward every option the host passed. Spreading rather than naming each\n // field keeps new core options (pricing, hideBadge, transport, …) working\n // here the day they ship: a hand-maintained list silently drops anything\n // it forgets, and `SeatPickerProps extends SeatPickerOptions` means such a\n // drop still type-checks clean for the host.\n const { className: _className, style: _style, ...options } = callbacks.current;\n\n const picker = new CoreSeatPicker({\n ...options,\n container: el,\n onCheckout: (hold, seats, handoff) => callbacks.current.onCheckout?.(hold, seats, handoff),\n onBooked: (handoff) => callbacks.current.onBooked?.(handoff),\n onSelectionChange: (seats) => callbacks.current.onSelectionChange?.(seats),\n onHoldChange: (hold, seats, handoff) => callbacks.current.onHoldChange?.(hold, seats, handoff),\n onHoldExpired: () => callbacks.current.onHoldExpired?.(),\n onHoldRestored: (hold, seats, handoff) => callbacks.current.onHoldRestored?.(hold, seats, handoff),\n onError: (err) => callbacks.current.onError?.(err),\n // Sales Channels. The provider is read through the ref for the same\n // reason as every other callback: a host may pass an inline arrow.\n buyerAccessTokenProvider: options.buyerAccessTokenProvider\n ? (context) => callbacks.current.buyerAccessTokenProvider!(context)\n : undefined,\n onAccessExpired: (state) => callbacks.current.onAccessExpired?.(state),\n onAccessUnavailable: (state) => callbacks.current.onAccessUnavailable?.(state),\n onSelectedObjectUnavailable: (state) =>\n callbacks.current.onSelectedObjectUnavailable?.(state),\n // Hosted checkout. Read through the ref like every other callback — the\n // spread above would freeze an inline arrow at construction, and these\n // two fire long after it (a payment webhook can land minutes later).\n onCheckoutUnavailable: (state) => callbacks.current.onCheckoutUnavailable?.(state),\n onOrderConfirmed: (order) => callbacks.current.onOrderConfirmed?.(order),\n });\n pickerRef.current = picker;\n void picker.render();\n\n return () => {\n picker.destroy();\n pickerRef.current = null;\n };\n // Rebuild only when the identity of the event/config changes. Object-valued\n // options (theme, messages, pricing, transport) stay out: hosts routinely\n // pass them as inline literals, so a new identity every render would tear\n // the widget down mid-selection. They are read fresh at construction.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout]);\n\n useImperativeHandle(\n ref,\n (): SeatPickerHandle => ({\n getSelection: () => pickerRef.current?.getSelection() ?? [],\n bestAvailable: (qty, categoryKey) => pickerRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),\n getCurrentHold: () => pickerRef.current?.getCurrentHold() ?? null,\n resumeHold: (holdId) => pickerRef.current?.resumeHold(holdId) ?? Promise.resolve(null),\n removeHeldTicket: (label) => pickerRef.current?.removeHeldTicket(label) ?? Promise.resolve(false),\n release: () => pickerRef.current?.release() ?? Promise.resolve(),\n refreshAccess: () => pickerRef.current?.refreshAccess() ?? Promise.resolve(false),\n }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n","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 SeatManagerTallies,\n type SeatManagerActivity,\n type SeatManagerActionResult,\n type SeatManagerConnection,\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 SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\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: string, 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 selectAll(): ExpandedSeat[];\n selectSection(sectionId: string): ExpandedSeat[];\n selectByLabels(labels: string[]): ExpandedSeat[];\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}\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 and callbacks are updated\n * in 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 } = 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 theme: callbacks.current.theme,\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 onActionComplete: (r: SeatManagerActionResult) => callbacks.current.onActionComplete?.(r),\n onConnectionChange: (s: SeatManagerConnection) => callbacks.current.onConnectionChange?.(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 // 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 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 selectAll: () => managerRef.current?.selectAll() ?? [],\n selectSection: (id) => managerRef.current?.selectSection(id) ?? [],\n selectByLabels: (labels) => managerRef.current?.selectByLabels(labels) ?? [],\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 }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;A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,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,MACjD;AAAA,MACA,CAAC;AAAA,IACH;AAEA,WAAO,6CAAC,SAAI,KAAK,cAAc,WAAsB,OAAc;AAAA,EACrE;AACF;","names":["SeatingChart","CoreSeatingChart","import_react","import_js","import_jsx_runtime","EmbeddedDesigner","CoreEmbeddedDesigner","import_react","import_js","import_jsx_runtime","SeatPicker","CoreSeatPicker","import_js","import_react","import_jsx_runtime","SeatManager","CoreSeatManager"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/SeatingChart.tsx","../src/EmbeddedDesigner.tsx","../src/SeatPicker.tsx","../src/SeatManager.tsx"],"sourcesContent":["/**\n * @seatlayer/react — the React wrapper for the SeatLayer embed SDK.\n */\nexport { SeatingChart } from './SeatingChart';\nexport { EmbeddedDesigner } from './EmbeddedDesigner';\nexport type {\n SeatingChartProps,\n SeatingChartHandle,\n SelectedSeat,\n HoldResult,\n BestAvailableResult,\n GAAreaAvailability,\n HoldLineItem,\n SeatHoverDetails,\n} from './SeatingChart';\nexport type { EmbeddedDesignerProps, EmbeddedDesignerHandle, EmbeddedDesignerMessage } from './EmbeddedDesigner';\nexport { SeatPicker } from './SeatPicker';\nexport type {\n SeatPickerHandle,\n SeatPickerProps,\n SeatPickerOptions,\n SeatPickerTheme,\n SeatPickerPricing,\n SeatPickerBestAvailableOptions,\n SeatPickerBuyerView,\n SeatPickerBuyerViewOptions,\n PickerMapTheme,\n RendererViewMode,\n CheckoutHandoff,\n CheckoutLineItem,\n} from './SeatPicker';\n// The framework-agnostic widget class — for the one-call modal (SeatPickerWidget.open()).\nexport { SeatPicker as SeatPickerWidget } from '@seatlayer/js';\n// Host-side embed helper: grows the iframe on `seatlayer:height` and pins it on\n// `seatlayer:fullscreen`. React hosts depend on this package alone, so it has to\n// be reachable here rather than only from @seatlayer/js.\nexport { attachPickerFrame } from '@seatlayer/js';\nexport type { AttachPickerFrameOptions } from '@seatlayer/js';\n\n// Organizer control room: Monitor + Inspect + bulk Block/unblock on one renderer.\nexport { SeatManager } from './SeatManager';\nexport type {\n SeatManagerHandle,\n SeatManagerProps,\n SeatManagerOptions,\n SeatManagerMode,\n EventScopedManageToken,\n SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\n} from './SeatManager';\nexport type {\n ControlRoomActivityEntry,\n ControlRoomSectionMetric,\n ControlRoomSnapshot,\n} from '@seatlayer/js/manager';\n// Sales Channels — buyer access sessions for private channel inventory.\nexport type {\n BuyerAccessToken,\n BuyerAccessTokenProvider,\n BuyerAccessRefreshReason,\n BuyerAccessUnavailableReason,\n BuyerAccessExpiredEvent,\n BuyerAccessUnavailableEvent,\n SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n","import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n SeatingChart as CoreSeatingChart,\n type SeatingChartOptions,\n type SelectedSeat,\n type HoldResult,\n type BestAvailableResult,\n type GAAreaAvailability,\n type HoldLineItem,\n} from '@seatlayer/js';\n\nexport type { SelectedSeat, HoldResult, BestAvailableResult, GAAreaAvailability, HoldLineItem } from '@seatlayer/js';\nexport type { SeatHoverDetails } from '@seatlayer/js';\n\n/** Imperative handle exposed via `ref` — call these to drive the picker from your app. */\nexport interface SeatingChartHandle {\n /** Hold the current selection. Resolves the hold, or `null` on a 409 conflict. */\n hold(options?: { ttlMs?: number }): Promise<HoldResult | null>;\n /** Restore an active hold by its opaque id. */\n resumeHold(holdId: string): Promise<HoldResult | null>;\n /** Current active hold known to the chart. */\n getCurrentHold(): HoldResult | null;\n /** GA areas with live remaining capacity. */\n getGAAreas(): GAAreaAvailability[];\n /** Atomically hold a quantity from one GA area. */\n holdGA(areaId: string, qty: number, options?: { tierId?: string | null; ttlMs?: number }): Promise<HoldResult | null>;\n /** Ask the server for the `qty` best free seats and hold them atomically. */\n bestAvailable(qty: number, categoryKey?: string): Promise<BestAvailableResult | null>;\n /** Release the current hold (if any). */\n release(): Promise<void>;\n /** Release some held labels while keeping the remainder active. */\n releaseLabels(labels: string[]): Promise<boolean>;\n /** The current selection, with prices resolved from the chart categories. */\n getSelection(): SelectedSeat[];\n /**\n * Choose a ticket tier for a selected seat (e.g. Adult → Child). Available\n * `tiers` are on each `SelectedSeat`; `tierId=null` reverts to the default.\n */\n setSeatTier(seatId: string, tierId: string | null): void;\n /**\n * Floors of a multi-floor chart — `[{ id, name }]` (single-floor charts\n * return one entry; empty before render()). Pair with setFloor().\n */\n getFloors(): { id: string; name: string }[];\n /** Switch the shown floor (2D). Warns + no-ops on single-floor charts. */\n setFloor(floorId: string): void;\n /** Toggle colorblind-safe rendering at runtime (see the `colorblindSafe` prop). */\n setColorblindSafe(on: boolean): void;\n /** Zoom in one step (same increment as the wheel/pinch gesture). */\n zoomIn(): void;\n /** Zoom out one step. */\n zoomOut(): void;\n /** Reset the camera so the whole chart fits the container. */\n zoomToFit(): void;\n /**\n * Re-acquire the buyer access session after your app re-authorizes the buyer\n * (Sales Channels). Resolves false when the chart is not access-scoped.\n */\n refreshAccess(): Promise<boolean>;\n}\n\nexport interface SeatingChartProps extends Omit<SeatingChartOptions, 'container'> {\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * React wrapper around the framework-agnostic `@seatlayer/js` SDK.\n *\n * The underlying canvas is created once and torn down on unmount. Callback props\n * (`onSelectionChange`, `onHold`, `onError`, `onDeckTap`, `onHint`) may change\n * freely between renders without re-mounting the canvas — only `event`,\n * `apiBase`, `maxSelection`, `publicKey`, `locale`, `currency`, and\n * `colorblindSafe`, `initialView`, and `errorDisplay` trigger a rebuild.\n * (`messages` is read once per mount; changing it alone does not re-apply.)\n */\nexport const SeatingChart = forwardRef<SeatingChartHandle, SeatingChartProps>(\n function SeatingChart(props, ref) {\n const {\n className, style, event, apiBase, maxSelection, publicKey, locale, currency,\n colorblindSafe, initialView, errorDisplay,\n } = props;\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n const chartRef = useRef<CoreSeatingChart | null>(null);\n\n // Always call the latest callbacks without rebuilding the chart.\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n const chart = new CoreSeatingChart({\n container: el,\n event,\n apiBase,\n maxSelection,\n publicKey,\n locale,\n currency,\n colorblindSafe,\n initialView,\n errorDisplay,\n messages: callbacks.current.messages,\n // Read through the ref so a host may pass the provider as an inline\n // arrow without its new identity tearing the canvas down each render.\n buyerAccessTokenProvider: props.buyerAccessTokenProvider\n ? (context) => callbacks.current.buyerAccessTokenProvider!(context)\n : undefined,\n buyerAccessToken: callbacks.current.buyerAccessToken,\n onAccessExpired: (state) => callbacks.current.onAccessExpired?.(state),\n onAccessUnavailable: (state) => callbacks.current.onAccessUnavailable?.(state),\n onSelectedObjectUnavailable: (state) =>\n callbacks.current.onSelectedObjectUnavailable?.(state),\n onSelectionChange: (seats) => callbacks.current.onSelectionChange?.(seats),\n onHold: (result) => callbacks.current.onHold?.(result),\n onHoldRestored: (result) => callbacks.current.onHoldRestored?.(result),\n onHoldExpired: () => callbacks.current.onHoldExpired?.(),\n onGAClick: (area) => callbacks.current.onGAClick?.(area),\n onError: (err) => callbacks.current.onError?.(err),\n onDeckTap: (floorId) => callbacks.current.onDeckTap?.(floorId),\n onHint: (message) => callbacks.current.onHint?.(message),\n seatTooltip: props.seatTooltip,\n onSeatHover: (details) => callbacks.current.onSeatHover?.(details),\n });\n chartRef.current = chart;\n void chart.render();\n\n return () => {\n chart.destroy();\n chartRef.current = null;\n };\n // Rebuild only when the identity of the chart changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, initialView, errorDisplay]);\n\n useImperativeHandle(\n ref,\n (): SeatingChartHandle => ({\n hold: (options) => chartRef.current?.hold(options) ?? Promise.resolve(null),\n resumeHold: (holdId) => chartRef.current?.resumeHold(holdId) ?? Promise.resolve(null),\n getCurrentHold: () => chartRef.current?.getCurrentHold() ?? null,\n getGAAreas: () => chartRef.current?.getGAAreas() ?? [],\n holdGA: (areaId, qty, options) => chartRef.current?.holdGA(areaId, qty, options) ?? Promise.resolve(null),\n bestAvailable: (qty, categoryKey) =>\n chartRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),\n release: () => chartRef.current?.release() ?? Promise.resolve(),\n releaseLabels: (labels) => chartRef.current?.releaseLabels(labels) ?? Promise.resolve(false),\n getSelection: () => chartRef.current?.getSelection() ?? [],\n setSeatTier: (seatId, tierId) => chartRef.current?.setSeatTier(seatId, tierId),\n getFloors: () => chartRef.current?.getFloors() ?? [],\n setFloor: (floorId) => chartRef.current?.setFloor(floorId),\n setColorblindSafe: (on) => chartRef.current?.setColorblindSafe(on),\n zoomIn: () => chartRef.current?.zoomIn(),\n zoomOut: () => chartRef.current?.zoomOut(),\n zoomToFit: () => chartRef.current?.zoomToFit(),\n refreshAccess: () => chartRef.current?.refreshAccess() ?? Promise.resolve(false),\n }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n","import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n EmbeddedDesigner as CoreEmbeddedDesigner,\n type EmbeddedDesignerMessage,\n} from '@seatlayer/js';\n\nexport type { EmbeddedDesignerMessage } from '@seatlayer/js';\n\nexport interface EmbeddedDesignerHandle {\n /** Recreate the iframe with a newly-minted session URL. */\n setDesignerUrl(designerUrl: string): void;\n /** The currently mounted iframe, if any. */\n getIframe(): HTMLIFrameElement | null;\n}\n\nexport interface EmbeddedDesignerProps {\n /** Short-lived `designerUrl` returned by your backend. Never pass an `sk_` key. */\n designerUrl: string;\n expectedChartId?: string;\n expectedWorkspaceId?: string;\n title?: string;\n className?: string;\n style?: CSSProperties;\n iframeClassName?: string;\n iframeStyle?: Partial<CSSStyleDeclaration>;\n allow?: string;\n referrerPolicy?: ReferrerPolicy;\n /**\n * Show the built-in branded loading skeleton and error/expiry card inside the\n * container while the Designer boots. Defaults to `true`. Set `false` when you\n * render your own loading and error chrome.\n */\n showLoadingState?: boolean;\n /**\n * If the Designer never posts `ready` within this many milliseconds, the host\n * shows the error card with a timeout message. Defaults to `20000`.\n */\n loadingTimeoutMs?: number;\n /**\n * How the iframe is sized. `'fill'` (the default) is **container-aware**: if the\n * container has a definite height (a sized block, `flex-1 min-h-0`, a resolved\n * `%`) the Designer fills 100% of it and tracks its size via a `ResizeObserver`;\n * if the container is content-sized (full-page usage) the Designer fills the\n * viewport (`window.innerHeight` minus the iframe's top offset). Either way the\n * result is clamped to `minHeight` and re-probed on resize. Heights are applied\n * with `!important` so a host theme can't override them. Pass a number for a\n * fixed pixel height you manage yourself.\n */\n height?: 'fill' | number;\n /** Lower bound for `'fill'` sizing. Defaults to `480`. */\n minHeight?: number;\n /**\n * Legacy content-height auto-grow via the `seatlayer.designer.resize`\n * protocol. Only honored when `height` is a number; with the default\n * `height: 'fill'` the resize messages are ignored and the SDK sizes the iframe\n * to the container or viewport.\n */\n autoResize?: boolean;\n /**\n * Called when the user presses \"Try again\" on the error card. Mint a fresh\n * session and set the new `designerUrl` (recreating the iframe returns it to\n * the loading state). When omitted, \"Try again\" reloads the current URL.\n *\n * When supplied, it also powers automatic session renewal — see\n * {@link EmbeddedDesignerProps.autoRenewSession}.\n */\n onRequestRelaunch?: () => void;\n /**\n * Keep long editing sessions alive with no expiry wall. When you supply\n * `onRequestRelaunch`, the SDK schedules a silent relaunch shortly before the\n * session's `expiresAt` (mint a fresh session and update `designerUrl` in your\n * `onRequestRelaunch` handler), and makes one automatic recovery attempt if an\n * expiry error still slips through before showing the \"Try again\" card. Defaults\n * to `true` whenever `onRequestRelaunch` is provided; a no-op without it. Set\n * `false` to keep the fully manual \"Try again\" behavior.\n */\n autoRenewSession?: boolean;\n onReady?: (message: EmbeddedDesignerMessage) => void;\n onSaved?: (message: EmbeddedDesignerMessage) => void;\n onPublished?: (message: EmbeddedDesignerMessage) => void;\n onClose?: (message: EmbeddedDesignerMessage) => void;\n onError?: (message: EmbeddedDesignerMessage) => void;\n}\n\n/**\n * Native-feeling React host for the secure SeatLayer Designer iframe.\n * A new `designerUrl` always recreates the iframe, so a new fragment token can\n * never retain state from an earlier chart session.\n */\nexport const EmbeddedDesigner = forwardRef<EmbeddedDesignerHandle, EmbeddedDesignerProps>(\n function EmbeddedDesigner(props, ref) {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const designerRef = useRef<CoreEmbeddedDesigner | null>(null);\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n const designer = new CoreEmbeddedDesigner({\n designerUrl: props.designerUrl,\n container,\n expectedChartId: props.expectedChartId,\n expectedWorkspaceId: props.expectedWorkspaceId,\n title: props.title,\n className: props.iframeClassName,\n style: props.iframeStyle,\n allow: props.allow,\n referrerPolicy: props.referrerPolicy,\n showLoadingState: props.showLoadingState,\n loadingTimeoutMs: props.loadingTimeoutMs,\n height: props.height,\n minHeight: props.minHeight,\n autoResize: props.autoResize,\n autoRenewSession: props.autoRenewSession,\n // Only forward a relaunch hook when the host supplied one, so the core's\n // \"reload the same URL in place\" fallback still applies otherwise.\n onRequestRelaunch: props.onRequestRelaunch\n ? () => callbacks.current.onRequestRelaunch?.()\n : undefined,\n onReady: (message) => callbacks.current.onReady?.(message),\n onSaved: (message) => callbacks.current.onSaved?.(message),\n onPublished: (message) => callbacks.current.onPublished?.(message),\n onClose: (message) => callbacks.current.onClose?.(message),\n onError: (message) => callbacks.current.onError?.(message),\n });\n designer.mount();\n designerRef.current = designer;\n return () => {\n designer.destroy();\n designerRef.current = null;\n };\n // Session/chart identity changes must recreate the iframe. Sizing and\n // relaunch policy are updated in place below; callbacks are read from refs.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy, props.showLoadingState, props.loadingTimeoutMs, props.autoResize]);\n\n useEffect(() => {\n designerRef.current?.setSizing(props.height, props.minHeight);\n }, [props.height, props.minHeight]);\n\n useEffect(() => {\n designerRef.current?.setRelaunchPolicy(\n props.onRequestRelaunch ? () => callbacks.current.onRequestRelaunch?.() : undefined,\n props.autoRenewSession,\n );\n }, [!!props.onRequestRelaunch, props.autoRenewSession]);\n\n useImperativeHandle(ref, () => ({\n setDesignerUrl: (designerUrl) => { designerRef.current?.setDesignerUrl(designerUrl); },\n getIframe: () => designerRef.current?.getIframe() ?? null,\n }), []);\n\n return <div ref={containerRef} className={props.className} style={props.style} />;\n },\n);\n","import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n SeatPicker as CoreSeatPicker,\n type SeatPickerOptions,\n type SeatPickerTheme,\n type SeatPickerPricing,\n type SeatPickerBestAvailableOptions,\n type SeatPickerBuyerView,\n type SeatPickerBuyerViewOptions,\n type PickerMapTheme,\n type RendererViewMode,\n type SelectedSeat,\n type HoldResult,\n} from '@seatlayer/js';\n\nexport type {\n SeatPickerOptions,\n SeatPickerTheme,\n SeatPickerPricing,\n SeatPickerBestAvailableOptions,\n SeatPickerBuyerView,\n SeatPickerBuyerViewOptions,\n PickerMapTheme,\n RendererViewMode,\n CheckoutHandoff,\n CheckoutLineItem,\n} from '@seatlayer/js';\n\n/** Imperative handle for the full-experience picker widget. */\nexport interface SeatPickerHandle {\n /** Logically close the picker. React still owns component unmount/teardown. */\n close(): void;\n /** Current selection with resolved prices. */\n getSelection(): SelectedSeat[];\n /** Server-side best seats + hold, reflected in the widget tray. */\n bestAvailable(\n qty: number,\n categoryKey?: string,\n options?: SeatPickerBestAvailableOptions,\n ): Promise<HoldResult | null>;\n /** Current active/restored hold reflected in the tray. */\n getCurrentHold(): HoldResult | null;\n /** Restore an active hold by its opaque id. */\n resumeHold(holdId: string): Promise<HoldResult | null>;\n /** Remove one held ticket while preserving the remainder. */\n removeHeldTicket(label: string): Promise<boolean>;\n /** Release the current hold (if any) and reset the tray. */\n release(): Promise<void>;\n /**\n * Re-acquire the buyer access session after your app re-authorizes the buyer\n * (Sales Channels). Resolves false when the picker is not access-scoped.\n */\n refreshAccess(): Promise<boolean>;\n /** Re-ink the drawn map without rebuilding the picker or disturbing a hold. */\n setMapTheme(map: PickerMapTheme | null): void;\n /** Hide or restore duplicate event identity after mount. */\n setEventDetailsHidden(hidden: boolean): void;\n /** Replace host display-pricing overrides without remounting. */\n setPricing(pricing: SeatPickerPricing | undefined): void;\n /** Current colorblind-safe buyer preference. */\n isColorblindSafe(): boolean;\n /** Update the colorblind-safe buyer preference and renderer. */\n setColorblindSafe(on: boolean): void;\n /** Switch the underlying 2D map projection. */\n setViewMode(mode: RendererViewMode): void;\n /** Current 2D map projection. */\n getViewMode(): RendererViewMode;\n /** Current buyer surface: map or interactive 3D venue. */\n getBuyerView(): SeatPickerBuyerView;\n /** Switch the buyer surface, optionally carrying a 3D camera intent. */\n setBuyerView(view: SeatPickerBuyerView, options?: SeatPickerBuyerViewOptions): void;\n}\n\nexport interface SeatPickerProps extends Omit<SeatPickerOptions, 'container'> {\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * React wrapper around the full SeatPicker widget (header · live price panel ·\n * tray · GA · hold countdown · toasts). The widget is container-adaptive: give\n * the wrapping div a size and it lays itself out for that box (side panel wide,\n * bottom sheet narrow). For the one-call modal, use `SeatPicker.open()` from\n * `@seatlayer/js` directly.\n */\nexport const SeatPicker = forwardRef<SeatPickerHandle, SeatPickerProps>(\n function SeatPicker(props, ref) {\n const { className, style, event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout } = props;\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n const pickerRef = useRef<CoreSeatPicker | null>(null);\n const closeRef = useRef<(() => void) | null>(null);\n\n // Always call the latest callbacks without rebuilding the widget.\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n // Forward every option the host passed. Spreading rather than naming each\n // field keeps new core options (pricing, hideBadge, transport, …) working\n // here the day they ship: a hand-maintained list silently drops anything\n // it forgets, and `SeatPickerProps extends SeatPickerOptions` means such a\n // drop still type-checks clean for the host.\n const { className: _className, style: _style, ...options } = callbacks.current;\n\n const picker = new CoreSeatPicker({\n ...options,\n container: el,\n onCheckout: (hold, seats, handoff) => callbacks.current.onCheckout?.(hold, seats, handoff),\n onBooked: (handoff) => callbacks.current.onBooked?.(handoff),\n onSelectionChange: (seats) => callbacks.current.onSelectionChange?.(seats),\n onHoldChange: (hold, seats, handoff) => callbacks.current.onHoldChange?.(hold, seats, handoff),\n onHoldExpired: () => callbacks.current.onHoldExpired?.(),\n onHoldRestored: (hold, seats, handoff) => callbacks.current.onHoldRestored?.(hold, seats, handoff),\n onError: (err) => callbacks.current.onError?.(err),\n // Sales Channels. The provider is read through the ref for the same\n // reason as every other callback: a host may pass an inline arrow.\n buyerAccessTokenProvider: options.buyerAccessTokenProvider\n ? (context) => callbacks.current.buyerAccessTokenProvider!(context)\n : undefined,\n onAccessExpired: (state) => callbacks.current.onAccessExpired?.(state),\n onAccessUnavailable: (state) => callbacks.current.onAccessUnavailable?.(state),\n onSelectedObjectUnavailable: (state) =>\n callbacks.current.onSelectedObjectUnavailable?.(state),\n // Hosted checkout. Read through the ref like every other callback — the\n // spread above would freeze an inline arrow at construction, and these\n // two fire long after it (a payment webhook can land minutes later).\n onCheckoutUnavailable: (state) => callbacks.current.onCheckoutUnavailable?.(state),\n onOrderConfirmed: (order) => callbacks.current.onOrderConfirmed?.(order),\n });\n pickerRef.current = picker;\n let closed = false;\n const close = (): void => {\n if (closed) return;\n closed = true;\n if (pickerRef.current === picker) pickerRef.current = null;\n picker.close();\n };\n closeRef.current = close;\n void picker.render();\n\n return () => {\n if (!closed) picker.destroy();\n if (pickerRef.current === picker) pickerRef.current = null;\n if (closeRef.current === close) closeRef.current = null;\n };\n // Rebuild only when the identity of the event/config changes. Object-valued\n // options (theme, messages, pricing, transport) stay out: hosts routinely\n // pass them as inline literals, so a new identity every render would tear\n // the widget down mid-selection. They are read fresh at construction.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout]);\n\n useImperativeHandle(\n ref,\n (): SeatPickerHandle => ({\n close: () => closeRef.current?.(),\n getSelection: () => pickerRef.current?.getSelection() ?? [],\n bestAvailable: (qty, categoryKey, options) =>\n pickerRef.current?.bestAvailable(qty, categoryKey, options) ?? Promise.resolve(null),\n getCurrentHold: () => pickerRef.current?.getCurrentHold() ?? null,\n resumeHold: (holdId) => pickerRef.current?.resumeHold(holdId) ?? Promise.resolve(null),\n removeHeldTicket: (label) => pickerRef.current?.removeHeldTicket(label) ?? Promise.resolve(false),\n release: () => pickerRef.current?.release() ?? Promise.resolve(),\n refreshAccess: () => pickerRef.current?.refreshAccess() ?? Promise.resolve(false),\n setMapTheme: (map) => pickerRef.current?.setMapTheme(map),\n setEventDetailsHidden: (hidden) => pickerRef.current?.setEventDetailsHidden(hidden),\n setPricing: (pricing) => pickerRef.current?.setPricing(pricing),\n isColorblindSafe: () => pickerRef.current?.isColorblindSafe() ?? false,\n setColorblindSafe: (on) => pickerRef.current?.setColorblindSafe(on),\n setViewMode: (mode) => pickerRef.current?.setViewMode(mode),\n getViewMode: () => pickerRef.current?.getViewMode() ?? 'flat',\n getBuyerView: () => pickerRef.current?.getBuyerView() ?? 'map',\n setBuyerView: (view, options) => pickerRef.current?.setBuyerView(view, options),\n }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n","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 SeatManagerActivity,\n type SeatManagerActionResult,\n type SeatManagerConnection,\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 SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\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 selectAll(): ExpandedSeat[];\n selectSection(sectionId: string): ExpandedSeat[];\n selectByLabels(labels: string[]): ExpandedSeat[];\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}\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 } = 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 theme: callbacks.current.theme,\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 onActionComplete: (r: SeatManagerActionResult) => callbacks.current.onActionComplete?.(r),\n onConnectionChange: (s: SeatManagerConnection) => callbacks.current.onConnectionChange?.(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 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 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 selectAll: () => managerRef.current?.selectAll() ?? [],\n selectSection: (id) => managerRef.current?.selectSection(id) ?? [],\n selectByLabels: (labels) => managerRef.current?.selectByLabels(labels) ?? [],\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 }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA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AAA,QACpF,SAAS,CAAC,WAAW,WAAW,SAAS,QAAQ,MAAM,KAAK,QAAQ,QAAQ;AAAA,QAC5E,YAAY,MAAM,WAAW,SAAS,WAAW,KAAK,QAAQ,QAAQ;AAAA,QACtE,eAAe,CAAC,QAAQ,eAAe,WAAW,SAAS,cAAc,QAAQ,UAAU,KAAK,QAAQ,QAAQ;AAAA,QAChH,WAAW,MAAM,WAAW,SAAS,UAAU,KAAK,CAAC;AAAA,QACrD,eAAe,CAAC,OAAO,WAAW,SAAS,cAAc,EAAE,KAAK,CAAC;AAAA,QACjE,gBAAgB,CAAC,WAAW,WAAW,SAAS,eAAe,MAAM,KAAK,CAAC;AAAA,QAC3E,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,MACjD;AAAA,MACA,CAAC;AAAA,IACH;AAEA,WAAO,6CAAC,SAAI,KAAK,cAAc,WAAsB,OAAc;AAAA,EACrE;AACF;","names":["SeatingChart","CoreSeatingChart","import_react","import_js","import_jsx_runtime","EmbeddedDesigner","CoreEmbeddedDesigner","import_react","import_js","import_jsx_runtime","SeatPicker","CoreSeatPicker","import_js","import_react","import_jsx_runtime","SeatManager","CoreSeatManager"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
|
-
import { SeatingChartOptions, HoldResult, GAAreaAvailability, BestAvailableResult, SelectedSeat, EmbeddedDesignerMessage, SeatPickerOptions } from '@seatlayer/js';
|
|
4
|
-
export { BestAvailableResult, BuyerAccessExpiredEvent, BuyerAccessRefreshReason, BuyerAccessToken, BuyerAccessTokenProvider, BuyerAccessUnavailableEvent, BuyerAccessUnavailableReason, CheckoutHandoff, CheckoutLineItem,
|
|
3
|
+
import { SeatingChartOptions, HoldResult, GAAreaAvailability, BestAvailableResult, SelectedSeat, EmbeddedDesignerMessage, SeatPickerOptions, SeatPickerBestAvailableOptions, PickerMapTheme, SeatPickerPricing, RendererViewMode, SeatPickerBuyerView, SeatPickerBuyerViewOptions } from '@seatlayer/js';
|
|
4
|
+
export { AttachPickerFrameOptions, BestAvailableResult, BuyerAccessExpiredEvent, BuyerAccessRefreshReason, BuyerAccessToken, BuyerAccessTokenProvider, BuyerAccessUnavailableEvent, BuyerAccessUnavailableReason, CheckoutHandoff, CheckoutLineItem, EmbeddedDesignerMessage, GAAreaAvailability, HoldLineItem, HoldResult, PickerMapTheme, RendererViewMode, SeatHoverDetails, SeatPickerBestAvailableOptions, SeatPickerBuyerView, SeatPickerBuyerViewOptions, SeatPickerOptions, SeatPickerPricing, SeatPickerTheme, SeatPicker as SeatPickerWidget, SelectedObjectUnavailableEvent, SelectedSeat, attachPickerFrame } from '@seatlayer/js';
|
|
5
5
|
export { SeatManager, SeatManagerHandle, SeatManagerProps } from './manager.cjs';
|
|
6
|
-
export { SeatManagerActionResult, SeatManagerActivity, SeatManagerMode, SeatManagerOptions, SeatManagerTallies } from '@seatlayer/js/manager';
|
|
6
|
+
export { ControlRoomActivityEntry, ControlRoomSectionMetric, ControlRoomSnapshot, EventScopedManageToken, SeatManagerActionResult, SeatManagerActivity, SeatManagerConnection, SeatManagerMode, SeatManagerOptions, SeatManagerTallies } from '@seatlayer/js/manager';
|
|
7
7
|
|
|
8
8
|
/** Imperative handle exposed via `ref` — call these to drive the picker from your app. */
|
|
9
9
|
interface SeatingChartHandle {
|
|
@@ -70,8 +70,8 @@ interface SeatingChartProps extends Omit<SeatingChartOptions, 'container'> {
|
|
|
70
70
|
* (`onSelectionChange`, `onHold`, `onError`, `onDeckTap`, `onHint`) may change
|
|
71
71
|
* freely between renders without re-mounting the canvas — only `event`,
|
|
72
72
|
* `apiBase`, `maxSelection`, `publicKey`, `locale`, `currency`, and
|
|
73
|
-
* `colorblindSafe` trigger a rebuild.
|
|
74
|
-
* changing it alone does not re-apply.)
|
|
73
|
+
* `colorblindSafe`, `initialView`, and `errorDisplay` trigger a rebuild.
|
|
74
|
+
* (`messages` is read once per mount; changing it alone does not re-apply.)
|
|
75
75
|
*/
|
|
76
76
|
declare const SeatingChart: react.ForwardRefExoticComponent<SeatingChartProps & react.RefAttributes<SeatingChartHandle>>;
|
|
77
77
|
|
|
@@ -158,10 +158,12 @@ declare const EmbeddedDesigner: react.ForwardRefExoticComponent<EmbeddedDesigner
|
|
|
158
158
|
|
|
159
159
|
/** Imperative handle for the full-experience picker widget. */
|
|
160
160
|
interface SeatPickerHandle {
|
|
161
|
+
/** Logically close the picker. React still owns component unmount/teardown. */
|
|
162
|
+
close(): void;
|
|
161
163
|
/** Current selection with resolved prices. */
|
|
162
164
|
getSelection(): SelectedSeat[];
|
|
163
165
|
/** Server-side best seats + hold, reflected in the widget tray. */
|
|
164
|
-
bestAvailable(qty: number, categoryKey?: string): Promise<HoldResult | null>;
|
|
166
|
+
bestAvailable(qty: number, categoryKey?: string, options?: SeatPickerBestAvailableOptions): Promise<HoldResult | null>;
|
|
165
167
|
/** Current active/restored hold reflected in the tray. */
|
|
166
168
|
getCurrentHold(): HoldResult | null;
|
|
167
169
|
/** Restore an active hold by its opaque id. */
|
|
@@ -175,6 +177,24 @@ interface SeatPickerHandle {
|
|
|
175
177
|
* (Sales Channels). Resolves false when the picker is not access-scoped.
|
|
176
178
|
*/
|
|
177
179
|
refreshAccess(): Promise<boolean>;
|
|
180
|
+
/** Re-ink the drawn map without rebuilding the picker or disturbing a hold. */
|
|
181
|
+
setMapTheme(map: PickerMapTheme | null): void;
|
|
182
|
+
/** Hide or restore duplicate event identity after mount. */
|
|
183
|
+
setEventDetailsHidden(hidden: boolean): void;
|
|
184
|
+
/** Replace host display-pricing overrides without remounting. */
|
|
185
|
+
setPricing(pricing: SeatPickerPricing | undefined): void;
|
|
186
|
+
/** Current colorblind-safe buyer preference. */
|
|
187
|
+
isColorblindSafe(): boolean;
|
|
188
|
+
/** Update the colorblind-safe buyer preference and renderer. */
|
|
189
|
+
setColorblindSafe(on: boolean): void;
|
|
190
|
+
/** Switch the underlying 2D map projection. */
|
|
191
|
+
setViewMode(mode: RendererViewMode): void;
|
|
192
|
+
/** Current 2D map projection. */
|
|
193
|
+
getViewMode(): RendererViewMode;
|
|
194
|
+
/** Current buyer surface: map or interactive 3D venue. */
|
|
195
|
+
getBuyerView(): SeatPickerBuyerView;
|
|
196
|
+
/** Switch the buyer surface, optionally carrying a 3D camera intent. */
|
|
197
|
+
setBuyerView(view: SeatPickerBuyerView, options?: SeatPickerBuyerViewOptions): void;
|
|
178
198
|
}
|
|
179
199
|
interface SeatPickerProps extends Omit<SeatPickerOptions, 'container'> {
|
|
180
200
|
className?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
|
-
import { SeatingChartOptions, HoldResult, GAAreaAvailability, BestAvailableResult, SelectedSeat, EmbeddedDesignerMessage, SeatPickerOptions } from '@seatlayer/js';
|
|
4
|
-
export { BestAvailableResult, BuyerAccessExpiredEvent, BuyerAccessRefreshReason, BuyerAccessToken, BuyerAccessTokenProvider, BuyerAccessUnavailableEvent, BuyerAccessUnavailableReason, CheckoutHandoff, CheckoutLineItem,
|
|
3
|
+
import { SeatingChartOptions, HoldResult, GAAreaAvailability, BestAvailableResult, SelectedSeat, EmbeddedDesignerMessage, SeatPickerOptions, SeatPickerBestAvailableOptions, PickerMapTheme, SeatPickerPricing, RendererViewMode, SeatPickerBuyerView, SeatPickerBuyerViewOptions } from '@seatlayer/js';
|
|
4
|
+
export { AttachPickerFrameOptions, BestAvailableResult, BuyerAccessExpiredEvent, BuyerAccessRefreshReason, BuyerAccessToken, BuyerAccessTokenProvider, BuyerAccessUnavailableEvent, BuyerAccessUnavailableReason, CheckoutHandoff, CheckoutLineItem, EmbeddedDesignerMessage, GAAreaAvailability, HoldLineItem, HoldResult, PickerMapTheme, RendererViewMode, SeatHoverDetails, SeatPickerBestAvailableOptions, SeatPickerBuyerView, SeatPickerBuyerViewOptions, SeatPickerOptions, SeatPickerPricing, SeatPickerTheme, SeatPicker as SeatPickerWidget, SelectedObjectUnavailableEvent, SelectedSeat, attachPickerFrame } from '@seatlayer/js';
|
|
5
5
|
export { SeatManager, SeatManagerHandle, SeatManagerProps } from './manager.js';
|
|
6
|
-
export { SeatManagerActionResult, SeatManagerActivity, SeatManagerMode, SeatManagerOptions, SeatManagerTallies } from '@seatlayer/js/manager';
|
|
6
|
+
export { ControlRoomActivityEntry, ControlRoomSectionMetric, ControlRoomSnapshot, EventScopedManageToken, SeatManagerActionResult, SeatManagerActivity, SeatManagerConnection, SeatManagerMode, SeatManagerOptions, SeatManagerTallies } from '@seatlayer/js/manager';
|
|
7
7
|
|
|
8
8
|
/** Imperative handle exposed via `ref` — call these to drive the picker from your app. */
|
|
9
9
|
interface SeatingChartHandle {
|
|
@@ -70,8 +70,8 @@ interface SeatingChartProps extends Omit<SeatingChartOptions, 'container'> {
|
|
|
70
70
|
* (`onSelectionChange`, `onHold`, `onError`, `onDeckTap`, `onHint`) may change
|
|
71
71
|
* freely between renders without re-mounting the canvas — only `event`,
|
|
72
72
|
* `apiBase`, `maxSelection`, `publicKey`, `locale`, `currency`, and
|
|
73
|
-
* `colorblindSafe` trigger a rebuild.
|
|
74
|
-
* changing it alone does not re-apply.)
|
|
73
|
+
* `colorblindSafe`, `initialView`, and `errorDisplay` trigger a rebuild.
|
|
74
|
+
* (`messages` is read once per mount; changing it alone does not re-apply.)
|
|
75
75
|
*/
|
|
76
76
|
declare const SeatingChart: react.ForwardRefExoticComponent<SeatingChartProps & react.RefAttributes<SeatingChartHandle>>;
|
|
77
77
|
|
|
@@ -158,10 +158,12 @@ declare const EmbeddedDesigner: react.ForwardRefExoticComponent<EmbeddedDesigner
|
|
|
158
158
|
|
|
159
159
|
/** Imperative handle for the full-experience picker widget. */
|
|
160
160
|
interface SeatPickerHandle {
|
|
161
|
+
/** Logically close the picker. React still owns component unmount/teardown. */
|
|
162
|
+
close(): void;
|
|
161
163
|
/** Current selection with resolved prices. */
|
|
162
164
|
getSelection(): SelectedSeat[];
|
|
163
165
|
/** Server-side best seats + hold, reflected in the widget tray. */
|
|
164
|
-
bestAvailable(qty: number, categoryKey?: string): Promise<HoldResult | null>;
|
|
166
|
+
bestAvailable(qty: number, categoryKey?: string, options?: SeatPickerBestAvailableOptions): Promise<HoldResult | null>;
|
|
165
167
|
/** Current active/restored hold reflected in the tray. */
|
|
166
168
|
getCurrentHold(): HoldResult | null;
|
|
167
169
|
/** Restore an active hold by its opaque id. */
|
|
@@ -175,6 +177,24 @@ interface SeatPickerHandle {
|
|
|
175
177
|
* (Sales Channels). Resolves false when the picker is not access-scoped.
|
|
176
178
|
*/
|
|
177
179
|
refreshAccess(): Promise<boolean>;
|
|
180
|
+
/** Re-ink the drawn map without rebuilding the picker or disturbing a hold. */
|
|
181
|
+
setMapTheme(map: PickerMapTheme | null): void;
|
|
182
|
+
/** Hide or restore duplicate event identity after mount. */
|
|
183
|
+
setEventDetailsHidden(hidden: boolean): void;
|
|
184
|
+
/** Replace host display-pricing overrides without remounting. */
|
|
185
|
+
setPricing(pricing: SeatPickerPricing | undefined): void;
|
|
186
|
+
/** Current colorblind-safe buyer preference. */
|
|
187
|
+
isColorblindSafe(): boolean;
|
|
188
|
+
/** Update the colorblind-safe buyer preference and renderer. */
|
|
189
|
+
setColorblindSafe(on: boolean): void;
|
|
190
|
+
/** Switch the underlying 2D map projection. */
|
|
191
|
+
setViewMode(mode: RendererViewMode): void;
|
|
192
|
+
/** Current 2D map projection. */
|
|
193
|
+
getViewMode(): RendererViewMode;
|
|
194
|
+
/** Current buyer surface: map or interactive 3D venue. */
|
|
195
|
+
getBuyerView(): SeatPickerBuyerView;
|
|
196
|
+
/** Switch the buyer surface, optionally carrying a 3D camera intent. */
|
|
197
|
+
setBuyerView(view: SeatPickerBuyerView, options?: SeatPickerBuyerViewOptions): void;
|
|
178
198
|
}
|
|
179
199
|
interface SeatPickerProps extends Omit<SeatPickerOptions, 'container'> {
|
|
180
200
|
className?: string;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SeatManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3O4YZE4V.js";
|
|
4
4
|
|
|
5
5
|
// src/SeatingChart.tsx
|
|
6
6
|
import {
|
|
@@ -15,7 +15,19 @@ import {
|
|
|
15
15
|
import { jsx } from "react/jsx-runtime";
|
|
16
16
|
var SeatingChart = forwardRef(
|
|
17
17
|
function SeatingChart2(props, ref) {
|
|
18
|
-
const {
|
|
18
|
+
const {
|
|
19
|
+
className,
|
|
20
|
+
style,
|
|
21
|
+
event,
|
|
22
|
+
apiBase,
|
|
23
|
+
maxSelection,
|
|
24
|
+
publicKey,
|
|
25
|
+
locale,
|
|
26
|
+
currency,
|
|
27
|
+
colorblindSafe,
|
|
28
|
+
initialView,
|
|
29
|
+
errorDisplay
|
|
30
|
+
} = props;
|
|
19
31
|
const containerRef = useRef(null);
|
|
20
32
|
const chartRef = useRef(null);
|
|
21
33
|
const callbacks = useRef(props);
|
|
@@ -32,6 +44,8 @@ var SeatingChart = forwardRef(
|
|
|
32
44
|
locale,
|
|
33
45
|
currency,
|
|
34
46
|
colorblindSafe,
|
|
47
|
+
initialView,
|
|
48
|
+
errorDisplay,
|
|
35
49
|
messages: callbacks.current.messages,
|
|
36
50
|
// Read through the ref so a host may pass the provider as an inline
|
|
37
51
|
// arrow without its new identity tearing the canvas down each render.
|
|
@@ -57,7 +71,7 @@ var SeatingChart = forwardRef(
|
|
|
57
71
|
chart.destroy();
|
|
58
72
|
chartRef.current = null;
|
|
59
73
|
};
|
|
60
|
-
}, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe]);
|
|
74
|
+
}, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, initialView, errorDisplay]);
|
|
61
75
|
useImperativeHandle(
|
|
62
76
|
ref,
|
|
63
77
|
() => ({
|
|
@@ -136,7 +150,16 @@ var EmbeddedDesigner = forwardRef2(
|
|
|
136
150
|
designer.destroy();
|
|
137
151
|
designerRef.current = null;
|
|
138
152
|
};
|
|
139
|
-
}, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy, props.showLoadingState, props.loadingTimeoutMs, props.autoResize
|
|
153
|
+
}, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy, props.showLoadingState, props.loadingTimeoutMs, props.autoResize]);
|
|
154
|
+
useEffect2(() => {
|
|
155
|
+
designerRef.current?.setSizing(props.height, props.minHeight);
|
|
156
|
+
}, [props.height, props.minHeight]);
|
|
157
|
+
useEffect2(() => {
|
|
158
|
+
designerRef.current?.setRelaunchPolicy(
|
|
159
|
+
props.onRequestRelaunch ? () => callbacks.current.onRequestRelaunch?.() : void 0,
|
|
160
|
+
props.autoRenewSession
|
|
161
|
+
);
|
|
162
|
+
}, [!!props.onRequestRelaunch, props.autoRenewSession]);
|
|
140
163
|
useImperativeHandle2(ref, () => ({
|
|
141
164
|
setDesignerUrl: (designerUrl) => {
|
|
142
165
|
designerRef.current?.setDesignerUrl(designerUrl);
|
|
@@ -163,6 +186,7 @@ var SeatPicker = forwardRef3(
|
|
|
163
186
|
const { className, style, event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout } = props;
|
|
164
187
|
const containerRef = useRef3(null);
|
|
165
188
|
const pickerRef = useRef3(null);
|
|
189
|
+
const closeRef = useRef3(null);
|
|
166
190
|
const callbacks = useRef3(props);
|
|
167
191
|
callbacks.current = props;
|
|
168
192
|
useEffect3(() => {
|
|
@@ -192,22 +216,41 @@ var SeatPicker = forwardRef3(
|
|
|
192
216
|
onOrderConfirmed: (order) => callbacks.current.onOrderConfirmed?.(order)
|
|
193
217
|
});
|
|
194
218
|
pickerRef.current = picker;
|
|
219
|
+
let closed = false;
|
|
220
|
+
const close = () => {
|
|
221
|
+
if (closed) return;
|
|
222
|
+
closed = true;
|
|
223
|
+
if (pickerRef.current === picker) pickerRef.current = null;
|
|
224
|
+
picker.close();
|
|
225
|
+
};
|
|
226
|
+
closeRef.current = close;
|
|
195
227
|
void picker.render();
|
|
196
228
|
return () => {
|
|
197
|
-
picker.destroy();
|
|
198
|
-
pickerRef.current = null;
|
|
229
|
+
if (!closed) picker.destroy();
|
|
230
|
+
if (pickerRef.current === picker) pickerRef.current = null;
|
|
231
|
+
if (closeRef.current === close) closeRef.current = null;
|
|
199
232
|
};
|
|
200
233
|
}, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout]);
|
|
201
234
|
useImperativeHandle3(
|
|
202
235
|
ref,
|
|
203
236
|
() => ({
|
|
237
|
+
close: () => closeRef.current?.(),
|
|
204
238
|
getSelection: () => pickerRef.current?.getSelection() ?? [],
|
|
205
|
-
bestAvailable: (qty, categoryKey) => pickerRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),
|
|
239
|
+
bestAvailable: (qty, categoryKey, options) => pickerRef.current?.bestAvailable(qty, categoryKey, options) ?? Promise.resolve(null),
|
|
206
240
|
getCurrentHold: () => pickerRef.current?.getCurrentHold() ?? null,
|
|
207
241
|
resumeHold: (holdId) => pickerRef.current?.resumeHold(holdId) ?? Promise.resolve(null),
|
|
208
242
|
removeHeldTicket: (label) => pickerRef.current?.removeHeldTicket(label) ?? Promise.resolve(false),
|
|
209
243
|
release: () => pickerRef.current?.release() ?? Promise.resolve(),
|
|
210
|
-
refreshAccess: () => pickerRef.current?.refreshAccess() ?? Promise.resolve(false)
|
|
244
|
+
refreshAccess: () => pickerRef.current?.refreshAccess() ?? Promise.resolve(false),
|
|
245
|
+
setMapTheme: (map) => pickerRef.current?.setMapTheme(map),
|
|
246
|
+
setEventDetailsHidden: (hidden) => pickerRef.current?.setEventDetailsHidden(hidden),
|
|
247
|
+
setPricing: (pricing) => pickerRef.current?.setPricing(pricing),
|
|
248
|
+
isColorblindSafe: () => pickerRef.current?.isColorblindSafe() ?? false,
|
|
249
|
+
setColorblindSafe: (on) => pickerRef.current?.setColorblindSafe(on),
|
|
250
|
+
setViewMode: (mode) => pickerRef.current?.setViewMode(mode),
|
|
251
|
+
getViewMode: () => pickerRef.current?.getViewMode() ?? "flat",
|
|
252
|
+
getBuyerView: () => pickerRef.current?.getBuyerView() ?? "map",
|
|
253
|
+
setBuyerView: (view, options) => pickerRef.current?.setBuyerView(view, options)
|
|
211
254
|
}),
|
|
212
255
|
[]
|
|
213
256
|
);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/SeatingChart.tsx","../src/EmbeddedDesigner.tsx","../src/SeatPicker.tsx","../src/index.ts"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n SeatingChart as CoreSeatingChart,\n type SeatingChartOptions,\n type SelectedSeat,\n type HoldResult,\n type BestAvailableResult,\n type GAAreaAvailability,\n type HoldLineItem,\n} from '@seatlayer/js';\n\nexport type { SelectedSeat, HoldResult, BestAvailableResult, GAAreaAvailability, HoldLineItem } from '@seatlayer/js';\nexport type { SeatHoverDetails } from '@seatlayer/js';\n\n/** Imperative handle exposed via `ref` — call these to drive the picker from your app. */\nexport interface SeatingChartHandle {\n /** Hold the current selection. Resolves the hold, or `null` on a 409 conflict. */\n hold(options?: { ttlMs?: number }): Promise<HoldResult | null>;\n /** Restore an active hold by its opaque id. */\n resumeHold(holdId: string): Promise<HoldResult | null>;\n /** Current active hold known to the chart. */\n getCurrentHold(): HoldResult | null;\n /** GA areas with live remaining capacity. */\n getGAAreas(): GAAreaAvailability[];\n /** Atomically hold a quantity from one GA area. */\n holdGA(areaId: string, qty: number, options?: { tierId?: string | null; ttlMs?: number }): Promise<HoldResult | null>;\n /** Ask the server for the `qty` best free seats and hold them atomically. */\n bestAvailable(qty: number, categoryKey?: string): Promise<BestAvailableResult | null>;\n /** Release the current hold (if any). */\n release(): Promise<void>;\n /** Release some held labels while keeping the remainder active. */\n releaseLabels(labels: string[]): Promise<boolean>;\n /** The current selection, with prices resolved from the chart categories. */\n getSelection(): SelectedSeat[];\n /**\n * Choose a ticket tier for a selected seat (e.g. Adult → Child). Available\n * `tiers` are on each `SelectedSeat`; `tierId=null` reverts to the default.\n */\n setSeatTier(seatId: string, tierId: string | null): void;\n /**\n * Floors of a multi-floor chart — `[{ id, name }]` (single-floor charts\n * return one entry; empty before render()). Pair with setFloor().\n */\n getFloors(): { id: string; name: string }[];\n /** Switch the shown floor (2D). Warns + no-ops on single-floor charts. */\n setFloor(floorId: string): void;\n /** Toggle colorblind-safe rendering at runtime (see the `colorblindSafe` prop). */\n setColorblindSafe(on: boolean): void;\n /** Zoom in one step (same increment as the wheel/pinch gesture). */\n zoomIn(): void;\n /** Zoom out one step. */\n zoomOut(): void;\n /** Reset the camera so the whole chart fits the container. */\n zoomToFit(): void;\n /**\n * Re-acquire the buyer access session after your app re-authorizes the buyer\n * (Sales Channels). Resolves false when the chart is not access-scoped.\n */\n refreshAccess(): Promise<boolean>;\n}\n\nexport interface SeatingChartProps extends Omit<SeatingChartOptions, 'container'> {\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * React wrapper around the framework-agnostic `@seatlayer/js` SDK.\n *\n * The underlying canvas is created once and torn down on unmount. Callback props\n * (`onSelectionChange`, `onHold`, `onError`, `onDeckTap`, `onHint`) may change\n * freely between renders without re-mounting the canvas — only `event`,\n * `apiBase`, `maxSelection`, `publicKey`, `locale`, `currency`, and\n * `colorblindSafe` trigger a rebuild. (`messages` is read once per mount;\n * changing it alone does not re-apply.)\n */\nexport const SeatingChart = forwardRef<SeatingChartHandle, SeatingChartProps>(\n function SeatingChart(props, ref) {\n const { className, style, event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe } = props;\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n const chartRef = useRef<CoreSeatingChart | null>(null);\n\n // Always call the latest callbacks without rebuilding the chart.\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n const chart = new CoreSeatingChart({\n container: el,\n event,\n apiBase,\n maxSelection,\n publicKey,\n locale,\n currency,\n colorblindSafe,\n messages: callbacks.current.messages,\n // Read through the ref so a host may pass the provider as an inline\n // arrow without its new identity tearing the canvas down each render.\n buyerAccessTokenProvider: props.buyerAccessTokenProvider\n ? (context) => callbacks.current.buyerAccessTokenProvider!(context)\n : undefined,\n buyerAccessToken: callbacks.current.buyerAccessToken,\n onAccessExpired: (state) => callbacks.current.onAccessExpired?.(state),\n onAccessUnavailable: (state) => callbacks.current.onAccessUnavailable?.(state),\n onSelectedObjectUnavailable: (state) =>\n callbacks.current.onSelectedObjectUnavailable?.(state),\n onSelectionChange: (seats) => callbacks.current.onSelectionChange?.(seats),\n onHold: (result) => callbacks.current.onHold?.(result),\n onHoldRestored: (result) => callbacks.current.onHoldRestored?.(result),\n onHoldExpired: () => callbacks.current.onHoldExpired?.(),\n onGAClick: (area) => callbacks.current.onGAClick?.(area),\n onError: (err) => callbacks.current.onError?.(err),\n onDeckTap: (floorId) => callbacks.current.onDeckTap?.(floorId),\n onHint: (message) => callbacks.current.onHint?.(message),\n seatTooltip: props.seatTooltip,\n onSeatHover: (details) => callbacks.current.onSeatHover?.(details),\n });\n chartRef.current = chart;\n void chart.render();\n\n return () => {\n chart.destroy();\n chartRef.current = null;\n };\n // Rebuild only when the identity of the chart changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe]);\n\n useImperativeHandle(\n ref,\n (): SeatingChartHandle => ({\n hold: (options) => chartRef.current?.hold(options) ?? Promise.resolve(null),\n resumeHold: (holdId) => chartRef.current?.resumeHold(holdId) ?? Promise.resolve(null),\n getCurrentHold: () => chartRef.current?.getCurrentHold() ?? null,\n getGAAreas: () => chartRef.current?.getGAAreas() ?? [],\n holdGA: (areaId, qty, options) => chartRef.current?.holdGA(areaId, qty, options) ?? Promise.resolve(null),\n bestAvailable: (qty, categoryKey) =>\n chartRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),\n release: () => chartRef.current?.release() ?? Promise.resolve(),\n releaseLabels: (labels) => chartRef.current?.releaseLabels(labels) ?? Promise.resolve(false),\n getSelection: () => chartRef.current?.getSelection() ?? [],\n setSeatTier: (seatId, tierId) => chartRef.current?.setSeatTier(seatId, tierId),\n getFloors: () => chartRef.current?.getFloors() ?? [],\n setFloor: (floorId) => chartRef.current?.setFloor(floorId),\n setColorblindSafe: (on) => chartRef.current?.setColorblindSafe(on),\n zoomIn: () => chartRef.current?.zoomIn(),\n zoomOut: () => chartRef.current?.zoomOut(),\n zoomToFit: () => chartRef.current?.zoomToFit(),\n refreshAccess: () => chartRef.current?.refreshAccess() ?? Promise.resolve(false),\n }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n","import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n EmbeddedDesigner as CoreEmbeddedDesigner,\n type EmbeddedDesignerMessage,\n} from '@seatlayer/js';\n\nexport type { EmbeddedDesignerMessage } from '@seatlayer/js';\n\nexport interface EmbeddedDesignerHandle {\n /** Recreate the iframe with a newly-minted session URL. */\n setDesignerUrl(designerUrl: string): void;\n /** The currently mounted iframe, if any. */\n getIframe(): HTMLIFrameElement | null;\n}\n\nexport interface EmbeddedDesignerProps {\n /** Short-lived `designerUrl` returned by your backend. Never pass an `sk_` key. */\n designerUrl: string;\n expectedChartId?: string;\n expectedWorkspaceId?: string;\n title?: string;\n className?: string;\n style?: CSSProperties;\n iframeClassName?: string;\n iframeStyle?: Partial<CSSStyleDeclaration>;\n allow?: string;\n referrerPolicy?: ReferrerPolicy;\n /**\n * Show the built-in branded loading skeleton and error/expiry card inside the\n * container while the Designer boots. Defaults to `true`. Set `false` when you\n * render your own loading and error chrome.\n */\n showLoadingState?: boolean;\n /**\n * If the Designer never posts `ready` within this many milliseconds, the host\n * shows the error card with a timeout message. Defaults to `20000`.\n */\n loadingTimeoutMs?: number;\n /**\n * How the iframe is sized. `'fill'` (the default) is **container-aware**: if the\n * container has a definite height (a sized block, `flex-1 min-h-0`, a resolved\n * `%`) the Designer fills 100% of it and tracks its size via a `ResizeObserver`;\n * if the container is content-sized (full-page usage) the Designer fills the\n * viewport (`window.innerHeight` minus the iframe's top offset). Either way the\n * result is clamped to `minHeight` and re-probed on resize. Heights are applied\n * with `!important` so a host theme can't override them. Pass a number for a\n * fixed pixel height you manage yourself.\n */\n height?: 'fill' | number;\n /** Lower bound for `'fill'` sizing. Defaults to `480`. */\n minHeight?: number;\n /**\n * Legacy content-height auto-grow via the `seatlayer.designer.resize`\n * protocol. Only honored when `height` is a number; with the default\n * `height: 'fill'` the resize messages are ignored and the SDK sizes the iframe\n * to the container or viewport.\n */\n autoResize?: boolean;\n /**\n * Called when the user presses \"Try again\" on the error card. Mint a fresh\n * session and set the new `designerUrl` (recreating the iframe returns it to\n * the loading state). When omitted, \"Try again\" reloads the current URL.\n *\n * When supplied, it also powers automatic session renewal — see\n * {@link EmbeddedDesignerProps.autoRenewSession}.\n */\n onRequestRelaunch?: () => void;\n /**\n * Keep long editing sessions alive with no expiry wall. When you supply\n * `onRequestRelaunch`, the SDK schedules a silent relaunch shortly before the\n * session's `expiresAt` (mint a fresh session and update `designerUrl` in your\n * `onRequestRelaunch` handler), and makes one automatic recovery attempt if an\n * expiry error still slips through before showing the \"Try again\" card. Defaults\n * to `true` whenever `onRequestRelaunch` is provided; a no-op without it. Set\n * `false` to keep the fully manual \"Try again\" behavior.\n */\n autoRenewSession?: boolean;\n onReady?: (message: EmbeddedDesignerMessage) => void;\n onSaved?: (message: EmbeddedDesignerMessage) => void;\n onPublished?: (message: EmbeddedDesignerMessage) => void;\n onClose?: (message: EmbeddedDesignerMessage) => void;\n onError?: (message: EmbeddedDesignerMessage) => void;\n}\n\n/**\n * Native-feeling React host for the secure SeatLayer Designer iframe.\n * A new `designerUrl` always recreates the iframe, so a new fragment token can\n * never retain state from an earlier chart session.\n */\nexport const EmbeddedDesigner = forwardRef<EmbeddedDesignerHandle, EmbeddedDesignerProps>(\n function EmbeddedDesigner(props, ref) {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const designerRef = useRef<CoreEmbeddedDesigner | null>(null);\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n const designer = new CoreEmbeddedDesigner({\n designerUrl: props.designerUrl,\n container,\n expectedChartId: props.expectedChartId,\n expectedWorkspaceId: props.expectedWorkspaceId,\n title: props.title,\n className: props.iframeClassName,\n style: props.iframeStyle,\n allow: props.allow,\n referrerPolicy: props.referrerPolicy,\n showLoadingState: props.showLoadingState,\n loadingTimeoutMs: props.loadingTimeoutMs,\n height: props.height,\n minHeight: props.minHeight,\n autoResize: props.autoResize,\n autoRenewSession: props.autoRenewSession,\n // Only forward a relaunch hook when the host supplied one, so the core's\n // \"reload the same URL in place\" fallback still applies otherwise.\n onRequestRelaunch: props.onRequestRelaunch\n ? () => callbacks.current.onRequestRelaunch?.()\n : undefined,\n onReady: (message) => callbacks.current.onReady?.(message),\n onSaved: (message) => callbacks.current.onSaved?.(message),\n onPublished: (message) => callbacks.current.onPublished?.(message),\n onClose: (message) => callbacks.current.onClose?.(message),\n onError: (message) => callbacks.current.onError?.(message),\n });\n designer.mount();\n designerRef.current = designer;\n return () => {\n designer.destroy();\n designerRef.current = null;\n };\n // Session/chart identity changes must recreate the iframe. Callback changes are\n // picked up from the ref without reloading an in-progress Designer session.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy, props.showLoadingState, props.loadingTimeoutMs, props.autoResize, props.autoRenewSession]);\n\n useImperativeHandle(ref, () => ({\n setDesignerUrl: (designerUrl) => { designerRef.current?.setDesignerUrl(designerUrl); },\n getIframe: () => designerRef.current?.getIframe() ?? null,\n }), []);\n\n return <div ref={containerRef} className={props.className} style={props.style} />;\n },\n);\n","import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n SeatPicker as CoreSeatPicker,\n type SeatPickerOptions,\n type SeatPickerTheme,\n type SelectedSeat,\n type HoldResult,\n} from '@seatlayer/js';\n\nexport type { SeatPickerOptions, SeatPickerTheme, CheckoutHandoff, CheckoutLineItem } from '@seatlayer/js';\n\n/** Imperative handle for the full-experience picker widget. */\nexport interface SeatPickerHandle {\n /** Current selection with resolved prices. */\n getSelection(): SelectedSeat[];\n /** Server-side best seats + hold, reflected in the widget tray. */\n bestAvailable(qty: number, categoryKey?: string): Promise<HoldResult | null>;\n /** Current active/restored hold reflected in the tray. */\n getCurrentHold(): HoldResult | null;\n /** Restore an active hold by its opaque id. */\n resumeHold(holdId: string): Promise<HoldResult | null>;\n /** Remove one held ticket while preserving the remainder. */\n removeHeldTicket(label: string): Promise<boolean>;\n /** Release the current hold (if any) and reset the tray. */\n release(): Promise<void>;\n /**\n * Re-acquire the buyer access session after your app re-authorizes the buyer\n * (Sales Channels). Resolves false when the picker is not access-scoped.\n */\n refreshAccess(): Promise<boolean>;\n}\n\nexport interface SeatPickerProps extends Omit<SeatPickerOptions, 'container'> {\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * React wrapper around the full SeatPicker widget (header · live price panel ·\n * tray · GA · hold countdown · toasts). The widget is container-adaptive: give\n * the wrapping div a size and it lays itself out for that box (side panel wide,\n * bottom sheet narrow). For the one-call modal, use `SeatPicker.open()` from\n * `@seatlayer/js` directly.\n */\nexport const SeatPicker = forwardRef<SeatPickerHandle, SeatPickerProps>(\n function SeatPicker(props, ref) {\n const { className, style, event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout } = props;\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n const pickerRef = useRef<CoreSeatPicker | null>(null);\n\n // Always call the latest callbacks without rebuilding the widget.\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n // Forward every option the host passed. Spreading rather than naming each\n // field keeps new core options (pricing, hideBadge, transport, …) working\n // here the day they ship: a hand-maintained list silently drops anything\n // it forgets, and `SeatPickerProps extends SeatPickerOptions` means such a\n // drop still type-checks clean for the host.\n const { className: _className, style: _style, ...options } = callbacks.current;\n\n const picker = new CoreSeatPicker({\n ...options,\n container: el,\n onCheckout: (hold, seats, handoff) => callbacks.current.onCheckout?.(hold, seats, handoff),\n onBooked: (handoff) => callbacks.current.onBooked?.(handoff),\n onSelectionChange: (seats) => callbacks.current.onSelectionChange?.(seats),\n onHoldChange: (hold, seats, handoff) => callbacks.current.onHoldChange?.(hold, seats, handoff),\n onHoldExpired: () => callbacks.current.onHoldExpired?.(),\n onHoldRestored: (hold, seats, handoff) => callbacks.current.onHoldRestored?.(hold, seats, handoff),\n onError: (err) => callbacks.current.onError?.(err),\n // Sales Channels. The provider is read through the ref for the same\n // reason as every other callback: a host may pass an inline arrow.\n buyerAccessTokenProvider: options.buyerAccessTokenProvider\n ? (context) => callbacks.current.buyerAccessTokenProvider!(context)\n : undefined,\n onAccessExpired: (state) => callbacks.current.onAccessExpired?.(state),\n onAccessUnavailable: (state) => callbacks.current.onAccessUnavailable?.(state),\n onSelectedObjectUnavailable: (state) =>\n callbacks.current.onSelectedObjectUnavailable?.(state),\n // Hosted checkout. Read through the ref like every other callback — the\n // spread above would freeze an inline arrow at construction, and these\n // two fire long after it (a payment webhook can land minutes later).\n onCheckoutUnavailable: (state) => callbacks.current.onCheckoutUnavailable?.(state),\n onOrderConfirmed: (order) => callbacks.current.onOrderConfirmed?.(order),\n });\n pickerRef.current = picker;\n void picker.render();\n\n return () => {\n picker.destroy();\n pickerRef.current = null;\n };\n // Rebuild only when the identity of the event/config changes. Object-valued\n // options (theme, messages, pricing, transport) stay out: hosts routinely\n // pass them as inline literals, so a new identity every render would tear\n // the widget down mid-selection. They are read fresh at construction.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout]);\n\n useImperativeHandle(\n ref,\n (): SeatPickerHandle => ({\n getSelection: () => pickerRef.current?.getSelection() ?? [],\n bestAvailable: (qty, categoryKey) => pickerRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),\n getCurrentHold: () => pickerRef.current?.getCurrentHold() ?? null,\n resumeHold: (holdId) => pickerRef.current?.resumeHold(holdId) ?? Promise.resolve(null),\n removeHeldTicket: (label) => pickerRef.current?.removeHeldTicket(label) ?? Promise.resolve(false),\n release: () => pickerRef.current?.release() ?? Promise.resolve(),\n refreshAccess: () => pickerRef.current?.refreshAccess() ?? Promise.resolve(false),\n }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n","/**\n * @seatlayer/react — the React wrapper for the SeatLayer embed SDK.\n */\nexport { SeatingChart } from './SeatingChart';\nexport { EmbeddedDesigner } from './EmbeddedDesigner';\nexport type {\n SeatingChartProps,\n SeatingChartHandle,\n SelectedSeat,\n HoldResult,\n BestAvailableResult,\n GAAreaAvailability,\n HoldLineItem,\n} from './SeatingChart';\nexport type { EmbeddedDesignerProps, EmbeddedDesignerHandle, EmbeddedDesignerMessage } from './EmbeddedDesigner';\nexport { SeatPicker } from './SeatPicker';\nexport type {\n SeatPickerHandle,\n SeatPickerProps,\n SeatPickerOptions,\n SeatPickerTheme,\n CheckoutHandoff,\n CheckoutLineItem,\n} from './SeatPicker';\n// The framework-agnostic widget class — for the one-call modal (SeatPickerWidget.open()).\nexport { SeatPicker as SeatPickerWidget } from '@seatlayer/js';\n// Host-side embed helper: grows the iframe on `seatlayer:height` and pins it on\n// `seatlayer:fullscreen`. React hosts depend on this package alone, so it has to\n// be reachable here rather than only from @seatlayer/js.\nexport { attachPickerFrame } from '@seatlayer/js';\n\n// Organizer control room: Monitor + Inspect + bulk Block/unblock on one renderer.\nexport { SeatManager } from './SeatManager';\nexport type {\n SeatManagerHandle,\n SeatManagerProps,\n SeatManagerOptions,\n SeatManagerMode,\n SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n} from './SeatManager';\nexport type { ControlRoomActivityEntry, ControlRoomSectionMetric, ControlRoomSnapshot } from '@seatlayer/js';\n// Sales Channels — buyer access sessions for private channel inventory.\nexport type {\n BuyerAccessToken,\n BuyerAccessTokenProvider,\n BuyerAccessRefreshReason,\n BuyerAccessUnavailableReason,\n BuyerAccessExpiredEvent,\n BuyerAccessUnavailableEvent,\n SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n"],"mappings":";;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE,gBAA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MAAM;AACX,eAAO,QAAQ;AACf,kBAAU,UAAU;AAAA,MACtB;AAAA,IAMF,GAAG,CAAC,OAAO,SAAS,cAAc,WAAW,QAAQ,UAAU,gBAAgB,WAAW,WAAW,eAAe,aAAa,kBAAkB,UAAU,QAAQ,CAAC;AAEtK,IAAAC;AAAA,MACE;AAAA,MACA,OAAyB;AAAA,QACvB,cAAc,MAAM,UAAU,SAAS,aAAa,KAAK,CAAC;AAAA,QAC1D,eAAe,CAAC,KAAK,gBAAgB,UAAU,SAAS,cAAc,KAAK,WAAW,KAAK,QAAQ,QAAQ,IAAI;AAAA,QAC/G,gBAAgB,MAAM,UAAU,SAAS,eAAe,KAAK;AAAA,QAC7D,YAAY,CAAC,WAAW,UAAU,SAAS,WAAW,MAAM,KAAK,QAAQ,QAAQ,IAAI;AAAA,QACrF,kBAAkB,CAAC,UAAU,UAAU,SAAS,iBAAiB,KAAK,KAAK,QAAQ,QAAQ,KAAK;AAAA,QAChG,SAAS,MAAM,UAAU,SAAS,QAAQ,KAAK,QAAQ,QAAQ;AAAA,QAC/D,eAAe,MAAM,UAAU,SAAS,cAAc,KAAK,QAAQ,QAAQ,KAAK;AAAA,MAClF;AAAA,MACA,CAAC;AAAA,IACH;AAEA,WAAO,gBAAAE,KAAC,SAAI,KAAK,cAAc,WAAsB,OAAc;AAAA,EACrE;AACF;;;ACtGA,SAAuB,cAAdE,mBAAsC;AAI/C,SAAS,yBAAyB;","names":["SeatingChart","forwardRef","useEffect","useImperativeHandle","useRef","jsx","EmbeddedDesigner","forwardRef","useEffect","useImperativeHandle","useRef","jsx","SeatPicker","SeatPicker"]}
|
|
1
|
+
{"version":3,"sources":["../src/SeatingChart.tsx","../src/EmbeddedDesigner.tsx","../src/SeatPicker.tsx","../src/index.ts"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n SeatingChart as CoreSeatingChart,\n type SeatingChartOptions,\n type SelectedSeat,\n type HoldResult,\n type BestAvailableResult,\n type GAAreaAvailability,\n type HoldLineItem,\n} from '@seatlayer/js';\n\nexport type { SelectedSeat, HoldResult, BestAvailableResult, GAAreaAvailability, HoldLineItem } from '@seatlayer/js';\nexport type { SeatHoverDetails } from '@seatlayer/js';\n\n/** Imperative handle exposed via `ref` — call these to drive the picker from your app. */\nexport interface SeatingChartHandle {\n /** Hold the current selection. Resolves the hold, or `null` on a 409 conflict. */\n hold(options?: { ttlMs?: number }): Promise<HoldResult | null>;\n /** Restore an active hold by its opaque id. */\n resumeHold(holdId: string): Promise<HoldResult | null>;\n /** Current active hold known to the chart. */\n getCurrentHold(): HoldResult | null;\n /** GA areas with live remaining capacity. */\n getGAAreas(): GAAreaAvailability[];\n /** Atomically hold a quantity from one GA area. */\n holdGA(areaId: string, qty: number, options?: { tierId?: string | null; ttlMs?: number }): Promise<HoldResult | null>;\n /** Ask the server for the `qty` best free seats and hold them atomically. */\n bestAvailable(qty: number, categoryKey?: string): Promise<BestAvailableResult | null>;\n /** Release the current hold (if any). */\n release(): Promise<void>;\n /** Release some held labels while keeping the remainder active. */\n releaseLabels(labels: string[]): Promise<boolean>;\n /** The current selection, with prices resolved from the chart categories. */\n getSelection(): SelectedSeat[];\n /**\n * Choose a ticket tier for a selected seat (e.g. Adult → Child). Available\n * `tiers` are on each `SelectedSeat`; `tierId=null` reverts to the default.\n */\n setSeatTier(seatId: string, tierId: string | null): void;\n /**\n * Floors of a multi-floor chart — `[{ id, name }]` (single-floor charts\n * return one entry; empty before render()). Pair with setFloor().\n */\n getFloors(): { id: string; name: string }[];\n /** Switch the shown floor (2D). Warns + no-ops on single-floor charts. */\n setFloor(floorId: string): void;\n /** Toggle colorblind-safe rendering at runtime (see the `colorblindSafe` prop). */\n setColorblindSafe(on: boolean): void;\n /** Zoom in one step (same increment as the wheel/pinch gesture). */\n zoomIn(): void;\n /** Zoom out one step. */\n zoomOut(): void;\n /** Reset the camera so the whole chart fits the container. */\n zoomToFit(): void;\n /**\n * Re-acquire the buyer access session after your app re-authorizes the buyer\n * (Sales Channels). Resolves false when the chart is not access-scoped.\n */\n refreshAccess(): Promise<boolean>;\n}\n\nexport interface SeatingChartProps extends Omit<SeatingChartOptions, 'container'> {\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * React wrapper around the framework-agnostic `@seatlayer/js` SDK.\n *\n * The underlying canvas is created once and torn down on unmount. Callback props\n * (`onSelectionChange`, `onHold`, `onError`, `onDeckTap`, `onHint`) may change\n * freely between renders without re-mounting the canvas — only `event`,\n * `apiBase`, `maxSelection`, `publicKey`, `locale`, `currency`, and\n * `colorblindSafe`, `initialView`, and `errorDisplay` trigger a rebuild.\n * (`messages` is read once per mount; changing it alone does not re-apply.)\n */\nexport const SeatingChart = forwardRef<SeatingChartHandle, SeatingChartProps>(\n function SeatingChart(props, ref) {\n const {\n className, style, event, apiBase, maxSelection, publicKey, locale, currency,\n colorblindSafe, initialView, errorDisplay,\n } = props;\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n const chartRef = useRef<CoreSeatingChart | null>(null);\n\n // Always call the latest callbacks without rebuilding the chart.\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n const chart = new CoreSeatingChart({\n container: el,\n event,\n apiBase,\n maxSelection,\n publicKey,\n locale,\n currency,\n colorblindSafe,\n initialView,\n errorDisplay,\n messages: callbacks.current.messages,\n // Read through the ref so a host may pass the provider as an inline\n // arrow without its new identity tearing the canvas down each render.\n buyerAccessTokenProvider: props.buyerAccessTokenProvider\n ? (context) => callbacks.current.buyerAccessTokenProvider!(context)\n : undefined,\n buyerAccessToken: callbacks.current.buyerAccessToken,\n onAccessExpired: (state) => callbacks.current.onAccessExpired?.(state),\n onAccessUnavailable: (state) => callbacks.current.onAccessUnavailable?.(state),\n onSelectedObjectUnavailable: (state) =>\n callbacks.current.onSelectedObjectUnavailable?.(state),\n onSelectionChange: (seats) => callbacks.current.onSelectionChange?.(seats),\n onHold: (result) => callbacks.current.onHold?.(result),\n onHoldRestored: (result) => callbacks.current.onHoldRestored?.(result),\n onHoldExpired: () => callbacks.current.onHoldExpired?.(),\n onGAClick: (area) => callbacks.current.onGAClick?.(area),\n onError: (err) => callbacks.current.onError?.(err),\n onDeckTap: (floorId) => callbacks.current.onDeckTap?.(floorId),\n onHint: (message) => callbacks.current.onHint?.(message),\n seatTooltip: props.seatTooltip,\n onSeatHover: (details) => callbacks.current.onSeatHover?.(details),\n });\n chartRef.current = chart;\n void chart.render();\n\n return () => {\n chart.destroy();\n chartRef.current = null;\n };\n // Rebuild only when the identity of the chart changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, initialView, errorDisplay]);\n\n useImperativeHandle(\n ref,\n (): SeatingChartHandle => ({\n hold: (options) => chartRef.current?.hold(options) ?? Promise.resolve(null),\n resumeHold: (holdId) => chartRef.current?.resumeHold(holdId) ?? Promise.resolve(null),\n getCurrentHold: () => chartRef.current?.getCurrentHold() ?? null,\n getGAAreas: () => chartRef.current?.getGAAreas() ?? [],\n holdGA: (areaId, qty, options) => chartRef.current?.holdGA(areaId, qty, options) ?? Promise.resolve(null),\n bestAvailable: (qty, categoryKey) =>\n chartRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),\n release: () => chartRef.current?.release() ?? Promise.resolve(),\n releaseLabels: (labels) => chartRef.current?.releaseLabels(labels) ?? Promise.resolve(false),\n getSelection: () => chartRef.current?.getSelection() ?? [],\n setSeatTier: (seatId, tierId) => chartRef.current?.setSeatTier(seatId, tierId),\n getFloors: () => chartRef.current?.getFloors() ?? [],\n setFloor: (floorId) => chartRef.current?.setFloor(floorId),\n setColorblindSafe: (on) => chartRef.current?.setColorblindSafe(on),\n zoomIn: () => chartRef.current?.zoomIn(),\n zoomOut: () => chartRef.current?.zoomOut(),\n zoomToFit: () => chartRef.current?.zoomToFit(),\n refreshAccess: () => chartRef.current?.refreshAccess() ?? Promise.resolve(false),\n }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n","import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n EmbeddedDesigner as CoreEmbeddedDesigner,\n type EmbeddedDesignerMessage,\n} from '@seatlayer/js';\n\nexport type { EmbeddedDesignerMessage } from '@seatlayer/js';\n\nexport interface EmbeddedDesignerHandle {\n /** Recreate the iframe with a newly-minted session URL. */\n setDesignerUrl(designerUrl: string): void;\n /** The currently mounted iframe, if any. */\n getIframe(): HTMLIFrameElement | null;\n}\n\nexport interface EmbeddedDesignerProps {\n /** Short-lived `designerUrl` returned by your backend. Never pass an `sk_` key. */\n designerUrl: string;\n expectedChartId?: string;\n expectedWorkspaceId?: string;\n title?: string;\n className?: string;\n style?: CSSProperties;\n iframeClassName?: string;\n iframeStyle?: Partial<CSSStyleDeclaration>;\n allow?: string;\n referrerPolicy?: ReferrerPolicy;\n /**\n * Show the built-in branded loading skeleton and error/expiry card inside the\n * container while the Designer boots. Defaults to `true`. Set `false` when you\n * render your own loading and error chrome.\n */\n showLoadingState?: boolean;\n /**\n * If the Designer never posts `ready` within this many milliseconds, the host\n * shows the error card with a timeout message. Defaults to `20000`.\n */\n loadingTimeoutMs?: number;\n /**\n * How the iframe is sized. `'fill'` (the default) is **container-aware**: if the\n * container has a definite height (a sized block, `flex-1 min-h-0`, a resolved\n * `%`) the Designer fills 100% of it and tracks its size via a `ResizeObserver`;\n * if the container is content-sized (full-page usage) the Designer fills the\n * viewport (`window.innerHeight` minus the iframe's top offset). Either way the\n * result is clamped to `minHeight` and re-probed on resize. Heights are applied\n * with `!important` so a host theme can't override them. Pass a number for a\n * fixed pixel height you manage yourself.\n */\n height?: 'fill' | number;\n /** Lower bound for `'fill'` sizing. Defaults to `480`. */\n minHeight?: number;\n /**\n * Legacy content-height auto-grow via the `seatlayer.designer.resize`\n * protocol. Only honored when `height` is a number; with the default\n * `height: 'fill'` the resize messages are ignored and the SDK sizes the iframe\n * to the container or viewport.\n */\n autoResize?: boolean;\n /**\n * Called when the user presses \"Try again\" on the error card. Mint a fresh\n * session and set the new `designerUrl` (recreating the iframe returns it to\n * the loading state). When omitted, \"Try again\" reloads the current URL.\n *\n * When supplied, it also powers automatic session renewal — see\n * {@link EmbeddedDesignerProps.autoRenewSession}.\n */\n onRequestRelaunch?: () => void;\n /**\n * Keep long editing sessions alive with no expiry wall. When you supply\n * `onRequestRelaunch`, the SDK schedules a silent relaunch shortly before the\n * session's `expiresAt` (mint a fresh session and update `designerUrl` in your\n * `onRequestRelaunch` handler), and makes one automatic recovery attempt if an\n * expiry error still slips through before showing the \"Try again\" card. Defaults\n * to `true` whenever `onRequestRelaunch` is provided; a no-op without it. Set\n * `false` to keep the fully manual \"Try again\" behavior.\n */\n autoRenewSession?: boolean;\n onReady?: (message: EmbeddedDesignerMessage) => void;\n onSaved?: (message: EmbeddedDesignerMessage) => void;\n onPublished?: (message: EmbeddedDesignerMessage) => void;\n onClose?: (message: EmbeddedDesignerMessage) => void;\n onError?: (message: EmbeddedDesignerMessage) => void;\n}\n\n/**\n * Native-feeling React host for the secure SeatLayer Designer iframe.\n * A new `designerUrl` always recreates the iframe, so a new fragment token can\n * never retain state from an earlier chart session.\n */\nexport const EmbeddedDesigner = forwardRef<EmbeddedDesignerHandle, EmbeddedDesignerProps>(\n function EmbeddedDesigner(props, ref) {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const designerRef = useRef<CoreEmbeddedDesigner | null>(null);\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n const designer = new CoreEmbeddedDesigner({\n designerUrl: props.designerUrl,\n container,\n expectedChartId: props.expectedChartId,\n expectedWorkspaceId: props.expectedWorkspaceId,\n title: props.title,\n className: props.iframeClassName,\n style: props.iframeStyle,\n allow: props.allow,\n referrerPolicy: props.referrerPolicy,\n showLoadingState: props.showLoadingState,\n loadingTimeoutMs: props.loadingTimeoutMs,\n height: props.height,\n minHeight: props.minHeight,\n autoResize: props.autoResize,\n autoRenewSession: props.autoRenewSession,\n // Only forward a relaunch hook when the host supplied one, so the core's\n // \"reload the same URL in place\" fallback still applies otherwise.\n onRequestRelaunch: props.onRequestRelaunch\n ? () => callbacks.current.onRequestRelaunch?.()\n : undefined,\n onReady: (message) => callbacks.current.onReady?.(message),\n onSaved: (message) => callbacks.current.onSaved?.(message),\n onPublished: (message) => callbacks.current.onPublished?.(message),\n onClose: (message) => callbacks.current.onClose?.(message),\n onError: (message) => callbacks.current.onError?.(message),\n });\n designer.mount();\n designerRef.current = designer;\n return () => {\n designer.destroy();\n designerRef.current = null;\n };\n // Session/chart identity changes must recreate the iframe. Sizing and\n // relaunch policy are updated in place below; callbacks are read from refs.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy, props.showLoadingState, props.loadingTimeoutMs, props.autoResize]);\n\n useEffect(() => {\n designerRef.current?.setSizing(props.height, props.minHeight);\n }, [props.height, props.minHeight]);\n\n useEffect(() => {\n designerRef.current?.setRelaunchPolicy(\n props.onRequestRelaunch ? () => callbacks.current.onRequestRelaunch?.() : undefined,\n props.autoRenewSession,\n );\n }, [!!props.onRequestRelaunch, props.autoRenewSession]);\n\n useImperativeHandle(ref, () => ({\n setDesignerUrl: (designerUrl) => { designerRef.current?.setDesignerUrl(designerUrl); },\n getIframe: () => designerRef.current?.getIframe() ?? null,\n }), []);\n\n return <div ref={containerRef} className={props.className} style={props.style} />;\n },\n);\n","import {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n type CSSProperties,\n} from 'react';\nimport {\n SeatPicker as CoreSeatPicker,\n type SeatPickerOptions,\n type SeatPickerTheme,\n type SeatPickerPricing,\n type SeatPickerBestAvailableOptions,\n type SeatPickerBuyerView,\n type SeatPickerBuyerViewOptions,\n type PickerMapTheme,\n type RendererViewMode,\n type SelectedSeat,\n type HoldResult,\n} from '@seatlayer/js';\n\nexport type {\n SeatPickerOptions,\n SeatPickerTheme,\n SeatPickerPricing,\n SeatPickerBestAvailableOptions,\n SeatPickerBuyerView,\n SeatPickerBuyerViewOptions,\n PickerMapTheme,\n RendererViewMode,\n CheckoutHandoff,\n CheckoutLineItem,\n} from '@seatlayer/js';\n\n/** Imperative handle for the full-experience picker widget. */\nexport interface SeatPickerHandle {\n /** Logically close the picker. React still owns component unmount/teardown. */\n close(): void;\n /** Current selection with resolved prices. */\n getSelection(): SelectedSeat[];\n /** Server-side best seats + hold, reflected in the widget tray. */\n bestAvailable(\n qty: number,\n categoryKey?: string,\n options?: SeatPickerBestAvailableOptions,\n ): Promise<HoldResult | null>;\n /** Current active/restored hold reflected in the tray. */\n getCurrentHold(): HoldResult | null;\n /** Restore an active hold by its opaque id. */\n resumeHold(holdId: string): Promise<HoldResult | null>;\n /** Remove one held ticket while preserving the remainder. */\n removeHeldTicket(label: string): Promise<boolean>;\n /** Release the current hold (if any) and reset the tray. */\n release(): Promise<void>;\n /**\n * Re-acquire the buyer access session after your app re-authorizes the buyer\n * (Sales Channels). Resolves false when the picker is not access-scoped.\n */\n refreshAccess(): Promise<boolean>;\n /** Re-ink the drawn map without rebuilding the picker or disturbing a hold. */\n setMapTheme(map: PickerMapTheme | null): void;\n /** Hide or restore duplicate event identity after mount. */\n setEventDetailsHidden(hidden: boolean): void;\n /** Replace host display-pricing overrides without remounting. */\n setPricing(pricing: SeatPickerPricing | undefined): void;\n /** Current colorblind-safe buyer preference. */\n isColorblindSafe(): boolean;\n /** Update the colorblind-safe buyer preference and renderer. */\n setColorblindSafe(on: boolean): void;\n /** Switch the underlying 2D map projection. */\n setViewMode(mode: RendererViewMode): void;\n /** Current 2D map projection. */\n getViewMode(): RendererViewMode;\n /** Current buyer surface: map or interactive 3D venue. */\n getBuyerView(): SeatPickerBuyerView;\n /** Switch the buyer surface, optionally carrying a 3D camera intent. */\n setBuyerView(view: SeatPickerBuyerView, options?: SeatPickerBuyerViewOptions): void;\n}\n\nexport interface SeatPickerProps extends Omit<SeatPickerOptions, 'container'> {\n className?: string;\n style?: CSSProperties;\n}\n\n/**\n * React wrapper around the full SeatPicker widget (header · live price panel ·\n * tray · GA · hold countdown · toasts). The widget is container-adaptive: give\n * the wrapping div a size and it lays itself out for that box (side panel wide,\n * bottom sheet narrow). For the one-call modal, use `SeatPicker.open()` from\n * `@seatlayer/js` directly.\n */\nexport const SeatPicker = forwardRef<SeatPickerHandle, SeatPickerProps>(\n function SeatPicker(props, ref) {\n const { className, style, event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout } = props;\n\n const containerRef = useRef<HTMLDivElement | null>(null);\n const pickerRef = useRef<CoreSeatPicker | null>(null);\n const closeRef = useRef<(() => void) | null>(null);\n\n // Always call the latest callbacks without rebuilding the widget.\n const callbacks = useRef(props);\n callbacks.current = props;\n\n useEffect(() => {\n const el = containerRef.current;\n if (!el) return;\n\n // Forward every option the host passed. Spreading rather than naming each\n // field keeps new core options (pricing, hideBadge, transport, …) working\n // here the day they ship: a hand-maintained list silently drops anything\n // it forgets, and `SeatPickerProps extends SeatPickerOptions` means such a\n // drop still type-checks clean for the host.\n const { className: _className, style: _style, ...options } = callbacks.current;\n\n const picker = new CoreSeatPicker({\n ...options,\n container: el,\n onCheckout: (hold, seats, handoff) => callbacks.current.onCheckout?.(hold, seats, handoff),\n onBooked: (handoff) => callbacks.current.onBooked?.(handoff),\n onSelectionChange: (seats) => callbacks.current.onSelectionChange?.(seats),\n onHoldChange: (hold, seats, handoff) => callbacks.current.onHoldChange?.(hold, seats, handoff),\n onHoldExpired: () => callbacks.current.onHoldExpired?.(),\n onHoldRestored: (hold, seats, handoff) => callbacks.current.onHoldRestored?.(hold, seats, handoff),\n onError: (err) => callbacks.current.onError?.(err),\n // Sales Channels. The provider is read through the ref for the same\n // reason as every other callback: a host may pass an inline arrow.\n buyerAccessTokenProvider: options.buyerAccessTokenProvider\n ? (context) => callbacks.current.buyerAccessTokenProvider!(context)\n : undefined,\n onAccessExpired: (state) => callbacks.current.onAccessExpired?.(state),\n onAccessUnavailable: (state) => callbacks.current.onAccessUnavailable?.(state),\n onSelectedObjectUnavailable: (state) =>\n callbacks.current.onSelectedObjectUnavailable?.(state),\n // Hosted checkout. Read through the ref like every other callback — the\n // spread above would freeze an inline arrow at construction, and these\n // two fire long after it (a payment webhook can land minutes later).\n onCheckoutUnavailable: (state) => callbacks.current.onCheckoutUnavailable?.(state),\n onOrderConfirmed: (order) => callbacks.current.onOrderConfirmed?.(order),\n });\n pickerRef.current = picker;\n let closed = false;\n const close = (): void => {\n if (closed) return;\n closed = true;\n if (pickerRef.current === picker) pickerRef.current = null;\n picker.close();\n };\n closeRef.current = close;\n void picker.render();\n\n return () => {\n if (!closed) picker.destroy();\n if (pickerRef.current === picker) pickerRef.current = null;\n if (closeRef.current === close) closeRef.current = null;\n };\n // Rebuild only when the identity of the event/config changes. Object-valued\n // options (theme, messages, pricing, transport) stay out: hosts routinely\n // pass them as inline literals, so a new identity every render would tear\n // the widget down mid-selection. They are read fresh at construction.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, hideBadge, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView, checkout]);\n\n useImperativeHandle(\n ref,\n (): SeatPickerHandle => ({\n close: () => closeRef.current?.(),\n getSelection: () => pickerRef.current?.getSelection() ?? [],\n bestAvailable: (qty, categoryKey, options) =>\n pickerRef.current?.bestAvailable(qty, categoryKey, options) ?? Promise.resolve(null),\n getCurrentHold: () => pickerRef.current?.getCurrentHold() ?? null,\n resumeHold: (holdId) => pickerRef.current?.resumeHold(holdId) ?? Promise.resolve(null),\n removeHeldTicket: (label) => pickerRef.current?.removeHeldTicket(label) ?? Promise.resolve(false),\n release: () => pickerRef.current?.release() ?? Promise.resolve(),\n refreshAccess: () => pickerRef.current?.refreshAccess() ?? Promise.resolve(false),\n setMapTheme: (map) => pickerRef.current?.setMapTheme(map),\n setEventDetailsHidden: (hidden) => pickerRef.current?.setEventDetailsHidden(hidden),\n setPricing: (pricing) => pickerRef.current?.setPricing(pricing),\n isColorblindSafe: () => pickerRef.current?.isColorblindSafe() ?? false,\n setColorblindSafe: (on) => pickerRef.current?.setColorblindSafe(on),\n setViewMode: (mode) => pickerRef.current?.setViewMode(mode),\n getViewMode: () => pickerRef.current?.getViewMode() ?? 'flat',\n getBuyerView: () => pickerRef.current?.getBuyerView() ?? 'map',\n setBuyerView: (view, options) => pickerRef.current?.setBuyerView(view, options),\n }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n","/**\n * @seatlayer/react — the React wrapper for the SeatLayer embed SDK.\n */\nexport { SeatingChart } from './SeatingChart';\nexport { EmbeddedDesigner } from './EmbeddedDesigner';\nexport type {\n SeatingChartProps,\n SeatingChartHandle,\n SelectedSeat,\n HoldResult,\n BestAvailableResult,\n GAAreaAvailability,\n HoldLineItem,\n SeatHoverDetails,\n} from './SeatingChart';\nexport type { EmbeddedDesignerProps, EmbeddedDesignerHandle, EmbeddedDesignerMessage } from './EmbeddedDesigner';\nexport { SeatPicker } from './SeatPicker';\nexport type {\n SeatPickerHandle,\n SeatPickerProps,\n SeatPickerOptions,\n SeatPickerTheme,\n SeatPickerPricing,\n SeatPickerBestAvailableOptions,\n SeatPickerBuyerView,\n SeatPickerBuyerViewOptions,\n PickerMapTheme,\n RendererViewMode,\n CheckoutHandoff,\n CheckoutLineItem,\n} from './SeatPicker';\n// The framework-agnostic widget class — for the one-call modal (SeatPickerWidget.open()).\nexport { SeatPicker as SeatPickerWidget } from '@seatlayer/js';\n// Host-side embed helper: grows the iframe on `seatlayer:height` and pins it on\n// `seatlayer:fullscreen`. React hosts depend on this package alone, so it has to\n// be reachable here rather than only from @seatlayer/js.\nexport { attachPickerFrame } from '@seatlayer/js';\nexport type { AttachPickerFrameOptions } from '@seatlayer/js';\n\n// Organizer control room: Monitor + Inspect + bulk Block/unblock on one renderer.\nexport { SeatManager } from './SeatManager';\nexport type {\n SeatManagerHandle,\n SeatManagerProps,\n SeatManagerOptions,\n SeatManagerMode,\n EventScopedManageToken,\n SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\n} from './SeatManager';\nexport type {\n ControlRoomActivityEntry,\n ControlRoomSectionMetric,\n ControlRoomSnapshot,\n} from '@seatlayer/js/manager';\n// Sales Channels — buyer access sessions for private channel inventory.\nexport type {\n BuyerAccessToken,\n BuyerAccessTokenProvider,\n BuyerAccessRefreshReason,\n BuyerAccessUnavailableReason,\n BuyerAccessExpiredEvent,\n BuyerAccessUnavailableEvent,\n SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n"],"mappings":";;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE,gBAAgB;AAAA,OAOX;AA0JI;AAvFJ,IAAM,eAAe;AAAA,EAC1B,SAASA,cAAa,OAAO,KAAK;AAChC,UAAM;AAAA,MACJ;AAAA,MAAW;AAAA,MAAO;AAAA,MAAO;AAAA,MAAS;AAAA,MAAc;AAAA,MAAW;AAAA,MAAQ;AAAA,MACnE;AAAA,MAAgB;AAAA,MAAa;AAAA,IAC/B,IAAI;AAEJ,UAAM,eAAe,OAA8B,IAAI;AACvD,UAAM,WAAW,OAAgC,IAAI;AAGrD,UAAM,YAAY,OAAO,KAAK;AAC9B,cAAU,UAAU;AAEpB,cAAU,MAAM;AACd,YAAM,KAAK,aAAa;AACxB,UAAI,CAAC,GAAI;AAET,YAAM,QAAQ,IAAI,iBAAiB;AAAA,QACjC,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,UAAU,QAAQ;AAA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C1D,aAAa,MAAM,UAAU,SAAS,YAAY,KAAK;AAAA,QACvD,cAAc,MAAM,UAAU,SAAS,aAAa,KAAK;AAAA,QACzD,cAAc,CAAC,MAAM,YAAY,UAAU,SAAS,aAAa,MAAM,OAAO;AAAA,MAChF;AAAA,MACA,CAAC;AAAA,IACH;AAEA,WAAO,gBAAAE,KAAC,SAAI,KAAK,cAAc,WAAsB,OAAc;AAAA,EACrE;AACF;;;AC7JA,SAAuB,cAAdE,mBAAsC;AAI/C,SAAS,yBAAyB;","names":["SeatingChart","forwardRef","useEffect","useImperativeHandle","useRef","jsx","EmbeddedDesigner","forwardRef","useEffect","useImperativeHandle","useRef","jsx","SeatPicker","SeatPicker"]}
|
package/dist/manager.cjs
CHANGED
|
@@ -84,6 +84,23 @@ var SeatManager = (0, import_react.forwardRef)(
|
|
|
84
84
|
(0, import_react.useEffect)(() => {
|
|
85
85
|
managerRef.current?.setToken(token, tokenExpiresAt);
|
|
86
86
|
}, [token, tokenExpiresAt]);
|
|
87
|
+
(0, import_react.useEffect)(() => {
|
|
88
|
+
managerRef.current?.setCapabilities(capabilities);
|
|
89
|
+
}, [capabilities]);
|
|
90
|
+
(0, import_react.useEffect)(() => {
|
|
91
|
+
managerRef.current?.setCurrency(currency);
|
|
92
|
+
}, [currency]);
|
|
93
|
+
(0, import_react.useEffect)(() => {
|
|
94
|
+
managerRef.current?.setTheme(props.theme);
|
|
95
|
+
}, [props.theme]);
|
|
96
|
+
(0, import_react.useEffect)(() => {
|
|
97
|
+
managerRef.current?.setKeepLiveWhileHidden(keepLiveWhileHidden);
|
|
98
|
+
}, [keepLiveWhileHidden]);
|
|
99
|
+
(0, import_react.useEffect)(() => {
|
|
100
|
+
managerRef.current?.setTokenRefresh(
|
|
101
|
+
props.onTokenRefresh ? async () => callbacks.current.onTokenRefresh() : void 0
|
|
102
|
+
);
|
|
103
|
+
}, [!!props.onTokenRefresh]);
|
|
87
104
|
(0, import_react.useEffect)(() => {
|
|
88
105
|
if (mode) managerRef.current?.setMode(mode);
|
|
89
106
|
}, [mode]);
|
package/dist/manager.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/manager.ts","../src/SeatManager.tsx"],"sourcesContent":["/**\n * `@seatlayer/react/manager` — the organizer cockpit component, and nothing else.\n *\n * The React counterpart of `@seatlayer/js/manager`, and it exists for the same\n * reason: importing `SeatManager` from the package root drags `SeatPicker`,\n * `SeatingChart` and `EmbeddedDesigner` in with it, and through them the buyer\n * half of the engine. See the header of `@seatlayer/js`'s `src/manager.ts` for\n * the measurement and why a bundler cannot undo it from the outside.\n *\n * The one rule that makes this work: this file — and `./SeatManager` behind it\n * — must import from `@seatlayer/js/manager`, never from `@seatlayer/js`. One\n * bare-barrel import anywhere in this graph re-admits the whole buyer SDK and\n * the saving silently disappears, which is exactly the kind of regression that\n * looks like nothing at all in a diff.\n *\n * The package root keeps exporting `SeatManager` unchanged.\n */\nexport { SeatManager } from './SeatManager';\nexport type {\n SeatManagerHandle,\n SeatManagerProps,\n SeatManagerOptions,\n SeatManagerMode,\n SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\n} from './SeatManager';\nexport type {\n ControlRoomActivityEntry,\n ControlRoomSectionMetric,\n ControlRoomSnapshot,\n} from '@seatlayer/js/manager';\n","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 SeatManagerTallies,\n type SeatManagerActivity,\n type SeatManagerActionResult,\n type SeatManagerConnection,\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 SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\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: string, 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 selectAll(): ExpandedSeat[];\n selectSection(sectionId: string): ExpandedSeat[];\n selectByLabels(labels: string[]): ExpandedSeat[];\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}\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 and callbacks are updated\n * in 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 } = 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 theme: callbacks.current.theme,\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 onActionComplete: (r: SeatManagerActionResult) => callbacks.current.onActionComplete?.(r),\n onConnectionChange: (s: SeatManagerConnection) => callbacks.current.onConnectionChange?.(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 // 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 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 selectAll: () => managerRef.current?.selectAll() ?? [],\n selectSection: (id) => managerRef.current?.selectSection(id) ?? [],\n selectByLabels: (labels) => managerRef.current?.selectByLabels(labels) ?? [],\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 }),\n [],\n );\n\n return <div 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* `@seatlayer/react/manager` — the organizer cockpit component, and nothing else.\n *\n * The React counterpart of `@seatlayer/js/manager`, and it exists for the same\n * reason: importing `SeatManager` from the package root drags `SeatPicker`,\n * `SeatingChart` and `EmbeddedDesigner` in with it, and through them the buyer\n * half of the engine. See the header of `@seatlayer/js`'s `src/manager.ts` for\n * the measurement and why a bundler cannot undo it from the outside.\n *\n * The one rule that makes this work: this file — and `./SeatManager` behind it\n * — must import from `@seatlayer/js/manager`, never from `@seatlayer/js`. One\n * bare-barrel import anywhere in this graph re-admits the whole buyer SDK and\n * the saving silently disappears, which is exactly the kind of regression that\n * looks like nothing at all in a diff.\n *\n * The package root keeps exporting `SeatManager` unchanged.\n */\nexport { SeatManager } from './SeatManager';\nexport type {\n SeatManagerHandle,\n SeatManagerProps,\n SeatManagerOptions,\n SeatManagerMode,\n EventScopedManageToken,\n SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\n} from './SeatManager';\nexport type {\n ControlRoomActivityEntry,\n ControlRoomSectionMetric,\n ControlRoomSnapshot,\n} from '@seatlayer/js/manager';\n","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 SeatManagerActivity,\n type SeatManagerActionResult,\n type SeatManagerConnection,\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 SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\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 selectAll(): ExpandedSeat[];\n selectSection(sectionId: string): ExpandedSeat[];\n selectByLabels(labels: string[]): ExpandedSeat[];\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}\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 } = 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 theme: callbacks.current.theme,\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 onActionComplete: (r: SeatManagerActionResult) => callbacks.current.onActionComplete?.(r),\n onConnectionChange: (s: SeatManagerConnection) => callbacks.current.onConnectionChange?.(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 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 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 selectAll: () => managerRef.current?.selectAll() ?? [],\n selectSection: (id) => managerRef.current?.selectSection(id) ?? [],\n selectByLabels: (labels) => managerRef.current?.selectByLabels(labels) ?? [],\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 }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAMO;AACP,qBAkBO;AAmLI;AAxHJ,IAAM,kBAAc;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,IACnD,IAAI;AAEJ,UAAM,mBAAe,qBAA8B,IAAI;AACvD,UAAM,iBAAa,qBAA+B,IAAI;AAEtD,UAAM,gBAAY,qBAAO,KAAK;AAC9B,cAAU,UAAU;AAEpB,gCAAU,MAAM;AACd,YAAM,KAAK,aAAa;AACxB,UAAI,CAAC,GAAI;AAET,YAAM,UAAU,IAAI,eAAAC,YAAgB;AAAA,QAClC,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,OAAO,UAAU,QAAQ;AAAA,QACzB,SAAS,MAAM,UAAU,QAAQ,UAAU;AAAA,QAC3C,WAAW,CAAC,MAA0B,UAAU,QAAQ,YAAY,CAAC;AAAA,QACrE,YAAY,CAAC,aAAkC,UAAU,QAAQ,aAAa,QAAQ;AAAA,QACtF,eAAe,CAAC,aAAkC,UAAU,QAAQ,gBAAgB,QAAQ;AAAA,QAC5F,gB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S,eAAe,MAAM,KAAK,CAAC;AAAA,QAC3E,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,MACjD;AAAA,MACA,CAAC;AAAA,IACH;AAEA,WAAO,4CAAC,SAAI,KAAK,cAAc,WAAsB,OAAc;AAAA,EACrE;AACF;","names":["SeatManager","CoreSeatManager"]}
|
package/dist/manager.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
|
-
import { SeatManagerOptions, SeatManagerMode, ControlRoomSnapshot, ExpandedSeat, ReportResult, LogEntry, SeatManagerConnection } from '@seatlayer/js/manager';
|
|
4
|
-
export { ControlRoomActivityEntry, ControlRoomSectionMetric, ControlRoomSnapshot, SeatManagerActionResult, SeatManagerActivity, SeatManagerConnection, SeatManagerMode, SeatManagerOptions, SeatManagerTallies } from '@seatlayer/js/manager';
|
|
3
|
+
import { SeatManagerOptions, SeatManagerMode, EventScopedManageToken, ControlRoomSnapshot, ExpandedSeat, ReportResult, LogEntry, SeatManagerConnection } from '@seatlayer/js/manager';
|
|
4
|
+
export { ControlRoomActivityEntry, ControlRoomSectionMetric, ControlRoomSnapshot, EventScopedManageToken, SeatManagerActionResult, SeatManagerActivity, SeatManagerConnection, SeatManagerMode, SeatManagerOptions, SeatManagerTallies } from '@seatlayer/js/manager';
|
|
5
5
|
|
|
6
6
|
/** Imperative handle for the organizer manage board. */
|
|
7
7
|
interface SeatManagerHandle {
|
|
8
8
|
setMode(mode: SeatManagerMode): void;
|
|
9
|
-
setToken(token:
|
|
9
|
+
setToken(token: EventScopedManageToken, expiresAt?: number): void;
|
|
10
10
|
setHeatOverlay(enabled: boolean): void;
|
|
11
11
|
setFollowLive(enabled: boolean): void;
|
|
12
12
|
setTrendWindow(windowMinutes: number): Promise<ControlRoomSnapshot>;
|
|
@@ -53,8 +53,9 @@ interface SeatManagerProps extends Omit<SeatManagerOptions, 'container'> {
|
|
|
53
53
|
* React wrapper around the framework-agnostic {@link CoreSeatManager}. Give the
|
|
54
54
|
* wrapping div a size (it fills its box — a war-room board wants a big one) and
|
|
55
55
|
* the manager lays out the live map + KPI bar + rails inside it. Rebuilt only
|
|
56
|
-
* when the event identity / apiBase changes. Tokens
|
|
57
|
-
*
|
|
56
|
+
* when the event identity / apiBase changes. Tokens, declared capabilities,
|
|
57
|
+
* theme, fallback currency, background liveness, and callbacks are updated in
|
|
58
|
+
* place without tearing the board down.
|
|
58
59
|
*/
|
|
59
60
|
declare const SeatManager: react.ForwardRefExoticComponent<SeatManagerProps & react.RefAttributes<SeatManagerHandle>>;
|
|
60
61
|
|
package/dist/manager.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
|
-
import { SeatManagerOptions, SeatManagerMode, ControlRoomSnapshot, ExpandedSeat, ReportResult, LogEntry, SeatManagerConnection } from '@seatlayer/js/manager';
|
|
4
|
-
export { ControlRoomActivityEntry, ControlRoomSectionMetric, ControlRoomSnapshot, SeatManagerActionResult, SeatManagerActivity, SeatManagerConnection, SeatManagerMode, SeatManagerOptions, SeatManagerTallies } from '@seatlayer/js/manager';
|
|
3
|
+
import { SeatManagerOptions, SeatManagerMode, EventScopedManageToken, ControlRoomSnapshot, ExpandedSeat, ReportResult, LogEntry, SeatManagerConnection } from '@seatlayer/js/manager';
|
|
4
|
+
export { ControlRoomActivityEntry, ControlRoomSectionMetric, ControlRoomSnapshot, EventScopedManageToken, SeatManagerActionResult, SeatManagerActivity, SeatManagerConnection, SeatManagerMode, SeatManagerOptions, SeatManagerTallies } from '@seatlayer/js/manager';
|
|
5
5
|
|
|
6
6
|
/** Imperative handle for the organizer manage board. */
|
|
7
7
|
interface SeatManagerHandle {
|
|
8
8
|
setMode(mode: SeatManagerMode): void;
|
|
9
|
-
setToken(token:
|
|
9
|
+
setToken(token: EventScopedManageToken, expiresAt?: number): void;
|
|
10
10
|
setHeatOverlay(enabled: boolean): void;
|
|
11
11
|
setFollowLive(enabled: boolean): void;
|
|
12
12
|
setTrendWindow(windowMinutes: number): Promise<ControlRoomSnapshot>;
|
|
@@ -53,8 +53,9 @@ interface SeatManagerProps extends Omit<SeatManagerOptions, 'container'> {
|
|
|
53
53
|
* React wrapper around the framework-agnostic {@link CoreSeatManager}. Give the
|
|
54
54
|
* wrapping div a size (it fills its box — a war-room board wants a big one) and
|
|
55
55
|
* the manager lays out the live map + KPI bar + rails inside it. Rebuilt only
|
|
56
|
-
* when the event identity / apiBase changes. Tokens
|
|
57
|
-
*
|
|
56
|
+
* when the event identity / apiBase changes. Tokens, declared capabilities,
|
|
57
|
+
* theme, fallback currency, background liveness, and callbacks are updated in
|
|
58
|
+
* place without tearing the board down.
|
|
58
59
|
*/
|
|
59
60
|
declare const SeatManager: react.ForwardRefExoticComponent<SeatManagerProps & react.RefAttributes<SeatManagerHandle>>;
|
|
60
61
|
|
package/dist/manager.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seatlayer/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"description": "React component for the SeatLayer embed SDK — render an interactive seat picker and hold seats.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.seatlayer.io/buyer-sdk/seat-picker/",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"ticketing"
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@seatlayer/js": "0.
|
|
63
|
+
"@seatlayer/js": "0.49.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"react": ">=17.0.0"
|
|
@@ -1 +0,0 @@
|
|
|
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 SeatManagerTallies,\n type SeatManagerActivity,\n type SeatManagerActionResult,\n type SeatManagerConnection,\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 SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\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: string, 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 selectAll(): ExpandedSeat[];\n selectSection(sectionId: string): ExpandedSeat[];\n selectByLabels(labels: string[]): ExpandedSeat[];\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}\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 and callbacks are updated\n * in 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 } = 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 theme: callbacks.current.theme,\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 onActionComplete: (r: SeatManagerActionResult) => callbacks.current.onActionComplete?.(r),\n onConnectionChange: (s: SeatManagerConnection) => callbacks.current.onConnectionChange?.(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 // 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 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 selectAll: () => managerRef.current?.selectAll() ?? [],\n selectSection: (id) => managerRef.current?.selectSection(id) ?? [],\n selectByLabels: (labels) => managerRef.current?.selectByLabels(labels) ?? [],\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 }),\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,OAgBV;AA2JI;AAlGJ,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,IACnD,IAAI;AAEJ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