@tiledev/sdk-apptile-live-selling 0.13.0 → 0.14.0
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 +94 -12
- package/dist/giveawayPrizeLines.d.ts +10 -0
- package/dist/giveawayPrizeLines.d.ts.map +1 -1
- package/dist/giveawayPrizeLines.js +11 -1
- package/dist/giveawayPrizeLines.js.map +1 -1
- package/dist/hiddenShows.d.ts +10 -0
- package/dist/hiddenShows.d.ts.map +1 -1
- package/dist/hiddenShows.js +11 -0
- package/dist/hiddenShows.js.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -2
- package/dist/index.js.map +1 -1
- package/dist/livePages.d.ts +79 -0
- package/dist/livePages.d.ts.map +1 -0
- package/dist/livePages.js +90 -0
- package/dist/livePages.js.map +1 -0
- package/dist/liveRoom.d.ts +21 -0
- package/dist/liveRoom.d.ts.map +1 -0
- package/dist/liveRoom.js +28 -0
- package/dist/liveRoom.js.map +1 -0
- package/dist/pageOptions.d.ts +100 -0
- package/dist/pageOptions.d.ts.map +1 -0
- package/dist/pageOptions.js +82 -0
- package/dist/pageOptions.js.map +1 -0
- package/dist/pageTypes.d.ts +127 -0
- package/dist/pageTypes.d.ts.map +1 -0
- package/dist/pageTypes.js +3 -0
- package/dist/pageTypes.js.map +1 -0
- package/dist/react/LiveSellingProvider.d.ts +23 -1
- package/dist/react/LiveSellingProvider.d.ts.map +1 -1
- package/dist/react/LiveSellingProvider.js +26 -2
- package/dist/react/LiveSellingProvider.js.map +1 -1
- package/dist/react/index.d.ts +10 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +29 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.web.d.ts +11 -32
- package/dist/react/index.web.d.ts.map +1 -1
- package/dist/react/index.web.js +46 -139
- package/dist/react/index.web.js.map +1 -1
- package/dist/react/navigation.d.ts +13 -0
- package/dist/react/navigation.d.ts.map +1 -0
- package/dist/react/navigation.js +7 -0
- package/dist/react/navigation.js.map +1 -0
- package/dist/react/platformSession.d.ts +16 -0
- package/dist/react/platformSession.d.ts.map +1 -0
- package/dist/react/platformSession.js +28 -0
- package/dist/react/platformSession.js.map +1 -0
- package/dist/react/platformSession.web.d.ts +35 -0
- package/dist/react/platformSession.web.d.ts.map +1 -0
- package/dist/react/platformSession.web.js +148 -0
- package/dist/react/platformSession.web.js.map +1 -0
- package/dist/react/replayPlayer.d.ts +74 -0
- package/dist/react/replayPlayer.d.ts.map +1 -0
- package/dist/react/replayPlayer.js +279 -0
- package/dist/react/replayPlayer.js.map +1 -0
- package/dist/react/shopifyProviders.d.ts +68 -0
- package/dist/react/shopifyProviders.d.ts.map +1 -0
- package/dist/react/shopifyProviders.js +98 -0
- package/dist/react/shopifyProviders.js.map +1 -0
- package/dist/react/useKeepScreenAwake.d.ts +2 -0
- package/dist/react/useKeepScreenAwake.d.ts.map +1 -0
- package/dist/react/useKeepScreenAwake.js +34 -0
- package/dist/react/useKeepScreenAwake.js.map +1 -0
- package/dist/react/useLiveAuction.d.ts +104 -0
- package/dist/react/useLiveAuction.d.ts.map +1 -0
- package/dist/react/useLiveAuction.js +244 -0
- package/dist/react/useLiveAuction.js.map +1 -0
- package/dist/react/useLiveChat.d.ts +75 -0
- package/dist/react/useLiveChat.d.ts.map +1 -0
- package/dist/react/useLiveChat.js +131 -0
- package/dist/react/useLiveChat.js.map +1 -0
- package/dist/react/useLiveGiveawaysAndPolls.d.ts +84 -0
- package/dist/react/useLiveGiveawaysAndPolls.d.ts.map +1 -0
- package/dist/react/useLiveGiveawaysAndPolls.js +180 -0
- package/dist/react/useLiveGiveawaysAndPolls.js.map +1 -0
- package/dist/react/useLivePage.d.ts +113 -0
- package/dist/react/useLivePage.d.ts.map +1 -0
- package/dist/react/useLivePage.js +264 -0
- package/dist/react/useLivePage.js.map +1 -0
- package/dist/react/useLiveShop.d.ts +83 -0
- package/dist/react/useLiveShop.d.ts.map +1 -0
- package/dist/react/useLiveShop.js +165 -0
- package/dist/react/useLiveShop.js.map +1 -0
- package/dist/react/useReplayPage.d.ts +117 -0
- package/dist/react/useReplayPage.d.ts.map +1 -0
- package/dist/react/useReplayPage.js +504 -0
- package/dist/react/useReplayPage.js.map +1 -0
- package/dist/showCredit.d.ts +87 -0
- package/dist/showCredit.d.ts.map +1 -0
- package/dist/showCredit.js +120 -0
- package/dist/showCredit.js.map +1 -0
- package/dist/ui/BubbleFrame.d.ts +38 -0
- package/dist/ui/BubbleFrame.d.ts.map +1 -0
- package/dist/ui/BubbleFrame.js +181 -0
- package/dist/ui/BubbleFrame.js.map +1 -0
- package/dist/ui/LiveBubble.d.ts +37 -0
- package/dist/ui/LiveBubble.d.ts.map +1 -0
- package/dist/ui/LiveBubble.js +101 -0
- package/dist/ui/LiveBubble.js.map +1 -0
- package/dist/ui/ReplayBubble.d.ts +23 -0
- package/dist/ui/ReplayBubble.d.ts.map +1 -0
- package/dist/ui/ReplayBubble.js +65 -0
- package/dist/ui/ReplayBubble.js.map +1 -0
- package/dist/ui.d.ts +27 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +34 -0
- package/dist/ui.js.map +1 -0
- package/package.json +36 -5
- package/ui/package.json +6 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REPLAY_COMMENTS_SHOWN = exports.BACK_ACTIONS = void 0;
|
|
4
|
+
exports.isCoveredOnlyBySheet = isCoveredOnlyBySheet;
|
|
5
|
+
exports.chatNameAsk = chatNameAsk;
|
|
6
|
+
exports.isTheShow = isTheShow;
|
|
7
|
+
exports.playerMs = playerMs;
|
|
8
|
+
exports.productOnScreen = productOnScreen;
|
|
9
|
+
exports.firstShownAt = firstShownAt;
|
|
10
|
+
exports.replayCommentsAt = replayCommentsAt;
|
|
11
|
+
// ─── The Live screen ──────────────────────────────────────────────────────────
|
|
12
|
+
/**
|
|
13
|
+
* The navigation actions that are a back press: the header's arrow and picture-in-picture button
|
|
14
|
+
* (`goBack`, or `popTo` the tabs when nothing is behind), Android's back (`GO_BACK`) and the iOS swipe
|
|
15
|
+
* (native-stack's `POP`). Leaving any of these ways shrinks a show on air into the bubble. Being
|
|
16
|
+
* replaced (a link's show has a recording) or navigated away from is not going back.
|
|
17
|
+
*/
|
|
18
|
+
exports.BACK_ACTIONS = new Set(['GO_BACK', 'POP', 'POP_TO', 'POP_TO_TOP']);
|
|
19
|
+
/**
|
|
20
|
+
* The screen (`screenKey`, its route key) is covered only by a page drawn as a sheet (`sheets`, the
|
|
21
|
+
* app's route names: the variant page, the Sign In page): the show plays on behind it, with the screen
|
|
22
|
+
* kept on, as if the screen were on show.
|
|
23
|
+
*/
|
|
24
|
+
function isCoveredOnlyBySheet(state, screenKey, sheets) {
|
|
25
|
+
if (!state)
|
|
26
|
+
return false;
|
|
27
|
+
const top = state.routes[state.index];
|
|
28
|
+
const below = state.routes[state.index - 1];
|
|
29
|
+
return !!top && sheets.includes(top.name) && (below === null || below === void 0 ? void 0 : below.key) === screenKey;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* What the comment box does about the shopper's name: ask for one on the first Send (`askForName`,
|
|
33
|
+
* saved on this phone by the session's `chooseViewerName`), or wait while the account loads
|
|
34
|
+
* (`waitingForName`, Send held so nothing goes out as "Anonymous").
|
|
35
|
+
*
|
|
36
|
+
* Signed in, the account's name is the room's (`viewerNameFor`). Since sdk-apptile-live-selling 0.13.0
|
|
37
|
+
* an account with no name gives none (it was the email's part before the @), and nor does one with a
|
|
38
|
+
* name the show's team goes by: the room has no name, and the shopper is asked like a signed-out one
|
|
39
|
+
* once the account has loaded. amore-v2's chat waited for as long as a signed-in shopper had no name,
|
|
40
|
+
* which on 0.13.0 was for ever for such an account.
|
|
41
|
+
*/
|
|
42
|
+
function chatNameAsk({ named, loggedIn, restoring, hasCustomer }) {
|
|
43
|
+
// On app open, or a moment after signing in (signed in, the account not read yet).
|
|
44
|
+
const accountLoading = restoring || (loggedIn && !hasCustomer);
|
|
45
|
+
return { askForName: !named && !accountLoading, waitingForName: !named && accountLoading };
|
|
46
|
+
}
|
|
47
|
+
// ─── The Replay screen ────────────────────────────────────────────────────────
|
|
48
|
+
/** A card passes the recording's feed id; a push passes its show's streaming id. Both find it. */
|
|
49
|
+
function isTheShow(replay, id) {
|
|
50
|
+
return replay.id === id || replay.streamingId === id;
|
|
51
|
+
}
|
|
52
|
+
/** A time or length from the player, in seconds, as milliseconds; 0 when it has none yet. */
|
|
53
|
+
function playerMs(seconds) {
|
|
54
|
+
return Number.isFinite(seconds) && seconds > 0 ? seconds * 1000 : 0;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The product on screen at `atMs`: the one whose time window covers it (where windows overlap, the
|
|
58
|
+
* host went back to something, and the last one is what they were on); before the first window (a
|
|
59
|
+
* sale opens with a greeting), the first tagged product. Null with no products.
|
|
60
|
+
*/
|
|
61
|
+
function productOnScreen(segments, products, atMs) {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
const covering = segments.filter((segment) => atMs >= segment.startMs && atMs <= segment.endMs);
|
|
64
|
+
const productId = covering.length ? covering[covering.length - 1].productGid : null;
|
|
65
|
+
return (_b = (_a = (productId ? products.find((product) => product.id === productId) : undefined)) !== null && _a !== void 0 ? _a : products[0]) !== null && _b !== void 0 ? _b : null;
|
|
66
|
+
}
|
|
67
|
+
/** Where the host first showed a product, or null for one they never did (tagged, with no time window). */
|
|
68
|
+
function firstShownAt(segments, productId) {
|
|
69
|
+
var _a, _b;
|
|
70
|
+
return (_b = (_a = segments.find((segment) => segment.productGid === productId)) === null || _a === void 0 ? void 0 : _a.startMs) !== null && _b !== void 0 ? _b : null;
|
|
71
|
+
}
|
|
72
|
+
/** Comments kept in the replay's chat pane: the newest of what has been said so far. */
|
|
73
|
+
exports.REPLAY_COMMENTS_SHOWN = 60;
|
|
74
|
+
/**
|
|
75
|
+
* The recording's chat as it stood at `atMs`: what had been said by then, the newest `shown`, oldest
|
|
76
|
+
* first. The comments file writes the host's rows as "You" (true on the console that recorded them),
|
|
77
|
+
* so those read as the host's too.
|
|
78
|
+
*/
|
|
79
|
+
function replayCommentsAt(comments, atMs, shown = exports.REPLAY_COMMENTS_SHOWN) {
|
|
80
|
+
let said = 0;
|
|
81
|
+
while (said < comments.length && comments[said].atMs <= atMs)
|
|
82
|
+
said += 1;
|
|
83
|
+
return comments.slice(Math.max(0, said - shown), said).map(({ comment }) => ({
|
|
84
|
+
id: comment.id,
|
|
85
|
+
author: comment.userName,
|
|
86
|
+
text: comment.text,
|
|
87
|
+
fromHost: comment.source === 'HOST' || comment.userName === 'You',
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=livePages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"livePages.js","sourceRoot":"","sources":["../src/livePages.ts"],"names":[],"mappings":";;;AA+BA,oDASC;AAyBD,kCAOC;AAKD,8BAEC;AAGD,4BAEC;AAOD,0CAQC;AAGD,oCAEC;AAUD,4CAaC;AArHD,iFAAiF;AAEjF;;;;;GAKG;AACU,QAAA,YAAY,GAAwB,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;AAQrG;;;;GAIG;AACH,SAAgB,oBAAoB,CAClC,KAA6C,EAC7C,SAAiB,EACjB,MAAyB;IAEzB,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IAC5C,OAAO,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI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live screen (`useLiveShop`). `lotNumber` is the lot's number
|
|
4
|
+
* (the session's `sellId`), or null when the gateway hasn't issued one.
|
|
5
|
+
*/
|
|
6
|
+
export interface LiveRoomAnnouncement {
|
|
7
|
+
lotNumber: string | null;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Tells the room of the live show this phone is watching that the shopper put a product in their cart:
|
|
11
|
+
* every phone in the room shows it as a cart chip ("Sold 104", or "Jane added …"), this one included,
|
|
12
|
+
* as the room sends it back. **Only after the add landed** (Freckled Poppy's rule): a refused add must
|
|
13
|
+
* not be announced, as the room reads the chip as "it is going".
|
|
14
|
+
*
|
|
15
|
+
* The engine's own call (`sendCartAnnouncement`, which the session's `actions.announceAddToCart`
|
|
16
|
+
* wraps). The phone is in one room at a time, the one the Live screen holds (`holdStream`) while the
|
|
17
|
+
* variant page is over it; with no room (the show ended meanwhile) nothing is sent. A send that fails
|
|
18
|
+
* goes to the provider's `onWarning`. Never throws.
|
|
19
|
+
*/
|
|
20
|
+
export declare function announceAddToLiveRoom(productTitle: string, { lotNumber }: LiveRoomAnnouncement): void;
|
|
21
|
+
//# sourceMappingURL=liveRoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveRoom.d.ts","sourceRoot":"","sources":["../src/liveRoom.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,oBAAoB,GAAG,IAAI,CAIrG"}
|
package/dist/liveRoom.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.announceAddToLiveRoom = announceAddToLiveRoom;
|
|
4
|
+
/**
|
|
5
|
+
* Telling the live show's room about an add (0.14.0, moved from amore-v2's `src/core/services/liveRoom.ts`).
|
|
6
|
+
*
|
|
7
|
+
* Free of React, so the variant page and quick add can announce without reading the session, which they
|
|
8
|
+
* need for nothing else. `engine` is the native one on a phone and the no-op everywhere else.
|
|
9
|
+
*/
|
|
10
|
+
const engine_1 = require("./engine");
|
|
11
|
+
const pageOptions_1 = require("./pageOptions");
|
|
12
|
+
/**
|
|
13
|
+
* Tells the room of the live show this phone is watching that the shopper put a product in their cart:
|
|
14
|
+
* every phone in the room shows it as a cart chip ("Sold 104", or "Jane added …"), this one included,
|
|
15
|
+
* as the room sends it back. **Only after the add landed** (Freckled Poppy's rule): a refused add must
|
|
16
|
+
* not be announced, as the room reads the chip as "it is going".
|
|
17
|
+
*
|
|
18
|
+
* The engine's own call (`sendCartAnnouncement`, which the session's `actions.announceAddToCart`
|
|
19
|
+
* wraps). The phone is in one room at a time, the one the Live screen holds (`holdStream`) while the
|
|
20
|
+
* variant page is over it; with no room (the show ended meanwhile) nothing is sent. A send that fails
|
|
21
|
+
* goes to the provider's `onWarning`. Never throws.
|
|
22
|
+
*/
|
|
23
|
+
function announceAddToLiveRoom(productTitle, { lotNumber }) {
|
|
24
|
+
void engine_1.engine.sendCartAnnouncement(productTitle, lotNumber).catch((error) => {
|
|
25
|
+
(0, pageOptions_1.reportLiveWarning)(error, { at: 'announceAddToLiveRoom', productTitle, lotNumber });
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=liveRoom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"liveRoom.js","sourceRoot":"","sources":["../src/liveRoom.ts"],"names":[],"mappings":";;AA6BA,sDAIC;AAjCD;;;;;GAKG;AACH,qCAAkC;AAClC,+CAAkD;AAWlD;;;;;;;;;;GAUG;AACH,SAAgB,qBAAqB,CAAC,YAAoB,EAAE,EAAE,SAAS,EAAwB;IAC7F,KAAK,eAAM,CAAC,oBAAoB,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;QACjF,IAAA,+BAAiB,EAAC,KAAK,EAAE,EAAE,EAAE,EAAE,uBAAuB,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the live pages need from the app (0.14.0), set once on `LiveSellingProvider`: where the shopper
|
|
3
|
+
* goes (`routes`), the app's analytics (`track`), where a handled failure is reported (`onWarning`) and
|
|
4
|
+
* the store's name (`shopName`).
|
|
5
|
+
*
|
|
6
|
+
* The page hooks (`useLivePage`, `useReplayPage` and the rest) moved here from amore-v2, where they
|
|
7
|
+
* navigated by route name and reported through the app's own analytics and Sentry. Routes stay the
|
|
8
|
+
* app's: the hooks call these instead, handing over the screen's own navigation when they run inside
|
|
9
|
+
* one, so a route can act on that screen (replace it, go back from it) as the app's code did.
|
|
10
|
+
*
|
|
11
|
+
* Pure: no React, no React Native, so the defaults load in plain Node for tests.
|
|
12
|
+
*/
|
|
13
|
+
import type { NavigationProp, ParamListBase } from '@react-navigation/native' with { 'resolution-mode': 'import' };
|
|
14
|
+
import type { VariantPageParams } from './showCredit';
|
|
15
|
+
/** The navigation of the screen a route is taken from (React Navigation's `useNavigation()`). */
|
|
16
|
+
export type ScreenNavigation = NavigationProp<ParamListBase>;
|
|
17
|
+
/** How the app's Sign In page signs in: sdk-shopify's `AuthMethod`, as `useSignIn` hands it over. */
|
|
18
|
+
export type SignInPageMethod = 'password' | 'shopify';
|
|
19
|
+
/**
|
|
20
|
+
* Where the live pages send the shopper. Each is the app's: the route names, the params, and whether
|
|
21
|
+
* a screen already in the stack is reused. The ones that take `navigation` are taken from inside a
|
|
22
|
+
* screen and get that screen's; the others are taken from outside the navigator (a bubble, the
|
|
23
|
+
* session's `onPipRestore`), where the app reaches its navigator through its own ref.
|
|
24
|
+
*/
|
|
25
|
+
export interface LiveSellingRoutes {
|
|
26
|
+
/**
|
|
27
|
+
* Back to the Live screen for this show: the one already in the stack (the screens above it close,
|
|
28
|
+
* the Cart included), else a new one. Never a second Live screen over the first: the engine holds
|
|
29
|
+
* one room, and two players would fight over its one picture. Taken by the live bubble's tap and
|
|
30
|
+
* by the phone's picture-in-picture window coming back to a show the Live screen shrank.
|
|
31
|
+
*/
|
|
32
|
+
openLive(streamId: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Back to the Replay screen for this recording: the one already in the stack (the screens above it
|
|
35
|
+
* close), else a new one. Taken by the replay bubble's tap.
|
|
36
|
+
*/
|
|
37
|
+
openReplay(feedId: string): void;
|
|
38
|
+
/** The Live screen's link named a show that has ended and has a recording: its Replay, in the Live screen's place. */
|
|
39
|
+
replaceWithReplay(feedId: string, navigation: ScreenNavigation): void;
|
|
40
|
+
/**
|
|
41
|
+
* The Live tab: the Live screen's back with nothing behind it (a link on a cold start), and a link to
|
|
42
|
+
* a show with nothing to play. Back to the tabs already in the stack, or in the Live screen's place.
|
|
43
|
+
*/
|
|
44
|
+
backToLiveTab(navigation: ScreenNavigation): void;
|
|
45
|
+
/** Home: the Replay screen's close or picture-in-picture with nothing behind it, and its "no recording" button. */
|
|
46
|
+
openHome(navigation: ScreenNavigation): void;
|
|
47
|
+
/** The cart, over the show; `itemsYouWon` opens its Items You Won tab (an auction show's cart). */
|
|
48
|
+
openCart(options: {
|
|
49
|
+
itemsYouWon: boolean;
|
|
50
|
+
}, navigation: ScreenNavigation): void;
|
|
51
|
+
/** The variant page, drawn as a sheet over the playing show, with the show's credit. */
|
|
52
|
+
openVariantPage(params: VariantPageParams, navigation: ScreenNavigation): void;
|
|
53
|
+
/** The app's Sign In page (sdk-shopify's `useSignIn` `onOpenSignInPage`), for a bid or a giveaway entry. */
|
|
54
|
+
openSignIn(method: SignInPageMethod, navigation: ScreenNavigation): void;
|
|
55
|
+
/**
|
|
56
|
+
* The route names of the pages drawn as sheets over a show (amore-v2's: `VariantSelector` and
|
|
57
|
+
* `SignIn`). Under one the show plays on, with the screen kept on and the light status bar.
|
|
58
|
+
*/
|
|
59
|
+
sheets: readonly string[];
|
|
60
|
+
}
|
|
61
|
+
/** The app's analytics `track`, for `liveJoin` and a show's copy of each add that lands. */
|
|
62
|
+
export type LiveTrack = (name: string, properties: Record<string, unknown>) => void;
|
|
63
|
+
/** A handled failure: a read that failed, an announcement that didn't go. The app's Sentry, say. */
|
|
64
|
+
export type LiveWarning = (error: unknown, context: Record<string, unknown>) => void;
|
|
65
|
+
/** What the page hooks read from `LiveSellingProvider`. */
|
|
66
|
+
export interface LivePageOptions {
|
|
67
|
+
routes: LiveSellingRoutes;
|
|
68
|
+
track: LiveTrack;
|
|
69
|
+
/** The store's name, in the bidding rules. Unset: the bid bar's own words. */
|
|
70
|
+
shopName: string | undefined;
|
|
71
|
+
}
|
|
72
|
+
/** The provider's props the options are made from, any of them unset. */
|
|
73
|
+
export interface LivePageOptionsInput {
|
|
74
|
+
routes?: LiveSellingRoutes | null;
|
|
75
|
+
track?: LiveTrack | null;
|
|
76
|
+
shopName?: string | null;
|
|
77
|
+
}
|
|
78
|
+
/** Without `onWarning`: the console, so a failure is never silent in development. */
|
|
79
|
+
export declare const consoleWarning: LiveWarning;
|
|
80
|
+
/**
|
|
81
|
+
* Where `reportLiveWarning` goes: the provider's `onWarning`, or the console when it has none. Module
|
|
82
|
+
* state rather than context, because the plain functions an app calls outside any screen
|
|
83
|
+
* (`announceAddToLiveRoom`, `reportShowAdd`) report too.
|
|
84
|
+
*/
|
|
85
|
+
export declare function setLiveWarningSink(sink: LiveWarning | null | undefined): void;
|
|
86
|
+
/** Reports a handled failure to the app. Never throws: a report that fails must not fail the screen. */
|
|
87
|
+
export declare function reportLiveWarning(error: unknown, context: Record<string, unknown>): void;
|
|
88
|
+
/**
|
|
89
|
+
* The routes of a provider given none: each says so (`reportLiveWarning`) and goes nowhere, and no
|
|
90
|
+
* page counts as a sheet. A screen still draws; only its buttons that go somewhere do nothing.
|
|
91
|
+
*/
|
|
92
|
+
export declare const NO_ROUTES: LiveSellingRoutes;
|
|
93
|
+
/**
|
|
94
|
+
* The page options, read from `latest` at the moment each is used, with their defaults: no routes
|
|
95
|
+
* (`NO_ROUTES`), no analytics, no store name. The routes and `track` keep one identity however often
|
|
96
|
+
* the app hands the provider new ones (an inline object, a hook's function), so a page hook can depend
|
|
97
|
+
* on them without its effects running again.
|
|
98
|
+
*/
|
|
99
|
+
export declare function pageOptionsReading(latest: () => LivePageOptionsInput): LivePageOptions;
|
|
100
|
+
//# sourceMappingURL=pageOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageOptions.d.ts","sourceRoot":"","sources":["../src/pageOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC,OAAO,iBAAiB,EAAE,QAAQ,EAAE,CAAC;AAEnH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,iGAAiG;AACjG,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AAE7D,qGAAqG;AACrG,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,SAAS,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,sHAAsH;IACtH,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACtE;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClD,mHAAmH;IACnH,QAAQ,CAAC,UAAU,EAAE,gBAAgB,GAAG,IAAI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iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAMxF;AAOD;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,iBAUvB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,oBAAoB,GAAG,eAAe,CAwBtF"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NO_ROUTES = exports.consoleWarning = void 0;
|
|
4
|
+
exports.setLiveWarningSink = setLiveWarningSink;
|
|
5
|
+
exports.reportLiveWarning = reportLiveWarning;
|
|
6
|
+
exports.pageOptionsReading = pageOptionsReading;
|
|
7
|
+
/** Without `onWarning`: the console, so a failure is never silent in development. */
|
|
8
|
+
const consoleWarning = (error, context) => {
|
|
9
|
+
console.warn(error, context);
|
|
10
|
+
};
|
|
11
|
+
exports.consoleWarning = consoleWarning;
|
|
12
|
+
let warningSink = exports.consoleWarning;
|
|
13
|
+
/**
|
|
14
|
+
* Where `reportLiveWarning` goes: the provider's `onWarning`, or the console when it has none. Module
|
|
15
|
+
* state rather than context, because the plain functions an app calls outside any screen
|
|
16
|
+
* (`announceAddToLiveRoom`, `reportShowAdd`) report too.
|
|
17
|
+
*/
|
|
18
|
+
function setLiveWarningSink(sink) {
|
|
19
|
+
warningSink = sink !== null && sink !== void 0 ? sink : exports.consoleWarning;
|
|
20
|
+
}
|
|
21
|
+
/** Reports a handled failure to the app. Never throws: a report that fails must not fail the screen. */
|
|
22
|
+
function reportLiveWarning(error, context) {
|
|
23
|
+
try {
|
|
24
|
+
warningSink(error, context);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
// Nothing more to do: the report itself failed.
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function goesNowhere(route) {
|
|
31
|
+
return () => reportLiveWarning(new Error(`LiveSellingProvider has no \`routes\`: ${route} goes nowhere`), { at: `routes.${route}` });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The routes of a provider given none: each says so (`reportLiveWarning`) and goes nowhere, and no
|
|
35
|
+
* page counts as a sheet. A screen still draws; only its buttons that go somewhere do nothing.
|
|
36
|
+
*/
|
|
37
|
+
exports.NO_ROUTES = {
|
|
38
|
+
openLive: goesNowhere('openLive'),
|
|
39
|
+
openReplay: goesNowhere('openReplay'),
|
|
40
|
+
replaceWithReplay: goesNowhere('replaceWithReplay'),
|
|
41
|
+
backToLiveTab: goesNowhere('backToLiveTab'),
|
|
42
|
+
openHome: goesNowhere('openHome'),
|
|
43
|
+
openCart: goesNowhere('openCart'),
|
|
44
|
+
openVariantPage: goesNowhere('openVariantPage'),
|
|
45
|
+
openSignIn: goesNowhere('openSignIn'),
|
|
46
|
+
sheets: [],
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The page options, read from `latest` at the moment each is used, with their defaults: no routes
|
|
50
|
+
* (`NO_ROUTES`), no analytics, no store name. The routes and `track` keep one identity however often
|
|
51
|
+
* the app hands the provider new ones (an inline object, a hook's function), so a page hook can depend
|
|
52
|
+
* on them without its effects running again.
|
|
53
|
+
*/
|
|
54
|
+
function pageOptionsReading(latest) {
|
|
55
|
+
const routes = () => { var _a; return (_a = latest().routes) !== null && _a !== void 0 ? _a : exports.NO_ROUTES; };
|
|
56
|
+
return {
|
|
57
|
+
routes: {
|
|
58
|
+
openLive: (streamId) => routes().openLive(streamId),
|
|
59
|
+
openReplay: (feedId) => routes().openReplay(feedId),
|
|
60
|
+
replaceWithReplay: (feedId, navigation) => routes().replaceWithReplay(feedId, navigation),
|
|
61
|
+
backToLiveTab: (navigation) => routes().backToLiveTab(navigation),
|
|
62
|
+
openHome: (navigation) => routes().openHome(navigation),
|
|
63
|
+
openCart: (options, navigation) => routes().openCart(options, navigation),
|
|
64
|
+
openVariantPage: (params, navigation) => routes().openVariantPage(params, navigation),
|
|
65
|
+
openSignIn: (method, navigation) => routes().openSignIn(method, navigation),
|
|
66
|
+
get sheets() {
|
|
67
|
+
var _a;
|
|
68
|
+
return (_a = routes().sheets) !== null && _a !== void 0 ? _a : [];
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
track: (name, properties) => {
|
|
72
|
+
const track = latest().track;
|
|
73
|
+
if (track)
|
|
74
|
+
track(name, properties);
|
|
75
|
+
},
|
|
76
|
+
get shopName() {
|
|
77
|
+
var _a;
|
|
78
|
+
return (_a = latest().shopName) !== null && _a !== void 0 ? _a : undefined;
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=pageOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageOptions.js","sourceRoot":"","sources":["../src/pageOptions.ts"],"names":[],"mappings":";;;AAgGA,gDAEC;AAGD,8CAMC;AA6BD,gDAwBC;AA5ED,qFAAqF;AAC9E,MAAM,cAAc,GAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IAC5D,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC/B,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB;AAEF,IAAI,WAAW,GAAgB,sBAAc,CAAC;AAE9C;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,IAAoC;IACrE,WAAW,GAAG,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,sBAAc,CAAC;AACvC,CAAC;AAED,wGAAwG;AACxG,SAAgB,iBAAiB,CAAC,KAAc,EAAE,OAAgC;IAChF,IAAI,CAAC;QACH,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC;IAAC,MAAM,CAAC;QACP,gDAAgD;IAClD,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,KAA8B;IACjD,OAAO,GAAG,EAAE,CACV,iBAAiB,CAAC,IAAI,KAA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C,OAAO,EAAE,UAAU,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;YACzE,eAAe,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,eAAe,CAAC,MAAM,EAAE,UAAU,CAAC;YACrF,UAAU,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC;YAC3E,IAAI,MAAM;;gBACR,OAAO,MAAA,MAAM,EAAE,CAAC,MAAM,mCAAI,EAAE,CAAC;YAC/B,CAAC;SACF;QACD,KAAK,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE;YAC1B,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC;YAC7B,IAAI,KAAK;gBAAE,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,QAAQ;;YACV,OAAO,MAAA,MAAM,EAAE,CAAC,QAAQ,mCAAI,SAAS,CAAC;QACxC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the live pages hand their tiles, ready to draw (0.14.0): the shapes amore-v2's Live and Replay
|
|
3
|
+
* tiles declared (`@/components/modules`), with the same names and fields, so a tile imports its
|
|
4
|
+
* props' parts from here and the page hook that fills them is the SDK's. Money is formatted by the
|
|
5
|
+
* hook; the words are the tile's.
|
|
6
|
+
*
|
|
7
|
+
* Types alone: sdk-shopify's `Product` is read for its type.
|
|
8
|
+
*/
|
|
9
|
+
import type { Product } from '@tiledev/sdk-shopify';
|
|
10
|
+
/** The product the host is featuring, ready to draw (`LiveProductCard01`): the page formats the money. */
|
|
11
|
+
export interface LiveFeaturedProduct {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
/** Formatted ("$58.00"). */
|
|
15
|
+
price: string;
|
|
16
|
+
imageUrl?: string | null;
|
|
17
|
+
/** The lot's number, the one the host reads out ("104"). None: no badge. */
|
|
18
|
+
lotNumber?: string | null;
|
|
19
|
+
/** An auction lot's opening bid, formatted ("$20.00"). None on a live show. */
|
|
20
|
+
startingBid?: string | null;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Where the featured lot stands in its auction, ready to draw (`LiveProductCard01`; the page formats
|
|
24
|
+
* the money): bidding on it is open now, it has been won, or the host hasn't opened it yet.
|
|
25
|
+
*/
|
|
26
|
+
export interface LiveAuctionRound {
|
|
27
|
+
state: 'open' | 'closed' | 'upcoming';
|
|
28
|
+
/** The highest bid so far, formatted ("$45.00"). None before the first bid. */
|
|
29
|
+
highestBid: string | null;
|
|
30
|
+
/** Who holds it, as the room shows them (never an email). None before the first bid. */
|
|
31
|
+
leaderName: string | null;
|
|
32
|
+
/** The shopper holds it. */
|
|
33
|
+
leaderIsYou: boolean;
|
|
34
|
+
}
|
|
35
|
+
/** One lot on an auction show, ready to draw (`LiveShopButton01`): where bidding opens (formatted) and where it stands. */
|
|
36
|
+
export interface LiveAuctionLot {
|
|
37
|
+
product: Product;
|
|
38
|
+
/** The host's opening bid ("$20.00"); none on a lot the host hasn't priced. */
|
|
39
|
+
startingBid: string | null;
|
|
40
|
+
/** Bidding on it is open now, it has been won, or the host hasn't opened it yet. */
|
|
41
|
+
state: 'open' | 'closed' | 'upcoming';
|
|
42
|
+
}
|
|
43
|
+
/** A round's winner, ready to draw (`LiveAuctionWin01`): the page formats the money and knows whether it is the shopper. */
|
|
44
|
+
export interface LiveAuctionWinner {
|
|
45
|
+
/** Tells one win from the next: a new key plays the celebration again. */
|
|
46
|
+
key: string;
|
|
47
|
+
/** The winner's name as the room shows it (never an email). */
|
|
48
|
+
name: string;
|
|
49
|
+
/** The winning bid, formatted ("$45.00"). */
|
|
50
|
+
amount: string;
|
|
51
|
+
/** The shopper won: the celebration says "You". */
|
|
52
|
+
isYou: boolean;
|
|
53
|
+
}
|
|
54
|
+
/** What stands between the shopper and the bid they asked for (`LiveBidBar01`), in the order the bid gate asks. */
|
|
55
|
+
export type LiveBidStep = 'terms' | 'unpaidWins' | 'variant';
|
|
56
|
+
/**
|
|
57
|
+
* A bid that didn't go, and why (`LiveBidBar01`): the room moved past it or it is over the host's
|
|
58
|
+
* ceiling (the page didn't send it), or it was sent and didn't go through (`notSent`: no one to take
|
|
59
|
+
* it, or the send failed; decided 2026-10-06, Head of Engineering).
|
|
60
|
+
*/
|
|
61
|
+
export interface LiveBidRefusal {
|
|
62
|
+
/** A new number for each refusal, so the same reason twice shows twice. */
|
|
63
|
+
id: number;
|
|
64
|
+
reason: 'outbid' | 'overCap' | 'notSent';
|
|
65
|
+
/** The round's minimum now ("outbid"), the ceiling ("overCap"), or the bid itself ("notSent", not shown). */
|
|
66
|
+
amount: number;
|
|
67
|
+
}
|
|
68
|
+
/** One shopper's add to their cart, as the room announced it (`LiveCartChips01`). */
|
|
69
|
+
export interface LiveCartChip {
|
|
70
|
+
id: string;
|
|
71
|
+
/** The shopper's first name, safe to show the room; none when the room doesn't know it. */
|
|
72
|
+
name?: string | null;
|
|
73
|
+
productTitle: string;
|
|
74
|
+
/** The lot's number ("104"), when the shopper's app sent one. */
|
|
75
|
+
lotNumber?: string | null;
|
|
76
|
+
}
|
|
77
|
+
/** One sale the host closed, as the room announced it (`LiveSoldChips01`). */
|
|
78
|
+
export interface LiveSoldChip {
|
|
79
|
+
id: string;
|
|
80
|
+
/** How many were sold. */
|
|
81
|
+
quantity: number;
|
|
82
|
+
productName: string;
|
|
83
|
+
/** The lot's number ("104"), when the room's announcement carried one. */
|
|
84
|
+
lotNumber?: string | null;
|
|
85
|
+
}
|
|
86
|
+
/** The prize on offer, as the giveaway's sheet shows it (`LiveGiveawayButton01`), from its record and the catalogue. */
|
|
87
|
+
export interface LiveGiveawayPrize {
|
|
88
|
+
/** The prize's name on the giveaway ("Flutter Sleeve Tie-Front Blouse"). */
|
|
89
|
+
productName: string;
|
|
90
|
+
/** The one variant given away ("Navy / XL"), or null. */
|
|
91
|
+
variantTitle: string | null;
|
|
92
|
+
/** What it costs in the store, formatted ("$22.00"), struck through beside FREE. Null: not known yet. */
|
|
93
|
+
retailPrice: string | null;
|
|
94
|
+
/** The variant's photo, else the product's, else the giveaway's own thumbnail. */
|
|
95
|
+
imageUrl: string | null;
|
|
96
|
+
/** The product's description from the catalogue, as plain text. Null until the catalogue answers, or none. */
|
|
97
|
+
description: string | null;
|
|
98
|
+
}
|
|
99
|
+
/** A name tapped in the chat, to reply to (`LiveCommentBox01`). A new `key` for every tap, so tapping the same name twice still puts it in. */
|
|
100
|
+
export interface LiveCommentMention {
|
|
101
|
+
name: string;
|
|
102
|
+
key: number;
|
|
103
|
+
}
|
|
104
|
+
/** One recording in the feed, as the player draws it (`ReplayPlayer01`). */
|
|
105
|
+
export interface ReplayShow {
|
|
106
|
+
id: string;
|
|
107
|
+
/** Shown until the video has its first picture, and while the show slides in. */
|
|
108
|
+
posterUrl?: string | null;
|
|
109
|
+
}
|
|
110
|
+
/** The product on screen, ready to draw (`ReplayNowCard01`): the page formats the price. */
|
|
111
|
+
export interface ReplayNowProduct {
|
|
112
|
+
id: string;
|
|
113
|
+
title: string;
|
|
114
|
+
/** Formatted ("$58.00"). */
|
|
115
|
+
price: string;
|
|
116
|
+
imageUrl?: string | null;
|
|
117
|
+
}
|
|
118
|
+
/** One comment from the show's chat (`ReplayComments01`). */
|
|
119
|
+
export interface ReplayCommentItem {
|
|
120
|
+
id: string;
|
|
121
|
+
/** The name it was said under. */
|
|
122
|
+
author: string;
|
|
123
|
+
text: string;
|
|
124
|
+
/** Said by the host: drawn under the tile's `hostName`. */
|
|
125
|
+
fromHost?: boolean;
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=pageTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageTypes.d.ts","sourceRoot":"","sources":["../src/pageTypes.ts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M,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,6DAA6D;AAC7D,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageTypes.js","sourceRoot":"","sources":["../src/pageTypes.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import { type LivePageOptions, type LiveSellingRoutes, type LiveTrack, type LiveWarning } from '../pageOptions';
|
|
2
3
|
import type { LiveEvent, LiveSellingClient, LiveSellingConfig } from '../types';
|
|
3
4
|
export interface LiveSellingContextType {
|
|
4
5
|
ready: boolean;
|
|
@@ -19,7 +20,28 @@ export interface LiveSellingProviderProps {
|
|
|
19
20
|
* once. Only matters with `hiddenShows` set.
|
|
20
21
|
*/
|
|
21
22
|
viewerEmail?: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Where the live pages send the shopper (0.14.0): the Live and Replay screens' hooks, the bubbles and
|
|
25
|
+
* the session's `onPipRestore` take these rather than naming the app's routes. Unset, each says so
|
|
26
|
+
* through `onWarning` and goes nowhere. Read at the moment each is taken, so an inline object is fine.
|
|
27
|
+
*/
|
|
28
|
+
routes?: LiveSellingRoutes;
|
|
29
|
+
/** The app's analytics `track` (0.14.0): `liveJoin`, and a show's copy of each add that lands. Unset: nothing is sent. */
|
|
30
|
+
track?: LiveTrack;
|
|
31
|
+
/**
|
|
32
|
+
* Where a handled failure goes (0.14.0): a read the page carried on without, an announcement to the
|
|
33
|
+
* room that didn't go, a keep-awake that failed. The app's Sentry, say. Unset: `console.warn`.
|
|
34
|
+
*/
|
|
35
|
+
onWarning?: LiveWarning;
|
|
36
|
+
/** The store's name, in the bidding rules (0.14.0); amore-v2 passed its `APP_NAME`. Unset: the bid bar's own words. */
|
|
37
|
+
shopName?: string;
|
|
22
38
|
}
|
|
23
|
-
export declare function LiveSellingProvider({ children, config, onEvent, viewerEmail }: LiveSellingProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<LiveSellingContextType | undefined>>;
|
|
39
|
+
export declare function LiveSellingProvider({ children, config, onEvent, viewerEmail, routes, track, onWarning, shopName, }: LiveSellingProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<LiveSellingContextType | undefined>>;
|
|
24
40
|
export declare function useLiveSelling(): LiveSellingContextType;
|
|
41
|
+
/**
|
|
42
|
+
* What the live pages need from the app (0.14.0), as `LiveSellingProvider` was given it: `routes`,
|
|
43
|
+
* `track` and `shopName`, with their defaults outside a provider. The routes and `track` keep one
|
|
44
|
+
* identity, so an app's own screen can take the same routes the page hooks do.
|
|
45
|
+
*/
|
|
46
|
+
export declare function useLivePageOptions(): LivePageOptions;
|
|
25
47
|
//# sourceMappingURL=LiveSellingProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveSellingProvider.d.ts","sourceRoot":"","sources":["../../src/react/LiveSellingProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LiveSellingProvider.d.ts","sourceRoot":"","sources":["../../src/react/LiveSellingProvider.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEhF,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,kGAAkG;IAClG,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,iGAAiG;IACjG,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,0HAA0H;IAC1H,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,uHAAuH;IACvH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAOD,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,MAAM,EACN,OAAO,EACP,WAAW,EACX,MAAM,EACN,KAAK,EACL,SAAS,EACT,QAAQ,GACT,EAAE,wBAAwB,+GAgD1B;AAED,wBAAgB,cAAc,IAAI,sBAAsB,CAIvD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,CAEpD"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LiveSellingProvider = LiveSellingProvider;
|
|
4
4
|
exports.useLiveSelling = useLiveSelling;
|
|
5
|
+
exports.useLivePageOptions = useLivePageOptions;
|
|
5
6
|
/**
|
|
6
7
|
* `LiveSellingProvider` — configures the client once and exposes readiness + the client to the tree.
|
|
7
8
|
*
|
|
@@ -14,13 +15,22 @@ exports.useLiveSelling = useLiveSelling;
|
|
|
14
15
|
*
|
|
15
16
|
* `viewerEmail` is who is watching, for the hidden shows (`config.hiddenShows`); `useHiddenShows`
|
|
16
17
|
* (its own file) reads it with the rule for the hooks that hand out shows.
|
|
18
|
+
*
|
|
19
|
+
* `routes`, `track`, `onWarning` and `shopName` (0.14.0) are what the live pages need from the app
|
|
20
|
+
* (`pageOptions.ts`): the page hooks read them through `useLivePageOptions`, and the bubbles too.
|
|
17
21
|
*/
|
|
18
22
|
const react_1 = require("react");
|
|
19
23
|
const liveSelling_1 = require("../liveSelling");
|
|
24
|
+
const pageOptions_1 = require("../pageOptions");
|
|
20
25
|
const LiveSellingContext = (0, react_1.createContext)(undefined);
|
|
21
|
-
|
|
26
|
+
/** The defaults, for a hook rendered without the provider: no routes, no analytics, no store name. */
|
|
27
|
+
const LivePageOptionsContext = (0, react_1.createContext)((0, pageOptions_1.pageOptionsReading)(() => ({})));
|
|
28
|
+
function LiveSellingProvider({ children, config, onEvent, viewerEmail, routes, track, onWarning, shopName, }) {
|
|
22
29
|
const [ready, setReady] = (0, react_1.useState)(false);
|
|
23
30
|
const [error, setError] = (0, react_1.useState)(null);
|
|
31
|
+
// Set as the provider draws rather than in an effect: the screens below run their effects first, and
|
|
32
|
+
// a failure reported there must reach the app's `onWarning`, not the console.
|
|
33
|
+
(0, pageOptions_1.setLiveWarningSink)(onWarning);
|
|
24
34
|
(0, react_1.useEffect)(() => {
|
|
25
35
|
try {
|
|
26
36
|
liveSelling_1.liveSelling.configure(config);
|
|
@@ -42,7 +52,13 @@ function LiveSellingProvider({ children, config, onEvent, viewerEmail }) {
|
|
|
42
52
|
}, [onEvent]);
|
|
43
53
|
const email = (viewerEmail === null || viewerEmail === void 0 ? void 0 : viewerEmail.trim()) || null;
|
|
44
54
|
const value = (0, react_1.useMemo)(() => ({ ready, error, client: liveSelling_1.liveSelling, viewerEmail: email }), [ready, error, email]);
|
|
45
|
-
|
|
55
|
+
// The routes and `track` keep one identity for the provider's life, reading the latest props when
|
|
56
|
+
// taken, so the page hooks' effects don't run again each time the app draws.
|
|
57
|
+
const latestPageProps = (0, react_1.useRef)({ routes, track, shopName });
|
|
58
|
+
latestPageProps.current = { routes, track, shopName };
|
|
59
|
+
const stablePageOptions = (0, react_1.useMemo)(() => (0, pageOptions_1.pageOptionsReading)(() => latestPageProps.current), []);
|
|
60
|
+
const pageOptions = (0, react_1.useMemo)(() => ({ routes: stablePageOptions.routes, track: stablePageOptions.track, shopName: shopName !== null && shopName !== void 0 ? shopName : undefined }), [stablePageOptions, shopName]);
|
|
61
|
+
return (0, react_1.createElement)(LiveSellingContext.Provider, { value }, (0, react_1.createElement)(LivePageOptionsContext.Provider, { value: pageOptions }, children));
|
|
46
62
|
}
|
|
47
63
|
function useLiveSelling() {
|
|
48
64
|
const ctx = (0, react_1.useContext)(LiveSellingContext);
|
|
@@ -50,4 +66,12 @@ function useLiveSelling() {
|
|
|
50
66
|
throw new Error('useLiveSelling must be used within a LiveSellingProvider');
|
|
51
67
|
return ctx;
|
|
52
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* What the live pages need from the app (0.14.0), as `LiveSellingProvider` was given it: `routes`,
|
|
71
|
+
* `track` and `shopName`, with their defaults outside a provider. The routes and `track` keep one
|
|
72
|
+
* identity, so an app's own screen can take the same routes the page hooks do.
|
|
73
|
+
*/
|
|
74
|
+
function useLivePageOptions() {
|
|
75
|
+
return (0, react_1.useContext)(LivePageOptionsContext);
|
|
76
|
+
}
|
|
53
77
|
//# sourceMappingURL=LiveSellingProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveSellingProvider.js","sourceRoot":"","sources":["../../src/react/LiveSellingProvider.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"LiveSellingProvider.js","sourceRoot":"","sources":["../../src/react/LiveSellingProvider.ts"],"names":[],"mappings":";;AAwEA,kDAyDC;AAED,wCAIC;AAOD,gDAEC;AAhJD;;;;;;;;;;;;;;;GAeG;AACH,iCAAuG;AAGvG,gDAA6C;AAC7C,gDAOwB;AAwCxB,MAAM,kBA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Ac;IAC5B,MAAM,GAAG,GAAG,IAAA,kBAAU,EAAC,kBAAkB,CAAC,CAAC;IAC3C,IAAI,CAAC,GAAG;QAAE,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IACtF,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB;IAChC,OAAO,IAAA,kBAAU,EAAC,sBAAsB,CAAC,CAAC;AAC5C,CAAC"}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -29,4 +29,14 @@ export { useAuctionWins, type AuctionWinRow, type UseAuctionWinsOptions, type Us
|
|
|
29
29
|
export { useItemsYouWonPage, useLiveHubPage, useLiveRail } from './showPagesOnDevice';
|
|
30
30
|
export { useItemsYouWonPageFor, useLiveHubPageFor, useLiveRailFor, SHOWS_PAGE_SIZE, type ItemsYouWonPage, type LiveHubPage, type LiveRail, type SessionForShowPages, type UseItemsYouWonPageOptions, type UseLiveHubPageOptions, } from './showPages';
|
|
31
31
|
export { nativeViewTag } from '../nativeViewTag';
|
|
32
|
+
export { useLivePageOptions } from './LiveSellingProvider';
|
|
33
|
+
export { ShopifyLiveSellingProvider, ShopifyLiveSessionProvider, type ShopifyLiveSellingConfig, type ShopifyLiveSellingProviderProps, type ShopifyLiveSessionProviderProps, } from './shopifyProviders';
|
|
34
|
+
export { ReplayPlayerProvider, useReplayPlayer, type ReplayPlayerState } from './replayPlayer';
|
|
35
|
+
export { useKeepScreenAwake } from './useKeepScreenAwake';
|
|
36
|
+
export { useLivePage, type LivePage } from './useLivePage';
|
|
37
|
+
export { useLiveChat, type LiveChat, type LiveChatShow } from './useLiveChat';
|
|
38
|
+
export { useLiveShop, shareProduct, shareAddress, type LiveShop } from './useLiveShop';
|
|
39
|
+
export { useLiveAuction, type LiveAuction, type LiveAuctionScreen } from './useLiveAuction';
|
|
40
|
+
export { useLiveGiveawaysAndPolls, type LiveGiveawaysAndPolls } from './useLiveGiveawaysAndPolls';
|
|
41
|
+
export { useReplayPage, type ReplayPage } from './useReplayPage';
|
|
32
42
|
//# sourceMappingURL=index.d.ts.map
|