@tiledev/sdk-apptile-live-selling 0.9.0 → 0.9.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/README.md CHANGED
@@ -324,6 +324,11 @@ So does the name it publishes for this viewer.
324
324
  name, else the email's handle; null when signed out. `createShopifyLiveIdentity`'s `customerName`
325
325
  uses it.
326
326
  - `firstNameOf(name)` is the first word, for a card with no room for more.
327
+ - **The name the room is entered under (0.9.2).** The host's screen shows each viewer join under the
328
+ name their phone entered the room with. While `identity.customerLoading()` is true (a sign-in still
329
+ being read on app open) the session waits to enter, at most 10 seconds, so a signed-in shopper joins
330
+ under their name rather than "Anonymous". The "joined" message carries the latest name the session
331
+ has (one set since the join, too). An identity without `customerLoading` enters at once, as before.
327
332
 
328
333
  ### What the session does on its own (0.9.0)
329
334
 
@@ -384,6 +389,15 @@ session's job now; delete the app-side copies when you upgrade.
384
389
  `showLiveBadge`, …), so one screen serves an ordinary live show and an auction. An auction is a live show
385
390
  plus bidding — the flags are derived, not spelled out twice.
386
391
 
392
+ ### Taps on the phone (0.9.1)
393
+
394
+ `liveHaptics.tick()` as each name rolls past in a giveaway draw, `liveHaptics.knock()` as a bidding war
395
+ starts, `liveHaptics.success()` when the shopper wins the draw or the auction. Pass expo-haptics to
396
+ `configure` (`haptics: Haptics`, from `import * as Haptics from 'expo-haptics'`, a native module) and call
397
+ them where your tiles draw those moments. Without it, and always on the web, they do nothing; a failed tap
398
+ is dropped; ticks are capped at 20 a second. The package doesn't depend on expo-haptics (an optional
399
+ `require` wouldn't bundle in an app without it).
400
+
387
401
  ## 4. Adapters
388
402
 
389
403
  The gateway only ever speaks in bare numeric product ids, because that is what the host dashboard
@@ -528,7 +542,8 @@ It returns:
528
542
 
529
543
  - `identity`: `bidderId`, the customer's bare numeric id, and `customerRef`, their GID, both only for a
530
544
  Shopify sign-in (the winner's record is on the Customer Account API, so an email-and-password
531
- session can't bid); `customerName`, first and last name; `customerEmail`.
545
+ session can't bid); `customerName`, first and last name; `customerEmail`; `customerLoading`, true
546
+ while sdk-shopify is still reading the stored sign-in on app open (`restoring`, 0.9.2).
532
547
  - `customerAccountRequest`: the customer's own `request`.
533
548
  - `buyer`: their access token and email, for `createShopifyLiveCommerce`; null when signed out.
534
549
 
@@ -620,7 +635,8 @@ one while another dismisses is a native iOS exception, not a catchable error.
620
635
  `'upcoming'`.
621
636
  - The custom bid sheet: `quickBids(nextBid, bidCap)` (the next bid rounded up, plus 5, 20, 60 and 100,
622
637
  none over the ceiling) and `winChance(amount, nextBid)` (`'veryHigh'`: 50 over or double; `'good'`: 20
623
- over or half again; `'medium'`: anything over; else `'tooLow'`).
638
+ over or half again; `'medium'`: the next bid or more (0.9.2; it was anything over the next bid, while
639
+ the slider allowed the next bid itself); else `'tooLow'`).
624
640
  - The chat: `classifyComment(text)` → `{ kind: 'winner' }` | `{ kind: 'bid', label: 'Bid ', amount:
625
641
  '$64.00' }` | `{ kind: 'plain' }`, for the room's bid and winner lines, which arrive as plain text.
626
642
 
@@ -691,6 +707,11 @@ active while an iOS window that came from it is up (`pipMode` `'system'`): the e
691
707
  into that view, so the bubble needs no new binding when the window hands it back. Keep the full-screen
692
708
  player's view mounted too (its `active` off), as the README's usual `active` expression already does.
693
709
 
710
+ Moving the picture from one `LiveVideoTarget` to another (the full-screen player, the bubble, Android's
711
+ window) keeps the stream playing: the engine hands the playing stream the new view, as Zego documents
712
+ for `startPlayingStream`. It stops the stream only for a different one (a co-host's mixed stream).
713
+ Before 0.9.2 every move stopped and restarted it, and the new view was dark until the next keyframe.
714
+
694
715
  ## 7. Imperative client
695
716
 
696
717
  For anything the session doesn't cover. `liveSelling.configure()` first; `isReady()` and `companyId()`
@@ -44,8 +44,9 @@ export declare const GOOD_CHANCE_OVER = 20;
44
44
  /**
45
45
  * How good a chance `amount` stands against the next bid, as old Amore's custom bid sheet (and Freckled
46
46
  * Poppy's, with the same numbers) says it: 50 or more over, or double the next bid, is `veryHigh`; 20
47
- * or more over, or half as much again, `good`; anything over, `medium`; else `tooLow`, an amount that
48
- * isn't a number included. Being over the ceiling, or outbid, is the sheet's to say first.
47
+ * or more over, or half as much again, `good`; the next bid itself or anything over, `medium` (since
48
+ * 0.9.2: the slide bids exactly the next bid, so a custom bid of it stands too; it was `tooLow`); else
49
+ * `tooLow`, an amount that isn't a number included. Being over the ceiling, or outbid, is the sheet's to say first.
49
50
  */
50
51
  export declare function winChance(amount: number, nextBid: number): WinChance;
51
52
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"auctionRules.d.ts","sourceRoot":"","sources":["../src/auctionRules.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,OAAO,CAAC;AAEtC,iFAAiF;AACjF,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,gBAAgB,CAAC,CAAC;AAEhH,wDAAwD;AACxD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE/D;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC,EAC5E,GAAG,EAAE,MAAM,GACV,gBAAgB,GAAG,IAAI,CAKzB;AAED,qGAAqG;AACrG,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAAqB,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,KAAK,GA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a,GAAG,gBAAgB,GAAG,WAAW,CAAC,EAC3E,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,IAAI,GAAG,SAAS,GACpD,QAAQ,CAKV;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,GAAG,EAAE,UAAU,GAAG,IAAI,GAAG,SAAS,EAClC,MAAM,EAAE,qBAAqB,GAAG,IAAI,GAAG,SAAS,EAChD,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAClC,OAAO,CAIT;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,EACtF,IAAI,EAAE;IAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAC/D,MAAM,CAKR"}
@@ -49,8 +49,9 @@ exports.GOOD_CHANCE_OVER = 20;
49
49
  /**
50
50
  * How good a chance `amount` stands against the next bid, as old Amore's custom bid sheet (and Freckled
51
51
  * Poppy's, with the same numbers) says it: 50 or more over, or double the next bid, is `veryHigh`; 20
52
- * or more over, or half as much again, `good`; anything over, `medium`; else `tooLow`, an amount that
53
- * isn't a number included. Being over the ceiling, or outbid, is the sheet's to say first.
52
+ * or more over, or half as much again, `good`; the next bid itself or anything over, `medium` (since
53
+ * 0.9.2: the slide bids exactly the next bid, so a custom bid of it stands too; it was `tooLow`); else
54
+ * `tooLow`, an amount that isn't a number included. Being over the ceiling, or outbid, is the sheet's to say first.
54
55
  */
55
56
  function winChance(amount, nextBid) {
56
57
  const over = amount - nextBid;
@@ -59,7 +60,7 @@ function winChance(amount, nextBid) {
59
60
  return 'veryHigh';
60
61
  if (over >= exports.GOOD_CHANCE_OVER || ratio >= 0.5)
61
62
  return 'good';
62
- if (over > 0)
63
+ if (over >= 0)
63
64
  return 'medium';
64
65
  return 'tooLow';
65
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"auctionRules.js","sourceRoot":"","sources":["../src/auctionRules.ts"],"names":[],"mappings":";;;AAgCA,gCASC;AAUD,8BAOC;AAgBD,8BAOC;AAQD,kCASC;AAOD,8BAQC;AAQD,sCAQC;AAvHD;;;;GAIG;AACU,QAAA,iBAAiB,GAAG,IAAI,CAAC;AAQtC;;;;;;;;GAQG;AACH,SAAgB,UAAU,CACxB,MAAc,EACd,KAA4E,EAC5E,GAAW;IAEX,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,KAAK,CAAC,QAAQ,IAAI,GAAG,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC9F,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IACrE,IAAI,MAAM,GAAG,KAAK,CAAC,OAAO;QAAE,OAAO,QAAQ,CAAC;IAC5C,OAAO,IAAI,CAAC;AACd,CAAC;AAED,qGAAqG;AACxF,QAAA,eAAe,GAAsB,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC;AAEnE;;;;GAIG;AACH,SAAgB,SAAS,CACvB,OAAe,EACf,MAAqB,EACrB,QAA2B,uBAAe;IAE1C,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACjC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,IAAI,MAAM,CAAC,CAAC;AACnG,CAAC;AAKD,gHAAgH;AACnG,QAAA,qBAAqB,GAAG,EAAE,CAAC;AACxC,gGAAgG;AACnF,Q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AAM,GAAG,CAAC;YAAE,OAAO,MAAM,CAAC;IACzF,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
package/dist/index.d.ts CHANGED
@@ -15,6 +15,8 @@
15
15
  * ```
16
16
  */
17
17
  export { liveSelling, liveSelling as default } from './liveSelling';
18
+ export { liveHaptics } from './liveHaptics';
19
+ export { createLiveHaptics, LIVE_HAPTICS_TICK_GAP_MS, type LiveHaptics } from './phoneTaps';
18
20
  export { engine as liveEngine } from './engine';
19
21
  export { LiveSellingError, LiveSellingTimeoutError, DEFAULT_REQUEST_TIMEOUT_MS, DEFAULT_OFF_AIR_GRACE_MS, toProductGid, } from './client';
20
22
  export { ZegoLoginError, JOIN_ATTEMPTS, JOIN_RETRY_BASE_MS } from './zegoEngine';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,WAAW,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AAGpE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AAGhD,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGjF,OAAO,EACL,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,iBAAiB,GAClB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,KAAK,qBAAqB,GAC3B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,aAAa,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAIlD,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGjE,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAGvF,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,gBAAgB,CAAC;AAEpC;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AACvB,cAAc,eAAe,CAAC"}
package/dist/index.js CHANGED
@@ -30,13 +30,20 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
30
30
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
31
31
  };
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.AUCTION_CART_SOURCE_TYPE = exports.chargedVariantId = exports.liveProductFromShopify = exports.createShopifyLiveCommerce = exports.displayHost = exports.toUrlPreview = exports.classifyCommentLink = exports.hasCommentLink = exports.toCommentSegments = exports.replayAttributionSourceFor = exports.liveAttributionSourceFor = exports.addLiveLine = exports.replayCartAttributesFor = exports.liveCartAttributesFor = exports.REPLAY_ID_ATTRIBUTE = exports.LIVE_STREAM_ID_ATTRIBUTE = exports.MAX_VIEWER_NAME = exports.resetCompanyFlagsCache = exports.toMixerLayout = exports.isYourGiveawayWin = exports.winnerIdFromRecord = exports.rosterFromRecord = exports.giveawayForLot = exports.GIVEAWAY_ROSTER_WAIT_MS = exports.GIVEAWAY_ROSTER_RETRY_MS = exports.HOST_SELF_NAME = exports.COMMENT_HISTORY_WINDOW = exports.mergeCommentHistory = exports.toCommentHistory = exports.toPinnedComment = exports.imageUrl = exports.toEmbeddedResults = exports.toLivePollResults = exports.toLivePoll = exports.toGiveawayEntries = exports.toLiveGiveaway = exports.toLiveStreamProduct = exports.toLiveStreams = exports.toLiveStream = exports.JOIN_RETRY_BASE_MS = exports.JOIN_ATTEMPTS = exports.ZegoLoginError = exports.toProductGid = exports.DEFAULT_OFF_AIR_GRACE_MS = exports.DEFAULT_REQUEST_TIMEOUT_MS = exports.LiveSellingTimeoutError = exports.LiveSellingError = exports.liveEngine = exports.default = exports.liveSelling = void 0;
34
- exports.livePip = exports.IDLE_GIVEAWAY = exports.IDLE_AUCTION = exports.REPLAY_CAPABILITIES = exports.AUCTION_CAPABILITIES = exports.LIVE_CAPABILITIES = exports.capabilitiesFor = exports.CART_CARD_MS = exports.REACTION_MS = exports.SOLD_CARD_MS = exports.isTheEndedGiveaway = exports.withOffAirSettled = exports.isNothingOnAir = exports.nextExpiryAt = exports.roundClosesAt = exports.deriveStatus = exports.initialSessionState = exports.sessionReducer = exports.givenAwayVariant = exports.isTheVariant = exports.classifyComment = exports.openingBidFor = exports.GOOD_CHANCE_OVER = exports.VERY_HIGH_CHANCE_OVER = exports.QUICK_BID_STEPS = exports.BID_ON_ITS_WAY_MS = exports.isYourWin = exports.lotStateFor = exports.winChance = exports.quickBids = exports.bidRefusal = exports.showLinkDestination = exports.withLotFieldsFromRecord = exports.featuredFirst = exports.canPlayInCard = exports.liveShowFor = exports.sameRoomName = exports.viewerNameFor = exports.firstNameOf = exports.publicName = exports.withoutHiddenShows = exports.seesHiddenShows = exports.isHiddenShow = exports.isHiddenFrom = exports.prizeLinePrice = exports.isGiveawayPrizeLine = exports.GIVEAWAY_PRIZE_KEYS = exports.createShopifyLiveIdentity = exports.WIN_INDEX_KEY = exports.WINNING_BID_KEY = void 0;
35
- exports.ONGOING_LIVE_POLL_LIVE_MS = exports.ONGOING_LIVE_POLL_IDLE_MS = exports.createOngoingLiveStore = exports.COMMENT_SOURCES = exports.isLivePipSupported = void 0;
33
+ exports.createShopifyLiveCommerce = exports.displayHost = exports.toUrlPreview = exports.classifyCommentLink = exports.hasCommentLink = exports.toCommentSegments = exports.replayAttributionSourceFor = exports.liveAttributionSourceFor = exports.addLiveLine = exports.replayCartAttributesFor = exports.liveCartAttributesFor = exports.REPLAY_ID_ATTRIBUTE = exports.LIVE_STREAM_ID_ATTRIBUTE = exports.MAX_VIEWER_NAME = exports.resetCompanyFlagsCache = exports.toMixerLayout = exports.isYourGiveawayWin = exports.winnerIdFromRecord = exports.rosterFromRecord = exports.giveawayForLot = exports.GIVEAWAY_ROSTER_WAIT_MS = exports.GIVEAWAY_ROSTER_RETRY_MS = exports.HOST_SELF_NAME = exports.COMMENT_HISTORY_WINDOW = exports.mergeCommentHistory = exports.toCommentHistory = exports.toPinnedComment = exports.imageUrl = exports.toEmbeddedResults = exports.toLivePollResults = exports.toLivePoll = exports.toGiveawayEntries = exports.toLiveGiveaway = exports.toLiveStreamProduct = exports.toLiveStreams = exports.toLiveStream = exports.JOIN_RETRY_BASE_MS = exports.JOIN_ATTEMPTS = exports.ZegoLoginError = exports.toProductGid = exports.DEFAULT_OFF_AIR_GRACE_MS = exports.DEFAULT_REQUEST_TIMEOUT_MS = exports.LiveSellingTimeoutError = exports.LiveSellingError = exports.liveEngine = exports.LIVE_HAPTICS_TICK_GAP_MS = exports.createLiveHaptics = exports.liveHaptics = exports.default = exports.liveSelling = void 0;
34
+ exports.REPLAY_CAPABILITIES = exports.AUCTION_CAPABILITIES = exports.LIVE_CAPABILITIES = exports.capabilitiesFor = exports.CART_CARD_MS = exports.REACTION_MS = exports.SOLD_CARD_MS = exports.isTheEndedGiveaway = exports.withOffAirSettled = exports.isNothingOnAir = exports.nextExpiryAt = exports.roundClosesAt = exports.deriveStatus = exports.initialSessionState = exports.sessionReducer = exports.givenAwayVariant = exports.isTheVariant = exports.classifyComment = exports.openingBidFor = exports.GOOD_CHANCE_OVER = exports.VERY_HIGH_CHANCE_OVER = exports.QUICK_BID_STEPS = exports.BID_ON_ITS_WAY_MS = exports.isYourWin = exports.lotStateFor = exports.winChance = exports.quickBids = exports.bidRefusal = exports.showLinkDestination = exports.withLotFieldsFromRecord = exports.featuredFirst = exports.canPlayInCard = exports.liveShowFor = exports.sameRoomName = exports.viewerNameFor = exports.firstNameOf = exports.publicName = exports.withoutHiddenShows = exports.seesHiddenShows = exports.isHiddenShow = exports.isHiddenFrom = exports.prizeLinePrice = exports.isGiveawayPrizeLine = exports.GIVEAWAY_PRIZE_KEYS = exports.createShopifyLiveIdentity = exports.WIN_INDEX_KEY = exports.WINNING_BID_KEY = exports.AUCTION_CART_SOURCE_TYPE = exports.chargedVariantId = exports.liveProductFromShopify = void 0;
35
+ exports.ONGOING_LIVE_POLL_LIVE_MS = exports.ONGOING_LIVE_POLL_IDLE_MS = exports.createOngoingLiveStore = exports.COMMENT_SOURCES = exports.isLivePipSupported = exports.livePip = exports.IDLE_GIVEAWAY = exports.IDLE_AUCTION = void 0;
36
36
  // The imperative client (default + named).
37
37
  var liveSelling_1 = require("./liveSelling");
38
38
  Object.defineProperty(exports, "liveSelling", { enumerable: true, get: function () { return liveSelling_1.liveSelling; } });
39
39
  Object.defineProperty(exports, "default", { enumerable: true, get: function () { return liveSelling_1.liveSelling; } });
40
+ // Taps on the phone at a show's big moments (0.9.1): the app passes expo-haptics as `haptics` to
41
+ // `configure`; the web build does nothing.
42
+ var liveHaptics_1 = require("./liveHaptics");
43
+ Object.defineProperty(exports, "liveHaptics", { enumerable: true, get: function () { return liveHaptics_1.liveHaptics; } });
44
+ var phoneTaps_1 = require("./phoneTaps");
45
+ Object.defineProperty(exports, "createLiveHaptics", { enumerable: true, get: function () { return phoneTaps_1.createLiveHaptics; } });
46
+ Object.defineProperty(exports, "LIVE_HAPTICS_TICK_GAP_MS", { enumerable: true, get: function () { return phoneTaps_1.LIVE_HAPTICS_TICK_GAP_MS; } });
40
47
  // The live engine, exported on its own for direct use without the client.
41
48
  var engine_1 = require("./engine");
42
49
  Object.defineProperty(exports, "liveEngine", { enumerable: true, get: function () { return engine_1.engine; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;AAEH,2CAA2C;AAC3C,6CAAoE;AAA3D,0GAAA,WAAW,OAAA;AAAE,sGAAA,WAAW,OAAW;AAE5C,0EAA0E;AAC1E,mCAAgD;AAAvC,oGAAA,MAAM,OAAc;AAE7B,uGAAuG;AACvG,mCAMkB;AALhB,0GAAA,gBAAgB,OAAA;AAChB,iHAAA,uBAAuB,OAAA;AACvB,oHAAA,0BAA0B,OAAA;AAC1B,kHAAA,wBAAwB,OAAA;AACxB,sGAAA,YAAY,OAAA;AAEd,2CAAiF;AAAxE,4GAAA,cAAc,OAAA;AAAE,2GAAA,aAAa,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAE1D,yGAAyG;AACzG,qCAMmB;AALjB,uGAAA,YA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AA,mBAAmB,OAAA;AACnB,uGAAA,YAAY,OAAA;AACZ,wGAAA,aAAa,OAAA;AACb,uGAAA,YAAY,OAAA;AACZ,yGAAA,cAAc,OAAA;AACd,4GAAA,iBAAiB,OAAA;AACjB,6GAAA,kBAAkB,OAAA;AAClB,uGAAA,YAAY,OAAA;AACZ,sGAAA,WAAW,OAAA;AACX,uGAAA,YAAY,OAAA;AAEd,+CAOwB;AANtB,+GAAA,eAAe,OAAA;AACf,iHAAA,iBAAiB,OAAA;AACjB,oHAAA,oBAAoB,OAAA;AACpB,mHAAA,mBAAmB,OAAA;AACnB,4GAAA,YAAY,OAAA;AACZ,6GAAA,aAAa,OAAA;AAGf,kFAAkF;AAClF;;;;;;GAMG;AACH,4FAAuF;AAA9E,0HAAA,OAAO,OAAA;AAAE,qIAAA,kBAAkB,OAAA;AAEpC,iCAAiC;AACjC,iCAA0C;AAAjC,wGAAA,eAAe,OAAA;AAIxB;;;;;;;;;;;;GAYG;AACH,6CAOuB;AANrB,qHAAA,sBAAsB,OAAA;AACtB,wHAAA,yBAAyB,OAAA;AACzB,wHAAA,yBAAyB,OAAA;AAK3B,gDAA8B"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Taps on the phone at a show's big moments (`phoneTaps.ts`). This is the web build (and Node's): it
3
+ * does nothing. Phones get `liveHaptics.native.ts`, which taps through the module the app passes as
4
+ * `haptics` to `configure`.
5
+ */
6
+ export declare const liveHaptics: import("./phoneTaps").LiveHaptics;
7
+ //# sourceMappingURL=liveHaptics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"liveHaptics.d.ts","sourceRoot":"","sources":["../src/liveHaptics.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,WAAW,mCAAgC,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.liveHaptics = void 0;
4
+ const phoneTaps_1 = require("./phoneTaps");
5
+ /**
6
+ * Taps on the phone at a show's big moments (`phoneTaps.ts`). This is the web build (and Node's): it
7
+ * does nothing. Phones get `liveHaptics.native.ts`, which taps through the module the app passes as
8
+ * `haptics` to `configure`.
9
+ */
10
+ exports.liveHaptics = (0, phoneTaps_1.createLiveHaptics)(() => null);
11
+ //# sourceMappingURL=liveHaptics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"liveHaptics.js","sourceRoot":"","sources":["../src/liveHaptics.ts"],"names":[],"mappings":";;;AAAA,2CAAgD;AAEhD;;;;GAIG;AACU,QAAA,WAAW,GAAG,IAAA,6BAAiB,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Taps on the phone at a show's big moments (`phoneTaps.ts`), through the module the app passes as
3
+ * `haptics` to `configure` (expo-haptics). Nothing until then, or without one. The web gets
4
+ * `liveHaptics.ts`, which does nothing.
5
+ */
6
+ export declare const liveHaptics: import("./phoneTaps").LiveHaptics;
7
+ //# sourceMappingURL=liveHaptics.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"liveHaptics.native.d.ts","sourceRoot":"","sources":["../src/liveHaptics.native.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,WAAW,mCAAyE,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.liveHaptics = void 0;
4
+ const client_1 = require("./client");
5
+ const phoneTaps_1 = require("./phoneTaps");
6
+ /**
7
+ * Taps on the phone at a show's big moments (`phoneTaps.ts`), through the module the app passes as
8
+ * `haptics` to `configure` (expo-haptics). Nothing until then, or without one. The web gets
9
+ * `liveHaptics.ts`, which does nothing.
10
+ */
11
+ exports.liveHaptics = (0, phoneTaps_1.createLiveHaptics)(() => ((0, client_1.isConfigured)() ? (0, client_1.getConfig)().haptics : null));
12
+ //# sourceMappingURL=liveHaptics.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"liveHaptics.native.js","sourceRoot":"","sources":["../src/liveHaptics.native.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AACnD,2CAAgD;AAEhD;;;;GAIG;AACU,QAAA,WAAW,GAAG,IAAA,6BAAiB,EAAC,GAAG,EAAE,CAAC,CAAC,IAAA,qBAAY,GAAE,CAAC,CAAC,CAAC,IAAA,kBAAS,GAAE,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { LiveHapticsModule } from './types';
2
+ /** Ticks come at most this often, however fast they're asked for (20 a second). */
3
+ export declare const LIVE_HAPTICS_TICK_GAP_MS = 50;
4
+ /** Taps on the phone at a show's big moments. Each does nothing where haptics aren't available. */
5
+ export interface LiveHaptics {
6
+ /** A light click, like a picker wheel's: one name rolling past in a giveaway draw. */
7
+ tick(): void;
8
+ /** One firm knock: a moment to look up for (a bidding war starting). */
9
+ knock(): void;
10
+ /** The shopper won: the giveaway's draw landed on them, or an auction round closed on their bid. */
11
+ success(): void;
12
+ }
13
+ /**
14
+ * The taps over a haptics module (decided 2026-10-06, Head of Engineering: "Draw + auction moments",
15
+ * after Sparkl's roller on the giveaway draw). The module is read at each tap (`module()`), so a
16
+ * `configure` after the first render still counts.
17
+ *
18
+ * - **Ticks are capped** at one every `LIVE_HAPTICS_TICK_GAP_MS`: a long roster rolls past faster than
19
+ * a finger can feel, and old Amore's draw buzzed about 13 times a second on Android, one long rattle.
20
+ * - **Never in the way:** no module, nothing; a tap that fails (a build made before the module was
21
+ * added: expo-haptics rejects "not available") is dropped. A tap is never worth an error.
22
+ * - The phone's own settings still apply (iOS's System Haptics switch turns them all off).
23
+ */
24
+ export declare function createLiveHaptics(module: () => LiveHapticsModule | null | undefined, now?: () => number): LiveHaptics;
25
+ //# sourceMappingURL=phoneTaps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phoneTaps.d.ts","sourceRoot":"","sources":["../src/phoneTaps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,mGAAmG;AACnG,MAAM,WAAW,WAAW;IAC1B,sFAAsF;IACtF,IAAI,IAAI,IAAI,CAAC;IACb,wEAAwE;IACxE,KAAK,IAAI,IAAI,CAAC;IACd,oGAAoG;IACpG,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,iBAAiB,GAAG,IAAI,GAAG,SAAS,EAAE,GAAG,GAAE,MAAM,MAAiB,GAAG,WAAW,CAyB/H"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LIVE_HAPTICS_TICK_GAP_MS = void 0;
4
+ exports.createLiveHaptics = createLiveHaptics;
5
+ /** Ticks come at most this often, however fast they're asked for (20 a second). */
6
+ exports.LIVE_HAPTICS_TICK_GAP_MS = 50;
7
+ /**
8
+ * The taps over a haptics module (decided 2026-10-06, Head of Engineering: "Draw + auction moments",
9
+ * after Sparkl's roller on the giveaway draw). The module is read at each tap (`module()`), so a
10
+ * `configure` after the first render still counts.
11
+ *
12
+ * - **Ticks are capped** at one every `LIVE_HAPTICS_TICK_GAP_MS`: a long roster rolls past faster than
13
+ * a finger can feel, and old Amore's draw buzzed about 13 times a second on Android, one long rattle.
14
+ * - **Never in the way:** no module, nothing; a tap that fails (a build made before the module was
15
+ * added: expo-haptics rejects "not available") is dropped. A tap is never worth an error.
16
+ * - The phone's own settings still apply (iOS's System Haptics switch turns them all off).
17
+ */
18
+ function createLiveHaptics(module, now = Date.now) {
19
+ let lastTickAt = Number.NEGATIVE_INFINITY;
20
+ const quietly = (tap) => {
21
+ try {
22
+ const haptics = module();
23
+ if (!haptics)
24
+ return;
25
+ void tap(haptics).catch(() => undefined);
26
+ }
27
+ catch {
28
+ // A synchronous failure is dropped too.
29
+ }
30
+ };
31
+ return {
32
+ tick() {
33
+ const at = now();
34
+ if (at - lastTickAt < exports.LIVE_HAPTICS_TICK_GAP_MS)
35
+ return;
36
+ lastTickAt = at;
37
+ quietly((haptics) => haptics.selectionAsync());
38
+ },
39
+ knock() {
40
+ quietly((haptics) => haptics.impactAsync(haptics.ImpactFeedbackStyle.Heavy));
41
+ },
42
+ success() {
43
+ quietly((haptics) => haptics.notificationAsync(haptics.NotificationFeedbackType.Success));
44
+ },
45
+ };
46
+ }
47
+ //# sourceMappingURL=phoneTaps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phoneTaps.js","sourceRoot":"","sources":["../src/phoneTaps.ts"],"names":[],"mappings":";;;AA0BA,8CAyBC;AAjDD,mFAAmF;AACtE,QAAA,wBAAwB,GAAG,EAAE,CAAC;AAY3C;;;;;;;;;;GAUG;AACH,SAAgB,iBAAiB,CAAC,MAAkD,EAAE,MAAoB,IAAI,CAAC,GAAG;IAChH,IAAI,UAAU,GAAG,MAAM,CAAC,iBAAiB,CAAC;IAC1C,MAAM,OAAO,GAAG,CAAC,GAAkD,EAAE,EAAE;QACrE,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC;YACzB,IAAI,CAAC,OAAO;gBAAE,OAAO;YACrB,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;QAAC,MAAM,CAAC;YACP,wCAAwC;QAC1C,CAAC;IACH,CAAC,CAAC;IACF,OAAO;QACL,IAAI;YACF,MAAM,EAAE,GAAG,GAAG,EAAE,CAAC;YACjB,IAAI,EAAE,GAAG,UAAU,GAAG,gCAAwB;gBAAE,OAAO;YACvD,UAAU,GAAG,EAAE,CAAC;YAChB,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;QACjD,CAAC;QACD,KAAK;YACH,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC/E,CAAC;QACD,OAAO;YACL,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5F,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLiveSession.d.ts","sourceRoot":"","sources":["../../src/react/useLiveSession.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA4CvC,OAAO,KAAK,EASV,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AAiCzB;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,GAAG,OAAO,KAAK,WAAW,CAAC,IAAI,CAAC,CAIlE;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mGAAmG;IACnG,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACzD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAy9CD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,wBAAwB,+FA0CnF"}
1
+ {"version":3,"file":"useLiveSession.d.ts","sourceRoot":"","sources":["../../src/react/useLiveSession.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA4CvC,OAAO,KAAK,EASV,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AAwCzB;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,GAAG,OAAO,KAAK,WAAW,CAAC,IAAI,CAAC,CAIlE;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mGAAmG;IACnG,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACzD,QAAQ,EAAE,SAAS,CAAC;CACrB;AA2+CD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,wBAAwB,+FA0CnF"}
@@ -60,6 +60,12 @@ const LONGEST_TIMER_MS = 2147483647;
60
60
  * means the host is talking to nobody from inside a backgrounded app.
61
61
  */
62
62
  const PIP_GRANT_MS = 1200;
63
+ /**
64
+ * The longest a show's room waits for the signed-in customer to load on app open (`customerLoading`),
65
+ * so this viewer enters under their name. Past it the room is entered anyway: a slow sign-in must not
66
+ * keep the show away.
67
+ */
68
+ const NAME_WAIT_MS = 10000;
63
69
  /**
64
70
  * The device said it has no picture-in-picture (L21). Module state, because it is a fact about the
65
71
  * device rather than about one session: once heard, arming stops and the error is not reported again.
@@ -82,7 +88,7 @@ function useLiveSession() {
82
88
  /* Everything but the stream hold, which belongs to the provider component: it owns which stream this
83
89
  hook is watching, so it is the only thing that can pin it. */
84
90
  function useSessionValue(props) {
85
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
91
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
86
92
  const { streamingId, viewerName: viewerNameInput, onPipRestore } = props;
87
93
  const [state, dispatch] = (0, react_1.useReducer)(session_1.sessionReducer, session_1.initialSessionState);
88
94
  const [joining, setJoining] = (0, react_1.useState)(false);
@@ -154,6 +160,21 @@ function useSessionValue(props) {
154
160
  * uses the customer's own — so a comment sent now is held until it lands (L6).
155
161
  */
156
162
  const nameResolving = !namedBy && !!bidderId;
163
+ /**
164
+ * The signed-in customer is still loading (app open), so their name isn't known yet. The room
165
+ * waits for it, up to `NAME_WAIT_MS`: it is entered once, and the name it is entered under is the
166
+ * one the host sees join. Before 0.9.2 an app opened during a show joined at once, before the
167
+ * sign-in was read, and every shopper joined as "Anonymous" (2026-10-08).
168
+ */
169
+ const customerLoading = (_f = (_e = identity === null || identity === void 0 ? void 0 : identity.customerLoading) === null || _e === void 0 ? void 0 : _e.call(identity)) !== null && _f !== void 0 ? _f : false;
170
+ const [nameWaitOver, setNameWaitOver] = (0, react_1.useState)(false);
171
+ (0, react_1.useEffect)(() => {
172
+ if (!customerLoading)
173
+ return;
174
+ const timer = setTimeout(() => setNameWaitOver(true), NAME_WAIT_MS);
175
+ return () => clearTimeout(timer);
176
+ }, [customerLoading]);
177
+ const waitingForName = customerLoading && !nameWaitOver;
157
178
  const accountNameRef = (0, react_1.useRef)(accountName);
158
179
  accountNameRef.current = accountName;
159
180
  const namedByRef = (0, react_1.useRef)(namedBy);
@@ -220,6 +241,9 @@ function useSessionValue(props) {
220
241
  // effect re-runs and the viewer session takes the room back.
221
242
  if (state.guestMode)
222
243
  return;
244
+ // Entered once the shopper's name is known (`waitingForName`); this effect runs again when it is.
245
+ if (waitingForName)
246
+ return;
223
247
  /**
224
248
  * Off-device the engine is the no-op build, so a join would *succeed* — every stubbed call
225
249
  * resolves — and then no room state would ever arrive, leaving the status on `connecting` for
@@ -269,9 +293,10 @@ function useSessionValue(props) {
269
293
  .catch((caught) => logger.error(caught, { at: 'liveSession.leave' }));
270
294
  };
271
295
  // viewerName is intentionally excluded: it changes when the customer loads, and rejoining the
272
- // room mid-stream to relabel comments is not worth a video interruption.
296
+ // room mid-stream to relabel comments is not worth a video interruption. `waitingForName` only
297
+ // ever goes from true to false, before the room is entered.
273
298
  // eslint-disable-next-line react-hooks/exhaustive-deps
274
- }, [stream === null || stream === void 0 ? void 0 : stream.streamingId, stream === null || stream === void 0 ? void 0 : stream.status, state.guestMode]);
299
+ }, [stream === null || stream === void 0 ? void 0 : stream.streamingId, stream === null || stream === void 0 ? void 0 : stream.status, state.guestMode, waitingForName]);
275
300
  /**
276
301
  * Keep the muted list in step with the polled record.
277
302
  *
@@ -279,7 +304,7 @@ function useSessionValue(props) {
279
304
  * importantly an *unmute*, which is otherwise invisible until the app restarts. Keyed on the joined
280
305
  * ids because the array is a fresh object on every poll.
281
306
  */
282
- const mutedKey = ((_e = stream === null || stream === void 0 ? void 0 : stream.mutedDeviceIds) !== null && _e !== void 0 ? _e : []).join(',');
307
+ const mutedKey = ((_g = stream === null || stream === void 0 ? void 0 : stream.mutedDeviceIds) !== null && _g !== void 0 ? _g : []).join(',');
283
308
  (0, react_1.useEffect)(() => {
284
309
  if (!stream)
285
310
  return;
@@ -302,7 +327,7 @@ function useSessionValue(props) {
302
327
  */
303
328
  const nothingOnAir = (0, session_1.isNothingOnAir)({
304
329
  hasRead,
305
- streamStatus: (_f = stream === null || stream === void 0 ? void 0 : stream.status) !== null && _f !== void 0 ? _f : null,
330
+ streamStatus: (_h = stream === null || stream === void 0 ? void 0 : stream.status) !== null && _h !== void 0 ? _h : null,
306
331
  status: derivedStatus,
307
332
  });
308
333
  const graceMs = (0, client_1.offAirGraceMs)();
@@ -576,7 +601,7 @@ function useSessionValue(props) {
576
601
  * enter a giveaway they are already in.
577
602
  */
578
603
  const activeGiveaway = (0, react_1.useMemo)(() => { var _a; return (_a = stream === null || stream === void 0 ? void 0 : stream.giveaways.find((giveaway) => giveaway.status === 'active')) !== null && _a !== void 0 ? _a : null; }, [stream]);
579
- const customerRef = (_h = (_g = identity === null || identity === void 0 ? void 0 : identity.customerRef) === null || _g === void 0 ? void 0 : _g.call(identity)) !== null && _h !== void 0 ? _h : null;
604
+ const customerRef = (_k = (_j = identity === null || identity === void 0 ? void 0 : identity.customerRef) === null || _j === void 0 ? void 0 : _j.call(identity)) !== null && _k !== void 0 ? _k : null;
580
605
  /**
581
606
  * Closes the gap between the realtime giveaway start and the polled record it depends on.
582
607
  *
@@ -756,8 +781,8 @@ function useSessionValue(props) {
756
781
  * the first record after it is taken whatever it says. Joining counts as a reconnect, so arriving
757
782
  * costs one extra read.
758
783
  */
759
- const recordPin = (_j = stream === null || stream === void 0 ? void 0 : stream.pinnedComment) !== null && _j !== void 0 ? _j : null;
760
- const recordPinKey = `${watching !== null && watching !== void 0 ? watching : ''}\u0000${(_k = recordPin === null || recordPin === void 0 ? void 0 : recordPin.id) !== null && _k !== void 0 ? _k : ''}\u0000${(_l = recordPin === null || recordPin === void 0 ? void 0 : recordPin.text) !== null && _l !== void 0 ? _l : ''}`;
784
+ const recordPin = (_l = stream === null || stream === void 0 ? void 0 : stream.pinnedComment) !== null && _l !== void 0 ? _l : null;
785
+ const recordPinKey = `${watching !== null && watching !== void 0 ? watching : ''}\u0000${(_m = recordPin === null || recordPin === void 0 ? void 0 : recordPin.id) !== null && _m !== void 0 ? _m : ''}\u0000${(_o = recordPin === null || recordPin === void 0 ? void 0 : recordPin.text) !== null && _o !== void 0 ? _o : ''}`;
761
786
  const lastRecordPinKey = (0, react_1.useRef)(null);
762
787
  const takeNextRecordPin = (0, react_1.useRef)(false);
763
788
  (0, react_1.useEffect)(() => {
@@ -867,10 +892,10 @@ function useSessionValue(props) {
867
892
  return null;
868
893
  return (_f = products[0]) !== null && _f !== void 0 ? _f : null;
869
894
  }, [products, state.activeStoreProductId, stream]);
870
- const multiplier = (_o = (_m = state.multiplierOverride) !== null && _m !== void 0 ? _m : stream === null || stream === void 0 ? void 0 : stream.viewerMultiplier) !== null && _o !== void 0 ? _o : 1;
895
+ const multiplier = (_q = (_p = state.multiplierOverride) !== null && _p !== void 0 ? _p : stream === null || stream === void 0 ? void 0 : stream.viewerMultiplier) !== null && _q !== void 0 ? _q : 1;
871
896
  /* Same precedence as the multiplier: the host's live word wins, the record stands until they
872
897
  give one. Both fall back rather than throw, so a stream row missing `meta` still renders. */
873
- const reactionStyle = (_q = (_p = state.reactionModeOverride) !== null && _p !== void 0 ? _p : stream === null || stream === void 0 ? void 0 : stream.reactionStyle) !== null && _q !== void 0 ? _q : 'single';
898
+ const reactionStyle = (_s = (_r = state.reactionModeOverride) !== null && _r !== void 0 ? _r : stream === null || stream === void 0 ? void 0 : stream.reactionStyle) !== null && _s !== void 0 ? _s : 'single';
874
899
  /**
875
900
  * Percentages come off the raw counts, so the multiplier cannot skew them — it inflates only the
876
901
  * total on display, exactly as the host's own dashboard does.
@@ -948,7 +973,7 @@ function useSessionValue(props) {
948
973
  alive = false;
949
974
  };
950
975
  // eslint-disable-next-line react-hooks/exhaustive-deps
951
- }, [(_r = state.poll) === null || _r === void 0 ? void 0 : _r.pollUuid]);
976
+ }, [(_t = state.poll) === null || _t === void 0 ? void 0 : _t.pollUuid]);
952
977
  const bindVideoView = (0, react_1.useCallback)((reactTag, force = false) => {
953
978
  // Stopped because the app is away: a claim now would start it behind the app, with sound. The
954
979
  // surface claims again once the app is back (`LiveVideoTarget`'s foreground re-claim).
@@ -1194,7 +1219,7 @@ function useSessionValue(props) {
1194
1219
  * into a cart. It is also what comes back on the host's broadcast, so `isLeading` compares like
1195
1220
  * with like. Null when signed out, which is exactly when bidding is not offered.
1196
1221
  */
1197
- const bidderEmail = (_t = (_s = identity === null || identity === void 0 ? void 0 : identity.customerEmail) === null || _s === void 0 ? void 0 : _s.call(identity)) !== null && _t !== void 0 ? _t : null;
1222
+ const bidderEmail = (_v = (_u = identity === null || identity === void 0 ? void 0 : identity.customerEmail) === null || _u === void 0 ? void 0 : _u.call(identity)) !== null && _v !== void 0 ? _v : null;
1198
1223
  const bidder = (0, react_1.useMemo)(() => (bidderId ? { userId: bidderId, userName: viewerName, email: bidderEmail } : null), [bidderId, viewerName, bidderEmail]);
1199
1224
  /**
1200
1225
  * The hammer, with whether it is this shopper's (0.9.0): they led the round as it closed and the