@seatlayer/vue 0.111.0 → 0.113.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -30
- package/dist/index.cjs +27 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +68 -1
- package/dist/index.d.ts +68 -1
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -27,7 +27,8 @@ also re-exports the plain JavaScript `SeatPickerWidget` class and the
|
|
|
27
27
|
|
|
28
28
|
- `SeatingChart`: one Vue 3 component wrapper (`SeatLayerSeatingChart`), written
|
|
29
29
|
as a render function so no Vue compiler plugin is needed.
|
|
30
|
-
- `SeasonPicker`:
|
|
30
|
+
- `SeasonPicker`: season tickets. The buyer picks a seat once and holds it on
|
|
31
|
+
every date of the season; returning holders can say they will renew.
|
|
31
32
|
- `SeatManager`: the organizer control room, for dashboards that monitor and
|
|
32
33
|
block live inventory. It lives on its own entry, `@seatlayer/vue/manager`, so
|
|
33
34
|
a buyer app never carries it.
|
|
@@ -48,6 +49,47 @@ also re-exports the plain JavaScript `SeatPickerWidget` class and the
|
|
|
48
49
|
npm install @seatlayer/vue
|
|
49
50
|
```
|
|
50
51
|
|
|
52
|
+
## Upgrading to 0.113.0
|
|
53
|
+
|
|
54
|
+
Nothing needs a code change, and no type changed. What a buyer sees:
|
|
55
|
+
|
|
56
|
+
- **A short server stall heals on its own.** A hold, release or resume that
|
|
57
|
+
gets no answer is sent again (at most three tries, seven seconds of waiting),
|
|
58
|
+
and the map's first load tries again for up to about 30 seconds while the
|
|
59
|
+
picker says it is taking longer. A real outage still ends on the same panel
|
|
60
|
+
and Try again button, only later.
|
|
61
|
+
- **"Check your connection and try again."** A hold or best-available that
|
|
62
|
+
still gets no answer says this and keeps the selection, where it used to say
|
|
63
|
+
the seats were taken.
|
|
64
|
+
- **One version of the SDK.** If your app also installs `@seatlayer/js`
|
|
65
|
+
itself, move it to 0.113.0 as well.
|
|
66
|
+
|
|
67
|
+
## Upgrading to 0.112.0
|
|
68
|
+
|
|
69
|
+
Nothing needs a code change. Four things to know:
|
|
70
|
+
|
|
71
|
+
- **`SeatingChart` and `SeasonPicker` now honour `enable3D`, `enable3DCrowd`
|
|
72
|
+
and `touchNavigation3D`.** Before 0.112.0 they were not props, so a value
|
|
73
|
+
you passed did nothing. If your page already passes one, it takes effect when
|
|
74
|
+
you upgrade: `false` for `enable3D` hides the 3D view, `false` for
|
|
75
|
+
`enable3DCrowd` leaves standing areas an empty floor in 3D, and `'classic'`
|
|
76
|
+
for `touchNavigation3D` keeps the earlier touch gestures. Unset, `true` and
|
|
77
|
+
`'map'` change nothing.
|
|
78
|
+
- **Bind them with a colon, in camelCase:** `:enable3D="false"`,
|
|
79
|
+
`:enable3DCrowd="false"`, `touchNavigation3D="classic"`. Without the colon,
|
|
80
|
+
`enable3D="false"` passes the string `"false"`: Vue warns and the value counts
|
|
81
|
+
as true, so 3D stays on. In an in-DOM template the kebab form is
|
|
82
|
+
`:enable3-d`, `:enable3-d-crowd` and `touch-navigation3-d`; `enable-3d` is
|
|
83
|
+
not the prop and does nothing.
|
|
84
|
+
- **Changing one of the three after mount rebuilds the picker.** A page that
|
|
85
|
+
drives `enable3D` from state, for example from the screen width, now remounts
|
|
86
|
+
the chart each time the value changes, as a change of `event` or `locale`
|
|
87
|
+
does. Set it once where you can.
|
|
88
|
+
- **One version of the SDK.** `@seatlayer/js` and `@seatlayer/core` are
|
|
89
|
+
dependencies of this package, pinned to the same version. If your app also
|
|
90
|
+
installs `@seatlayer/js` itself, move it to 0.112.0 as well; an older direct
|
|
91
|
+
install leaves two copies of the SDK in your bundle.
|
|
92
|
+
|
|
51
93
|
## Quick start
|
|
52
94
|
|
|
53
95
|
```vue
|
|
@@ -74,7 +116,6 @@ async function checkout() {
|
|
|
74
116
|
public-key="pk_live_your_publishable_key"
|
|
75
117
|
style="width: 100%; height: 520px"
|
|
76
118
|
@selection-change="onSelectionChange"
|
|
77
|
-
@hold="({ holdId }) => bookOnYourServer(holdId)"
|
|
78
119
|
/>
|
|
79
120
|
<button @click="checkout">Continue</button>
|
|
80
121
|
</template>
|
|
@@ -118,7 +159,7 @@ hold. These tools do not take payment or book seats. See the
|
|
|
118
159
|
[buyer WebMCP seat-selection guide](https://docs.seatlayer.io/buyer-sdk/webmcp-agent-tools/)
|
|
119
160
|
for the full contract and iframe origin controls.
|
|
120
161
|
|
|
121
|
-
###
|
|
162
|
+
### Season tickets: the same seat on every date
|
|
122
163
|
|
|
123
164
|
```vue
|
|
124
165
|
<SeasonPicker
|
|
@@ -144,6 +185,9 @@ the buyer chooses a type per seat before the hold, and the handoff's `seats`
|
|
|
144
185
|
lists each seat's `priceTypeKey`. `season.value.holdSameSeat(labels,
|
|
145
186
|
operationId, { 'A-2': 'child' })` names them yourself; a label left out is adult.
|
|
146
187
|
|
|
188
|
+
The Season picker takes the same three 3D props as the seating chart:
|
|
189
|
+
`enable3D`, `enable3DCrowd` and `touchNavigation3D`. Changing one rebuilds it.
|
|
190
|
+
|
|
147
191
|
The picker opens on step 1, the package with its dates and prices. Pass
|
|
148
192
|
`package="spl_half"` (the package's key) to open on that package instead of the
|
|
149
193
|
Season's first one; a host token is already bound to one package, so it ignores
|
|
@@ -175,6 +219,9 @@ order on the server.
|
|
|
175
219
|
| `locale` | `string` | BCP-47 locale for built-in copy. |
|
|
176
220
|
| `currency` | `string` | ISO currency for price formatting. |
|
|
177
221
|
| `colorblindSafe` | `boolean` | Render colorblind-safe seat glyphs. |
|
|
222
|
+
| `enable3D` | `boolean` | Offer the 3D venue view. On by default; `false` hides it. |
|
|
223
|
+
| `enable3DCrowd` | `boolean` | The standing crowd in 3D. Drawn by default; `false` turns it off. |
|
|
224
|
+
| `touchNavigation3D` | `'map' \| 'classic'` | How fingers move the 3D view. `'map'` by default; `'classic'` keeps the older gestures. |
|
|
178
225
|
| `seatTooltip` | `boolean` | Set `false` to draw your own popover from `@seat-hover`. |
|
|
179
226
|
| `messages` | `object` | Copy overrides. Read once per rebuild. |
|
|
180
227
|
| `initialView` | `RendererViewMode` | Initial 2D projection, read once per rebuild. |
|
|
@@ -320,62 +367,89 @@ availability, and holds come from the SeatLayer API at runtime.
|
|
|
320
367
|
|
|
321
368
|
## Frequently asked questions
|
|
322
369
|
|
|
370
|
+
### Which Vue seating chart component can I use?
|
|
371
|
+
|
|
372
|
+
`@seatlayer/vue` gives you a live seat map (`SeatingChart`) and a ready buyer
|
|
373
|
+
modal (`SeatPickerWidget`), with seat holds, best available, season tickets
|
|
374
|
+
and, on every plan, a 3D view from each seat for venues up to 60,000 seats. A
|
|
375
|
+
200,000-seat stadium chart is ready in 1.95 s on desktop, and the same charts
|
|
376
|
+
run in React, Angular, iOS, Android, Flutter and React Native. You pay only for
|
|
377
|
+
sold seats, and your own server and payment provider keep the order and the
|
|
378
|
+
money.
|
|
379
|
+
|
|
323
380
|
### How do I add a seat map to a Vue app?
|
|
324
381
|
|
|
325
|
-
Install `@seatlayer/vue
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
382
|
+
Install `@seatlayer/vue` and render `SeatingChart` for a live seat map inside
|
|
383
|
+
your own Vue UI, with seat holds, best available and the 3D view from each seat
|
|
384
|
+
on charts up to 60,000 seats. For the ready buyer modal with its priced tray,
|
|
385
|
+
hold timer and checkout hand-off, call `SeatPickerWidget.open()`. Give the
|
|
386
|
+
container a definite height, call `hold()` from your own button and handle
|
|
387
|
+
`@hold`; your server then books the hold.
|
|
330
388
|
|
|
331
389
|
### Is this a real Vue component or an iframe?
|
|
332
390
|
|
|
333
|
-
`SeatingChart` is a Vue 3 component that renders a plain `<div>`
|
|
334
|
-
tree, with no iframe
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
exported for that.
|
|
391
|
+
`SeatingChart` is a Vue 3 component that renders into a plain `<div>` in your
|
|
392
|
+
own tree, with no iframe. It is written as a render function rather than a
|
|
393
|
+
single-file component, so it needs no Vue compiler plugin, and it runs on the
|
|
394
|
+
client in Vite, Nuxt or another Vue 3 bundler. If you would rather embed the
|
|
395
|
+
buyer picker in an iframe, `attachPickerFrame` is exported for that.
|
|
339
396
|
|
|
340
397
|
### How do temporary seat holds work?
|
|
341
398
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
399
|
+
In the SeatLayer picker, a buyer's seats are held when they go to checkout;
|
|
400
|
+
with the bare chart, your code calls `hold()`, which reserves that inventory
|
|
401
|
+
against concurrent buyers for a limited checkout window and returns an opaque
|
|
402
|
+
`holdId`. The hold lapses on its own if checkout never completes. `@hold-expired` tells
|
|
345
403
|
the app to return the buyer to the map, and `resumeHold()` restores it after a
|
|
346
404
|
same-tab checkout navigation or a reload. This is what prevents double-selling
|
|
347
405
|
without locking seats forever.
|
|
348
406
|
|
|
349
407
|
### Can I use my own payment provider?
|
|
350
408
|
|
|
351
|
-
Yes.
|
|
352
|
-
`holdId` and priced line items, your backend charges through
|
|
353
|
-
you already use,
|
|
354
|
-
[server-side checkout flow](https://docs.seatlayer.io/buyer-sdk/holds-and-checkout/).
|
|
409
|
+
Yes. By default nothing in this package takes a payment. The browser hands your
|
|
410
|
+
code a `holdId` and priced line items, and your backend charges through the
|
|
411
|
+
provider you already use, then books the hold.
|
|
355
412
|
|
|
356
413
|
### Can I evaluate it without a SeatLayer account?
|
|
357
414
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
415
|
+
Yes. The live Grand Theatre demo runs in your browser with no account. To show
|
|
416
|
+
your own venue you need an event key, and test mode is free with no time limit
|
|
417
|
+
and no card: test events, holds and webhooks work like production and use no
|
|
418
|
+
credits.
|
|
419
|
+
|
|
420
|
+
### How much does the SeatLayer SDK cost?
|
|
421
|
+
|
|
422
|
+
Building and testing is free, and going live costs $0. You pay one credit per
|
|
423
|
+
sold seat: the first 100 sold seats each month are free, then 10¢ down to 5¢ a
|
|
424
|
+
seat, with no subscription, and credits you buy never expire. Browsing the map,
|
|
425
|
+
holds and the 3D view never use a credit.
|
|
426
|
+
|
|
427
|
+
### Can I sell season tickets with it?
|
|
428
|
+
|
|
429
|
+
Yes. `SeasonPicker` holds the same seat on every date of a season in one step,
|
|
430
|
+
with best available across every date and a price type such as adult or child
|
|
431
|
+
for each seat, and returning holders can tell you they will renew. The hand-off
|
|
432
|
+
carries no price; by default your server applies the package price and books
|
|
433
|
+
it, and the opt-in `checkout: 'hosted'` takes the payment through SeatLayer's
|
|
434
|
+
checkout instead, into the organizer's own payment account. `SeasonPicker` is in `@seatlayer/vue` 0.72.0 and newer.
|
|
363
435
|
|
|
364
436
|
## Continue your Vue integration
|
|
365
437
|
|
|
366
438
|
- [Follow the buyer SDK installation guide](https://docs.seatlayer.io/buyer-sdk/install/)
|
|
367
439
|
for the full browser integration, options, and events.
|
|
440
|
+
- [Read the seat picker documentation](https://docs.seatlayer.io/buyer-sdk/seat-picker/)
|
|
441
|
+
for props, events, holds, and checkout in depth.
|
|
368
442
|
- [Connect seat holds to secure server-side checkout](https://docs.seatlayer.io/buyer-sdk/holds-and-checkout/)
|
|
369
443
|
without putting booking credentials in the browser.
|
|
370
444
|
- [Run the complete checkout example](https://docs.seatlayer.io/examples/complete-checkout/)
|
|
371
445
|
to connect a buyer hold id to payment and idempotent booking.
|
|
372
446
|
- [Compare SeatLayer's mobile seat map SDKs](https://docs.seatlayer.io/buyer-sdk/mobile/)
|
|
373
|
-
when the same event also has to
|
|
374
|
-
|
|
447
|
+
when the same event also has to appear in your iOS, Android, Flutter or React
|
|
448
|
+
Native app.
|
|
375
449
|
- [Use the separate `@seatlayer/js` EmbeddedDesigner API](https://docs.seatlayer.io/platform/embedded-designer/)
|
|
376
450
|
when organizers need hosted chart editing inside a Vue product.
|
|
377
|
-
- [Explore the 3D seating chart](https://seatlayer.io/3d-seat-map/) for the
|
|
378
|
-
|
|
451
|
+
- [Explore the 3D seating chart](https://seatlayer.io/3d-seat-map/) for the 3D
|
|
452
|
+
venue and the view from each seat, which `SeatingChart`, `SeasonPicker` and `SeatPickerWidget` all offer in supported browsers. 3D is offered for venues up to 60,000 seats.
|
|
379
453
|
- [Point AI coding agents at the SeatLayer docs index](https://docs.seatlayer.io/llms.txt)
|
|
380
454
|
(`llms.txt`) for an agent-readable map of the documentation.
|
|
381
455
|
|
package/dist/index.cjs
CHANGED
|
@@ -74,6 +74,15 @@ var SeatingChart = (0, import_vue.defineComponent)({
|
|
|
74
74
|
type: String,
|
|
75
75
|
default: void 0
|
|
76
76
|
},
|
|
77
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
78
|
+
enable3D: { type: Boolean, default: void 0 },
|
|
79
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
80
|
+
enable3DCrowd: { type: Boolean, default: void 0 },
|
|
81
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
82
|
+
touchNavigation3D: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: void 0
|
|
85
|
+
},
|
|
77
86
|
/** Copy overrides, read once per mount. */
|
|
78
87
|
messages: {
|
|
79
88
|
type: Object,
|
|
@@ -176,6 +185,9 @@ var SeatingChart = (0, import_vue.defineComponent)({
|
|
|
176
185
|
colorblindSafe: props.colorblindSafe,
|
|
177
186
|
initialView: props.initialView,
|
|
178
187
|
errorDisplay: props.errorDisplay,
|
|
188
|
+
enable3D: props.enable3D,
|
|
189
|
+
enable3DCrowd: props.enable3DCrowd,
|
|
190
|
+
touchNavigation3D: props.touchNavigation3D,
|
|
179
191
|
messages: props.messages,
|
|
180
192
|
seatTooltip: props.seatTooltip,
|
|
181
193
|
buyerAccessTokenProvider: props.buyerAccessTokenProvider,
|
|
@@ -250,6 +262,15 @@ var SeasonPicker = (0, import_vue2.defineComponent)({
|
|
|
250
262
|
/** The host emails a ticket per date itself: step 1 says so. */
|
|
251
263
|
ticketsByEmail: { type: Boolean, default: void 0 },
|
|
252
264
|
recoveryTimeoutMs: { type: Number, default: void 0 },
|
|
265
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
266
|
+
enable3D: { type: Boolean, default: void 0 },
|
|
267
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
268
|
+
enable3DCrowd: { type: Boolean, default: void 0 },
|
|
269
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
270
|
+
touchNavigation3D: {
|
|
271
|
+
type: String,
|
|
272
|
+
default: void 0
|
|
273
|
+
},
|
|
253
274
|
fetch: { type: Function, default: void 0 },
|
|
254
275
|
/**
|
|
255
276
|
* The price types the picker sells, e.g. `['adult', 'child']`. With a type
|
|
@@ -298,6 +319,9 @@ var SeasonPicker = (0, import_vue2.defineComponent)({
|
|
|
298
319
|
package: props.package,
|
|
299
320
|
ticketsByEmail: props.ticketsByEmail,
|
|
300
321
|
recoveryTimeoutMs: props.recoveryTimeoutMs,
|
|
322
|
+
enable3D: props.enable3D,
|
|
323
|
+
enable3DCrowd: props.enable3DCrowd,
|
|
324
|
+
touchNavigation3D: props.touchNavigation3D,
|
|
301
325
|
fetch: props.fetch,
|
|
302
326
|
priceTypes: props.priceTypes,
|
|
303
327
|
onHold: (handoff) => emit("hold", handoff),
|
|
@@ -327,6 +351,9 @@ var SeasonPicker = (0, import_vue2.defineComponent)({
|
|
|
327
351
|
props.package,
|
|
328
352
|
props.ticketsByEmail,
|
|
329
353
|
props.recoveryTimeoutMs,
|
|
354
|
+
props.enable3D,
|
|
355
|
+
props.enable3DCrowd,
|
|
356
|
+
props.touchNavigation3D,
|
|
330
357
|
props.fetch,
|
|
331
358
|
priceTypesKey.value
|
|
332
359
|
],
|
package/dist/index.cjs.map
CHANGED
|
@@ -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 SeasonBestAvailableOptions,\n SeasonCheckoutHandoff,\n SeasonCheckoutSeat,\n SeasonDescriptor,\n SeasonHeldOrder,\n SeasonHeldSeat,\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 SeasonHeldOrder,\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 * The held Season order for your own order summary: each held seat with its\n * price type and package price, and the total. Null with no live hold.\n * Display only: checkout prices the order on the server.\n */\n getHeldOrder(): SeasonHeldOrder | 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 getHeldOrder: () => picker.value?.getHeldOrder() ?? 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,SAA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reSeatingChart","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 SeasonHeldOrder,\n SeasonHeldSeat,\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`, `enable3D`, `enable3DCrowd`,\n * `touchNavigation3D`) 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 /** Offer the 3D venue view (default true). Changing it rebuilds. */\n enable3D: { type: Boolean, default: undefined },\n /** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */\n enable3DCrowd: { type: Boolean, default: undefined },\n /** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */\n touchNavigation3D: {\n type: String as PropType<'map' | 'classic'>,\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 enable3D: props.enable3D,\n enable3DCrowd: props.enable3DCrowd,\n touchNavigation3D: props.touchNavigation3D,\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 SeasonHeldOrder,\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 * The held Season order for your own order summary: each held seat with its\n * price type and package price, and the total. Null with no live hold.\n * Display only: checkout prices the order on the server.\n */\n getHeldOrder(): SeasonHeldOrder | 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 /** Offer the 3D venue view (default true). Changing it rebuilds. */\n enable3D: { type: Boolean, default: undefined },\n /** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */\n enable3DCrowd: { type: Boolean, default: undefined },\n /** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */\n touchNavigation3D: {\n type: String as PropType<'map' | 'classic'>,\n default: undefined,\n },\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 enable3D: props.enable3D,\n enable3DCrowd: props.enable3DCrowd,\n touchNavigation3D: props.touchNavigation3D,\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.enable3D,\n props.enable3DCrowd,\n props.touchNavigation3D,\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 getHeldOrder: () => picker.value?.getHeldOrder() ?? 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;AA6CA,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,IAMA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA;AAAA,IAEA,UAAU,EAAE,MAAM,SAAS,SAAS,OAAU;AAAA;AAAA,IAE9C,eAAe,EAAE,MAAM,SAAS,SAAS,OAAU;AA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cAAc,MAAM,OAAO,OAAO,aAAa,KAAK;AAAA,IACtD;AACA,WAAO,OAAO;AACd,WAAO,UAAM,eAAE,OAAO,EAAE,KAAK,UAAU,CAAC;AAAA,EAC1C;AACF,CAAC;;;AFrKD,IAAAC,aAA+C;AAK/C,IAAAA,aAAkC;","names":["CoreSeatingChart","import_vue","import_js","CoreSeasonPicker","import_js"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -21,7 +21,8 @@ type SeatingChartExposed = SeatingChartHandle;
|
|
|
21
21
|
* The canvas is created once and torn down on unmount. Only the props that
|
|
22
22
|
* change the chart's identity (`SEATING_CHART_IDENTITY_PROPS`: `event`,
|
|
23
23
|
* `apiBase`, `maxSelection`, `numberOfPlacesToSelect`, `publicKey`, `locale`, `currency`,
|
|
24
|
-
* `colorblindSafe`, `initialView`, `errorDisplay`
|
|
24
|
+
* `colorblindSafe`, `initialView`, `errorDisplay`, `enable3D`, `enable3DCrowd`,
|
|
25
|
+
* `touchNavigation3D`) trigger a rebuild;
|
|
25
26
|
* everything else is read live, so a parent re-render never destroys the canvas
|
|
26
27
|
* mid-selection.
|
|
27
28
|
*
|
|
@@ -121,6 +122,21 @@ declare const SeatingChart: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
121
122
|
type: PropType<"message" | "none">;
|
|
122
123
|
default: undefined;
|
|
123
124
|
};
|
|
125
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
126
|
+
enable3D: {
|
|
127
|
+
type: BooleanConstructor;
|
|
128
|
+
default: undefined;
|
|
129
|
+
};
|
|
130
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
131
|
+
enable3DCrowd: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
default: undefined;
|
|
134
|
+
};
|
|
135
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
136
|
+
touchNavigation3D: {
|
|
137
|
+
type: PropType<"map" | "classic">;
|
|
138
|
+
default: undefined;
|
|
139
|
+
};
|
|
124
140
|
/** Copy overrides, read once per mount. */
|
|
125
141
|
messages: {
|
|
126
142
|
type: PropType<SeatingChartOptions["messages"]>;
|
|
@@ -258,6 +274,21 @@ declare const SeatingChart: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
258
274
|
type: PropType<"message" | "none">;
|
|
259
275
|
default: undefined;
|
|
260
276
|
};
|
|
277
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
278
|
+
enable3D: {
|
|
279
|
+
type: BooleanConstructor;
|
|
280
|
+
default: undefined;
|
|
281
|
+
};
|
|
282
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
283
|
+
enable3DCrowd: {
|
|
284
|
+
type: BooleanConstructor;
|
|
285
|
+
default: undefined;
|
|
286
|
+
};
|
|
287
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
288
|
+
touchNavigation3D: {
|
|
289
|
+
type: PropType<"map" | "classic">;
|
|
290
|
+
default: undefined;
|
|
291
|
+
};
|
|
261
292
|
/** Copy overrides, read once per mount. */
|
|
262
293
|
messages: {
|
|
263
294
|
type: PropType<SeatingChartOptions["messages"]>;
|
|
@@ -316,6 +347,9 @@ declare const SeatingChart: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
316
347
|
colorblindSafe: boolean;
|
|
317
348
|
initialView: RendererViewMode;
|
|
318
349
|
errorDisplay: "message" | "none";
|
|
350
|
+
enable3D: boolean;
|
|
351
|
+
enable3DCrowd: boolean;
|
|
352
|
+
touchNavigation3D: "map" | "classic";
|
|
319
353
|
seatTooltip: boolean;
|
|
320
354
|
buyerAccessTokenProvider: BuyerAccessTokenProvider;
|
|
321
355
|
buyerAccessToken: string | BuyerAccessToken;
|
|
@@ -406,6 +440,21 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
406
440
|
type: NumberConstructor;
|
|
407
441
|
default: undefined;
|
|
408
442
|
};
|
|
443
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
444
|
+
enable3D: {
|
|
445
|
+
type: BooleanConstructor;
|
|
446
|
+
default: undefined;
|
|
447
|
+
};
|
|
448
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
449
|
+
enable3DCrowd: {
|
|
450
|
+
type: BooleanConstructor;
|
|
451
|
+
default: undefined;
|
|
452
|
+
};
|
|
453
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
454
|
+
touchNavigation3D: {
|
|
455
|
+
type: PropType<"map" | "classic">;
|
|
456
|
+
default: undefined;
|
|
457
|
+
};
|
|
409
458
|
fetch: {
|
|
410
459
|
type: PropType<typeof fetch>;
|
|
411
460
|
default: undefined;
|
|
@@ -485,6 +534,21 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
485
534
|
type: NumberConstructor;
|
|
486
535
|
default: undefined;
|
|
487
536
|
};
|
|
537
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
538
|
+
enable3D: {
|
|
539
|
+
type: BooleanConstructor;
|
|
540
|
+
default: undefined;
|
|
541
|
+
};
|
|
542
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
543
|
+
enable3DCrowd: {
|
|
544
|
+
type: BooleanConstructor;
|
|
545
|
+
default: undefined;
|
|
546
|
+
};
|
|
547
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
548
|
+
touchNavigation3D: {
|
|
549
|
+
type: PropType<"map" | "classic">;
|
|
550
|
+
default: undefined;
|
|
551
|
+
};
|
|
488
552
|
fetch: {
|
|
489
553
|
type: PropType<typeof fetch>;
|
|
490
554
|
default: undefined;
|
|
@@ -510,6 +574,9 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
510
574
|
}>, {
|
|
511
575
|
apiBase: string;
|
|
512
576
|
publicKey: string;
|
|
577
|
+
enable3D: boolean;
|
|
578
|
+
enable3DCrowd: boolean;
|
|
579
|
+
touchNavigation3D: "map" | "classic";
|
|
513
580
|
buyerAccessTokenProvider: _seatlayer_js.SeasonAccessTokenProvider | undefined;
|
|
514
581
|
buyerAccessToken: string | _seatlayer_js.BuyerAccessToken | undefined;
|
|
515
582
|
checkout: "handoff" | "hosted" | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,8 @@ type SeatingChartExposed = SeatingChartHandle;
|
|
|
21
21
|
* The canvas is created once and torn down on unmount. Only the props that
|
|
22
22
|
* change the chart's identity (`SEATING_CHART_IDENTITY_PROPS`: `event`,
|
|
23
23
|
* `apiBase`, `maxSelection`, `numberOfPlacesToSelect`, `publicKey`, `locale`, `currency`,
|
|
24
|
-
* `colorblindSafe`, `initialView`, `errorDisplay`
|
|
24
|
+
* `colorblindSafe`, `initialView`, `errorDisplay`, `enable3D`, `enable3DCrowd`,
|
|
25
|
+
* `touchNavigation3D`) trigger a rebuild;
|
|
25
26
|
* everything else is read live, so a parent re-render never destroys the canvas
|
|
26
27
|
* mid-selection.
|
|
27
28
|
*
|
|
@@ -121,6 +122,21 @@ declare const SeatingChart: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
121
122
|
type: PropType<"message" | "none">;
|
|
122
123
|
default: undefined;
|
|
123
124
|
};
|
|
125
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
126
|
+
enable3D: {
|
|
127
|
+
type: BooleanConstructor;
|
|
128
|
+
default: undefined;
|
|
129
|
+
};
|
|
130
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
131
|
+
enable3DCrowd: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
default: undefined;
|
|
134
|
+
};
|
|
135
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
136
|
+
touchNavigation3D: {
|
|
137
|
+
type: PropType<"map" | "classic">;
|
|
138
|
+
default: undefined;
|
|
139
|
+
};
|
|
124
140
|
/** Copy overrides, read once per mount. */
|
|
125
141
|
messages: {
|
|
126
142
|
type: PropType<SeatingChartOptions["messages"]>;
|
|
@@ -258,6 +274,21 @@ declare const SeatingChart: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
258
274
|
type: PropType<"message" | "none">;
|
|
259
275
|
default: undefined;
|
|
260
276
|
};
|
|
277
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
278
|
+
enable3D: {
|
|
279
|
+
type: BooleanConstructor;
|
|
280
|
+
default: undefined;
|
|
281
|
+
};
|
|
282
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
283
|
+
enable3DCrowd: {
|
|
284
|
+
type: BooleanConstructor;
|
|
285
|
+
default: undefined;
|
|
286
|
+
};
|
|
287
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
288
|
+
touchNavigation3D: {
|
|
289
|
+
type: PropType<"map" | "classic">;
|
|
290
|
+
default: undefined;
|
|
291
|
+
};
|
|
261
292
|
/** Copy overrides, read once per mount. */
|
|
262
293
|
messages: {
|
|
263
294
|
type: PropType<SeatingChartOptions["messages"]>;
|
|
@@ -316,6 +347,9 @@ declare const SeatingChart: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
316
347
|
colorblindSafe: boolean;
|
|
317
348
|
initialView: RendererViewMode;
|
|
318
349
|
errorDisplay: "message" | "none";
|
|
350
|
+
enable3D: boolean;
|
|
351
|
+
enable3DCrowd: boolean;
|
|
352
|
+
touchNavigation3D: "map" | "classic";
|
|
319
353
|
seatTooltip: boolean;
|
|
320
354
|
buyerAccessTokenProvider: BuyerAccessTokenProvider;
|
|
321
355
|
buyerAccessToken: string | BuyerAccessToken;
|
|
@@ -406,6 +440,21 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
406
440
|
type: NumberConstructor;
|
|
407
441
|
default: undefined;
|
|
408
442
|
};
|
|
443
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
444
|
+
enable3D: {
|
|
445
|
+
type: BooleanConstructor;
|
|
446
|
+
default: undefined;
|
|
447
|
+
};
|
|
448
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
449
|
+
enable3DCrowd: {
|
|
450
|
+
type: BooleanConstructor;
|
|
451
|
+
default: undefined;
|
|
452
|
+
};
|
|
453
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
454
|
+
touchNavigation3D: {
|
|
455
|
+
type: PropType<"map" | "classic">;
|
|
456
|
+
default: undefined;
|
|
457
|
+
};
|
|
409
458
|
fetch: {
|
|
410
459
|
type: PropType<typeof fetch>;
|
|
411
460
|
default: undefined;
|
|
@@ -485,6 +534,21 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
485
534
|
type: NumberConstructor;
|
|
486
535
|
default: undefined;
|
|
487
536
|
};
|
|
537
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
538
|
+
enable3D: {
|
|
539
|
+
type: BooleanConstructor;
|
|
540
|
+
default: undefined;
|
|
541
|
+
};
|
|
542
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
543
|
+
enable3DCrowd: {
|
|
544
|
+
type: BooleanConstructor;
|
|
545
|
+
default: undefined;
|
|
546
|
+
};
|
|
547
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
548
|
+
touchNavigation3D: {
|
|
549
|
+
type: PropType<"map" | "classic">;
|
|
550
|
+
default: undefined;
|
|
551
|
+
};
|
|
488
552
|
fetch: {
|
|
489
553
|
type: PropType<typeof fetch>;
|
|
490
554
|
default: undefined;
|
|
@@ -510,6 +574,9 @@ declare const SeasonPicker: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
510
574
|
}>, {
|
|
511
575
|
apiBase: string;
|
|
512
576
|
publicKey: string;
|
|
577
|
+
enable3D: boolean;
|
|
578
|
+
enable3DCrowd: boolean;
|
|
579
|
+
touchNavigation3D: "map" | "classic";
|
|
513
580
|
buyerAccessTokenProvider: _seatlayer_js.SeasonAccessTokenProvider | undefined;
|
|
514
581
|
buyerAccessToken: string | _seatlayer_js.BuyerAccessToken | undefined;
|
|
515
582
|
checkout: "handoff" | "hosted" | undefined;
|
package/dist/index.js
CHANGED
|
@@ -57,6 +57,15 @@ var SeatingChart = defineComponent({
|
|
|
57
57
|
type: String,
|
|
58
58
|
default: void 0
|
|
59
59
|
},
|
|
60
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
61
|
+
enable3D: { type: Boolean, default: void 0 },
|
|
62
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
63
|
+
enable3DCrowd: { type: Boolean, default: void 0 },
|
|
64
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
65
|
+
touchNavigation3D: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: void 0
|
|
68
|
+
},
|
|
60
69
|
/** Copy overrides, read once per mount. */
|
|
61
70
|
messages: {
|
|
62
71
|
type: Object,
|
|
@@ -159,6 +168,9 @@ var SeatingChart = defineComponent({
|
|
|
159
168
|
colorblindSafe: props.colorblindSafe,
|
|
160
169
|
initialView: props.initialView,
|
|
161
170
|
errorDisplay: props.errorDisplay,
|
|
171
|
+
enable3D: props.enable3D,
|
|
172
|
+
enable3DCrowd: props.enable3DCrowd,
|
|
173
|
+
touchNavigation3D: props.touchNavigation3D,
|
|
162
174
|
messages: props.messages,
|
|
163
175
|
seatTooltip: props.seatTooltip,
|
|
164
176
|
buyerAccessTokenProvider: props.buyerAccessTokenProvider,
|
|
@@ -243,6 +255,15 @@ var SeasonPicker = defineComponent2({
|
|
|
243
255
|
/** The host emails a ticket per date itself: step 1 says so. */
|
|
244
256
|
ticketsByEmail: { type: Boolean, default: void 0 },
|
|
245
257
|
recoveryTimeoutMs: { type: Number, default: void 0 },
|
|
258
|
+
/** Offer the 3D venue view (default true). Changing it rebuilds. */
|
|
259
|
+
enable3D: { type: Boolean, default: void 0 },
|
|
260
|
+
/** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */
|
|
261
|
+
enable3DCrowd: { type: Boolean, default: void 0 },
|
|
262
|
+
/** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */
|
|
263
|
+
touchNavigation3D: {
|
|
264
|
+
type: String,
|
|
265
|
+
default: void 0
|
|
266
|
+
},
|
|
246
267
|
fetch: { type: Function, default: void 0 },
|
|
247
268
|
/**
|
|
248
269
|
* The price types the picker sells, e.g. `['adult', 'child']`. With a type
|
|
@@ -291,6 +312,9 @@ var SeasonPicker = defineComponent2({
|
|
|
291
312
|
package: props.package,
|
|
292
313
|
ticketsByEmail: props.ticketsByEmail,
|
|
293
314
|
recoveryTimeoutMs: props.recoveryTimeoutMs,
|
|
315
|
+
enable3D: props.enable3D,
|
|
316
|
+
enable3DCrowd: props.enable3DCrowd,
|
|
317
|
+
touchNavigation3D: props.touchNavigation3D,
|
|
294
318
|
fetch: props.fetch,
|
|
295
319
|
priceTypes: props.priceTypes,
|
|
296
320
|
onHold: (handoff) => emit("hold", handoff),
|
|
@@ -320,6 +344,9 @@ var SeasonPicker = defineComponent2({
|
|
|
320
344
|
props.package,
|
|
321
345
|
props.ticketsByEmail,
|
|
322
346
|
props.recoveryTimeoutMs,
|
|
347
|
+
props.enable3D,
|
|
348
|
+
props.enable3DCrowd,
|
|
349
|
+
props.touchNavigation3D,
|
|
323
350
|
props.fetch,
|
|
324
351
|
priceTypesKey.value
|
|
325
352
|
],
|
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 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 SeasonHeldOrder,\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 * The held Season order for your own order summary: each held seat with its\n * price type and package price, and the total. Null with no live hold.\n * Display only: checkout prices the order on the server.\n */\n getHeldOrder(): SeasonHeldOrder | 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 getHeldOrder: () => picker.value?.getHeldOrder() ?? 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 SeasonHeldOrder,\n SeasonHeldSeat,\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,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,IAE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AO,WAAW,KAAK;AAAA,MAChD,cAAc,MAAM,OAAO,OAAO,aAAa,KAAK;AAAA,IACtD;AACA,WAAO,OAAO;AACd,WAAO,MAAMD,GAAE,OAAO,EAAE,KAAK,UAAU,CAAC;AAAA,EAC1C;AACF,CAAC;;;ACtJD,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`, `enable3D`, `enable3DCrowd`,\n * `touchNavigation3D`) 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 /** Offer the 3D venue view (default true). Changing it rebuilds. */\n enable3D: { type: Boolean, default: undefined },\n /** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */\n enable3DCrowd: { type: Boolean, default: undefined },\n /** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */\n touchNavigation3D: {\n type: String as PropType<'map' | 'classic'>,\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 enable3D: props.enable3D,\n enable3DCrowd: props.enable3DCrowd,\n touchNavigation3D: props.touchNavigation3D,\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 SeasonHeldOrder,\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 * The held Season order for your own order summary: each held seat with its\n * price type and package price, and the total. Null with no live hold.\n * Display only: checkout prices the order on the server.\n */\n getHeldOrder(): SeasonHeldOrder | 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 /** Offer the 3D venue view (default true). Changing it rebuilds. */\n enable3D: { type: Boolean, default: undefined },\n /** The standing crowd in 3D, drawn by default; false turns it off. Changing it rebuilds. */\n enable3DCrowd: { type: Boolean, default: undefined },\n /** How fingers move the 3D view: `'map'` (default) or `'classic'`. Changing it rebuilds. */\n touchNavigation3D: {\n type: String as PropType<'map' | 'classic'>,\n default: undefined,\n },\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 enable3D: props.enable3D,\n enable3DCrowd: props.enable3DCrowd,\n touchNavigation3D: props.touchNavigation3D,\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.enable3D,\n props.enable3DCrowd,\n props.touchNavigation3D,\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 getHeldOrder: () => picker.value?.getHeldOrder() ?? 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 SeasonHeldOrder,\n SeasonHeldSeat,\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;AA6CA,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;A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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,MAChD,cAAc,MAAM,OAAO,OAAO,aAAa,KAAK;AAAA,IACtD;AACA,WAAO,OAAO;AACd,WAAO,MAAMD,GAAE,OAAO,EAAE,KAAK,UAAU,CAAC;AAAA,EAC1C;AACF,CAAC;;;ACrKD,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.
|
|
3
|
+
"version": "0.113.0",
|
|
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.
|
|
78
|
-
"@seatlayer/js": "0.
|
|
77
|
+
"@seatlayer/core": "0.113.0",
|
|
78
|
+
"@seatlayer/js": "0.113.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"vue": ">=3.3.0"
|