@seatlayer/js 0.29.0 → 0.30.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 +32 -5
- package/dist/index.cjs +40 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -6
- package/dist/index.d.ts +36 -6
- package/dist/index.js +40 -7
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
# @seatlayer/js
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@seatlayer/js)
|
|
4
|
+
[](https://www.npmjs.com/package/@seatlayer/js)
|
|
5
|
+
[](../../LICENSE)
|
|
6
|
+
|
|
7
|
+
The framework-agnostic SeatLayer embed SDK. Render the complete buyer picker or
|
|
8
|
+
a headless interactive chart, let buyers select and **hold** inventory in the
|
|
9
|
+
browser, then **book** it from your trusted server.
|
|
10
|
+
|
|
11
|
+
[Package on npm](https://www.npmjs.com/package/@seatlayer/js) ·
|
|
12
|
+
[Install guide](https://docs.seatlayer.io/buyer-sdk/install/) ·
|
|
13
|
+
[Live demo](https://app.seatlayer.io/demo/play) ·
|
|
14
|
+
[Website](https://seatlayer.io/developers/) ·
|
|
15
|
+
[AI Toolkit](https://github.com/seatlayer/seatlayer-ai-toolkit)
|
|
6
16
|
|
|
7
17
|
Works in plain HTML and any framework (React, Vue, Svelte, Angular…). For React,
|
|
8
18
|
prefer the [`@seatlayer/react`](https://www.npmjs.com/package/@seatlayer/react) wrapper.
|
|
9
19
|
|
|
20
|
+
## Install
|
|
21
|
+
|
|
10
22
|
```bash
|
|
11
23
|
npm install @seatlayer/js
|
|
12
24
|
```
|
|
@@ -186,5 +198,20 @@ The full `SeatPicker` automatically restores an active hold after same-tab
|
|
|
186
198
|
checkout navigation and lets the buyer remove individual held tickets. Set
|
|
187
199
|
`restoreHold: false` and pass `initialHoldId` when your host owns persistence.
|
|
188
200
|
|
|
189
|
-
The browser **holds**; your **server books** with a secret key. See
|
|
190
|
-
[integration
|
|
201
|
+
The browser **holds**; your **server books** with a secret key. See
|
|
202
|
+
[how the integration works](https://docs.seatlayer.io/start/how-it-works/).
|
|
203
|
+
|
|
204
|
+
## Related resources
|
|
205
|
+
|
|
206
|
+
- [Buyer SDK documentation](https://docs.seatlayer.io/buyer-sdk/install/)
|
|
207
|
+
- [SeatingChart reference](https://docs.seatlayer.io/buyer-sdk/seating-chart/)
|
|
208
|
+
- [Holds and checkout](https://docs.seatlayer.io/buyer-sdk/holds-and-checkout/)
|
|
209
|
+
- [Complete checkout example](https://docs.seatlayer.io/examples/complete-checkout/)
|
|
210
|
+
- [`@seatlayer/react`](https://www.npmjs.com/package/@seatlayer/react)
|
|
211
|
+
- [iOS SDK](https://github.com/seatlayer/seatlayer-ios)
|
|
212
|
+
- [Flutter package](https://pub.dev/packages/seatlayer)
|
|
213
|
+
- [Agent-readable documentation](https://docs.seatlayer.io/llms.txt)
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
MIT © SeatLayer
|
package/dist/index.cjs
CHANGED
|
@@ -424,7 +424,10 @@ var SeatingChart = class {
|
|
|
424
424
|
setColorblindSafe(on) {
|
|
425
425
|
this.controller.setColorblindSafe(on);
|
|
426
426
|
}
|
|
427
|
-
/** Switch
|
|
427
|
+
/** Switch the 2D canvas projection.
|
|
428
|
+
* @deprecated `'isometric'` and `'perspective'` are retired in favour of the
|
|
429
|
+
* real 3D venue view (`setBuyerView('venue3d')`); accepted for source
|
|
430
|
+
* compatibility until the next major. */
|
|
428
431
|
setViewMode(mode) {
|
|
429
432
|
this.controller.setViewMode(mode);
|
|
430
433
|
}
|
|
@@ -4553,12 +4556,42 @@ var SeatPicker = class _SeatPicker {
|
|
|
4553
4556
|
getBuyerView() {
|
|
4554
4557
|
return this.buyerView;
|
|
4555
4558
|
}
|
|
4556
|
-
/**
|
|
4557
|
-
*
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4559
|
+
/**
|
|
4560
|
+
* Switch between the flat seat **Map** and the interactive **3D venue** view —
|
|
4561
|
+
* the same control the buyer's on-widget `Map | 3D` toggle drives.
|
|
4562
|
+
*
|
|
4563
|
+
* Entering `'venue3d'` with `opts.flyToSeatId` runs the cinematic tour: the
|
|
4564
|
+
* camera flies to the seat and holds in the live scene (a chip offers the
|
|
4565
|
+
* 360° view-from-seat) —
|
|
4566
|
+
* the widget enters 3D and auto-flies the camera to that seat, dissolving into
|
|
4567
|
+
* its view-from-seat panorama (the same chain as tapping "See the view from
|
|
4568
|
+
* here" on a seat's confirm card). When the widget is **already** in the 3D
|
|
4569
|
+
* view, the camera simply flies to the requested seat — the GL scene is not
|
|
4570
|
+
* torn down or rebuilt, so there is no flash or re-entry.
|
|
4571
|
+
*
|
|
4572
|
+
* No-op when the view is unchanged and no `flyToSeatId` is given, or when 3D is
|
|
4573
|
+
* unavailable for this chart.
|
|
4574
|
+
*
|
|
4575
|
+
* @param view `'map'` for the flat picker, `'venue3d'` for the 3D venue.
|
|
4576
|
+
* @param opts.flyToSeatId When entering (or already in) `'venue3d'`, the seat
|
|
4577
|
+
* id to fly the camera to — cinematic → panorama.
|
|
4578
|
+
* Ignored when `view` is `'map'`.
|
|
4579
|
+
*
|
|
4580
|
+
* @example
|
|
4581
|
+
* // Public 3D tour entry — enter 3D and fly straight to the buyer's seat:
|
|
4582
|
+
* picker.setBuyerView('venue3d', { flyToSeatId: 'A-12' });
|
|
4583
|
+
*/
|
|
4584
|
+
setBuyerView(view, opts) {
|
|
4585
|
+
if (view === "map") {
|
|
4586
|
+
this.exit3d();
|
|
4587
|
+
return;
|
|
4588
|
+
}
|
|
4589
|
+
const flyToSeatId = opts?.flyToSeatId;
|
|
4590
|
+
if (this.buyerView === "venue3d") {
|
|
4591
|
+
if (flyToSeatId) void this.view3dHandle?.flyToSeat(flyToSeatId);
|
|
4592
|
+
return;
|
|
4593
|
+
}
|
|
4594
|
+
void this.enter3d(flyToSeatId);
|
|
4562
4595
|
}
|
|
4563
4596
|
/** SeatStatus → the view3d palette state. Selection is layered separately. */
|
|
4564
4597
|
seatState3dFor(id) {
|