@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,89 +0,0 @@
1
- /**
2
- * What credits an add to a show (0.14.0, moved from amore-v2's `src/navigation/variantPage.ts` and its
3
- * Live and Replay page hooks): the variant page's params, quick add's credit, and what an add that
4
- * landed tells about its show. The routes stay the app's: `showQuickAddOptions` takes where the
5
- * variant page is, and `VariantPageParams` is what the app's variant page reads.
6
- *
7
- * Free of React and React Native (sdk-analytics-core is plain functions), so it loads in plain Node for
8
- * tests; sdk-shopify is read for its types alone.
9
- */
10
- import { type AddedFromShow, type EventProperties } from '@tiledev/sdk-analytics-core';
11
- import type { AttributionSource, CartLineAttribute, Product, ProductLike, ProductVariant, UseQuickAddOptions } from '@tiledev/sdk-shopify';
12
- import { type LiveRoomAnnouncement } from './liveRoom';
13
- import type { LiveStream } from './types';
14
- /**
15
- * What credits an add to a show: the Replay screen's (`lineAttributes`, `addedFromShow`,
16
- * `attributionSource`) and the Live screen's (all four). Every field is optional; without any, an add
17
- * is the app's own.
18
- */
19
- export interface ShowCredit {
20
- /** Put on the cart line (`_replay_id`, `_stream_id`), so the order carries the show. */
21
- lineAttributes?: CartLineAttribute[];
22
- /** The show each landed add is reported against (`streamAddToCart` live, `replayAddToCart` for a recording). */
23
- addedFromShow?: AddedFromShow;
24
- /** sdk-shopify's attribution source for the cart's `_apptile_attribution` counts. */
25
- attributionSource?: AttributionSource;
26
- /** Tell the live show's room once the add lands (the Live screen's products only). */
27
- announceToLiveRoom?: LiveRoomAnnouncement;
28
- }
29
- /**
30
- * The variant page's params, as the live pages open it (`routes.openVariantPage`): the product's
31
- * handle, a show's credit, and `beingAuctioned` for a lot on an auction show (the product page's
32
- * auction notice and no Add to Cart).
33
- */
34
- export interface VariantPageParams extends ShowCredit {
35
- handle: string;
36
- beingAuctioned?: boolean;
37
- }
38
- /**
39
- * The variant page's params for a product, carrying a show's whole credit (the attribution source too,
40
- * since amore-v2's SDK move 6, 2026-10-06). An empty part of the credit is left out.
41
- */
42
- export declare function variantPageParams(product: Pick<Product, 'handle'>, credit: ShowCredit): VariantPageParams;
43
- /**
44
- * The variant page's params for a lot on an auction show (decided 2026-10-05, Head of Engineering:
45
- * "Size sheet over show"): the product's details with the product page's auction notice and no Add to
46
- * Cart. No live credit and no announcement: nothing can be added from it, as the shopper bids from the
47
- * show.
48
- */
49
- export declare function auctionLotPageParams(product: Pick<Product, 'handle'>): VariantPageParams;
50
- /**
51
- * Everything an add from a live show carries, for one product (Freckled Poppy's `performAdd`): the
52
- * line's `_stream_id` (`liveCartAttributesFor`), the attribution source (`liveAttributionSourceFor`),
53
- * the show for `streamAddToCart` (`streamType: "live-stream"`, old Amore's), and the room's
54
- * announcement with the lot's number. **Only while the show's record says it is live**: after it ends
55
- * an add is the app's own, and there is no room to tell.
56
- */
57
- export declare function liveShowCredit(show: (Pick<LiveStream, 'streamingId' | 'status'> & {
58
- isAuction?: boolean;
59
- }) | null, lotNumber: string | null): ShowCredit;
60
- /**
61
- * Everything an add from a recording carries: `_replay_id` on the line (`replayCartAttributesFor`),
62
- * `replayAddToCart` against the recording's feed id, and the cart's attribution against the show's
63
- * streaming id (`replayAttributionSourceFor`), never the feed id: attribution groups a replay with its
64
- * show. Nothing without a recording.
65
- */
66
- export declare function replayShowCredit(feedId: string | null, showStreamingId: string | null, isAuction?: boolean): ShowCredit;
67
- /**
68
- * What an add that landed tells about its show: the show's copy of the add (sdk-analytics-core's
69
- * `showAddToCartEvent`: `streamAddToCart`, or `replayAddToCart` for a recording) for `addedFromShow`,
70
- * and, with `announceToLiveRoom`, the live show's room (its cart chip). Nothing without a show. For a
71
- * landed add only: the room reads the chip as "it is going".
72
- */
73
- export declare function reportShowAdd(credit: ShowCredit, track: (name: string, properties: EventProperties) => void, product: ProductLike, variant: ProductVariant | null): void;
74
- /** A show's credit for quick adds: one for every product, or one per product (a live show's lot numbers). */
75
- export interface ShowQuickAdd {
76
- credit: ShowCredit | ((product: Product) => ShowCredit);
77
- /** The app's analytics `track`, for the show's copy of each add that lands. */
78
- track: (name: string, properties: EventProperties) => void;
79
- }
80
- /**
81
- * sdk-shopify's `useQuickAdd` options for a product card's Add to Cart (decided 2026-10-04, Head of
82
- * Engineering): a product with a choice to make opens the variant page (`openVariantPage`, the app's
83
- * route); one size for sale is added on the spot by sdk-shopify. With a show's credit (the Replay and
84
- * Live screens' products, 2026-10-05) the line carries the show, the variant page gets the same
85
- * credit, and an add that lands also reports the show's copy and, with `announceToLiveRoom`, tells the
86
- * live show's room (`reportShowAdd`). Without one, the variant page gets the handle alone.
87
- */
88
- export declare function showQuickAddOptions(openVariantPage: (params: VariantPageParams, product: Product) => void, show?: ShowQuickAdd): UseQuickAddOptions;
89
- //# sourceMappingURL=showCredit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showCredit.d.ts","sourceRoot":"","sources":["../src/showCredit.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAsB,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC3G,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,cAAc,EACd,kBAAkB,EACnB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAyB,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,wFAAwF;IACxF,cAAc,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACrC,gHAAgH;IAChH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,qFAAqF;IACrF,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;I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eAAe,KAAK,IAAI,CAAC;CAC5D;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,eAAe,EAAE,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,EACtE,IAAI,CAAC,EAAE,YAAY,GAClB,kBAAkB,CAepB"}
@@ -1,120 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.variantPageParams = variantPageParams;
4
- exports.auctionLotPageParams = auctionLotPageParams;
5
- exports.liveShowCredit = liveShowCredit;
6
- exports.replayShowCredit = replayShowCredit;
7
- exports.reportShowAdd = reportShowAdd;
8
- exports.showQuickAddOptions = showQuickAddOptions;
9
- /**
10
- * What credits an add to a show (0.14.0, moved from amore-v2's `src/navigation/variantPage.ts` and its
11
- * Live and Replay page hooks): the variant page's params, quick add's credit, and what an add that
12
- * landed tells about its show. The routes stay the app's: `showQuickAddOptions` takes where the
13
- * variant page is, and `VariantPageParams` is what the app's variant page reads.
14
- *
15
- * Free of React and React Native (sdk-analytics-core is plain functions), so it loads in plain Node for
16
- * tests; sdk-shopify is read for its types alone.
17
- */
18
- const sdk_analytics_core_1 = require("@tiledev/sdk-analytics-core");
19
- const attribution_1 = require("./attribution");
20
- const cartAttributes_1 = require("./cartAttributes");
21
- const liveRoom_1 = require("./liveRoom");
22
- /**
23
- * The variant page's params for a product, carrying a show's whole credit (the attribution source too,
24
- * since amore-v2's SDK move 6, 2026-10-06). An empty part of the credit is left out.
25
- */
26
- function variantPageParams(product, credit) {
27
- const { lineAttributes, addedFromShow, attributionSource, announceToLiveRoom } = credit;
28
- return {
29
- handle: product.handle,
30
- ...((lineAttributes === null || lineAttributes === void 0 ? void 0 : lineAttributes.length) ? { lineAttributes } : {}),
31
- ...(addedFromShow ? { addedFromShow } : {}),
32
- ...(attributionSource ? { attributionSource } : {}),
33
- ...(announceToLiveRoom ? { announceToLiveRoom } : {}),
34
- };
35
- }
36
- /**
37
- * The variant page's params for a lot on an auction show (decided 2026-10-05, Head of Engineering:
38
- * "Size sheet over show"): the product's details with the product page's auction notice and no Add to
39
- * Cart. No live credit and no announcement: nothing can be added from it, as the shopper bids from the
40
- * show.
41
- */
42
- function auctionLotPageParams(product) {
43
- return { handle: product.handle, beingAuctioned: true };
44
- }
45
- /**
46
- * Everything an add from a live show carries, for one product (Freckled Poppy's `performAdd`): the
47
- * line's `_stream_id` (`liveCartAttributesFor`), the attribution source (`liveAttributionSourceFor`),
48
- * the show for `streamAddToCart` (`streamType: "live-stream"`, old Amore's), and the room's
49
- * announcement with the lot's number. **Only while the show's record says it is live**: after it ends
50
- * an add is the app's own, and there is no room to tell.
51
- */
52
- function liveShowCredit(show, lotNumber) {
53
- var _a;
54
- const lineAttributes = (0, cartAttributes_1.liveCartAttributesFor)(show);
55
- if (!show || lineAttributes.length === 0)
56
- return {};
57
- return {
58
- lineAttributes,
59
- addedFromShow: { streamType: 'live-stream', streamId: show.streamingId },
60
- attributionSource: (_a = (0, attribution_1.liveAttributionSourceFor)(show)) !== null && _a !== void 0 ? _a : undefined,
61
- announceToLiveRoom: { lotNumber },
62
- };
63
- }
64
- /**
65
- * Everything an add from a recording carries: `_replay_id` on the line (`replayCartAttributesFor`),
66
- * `replayAddToCart` against the recording's feed id, and the cart's attribution against the show's
67
- * streaming id (`replayAttributionSourceFor`), never the feed id: attribution groups a replay with its
68
- * show. Nothing without a recording.
69
- */
70
- function replayShowCredit(feedId, showStreamingId, isAuction = false) {
71
- var _a;
72
- if (!feedId)
73
- return {};
74
- return {
75
- lineAttributes: (0, cartAttributes_1.replayCartAttributesFor)(feedId),
76
- addedFromShow: { streamType: 'replay', streamId: feedId },
77
- attributionSource: (_a = (0, attribution_1.replayAttributionSourceFor)(showStreamingId, isAuction)) !== null && _a !== void 0 ? _a : undefined,
78
- };
79
- }
80
- /**
81
- * What an add that landed tells about its show: the show's copy of the add (sdk-analytics-core's
82
- * `showAddToCartEvent`: `streamAddToCart`, or `replayAddToCart` for a recording) for `addedFromShow`,
83
- * and, with `announceToLiveRoom`, the live show's room (its cart chip). Nothing without a show. For a
84
- * landed add only: the room reads the chip as "it is going".
85
- */
86
- function reportShowAdd(credit, track, product, variant) {
87
- if (credit.addedFromShow) {
88
- const showAdd = (0, sdk_analytics_core_1.showAddToCartEvent)(product, variant, credit.addedFromShow);
89
- track(showAdd.name, showAdd.properties);
90
- }
91
- if (credit.announceToLiveRoom)
92
- (0, liveRoom_1.announceAddToLiveRoom)(product.title, credit.announceToLiveRoom);
93
- }
94
- /**
95
- * sdk-shopify's `useQuickAdd` options for a product card's Add to Cart (decided 2026-10-04, Head of
96
- * Engineering): a product with a choice to make opens the variant page (`openVariantPage`, the app's
97
- * route); one size for sale is added on the spot by sdk-shopify. With a show's credit (the Replay and
98
- * Live screens' products, 2026-10-05) the line carries the show, the variant page gets the same
99
- * credit, and an add that lands also reports the show's copy and, with `announceToLiveRoom`, tells the
100
- * live show's room (`reportShowAdd`). Without one, the variant page gets the handle alone.
101
- */
102
- function showQuickAddOptions(openVariantPage, show) {
103
- const creditFor = (product) => {
104
- if (!show)
105
- return {};
106
- return typeof show.credit === 'function' ? show.credit(product) : show.credit;
107
- };
108
- return {
109
- credit: (product) => {
110
- const { lineAttributes, attributionSource } = creditFor(product);
111
- return { lineAttributes, source: attributionSource };
112
- },
113
- onChooseVariant: (product) => openVariantPage(variantPageParams(product, creditFor(product)), product),
114
- onAdded: (product, variant) => {
115
- if (show)
116
- reportShowAdd(creditFor(product), show.track, product, variant);
117
- },
118
- };
119
- }
120
- //# sourceMappingURL=showCredit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showCredit.js","sourceRoot":"","sources":["../src/showCredit.ts"],"names":[],"mappings":";;AAsDA,8CASC;AAQD,oDAEC;AASD,wCASC;AAQD,4CAOC;AAQD,sCAWC;AAiBD,kDAkBC;AAhKD;;;;;;;;GAQG;AACH,oEAA2G;AAU3G,+CAAqF;AACrF,qDAAkF;AAClF,yCAA8E;AA6B9E;;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BAAiB,EAAE,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;YACjE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,iBAAiB,EAAE,CAAC;QACvD,CAAC;QACD,eAAe,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC;QACtG,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE;YAC5B,IAAI,IAAI;gBAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5E,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,24 +0,0 @@
1
- /**
2
- * Where a link about a show should go (0.9.0): `streams.destinationFor`'s rule, moved from amore-v2's
3
- * and Freckled Poppy's `resolveLiveTarget`.
4
- *
5
- * Every push a store sends about a show points at the show (`live-selling/<streamingId>`), and most are
6
- * opened after it ended, so what the shopper wants is usually its recording. One read of the record
7
- * answers it: it carries the recording's id (`replayFeedId`, the same as `Replay.id`). No search of the
8
- * replay feed is needed, and one wouldn't do: the feed is paged, and an old show is past the pages read.
9
- *
10
- * Pure, so it loads in plain Node for tests and in an app's own test runner.
11
- */
12
- import type { LiveStream, ShowLinkDestination } from './types';
13
- /**
14
- * The destination for a show's record:
15
- *
16
- * - none (unknown, unreadable, or hidden from this viewer, which `destinationFor` treats as none):
17
- * the list of shows;
18
- * - on air: the live player;
19
- * - ended, with a recording: its replay;
20
- * - anything else (scheduled, or ended with no recording): the list of shows, which says what is on
21
- * now and what has been.
22
- */
23
- export declare function showLinkDestination(show: Pick<LiveStream, 'status' | 'replayFeedId'> | null): ShowLinkDestination;
24
- //# sourceMappingURL=showLinks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showLinks.d.ts","sourceRoot":"","sources":["../src/showLinks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE/D;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,cAAc,CAAC,GAAG,IAAI,GAAG,mBAAmB,CAKjH"}
package/dist/showLinks.js DELETED
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.showLinkDestination = showLinkDestination;
4
- /**
5
- * The destination for a show's record:
6
- *
7
- * - none (unknown, unreadable, or hidden from this viewer, which `destinationFor` treats as none):
8
- * the list of shows;
9
- * - on air: the live player;
10
- * - ended, with a recording: its replay;
11
- * - anything else (scheduled, or ended with no recording): the list of shows, which says what is on
12
- * now and what has been.
13
- */
14
- function showLinkDestination(show) {
15
- if (!show)
16
- return { to: 'showList' };
17
- if (show.status === 'live')
18
- return { to: 'livePlayer' };
19
- if (show.status === 'ended' && show.replayFeedId)
20
- return { to: 'replay', feedId: show.replayFeedId };
21
- return { to: 'showList' };
22
- }
23
- //# sourceMappingURL=showLinks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showLinks.js","sourceRoot":"","sources":["../src/showLinks.ts"],"names":[],"mappings":";;AAuBA,kDAKC;AAfD;;;;;;;;;GASG;AACH,SAAgB,mBAAmB,CAAC,IAAwD;IAC1F,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC;IACrC,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM;QAAE,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC;IACxD,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,IAAI,IAAI,CAAC,YAAY;QAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC;IACrG,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC;AAC5B,CAAC"}
@@ -1,44 +0,0 @@
1
- /**
2
- * A show's lots as a screen lists them (0.9.0).
3
- *
4
- * Pure, so it loads in plain Node for tests and in an app's own test runner.
5
- */
6
- import type { LiveProduct } from './sessionTypes';
7
- import type { LiveStreamProduct } from './types';
8
- /**
9
- * The list with the featured item lifted to the front, the rest in the host's order: a shopper who
10
- * opens the shop wants what the host is holding up. It lifts one item; it doesn't sort. The same
11
- * array when there is nothing to move (no featured item, not in the list, or already first). Works on
12
- * the session's products or on the catalogue's own (`raw`), matched by `id`.
13
- *
14
- * Amore's shop sheet and Freckled Poppy's (`LiveShopSheet01`) each did this.
15
- */
16
- export declare function featuredFirst<Item extends {
17
- id: string;
18
- }>(items: Item[], featuredId: string | null | undefined): Item[];
19
- /**
20
- * The product on the Live screen's card (0.16.0, ENG-974): while a round is open, the lot it is on;
21
- * otherwise the product the host features. `useLiveShop`'s card and `useLiveAuction`'s round on it both
22
- * read this, so the card never shows one product while the bid bar takes bids on another.
23
- *
24
- * Before, the card followed the featured product alone (as old Amore's did) while the bid bar followed
25
- * the round's lot, so a round opened on a lot the host wasn't featuring (a moderator rejoining the
26
- * dashboard, 2026-10-26) showed one product "Upcoming" over bids on another. A lot the session hasn't
27
- * loaded yet leaves the featured product on the card.
28
- */
29
- export declare function productOnCard<Lot extends {
30
- storeProductId: string;
31
- }>(featured: Lot | null, products: readonly Lot[], round: {
32
- biddingOpen: boolean;
33
- storeProductId: string | null;
34
- }): Lot | null;
35
- /**
36
- * The record's per-lot fields joined onto the commerce adapter's products: the lot number (`sellId`)
37
- * and, on an auction, the opening bid (`baseBidPrice`). The adapter is asked for products by id and
38
- * knows nothing of either. Matched by `storeProductId`.
39
- *
40
- * The same array when the record has neither field for any lot, so an app on a gateway that issues
41
- * none keeps the adapter's own objects.
42
- */
43
- export declare function withLotFieldsFromRecord<Raw>(products: LiveProduct<Raw>[], recordLots: Pick<LiveStreamProduct, 'storeProductId' | 'sellId' | 'baseBidPrice'>[]): LiveProduct<Raw>[];
44
- //# sourceMappingURL=showLots.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showLots.d.ts","sourceRoot":"","sources":["../src/showLots.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,IAAI,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,EAAE,CAKvH;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,GAAG,SAAS;IAAE,cAAc,EAAE,MAAM,CAAA;CAAE,EAClE,QAAQ,EAAE,GAAG,GAAG,IAAI,EACpB,QAAQ,EAAE,SAAS,GAAG,EAAE,EACxB,KAAK,EAAE;IAAE,WAAW,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAC7D,GAAG,GAAG,IAAI,CAIZ;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EACzC,QAAQ,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,EAC5B,UAAU,EAAE,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,GAAG,QAAQ,GAAG,cAAc,CAAC,EAAE,GAClF,WAAW,CAAC,GAAG,CAAC,EAAE,CAiBpB"}
package/dist/showLots.js DELETED
@@ -1,70 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.featuredFirst = featuredFirst;
4
- exports.productOnCard = productOnCard;
5
- exports.withLotFieldsFromRecord = withLotFieldsFromRecord;
6
- /**
7
- * The list with the featured item lifted to the front, the rest in the host's order: a shopper who
8
- * opens the shop wants what the host is holding up. It lifts one item; it doesn't sort. The same
9
- * array when there is nothing to move (no featured item, not in the list, or already first). Works on
10
- * the session's products or on the catalogue's own (`raw`), matched by `id`.
11
- *
12
- * Amore's shop sheet and Freckled Poppy's (`LiveShopSheet01`) each did this.
13
- */
14
- function featuredFirst(items, featuredId) {
15
- if (!featuredId)
16
- return items;
17
- const at = items.findIndex((item) => item.id === featuredId);
18
- if (at <= 0)
19
- return items;
20
- return [items[at], ...items.slice(0, at), ...items.slice(at + 1)];
21
- }
22
- /**
23
- * The product on the Live screen's card (0.16.0, ENG-974): while a round is open, the lot it is on;
24
- * otherwise the product the host features. `useLiveShop`'s card and `useLiveAuction`'s round on it both
25
- * read this, so the card never shows one product while the bid bar takes bids on another.
26
- *
27
- * Before, the card followed the featured product alone (as old Amore's did) while the bid bar followed
28
- * the round's lot, so a round opened on a lot the host wasn't featuring (a moderator rejoining the
29
- * dashboard, 2026-10-26) showed one product "Upcoming" over bids on another. A lot the session hasn't
30
- * loaded yet leaves the featured product on the card.
31
- */
32
- function productOnCard(featured, products, round) {
33
- var _a;
34
- if (!round.biddingOpen || !round.storeProductId)
35
- return featured;
36
- if ((featured === null || featured === void 0 ? void 0 : featured.storeProductId) === round.storeProductId)
37
- return featured;
38
- return (_a = products.find((lot) => lot.storeProductId === round.storeProductId)) !== null && _a !== void 0 ? _a : featured;
39
- }
40
- /**
41
- * The record's per-lot fields joined onto the commerce adapter's products: the lot number (`sellId`)
42
- * and, on an auction, the opening bid (`baseBidPrice`). The adapter is asked for products by id and
43
- * knows nothing of either. Matched by `storeProductId`.
44
- *
45
- * The same array when the record has neither field for any lot, so an app on a gateway that issues
46
- * none keeps the adapter's own objects.
47
- */
48
- function withLotFieldsFromRecord(products, recordLots) {
49
- var _a, _b;
50
- const byLot = new Map();
51
- for (const lot of recordLots) {
52
- if (lot.sellId || lot.baseBidPrice != null) {
53
- byLot.set(lot.storeProductId, { sellId: (_a = lot.sellId) !== null && _a !== void 0 ? _a : null, baseBidPrice: (_b = lot.baseBidPrice) !== null && _b !== void 0 ? _b : null });
54
- }
55
- }
56
- if (!byLot.size)
57
- return products;
58
- return products.map((product) => {
59
- var _a, _b, _c, _d;
60
- const fields = byLot.get(product.storeProductId);
61
- if (!fields)
62
- return product;
63
- return {
64
- ...product,
65
- sellId: (_b = (_a = fields.sellId) !== null && _a !== void 0 ? _a : product.sellId) !== null && _b !== void 0 ? _b : null,
66
- baseBidPrice: (_d = (_c = fields.baseBidPrice) !== null && _c !== void 0 ? _c : product.baseBidPrice) !== null && _d !== void 0 ? _d : null,
67
- };
68
- });
69
- }
70
- //# sourceMappingURL=showLots.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showLots.js","sourceRoot":"","sources":["../src/showLots.ts"],"names":[],"mappings":";;AAgBA,sCAKC;AAYD,sCAQC;AAUD,0DAoBC;AA/DD;;;;;;;GAOG;AACH,SAAgB,aAAa,CAA8B,KAAa,EAAE,UAAqC;IAC7G,IAAI,CAAC,UAAU;QAAE,OAAO,KAAK,CAAC;IAC9B,MAAM,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC;IAC7D,IAAI,EAAE,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC1B,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AACpE,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,aAAa,CAC3B,QAAoB,EACpB,QAAwB,EACxB,KAA8D;;IAE9D,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,CAAC,cAAc;QAAE,OAAO,QAAQ,CAAC;IACjE,IAAI,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,cAA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A live room publishes each viewer's name to everyone watching, so this is a privacy boundary, not
5
- * formatting: an email address must never reach a screen. The SDK applies `publicName` to every name
6
- * it hands out (comments and the room's history, cart cards, reactions, the auction's leader and
7
- * winner, the giveaway's winner and entrants, a replay's chat) and to the name it publishes for this
8
- * viewer. Names from older apps, or already stored in a room's history, arrive as whatever they sent,
9
- * which is how a full address was once shown to a room (Freckled Poppy's DEL-2758).
10
- *
11
- * Pure, so it loads in plain Node for tests and in an app's own test runner.
12
- */
13
- /**
14
- * A name as it may be shown: trimmed; an email keeps only the part before the @ ("jane@x.com" →
15
- * "jane"); a name that starts with @ is a handle the viewer chose ("@jane") and stays whole; a real
16
- * name ("Jane Doe") is unchanged. Null when nothing usable is left.
17
- */
18
- export declare function publicName(name: string | null | undefined): string | null;
19
- /**
20
- * The first word of a name, for a place with no room for the rest (a card that shares one line with a
21
- * product title): "Jane Doe" → "Jane". Made safe first, so never an email. Null when nothing is left.
22
- */
23
- export declare function firstNameOf(name: string | null | undefined): string | null;
24
- /** What a signed-in viewer is called in the room: the parts of a customer this reads. */
25
- export interface NamedCustomer {
26
- firstName?: string | null;
27
- lastName?: string | null;
28
- /**
29
- * Never read (0.13.0): the room never shows an email, nor the part of it before the @. Kept so code
30
- * that passes a customer with it still builds.
31
- */
32
- email?: string | null;
33
- }
34
- /**
35
- * The name a signed-in customer comments, bids and enters under: first and last name, else whichever
36
- * of the two they gave. Null when their account has no name (or nothing usable), and when signed out.
37
- *
38
- * **Never their email, nor any part of it** (0.13.0). Until then a customer with no name on their
39
- * account was called by the part of their email before the @, and the room showed it to everyone: a
40
- * Shopify sign-in by emailed code leaves the name blank, so most new accounts were named that way. Null
41
- * leaves the session's own choice in charge (a name typed on this phone), and the app asks for a name
42
- * before the shopper's first comment: amore-v2 asks once and saves the answer to the account.
43
- *
44
- * The same rule amore-v2 (`liveViewerName`) and Freckled Poppy (`LiveSessionHost`) kept apart; pass it
45
- * to `LiveSessionProvider`'s `viewerName`, and `createShopifyLiveIdentity`'s `customerName` uses it.
46
- */
47
- export declare function viewerNameFor(customer: NamedCustomer | null | undefined): string | null;
48
- /**
49
- * The names nobody watching may comment or enter under (0.13.0): the show's team. A viewer named
50
- * "Host" reads to everyone else as the host answering. An app passes its own list to
51
- * `LiveSessionProvider` (`blockedNames`); this is the list when it passes none.
52
- */
53
- export declare const DEFAULT_BLOCKED_VIEWER_NAMES: readonly string[];
54
- /** The most names `blockedNamesFrom` reads: amore-v2's Settings › Live Room list holds 15. */
55
- export declare const MOST_BLOCKED_NAMES = 15;
56
- /**
57
- * The blocked names from a list someone published (0.15.0, moved from amore-v2's `useBlockedNames`;
58
- * decided 2026-10-19 by its Head of Engineering: a list the PM can change, Settings › Live Room). Each
59
- * row is a name or `{ name }`, trimmed; a row that isn't a name is left out, and at most `most` are
60
- * read. A list that is empty, unreadable or unset reads as `DEFAULT_BLOCKED_VIEWER_NAMES`, so the
61
- * team's names are never left open by a cleared field. The app reads its own list and passes the
62
- * result as `LiveSellingProvider`'s `blockedNames`.
63
- */
64
- export declare function blockedNamesFrom(published: unknown, most?: number): readonly string[];
65
- /**
66
- * Whether `name` is one of `blockedNames` (Host and Moderator unless given). The whole name is
67
- * compared, with capitals, accents, spaces, punctuation and symbols left out: "HOST", "H.o.s.t" and
68
- * "Hôst 🎤" are "Host"; "The Host" and "Hostess" aren't. False for a name with nothing left to compare.
69
- */
70
- export declare function isBlockedViewerName(name: string | null | undefined, blockedNames?: readonly string[]): boolean;
71
- /**
72
- * Two names the room shows, compared as a person reads them: spaces and capitals aside ("Jane Doe "
73
- * is "jane doe"). False when either is empty. How a giveaway's winner is matched to this shopper when
74
- * the record doesn't name them by id (`isYourGiveawayWin`); amore-v2's rule.
75
- */
76
- export declare function sameRoomName(first: string | null | undefined, second: string | null | undefined): boolean;
77
- //# sourceMappingURL=showNames.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showNames.d.ts","sourceRoot":"","sources":["../src/showNames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAKzE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAE1E;AAED,yFAAyF;AACzF,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAOvF;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,SAAS,MAAM,EAA0B,CAAC;AAErF,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,GAAE,MAA2B,GAAG,SAAS,MAAM,EAAE,CAUzG;AA+BD;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,YAAY,GAAE,SAAS,MAAM,EAAiC,GAC7D,OAAO,CAIT;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAGzG"}
package/dist/showNames.js DELETED
@@ -1,143 +0,0 @@
1
- "use strict";
2
- /**
3
- * Names the room shows to everyone, made safe to show (0.9.0).
4
- *
5
- * A live room publishes each viewer's name to everyone watching, so this is a privacy boundary, not
6
- * formatting: an email address must never reach a screen. The SDK applies `publicName` to every name
7
- * it hands out (comments and the room's history, cart cards, reactions, the auction's leader and
8
- * winner, the giveaway's winner and entrants, a replay's chat) and to the name it publishes for this
9
- * viewer. Names from older apps, or already stored in a room's history, arrive as whatever they sent,
10
- * which is how a full address was once shown to a room (Freckled Poppy's DEL-2758).
11
- *
12
- * Pure, so it loads in plain Node for tests and in an app's own test runner.
13
- */
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.MOST_BLOCKED_NAMES = exports.DEFAULT_BLOCKED_VIEWER_NAMES = void 0;
16
- exports.publicName = publicName;
17
- exports.firstNameOf = firstNameOf;
18
- exports.viewerNameFor = viewerNameFor;
19
- exports.blockedNamesFrom = blockedNamesFrom;
20
- exports.isBlockedViewerName = isBlockedViewerName;
21
- exports.sameRoomName = sameRoomName;
22
- /**
23
- * A name as it may be shown: trimmed; an email keeps only the part before the @ ("jane@x.com" →
24
- * "jane"); a name that starts with @ is a handle the viewer chose ("@jane") and stays whole; a real
25
- * name ("Jane Doe") is unchanged. Null when nothing usable is left.
26
- */
27
- function publicName(name) {
28
- var _a;
29
- const trimmed = typeof name === 'string' ? name.trim() : '';
30
- if (!trimmed)
31
- return null;
32
- if (trimmed.startsWith('@'))
33
- return trimmed;
34
- return ((_a = trimmed.split('@')[0]) === null || _a === void 0 ? void 0 : _a.trim()) || null;
35
- }
36
- /**
37
- * The first word of a name, for a place with no room for the rest (a card that shares one line with a
38
- * product title): "Jane Doe" → "Jane". Made safe first, so never an email. Null when nothing is left.
39
- */
40
- function firstNameOf(name) {
41
- var _a;
42
- return ((_a = publicName(name)) === null || _a === void 0 ? void 0 : _a.split(/\s+/)[0]) || null;
43
- }
44
- /**
45
- * The name a signed-in customer comments, bids and enters under: first and last name, else whichever
46
- * of the two they gave. Null when their account has no name (or nothing usable), and when signed out.
47
- *
48
- * **Never their email, nor any part of it** (0.13.0). Until then a customer with no name on their
49
- * account was called by the part of their email before the @, and the room showed it to everyone: a
50
- * Shopify sign-in by emailed code leaves the name blank, so most new accounts were named that way. Null
51
- * leaves the session's own choice in charge (a name typed on this phone), and the app asks for a name
52
- * before the shopper's first comment: amore-v2 asks once and saves the answer to the account.
53
- *
54
- * The same rule amore-v2 (`liveViewerName`) and Freckled Poppy (`LiveSessionHost`) kept apart; pass it
55
- * to `LiveSessionProvider`'s `viewerName`, and `createShopifyLiveIdentity`'s `customerName` uses it.
56
- */
57
- function viewerNameFor(customer) {
58
- var _a;
59
- if (!customer)
60
- return null;
61
- const fullName = [customer.firstName, customer.lastName]
62
- .map((part) => (typeof part === 'string' ? part.trim() : ''))
63
- .filter(Boolean)
64
- .join(' ');
65
- return (_a = publicName(fullName)) !== null && _a !== void 0 ? _a : publicName(customer.firstName);
66
- }
67
- /**
68
- * The names nobody watching may comment or enter under (0.13.0): the show's team. A viewer named
69
- * "Host" reads to everyone else as the host answering. An app passes its own list to
70
- * `LiveSessionProvider` (`blockedNames`); this is the list when it passes none.
71
- */
72
- exports.DEFAULT_BLOCKED_VIEWER_NAMES = ['Host', 'Moderator'];
73
- /** The most names `blockedNamesFrom` reads: amore-v2's Settings › Live Room list holds 15. */
74
- exports.MOST_BLOCKED_NAMES = 15;
75
- /**
76
- * The blocked names from a list someone published (0.15.0, moved from amore-v2's `useBlockedNames`;
77
- * decided 2026-10-19 by its Head of Engineering: a list the PM can change, Settings › Live Room). Each
78
- * row is a name or `{ name }`, trimmed; a row that isn't a name is left out, and at most `most` are
79
- * read. A list that is empty, unreadable or unset reads as `DEFAULT_BLOCKED_VIEWER_NAMES`, so the
80
- * team's names are never left open by a cleared field. The app reads its own list and passes the
81
- * result as `LiveSellingProvider`'s `blockedNames`.
82
- */
83
- function blockedNamesFrom(published, most = exports.MOST_BLOCKED_NAMES) {
84
- const rows = Array.isArray(published) ? published : [];
85
- const names = rows
86
- .map((row) => {
87
- const name = typeof row === 'string' ? row : row === null || row === void 0 ? void 0 : row.name;
88
- return typeof name === 'string' ? name.trim() : '';
89
- })
90
- .filter(Boolean)
91
- .slice(0, most);
92
- return names.length > 0 ? names : exports.DEFAULT_BLOCKED_VIEWER_NAMES;
93
- }
94
- /**
95
- * Anything that isn't a letter or a digit, in any alphabet: spaces, punctuation, symbols, emoji, and
96
- * the accents an accented letter is split into. Built when the file loads, in case an engine can't read
97
- * Unicode classes in a pattern (Hermes can); then the common ones by range.
98
- */
99
- const NOT_A_LETTER_OR_DIGIT = (() => {
100
- try {
101
- return new RegExp('[^\\p{L}\\p{N}]', 'gu');
102
- }
103
- catch {
104
- return /[\s!-/:-@[-`{-~\u00a0-\u00bf\u0300-\u036f\u2000-\u2bff\u3000-\u303f\ufe00-\ufe0f\ud800-\udfff]/g;
105
- }
106
- })();
107
- /**
108
- * A name as it is compared with the blocked ones: capitals, accents, spaces, punctuation and symbols
109
- * left out, so "MOD-erator!", "m o d e r a t o r" and "Hôst" are "moderator" and "host". Digits stay,
110
- * so "M0derator" isn't "moderator" (a list can name it too).
111
- */
112
- function comparableName(name) {
113
- let separated = name;
114
- try {
115
- // "ô" becomes "o" and its accent, which the pattern then leaves out.
116
- separated = name.normalize('NFKD');
117
- }
118
- catch {
119
- // An engine without `normalize` compares with the accents in.
120
- }
121
- return separated.toLowerCase().replace(NOT_A_LETTER_OR_DIGIT, '');
122
- }
123
- /**
124
- * Whether `name` is one of `blockedNames` (Host and Moderator unless given). The whole name is
125
- * compared, with capitals, accents, spaces, punctuation and symbols left out: "HOST", "H.o.s.t" and
126
- * "Hôst 🎤" are "Host"; "The Host" and "Hostess" aren't. False for a name with nothing left to compare.
127
- */
128
- function isBlockedViewerName(name, blockedNames = exports.DEFAULT_BLOCKED_VIEWER_NAMES) {
129
- const compared = typeof name === 'string' ? comparableName(name) : '';
130
- if (!compared)
131
- return false;
132
- return blockedNames.some((blocked) => typeof blocked === 'string' && comparableName(blocked) === compared);
133
- }
134
- /**
135
- * Two names the room shows, compared as a person reads them: spaces and capitals aside ("Jane Doe "
136
- * is "jane doe"). False when either is empty. How a giveaway's winner is matched to this shopper when
137
- * the record doesn't name them by id (`isYourGiveawayWin`); amore-v2's rule.
138
- */
139
- function sameRoomName(first, second) {
140
- const plain = (name) => (name !== null && name !== void 0 ? name : '').trim().replace(/\s+/g, ' ').toLowerCase();
141
- return plain(first) !== '' && plain(first) === plain(second);
142
- }
143
- //# sourceMappingURL=showNames.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"showNames.js","sourceRoot":"","sources":["../src/showNames.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAOH,gCAKC;AAMD,kCAEC;AA0BD,sCAOC;AAoBD,4CAUC;AAoCD,kDAOC;AAOD,oCAGC;AAtID;;;;GAIG;AACH,SAAgB,UAAU,CAAC,IAA+B;;IACxD,MAAM,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5D,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,OAAO,CAAC;IAC5C,OAAO,CAAA,MAAA,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,0CAAE,IAAI,EAAE,KAAI,IAAI,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,SAAgB,WAAW,CAAC,IAA+B;;IACzD,OAAO,CAAA,MAAA,UAAU,CAAC,IAAI,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,KAAI,IAAI,CAAC;AACnD,CAAC;AAaD;;;;;;;;;;;;GAYG;AACH,SAAgB,aAAa,CAAC,QAA0C;;IACtE,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC3B,MAAM,QAAQ,GAAG,CAAC,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC;SACrD,GAAG,CAAC,CAAC,IAAI,EA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