@seatlayer/react 0.1.4 → 0.3.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 +31 -0
- package/dist/index.cjs +53 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -4
- package/dist/index.d.ts +44 -4
- package/dist/index.js +59 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -60,3 +60,34 @@ The browser **holds**; your **server books** with a secret key — a browser nev
|
|
|
60
60
|
books directly. See the [integration guide](https://docs.seatlayer.io/getting-started/how-it-works/).
|
|
61
61
|
|
|
62
62
|
Built on [`@seatlayer/js`](https://www.npmjs.com/package/@seatlayer/js).
|
|
63
|
+
|
|
64
|
+
## Embed the chart Designer
|
|
65
|
+
|
|
66
|
+
`EmbeddedDesigner` gives an organizer a native-feeling Designer inside your React
|
|
67
|
+
application. Mint `designerUrl` from your backend — never from a browser using an
|
|
68
|
+
account secret key. The component verifies messages by iframe source, Designer origin,
|
|
69
|
+
and the chart/workspace ids you provide.
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
import { EmbeddedDesigner } from '@seatlayer/react';
|
|
73
|
+
|
|
74
|
+
export function VenueEditor({ session }: { session: {
|
|
75
|
+
designerUrl: string; chartId: string; workspaceId: string;
|
|
76
|
+
} }) {
|
|
77
|
+
return (
|
|
78
|
+
<EmbeddedDesigner
|
|
79
|
+
designerUrl={session.designerUrl}
|
|
80
|
+
expectedChartId={session.chartId}
|
|
81
|
+
expectedWorkspaceId={session.workspaceId}
|
|
82
|
+
style={{ width: '100%', height: 'calc(100vh - 96px)' }}
|
|
83
|
+
onSaved={({ chartId }) => refreshVenue(chartId)}
|
|
84
|
+
onPublished={({ chartId }) => refreshVenue(chartId)}
|
|
85
|
+
onClose={() => closeVenueEditor()}
|
|
86
|
+
onError={({ code, message }) => showError(code ?? message)}
|
|
87
|
+
/>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Changing `designerUrl` replaces the iframe, so a newly-minted fragment token never
|
|
93
|
+
continues an earlier session. See [the embedded Designer guide](https://docs.seatlayer.io/guides/embedded-designer/).
|
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
EmbeddedDesigner: () => EmbeddedDesigner,
|
|
23
24
|
SeatingChart: () => SeatingChart
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -50,6 +51,8 @@ var SeatingChart = (0, import_react.forwardRef)(
|
|
|
50
51
|
messages: callbacks.current.messages,
|
|
51
52
|
onSelectionChange: (seats) => callbacks.current.onSelectionChange?.(seats),
|
|
52
53
|
onHold: (result) => callbacks.current.onHold?.(result),
|
|
54
|
+
onHoldExpired: () => callbacks.current.onHoldExpired?.(),
|
|
55
|
+
onGAClick: (area) => callbacks.current.onGAClick?.(area),
|
|
53
56
|
onError: (err) => callbacks.current.onError?.(err),
|
|
54
57
|
onDeckTap: (floorId) => callbacks.current.onDeckTap?.(floorId),
|
|
55
58
|
onHint: (message) => callbacks.current.onHint?.(message)
|
|
@@ -64,7 +67,9 @@ var SeatingChart = (0, import_react.forwardRef)(
|
|
|
64
67
|
(0, import_react.useImperativeHandle)(
|
|
65
68
|
ref,
|
|
66
69
|
() => ({
|
|
67
|
-
hold: () => chartRef.current?.hold() ?? Promise.resolve(null),
|
|
70
|
+
hold: (options) => chartRef.current?.hold(options) ?? Promise.resolve(null),
|
|
71
|
+
getGAAreas: () => chartRef.current?.getGAAreas() ?? [],
|
|
72
|
+
holdGA: (areaId, qty, options) => chartRef.current?.holdGA(areaId, qty, options) ?? Promise.resolve(null),
|
|
68
73
|
bestAvailable: (qty, categoryKey) => chartRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),
|
|
69
74
|
release: () => chartRef.current?.release() ?? Promise.resolve(),
|
|
70
75
|
getSelection: () => chartRef.current?.getSelection() ?? [],
|
|
@@ -78,8 +83,55 @@ var SeatingChart = (0, import_react.forwardRef)(
|
|
|
78
83
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: containerRef, className, style });
|
|
79
84
|
}
|
|
80
85
|
);
|
|
86
|
+
|
|
87
|
+
// src/EmbeddedDesigner.tsx
|
|
88
|
+
var import_react2 = require("react");
|
|
89
|
+
var import_js2 = require("@seatlayer/js");
|
|
90
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
91
|
+
var EmbeddedDesigner = (0, import_react2.forwardRef)(
|
|
92
|
+
function EmbeddedDesigner2(props, ref) {
|
|
93
|
+
const containerRef = (0, import_react2.useRef)(null);
|
|
94
|
+
const designerRef = (0, import_react2.useRef)(null);
|
|
95
|
+
const callbacks = (0, import_react2.useRef)(props);
|
|
96
|
+
callbacks.current = props;
|
|
97
|
+
(0, import_react2.useEffect)(() => {
|
|
98
|
+
const container = containerRef.current;
|
|
99
|
+
if (!container) return;
|
|
100
|
+
const designer = new import_js2.EmbeddedDesigner({
|
|
101
|
+
designerUrl: props.designerUrl,
|
|
102
|
+
container,
|
|
103
|
+
expectedChartId: props.expectedChartId,
|
|
104
|
+
expectedWorkspaceId: props.expectedWorkspaceId,
|
|
105
|
+
title: props.title,
|
|
106
|
+
className: props.iframeClassName,
|
|
107
|
+
style: props.iframeStyle,
|
|
108
|
+
allow: props.allow,
|
|
109
|
+
referrerPolicy: props.referrerPolicy,
|
|
110
|
+
onReady: (message) => callbacks.current.onReady?.(message),
|
|
111
|
+
onSaved: (message) => callbacks.current.onSaved?.(message),
|
|
112
|
+
onPublished: (message) => callbacks.current.onPublished?.(message),
|
|
113
|
+
onClose: (message) => callbacks.current.onClose?.(message),
|
|
114
|
+
onError: (message) => callbacks.current.onError?.(message)
|
|
115
|
+
});
|
|
116
|
+
designer.mount();
|
|
117
|
+
designerRef.current = designer;
|
|
118
|
+
return () => {
|
|
119
|
+
designer.destroy();
|
|
120
|
+
designerRef.current = null;
|
|
121
|
+
};
|
|
122
|
+
}, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy]);
|
|
123
|
+
(0, import_react2.useImperativeHandle)(ref, () => ({
|
|
124
|
+
setDesignerUrl: (designerUrl) => {
|
|
125
|
+
designerRef.current?.setDesignerUrl(designerUrl);
|
|
126
|
+
},
|
|
127
|
+
getIframe: () => designerRef.current?.getIframe() ?? null
|
|
128
|
+
}), []);
|
|
129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ref: containerRef, className: props.className, style: props.style });
|
|
130
|
+
}
|
|
131
|
+
);
|
|
81
132
|
// Annotate the CommonJS export names for ESM import in node:
|
|
82
133
|
0 && (module.exports = {
|
|
134
|
+
EmbeddedDesigner,
|
|
83
135
|
SeatingChart
|
|
84
136
|
});
|
|
85
137
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/SeatingChart.tsx"],"sourcesContent":["/**\n * @seatlayer/react — the React wrapper for the SeatLayer embed SDK.\n */\nexport { SeatingChart } from './SeatingChart';\nexport type {\n SeatingChartProps,\n SeatingChartHandle,\n SelectedSeat,\n HoldResult,\n BestAvailableResult,\n} from './SeatingChart';\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} from '@seatlayer/js';\n\nexport type { SelectedSeat, HoldResult, BestAvailableResult } 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(): 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 /** 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}\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 onError: (err) => callbacks.current.onError?.(err),\n onDeckTap: (floorId) => callbacks.current.onDeckTap?.(floorId),\n onHint: (message) => callbacks.current.onHint?.(message),\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: () => chartRef.current?.hold() ?? Promise.resolve(null),\n bestAvailable: (qty, categoryKey) =>\n chartRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),\n release: () => chartRef.current?.release() ?? Promise.resolve(),\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 }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAMO;AACP,gBAMO;AAuGI;AA1DJ,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,C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A,MACA,CAAC;AAAA,IACH;AAEA,WAAO,4CAAC,SAAI,KAAK,cAAc,WAAsB,OAAc;AAAA,EACrE;AACF;","names":["SeatingChart","CoreSeatingChart"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/SeatingChart.tsx","../src/EmbeddedDesigner.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';\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';\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 /** 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 /** 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}\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 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 });\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 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 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 }),\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,\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ACA,iBAAiB,MAAM;AAAA,QACvB,qBAAqB,MAAM;AAAA,QAC3B,OAAO,MAAM;AAAA,QACb,WAAW,MAAM;AAAA,QACjB,OAAO,MAAM;AAAA,QACb,OAAO,MAAM;AAAA,QACb,gBAAgB,MAAM;AAAA,QACtB,SAAS,CAAC,YAAY,UAAU,QAAQ,UAAU,OAAO;AAAA,QACzD,SAAS,CAAC,YAAY,UAAU,QAAQ,UAAU,OAAO;AAAA,QACzD,aAAa,CAAC,YAAY,UAAU,QAAQ,cAAc,OAAO;AAAA,QACjE,SAAS,CAAC,YAAY,UAAU,QAAQ,UAAU,OAAO;AAAA,QACzD,SAAS,CAAC,YAAY,UAAU,QAAQ,UAAU,OAAO;AAAA,MAC3D,CAAC;AACD,eAAS,MAAM;AACf,kBAAY,UAAU;AACtB,aAAO,MAAM;AACX,iBAAS,QAAQ;AACjB,oBAAY,UAAU;AAAA,MACxB;AAAA,IAIF,GAAG,CAAC,MAAM,aAAa,MAAM,iBAAiB,MAAM,qBAAqB,MAAM,OAAO,MAAM,iBAAiB,MAAM,aAAa,MAAM,OAAO,MAAM,cAAc,CAAC;AAElK,2CAAoB,KAAK,OAAO;AAAA,MAC9B,gBAAgB,CAAC,gBAAgB;AAAE,oBAAY,SAAS,eAAe,WAAW;AAAA,MAAG;AAAA,MACrF,WAAW,MAAM,YAAY,SAAS,UAAU,KAAK;AAAA,IACvD,IAAI,CAAC,CAAC;AAEN,WAAO,6CAAC,SAAI,KAAK,cAAc,WAAW,MAAM,WAAW,OAAO,MAAM,OAAO;AAAA,EACjF;AACF;","names":["SeatingChart","CoreSeatingChart","import_react","import_js","import_jsx_runtime","EmbeddedDesigner","CoreEmbeddedDesigner"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
|
-
import { SeatingChartOptions, HoldResult, BestAvailableResult, SelectedSeat } from '@seatlayer/js';
|
|
4
|
-
export { BestAvailableResult, HoldResult, SelectedSeat } from '@seatlayer/js';
|
|
3
|
+
import { SeatingChartOptions, HoldResult, GAAreaAvailability, BestAvailableResult, SelectedSeat, EmbeddedDesignerMessage } from '@seatlayer/js';
|
|
4
|
+
export { BestAvailableResult, EmbeddedDesignerMessage, GAAreaAvailability, HoldLineItem, HoldResult, SelectedSeat } from '@seatlayer/js';
|
|
5
5
|
|
|
6
6
|
/** Imperative handle exposed via `ref` — call these to drive the picker from your app. */
|
|
7
7
|
interface SeatingChartHandle {
|
|
8
8
|
/** Hold the current selection. Resolves the hold, or `null` on a 409 conflict. */
|
|
9
|
-
hold(
|
|
9
|
+
hold(options?: {
|
|
10
|
+
ttlMs?: number;
|
|
11
|
+
}): Promise<HoldResult | null>;
|
|
12
|
+
/** GA areas with live remaining capacity. */
|
|
13
|
+
getGAAreas(): GAAreaAvailability[];
|
|
14
|
+
/** Atomically hold a quantity from one GA area. */
|
|
15
|
+
holdGA(areaId: string, qty: number, options?: {
|
|
16
|
+
tierId?: string | null;
|
|
17
|
+
ttlMs?: number;
|
|
18
|
+
}): Promise<HoldResult | null>;
|
|
10
19
|
/** Ask the server for the `qty` best free seats and hold them atomically. */
|
|
11
20
|
bestAvailable(qty: number, categoryKey?: string): Promise<BestAvailableResult | null>;
|
|
12
21
|
/** Release the current hold (if any). */
|
|
@@ -47,4 +56,35 @@ interface SeatingChartProps extends Omit<SeatingChartOptions, 'container'> {
|
|
|
47
56
|
*/
|
|
48
57
|
declare const SeatingChart: react.ForwardRefExoticComponent<SeatingChartProps & react.RefAttributes<SeatingChartHandle>>;
|
|
49
58
|
|
|
50
|
-
|
|
59
|
+
interface EmbeddedDesignerHandle {
|
|
60
|
+
/** Recreate the iframe with a newly-minted session URL. */
|
|
61
|
+
setDesignerUrl(designerUrl: string): void;
|
|
62
|
+
/** The currently mounted iframe, if any. */
|
|
63
|
+
getIframe(): HTMLIFrameElement | null;
|
|
64
|
+
}
|
|
65
|
+
interface EmbeddedDesignerProps {
|
|
66
|
+
/** Short-lived `designerUrl` returned by your backend. Never pass an `sk_` key. */
|
|
67
|
+
designerUrl: string;
|
|
68
|
+
expectedChartId?: string;
|
|
69
|
+
expectedWorkspaceId?: string;
|
|
70
|
+
title?: string;
|
|
71
|
+
className?: string;
|
|
72
|
+
style?: CSSProperties;
|
|
73
|
+
iframeClassName?: string;
|
|
74
|
+
iframeStyle?: Partial<CSSStyleDeclaration>;
|
|
75
|
+
allow?: string;
|
|
76
|
+
referrerPolicy?: ReferrerPolicy;
|
|
77
|
+
onReady?: (message: EmbeddedDesignerMessage) => void;
|
|
78
|
+
onSaved?: (message: EmbeddedDesignerMessage) => void;
|
|
79
|
+
onPublished?: (message: EmbeddedDesignerMessage) => void;
|
|
80
|
+
onClose?: (message: EmbeddedDesignerMessage) => void;
|
|
81
|
+
onError?: (message: EmbeddedDesignerMessage) => void;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Native-feeling React host for the secure SeatLayer Designer iframe.
|
|
85
|
+
* A new `designerUrl` always recreates the iframe, so a new fragment token can
|
|
86
|
+
* never retain state from an earlier chart session.
|
|
87
|
+
*/
|
|
88
|
+
declare const EmbeddedDesigner: react.ForwardRefExoticComponent<EmbeddedDesignerProps & react.RefAttributes<EmbeddedDesignerHandle>>;
|
|
89
|
+
|
|
90
|
+
export { EmbeddedDesigner, type EmbeddedDesignerHandle, type EmbeddedDesignerProps, SeatingChart, type SeatingChartHandle, type SeatingChartProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
|
-
import { SeatingChartOptions, HoldResult, BestAvailableResult, SelectedSeat } from '@seatlayer/js';
|
|
4
|
-
export { BestAvailableResult, HoldResult, SelectedSeat } from '@seatlayer/js';
|
|
3
|
+
import { SeatingChartOptions, HoldResult, GAAreaAvailability, BestAvailableResult, SelectedSeat, EmbeddedDesignerMessage } from '@seatlayer/js';
|
|
4
|
+
export { BestAvailableResult, EmbeddedDesignerMessage, GAAreaAvailability, HoldLineItem, HoldResult, SelectedSeat } from '@seatlayer/js';
|
|
5
5
|
|
|
6
6
|
/** Imperative handle exposed via `ref` — call these to drive the picker from your app. */
|
|
7
7
|
interface SeatingChartHandle {
|
|
8
8
|
/** Hold the current selection. Resolves the hold, or `null` on a 409 conflict. */
|
|
9
|
-
hold(
|
|
9
|
+
hold(options?: {
|
|
10
|
+
ttlMs?: number;
|
|
11
|
+
}): Promise<HoldResult | null>;
|
|
12
|
+
/** GA areas with live remaining capacity. */
|
|
13
|
+
getGAAreas(): GAAreaAvailability[];
|
|
14
|
+
/** Atomically hold a quantity from one GA area. */
|
|
15
|
+
holdGA(areaId: string, qty: number, options?: {
|
|
16
|
+
tierId?: string | null;
|
|
17
|
+
ttlMs?: number;
|
|
18
|
+
}): Promise<HoldResult | null>;
|
|
10
19
|
/** Ask the server for the `qty` best free seats and hold them atomically. */
|
|
11
20
|
bestAvailable(qty: number, categoryKey?: string): Promise<BestAvailableResult | null>;
|
|
12
21
|
/** Release the current hold (if any). */
|
|
@@ -47,4 +56,35 @@ interface SeatingChartProps extends Omit<SeatingChartOptions, 'container'> {
|
|
|
47
56
|
*/
|
|
48
57
|
declare const SeatingChart: react.ForwardRefExoticComponent<SeatingChartProps & react.RefAttributes<SeatingChartHandle>>;
|
|
49
58
|
|
|
50
|
-
|
|
59
|
+
interface EmbeddedDesignerHandle {
|
|
60
|
+
/** Recreate the iframe with a newly-minted session URL. */
|
|
61
|
+
setDesignerUrl(designerUrl: string): void;
|
|
62
|
+
/** The currently mounted iframe, if any. */
|
|
63
|
+
getIframe(): HTMLIFrameElement | null;
|
|
64
|
+
}
|
|
65
|
+
interface EmbeddedDesignerProps {
|
|
66
|
+
/** Short-lived `designerUrl` returned by your backend. Never pass an `sk_` key. */
|
|
67
|
+
designerUrl: string;
|
|
68
|
+
expectedChartId?: string;
|
|
69
|
+
expectedWorkspaceId?: string;
|
|
70
|
+
title?: string;
|
|
71
|
+
className?: string;
|
|
72
|
+
style?: CSSProperties;
|
|
73
|
+
iframeClassName?: string;
|
|
74
|
+
iframeStyle?: Partial<CSSStyleDeclaration>;
|
|
75
|
+
allow?: string;
|
|
76
|
+
referrerPolicy?: ReferrerPolicy;
|
|
77
|
+
onReady?: (message: EmbeddedDesignerMessage) => void;
|
|
78
|
+
onSaved?: (message: EmbeddedDesignerMessage) => void;
|
|
79
|
+
onPublished?: (message: EmbeddedDesignerMessage) => void;
|
|
80
|
+
onClose?: (message: EmbeddedDesignerMessage) => void;
|
|
81
|
+
onError?: (message: EmbeddedDesignerMessage) => void;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Native-feeling React host for the secure SeatLayer Designer iframe.
|
|
85
|
+
* A new `designerUrl` always recreates the iframe, so a new fragment token can
|
|
86
|
+
* never retain state from an earlier chart session.
|
|
87
|
+
*/
|
|
88
|
+
declare const EmbeddedDesigner: react.ForwardRefExoticComponent<EmbeddedDesignerProps & react.RefAttributes<EmbeddedDesignerHandle>>;
|
|
89
|
+
|
|
90
|
+
export { EmbeddedDesigner, type EmbeddedDesignerHandle, type EmbeddedDesignerProps, SeatingChart, type SeatingChartHandle, type SeatingChartProps };
|
package/dist/index.js
CHANGED
|
@@ -31,6 +31,8 @@ var SeatingChart = forwardRef(
|
|
|
31
31
|
messages: callbacks.current.messages,
|
|
32
32
|
onSelectionChange: (seats) => callbacks.current.onSelectionChange?.(seats),
|
|
33
33
|
onHold: (result) => callbacks.current.onHold?.(result),
|
|
34
|
+
onHoldExpired: () => callbacks.current.onHoldExpired?.(),
|
|
35
|
+
onGAClick: (area) => callbacks.current.onGAClick?.(area),
|
|
34
36
|
onError: (err) => callbacks.current.onError?.(err),
|
|
35
37
|
onDeckTap: (floorId) => callbacks.current.onDeckTap?.(floorId),
|
|
36
38
|
onHint: (message) => callbacks.current.onHint?.(message)
|
|
@@ -45,7 +47,9 @@ var SeatingChart = forwardRef(
|
|
|
45
47
|
useImperativeHandle(
|
|
46
48
|
ref,
|
|
47
49
|
() => ({
|
|
48
|
-
hold: () => chartRef.current?.hold() ?? Promise.resolve(null),
|
|
50
|
+
hold: (options) => chartRef.current?.hold(options) ?? Promise.resolve(null),
|
|
51
|
+
getGAAreas: () => chartRef.current?.getGAAreas() ?? [],
|
|
52
|
+
holdGA: (areaId, qty, options) => chartRef.current?.holdGA(areaId, qty, options) ?? Promise.resolve(null),
|
|
49
53
|
bestAvailable: (qty, categoryKey) => chartRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),
|
|
50
54
|
release: () => chartRef.current?.release() ?? Promise.resolve(),
|
|
51
55
|
getSelection: () => chartRef.current?.getSelection() ?? [],
|
|
@@ -59,7 +63,61 @@ var SeatingChart = forwardRef(
|
|
|
59
63
|
return /* @__PURE__ */ jsx("div", { ref: containerRef, className, style });
|
|
60
64
|
}
|
|
61
65
|
);
|
|
66
|
+
|
|
67
|
+
// src/EmbeddedDesigner.tsx
|
|
68
|
+
import {
|
|
69
|
+
forwardRef as forwardRef2,
|
|
70
|
+
useEffect as useEffect2,
|
|
71
|
+
useImperativeHandle as useImperativeHandle2,
|
|
72
|
+
useRef as useRef2
|
|
73
|
+
} from "react";
|
|
74
|
+
import {
|
|
75
|
+
EmbeddedDesigner as CoreEmbeddedDesigner
|
|
76
|
+
} from "@seatlayer/js";
|
|
77
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
78
|
+
var EmbeddedDesigner = forwardRef2(
|
|
79
|
+
function EmbeddedDesigner2(props, ref) {
|
|
80
|
+
const containerRef = useRef2(null);
|
|
81
|
+
const designerRef = useRef2(null);
|
|
82
|
+
const callbacks = useRef2(props);
|
|
83
|
+
callbacks.current = props;
|
|
84
|
+
useEffect2(() => {
|
|
85
|
+
const container = containerRef.current;
|
|
86
|
+
if (!container) return;
|
|
87
|
+
const designer = new CoreEmbeddedDesigner({
|
|
88
|
+
designerUrl: props.designerUrl,
|
|
89
|
+
container,
|
|
90
|
+
expectedChartId: props.expectedChartId,
|
|
91
|
+
expectedWorkspaceId: props.expectedWorkspaceId,
|
|
92
|
+
title: props.title,
|
|
93
|
+
className: props.iframeClassName,
|
|
94
|
+
style: props.iframeStyle,
|
|
95
|
+
allow: props.allow,
|
|
96
|
+
referrerPolicy: props.referrerPolicy,
|
|
97
|
+
onReady: (message) => callbacks.current.onReady?.(message),
|
|
98
|
+
onSaved: (message) => callbacks.current.onSaved?.(message),
|
|
99
|
+
onPublished: (message) => callbacks.current.onPublished?.(message),
|
|
100
|
+
onClose: (message) => callbacks.current.onClose?.(message),
|
|
101
|
+
onError: (message) => callbacks.current.onError?.(message)
|
|
102
|
+
});
|
|
103
|
+
designer.mount();
|
|
104
|
+
designerRef.current = designer;
|
|
105
|
+
return () => {
|
|
106
|
+
designer.destroy();
|
|
107
|
+
designerRef.current = null;
|
|
108
|
+
};
|
|
109
|
+
}, [props.designerUrl, props.expectedChartId, props.expectedWorkspaceId, props.title, props.iframeClassName, props.iframeStyle, props.allow, props.referrerPolicy]);
|
|
110
|
+
useImperativeHandle2(ref, () => ({
|
|
111
|
+
setDesignerUrl: (designerUrl) => {
|
|
112
|
+
designerRef.current?.setDesignerUrl(designerUrl);
|
|
113
|
+
},
|
|
114
|
+
getIframe: () => designerRef.current?.getIframe() ?? null
|
|
115
|
+
}), []);
|
|
116
|
+
return /* @__PURE__ */ jsx2("div", { ref: containerRef, className: props.className, style: props.style });
|
|
117
|
+
}
|
|
118
|
+
);
|
|
62
119
|
export {
|
|
120
|
+
EmbeddedDesigner,
|
|
63
121
|
SeatingChart
|
|
64
122
|
};
|
|
65
123
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/SeatingChart.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} from '@seatlayer/js';\n\nexport type { SelectedSeat, HoldResult, BestAvailableResult } 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(): 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 /** 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}\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 onError: (err) => callbacks.current.onError?.(err),\n onDeckTap: (floorId) => callbacks.current.onDeckTap?.(floorId),\n onHint: (message) => callbacks.current.onHint?.(message),\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: () => chartRef.current?.hold() ?? Promise.resolve(null),\n bestAvailable: (qty, categoryKey) =>\n chartRef.current?.bestAvailable(qty, categoryKey) ?? Promise.resolve(null),\n release: () => chartRef.current?.release() ?? Promise.resolve(),\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 }),\n [],\n );\n\n return <div ref={containerRef} className={className} style={style} />;\n },\n);\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE,gBAAgB;AAAA,OAKX;AAuGI;AA1DJ,IAAM,eAAe;AAAA,EAC1B,SAASA,cAAa,OAAO,KAAK;AAChC,UAAM,EAAE,WAAW,OAAO,OAAO,SAAS,cAAc,WAAW,QAAQ,U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,QAC7E,WAAW,MAAM,SAAS,SAAS,UAAU,KAAK,CAAC;AAAA,QACnD,UAAU,CAAC,YAAY,SAAS,SAAS,SAAS,OAAO;AAAA,QACzD,mBAAmB,CAAC,OAAO,SAAS,SAAS,kBAAkB,EAAE;AAAA,MACnE;AAAA,MACA,CAAC;AAAA,IACH;AAEA,WAAO,oBAAC,SAAI,KAAK,cAAc,WAAsB,OAAc;AAAA,EACrE;AACF;","names":["SeatingChart"]}
|
|
1
|
+
{"version":3,"sources":["../src/SeatingChart.tsx","../src/EmbeddedDesigner.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';\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 /** 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 /** 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}\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 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 });\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 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 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 }),\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"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,E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QAC3B,OAAO,MAAM;AAAA,QACb,WAAW,MAAM;AAAA,QACjB,OAAO,MAAM;AAAA,QACb,OAAO,MAAM;AAAA,QACb,gBAAgB,MAAM;AAAA,QACtB,SAAS,CAAC,YAAY,UAAU,QAAQ,UAAU,OAAO;AAAA,QACzD,SAAS,CAAC,YAAY,UAAU,QAAQ,UAAU,OAAO;AAAA,QACzD,aAAa,CAAC,YAAY,UAAU,QAAQ,cAAc,OAAO;AAAA,QACjE,SAAS,CAAC,YAAY,UAAU,QAAQ,UAAU,OAAO;AAAA,QACzD,SAAS,CAAC,YAAY,UAAU,QAAQ,UAAU,OAAO;AAAA,MAC3D,CAAC;AACD,eAAS,MAAM;AACf,kBAAY,UAAU;AACtB,aAAO,MAAM;AACX,iBAAS,QAAQ;AACjB,oBAAY,UAAU;AAAA,MACxB;AAAA,IAIF,GAAG,CAAC,MAAM,aAAa,MAAM,iBAAiB,MAAM,qBAAqB,MAAM,OAAO,MAAM,iBAAiB,MAAM,aAAa,MAAM,OAAO,MAAM,cAAc,CAAC;AAElK,IAAAC,qBAAoB,KAAK,OAAO;AAAA,MAC9B,gBAAgB,CAAC,gBAAgB;AAAE,oBAAY,SAAS,eAAe,WAAW;AAAA,MAAG;AAAA,MACrF,WAAW,MAAM,YAAY,SAAS,UAAU,KAAK;AAAA,IACvD,IAAI,CAAC,CAAC;AAEN,WAAO,gBAAAE,KAAC,SAAI,KAAK,cAAc,WAAW,MAAM,WAAW,OAAO,MAAM,OAAO;AAAA,EACjF;AACF;","names":["SeatingChart","forwardRef","useEffect","useImperativeHandle","useRef","jsx","EmbeddedDesigner"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seatlayer/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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": "^0.
|
|
38
|
+
"@seatlayer/js": "^0.3.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">=17.0.0"
|