@tiledev/sdk-apptile-live-selling 0.14.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -11
- 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/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -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 +91 -4
- package/dist/livePages.d.ts.map +1 -1
- package/dist/livePages.js +101 -4
- package/dist/livePages.js.map +1 -1
- package/dist/pageOptions.d.ts +24 -6
- package/dist/pageOptions.d.ts.map +1 -1
- package/dist/pageOptions.js +20 -3
- package/dist/pageOptions.js.map +1 -1
- package/dist/pageTypes.d.ts +58 -0
- package/dist/pageTypes.d.ts.map +1 -1
- package/dist/react/LiveSellingProvider.d.ts +11 -3
- package/dist/react/LiveSellingProvider.d.ts.map +1 -1
- package/dist/react/LiveSellingProvider.js +26 -8
- package/dist/react/LiveSellingProvider.js.map +1 -1
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +6 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.web.d.ts +3 -1
- package/dist/react/index.web.d.ts.map +1 -1
- package/dist/react/index.web.js +7 -1
- package/dist/react/index.web.js.map +1 -1
- package/dist/react/shopifyProviders.d.ts +4 -3
- package/dist/react/shopifyProviders.d.ts.map +1 -1
- package/dist/react/shopifyProviders.js +6 -4
- package/dist/react/shopifyProviders.js.map +1 -1
- 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/useLiveAuction.d.ts +5 -3
- package/dist/react/useLiveAuction.d.ts.map +1 -1
- package/dist/react/useLiveAuction.js +10 -5
- package/dist/react/useLiveAuction.js.map +1 -1
- package/dist/react/useLiveChat.d.ts +42 -7
- package/dist/react/useLiveChat.d.ts.map +1 -1
- package/dist/react/useLiveChat.js +90 -12
- package/dist/react/useLiveChat.js.map +1 -1
- package/dist/react/useLiveGiveawaysAndPolls.d.ts +14 -3
- package/dist/react/useLiveGiveawaysAndPolls.d.ts.map +1 -1
- package/dist/react/useLiveGiveawaysAndPolls.js +56 -11
- package/dist/react/useLiveGiveawaysAndPolls.js.map +1 -1
- package/dist/react/useLivePage.d.ts +22 -1
- package/dist/react/useLivePage.d.ts.map +1 -1
- package/dist/react/useLivePage.js +51 -11
- package/dist/react/useLivePage.js.map +1 -1
- package/dist/react/useLiveShop.d.ts +25 -5
- package/dist/react/useLiveShop.d.ts.map +1 -1
- package/dist/react/useLiveShop.js +65 -19
- package/dist/react/useLiveShop.js.map +1 -1
- package/dist/react/useReplayPage.d.ts +20 -4
- package/dist/react/useReplayPage.d.ts.map +1 -1
- package/dist/react/useReplayPage.js +94 -33
- package/dist/react/useReplayPage.js.map +1 -1
- 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/package.json +1 -10
|
@@ -16,16 +16,18 @@ exports.useLivePageOptions = useLivePageOptions;
|
|
|
16
16
|
* `viewerEmail` is who is watching, for the hidden shows (`config.hiddenShows`); `useHiddenShows`
|
|
17
17
|
* (its own file) reads it with the rule for the hooks that hand out shows.
|
|
18
18
|
*
|
|
19
|
-
* `routes`, `track`, `onWarning` and `shopName` (0.14.0) are what the live
|
|
20
|
-
* (`pageOptions.ts`): the page hooks read them through `useLivePageOptions`, and
|
|
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.
|
|
21
22
|
*/
|
|
22
23
|
const react_1 = require("react");
|
|
23
24
|
const liveSelling_1 = require("../liveSelling");
|
|
24
25
|
const pageOptions_1 = require("../pageOptions");
|
|
25
26
|
const LiveSellingContext = (0, react_1.createContext)(undefined);
|
|
27
|
+
const sameNames = (first, second) => first === second || (first.length === second.length && first.every((name, at) => name === second[at]));
|
|
26
28
|
/** The defaults, for a hook rendered without the provider: no routes, no analytics, no store name. */
|
|
27
29
|
const LivePageOptionsContext = (0, react_1.createContext)((0, pageOptions_1.pageOptionsReading)(() => ({})));
|
|
28
|
-
function LiveSellingProvider({ children, config, onEvent, viewerEmail, routes, track, onWarning, shopName, }) {
|
|
30
|
+
function LiveSellingProvider({ children, config, onEvent, viewerEmail, routes, track, onWarning, shopName, blockedNames, }) {
|
|
29
31
|
const [ready, setReady] = (0, react_1.useState)(false);
|
|
30
32
|
const [error, setError] = (0, react_1.useState)(null);
|
|
31
33
|
// Set as the provider draws rather than in an effect: the screens below run their effects first, and
|
|
@@ -54,10 +56,25 @@ function LiveSellingProvider({ children, config, onEvent, viewerEmail, routes, t
|
|
|
54
56
|
const value = (0, react_1.useMemo)(() => ({ ready, error, client: liveSelling_1.liveSelling, viewerEmail: email }), [ready, error, email]);
|
|
55
57
|
// The routes and `track` keep one identity for the provider's life, reading the latest props when
|
|
56
58
|
// 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 latestPageProps = (0, react_1.useRef)({ routes, track, shopName, blockedNames });
|
|
60
|
+
latestPageProps.current = { routes, track, shopName, blockedNames };
|
|
59
61
|
const stablePageOptions = (0, react_1.useMemo)(() => (0, pageOptions_1.pageOptionsReading)(() => latestPageProps.current), []);
|
|
60
|
-
|
|
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]);
|
|
61
78
|
return (0, react_1.createElement)(LiveSellingContext.Provider, { value }, (0, react_1.createElement)(LivePageOptionsContext.Provider, { value: pageOptions }, children));
|
|
62
79
|
}
|
|
63
80
|
function useLiveSelling() {
|
|
@@ -68,8 +85,9 @@ function useLiveSelling() {
|
|
|
68
85
|
}
|
|
69
86
|
/**
|
|
70
87
|
* What the live pages need from the app (0.14.0), as `LiveSellingProvider` was given it: `routes`,
|
|
71
|
-
* `track` and `
|
|
72
|
-
* identity, so an app's own screen can take the same 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.
|
|
73
91
|
*/
|
|
74
92
|
function useLivePageOptions() {
|
|
75
93
|
return (0, react_1.useContext)(LivePageOptionsContext);
|
|
@@ -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,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AAG,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;;;;;GAKG;AACH,SAAgB,kBAAkB;IAChC,OAAO,IAAA,kBAAU,EAAC,sBAAsB,CAAC,CAAC;AAC5C,CAAC"}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -35,8 +35,10 @@ export { ReplayPlayerProvider, useReplayPlayer, type ReplayPlayerState } from '.
|
|
|
35
35
|
export { useKeepScreenAwake } from './useKeepScreenAwake';
|
|
36
36
|
export { useLivePage, type LivePage } from './useLivePage';
|
|
37
37
|
export { useLiveChat, type LiveChat, type LiveChatShow } from './useLiveChat';
|
|
38
|
-
export { useLiveShop, shareProduct, shareAddress, type LiveShop } from './useLiveShop';
|
|
38
|
+
export { useLiveShop, shareProduct, shareAddress, type LiveShop, type LiveShopScreen } from './useLiveShop';
|
|
39
39
|
export { useLiveAuction, type LiveAuction, type LiveAuctionScreen } from './useLiveAuction';
|
|
40
40
|
export { useLiveGiveawaysAndPolls, type LiveGiveawaysAndPolls } from './useLiveGiveawaysAndPolls';
|
|
41
41
|
export { useReplayPage, type ReplayPage } from './useReplayPage';
|
|
42
|
+
export { useAccountName, type AccountName } from './useAccountName';
|
|
43
|
+
export { useClipsPage, type ClipsPage } from './useClipsPage';
|
|
42
44
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO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BAAkB,CAAC;AAKjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,GACrC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAC5G,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,KAAK,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAClG,OAAO,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/react/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useLiveAuction = exports.shareAddress = exports.shareProduct = exports.useLiveShop = exports.useLiveChat = exports.useLivePage = exports.useKeepScreenAwake = exports.useReplayPlayer = exports.ReplayPlayerProvider = exports.ShopifyLiveSessionProvider = exports.ShopifyLiveSellingProvider = exports.useLivePageOptions = exports.nativeViewTag = exports.SHOWS_PAGE_SIZE = exports.useLiveRailFor = exports.useLiveHubPageFor = exports.useItemsYouWonPageFor = exports.useLiveRail = exports.useLiveHubPage = exports.useItemsYouWonPage = exports.useAuctionWins = exports.useSilentAuctionRounds = exports.useMySilentAuctionBids = exports.useSilentAuctionLot = exports.useSilentAuctionLots = exports.useCommentLinkCards = exports.useGiveawayPrize = exports.useGiveawayEntry = exports.SHEET_HANDOFF_MS = exports.useAuctionBidGate = exports.isNativeVideoSupported = exports.NativeVideoView = exports.LiveVideoTarget = exports.refreshStreamRecordsIfStale = exports.refreshStreamRecords = exports.useStreamInfo = exports.useShowClock = exports.useAuctionCountdown = exports.useLiveShow = exports.useLiveSession = exports.LiveSessionProvider = exports.useClips = exports.useReplays = exports.useAuction = exports.useLiveStreams = exports.refreshOngoingLive = exports.useOngoingLive = exports.useHiddenShows = exports.useLiveSelling = exports.LiveSellingProvider = void 0;
|
|
4
|
-
exports.useReplayPage = exports.useLiveGiveawaysAndPolls = void 0;
|
|
4
|
+
exports.useClipsPage = exports.useAccountName = exports.useReplayPage = exports.useLiveGiveawaysAndPolls = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* React helpers for `@tiledev/sdk-apptile-live-selling` — the provider and the read hooks.
|
|
7
7
|
*
|
|
@@ -104,4 +104,9 @@ var useLiveGiveawaysAndPolls_1 = require("./useLiveGiveawaysAndPolls");
|
|
|
104
104
|
Object.defineProperty(exports, "useLiveGiveawaysAndPolls", { enumerable: true, get: function () { return useLiveGiveawaysAndPolls_1.useLiveGiveawaysAndPolls; } });
|
|
105
105
|
var useReplayPage_1 = require("./useReplayPage");
|
|
106
106
|
Object.defineProperty(exports, "useReplayPage", { enumerable: true, get: function () { return useReplayPage_1.useReplayPage; } });
|
|
107
|
+
// 0.15.0: the name on the shopper's account, for the name asks; the Clips page.
|
|
108
|
+
var useAccountName_1 = require("./useAccountName");
|
|
109
|
+
Object.defineProperty(exports, "useAccountName", { enumerable: true, get: function () { return useAccountName_1.useAccountName; } });
|
|
110
|
+
var useClipsPage_1 = require("./useClipsPage");
|
|
111
|
+
Object.defineProperty(exports, "useClipsPage", { enumerable: true, get: function () { return useClipsPage_1.useClipsPage; } });
|
|
107
112
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":";;;;AAAA;;;;;GAKG;AACH,6DAK+B;AAJ7B,0HAAA,mBAAmB,OAAA;AACnB,qHAAA,cAAc,OAAA;AAIhB,mDAA6E;AAApE,gHAAA,cAAc,OAAA;AACvB,mDAA4E;AAAnE,gHAAA,cAAc,OAAA;AACvB,wDAAyD;AAAhD,sHAAA,kBAAkB,OAAA;AAC3B,mDAA4E;AAAnE,gHAAA,cAAc,OAAA;AACvB,2CAAgE;AAAvD,wGAAA,UAAU,OAAA;AACnB,2CAAwF;AAA/E,wGAAA,UAAU,OAAA;AACnB,uCAA0D;AAAjD,oGAAA,QAAQ,OAAA;AAEjB,4FAA4F;AAC5F,mDAI0B;AAHxB,qHAAA,mBAAmB,OAAA;AACnB,gHAAA,cAAc,OAAA;AAGhB,yEAAyE;AACzE,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,oGAAoG;AACpG,mCAA6D;AAApD,6GAAA,mBAAmB,OAAA;AAAE,sGAAA,YAAY,OAAA;AAC1C,iDAKyB;AAJvB,8GAAA,aAAa,OAAA;AACb,qHAAA,oBAAoB,OAAA;AACpB,4HAAA,2BAA2B,OAAA;AAG7B,qDAK2B;AAJzB,kHAAA,eAAe,OAAA;AACf,kHAAA,eAAe,OAAA;AACf,yHAAA,sBAAsB,OAAA;AAGxB,yDAO6B;AAN3B,sHAAA,iBAAiB,OAAA;AACjB,qHAAA,gBAAgB,OAAA;AAMlB,mGAAmG;AACnG,uDAM4B;AAL1B,oHAA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ACjB,2GAAA,cAAc,OAAA;AACd,4GAAA,eAAe,OAAA;AAQjB,qEAAqE;AACrE,kDAAiD;AAAxC,8GAAA,aAAa,OAAA;AAEtB,wFAAwF;AACxF,0GAA0G;AAC1G,6EAA6E;AAC7E,6DAA2D;AAAlD,yHAAA,kBAAkB,OAAA;AAC3B,uDAM4B;AAL1B,8HAAA,0BAA0B,OAAA;AAC1B,8HAAA,0BAA0B,OAAA;AAK5B,+CAA+F;AAAtF,oHAAA,oBAAoB,OAAA;AAAE,+GAAA,eAAe,OAAA;AAC9C,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,6CAA2D;AAAlD,0GAAA,WAAW,OAAA;AACpB,6CAA8E;AAArE,0GAAA,WAAW,OAAA;AACpB,6CAA4G;AAAnG,0GAAA,WAAW,OAAA;AAAE,2GAAA,YAAY,OAAA;AAAE,2GAAA,YAAY,OAAA;AAChD,mDAA4F;AAAnF,gHAAA,cAAc,OAAA;AACvB,uEAAkG;AAAzF,oIAAA,wBAAwB,OAAA;AACjC,iDAAiE;AAAxD,8GAAA,aAAa,OAAA;AACtB,gFAAgF;AAChF,mDAAoE;AAA3D,gHAAA,cAAc,OAAA;AACvB,+CAA8D;AAArD,4GAAA,YAAY,OAAA"}
|
|
@@ -29,10 +29,12 @@ export { ReplayPlayerProvider, useReplayPlayer, type ReplayPlayerState } from '.
|
|
|
29
29
|
export { useKeepScreenAwake } from './useKeepScreenAwake';
|
|
30
30
|
export { useLivePage, type LivePage } from './useLivePage';
|
|
31
31
|
export { useLiveChat, type LiveChat, type LiveChatShow } from './useLiveChat';
|
|
32
|
-
export { useLiveShop, shareProduct, shareAddress, type LiveShop } from './useLiveShop';
|
|
32
|
+
export { useLiveShop, shareProduct, shareAddress, type LiveShop, type LiveShopScreen } from './useLiveShop';
|
|
33
33
|
export { useLiveAuction, type LiveAuction, type LiveAuctionScreen } from './useLiveAuction';
|
|
34
34
|
export { useLiveGiveawaysAndPolls, type LiveGiveawaysAndPolls } from './useLiveGiveawaysAndPolls';
|
|
35
35
|
export { useReplayPage, type ReplayPage } from './useReplayPage';
|
|
36
|
+
export { useAccountName, type AccountName } from './useAccountName';
|
|
37
|
+
export { useClipsPage, type ClipsPage } from './useClipsPage';
|
|
36
38
|
/** The Items You Won tab over the empty wins: signed in, it says nothing was won. */
|
|
37
39
|
export declare function useItemsYouWonPage<TRaw = unknown>(options: UseItemsYouWonPageOptions): ItemsYouWonPage<TRaw>;
|
|
38
40
|
/** The Live tab over the idle session: the recordings are real, the show on air never plays here. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../src/react/index.web.ts"],"names":[],"mappings":"AA2BA,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,2BAA2B,EAC3B,KAAK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CAAC;AAC5G,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,KAAK,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAClG,OAAO,EAAE,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAI9D,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,yBAAyB,GAAG,eAAe,CAAC,IAAI,CAAC,CAE5G;AAED,qGAAqG;AACrG,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,WAAW,CAE1E;AAED,uDAAuD;AACvD,wBAAgB,WAAW,CAAC,OAAO,EAAE,qBAAqB,GAAG,QAAQ,CAEpE"}
|
package/dist/react/index.web.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useReplayPage = exports.useLiveGiveawaysAndPolls = exports.useLiveAuction = exports.shareAddress = exports.shareProduct = exports.useLiveShop = exports.useLiveChat = exports.useLivePage = exports.useKeepScreenAwake = exports.useReplayPlayer = exports.ReplayPlayerProvider = exports.ShopifyLiveSessionProvider = exports.ShopifyLiveSellingProvider = exports.useLivePageOptions = exports.useAuctionWins = exports.useAuctionBidGate = exports.SHEET_HANDOFF_MS = exports.LiveVideoTarget = exports.NativeVideoView = exports.isNativeVideoSupported = exports.useLiveShow = exports.useLiveSession = exports.LiveSessionProvider = exports.SHOWS_PAGE_SIZE = exports.useLiveRailFor = exports.useLiveHubPageFor = exports.useItemsYouWonPageFor = exports.nativeViewTag = exports.useSilentAuctionRounds = exports.useMySilentAuctionBids = exports.useSilentAuctionLot = exports.useSilentAuctionLots = exports.useCommentLinkCards = exports.useGiveawayPrize = exports.useGiveawayEntry = exports.useShowClock = exports.useAuctionCountdown = exports.refreshStreamRecordsIfStale = exports.refreshStreamRecords = exports.useStreamInfo = exports.useClips = exports.useReplays = exports.useAuction = exports.useLiveStreams = exports.refreshOngoingLive = exports.useOngoingLive = exports.useHiddenShows = exports.useLiveSelling = exports.LiveSellingProvider = void 0;
|
|
3
|
+
exports.useAccountName = exports.useReplayPage = exports.useLiveGiveawaysAndPolls = exports.useLiveAuction = exports.shareAddress = exports.shareProduct = exports.useLiveShop = exports.useLiveChat = exports.useLivePage = exports.useKeepScreenAwake = exports.useReplayPlayer = exports.ReplayPlayerProvider = exports.ShopifyLiveSessionProvider = exports.ShopifyLiveSellingProvider = exports.useLivePageOptions = exports.useAuctionWins = exports.useAuctionBidGate = exports.SHEET_HANDOFF_MS = exports.LiveVideoTarget = exports.NativeVideoView = exports.isNativeVideoSupported = exports.useLiveShow = exports.useLiveSession = exports.LiveSessionProvider = exports.SHOWS_PAGE_SIZE = exports.useLiveRailFor = exports.useLiveHubPageFor = exports.useItemsYouWonPageFor = exports.nativeViewTag = exports.useSilentAuctionRounds = exports.useMySilentAuctionBids = exports.useSilentAuctionLot = exports.useSilentAuctionLots = exports.useCommentLinkCards = exports.useGiveawayPrize = exports.useGiveawayEntry = exports.useShowClock = exports.useAuctionCountdown = exports.refreshStreamRecordsIfStale = exports.refreshStreamRecords = exports.useStreamInfo = exports.useClips = exports.useReplays = exports.useAuction = exports.useLiveStreams = exports.refreshOngoingLive = exports.useOngoingLive = exports.useHiddenShows = exports.useLiveSelling = exports.LiveSellingProvider = void 0;
|
|
4
|
+
exports.useClipsPage = void 0;
|
|
4
5
|
exports.useItemsYouWonPage = useItemsYouWonPage;
|
|
5
6
|
exports.useLiveHubPage = useLiveHubPage;
|
|
6
7
|
exports.useLiveRail = useLiveRail;
|
|
@@ -123,6 +124,11 @@ var useLiveGiveawaysAndPolls_1 = require("./useLiveGiveawaysAndPolls");
|
|
|
123
124
|
Object.defineProperty(exports, "useLiveGiveawaysAndPolls", { enumerable: true, get: function () { return useLiveGiveawaysAndPolls_1.useLiveGiveawaysAndPolls; } });
|
|
124
125
|
var useReplayPage_1 = require("./useReplayPage");
|
|
125
126
|
Object.defineProperty(exports, "useReplayPage", { enumerable: true, get: function () { return useReplayPage_1.useReplayPage; } });
|
|
127
|
+
// 0.15.0: the name on the shopper's account, for the name asks; the Clips page.
|
|
128
|
+
var useAccountName_1 = require("./useAccountName");
|
|
129
|
+
Object.defineProperty(exports, "useAccountName", { enumerable: true, get: function () { return useAccountName_1.useAccountName; } });
|
|
130
|
+
var useClipsPage_1 = require("./useClipsPage");
|
|
131
|
+
Object.defineProperty(exports, "useClipsPage", { enumerable: true, get: function () { return useClipsPage_1.useClipsPage; } });
|
|
126
132
|
// ─── The page models ─────────────────────────────────────────────────────────
|
|
127
133
|
/** The Items You Won tab over the empty wins: signed in, it says nothing was won. */
|
|
128
134
|
function useItemsYouWonPage(options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../src/react/index.web.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../src/react/index.web.ts"],"names":[],"mappings":";;;;AA0IA,gDAEC;AAGD,wCAEC;AAGD,kCAEC;AAtJD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,+DAAqE;AACrE,2CASqB;AAErB,+FAA+F;AAC/F,6DAK+B;AAJ7B,0HAAA,mBAAmB,OAAA;AACnB,qHAAA,cAAc,OAAA;AAIhB,mDAA6E;AAApE,gHAAA,cAAc,OAAA;AACvB,mDAA4E;AAAnE,gHAAA,cAAc,OAAA;AACvB,wDAAyD;AAAhD,sHAAA,kBAAkB,OAAA;AAC3B,mDAA4E;AAAnE,gHAAA,cAAc,OAAA;AACvB,2CAAgE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HAAA,0BAA0B,OAAA;AAC1B,8HAAA,0BAA0B,OAAA;AAK5B,+CAA+F;AAAtF,oHAAA,oBAAoB,OAAA;AAAE,+GAAA,eAAe,OAAA;AAC9C,2DAA0D;AAAjD,wHAAA,kBAAkB,OAAA;AAC3B,6CAA2D;AAAlD,0GAAA,WAAW,OAAA;AACpB,6CAA8E;AAArE,0GAAA,WAAW,OAAA;AACpB,6CAA4G;AAAnG,0GAAA,WAAW,OAAA;AAAE,2GAAA,YAAY,OAAA;AAAE,2GAAA,YAAY,OAAA;AAChD,mDAA4F;AAAnF,gHAAA,cAAc,OAAA;AACvB,uEAAkG;AAAzF,oIAAA,wBAAwB,OAAA;AACjC,iDAAiE;AAAxD,8GAAA,aAAa,OAAA;AACtB,gFAAgF;AAChF,mDAAoE;AAA3D,gHAAA,cAAc,OAAA;AACvB,+CAA8D;AAArD,4GAAA,YAAY,OAAA;AAErB,gFAAgF;AAEhF,qFAAqF;AACrF,SAAgB,kBAAkB,CAAiB,OAAkC;IACnF,OAAO,IAAA,iCAAqB,EAAC,IAAA,oCAAc,GAAQ,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC;AAED,qGAAqG;AACrG,SAAgB,cAAc,CAAC,OAA8B;IAC3D,OAAO,IAAA,6BAAiB,EAAC,kCAAY,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AAED,uDAAuD;AACvD,SAAgB,WAAW,CAAC,OAA8B;IACxD,OAAO,IAAA,0BAAc,EAAC,kCAAY,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC"}
|
|
@@ -57,12 +57,13 @@ export interface ShopifyLiveSessionProviderProps extends Omit<LiveSessionProvide
|
|
|
57
57
|
* the account has; never an email nor its part before the @), so a name edited on Account reaches the
|
|
58
58
|
* room without a restart. Null with no name on the account, or signed out, so a name the shopper typed
|
|
59
59
|
* on this phone stays in charge (the comment box asks for one: `useLivePage`'s chat).
|
|
60
|
-
* - **`blockedNames
|
|
61
|
-
* the
|
|
60
|
+
* - **`blockedNames`**: the names nobody watching may go by. `LiveSellingProvider`'s (0.15.0: the list
|
|
61
|
+
* the name asks check too, so the session and the sheets agree), unless one is passed here; Host and
|
|
62
|
+
* Moderator unless the app says otherwise.
|
|
62
63
|
* - **`onPipRestore`**: the phone's picture-in-picture window, opened from the Live screen and then
|
|
63
64
|
* expanded (or, on iOS, left up when the shopper came back by the app's icon), comes back to the Live
|
|
64
65
|
* screen (`routes.openLive`). A window opened from the bubble goes back to the bubble instead, which
|
|
65
66
|
* the session does itself without calling this. An `onPipRestore` of the app's own replaces it.
|
|
66
67
|
*/
|
|
67
|
-
export declare function ShopifyLiveSessionProvider({ children, onPipRestore, ...props }: ShopifyLiveSessionProviderProps): import("react").FunctionComponentElement<LiveSessionProviderProps>;
|
|
68
|
+
export declare function ShopifyLiveSessionProvider({ children, onPipRestore, blockedNames, ...props }: ShopifyLiveSessionProviderProps): import("react").FunctionComponentElement<LiveSessionProviderProps>;
|
|
68
69
|
//# sourceMappingURL=shopifyProviders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopifyProviders.d.ts","sourceRoot":"","sources":["../../src/react/shopifyProviders.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG3F,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAClE,OAAO,EAA2C,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAE/G,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEjE;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,UAAU,GAAG,wBAAwB,GAAG,UAAU,CAAC,GAAG;IAC/H,4GAA4G;IAC5G,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1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,GAAG,aAAa,CAAC;IAC/G;;;;;OAKG;IACH,MAAM,EAAE,wBAAwB,CAAC;IACjC,sHAAsH;IACtH,cAAc,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,cAAc,CAAC,EAAE,qBAAqB,CAAC;CACxC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,MAAM,EACN,cAAc,EACd,aAAa,EACb,cAA2B,EAC3B,GAAG,SAAS,EACb,EAAE,+BAA+B,sEA4BjC;AAED,MAAM,WAAW,+BAAgC,SAAQ,IAAI,CAAC,wBAAwB,EAAE,YAAY,GAAG,UAAU,CAAC;IAChH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,KAAK,EAAE,EAAE,+BAA+B,sEAkB7H"}
|
|
@@ -74,16 +74,17 @@ function ShopifyLiveSellingProvider({ children, config, cartSourceName, prizeWri
|
|
|
74
74
|
* the account has; never an email nor its part before the @), so a name edited on Account reaches the
|
|
75
75
|
* room without a restart. Null with no name on the account, or signed out, so a name the shopper typed
|
|
76
76
|
* on this phone stays in charge (the comment box asks for one: `useLivePage`'s chat).
|
|
77
|
-
* - **`blockedNames
|
|
78
|
-
* the
|
|
77
|
+
* - **`blockedNames`**: the names nobody watching may go by. `LiveSellingProvider`'s (0.15.0: the list
|
|
78
|
+
* the name asks check too, so the session and the sheets agree), unless one is passed here; Host and
|
|
79
|
+
* Moderator unless the app says otherwise.
|
|
79
80
|
* - **`onPipRestore`**: the phone's picture-in-picture window, opened from the Live screen and then
|
|
80
81
|
* expanded (or, on iOS, left up when the shopper came back by the app's icon), comes back to the Live
|
|
81
82
|
* screen (`routes.openLive`). A window opened from the bubble goes back to the bubble instead, which
|
|
82
83
|
* the session does itself without calling this. An `onPipRestore` of the app's own replaces it.
|
|
83
84
|
*/
|
|
84
|
-
function ShopifyLiveSessionProvider({ children, onPipRestore, ...props }) {
|
|
85
|
+
function ShopifyLiveSessionProvider({ children, onPipRestore, blockedNames, ...props }) {
|
|
85
86
|
const { customer } = (0, sdk_shopify_1.useCustomer)();
|
|
86
|
-
const { routes } = (0, LiveSellingProvider_1.useLivePageOptions)();
|
|
87
|
+
const { routes, blockedNames: providerBlockedNames } = (0, LiveSellingProvider_1.useLivePageOptions)();
|
|
87
88
|
const backToTheLiveShow = (0, react_1.useMemo)(() => onPipRestore !== null && onPipRestore !== void 0 ? onPipRestore : ((streamId) => {
|
|
88
89
|
if (streamId)
|
|
89
90
|
routes.openLive(streamId);
|
|
@@ -91,6 +92,7 @@ function ShopifyLiveSessionProvider({ children, onPipRestore, ...props }) {
|
|
|
91
92
|
return (0, react_1.createElement)(platformSession_1.LiveSessionProvider, {
|
|
92
93
|
...props,
|
|
93
94
|
viewerName: (0, showNames_1.viewerNameFor)(customer),
|
|
95
|
+
blockedNames: blockedNames !== null && blockedNames !== void 0 ? blockedNames : providerBlockedNames,
|
|
94
96
|
onPipRestore: backToTheLiveShow,
|
|
95
97
|
children,
|
|
96
98
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopifyProviders.js","sourceRoot":"","sources":["../../src/react/shopifyProviders.ts"],"names":[],"mappings":";;;;;AA8DA,gEAmCC;
|
|
1
|
+
{"version":3,"file":"shopifyProviders.js","sourceRoot":"","sources":["../../src/react/shopifyProviders.ts"],"names":[],"mappings":";;;;;AA8DA,gEAmCC;AAyBD,gEAkBC;AA5ID;;;;;;;GAOG;AACH,8FAAqE;AACrE,sDAAwE;AACxE,iCAAuD;AAGvD,wDAA2F;AAC3F,wDAA+D;AAC/D,4CAA6C;AAE7C,+DAA+G;AAC/G,uDAAwD;AA+BxD;;;;;;;;;;;;GAYG;AACH,SAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,MA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,oBAAoB,EAAE,GAAG,IAAA,wCAAkB,GAAE,CAAC;IAC5E,MAAM,iBAAiB,GAAG,IAAA,eAAO,EAC/B,GAAG,EAAE,CACH,YAAY,aAAZ,YAAY,cAAZ,YAAY,GACZ,CAAC,CAAC,QAA4B,EAAE,EAAE;QAChC,IAAI,QAAQ;YAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC,CAAC,EACJ,CAAC,YAAY,EAAE,MAAM,CAAC,CACvB,CAAC;IACF,OAAO,IAAA,qBAAa,EAAC,qCAAmB,EAAE;QACxC,GAAG,KAAK;QACR,UAAU,EAAE,IAAA,yBAAa,EAAC,QAAQ,CAAC;QACnC,YAAY,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,oBAAoB;QAClD,YAAY,EAAE,iBAAiB;QAC/B,QAAQ;KACT,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { NameOnAccount } from '../pageTypes';
|
|
2
|
+
export interface AccountName {
|
|
3
|
+
accountLoading: boolean;
|
|
4
|
+
nameToComplete: NameOnAccount | null;
|
|
5
|
+
saveNameToAccount: (firstName: string, lastName: string) => Promise<string | null>;
|
|
6
|
+
}
|
|
7
|
+
export declare function useAccountName(): AccountName;
|
|
8
|
+
//# sourceMappingURL=useAccountName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccountName.d.ts","sourceRoot":"","sources":["../../src/react/useAccountName.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,MAAM,WAAW,WAAW;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,iBAAiB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACpF;AAED,wBAAgB,cAAc,IAAI,WAAW,CAyB5C"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useAccountName = useAccountName;
|
|
4
|
+
/**
|
|
5
|
+
* `useAccountName()` — the signed-in shopper's name on their Shopify account, for the Live screen's name
|
|
6
|
+
* asks (0.15.0, moved from amore-v2's `src/core/hooks/useAccountName.ts`): the comment box's "Commenting
|
|
7
|
+
* As:" (`useLiveChat`) and the giveaway's "Entering As:" (`useLiveGiveawaysAndPolls`).
|
|
8
|
+
*
|
|
9
|
+
* amore-v2's ENG-686, decided 2026-10-19 by its Head of Engineering (old Amore's and old K-Marie's way,
|
|
10
|
+
* for giveaways too the same day): a Shopify sign-in by emailed code leaves the account's name blank, and
|
|
11
|
+
* since 0.13.0 the room names nobody by their email. Such a shopper is asked once, by whichever comes
|
|
12
|
+
* first, a comment or a giveaway entry, for a first and a last name (the last optional), which go on the
|
|
13
|
+
* account (sdk-shopify's `updateProfile`, which says "Profile updated" as Edit Profile does). The account
|
|
14
|
+
* then names them in the room, on Account and on their orders, and neither ask comes again.
|
|
15
|
+
*
|
|
16
|
+
* - **`accountLoading`:** signed in, the account not read yet (`accountLoadingOf`). Send and Enter wait.
|
|
17
|
+
* - **`nameToComplete`:** the account has been read and has no first name, or a name the show's team
|
|
18
|
+
* goes by (`LiveSellingProvider`'s `blockedNames`): what it has, for the ask to start from
|
|
19
|
+
* (`accountNameToComplete`). Null when it has a first name, while it loads, and when signed out.
|
|
20
|
+
* - **`saveNameToAccount(firstName, lastName)`:** the name as it went on the account ("Jane Doe", or
|
|
21
|
+
* "Jane"), or null when it didn't: no first name, a team name (`tidyAccountName`), or Shopify refused
|
|
22
|
+
* it or couldn't be reached.
|
|
23
|
+
*/
|
|
24
|
+
const sdk_shopify_1 = require("@tiledev/sdk-shopify");
|
|
25
|
+
const react_1 = require("react");
|
|
26
|
+
const livePages_1 = require("../livePages");
|
|
27
|
+
const LiveSellingProvider_1 = require("./LiveSellingProvider");
|
|
28
|
+
function useAccountName() {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const { loggedIn, restoring, customer, updateProfile } = (0, sdk_shopify_1.useCustomer)();
|
|
31
|
+
const { blockedNames } = (0, LiveSellingProvider_1.useLivePageOptions)();
|
|
32
|
+
const account = { loggedIn: !!loggedIn, restoring: !!restoring, customer };
|
|
33
|
+
const accountLoading = (0, livePages_1.accountLoadingOf)(account);
|
|
34
|
+
const needed = (0, livePages_1.accountNameToComplete)(account, blockedNames);
|
|
35
|
+
const firstName = (_a = needed === null || needed === void 0 ? void 0 : needed.firstName) !== null && _a !== void 0 ? _a : null;
|
|
36
|
+
const lastName = (_b = needed === null || needed === void 0 ? void 0 : needed.lastName) !== null && _b !== void 0 ? _b : null;
|
|
37
|
+
// One object while the name it needs stays the same, so a tile's sheet doesn't start over each draw.
|
|
38
|
+
const nameToComplete = (0, react_1.useMemo)(() => (firstName !== null ? { firstName, lastName } : null), [firstName, lastName]);
|
|
39
|
+
const saveNameToAccount = (0, react_1.useCallback)(async (typedFirstName, typedLastName) => {
|
|
40
|
+
const name = (0, livePages_1.tidyAccountName)(typedFirstName, typedLastName, blockedNames);
|
|
41
|
+
if (!name)
|
|
42
|
+
return null;
|
|
43
|
+
if (!(await updateProfile({ firstName: name.firstName, lastName: name.lastName })))
|
|
44
|
+
return null;
|
|
45
|
+
return name.fullName;
|
|
46
|
+
}, [blockedNames, updateProfile]);
|
|
47
|
+
return { accountLoading, nameToComplete, saveNameToAccount };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=useAccountName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAccountName.js","sourceRoot":"","sources":["../../src/react/useAccountName.ts"],"names":[],"mappings":";;AAiCA,wCAyBC;AA1DD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,sDAAmD;AACnD,iCAA6C;AAE7C,4CAA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,EAAE,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QAChG,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC,EACD,CAAC,YAAY,EAAE,aAAa,CAAC,CAC9B,CAAC;IAEF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ClipReelItem } from '../pageTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Everything the Clips page wires, so the screen stays plain tiles: the reel (`reel`, the reel tile's
|
|
4
|
+
* props) and the bar over it (`header`). Call it from the screen and from each of its tiles' wiring.
|
|
5
|
+
*
|
|
6
|
+
* - **The reel** is the live-selling gateway's video collection (`useClips`): which clips, in what
|
|
7
|
+
* order, the video each plays and its poster. The merchant curates it in the dashboard.
|
|
8
|
+
* - **Each clip's product** comes from Shopify, in one read for the whole reel (`shopify.products.byIds`,
|
|
9
|
+
* at sdk-shopify's `CARD_IMAGE`, the grids' card size, which the product store keeps as the product's
|
|
10
|
+
* card image). A clip whose product the store no longer has is left out (`clipReelItems`): there is
|
|
11
|
+
* nothing to buy from it. Products are kept across reads, so a refreshed reel only waits for products
|
|
12
|
+
* it hasn't seen.
|
|
13
|
+
* - **Loading** until the clips' first read has started (`useClips` reads only once the SDK is ready,
|
|
14
|
+
* and says `loading` only from then: until it has read once, an empty reel is still loading, not "No
|
|
15
|
+
* clips yet.") and while products it shows are on their way. A failed read of either is `error`;
|
|
16
|
+
* Retry reads both again.
|
|
17
|
+
* - **Playback:** only while the page is on screen (`paused` otherwise); one mute setting for the reel,
|
|
18
|
+
* starting muted.
|
|
19
|
+
* - **Buy** opens the variant page (`routes.openVariantPage`): the product page's tiles in a sheet over
|
|
20
|
+
* the reel. **Share** sends the product's link (`productShareUrl`). **Close** goes back to where the
|
|
21
|
+
* shopper came from; the bar's cart opens the Cart (`routes.openCart`).
|
|
22
|
+
*/
|
|
23
|
+
export declare function useClipsPage(): {
|
|
24
|
+
/** The reel has a clip to show. */
|
|
25
|
+
hasReel: boolean;
|
|
26
|
+
/** The page is on show: light status bar glyphs over the video. */
|
|
27
|
+
isFocused: boolean;
|
|
28
|
+
reel: {
|
|
29
|
+
clips: ClipReelItem[];
|
|
30
|
+
loading: boolean;
|
|
31
|
+
error: boolean;
|
|
32
|
+
paused: boolean;
|
|
33
|
+
muted: boolean;
|
|
34
|
+
onToggleMute: () => void;
|
|
35
|
+
onShare: (clip: ClipReelItem) => void;
|
|
36
|
+
onBuy: (clip: ClipReelItem) => void;
|
|
37
|
+
onRetry: () => void;
|
|
38
|
+
};
|
|
39
|
+
header: {
|
|
40
|
+
cartCount: number;
|
|
41
|
+
onClose: () => void;
|
|
42
|
+
onCart: () => void;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
/** What `useClipsPage` hands the Clips page and its tiles. */
|
|
46
|
+
export type ClipsPage = ReturnType<typeof useClipsPage>;
|
|
47
|
+
//# sourceMappingURL=useClipsPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClipsPage.d.ts","sourceRoot":"","sources":["../../src/react/useClipsPage.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAMjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY;IA+DxB,mCAAmC;;IAEnC,mEAAmE;;;;;;;;;wBASjD,YAAY;sBAId,YAAY;;;;;;;;EAe/B;AAED,8DAA8D;AAC9D,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useClipsPage = useClipsPage;
|
|
4
|
+
/**
|
|
5
|
+
* The Clips page's page model (0.15.0, moved from amore-v2's `src/core/hooks/useClipsPage.ts`, ported
|
|
6
|
+
* there from the earlier app's Clips tab, 2026-10-18): the reel a rail of clips opens, on the clip tapped.
|
|
7
|
+
* The routes are the app's (`LiveSellingProvider`'s `routes`); the clip to open on is the app's route
|
|
8
|
+
* param, which its screen hands the reel tile (amore-v2: `clipId`, as `firstClipId`).
|
|
9
|
+
*/
|
|
10
|
+
const sdk_shopify_1 = require("@tiledev/sdk-shopify");
|
|
11
|
+
const react_1 = require("react");
|
|
12
|
+
const clipsPage_1 = require("../clipsPage");
|
|
13
|
+
const LiveSellingProvider_1 = require("./LiveSellingProvider");
|
|
14
|
+
const useClips_1 = require("./useClips");
|
|
15
|
+
const useLiveShop_1 = require("./useLiveShop");
|
|
16
|
+
const navigation_1 = require("./navigation");
|
|
17
|
+
/**
|
|
18
|
+
* Everything the Clips page wires, so the screen stays plain tiles: the reel (`reel`, the reel tile's
|
|
19
|
+
* props) and the bar over it (`header`). Call it from the screen and from each of its tiles' wiring.
|
|
20
|
+
*
|
|
21
|
+
* - **The reel** is the live-selling gateway's video collection (`useClips`): which clips, in what
|
|
22
|
+
* order, the video each plays and its poster. The merchant curates it in the dashboard.
|
|
23
|
+
* - **Each clip's product** comes from Shopify, in one read for the whole reel (`shopify.products.byIds`,
|
|
24
|
+
* at sdk-shopify's `CARD_IMAGE`, the grids' card size, which the product store keeps as the product's
|
|
25
|
+
* card image). A clip whose product the store no longer has is left out (`clipReelItems`): there is
|
|
26
|
+
* nothing to buy from it. Products are kept across reads, so a refreshed reel only waits for products
|
|
27
|
+
* it hasn't seen.
|
|
28
|
+
* - **Loading** until the clips' first read has started (`useClips` reads only once the SDK is ready,
|
|
29
|
+
* and says `loading` only from then: until it has read once, an empty reel is still loading, not "No
|
|
30
|
+
* clips yet.") and while products it shows are on their way. A failed read of either is `error`;
|
|
31
|
+
* Retry reads both again.
|
|
32
|
+
* - **Playback:** only while the page is on screen (`paused` otherwise); one mute setting for the reel,
|
|
33
|
+
* starting muted.
|
|
34
|
+
* - **Buy** opens the variant page (`routes.openVariantPage`): the product page's tiles in a sheet over
|
|
35
|
+
* the reel. **Share** sends the product's link (`productShareUrl`). **Close** goes back to where the
|
|
36
|
+
* shopper came from; the bar's cart opens the Cart (`routes.openCart`).
|
|
37
|
+
*/
|
|
38
|
+
function useClipsPage() {
|
|
39
|
+
const nav = (0, navigation_1.useNavigation)();
|
|
40
|
+
const isFocused = (0, navigation_1.useIsFocused)();
|
|
41
|
+
const { ready: liveSellingReady } = (0, LiveSellingProvider_1.useLiveSelling)();
|
|
42
|
+
const { routes } = (0, LiveSellingProvider_1.useLivePageOptions)();
|
|
43
|
+
const { ready: shopifyReady } = (0, sdk_shopify_1.useShopify)();
|
|
44
|
+
const { clips, loading: loadingClips, error: clipsError, refresh: refreshClips } = (0, useClips_1.useClips)();
|
|
45
|
+
const { itemCount } = (0, sdk_shopify_1.useCart)();
|
|
46
|
+
// `useClips` starts reading only once the live-selling SDK is ready, and says `loading` only from
|
|
47
|
+
// then: until it has read once, an empty reel is still loading, not "No clips yet.".
|
|
48
|
+
const [clipsReadStarted, setClipsReadStarted] = (0, react_1.useState)(false);
|
|
49
|
+
(0, react_1.useEffect)(() => {
|
|
50
|
+
if (loadingClips)
|
|
51
|
+
setClipsReadStarted(true);
|
|
52
|
+
}, [loadingClips]);
|
|
53
|
+
// The clips' products by id: `null` for one the store no longer has. Kept across reads.
|
|
54
|
+
const [productsById, setProductsById] = (0, react_1.useState)(new Map());
|
|
55
|
+
const [productsFailed, setProductsFailed] = (0, react_1.useState)(false);
|
|
56
|
+
const [productReadCount, setProductReadCount] = (0, react_1.useState)(0);
|
|
57
|
+
const productIds = (0, react_1.useMemo)(() => [...new Set(clips.map(clipsPage_1.clipProductId).filter((id) => !!id))], [clips]);
|
|
58
|
+
const missingIds = productIds.filter((id) => !productsById.has(id));
|
|
59
|
+
const missingKey = missingIds.join(',');
|
|
60
|
+
(0, react_1.useEffect)(() => {
|
|
61
|
+
if (!shopifyReady || !missingKey)
|
|
62
|
+
return;
|
|
63
|
+
const ids = missingKey.split(',');
|
|
64
|
+
let stillMounted = true;
|
|
65
|
+
setProductsFailed(false);
|
|
66
|
+
sdk_shopify_1.shopify.products
|
|
67
|
+
.byIds(ids, { imageTransform: sdk_shopify_1.CARD_IMAGE, keepMissing: true })
|
|
68
|
+
.then((found) => {
|
|
69
|
+
if (!stillMounted)
|
|
70
|
+
return;
|
|
71
|
+
setProductsById((known) => {
|
|
72
|
+
const next = new Map(known);
|
|
73
|
+
ids.forEach((id, index) => { var _a; return next.set(id, (_a = found[index]) !== null && _a !== void 0 ? _a : null); });
|
|
74
|
+
return next;
|
|
75
|
+
});
|
|
76
|
+
})
|
|
77
|
+
.catch(() => {
|
|
78
|
+
if (stillMounted)
|
|
79
|
+
setProductsFailed(true);
|
|
80
|
+
});
|
|
81
|
+
return () => {
|
|
82
|
+
stillMounted = false;
|
|
83
|
+
};
|
|
84
|
+
}, [shopifyReady, missingKey, productReadCount]);
|
|
85
|
+
const reel = (0, react_1.useMemo)(() => (0, clipsPage_1.clipReelItems)(clips, productsById), [clips, productsById]);
|
|
86
|
+
const productOfClip = (0, react_1.useCallback)((clipId) => {
|
|
87
|
+
var _a;
|
|
88
|
+
const clip = clips.find((candidate) => candidate.id === clipId);
|
|
89
|
+
const productId = clip ? (0, clipsPage_1.clipProductId)(clip) : null;
|
|
90
|
+
return productId ? ((_a = productsById.get(productId)) !== null && _a !== void 0 ? _a : null) : null;
|
|
91
|
+
}, [clips, productsById]);
|
|
92
|
+
const [muted, setMuted] = (0, react_1.useState)(true);
|
|
93
|
+
const waitingForProducts = missingIds.length > 0 && !productsFailed;
|
|
94
|
+
const hasReel = reel.length > 0;
|
|
95
|
+
return {
|
|
96
|
+
/** The reel has a clip to show. */
|
|
97
|
+
hasReel,
|
|
98
|
+
/** The page is on show: light status bar glyphs over the video. */
|
|
99
|
+
isFocused,
|
|
100
|
+
reel: {
|
|
101
|
+
clips: reel,
|
|
102
|
+
loading: !liveSellingReady || !clipsReadStarted || loadingClips || waitingForProducts,
|
|
103
|
+
error: !!clipsError || productsFailed,
|
|
104
|
+
paused: !isFocused,
|
|
105
|
+
muted,
|
|
106
|
+
onToggleMute: () => setMuted((wasMuted) => !wasMuted),
|
|
107
|
+
onShare: (clip) => {
|
|
108
|
+
const product = productOfClip(clip.id);
|
|
109
|
+
if (product)
|
|
110
|
+
void (0, useLiveShop_1.shareAddress)((0, sdk_shopify_1.productShareUrl)(product));
|
|
111
|
+
},
|
|
112
|
+
onBuy: (clip) => {
|
|
113
|
+
const product = productOfClip(clip.id);
|
|
114
|
+
if (product)
|
|
115
|
+
routes.openVariantPage({ handle: product.handle }, nav);
|
|
116
|
+
},
|
|
117
|
+
onRetry: () => {
|
|
118
|
+
if (productsFailed)
|
|
119
|
+
setProductReadCount((count) => count + 1);
|
|
120
|
+
void refreshClips();
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
header: {
|
|
124
|
+
cartCount: itemCount,
|
|
125
|
+
onClose: () => nav.goBack(),
|
|
126
|
+
onCart: () => routes.openCart({ itemsYouWon: false }, nav),
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=useClipsPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useClipsPage.js","sourceRoot":"","sources":["../../src/react/useClipsPage.ts"],"names":[],"mappings":";;AAqCA,oCA6FC;AAlID;;;;;GAKG;AACH,sDAA+G;AAC/G,iCAAkE;AAElE,4CAA4D;AAE5D,+DAA2E;AAC3E,yCAAsC;AACtC,+CAA6C;AAC7C,6CAAoG;AAEpG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,YAAY;IAC1B,MAAM,GAAG,GAAG,IAAA,0BAAa,GAAiC,CAAC;IAC3D,MAAM,SAAS,GAAG,IAAA,yBAAY,GAAE,CAAC;IACjC,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,IAAA,oCAAc,GAAE,CAAC;IACrD,MAAM,EAAE,MAAM,EAA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AAC,EAAE,CAAC,CAAC;gBACvC,IAAI,OAAO;oBAAE,KAAK,IAAA,0BAAY,EAAC,IAAA,6BAAe,EAAC,OAAO,CAAC,CAAC,CAAC;YAC3D,CAAC;YACD,KAAK,EAAE,CAAC,IAAkB,EAAE,EAAE;gBAC5B,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACvC,IAAI,OAAO;oBAAE,MAAM,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,GAAG,CAAC,CAAC;YACvE,CAAC;YACD,OAAO,EAAE,GAAG,EAAE;gBACZ,IAAI,cAAc;oBAAE,mBAAmB,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;gBAC9D,KAAK,YAAY,EAAE,CAAC;YACtB,CAAC;SACF;QACD,MAAM,EAAE;YACN,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE;YAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,GAAG,CAAC;SAC3D;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* (`LiveSellingProvider`'s `routes` and `shopName`); the route's `streamId` param is read here.
|
|
5
5
|
*/
|
|
6
6
|
import { type Product } from '@tiledev/sdk-shopify';
|
|
7
|
-
import type { LiveAuctionLot, LiveAuctionRound, LiveAuctionWinner, LiveBidRefusal, LiveBidStep } from '../pageTypes';
|
|
7
|
+
import type { LiveAuctionLot, LiveAuctionRound, LiveAuctionWinner, LiveBidRefusal, LiveBidStep, LiveShopLink } from '../pageTypes';
|
|
8
8
|
/** What the Live screen hands the auction. */
|
|
9
9
|
export interface LiveAuctionScreen {
|
|
10
10
|
/**
|
|
@@ -49,7 +49,9 @@ export interface LiveAuctionScreen {
|
|
|
49
49
|
* the winner's name, not who they are. No name is handed out as an email. The win itself reaches the
|
|
50
50
|
* cart's Items You Won from the server; that page reads it each time it opens.
|
|
51
51
|
* - **The lots** for the Shop button's sheet and the card (`lotStateFor`): open (the round is on it),
|
|
52
|
-
* closed (won: on the show's record, or seen here), else upcoming.
|
|
52
|
+
* closed (won: on the show's record, or seen here), else upcoming. A link the host added (0.15.0,
|
|
53
|
+
* `showLinkOf`) sits among them with its price and no state, and a featured link has no round on the
|
|
54
|
+
* card: it is opened, never bid on (`useLiveShop` opens it).
|
|
53
55
|
* - **The store's name** in the bidding rules is `shopName` (old Amore's took the host's, which can be
|
|
54
56
|
* a person's).
|
|
55
57
|
* - **Nothing shows** until the session holds this show's record (`useLiveShow`; never a hidden show the
|
|
@@ -96,7 +98,7 @@ export declare function useLiveAuction({ openItemsYouWon }: LiveAuctionScreen):
|
|
|
96
98
|
};
|
|
97
99
|
/** The auction part of the Shop button: its sheet lists the lots. */
|
|
98
100
|
shopButton: {
|
|
99
|
-
lots: LiveAuctionLot[] | null;
|
|
101
|
+
lots: (LiveShopLink | LiveAuctionLot)[] | null;
|
|
100
102
|
};
|
|
101
103
|
};
|
|
102
104
|
/** What `useLiveAuction` hands the Live screen's auction tiles. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLiveAuction.d.ts","sourceRoot":"","sources":["../../src/react/useLiveAuction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAuC,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"useLiveAuction.d.ts","sourceRoot":"","sources":["../../src/react/useLiveAuction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAuC,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAKzF,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAiBnI,8CAA8C;AAC9C,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,cAAc,CAAC,EAAE,eAAe,EAAE,EAAE,iBAAiB;;;;;;;;;;;;;;;;wBAqFxD,MAAM;;;;;;;;;;;;;;;;;;IAsGf,2EAA2E;;;;IAE3E,qEAAqE;;;;EAGxE;AAED,mEAAmE;AACnE,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC"}
|