@tiledev/sdk-apptile-live-selling 0.16.0 → 0.16.1

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 (410) hide show
  1. package/dist/attribution.d.ts +2 -16
  2. package/dist/attribution.d.ts.map +1 -1
  3. package/dist/attribution.js +4 -10
  4. package/dist/attribution.js.map +1 -1
  5. package/dist/auctions.d.ts.map +1 -1
  6. package/dist/auctions.js +11 -42
  7. package/dist/auctions.js.map +1 -1
  8. package/dist/cartAttributes.d.ts +0 -10
  9. package/dist/cartAttributes.d.ts.map +1 -1
  10. package/dist/cartAttributes.js +1 -20
  11. package/dist/cartAttributes.js.map +1 -1
  12. package/dist/client.d.ts +2 -51
  13. package/dist/client.d.ts.map +1 -1
  14. package/dist/client.js +23 -123
  15. package/dist/client.js.map +1 -1
  16. package/dist/clips.d.ts +1 -12
  17. package/dist/clips.d.ts.map +1 -1
  18. package/dist/clips.js +6 -114
  19. package/dist/clips.js.map +1 -1
  20. package/dist/commentLinks.d.ts +0 -29
  21. package/dist/commentLinks.d.ts.map +1 -1
  22. package/dist/commentLinks.js.map +1 -1
  23. package/dist/engine.native.d.ts.map +1 -1
  24. package/dist/engine.native.js +845 -17
  25. package/dist/engine.native.js.map +1 -1
  26. package/dist/index.d.ts +4 -48
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +3 -240
  29. package/dist/index.js.map +1 -1
  30. package/dist/polls.d.ts.map +1 -1
  31. package/dist/polls.js +0 -3
  32. package/dist/polls.js.map +1 -1
  33. package/dist/react/LiveSellingProvider.d.ts +1 -54
  34. package/dist/react/LiveSellingProvider.d.ts.map +1 -1
  35. package/dist/react/LiveSellingProvider.js +3 -60
  36. package/dist/react/LiveSellingProvider.js.map +1 -1
  37. package/dist/react/LiveVideoTarget.d.ts.map +1 -1
  38. package/dist/react/LiveVideoTarget.js +3 -41
  39. package/dist/react/LiveVideoTarget.js.map +1 -1
  40. package/dist/react/index.d.ts +3 -30
  41. package/dist/react/index.d.ts.map +1 -1
  42. package/dist/react/index.js +1 -79
  43. package/dist/react/index.js.map +1 -1
  44. package/dist/react/index.web.d.ts +32 -36
  45. package/dist/react/index.web.d.ts.map +1 -1
  46. package/dist/react/index.web.js +122 -102
  47. package/dist/react/index.web.js.map +1 -1
  48. package/dist/react/useAuctionBidGate.d.ts +6 -62
  49. package/dist/react/useAuctionBidGate.d.ts.map +1 -1
  50. package/dist/react/useAuctionBidGate.js +27 -228
  51. package/dist/react/useAuctionBidGate.js.map +1 -1
  52. package/dist/react/useAuctionWins.d.ts +4 -14
  53. package/dist/react/useAuctionWins.d.ts.map +1 -1
  54. package/dist/react/useAuctionWins.js +5 -16
  55. package/dist/react/useAuctionWins.js.map +1 -1
  56. package/dist/react/useClips.d.ts +1 -7
  57. package/dist/react/useClips.d.ts.map +1 -1
  58. package/dist/react/useClips.js +7 -20
  59. package/dist/react/useClips.js.map +1 -1
  60. package/dist/react/useLiveSession.d.ts +3 -15
  61. package/dist/react/useLiveSession.d.ts.map +1 -1
  62. package/dist/react/useLiveSession.js +199 -612
  63. package/dist/react/useLiveSession.js.map +1 -1
  64. package/dist/react/useLiveStreams.d.ts.map +1 -1
  65. package/dist/react/useLiveStreams.js +2 -6
  66. package/dist/react/useLiveStreams.js.map +1 -1
  67. package/dist/react/useOngoingLive.d.ts +0 -1
  68. package/dist/react/useOngoingLive.d.ts.map +1 -1
  69. package/dist/react/useOngoingLive.js +1 -7
  70. package/dist/react/useOngoingLive.js.map +1 -1
  71. package/dist/react/useReplays.d.ts +0 -12
  72. package/dist/react/useReplays.d.ts.map +1 -1
  73. package/dist/react/useReplays.js +24 -56
  74. package/dist/react/useReplays.js.map +1 -1
  75. package/dist/react/useStreamInfo.d.ts +2 -13
  76. package/dist/react/useStreamInfo.d.ts.map +1 -1
  77. package/dist/react/useStreamInfo.js +8 -36
  78. package/dist/react/useStreamInfo.js.map +1 -1
  79. package/dist/replays.d.ts +0 -14
  80. package/dist/replays.d.ts.map +1 -1
  81. package/dist/replays.js +22 -68
  82. package/dist/replays.js.map +1 -1
  83. package/dist/session.d.ts +6 -39
  84. package/dist/session.d.ts.map +1 -1
  85. package/dist/session.js +22 -209
  86. package/dist/session.js.map +1 -1
  87. package/dist/sessionTypes.d.ts +18 -217
  88. package/dist/sessionTypes.d.ts.map +1 -1
  89. package/dist/sessionTypes.js +1 -2
  90. package/dist/sessionTypes.js.map +1 -1
  91. package/dist/streams.d.ts +1 -27
  92. package/dist/streams.d.ts.map +1 -1
  93. package/dist/streams.js +21 -84
  94. package/dist/streams.js.map +1 -1
  95. package/dist/types.d.ts +10 -288
  96. package/dist/types.d.ts.map +1 -1
  97. package/dist/types.js +1 -2
  98. package/dist/types.js.map +1 -1
  99. package/dist/wire.d.ts +0 -31
  100. package/dist/wire.d.ts.map +1 -1
  101. package/dist/wire.js +0 -25
  102. package/dist/wire.js.map +1 -1
  103. package/dist/zego.d.ts +1 -3
  104. package/dist/zego.d.ts.map +1 -1
  105. package/dist/zego.js +1 -1
  106. package/package.json +1 -1
  107. package/dist/auctionComments.d.ts +0 -25
  108. package/dist/auctionComments.d.ts.map +0 -1
  109. package/dist/auctionComments.js +0 -28
  110. package/dist/auctionComments.js.map +0 -1
  111. package/dist/auctionRules.d.ts +0 -77
  112. package/dist/auctionRules.d.ts.map +0 -1
  113. package/dist/auctionRules.js +0 -107
  114. package/dist/auctionRules.js.map +0 -1
  115. package/dist/cartExtension.d.ts +0 -39
  116. package/dist/cartExtension.d.ts.map +0 -1
  117. package/dist/cartExtension.js +0 -51
  118. package/dist/cartExtension.js.map +0 -1
  119. package/dist/checkoutRefused.d.ts +0 -9
  120. package/dist/checkoutRefused.d.ts.map +0 -1
  121. package/dist/checkoutRefused.js +0 -16
  122. package/dist/checkoutRefused.js.map +0 -1
  123. package/dist/clipsPage.d.ts +0 -29
  124. package/dist/clipsPage.d.ts.map +0 -1
  125. package/dist/clipsPage.js +0 -49
  126. package/dist/clipsPage.js.map +0 -1
  127. package/dist/commentHistory.d.ts +0 -70
  128. package/dist/commentHistory.d.ts.map +0 -1
  129. package/dist/commentHistory.js +0 -133
  130. package/dist/commentHistory.js.map +0 -1
  131. package/dist/commentLinkCards.d.ts +0 -11
  132. package/dist/commentLinkCards.d.ts.map +0 -1
  133. package/dist/commentLinkCards.js +0 -70
  134. package/dist/commentLinkCards.js.map +0 -1
  135. package/dist/giveawayPrize.d.ts +0 -13
  136. package/dist/giveawayPrize.d.ts.map +0 -1
  137. package/dist/giveawayPrize.js +0 -18
  138. package/dist/giveawayPrize.js.map +0 -1
  139. package/dist/giveawayPrizeLines.d.ts +0 -120
  140. package/dist/giveawayPrizeLines.d.ts.map +0 -1
  141. package/dist/giveawayPrizeLines.js +0 -97
  142. package/dist/giveawayPrizeLines.js.map +0 -1
  143. package/dist/giveawayPrizes.d.ts +0 -20
  144. package/dist/giveawayPrizes.d.ts.map +0 -1
  145. package/dist/giveawayPrizes.js +0 -50
  146. package/dist/giveawayPrizes.js.map +0 -1
  147. package/dist/giveawayRoster.d.ts +0 -53
  148. package/dist/giveawayRoster.d.ts.map +0 -1
  149. package/dist/giveawayRoster.js +0 -93
  150. package/dist/giveawayRoster.js.map +0 -1
  151. package/dist/heldComments.d.ts +0 -40
  152. package/dist/heldComments.d.ts.map +0 -1
  153. package/dist/heldComments.js +0 -75
  154. package/dist/heldComments.js.map +0 -1
  155. package/dist/hiddenShows.d.ts +0 -44
  156. package/dist/hiddenShows.d.ts.map +0 -1
  157. package/dist/hiddenShows.js +0 -53
  158. package/dist/hiddenShows.js.map +0 -1
  159. package/dist/linkLots.d.ts +0 -64
  160. package/dist/linkLots.d.ts.map +0 -1
  161. package/dist/linkLots.js +0 -84
  162. package/dist/linkLots.js.map +0 -1
  163. package/dist/liveHaptics.d.ts +0 -7
  164. package/dist/liveHaptics.d.ts.map +0 -1
  165. package/dist/liveHaptics.js +0 -11
  166. package/dist/liveHaptics.js.map +0 -1
  167. package/dist/liveHaptics.native.d.ts +0 -7
  168. package/dist/liveHaptics.native.d.ts.map +0 -1
  169. package/dist/liveHaptics.native.js +0 -12
  170. package/dist/liveHaptics.native.js.map +0 -1
  171. package/dist/livePages.d.ts +0 -176
  172. package/dist/livePages.d.ts.map +0 -1
  173. package/dist/livePages.js +0 -216
  174. package/dist/livePages.js.map +0 -1
  175. package/dist/liveRoom.d.ts +0 -21
  176. package/dist/liveRoom.d.ts.map +0 -1
  177. package/dist/liveRoom.js +0 -28
  178. package/dist/liveRoom.js.map +0 -1
  179. package/dist/liveShow.d.ts +0 -65
  180. package/dist/liveShow.d.ts.map +0 -1
  181. package/dist/liveShow.js +0 -65
  182. package/dist/liveShow.js.map +0 -1
  183. package/dist/missedPolls.d.ts +0 -27
  184. package/dist/missedPolls.d.ts.map +0 -1
  185. package/dist/missedPolls.js +0 -16
  186. package/dist/missedPolls.js.map +0 -1
  187. package/dist/pageOptions.d.ts +0 -149
  188. package/dist/pageOptions.d.ts.map +0 -1
  189. package/dist/pageOptions.js +0 -123
  190. package/dist/pageOptions.js.map +0 -1
  191. package/dist/pageTypes.d.ts +0 -185
  192. package/dist/pageTypes.d.ts.map +0 -1
  193. package/dist/pageTypes.js +0 -3
  194. package/dist/pageTypes.js.map +0 -1
  195. package/dist/phoneTaps.d.ts +0 -25
  196. package/dist/phoneTaps.d.ts.map +0 -1
  197. package/dist/phoneTaps.js +0 -47
  198. package/dist/phoneTaps.js.map +0 -1
  199. package/dist/pipWindow.d.ts +0 -85
  200. package/dist/pipWindow.d.ts.map +0 -1
  201. package/dist/pipWindow.js +0 -88
  202. package/dist/pipWindow.js.map +0 -1
  203. package/dist/react/clocks.d.ts +0 -29
  204. package/dist/react/clocks.d.ts.map +0 -1
  205. package/dist/react/clocks.js +0 -124
  206. package/dist/react/clocks.js.map +0 -1
  207. package/dist/react/navigation.d.ts +0 -13
  208. package/dist/react/navigation.d.ts.map +0 -1
  209. package/dist/react/navigation.js +0 -7
  210. package/dist/react/navigation.js.map +0 -1
  211. package/dist/react/platformSession.d.ts +0 -16
  212. package/dist/react/platformSession.d.ts.map +0 -1
  213. package/dist/react/platformSession.js +0 -28
  214. package/dist/react/platformSession.js.map +0 -1
  215. package/dist/react/platformSession.web.d.ts +0 -35
  216. package/dist/react/platformSession.web.d.ts.map +0 -1
  217. package/dist/react/platformSession.web.js +0 -148
  218. package/dist/react/platformSession.web.js.map +0 -1
  219. package/dist/react/replayPlayer.d.ts +0 -83
  220. package/dist/react/replayPlayer.d.ts.map +0 -1
  221. package/dist/react/replayPlayer.js +0 -315
  222. package/dist/react/replayPlayer.js.map +0 -1
  223. package/dist/react/share.d.ts +0 -22
  224. package/dist/react/share.d.ts.map +0 -1
  225. package/dist/react/share.js +0 -45
  226. package/dist/react/share.js.map +0 -1
  227. package/dist/react/shopifyProviders.d.ts +0 -82
  228. package/dist/react/shopifyProviders.d.ts.map +0 -1
  229. package/dist/react/shopifyProviders.js +0 -113
  230. package/dist/react/shopifyProviders.js.map +0 -1
  231. package/dist/react/showPages.d.ts +0 -106
  232. package/dist/react/showPages.d.ts.map +0 -1
  233. package/dist/react/showPages.js +0 -166
  234. package/dist/react/showPages.js.map +0 -1
  235. package/dist/react/showPagesOnDevice.d.ts +0 -18
  236. package/dist/react/showPagesOnDevice.d.ts.map +0 -1
  237. package/dist/react/showPagesOnDevice.js +0 -31
  238. package/dist/react/showPagesOnDevice.js.map +0 -1
  239. package/dist/react/startSignIn.d.ts +0 -3
  240. package/dist/react/startSignIn.d.ts.map +0 -1
  241. package/dist/react/startSignIn.js +0 -19
  242. package/dist/react/startSignIn.js.map +0 -1
  243. package/dist/react/systemPictureInPicture.d.ts +0 -34
  244. package/dist/react/systemPictureInPicture.d.ts.map +0 -1
  245. package/dist/react/systemPictureInPicture.js +0 -93
  246. package/dist/react/systemPictureInPicture.js.map +0 -1
  247. package/dist/react/useAccountName.d.ts +0 -8
  248. package/dist/react/useAccountName.d.ts.map +0 -1
  249. package/dist/react/useAccountName.js +0 -49
  250. package/dist/react/useAccountName.js.map +0 -1
  251. package/dist/react/useClipsPage.d.ts +0 -47
  252. package/dist/react/useClipsPage.d.ts.map +0 -1
  253. package/dist/react/useClipsPage.js +0 -130
  254. package/dist/react/useClipsPage.js.map +0 -1
  255. package/dist/react/useCommentLinkCards.d.ts +0 -6
  256. package/dist/react/useCommentLinkCards.d.ts.map +0 -1
  257. package/dist/react/useCommentLinkCards.js +0 -67
  258. package/dist/react/useCommentLinkCards.js.map +0 -1
  259. package/dist/react/useFeaturedClip.d.ts +0 -15
  260. package/dist/react/useFeaturedClip.d.ts.map +0 -1
  261. package/dist/react/useFeaturedClip.js +0 -52
  262. package/dist/react/useFeaturedClip.js.map +0 -1
  263. package/dist/react/useGiveawayEntry.d.ts +0 -59
  264. package/dist/react/useGiveawayEntry.d.ts.map +0 -1
  265. package/dist/react/useGiveawayEntry.js +0 -170
  266. package/dist/react/useGiveawayEntry.js.map +0 -1
  267. package/dist/react/useGiveawayPrize.d.ts +0 -12
  268. package/dist/react/useGiveawayPrize.d.ts.map +0 -1
  269. package/dist/react/useGiveawayPrize.js +0 -53
  270. package/dist/react/useGiveawayPrize.js.map +0 -1
  271. package/dist/react/useGiveawayPrizes.d.ts +0 -4
  272. package/dist/react/useGiveawayPrizes.d.ts.map +0 -1
  273. package/dist/react/useGiveawayPrizes.js +0 -58
  274. package/dist/react/useGiveawayPrizes.js.map +0 -1
  275. package/dist/react/useHiddenShows.d.ts +0 -10
  276. package/dist/react/useHiddenShows.d.ts.map +0 -1
  277. package/dist/react/useHiddenShows.js +0 -30
  278. package/dist/react/useHiddenShows.js.map +0 -1
  279. package/dist/react/useKeepScreenAwake.d.ts +0 -2
  280. package/dist/react/useKeepScreenAwake.d.ts.map +0 -1
  281. package/dist/react/useKeepScreenAwake.js +0 -34
  282. package/dist/react/useKeepScreenAwake.js.map +0 -1
  283. package/dist/react/useLiveAuction.d.ts +0 -106
  284. package/dist/react/useLiveAuction.d.ts.map +0 -1
  285. package/dist/react/useLiveAuction.js +0 -255
  286. package/dist/react/useLiveAuction.js.map +0 -1
  287. package/dist/react/useLiveChat.d.ts +0 -110
  288. package/dist/react/useLiveChat.d.ts.map +0 -1
  289. package/dist/react/useLiveChat.js +0 -230
  290. package/dist/react/useLiveChat.js.map +0 -1
  291. package/dist/react/useLiveGiveawaysAndPolls.d.ts +0 -95
  292. package/dist/react/useLiveGiveawaysAndPolls.d.ts.map +0 -1
  293. package/dist/react/useLiveGiveawaysAndPolls.js +0 -225
  294. package/dist/react/useLiveGiveawaysAndPolls.js.map +0 -1
  295. package/dist/react/useLivePage.d.ts +0 -136
  296. package/dist/react/useLivePage.d.ts.map +0 -1
  297. package/dist/react/useLivePage.js +0 -319
  298. package/dist/react/useLivePage.js.map +0 -1
  299. package/dist/react/useLiveShop.d.ts +0 -97
  300. package/dist/react/useLiveShop.d.ts.map +0 -1
  301. package/dist/react/useLiveShop.js +0 -197
  302. package/dist/react/useLiveShop.js.map +0 -1
  303. package/dist/react/useLiveShow.d.ts +0 -3
  304. package/dist/react/useLiveShow.d.ts.map +0 -1
  305. package/dist/react/useLiveShow.js +0 -21
  306. package/dist/react/useLiveShow.js.map +0 -1
  307. package/dist/react/useMySilentAuctionBids.d.ts +0 -29
  308. package/dist/react/useMySilentAuctionBids.d.ts.map +0 -1
  309. package/dist/react/useMySilentAuctionBids.js +0 -157
  310. package/dist/react/useMySilentAuctionBids.js.map +0 -1
  311. package/dist/react/useReplayPage.d.ts +0 -155
  312. package/dist/react/useReplayPage.d.ts.map +0 -1
  313. package/dist/react/useReplayPage.js +0 -580
  314. package/dist/react/useReplayPage.js.map +0 -1
  315. package/dist/react/useSilentAuctionLot.d.ts +0 -44
  316. package/dist/react/useSilentAuctionLot.d.ts.map +0 -1
  317. package/dist/react/useSilentAuctionLot.js +0 -168
  318. package/dist/react/useSilentAuctionLot.js.map +0 -1
  319. package/dist/react/useSilentAuctionLots.d.ts +0 -41
  320. package/dist/react/useSilentAuctionLots.d.ts.map +0 -1
  321. package/dist/react/useSilentAuctionLots.js +0 -64
  322. package/dist/react/useSilentAuctionLots.js.map +0 -1
  323. package/dist/react/useSilentAuctionRounds.d.ts +0 -15
  324. package/dist/react/useSilentAuctionRounds.d.ts.map +0 -1
  325. package/dist/react/useSilentAuctionRounds.js +0 -44
  326. package/dist/react/useSilentAuctionRounds.js.map +0 -1
  327. package/dist/replayPages.d.ts +0 -31
  328. package/dist/replayPages.d.ts.map +0 -1
  329. package/dist/replayPages.js +0 -34
  330. package/dist/replayPages.js.map +0 -1
  331. package/dist/shopifyCommerce.d.ts +0 -204
  332. package/dist/shopifyCommerce.d.ts.map +0 -1
  333. package/dist/shopifyCommerce.js +0 -217
  334. package/dist/shopifyCommerce.js.map +0 -1
  335. package/dist/shopifyIdentity.d.ts +0 -61
  336. package/dist/shopifyIdentity.d.ts.map +0 -1
  337. package/dist/shopifyIdentity.js +0 -61
  338. package/dist/shopifyIdentity.js.map +0 -1
  339. package/dist/shopifyIds.d.ts +0 -9
  340. package/dist/shopifyIds.d.ts.map +0 -1
  341. package/dist/shopifyIds.js +0 -18
  342. package/dist/shopifyIds.js.map +0 -1
  343. package/dist/showCredit.d.ts +0 -89
  344. package/dist/showCredit.d.ts.map +0 -1
  345. package/dist/showCredit.js +0 -120
  346. package/dist/showCredit.js.map +0 -1
  347. package/dist/showLinks.d.ts +0 -24
  348. package/dist/showLinks.d.ts.map +0 -1
  349. package/dist/showLinks.js +0 -23
  350. package/dist/showLinks.js.map +0 -1
  351. package/dist/showLots.d.ts +0 -44
  352. package/dist/showLots.d.ts.map +0 -1
  353. package/dist/showLots.js +0 -70
  354. package/dist/showLots.js.map +0 -1
  355. package/dist/showNames.d.ts +0 -77
  356. package/dist/showNames.d.ts.map +0 -1
  357. package/dist/showNames.js +0 -143
  358. package/dist/showNames.js.map +0 -1
  359. package/dist/showPages.d.ts +0 -56
  360. package/dist/showPages.d.ts.map +0 -1
  361. package/dist/showPages.js +0 -48
  362. package/dist/showPages.js.map +0 -1
  363. package/dist/silentAuctionFeed.d.ts +0 -49
  364. package/dist/silentAuctionFeed.d.ts.map +0 -1
  365. package/dist/silentAuctionFeed.js +0 -242
  366. package/dist/silentAuctionFeed.js.map +0 -1
  367. package/dist/silentAuctionRules.d.ts +0 -253
  368. package/dist/silentAuctionRules.d.ts.map +0 -1
  369. package/dist/silentAuctionRules.js +0 -489
  370. package/dist/silentAuctionRules.js.map +0 -1
  371. package/dist/silentAuctions.d.ts +0 -65
  372. package/dist/silentAuctions.d.ts.map +0 -1
  373. package/dist/silentAuctions.js +0 -272
  374. package/dist/silentAuctions.js.map +0 -1
  375. package/dist/storeData.d.ts +0 -16
  376. package/dist/storeData.d.ts.map +0 -1
  377. package/dist/storeData.js +0 -19
  378. package/dist/storeData.js.map +0 -1
  379. package/dist/ui/BubbleFrame.d.ts +0 -38
  380. package/dist/ui/BubbleFrame.d.ts.map +0 -1
  381. package/dist/ui/BubbleFrame.js +0 -181
  382. package/dist/ui/BubbleFrame.js.map +0 -1
  383. package/dist/ui/LiveBubble.d.ts +0 -43
  384. package/dist/ui/LiveBubble.d.ts.map +0 -1
  385. package/dist/ui/LiveBubble.js +0 -116
  386. package/dist/ui/LiveBubble.js.map +0 -1
  387. package/dist/ui/ReplayBubble.d.ts +0 -23
  388. package/dist/ui/ReplayBubble.d.ts.map +0 -1
  389. package/dist/ui/ReplayBubble.js +0 -71
  390. package/dist/ui/ReplayBubble.js.map +0 -1
  391. package/dist/ui.d.ts +0 -27
  392. package/dist/ui.d.ts.map +0 -1
  393. package/dist/ui.js +0 -34
  394. package/dist/ui.js.map +0 -1
  395. package/dist/unreadRoomMessages.d.ts +0 -26
  396. package/dist/unreadRoomMessages.d.ts.map +0 -1
  397. package/dist/unreadRoomMessages.js +0 -62
  398. package/dist/unreadRoomMessages.js.map +0 -1
  399. package/dist/viewerRules.d.ts +0 -38
  400. package/dist/viewerRules.d.ts.map +0 -1
  401. package/dist/viewerRules.js +0 -46
  402. package/dist/viewerRules.js.map +0 -1
  403. package/dist/winsAttribution.d.ts +0 -22
  404. package/dist/winsAttribution.d.ts.map +0 -1
  405. package/dist/winsAttribution.js +0 -49
  406. package/dist/winsAttribution.js.map +0 -1
  407. package/dist/zegoEngine.d.ts +0 -173
  408. package/dist/zegoEngine.d.ts.map +0 -1
  409. package/dist/zegoEngine.js +0 -1069
  410. package/dist/zegoEngine.js.map +0 -1
@@ -1,113 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ShopifyLiveSellingProvider = ShopifyLiveSellingProvider;
7
- exports.ShopifyLiveSessionProvider = ShopifyLiveSessionProvider;
8
- /**
9
- * The live-selling providers for an app on `@tiledev/sdk-shopify` (0.14.0, moved from amore-v2's
10
- * `AppLiveSellingProvider` and `AppLiveSessionProvider`, `src/core/providers/liveSelling.tsx` and
11
- * `liveSession.tsx`): `LiveSellingProvider` and `LiveSessionProvider` filled in from the app's own
12
- * sdk-shopify client (`shopify`) and customer (`useCustomer`), so the app passes only its config.
13
- *
14
- * `createElement` rather than JSX, like the rest of the package, so this stays a plain `.ts`.
15
- */
16
- const async_storage_1 = __importDefault(require("@react-native-async-storage/async-storage"));
17
- const sdk_shopify_1 = require("@tiledev/sdk-shopify");
18
- const react_1 = require("react");
19
- const pageOptions_1 = require("../pageOptions");
20
- const shopifyCommerce_1 = require("../shopifyCommerce");
21
- const shopifyIdentity_1 = require("../shopifyIdentity");
22
- const showNames_1 = require("../showNames");
23
- const winsAttribution_1 = require("../winsAttribution");
24
- const LiveSellingProvider_1 = require("./LiveSellingProvider");
25
- const platformSession_1 = require("./platformSession");
26
- /**
27
- * `LiveSellingProvider` on the app's sdk-shopify client and customer (the README's §4 "On Shopify"):
28
- * products from Shopify at the card photo size; the wins checkout, a cart of its own (a won lot stamped
29
- * `_winningBid`, a prize `prizeWriteKey`) with `source_name`, `source_type: "auction"` and `auction_id`
30
- * for the order webhook; and the bidder, the customer's numeric id, only for a Shopify sign-in (the
31
- * winner's record is on the Customer Account API). The phone's storage keeps the poll votes, a
32
- * signed-out shopper's name and the accepted terms across relaunches. Hidden shows (`hiddenShows`) are
33
- * hidden from every shopper whose email isn't the team's: the signed-in customer's email is the
34
- * provider's `viewerEmail`, so a sign-in reaches every screen at once. What the store stops the customer
35
- * doing is the provider's `viewerRestrictions`, from their tags (sdk-shopify's `useCustomerTags`, read by
36
- * `viewerRestrictionsFromTags`, the store-data standard, 0.16.0): `BIDBLOCKED` or `APPBLOCKED` blocks bidding, `APPBLOCKED` mutes their
37
- * comments, and a bid while the tags are unread waits for them.
38
- *
39
- * Mount it inside sdk-shopify's `ShopifyProvider`, above the navigator. `routes`, `track`, `onWarning`
40
- * and `shopName` (and `blockedNames`, `reactionLimit`, `onReactionLimitReached`) pass through to `LiveSellingProvider`.
41
- */
42
- function ShopifyLiveSellingProvider({ children, config, cartSourceName, prizeWriteKey, imageTransform = sdk_shopify_1.CARD_IMAGE, wins, attribution, ...pageProps }) {
43
- var _a, _b;
44
- const customer = (0, sdk_shopify_1.useCustomer)();
45
- const attributionEnabled = (attribution === null || attribution === void 0 ? void 0 : attribution.enabled) === true;
46
- const tags = (0, sdk_shopify_1.useCustomerTags)();
47
- const { refresh: refreshTags } = tags;
48
- const { bidding, commentsMuted } = (0, pageOptions_1.viewerRestrictionsFromTags)(tags.tags, tags.known);
49
- const viewerRestrictions = (0, react_1.useMemo)(() => ({ bidding, commentsMuted, refresh: () => void refreshTags() }), [bidding, commentsMuted, refreshTags]);
50
- const latestCustomer = (0, react_1.useRef)(customer);
51
- latestCustomer.current = customer;
52
- const liveConfig = (0, react_1.useMemo)(() => {
53
- var _a;
54
- const signedIn = (0, shopifyIdentity_1.createShopifyLiveIdentity)(() => latestCustomer.current);
55
- return {
56
- ...config,
57
- storage: (_a = config.storage) !== null && _a !== void 0 ? _a : async_storage_1.default,
58
- identity: signedIn.identity,
59
- customerAccountRequest: signedIn.customerAccountRequest,
60
- commerce: (0, shopifyCommerce_1.createShopifyLiveCommerce)({
61
- shopify: sdk_shopify_1.shopify,
62
- cartSourceName,
63
- prizeWriteKey,
64
- buyer: signedIn.buyer,
65
- imageTransform,
66
- ...wins,
67
- extraCartAttributes: (lines) => (0, winsAttribution_1.winsCartAttributes)(lines, attributionEnabled, wins === null || wins === void 0 ? void 0 : wins.extraCartAttributes),
68
- }),
69
- };
70
- }, [config, cartSourceName, prizeWriteKey, imageTransform, wins, attributionEnabled]);
71
- return (0, react_1.createElement)(LiveSellingProvider_1.LiveSellingProvider, {
72
- ...pageProps,
73
- config: liveConfig,
74
- viewerEmail: (_b = (_a = customer.customer) === null || _a === void 0 ? void 0 : _a.email) !== null && _b !== void 0 ? _b : null,
75
- viewerRestrictions,
76
- children,
77
- });
78
- }
79
- /**
80
- * The app's one live session (`LiveSessionProvider`; decided 2026-10-05 by amore-v2's Head of
81
- * Engineering: joined app-wide, as Freckled Poppy). Mount it above the navigator, inside
82
- * `ShopifyLiveSellingProvider`, because Zego's engine holds exactly one room and several places show
83
- * the same show: the Live tab's card, the Live screen and the bubble. Each binds to the picture with
84
- * `LiveVideoTarget`; none owns the room.
85
- *
86
- * - **`viewerName`** is the signed-in shopper's (`viewerNameFor`: first and last name, else whichever
87
- * the account has; never an email nor its part before the @), so a name edited on Account reaches the
88
- * room without a restart. Null with no name on the account, or signed out, so a name the shopper typed
89
- * on this phone stays in charge (the comment box asks for one: `useLivePage`'s chat).
90
- * - **`blockedNames`**: the names nobody watching may go by. `LiveSellingProvider`'s (0.15.0: the list
91
- * the name asks check too, so the session and the sheets agree), unless one is passed here; Host and
92
- * Moderator unless the app says otherwise.
93
- * - **`onPipRestore`**: the phone's picture-in-picture window, opened from the Live screen and then
94
- * expanded (or, on iOS, left up when the shopper came back by the app's icon), comes back to the Live
95
- * screen (`routes.openLive`). A window opened from the bubble goes back to the bubble instead, which
96
- * the session does itself without calling this. An `onPipRestore` of the app's own replaces it.
97
- */
98
- function ShopifyLiveSessionProvider({ children, onPipRestore, blockedNames, ...props }) {
99
- const { customer } = (0, sdk_shopify_1.useCustomer)();
100
- const { routes, blockedNames: providerBlockedNames } = (0, LiveSellingProvider_1.useLivePageOptions)();
101
- const backToTheLiveShow = (0, react_1.useMemo)(() => onPipRestore !== null && onPipRestore !== void 0 ? onPipRestore : ((streamId) => {
102
- if (streamId)
103
- routes.openLive(streamId);
104
- }), [onPipRestore, routes]);
105
- return (0, react_1.createElement)(platformSession_1.LiveSessionProvider, {
106
- ...props,
107
- viewerName: (0, showNames_1.viewerNameFor)(customer),
108
- blockedNames: blockedNames !== null && blockedNames !== void 0 ? blockedNames : providerBlockedNames,
109
- onPipRestore: backToTheLiveShow,
110
- children,
111
- });
112
- }
113
- //# sourceMappingURL=shopifyProviders.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shopifyProviders.js","sourceRoot":"","sources":["../../src/react/shopifyProviders.ts"],"names":[],"mappings":";;;;;AA2EA,gEAgDC;AAyBD,gEAkBC;AAtKD;;;;;;;GAOG;AACH,8FAAqE;AACrE,sDAAyF;AACzF,iCAAuD;AAGvD,gDAA4D;AAC5D,wDAA4H;AAC5H,wDAA+D;AAC/D,4CAA6C;AAC7C,wDAAwD;AAExD,+DAA+G;AAC/G,uDAAwD;AAuCxD;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,MAAM,EACN,cAAc,EACd,aAAa,EACb,cAAc,GAAG,wBAAU,EAC3B,IAAI,EACJ,WAAW,EACX,GAAG,SAAS,EACoB;;IAChC,MAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAC;IAC/B,MAAM,kBAAkB,GAAG,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,MAAK,IAAI,CAAC;IACzD,MAAM,IAAI,GAAG,IAAA,6BAAe,GAAE,CAAC;IAC/B,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IACtC,MAAM,EAAE,OAAO,EAAE,a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G,SAAS;QACZ,MAAM,EAAE,UAAU;QAClB,WAAW,EAAE,MAAA,MAAA,QAAQ,CAAC,QAAQ,0CAAE,KAAK,mCAAI,IAAI;QAC7C,kBAAkB;QAClB,QAAQ;KACT,CAAC,CAAC;AACL,CAAC;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,0BAA0B,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,KAAK,EAAmC;IAC5H,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,yBAAW,GAAE,CAAC;IACnC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAAG,IAAA,wCAAkB,GAAE,CAAC;IAC5E,MAAM,iBAAiB,GAAG,IAAA,eAAO,EAC/B,GAAG,EAAE,CACH,YAAY,aAAZ,YAAY,cAAZ,YAAY,GACZ,CAAC,CAAC,QAA4B,EAAE,EAAE;QAChC,IAAI,QAAQ;YAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC,CAAC,EACJ,CAAC,YAAY,EAAE,MAAM,CAAC,CACvB,CAAC;IACF,OAAO,IAAA,qBAAa,EAAC,qCAAmB,EAAE;QACxC,GAAG,KAAK;QACR,UAAU,EAAE,IAAA,yBAAa,EAAC,QAAQ,CAAC;QACnC,YAAY,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,oBAAoB;QAClD,YAAY,EAAE,iBAAiB;QAC/B,QAAQ;KACT,CAAC,CAAC;AACL,CAAC"}
@@ -1,106 +0,0 @@
1
- import { type SessionForCard } from '../liveShow';
2
- import { type ShowListStatus } from '../showPages';
3
- import type { LiveStream, Replay } from '../types';
4
- import type { AuctionWinRow, UseAuctionWinsState } from './useAuctionWins';
5
- /** Recordings per read: the gateway's own page size. */
6
- export declare const SHOWS_PAGE_SIZE = 20;
7
- export interface UseItemsYouWonPageOptions {
8
- /** Someone is signed in (the wins are on the customer's record): sdk-shopify's `useCustomer().loggedIn`. */
9
- signedIn: boolean;
10
- /** A stored session is still being read on app open (`useCustomer().restoring`). */
11
- restoring?: boolean;
12
- /** Checkout is starting (an `initiateCheckout`): what is being paid for. */
13
- onCheckoutStarted?: (wins: {
14
- totalItems: number;
15
- totalValue: number;
16
- currency: string;
17
- }) => void;
18
- /** The wins' own cart is ready: the app opens its checkout page on `checkoutUrl`. */
19
- onCheckoutReady?: (checkout: {
20
- checkoutUrl: string;
21
- cartId?: string;
22
- }) => void;
23
- /** The cart couldn't be built; `message` says so (the SDK's words). */
24
- onCheckoutFailed?: (message: string) => void;
25
- }
26
- export interface ItemsYouWonPage<TRaw = unknown> {
27
- /**
28
- * `signedOut` (and not reading a stored session), `loading` (that session, or the first read with
29
- * nothing shown), `failed` (with nothing to show), `empty` (nothing won), `ready`.
30
- */
31
- status: 'signedOut' | 'loading' | 'failed' | 'empty' | 'ready';
32
- rows: AuctionWinRow<TRaw>[];
33
- /** The sum of the bids, in the wins' currency: nothing comes off (prizes are free). */
34
- total: {
35
- amount: string;
36
- currencyCode: string;
37
- };
38
- /** A read is running with wins on screen (a pull). */
39
- refreshing: boolean;
40
- /** Reads the wins again (a pull, the failed state's Try again). */
41
- refresh: () => void;
42
- /** Call each time the tab comes into view: reads the wins again when signed in. Keeps one identity. */
43
- viewed: () => void;
44
- /** Builds the wins' own cart (each lot at its bid, prizes free), then `onCheckoutReady`. */
45
- checkout: () => void;
46
- checkingOut: boolean;
47
- }
48
- /** The Items You Won tab, over `useAuctionWins`' state. */
49
- export declare function useItemsYouWonPageFor<TRaw = unknown>(wins: UseAuctionWinsState<TRaw>, options: UseItemsYouWonPageOptions): ItemsYouWonPage<TRaw>;
50
- /** What the page models read of the app's live session. */
51
- export type SessionForShowPages = SessionForCard & {
52
- viewerCount: number;
53
- };
54
- export interface UseLiveHubPageOptions {
55
- /** The tab is the screen on show (`useIsFocused()`): only then does its card play the show. */
56
- screenOnShow: boolean;
57
- }
58
- export interface LiveHubPage {
59
- /** The show on air (the app-wide `useOngoingLive`), or null. */
60
- onAir: LiveStream | null;
61
- /** How many are watching, once the session is in the show's room and has said; else null. */
62
- viewerCount: number | null;
63
- /** The card may play the show, muted (`canPlayInCard`): one picture at a time. */
64
- videoActive: boolean;
65
- /** The recordings this viewer can see, playable only, in the archive's order. */
66
- replays: Replay[];
67
- /** Where the recordings stand (`showListStatus`): never `empty` or `failed` while a show is on air. */
68
- status: ShowListStatus;
69
- /** The next page is on its way, with recordings on screen. */
70
- loadingMore: boolean;
71
- /** The next page, half a screen from the end: one ask at a time, none after the archive's end. */
72
- loadMore: () => void;
73
- /** A pull is running. */
74
- refreshing: boolean;
75
- /** Reads the show on air and the recordings' first page again. */
76
- pullToRefresh: () => void;
77
- /** Reads both again, without the pull's spinner (the failed state's Try again). */
78
- refresh: () => void;
79
- /**
80
- * Call each time the tab comes into view: reads the show on air again, and on a return visit the
81
- * recordings' first page too, unless the shopper has scrolled past it (a first-page read drops the
82
- * pages below, and their place). Keeps one identity.
83
- */
84
- viewed: () => void;
85
- }
86
- /** The Live tab over a session. */
87
- export declare function useLiveHubPageFor(session: SessionForShowPages, { screenOnShow }: UseLiveHubPageOptions): LiveHubPage;
88
- export interface LiveRail {
89
- /** The show on air, or null. */
90
- onAir: LiveStream | null;
91
- /** The rail's card may play the show, muted (`canPlayInCard`). */
92
- videoActive: boolean;
93
- /** The recent recordings, playable only. */
94
- replays: Replay[];
95
- /** Reads the show on air and the first page of recordings again (with the screen's own pull). */
96
- refresh: () => Promise<void>;
97
- /**
98
- * Call each time the screen comes into view: reads the show on air again and, on a return visit, the
99
- * recordings (`readsRecordingsAgainOnView`), so a show that ended meanwhile reaches the rail (before
100
- * ENG-928 only the show on air was read again, and the rail waited for a pull or a relaunch).
101
- */
102
- viewed: () => void;
103
- }
104
- /** A home screen's live rail over a session. */
105
- export declare function useLiveRailFor(session: SessionForCard, { screenOnShow }: UseLiveHubPageOptions): LiveRail;
106
- //# sourceMappingURL=showPages.d.ts.map
@@ -1 +0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YAAY,EAAE,EAAE,qBAAqB,GAAG,WAAW,CAmEpH;AAID,MAAM,WAAW,QAAQ;IACvB,gCAAgC;IAChC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,kEAAkE;IAClE,WAAW,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,iGAAiG;IACjG,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B;;;;OAIG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,gDAAgD;AAChD,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,YAAY,EAAE,EAAE,qBAAqB,GAAG,QAAQ,CA0BzG"}
@@ -1,166 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SHOWS_PAGE_SIZE = void 0;
4
- exports.useItemsYouWonPageFor = useItemsYouWonPageFor;
5
- exports.useLiveHubPageFor = useLiveHubPageFor;
6
- exports.useLiveRailFor = useLiveRailFor;
7
- /**
8
- * Live selling's page models (0.11.0, moved from amore-v2's page hooks): the Items You Won tab, the Live
9
- * tab (`LiveHub`) and a home screen's live rail. Each is the `…For` hook here, given the session or the
10
- * wins it reads, so the web entry can hand it its idle stand-ins; the app calls the plain names
11
- * (`useItemsYouWonPage`, `useLiveHubPage`, `useLiveRail`), which read them itself. No words, no
12
- * formatting, no navigation: where the shopper goes is the app's `on…` option.
13
- */
14
- const react_1 = require("react");
15
- const liveShow_1 = require("../liveShow");
16
- const showPages_1 = require("../showPages");
17
- const LiveSellingProvider_1 = require("./LiveSellingProvider");
18
- const useOngoingLive_1 = require("./useOngoingLive");
19
- const useReplays_1 = require("./useReplays");
20
- /** Recordings per read: the gateway's own page size. */
21
- exports.SHOWS_PAGE_SIZE = 20;
22
- const CHECKOUT_FAILED = 'Could not start checkout. Please try again.';
23
- /** The Items You Won tab, over `useAuctionWins`' state. */
24
- function useItemsYouWonPageFor(wins, options) {
25
- const optionsRef = (0, react_1.useRef)(options);
26
- optionsRef.current = options;
27
- const { refresh: readWins, checkout: buildCart } = wins;
28
- const total = (0, react_1.useMemo)(() => (0, showPages_1.winsTotal)(wins.rows), [wins.rows]);
29
- const hasWins = wins.rows.length > 0;
30
- const viewed = (0, react_1.useCallback)(() => {
31
- if (optionsRef.current.signedIn)
32
- readWins();
33
- }, [readWins]);
34
- const rowsRef = (0, react_1.useRef)(wins.rows);
35
- rowsRef.current = wins.rows;
36
- const checkout = (0, react_1.useCallback)(() => {
37
- var _a, _b;
38
- const rows = rowsRef.current;
39
- const totals = (0, showPages_1.winsTotal)(rows);
40
- (_b = (_a = optionsRef.current).onCheckoutStarted) === null || _b === void 0 ? void 0 : _b.call(_a, { totalItems: rows.length, totalValue: Number(totals.amount), currency: totals.currencyCode });
41
- void (async () => {
42
- var _a, _b, _c, _d;
43
- // A refused checkout's own words (0.16.0: what the shopper should do), else the usual retry message.
44
- let failure = CHECKOUT_FAILED;
45
- const cart = await buildCart({ onFailed: (message) => (failure = message) });
46
- if (!cart) {
47
- (_b = (_a = optionsRef.current).onCheckoutFailed) === null || _b === void 0 ? void 0 : _b.call(_a, failure);
48
- return;
49
- }
50
- (_d = (_c = optionsRef.current).onCheckoutReady) === null || _d === void 0 ? void 0 : _d.call(_c, cart);
51
- })();
52
- }, [buildCart]);
53
- const { signedIn, restoring = false } = options;
54
- let status;
55
- if (!signedIn && !restoring)
56
- status = 'signedOut';
57
- else if (restoring || (wins.loading && !hasWins))
58
- status = 'loading';
59
- else if (hasWins)
60
- status = 'ready';
61
- else
62
- status = wins.error ? 'failed' : 'empty';
63
- return {
64
- status,
65
- rows: wins.rows,
66
- total,
67
- refreshing: wins.loading && hasWins,
68
- refresh: readWins,
69
- viewed,
70
- checkout,
71
- checkingOut: wins.checkingOut,
72
- };
73
- }
74
- /** The Live tab over a session. */
75
- function useLiveHubPageFor(session, { screenOnShow }) {
76
- var _a;
77
- const { ready } = (0, LiveSellingProvider_1.useLiveSelling)();
78
- const onAirRead = (0, useOngoingLive_1.useOngoingLive)();
79
- const recordings = (0, useReplays_1.useReplays)({ pageSize: exports.SHOWS_PAGE_SIZE, playableOnly: true });
80
- const { refresh: refreshOnAir } = onAirRead;
81
- const { refresh: refreshRecordings, loadMore: readNextPage, hasRead, hasMore, loading, error } = recordings;
82
- const shownCount = recordings.replays.length;
83
- const onAir = onAirRead.liveNow;
84
- const sessionInTheRoom = !!onAir && ((_a = session.stream) === null || _a === void 0 ? void 0 : _a.streamingId) === onAir.streamingId;
85
- const viewerCount = sessionInTheRoom && session.viewerCount > 0 ? session.viewerCount : null;
86
- // One ask at a time: `useReplays` moves its offset with every answer, so two asks would skip a page.
87
- // Not after a first read that failed with nothing to show: the failed state's Try again reads again.
88
- const [loadingNextPage, setLoadingNextPage] = (0, react_1.useState)(false);
89
- const askingForNextPage = (0, react_1.useRef)(false);
90
- const loadMore = (0, react_1.useCallback)(() => {
91
- if (askingForNextPage.current || !ready || !hasRead || !hasMore || loading || (!!error && shownCount === 0))
92
- return;
93
- askingForNextPage.current = true;
94
- setLoadingNextPage(true);
95
- void readNextPage().finally(() => {
96
- askingForNextPage.current = false;
97
- setLoadingNextPage(false);
98
- });
99
- }, [ready, hasRead, hasMore, loading, error, shownCount, readNextPage]);
100
- // Everything read so far was hidden from this viewer and the archive goes on: read on.
101
- const readingOn = (0, showPages_1.readsOnPastHidden)({ hasRead, shownCount, hasMore, failed: !!error });
102
- (0, react_1.useEffect)(() => {
103
- if (readingOn && !loading)
104
- loadMore();
105
- }, [readingOn, loading, loadMore]);
106
- const refreshBoth = (0, react_1.useCallback)(() => Promise.all([refreshOnAir(), refreshRecordings()]), [refreshOnAir, refreshRecordings]);
107
- const [refreshing, setRefreshing] = (0, react_1.useState)(false);
108
- const pullToRefresh = (0, react_1.useCallback)(() => {
109
- setRefreshing(true);
110
- void refreshBoth().finally(() => setRefreshing(false));
111
- }, [refreshBoth]);
112
- const refresh = (0, react_1.useCallback)(() => void refreshBoth(), [refreshBoth]);
113
- const latest = (0, react_1.useRef)({ ready, loading, shownCount, refreshOnAir, refreshRecordings });
114
- latest.current = { ready, loading, shownCount, refreshOnAir, refreshRecordings };
115
- const visitedBefore = (0, react_1.useRef)(false);
116
- const viewed = (0, react_1.useCallback)(() => {
117
- const firstVisit = !visitedBefore.current;
118
- visitedBefore.current = true;
119
- const now = latest.current;
120
- if (!now.ready)
121
- return; // The reads start by themselves once the SDK is ready.
122
- void now.refreshOnAir();
123
- if ((0, showPages_1.readsRecordingsAgainOnView)({ firstVisit, loading: now.loading, shownCount: now.shownCount, pageSize: exports.SHOWS_PAGE_SIZE })) {
124
- void now.refreshRecordings();
125
- }
126
- }, []);
127
- return {
128
- onAir,
129
- viewerCount,
130
- videoActive: (0, liveShow_1.canPlayInCard)({ session, show: onAir, screenOnShow }),
131
- replays: recordings.replays,
132
- status: (0, showPages_1.showListStatus)({ hasRead, loading, shownCount, hasMore, failed: !!error, onAir: !!onAir }),
133
- loadingMore: loadingNextPage && shownCount > 0,
134
- loadMore,
135
- refreshing,
136
- pullToRefresh,
137
- refresh,
138
- viewed,
139
- };
140
- }
141
- /** A home screen's live rail over a session. */
142
- function useLiveRailFor(session, { screenOnShow }) {
143
- const { liveNow, refresh: refreshOnAir } = (0, useOngoingLive_1.useOngoingLive)();
144
- const { replays, loading, refresh: refreshRecordings } = (0, useReplays_1.useReplays)({ pageSize: exports.SHOWS_PAGE_SIZE, playableOnly: true });
145
- const refresh = (0, react_1.useCallback)(() => Promise.all([refreshOnAir(), refreshRecordings()]).then(() => undefined), [refreshOnAir, refreshRecordings]);
146
- const latest = (0, react_1.useRef)({ loading, shownCount: replays.length, refreshOnAir, refreshRecordings });
147
- latest.current = { loading, shownCount: replays.length, refreshOnAir, refreshRecordings };
148
- const visitedBefore = (0, react_1.useRef)(false);
149
- const viewed = (0, react_1.useCallback)(() => {
150
- const firstVisit = !visitedBefore.current;
151
- visitedBefore.current = true;
152
- const now = latest.current;
153
- void now.refreshOnAir();
154
- if ((0, showPages_1.readsRecordingsAgainOnView)({ firstVisit, loading: now.loading, shownCount: now.shownCount, pageSize: exports.SHOWS_PAGE_SIZE })) {
155
- void now.refreshRecordings();
156
- }
157
- }, []);
158
- return {
159
- onAir: liveNow,
160
- videoActive: (0, liveShow_1.canPlayInCard)({ session, show: liveNow, screenOnShow }),
161
- replays,
162
- refresh,
163
- viewed,
164
- };
165
- }
166
- //# sourceMappingURL=showPages.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showPages.js","sourceRoot":"","sources":["../../src/react/showPages.ts"],"names":[],"mappings":";;;AA0DA,sDAiDC;AA0CD,8CAmEC;AAsBD,wCA0BC;AAxQD;;;;;;GAMG;AACH,iCAA0E;AAE1E,0CAAiE;AACjE,4CAA6H;AAE7H,+DAAuD;AAEvD,qDAAkD;AAClD,6CAA0C;AAE1C,wDAAwD;AAC3C,QAAA,eAAe,GAAG,EAAE,CAAC;AAqClC,MAAM,eAAe,GAAG,6CAA6C,CAAC;AAEtE,2DAA2D;AAC3D,SAAgB,qBAAqB,CACnC,IAA+B,EAC/B,OAAkC;IAElC,MAAM,UAAU,GAAG,IAAA,cAAM,EAAC,OAAO,CAAC,CAAC;IACnC,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;IAC7B,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IACxD,MAAM,KAAK,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAA,qBAAS,EAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAErC,MAAM,MAAM,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC9B,IAAI,UAAU,CAAC,OAAO,CAAC,QAAQ;YAAE,QAAQ,EA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AY,EAAE,iBAAiB,CAAC,CAClC,CAAC;IACF,MAAM,MAAM,GAAG,IAAA,cAAM,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC,CAAC;IAChG,MAAM,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAC1F,MAAM,aAAa,GAAG,IAAA,cAAM,EAAC,KAAK,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC9B,MAAM,UAAU,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC;QAC1C,aAAa,CAAC,OAAO,GAAG,IAAI,CAAC;QAC7B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;QAC3B,KAAK,GAAG,CAAC,YAAY,EAAE,CAAC;QACxB,IAAI,IAAA,sCAA0B,EAAC,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,uBAAe,EAAE,CAAC,EAAE,CAAC;YAC5H,KAAK,GAAG,CAAC,iBAAiB,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,OAAO;QACL,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,IAAA,wBAAa,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;QACpE,OAAO;QACP,OAAO;QACP,MAAM;KACP,CAAC;AACJ,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * The page models on a device: each reads the real wins or the app's live session. The web entry
3
- * (`index.web.ts`) builds the same three over its idle stand-ins.
4
- */
5
- import { type ItemsYouWonPage, type LiveHubPage, type LiveRail, type UseItemsYouWonPageOptions, type UseLiveHubPageOptions } from './showPages';
6
- /**
7
- * The Items You Won tab (0.11.0): the lots and prizes the shopper won and hasn't paid for
8
- * (`useAuctionWins`), its states, and its checkout on a cart of its own.
9
- */
10
- export declare function useItemsYouWonPage<TRaw = unknown>(options: UseItemsYouWonPageOptions): ItemsYouWonPage<TRaw>;
11
- /**
12
- * The Live tab (0.11.0): the show on air, playing muted on its card when it may, and the recordings,
13
- * paged through the whole archive, refreshed on each visit and on a pull.
14
- */
15
- export declare function useLiveHubPage(options: UseLiveHubPageOptions): LiveHubPage;
16
- /** A home screen's live rail (0.11.0): the show on air and the recent recordings. */
17
- export declare function useLiveRail(options: UseLiveHubPageOptions): LiveRail;
18
- //# sourceMappingURL=showPagesOnDevice.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showPagesOnDevice.d.ts","sourceRoot":"","sources":["../../src/react/showPagesOnDevice.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAIrB;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,yBAAyB,GAAG,eAAe,CAAC,IAAI,CAAC,CAE5G;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,WAAW,CAE1E;AAED,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,OAAO,EAAE,qBAAqB,GAAG,QAAQ,CAEpE"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useItemsYouWonPage = useItemsYouWonPage;
4
- exports.useLiveHubPage = useLiveHubPage;
5
- exports.useLiveRail = useLiveRail;
6
- /**
7
- * The page models on a device: each reads the real wins or the app's live session. The web entry
8
- * (`index.web.ts`) builds the same three over its idle stand-ins.
9
- */
10
- const showPages_1 = require("./showPages");
11
- const useAuctionWins_1 = require("./useAuctionWins");
12
- const useLiveSession_1 = require("./useLiveSession");
13
- /**
14
- * The Items You Won tab (0.11.0): the lots and prizes the shopper won and hasn't paid for
15
- * (`useAuctionWins`), its states, and its checkout on a cart of its own.
16
- */
17
- function useItemsYouWonPage(options) {
18
- return (0, showPages_1.useItemsYouWonPageFor)((0, useAuctionWins_1.useAuctionWins)(), options);
19
- }
20
- /**
21
- * The Live tab (0.11.0): the show on air, playing muted on its card when it may, and the recordings,
22
- * paged through the whole archive, refreshed on each visit and on a pull.
23
- */
24
- function useLiveHubPage(options) {
25
- return (0, showPages_1.useLiveHubPageFor)((0, useLiveSession_1.useLiveSession)(), options);
26
- }
27
- /** A home screen's live rail (0.11.0): the show on air and the recent recordings. */
28
- function useLiveRail(options) {
29
- return (0, showPages_1.useLiveRailFor)((0, useLiveSession_1.useLiveSession)(), options);
30
- }
31
- //# sourceMappingURL=showPagesOnDevice.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showPagesOnDevice.js","sourceRoot":"","sources":["../../src/react/showPagesOnDevice.ts"],"names":[],"mappings":";;AAqBA,gDAEC;AAMD,wCAEC;AAGD,kCAEC;AApCD;;;GAGG;AACH,2CASqB;AACrB,qDAAkD;AAClD,qDAAkD;AAElD;;;GAGG;AACH,SAAgB,kBAAkB,CAAiB,OAAkC;IACnF,OAAO,IAAA,iCAAqB,EAAC,IAAA,+BAAc,GAAQ,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAC,OAA8B;IAC3D,OAAO,IAAA,6BAAiB,EAAC,IAAA,+BAAc,GAAE,EAAE,OAAO,CAAC,CAAC;AACtD,CAAC;AAED,qFAAqF;AACrF,SAAgB,WAAW,CAAC,OAA8B;IACxD,OAAO,IAAA,0BAAc,EAAC,IAAA,+BAAc,GAAE,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC"}
@@ -1,3 +0,0 @@
1
- /** Calls the app's `startSignIn`; a failure to start it, thrown or rejected, is logged at `at`. */
2
- export declare function startTheSignIn(startSignIn: () => unknown, at: string): void;
3
- //# sourceMappingURL=startSignIn.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"startSignIn.d.ts","sourceRoot":"","sources":["../../src/react/startSignIn.ts"],"names":[],"mappings":"AAOA,mGAAmG;AACnG,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,OAAO,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAM3E"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.startTheSignIn = startTheSignIn;
4
- /**
5
- * Starting the app's sign-in from a hook (0.9.0): the bid gate and the giveaway entry both hand the
6
- * shopper to the app's own sign-in, and neither may let a sign-in that fails to start throw into the
7
- * tap that asked for it.
8
- */
9
- const client_1 = require("../client");
10
- /** Calls the app's `startSignIn`; a failure to start it, thrown or rejected, is logged at `at`. */
11
- function startTheSignIn(startSignIn, at) {
12
- try {
13
- void Promise.resolve(startSignIn()).catch((caught) => (0, client_1.getLogger)().error(caught, { at }));
14
- }
15
- catch (caught) {
16
- (0, client_1.getLogger)().error(caught, { at });
17
- }
18
- }
19
- //# sourceMappingURL=startSignIn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"startSignIn.js","sourceRoot":"","sources":["../../src/react/startSignIn.ts"],"names":[],"mappings":";;AAQA,wCAMC;AAdD;;;;GAIG;AACH,sCAAsC;AAEtC,mGAAmG;AACnG,SAAgB,cAAc,CAAC,WAA0B,EAAE,EAAU;IACnE,IAAI,CAAC;QACH,KAAK,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAA,kBAAS,GAAE,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3F,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,IAAA,kBAAS,GAAE,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACpC,CAAC;AACH,CAAC"}
@@ -1,34 +0,0 @@
1
- /** When the arming is said again: at once, then across the second or so in which the other view may still go. */
2
- export declare const REARM_AT_MS: readonly number[];
3
- /** How long the phone has to open its window, after the app goes to the background, before the sound stops. */
4
- export declare const WINDOW_GRACE_MS = 1200;
5
- /**
6
- * Whether this surface asks the phone to take its picture into a window when the app is put away:
7
- * `startsPictureInPictureAutomatically` for its `VideoView`.
8
- *
9
- * @param enabled This surface draws the video now. Pass the condition it is drawn under, so the arming is
10
- * said again each time it takes the picture back: the race runs both ways.
11
- */
12
- export declare function useAutoPictureInPicture(enabled: boolean): boolean;
13
- export interface BackgroundPauseGuardOptions {
14
- /** Whether the phone's window shows the recording now (the surfaces report it). Read when the time is up. */
15
- inWindow: () => boolean;
16
- /** Stops the recording's sound. */
17
- pause: () => void;
18
- /** The app is back: play on, if it should. */
19
- resume: () => void;
20
- graceMs?: number;
21
- setTimer?: (run: () => void, ms: number) => unknown;
22
- clearTimer?: (timer: unknown) => void;
23
- }
24
- /**
25
- * Follows the app going away and coming back, for a recording that may be in the phone's window: going to
26
- * the background, it pauses after `graceMs` unless a window has the picture by then; coming back, it plays
27
- * on (whatever paused it while away). Plain, so it is tested on its own; the player feeds it AppState.
28
- */
29
- export declare function backgroundPauseGuard({ inWindow, pause, resume, graceMs, setTimer, clearTimer, }: BackgroundPauseGuardOptions): {
30
- /** The app's state, as AppState reports it. */
31
- appStateChanged(state: string): void;
32
- stop: () => void;
33
- };
34
- //# sourceMappingURL=systemPictureInPicture.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"systemPictureInPicture.d.ts","sourceRoot":"","sources":["../../src/react/systemPictureInPicture.ts"],"names":[],"mappings":"AAuBA,iHAAiH;AACjH,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAA6B,CAAC;AAEvE,+GAA+G;AAC/G,eAAO,MAAM,eAAe,OAAQ,CAAC;AAErC;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAsBjE;AAED,MAAM,WAAW,2BAA2B;IAC1C,6GAA6G;IAC7G,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,mCAAmC;IACnC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,8CAA8C;IAC9C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IACpD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACvC;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,KAAK,EACL,MAAM,EACN,OAAyB,EACzB,QAA2C,EAC3C,UAA4E,GAC7E,EAAE,2BAA2B;IAO1B,+CAA+C;2BACxB,MAAM;;EAehC"}
@@ -1,93 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WINDOW_GRACE_MS = exports.REARM_AT_MS = void 0;
4
- exports.useAutoPictureInPicture = useAutoPictureInPicture;
5
- exports.backgroundPauseGuard = backgroundPauseGuard;
6
- /**
7
- * The phone's own picture-in-picture window for a recorded show (0.15.2, ENG-941: "pip is not showing in
8
- * the live replay while minimising the app"; Freckled Poppy's, which does it, ported).
9
- *
10
- * Two surfaces draw the app's replay player (`replayPlayer.ts`): the Replay screen and the in-app bubble.
11
- * Each lets the phone take its picture into a window when the app is put away (expo-video's
12
- * `allowsPictureInPicture` with `startsPictureInPictureAutomatically`). Two things make that work:
13
- *
14
- * - **Arming, re-asserted across the hand-over** (`useAutoPictureInPicture`). On Android expo-video keeps
15
- * the automatic-window flag on the **activity**, not the view, and a view leaving the screen clears it
16
- * (`VideoView.onDetachedFromWindow`) after the view arriving has set it: the screen shrinking into the
17
- * bubble left nothing armed (seen on a OnePlus, Android 15, by Freckled Poppy on 2026-08-17). The view
18
- * leaving goes late (react-native-screens keeps a screen until its animation ends, whose length varies),
19
- * so the arming is said again across about two seconds. Each time it goes false for a frame and back to
20
- * true, because expo-video ignores a set to the value it already has. Neither value is visible: the flag
21
- * only decides what happens when the app is put away.
22
- * - **The sound stops if no window opens** (`backgroundPauseGuard`). On iOS the player stays active in the
23
- * background (expo-video otherwise pauses every player as the app goes, before the window can take it),
24
- * so a recording the phone doesn't take into a window would talk on behind the app. If no window has
25
- * opened `WINDOW_GRACE_MS` after the app goes to the background, it is paused.
26
- */
27
- const react_1 = require("react");
28
- /** When the arming is said again: at once, then across the second or so in which the other view may still go. */
29
- exports.REARM_AT_MS = [250, 600, 1200, 2000];
30
- /** How long the phone has to open its window, after the app goes to the background, before the sound stops. */
31
- exports.WINDOW_GRACE_MS = 1200;
32
- /**
33
- * Whether this surface asks the phone to take its picture into a window when the app is put away:
34
- * `startsPictureInPictureAutomatically` for its `VideoView`.
35
- *
36
- * @param enabled This surface draws the video now. Pass the condition it is drawn under, so the arming is
37
- * said again each time it takes the picture back: the race runs both ways.
38
- */
39
- function useAutoPictureInPicture(enabled) {
40
- const [armed, setArmed] = (0, react_1.useState)(false);
41
- (0, react_1.useEffect)(() => {
42
- if (!enabled) {
43
- setArmed(false);
44
- return;
45
- }
46
- let frame;
47
- const sayItAgain = () => {
48
- setArmed(false);
49
- frame = requestAnimationFrame(() => setArmed(true));
50
- };
51
- sayItAgain();
52
- const timers = exports.REARM_AT_MS.map((delay) => setTimeout(sayItAgain, delay));
53
- return () => {
54
- timers.forEach(clearTimeout);
55
- if (frame !== undefined)
56
- cancelAnimationFrame(frame);
57
- };
58
- }, [enabled]);
59
- return armed;
60
- }
61
- /**
62
- * Follows the app going away and coming back, for a recording that may be in the phone's window: going to
63
- * the background, it pauses after `graceMs` unless a window has the picture by then; coming back, it plays
64
- * on (whatever paused it while away). Plain, so it is tested on its own; the player feeds it AppState.
65
- */
66
- function backgroundPauseGuard({ inWindow, pause, resume, graceMs = exports.WINDOW_GRACE_MS, setTimer = (run, ms) => setTimeout(run, ms), clearTimer = (timer) => clearTimeout(timer), }) {
67
- let timer = null;
68
- const cancel = () => {
69
- if (timer !== null)
70
- clearTimer(timer);
71
- timer = null;
72
- };
73
- return {
74
- /** The app's state, as AppState reports it. */
75
- appStateChanged(state) {
76
- if (state === 'active') {
77
- cancel();
78
- resume();
79
- return;
80
- }
81
- if (state !== 'background')
82
- return;
83
- cancel();
84
- timer = setTimer(() => {
85
- timer = null;
86
- if (!inWindow())
87
- pause();
88
- }, graceMs);
89
- },
90
- stop: cancel,
91
- };
92
- }
93
- //# sourceMappingURL=systemPictureInPicture.js.map