@seatlayer/react 0.17.0 → 0.18.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 +20 -0
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -111,6 +111,10 @@ export function VenueEditor({ session }: { session: {
|
|
|
111
111
|
onPublished={({ chartId }) => refreshVenue(chartId)}
|
|
112
112
|
onClose={() => closeVenueEditor()}
|
|
113
113
|
onError={({ code, message }) => showError(code ?? message)}
|
|
114
|
+
onRequestRelaunch={async () => {
|
|
115
|
+
const next = await mintDesignerSession(session.chartId);
|
|
116
|
+
setDesignerUrl(next.designerUrl); // a new designerUrl recreates the iframe
|
|
117
|
+
}}
|
|
114
118
|
/>
|
|
115
119
|
);
|
|
116
120
|
}
|
|
@@ -118,3 +122,19 @@ export function VenueEditor({ session }: { session: {
|
|
|
118
122
|
|
|
119
123
|
Changing `designerUrl` replaces the iframe, so a newly-minted fragment token never
|
|
120
124
|
continues an earlier session. See [the embedded Designer guide](https://docs.seatlayer.io/guides/embedded-designer/).
|
|
125
|
+
|
|
126
|
+
### Built-in loading, error, and expiry states
|
|
127
|
+
|
|
128
|
+
The component paints a branded loading skeleton inside its container until the
|
|
129
|
+
Designer reports `ready`, then removes it. On an expired session, identity
|
|
130
|
+
mismatch, iframe error, or a load timeout it shows a dark **"Try again"** card
|
|
131
|
+
with cause-specific copy. The skeleton honors `prefers-reduced-motion`.
|
|
132
|
+
|
|
133
|
+
| Prop | Type | Default | What it does |
|
|
134
|
+
| --- | --- | --- | --- |
|
|
135
|
+
| `showLoadingState` | `boolean?` | `true` | Render the built-in skeleton and error card. Set `false` to supply your own chrome. |
|
|
136
|
+
| `loadingTimeoutMs` | `number?` | `20000` | Show the error card if `ready` never arrives within this window. |
|
|
137
|
+
| `onRequestRelaunch` | `() => void` | — | Called by **"Try again"**. Mint a fresh session and set a new `designerUrl` (which recreates the iframe and returns to loading). When omitted, "Try again" reloads the current URL. |
|
|
138
|
+
|
|
139
|
+
All three props are optional and additive — existing integrations keep working
|
|
140
|
+
unchanged.
|
package/dist/index.cjs
CHANGED
|
@@ -119,6 +119,11 @@ var EmbeddedDesigner = (0, import_react2.forwardRef)(
|
|
|
119
119
|
style: props.iframeStyle,
|
|
120
120
|
allow: props.allow,
|
|
121
121
|
referrerPolicy: props.referrerPolicy,
|
|
122
|
+
showLoadingState: props.showLoadingState,
|
|
123
|
+
loadingTimeoutMs: props.loadingTimeoutMs,
|
|
124
|
+
// Only forward a relaunch hook when the host supplied one, so the core's
|
|
125
|
+
// "reload the same URL in place" fallback still applies otherwise.
|
|
126
|
+
onRequestRelaunch: props.onRequestRelaunch ? () => callbacks.current.onRequestRelaunch?.() : void 0,
|
|
122
127
|
onReady: (message) => callbacks.current.onReady?.(message),
|
|
123
128
|
onSaved: (message) => callbacks.current.onSaved?.(message),
|
|
124
129
|
onPublished: (message) => callbacks.current.onPublished?.(message),
|
|
@@ -131,7 +136,7 @@ var EmbeddedDesigner = (0, import_react2.forwardRef)(
|
|
|
131
136
|
designer.destroy();
|
|
132
137
|
designerRef.current = null;
|
|
133
138
|
};
|
|
134
|
-
}, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy]);
|
|
139
|
+
}, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy, props.showLoadingState, props.loadingTimeoutMs]);
|
|
135
140
|
(0, import_react2.useImperativeHandle)(ref, () => ({
|
|
136
141
|
setDesignerUrl: (designerUrl) => {
|
|
137
142
|
designerRef.current?.setDesignerUrl(designerUrl);
|
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\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","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\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 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 }),\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 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 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]);\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\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, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView } = 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 const picker = new CoreSeatPicker({\n container: el,\n event,\n apiBase,\n maxSelection,\n publicKey,\n locale,\n currency,\n colorblindSafe,\n holdTtlMs,\n initialHoldId,\n restoreHold,\n confirmSelection,\n seatView,\n theme: callbacks.current.theme,\n messages: callbacks.current.messages,\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 });\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.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView]);\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 }),\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 ReportResult,\n type ControlRoomSnapshot,\n type LogEntry,\n type ExpandedSeat,\n} from '@seatlayer/js';\n\nexport type {\n SeatManagerOptions,\n SeatManagerMode,\n SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n} from '@seatlayer/js';\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 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,\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 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 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 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;;;ACAA,mBAMO;AACP,gBAQO;AAqII;AAvEJ,IAAM,mBAAe;AAAA,EAC1B,SAASA,cAAa,OAAO,KAAK;AAChC,UAAM,EAAE,WAAW,OAAO,OAAO,SAAS,cAAc,WAAW,QAAQ,UAAU,eAAe,IAAI;AAExG,UAAM,mBAAe,qBAA8B,IAAI;AACvD,UAAM,eAAW,qBAAgC,IAAI;AAGrD,UAAM,gBAAY,qBAAO,KAAK;AAC9B,cAAU,UAAU;AAEpB,gCAAU,MAAM;AACd,YAAM,KAAK,aAAa;AACxB,UAAI,CAAC,GAA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,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_js","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} 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\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","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\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 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 }),\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 * 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 onRequestRelaunch?: () => void;\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 // 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]);\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\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, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView } = 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 const picker = new CoreSeatPicker({\n container: el,\n event,\n apiBase,\n maxSelection,\n publicKey,\n locale,\n currency,\n colorblindSafe,\n holdTtlMs,\n initialHoldId,\n restoreHold,\n confirmSelection,\n seatView,\n theme: callbacks.current.theme,\n messages: callbacks.current.messages,\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 });\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.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView]);\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 }),\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 ReportResult,\n type ControlRoomSnapshot,\n type LogEntry,\n type ExpandedSeat,\n} from '@seatlayer/js';\n\nexport type {\n SeatManagerOptions,\n SeatManagerMode,\n SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n} from '@seatlayer/js';\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 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,\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 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 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 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;;;ACAA,mBAMO;AACP,gBAQO;AAqII;AAvEJ,IAAM,mBAAe;AAAA,EAC1B,SAASA,cAAa,OAAO,KAAK;AAChC,UAAM,EAAE,WAAW,OAAO,OAAO,SAAS,cAAc,WAAW,QAAQ,UAAU,eAAe,IAAI;AAExG,UAAM,mBAAe,qBAA8B,IAAI;AACvD,UAAM,eAAW,qBAAgC,IAAI;AAGrD,UAAM,gBAAY,qBAAO,KAAK;AAC9B,cAAU,UAAU;AAEpB,gCAAU,MAAM;AACd,YAAM,KAAK,aAAa;AACxB,UAAI,CAAC,GAAI;AAET,YAAM,QAAQ,IAAI,UAAAC,aAAiB;AAAA,QACjC,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,UAAU,QAAQ;AAAA,QAC5B,mBAAmB,CAAC,UAAU,UAAU,QAAQ,oBAAoB,KAAK;AAAA,QACzE,QAAQ,CAAC,WAAW,UAAU,QAAQ,SAAS,MAAM;AAAA,QACrD,gBAAgB,CAAC,WAAW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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_js","import_jsx_runtime","SeatManager","CoreSeatManager"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -86,6 +86,23 @@ interface EmbeddedDesignerProps {
|
|
|
86
86
|
iframeStyle?: Partial<CSSStyleDeclaration>;
|
|
87
87
|
allow?: string;
|
|
88
88
|
referrerPolicy?: ReferrerPolicy;
|
|
89
|
+
/**
|
|
90
|
+
* Show the built-in branded loading skeleton and error/expiry card inside the
|
|
91
|
+
* container while the Designer boots. Defaults to `true`. Set `false` when you
|
|
92
|
+
* render your own loading and error chrome.
|
|
93
|
+
*/
|
|
94
|
+
showLoadingState?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* If the Designer never posts `ready` within this many milliseconds, the host
|
|
97
|
+
* shows the error card with a timeout message. Defaults to `20000`.
|
|
98
|
+
*/
|
|
99
|
+
loadingTimeoutMs?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Called when the user presses "Try again" on the error card. Mint a fresh
|
|
102
|
+
* session and set the new `designerUrl` (recreating the iframe returns it to
|
|
103
|
+
* the loading state). When omitted, "Try again" reloads the current URL.
|
|
104
|
+
*/
|
|
105
|
+
onRequestRelaunch?: () => void;
|
|
89
106
|
onReady?: (message: EmbeddedDesignerMessage) => void;
|
|
90
107
|
onSaved?: (message: EmbeddedDesignerMessage) => void;
|
|
91
108
|
onPublished?: (message: EmbeddedDesignerMessage) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -86,6 +86,23 @@ interface EmbeddedDesignerProps {
|
|
|
86
86
|
iframeStyle?: Partial<CSSStyleDeclaration>;
|
|
87
87
|
allow?: string;
|
|
88
88
|
referrerPolicy?: ReferrerPolicy;
|
|
89
|
+
/**
|
|
90
|
+
* Show the built-in branded loading skeleton and error/expiry card inside the
|
|
91
|
+
* container while the Designer boots. Defaults to `true`. Set `false` when you
|
|
92
|
+
* render your own loading and error chrome.
|
|
93
|
+
*/
|
|
94
|
+
showLoadingState?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* If the Designer never posts `ready` within this many milliseconds, the host
|
|
97
|
+
* shows the error card with a timeout message. Defaults to `20000`.
|
|
98
|
+
*/
|
|
99
|
+
loadingTimeoutMs?: number;
|
|
100
|
+
/**
|
|
101
|
+
* Called when the user presses "Try again" on the error card. Mint a fresh
|
|
102
|
+
* session and set the new `designerUrl` (recreating the iframe returns it to
|
|
103
|
+
* the loading state). When omitted, "Try again" reloads the current URL.
|
|
104
|
+
*/
|
|
105
|
+
onRequestRelaunch?: () => void;
|
|
89
106
|
onReady?: (message: EmbeddedDesignerMessage) => void;
|
|
90
107
|
onSaved?: (message: EmbeddedDesignerMessage) => void;
|
|
91
108
|
onPublished?: (message: EmbeddedDesignerMessage) => void;
|
package/dist/index.js
CHANGED
|
@@ -103,6 +103,11 @@ var EmbeddedDesigner = forwardRef2(
|
|
|
103
103
|
style: props.iframeStyle,
|
|
104
104
|
allow: props.allow,
|
|
105
105
|
referrerPolicy: props.referrerPolicy,
|
|
106
|
+
showLoadingState: props.showLoadingState,
|
|
107
|
+
loadingTimeoutMs: props.loadingTimeoutMs,
|
|
108
|
+
// Only forward a relaunch hook when the host supplied one, so the core's
|
|
109
|
+
// "reload the same URL in place" fallback still applies otherwise.
|
|
110
|
+
onRequestRelaunch: props.onRequestRelaunch ? () => callbacks.current.onRequestRelaunch?.() : void 0,
|
|
106
111
|
onReady: (message) => callbacks.current.onReady?.(message),
|
|
107
112
|
onSaved: (message) => callbacks.current.onSaved?.(message),
|
|
108
113
|
onPublished: (message) => callbacks.current.onPublished?.(message),
|
|
@@ -115,7 +120,7 @@ var EmbeddedDesigner = forwardRef2(
|
|
|
115
120
|
designer.destroy();
|
|
116
121
|
designerRef.current = null;
|
|
117
122
|
};
|
|
118
|
-
}, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy]);
|
|
123
|
+
}, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy, props.showLoadingState, props.loadingTimeoutMs]);
|
|
119
124
|
useImperativeHandle2(ref, () => ({
|
|
120
125
|
setDesignerUrl: (designerUrl) => {
|
|
121
126
|
designerRef.current?.setDesignerUrl(designerUrl);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/SeatingChart.tsx","../src/EmbeddedDesigner.tsx","../src/SeatPicker.tsx","../src/index.ts","../src/SeatManager.tsx"],"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\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 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 }),\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 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 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]);\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\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, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView } = 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 const picker = new CoreSeatPicker({\n container: el,\n event,\n apiBase,\n maxSelection,\n publicKey,\n locale,\n currency,\n colorblindSafe,\n holdTtlMs,\n initialHoldId,\n restoreHold,\n confirmSelection,\n seatView,\n theme: callbacks.current.theme,\n messages: callbacks.current.messages,\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 });\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.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView]);\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 }),\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\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","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 ReportResult,\n type ControlRoomSnapshot,\n type LogEntry,\n type ExpandedSeat,\n} from '@seatlayer/js';\n\nexport type {\n SeatManagerOptions,\n SeatManagerMode,\n SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n} from '@seatlayer/js';\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 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,\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 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 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 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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AAW,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,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,gBAAAE,KAAC,SAAI,KAAK,cAAc,WAAsB,OAAc;AAAA,EACrE;AACF;","names":["SeatingChart","forwardRef","useEffect","useImperativeHandle","useRef","jsx","EmbeddedDesigner","forwardRef","useEffect","useImperativeHandle","useRef","jsx","SeatPicker","SeatPicker","forwardRef","useEffect","useImperativeHandle","useRef","jsx","SeatManager"]}
|
|
1
|
+
{"version":3,"sources":["../src/SeatingChart.tsx","../src/EmbeddedDesigner.tsx","../src/SeatPicker.tsx","../src/index.ts","../src/SeatManager.tsx"],"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\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 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 }),\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 * 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 onRequestRelaunch?: () => void;\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 // 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]);\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\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, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView } = 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 const picker = new CoreSeatPicker({\n container: el,\n event,\n apiBase,\n maxSelection,\n publicKey,\n locale,\n currency,\n colorblindSafe,\n holdTtlMs,\n initialHoldId,\n restoreHold,\n confirmSelection,\n seatView,\n theme: callbacks.current.theme,\n messages: callbacks.current.messages,\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 });\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.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, apiBase, maxSelection, publicKey, locale, currency, colorblindSafe, holdTtlMs, initialHoldId, restoreHold, confirmSelection, seatView]);\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 }),\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\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","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 ReportResult,\n type ControlRoomSnapshot,\n type LogEntry,\n type ExpandedSeat,\n} from '@seatlayer/js';\n\nexport type {\n SeatManagerOptions,\n SeatManagerMode,\n SeatManagerTallies,\n SeatManagerActivity,\n SeatManagerActionResult,\n} from '@seatlayer/js';\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 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,\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 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 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 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,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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,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,gBAAAE,KAAC,SAAI,KAAK,cAAc,WAAsB,OAAc;AAAA,EACrE;AACF;","names":["SeatingChart","forwardRef","useEffect","useImperativeHandle","useRef","jsx","EmbeddedDesigner","forwardRef","useEffect","useImperativeHandle","useRef","jsx","SeatPicker","SeatPicker","forwardRef","useEffect","useImperativeHandle","useRef","jsx","SeatManager"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seatlayer/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.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",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"ticketing"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@seatlayer/js": "
|
|
38
|
+
"@seatlayer/js": "0.18.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">=17.0.0"
|