@seatlayer/vue 0.65.0 → 0.68.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.
Files changed (2) hide show
  1. package/README.md +153 -21
  2. package/package.json +15 -6
package/README.md CHANGED
@@ -1,19 +1,41 @@
1
- # @seatlayer/vue
1
+ # SeatLayer Vue Seat Map SDK for Reserved Seating
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@seatlayer/vue)](https://www.npmjs.com/package/@seatlayer/vue)
4
4
  [![npm downloads](https://img.shields.io/npm/dm/@seatlayer/vue)](https://www.npmjs.com/package/@seatlayer/vue)
5
5
  [![Vue](https://img.shields.io/badge/Vue-%E2%89%A53.3-42B883.svg)](https://vuejs.org/)
6
+ [![TypeScript](https://img.shields.io/badge/TypeScript-types%20included-3178C6.svg)](https://www.typescriptlang.org/)
6
7
  [![License: MIT](https://img.shields.io/badge/license-MIT-111827.svg)](../../LICENSE)
7
8
 
8
- The official Vue 3 wrapper for SeatLayer reserved seating provides one native
9
- Vue component: `SeatingChart`. The buyer modal and iframe integration remain
10
- the framework-agnostic JavaScript `SeatPickerWidget` and `attachPickerFrame`
11
- helpers exported by this package; they are not additional Vue components.
9
+ The official Vue 3 wrapper for SeatLayer reserved seating. Render an interactive
10
+ seating chart with live seat availability inside a Vue app, let buyers pick
11
+ seats, and take a temporary hold on the inventory they choose.
12
12
 
13
- [Package on npm](https://www.npmjs.com/package/@seatlayer/vue) ·
14
- [SeatPicker docs](https://docs.seatlayer.io/buyer-sdk/seat-picker/) ·
15
- [Live demo](https://app.seatlayer.io/demo/play) ·
16
- [Website](https://seatlayer.io/developers/)
13
+ The buyer modal and iframe integration stay framework-agnostic: this package
14
+ also re-exports the plain JavaScript `SeatPickerWidget` class and the
15
+ `attachPickerFrame` helper, so a Vue host depends on one package.
16
+
17
+ [SeatLayer Vue SDK on npm](https://www.npmjs.com/package/@seatlayer/vue) ·
18
+ [Vue seat-map documentation](https://docs.seatlayer.io/buyer-sdk/seat-picker/) ·
19
+ [SeatLayer reserved-seating platform](https://seatlayer.io/) ·
20
+ [Buyer seat-map demo](https://app.seatlayer.io/demo/play/grand-theatre) ·
21
+ [SeatLayer JavaScript seat map SDK](https://www.npmjs.com/package/@seatlayer/js) ·
22
+ [SeatLayer React seat map SDK](https://www.npmjs.com/package/@seatlayer/react) ·
23
+ [SeatLayer Angular seat map SDK](https://www.npmjs.com/package/@seatlayer/angular) ·
24
+ [SeatLayer AI Toolkit](https://github.com/seatlayer/seatlayer-ai-toolkit)
25
+
26
+ ## What is included
27
+
28
+ - `SeatingChart` — one native Vue component (`SeatLayerSeatingChart`), written
29
+ as a render function so no Vue compiler plugin is needed.
30
+ - `SeatPickerWidget` — the framework-agnostic one-call buyer modal.
31
+ - `attachPickerFrame` — the host-side iframe helper for embedded pickers.
32
+ - TypeScript declarations for ESM (`dist/index.d.ts`) and CommonJS
33
+ (`dist/index.d.cts`), including the `SeatingChartExposed` handle type.
34
+
35
+ ## Requirements
36
+
37
+ - Vue 3.3 or newer (declared as a peer dependency).
38
+ - A browser DOM: the chart is created when the component mounts.
17
39
 
18
40
  ## Install
19
41
 
@@ -21,10 +43,7 @@ helpers exported by this package; they are not additional Vue components.
21
43
  npm install @seatlayer/vue
22
44
  ```
23
45
 
24
- Requires Vue 3.3 or newer. Components are shipped as render functions, so you
25
- need no Vue compiler plugin to consume this package.
26
-
27
- ## Usage
46
+ ## Quick start
28
47
 
29
48
  ```vue
30
49
  <script setup lang="ts">
@@ -47,6 +66,7 @@ async function checkout() {
47
66
  <SeatingChart
48
67
  ref="chart"
49
68
  event="ev_9f3a"
69
+ public-key="pk_live_your_publishable_key"
50
70
  style="width: 100%; height: 520px"
51
71
  @selection-change="onSelectionChange"
52
72
  @hold="({ holdId }) => bookOnYourServer(holdId)"
@@ -66,12 +86,16 @@ async function checkout() {
66
86
  | `selectableObjects` | `string[] \| null` | Buyer-selectable allow-list. |
67
87
  | `numberOfPlacesToSelect` | `number` | Exact count required for a valid selection. |
68
88
  | `selectionValidators` | `PickerSelectionValidator[]` | Minimum, consecutive-seat, and no-orphan guards. |
69
- | `publicKey` | `string` | Reserved compatibility input; stored by the chart but not transmitted to SeatLayer. |
89
+ | `publicKey` | `string` | Publishable browser key for public Platform events. Configure the browser origin in SeatLayer. |
70
90
  | `locale` | `string` | BCP-47 locale for built-in copy. |
71
91
  | `currency` | `string` | ISO currency for price formatting. |
72
92
  | `colorblindSafe` | `boolean` | Render colorblind-safe seat glyphs. |
73
93
  | `seatTooltip` | `boolean` | Set `false` to draw your own popover from `@seat-hover`. |
74
94
  | `messages` | `object` | Copy overrides. Read once per rebuild. |
95
+ | `initialView` | `RendererViewMode` | Initial 2D projection, read once per rebuild. |
96
+ | `errorDisplay` | `'message' \| 'none'` | `'message'` (default) shows a notice with Try again; `'none'` is silent. |
97
+ | `buyerAccessTokenProvider` | `BuyerAccessTokenProvider` | Sales Channels: mint a buyer access session on demand from your backend. |
98
+ | `buyerAccessToken` | `string \| BuyerAccessToken` | One-shot session for hosts that own the lifecycle. Cannot be renewed. |
75
99
 
76
100
  `numberOfPlacesToSelect`, `selectionValidators`, and the other identity props rebuild the
77
101
  canvas. `selectedObjects` and `selectableObjects` are initial values; use the
@@ -94,6 +118,9 @@ chart mid-selection.
94
118
  | `@deck-tap` | `string` (floor id) |
95
119
  | `@hint` | `string \| null` — `null` clears the hint |
96
120
  | `@seat-hover` | `SeatHoverDetails \| null` — `null` when the pointer leaves |
121
+ | `@access-expired` | `BuyerAccessExpiredEvent` |
122
+ | `@access-unavailable` | `BuyerAccessUnavailableEvent` |
123
+ | `@selected-object-unavailable` | `SelectedObjectUnavailableEvent` |
97
124
 
98
125
  ## Imperative API
99
126
 
@@ -105,7 +132,10 @@ Everything on the template ref, typed as `SeatingChartExposed`:
105
132
  `deselectCategories` · `setSelectableObjects` · `setMaxSelection` ·
106
133
  `getSelectionValidity` ·
107
134
  `getFloors` · `setFloor` · `setColorblindSafe` · `zoomIn` · `zoomOut` ·
108
- `zoomToFit`
135
+ `zoomToFit` · `refreshAccess`
136
+
137
+ Calling any of them before the chart exists returns an empty answer rather than
138
+ throwing, so a template ref used one frame early is safe.
109
139
 
110
140
  ## Also exported
111
141
 
@@ -113,13 +143,115 @@ Everything on the template ref, typed as `SeatingChartExposed`:
113
143
  - `attachPickerFrame` — raw framework-agnostic JavaScript iframe helper; grows on `seatlayer:height` and
114
144
  pins on `seatlayer:fullscreen`.
115
145
 
116
- ## Related
146
+ ## Security boundary
147
+
148
+ The Vue app **selects and holds** inventory. Your trusted backend **inspects and
149
+ books** the hold after payment or order validation.
150
+
151
+ - Never ship a SeatLayer secret key in browser code or a bundled env variable.
152
+ - A `pk_` public key is designed for browser code. SeatLayer binds it to the
153
+ configured origin and event; keep private-channel access behind a server-minted
154
+ `buyerAccessTokenProvider`.
155
+ - Send only the `holdId` and your normal checkout context to your backend.
156
+ - Calculate the charge from server-inspected hold items, not from browser input.
157
+ - Reuse your stable order id as `bookingRef` so a retried booking is idempotent.
158
+
159
+ Read [how the integration works](https://docs.seatlayer.io/start/how-it-works/)
160
+ before connecting checkout.
161
+
162
+ ## Architecture
163
+
164
+ This package is a thin Vue layer over
165
+ [`@seatlayer/js`](https://www.npmjs.com/package/@seatlayer/js), the
166
+ framework-agnostic browser runtime. The component renders a single `<div>`,
167
+ builds the chart on mount, forwards every prop and emit, and exposes the
168
+ runtime's imperative handle through `defineExpose`. Chart geometry,
169
+ availability, and holds come from the SeatLayer API at runtime.
170
+
171
+ ## Frequently asked questions
172
+
173
+ ### How do I add a seat map to a Vue app?
174
+
175
+ Install `@seatlayer/vue`, render `<SeatingChart event="ev_…" />` in a container
176
+ with a definite height, and handle `@selection-change`. That is a complete
177
+ interactive seating chart with live availability; the
178
+ [seat-picker documentation](https://docs.seatlayer.io/buyer-sdk/seat-picker/)
179
+ covers props, events, holds, and checkout in depth.
180
+
181
+ ### Is this a real Vue component or an iframe?
182
+
183
+ `SeatingChart` is a real Vue 3 component that renders a plain `<div>` into your
184
+ own tree — no iframe and no stylesheet of its own. It is written as a render
185
+ function rather than a single-file component, so it needs no Vue compiler plugin
186
+ and works the same in Vite, Nuxt, and a plain bundler. If you would rather embed
187
+ the buyer picker in an iframe, `attachPickerFrame` is exported for that.
188
+
189
+ ### How do temporary seat holds work?
190
+
191
+ When a buyer commits to a selection, `hold()` reserves that inventory against
192
+ concurrent buyers for a limited checkout window and returns an opaque `holdId`.
193
+ The hold lapses on its own if checkout never completes — `@hold-expired` tells
194
+ the app to return the buyer to the map — and `resumeHold()` restores it after a
195
+ same-tab checkout navigation or a reload. This is what prevents double-selling
196
+ without locking seats forever.
197
+
198
+ ### Can I use my own payment provider?
199
+
200
+ Yes. Nothing in this package takes a payment. The browser hands your code a
201
+ `holdId` and priced line items, your backend charges through whatever provider
202
+ you already use, and it then books the hold through the
203
+ [server-side checkout flow](https://docs.seatlayer.io/buyer-sdk/holds-and-checkout/).
204
+
205
+ ### Can I evaluate it without a SeatLayer account?
206
+
207
+ You can explore a live seating chart in the browser at the
208
+ [buyer seat-map demo](https://app.seatlayer.io/demo/play/grand-theatre) with no
209
+ account. Rendering your own venue needs an event key, because the chart and its
210
+ availability are served by the SeatLayer API — create a free test event for
211
+ that, which books no real inventory.
212
+
213
+ ## Continue your Vue integration
214
+
215
+ - [Follow the buyer SDK installation guide](https://docs.seatlayer.io/buyer-sdk/install/)
216
+ for the full browser integration, options, and events.
217
+ - [Connect seat holds to secure server-side checkout](https://docs.seatlayer.io/buyer-sdk/holds-and-checkout/)
218
+ without putting booking credentials in the browser.
219
+ - [Run the complete checkout example](https://docs.seatlayer.io/examples/complete-checkout/)
220
+ to connect a buyer hold id to payment and idempotent booking.
221
+ - [Compare SeatLayer's mobile seat map SDKs](https://docs.seatlayer.io/buyer-sdk/mobile/)
222
+ when the same event also has to render in native iOS, Android, Flutter, or
223
+ React Native apps.
224
+ - [Read the embedded Designer guide](https://docs.seatlayer.io/platform/embedded-designer/)
225
+ to let organizers draw their own venues inside your product.
226
+ - [Explore the 3D seating chart](https://seatlayer.io/3d-seat-map/) for the
227
+ interactive venue view buyers can switch to from the map.
228
+ - [Point AI coding agents at the SeatLayer docs index](https://docs.seatlayer.io/llms.txt)
229
+ (`llms.txt`) for an agent-readable map of the documentation.
230
+
231
+ ## SeatLayer SDK ecosystem
232
+
233
+ | Surface | Package or source |
234
+ | --- | --- |
235
+ | JavaScript | [`@seatlayer/js`](https://www.npmjs.com/package/@seatlayer/js) |
236
+ | React | [`@seatlayer/react`](https://www.npmjs.com/package/@seatlayer/react) |
237
+ | Vue | [`@seatlayer/vue`](https://www.npmjs.com/package/@seatlayer/vue) (this package) |
238
+ | Angular | [`@seatlayer/angular`](https://www.npmjs.com/package/@seatlayer/angular) |
239
+ | React Native | [`@seatlayer/react-native`](https://www.npmjs.com/package/@seatlayer/react-native) |
240
+ | iOS | [`seatlayer-ios`](https://github.com/seatlayer/seatlayer-ios) |
241
+ | Flutter | [`seatlayer`](https://pub.dev/packages/seatlayer) |
242
+ | Android | [`seatlayer-android`](https://github.com/seatlayer/seatlayer-android) |
243
+ | Server SDKs | [Node.js, Python, PHP, Ruby, .NET, Java, and Go](https://docs.seatlayer.io/server-sdk/install/) |
244
+
245
+ ## Development
246
+
247
+ ```bash
248
+ pnpm install
249
+ pnpm verify
250
+ ```
117
251
 
118
- - [`@seatlayer/react`](https://www.npmjs.com/package/@seatlayer/react) React components
119
- - [`@seatlayer/angular`](https://www.npmjs.com/package/@seatlayer/angular) — Angular component
120
- - [`@seatlayer/js`](https://www.npmjs.com/package/@seatlayer/js) — framework-agnostic core
121
- - [Server SDKs](https://docs.seatlayer.io/server-sdk/install/) — Node.js, Python, PHP, Java, Go, Ruby, .NET
252
+ Source, issues, and contribution guidance live in
253
+ [seatlayer/seatlayer-sdk](https://github.com/seatlayer/seatlayer-sdk).
122
254
 
123
255
  ## License
124
256
 
125
- MIT
257
+ MIT © SeatLayer
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@seatlayer/vue",
3
- "version": "0.65.0",
4
- "description": "Vue 3 SeatLayer SDK — one native SeatingChart wrapper plus raw JS SeatPickerWidget and iframe helper.",
3
+ "version": "0.68.0",
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": {
7
7
  "name": "SeatLayer",
@@ -37,18 +37,27 @@
37
37
  ],
38
38
  "sideEffects": false,
39
39
  "keywords": [
40
- "seating",
40
+ "seat map",
41
+ "seating chart",
41
42
  "seat-map",
42
43
  "seating-chart",
43
44
  "seat-picker",
45
+ "seat-selection",
46
+ "seat-reservation",
47
+ "reserved-seating",
48
+ "seat-booking",
49
+ "event-ticketing",
50
+ "ticketing",
51
+ "live-inventory",
52
+ "seating",
44
53
  "seatlayer",
45
54
  "vue",
46
55
  "vue3",
47
- "ticketing"
56
+ "typescript"
48
57
  ],
49
58
  "dependencies": {
50
- "@seatlayer/core": "0.65.0",
51
- "@seatlayer/js": "0.65.0"
59
+ "@seatlayer/core": "0.68.0",
60
+ "@seatlayer/js": "0.68.0"
52
61
  },
53
62
  "peerDependencies": {
54
63
  "vue": ">=3.3.0"