@tiledev/sdk-apptile-live-selling 0.13.0 → 0.15.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 +116 -12
- package/dist/clipsPage.d.ts +29 -0
- package/dist/clipsPage.d.ts.map +1 -0
- package/dist/clipsPage.js +49 -0
- package/dist/clipsPage.js.map +1 -0
- 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 +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +53 -2
- package/dist/index.js.map +1 -1
- package/dist/linkLots.d.ts +64 -0
- package/dist/linkLots.d.ts.map +1 -0
- package/dist/linkLots.js +84 -0
- package/dist/linkLots.js.map +1 -0
- package/dist/livePages.d.ts +166 -0
- package/dist/livePages.d.ts.map +1 -0
- package/dist/livePages.js +187 -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 +118 -0
- package/dist/pageOptions.d.ts.map +1 -0
- package/dist/pageOptions.js +99 -0
- package/dist/pageOptions.js.map +1 -0
- package/dist/pageTypes.d.ts +185 -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 +31 -1
- package/dist/react/LiveSellingProvider.d.ts.map +1 -1
- package/dist/react/LiveSellingProvider.js +44 -2
- package/dist/react/LiveSellingProvider.js.map +1 -1
- package/dist/react/index.d.ts +12 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +34 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.web.d.ts +13 -32
- package/dist/react/index.web.d.ts.map +1 -1
- package/dist/react/index.web.js +52 -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 +69 -0
- package/dist/react/shopifyProviders.d.ts.map +1 -0
- package/dist/react/shopifyProviders.js +100 -0
- package/dist/react/shopifyProviders.js.map +1 -0
- package/dist/react/useAccountName.d.ts +8 -0
- package/dist/react/useAccountName.d.ts.map +1 -0
- package/dist/react/useAccountName.js +49 -0
- package/dist/react/useAccountName.js.map +1 -0
- package/dist/react/useClipsPage.d.ts +47 -0
- package/dist/react/useClipsPage.d.ts.map +1 -0
- package/dist/react/useClipsPage.js +130 -0
- package/dist/react/useClipsPage.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 +106 -0
- package/dist/react/useLiveAuction.d.ts.map +1 -0
- package/dist/react/useLiveAuction.js +249 -0
- package/dist/react/useLiveAuction.js.map +1 -0
- package/dist/react/useLiveChat.d.ts +110 -0
- package/dist/react/useLiveChat.d.ts.map +1 -0
- package/dist/react/useLiveChat.js +209 -0
- package/dist/react/useLiveChat.js.map +1 -0
- package/dist/react/useLiveGiveawaysAndPolls.d.ts +95 -0
- package/dist/react/useLiveGiveawaysAndPolls.d.ts.map +1 -0
- package/dist/react/useLiveGiveawaysAndPolls.js +225 -0
- package/dist/react/useLiveGiveawaysAndPolls.js.map +1 -0
- package/dist/react/useLivePage.d.ts +134 -0
- package/dist/react/useLivePage.d.ts.map +1 -0
- package/dist/react/useLivePage.js +304 -0
- package/dist/react/useLivePage.js.map +1 -0
- package/dist/react/useLiveShop.d.ts +103 -0
- package/dist/react/useLiveShop.d.ts.map +1 -0
- package/dist/react/useLiveShop.js +211 -0
- package/dist/react/useLiveShop.js.map +1 -0
- package/dist/react/useReplayPage.d.ts +133 -0
- package/dist/react/useReplayPage.d.ts.map +1 -0
- package/dist/react/useReplayPage.js +565 -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/showNames.d.ts +11 -0
- package/dist/showNames.d.ts.map +1 -1
- package/dist/showNames.js +23 -1
- package/dist/showNames.js.map +1 -1
- 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,118 @@
|
|
|
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`): a bid, a giveaway entry, "Sign in to comment". */
|
|
54
|
+
openSignIn(method: SignInPageMethod, navigation: ScreenNavigation): void;
|
|
55
|
+
/**
|
|
56
|
+
* A link from a show, inside the app (0.15.0; decided 2026-10-19 by amore-v2's Head of Engineering:
|
|
57
|
+
* never the phone's browser): a host's or moderator's link in the chat, or a lot the host added as a web
|
|
58
|
+
* address. amore-v2's: the store's product or collection on its screen, any other page in its `WebPage`
|
|
59
|
+
* route with `title` in the header (`screenForLink`). Taken only for an https address (`opensInApp`),
|
|
60
|
+
* after the show has gone into the bubble. Optional: without it, links are shown as words, with nothing
|
|
61
|
+
* to tap.
|
|
62
|
+
*/
|
|
63
|
+
openLink?(url: string, title: string | null | undefined, navigation: ScreenNavigation): void;
|
|
64
|
+
/**
|
|
65
|
+
* The route names of the pages drawn as sheets over a show (amore-v2's: `VariantSelector` and
|
|
66
|
+
* `SignIn`). Under one the show plays on, with the screen kept on and the light status bar.
|
|
67
|
+
*/
|
|
68
|
+
sheets: readonly string[];
|
|
69
|
+
}
|
|
70
|
+
/** The app's analytics `track`, for `liveJoin` and a show's copy of each add that lands. */
|
|
71
|
+
export type LiveTrack = (name: string, properties: Record<string, unknown>) => void;
|
|
72
|
+
/** A handled failure: a read that failed, an announcement that didn't go. The app's Sentry, say. */
|
|
73
|
+
export type LiveWarning = (error: unknown, context: Record<string, unknown>) => void;
|
|
74
|
+
/** What the page hooks read from `LiveSellingProvider`. */
|
|
75
|
+
export interface LivePageOptions {
|
|
76
|
+
/** Every route, `openLink` included: one the app didn't give says so and goes nowhere. */
|
|
77
|
+
routes: Required<LiveSellingRoutes>;
|
|
78
|
+
track: LiveTrack;
|
|
79
|
+
/** The store's name, in the bidding rules. Unset: the bid bar's own words. */
|
|
80
|
+
shopName: string | undefined;
|
|
81
|
+
/** The app gave `routes.openLink` (0.15.0): a link from a show can be opened, so it is drawn as one. */
|
|
82
|
+
canOpenLinks: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* The names nobody watching may go by (0.15.0), the show's team's: the provider's `blockedNames`, else
|
|
85
|
+
* `DEFAULT_BLOCKED_VIEWER_NAMES` (Host, Moderator). The name asks refuse them as they are typed.
|
|
86
|
+
*/
|
|
87
|
+
blockedNames: readonly string[];
|
|
88
|
+
}
|
|
89
|
+
/** The provider's props the options are made from, any of them unset. */
|
|
90
|
+
export interface LivePageOptionsInput {
|
|
91
|
+
routes?: LiveSellingRoutes | null;
|
|
92
|
+
track?: LiveTrack | null;
|
|
93
|
+
shopName?: string | null;
|
|
94
|
+
blockedNames?: readonly string[] | null;
|
|
95
|
+
}
|
|
96
|
+
/** Without `onWarning`: the console, so a failure is never silent in development. */
|
|
97
|
+
export declare const consoleWarning: LiveWarning;
|
|
98
|
+
/**
|
|
99
|
+
* Where `reportLiveWarning` goes: the provider's `onWarning`, or the console when it has none. Module
|
|
100
|
+
* state rather than context, because the plain functions an app calls outside any screen
|
|
101
|
+
* (`announceAddToLiveRoom`, `reportShowAdd`) report too.
|
|
102
|
+
*/
|
|
103
|
+
export declare function setLiveWarningSink(sink: LiveWarning | null | undefined): void;
|
|
104
|
+
/** Reports a handled failure to the app. Never throws: a report that fails must not fail the screen. */
|
|
105
|
+
export declare function reportLiveWarning(error: unknown, context: Record<string, unknown>): void;
|
|
106
|
+
/**
|
|
107
|
+
* The routes of a provider given none: each says so (`reportLiveWarning`) and goes nowhere, and no
|
|
108
|
+
* page counts as a sheet. A screen still draws; only its buttons that go somewhere do nothing.
|
|
109
|
+
*/
|
|
110
|
+
export declare const NO_ROUTES: Required<LiveSellingRoutes>;
|
|
111
|
+
/**
|
|
112
|
+
* The page options, read from `latest` at the moment each is used, with their defaults: no routes
|
|
113
|
+
* (`NO_ROUTES`), no analytics, no store name, links that can't open, the SDK's blocked names. The
|
|
114
|
+
* routes and `track` keep one identity however often the app hands the provider new ones (an inline
|
|
115
|
+
* object, a hook's function), so a page hook can depend on them without its effects running again.
|
|
116
|
+
*/
|
|
117
|
+
export declare function pageOptionsReading(latest: () => LivePageOptionsInput): LivePageOptions;
|
|
118
|
+
//# 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,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,MAAM,EAAE,MAAM,oBAAoB,GAAG,eAAe,CAmCtF"}
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
const showNames_1 = require("./showNames");
|
|
8
|
+
/** Without `onWarning`: the console, so a failure is never silent in development. */
|
|
9
|
+
const consoleWarning = (error, context) => {
|
|
10
|
+
console.warn(error, context);
|
|
11
|
+
};
|
|
12
|
+
exports.consoleWarning = consoleWarning;
|
|
13
|
+
let warningSink = exports.consoleWarning;
|
|
14
|
+
/**
|
|
15
|
+
* Where `reportLiveWarning` goes: the provider's `onWarning`, or the console when it has none. Module
|
|
16
|
+
* state rather than context, because the plain functions an app calls outside any screen
|
|
17
|
+
* (`announceAddToLiveRoom`, `reportShowAdd`) report too.
|
|
18
|
+
*/
|
|
19
|
+
function setLiveWarningSink(sink) {
|
|
20
|
+
warningSink = sink !== null && sink !== void 0 ? sink : exports.consoleWarning;
|
|
21
|
+
}
|
|
22
|
+
/** Reports a handled failure to the app. Never throws: a report that fails must not fail the screen. */
|
|
23
|
+
function reportLiveWarning(error, context) {
|
|
24
|
+
try {
|
|
25
|
+
warningSink(error, context);
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
// Nothing more to do: the report itself failed.
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function goesNowhere(route) {
|
|
32
|
+
return () => reportLiveWarning(new Error(`LiveSellingProvider has no \`routes\`: ${route} goes nowhere`), { at: `routes.${route}` });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The routes of a provider given none: each says so (`reportLiveWarning`) and goes nowhere, and no
|
|
36
|
+
* page counts as a sheet. A screen still draws; only its buttons that go somewhere do nothing.
|
|
37
|
+
*/
|
|
38
|
+
exports.NO_ROUTES = {
|
|
39
|
+
openLive: goesNowhere('openLive'),
|
|
40
|
+
openReplay: goesNowhere('openReplay'),
|
|
41
|
+
replaceWithReplay: goesNowhere('replaceWithReplay'),
|
|
42
|
+
backToLiveTab: goesNowhere('backToLiveTab'),
|
|
43
|
+
openHome: goesNowhere('openHome'),
|
|
44
|
+
openCart: goesNowhere('openCart'),
|
|
45
|
+
openVariantPage: goesNowhere('openVariantPage'),
|
|
46
|
+
openSignIn: goesNowhere('openSignIn'),
|
|
47
|
+
openLink: goesNowhere('openLink'),
|
|
48
|
+
sheets: [],
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* The page options, read from `latest` at the moment each is used, with their defaults: no routes
|
|
52
|
+
* (`NO_ROUTES`), no analytics, no store name, links that can't open, the SDK's blocked names. The
|
|
53
|
+
* routes and `track` keep one identity however often the app hands the provider new ones (an inline
|
|
54
|
+
* object, a hook's function), so a page hook can depend on them without its effects running again.
|
|
55
|
+
*/
|
|
56
|
+
function pageOptionsReading(latest) {
|
|
57
|
+
const routes = () => { var _a; return (_a = latest().routes) !== null && _a !== void 0 ? _a : exports.NO_ROUTES; };
|
|
58
|
+
return {
|
|
59
|
+
routes: {
|
|
60
|
+
openLive: (streamId) => routes().openLive(streamId),
|
|
61
|
+
openReplay: (feedId) => routes().openReplay(feedId),
|
|
62
|
+
replaceWithReplay: (feedId, navigation) => routes().replaceWithReplay(feedId, navigation),
|
|
63
|
+
backToLiveTab: (navigation) => routes().backToLiveTab(navigation),
|
|
64
|
+
openHome: (navigation) => routes().openHome(navigation),
|
|
65
|
+
openCart: (options, navigation) => routes().openCart(options, navigation),
|
|
66
|
+
openVariantPage: (params, navigation) => routes().openVariantPage(params, navigation),
|
|
67
|
+
openSignIn: (method, navigation) => routes().openSignIn(method, navigation),
|
|
68
|
+
openLink: (url, title, navigation) => {
|
|
69
|
+
const openLink = routes().openLink;
|
|
70
|
+
if (openLink)
|
|
71
|
+
openLink(url, title, navigation);
|
|
72
|
+
else
|
|
73
|
+
exports.NO_ROUTES.openLink(url, title, navigation);
|
|
74
|
+
},
|
|
75
|
+
get sheets() {
|
|
76
|
+
var _a;
|
|
77
|
+
return (_a = routes().sheets) !== null && _a !== void 0 ? _a : [];
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
track: (name, properties) => {
|
|
81
|
+
const track = latest().track;
|
|
82
|
+
if (track)
|
|
83
|
+
track(name, properties);
|
|
84
|
+
},
|
|
85
|
+
get shopName() {
|
|
86
|
+
var _a;
|
|
87
|
+
return (_a = latest().shopName) !== null && _a !== void 0 ? _a : undefined;
|
|
88
|
+
},
|
|
89
|
+
get canOpenLinks() {
|
|
90
|
+
var _a;
|
|
91
|
+
return !!((_a = latest().routes) === null || _a === void 0 ? void 0 : _a.openLink);
|
|
92
|
+
},
|
|
93
|
+
get blockedNames() {
|
|
94
|
+
var _a;
|
|
95
|
+
return (_a = latest().blockedNames) !== null && _a !== void 0 ? _a : showNames_1.DEFAULT_BLOCKED_VIEWER_NAMES;
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=pageOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageOptions.js","sourceRoot":"","sources":["../src/pageOptions.ts"],"names":[],"mappings":";;;AAmHA,gDAEC;AAGD,8CAMC;AA8BD,gDAmCC;AAjLD,2CAA2D;AAyF3D,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,aAA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CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,QAAQ;;YACV,OAAO,MAAA,MAAM,EAAE,CAAC,QAAQ,mCAAI,SAAS,CAAC;QACxC,CAAC;QACD,IAAI,YAAY;;YACd,OAAO,CAAC,CAAC,CAAA,MAAA,MAAM,EAAE,CAAC,MAAM,0CAAE,QAAQ,CAAA,CAAC;QACrC,CAAC;QACD,IAAI,YAAY;;YACd,OAAO,MAAA,MAAM,EAAE,CAAC,YAAY,mCAAI,wCAA4B,CAAC;QAC/D,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,185 @@
|
|
|
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
|
+
* A link the host featured (0.15.0; a lot that is a web address, not a product of the store): the
|
|
23
|
+
* card opens its page rather than selling it, on any show (a link is opened, never bought or bid on).
|
|
24
|
+
*/
|
|
25
|
+
isLink?: boolean;
|
|
26
|
+
/** False: a link the app can't open, so the card is words, not a button. Default: a button. */
|
|
27
|
+
canOpen?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A link the host added to the show, ready to draw in the Shop sheet (0.15.0; `LiveShopButton01`): a lot
|
|
31
|
+
* that is a web address, not a product of the store, mostly an affiliate link. It is opened, never
|
|
32
|
+
* bought: its card has no Add to Cart and no star. The page formats the price.
|
|
33
|
+
*/
|
|
34
|
+
export interface LiveShopLink {
|
|
35
|
+
/** Says this item is a link, not a product. */
|
|
36
|
+
kind: 'link';
|
|
37
|
+
/** The lot's key on the show (its address when the host gave it no id). */
|
|
38
|
+
id: string;
|
|
39
|
+
title: string;
|
|
40
|
+
/** Formatted ("$45.00"); empty: none shown. */
|
|
41
|
+
price: string;
|
|
42
|
+
imageUrl?: string | null;
|
|
43
|
+
/** The page a tap opens; none when the app can't open it (not https), and the card is then words, not a button. */
|
|
44
|
+
url?: string | null;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Where the featured lot stands in its auction, ready to draw (`LiveProductCard01`; the page formats
|
|
48
|
+
* the money): bidding on it is open now, it has been won, or the host hasn't opened it yet.
|
|
49
|
+
*/
|
|
50
|
+
export interface LiveAuctionRound {
|
|
51
|
+
state: 'open' | 'closed' | 'upcoming';
|
|
52
|
+
/** The highest bid so far, formatted ("$45.00"). None before the first bid. */
|
|
53
|
+
highestBid: string | null;
|
|
54
|
+
/** Who holds it, as the room shows them (never an email). None before the first bid. */
|
|
55
|
+
leaderName: string | null;
|
|
56
|
+
/** The shopper holds it. */
|
|
57
|
+
leaderIsYou: boolean;
|
|
58
|
+
}
|
|
59
|
+
/** One lot on an auction show, ready to draw (`LiveShopButton01`): where bidding opens (formatted) and where it stands. */
|
|
60
|
+
export interface LiveAuctionLot {
|
|
61
|
+
product: Product;
|
|
62
|
+
/** The host's opening bid ("$20.00"); none on a lot the host hasn't priced. */
|
|
63
|
+
startingBid: string | null;
|
|
64
|
+
/** Bidding on it is open now, it has been won, or the host hasn't opened it yet. */
|
|
65
|
+
state: 'open' | 'closed' | 'upcoming';
|
|
66
|
+
}
|
|
67
|
+
/** A round's winner, ready to draw (`LiveAuctionWin01`): the page formats the money and knows whether it is the shopper. */
|
|
68
|
+
export interface LiveAuctionWinner {
|
|
69
|
+
/** Tells one win from the next: a new key plays the celebration again. */
|
|
70
|
+
key: string;
|
|
71
|
+
/** The winner's name as the room shows it (never an email). */
|
|
72
|
+
name: string;
|
|
73
|
+
/** The winning bid, formatted ("$45.00"). */
|
|
74
|
+
amount: string;
|
|
75
|
+
/** The shopper won: the celebration says "You". */
|
|
76
|
+
isYou: boolean;
|
|
77
|
+
}
|
|
78
|
+
/** What stands between the shopper and the bid they asked for (`LiveBidBar01`), in the order the bid gate asks. */
|
|
79
|
+
export type LiveBidStep = 'terms' | 'unpaidWins' | 'variant';
|
|
80
|
+
/**
|
|
81
|
+
* A bid that didn't go, and why (`LiveBidBar01`): the room moved past it or it is over the host's
|
|
82
|
+
* ceiling (the page didn't send it), or it was sent and didn't go through (`notSent`: no one to take
|
|
83
|
+
* it, or the send failed; decided 2026-10-06, Head of Engineering).
|
|
84
|
+
*/
|
|
85
|
+
export interface LiveBidRefusal {
|
|
86
|
+
/** A new number for each refusal, so the same reason twice shows twice. */
|
|
87
|
+
id: number;
|
|
88
|
+
reason: 'outbid' | 'overCap' | 'notSent';
|
|
89
|
+
/** The round's minimum now ("outbid"), the ceiling ("overCap"), or the bid itself ("notSent", not shown). */
|
|
90
|
+
amount: number;
|
|
91
|
+
}
|
|
92
|
+
/** One shopper's add to their cart, as the room announced it (`LiveCartChips01`). */
|
|
93
|
+
export interface LiveCartChip {
|
|
94
|
+
id: string;
|
|
95
|
+
/** The shopper's first name, safe to show the room; none when the room doesn't know it. */
|
|
96
|
+
name?: string | null;
|
|
97
|
+
productTitle: string;
|
|
98
|
+
/** The lot's number ("104"), when the shopper's app sent one. */
|
|
99
|
+
lotNumber?: string | null;
|
|
100
|
+
}
|
|
101
|
+
/** One sale the host closed, as the room announced it (`LiveSoldChips01`). */
|
|
102
|
+
export interface LiveSoldChip {
|
|
103
|
+
id: string;
|
|
104
|
+
/** How many were sold. */
|
|
105
|
+
quantity: number;
|
|
106
|
+
productName: string;
|
|
107
|
+
/** The lot's number ("104"), when the room's announcement carried one. */
|
|
108
|
+
lotNumber?: string | null;
|
|
109
|
+
}
|
|
110
|
+
/** The prize on offer, as the giveaway's sheet shows it (`LiveGiveawayButton01`), from its record and the catalogue. */
|
|
111
|
+
export interface LiveGiveawayPrize {
|
|
112
|
+
/** The prize's name on the giveaway ("Flutter Sleeve Tie-Front Blouse"). */
|
|
113
|
+
productName: string;
|
|
114
|
+
/** The one variant given away ("Navy / XL"), or null. */
|
|
115
|
+
variantTitle: string | null;
|
|
116
|
+
/** What it costs in the store, formatted ("$22.00"), struck through beside FREE. Null: not known yet. */
|
|
117
|
+
retailPrice: string | null;
|
|
118
|
+
/** The variant's photo, else the product's, else the giveaway's own thumbnail. */
|
|
119
|
+
imageUrl: string | null;
|
|
120
|
+
/** The product's description from the catalogue, as plain text. Null until the catalogue answers, or none. */
|
|
121
|
+
description: string | null;
|
|
122
|
+
}
|
|
123
|
+
/** 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. */
|
|
124
|
+
export interface LiveCommentMention {
|
|
125
|
+
name: string;
|
|
126
|
+
key: number;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* A signed-in shopper's name on their account (0.15.0), as the comment box's "Commenting As:" starts
|
|
130
|
+
* from it (`LiveCommentBox01`'s `accountName`): each part trimmed, possibly empty.
|
|
131
|
+
*/
|
|
132
|
+
export interface NameOnAccount {
|
|
133
|
+
firstName?: string | null;
|
|
134
|
+
lastName?: string | null;
|
|
135
|
+
}
|
|
136
|
+
/** The same, as the giveaway's "Entering As:" starts from it (`LiveGiveawayButton01`'s `accountName`). */
|
|
137
|
+
export type GiveawayNameOnAccount = NameOnAccount;
|
|
138
|
+
/** One recording in the feed, as the player draws it (`ReplayPlayer01`). */
|
|
139
|
+
export interface ReplayShow {
|
|
140
|
+
id: string;
|
|
141
|
+
/** Shown until the video has its first picture, and while the show slides in. */
|
|
142
|
+
posterUrl?: string | null;
|
|
143
|
+
}
|
|
144
|
+
/** The product on screen, ready to draw (`ReplayNowCard01`): the page formats the price. */
|
|
145
|
+
export interface ReplayNowProduct {
|
|
146
|
+
id: string;
|
|
147
|
+
title: string;
|
|
148
|
+
/** Formatted ("$58.00"). */
|
|
149
|
+
price: string;
|
|
150
|
+
imageUrl?: string | null;
|
|
151
|
+
/** A link the host added (0.15.0): the card opens its page rather than selling it. */
|
|
152
|
+
isLink?: boolean;
|
|
153
|
+
/** False: a link the app can't open, so the card is words, not a button. Default: a button. */
|
|
154
|
+
canOpen?: boolean;
|
|
155
|
+
}
|
|
156
|
+
/** A link the host added, in the Replay screen's shop (0.15.0; `ReplayShopBar01`): `LiveShopLink`'s shape. */
|
|
157
|
+
export type ReplayShopLink = LiveShopLink;
|
|
158
|
+
/** One comment from the show's chat (`ReplayComments01`). */
|
|
159
|
+
export interface ReplayCommentItem {
|
|
160
|
+
id: string;
|
|
161
|
+
/** The name it was said under. */
|
|
162
|
+
author: string;
|
|
163
|
+
text: string;
|
|
164
|
+
/** Said by the host: drawn under the tile's `hostName`. */
|
|
165
|
+
fromHost?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/** One clip of the reel, ready to draw (0.15.0; `ClipReel01`): the page formats the price. */
|
|
168
|
+
export interface ClipReelItem {
|
|
169
|
+
id: string;
|
|
170
|
+
/** The recording the clip plays from (an HLS playlist on native). */
|
|
171
|
+
videoUrl: string;
|
|
172
|
+
/** Shown until the video draws its first frame, and on web, where HLS doesn't play. */
|
|
173
|
+
posterUrl?: string | null;
|
|
174
|
+
/** A clip is often a cut from a longer recording: it starts here and loops back here at `endMs`. Neither set: the whole video, looped. */
|
|
175
|
+
startMs?: number | null;
|
|
176
|
+
/** None: the cut runs to the end of the recording. */
|
|
177
|
+
endMs?: number | null;
|
|
178
|
+
/** The product the clip sells. None: no product bar and no share button. */
|
|
179
|
+
product?: {
|
|
180
|
+
title: string;
|
|
181
|
+
price: string;
|
|
182
|
+
imageUrl?: string | null;
|
|
183
|
+
} | null;
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=pageTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageTypes.d.ts","sourceRoot":"","sources":["../src/pageTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAIpD,0GAA0G;AAC1G,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,+EAA+E;IAC/E,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+FAA+F;IAC/F,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mHAAmH;IACnH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,GAAG,QAAQ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C;AAE1C,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;AAID,8FAA8F;AAC9F,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,uFAAuF;IACvF,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,0IAA0I;IAC1I,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,4EAA4E;IAC5E,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;CAC7E"}
|
|
@@ -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,36 @@ 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;
|
|
38
|
+
/**
|
|
39
|
+
* The names nobody watching may go by, the show's team's (0.15.0): the name asks refuse them as they
|
|
40
|
+
* are typed, an account named as one is asked for another, and `ShopifyLiveSessionProvider` hands them
|
|
41
|
+
* to the session, which never shows one. amore-v2's PM sets them in its Live Layer (Settings › Live
|
|
42
|
+
* Room); `blockedNamesFrom` reads such a list. Unset: `DEFAULT_BLOCKED_VIEWER_NAMES` (Host, Moderator).
|
|
43
|
+
*/
|
|
44
|
+
blockedNames?: readonly string[];
|
|
22
45
|
}
|
|
23
|
-
export declare function LiveSellingProvider({ children, config, onEvent, viewerEmail }: LiveSellingProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<LiveSellingContextType | undefined>>;
|
|
46
|
+
export declare function LiveSellingProvider({ children, config, onEvent, viewerEmail, routes, track, onWarning, shopName, blockedNames, }: LiveSellingProviderProps): import("react").FunctionComponentElement<import("react").ProviderProps<LiveSellingContextType | undefined>>;
|
|
24
47
|
export declare function useLiveSelling(): LiveSellingContextType;
|
|
48
|
+
/**
|
|
49
|
+
* What the live pages need from the app (0.14.0), as `LiveSellingProvider` was given it: `routes`,
|
|
50
|
+
* `track`, `shopName`, and since 0.15.0 `canOpenLinks` and `blockedNames`, with their defaults outside a
|
|
51
|
+
* provider. The routes and `track` keep one identity, so an app's own screen can take the same routes
|
|
52
|
+
* the page hooks do.
|
|
53
|
+
*/
|
|
54
|
+
export declare function useLivePageOptions(): LivePageOptions;
|
|
25
55
|
//# 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":"AAkBA,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;IAClB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAUD,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,MAAM,EACN,OAAO,EACP,WAAW,EACX,MAAM,EACN,KAAK,EACL,SAAS,EACT,QAAQ,EACR,YAAY,GACb,EAAE,wBAAwB,+GA8D1B;AAED,wBAAgB,cAAc,IAAI,sBAAsB,CAIvD;AAED;;;;;GAKG;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,24 @@ 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), and `blockedNames` (0.15.0), are what the live
|
|
20
|
+
* pages need from the app (`pageOptions.ts`): the page hooks read them through `useLivePageOptions`, and
|
|
21
|
+
* the bubbles too.
|
|
17
22
|
*/
|
|
18
23
|
const react_1 = require("react");
|
|
19
24
|
const liveSelling_1 = require("../liveSelling");
|
|
25
|
+
const pageOptions_1 = require("../pageOptions");
|
|
20
26
|
const LiveSellingContext = (0, react_1.createContext)(undefined);
|
|
21
|
-
|
|
27
|
+
const sameNames = (first, second) => first === second || (first.length === second.length && first.every((name, at) => name === second[at]));
|
|
28
|
+
/** The defaults, for a hook rendered without the provider: no routes, no analytics, no store name. */
|
|
29
|
+
const LivePageOptionsContext = (0, react_1.createContext)((0, pageOptions_1.pageOptionsReading)(() => ({})));
|
|
30
|
+
function LiveSellingProvider({ children, config, onEvent, viewerEmail, routes, track, onWarning, shopName, blockedNames, }) {
|
|
22
31
|
const [ready, setReady] = (0, react_1.useState)(false);
|
|
23
32
|
const [error, setError] = (0, react_1.useState)(null);
|
|
33
|
+
// Set as the provider draws rather than in an effect: the screens below run their effects first, and
|
|
34
|
+
// a failure reported there must reach the app's `onWarning`, not the console.
|
|
35
|
+
(0, pageOptions_1.setLiveWarningSink)(onWarning);
|
|
24
36
|
(0, react_1.useEffect)(() => {
|
|
25
37
|
try {
|
|
26
38
|
liveSelling_1.liveSelling.configure(config);
|
|
@@ -42,7 +54,28 @@ function LiveSellingProvider({ children, config, onEvent, viewerEmail }) {
|
|
|
42
54
|
}, [onEvent]);
|
|
43
55
|
const email = (viewerEmail === null || viewerEmail === void 0 ? void 0 : viewerEmail.trim()) || null;
|
|
44
56
|
const value = (0, react_1.useMemo)(() => ({ ready, error, client: liveSelling_1.liveSelling, viewerEmail: email }), [ready, error, email]);
|
|
45
|
-
|
|
57
|
+
// The routes and `track` keep one identity for the provider's life, reading the latest props when
|
|
58
|
+
// taken, so the page hooks' effects don't run again each time the app draws.
|
|
59
|
+
const latestPageProps = (0, react_1.useRef)({ routes, track, shopName, blockedNames });
|
|
60
|
+
latestPageProps.current = { routes, track, shopName, blockedNames };
|
|
61
|
+
const stablePageOptions = (0, react_1.useMemo)(() => (0, pageOptions_1.pageOptionsReading)(() => latestPageProps.current), []);
|
|
62
|
+
// What the hooks draw from (not only call) changes the value, so they draw again.
|
|
63
|
+
const canOpenLinks = !!(routes === null || routes === void 0 ? void 0 : routes.openLink);
|
|
64
|
+
// The same list keeps the same array, so a list the app builds each draw (`blockedNamesFrom`) doesn't
|
|
65
|
+
// change the value each draw.
|
|
66
|
+
const blockedNamesNow = (0, react_1.useRef)(stablePageOptions.blockedNames);
|
|
67
|
+
const latestBlockedNames = stablePageOptions.blockedNames;
|
|
68
|
+
if (!sameNames(blockedNamesNow.current, latestBlockedNames))
|
|
69
|
+
blockedNamesNow.current = latestBlockedNames;
|
|
70
|
+
const pageBlockedNames = blockedNamesNow.current;
|
|
71
|
+
const pageOptions = (0, react_1.useMemo)(() => ({
|
|
72
|
+
routes: stablePageOptions.routes,
|
|
73
|
+
track: stablePageOptions.track,
|
|
74
|
+
shopName: shopName !== null && shopName !== void 0 ? shopName : undefined,
|
|
75
|
+
canOpenLinks,
|
|
76
|
+
blockedNames: pageBlockedNames,
|
|
77
|
+
}), [stablePageOptions, shopName, canOpenLinks, pageBlockedNames]);
|
|
78
|
+
return (0, react_1.createElement)(LiveSellingContext.Provider, { value }, (0, react_1.createElement)(LivePageOptionsContext.Provider, { value: pageOptions }, children));
|
|
46
79
|
}
|
|
47
80
|
function useLiveSelling() {
|
|
48
81
|
const ctx = (0, react_1.useContext)(LiveSellingContext);
|
|
@@ -50,4 +83,13 @@ function useLiveSelling() {
|
|
|
50
83
|
throw new Error('useLiveSelling must be used within a LiveSellingProvider');
|
|
51
84
|
return ctx;
|
|
52
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* What the live pages need from the app (0.14.0), as `LiveSellingProvider` was given it: `routes`,
|
|
88
|
+
* `track`, `shopName`, and since 0.15.0 `canOpenLinks` and `blockedNames`, with their defaults outside a
|
|
89
|
+
* provider. The routes and `track` keep one identity, so an app's own screen can take the same routes
|
|
90
|
+
* the page hooks do.
|
|
91
|
+
*/
|
|
92
|
+
function useLivePageOptions() {
|
|
93
|
+
return (0, react_1.useContext)(LivePageOptionsContext);
|
|
94
|
+
}
|
|
53
95
|
//# 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":";;AAmFA,kDAwEC;AAED,wCAIC;AAQD,gDAEC;AA3KD;;;;;;;;;;;;;;;;GAgBG;AACH,iCAAuG;AAGvG,gDAA6C;AAC7C,gDAOwB;AA+CxB,MAAM,kBAAkB,GAAG,IAAA,qBAAa,EAAqC,SAAS,CAAC,CAAC;AAExF,MAAM,SAAS,GAAG,CAAC,KAAwB,EAAE,MAAyB,EAAE,EAAE,CACxE,KAAK,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEzG,sGAAsG;AACtG,MAAM,sBAAsB,GAAG,IAAA,qBAAa,EAAkB,IAAA,gCAAkB,EAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAE9F,SAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,MAAM,EACN,OAAO,EACP,WAAW,EACX,MAAM,EACN,KAAK,EACL,SAAS,EACT,QAAQ,EACR,YAAY,GACa;IACzB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAgB,IAAI,CAAC,CAAC;IAExD,qGAAqG;IACrG,8EAA8E;IAC9E,IAAA,gCAAkB,EAAC,SAAS,CAAC,CAAC;IAE9B,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC;YACH,yBAAW,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAC9B,QAAQ,CAAC,IAAI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AC;AACb,CAAC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB;IAChC,OAAO,IAAA,kBAAU,EAAC,sBAAsB,CAAC,CAAC;AAC5C,CAAC"}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -29,4 +29,16 @@ 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, type LiveShopScreen } 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';
|
|
42
|
+
export { useAccountName, type AccountName } from './useAccountName';
|
|
43
|
+
export { useClipsPage, type ClipsPage } from './useClipsPage';
|
|
32
44
|
//# sourceMappingURL=index.d.ts.map
|
|
@@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