@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.
- package/dist/attribution.d.ts +2 -16
- package/dist/attribution.d.ts.map +1 -1
- package/dist/attribution.js +4 -10
- package/dist/attribution.js.map +1 -1
- package/dist/auctions.d.ts.map +1 -1
- package/dist/auctions.js +11 -42
- package/dist/auctions.js.map +1 -1
- package/dist/cartAttributes.d.ts +0 -10
- package/dist/cartAttributes.d.ts.map +1 -1
- package/dist/cartAttributes.js +1 -20
- package/dist/cartAttributes.js.map +1 -1
- package/dist/client.d.ts +2 -51
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +23 -123
- package/dist/client.js.map +1 -1
- package/dist/clips.d.ts +1 -12
- package/dist/clips.d.ts.map +1 -1
- package/dist/clips.js +6 -114
- package/dist/clips.js.map +1 -1
- package/dist/commentLinks.d.ts +0 -29
- package/dist/commentLinks.d.ts.map +1 -1
- package/dist/commentLinks.js.map +1 -1
- package/dist/engine.native.d.ts.map +1 -1
- package/dist/engine.native.js +845 -17
- package/dist/engine.native.js.map +1 -1
- package/dist/index.d.ts +4 -48
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -240
- package/dist/index.js.map +1 -1
- package/dist/polls.d.ts.map +1 -1
- package/dist/polls.js +0 -3
- package/dist/polls.js.map +1 -1
- package/dist/react/LiveSellingProvider.d.ts +1 -54
- package/dist/react/LiveSellingProvider.d.ts.map +1 -1
- package/dist/react/LiveSellingProvider.js +3 -60
- package/dist/react/LiveSellingProvider.js.map +1 -1
- package/dist/react/LiveVideoTarget.d.ts.map +1 -1
- package/dist/react/LiveVideoTarget.js +3 -41
- package/dist/react/LiveVideoTarget.js.map +1 -1
- package/dist/react/index.d.ts +3 -30
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -79
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.web.d.ts +32 -36
- package/dist/react/index.web.d.ts.map +1 -1
- package/dist/react/index.web.js +122 -102
- package/dist/react/index.web.js.map +1 -1
- package/dist/react/useAuctionBidGate.d.ts +6 -62
- package/dist/react/useAuctionBidGate.d.ts.map +1 -1
- package/dist/react/useAuctionBidGate.js +27 -228
- package/dist/react/useAuctionBidGate.js.map +1 -1
- package/dist/react/useAuctionWins.d.ts +4 -14
- package/dist/react/useAuctionWins.d.ts.map +1 -1
- package/dist/react/useAuctionWins.js +5 -16
- package/dist/react/useAuctionWins.js.map +1 -1
- package/dist/react/useClips.d.ts +1 -7
- package/dist/react/useClips.d.ts.map +1 -1
- package/dist/react/useClips.js +7 -20
- package/dist/react/useClips.js.map +1 -1
- package/dist/react/useLiveSession.d.ts +3 -15
- package/dist/react/useLiveSession.d.ts.map +1 -1
- package/dist/react/useLiveSession.js +199 -612
- package/dist/react/useLiveSession.js.map +1 -1
- package/dist/react/useLiveStreams.d.ts.map +1 -1
- package/dist/react/useLiveStreams.js +2 -6
- package/dist/react/useLiveStreams.js.map +1 -1
- package/dist/react/useOngoingLive.d.ts +0 -1
- package/dist/react/useOngoingLive.d.ts.map +1 -1
- package/dist/react/useOngoingLive.js +1 -7
- package/dist/react/useOngoingLive.js.map +1 -1
- package/dist/react/useReplays.d.ts +0 -12
- package/dist/react/useReplays.d.ts.map +1 -1
- package/dist/react/useReplays.js +24 -56
- package/dist/react/useReplays.js.map +1 -1
- package/dist/react/useStreamInfo.d.ts +2 -13
- package/dist/react/useStreamInfo.d.ts.map +1 -1
- package/dist/react/useStreamInfo.js +8 -36
- package/dist/react/useStreamInfo.js.map +1 -1
- package/dist/replays.d.ts +0 -14
- package/dist/replays.d.ts.map +1 -1
- package/dist/replays.js +22 -68
- package/dist/replays.js.map +1 -1
- package/dist/session.d.ts +6 -39
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +22 -209
- package/dist/session.js.map +1 -1
- package/dist/sessionTypes.d.ts +18 -217
- package/dist/sessionTypes.d.ts.map +1 -1
- package/dist/sessionTypes.js +1 -2
- package/dist/sessionTypes.js.map +1 -1
- package/dist/streams.d.ts +1 -27
- package/dist/streams.d.ts.map +1 -1
- package/dist/streams.js +21 -84
- package/dist/streams.js.map +1 -1
- package/dist/types.d.ts +10 -288
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -2
- package/dist/types.js.map +1 -1
- package/dist/wire.d.ts +0 -31
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +0 -25
- package/dist/wire.js.map +1 -1
- package/dist/zego.d.ts +1 -3
- package/dist/zego.d.ts.map +1 -1
- package/dist/zego.js +1 -1
- package/package.json +1 -1
- package/dist/auctionComments.d.ts +0 -25
- package/dist/auctionComments.d.ts.map +0 -1
- package/dist/auctionComments.js +0 -28
- package/dist/auctionComments.js.map +0 -1
- package/dist/auctionRules.d.ts +0 -77
- package/dist/auctionRules.d.ts.map +0 -1
- package/dist/auctionRules.js +0 -107
- package/dist/auctionRules.js.map +0 -1
- package/dist/cartExtension.d.ts +0 -39
- package/dist/cartExtension.d.ts.map +0 -1
- package/dist/cartExtension.js +0 -51
- package/dist/cartExtension.js.map +0 -1
- package/dist/checkoutRefused.d.ts +0 -9
- package/dist/checkoutRefused.d.ts.map +0 -1
- package/dist/checkoutRefused.js +0 -16
- package/dist/checkoutRefused.js.map +0 -1
- package/dist/clipsPage.d.ts +0 -29
- package/dist/clipsPage.d.ts.map +0 -1
- package/dist/clipsPage.js +0 -49
- package/dist/clipsPage.js.map +0 -1
- package/dist/commentHistory.d.ts +0 -70
- package/dist/commentHistory.d.ts.map +0 -1
- package/dist/commentHistory.js +0 -133
- package/dist/commentHistory.js.map +0 -1
- package/dist/commentLinkCards.d.ts +0 -11
- package/dist/commentLinkCards.d.ts.map +0 -1
- package/dist/commentLinkCards.js +0 -70
- package/dist/commentLinkCards.js.map +0 -1
- package/dist/giveawayPrize.d.ts +0 -13
- package/dist/giveawayPrize.d.ts.map +0 -1
- package/dist/giveawayPrize.js +0 -18
- package/dist/giveawayPrize.js.map +0 -1
- package/dist/giveawayPrizeLines.d.ts +0 -120
- package/dist/giveawayPrizeLines.d.ts.map +0 -1
- package/dist/giveawayPrizeLines.js +0 -97
- package/dist/giveawayPrizeLines.js.map +0 -1
- package/dist/giveawayPrizes.d.ts +0 -20
- package/dist/giveawayPrizes.d.ts.map +0 -1
- package/dist/giveawayPrizes.js +0 -50
- package/dist/giveawayPrizes.js.map +0 -1
- package/dist/giveawayRoster.d.ts +0 -53
- package/dist/giveawayRoster.d.ts.map +0 -1
- package/dist/giveawayRoster.js +0 -93
- package/dist/giveawayRoster.js.map +0 -1
- package/dist/heldComments.d.ts +0 -40
- package/dist/heldComments.d.ts.map +0 -1
- package/dist/heldComments.js +0 -75
- package/dist/heldComments.js.map +0 -1
- package/dist/hiddenShows.d.ts +0 -44
- package/dist/hiddenShows.d.ts.map +0 -1
- package/dist/hiddenShows.js +0 -53
- package/dist/hiddenShows.js.map +0 -1
- package/dist/linkLots.d.ts +0 -64
- package/dist/linkLots.d.ts.map +0 -1
- package/dist/linkLots.js +0 -84
- package/dist/linkLots.js.map +0 -1
- package/dist/liveHaptics.d.ts +0 -7
- package/dist/liveHaptics.d.ts.map +0 -1
- package/dist/liveHaptics.js +0 -11
- package/dist/liveHaptics.js.map +0 -1
- package/dist/liveHaptics.native.d.ts +0 -7
- package/dist/liveHaptics.native.d.ts.map +0 -1
- package/dist/liveHaptics.native.js +0 -12
- package/dist/liveHaptics.native.js.map +0 -1
- package/dist/livePages.d.ts +0 -176
- package/dist/livePages.d.ts.map +0 -1
- package/dist/livePages.js +0 -216
- package/dist/livePages.js.map +0 -1
- package/dist/liveRoom.d.ts +0 -21
- package/dist/liveRoom.d.ts.map +0 -1
- package/dist/liveRoom.js +0 -28
- package/dist/liveRoom.js.map +0 -1
- package/dist/liveShow.d.ts +0 -65
- package/dist/liveShow.d.ts.map +0 -1
- package/dist/liveShow.js +0 -65
- package/dist/liveShow.js.map +0 -1
- package/dist/missedPolls.d.ts +0 -27
- package/dist/missedPolls.d.ts.map +0 -1
- package/dist/missedPolls.js +0 -16
- package/dist/missedPolls.js.map +0 -1
- package/dist/pageOptions.d.ts +0 -149
- package/dist/pageOptions.d.ts.map +0 -1
- package/dist/pageOptions.js +0 -123
- package/dist/pageOptions.js.map +0 -1
- package/dist/pageTypes.d.ts +0 -185
- package/dist/pageTypes.d.ts.map +0 -1
- package/dist/pageTypes.js +0 -3
- package/dist/pageTypes.js.map +0 -1
- package/dist/phoneTaps.d.ts +0 -25
- package/dist/phoneTaps.d.ts.map +0 -1
- package/dist/phoneTaps.js +0 -47
- package/dist/phoneTaps.js.map +0 -1
- package/dist/pipWindow.d.ts +0 -85
- package/dist/pipWindow.d.ts.map +0 -1
- package/dist/pipWindow.js +0 -88
- package/dist/pipWindow.js.map +0 -1
- package/dist/react/clocks.d.ts +0 -29
- package/dist/react/clocks.d.ts.map +0 -1
- package/dist/react/clocks.js +0 -124
- package/dist/react/clocks.js.map +0 -1
- package/dist/react/navigation.d.ts +0 -13
- package/dist/react/navigation.d.ts.map +0 -1
- package/dist/react/navigation.js +0 -7
- package/dist/react/navigation.js.map +0 -1
- package/dist/react/platformSession.d.ts +0 -16
- package/dist/react/platformSession.d.ts.map +0 -1
- package/dist/react/platformSession.js +0 -28
- package/dist/react/platformSession.js.map +0 -1
- package/dist/react/platformSession.web.d.ts +0 -35
- package/dist/react/platformSession.web.d.ts.map +0 -1
- package/dist/react/platformSession.web.js +0 -148
- package/dist/react/platformSession.web.js.map +0 -1
- package/dist/react/replayPlayer.d.ts +0 -83
- package/dist/react/replayPlayer.d.ts.map +0 -1
- package/dist/react/replayPlayer.js +0 -315
- package/dist/react/replayPlayer.js.map +0 -1
- package/dist/react/share.d.ts +0 -22
- package/dist/react/share.d.ts.map +0 -1
- package/dist/react/share.js +0 -45
- package/dist/react/share.js.map +0 -1
- package/dist/react/shopifyProviders.d.ts +0 -82
- package/dist/react/shopifyProviders.d.ts.map +0 -1
- package/dist/react/shopifyProviders.js +0 -113
- package/dist/react/shopifyProviders.js.map +0 -1
- package/dist/react/showPages.d.ts +0 -106
- package/dist/react/showPages.d.ts.map +0 -1
- package/dist/react/showPages.js +0 -166
- package/dist/react/showPages.js.map +0 -1
- package/dist/react/showPagesOnDevice.d.ts +0 -18
- package/dist/react/showPagesOnDevice.d.ts.map +0 -1
- package/dist/react/showPagesOnDevice.js +0 -31
- package/dist/react/showPagesOnDevice.js.map +0 -1
- package/dist/react/startSignIn.d.ts +0 -3
- package/dist/react/startSignIn.d.ts.map +0 -1
- package/dist/react/startSignIn.js +0 -19
- package/dist/react/startSignIn.js.map +0 -1
- package/dist/react/systemPictureInPicture.d.ts +0 -34
- package/dist/react/systemPictureInPicture.d.ts.map +0 -1
- package/dist/react/systemPictureInPicture.js +0 -93
- package/dist/react/systemPictureInPicture.js.map +0 -1
- package/dist/react/useAccountName.d.ts +0 -8
- package/dist/react/useAccountName.d.ts.map +0 -1
- package/dist/react/useAccountName.js +0 -49
- package/dist/react/useAccountName.js.map +0 -1
- package/dist/react/useClipsPage.d.ts +0 -47
- package/dist/react/useClipsPage.d.ts.map +0 -1
- package/dist/react/useClipsPage.js +0 -130
- package/dist/react/useClipsPage.js.map +0 -1
- package/dist/react/useCommentLinkCards.d.ts +0 -6
- package/dist/react/useCommentLinkCards.d.ts.map +0 -1
- package/dist/react/useCommentLinkCards.js +0 -67
- package/dist/react/useCommentLinkCards.js.map +0 -1
- package/dist/react/useFeaturedClip.d.ts +0 -15
- package/dist/react/useFeaturedClip.d.ts.map +0 -1
- package/dist/react/useFeaturedClip.js +0 -52
- package/dist/react/useFeaturedClip.js.map +0 -1
- package/dist/react/useGiveawayEntry.d.ts +0 -59
- package/dist/react/useGiveawayEntry.d.ts.map +0 -1
- package/dist/react/useGiveawayEntry.js +0 -170
- package/dist/react/useGiveawayEntry.js.map +0 -1
- package/dist/react/useGiveawayPrize.d.ts +0 -12
- package/dist/react/useGiveawayPrize.d.ts.map +0 -1
- package/dist/react/useGiveawayPrize.js +0 -53
- package/dist/react/useGiveawayPrize.js.map +0 -1
- package/dist/react/useGiveawayPrizes.d.ts +0 -4
- package/dist/react/useGiveawayPrizes.d.ts.map +0 -1
- package/dist/react/useGiveawayPrizes.js +0 -58
- package/dist/react/useGiveawayPrizes.js.map +0 -1
- package/dist/react/useHiddenShows.d.ts +0 -10
- package/dist/react/useHiddenShows.d.ts.map +0 -1
- package/dist/react/useHiddenShows.js +0 -30
- package/dist/react/useHiddenShows.js.map +0 -1
- package/dist/react/useKeepScreenAwake.d.ts +0 -2
- package/dist/react/useKeepScreenAwake.d.ts.map +0 -1
- package/dist/react/useKeepScreenAwake.js +0 -34
- package/dist/react/useKeepScreenAwake.js.map +0 -1
- package/dist/react/useLiveAuction.d.ts +0 -106
- package/dist/react/useLiveAuction.d.ts.map +0 -1
- package/dist/react/useLiveAuction.js +0 -255
- package/dist/react/useLiveAuction.js.map +0 -1
- package/dist/react/useLiveChat.d.ts +0 -110
- package/dist/react/useLiveChat.d.ts.map +0 -1
- package/dist/react/useLiveChat.js +0 -230
- package/dist/react/useLiveChat.js.map +0 -1
- package/dist/react/useLiveGiveawaysAndPolls.d.ts +0 -95
- package/dist/react/useLiveGiveawaysAndPolls.d.ts.map +0 -1
- package/dist/react/useLiveGiveawaysAndPolls.js +0 -225
- package/dist/react/useLiveGiveawaysAndPolls.js.map +0 -1
- package/dist/react/useLivePage.d.ts +0 -136
- package/dist/react/useLivePage.d.ts.map +0 -1
- package/dist/react/useLivePage.js +0 -319
- package/dist/react/useLivePage.js.map +0 -1
- package/dist/react/useLiveShop.d.ts +0 -97
- package/dist/react/useLiveShop.d.ts.map +0 -1
- package/dist/react/useLiveShop.js +0 -197
- package/dist/react/useLiveShop.js.map +0 -1
- package/dist/react/useLiveShow.d.ts +0 -3
- package/dist/react/useLiveShow.d.ts.map +0 -1
- package/dist/react/useLiveShow.js +0 -21
- package/dist/react/useLiveShow.js.map +0 -1
- package/dist/react/useMySilentAuctionBids.d.ts +0 -29
- package/dist/react/useMySilentAuctionBids.d.ts.map +0 -1
- package/dist/react/useMySilentAuctionBids.js +0 -157
- package/dist/react/useMySilentAuctionBids.js.map +0 -1
- package/dist/react/useReplayPage.d.ts +0 -155
- package/dist/react/useReplayPage.d.ts.map +0 -1
- package/dist/react/useReplayPage.js +0 -580
- package/dist/react/useReplayPage.js.map +0 -1
- package/dist/react/useSilentAuctionLot.d.ts +0 -44
- package/dist/react/useSilentAuctionLot.d.ts.map +0 -1
- package/dist/react/useSilentAuctionLot.js +0 -168
- package/dist/react/useSilentAuctionLot.js.map +0 -1
- package/dist/react/useSilentAuctionLots.d.ts +0 -41
- package/dist/react/useSilentAuctionLots.d.ts.map +0 -1
- package/dist/react/useSilentAuctionLots.js +0 -64
- package/dist/react/useSilentAuctionLots.js.map +0 -1
- package/dist/react/useSilentAuctionRounds.d.ts +0 -15
- package/dist/react/useSilentAuctionRounds.d.ts.map +0 -1
- package/dist/react/useSilentAuctionRounds.js +0 -44
- package/dist/react/useSilentAuctionRounds.js.map +0 -1
- package/dist/replayPages.d.ts +0 -31
- package/dist/replayPages.d.ts.map +0 -1
- package/dist/replayPages.js +0 -34
- package/dist/replayPages.js.map +0 -1
- package/dist/shopifyCommerce.d.ts +0 -204
- package/dist/shopifyCommerce.d.ts.map +0 -1
- package/dist/shopifyCommerce.js +0 -217
- package/dist/shopifyCommerce.js.map +0 -1
- package/dist/shopifyIdentity.d.ts +0 -61
- package/dist/shopifyIdentity.d.ts.map +0 -1
- package/dist/shopifyIdentity.js +0 -61
- package/dist/shopifyIdentity.js.map +0 -1
- package/dist/shopifyIds.d.ts +0 -9
- package/dist/shopifyIds.d.ts.map +0 -1
- package/dist/shopifyIds.js +0 -18
- package/dist/shopifyIds.js.map +0 -1
- package/dist/showCredit.d.ts +0 -89
- package/dist/showCredit.d.ts.map +0 -1
- package/dist/showCredit.js +0 -120
- package/dist/showCredit.js.map +0 -1
- package/dist/showLinks.d.ts +0 -24
- package/dist/showLinks.d.ts.map +0 -1
- package/dist/showLinks.js +0 -23
- package/dist/showLinks.js.map +0 -1
- package/dist/showLots.d.ts +0 -44
- package/dist/showLots.d.ts.map +0 -1
- package/dist/showLots.js +0 -70
- package/dist/showLots.js.map +0 -1
- package/dist/showNames.d.ts +0 -77
- package/dist/showNames.d.ts.map +0 -1
- package/dist/showNames.js +0 -143
- package/dist/showNames.js.map +0 -1
- package/dist/showPages.d.ts +0 -56
- package/dist/showPages.d.ts.map +0 -1
- package/dist/showPages.js +0 -48
- package/dist/showPages.js.map +0 -1
- package/dist/silentAuctionFeed.d.ts +0 -49
- package/dist/silentAuctionFeed.d.ts.map +0 -1
- package/dist/silentAuctionFeed.js +0 -242
- package/dist/silentAuctionFeed.js.map +0 -1
- package/dist/silentAuctionRules.d.ts +0 -253
- package/dist/silentAuctionRules.d.ts.map +0 -1
- package/dist/silentAuctionRules.js +0 -489
- package/dist/silentAuctionRules.js.map +0 -1
- package/dist/silentAuctions.d.ts +0 -65
- package/dist/silentAuctions.d.ts.map +0 -1
- package/dist/silentAuctions.js +0 -272
- package/dist/silentAuctions.js.map +0 -1
- package/dist/storeData.d.ts +0 -16
- package/dist/storeData.d.ts.map +0 -1
- package/dist/storeData.js +0 -19
- package/dist/storeData.js.map +0 -1
- package/dist/ui/BubbleFrame.d.ts +0 -38
- package/dist/ui/BubbleFrame.d.ts.map +0 -1
- package/dist/ui/BubbleFrame.js +0 -181
- package/dist/ui/BubbleFrame.js.map +0 -1
- package/dist/ui/LiveBubble.d.ts +0 -43
- package/dist/ui/LiveBubble.d.ts.map +0 -1
- package/dist/ui/LiveBubble.js +0 -116
- package/dist/ui/LiveBubble.js.map +0 -1
- package/dist/ui/ReplayBubble.d.ts +0 -23
- package/dist/ui/ReplayBubble.d.ts.map +0 -1
- package/dist/ui/ReplayBubble.js +0 -71
- package/dist/ui/ReplayBubble.js.map +0 -1
- package/dist/ui.d.ts +0 -27
- package/dist/ui.d.ts.map +0 -1
- package/dist/ui.js +0 -34
- package/dist/ui.js.map +0 -1
- package/dist/unreadRoomMessages.d.ts +0 -26
- package/dist/unreadRoomMessages.d.ts.map +0 -1
- package/dist/unreadRoomMessages.js +0 -62
- package/dist/unreadRoomMessages.js.map +0 -1
- package/dist/viewerRules.d.ts +0 -38
- package/dist/viewerRules.d.ts.map +0 -1
- package/dist/viewerRules.js +0 -46
- package/dist/viewerRules.js.map +0 -1
- package/dist/winsAttribution.d.ts +0 -22
- package/dist/winsAttribution.d.ts.map +0 -1
- package/dist/winsAttribution.js +0 -49
- package/dist/winsAttribution.js.map +0 -1
- package/dist/zegoEngine.d.ts +0 -173
- package/dist/zegoEngine.d.ts.map +0 -1
- package/dist/zegoEngine.js +0 -1069
- package/dist/zegoEngine.js.map +0 -1
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import type { LiveGiveawayPrize } from '../pageTypes';
|
|
2
|
-
/**
|
|
3
|
-
* The Live screen's giveaways and polls, so the screen stays plain tiles. Reads the app's live session
|
|
4
|
-
* for the show the route names, as `useLiveShop` does.
|
|
5
|
-
*
|
|
6
|
-
* - **Only while the show is on air** (playing, or waiting for its host) and the session holds this
|
|
7
|
-
* show's record (`useLiveShow`; never a hidden show the shopper can't see). Once the show has ended,
|
|
8
|
-
* all three tiles go.
|
|
9
|
-
* - **The session does the work:** the giveaway and poll, from the room and from the show's record for
|
|
10
|
-
* a shopper who arrives late; the entry count; whether this shopper has entered
|
|
11
|
-
* (`giveaway.registered`); the entry itself (`actions.enterGiveaway`); the draw's roster, waited for
|
|
12
|
-
* and kept (`giveaway.result.entrantNamesReady`, ENG-705); one vote a poll, kept on the phone
|
|
13
|
-
* (`actions.voteInPoll`), the tally hidden until this phone votes; a giveaway this phone watched end
|
|
14
|
-
* never coming back from an out-of-date record, and a poll the record says has closed never raised;
|
|
15
|
-
* the entry's flow (`useGiveawayEntry`), "YOU WON!" (`giveaway.result.isYou`) and the prize's
|
|
16
|
-
* catalogue read (`useGiveawayPrize`). Nothing here repeats it.
|
|
17
|
-
* - **The giveaway** (`giveawayButton`): the pill while a giveaway is open and not drawn yet. Its sheet
|
|
18
|
-
* shows the prize from the catalogue (Freckled Poppy's: the host picks it from the whole store, not
|
|
19
|
-
* from this show's lots), its variant's photo and price, and the record's own name and variant; until
|
|
20
|
-
* the catalogue answers, the record's variant photo and price (`variantImageUrl`, `variantPrice`). A
|
|
21
|
-
* catalogue read that fails goes to `onWarning`.
|
|
22
|
-
* - **Entering needs sign-in** (Freckled Poppy's rule). Signed out, Enter closes the sheet and starts
|
|
23
|
-
* the app's sign-in (sdk-shopify's `useSignIn`; the app's Sign In page is `routes.openSignIn`); back
|
|
24
|
-
* here signed in, the sheet opens again if the giveaway is still open and not drawn (Freckled
|
|
25
|
-
* Poppy's ENG-583 fix), and the shopper taps Enter themselves. Back without signing in (the Sign In
|
|
26
|
-
* page closed, or the system's sheet dismissed), nothing reopens. `useGiveawayEntry` does this;
|
|
27
|
-
* "back here" is this screen focused with no system sheet up.
|
|
28
|
-
* - **The entry carries the room's name for the shopper** (`session.viewerName`: their account's
|
|
29
|
-
* name, never an email). While their account loads, Enter waits; if the room has none, the sheet
|
|
30
|
-
* asks ("Entering As:", old Amore's) and the entry goes once the session holds the name.
|
|
31
|
-
* - **An account with no first name is asked for one, and it goes on the account** (0.15.0; amore-v2's
|
|
32
|
-
* ENG-686, decided 2026-10-19 by its Head of Engineering, the comment box's way: `useAccountName`).
|
|
33
|
-
* "Entering As:" asks for a first and a last name (`accountName`, starting from what the account
|
|
34
|
-
* has); Enter puts them on the account (sdk-shopify's `updateProfile`) and then enters under that
|
|
35
|
-
* name (`onEnterWithAccountName`). So a shopper is asked once, by a giveaway or a comment. A name
|
|
36
|
-
* that didn't go on the account says so in the sheet (`nameSaveFailed`) and enters nothing. A name
|
|
37
|
-
* the show's team goes by (`LiveSellingProvider`'s `blockedNames`) is refused as it is typed
|
|
38
|
-
* (`isNameAllowed`); the session refuses it too.
|
|
39
|
-
* - An entry the host didn't confirm (`enterGiveaway` answers `{ entered: false }`) says so in the
|
|
40
|
-
* sheet, and Enter can be tried again.
|
|
41
|
-
* - The host's draw closes the sheet (Freckled Poppy's).
|
|
42
|
-
* - **The draw** (`giveawayDraw`): handed over once the roster is ready; "YOU WON!" for the shopper who
|
|
43
|
-
* won (`giveaway.result.isYou`: by customer id when the record names the winner, else among those who
|
|
44
|
-
* entered by name, the gateway naming the winner only by name). A draw already on the session when
|
|
45
|
-
* this screen opens happened while the shopper was elsewhere: it is let go rather than played late.
|
|
46
|
-
* - **Where the prize goes is the server's, by the kind of show** (corrected 2026-10-19 in k-marie-v2,
|
|
47
|
-
* ENG-928). On an auction show the server writes the win to the customer's `auction.winner` metafield
|
|
48
|
-
* only, and Items You Won shows it. On a live show (not an auction) it adds the prize line, with its
|
|
49
|
-
* `GIVEAWAY-…` discount code, to the cart id the shopper entered with (`cartId`, below) and writes no
|
|
50
|
-
* metafield: Items You Won never sees it, and if that cart has been replaced since (a new cart after
|
|
51
|
-
* an order, a dead cart replaced at launch) the prize is lost.
|
|
52
|
-
* - **The poll** (`pollButton`): the chip while a poll is open; its sheet closes when the poll ends or
|
|
53
|
-
* the host opens another (Freckled Poppy's). Voting needs no sign-in.
|
|
54
|
-
*/
|
|
55
|
-
export declare function useLiveGiveawaysAndPolls(): {
|
|
56
|
-
giveawayButton: {
|
|
57
|
-
visible: boolean;
|
|
58
|
-
prize: LiveGiveawayPrize | null;
|
|
59
|
-
entryCount: number;
|
|
60
|
-
entered: boolean;
|
|
61
|
-
entering: boolean;
|
|
62
|
-
signInToEnter: boolean;
|
|
63
|
-
waitingForName: boolean;
|
|
64
|
-
askForName: boolean;
|
|
65
|
-
accountName: import("../pageTypes").NameOnAccount | null;
|
|
66
|
-
nameSaveFailed: boolean;
|
|
67
|
-
isNameAllowed: (name: string) => boolean;
|
|
68
|
-
nameMaxLength: number;
|
|
69
|
-
entryFailed: boolean;
|
|
70
|
-
sheetVisible: boolean;
|
|
71
|
-
onOpenSheet: () => void;
|
|
72
|
-
onCloseSheet: () => void;
|
|
73
|
-
onEnter: (typedName?: string) => void;
|
|
74
|
-
onEnterWithAccountName: (firstName: string, lastName: string) => undefined;
|
|
75
|
-
onSignInToEnter: () => void;
|
|
76
|
-
};
|
|
77
|
-
giveawayDraw: {
|
|
78
|
-
visible: boolean;
|
|
79
|
-
draw: import("./useGiveawayEntry").GiveawayDraw | null;
|
|
80
|
-
isWinner: boolean;
|
|
81
|
-
onDone: () => void;
|
|
82
|
-
};
|
|
83
|
-
pollButton: {
|
|
84
|
-
visible: boolean;
|
|
85
|
-
poll: import("../sessionTypes").LivePollView | null;
|
|
86
|
-
logoUrl: string | null;
|
|
87
|
-
sheetVisible: boolean;
|
|
88
|
-
onOpenSheet: () => void;
|
|
89
|
-
onCloseSheet: () => void;
|
|
90
|
-
onVote: (optionId: string) => void;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
/** What `useLiveGiveawaysAndPolls` hands the Live screen's giveaway and poll tiles. */
|
|
94
|
-
export type LiveGiveawaysAndPolls = ReturnType<typeof useLiveGiveawaysAndPolls>;
|
|
95
|
-
//# sourceMappingURL=useLiveGiveawaysAndPolls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLiveGiveawaysAndPolls.d.ts","sourceRoot":"","sources":["../../src/react/useLiveGiveawaysAndPolls.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AActD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,wBAAwB;;;;;;;;;;;;8BA6FG,MAAM;;;;;;;4CAuCP,MAAM,YAAY,MAAM;;;;;;;;;;;;;;;;2BA1BnD,MAAM;;EA8CpB;AAED,uFAAuF;AACvF,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useLiveGiveawaysAndPolls = useLiveGiveawaysAndPolls;
|
|
4
|
-
/**
|
|
5
|
-
* The Live screen's giveaways and polls (0.14.0, moved from amore-v2's
|
|
6
|
-
* `src/core/hooks/useLiveGiveawaysAndPolls.ts`: phase 5 of its "Live player plan", Freckled Poppy's
|
|
7
|
-
* behaviour, old Amore's look; 0.15.0 adds its account names and blocked names, from amore-v2's
|
|
8
|
-
* `eng928/integration`). The routes are the app's (`LiveSellingProvider`'s `routes`); the route's
|
|
9
|
-
* `streamId` param is read here.
|
|
10
|
-
*/
|
|
11
|
-
const sdk_shopify_1 = require("@tiledev/sdk-shopify");
|
|
12
|
-
const react_1 = require("react");
|
|
13
|
-
const livePages_1 = require("../livePages");
|
|
14
|
-
const pageOptions_1 = require("../pageOptions");
|
|
15
|
-
const sessionTypes_1 = require("../sessionTypes");
|
|
16
|
-
const showNames_1 = require("../showNames");
|
|
17
|
-
const viewer_1 = require("../viewer");
|
|
18
|
-
const LiveSellingProvider_1 = require("./LiveSellingProvider");
|
|
19
|
-
const platformSession_1 = require("./platformSession");
|
|
20
|
-
const useAccountName_1 = require("./useAccountName");
|
|
21
|
-
const useGiveawayEntry_1 = require("./useGiveawayEntry");
|
|
22
|
-
const useGiveawayPrize_1 = require("./useGiveawayPrize");
|
|
23
|
-
const navigation_1 = require("./navigation");
|
|
24
|
-
/**
|
|
25
|
-
* The Live screen's giveaways and polls, so the screen stays plain tiles. Reads the app's live session
|
|
26
|
-
* for the show the route names, as `useLiveShop` does.
|
|
27
|
-
*
|
|
28
|
-
* - **Only while the show is on air** (playing, or waiting for its host) and the session holds this
|
|
29
|
-
* show's record (`useLiveShow`; never a hidden show the shopper can't see). Once the show has ended,
|
|
30
|
-
* all three tiles go.
|
|
31
|
-
* - **The session does the work:** the giveaway and poll, from the room and from the show's record for
|
|
32
|
-
* a shopper who arrives late; the entry count; whether this shopper has entered
|
|
33
|
-
* (`giveaway.registered`); the entry itself (`actions.enterGiveaway`); the draw's roster, waited for
|
|
34
|
-
* and kept (`giveaway.result.entrantNamesReady`, ENG-705); one vote a poll, kept on the phone
|
|
35
|
-
* (`actions.voteInPoll`), the tally hidden until this phone votes; a giveaway this phone watched end
|
|
36
|
-
* never coming back from an out-of-date record, and a poll the record says has closed never raised;
|
|
37
|
-
* the entry's flow (`useGiveawayEntry`), "YOU WON!" (`giveaway.result.isYou`) and the prize's
|
|
38
|
-
* catalogue read (`useGiveawayPrize`). Nothing here repeats it.
|
|
39
|
-
* - **The giveaway** (`giveawayButton`): the pill while a giveaway is open and not drawn yet. Its sheet
|
|
40
|
-
* shows the prize from the catalogue (Freckled Poppy's: the host picks it from the whole store, not
|
|
41
|
-
* from this show's lots), its variant's photo and price, and the record's own name and variant; until
|
|
42
|
-
* the catalogue answers, the record's variant photo and price (`variantImageUrl`, `variantPrice`). A
|
|
43
|
-
* catalogue read that fails goes to `onWarning`.
|
|
44
|
-
* - **Entering needs sign-in** (Freckled Poppy's rule). Signed out, Enter closes the sheet and starts
|
|
45
|
-
* the app's sign-in (sdk-shopify's `useSignIn`; the app's Sign In page is `routes.openSignIn`); back
|
|
46
|
-
* here signed in, the sheet opens again if the giveaway is still open and not drawn (Freckled
|
|
47
|
-
* Poppy's ENG-583 fix), and the shopper taps Enter themselves. Back without signing in (the Sign In
|
|
48
|
-
* page closed, or the system's sheet dismissed), nothing reopens. `useGiveawayEntry` does this;
|
|
49
|
-
* "back here" is this screen focused with no system sheet up.
|
|
50
|
-
* - **The entry carries the room's name for the shopper** (`session.viewerName`: their account's
|
|
51
|
-
* name, never an email). While their account loads, Enter waits; if the room has none, the sheet
|
|
52
|
-
* asks ("Entering As:", old Amore's) and the entry goes once the session holds the name.
|
|
53
|
-
* - **An account with no first name is asked for one, and it goes on the account** (0.15.0; amore-v2's
|
|
54
|
-
* ENG-686, decided 2026-10-19 by its Head of Engineering, the comment box's way: `useAccountName`).
|
|
55
|
-
* "Entering As:" asks for a first and a last name (`accountName`, starting from what the account
|
|
56
|
-
* has); Enter puts them on the account (sdk-shopify's `updateProfile`) and then enters under that
|
|
57
|
-
* name (`onEnterWithAccountName`). So a shopper is asked once, by a giveaway or a comment. A name
|
|
58
|
-
* that didn't go on the account says so in the sheet (`nameSaveFailed`) and enters nothing. A name
|
|
59
|
-
* the show's team goes by (`LiveSellingProvider`'s `blockedNames`) is refused as it is typed
|
|
60
|
-
* (`isNameAllowed`); the session refuses it too.
|
|
61
|
-
* - An entry the host didn't confirm (`enterGiveaway` answers `{ entered: false }`) says so in the
|
|
62
|
-
* sheet, and Enter can be tried again.
|
|
63
|
-
* - The host's draw closes the sheet (Freckled Poppy's).
|
|
64
|
-
* - **The draw** (`giveawayDraw`): handed over once the roster is ready; "YOU WON!" for the shopper who
|
|
65
|
-
* won (`giveaway.result.isYou`: by customer id when the record names the winner, else among those who
|
|
66
|
-
* entered by name, the gateway naming the winner only by name). A draw already on the session when
|
|
67
|
-
* this screen opens happened while the shopper was elsewhere: it is let go rather than played late.
|
|
68
|
-
* - **Where the prize goes is the server's, by the kind of show** (corrected 2026-10-19 in k-marie-v2,
|
|
69
|
-
* ENG-928). On an auction show the server writes the win to the customer's `auction.winner` metafield
|
|
70
|
-
* only, and Items You Won shows it. On a live show (not an auction) it adds the prize line, with its
|
|
71
|
-
* `GIVEAWAY-…` discount code, to the cart id the shopper entered with (`cartId`, below) and writes no
|
|
72
|
-
* metafield: Items You Won never sees it, and if that cart has been replaced since (a new cart after
|
|
73
|
-
* an order, a dead cart replaced at launch) the prize is lost.
|
|
74
|
-
* - **The poll** (`pollButton`): the chip while a poll is open; its sheet closes when the poll ends or
|
|
75
|
-
* the host opens another (Freckled Poppy's). Voting needs no sign-in.
|
|
76
|
-
*/
|
|
77
|
-
function useLiveGiveawaysAndPolls() {
|
|
78
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
79
|
-
const streamId = (_b = (_a = (0, navigation_1.useRoute)().params) === null || _a === void 0 ? void 0 : _a.streamId) !== null && _b !== void 0 ? _b : '';
|
|
80
|
-
const isFocused = (0, navigation_1.useIsFocused)();
|
|
81
|
-
// The session changes only on the room's events, never on a clock.
|
|
82
|
-
const session = (0, platformSession_1.useLiveSession)();
|
|
83
|
-
const { voteInPoll } = session.actions;
|
|
84
|
-
const { loggedIn, restoring, customer } = (0, sdk_shopify_1.useCustomer)();
|
|
85
|
-
const { accountLoading, nameToComplete, saveNameToAccount } = (0, useAccountName_1.useAccountName)();
|
|
86
|
-
const cartId = (_d = (_c = (0, sdk_shopify_1.useCart)().cart) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : null;
|
|
87
|
-
const nav = (0, navigation_1.useNavigation)();
|
|
88
|
-
const { routes, blockedNames } = (0, LiveSellingProvider_1.useLivePageOptions)();
|
|
89
|
-
const signIn = (0, sdk_shopify_1.useSignIn)({ onOpenSignInPage: (method) => routes.openSignIn(method, nav) });
|
|
90
|
-
// ─── Which show ────────────────────────────────────────────────────────────────────────────────
|
|
91
|
-
// The session's record once it is this show's: right after the pin it can still hold the last show's.
|
|
92
|
-
const { show, onAir, capabilities } = (0, platformSession_1.useLiveShow)(streamId);
|
|
93
|
-
const showing = onAir && !!show;
|
|
94
|
-
const giveaway = (_e = session.giveaway) !== null && _e !== void 0 ? _e : sessionTypes_1.IDLE_GIVEAWAY;
|
|
95
|
-
// ─── The giveaway: the entry's flow ────────────────────────────────────────────────────────────
|
|
96
|
-
const entry = (0, useGiveawayEntry_1.useGiveawayEntry)({
|
|
97
|
-
session,
|
|
98
|
-
canEnter: showing && capabilities.canEnterGiveaway,
|
|
99
|
-
isLoggedIn: !!loggedIn,
|
|
100
|
-
startSignIn: signIn.start,
|
|
101
|
-
// Back here: this screen focused (the Sign In page closed), and no system sign-in sheet up.
|
|
102
|
-
screenOnShow: isFocused && !signIn.signingIn,
|
|
103
|
-
// The shopper's ordinary cart, which the gateway ties the entry to (Freckled Poppy's). On a live
|
|
104
|
-
// show the server puts a won prize in this cart, even if the app has moved to another by the draw
|
|
105
|
-
// ("Where the prize goes", above).
|
|
106
|
-
cartId,
|
|
107
|
-
});
|
|
108
|
-
const openGiveaway = entry.open;
|
|
109
|
-
/** The prize from the catalogue: the description, and the given-away variant's photo and price. */
|
|
110
|
-
const { product: prizeProduct, variant: prizeVariant, readError: prizeReadError } = (0, useGiveawayPrize_1.useGiveawayPrize)(openGiveaway);
|
|
111
|
-
(0, react_1.useEffect)(() => {
|
|
112
|
-
var _a;
|
|
113
|
-
if (prizeReadError)
|
|
114
|
-
(0, pageOptions_1.reportLiveWarning)(prizeReadError, { at: 'live.giveawayPrize', storeProductId: (_a = openGiveaway === null || openGiveaway === void 0 ? void 0 : openGiveaway.storeProductId) !== null && _a !== void 0 ? _a : null });
|
|
115
|
-
// Reported once per failed read, for the prize it was for.
|
|
116
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
117
|
-
}, [prizeReadError]);
|
|
118
|
-
// The record's own price, should the catalogue not answer, priced in the show's currency.
|
|
119
|
-
const showCurrency = (_k = (_g = (_f = session.activeProduct) === null || _f === void 0 ? void 0 : _f.currencyCode) !== null && _g !== void 0 ? _g : (_j = (_h = session.products) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.currencyCode) !== null && _k !== void 0 ? _k : null;
|
|
120
|
-
const prize = (0, react_1.useMemo)(() => {
|
|
121
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
122
|
-
if (!openGiveaway)
|
|
123
|
-
return null;
|
|
124
|
-
const recordPrice = openGiveaway.variantPrice && showCurrency ? (0, sdk_shopify_1.formatMoney)({ amount: openGiveaway.variantPrice, currencyCode: showCurrency }) : null;
|
|
125
|
-
const variantPrice = (prizeVariant === null || prizeVariant === void 0 ? void 0 : prizeVariant.price) && (prizeProduct === null || prizeProduct === void 0 ? void 0 : prizeProduct.currencyCode) ? (0, sdk_shopify_1.formatMoney)({ amount: prizeVariant.price, currencyCode: prizeProduct.currencyCode }) : null;
|
|
126
|
-
return {
|
|
127
|
-
productName: openGiveaway.productName || (prizeProduct === null || prizeProduct === void 0 ? void 0 : prizeProduct.title) || '',
|
|
128
|
-
variantTitle: (_b = (_a = openGiveaway.variantTitle) !== null && _a !== void 0 ? _a : prizeVariant === null || prizeVariant === void 0 ? void 0 : prizeVariant.title) !== null && _b !== void 0 ? _b : null,
|
|
129
|
-
retailPrice: prizeVariant ? variantPrice : recordPrice,
|
|
130
|
-
// The catalogue's variant photo, else its product photo; until it answers, the record's variant photo.
|
|
131
|
-
imageUrl: (_f = (_e = (_d = (_c = prizeVariant === null || prizeVariant === void 0 ? void 0 : prizeVariant.imageUrl) !== null && _c !== void 0 ? _c : prizeProduct === null || prizeProduct === void 0 ? void 0 : prizeProduct.imageUrl) !== null && _d !== void 0 ? _d : openGiveaway.variantImageUrl) !== null && _e !== void 0 ? _e : openGiveaway.thumbnailUrl) !== null && _f !== void 0 ? _f : null,
|
|
132
|
-
description: ((_h = (_g = prizeProduct === null || prizeProduct === void 0 ? void 0 : prizeProduct.raw) === null || _g === void 0 ? void 0 : _g.description) === null || _h === void 0 ? void 0 : _h.trim()) || null,
|
|
133
|
-
};
|
|
134
|
-
}, [openGiveaway, prizeProduct, prizeVariant, showCurrency]);
|
|
135
|
-
// ─── Who the shopper is to the giveaway ────────────────────────────────────────────────────────
|
|
136
|
-
const signInToEnter = !loggedIn && !restoring;
|
|
137
|
-
// A stored sign-in still being read, or a signed-in shopper's account (and so their name) still on its
|
|
138
|
-
// way: Enter waits. No first name on the account: asked, and saved to it. Else the room's own ask.
|
|
139
|
-
const { askForName, waitingForName } = (0, livePages_1.giveawayNameAsk)({
|
|
140
|
-
named: !!((_l = session.viewerName) === null || _l === void 0 ? void 0 : _l.trim()),
|
|
141
|
-
loggedIn: !!loggedIn,
|
|
142
|
-
hasCustomer: !!customer,
|
|
143
|
-
accountLoading,
|
|
144
|
-
nameToComplete,
|
|
145
|
-
});
|
|
146
|
-
// "Entering As:" for the account: the name goes on the account, then the entry goes under it.
|
|
147
|
-
const [savingAccountName, setSavingAccountName] = (0, react_1.useState)(false);
|
|
148
|
-
const [accountNameNotSaved, setAccountNameNotSaved] = (0, react_1.useState)(false);
|
|
149
|
-
const enterUnder = entry.enter;
|
|
150
|
-
const enterWithAccountName = (0, react_1.useCallback)(async (firstName, lastName) => {
|
|
151
|
-
setSavingAccountName(true);
|
|
152
|
-
setAccountNameNotSaved(false);
|
|
153
|
-
try {
|
|
154
|
-
const savedName = await saveNameToAccount(firstName, lastName);
|
|
155
|
-
if (savedName)
|
|
156
|
-
enterUnder(savedName);
|
|
157
|
-
else
|
|
158
|
-
setAccountNameNotSaved(true);
|
|
159
|
-
}
|
|
160
|
-
finally {
|
|
161
|
-
setSavingAccountName(false);
|
|
162
|
-
}
|
|
163
|
-
}, [saveNameToAccount, enterUnder]);
|
|
164
|
-
// A failure belongs to the sheet it happened in.
|
|
165
|
-
(0, react_1.useEffect)(() => {
|
|
166
|
-
if (!entry.sheetOpen)
|
|
167
|
-
setAccountNameNotSaved(false);
|
|
168
|
-
}, [entry.sheetOpen]);
|
|
169
|
-
const isNameAllowed = (0, react_1.useCallback)((name) => !(0, showNames_1.isBlockedViewerName)(name, blockedNames), [blockedNames]);
|
|
170
|
-
// ─── The poll ──────────────────────────────────────────────────────────────────────────────────
|
|
171
|
-
const poll = showing ? ((_m = session.poll) !== null && _m !== void 0 ? _m : null) : null;
|
|
172
|
-
const pollId = (_p = (_o = session.poll) === null || _o === void 0 ? void 0 : _o.pollUuid) !== null && _p !== void 0 ? _p : null;
|
|
173
|
-
const [pollSheetOpen, setPollSheetOpen] = (0, react_1.useState)(false);
|
|
174
|
-
// Closed whenever the poll changes, ended or replaced by the host's next: an empty sheet, or a
|
|
175
|
-
// question the shopper never chose to answer, would be in front of them.
|
|
176
|
-
(0, react_1.useEffect)(() => {
|
|
177
|
-
setPollSheetOpen(false);
|
|
178
|
-
}, [pollId]);
|
|
179
|
-
const votedAlready = !!((_q = session.poll) === null || _q === void 0 ? void 0 : _q.votedOptionId);
|
|
180
|
-
const vote = (0, react_1.useCallback)((optionId) => {
|
|
181
|
-
// One vote a poll (the session keeps it on the phone and ignores another); the sheet's choices are off once voted.
|
|
182
|
-
if (!votedAlready)
|
|
183
|
-
void voteInPoll(optionId);
|
|
184
|
-
}, [votedAlready, voteInPoll]);
|
|
185
|
-
return {
|
|
186
|
-
giveawayButton: {
|
|
187
|
-
visible: !!openGiveaway,
|
|
188
|
-
prize,
|
|
189
|
-
entryCount: giveaway.entryCount,
|
|
190
|
-
entered: giveaway.registered,
|
|
191
|
-
entering: entry.entering || savingAccountName,
|
|
192
|
-
signInToEnter,
|
|
193
|
-
waitingForName,
|
|
194
|
-
askForName,
|
|
195
|
-
accountName: nameToComplete,
|
|
196
|
-
nameSaveFailed: accountNameNotSaved,
|
|
197
|
-
isNameAllowed,
|
|
198
|
-
nameMaxLength: viewer_1.MAX_VIEWER_NAME,
|
|
199
|
-
entryFailed: entry.entryFailed,
|
|
200
|
-
sheetVisible: entry.sheetOpen,
|
|
201
|
-
onOpenSheet: entry.openSheet,
|
|
202
|
-
onCloseSheet: entry.closeSheet,
|
|
203
|
-
onEnter: entry.enter,
|
|
204
|
-
onEnterWithAccountName: (firstName, lastName) => void enterWithAccountName(firstName, lastName),
|
|
205
|
-
onSignInToEnter: entry.signInToEnter,
|
|
206
|
-
},
|
|
207
|
-
giveawayDraw: {
|
|
208
|
-
visible: showing,
|
|
209
|
-
draw: entry.draw,
|
|
210
|
-
isWinner: entry.youWon,
|
|
211
|
-
onDone: entry.drawDone,
|
|
212
|
-
},
|
|
213
|
-
pollButton: {
|
|
214
|
-
visible: !!poll,
|
|
215
|
-
poll,
|
|
216
|
-
// The show's poster stands in for a brand mark beside the question (old Amore's).
|
|
217
|
-
logoUrl: (_r = show === null || show === void 0 ? void 0 : show.thumbnailUrl) !== null && _r !== void 0 ? _r : null,
|
|
218
|
-
sheetVisible: pollSheetOpen && !!poll,
|
|
219
|
-
onOpenSheet: () => setPollSheetOpen(true),
|
|
220
|
-
onCloseSheet: () => setPollSheetOpen(false),
|
|
221
|
-
onVote: vote,
|
|
222
|
-
},
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
//# sourceMappingURL=useLiveGiveawaysAndPolls.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLiveGiveawaysAndPolls.js","sourceRoot":"","sources":["../../src/react/useLiveGiveawaysAndPolls.ts"],"names":[],"mappings":";;AA+EA,4DAwJC;AAvOD;;;;;;GAMG;AACH,sDAAkG;AAClG,iCAAkE;AAElE,4CAA+C;AAC/C,gDAAmD;AAEnD,kDAAgD;AAChD,4CAAmD;AACnD,sCAA4C;AAC5C,+DAA2D;AAC3D,uDAAgE;AAChE,qDAAkD;AAClD,yDAAsD;AACtD,yDAAsD;AACtD,6CAA8H;AAK9H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,SAAgB,wBAAwB;;IACtC,MAAM,QAAQ,GAAG,MAAA,MAAA,IAAA,qBAAQ,GAAa,CAAC,MAAM,0CAAE,QAAQ,mCAAI,EAAE,CAAC;IAC9D,MAAM,SAAS,GAAG,IAAA,yBAAY,GAAE,CAAC;IACjC,mEAAmE;IACnE,MAAM,OAAO,GAAG,IAAA,gCAAc,GAAW,CAAC;IAC1C,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IACvC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAA,yBAAW,GAAE,CAAC;IACxD,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/E,MAAM,MAAM,GAAG,MAAA,MAAA,IAAA,qBAAO,GAAE,CAAC,IAAI,0CAAE,EAAE,mCAAI,IAAI,CAAC;IAC1C,MAAM,GAAG,GAAG,IAAA,0BAAa,GAAiC,CAAC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CAAC,gBAAgB,CAAC,IAAI,CAAC;YACzC,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC;YAC3C,MAAM,EAAE,IAAI;SACb;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/** How often the Live screen reads the store's restrictions again while on show. */
|
|
2
|
-
export declare const RESTRICTIONS_REFRESH_MS = 60000;
|
|
3
|
-
/**
|
|
4
|
-
* Everything the Live screen wires, so the screen stays plain tiles. Call it from the Live screen and
|
|
5
|
-
* from each of its tiles' wiring: every call reads the same session.
|
|
6
|
-
*
|
|
7
|
-
* - **The session is the app's** (`ShopifyLiveSessionProvider`), joined above the navigator; this
|
|
8
|
-
* screen binds to its picture (the player tile's `LiveVideoTarget`) and never owns the room.
|
|
9
|
-
* - **Pinned to the route's show** while watching (`holdStream(streamId)`, at every arrival), so a host
|
|
10
|
-
* restarting the broadcast can't swap the room underneath; released when the shopper closes the show
|
|
11
|
-
* (back on a show that has ended or is still joining, ✕ on the bubble, or leaving any other way
|
|
12
|
-
* without the bubble), and kept when the bubble takes the show.
|
|
13
|
-
* - **Which show** (`useLiveShow`): the session's record once it is this show's (just after the pin it
|
|
14
|
-
* can still hold the last show's), where it stands, and whether it is on air.
|
|
15
|
-
* - **Where the link lands** (`streams.destinationFor`, one read of the show's record on arrival): a
|
|
16
|
-
* show on air stays; an ended show with a recording is replaced by its Replay
|
|
17
|
-
* (`routes.replaceWithReplay`); anything else (a rehearsal this shopper can't see included) by the
|
|
18
|
-
* Live tab (`routes.backToLiveTab`). Not on the web, where nothing can play: the Tile preview stays on
|
|
19
|
-
* this page to show its tiles, with the record's poster and the ended words.
|
|
20
|
-
* - **Every arrival** reads the record again (`refreshStreamRecords`, which restarts the session's
|
|
21
|
-
* off-air wait, so a push tapped in the foreground can't be declared over on a stale record) and ends
|
|
22
|
-
* the bubble: this screen shows the picture again.
|
|
23
|
-
* - **Back, every kind** (the header's arrow, the iOS swipe, Android's back; decided 2026-10-05,
|
|
24
|
-
* amore-v2's Head of Engineering) shrinks a show that is playing or waiting for its host into the
|
|
25
|
-
* bubble as the screen leaves, and closes one that has ended: the screen's `beforeRemove`, for the
|
|
26
|
-
* navigation's back actions (`BACK_ACTIONS`). **Where back goes: Home, for every app** (decided
|
|
27
|
-
* 2026-10-22; `routes.openHome`): the arrow, ✕ and Android's back, the show shrinking first. The iOS
|
|
28
|
-
* 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
|
|
29
|
-
* show and opens the Cart over this screen (Items You Won on an auction show: `routes.openCart`).
|
|
30
|
-
* - **A link from the show** (`openLink`, 0.15.0; decided 2026-10-19 by amore-v2's Head of Engineering)
|
|
31
|
-
* opens inside the app, never the phone's browser: the show goes into the bubble, as for the cart, and
|
|
32
|
-
* the app's `routes.openLink` opens the page (amore-v2: the store's product or collection on its
|
|
33
|
-
* screen, any other page in its web page). Leaving the app for the phone's browser is what left the
|
|
34
|
-
* player dark on the way back (ENG-629) and the phone's window blank (ENG-580). A link that isn't https
|
|
35
|
-
* (`opensInApp`), or an app without `routes.openLink`, opens nothing, and the show stays.
|
|
36
|
-
* - **The cart's holds** (0.15.0, amore-v2's ENG-691): the header shows a timer under the cart button in
|
|
37
|
-
* the soonest hold's last minutes; this hands it when each hold ends (`header.holdEndTimes`,
|
|
38
|
-
* `holdEndTimesOf` over sdk-shopify's cart and its `cartExtensions`), and the header counts.
|
|
39
|
-
* - **One shrunk show at a time:** arriving here stops a replay's bubble (and the Replay screen stops
|
|
40
|
-
* this show's bubble).
|
|
41
|
-
* - **The screen stays on** while it shows the show playing or waiting for its host.
|
|
42
|
-
* - **Under a sheet** (`routes.sheets`: the variant page, opened from the shop; the Sign In page) the
|
|
43
|
-
* show plays on here, with the screen on and the light status bar, as Replay's does.
|
|
44
|
-
* - **Put away** while the show plays here (a sheet over it included), it goes on in the phone's own
|
|
45
|
-
* floating window (`systemWindowWhenAway`); coming back finds it here again.
|
|
46
|
-
* - **`liveJoin`** (`track`) once per show per app run; never for a rehearsal, a show the config's
|
|
47
|
-
* `hiddenShows` names, whoever watches it.
|
|
48
|
-
* - **Hidden shows** (`hiddenShows`): for a shopper who isn't on the team the session never holds one,
|
|
49
|
-
* so it is never on air here (the link goes to the Live tab).
|
|
50
|
-
* - **Chat and reactions** are `useLiveChat`'s, shown only while the show is on air; a host's or
|
|
51
|
-
* moderator's link in the chat opens through `openLink`.
|
|
52
|
-
*/
|
|
53
|
-
export declare function useLivePage(): {
|
|
54
|
-
/**
|
|
55
|
-
* Android's own picture-in-picture window is up. It shrinks the whole app, and every sheet on the
|
|
56
|
-
* Live screen (poll, giveaway, shop, custom bid, name, reactions) is a window of its own above the
|
|
57
|
-
* app, so it rode the shrink and covered the video (fixed 2026-10-08; Freckled Poppy hides its
|
|
58
|
-
* sheets the same way). The screen then draws only the player; the sheets' open state is the
|
|
59
|
-
* hooks', so they come back. iOS's window shows the video alone.
|
|
60
|
-
*/
|
|
61
|
-
inSystemWindow: boolean;
|
|
62
|
-
/** The screen is on show (or under a sheet), over the dark video: light status bar text. */
|
|
63
|
-
lightStatusBar: boolean;
|
|
64
|
-
player: {
|
|
65
|
-
status: import("..").LiveShowStatus;
|
|
66
|
-
posterUrl: string | null;
|
|
67
|
-
isAuction: boolean;
|
|
68
|
-
videoActive: boolean;
|
|
69
|
-
systemWindowWhenAway: boolean;
|
|
70
|
-
};
|
|
71
|
-
header: {
|
|
72
|
-
ended: boolean;
|
|
73
|
-
isAuction: boolean;
|
|
74
|
-
startedAt: number | null;
|
|
75
|
-
viewerCount: number | null;
|
|
76
|
-
muted: boolean;
|
|
77
|
-
canMute: boolean;
|
|
78
|
-
canPip: boolean;
|
|
79
|
-
backShrinks: boolean;
|
|
80
|
-
cartCount: number;
|
|
81
|
-
holdEndTimes: number[];
|
|
82
|
-
onBack: () => void;
|
|
83
|
-
onToggleMute: () => void;
|
|
84
|
-
onPip: () => void;
|
|
85
|
-
onCart: () => void;
|
|
86
|
-
};
|
|
87
|
-
/** The chat, the comment box, reactions and the pinned comment: one set of props per tile (`useLiveChat`). */
|
|
88
|
-
chat: {
|
|
89
|
-
keyboardUp: boolean;
|
|
90
|
-
typing: boolean;
|
|
91
|
-
comments: {
|
|
92
|
-
visible: boolean;
|
|
93
|
-
comments: import("../types").LiveComment[];
|
|
94
|
-
hidden: boolean;
|
|
95
|
-
onToggleHidden: () => void;
|
|
96
|
-
onPressName: ((name: string) => void) | undefined;
|
|
97
|
-
onOpenLink: ((url: string) => void) | undefined;
|
|
98
|
-
};
|
|
99
|
-
commentBox: {
|
|
100
|
-
visible: boolean;
|
|
101
|
-
askForName: boolean;
|
|
102
|
-
accountName: import("..").NameOnAccount | null;
|
|
103
|
-
waitingForName: boolean;
|
|
104
|
-
signedOut: boolean;
|
|
105
|
-
auction: boolean;
|
|
106
|
-
keyboardRequest: number;
|
|
107
|
-
onSignInToComment: () => void;
|
|
108
|
-
sending: boolean;
|
|
109
|
-
mention: import("..").LiveCommentMention | null;
|
|
110
|
-
nameMaxLength: number;
|
|
111
|
-
onSend: (text: string) => Promise<void>;
|
|
112
|
-
onSaveName: (name: string) => Promise<boolean>;
|
|
113
|
-
onSaveAccountName: (firstName: string, lastName: string) => Promise<boolean>;
|
|
114
|
-
isNameAllowed: (name: string) => boolean;
|
|
115
|
-
onTypingChange: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
116
|
-
};
|
|
117
|
-
reactionButton: {
|
|
118
|
-
visible: boolean;
|
|
119
|
-
onReact: (reactionUrl: string) => void;
|
|
120
|
-
};
|
|
121
|
-
reactions: {
|
|
122
|
-
visible: boolean;
|
|
123
|
-
reactions: import("../sessionTypes").FloatingReaction[];
|
|
124
|
-
reactionStyle: import("../types").ReactionStyle;
|
|
125
|
-
};
|
|
126
|
-
pinnedComment: {
|
|
127
|
-
visible: boolean;
|
|
128
|
-
pinnedComment: import("../types").LivePinnedComment | null;
|
|
129
|
-
};
|
|
130
|
-
};
|
|
131
|
-
/** A link from the show (0.15.0): its page inside the app, the show in the bubble. `useLiveShop` takes it. */
|
|
132
|
-
openLink: (url: string, title?: string | null) => void;
|
|
133
|
-
};
|
|
134
|
-
/** What `useLivePage` hands the Live screen and its tiles. */
|
|
135
|
-
export type LivePage = ReturnType<typeof useLivePage>;
|
|
136
|
-
//# sourceMappingURL=useLivePage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLivePage.d.ts","sourceRoot":"","sources":["../../src/react/useLivePage.ts"],"names":[],"mappings":"AA8CA,oFAAoF;AACpF,eAAO,MAAM,uBAAuB,QAAS,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,WAAW;IAyMvB;;;;;;OAMG;;IAEH,4FAA4F;;;;;;;;;;;;;;;;;;;;;;;;;IAgC5F,8GAA8G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAE9G,8GAA8G;oBA3IxG,MAAM,UAAU,MAAM,GAAG,IAAI;EA8ItC;AAED,8DAA8D;AAC9D,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC"}
|