@seatlayer/js 0.80.1 → 0.80.2

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/dist/index.d.cts CHANGED
@@ -1349,6 +1349,48 @@ interface SeatPickerOptions {
1349
1349
  onError?: (err: unknown) => void;
1350
1350
  }
1351
1351
 
1352
+ /**
1353
+ * Two things a NATIVE shell drawing its own chrome over the map needs from the
1354
+ * embed, neither of which the web picker needs because it draws that chrome
1355
+ * itself inside the same document.
1356
+ *
1357
+ * 1. **Blocked regions.** On iOS 26 a tap on a native control laid over the
1358
+ * WebView reaches WKWebView as well — measured on a Flutter host: the shell
1359
+ * rejects the platform view's gesture 134 ms before the finger lifts and the
1360
+ * page still gets the touch, so a press on the `−` disc selected the seat
1361
+ * under it. The only guard that works is one standing BEFORE the finger
1362
+ * lands (`setInteractionEnabled(false)` issued on pointer-down loses the
1363
+ * race: ~180 ms of bridge round trip against a 24 ms tap). So the shell
1364
+ * tells the embed where its chrome is, once per layout, and every pointer
1365
+ * sequence that STARTS inside one of those rectangles is swallowed here in
1366
+ * the capture phase, before the gesture machine or the canvas can see it.
1367
+ *
1368
+ * 2. **Framing a seat above a sheet.** The web picker's phone confirm card is a
1369
+ * resting bottom sheet, and the tapped seat is lifted into the clear band
1370
+ * above it at unchanged zoom — a pan, never a zoom, and never for a buyer
1371
+ * who has since moved the map themselves. A native sheet wants the same,
1372
+ * and the only framing the bridge offered was a refit that changes zoom.
1373
+ * {@link seatFrameNudge} is that placement rule with the host's reported
1374
+ * insets standing in for the sheet.
1375
+ *
1376
+ * Both live here rather than in `SeatingChart`, which is at its size cap; the
1377
+ * chart delegates and stays a thin surface.
1378
+ */
1379
+ /** A rectangle of native chrome over the map, in the map's own CSS px. */
1380
+ type BlockedRegion = {
1381
+ x: number;
1382
+ y: number;
1383
+ w: number;
1384
+ h: number;
1385
+ };
1386
+ /** Read-only view of what the embed is honouring, for tests and diagnostics. */
1387
+ type BlockedRegionList = ReadonlyArray<Readonly<BlockedRegion>>;
1388
+ /** What `frameSeat` answers: the pan it made, and the buyer's gesture count. */
1389
+ type SeatFrameResult = {
1390
+ dy: number;
1391
+ gestures: number;
1392
+ };
1393
+
1352
1394
  /**
1353
1395
  * Serializable state exposed to hosted native picker chrome. It deliberately
1354
1396
  * contains buyer-display data only: never API keys, buyer-access bearers,
@@ -1881,6 +1923,9 @@ declare class SeatingChart {
1881
1923
  private readonly apiBase;
1882
1924
  private readonly buyerAssetUrls;
1883
1925
  private readonly immersive;
1926
+ /** Native chrome over the map — see ./seatingChartNativeChrome. Made on
1927
+ * first use: most hosts never report any. */
1928
+ private blockedRegions;
1884
1929
  private realtime;
1885
1930
  /** Labels whose hold request is in flight — see ControllerSinkOptions.ownLabels. */
1886
1931
  private holdingLabels;
@@ -2092,6 +2137,35 @@ declare class SeatingChart {
2092
2137
  * desktop treatment (or wants it back after asking for it off) pins it here.
2093
2138
  */
2094
2139
  setSectionFocusDim(enabled: boolean): void;
2140
+ /**
2141
+ * Paint `seatId` as the seat the buyer is being asked about — the thick
2142
+ * double ring, the halo, the neighbours paled — or clear it with `null`.
2143
+ *
2144
+ * Every selected seat is otherwise drawn alike, and on a native host the
2145
+ * card asking "this one?" is drawn by the shell, so without this the tapped
2146
+ * seat is one plain ring among the buyer's others (observed on device as a
2147
+ * faint grey ring, 2026-09-05). Paint only: it selects nothing and moves no
2148
+ * camera. A seat that is not selected clears the focus instead.
2149
+ */
2150
+ setSelectionFocus(seatId: string | null): void;
2151
+ /**
2152
+ * Where the host's chrome lies OVER the map, in the map's CSS px. A pointer
2153
+ * sequence that starts inside one of these never reaches the map — the
2154
+ * guard an iOS host needs because its own controls let the tap through to
2155
+ * the WebView. The whole list is replaced on every call; `[]` clears.
2156
+ */
2157
+ setBlockedRegions(rects: BlockedRegionList): void;
2158
+ getBlockedRegions(): BlockedRegionList;
2159
+ /**
2160
+ * Pan — never zoom — so `seatId` rests in the band the reported viewport
2161
+ * insets leave clear, the way the web sheet lifts a tapped seat above
2162
+ * itself. See {@link frameSeat} for the guards.
2163
+ */
2164
+ frameSeat(seatId: string, opts?: {
2165
+ fraction?: number;
2166
+ animate?: boolean;
2167
+ gestures?: number;
2168
+ }): SeatFrameResult;
2095
2169
  /** Toggle colorblind-safe rendering at runtime (see options.colorblindSafe). */
2096
2170
  setColorblindSafe(on: boolean): void;
2097
2171
  /** Switch the 2D canvas projection.
package/dist/index.d.ts CHANGED
@@ -1349,6 +1349,48 @@ interface SeatPickerOptions {
1349
1349
  onError?: (err: unknown) => void;
1350
1350
  }
1351
1351
 
1352
+ /**
1353
+ * Two things a NATIVE shell drawing its own chrome over the map needs from the
1354
+ * embed, neither of which the web picker needs because it draws that chrome
1355
+ * itself inside the same document.
1356
+ *
1357
+ * 1. **Blocked regions.** On iOS 26 a tap on a native control laid over the
1358
+ * WebView reaches WKWebView as well — measured on a Flutter host: the shell
1359
+ * rejects the platform view's gesture 134 ms before the finger lifts and the
1360
+ * page still gets the touch, so a press on the `−` disc selected the seat
1361
+ * under it. The only guard that works is one standing BEFORE the finger
1362
+ * lands (`setInteractionEnabled(false)` issued on pointer-down loses the
1363
+ * race: ~180 ms of bridge round trip against a 24 ms tap). So the shell
1364
+ * tells the embed where its chrome is, once per layout, and every pointer
1365
+ * sequence that STARTS inside one of those rectangles is swallowed here in
1366
+ * the capture phase, before the gesture machine or the canvas can see it.
1367
+ *
1368
+ * 2. **Framing a seat above a sheet.** The web picker's phone confirm card is a
1369
+ * resting bottom sheet, and the tapped seat is lifted into the clear band
1370
+ * above it at unchanged zoom — a pan, never a zoom, and never for a buyer
1371
+ * who has since moved the map themselves. A native sheet wants the same,
1372
+ * and the only framing the bridge offered was a refit that changes zoom.
1373
+ * {@link seatFrameNudge} is that placement rule with the host's reported
1374
+ * insets standing in for the sheet.
1375
+ *
1376
+ * Both live here rather than in `SeatingChart`, which is at its size cap; the
1377
+ * chart delegates and stays a thin surface.
1378
+ */
1379
+ /** A rectangle of native chrome over the map, in the map's own CSS px. */
1380
+ type BlockedRegion = {
1381
+ x: number;
1382
+ y: number;
1383
+ w: number;
1384
+ h: number;
1385
+ };
1386
+ /** Read-only view of what the embed is honouring, for tests and diagnostics. */
1387
+ type BlockedRegionList = ReadonlyArray<Readonly<BlockedRegion>>;
1388
+ /** What `frameSeat` answers: the pan it made, and the buyer's gesture count. */
1389
+ type SeatFrameResult = {
1390
+ dy: number;
1391
+ gestures: number;
1392
+ };
1393
+
1352
1394
  /**
1353
1395
  * Serializable state exposed to hosted native picker chrome. It deliberately
1354
1396
  * contains buyer-display data only: never API keys, buyer-access bearers,
@@ -1881,6 +1923,9 @@ declare class SeatingChart {
1881
1923
  private readonly apiBase;
1882
1924
  private readonly buyerAssetUrls;
1883
1925
  private readonly immersive;
1926
+ /** Native chrome over the map — see ./seatingChartNativeChrome. Made on
1927
+ * first use: most hosts never report any. */
1928
+ private blockedRegions;
1884
1929
  private realtime;
1885
1930
  /** Labels whose hold request is in flight — see ControllerSinkOptions.ownLabels. */
1886
1931
  private holdingLabels;
@@ -2092,6 +2137,35 @@ declare class SeatingChart {
2092
2137
  * desktop treatment (or wants it back after asking for it off) pins it here.
2093
2138
  */
2094
2139
  setSectionFocusDim(enabled: boolean): void;
2140
+ /**
2141
+ * Paint `seatId` as the seat the buyer is being asked about — the thick
2142
+ * double ring, the halo, the neighbours paled — or clear it with `null`.
2143
+ *
2144
+ * Every selected seat is otherwise drawn alike, and on a native host the
2145
+ * card asking "this one?" is drawn by the shell, so without this the tapped
2146
+ * seat is one plain ring among the buyer's others (observed on device as a
2147
+ * faint grey ring, 2026-09-05). Paint only: it selects nothing and moves no
2148
+ * camera. A seat that is not selected clears the focus instead.
2149
+ */
2150
+ setSelectionFocus(seatId: string | null): void;
2151
+ /**
2152
+ * Where the host's chrome lies OVER the map, in the map's CSS px. A pointer
2153
+ * sequence that starts inside one of these never reaches the map — the
2154
+ * guard an iOS host needs because its own controls let the tap through to
2155
+ * the WebView. The whole list is replaced on every call; `[]` clears.
2156
+ */
2157
+ setBlockedRegions(rects: BlockedRegionList): void;
2158
+ getBlockedRegions(): BlockedRegionList;
2159
+ /**
2160
+ * Pan — never zoom — so `seatId` rests in the band the reported viewport
2161
+ * insets leave clear, the way the web sheet lifts a tapped seat above
2162
+ * itself. See {@link frameSeat} for the guards.
2163
+ */
2164
+ frameSeat(seatId: string, opts?: {
2165
+ fraction?: number;
2166
+ animate?: boolean;
2167
+ gestures?: number;
2168
+ }): SeatFrameResult;
2095
2169
  /** Toggle colorblind-safe rendering at runtime (see options.colorblindSafe). */
2096
2170
  setColorblindSafe(on: boolean): void;
2097
2171
  /** Switch the 2D canvas projection.