@tiledev/sdk-apptile-live-selling 0.8.1 → 0.9.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/README.md +452 -34
- package/dist/auctionComments.d.ts +25 -0
- package/dist/auctionComments.d.ts.map +1 -0
- package/dist/auctionComments.js +28 -0
- package/dist/auctionComments.js.map +1 -0
- package/dist/auctionRules.d.ts +76 -0
- package/dist/auctionRules.d.ts.map +1 -0
- package/dist/auctionRules.js +106 -0
- package/dist/auctionRules.js.map +1 -0
- package/dist/auctions.d.ts.map +1 -1
- package/dist/auctions.js +19 -10
- package/dist/auctions.js.map +1 -1
- package/dist/client.d.ts +51 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +123 -23
- package/dist/client.js.map +1 -1
- package/dist/commentHistory.d.ts +66 -0
- package/dist/commentHistory.d.ts.map +1 -0
- package/dist/commentHistory.js +125 -0
- package/dist/commentHistory.js.map +1 -0
- package/dist/engine.native.d.ts.map +1 -1
- package/dist/engine.native.js +17 -845
- package/dist/engine.native.js.map +1 -1
- package/dist/giveawayPrize.d.ts +13 -0
- package/dist/giveawayPrize.d.ts.map +1 -0
- package/dist/giveawayPrize.js +18 -0
- package/dist/giveawayPrize.js.map +1 -0
- package/dist/giveawayPrizeLines.d.ts +67 -0
- package/dist/giveawayPrizeLines.d.ts.map +1 -0
- package/dist/giveawayPrizeLines.js +48 -0
- package/dist/giveawayPrizeLines.js.map +1 -0
- package/dist/giveawayRoster.d.ts +53 -0
- package/dist/giveawayRoster.d.ts.map +1 -0
- package/dist/giveawayRoster.js +93 -0
- package/dist/giveawayRoster.js.map +1 -0
- package/dist/heldComments.d.ts +29 -0
- package/dist/heldComments.d.ts.map +1 -0
- package/dist/heldComments.js +61 -0
- package/dist/heldComments.js.map +1 -0
- package/dist/hiddenShows.d.ts +34 -0
- package/dist/hiddenShows.d.ts.map +1 -0
- package/dist/hiddenShows.js +42 -0
- package/dist/hiddenShows.js.map +1 -0
- package/dist/index.d.ts +19 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +93 -3
- package/dist/index.js.map +1 -1
- package/dist/liveHaptics.d.ts +7 -0
- package/dist/liveHaptics.d.ts.map +1 -0
- package/dist/liveHaptics.js +11 -0
- package/dist/liveHaptics.js.map +1 -0
- package/dist/liveHaptics.native.d.ts +7 -0
- package/dist/liveHaptics.native.d.ts.map +1 -0
- package/dist/liveHaptics.native.js +12 -0
- package/dist/liveHaptics.native.js.map +1 -0
- package/dist/liveShow.d.ts +58 -0
- package/dist/liveShow.d.ts.map +1 -0
- package/dist/liveShow.js +55 -0
- package/dist/liveShow.js.map +1 -0
- package/dist/phoneTaps.d.ts +25 -0
- package/dist/phoneTaps.d.ts.map +1 -0
- package/dist/phoneTaps.js +47 -0
- package/dist/phoneTaps.js.map +1 -0
- package/dist/pipWindow.d.ts +85 -0
- package/dist/pipWindow.d.ts.map +1 -0
- package/dist/pipWindow.js +88 -0
- package/dist/pipWindow.js.map +1 -0
- package/dist/polls.d.ts.map +1 -1
- package/dist/polls.js +3 -0
- package/dist/polls.js.map +1 -1
- package/dist/react/LiveSellingProvider.d.ts +10 -1
- package/dist/react/LiveSellingProvider.d.ts.map +1 -1
- package/dist/react/LiveSellingProvider.js +6 -2
- package/dist/react/LiveSellingProvider.js.map +1 -1
- package/dist/react/LiveVideoTarget.d.ts.map +1 -1
- package/dist/react/LiveVideoTarget.js +41 -3
- package/dist/react/LiveVideoTarget.js.map +1 -1
- package/dist/react/clocks.d.ts +29 -0
- package/dist/react/clocks.d.ts.map +1 -0
- package/dist/react/clocks.js +124 -0
- package/dist/react/clocks.js.map +1 -0
- package/dist/react/index.d.ts +7 -2
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +15 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.web.d.ts +9 -2
- package/dist/react/index.web.d.ts.map +1 -1
- package/dist/react/index.web.js +27 -4
- package/dist/react/index.web.js.map +1 -1
- package/dist/react/startSignIn.d.ts +3 -0
- package/dist/react/startSignIn.d.ts.map +1 -0
- package/dist/react/startSignIn.js +19 -0
- package/dist/react/startSignIn.js.map +1 -0
- package/dist/react/useAuctionBidGate.d.ts +54 -4
- package/dist/react/useAuctionBidGate.d.ts.map +1 -1
- package/dist/react/useAuctionBidGate.js +169 -25
- package/dist/react/useAuctionBidGate.js.map +1 -1
- package/dist/react/useAuctionWins.d.ts +9 -1
- package/dist/react/useAuctionWins.d.ts.map +1 -1
- package/dist/react/useAuctionWins.js +9 -3
- package/dist/react/useAuctionWins.js.map +1 -1
- package/dist/react/useGiveawayEntry.d.ts +59 -0
- package/dist/react/useGiveawayEntry.d.ts.map +1 -0
- package/dist/react/useGiveawayEntry.js +170 -0
- package/dist/react/useGiveawayEntry.js.map +1 -0
- package/dist/react/useGiveawayPrize.d.ts +12 -0
- package/dist/react/useGiveawayPrize.d.ts.map +1 -0
- package/dist/react/useGiveawayPrize.js +53 -0
- package/dist/react/useGiveawayPrize.js.map +1 -0
- package/dist/react/useHiddenShows.d.ts +10 -0
- package/dist/react/useHiddenShows.d.ts.map +1 -0
- package/dist/react/useHiddenShows.js +30 -0
- package/dist/react/useHiddenShows.js.map +1 -0
- package/dist/react/useLiveSession.d.ts +7 -3
- package/dist/react/useLiveSession.d.ts.map +1 -1
- package/dist/react/useLiveSession.js +522 -157
- package/dist/react/useLiveSession.js.map +1 -1
- package/dist/react/useLiveShow.d.ts +3 -0
- package/dist/react/useLiveShow.d.ts.map +1 -0
- package/dist/react/useLiveShow.js +21 -0
- package/dist/react/useLiveShow.js.map +1 -0
- package/dist/react/useLiveStreams.d.ts.map +1 -1
- package/dist/react/useLiveStreams.js +6 -2
- package/dist/react/useLiveStreams.js.map +1 -1
- package/dist/react/useOngoingLive.d.ts +1 -0
- package/dist/react/useOngoingLive.d.ts.map +1 -1
- package/dist/react/useOngoingLive.js +7 -1
- package/dist/react/useOngoingLive.js.map +1 -1
- package/dist/react/useReplays.d.ts +12 -0
- package/dist/react/useReplays.d.ts.map +1 -1
- package/dist/react/useReplays.js +56 -24
- package/dist/react/useReplays.js.map +1 -1
- package/dist/react/useStreamInfo.d.ts +13 -2
- package/dist/react/useStreamInfo.d.ts.map +1 -1
- package/dist/react/useStreamInfo.js +31 -5
- package/dist/react/useStreamInfo.js.map +1 -1
- package/dist/replayPages.d.ts +31 -0
- package/dist/replayPages.d.ts.map +1 -0
- package/dist/replayPages.js +34 -0
- package/dist/replayPages.js.map +1 -0
- package/dist/replays.d.ts +7 -0
- package/dist/replays.d.ts.map +1 -1
- package/dist/replays.js +52 -22
- package/dist/replays.js.map +1 -1
- package/dist/session.d.ts +39 -6
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +209 -22
- package/dist/session.js.map +1 -1
- package/dist/sessionTypes.d.ts +190 -14
- package/dist/sessionTypes.d.ts.map +1 -1
- package/dist/sessionTypes.js +2 -1
- package/dist/sessionTypes.js.map +1 -1
- package/dist/shopifyCommerce.d.ts +149 -0
- package/dist/shopifyCommerce.d.ts.map +1 -0
- package/dist/shopifyCommerce.js +123 -0
- package/dist/shopifyCommerce.js.map +1 -0
- package/dist/shopifyIdentity.d.ts +51 -0
- package/dist/shopifyIdentity.d.ts.map +1 -0
- package/dist/shopifyIdentity.js +52 -0
- package/dist/shopifyIdentity.js.map +1 -0
- package/dist/shopifyIds.d.ts +9 -0
- package/dist/shopifyIds.d.ts.map +1 -0
- package/dist/shopifyIds.js +18 -0
- package/dist/shopifyIds.js.map +1 -0
- package/dist/showLinks.d.ts +24 -0
- package/dist/showLinks.d.ts.map +1 -0
- package/dist/showLinks.js +23 -0
- package/dist/showLinks.js.map +1 -0
- package/dist/showLots.d.ts +28 -0
- package/dist/showLots.d.ts.map +1 -0
- package/dist/showLots.js +51 -0
- package/dist/showLots.js.map +1 -0
- package/dist/showNames.d.ts +45 -0
- package/dist/showNames.d.ts.map +1 -0
- package/dist/showNames.js +74 -0
- package/dist/showNames.js.map +1 -0
- package/dist/streams.d.ts +27 -1
- package/dist/streams.d.ts.map +1 -1
- package/dist/streams.js +84 -21
- package/dist/streams.js.map +1 -1
- package/dist/types.d.ts +214 -8
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -1
- package/dist/types.js.map +1 -1
- package/dist/wire.d.ts +31 -0
- package/dist/wire.d.ts.map +1 -1
- package/dist/wire.js +25 -0
- package/dist/wire.js.map +1 -1
- package/dist/zego.d.ts +3 -1
- package/dist/zego.d.ts.map +1 -1
- package/dist/zego.js +1 -1
- package/dist/zegoEngine.d.ts +168 -0
- package/dist/zegoEngine.d.ts.map +1 -0
- package/dist/zegoEngine.js +1052 -0
- package/dist/zegoEngine.js.map +1 -0
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuctionWins.js","sourceRoot":"","sources":["../../src/react/useAuctionWins.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useAuctionWins.js","sourceRoot":"","sources":["../../src/react/useAuctionWins.ts"],"names":[],"mappings":";;AAoNA,wCAqIC;AAzVD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iCAA0E;AAE1E,sCAA4E;AAC5E,8DAA6D;AAC7D,gDAA6C;AA2D7C,MAAM,WAAW,GAAG,kCAAkC,CAAC;AACvD,MAAM,eAAe,GAAG,6CAA6C,CAAC;AAEtE;;;;;;;;;;;;;GAaG;AACH,MAAM,iBAAiB,GAAG,IAAK,CAAC;AAEhC,gEAAgE;AAChE,SAAS,MAAM,CAAC,EAAU;;IACxB,OAAO,MAAA,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,mCAAI,EAAE,CAAC;AACnC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,EAAU,CAAC;AAE7C;;;;;;;;;;GAUG;AACH,SAAS,QAAQ,CAAC,CAA2B,EAAE,CAA2B;IACxE,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;Q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CAAC;QACf,IAAI,CAAC;YACH,OAAO,MAAM,QAAQ,CAAC,qBAAqB,CACzC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAC3B,WAAW,CACZ,CAAC;QACJ,CAAC;QAAC,OAAO,MAAM,EAAE,CAAC;YAChB,IAAA,kBAAS,GAAE,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,yBAAyB,EAAE,CAAC,CAAC;YAC7D,QAAQ,CAAC,eAAe,CAAC,CAAC;YAC1B,OAAO,IAAI,CAAC;QACd,CAAC;gBAAS,CAAC;YACT,cAAc,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAElC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5F,MAAM,kBAAkB,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAA,yCAAoB,EAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAE7E,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC9G,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { GiveawayState, LiveSessionActions } from '../sessionTypes';
|
|
2
|
+
import type { LiveGiveaway } from '../types';
|
|
3
|
+
/** What `useGiveawayEntry` reads of the session. `useLiveSession()` is one. */
|
|
4
|
+
export interface SessionForGiveaway {
|
|
5
|
+
giveaway?: GiveawayState | null;
|
|
6
|
+
/** The name the room knows the shopper by (`session.viewerName`); null when it has none yet. */
|
|
7
|
+
viewerName?: string | null;
|
|
8
|
+
actions: Pick<LiveSessionActions, 'enterGiveaway' | 'chooseViewerName' | 'dismissGiveawayResult'>;
|
|
9
|
+
}
|
|
10
|
+
export interface UseGiveawayEntryOptions {
|
|
11
|
+
/** The session the screen reads: `useLiveSession()`. */
|
|
12
|
+
session: SessionForGiveaway;
|
|
13
|
+
/**
|
|
14
|
+
* This screen's show is on air and takes entries: `useLiveShow`'s `onAir` (with its record held) and
|
|
15
|
+
* `capabilities.canEnterGiveaway`. Off: no giveaway is open here.
|
|
16
|
+
*/
|
|
17
|
+
canEnter: boolean;
|
|
18
|
+
/** The shopper is signed in: the entry is written to a customer. */
|
|
19
|
+
isLoggedIn: boolean;
|
|
20
|
+
/** Starts the app's sign-in. */
|
|
21
|
+
startSignIn: () => unknown;
|
|
22
|
+
/**
|
|
23
|
+
* The screen is on show with nothing over it (navigation focus, and no sign-in sheet up). The sheet
|
|
24
|
+
* reopens after a sign-in only then; coming back on show still signed out drops the reopen. Defaults
|
|
25
|
+
* to true.
|
|
26
|
+
*/
|
|
27
|
+
screenOnShow?: boolean;
|
|
28
|
+
/** The shopper's ordinary cart, which the gateway ties the entry to. Not how the prize arrives. */
|
|
29
|
+
cartId?: string | null;
|
|
30
|
+
}
|
|
31
|
+
/** A draw ready to show: the winner, and the names to roll through to them. */
|
|
32
|
+
export interface GiveawayDraw {
|
|
33
|
+
winnerName: string;
|
|
34
|
+
entrantNames: string[];
|
|
35
|
+
}
|
|
36
|
+
export interface UseGiveawayEntryState {
|
|
37
|
+
/** The giveaway open for entries now: active, not drawn, on a show that takes entries. Else null. */
|
|
38
|
+
open: LiveGiveaway | null;
|
|
39
|
+
/** The entry sheet is open (never while no giveaway is open). */
|
|
40
|
+
sheetOpen: boolean;
|
|
41
|
+
openSheet: () => void;
|
|
42
|
+
closeSheet: () => void;
|
|
43
|
+
/** Enters the open giveaway; with a typed name, saves it first and enters once the session holds it. */
|
|
44
|
+
enter: (typedName?: string) => void;
|
|
45
|
+
/** An entry is on its way. */
|
|
46
|
+
entering: boolean;
|
|
47
|
+
/** The host didn't take the last entry, or the typed name couldn't be saved. Cleared by the next try. */
|
|
48
|
+
entryFailed: boolean;
|
|
49
|
+
/** Starts the sign-in; back here signed in, the sheet opens again. Close the sheet first. */
|
|
50
|
+
signInToEnter: () => void;
|
|
51
|
+
/** The draw to show, once its roster is ready; never one from before this screen opened. */
|
|
52
|
+
draw: GiveawayDraw | null;
|
|
53
|
+
/** This shopper won the draw (`giveaway.result.isYou`). */
|
|
54
|
+
youWon: boolean;
|
|
55
|
+
/** The draw has been shown: the session lets it go. */
|
|
56
|
+
drawDone: () => void;
|
|
57
|
+
}
|
|
58
|
+
export declare function useGiveawayEntry(options: UseGiveawayEntryOptions): UseGiveawayEntryState;
|
|
59
|
+
//# sourceMappingURL=useGiveawayEntry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGiveawayEntry.d.ts","sourceRoot":"","sources":["../../src/react/useGiveawayEntry.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC,gGAAgG;IAChG,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,eAAe,GAAG,kBAAkB,GAAG,uBAAuB,CAAC,CAAC;CACnG;AAED,MAAM,WAAW,uBAAuB;IACtC,wDAAwD;IACxD,OAAO,EAAE,kBAAkB,CAAC;IAC5B;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,oEAAoE;IACpE,UAAU,EAAE,OAAO,CAAC;IACpB,gCAAgC;IAChC,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mGAAmG;IACnG,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,+EAA+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,qGAAqG;IACrG,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1B,iEAAiE;IACjE,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,wGAAwG;IACxG,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,8BAA8B;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,yGAAyG;IACzG,WAAW,EAAE,OAAO,CAAC;IACrB,6FAA6F;IAC7F,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,4FAA4F;IAC5F,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1B,2DAA2D;IAC3D,MAAM,EAAE,OAAO,CAAC;IAChB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAGD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,qBAAqB,CA2IxF"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGiveawayEntry = useGiveawayEntry;
|
|
4
|
+
/**
|
|
5
|
+
* `useGiveawayEntry` — the shopper's part in a giveaway, on one screen (0.9.0, "SDK move 8").
|
|
6
|
+
*
|
|
7
|
+
* Every live screen with a giveaway wrote the same flow around `actions.enterGiveaway`, and the copies
|
|
8
|
+
* drifted (Freckled Poppy's Live screen inline, ENG-583; amore-v2's `useLiveGiveawaysAndPolls`):
|
|
9
|
+
*
|
|
10
|
+
* - **The entry sheet:** open and closed by the screen, and closed by the host's draw (an Enter button
|
|
11
|
+
* for a giveaway that is over) or the giveaway going (retracted, the show ended).
|
|
12
|
+
* - **Entering needs a sign-in.** `signInToEnter()` starts the app's sign-in; once the shopper is back
|
|
13
|
+
* on this screen signed in (`isLoggedIn` and `screenOnShow`), the sheet opens again if the giveaway
|
|
14
|
+
* is still open and not drawn, and the shopper taps Enter themselves. Back on show still signed out
|
|
15
|
+
* (a Sign In page closed, a system sheet dismissed: `screenOnShow` false, then true), nothing reopens,
|
|
16
|
+
* and a later sign-in elsewhere doesn't raise it.
|
|
17
|
+
* - **The entry** (`enter`): `entering` while it goes, `entryFailed` when the host didn't take it. With
|
|
18
|
+
* a name the shopper typed ("Entering As:"), the name is saved first and the entry goes once the
|
|
19
|
+
* session holds it, as the session sends the entry under the name it holds at that moment.
|
|
20
|
+
* - **The draw** (`draw`): handed over once its roster is ready (the session waits for it, ENG-705), the
|
|
21
|
+
* same object until another winner; `youWon` from the session (`giveaway.result.isYou`). A draw already
|
|
22
|
+
* on the session as the screen opens happened while the shopper was elsewhere: it is let go rather
|
|
23
|
+
* than played late.
|
|
24
|
+
*
|
|
25
|
+
* It takes the session as a value rather than reading it, as the clocks take a number: a test drives it
|
|
26
|
+
* with a plain object, and it loads where the native session can't (an app's test runner, the web).
|
|
27
|
+
* The screen decides when a sheet can show (`screenOnShow`): a sheet is a `Modal`, which can't open
|
|
28
|
+
* over a Sign In page or while another sheet is still going.
|
|
29
|
+
*/
|
|
30
|
+
const react_1 = require("react");
|
|
31
|
+
const client_1 = require("../client");
|
|
32
|
+
const sessionTypes_1 = require("../sessionTypes");
|
|
33
|
+
const startSignIn_1 = require("./startSignIn");
|
|
34
|
+
function useGiveawayEntry(options) {
|
|
35
|
+
var _a, _b, _c, _d, _e;
|
|
36
|
+
const { session, canEnter, isLoggedIn } = options;
|
|
37
|
+
const screenOnShow = (_a = options.screenOnShow) !== null && _a !== void 0 ? _a : true;
|
|
38
|
+
const giveaway = (_b = session.giveaway) !== null && _b !== void 0 ? _b : sessionTypes_1.IDLE_GIVEAWAY;
|
|
39
|
+
const { dismissGiveawayResult } = session.actions;
|
|
40
|
+
const result = giveaway.result;
|
|
41
|
+
const drawn = !!result;
|
|
42
|
+
const open = canEnter && ((_c = giveaway.active) === null || _c === void 0 ? void 0 : _c.status) === 'active' && !drawn ? giveaway.active : null;
|
|
43
|
+
/** What the actions read when they run, as it is now. */
|
|
44
|
+
const latest = (0, react_1.useRef)({ options, actions: session.actions });
|
|
45
|
+
latest.current = { options, actions: session.actions };
|
|
46
|
+
const mounted = (0, react_1.useRef)(true);
|
|
47
|
+
(0, react_1.useEffect)(() => () => {
|
|
48
|
+
mounted.current = false;
|
|
49
|
+
}, []);
|
|
50
|
+
// ─── The entry sheet ─────────────────────────────────────────────────────────────────────────────
|
|
51
|
+
const [sheetOpen, setSheetOpen] = (0, react_1.useState)(false);
|
|
52
|
+
const [entering, setEntering] = (0, react_1.useState)(false);
|
|
53
|
+
const [entryFailed, setEntryFailed] = (0, react_1.useState)(false);
|
|
54
|
+
// The host's draw closes the sheet (an Enter button for a giveaway that is over), and so does the
|
|
55
|
+
// giveaway going (retracted, or the show ending).
|
|
56
|
+
(0, react_1.useEffect)(() => {
|
|
57
|
+
if (drawn || !open)
|
|
58
|
+
setSheetOpen(false);
|
|
59
|
+
}, [drawn, open]);
|
|
60
|
+
const openSheet = (0, react_1.useCallback)(() => {
|
|
61
|
+
setEntryFailed(false);
|
|
62
|
+
setSheetOpen(true);
|
|
63
|
+
}, []);
|
|
64
|
+
const closeSheet = (0, react_1.useCallback)(() => setSheetOpen(false), []);
|
|
65
|
+
// ─── Entering ────────────────────────────────────────────────────────────────────────────────────
|
|
66
|
+
const enterNow = (0, react_1.useCallback)(async () => {
|
|
67
|
+
var _a;
|
|
68
|
+
setEntryFailed(false);
|
|
69
|
+
setEntering(true);
|
|
70
|
+
let entered = false;
|
|
71
|
+
try {
|
|
72
|
+
const answer = await latest.current.actions.enterGiveaway((_a = latest.current.options.cartId) !== null && _a !== void 0 ? _a : null);
|
|
73
|
+
entered = (answer === null || answer === void 0 ? void 0 : answer.entered) === true;
|
|
74
|
+
}
|
|
75
|
+
catch (caught) {
|
|
76
|
+
(0, client_1.getLogger)().error(caught, { at: 'giveawayEntry.enter' });
|
|
77
|
+
}
|
|
78
|
+
if (!mounted.current)
|
|
79
|
+
return;
|
|
80
|
+
setEntering(false);
|
|
81
|
+
if (!entered)
|
|
82
|
+
setEntryFailed(true);
|
|
83
|
+
}, []);
|
|
84
|
+
// "Entering As:": the name is saved first, and the entry goes once the session holds it.
|
|
85
|
+
const named = !!((_d = session.viewerName) === null || _d === void 0 ? void 0 : _d.trim());
|
|
86
|
+
const [enterOnceNamed, setEnterOnceNamed] = (0, react_1.useState)(false);
|
|
87
|
+
(0, react_1.useEffect)(() => {
|
|
88
|
+
if (!enterOnceNamed || !named)
|
|
89
|
+
return;
|
|
90
|
+
setEnterOnceNamed(false);
|
|
91
|
+
void enterNow();
|
|
92
|
+
}, [enterOnceNamed, named, enterNow]);
|
|
93
|
+
const enter = (0, react_1.useCallback)((typedName) => {
|
|
94
|
+
if (!typedName) {
|
|
95
|
+
void enterNow();
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
setEntryFailed(false);
|
|
99
|
+
setEntering(true);
|
|
100
|
+
void (async () => {
|
|
101
|
+
const saved = await latest.current.actions.chooseViewerName(typedName).catch(() => null);
|
|
102
|
+
if (!mounted.current)
|
|
103
|
+
return;
|
|
104
|
+
if (saved)
|
|
105
|
+
setEnterOnceNamed(true);
|
|
106
|
+
else {
|
|
107
|
+
setEntering(false);
|
|
108
|
+
setEntryFailed(true);
|
|
109
|
+
}
|
|
110
|
+
})();
|
|
111
|
+
}, [enterNow]);
|
|
112
|
+
// ─── Signing in to enter, then back to the sheet ─────────────────────────────────────────────────
|
|
113
|
+
/** The shopper asked to enter signed out: once they are back here signed in, the sheet opens again. */
|
|
114
|
+
const [reopenAfterSignIn, setReopenAfterSignIn] = (0, react_1.useState)(false);
|
|
115
|
+
const signInToEnter = (0, react_1.useCallback)(() => {
|
|
116
|
+
setReopenAfterSignIn(true);
|
|
117
|
+
(0, startSignIn_1.startTheSignIn)(latest.current.options.startSignIn, 'giveawayEntry.startSignIn');
|
|
118
|
+
}, []);
|
|
119
|
+
const wasOnShow = (0, react_1.useRef)(screenOnShow);
|
|
120
|
+
(0, react_1.useEffect)(() => {
|
|
121
|
+
const cameBackOnShow = screenOnShow && !wasOnShow.current;
|
|
122
|
+
wasOnShow.current = screenOnShow;
|
|
123
|
+
if (!reopenAfterSignIn)
|
|
124
|
+
return;
|
|
125
|
+
// Drawn, retracted or ended meanwhile: there is nothing to enter any more.
|
|
126
|
+
if (!open)
|
|
127
|
+
setReopenAfterSignIn(false);
|
|
128
|
+
else if (isLoggedIn && screenOnShow) {
|
|
129
|
+
setReopenAfterSignIn(false);
|
|
130
|
+
openSheet();
|
|
131
|
+
}
|
|
132
|
+
// Back on show without signing in: nothing reopens, now or after a later sign-in elsewhere.
|
|
133
|
+
else if (!isLoggedIn && cameBackOnShow)
|
|
134
|
+
setReopenAfterSignIn(false);
|
|
135
|
+
}, [reopenAfterSignIn, open, isLoggedIn, screenOnShow, openSheet]);
|
|
136
|
+
// ─── The draw ────────────────────────────────────────────────────────────────────────────────────
|
|
137
|
+
const ready = !!result && result.entrantNamesReady;
|
|
138
|
+
const winnerName = (_e = result === null || result === void 0 ? void 0 : result.winnerName) !== null && _e !== void 0 ? _e : null;
|
|
139
|
+
const resultNow = (0, react_1.useRef)(result);
|
|
140
|
+
resultNow.current = result;
|
|
141
|
+
const draw = (0, react_1.useMemo)(() => {
|
|
142
|
+
const drawnNow = resultNow.current;
|
|
143
|
+
return ready && drawnNow ? { winnerName: drawnNow.winnerName, entrantNames: drawnNow.entrantNames } : null;
|
|
144
|
+
// A new draw only for a new winner or readiness: the roster never changes once ready (the session's
|
|
145
|
+
// promise), and the session hands over a new `result` object on every read of the record.
|
|
146
|
+
}, [ready, winnerName]);
|
|
147
|
+
const youWon = !!draw && !!(result === null || result === void 0 ? void 0 : result.isYou);
|
|
148
|
+
// A draw already on the session as the screen opens happened while the shopper was elsewhere.
|
|
149
|
+
const drawOnArrival = (0, react_1.useRef)(drawn);
|
|
150
|
+
(0, react_1.useEffect)(() => {
|
|
151
|
+
if (!drawOnArrival.current)
|
|
152
|
+
return;
|
|
153
|
+
drawOnArrival.current = false;
|
|
154
|
+
dismissGiveawayResult();
|
|
155
|
+
}, [dismissGiveawayResult]);
|
|
156
|
+
return {
|
|
157
|
+
open,
|
|
158
|
+
sheetOpen: sheetOpen && !!open,
|
|
159
|
+
openSheet,
|
|
160
|
+
closeSheet,
|
|
161
|
+
enter,
|
|
162
|
+
entering,
|
|
163
|
+
entryFailed,
|
|
164
|
+
signInToEnter,
|
|
165
|
+
draw,
|
|
166
|
+
youWon,
|
|
167
|
+
drawDone: dismissGiveawayResult,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=useGiveawayEntry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGiveawayEntry.js","sourceRoot":"","sources":["../../src/react/useGiveawayEntry.ts"],"names":[],"mappings":";;AA8FA,4CA2IC;AAzOD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iCAA0E;AAE1E,sCAAsC;AACtC,kDAAgD;AAGhD,+CAA+C;AA8D/C,SAAgB,gBAAgB,CAAC,OAAgC;;IAC/D,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAClD,MAAM,YAAY,GAAG,MAAA,OAAO,CAAC,YAAY,mCAAI,IAAI,CAAC;IAClD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,QAAQ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AC,CAAC,IAAI,CAAC;QAC3G,oGAAoG;QACpG,0FAA0F;IAC5F,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC;IACxB,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,KAAK,CAAA,CAAC;IAEzC,8FAA8F;IAC9F,MAAM,aAAa,GAAG,IAAA,cAAM,EAAC,KAAK,CAAC,CAAC;IACpC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,aAAa,CAAC,OAAO;YAAE,OAAO;QACnC,aAAa,CAAC,OAAO,GAAG,KAAK,CAAC;QAC9B,qBAAqB,EAAE,CAAC;IAC1B,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAE5B,OAAO;QACL,IAAI;QACJ,SAAS,EAAE,SAAS,IAAI,CAAC,CAAC,IAAI;QAC9B,SAAS;QACT,UAAU;QACV,KAAK;QACL,QAAQ;QACR,WAAW;QACX,aAAa;QACb,IAAI;QACJ,MAAM;QACN,QAAQ,EAAE,qBAAqB;KAChC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LiveProduct, LiveProductVariant } from '../sessionTypes';
|
|
2
|
+
import type { LiveGiveaway } from '../types';
|
|
3
|
+
export interface UseGiveawayPrizeState<TRaw = unknown> {
|
|
4
|
+
/** The prize as the adapter reads it (your own product on `raw`); null until it answers, or if it can't. */
|
|
5
|
+
product: LiveProduct<TRaw> | null;
|
|
6
|
+
/** The variant given away, among the product's; null when the record names none or it's gone. */
|
|
7
|
+
variant: LiveProductVariant | null;
|
|
8
|
+
/** The read's failure, or null. Not logged. */
|
|
9
|
+
readError: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare function useGiveawayPrize<TRaw = unknown>(giveaway: Pick<LiveGiveaway, 'storeProductId' | 'variantId'> | null | undefined): UseGiveawayPrizeState<TRaw>;
|
|
12
|
+
//# sourceMappingURL=useGiveawayPrize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGiveawayPrize.d.ts","sourceRoot":"","sources":["../../src/react/useGiveawayPrize.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,WAAW,qBAAqB,CAAC,IAAI,GAAG,OAAO;IACnD,4GAA4G;IAC5G,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAClC,iGAAiG;IACjG,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACnC,+CAA+C;IAC/C,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,IAAI,GAAG,OAAO,EAC7C,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,GAC9E,qBAAqB,CAAC,IAAI,CAAC,CA4B7B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useGiveawayPrize = useGiveawayPrize;
|
|
4
|
+
/**
|
|
5
|
+
* `useGiveawayPrize(giveaway)` — the giveaway's prize in the catalogue (0.9.0, "SDK move 8").
|
|
6
|
+
*
|
|
7
|
+
* The host picks a prize from the whole catalogue, kept apart from the show's lots, so it is usually
|
|
8
|
+
* not one of `session.products`. The record names it, its variant, its price and its photo (0.9.0), so
|
|
9
|
+
* a sheet is complete enough to enter from at once; the catalogue adds the description and the
|
|
10
|
+
* variant's price now. Freckled Poppy and amore-v2 each read it by hand.
|
|
11
|
+
*
|
|
12
|
+
* One `productsByIds` read through the configured commerce adapter when the prize changes. Cleared
|
|
13
|
+
* first, because the host can change the prize and the last prize's photo mustn't stand in for the new
|
|
14
|
+
* one; an answer for an earlier prize is dropped. `variant` is the one given away, the record's bare id
|
|
15
|
+
* matched to the catalogue's (`isTheVariant`). A failed read comes back in `readError`, for the app to
|
|
16
|
+
* report, as `streams.destinationFor`'s does; nothing is logged here. No adapter: nothing is read.
|
|
17
|
+
*/
|
|
18
|
+
const react_1 = require("react");
|
|
19
|
+
const client_1 = require("../client");
|
|
20
|
+
const giveawayPrize_1 = require("../giveawayPrize");
|
|
21
|
+
function useGiveawayPrize(giveaway) {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
const prizeId = (_a = giveaway === null || giveaway === void 0 ? void 0 : giveaway.storeProductId) !== null && _a !== void 0 ? _a : null;
|
|
24
|
+
const recordVariantId = (_b = giveaway === null || giveaway === void 0 ? void 0 : giveaway.variantId) !== null && _b !== void 0 ? _b : null;
|
|
25
|
+
const [answer, setAnswer] = (0, react_1.useState)(null);
|
|
26
|
+
const [readError, setReadError] = (0, react_1.useState)(null);
|
|
27
|
+
(0, react_1.useEffect)(() => {
|
|
28
|
+
setAnswer(null);
|
|
29
|
+
setReadError(null);
|
|
30
|
+
const commerce = (0, client_1.getCommerce)();
|
|
31
|
+
if (!prizeId || !commerce)
|
|
32
|
+
return;
|
|
33
|
+
let stillWanted = true;
|
|
34
|
+
commerce
|
|
35
|
+
.productsByIds([prizeId])
|
|
36
|
+
.then(([product]) => {
|
|
37
|
+
var _a;
|
|
38
|
+
if (stillWanted)
|
|
39
|
+
setAnswer({ prizeId, product: (_a = product) !== null && _a !== void 0 ? _a : null });
|
|
40
|
+
})
|
|
41
|
+
.catch((caught) => {
|
|
42
|
+
if (stillWanted)
|
|
43
|
+
setReadError(caught);
|
|
44
|
+
});
|
|
45
|
+
return () => {
|
|
46
|
+
stillWanted = false;
|
|
47
|
+
};
|
|
48
|
+
}, [prizeId]);
|
|
49
|
+
const product = answer && answer.prizeId === prizeId ? answer.product : null;
|
|
50
|
+
const variant = (0, react_1.useMemo)(() => (0, giveawayPrize_1.givenAwayVariant)(product, recordVariantId), [product, recordVariantId]);
|
|
51
|
+
return (0, react_1.useMemo)(() => ({ product, variant, readError }), [product, variant, readError]);
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=useGiveawayPrize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGiveawayPrize.js","sourceRoot":"","sources":["../../src/react/useGiveawayPrize.ts"],"names":[],"mappings":";;AA8BA,4CA8BC;AA5DD;;;;;;;;;;;;;GAaG;AACH,iCAAqD;AAErD,sCAAwC;AACxC,oDAAoD;AAapD,SAAgB,gBAAgB,CAC9B,QAA+E;;IAE/E,MAAM,OAAO,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,cAAc,mCAAI,IAAI,CAAC;IACjD,MAAM,eAAe,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,SAAS,mCAAI,IAAI,CAAC;IACpD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAgE,IAAI,CAAC,CAAC;IAC1G,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAU,IAAI,CAAC,CAAC;IAE1D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,SAAS,CAAC,IAAI,CAAC,CAAC;QAChB,YAAY,CAAC,IAAI,CAAC,CAAC;QACnB,MAAM,QAAQ,GAAG,IAAA,oBAAW,GAAE,CAAC;QAC/B,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ;YAAE,OAAO;QAClC,IAAI,WAAW,GAAG,IAAI,CAAC;QACvB,QAAQ;aACL,aAAa,CAAC,CAAC,OAAO,CAAC,CAAC;aACxB,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE;;YAClB,IAAI,WAAW;gBAAE,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,MAAC,OAAyC,mCAAI,IAAI,EAAE,CAAC,CAAC;QACvG,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,MAAe,EAAE,EAAE;YACzB,IAAI,WAAW;gBAAE,YAAY,CAAC,MAAM,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QACL,OAAO,GAAG,EAAE;YACV,WAAW,GAAG,KAAK,CAAC;QACtB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,MAAM,OAAO,GAAG,MAAM,IAAI,MAAM,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7E,MAAM,OAAO,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,IAAA,gCAAgB,EAAC,OAAO,EAAE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC;IACtG,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC;AACzF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface HiddenShowsForViewer {
|
|
2
|
+
isHidden: (show: {
|
|
3
|
+
title: string;
|
|
4
|
+
} | null | undefined) => boolean;
|
|
5
|
+
visible: <Show extends {
|
|
6
|
+
title: string;
|
|
7
|
+
}>(shows: Show[]) => Show[];
|
|
8
|
+
}
|
|
9
|
+
export declare function useHiddenShows(): HiddenShowsForViewer;
|
|
10
|
+
//# sourceMappingURL=useHiddenShows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHiddenShows.d.ts","sourceRoot":"","sources":["../../src/react/useHiddenShows.ts"],"names":[],"mappings":"AAkBA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,GAAG,SAAS,KAAK,OAAO,CAAC;IAClE,OAAO,EAAE,CAAC,IAAI,SAAS;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC;CACpE;AAED,wBAAgB,cAAc,IAAI,oBAAoB,CAYrD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useHiddenShows = useHiddenShows;
|
|
4
|
+
/**
|
|
5
|
+
* `useHiddenShows()` — the shows this viewer may see (0.9.0), for the hooks that hand out shows
|
|
6
|
+
* (`useReplays`, `useOngoingLive`, `useLiveStreams`, `useStreamInfo`) and an app's own lists: the viewer
|
|
7
|
+
* from `LiveSellingProvider`'s `viewerEmail`, the rule from the config's `hiddenShows`.
|
|
8
|
+
*
|
|
9
|
+
* `isHidden(show)` is true for a show they must not be shown; `visible(shows)` leaves those out, in the
|
|
10
|
+
* same order (the same array when none is). The object changes only when the viewer or the rule does,
|
|
11
|
+
* so a memo that depends on it filters again on a sign-in or sign-out, and not otherwise.
|
|
12
|
+
*
|
|
13
|
+
* Its own file rather than the provider's, so a test that stands in for the provider module
|
|
14
|
+
* (`useLiveSelling` alone) still gets it.
|
|
15
|
+
*/
|
|
16
|
+
const react_1 = require("react");
|
|
17
|
+
const client_1 = require("../client");
|
|
18
|
+
const hiddenShows_1 = require("../hiddenShows");
|
|
19
|
+
const LiveSellingProvider_1 = require("./LiveSellingProvider");
|
|
20
|
+
function useHiddenShows() {
|
|
21
|
+
const { ready, viewerEmail } = (0, LiveSellingProvider_1.useLiveSelling)();
|
|
22
|
+
// Read once the client is configured; before that nothing is handed out anyway.
|
|
23
|
+
const rule = ready ? (0, client_1.hiddenShowsRule)() : null;
|
|
24
|
+
const email = viewerEmail !== null && viewerEmail !== void 0 ? viewerEmail : null;
|
|
25
|
+
return (0, react_1.useMemo)(() => ({
|
|
26
|
+
isHidden: (show) => (0, hiddenShows_1.isHiddenFrom)(show, email, rule),
|
|
27
|
+
visible: (shows) => (0, hiddenShows_1.withoutHiddenShows)(shows, email, rule),
|
|
28
|
+
}), [email, rule]);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=useHiddenShows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHiddenShows.js","sourceRoot":"","sources":["../../src/react/useHiddenShows.ts"],"names":[],"mappings":";;AAuBA,wCAYC;AAnCD;;;;;;;;;;;GAWG;AACH,iCAAgC;AAEhC,sCAA4C;AAC5C,gDAAkE;AAClE,+DAAuD;AAOvD,SAAgB,cAAc;IAC5B,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAA,oCAAc,GAAE,CAAC;IAChD,gFAAgF;IAChF,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,IAAA,wBAAe,GAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9C,MAAM,KAAK,GAAG,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,IAAI,CAAC;IAClC,OAAO,IAAA,eAAO,EACZ,GAAG,EAAE,CAAC,CAAC;QACL,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAY,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC;QACnD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,gCAAkB,EAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC;KAC3D,CAAC,EACF,CAAC,KAAK,EAAE,IAAI,CAAC,CACd,CAAC;AACJ,CAAC"}
|
|
@@ -17,9 +17,13 @@ export interface LiveSessionProviderProps {
|
|
|
17
17
|
/** Shown next to this viewer's own comments and sent with them. Overrides the identity adapter. */
|
|
18
18
|
viewerName?: string | null;
|
|
19
19
|
/**
|
|
20
|
-
* Called when the
|
|
21
|
-
* window
|
|
22
|
-
*
|
|
20
|
+
* Called when the system PIP window gives the picture back to a full-screen player: the user expanded
|
|
21
|
+
* a window that the player opened (or, on iOS, came back to the app with it still up). Navigate to
|
|
22
|
+
* your live screen — the window *is* that screen as far as they are concerned. The SDK cannot do this
|
|
23
|
+
* itself: it lives above the navigator and has no route context.
|
|
24
|
+
*
|
|
25
|
+
* Not called for a window that opened from your in-app bubble: coming back puts the picture in the
|
|
26
|
+
* bubble again (`pipMode` `'inapp'`), where it was, and there is nowhere to navigate.
|
|
23
27
|
*/
|
|
24
28
|
onPipRestore?: (streamingId: string | undefined) => void;
|
|
25
29
|
children: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLiveSession.d.ts","sourceRoot":"","sources":["../../src/react/useLiveSession.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLiveSession.d.ts","sourceRoot":"","sources":["../../src/react/useLiveSession.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA4CvC,OAAO,KAAK,EASV,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AAiCzB;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,GAAG,OAAO,KAAK,WAAW,CAAC,IAAI,CAAC,CAIlE;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mGAAmG;IACnG,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACzD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAy9CD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,wBAAwB,+FA0CnF"}
|