@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,319 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RESTRICTIONS_REFRESH_MS = void 0;
4
- exports.useLivePage = useLivePage;
5
- /**
6
- * The Live screen's page model (0.14.0, moved from amore-v2's `src/core/hooks/useLivePage.ts`:
7
- * Freckled Poppy's Live, phase 1, watching and the in-app bubble; 0.15.0 adds its links and the cart
8
- * hold's timer, from amore-v2's `eng928/integration`). The routes are the app's (`LiveSellingProvider`'s
9
- * `routes`); the route's `streamId` param is read here.
10
- */
11
- const sdk_analytics_core_1 = require("@tiledev/sdk-analytics-core");
12
- const sdk_shopify_1 = require("@tiledev/sdk-shopify");
13
- const react_1 = require("react");
14
- const react_native_1 = require("react-native");
15
- const client_1 = require("../client");
16
- const hiddenShows_1 = require("../hiddenShows");
17
- const liveSelling_1 = require("../liveSelling");
18
- const linkLots_1 = require("../linkLots");
19
- const livePages_1 = require("../livePages");
20
- const pageOptions_1 = require("../pageOptions");
21
- const sessionTypes_1 = require("../sessionTypes");
22
- const LiveSellingProvider_1 = require("./LiveSellingProvider");
23
- const platformSession_1 = require("./platformSession");
24
- const replayPlayer_1 = require("./replayPlayer");
25
- const useKeepScreenAwake_1 = require("./useKeepScreenAwake");
26
- const useLiveChat_1 = require("./useLiveChat");
27
- const useStreamInfo_1 = require("./useStreamInfo");
28
- const navigation_1 = require("./navigation");
29
- /**
30
- * Shows already reported as joined (`liveJoin`) in this run of the app: once per show per run, so a
31
- * trip through the bubble, the Cart or another screen and back isn't a second join (amore-v2's audit,
32
- * L5: production reported on every viewer-count tick).
33
- */
34
- const joinedThisRun = new Set();
35
- /** How often the Live screen reads the store's restrictions again while on show. */
36
- exports.RESTRICTIONS_REFRESH_MS = 60000;
37
- /**
38
- * Everything the Live screen wires, so the screen stays plain tiles. Call it from the Live screen and
39
- * from each of its tiles' wiring: every call reads the same session.
40
- *
41
- * - **The session is the app's** (`ShopifyLiveSessionProvider`), joined above the navigator; this
42
- * screen binds to its picture (the player tile's `LiveVideoTarget`) and never owns the room.
43
- * - **Pinned to the route's show** while watching (`holdStream(streamId)`, at every arrival), so a host
44
- * restarting the broadcast can't swap the room underneath; released when the shopper closes the show
45
- * (back on a show that has ended or is still joining, ✕ on the bubble, or leaving any other way
46
- * without the bubble), and kept when the bubble takes the show.
47
- * - **Which show** (`useLiveShow`): the session's record once it is this show's (just after the pin it
48
- * can still hold the last show's), where it stands, and whether it is on air.
49
- * - **Where the link lands** (`streams.destinationFor`, one read of the show's record on arrival): a
50
- * show on air stays; an ended show with a recording is replaced by its Replay
51
- * (`routes.replaceWithReplay`); anything else (a rehearsal this shopper can't see included) by the
52
- * Live tab (`routes.backToLiveTab`). Not on the web, where nothing can play: the Tile preview stays on
53
- * this page to show its tiles, with the record's poster and the ended words.
54
- * - **Every arrival** reads the record again (`refreshStreamRecords`, which restarts the session's
55
- * off-air wait, so a push tapped in the foreground can't be declared over on a stale record) and ends
56
- * the bubble: this screen shows the picture again.
57
- * - **Back, every kind** (the header's arrow, the iOS swipe, Android's back; decided 2026-10-05,
58
- * amore-v2's Head of Engineering) shrinks a show that is playing or waiting for its host into the
59
- * bubble as the screen leaves, and closes one that has ended: the screen's `beforeRemove`, for the
60
- * navigation's back actions (`BACK_ACTIONS`). **Where back goes: Home, for every app** (decided
61
- * 2026-10-22; `routes.openHome`): the arrow, ✕ and Android's back, the show shrinking first. The iOS
62
- * swipe back is turned off on this screen (`gestureEnabled: false`), so no path goes to the screen behind. Picture-in-picture is a back that always shrinks; the cart shrinks the
63
- * show and opens the Cart over this screen (Items You Won on an auction show: `routes.openCart`).
64
- * - **A link from the show** (`openLink`, 0.15.0; decided 2026-10-19 by amore-v2's Head of Engineering)
65
- * opens inside the app, never the phone's browser: the show goes into the bubble, as for the cart, and
66
- * the app's `routes.openLink` opens the page (amore-v2: the store's product or collection on its
67
- * screen, any other page in its web page). Leaving the app for the phone's browser is what left the
68
- * player dark on the way back (ENG-629) and the phone's window blank (ENG-580). A link that isn't https
69
- * (`opensInApp`), or an app without `routes.openLink`, opens nothing, and the show stays.
70
- * - **The cart's holds** (0.15.0, amore-v2's ENG-691): the header shows a timer under the cart button in
71
- * the soonest hold's last minutes; this hands it when each hold ends (`header.holdEndTimes`,
72
- * `holdEndTimesOf` over sdk-shopify's cart and its `cartExtensions`), and the header counts.
73
- * - **One shrunk show at a time:** arriving here stops a replay's bubble (and the Replay screen stops
74
- * this show's bubble).
75
- * - **The screen stays on** while it shows the show playing or waiting for its host.
76
- * - **Under a sheet** (`routes.sheets`: the variant page, opened from the shop; the Sign In page) the
77
- * show plays on here, with the screen on and the light status bar, as Replay's does.
78
- * - **Put away** while the show plays here (a sheet over it included), it goes on in the phone's own
79
- * floating window (`systemWindowWhenAway`); coming back finds it here again.
80
- * - **`liveJoin`** (`track`) once per show per app run; never for a rehearsal, a show the config's
81
- * `hiddenShows` names, whoever watches it.
82
- * - **Hidden shows** (`hiddenShows`): for a shopper who isn't on the team the session never holds one,
83
- * so it is never on air here (the link goes to the Live tab).
84
- * - **Chat and reactions** are `useLiveChat`'s, shown only while the show is on air; a host's or
85
- * moderator's link in the chat opens through `openLink`.
86
- */
87
- function useLivePage() {
88
- var _a, _b, _c, _d;
89
- const nav = (0, navigation_1.useNavigation)();
90
- const route = (0, navigation_1.useRoute)();
91
- const streamId = (_b = (_a = route.params) === null || _a === void 0 ? void 0 : _a.streamId) !== null && _b !== void 0 ? _b : '';
92
- const isFocused = (0, navigation_1.useIsFocused)();
93
- const { routes, track, canOpenLinks, viewerRestrictions } = (0, LiveSellingProvider_1.useLivePageOptions)();
94
- // The session changes only on the room's events, never on a clock: the header and the auction tiles keep their own.
95
- const session = (0, platformSession_1.useLiveSession)();
96
- const { holdStream, releaseStream, enterPip, exitPip, setMuted } = session.actions;
97
- const { viewerEmail: email } = (0, LiveSellingProvider_1.useLiveSelling)();
98
- const { show: sessionShow, status, onAir } = (0, platformSession_1.useLiveShow)(streamId);
99
- const { cart: { cart, itemCount }, cartPage: { extensions: cartExtensions }, } = (0, sdk_shopify_1.useShopify)();
100
- const holdEndTimes = (0, react_1.useMemo)(() => (0, livePages_1.holdEndTimesOf)(cart, cartExtensions), [cart, cartExtensions]);
101
- const { bubbleShown: replayInBubble, stop: stopReplay } = (0, replayPlayer_1.useReplayPlayer)();
102
- // ─── Which show ────────────────────────────────────────────────────────────────────────────────
103
- // `sessionShow` (above) is the session's record once it is this show's. The record the link's answer
104
- // was read from stands in for its poster until then, and on the web.
105
- const [linkedShow, setLinkedShow] = (0, react_1.useState)(null);
106
- const show = sessionShow !== null && sessionShow !== void 0 ? sessionShow : (linkedShow && linkedShow.streamingId === streamId ? linkedShow : null);
107
- /** The screen is leaving for good (closed, or sent on by the link's answer): going doesn't shrink the show. */
108
- const leavingForGood = (0, react_1.useRef)(false);
109
- // ─── Where the link lands ──────────────────────────────────────────────────────────────────────
110
- (0, react_1.useEffect)(() => {
111
- if (!streamId)
112
- return;
113
- let stillHere = true;
114
- void liveSelling_1.liveSelling.streams.destinationFor(streamId, { viewerEmail: email }).then(({ destination, show: record, readError }) => {
115
- if (readError)
116
- (0, pageOptions_1.reportLiveWarning)(readError, { at: 'live.destinationFor', streamId });
117
- if (!stillHere)
118
- return;
119
- setLinkedShow(record);
120
- if (react_native_1.Platform.OS === 'web' || destination.to === 'livePlayer')
121
- return;
122
- leavingForGood.current = true;
123
- if (destination.to === 'replay')
124
- routes.replaceWithReplay(destination.feedId, nav);
125
- // Back to the tabs already in the stack, or in this screen's place when it opened alone (a link on a cold start).
126
- else
127
- routes.backToLiveTab(nav);
128
- });
129
- return () => {
130
- stillHere = false;
131
- };
132
- }, [streamId, email, nav, routes]);
133
- // ─── Arriving ──────────────────────────────────────────────────────────────────────────────────
134
- (0, navigation_1.useFocusEffect)((0, react_1.useCallback)(() => {
135
- holdStream(streamId || undefined);
136
- (0, useStreamInfo_1.refreshStreamRecords)();
137
- exitPip();
138
- }, [streamId, holdStream, exitPip]));
139
- (0, react_1.useEffect)(() => {
140
- if (isFocused && replayInBubble)
141
- stopReplay();
142
- }, [isFocused, replayInBubble, stopReplay]);
143
- // ─── Leaving ───────────────────────────────────────────────────────────────────────────────────
144
- /** The show went into the bubble on the way out: leaving keeps it playing there, pinned. */
145
- const shrunk = (0, react_1.useRef)(false);
146
- (0, react_1.useEffect)(() => {
147
- if (!isFocused)
148
- return;
149
- shrunk.current = false;
150
- leavingForGood.current = false;
151
- }, [isFocused]);
152
- const pipModeNow = (0, react_1.useRef)(session.pipMode);
153
- pipModeNow.current = session.pipMode;
154
- // Gone without the bubble (back on an ended show, replaced by the Replay or the Live tab): the show
155
- // stops and the pin goes. Not when the bubble took it.
156
- (0, react_1.useEffect)(() => () => {
157
- if (shrunk.current || pipModeNow.current !== 'none')
158
- return;
159
- exitPip({ stopVideo: true });
160
- releaseStream();
161
- }, [exitPip, releaseStream]);
162
- // ─── Where the show stands ─────────────────────────────────────────────────────────────────────
163
- // `status` and `onAir` are `useLiveShow`'s: joining until the session holds this show's record. The
164
- // controls follow the link's record until then (an auction's cart is Items You Won from the start).
165
- const capabilities = (0, sessionTypes_1.capabilitiesFor)(show);
166
- const canShrink = capabilities.canPip && onAir;
167
- // On show, or covered only by a page drawn as a sheet (the variant page, from the shop): the picture
168
- // stays here, playing behind it, and the screen stays on.
169
- const coveredOnlyBySheet = (0, navigation_1.useNavigationState)((state) => (0, livePages_1.isCoveredOnlyBySheet)(state, route.key, routes.sheets));
170
- const onScreen = isFocused || coveredOnlyBySheet;
171
- const showing = onScreen && session.pipMode === 'none';
172
- // ─── Leaving for another page, the show playing on in the bubble ───────────────────────────────
173
- /**
174
- * The show goes into the app's own bubble (the session's `enterPip`: `pipMode` `inapp`, `LiveBubble`;
175
- * never the phone's window, which only the phone opens as the app is put away) before a page opens over
176
- * this screen, so it plays on there; not while it is joining or has ended. Coming back here (back, the
177
- * bubble's tap, Android's back) ends the bubble as the screen focuses (above).
178
- */
179
- const shrinkForAnotherPage = (0, react_1.useCallback)(() => {
180
- if (!canShrink)
181
- return;
182
- shrunk.current = true;
183
- enterPip();
184
- }, [canShrink, enterPip]);
185
- /** A link from the show: its page inside the app, the show in the bubble. Nothing for one that can't open. */
186
- const openLink = (0, react_1.useCallback)((url, title) => {
187
- if (!canOpenLinks || !(0, linkLots_1.opensInApp)(url))
188
- return;
189
- shrinkForAnotherPage();
190
- routes.openLink(url.trim(), title, nav);
191
- }, [canOpenLinks, shrinkForAnotherPage, routes, nav]);
192
- // Chat and reactions: only while this show is on air. Its own hook (`useLiveChat`).
193
- const chat = (0, useLiveChat_1.useLiveChat)({
194
- onAir,
195
- canComment: capabilities.canComment,
196
- canReact: capabilities.canReact,
197
- openLink,
198
- auction: capabilities.canBid,
199
- });
200
- // Every back press (`BACK_ACTIONS`) passes here as the screen goes: a show on air enters the bubble,
201
- // then the screen is let go. Nothing is prevented.
202
- const canShrinkNow = (0, react_1.useRef)(canShrink);
203
- canShrinkNow.current = canShrink;
204
- (0, react_1.useEffect)(() => nav.addListener('beforeRemove', (event) => {
205
- if (!livePages_1.BACK_ACTIONS.has(event.data.action.type))
206
- return;
207
- if (leavingForGood.current || shrunk.current || !canShrinkNow.current || pipModeNow.current !== 'none')
208
- return;
209
- shrunk.current = true;
210
- enterPip();
211
- }), [nav, enterPip]);
212
- (0, useKeepScreenAwake_1.useKeepScreenAwake)(showing && onAir, 'live');
213
- // ─── The store's restrictions, kept current while the show is on screen (0.16.0) ───────────────
214
- // Read again as the screen comes on show and every `RESTRICTIONS_REFRESH_MS` while it stays: a customer
215
- // blocked from the admin mid-show stops at once (33.2.0's SPR-87), not at their next app start.
216
- const restrictionsNow = (0, react_1.useRef)(viewerRestrictions);
217
- restrictionsNow.current = viewerRestrictions;
218
- (0, react_1.useEffect)(() => {
219
- if (!isFocused)
220
- return;
221
- restrictionsNow.current.refresh();
222
- const timer = setInterval(() => restrictionsNow.current.refresh(), exports.RESTRICTIONS_REFRESH_MS);
223
- return () => clearInterval(timer);
224
- }, [isFocused]);
225
- // ─── liveJoin, once per show per app run ───────────────────────────────────────────────────────
226
- const viewerCount = session.viewerCount;
227
- (0, react_1.useEffect)(() => {
228
- if (!isFocused || !sessionShow || sessionShow.status !== 'live' || (0, hiddenShows_1.isHiddenShow)(sessionShow, (0, client_1.hiddenShowsRule)()))
229
- return;
230
- if (joinedThisRun.has(sessionShow.streamingId))
231
- return;
232
- joinedThisRun.add(sessionShow.streamingId);
233
- track(sdk_analytics_core_1.DefaultEvents.LIVE_JOIN, (0, sdk_analytics_core_1.liveJoinParams)(sessionShow.streamingId, viewerCount));
234
- }, [isFocused, sessionShow, viewerCount, track]);
235
- // ─── The header's buttons ──────────────────────────────────────────────────────────────────────
236
- /** Back: Home, for every app (decided 2026-10-22), a show on air shrinking into the bubble first. */
237
- const goBack = (0, react_1.useCallback)(() => {
238
- if (!leavingForGood.current && !shrunk.current)
239
- shrinkForAnotherPage();
240
- routes.openHome(nav);
241
- }, [nav, routes, shrinkForAnotherPage]);
242
- const close = (0, react_1.useCallback)(() => {
243
- leavingForGood.current = true;
244
- // Stopped outright: without `stopVideo` the room plays on with no surface.
245
- exitPip({ stopVideo: true });
246
- releaseStream();
247
- goBack();
248
- }, [exitPip, releaseStream, goBack]);
249
- const back = canShrink ? goBack : close;
250
- // Android's back does what the arrow does: Home, the show shrinking first.
251
- const backNow = (0, react_1.useRef)(back);
252
- backNow.current = back;
253
- (0, navigation_1.useFocusEffect)((0, react_1.useCallback)(() => {
254
- const subscription = react_native_1.BackHandler.addEventListener('hardwareBackPress', () => {
255
- backNow.current();
256
- return true;
257
- });
258
- return () => subscription.remove();
259
- }, []));
260
- // The iOS swipe back would go to the screen behind: off here, so every back goes Home.
261
- (0, react_1.useEffect)(() => {
262
- nav.setOptions({ gestureEnabled: false });
263
- }, [nav]);
264
- const isAuction = capabilities.canBid;
265
- const openCart = (0, react_1.useCallback)(() => {
266
- shrinkForAnotherPage();
267
- // A bidder's cart is what they've won: their bids never land in the shopping cart (Freckled Poppy's).
268
- routes.openCart({ itemsYouWon: isAuction }, nav);
269
- }, [shrinkForAnotherPage, isAuction, nav, routes]);
270
- // One surface at a time: not while the bubble or the phone's own window has it, or another screen is over this one.
271
- const videoActive = showing && !!sessionShow;
272
- return {
273
- /**
274
- * Android's own picture-in-picture window is up. It shrinks the whole app, and every sheet on the
275
- * Live screen (poll, giveaway, shop, custom bid, name, reactions) is a window of its own above the
276
- * app, so it rode the shrink and covered the video (fixed 2026-10-08; Freckled Poppy hides its
277
- * sheets the same way). The screen then draws only the player; the sheets' open state is the
278
- * hooks', so they come back. iOS's window shows the video alone.
279
- */
280
- inSystemWindow: react_native_1.Platform.OS === 'android' && session.pipMode === 'system',
281
- /** The screen is on show (or under a sheet), over the dark video: light status bar text. */
282
- lightStatusBar: onScreen,
283
- player: {
284
- status,
285
- posterUrl: (_c = show === null || show === void 0 ? void 0 : show.thumbnailUrl) !== null && _c !== void 0 ? _c : null,
286
- isAuction: !!(show === null || show === void 0 ? void 0 : show.isAuction),
287
- videoActive,
288
- // Put away while the show plays here, it goes on in the phone's own floating window. Not while
289
- // joining, waiting for the host or ended: there is no picture.
290
- systemWindowWhenAway: videoActive && status === 'playing' && capabilities.canPip,
291
- },
292
- header: {
293
- ended: status === 'ended',
294
- // An auction show: the header's own LIVE words for one (sparkl-v2's and k-marie-v2's LiveHeader01 `auctionLiveLabel`).
295
- isAuction: !!(show === null || show === void 0 ? void 0 : show.isAuction),
296
- // The header counts its clock up from it on its own (`useShowClock`), so the screen isn't drawn each second.
297
- startedAt: (_d = sessionShow === null || sessionShow === void 0 ? void 0 : sessionShow.startedAtMs) !== null && _d !== void 0 ? _d : null,
298
- // Known once the room has said: 0 means it hasn't yet.
299
- viewerCount: onAir && capabilities.showViewerCount && viewerCount > 0 ? viewerCount : null,
300
- muted: session.muted,
301
- canMute: status !== 'ended' && status !== 'error',
302
- canPip: canShrink,
303
- backShrinks: canShrink,
304
- cartCount: itemCount,
305
- // The hold timer under the cart button counts down to the soonest of these on its own (0.15.0).
306
- holdEndTimes,
307
- onBack: back,
308
- onToggleMute: () => setMuted(!session.muted),
309
- // Shown only while the show can shrink: a back press, which shrinks it on the way.
310
- onPip: goBack,
311
- onCart: openCart,
312
- },
313
- /** The chat, the comment box, reactions and the pinned comment: one set of props per tile (`useLiveChat`). */
314
- chat,
315
- /** A link from the show (0.15.0): its page inside the app, the show in the bubble. `useLiveShop` takes it. */
316
- openLink,
317
- };
318
- }
319
- //# sourceMappingURL=useLivePage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLivePage.js","sourceRoot":"","sources":["../../src/react/useLivePage.ts"],"names":[],"mappings":";;;AAmGA,kCAsPC;AAzVD;;;;;GAKG;AACH,oEAA4E;AAC5E,sDAAkD;AAClD,iCAA0E;AAC1E,+CAAqD;AAErD,sCAA4C;AAC5C,gDAA8C;AAC9C,gDAA6C;AAC7C,0CAAyC;AACzC,4CAAkF;AAClF,gDAAmD;AACnD,kDAAkD;AAElD,+DAA2E;AAC3E,uDAAgE;AAChE,iDAAiD;AACjD,6DAA0D;AAC1D,+CAA4C;AAC5C,mDAAuD;AACvD,6CASsB;AAKtB;;;;GAIG;AACH,MAAM,aAAa,GAAG,IAAI,GAAG,EAAU,CAAC;AAExC,oFAAoF;AACvE,QAAA,uBAAuB,GAAG,KAAM,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,SAAgB,WAAW;;IACzB,MAAM,GAAG,GAAG,IAAA,0BAAa,GAAiC,CAAC;IAC3D,MAAM,KAAK,GAAG,IAAA,qBAAQ,GAAa,CAAC;IACpC,MAAM,QAAQ,GAAG,MAAA,MAAA,KAAK,CAAC,MAAM,0CAAE,QAAQ,mCA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A+D;YAC/D,oBAAoB,EAAE,WAAW,IAAI,MAAM,KAAK,SAAS,IAAI,YAAY,CAAC,MAAM;SACjF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,MAAM,KAAK,OAAO;YACzB,uHAAuH;YACvH,SAAS,EAAE,CAAC,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,CAAA;YAC5B,6GAA6G;YAC7G,SAAS,EAAE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,mCAAI,IAAI;YAC3C,uDAAuD;YACvD,WAAW,EAAE,KAAK,IAAI,YAAY,CAAC,eAAe,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;YAC1F,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,OAAO,EAAE,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,OAAO;YACjD,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,SAAS;YACtB,SAAS,EAAE,SAAS;YACpB,gGAAgG;YAChG,YAAY;YACZ,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;YAC5C,mFAAmF;YACnF,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,QAAQ;SACjB;QACD,8GAA8G;QAC9G,IAAI;QACJ,8GAA8G;QAC9G,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -1,97 +0,0 @@
1
- /**
2
- * The Live screen's shopping (0.14.0, moved from amore-v2's `src/core/hooks/useLiveShop.ts`: phase 3 of
3
- * its "Live player plan", shop and cart; 0.15.0 adds its link lots, from amore-v2's `eng928/integration`).
4
- * The routes are the app's (`LiveSellingProvider`'s `routes`); the route's `streamId` param is read here.
5
- */
6
- import { type Product } from '@tiledev/sdk-shopify';
7
- import { type ShowLink } from '../linkLots';
8
- import type { LiveCartChip, LiveFeaturedProduct, LiveShopLink, LiveSoldChip } from '../pageTypes';
9
- export { shareAddress, shareProduct, SHARE_AGAIN_AFTER_MS } from './share';
10
- /** What the Live screen hands the shop (0.15.0). */
11
- export interface LiveShopScreen {
12
- /**
13
- * Opens a link the host added inside the app, the show in the bubble: `useLivePage`'s `openLink`, as
14
- * amore-v2's wiring passes it (`useLiveShop({ openLink: page.openLink })`). Unset: the link opens
15
- * through `routes.openLink` with the show left where it is.
16
- */
17
- openLink?: (url: string, title?: string | null) => void;
18
- }
19
- /**
20
- * The Live screen's shopping, so the screen stays plain tiles. Reads the app's live session, as
21
- * `useLivePage` does, for the show the route names.
22
- *
23
- * - **The featured product** (`productCard`): the session's `activeProduct`, or while an auction round
24
- * is open the lot it is on (`productOnCard`, 0.16.0, ENG-974: the card and the bid bar on one product), with its lot number
25
- * (`sellId`; the session re-reads the record when the host features a lot, so a number issued at
26
- * show time arrives; the card shows it only when its own setting turns it on). A tap on the card
27
- * opens the product (`openProduct`, below); share opens the phone's share sheet with the product's
28
- * link (`shareProduct`, old Amore's). On an auction show: where bidding starts, no Buy and no lot
29
- * badge, no share (decided 2026-10-05, amore-v2's Head of Engineering: "Share icon should be hidden
30
- * for live auctions"), and "Waiting for the next lot…" while nothing is featured; the round's bid,
31
- * state and leader are `useLiveAuction`'s.
32
- * - **The Shop button** (`shopButton`) and its sheet: every product on the show, the featured one first
33
- * and marked (`featuredFirst`), each with its lot number. A pick opens the product (`openProduct`);
34
- * quick add as everywhere. On an auction show too: there its sheet lists the lots instead
35
- * (`useLiveAuction`), and a pick opens the lot.
36
- * - **What a tap on a product opens** (`openProduct`; decided 2026-10-05: "Size sheet over show"): the
37
- * variant page over the playing show (`routes.openVariantPage`). On a live show it is for buying, with
38
- * the live credit (`liveShowCredit`). On an auction show it is the lot's details in auction mode
39
- * (`auctionLotPageParams`): the product page's auction notice, no Add to Cart, no credit and no
40
- * announcement; the shopper bids from the show.
41
- * - **Buying goes through the variant page**, over the playing show, as Replay's products do. Every add
42
- * from here carries the live credit and, once it lands, is announced to the room
43
- * (`announceToLiveRoom`, which the app's variant page hands `reportShowAdd`; quick add does it
44
- * itself). Signed out, shopping is open, as Freckled Poppy's.
45
- * - **Links the host added** (0.15.0; amore-v2, 2026-10-19: lots that are web addresses, mostly affiliate
46
- * links, `showLinkOf`). The session hands them over among the products, in the host's order, with a
47
- * title, a price (in the shop's currency: the session gives none), a photo and the address, and no
48
- * product (`raw`). Featured, the card shows it with Open in place of Buy (`isLink`), the price, no
49
- * star, on any show (never "Waiting for the next lot…"); in the Shop sheet it is a card among the
50
- * products (`LiveShopLink`: no star, no Add to Cart). A tap opens it inside the app with the show in the
51
- * bubble (the screen's `openLink`); share shares its address. A link that isn't https, or an app with no
52
- * `routes.openLink`, is shown but opens nothing (`url` null, `canOpen` false).
53
- * - **The room's chips:** "just sold" (`session.sold`) and "added to cart" (`session.cartAnnouncements`,
54
- * not on an auction show, as Freckled Poppy's). A name the room sent is shown by its first word
55
- * (`firstNameOf`); the session hands out no name as an email.
56
- * - **Nothing shows** until the session holds this show's record (`useLiveShow`). It never holds a
57
- * hidden show the shopper can't see (`hiddenShows`). The web's session is always "ended" with no
58
- * show, so none of these tiles draw there.
59
- */
60
- export declare function useLiveShop(screen?: LiveShopScreen): {
61
- productCard: {
62
- visible: boolean;
63
- product: LiveFeaturedProduct | null;
64
- betweenLots: boolean;
65
- canBuy: boolean;
66
- canShare: boolean;
67
- favorite: boolean;
68
- onOpenProduct: () => void;
69
- onToggleFavorite: () => void;
70
- onShare: () => void;
71
- };
72
- shopButton: {
73
- visible: boolean;
74
- /** The products and the links the host added (`LiveShopLink`), in the host's order, the featured one first. */
75
- products: (Product | ShowLink)[];
76
- onScreenProductId: string | null;
77
- lotNumbers: Record<string, string>;
78
- favoriteIds: string[];
79
- auctionProductIds: string[];
80
- onPressProduct: (product: Product) => void;
81
- onOpenLink: (link: Pick<LiveShopLink, "url" | "title">) => void;
82
- onToggleFavorite: (product: Product) => undefined;
83
- onQuickAdd: (product: Product) => void;
84
- addingProductIds: string[];
85
- };
86
- soldChips: {
87
- visible: boolean;
88
- chips: LiveSoldChip[];
89
- };
90
- cartChips: {
91
- visible: boolean;
92
- chips: LiveCartChip[];
93
- };
94
- };
95
- /** What `useLiveShop` hands the Live screen's shop tiles. */
96
- export type LiveShop = ReturnType<typeof useLiveShop>;
97
- //# sourceMappingURL=useLiveShop.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLiveShop.d.ts","sourceRoot":"","sources":["../../src/react/useLiveShop.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAsD,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGxG,OAAO,EAA0B,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAOlG,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAO3E,oDAAoD;AACpD,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACzD;AAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,WAAW,CAAC,MAAM,GAAE,cAAmB;;;;;;;;;;;;;;QAgJjD,+GAA+G;;;;;;kCAxFvG,OAAO;2BAQV,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,OAAO,CAAC;oCAwFZ,OAAO;;;;;;;;;;;;EAQxC;AAED,6DAA6D;AAC7D,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -1,197 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SHARE_AGAIN_AFTER_MS = exports.shareProduct = exports.shareAddress = void 0;
4
- exports.useLiveShop = useLiveShop;
5
- /**
6
- * The Live screen's shopping (0.14.0, moved from amore-v2's `src/core/hooks/useLiveShop.ts`: phase 3 of
7
- * its "Live player plan", shop and cart; 0.15.0 adds its link lots, from amore-v2's `eng928/integration`).
8
- * The routes are the app's (`LiveSellingProvider`'s `routes`); the route's `streamId` param is read here.
9
- */
10
- const sdk_shopify_1 = require("@tiledev/sdk-shopify");
11
- const react_1 = require("react");
12
- const linkLots_1 = require("../linkLots");
13
- const showCredit_1 = require("../showCredit");
14
- const showNames_1 = require("../showNames");
15
- const showLots_1 = require("../showLots");
16
- const LiveSellingProvider_1 = require("./LiveSellingProvider");
17
- const share_1 = require("./share");
18
- var share_2 = require("./share");
19
- Object.defineProperty(exports, "shareAddress", { enumerable: true, get: function () { return share_2.shareAddress; } });
20
- Object.defineProperty(exports, "shareProduct", { enumerable: true, get: function () { return share_2.shareProduct; } });
21
- Object.defineProperty(exports, "SHARE_AGAIN_AFTER_MS", { enumerable: true, get: function () { return share_2.SHARE_AGAIN_AFTER_MS; } });
22
- const platformSession_1 = require("./platformSession");
23
- const navigation_1 = require("./navigation");
24
- /**
25
- * The Live screen's shopping, so the screen stays plain tiles. Reads the app's live session, as
26
- * `useLivePage` does, for the show the route names.
27
- *
28
- * - **The featured product** (`productCard`): the session's `activeProduct`, or while an auction round
29
- * is open the lot it is on (`productOnCard`, 0.16.0, ENG-974: the card and the bid bar on one product), with its lot number
30
- * (`sellId`; the session re-reads the record when the host features a lot, so a number issued at
31
- * show time arrives; the card shows it only when its own setting turns it on). A tap on the card
32
- * opens the product (`openProduct`, below); share opens the phone's share sheet with the product's
33
- * link (`shareProduct`, old Amore's). On an auction show: where bidding starts, no Buy and no lot
34
- * badge, no share (decided 2026-10-05, amore-v2's Head of Engineering: "Share icon should be hidden
35
- * for live auctions"), and "Waiting for the next lot…" while nothing is featured; the round's bid,
36
- * state and leader are `useLiveAuction`'s.
37
- * - **The Shop button** (`shopButton`) and its sheet: every product on the show, the featured one first
38
- * and marked (`featuredFirst`), each with its lot number. A pick opens the product (`openProduct`);
39
- * quick add as everywhere. On an auction show too: there its sheet lists the lots instead
40
- * (`useLiveAuction`), and a pick opens the lot.
41
- * - **What a tap on a product opens** (`openProduct`; decided 2026-10-05: "Size sheet over show"): the
42
- * variant page over the playing show (`routes.openVariantPage`). On a live show it is for buying, with
43
- * the live credit (`liveShowCredit`). On an auction show it is the lot's details in auction mode
44
- * (`auctionLotPageParams`): the product page's auction notice, no Add to Cart, no credit and no
45
- * announcement; the shopper bids from the show.
46
- * - **Buying goes through the variant page**, over the playing show, as Replay's products do. Every add
47
- * from here carries the live credit and, once it lands, is announced to the room
48
- * (`announceToLiveRoom`, which the app's variant page hands `reportShowAdd`; quick add does it
49
- * itself). Signed out, shopping is open, as Freckled Poppy's.
50
- * - **Links the host added** (0.15.0; amore-v2, 2026-10-19: lots that are web addresses, mostly affiliate
51
- * links, `showLinkOf`). The session hands them over among the products, in the host's order, with a
52
- * title, a price (in the shop's currency: the session gives none), a photo and the address, and no
53
- * product (`raw`). Featured, the card shows it with Open in place of Buy (`isLink`), the price, no
54
- * star, on any show (never "Waiting for the next lot…"); in the Shop sheet it is a card among the
55
- * products (`LiveShopLink`: no star, no Add to Cart). A tap opens it inside the app with the show in the
56
- * bubble (the screen's `openLink`); share shares its address. A link that isn't https, or an app with no
57
- * `routes.openLink`, is shown but opens nothing (`url` null, `canOpen` false).
58
- * - **The room's chips:** "just sold" (`session.sold`) and "added to cart" (`session.cartAnnouncements`,
59
- * not on an auction show, as Freckled Poppy's). A name the room sent is shown by its first word
60
- * (`firstNameOf`); the session hands out no name as an email.
61
- * - **Nothing shows** until the session holds this show's record (`useLiveShow`). It never holds a
62
- * hidden show the shopper can't see (`hiddenShows`). The web's session is always "ended" with no
63
- * show, so none of these tiles draw there.
64
- */
65
- function useLiveShop(screen = {}) {
66
- var _a, _b, _c, _d, _e, _f;
67
- const nav = (0, navigation_1.useNavigation)();
68
- const streamId = (_b = (_a = (0, navigation_1.useRoute)().params) === null || _a === void 0 ? void 0 : _a.streamId) !== null && _b !== void 0 ? _b : '';
69
- const { routes, track, canOpenLinks } = (0, LiveSellingProvider_1.useLivePageOptions)();
70
- const screenOpenLink = screen.openLink;
71
- // The session changes only on the room's events, never on a clock.
72
- const session = (0, platformSession_1.useLiveSession)();
73
- const wishlist = (0, sdk_shopify_1.useWishlist)();
74
- // The session's record once it is this show's: right after the pin it can still hold the last show's.
75
- const { show, onAir, capabilities } = (0, platformSession_1.useLiveShow)(streamId);
76
- const hidden = !show;
77
- const isAuction = capabilities.canBid;
78
- // ─── The products and links ────────────────────────────────────────────────────────────────────
79
- // What the host holds up, or the lot a round is open on (`productOnCard`): `useLiveAuction`'s round reads the same.
80
- const featured = show ? (0, showLots_1.productOnCard)(session.activeProduct, session.products, session.auction) : null;
81
- const featuredProduct = (_c = featured === null || featured === void 0 ? void 0 : featured.raw) !== null && _c !== void 0 ? _c : null;
82
- // A link the host featured: a web address, no product of the store.
83
- const featuredLink = (0, react_1.useMemo)(() => (featured && !featured.raw && featured.externalUrl ? (0, linkLots_1.showLinkOf)(featured, { canOpen: canOpenLinks }) : null), [featured, canOpenLinks]);
84
- const featuredId = (_e = (_d = featuredProduct === null || featuredProduct === void 0 ? void 0 : featuredProduct.id) !== null && _d !== void 0 ? _d : featuredLink === null || featuredLink === void 0 ? void 0 : featuredLink.id) !== null && _e !== void 0 ? _e : null;
85
- /**
86
- * The show's Shopify products and the links the host added, in the host's order, the featured one
87
- * first: the shopper who taps Shop wants what the host holds up.
88
- */
89
- const shopItems = (0, react_1.useMemo)(() => (0, showLots_1.featuredFirst)(session.products.flatMap((lot) => lot.raw ? [lot.raw] : lot.externalUrl ? [(0, linkLots_1.showLinkOf)(lot, { canOpen: canOpenLinks })] : []), featuredId), [session.products, featuredId, canOpenLinks]);
90
- const products = (0, react_1.useMemo)(() => shopItems.filter((item) => !(0, linkLots_1.isShowLink)(item)), [shopItems]);
91
- /** Each lot's number, by product id (a link's own id): the number the host reads out. */
92
- const lotNumbers = (0, react_1.useMemo)(() => Object.fromEntries(session.products.flatMap((lot) => {
93
- var _a, _b;
94
- const id = (_b = (_a = lot.raw) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : (lot.externalUrl ? lot.id : null);
95
- return id && lot.sellId ? [[id, lot.sellId]] : [];
96
- })), [session.products]);
97
- const auctionProductIds = (0, react_1.useMemo)(() => products.filter(sdk_shopify_1.isAuctioned).map((product) => product.id), [products]);
98
- // ─── Buying ────────────────────────────────────────────────────────────────────────────────────
99
- const creditFor = (0, react_1.useCallback)((product) => { var _a; return (0, showCredit_1.liveShowCredit)(show, (_a = lotNumbers[product.id]) !== null && _a !== void 0 ? _a : null); }, [show, lotNumbers]);
100
- const quickAdd = (0, sdk_shopify_1.useQuickAdd)((0, showCredit_1.showQuickAddOptions)((params) => routes.openVariantPage(params, nav), { credit: creditFor, track }));
101
- const openVariantPage = (0, react_1.useCallback)((product) => routes.openVariantPage((0, showCredit_1.variantPageParams)(product, creditFor(product)), nav), [routes, nav, creditFor]);
102
- const openLotPage = (0, react_1.useCallback)((product) => routes.openVariantPage((0, showCredit_1.auctionLotPageParams)(product), nav), [routes, nav]);
103
- /** A tap on a product, on the card or in the Shop sheet: a lot's details on an auction show, else the variant page to buy it. */
104
- const openProduct = isAuction ? openLotPage : openVariantPage;
105
- /** A tap on a link the host added: its page inside the app, the show in the bubble. Nothing for one that can't open. */
106
- const openShowLink = (0, react_1.useCallback)((link) => {
107
- if (!link.url)
108
- return;
109
- if (screenOpenLink)
110
- screenOpenLink(link.url, link.title);
111
- else
112
- routes.openLink(link.url, link.title, nav);
113
- }, [screenOpenLink, routes, nav]);
114
- // ─── The featured card ─────────────────────────────────────────────────────────────────────────
115
- // The lot's opening bid, joined onto the product from the record by the session.
116
- const startingBid = isAuction && featured ? ((_f = featured.baseBidPrice) !== null && _f !== void 0 ? _f : null) : null;
117
- const featuredCard = (0, react_1.useMemo)(() => {
118
- var _a, _b, _c, _d, _e, _f;
119
- return featuredProduct
120
- ? {
121
- id: featuredProduct.id,
122
- title: featuredProduct.title,
123
- price: (0, sdk_shopify_1.formatMoney)(featuredProduct.priceRange.min),
124
- imageUrl: (_d = (_b = (_a = featuredProduct.featuredImage) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : (_c = featuredProduct.images[0]) === null || _c === void 0 ? void 0 : _c.url) !== null && _d !== void 0 ? _d : null,
125
- // No lot badge on an auction lot: a bidder bids, they don't buy by the number (Freckled Poppy's).
126
- lotNumber: isAuction ? null : ((_e = featured === null || featured === void 0 ? void 0 : featured.sellId) !== null && _e !== void 0 ? _e : null),
127
- startingBid: startingBid != null ? (0, sdk_shopify_1.formatMoney)({ amount: String(startingBid), currencyCode: featuredProduct.priceRange.min.currencyCode }) : null,
128
- }
129
- : featuredLink
130
- ? {
131
- id: featuredLink.id,
132
- title: featuredLink.title,
133
- price: featuredLink.price,
134
- imageUrl: featuredLink.imageUrl,
135
- lotNumber: isAuction ? null : ((_f = featured === null || featured === void 0 ? void 0 : featured.sellId) !== null && _f !== void 0 ? _f : null),
136
- startingBid: null,
137
- isLink: true,
138
- canOpen: !!featuredLink.url,
139
- }
140
- : null;
141
- }, [featuredProduct, featuredLink, featured === null || featured === void 0 ? void 0 : featured.sellId, isAuction, startingBid]);
142
- // ─── The room's chips ──────────────────────────────────────────────────────────────────────────
143
- const soldChips = (0, react_1.useMemo)(() => session.sold.map((card) => ({ id: card.id, quantity: card.quantity, productName: card.productName, lotNumber: card.sellId })), [session.sold]);
144
- const cartChips = (0, react_1.useMemo)(() => session.cartAnnouncements.map((card) => ({
145
- id: card.id,
146
- name: (0, showNames_1.firstNameOf)(card.userName),
147
- productTitle: card.productTitle,
148
- lotNumber: card.sellId,
149
- })), [session.cartAnnouncements]);
150
- return {
151
- productCard: {
152
- visible: !hidden,
153
- product: featuredCard,
154
- // An auction has gaps between lots: the slot keeps its place rather than leave the frame empty.
155
- betweenLots: isAuction && !featuredCard && onAir,
156
- canBuy: !isAuction,
157
- // No share on an auction show (decided 2026-10-05, amore-v2's Head of Engineering), nor for a link that opens nothing.
158
- canShare: !isAuction && (!featuredLink || !!featuredLink.url),
159
- favorite: !!featuredProduct && wishlist.has(featuredProduct.id),
160
- onOpenProduct: () => {
161
- if (featuredProduct)
162
- openProduct(featuredProduct);
163
- else if (featuredLink)
164
- openShowLink(featuredLink);
165
- },
166
- onToggleFavorite: () => {
167
- if (featuredProduct)
168
- void wishlist.toggle(featuredProduct);
169
- },
170
- onShare: () => {
171
- if (featuredProduct)
172
- void (0, share_1.shareProduct)(featuredProduct);
173
- else if (featuredLink)
174
- void (0, share_1.shareAddress)(featuredLink.url);
175
- },
176
- },
177
- shopButton: {
178
- // On an auction show too: there its sheet lists the lots (`useLiveAuction`'s `shopButton.lots`).
179
- visible: !hidden,
180
- /** The products and the links the host added (`LiveShopLink`), in the host's order, the featured one first. */
181
- products: shopItems,
182
- onScreenProductId: featuredId,
183
- lotNumbers,
184
- favoriteIds: wishlist.ids,
185
- auctionProductIds,
186
- onPressProduct: openProduct,
187
- onOpenLink: openShowLink,
188
- onToggleFavorite: (product) => void wishlist.toggle(product),
189
- onQuickAdd: quickAdd.add,
190
- addingProductIds: quickAdd.addingProductIds,
191
- },
192
- soldChips: { visible: !hidden, chips: soldChips },
193
- // An auction sells by bidding: its room has no carts to announce (Freckled Poppy's).
194
- cartChips: { visible: !hidden && !isAuction, chips: cartChips },
195
- };
196
- }
197
- //# sourceMappingURL=useLiveShop.js.map