@seatlayer/vue 0.109.2 → 0.110.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -135,6 +135,26 @@ apply the package price, tax, and payment decision before booking the
135
135
  identity-only allocation. `SeasonPicker` is supported in `@seatlayer/vue`
136
136
  `0.72.0` and newer.
137
137
 
138
+ The component ref exposes the same calls as `@seatlayer/js`, including Season
139
+ Best Available: `season.value.holdBestAvailable(2, 'sop_checkout_1184', {
140
+ categoryKey: 'stalls' })` holds the best two seats free on every date.
141
+
142
+ To sell child or concession seats too, pass `:price-types="['adult', 'child']"`:
143
+ the buyer chooses a type per seat before the hold, and the handoff's `seats`
144
+ lists each seat's `priceTypeKey`. `season.value.holdSameSeat(labels,
145
+ operationId, { 'A-2': 'child' })` names them yourself; a label left out is adult.
146
+
147
+ The picker opens on step 1, the package with its dates and prices. Pass
148
+ `package="spl_half"` (the package's key) to open on that package instead of the
149
+ Season's first one; a host token is already bound to one package, so it ignores
150
+ this. If your own checkout emails a ticket for every date, pass
151
+ `:tickets-by-email="true"` and step 1 says so.
152
+
153
+ With SeatLayer checkout, pass `buyer-email` and `buyer-name` to fill in the
154
+ payment card for a signed-in member; the buyer can still change them. On your
155
+ own checkout, call `season.value.markBooked()` once your server has booked the
156
+ hold: the picker shows the booked screen instead of offering checkout again.
157
+
138
158
  ## Props
139
159
 
140
160
  | Prop | Type | Notes |
package/dist/index.cjs CHANGED
@@ -234,6 +234,8 @@ var SeasonPicker = (0, import_vue2.defineComponent)({
234
234
  default: void 0
235
235
  },
236
236
  returnUrl: { type: String, default: void 0 },
237
+ buyerEmail: { type: String, default: void 0 },
238
+ buyerName: { type: String, default: void 0 },
237
239
  buyerAccessTokenProvider: {
238
240
  type: Function,
239
241
  default: void 0
@@ -243,8 +245,20 @@ var SeasonPicker = (0, import_vue2.defineComponent)({
243
245
  default: void 0
244
246
  },
245
247
  initialOperationId: { type: String, default: void 0 },
248
+ /** The package to open on, by its key; the first package without it. */
249
+ package: { type: String, default: void 0 },
250
+ /** The host emails a ticket per date itself: step 1 says so. */
251
+ ticketsByEmail: { type: Boolean, default: void 0 },
246
252
  recoveryTimeoutMs: { type: Number, default: void 0 },
247
- fetch: { type: Function, default: void 0 }
253
+ fetch: { type: Function, default: void 0 },
254
+ /**
255
+ * The price types the picker sells, e.g. `['adult', 'child']`. With a type
256
+ * besides adult, the buyer chooses one per seat before the hold.
257
+ */
258
+ priceTypes: {
259
+ type: Array,
260
+ default: void 0
261
+ }
248
262
  },
249
263
  emits: {
250
264
  hold: (_handoff) => true,
@@ -260,6 +274,7 @@ var SeasonPicker = (0, import_vue2.defineComponent)({
260
274
  setup(props, { emit, expose }) {
261
275
  const container = (0, import_vue2.ref)(null);
262
276
  const picker = (0, import_vue2.shallowRef)(null);
277
+ const priceTypesKey = (0, import_vue2.computed)(() => (props.priceTypes ?? []).join(","));
263
278
  const destroy = () => {
264
279
  picker.value?.destroy();
265
280
  picker.value = null;
@@ -275,11 +290,16 @@ var SeasonPicker = (0, import_vue2.defineComponent)({
275
290
  publicKey: props.publicKey,
276
291
  checkout: props.checkout,
277
292
  returnUrl: props.returnUrl,
293
+ buyerEmail: props.buyerEmail,
294
+ buyerName: props.buyerName,
278
295
  buyerAccessTokenProvider: props.buyerAccessTokenProvider,
279
296
  buyerAccessToken: props.buyerAccessToken,
280
297
  initialOperationId: props.initialOperationId,
298
+ package: props.package,
299
+ ticketsByEmail: props.ticketsByEmail,
281
300
  recoveryTimeoutMs: props.recoveryTimeoutMs,
282
301
  fetch: props.fetch,
302
+ priceTypes: props.priceTypes,
283
303
  onHold: (handoff) => emit("hold", handoff),
284
304
  onHoldChange: (handoff) => emit("hold-change", handoff),
285
305
  onContinue: (handoff) => emit("continue", handoff),
@@ -304,8 +324,11 @@ var SeasonPicker = (0, import_vue2.defineComponent)({
304
324
  props.buyerAccessTokenProvider,
305
325
  props.buyerAccessToken,
306
326
  props.initialOperationId,
327
+ props.package,
328
+ props.ticketsByEmail,
307
329
  props.recoveryTimeoutMs,
308
- props.fetch
330
+ props.fetch,
331
+ priceTypesKey.value
309
332
  ],
310
333
  build,
311
334
  { immediate: true, flush: "post" }
@@ -316,8 +339,10 @@ var SeasonPicker = (0, import_vue2.defineComponent)({
316
339
  return picker.value;
317
340
  };
318
341
  const exposed = {
319
- holdSameSeat: (labels, operationId) => current().holdSameSeat(labels, operationId),
342
+ holdSameSeat: (labels, operationId, priceTypes) => current().holdSameSeat(labels, operationId, priceTypes),
343
+ holdBestAvailable: (qty, operationId, options) => current().holdBestAvailable(qty, operationId, options),
320
344
  restoreOperation: (operationId) => current().restoreOperation(operationId),
345
+ markBooked: () => current().markBooked(),
321
346
  release: (releaseActionId) => current().release(releaseActionId),
322
347
  createRenewalIntent: (offerId) => current().createRenewalIntent(offerId),
323
348
  getDescriptor: () => picker.value?.getDescriptor() ?? null,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/SeatingChart.ts","../src/SeasonPicker.ts"],"sourcesContent":["/**\n * @seatlayer/vue — the Vue 3 wrapper for the SeatLayer embed SDK.\n *\n * Components are written as render functions rather than SFCs, so installing\n * this package needs no Vue compiler plugin.\n */\nexport { SeatingChart } from './SeatingChart';\nexport type { SeatingChartExposed } from './SeatingChart';\nexport { SeasonPicker } from './SeasonPicker';\nexport type { SeasonPickerExposed } from './SeasonPicker';\n\nexport type {\n SelectedSeat,\n HoldResult,\n BestAvailableResult,\n GAAreaAvailability,\n HoldLineItem,\n SeatHoverDetails,\n SeasonAvailability,\n SeasonCheckoutHandoff,\n SeasonDescriptor,\n SeasonOperation,\n SeasonOperationState,\n SeasonPickerOptions,\n SeasonRenewalIntent,\n SeasonStatusEvent,\n} from '@seatlayer/js';\n\n// Sales Channels — buyer access sessions for private channel inventory.\nexport type {\n BuyerAccessToken,\n BuyerAccessTokenProvider,\n BuyerAccessRefreshReason,\n BuyerAccessUnavailableReason,\n BuyerAccessExpiredEvent,\n BuyerAccessUnavailableEvent,\n SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n\n// The framework-agnostic widget class — for the one-call modal (SeatPickerWidget.open()).\nexport { SeatPicker as SeatPickerWidget } from '@seatlayer/js';\n\n// Host-side embed helper: grows the iframe on `seatlayer:height` and pins it on\n// `seatlayer:fullscreen`. Vue hosts depend on this package alone, so it has to be\n// reachable here rather than only from @seatlayer/js.\nexport { attachPickerFrame } from '@seatlayer/js';\nexport type { AttachPickerFrameOptions } from '@seatlayer/js';\n","import {\n defineComponent,\n h,\n onBeforeUnmount,\n ref,\n shallowRef,\n watch,\n type PropType,\n type Ref,\n} from 'vue';\nimport {\n SeatingChart as CoreSeatingChart,\n SEATING_CHART_IDENTITY_PROPS,\n bindSeatingChartHandle,\n buildSeatingChartOptions,\n type RendererViewMode,\n type SeatingChartHandle,\n type SeatingChartOptions,\n type SelectedSeat,\n type HoldResult,\n type BestAvailableResult,\n type GAAreaAvailability,\n type SeatHoverDetails,\n type PickerSelectionValidity,\n type PickerSelectionValidator,\n type BuyerAccessToken,\n type BuyerAccessTokenProvider,\n type BuyerAccessExpiredEvent,\n type BuyerAccessUnavailableEvent,\n type SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n\n/**\n * What `ref=\"chart\"` gives you — call these to drive the picker from your app.\n *\n * Vue exposes these through `defineExpose`, so a template ref is typed as this\n * rather than as the raw component instance. It is the shared\n * `SeatingChartHandle` from `@seatlayer/js`: the same 17 methods React's `ref`\n * and Angular's component expose, from one declaration, so the three wrappers\n * cannot drift apart again.\n */\nexport type SeatingChartExposed = SeatingChartHandle;\n\n/**\n * Vue 3 wrapper around the framework-agnostic `@seatlayer/js` SDK.\n *\n * The canvas is created once and torn down on unmount. Only the props that\n * change the chart's identity (`SEATING_CHART_IDENTITY_PROPS`: `event`,\n * `apiBase`, `maxSelection`, `numberOfPlacesToSelect`, `publicKey`, `locale`, `currency`,\n * `colorblindSafe`, `initialView`, `errorDisplay`) trigger a rebuild;\n * everything else is read live, so a parent re-render never destroys the canvas\n * mid-selection.\n *\n * Written as a render function rather than an SFC so the package builds with\n * plain TypeScript — a consumer needs no Vue compiler plugin to install it.\n *\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { ref } from 'vue';\n * import { SeatingChart, type SeatingChartExposed } from '@seatlayer/vue';\n *\n * const chart = ref<SeatingChartExposed | null>(null);\n * const checkout = async () => {\n * const held = await chart.value?.hold();\n * if (held) await pay(held.holdId);\n * };\n * </script>\n *\n * <template>\n * <SeatingChart ref=\"chart\" event=\"summer-gala\" @selection-change=\"onChange\" />\n * </template>\n * ```\n */\nexport const SeatingChart = defineComponent({\n name: 'SeatLayerSeatingChart',\n\n props: {\n /** Event key to render. Changing it rebuilds the chart. */\n event: { type: String, required: true },\n /** API base URL. Defaults to the public API. */\n apiBase: { type: String, default: undefined },\n /** Cap on how many seats a buyer may select. */\n maxSelection: { type: Number, default: undefined },\n /** Object ids or public labels selected after availability loads. */\n selectedObjects: { type: Array as PropType<string[]>, default: undefined },\n /** Object ids or public labels the buyer may select. */\n selectableObjects: { type: Array as PropType<string[] | null>, default: undefined },\n /** Exact ticket count required for a valid selection. */\n numberOfPlacesToSelect: { type: Number, default: undefined },\n /** Local buyer selection guards. Changing them rebuilds the chart. */\n selectionValidators: { type: Array as PropType<PickerSelectionValidator[]>, default: undefined },\n /** Publishable key, when your integration uses one. */\n publicKey: { type: String, default: undefined },\n /** BCP-47 locale for built-in copy. */\n locale: { type: String, default: undefined },\n /** ISO currency for price formatting. */\n currency: { type: String, default: undefined },\n /** Render with colorblind-safe seat glyphs. */\n colorblindSafe: { type: Boolean, default: undefined },\n /**\n * Initial canvas projection. Read once when the chart is built, so\n * changing it rebuilds.\n * @deprecated `'isometric'` and `'perspective'` are retired in favour of\n * the real 3D venue view; use `'flat'`.\n */\n initialView: {\n type: String as PropType<RendererViewMode>,\n default: undefined,\n },\n /**\n * What the BUYER sees when the chart cannot load: `'message'` (default) is\n * a styleable notice with a Try again button, `'none'` is silent for hosts\n * that render their own failure UI from the `error` event.\n */\n errorDisplay: {\n type: String as PropType<'message' | 'none'>,\n default: undefined,\n },\n /** Copy overrides, read once per mount. */\n messages: {\n type: Object as PropType<SeatingChartOptions['messages']>,\n default: undefined,\n },\n /**\n * Show the built-in seat tooltip. Set false to draw your own popover from\n * the `seat-hover` event.\n */\n seatTooltip: { type: Boolean, default: undefined },\n /**\n * Sales Channels: mint a buyer access session on demand. Called with a\n * `reason`; returns `{ token, expiresAt }` from YOUR backend. The token is\n * held in memory only — never storage, never a URL, never a log.\n */\n buyerAccessTokenProvider: {\n type: Function as PropType<BuyerAccessTokenProvider>,\n default: undefined,\n },\n /** One-shot session for hosts that own the lifecycle. Cannot be renewed. */\n buyerAccessToken: {\n type: [String, Object] as PropType<string | BuyerAccessToken>,\n default: undefined,\n },\n },\n\n emits: {\n /** The buyer's selection changed. */\n 'selection-change': (_seats: SelectedSeat[]) => true,\n /** Exact-count state changed. */\n 'selection-validity-change': (_state: PickerSelectionValidity) => true,\n /** The exact count was reached. */\n 'selection-valid': (_seats: SelectedSeat[]) => true,\n /** The selection is not at the exact count. */\n 'selection-invalid': (_state: PickerSelectionValidity) => true,\n /** The active selection cap was reached. */\n 'selection-limit': (_max: number) => true,\n /** A hold succeeded. */\n hold: (_result: HoldResult) => true,\n /** A previous hold was restored on mount. */\n 'hold-restored': (_result: HoldResult) => true,\n /** The active hold lapsed. */\n 'hold-expired': () => true,\n /** A GA area was clicked. */\n 'ga-click': (_area: GAAreaAvailability) => true,\n /** Something failed — a network error, a rejected hold. */\n error: (_error: unknown) => true,\n /** A floor deck was tapped in the 3D view. */\n 'deck-tap': (_floorId: string) => true,\n /** A transient hint worth showing the buyer, or `null` to clear it. */\n hint: (_message: string | null) => true,\n /** The pointer moved onto a seat, or off one (`null`). */\n 'seat-hover': (_details: SeatHoverDetails | null) => true,\n /** The buyer access session lapsed; `refreshed` says whether it recovered. */\n 'access-expired': (_event: BuyerAccessExpiredEvent) => true,\n /** Private inventory is unavailable and refreshing will not fix it. */\n 'access-unavailable': (_event: BuyerAccessUnavailableEvent) => true,\n /** Selected-but-unheld units stopped being selectable. */\n 'selected-object-unavailable': (_event: SelectedObjectUnavailableEvent) => true,\n },\n\n setup(props, { emit, expose }) {\n const container: Ref<HTMLDivElement | null> = ref(null);\n // shallowRef: the chart owns a canvas and a large scene graph, and making it\n // deeply reactive would have Vue walk all of it on every touch.\n const chart = shallowRef<CoreSeatingChart | null>(null);\n\n const destroy = () => {\n chart.value?.destroy();\n chart.value = null;\n };\n\n const build = () => {\n const element = container.value;\n if (!element) return;\n\n destroy();\n\n // Handlers are bound here rather than inline in the options literal.\n // Inline, TypeScript has to resolve `emit`'s overloads while it is still\n // contextually typing the literal against SeatingChartOptions, and it\n // gives up — collapsing to the last emit signature. Naming them first\n // separates the two inference problems, and reads better besides.\n const onSelectionChange = (seats: SelectedSeat[]) => emit('selection-change', seats);\n const onSelectionValidityChange = (state: PickerSelectionValidity) => emit('selection-validity-change', state);\n const onSelectionValid = (seats: SelectedSeat[]) => emit('selection-valid', seats);\n const onSelectionInvalid = (state: PickerSelectionValidity) => emit('selection-invalid', state);\n const onSelectionLimit = (max: number) => emit('selection-limit', max);\n const onHold = (result: HoldResult) => emit('hold', result);\n const onHoldRestored = (result: HoldResult) => emit('hold-restored', result);\n const onHoldExpired = () => emit('hold-expired');\n const onGAClick = (area: GAAreaAvailability) => emit('ga-click', area);\n const onError = (error: unknown) => emit('error', error);\n const onDeckTap = (floorId: string) => emit('deck-tap', floorId);\n const onHint = (message: string | null) => emit('hint', message);\n const onSeatHover = (details: SeatHoverDetails | null) => emit('seat-hover', details);\n const onAccessExpired = (state: BuyerAccessExpiredEvent) => emit('access-expired', state);\n const onAccessUnavailable = (state: BuyerAccessUnavailableEvent) =>\n emit('access-unavailable', state);\n const onSelectedObjectUnavailable = (state: SelectedObjectUnavailableEvent) =>\n emit('selected-object-unavailable', state);\n\n const instance = new CoreSeatingChart(buildSeatingChartOptions(\n element,\n {\n event: props.event,\n apiBase: props.apiBase,\n maxSelection: props.maxSelection,\n selectedObjects: props.selectedObjects,\n selectableObjects: props.selectableObjects,\n numberOfPlacesToSelect: props.numberOfPlacesToSelect,\n selectionValidators: props.selectionValidators,\n publicKey: props.publicKey,\n locale: props.locale,\n currency: props.currency,\n colorblindSafe: props.colorblindSafe,\n initialView: props.initialView,\n errorDisplay: props.errorDisplay,\n messages: props.messages,\n seatTooltip: props.seatTooltip,\n buyerAccessTokenProvider: props.buyerAccessTokenProvider,\n buyerAccessToken: props.buyerAccessToken,\n },\n {\n onAccessExpired,\n onAccessUnavailable,\n onSelectedObjectUnavailable,\n onSelectionChange,\n onSelectionValidityChange,\n onSelectionValid,\n onSelectionInvalid,\n onSelectionLimit,\n onHold,\n onHoldRestored,\n onHoldExpired,\n onGAClick,\n onError,\n onDeckTap,\n onHint,\n onSeatHover,\n },\n ));\n\n chart.value = instance;\n void instance.render();\n };\n\n // `flush: 'post'` so the container element exists on the first run — a\n // pre-flush watcher would fire before the DOM node is attached.\n watch(\n () => [\n container.value,\n // The shared identity list, not a hand-copied one — this is exactly the\n // place Vue fell two props behind React.\n ...SEATING_CHART_IDENTITY_PROPS.map((prop) => props[prop]),\n ],\n build,\n { immediate: true, flush: 'post' },\n );\n\n onBeforeUnmount(destroy);\n\n // Built once and read live: the handle must survive every rebuild, so it\n // asks for the current instance on each call rather than capturing one.\n const exposed: SeatingChartExposed = bindSeatingChartHandle(() => chart.value);\n expose(exposed);\n\n return () => h('div', { ref: container });\n },\n});\n","import {\n defineComponent,\n h,\n onBeforeUnmount,\n ref,\n shallowRef,\n watch,\n type PropType,\n type Ref,\n} from 'vue';\nimport {\n SeasonPicker as CoreSeasonPicker,\n type SeasonAvailability,\n type SeasonCheckoutHandoff,\n type SeasonDescriptor,\n type SeasonPickerOptions,\n type SeasonRenewalIntent,\n type SeasonStatusEvent,\n} from '@seatlayer/js';\n\n/** Imperative controls exposed through a Vue template ref. */\nexport interface SeasonPickerExposed {\n holdSameSeat(labels: readonly string[], operationId: string): Promise<SeasonCheckoutHandoff>;\n restoreOperation(operationId: string): Promise<SeasonCheckoutHandoff | null>;\n release(releaseActionId: string): Promise<void>;\n createRenewalIntent(offerId: string): Promise<SeasonRenewalIntent>;\n getDescriptor(): SeasonDescriptor | null;\n getAvailability(): SeasonAvailability | null;\n getHandoff(): SeasonCheckoutHandoff | null;\n}\n\n/** Vue lifecycle adapter for the distinct fixed-inclusion Season buyer flow. */\nexport const SeasonPicker = defineComponent({\n name: 'SeatLayerSeasonPicker',\n props: {\n season: { type: String, required: true },\n apiBase: { type: String, default: undefined },\n publicKey: { type: String, default: undefined },\n checkout: {\n type: String as PropType<SeasonPickerOptions['checkout']>,\n default: undefined,\n },\n returnUrl: { type: String, default: undefined },\n buyerAccessTokenProvider: {\n type: Function as PropType<SeasonPickerOptions['buyerAccessTokenProvider']>,\n default: undefined,\n },\n buyerAccessToken: {\n type: [String, Object] as PropType<SeasonPickerOptions['buyerAccessToken']>,\n default: undefined,\n },\n initialOperationId: { type: String, default: undefined },\n recoveryTimeoutMs: { type: Number, default: undefined },\n fetch: { type: Function as PropType<typeof fetch>, default: undefined },\n },\n emits: {\n hold: (_handoff: SeasonCheckoutHandoff) => true,\n 'hold-change': (_handoff: SeasonCheckoutHandoff | null) => true,\n continue: (_handoff: SeasonCheckoutHandoff) => true,\n 'renewal-intent': (_intent: SeasonRenewalIntent) => true,\n 'access-expired': (_event: unknown) => true,\n 'access-unavailable': (_event: unknown) => true,\n 'order-confirmed': (_order: unknown) => true,\n 'status-change': (_event: SeasonStatusEvent) => true,\n error: (_error: unknown) => true,\n },\n setup(props, { emit, expose }) {\n const container: Ref<HTMLDivElement | null> = ref(null);\n const picker = shallowRef<CoreSeasonPicker | null>(null);\n\n const destroy = () => {\n picker.value?.destroy();\n picker.value = null;\n };\n const build = () => {\n const element = container.value;\n if (!element) return;\n destroy();\n const instance = new CoreSeasonPicker({\n container: element,\n season: props.season,\n apiBase: props.apiBase,\n publicKey: props.publicKey,\n checkout: props.checkout,\n returnUrl: props.returnUrl,\n buyerAccessTokenProvider: props.buyerAccessTokenProvider,\n buyerAccessToken: props.buyerAccessToken,\n initialOperationId: props.initialOperationId,\n recoveryTimeoutMs: props.recoveryTimeoutMs,\n fetch: props.fetch,\n onHold: (handoff) => emit('hold', handoff),\n onHoldChange: (handoff) => emit('hold-change', handoff),\n onContinue: (handoff) => emit('continue', handoff),\n onRenewalIntent: (intent) => emit('renewal-intent', intent),\n onAccessExpired: (event) => emit('access-expired', event),\n onAccessUnavailable: (event) => emit('access-unavailable', event),\n onOrderConfirmed: (order) => emit('order-confirmed', order),\n onStatusChange: (event) => emit('status-change', event),\n onError: (error) => emit('error', error),\n });\n picker.value = instance;\n void instance.render().catch(() => undefined);\n };\n\n watch(\n () => [\n container.value,\n props.season,\n props.apiBase,\n props.publicKey,\n props.checkout,\n props.returnUrl,\n props.buyerAccessTokenProvider,\n props.buyerAccessToken,\n props.initialOperationId,\n props.recoveryTimeoutMs,\n props.fetch,\n ],\n build,\n { immediate: true, flush: 'post' },\n );\n onBeforeUnmount(destroy);\n\n const current = (): CoreSeasonPicker => {\n if (!picker.value) throw new Error('seatlayer: Vue SeasonPicker is not mounted');\n return picker.value;\n };\n const exposed: SeasonPickerExposed = {\n holdSameSeat: (labels, operationId) => current().holdSameSeat(labels, operationId),\n restoreOperation: (operationId) => current().restoreOperation(operationId),\n release: (releaseActionId) => current().release(releaseActionId),\n createRenewalIntent: (offerId) => current().createRenewalIntent(offerId),\n getDescriptor: () => picker.value?.getDescriptor() ?? null,\n getAvailability: () => picker.value?.getAvailability() ?? null,\n getHandoff: () => picker.value?.getHandoff() ?? null,\n };\n expose(exposed);\n return () => h('div', { ref: container });\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,iBASO;AACP,gBAoBO;AA4CA,IAAM,mBAAe,4BAAgB;AAAA,EAC1C,MAAM;AAAA,EA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QAAQ;AACf,WAAK,SAAS,OAAO,EAAE,MAAM,MAAM,MAAS;AAAA,IAC9C;AAEA;AAAA,MACE,MAAM;AAAA,QACJ,UAAU;AAAA,QACV,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA;AAAA,MACA,EAAE,WAAW,MAAM,OAAO,OAAO;AAAA,IACnC;AACA,qCAAgB,OAAO;AAEvB,UAAM,UAAU,MAAwB;AACtC,UAAI,CAAC,OAAO,MAAO,OAAM,IAAI,MAAM,4CAA4C;AAC/E,aAAO,OAAO;AAAA,IAChB;AACA,UAAM,UAA+B;AAAA,MACnC,cAAc,CAAC,QAAQ,gBAAgB,QAAQ,EAAE,aAAa,QAAQ,WAAW;AAAA,MACjF,kBAAkB,CAAC,gBAAgB,QAAQ,EAAE,iBAAiB,WAAW;AAAA,MACzE,SAAS,CAAC,oBAAoB,QAAQ,EAAE,QAAQ,eAAe;AAAA,MAC/D,qBAAqB,CAAC,YAAY,QAAQ,EAAE,oBAAoB,OAAO;AAAA,MACvE,eAAe,MAAM,OAAO,OAAO,cAAc,KAAK;AAAA,MACtD,iBAAiB,MAAM,OAAO,OAAO,gBAAgB,KAAK;AAAA,MAC1D,YAAY,MAAM,OAAO,OAAO,WAAW,KAAK;AAAA,IAClD;AACA,WAAO,OAAO;AACd,WAAO,UAAM,eAAE,OAAO,EAAE,KAAK,UAAU,CAAC;AAAA,EAC1C;AACF,CAAC;;;AFnGD,IAAAC,aAA+C;AAK/C,IAAAA,aAAkC;","names":["CoreSeatingChart","import_vue","import_js","CoreSeasonPicker","import_js"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/SeatingChart.ts","../src/SeasonPicker.ts"],"sourcesContent":["/**\n * @seatlayer/vue — the Vue 3 wrapper for the SeatLayer embed SDK.\n *\n * Components are written as render functions rather than SFCs, so installing\n * this package needs no Vue compiler plugin.\n */\nexport { SeatingChart } from './SeatingChart';\nexport type { SeatingChartExposed } from './SeatingChart';\nexport { SeasonPicker } from './SeasonPicker';\nexport type { SeasonPickerExposed } from './SeasonPicker';\n\nexport type {\n SelectedSeat,\n HoldResult,\n BestAvailableResult,\n GAAreaAvailability,\n HoldLineItem,\n SeatHoverDetails,\n SeasonAvailability,\n SeasonBestAvailableOptions,\n SeasonCheckoutHandoff,\n SeasonCheckoutSeat,\n SeasonDescriptor,\n SeasonOperation,\n SeasonOperationState,\n SeasonPickerOptions,\n SeasonPriceType,\n SeasonRenewalIntent,\n SeasonSeatPriceTypes,\n SeasonStatusEvent,\n} from '@seatlayer/js';\n\n// Sales Channels — buyer access sessions for private channel inventory.\nexport type {\n BuyerAccessToken,\n BuyerAccessTokenProvider,\n BuyerAccessRefreshReason,\n BuyerAccessUnavailableReason,\n BuyerAccessExpiredEvent,\n BuyerAccessUnavailableEvent,\n SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n\n// The framework-agnostic widget class — for the one-call modal (SeatPickerWidget.open()).\nexport { SeatPicker as SeatPickerWidget } from '@seatlayer/js';\n\n// Host-side embed helper: grows the iframe on `seatlayer:height` and pins it on\n// `seatlayer:fullscreen`. Vue hosts depend on this package alone, so it has to be\n// reachable here rather than only from @seatlayer/js.\nexport { attachPickerFrame } from '@seatlayer/js';\nexport type { AttachPickerFrameOptions } from '@seatlayer/js';\n","import {\n defineComponent,\n h,\n onBeforeUnmount,\n ref,\n shallowRef,\n watch,\n type PropType,\n type Ref,\n} from 'vue';\nimport {\n SeatingChart as CoreSeatingChart,\n SEATING_CHART_IDENTITY_PROPS,\n bindSeatingChartHandle,\n buildSeatingChartOptions,\n type RendererViewMode,\n type SeatingChartHandle,\n type SeatingChartOptions,\n type SelectedSeat,\n type HoldResult,\n type BestAvailableResult,\n type GAAreaAvailability,\n type SeatHoverDetails,\n type PickerSelectionValidity,\n type PickerSelectionValidator,\n type BuyerAccessToken,\n type BuyerAccessTokenProvider,\n type BuyerAccessExpiredEvent,\n type BuyerAccessUnavailableEvent,\n type SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n\n/**\n * What `ref=\"chart\"` gives you — call these to drive the picker from your app.\n *\n * Vue exposes these through `defineExpose`, so a template ref is typed as this\n * rather than as the raw component instance. It is the shared\n * `SeatingChartHandle` from `@seatlayer/js`: the same 17 methods React's `ref`\n * and Angular's component expose, from one declaration, so the three wrappers\n * cannot drift apart again.\n */\nexport type SeatingChartExposed = SeatingChartHandle;\n\n/**\n * Vue 3 wrapper around the framework-agnostic `@seatlayer/js` SDK.\n *\n * The canvas is created once and torn down on unmount. Only the props that\n * change the chart's identity (`SEATING_CHART_IDENTITY_PROPS`: `event`,\n * `apiBase`, `maxSelection`, `numberOfPlacesToSelect`, `publicKey`, `locale`, `currency`,\n * `colorblindSafe`, `initialView`, `errorDisplay`) trigger a rebuild;\n * everything else is read live, so a parent re-render never destroys the canvas\n * mid-selection.\n *\n * Written as a render function rather than an SFC so the package builds with\n * plain TypeScript — a consumer needs no Vue compiler plugin to install it.\n *\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { ref } from 'vue';\n * import { SeatingChart, type SeatingChartExposed } from '@seatlayer/vue';\n *\n * const chart = ref<SeatingChartExposed | null>(null);\n * const checkout = async () => {\n * const held = await chart.value?.hold();\n * if (held) await pay(held.holdId);\n * };\n * </script>\n *\n * <template>\n * <SeatingChart ref=\"chart\" event=\"summer-gala\" @selection-change=\"onChange\" />\n * </template>\n * ```\n */\nexport const SeatingChart = defineComponent({\n name: 'SeatLayerSeatingChart',\n\n props: {\n /** Event key to render. Changing it rebuilds the chart. */\n event: { type: String, required: true },\n /** API base URL. Defaults to the public API. */\n apiBase: { type: String, default: undefined },\n /** Cap on how many seats a buyer may select. */\n maxSelection: { type: Number, default: undefined },\n /** Object ids or public labels selected after availability loads. */\n selectedObjects: { type: Array as PropType<string[]>, default: undefined },\n /** Object ids or public labels the buyer may select. */\n selectableObjects: { type: Array as PropType<string[] | null>, default: undefined },\n /** Exact ticket count required for a valid selection. */\n numberOfPlacesToSelect: { type: Number, default: undefined },\n /** Local buyer selection guards. Changing them rebuilds the chart. */\n selectionValidators: { type: Array as PropType<PickerSelectionValidator[]>, default: undefined },\n /** Publishable key, when your integration uses one. */\n publicKey: { type: String, default: undefined },\n /** BCP-47 locale for built-in copy. */\n locale: { type: String, default: undefined },\n /** ISO currency for price formatting. */\n currency: { type: String, default: undefined },\n /** Render with colorblind-safe seat glyphs. */\n colorblindSafe: { type: Boolean, default: undefined },\n /**\n * Initial canvas projection. Read once when the chart is built, so\n * changing it rebuilds.\n * @deprecated `'isometric'` and `'perspective'` are retired in favour of\n * the real 3D venue view; use `'flat'`.\n */\n initialView: {\n type: String as PropType<RendererViewMode>,\n default: undefined,\n },\n /**\n * What the BUYER sees when the chart cannot load: `'message'` (default) is\n * a styleable notice with a Try again button, `'none'` is silent for hosts\n * that render their own failure UI from the `error` event.\n */\n errorDisplay: {\n type: String as PropType<'message' | 'none'>,\n default: undefined,\n },\n /** Copy overrides, read once per mount. */\n messages: {\n type: Object as PropType<SeatingChartOptions['messages']>,\n default: undefined,\n },\n /**\n * Show the built-in seat tooltip. Set false to draw your own popover from\n * the `seat-hover` event.\n */\n seatTooltip: { type: Boolean, default: undefined },\n /**\n * Sales Channels: mint a buyer access session on demand. Called with a\n * `reason`; returns `{ token, expiresAt }` from YOUR backend. The token is\n * held in memory only — never storage, never a URL, never a log.\n */\n buyerAccessTokenProvider: {\n type: Function as PropType<BuyerAccessTokenProvider>,\n default: undefined,\n },\n /** One-shot session for hosts that own the lifecycle. Cannot be renewed. */\n buyerAccessToken: {\n type: [String, Object] as PropType<string | BuyerAccessToken>,\n default: undefined,\n },\n },\n\n emits: {\n /** The buyer's selection changed. */\n 'selection-change': (_seats: SelectedSeat[]) => true,\n /** Exact-count state changed. */\n 'selection-validity-change': (_state: PickerSelectionValidity) => true,\n /** The exact count was reached. */\n 'selection-valid': (_seats: SelectedSeat[]) => true,\n /** The selection is not at the exact count. */\n 'selection-invalid': (_state: PickerSelectionValidity) => true,\n /** The active selection cap was reached. */\n 'selection-limit': (_max: number) => true,\n /** A hold succeeded. */\n hold: (_result: HoldResult) => true,\n /** A previous hold was restored on mount. */\n 'hold-restored': (_result: HoldResult) => true,\n /** The active hold lapsed. */\n 'hold-expired': () => true,\n /** A GA area was clicked. */\n 'ga-click': (_area: GAAreaAvailability) => true,\n /** Something failed — a network error, a rejected hold. */\n error: (_error: unknown) => true,\n /** A floor deck was tapped in the 3D view. */\n 'deck-tap': (_floorId: string) => true,\n /** A transient hint worth showing the buyer, or `null` to clear it. */\n hint: (_message: string | null) => true,\n /** The pointer moved onto a seat, or off one (`null`). */\n 'seat-hover': (_details: SeatHoverDetails | null) => true,\n /** The buyer access session lapsed; `refreshed` says whether it recovered. */\n 'access-expired': (_event: BuyerAccessExpiredEvent) => true,\n /** Private inventory is unavailable and refreshing will not fix it. */\n 'access-unavailable': (_event: BuyerAccessUnavailableEvent) => true,\n /** Selected-but-unheld units stopped being selectable. */\n 'selected-object-unavailable': (_event: SelectedObjectUnavailableEvent) => true,\n },\n\n setup(props, { emit, expose }) {\n const container: Ref<HTMLDivElement | null> = ref(null);\n // shallowRef: the chart owns a canvas and a large scene graph, and making it\n // deeply reactive would have Vue walk all of it on every touch.\n const chart = shallowRef<CoreSeatingChart | null>(null);\n\n const destroy = () => {\n chart.value?.destroy();\n chart.value = null;\n };\n\n const build = () => {\n const element = container.value;\n if (!element) return;\n\n destroy();\n\n // Handlers are bound here rather than inline in the options literal.\n // Inline, TypeScript has to resolve `emit`'s overloads while it is still\n // contextually typing the literal against SeatingChartOptions, and it\n // gives up — collapsing to the last emit signature. Naming them first\n // separates the two inference problems, and reads better besides.\n const onSelectionChange = (seats: SelectedSeat[]) => emit('selection-change', seats);\n const onSelectionValidityChange = (state: PickerSelectionValidity) => emit('selection-validity-change', state);\n const onSelectionValid = (seats: SelectedSeat[]) => emit('selection-valid', seats);\n const onSelectionInvalid = (state: PickerSelectionValidity) => emit('selection-invalid', state);\n const onSelectionLimit = (max: number) => emit('selection-limit', max);\n const onHold = (result: HoldResult) => emit('hold', result);\n const onHoldRestored = (result: HoldResult) => emit('hold-restored', result);\n const onHoldExpired = () => emit('hold-expired');\n const onGAClick = (area: GAAreaAvailability) => emit('ga-click', area);\n const onError = (error: unknown) => emit('error', error);\n const onDeckTap = (floorId: string) => emit('deck-tap', floorId);\n const onHint = (message: string | null) => emit('hint', message);\n const onSeatHover = (details: SeatHoverDetails | null) => emit('seat-hover', details);\n const onAccessExpired = (state: BuyerAccessExpiredEvent) => emit('access-expired', state);\n const onAccessUnavailable = (state: BuyerAccessUnavailableEvent) =>\n emit('access-unavailable', state);\n const onSelectedObjectUnavailable = (state: SelectedObjectUnavailableEvent) =>\n emit('selected-object-unavailable', state);\n\n const instance = new CoreSeatingChart(buildSeatingChartOptions(\n element,\n {\n event: props.event,\n apiBase: props.apiBase,\n maxSelection: props.maxSelection,\n selectedObjects: props.selectedObjects,\n selectableObjects: props.selectableObjects,\n numberOfPlacesToSelect: props.numberOfPlacesToSelect,\n selectionValidators: props.selectionValidators,\n publicKey: props.publicKey,\n locale: props.locale,\n currency: props.currency,\n colorblindSafe: props.colorblindSafe,\n initialView: props.initialView,\n errorDisplay: props.errorDisplay,\n messages: props.messages,\n seatTooltip: props.seatTooltip,\n buyerAccessTokenProvider: props.buyerAccessTokenProvider,\n buyerAccessToken: props.buyerAccessToken,\n },\n {\n onAccessExpired,\n onAccessUnavailable,\n onSelectedObjectUnavailable,\n onSelectionChange,\n onSelectionValidityChange,\n onSelectionValid,\n onSelectionInvalid,\n onSelectionLimit,\n onHold,\n onHoldRestored,\n onHoldExpired,\n onGAClick,\n onError,\n onDeckTap,\n onHint,\n onSeatHover,\n },\n ));\n\n chart.value = instance;\n void instance.render();\n };\n\n // `flush: 'post'` so the container element exists on the first run — a\n // pre-flush watcher would fire before the DOM node is attached.\n watch(\n () => [\n container.value,\n // The shared identity list, not a hand-copied one — this is exactly the\n // place Vue fell two props behind React.\n ...SEATING_CHART_IDENTITY_PROPS.map((prop) => props[prop]),\n ],\n build,\n { immediate: true, flush: 'post' },\n );\n\n onBeforeUnmount(destroy);\n\n // Built once and read live: the handle must survive every rebuild, so it\n // asks for the current instance on each call rather than capturing one.\n const exposed: SeatingChartExposed = bindSeatingChartHandle(() => chart.value);\n expose(exposed);\n\n return () => h('div', { ref: container });\n },\n});\n","import {\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n ref,\n shallowRef,\n watch,\n type PropType,\n type Ref,\n} from 'vue';\nimport {\n SeasonPicker as CoreSeasonPicker,\n type SeasonAvailability,\n type SeasonBestAvailableOptions,\n type SeasonCheckoutHandoff,\n type SeasonDescriptor,\n type SeasonPickerOptions,\n type SeasonPriceType,\n type SeasonRenewalIntent,\n type SeasonSeatPriceTypes,\n type SeasonStatusEvent,\n} from '@seatlayer/js';\n\n/** Imperative controls exposed through a Vue template ref. */\nexport interface SeasonPickerExposed {\n /**\n * Holds the same labels for every included performance. `priceTypes` names\n * each seat's price type by label (`{ 'A-2': 'child' }`); a label it leaves\n * out is adult. Same contract as `@seatlayer/js` `holdSameSeat`.\n */\n holdSameSeat(\n labels: readonly string[], operationId: string, priceTypes?: SeasonSeatPriceTypes,\n ): Promise<SeasonCheckoutHandoff>;\n /**\n * Holds the best `qty` seats free on every included performance, as a map\n * selection would. Same contract as `@seatlayer/js` `holdBestAvailable`: a\n * caller-stable `sop_` id, 1 to `maxSelection` seats, one call at a time.\n */\n holdBestAvailable(\n qty: number, operationId: string, options?: SeasonBestAvailableOptions,\n ): Promise<SeasonCheckoutHandoff>;\n restoreOperation(operationId: string): Promise<SeasonCheckoutHandoff | null>;\n /** Your server booked the held seats: show booked and stop the hold clock. */\n markBooked(): Promise<boolean>;\n release(releaseActionId: string): Promise<void>;\n createRenewalIntent(offerId: string): Promise<SeasonRenewalIntent>;\n getDescriptor(): SeasonDescriptor | null;\n getAvailability(): SeasonAvailability | null;\n getHandoff(): SeasonCheckoutHandoff | null;\n}\n\n/** Vue lifecycle adapter for the distinct fixed-inclusion Season buyer flow. */\nexport const SeasonPicker = defineComponent({\n name: 'SeatLayerSeasonPicker',\n props: {\n season: { type: String, required: true },\n apiBase: { type: String, default: undefined },\n publicKey: { type: String, default: undefined },\n checkout: {\n type: String as PropType<SeasonPickerOptions['checkout']>,\n default: undefined,\n },\n returnUrl: { type: String, default: undefined },\n buyerEmail: { type: String, default: undefined },\n buyerName: { type: String, default: undefined },\n buyerAccessTokenProvider: {\n type: Function as PropType<SeasonPickerOptions['buyerAccessTokenProvider']>,\n default: undefined,\n },\n buyerAccessToken: {\n type: [String, Object] as PropType<SeasonPickerOptions['buyerAccessToken']>,\n default: undefined,\n },\n initialOperationId: { type: String, default: undefined },\n /** The package to open on, by its key; the first package without it. */\n package: { type: String, default: undefined },\n /** The host emails a ticket per date itself: step 1 says so. */\n ticketsByEmail: { type: Boolean, default: undefined },\n recoveryTimeoutMs: { type: Number, default: undefined },\n fetch: { type: Function as PropType<typeof fetch>, default: undefined },\n /**\n * The price types the picker sells, e.g. `['adult', 'child']`. With a type\n * besides adult, the buyer chooses one per seat before the hold.\n */\n priceTypes: {\n type: Array as PropType<readonly SeasonPriceType[]>,\n default: undefined,\n },\n },\n emits: {\n hold: (_handoff: SeasonCheckoutHandoff) => true,\n 'hold-change': (_handoff: SeasonCheckoutHandoff | null) => true,\n continue: (_handoff: SeasonCheckoutHandoff) => true,\n 'renewal-intent': (_intent: SeasonRenewalIntent) => true,\n 'access-expired': (_event: unknown) => true,\n 'access-unavailable': (_event: unknown) => true,\n 'order-confirmed': (_order: unknown) => true,\n 'status-change': (_event: SeasonStatusEvent) => true,\n error: (_error: unknown) => true,\n },\n setup(props, { emit, expose }) {\n const container: Ref<HTMLDivElement | null> = ref(null);\n const picker = shallowRef<CoreSeasonPicker | null>(null);\n // By content, so an inline `:price-types=\"['adult', 'child']\"` does not\n // rebuild the picker on every parent render (a computed only notifies the\n // watch below when its value changes).\n const priceTypesKey = computed(() => (props.priceTypes ?? []).join(','));\n\n const destroy = () => {\n picker.value?.destroy();\n picker.value = null;\n };\n const build = () => {\n const element = container.value;\n if (!element) return;\n destroy();\n const instance = new CoreSeasonPicker({\n container: element,\n season: props.season,\n apiBase: props.apiBase,\n publicKey: props.publicKey,\n checkout: props.checkout,\n returnUrl: props.returnUrl,\n buyerEmail: props.buyerEmail,\n buyerName: props.buyerName,\n buyerAccessTokenProvider: props.buyerAccessTokenProvider,\n buyerAccessToken: props.buyerAccessToken,\n initialOperationId: props.initialOperationId,\n package: props.package,\n ticketsByEmail: props.ticketsByEmail,\n recoveryTimeoutMs: props.recoveryTimeoutMs,\n fetch: props.fetch,\n priceTypes: props.priceTypes,\n onHold: (handoff) => emit('hold', handoff),\n onHoldChange: (handoff) => emit('hold-change', handoff),\n onContinue: (handoff) => emit('continue', handoff),\n onRenewalIntent: (intent) => emit('renewal-intent', intent),\n onAccessExpired: (event) => emit('access-expired', event),\n onAccessUnavailable: (event) => emit('access-unavailable', event),\n onOrderConfirmed: (order) => emit('order-confirmed', order),\n onStatusChange: (event) => emit('status-change', event),\n onError: (error) => emit('error', error),\n });\n picker.value = instance;\n void instance.render().catch(() => undefined);\n };\n\n watch(\n () => [\n container.value,\n props.season,\n props.apiBase,\n props.publicKey,\n props.checkout,\n props.returnUrl,\n props.buyerAccessTokenProvider,\n props.buyerAccessToken,\n props.initialOperationId,\n props.package,\n props.ticketsByEmail,\n props.recoveryTimeoutMs,\n props.fetch,\n priceTypesKey.value,\n ],\n build,\n { immediate: true, flush: 'post' },\n );\n onBeforeUnmount(destroy);\n\n const current = (): CoreSeasonPicker => {\n if (!picker.value) throw new Error('seatlayer: Vue SeasonPicker is not mounted');\n return picker.value;\n };\n const exposed: SeasonPickerExposed = {\n holdSameSeat: (labels, operationId, priceTypes) => current().holdSameSeat(labels, operationId, priceTypes),\n holdBestAvailable: (qty, operationId, options) => current().holdBestAvailable(qty, operationId, options),\n restoreOperation: (operationId) => current().restoreOperation(operationId),\n markBooked: () => current().markBooked(),\n release: (releaseActionId) => current().release(releaseActionId),\n createRenewalIntent: (offerId) => current().createRenewalIntent(offerId),\n getDescriptor: () => picker.value?.getDescriptor() ?? null,\n getAvailability: () => picker.value?.getAvailability() ?? null,\n getHandoff: () => picker.value?.getHandoff() ?? null,\n };\n expose(exposed);\n return () => h('div', { ref: container });\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,iBASO;AACP,gBAoBO;AA4CA,IAAM,mBAAe,4BAAgB;AAAA,EAC1C,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA,IAEL,OAAO,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA;AAAA,IAEtC,SAAS,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAE5C,cAAc,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAEjD,iBAAiB,EAAE,MAAM,OAA6B,SAAS,OAAU;AAAA;AAAA,IAEzE,mBAAmB,EAAE,MAAM,OAAoC,SAAS,OAAU;AAAA;AAAA,IAElF,wBAAwB,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAE3D,qBAAqB,EAAE,MAAM,OAA+C,SAAS,OAAU;AAAA;AAAA,IAE/F,WAAW,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAE9C,QAAQ,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAE3C,UAAU,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAE7C,gBAAgB,EAAE,MAAM,SAAS,SAAS,OAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOpD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAM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AAA,QACN,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAChB;AAAA,MACA;AAAA,MACA,EAAE,WAAW,MAAM,OAAO,OAAO;AAAA,IACnC;AACA,qCAAgB,OAAO;AAEvB,UAAM,UAAU,MAAwB;AACtC,UAAI,CAAC,OAAO,MAAO,OAAM,IAAI,MAAM,4CAA4C;AAC/E,aAAO,OAAO;AAAA,IAChB;AACA,UAAM,UAA+B;AAAA,MACnC,cAAc,CAAC,QAAQ,aAAa,eAAe,QAAQ,EAAE,aAAa,QAAQ,aAAa,UAAU;AAAA,MACzG,mBAAmB,CAAC,KAAK,aAAa,YAAY,QAAQ,EAAE,kBAAkB,KAAK,aAAa,OAAO;AAAA,MACvG,kBAAkB,CAAC,gBAAgB,QAAQ,EAAE,iBAAiB,WAAW;AAAA,MACzE,YAAY,MAAM,QAAQ,EAAE,WAAW;AAAA,MACvC,SAAS,CAAC,oBAAoB,QAAQ,EAAE,QAAQ,eAAe;AAAA,MAC/D,qBAAqB,CAAC,YAAY,QAAQ,EAAE,oBAAoB,OAAO;AAAA,MACvE,eAAe,MAAM,OAAO,OAAO,cAAc,KAAK;AAAA,MACtD,iBAAiB,MAAM,OAAO,OAAO,gBAAgB,KAAK;AAAA,MAC1D,YAAY,MAAM,OAAO,OAAO,WAAW,KAAK;AAAA,IAClD;AACA,WAAO,OAAO;AACd,WAAO,UAAM,eAAE,OAAO,EAAE,KAAK,UAAU,CAAC;AAAA,EAC1C;AACF,CAAC;;;AFhJD,IAAAC,aAA+C;AAK/C,IAAAA,aAAkC;","names":["CoreSeatingChart","import_vue","import_js","CoreSeasonPicker","import_js"]}
package/dist/index.d.cts CHANGED
@@ -2,8 +2,8 @@ import * as _seatlayer_core from '@seatlayer/core';
2
2
  import * as vue from 'vue';
3
3
  import { PropType } from 'vue';
4
4
  import * as _seatlayer_js from '@seatlayer/js';
5
- import { PickerSelectionValidator, RendererViewMode, SeatingChartOptions, BuyerAccessTokenProvider, BuyerAccessToken, SelectedSeat, PickerSelectionValidity, HoldResult, GAAreaAvailability, SeatHoverDetails, BuyerAccessExpiredEvent, BuyerAccessUnavailableEvent, SelectedObjectUnavailableEvent, SeatingChartHandle, SeasonPickerOptions, SeasonCheckoutHandoff, SeasonRenewalIntent, SeasonStatusEvent, SeasonDescriptor, SeasonAvailability } from '@seatlayer/js';
6
- export { AttachPickerFrameOptions, BestAvailableResult, BuyerAccessExpiredEvent, BuyerAccessRefreshReason, BuyerAccessToken, BuyerAccessTokenProvider, BuyerAccessUnavailableEvent, BuyerAccessUnavailableReason, GAAreaAvailability, HoldLineItem, HoldResult, SeasonAvailability, SeasonCheckoutHandoff, SeasonDescriptor, SeasonOperation, SeasonOperationState, SeasonPickerOptions, SeasonRenewalIntent, SeasonStatusEvent, SeatHoverDetails, SeatPicker as SeatPickerWidget, SelectedObjectUnavailableEvent, SelectedSeat, attachPickerFrame } from '@seatlayer/js';
5
+ import { PickerSelectionValidator, RendererViewMode, SeatingChartOptions, BuyerAccessTokenProvider, BuyerAccessToken, SelectedSeat, PickerSelectionValidity, HoldResult, GAAreaAvailability, SeatHoverDetails, BuyerAccessExpiredEvent, BuyerAccessUnavailableEvent, SelectedObjectUnavailableEvent, SeatingChartHandle, SeasonPickerOptions, SeasonPriceType, SeasonCheckoutHandoff, SeasonRenewalIntent, SeasonStatusEvent, SeasonSeatPriceTypes, SeasonBestAvailableOptions, SeasonDescriptor, SeasonAvailability } from '@seatlayer/js';
6
+ export { AttachPickerFrameOptions, BestAvailableResult, BuyerAccessExpiredEvent, BuyerAccessRefreshReason, BuyerAccessToken, BuyerAccessTokenProvider, BuyerAccessUnavailableEvent, BuyerAccessUnavailableReason, GAAreaAvailability, HoldLineItem, HoldResult, SeasonAvailability, SeasonBestAvailableOptions, SeasonCheckoutHandoff, SeasonCheckoutSeat, SeasonDescriptor, SeasonOperation, SeasonOperationState, SeasonPickerOptions, SeasonPriceType, SeasonRenewalIntent, SeasonSeatPriceTypes, SeasonStatusEvent, SeatHoverDetails, SeatPicker as SeatPickerWidget, SelectedObjectUnavailableEvent, SelectedSeat, attachPickerFrame } from '@seatlayer/js';
7
7
 
8
8
  /**
9
9
  * What `ref="chart"` gives you — call these to drive the picker from your app.
@@ -323,8 +323,21 @@ declare const SeatingChart: vue.DefineComponent<vue.ExtractPropTypes<{
323
323
 
324
324
  /** Imperative controls exposed through a Vue template ref. */
325
325
  interface SeasonPickerExposed {
326
- holdSameSeat(labels: readonly string[], operationId: string): Promise<SeasonCheckoutHandoff>;
326
+ /**
327
+ * Holds the same labels for every included performance. `priceTypes` names
328
+ * each seat's price type by label (`{ 'A-2': 'child' }`); a label it leaves
329
+ * out is adult. Same contract as `@seatlayer/js` `holdSameSeat`.
330
+ */
331
+ holdSameSeat(labels: readonly string[], operationId: string, priceTypes?: SeasonSeatPriceTypes): Promise<SeasonCheckoutHandoff>;
332
+ /**
333
+ * Holds the best `qty` seats free on every included performance, as a map
334
+ * selection would. Same contract as `@seatlayer/js` `holdBestAvailable`: a
335
+ * caller-stable `sop_` id, 1 to `maxSelection` seats, one call at a time.
336
+ */
337
+ holdBestAvailable(qty: number, operationId: string, options?: SeasonBestAvailableOptions): Promise<SeasonCheckoutHandoff>;
327
338
  restoreOperation(operationId: string): Promise<SeasonCheckoutHandoff | null>;
339
+ /** Your server booked the held seats: show booked and stop the hold clock. */
340
+ markBooked(): Promise<boolean>;
328
341
  release(releaseActionId: string): Promise<void>;
329
342
  createRenewalIntent(offerId: string): Promise<SeasonRenewalIntent>;
330
343
  getDescriptor(): SeasonDescriptor | null;
@@ -353,6 +366,14 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
353
366
  type: StringConstructor;
354
367
  default: undefined;
355
368
  };
369
+ buyerEmail: {
370
+ type: StringConstructor;
371
+ default: undefined;
372
+ };
373
+ buyerName: {
374
+ type: StringConstructor;
375
+ default: undefined;
376
+ };
356
377
  buyerAccessTokenProvider: {
357
378
  type: PropType<SeasonPickerOptions["buyerAccessTokenProvider"]>;
358
379
  default: undefined;
@@ -365,6 +386,16 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
365
386
  type: StringConstructor;
366
387
  default: undefined;
367
388
  };
389
+ /** The package to open on, by its key; the first package without it. */
390
+ package: {
391
+ type: StringConstructor;
392
+ default: undefined;
393
+ };
394
+ /** The host emails a ticket per date itself: step 1 says so. */
395
+ ticketsByEmail: {
396
+ type: BooleanConstructor;
397
+ default: undefined;
398
+ };
368
399
  recoveryTimeoutMs: {
369
400
  type: NumberConstructor;
370
401
  default: undefined;
@@ -373,6 +404,14 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
373
404
  type: PropType<typeof fetch>;
374
405
  default: undefined;
375
406
  };
407
+ /**
408
+ * The price types the picker sells, e.g. `['adult', 'child']`. With a type
409
+ * besides adult, the buyer chooses one per seat before the hold.
410
+ */
411
+ priceTypes: {
412
+ type: PropType<readonly SeasonPriceType[]>;
413
+ default: undefined;
414
+ };
376
415
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
377
416
  [key: string]: any;
378
417
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
@@ -406,6 +445,14 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
406
445
  type: StringConstructor;
407
446
  default: undefined;
408
447
  };
448
+ buyerEmail: {
449
+ type: StringConstructor;
450
+ default: undefined;
451
+ };
452
+ buyerName: {
453
+ type: StringConstructor;
454
+ default: undefined;
455
+ };
409
456
  buyerAccessTokenProvider: {
410
457
  type: PropType<SeasonPickerOptions["buyerAccessTokenProvider"]>;
411
458
  default: undefined;
@@ -418,6 +465,16 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
418
465
  type: StringConstructor;
419
466
  default: undefined;
420
467
  };
468
+ /** The package to open on, by its key; the first package without it. */
469
+ package: {
470
+ type: StringConstructor;
471
+ default: undefined;
472
+ };
473
+ /** The host emails a ticket per date itself: step 1 says so. */
474
+ ticketsByEmail: {
475
+ type: BooleanConstructor;
476
+ default: undefined;
477
+ };
421
478
  recoveryTimeoutMs: {
422
479
  type: NumberConstructor;
423
480
  default: undefined;
@@ -426,6 +483,14 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
426
483
  type: PropType<typeof fetch>;
427
484
  default: undefined;
428
485
  };
486
+ /**
487
+ * The price types the picker sells, e.g. `['adult', 'child']`. With a type
488
+ * besides adult, the buyer chooses one per seat before the hold.
489
+ */
490
+ priceTypes: {
491
+ type: PropType<readonly SeasonPriceType[]>;
492
+ default: undefined;
493
+ };
429
494
  }>> & Readonly<{
430
495
  onHold?: ((_handoff: SeasonCheckoutHandoff) => any) | undefined;
431
496
  onError?: ((_error: unknown) => any) | undefined;
@@ -439,13 +504,18 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
439
504
  }>, {
440
505
  apiBase: string;
441
506
  publicKey: string;
442
- buyerAccessTokenProvider: _seatlayer_js.BuyerAccessTokenProvider | undefined;
507
+ buyerAccessTokenProvider: _seatlayer_js.SeasonAccessTokenProvider | undefined;
443
508
  buyerAccessToken: string | _seatlayer_js.BuyerAccessToken | undefined;
444
509
  checkout: "handoff" | "hosted" | undefined;
445
510
  returnUrl: string;
511
+ buyerEmail: string;
512
+ buyerName: string;
446
513
  initialOperationId: string;
514
+ package: string;
515
+ ticketsByEmail: boolean;
447
516
  recoveryTimeoutMs: number;
448
517
  fetch: typeof fetch;
518
+ priceTypes: readonly SeasonPriceType[];
449
519
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
450
520
 
451
521
  export { SeasonPicker, type SeasonPickerExposed, SeatingChart, type SeatingChartExposed };
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ import * as _seatlayer_core from '@seatlayer/core';
2
2
  import * as vue from 'vue';
3
3
  import { PropType } from 'vue';
4
4
  import * as _seatlayer_js from '@seatlayer/js';
5
- import { PickerSelectionValidator, RendererViewMode, SeatingChartOptions, BuyerAccessTokenProvider, BuyerAccessToken, SelectedSeat, PickerSelectionValidity, HoldResult, GAAreaAvailability, SeatHoverDetails, BuyerAccessExpiredEvent, BuyerAccessUnavailableEvent, SelectedObjectUnavailableEvent, SeatingChartHandle, SeasonPickerOptions, SeasonCheckoutHandoff, SeasonRenewalIntent, SeasonStatusEvent, SeasonDescriptor, SeasonAvailability } from '@seatlayer/js';
6
- export { AttachPickerFrameOptions, BestAvailableResult, BuyerAccessExpiredEvent, BuyerAccessRefreshReason, BuyerAccessToken, BuyerAccessTokenProvider, BuyerAccessUnavailableEvent, BuyerAccessUnavailableReason, GAAreaAvailability, HoldLineItem, HoldResult, SeasonAvailability, SeasonCheckoutHandoff, SeasonDescriptor, SeasonOperation, SeasonOperationState, SeasonPickerOptions, SeasonRenewalIntent, SeasonStatusEvent, SeatHoverDetails, SeatPicker as SeatPickerWidget, SelectedObjectUnavailableEvent, SelectedSeat, attachPickerFrame } from '@seatlayer/js';
5
+ import { PickerSelectionValidator, RendererViewMode, SeatingChartOptions, BuyerAccessTokenProvider, BuyerAccessToken, SelectedSeat, PickerSelectionValidity, HoldResult, GAAreaAvailability, SeatHoverDetails, BuyerAccessExpiredEvent, BuyerAccessUnavailableEvent, SelectedObjectUnavailableEvent, SeatingChartHandle, SeasonPickerOptions, SeasonPriceType, SeasonCheckoutHandoff, SeasonRenewalIntent, SeasonStatusEvent, SeasonSeatPriceTypes, SeasonBestAvailableOptions, SeasonDescriptor, SeasonAvailability } from '@seatlayer/js';
6
+ export { AttachPickerFrameOptions, BestAvailableResult, BuyerAccessExpiredEvent, BuyerAccessRefreshReason, BuyerAccessToken, BuyerAccessTokenProvider, BuyerAccessUnavailableEvent, BuyerAccessUnavailableReason, GAAreaAvailability, HoldLineItem, HoldResult, SeasonAvailability, SeasonBestAvailableOptions, SeasonCheckoutHandoff, SeasonCheckoutSeat, SeasonDescriptor, SeasonOperation, SeasonOperationState, SeasonPickerOptions, SeasonPriceType, SeasonRenewalIntent, SeasonSeatPriceTypes, SeasonStatusEvent, SeatHoverDetails, SeatPicker as SeatPickerWidget, SelectedObjectUnavailableEvent, SelectedSeat, attachPickerFrame } from '@seatlayer/js';
7
7
 
8
8
  /**
9
9
  * What `ref="chart"` gives you — call these to drive the picker from your app.
@@ -323,8 +323,21 @@ declare const SeatingChart: vue.DefineComponent<vue.ExtractPropTypes<{
323
323
 
324
324
  /** Imperative controls exposed through a Vue template ref. */
325
325
  interface SeasonPickerExposed {
326
- holdSameSeat(labels: readonly string[], operationId: string): Promise<SeasonCheckoutHandoff>;
326
+ /**
327
+ * Holds the same labels for every included performance. `priceTypes` names
328
+ * each seat's price type by label (`{ 'A-2': 'child' }`); a label it leaves
329
+ * out is adult. Same contract as `@seatlayer/js` `holdSameSeat`.
330
+ */
331
+ holdSameSeat(labels: readonly string[], operationId: string, priceTypes?: SeasonSeatPriceTypes): Promise<SeasonCheckoutHandoff>;
332
+ /**
333
+ * Holds the best `qty` seats free on every included performance, as a map
334
+ * selection would. Same contract as `@seatlayer/js` `holdBestAvailable`: a
335
+ * caller-stable `sop_` id, 1 to `maxSelection` seats, one call at a time.
336
+ */
337
+ holdBestAvailable(qty: number, operationId: string, options?: SeasonBestAvailableOptions): Promise<SeasonCheckoutHandoff>;
327
338
  restoreOperation(operationId: string): Promise<SeasonCheckoutHandoff | null>;
339
+ /** Your server booked the held seats: show booked and stop the hold clock. */
340
+ markBooked(): Promise<boolean>;
328
341
  release(releaseActionId: string): Promise<void>;
329
342
  createRenewalIntent(offerId: string): Promise<SeasonRenewalIntent>;
330
343
  getDescriptor(): SeasonDescriptor | null;
@@ -353,6 +366,14 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
353
366
  type: StringConstructor;
354
367
  default: undefined;
355
368
  };
369
+ buyerEmail: {
370
+ type: StringConstructor;
371
+ default: undefined;
372
+ };
373
+ buyerName: {
374
+ type: StringConstructor;
375
+ default: undefined;
376
+ };
356
377
  buyerAccessTokenProvider: {
357
378
  type: PropType<SeasonPickerOptions["buyerAccessTokenProvider"]>;
358
379
  default: undefined;
@@ -365,6 +386,16 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
365
386
  type: StringConstructor;
366
387
  default: undefined;
367
388
  };
389
+ /** The package to open on, by its key; the first package without it. */
390
+ package: {
391
+ type: StringConstructor;
392
+ default: undefined;
393
+ };
394
+ /** The host emails a ticket per date itself: step 1 says so. */
395
+ ticketsByEmail: {
396
+ type: BooleanConstructor;
397
+ default: undefined;
398
+ };
368
399
  recoveryTimeoutMs: {
369
400
  type: NumberConstructor;
370
401
  default: undefined;
@@ -373,6 +404,14 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
373
404
  type: PropType<typeof fetch>;
374
405
  default: undefined;
375
406
  };
407
+ /**
408
+ * The price types the picker sells, e.g. `['adult', 'child']`. With a type
409
+ * besides adult, the buyer chooses one per seat before the hold.
410
+ */
411
+ priceTypes: {
412
+ type: PropType<readonly SeasonPriceType[]>;
413
+ default: undefined;
414
+ };
376
415
  }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
377
416
  [key: string]: any;
378
417
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
@@ -406,6 +445,14 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
406
445
  type: StringConstructor;
407
446
  default: undefined;
408
447
  };
448
+ buyerEmail: {
449
+ type: StringConstructor;
450
+ default: undefined;
451
+ };
452
+ buyerName: {
453
+ type: StringConstructor;
454
+ default: undefined;
455
+ };
409
456
  buyerAccessTokenProvider: {
410
457
  type: PropType<SeasonPickerOptions["buyerAccessTokenProvider"]>;
411
458
  default: undefined;
@@ -418,6 +465,16 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
418
465
  type: StringConstructor;
419
466
  default: undefined;
420
467
  };
468
+ /** The package to open on, by its key; the first package without it. */
469
+ package: {
470
+ type: StringConstructor;
471
+ default: undefined;
472
+ };
473
+ /** The host emails a ticket per date itself: step 1 says so. */
474
+ ticketsByEmail: {
475
+ type: BooleanConstructor;
476
+ default: undefined;
477
+ };
421
478
  recoveryTimeoutMs: {
422
479
  type: NumberConstructor;
423
480
  default: undefined;
@@ -426,6 +483,14 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
426
483
  type: PropType<typeof fetch>;
427
484
  default: undefined;
428
485
  };
486
+ /**
487
+ * The price types the picker sells, e.g. `['adult', 'child']`. With a type
488
+ * besides adult, the buyer chooses one per seat before the hold.
489
+ */
490
+ priceTypes: {
491
+ type: PropType<readonly SeasonPriceType[]>;
492
+ default: undefined;
493
+ };
429
494
  }>> & Readonly<{
430
495
  onHold?: ((_handoff: SeasonCheckoutHandoff) => any) | undefined;
431
496
  onError?: ((_error: unknown) => any) | undefined;
@@ -439,13 +504,18 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
439
504
  }>, {
440
505
  apiBase: string;
441
506
  publicKey: string;
442
- buyerAccessTokenProvider: _seatlayer_js.BuyerAccessTokenProvider | undefined;
507
+ buyerAccessTokenProvider: _seatlayer_js.SeasonAccessTokenProvider | undefined;
443
508
  buyerAccessToken: string | _seatlayer_js.BuyerAccessToken | undefined;
444
509
  checkout: "handoff" | "hosted" | undefined;
445
510
  returnUrl: string;
511
+ buyerEmail: string;
512
+ buyerName: string;
446
513
  initialOperationId: string;
514
+ package: string;
515
+ ticketsByEmail: boolean;
447
516
  recoveryTimeoutMs: number;
448
517
  fetch: typeof fetch;
518
+ priceTypes: readonly SeasonPriceType[];
449
519
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
450
520
 
451
521
  export { SeasonPicker, type SeasonPickerExposed, SeatingChart, type SeatingChartExposed };
package/dist/index.js CHANGED
@@ -205,6 +205,7 @@ var SeatingChart = defineComponent({
205
205
 
206
206
  // src/SeasonPicker.ts
207
207
  import {
208
+ computed,
208
209
  defineComponent as defineComponent2,
209
210
  h as h2,
210
211
  onBeforeUnmount as onBeforeUnmount2,
@@ -226,6 +227,8 @@ var SeasonPicker = defineComponent2({
226
227
  default: void 0
227
228
  },
228
229
  returnUrl: { type: String, default: void 0 },
230
+ buyerEmail: { type: String, default: void 0 },
231
+ buyerName: { type: String, default: void 0 },
229
232
  buyerAccessTokenProvider: {
230
233
  type: Function,
231
234
  default: void 0
@@ -235,8 +238,20 @@ var SeasonPicker = defineComponent2({
235
238
  default: void 0
236
239
  },
237
240
  initialOperationId: { type: String, default: void 0 },
241
+ /** The package to open on, by its key; the first package without it. */
242
+ package: { type: String, default: void 0 },
243
+ /** The host emails a ticket per date itself: step 1 says so. */
244
+ ticketsByEmail: { type: Boolean, default: void 0 },
238
245
  recoveryTimeoutMs: { type: Number, default: void 0 },
239
- fetch: { type: Function, default: void 0 }
246
+ fetch: { type: Function, default: void 0 },
247
+ /**
248
+ * The price types the picker sells, e.g. `['adult', 'child']`. With a type
249
+ * besides adult, the buyer chooses one per seat before the hold.
250
+ */
251
+ priceTypes: {
252
+ type: Array,
253
+ default: void 0
254
+ }
240
255
  },
241
256
  emits: {
242
257
  hold: (_handoff) => true,
@@ -252,6 +267,7 @@ var SeasonPicker = defineComponent2({
252
267
  setup(props, { emit, expose }) {
253
268
  const container = ref2(null);
254
269
  const picker = shallowRef2(null);
270
+ const priceTypesKey = computed(() => (props.priceTypes ?? []).join(","));
255
271
  const destroy = () => {
256
272
  picker.value?.destroy();
257
273
  picker.value = null;
@@ -267,11 +283,16 @@ var SeasonPicker = defineComponent2({
267
283
  publicKey: props.publicKey,
268
284
  checkout: props.checkout,
269
285
  returnUrl: props.returnUrl,
286
+ buyerEmail: props.buyerEmail,
287
+ buyerName: props.buyerName,
270
288
  buyerAccessTokenProvider: props.buyerAccessTokenProvider,
271
289
  buyerAccessToken: props.buyerAccessToken,
272
290
  initialOperationId: props.initialOperationId,
291
+ package: props.package,
292
+ ticketsByEmail: props.ticketsByEmail,
273
293
  recoveryTimeoutMs: props.recoveryTimeoutMs,
274
294
  fetch: props.fetch,
295
+ priceTypes: props.priceTypes,
275
296
  onHold: (handoff) => emit("hold", handoff),
276
297
  onHoldChange: (handoff) => emit("hold-change", handoff),
277
298
  onContinue: (handoff) => emit("continue", handoff),
@@ -296,8 +317,11 @@ var SeasonPicker = defineComponent2({
296
317
  props.buyerAccessTokenProvider,
297
318
  props.buyerAccessToken,
298
319
  props.initialOperationId,
320
+ props.package,
321
+ props.ticketsByEmail,
299
322
  props.recoveryTimeoutMs,
300
- props.fetch
323
+ props.fetch,
324
+ priceTypesKey.value
301
325
  ],
302
326
  build,
303
327
  { immediate: true, flush: "post" }
@@ -308,8 +332,10 @@ var SeasonPicker = defineComponent2({
308
332
  return picker.value;
309
333
  };
310
334
  const exposed = {
311
- holdSameSeat: (labels, operationId) => current().holdSameSeat(labels, operationId),
335
+ holdSameSeat: (labels, operationId, priceTypes) => current().holdSameSeat(labels, operationId, priceTypes),
336
+ holdBestAvailable: (qty, operationId, options) => current().holdBestAvailable(qty, operationId, options),
312
337
  restoreOperation: (operationId) => current().restoreOperation(operationId),
338
+ markBooked: () => current().markBooked(),
313
339
  release: (releaseActionId) => current().release(releaseActionId),
314
340
  createRenewalIntent: (offerId) => current().createRenewalIntent(offerId),
315
341
  getDescriptor: () => picker.value?.getDescriptor() ?? null,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/SeatingChart.ts","../src/SeasonPicker.ts","../src/index.ts"],"sourcesContent":["import {\n defineComponent,\n h,\n onBeforeUnmount,\n ref,\n shallowRef,\n watch,\n type PropType,\n type Ref,\n} from 'vue';\nimport {\n SeatingChart as CoreSeatingChart,\n SEATING_CHART_IDENTITY_PROPS,\n bindSeatingChartHandle,\n buildSeatingChartOptions,\n type RendererViewMode,\n type SeatingChartHandle,\n type SeatingChartOptions,\n type SelectedSeat,\n type HoldResult,\n type BestAvailableResult,\n type GAAreaAvailability,\n type SeatHoverDetails,\n type PickerSelectionValidity,\n type PickerSelectionValidator,\n type BuyerAccessToken,\n type BuyerAccessTokenProvider,\n type BuyerAccessExpiredEvent,\n type BuyerAccessUnavailableEvent,\n type SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n\n/**\n * What `ref=\"chart\"` gives you — call these to drive the picker from your app.\n *\n * Vue exposes these through `defineExpose`, so a template ref is typed as this\n * rather than as the raw component instance. It is the shared\n * `SeatingChartHandle` from `@seatlayer/js`: the same 17 methods React's `ref`\n * and Angular's component expose, from one declaration, so the three wrappers\n * cannot drift apart again.\n */\nexport type SeatingChartExposed = SeatingChartHandle;\n\n/**\n * Vue 3 wrapper around the framework-agnostic `@seatlayer/js` SDK.\n *\n * The canvas is created once and torn down on unmount. Only the props that\n * change the chart's identity (`SEATING_CHART_IDENTITY_PROPS`: `event`,\n * `apiBase`, `maxSelection`, `numberOfPlacesToSelect`, `publicKey`, `locale`, `currency`,\n * `colorblindSafe`, `initialView`, `errorDisplay`) trigger a rebuild;\n * everything else is read live, so a parent re-render never destroys the canvas\n * mid-selection.\n *\n * Written as a render function rather than an SFC so the package builds with\n * plain TypeScript — a consumer needs no Vue compiler plugin to install it.\n *\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { ref } from 'vue';\n * import { SeatingChart, type SeatingChartExposed } from '@seatlayer/vue';\n *\n * const chart = ref<SeatingChartExposed | null>(null);\n * const checkout = async () => {\n * const held = await chart.value?.hold();\n * if (held) await pay(held.holdId);\n * };\n * </script>\n *\n * <template>\n * <SeatingChart ref=\"chart\" event=\"summer-gala\" @selection-change=\"onChange\" />\n * </template>\n * ```\n */\nexport const SeatingChart = defineComponent({\n name: 'SeatLayerSeatingChart',\n\n props: {\n /** Event key to render. Changing it rebuilds the chart. */\n event: { type: String, required: true },\n /** API base URL. Defaults to the public API. */\n apiBase: { type: String, default: undefined },\n /** Cap on how many seats a buyer may select. */\n maxSelection: { type: Number, default: undefined },\n /** Object ids or public labels selected after availability loads. */\n selectedObjects: { type: Array as PropType<string[]>, default: undefined },\n /** Object ids or public labels the buyer may select. */\n selectableObjects: { type: Array as PropType<string[] | null>, default: undefined },\n /** Exact ticket count required for a valid selection. */\n numberOfPlacesToSelect: { type: Number, default: undefined },\n /** Local buyer selection guards. Changing them rebuilds the chart. */\n selectionValidators: { type: Array as PropType<PickerSelectionValidator[]>, default: undefined },\n /** Publishable key, when your integration uses one. */\n publicKey: { type: String, default: undefined },\n /** BCP-47 locale for built-in copy. */\n locale: { type: String, default: undefined },\n /** ISO currency for price formatting. */\n currency: { type: String, default: undefined },\n /** Render with colorblind-safe seat glyphs. */\n colorblindSafe: { type: Boolean, default: undefined },\n /**\n * Initial canvas projection. Read once when the chart is built, so\n * changing it rebuilds.\n * @deprecated `'isometric'` and `'perspective'` are retired in favour of\n * the real 3D venue view; use `'flat'`.\n */\n initialView: {\n type: String as PropType<RendererViewMode>,\n default: undefined,\n },\n /**\n * What the BUYER sees when the chart cannot load: `'message'` (default) is\n * a styleable notice with a Try again button, `'none'` is silent for hosts\n * that render their own failure UI from the `error` event.\n */\n errorDisplay: {\n type: String as PropType<'message' | 'none'>,\n default: undefined,\n },\n /** Copy overrides, read once per mount. */\n messages: {\n type: Object as PropType<SeatingChartOptions['messages']>,\n default: undefined,\n },\n /**\n * Show the built-in seat tooltip. Set false to draw your own popover from\n * the `seat-hover` event.\n */\n seatTooltip: { type: Boolean, default: undefined },\n /**\n * Sales Channels: mint a buyer access session on demand. Called with a\n * `reason`; returns `{ token, expiresAt }` from YOUR backend. The token is\n * held in memory only — never storage, never a URL, never a log.\n */\n buyerAccessTokenProvider: {\n type: Function as PropType<BuyerAccessTokenProvider>,\n default: undefined,\n },\n /** One-shot session for hosts that own the lifecycle. Cannot be renewed. */\n buyerAccessToken: {\n type: [String, Object] as PropType<string | BuyerAccessToken>,\n default: undefined,\n },\n },\n\n emits: {\n /** The buyer's selection changed. */\n 'selection-change': (_seats: SelectedSeat[]) => true,\n /** Exact-count state changed. */\n 'selection-validity-change': (_state: PickerSelectionValidity) => true,\n /** The exact count was reached. */\n 'selection-valid': (_seats: SelectedSeat[]) => true,\n /** The selection is not at the exact count. */\n 'selection-invalid': (_state: PickerSelectionValidity) => true,\n /** The active selection cap was reached. */\n 'selection-limit': (_max: number) => true,\n /** A hold succeeded. */\n hold: (_result: HoldResult) => true,\n /** A previous hold was restored on mount. */\n 'hold-restored': (_result: HoldResult) => true,\n /** The active hold lapsed. */\n 'hold-expired': () => true,\n /** A GA area was clicked. */\n 'ga-click': (_area: GAAreaAvailability) => true,\n /** Something failed — a network error, a rejected hold. */\n error: (_error: unknown) => true,\n /** A floor deck was tapped in the 3D view. */\n 'deck-tap': (_floorId: string) => true,\n /** A transient hint worth showing the buyer, or `null` to clear it. */\n hint: (_message: string | null) => true,\n /** The pointer moved onto a seat, or off one (`null`). */\n 'seat-hover': (_details: SeatHoverDetails | null) => true,\n /** The buyer access session lapsed; `refreshed` says whether it recovered. */\n 'access-expired': (_event: BuyerAccessExpiredEvent) => true,\n /** Private inventory is unavailable and refreshing will not fix it. */\n 'access-unavailable': (_event: BuyerAccessUnavailableEvent) => true,\n /** Selected-but-unheld units stopped being selectable. */\n 'selected-object-unavailable': (_event: SelectedObjectUnavailableEvent) => true,\n },\n\n setup(props, { emit, expose }) {\n const container: Ref<HTMLDivElement | null> = ref(null);\n // shallowRef: the chart owns a canvas and a large scene graph, and making it\n // deeply reactive would have Vue walk all of it on every touch.\n const chart = shallowRef<CoreSeatingChart | null>(null);\n\n const destroy = () => {\n chart.value?.destroy();\n chart.value = null;\n };\n\n const build = () => {\n const element = container.value;\n if (!element) return;\n\n destroy();\n\n // Handlers are bound here rather than inline in the options literal.\n // Inline, TypeScript has to resolve `emit`'s overloads while it is still\n // contextually typing the literal against SeatingChartOptions, and it\n // gives up — collapsing to the last emit signature. Naming them first\n // separates the two inference problems, and reads better besides.\n const onSelectionChange = (seats: SelectedSeat[]) => emit('selection-change', seats);\n const onSelectionValidityChange = (state: PickerSelectionValidity) => emit('selection-validity-change', state);\n const onSelectionValid = (seats: SelectedSeat[]) => emit('selection-valid', seats);\n const onSelectionInvalid = (state: PickerSelectionValidity) => emit('selection-invalid', state);\n const onSelectionLimit = (max: number) => emit('selection-limit', max);\n const onHold = (result: HoldResult) => emit('hold', result);\n const onHoldRestored = (result: HoldResult) => emit('hold-restored', result);\n const onHoldExpired = () => emit('hold-expired');\n const onGAClick = (area: GAAreaAvailability) => emit('ga-click', area);\n const onError = (error: unknown) => emit('error', error);\n const onDeckTap = (floorId: string) => emit('deck-tap', floorId);\n const onHint = (message: string | null) => emit('hint', message);\n const onSeatHover = (details: SeatHoverDetails | null) => emit('seat-hover', details);\n const onAccessExpired = (state: BuyerAccessExpiredEvent) => emit('access-expired', state);\n const onAccessUnavailable = (state: BuyerAccessUnavailableEvent) =>\n emit('access-unavailable', state);\n const onSelectedObjectUnavailable = (state: SelectedObjectUnavailableEvent) =>\n emit('selected-object-unavailable', state);\n\n const instance = new CoreSeatingChart(buildSeatingChartOptions(\n element,\n {\n event: props.event,\n apiBase: props.apiBase,\n maxSelection: props.maxSelection,\n selectedObjects: props.selectedObjects,\n selectableObjects: props.selectableObjects,\n numberOfPlacesToSelect: props.numberOfPlacesToSelect,\n selectionValidators: props.selectionValidators,\n publicKey: props.publicKey,\n locale: props.locale,\n currency: props.currency,\n colorblindSafe: props.colorblindSafe,\n initialView: props.initialView,\n errorDisplay: props.errorDisplay,\n messages: props.messages,\n seatTooltip: props.seatTooltip,\n buyerAccessTokenProvider: props.buyerAccessTokenProvider,\n buyerAccessToken: props.buyerAccessToken,\n },\n {\n onAccessExpired,\n onAccessUnavailable,\n onSelectedObjectUnavailable,\n onSelectionChange,\n onSelectionValidityChange,\n onSelectionValid,\n onSelectionInvalid,\n onSelectionLimit,\n onHold,\n onHoldRestored,\n onHoldExpired,\n onGAClick,\n onError,\n onDeckTap,\n onHint,\n onSeatHover,\n },\n ));\n\n chart.value = instance;\n void instance.render();\n };\n\n // `flush: 'post'` so the container element exists on the first run — a\n // pre-flush watcher would fire before the DOM node is attached.\n watch(\n () => [\n container.value,\n // The shared identity list, not a hand-copied one — this is exactly the\n // place Vue fell two props behind React.\n ...SEATING_CHART_IDENTITY_PROPS.map((prop) => props[prop]),\n ],\n build,\n { immediate: true, flush: 'post' },\n );\n\n onBeforeUnmount(destroy);\n\n // Built once and read live: the handle must survive every rebuild, so it\n // asks for the current instance on each call rather than capturing one.\n const exposed: SeatingChartExposed = bindSeatingChartHandle(() => chart.value);\n expose(exposed);\n\n return () => h('div', { ref: container });\n },\n});\n","import {\n defineComponent,\n h,\n onBeforeUnmount,\n ref,\n shallowRef,\n watch,\n type PropType,\n type Ref,\n} from 'vue';\nimport {\n SeasonPicker as CoreSeasonPicker,\n type SeasonAvailability,\n type SeasonCheckoutHandoff,\n type SeasonDescriptor,\n type SeasonPickerOptions,\n type SeasonRenewalIntent,\n type SeasonStatusEvent,\n} from '@seatlayer/js';\n\n/** Imperative controls exposed through a Vue template ref. */\nexport interface SeasonPickerExposed {\n holdSameSeat(labels: readonly string[], operationId: string): Promise<SeasonCheckoutHandoff>;\n restoreOperation(operationId: string): Promise<SeasonCheckoutHandoff | null>;\n release(releaseActionId: string): Promise<void>;\n createRenewalIntent(offerId: string): Promise<SeasonRenewalIntent>;\n getDescriptor(): SeasonDescriptor | null;\n getAvailability(): SeasonAvailability | null;\n getHandoff(): SeasonCheckoutHandoff | null;\n}\n\n/** Vue lifecycle adapter for the distinct fixed-inclusion Season buyer flow. */\nexport const SeasonPicker = defineComponent({\n name: 'SeatLayerSeasonPicker',\n props: {\n season: { type: String, required: true },\n apiBase: { type: String, default: undefined },\n publicKey: { type: String, default: undefined },\n checkout: {\n type: String as PropType<SeasonPickerOptions['checkout']>,\n default: undefined,\n },\n returnUrl: { type: String, default: undefined },\n buyerAccessTokenProvider: {\n type: Function as PropType<SeasonPickerOptions['buyerAccessTokenProvider']>,\n default: undefined,\n },\n buyerAccessToken: {\n type: [String, Object] as PropType<SeasonPickerOptions['buyerAccessToken']>,\n default: undefined,\n },\n initialOperationId: { type: String, default: undefined },\n recoveryTimeoutMs: { type: Number, default: undefined },\n fetch: { type: Function as PropType<typeof fetch>, default: undefined },\n },\n emits: {\n hold: (_handoff: SeasonCheckoutHandoff) => true,\n 'hold-change': (_handoff: SeasonCheckoutHandoff | null) => true,\n continue: (_handoff: SeasonCheckoutHandoff) => true,\n 'renewal-intent': (_intent: SeasonRenewalIntent) => true,\n 'access-expired': (_event: unknown) => true,\n 'access-unavailable': (_event: unknown) => true,\n 'order-confirmed': (_order: unknown) => true,\n 'status-change': (_event: SeasonStatusEvent) => true,\n error: (_error: unknown) => true,\n },\n setup(props, { emit, expose }) {\n const container: Ref<HTMLDivElement | null> = ref(null);\n const picker = shallowRef<CoreSeasonPicker | null>(null);\n\n const destroy = () => {\n picker.value?.destroy();\n picker.value = null;\n };\n const build = () => {\n const element = container.value;\n if (!element) return;\n destroy();\n const instance = new CoreSeasonPicker({\n container: element,\n season: props.season,\n apiBase: props.apiBase,\n publicKey: props.publicKey,\n checkout: props.checkout,\n returnUrl: props.returnUrl,\n buyerAccessTokenProvider: props.buyerAccessTokenProvider,\n buyerAccessToken: props.buyerAccessToken,\n initialOperationId: props.initialOperationId,\n recoveryTimeoutMs: props.recoveryTimeoutMs,\n fetch: props.fetch,\n onHold: (handoff) => emit('hold', handoff),\n onHoldChange: (handoff) => emit('hold-change', handoff),\n onContinue: (handoff) => emit('continue', handoff),\n onRenewalIntent: (intent) => emit('renewal-intent', intent),\n onAccessExpired: (event) => emit('access-expired', event),\n onAccessUnavailable: (event) => emit('access-unavailable', event),\n onOrderConfirmed: (order) => emit('order-confirmed', order),\n onStatusChange: (event) => emit('status-change', event),\n onError: (error) => emit('error', error),\n });\n picker.value = instance;\n void instance.render().catch(() => undefined);\n };\n\n watch(\n () => [\n container.value,\n props.season,\n props.apiBase,\n props.publicKey,\n props.checkout,\n props.returnUrl,\n props.buyerAccessTokenProvider,\n props.buyerAccessToken,\n props.initialOperationId,\n props.recoveryTimeoutMs,\n props.fetch,\n ],\n build,\n { immediate: true, flush: 'post' },\n );\n onBeforeUnmount(destroy);\n\n const current = (): CoreSeasonPicker => {\n if (!picker.value) throw new Error('seatlayer: Vue SeasonPicker is not mounted');\n return picker.value;\n };\n const exposed: SeasonPickerExposed = {\n holdSameSeat: (labels, operationId) => current().holdSameSeat(labels, operationId),\n restoreOperation: (operationId) => current().restoreOperation(operationId),\n release: (releaseActionId) => current().release(releaseActionId),\n createRenewalIntent: (offerId) => current().createRenewalIntent(offerId),\n getDescriptor: () => picker.value?.getDescriptor() ?? null,\n getAvailability: () => picker.value?.getAvailability() ?? null,\n getHandoff: () => picker.value?.getHandoff() ?? null,\n };\n expose(exposed);\n return () => h('div', { ref: container });\n },\n});\n","/**\n * @seatlayer/vue — the Vue 3 wrapper for the SeatLayer embed SDK.\n *\n * Components are written as render functions rather than SFCs, so installing\n * this package needs no Vue compiler plugin.\n */\nexport { SeatingChart } from './SeatingChart';\nexport type { SeatingChartExposed } from './SeatingChart';\nexport { SeasonPicker } from './SeasonPicker';\nexport type { SeasonPickerExposed } from './SeasonPicker';\n\nexport type {\n SelectedSeat,\n HoldResult,\n BestAvailableResult,\n GAAreaAvailability,\n HoldLineItem,\n SeatHoverDetails,\n SeasonAvailability,\n SeasonCheckoutHandoff,\n SeasonDescriptor,\n SeasonOperation,\n SeasonOperationState,\n SeasonPickerOptions,\n SeasonRenewalIntent,\n SeasonStatusEvent,\n} from '@seatlayer/js';\n\n// Sales Channels — buyer access sessions for private channel inventory.\nexport type {\n BuyerAccessToken,\n BuyerAccessTokenProvider,\n BuyerAccessRefreshReason,\n BuyerAccessUnavailableReason,\n BuyerAccessExpiredEvent,\n BuyerAccessUnavailableEvent,\n SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n\n// The framework-agnostic widget class — for the one-call modal (SeatPickerWidget.open()).\nexport { SeatPicker as SeatPickerWidget } from '@seatlayer/js';\n\n// Host-side embed helper: grows the iframe on `seatlayer:height` and pins it on\n// `seatlayer:fullscreen`. Vue hosts depend on this package alone, so it has to be\n// reachable here rather than only from @seatlayer/js.\nexport { attachPickerFrame } from '@seatlayer/js';\nexport type { AttachPickerFrameOptions } from '@seatlayer/js';\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,OAgBK;AA4CA,IAAM,eAAe,gBAAgB;AAAA,EAC1C,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA,IAEL,OAAO,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA;AAAA,IAEtC,SAAS,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAE5C,cAAc,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAEjD,iBAAiB,EAAE,MAAM,OAA6B,SAAS,OAAU;AAAA;AAAA,IAEzE,mBAAmB,EAAE,MAAM,OAAoC,SAAS,OAAU;AAAA;AAAA,IAElF,wBAAwB,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAE3D,qBAAqB,EAAE,MAAM,OAA+C,SAAS,OAAU;AAAA;AAAA,IAE/F,WAAW,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAE9C,QAAQ,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAE3C,UAAU,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAE7C,gBAAgB,EAAE,MAAM,SAAS,SAAS,OAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOpD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA;AAAA,IAEA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAA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AAO,OAAO,cAAc,KAAK;AAAA,MACtD,iBAAiB,MAAM,OAAO,OAAO,gBAAgB,KAAK;AAAA,MAC1D,YAAY,MAAM,OAAO,OAAO,WAAW,KAAK;AAAA,IAClD;AACA,WAAO,OAAO;AACd,WAAO,MAAMD,GAAE,OAAO,EAAE,KAAK,UAAU,CAAC;AAAA,EAC1C;AACF,CAAC;;;ACnGD,SAAuB,kBAAwB;AAK/C,SAAS,yBAAyB;","names":["defineComponent","h","onBeforeUnmount","ref","shallowRef","watch"]}
1
+ {"version":3,"sources":["../src/SeatingChart.ts","../src/SeasonPicker.ts","../src/index.ts"],"sourcesContent":["import {\n defineComponent,\n h,\n onBeforeUnmount,\n ref,\n shallowRef,\n watch,\n type PropType,\n type Ref,\n} from 'vue';\nimport {\n SeatingChart as CoreSeatingChart,\n SEATING_CHART_IDENTITY_PROPS,\n bindSeatingChartHandle,\n buildSeatingChartOptions,\n type RendererViewMode,\n type SeatingChartHandle,\n type SeatingChartOptions,\n type SelectedSeat,\n type HoldResult,\n type BestAvailableResult,\n type GAAreaAvailability,\n type SeatHoverDetails,\n type PickerSelectionValidity,\n type PickerSelectionValidator,\n type BuyerAccessToken,\n type BuyerAccessTokenProvider,\n type BuyerAccessExpiredEvent,\n type BuyerAccessUnavailableEvent,\n type SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n\n/**\n * What `ref=\"chart\"` gives you — call these to drive the picker from your app.\n *\n * Vue exposes these through `defineExpose`, so a template ref is typed as this\n * rather than as the raw component instance. It is the shared\n * `SeatingChartHandle` from `@seatlayer/js`: the same 17 methods React's `ref`\n * and Angular's component expose, from one declaration, so the three wrappers\n * cannot drift apart again.\n */\nexport type SeatingChartExposed = SeatingChartHandle;\n\n/**\n * Vue 3 wrapper around the framework-agnostic `@seatlayer/js` SDK.\n *\n * The canvas is created once and torn down on unmount. Only the props that\n * change the chart's identity (`SEATING_CHART_IDENTITY_PROPS`: `event`,\n * `apiBase`, `maxSelection`, `numberOfPlacesToSelect`, `publicKey`, `locale`, `currency`,\n * `colorblindSafe`, `initialView`, `errorDisplay`) trigger a rebuild;\n * everything else is read live, so a parent re-render never destroys the canvas\n * mid-selection.\n *\n * Written as a render function rather than an SFC so the package builds with\n * plain TypeScript — a consumer needs no Vue compiler plugin to install it.\n *\n * @example\n * ```vue\n * <script setup lang=\"ts\">\n * import { ref } from 'vue';\n * import { SeatingChart, type SeatingChartExposed } from '@seatlayer/vue';\n *\n * const chart = ref<SeatingChartExposed | null>(null);\n * const checkout = async () => {\n * const held = await chart.value?.hold();\n * if (held) await pay(held.holdId);\n * };\n * </script>\n *\n * <template>\n * <SeatingChart ref=\"chart\" event=\"summer-gala\" @selection-change=\"onChange\" />\n * </template>\n * ```\n */\nexport const SeatingChart = defineComponent({\n name: 'SeatLayerSeatingChart',\n\n props: {\n /** Event key to render. Changing it rebuilds the chart. */\n event: { type: String, required: true },\n /** API base URL. Defaults to the public API. */\n apiBase: { type: String, default: undefined },\n /** Cap on how many seats a buyer may select. */\n maxSelection: { type: Number, default: undefined },\n /** Object ids or public labels selected after availability loads. */\n selectedObjects: { type: Array as PropType<string[]>, default: undefined },\n /** Object ids or public labels the buyer may select. */\n selectableObjects: { type: Array as PropType<string[] | null>, default: undefined },\n /** Exact ticket count required for a valid selection. */\n numberOfPlacesToSelect: { type: Number, default: undefined },\n /** Local buyer selection guards. Changing them rebuilds the chart. */\n selectionValidators: { type: Array as PropType<PickerSelectionValidator[]>, default: undefined },\n /** Publishable key, when your integration uses one. */\n publicKey: { type: String, default: undefined },\n /** BCP-47 locale for built-in copy. */\n locale: { type: String, default: undefined },\n /** ISO currency for price formatting. */\n currency: { type: String, default: undefined },\n /** Render with colorblind-safe seat glyphs. */\n colorblindSafe: { type: Boolean, default: undefined },\n /**\n * Initial canvas projection. Read once when the chart is built, so\n * changing it rebuilds.\n * @deprecated `'isometric'` and `'perspective'` are retired in favour of\n * the real 3D venue view; use `'flat'`.\n */\n initialView: {\n type: String as PropType<RendererViewMode>,\n default: undefined,\n },\n /**\n * What the BUYER sees when the chart cannot load: `'message'` (default) is\n * a styleable notice with a Try again button, `'none'` is silent for hosts\n * that render their own failure UI from the `error` event.\n */\n errorDisplay: {\n type: String as PropType<'message' | 'none'>,\n default: undefined,\n },\n /** Copy overrides, read once per mount. */\n messages: {\n type: Object as PropType<SeatingChartOptions['messages']>,\n default: undefined,\n },\n /**\n * Show the built-in seat tooltip. Set false to draw your own popover from\n * the `seat-hover` event.\n */\n seatTooltip: { type: Boolean, default: undefined },\n /**\n * Sales Channels: mint a buyer access session on demand. Called with a\n * `reason`; returns `{ token, expiresAt }` from YOUR backend. The token is\n * held in memory only — never storage, never a URL, never a log.\n */\n buyerAccessTokenProvider: {\n type: Function as PropType<BuyerAccessTokenProvider>,\n default: undefined,\n },\n /** One-shot session for hosts that own the lifecycle. Cannot be renewed. */\n buyerAccessToken: {\n type: [String, Object] as PropType<string | BuyerAccessToken>,\n default: undefined,\n },\n },\n\n emits: {\n /** The buyer's selection changed. */\n 'selection-change': (_seats: SelectedSeat[]) => true,\n /** Exact-count state changed. */\n 'selection-validity-change': (_state: PickerSelectionValidity) => true,\n /** The exact count was reached. */\n 'selection-valid': (_seats: SelectedSeat[]) => true,\n /** The selection is not at the exact count. */\n 'selection-invalid': (_state: PickerSelectionValidity) => true,\n /** The active selection cap was reached. */\n 'selection-limit': (_max: number) => true,\n /** A hold succeeded. */\n hold: (_result: HoldResult) => true,\n /** A previous hold was restored on mount. */\n 'hold-restored': (_result: HoldResult) => true,\n /** The active hold lapsed. */\n 'hold-expired': () => true,\n /** A GA area was clicked. */\n 'ga-click': (_area: GAAreaAvailability) => true,\n /** Something failed — a network error, a rejected hold. */\n error: (_error: unknown) => true,\n /** A floor deck was tapped in the 3D view. */\n 'deck-tap': (_floorId: string) => true,\n /** A transient hint worth showing the buyer, or `null` to clear it. */\n hint: (_message: string | null) => true,\n /** The pointer moved onto a seat, or off one (`null`). */\n 'seat-hover': (_details: SeatHoverDetails | null) => true,\n /** The buyer access session lapsed; `refreshed` says whether it recovered. */\n 'access-expired': (_event: BuyerAccessExpiredEvent) => true,\n /** Private inventory is unavailable and refreshing will not fix it. */\n 'access-unavailable': (_event: BuyerAccessUnavailableEvent) => true,\n /** Selected-but-unheld units stopped being selectable. */\n 'selected-object-unavailable': (_event: SelectedObjectUnavailableEvent) => true,\n },\n\n setup(props, { emit, expose }) {\n const container: Ref<HTMLDivElement | null> = ref(null);\n // shallowRef: the chart owns a canvas and a large scene graph, and making it\n // deeply reactive would have Vue walk all of it on every touch.\n const chart = shallowRef<CoreSeatingChart | null>(null);\n\n const destroy = () => {\n chart.value?.destroy();\n chart.value = null;\n };\n\n const build = () => {\n const element = container.value;\n if (!element) return;\n\n destroy();\n\n // Handlers are bound here rather than inline in the options literal.\n // Inline, TypeScript has to resolve `emit`'s overloads while it is still\n // contextually typing the literal against SeatingChartOptions, and it\n // gives up — collapsing to the last emit signature. Naming them first\n // separates the two inference problems, and reads better besides.\n const onSelectionChange = (seats: SelectedSeat[]) => emit('selection-change', seats);\n const onSelectionValidityChange = (state: PickerSelectionValidity) => emit('selection-validity-change', state);\n const onSelectionValid = (seats: SelectedSeat[]) => emit('selection-valid', seats);\n const onSelectionInvalid = (state: PickerSelectionValidity) => emit('selection-invalid', state);\n const onSelectionLimit = (max: number) => emit('selection-limit', max);\n const onHold = (result: HoldResult) => emit('hold', result);\n const onHoldRestored = (result: HoldResult) => emit('hold-restored', result);\n const onHoldExpired = () => emit('hold-expired');\n const onGAClick = (area: GAAreaAvailability) => emit('ga-click', area);\n const onError = (error: unknown) => emit('error', error);\n const onDeckTap = (floorId: string) => emit('deck-tap', floorId);\n const onHint = (message: string | null) => emit('hint', message);\n const onSeatHover = (details: SeatHoverDetails | null) => emit('seat-hover', details);\n const onAccessExpired = (state: BuyerAccessExpiredEvent) => emit('access-expired', state);\n const onAccessUnavailable = (state: BuyerAccessUnavailableEvent) =>\n emit('access-unavailable', state);\n const onSelectedObjectUnavailable = (state: SelectedObjectUnavailableEvent) =>\n emit('selected-object-unavailable', state);\n\n const instance = new CoreSeatingChart(buildSeatingChartOptions(\n element,\n {\n event: props.event,\n apiBase: props.apiBase,\n maxSelection: props.maxSelection,\n selectedObjects: props.selectedObjects,\n selectableObjects: props.selectableObjects,\n numberOfPlacesToSelect: props.numberOfPlacesToSelect,\n selectionValidators: props.selectionValidators,\n publicKey: props.publicKey,\n locale: props.locale,\n currency: props.currency,\n colorblindSafe: props.colorblindSafe,\n initialView: props.initialView,\n errorDisplay: props.errorDisplay,\n messages: props.messages,\n seatTooltip: props.seatTooltip,\n buyerAccessTokenProvider: props.buyerAccessTokenProvider,\n buyerAccessToken: props.buyerAccessToken,\n },\n {\n onAccessExpired,\n onAccessUnavailable,\n onSelectedObjectUnavailable,\n onSelectionChange,\n onSelectionValidityChange,\n onSelectionValid,\n onSelectionInvalid,\n onSelectionLimit,\n onHold,\n onHoldRestored,\n onHoldExpired,\n onGAClick,\n onError,\n onDeckTap,\n onHint,\n onSeatHover,\n },\n ));\n\n chart.value = instance;\n void instance.render();\n };\n\n // `flush: 'post'` so the container element exists on the first run — a\n // pre-flush watcher would fire before the DOM node is attached.\n watch(\n () => [\n container.value,\n // The shared identity list, not a hand-copied one — this is exactly the\n // place Vue fell two props behind React.\n ...SEATING_CHART_IDENTITY_PROPS.map((prop) => props[prop]),\n ],\n build,\n { immediate: true, flush: 'post' },\n );\n\n onBeforeUnmount(destroy);\n\n // Built once and read live: the handle must survive every rebuild, so it\n // asks for the current instance on each call rather than capturing one.\n const exposed: SeatingChartExposed = bindSeatingChartHandle(() => chart.value);\n expose(exposed);\n\n return () => h('div', { ref: container });\n },\n});\n","import {\n computed,\n defineComponent,\n h,\n onBeforeUnmount,\n ref,\n shallowRef,\n watch,\n type PropType,\n type Ref,\n} from 'vue';\nimport {\n SeasonPicker as CoreSeasonPicker,\n type SeasonAvailability,\n type SeasonBestAvailableOptions,\n type SeasonCheckoutHandoff,\n type SeasonDescriptor,\n type SeasonPickerOptions,\n type SeasonPriceType,\n type SeasonRenewalIntent,\n type SeasonSeatPriceTypes,\n type SeasonStatusEvent,\n} from '@seatlayer/js';\n\n/** Imperative controls exposed through a Vue template ref. */\nexport interface SeasonPickerExposed {\n /**\n * Holds the same labels for every included performance. `priceTypes` names\n * each seat's price type by label (`{ 'A-2': 'child' }`); a label it leaves\n * out is adult. Same contract as `@seatlayer/js` `holdSameSeat`.\n */\n holdSameSeat(\n labels: readonly string[], operationId: string, priceTypes?: SeasonSeatPriceTypes,\n ): Promise<SeasonCheckoutHandoff>;\n /**\n * Holds the best `qty` seats free on every included performance, as a map\n * selection would. Same contract as `@seatlayer/js` `holdBestAvailable`: a\n * caller-stable `sop_` id, 1 to `maxSelection` seats, one call at a time.\n */\n holdBestAvailable(\n qty: number, operationId: string, options?: SeasonBestAvailableOptions,\n ): Promise<SeasonCheckoutHandoff>;\n restoreOperation(operationId: string): Promise<SeasonCheckoutHandoff | null>;\n /** Your server booked the held seats: show booked and stop the hold clock. */\n markBooked(): Promise<boolean>;\n release(releaseActionId: string): Promise<void>;\n createRenewalIntent(offerId: string): Promise<SeasonRenewalIntent>;\n getDescriptor(): SeasonDescriptor | null;\n getAvailability(): SeasonAvailability | null;\n getHandoff(): SeasonCheckoutHandoff | null;\n}\n\n/** Vue lifecycle adapter for the distinct fixed-inclusion Season buyer flow. */\nexport const SeasonPicker = defineComponent({\n name: 'SeatLayerSeasonPicker',\n props: {\n season: { type: String, required: true },\n apiBase: { type: String, default: undefined },\n publicKey: { type: String, default: undefined },\n checkout: {\n type: String as PropType<SeasonPickerOptions['checkout']>,\n default: undefined,\n },\n returnUrl: { type: String, default: undefined },\n buyerEmail: { type: String, default: undefined },\n buyerName: { type: String, default: undefined },\n buyerAccessTokenProvider: {\n type: Function as PropType<SeasonPickerOptions['buyerAccessTokenProvider']>,\n default: undefined,\n },\n buyerAccessToken: {\n type: [String, Object] as PropType<SeasonPickerOptions['buyerAccessToken']>,\n default: undefined,\n },\n initialOperationId: { type: String, default: undefined },\n /** The package to open on, by its key; the first package without it. */\n package: { type: String, default: undefined },\n /** The host emails a ticket per date itself: step 1 says so. */\n ticketsByEmail: { type: Boolean, default: undefined },\n recoveryTimeoutMs: { type: Number, default: undefined },\n fetch: { type: Function as PropType<typeof fetch>, default: undefined },\n /**\n * The price types the picker sells, e.g. `['adult', 'child']`. With a type\n * besides adult, the buyer chooses one per seat before the hold.\n */\n priceTypes: {\n type: Array as PropType<readonly SeasonPriceType[]>,\n default: undefined,\n },\n },\n emits: {\n hold: (_handoff: SeasonCheckoutHandoff) => true,\n 'hold-change': (_handoff: SeasonCheckoutHandoff | null) => true,\n continue: (_handoff: SeasonCheckoutHandoff) => true,\n 'renewal-intent': (_intent: SeasonRenewalIntent) => true,\n 'access-expired': (_event: unknown) => true,\n 'access-unavailable': (_event: unknown) => true,\n 'order-confirmed': (_order: unknown) => true,\n 'status-change': (_event: SeasonStatusEvent) => true,\n error: (_error: unknown) => true,\n },\n setup(props, { emit, expose }) {\n const container: Ref<HTMLDivElement | null> = ref(null);\n const picker = shallowRef<CoreSeasonPicker | null>(null);\n // By content, so an inline `:price-types=\"['adult', 'child']\"` does not\n // rebuild the picker on every parent render (a computed only notifies the\n // watch below when its value changes).\n const priceTypesKey = computed(() => (props.priceTypes ?? []).join(','));\n\n const destroy = () => {\n picker.value?.destroy();\n picker.value = null;\n };\n const build = () => {\n const element = container.value;\n if (!element) return;\n destroy();\n const instance = new CoreSeasonPicker({\n container: element,\n season: props.season,\n apiBase: props.apiBase,\n publicKey: props.publicKey,\n checkout: props.checkout,\n returnUrl: props.returnUrl,\n buyerEmail: props.buyerEmail,\n buyerName: props.buyerName,\n buyerAccessTokenProvider: props.buyerAccessTokenProvider,\n buyerAccessToken: props.buyerAccessToken,\n initialOperationId: props.initialOperationId,\n package: props.package,\n ticketsByEmail: props.ticketsByEmail,\n recoveryTimeoutMs: props.recoveryTimeoutMs,\n fetch: props.fetch,\n priceTypes: props.priceTypes,\n onHold: (handoff) => emit('hold', handoff),\n onHoldChange: (handoff) => emit('hold-change', handoff),\n onContinue: (handoff) => emit('continue', handoff),\n onRenewalIntent: (intent) => emit('renewal-intent', intent),\n onAccessExpired: (event) => emit('access-expired', event),\n onAccessUnavailable: (event) => emit('access-unavailable', event),\n onOrderConfirmed: (order) => emit('order-confirmed', order),\n onStatusChange: (event) => emit('status-change', event),\n onError: (error) => emit('error', error),\n });\n picker.value = instance;\n void instance.render().catch(() => undefined);\n };\n\n watch(\n () => [\n container.value,\n props.season,\n props.apiBase,\n props.publicKey,\n props.checkout,\n props.returnUrl,\n props.buyerAccessTokenProvider,\n props.buyerAccessToken,\n props.initialOperationId,\n props.package,\n props.ticketsByEmail,\n props.recoveryTimeoutMs,\n props.fetch,\n priceTypesKey.value,\n ],\n build,\n { immediate: true, flush: 'post' },\n );\n onBeforeUnmount(destroy);\n\n const current = (): CoreSeasonPicker => {\n if (!picker.value) throw new Error('seatlayer: Vue SeasonPicker is not mounted');\n return picker.value;\n };\n const exposed: SeasonPickerExposed = {\n holdSameSeat: (labels, operationId, priceTypes) => current().holdSameSeat(labels, operationId, priceTypes),\n holdBestAvailable: (qty, operationId, options) => current().holdBestAvailable(qty, operationId, options),\n restoreOperation: (operationId) => current().restoreOperation(operationId),\n markBooked: () => current().markBooked(),\n release: (releaseActionId) => current().release(releaseActionId),\n createRenewalIntent: (offerId) => current().createRenewalIntent(offerId),\n getDescriptor: () => picker.value?.getDescriptor() ?? null,\n getAvailability: () => picker.value?.getAvailability() ?? null,\n getHandoff: () => picker.value?.getHandoff() ?? null,\n };\n expose(exposed);\n return () => h('div', { ref: container });\n },\n});\n","/**\n * @seatlayer/vue — the Vue 3 wrapper for the SeatLayer embed SDK.\n *\n * Components are written as render functions rather than SFCs, so installing\n * this package needs no Vue compiler plugin.\n */\nexport { SeatingChart } from './SeatingChart';\nexport type { SeatingChartExposed } from './SeatingChart';\nexport { SeasonPicker } from './SeasonPicker';\nexport type { SeasonPickerExposed } from './SeasonPicker';\n\nexport type {\n SelectedSeat,\n HoldResult,\n BestAvailableResult,\n GAAreaAvailability,\n HoldLineItem,\n SeatHoverDetails,\n SeasonAvailability,\n SeasonBestAvailableOptions,\n SeasonCheckoutHandoff,\n SeasonCheckoutSeat,\n SeasonDescriptor,\n SeasonOperation,\n SeasonOperationState,\n SeasonPickerOptions,\n SeasonPriceType,\n SeasonRenewalIntent,\n SeasonSeatPriceTypes,\n SeasonStatusEvent,\n} from '@seatlayer/js';\n\n// Sales Channels — buyer access sessions for private channel inventory.\nexport type {\n BuyerAccessToken,\n BuyerAccessTokenProvider,\n BuyerAccessRefreshReason,\n BuyerAccessUnavailableReason,\n BuyerAccessExpiredEvent,\n BuyerAccessUnavailableEvent,\n SelectedObjectUnavailableEvent,\n} from '@seatlayer/js';\n\n// The framework-agnostic widget class — for the one-call modal (SeatPickerWidget.open()).\nexport { SeatPicker as SeatPickerWidget } from '@seatlayer/js';\n\n// Host-side embed helper: grows the iframe on `seatlayer:height` and pins it on\n// `seatlayer:fullscreen`. Vue hosts depend on this package alone, so it has to be\n// reachable here rather than only from @seatlayer/js.\nexport { attachPickerFrame } from '@seatlayer/js';\nexport type { AttachPickerFrameOptions } from '@seatlayer/js';\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,OAgBK;AA4CA,IAAM,eAAe,gBAAgB;AAAA,EAC1C,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA,IAEL,OAAO,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA;AAAA,IAEtC,SAAS,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAE5C,cAAc,EAAE,MAAM,QAAQ,SAAS,OAAU;AAAA;AAAA,IAEjD,iBAAiB,EAAE,MAAM,OAA6B,SAAS,OAAU;AAAA;AAAA,IAEzE,mBAAmB,EAAE,MAAM,OAA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,eAAe;AAAA,MAC/D,qBAAqB,CAAC,YAAY,QAAQ,EAAE,oBAAoB,OAAO;AAAA,MACvE,eAAe,MAAM,OAAO,OAAO,cAAc,KAAK;AAAA,MACtD,iBAAiB,MAAM,OAAO,OAAO,gBAAgB,KAAK;AAAA,MAC1D,YAAY,MAAM,OAAO,OAAO,WAAW,KAAK;AAAA,IAClD;AACA,WAAO,OAAO;AACd,WAAO,MAAMD,GAAE,OAAO,EAAE,KAAK,UAAU,CAAC;AAAA,EAC1C;AACF,CAAC;;;AChJD,SAAuB,kBAAwB;AAK/C,SAAS,yBAAyB;","names":["defineComponent","h","onBeforeUnmount","ref","shallowRef","watch"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seatlayer/vue",
3
- "version": "0.109.2",
3
+ "version": "0.110.1",
4
4
  "description": "SeatLayer's official Vue seating chart and seat map SDK: live availability, seat selection, temporary holds, and a typed TypeScript API for ticketing apps.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -74,8 +74,8 @@
74
74
  "typescript"
75
75
  ],
76
76
  "dependencies": {
77
- "@seatlayer/core": "0.109.2",
78
- "@seatlayer/js": "0.109.2"
77
+ "@seatlayer/core": "0.110.1",
78
+ "@seatlayer/js": "0.110.1"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "vue": ">=3.3.0"