@tiledev/sdk-apptile-live-selling 0.14.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 +30 -8
- 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 +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -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 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLivePage.js","sourceRoot":"","sources":["../../src/react/useLivePage.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useLivePage.js","sourceRoot":"","sources":["../../src/react/useLivePage.ts"],"names":[],"mappings":";;AAgGA,kCAwOC;AAxUD;;;;;GAKG;AACH,oEAA4E;AAC5E,sDAA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ACjF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,MAAM,KAAK,OAAO;YACzB,uHAAuH;YACvH,SAAS,EAAE,CAAC,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,CAAA;YAC5B,6GAA6G;YAC7G,SAAS,EAAE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,mCAAI,IAAI;YAC3C,uDAAuD;YACvD,WAAW,EAAE,KAAK,IAAI,YAAY,CAAC,eAAe,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI;YAC1F,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,OAAO,EAAE,MAAM,KAAK,OAAO,IAAI,MAAM,KAAK,OAAO;YACjD,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,SAAS;YACtB,SAAS,EAAE,SAAS;YACpB,gGAAgG;YAChG,YAAY;YACZ,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;YAC5C,mFAAmF;YACnF,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,QAAQ;SACjB;QACD,8GAA8G;QAC9G,IAAI;QACJ,8GAA8G;QAC9G,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The Live screen's shopping (0.14.0, moved from amore-v2's `src/core/hooks/useLiveShop.ts`: phase 3 of
|
|
3
|
-
* its "Live player plan", shop and cart
|
|
4
|
-
* the route's `streamId` param is read here.
|
|
3
|
+
* its "Live player plan", shop and cart; 0.15.0 adds its link lots, from amore-v2's `eng928/integration`).
|
|
4
|
+
* The routes are the app's (`LiveSellingProvider`'s `routes`); the route's `streamId` param is read here.
|
|
5
5
|
*/
|
|
6
6
|
import { type Product } from '@tiledev/sdk-shopify';
|
|
7
|
-
import
|
|
7
|
+
import { type ShowLink } from '../linkLots';
|
|
8
|
+
import type { LiveCartChip, LiveFeaturedProduct, LiveShopLink, LiveSoldChip } from '../pageTypes';
|
|
9
|
+
/** What the Live screen hands the shop (0.15.0). */
|
|
10
|
+
export interface LiveShopScreen {
|
|
11
|
+
/**
|
|
12
|
+
* Opens a link the host added inside the app, the show in the bubble: `useLivePage`'s `openLink`, as
|
|
13
|
+
* amore-v2's wiring passes it (`useLiveShop({ openLink: page.openLink })`). Unset: the link opens
|
|
14
|
+
* through `routes.openLink` with the show left where it is.
|
|
15
|
+
*/
|
|
16
|
+
openLink?: (url: string, title?: string | null) => void;
|
|
17
|
+
}
|
|
8
18
|
/**
|
|
9
19
|
* The phone's share sheet with an address (a product's page): iOS takes the link as `url`, Android as
|
|
10
20
|
* text. Nothing without one; a dismissed sheet, or none (the web preview without the browser's share),
|
|
@@ -38,6 +48,14 @@ export declare function shareProduct(product: Product): Promise<void>;
|
|
|
38
48
|
* from here carries the live credit and, once it lands, is announced to the room
|
|
39
49
|
* (`announceToLiveRoom`, which the app's variant page hands `reportShowAdd`; quick add does it
|
|
40
50
|
* itself). Signed out, shopping is open, as Freckled Poppy's.
|
|
51
|
+
* - **Links the host added** (0.15.0; amore-v2, 2026-10-19: lots that are web addresses, mostly affiliate
|
|
52
|
+
* links, `showLinkOf`). The session hands them over among the products, in the host's order, with a
|
|
53
|
+
* title, a price (in the shop's currency: the session gives none), a photo and the address, and no
|
|
54
|
+
* product (`raw`). Featured, the card shows it with Open in place of Buy (`isLink`), the price, no
|
|
55
|
+
* star, on any show (never "Waiting for the next lot…"); in the Shop sheet it is a card among the
|
|
56
|
+
* products (`LiveShopLink`: no star, no Add to Cart). A tap opens it inside the app with the show in the
|
|
57
|
+
* bubble (the screen's `openLink`); share shares its address. A link that isn't https, or an app with no
|
|
58
|
+
* `routes.openLink`, is shown but opens nothing (`url` null, `canOpen` false).
|
|
41
59
|
* - **The room's chips:** "just sold" (`session.sold`) and "added to cart" (`session.cartAnnouncements`,
|
|
42
60
|
* not on an auction show, as Freckled Poppy's). A name the room sent is shown by its first word
|
|
43
61
|
* (`firstNameOf`); the session hands out no name as an email.
|
|
@@ -45,7 +63,7 @@ export declare function shareProduct(product: Product): Promise<void>;
|
|
|
45
63
|
* hidden show the shopper can't see (`hiddenShows`). The web's session is always "ended" with no
|
|
46
64
|
* show, so none of these tiles draw there.
|
|
47
65
|
*/
|
|
48
|
-
export declare function useLiveShop(): {
|
|
66
|
+
export declare function useLiveShop(screen?: LiveShopScreen): {
|
|
49
67
|
productCard: {
|
|
50
68
|
visible: boolean;
|
|
51
69
|
product: LiveFeaturedProduct | null;
|
|
@@ -59,12 +77,14 @@ export declare function useLiveShop(): {
|
|
|
59
77
|
};
|
|
60
78
|
shopButton: {
|
|
61
79
|
visible: boolean;
|
|
62
|
-
products
|
|
80
|
+
/** The products and the links the host added (`LiveShopLink`), in the host's order, the featured one first. */
|
|
81
|
+
products: (Product | ShowLink)[];
|
|
63
82
|
onScreenProductId: string | null;
|
|
64
83
|
lotNumbers: Record<string, string>;
|
|
65
84
|
favoriteIds: string[];
|
|
66
85
|
auctionProductIds: string[];
|
|
67
86
|
onPressProduct: (product: Product) => void;
|
|
87
|
+
onOpenLink: (link: Pick<LiveShopLink, "url" | "title">) => void;
|
|
68
88
|
onToggleFavorite: (product: Product) => undefined;
|
|
69
89
|
onQuickAdd: (product: Product) => void;
|
|
70
90
|
addingProductIds: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLiveShop.d.ts","sourceRoot":"","sources":["../../src/react/useLiveShop.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAuE,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAIzH,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"useLiveShop.d.ts","sourceRoot":"","sources":["../../src/react/useLiveShop.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAuE,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAIzH,OAAO,EAA0B,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAWlG,oDAAoD;AACpD,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACzD;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhF;AAED,qIAAqI;AACrI,wBAAsB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAElE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,WAAW,CAAC,MAAM,GAAE,cAAmB;;;;;;;;;;;;;;QA+IjD,+GAA+G;;;;;;kCAxFvG,OAAO;2BAQV,IAAI,CAAC,YAAY,EAAE,KAAK,GAAG,OAAO,CAAC;oCAwFZ,OAAO;;;;;;;;;;;;EAQxC;AAED,6DAA6D;AAC7D,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -5,12 +5,13 @@ exports.shareProduct = shareProduct;
|
|
|
5
5
|
exports.useLiveShop = useLiveShop;
|
|
6
6
|
/**
|
|
7
7
|
* The Live screen's shopping (0.14.0, moved from amore-v2's `src/core/hooks/useLiveShop.ts`: phase 3 of
|
|
8
|
-
* its "Live player plan", shop and cart
|
|
9
|
-
* the route's `streamId` param is read here.
|
|
8
|
+
* its "Live player plan", shop and cart; 0.15.0 adds its link lots, from amore-v2's `eng928/integration`).
|
|
9
|
+
* The routes are the app's (`LiveSellingProvider`'s `routes`); the route's `streamId` param is read here.
|
|
10
10
|
*/
|
|
11
11
|
const sdk_shopify_1 = require("@tiledev/sdk-shopify");
|
|
12
12
|
const react_1 = require("react");
|
|
13
13
|
const react_native_1 = require("react-native");
|
|
14
|
+
const linkLots_1 = require("../linkLots");
|
|
14
15
|
const showCredit_1 = require("../showCredit");
|
|
15
16
|
const showNames_1 = require("../showNames");
|
|
16
17
|
const showLots_1 = require("../showLots");
|
|
@@ -61,6 +62,14 @@ async function shareProduct(product) {
|
|
|
61
62
|
* from here carries the live credit and, once it lands, is announced to the room
|
|
62
63
|
* (`announceToLiveRoom`, which the app's variant page hands `reportShowAdd`; quick add does it
|
|
63
64
|
* itself). Signed out, shopping is open, as Freckled Poppy's.
|
|
65
|
+
* - **Links the host added** (0.15.0; amore-v2, 2026-10-19: lots that are web addresses, mostly affiliate
|
|
66
|
+
* links, `showLinkOf`). The session hands them over among the products, in the host's order, with a
|
|
67
|
+
* title, a price (in the shop's currency: the session gives none), a photo and the address, and no
|
|
68
|
+
* product (`raw`). Featured, the card shows it with Open in place of Buy (`isLink`), the price, no
|
|
69
|
+
* star, on any show (never "Waiting for the next lot…"); in the Shop sheet it is a card among the
|
|
70
|
+
* products (`LiveShopLink`: no star, no Add to Cart). A tap opens it inside the app with the show in the
|
|
71
|
+
* bubble (the screen's `openLink`); share shares its address. A link that isn't https, or an app with no
|
|
72
|
+
* `routes.openLink`, is shown but opens nothing (`url` null, `canOpen` false).
|
|
64
73
|
* - **The room's chips:** "just sold" (`session.sold`) and "added to cart" (`session.cartAnnouncements`,
|
|
65
74
|
* not on an auction show, as Freckled Poppy's). A name the room sent is shown by its first word
|
|
66
75
|
* (`firstNameOf`); the session hands out no name as an email.
|
|
@@ -68,11 +77,12 @@ async function shareProduct(product) {
|
|
|
68
77
|
* hidden show the shopper can't see (`hiddenShows`). The web's session is always "ended" with no
|
|
69
78
|
* show, so none of these tiles draw there.
|
|
70
79
|
*/
|
|
71
|
-
function useLiveShop() {
|
|
72
|
-
var _a, _b, _c, _d, _e;
|
|
80
|
+
function useLiveShop(screen = {}) {
|
|
81
|
+
var _a, _b, _c, _d, _e, _f;
|
|
73
82
|
const nav = (0, navigation_1.useNavigation)();
|
|
74
83
|
const streamId = (_b = (_a = (0, navigation_1.useRoute)().params) === null || _a === void 0 ? void 0 : _a.streamId) !== null && _b !== void 0 ? _b : '';
|
|
75
|
-
const { routes, track } = (0, LiveSellingProvider_1.useLivePageOptions)();
|
|
84
|
+
const { routes, track, canOpenLinks } = (0, LiveSellingProvider_1.useLivePageOptions)();
|
|
85
|
+
const screenOpenLink = screen.openLink;
|
|
76
86
|
// The session changes only on the room's events, never on a clock.
|
|
77
87
|
const session = (0, platformSession_1.useLiveSession)();
|
|
78
88
|
const wishlist = (0, sdk_shopify_1.useWishlist)();
|
|
@@ -80,14 +90,24 @@ function useLiveShop() {
|
|
|
80
90
|
const { show, onAir, capabilities } = (0, platformSession_1.useLiveShow)(streamId);
|
|
81
91
|
const hidden = !show;
|
|
82
92
|
const isAuction = capabilities.canBid;
|
|
83
|
-
// ─── The products
|
|
93
|
+
// ─── The products and links ────────────────────────────────────────────────────────────────────
|
|
84
94
|
const featured = show ? session.activeProduct : null;
|
|
85
95
|
const featuredProduct = (_c = featured === null || featured === void 0 ? void 0 : featured.raw) !== null && _c !== void 0 ? _c : null;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
/**
|
|
90
|
-
|
|
96
|
+
// A link the host featured: a web address, no product of the store.
|
|
97
|
+
const featuredLink = (0, react_1.useMemo)(() => (featured && !featured.raw && featured.externalUrl ? (0, linkLots_1.showLinkOf)(featured, { canOpen: canOpenLinks }) : null), [featured, canOpenLinks]);
|
|
98
|
+
const featuredId = (_e = (_d = featuredProduct === null || featuredProduct === void 0 ? void 0 : featuredProduct.id) !== null && _d !== void 0 ? _d : featuredLink === null || featuredLink === void 0 ? void 0 : featuredLink.id) !== null && _e !== void 0 ? _e : null;
|
|
99
|
+
/**
|
|
100
|
+
* The show's Shopify products and the links the host added, in the host's order, the featured one
|
|
101
|
+
* first: the shopper who taps Shop wants what the host holds up.
|
|
102
|
+
*/
|
|
103
|
+
const shopItems = (0, react_1.useMemo)(() => (0, showLots_1.featuredFirst)(session.products.flatMap((lot) => lot.raw ? [lot.raw] : lot.externalUrl ? [(0, linkLots_1.showLinkOf)(lot, { canOpen: canOpenLinks })] : []), featuredId), [session.products, featuredId, canOpenLinks]);
|
|
104
|
+
const products = (0, react_1.useMemo)(() => shopItems.filter((item) => !(0, linkLots_1.isShowLink)(item)), [shopItems]);
|
|
105
|
+
/** Each lot's number, by product id (a link's own id): the number the host reads out. */
|
|
106
|
+
const lotNumbers = (0, react_1.useMemo)(() => Object.fromEntries(session.products.flatMap((lot) => {
|
|
107
|
+
var _a, _b;
|
|
108
|
+
const id = (_b = (_a = lot.raw) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : (lot.externalUrl ? lot.id : null);
|
|
109
|
+
return id && lot.sellId ? [[id, lot.sellId]] : [];
|
|
110
|
+
})), [session.products]);
|
|
91
111
|
const auctionProductIds = (0, react_1.useMemo)(() => products.filter(sdk_shopify_1.isAuctioned).map((product) => product.id), [products]);
|
|
92
112
|
// ─── Buying ────────────────────────────────────────────────────────────────────────────────────
|
|
93
113
|
const creditFor = (0, react_1.useCallback)((product) => { var _a; return (0, showCredit_1.liveShowCredit)(show, (_a = lotNumbers[product.id]) !== null && _a !== void 0 ? _a : null); }, [show, lotNumbers]);
|
|
@@ -96,11 +116,20 @@ function useLiveShop() {
|
|
|
96
116
|
const openLotPage = (0, react_1.useCallback)((product) => routes.openVariantPage((0, showCredit_1.auctionLotPageParams)(product), nav), [routes, nav]);
|
|
97
117
|
/** A tap on a product, on the card or in the Shop sheet: a lot's details on an auction show, else the variant page to buy it. */
|
|
98
118
|
const openProduct = isAuction ? openLotPage : openVariantPage;
|
|
119
|
+
/** A tap on a link the host added: its page inside the app, the show in the bubble. Nothing for one that can't open. */
|
|
120
|
+
const openShowLink = (0, react_1.useCallback)((link) => {
|
|
121
|
+
if (!link.url)
|
|
122
|
+
return;
|
|
123
|
+
if (screenOpenLink)
|
|
124
|
+
screenOpenLink(link.url, link.title);
|
|
125
|
+
else
|
|
126
|
+
routes.openLink(link.url, link.title, nav);
|
|
127
|
+
}, [screenOpenLink, routes, nav]);
|
|
99
128
|
// ─── The featured card ─────────────────────────────────────────────────────────────────────────
|
|
100
129
|
// The lot's opening bid, joined onto the product from the record by the session.
|
|
101
|
-
const startingBid = isAuction && featured ? ((
|
|
130
|
+
const startingBid = isAuction && featured ? ((_f = featured.baseBidPrice) !== null && _f !== void 0 ? _f : null) : null;
|
|
102
131
|
const featuredCard = (0, react_1.useMemo)(() => {
|
|
103
|
-
var _a, _b, _c, _d, _e;
|
|
132
|
+
var _a, _b, _c, _d, _e, _f;
|
|
104
133
|
return featuredProduct
|
|
105
134
|
? {
|
|
106
135
|
id: featuredProduct.id,
|
|
@@ -111,8 +140,19 @@ function useLiveShop() {
|
|
|
111
140
|
lotNumber: isAuction ? null : ((_e = featured === null || featured === void 0 ? void 0 : featured.sellId) !== null && _e !== void 0 ? _e : null),
|
|
112
141
|
startingBid: startingBid != null ? (0, sdk_shopify_1.formatMoney)({ amount: String(startingBid), currencyCode: featuredProduct.priceRange.min.currencyCode }) : null,
|
|
113
142
|
}
|
|
114
|
-
:
|
|
115
|
-
|
|
143
|
+
: featuredLink
|
|
144
|
+
? {
|
|
145
|
+
id: featuredLink.id,
|
|
146
|
+
title: featuredLink.title,
|
|
147
|
+
price: featuredLink.price,
|
|
148
|
+
imageUrl: featuredLink.imageUrl,
|
|
149
|
+
lotNumber: isAuction ? null : ((_f = featured === null || featured === void 0 ? void 0 : featured.sellId) !== null && _f !== void 0 ? _f : null),
|
|
150
|
+
startingBid: null,
|
|
151
|
+
isLink: true,
|
|
152
|
+
canOpen: !!featuredLink.url,
|
|
153
|
+
}
|
|
154
|
+
: null;
|
|
155
|
+
}, [featuredProduct, featuredLink, featured === null || featured === void 0 ? void 0 : featured.sellId, isAuction, startingBid]);
|
|
116
156
|
// ─── The room's chips ──────────────────────────────────────────────────────────────────────────
|
|
117
157
|
const soldChips = (0, react_1.useMemo)(() => session.sold.map((card) => ({ id: card.id, quantity: card.quantity, productName: card.productName, lotNumber: card.sellId })), [session.sold]);
|
|
118
158
|
const cartChips = (0, react_1.useMemo)(() => session.cartAnnouncements.map((card) => ({
|
|
@@ -126,14 +166,16 @@ function useLiveShop() {
|
|
|
126
166
|
visible: !hidden,
|
|
127
167
|
product: featuredCard,
|
|
128
168
|
// An auction has gaps between lots: the slot keeps its place rather than leave the frame empty.
|
|
129
|
-
betweenLots: isAuction && !
|
|
169
|
+
betweenLots: isAuction && !featuredCard && onAir,
|
|
130
170
|
canBuy: !isAuction,
|
|
131
|
-
// No share on an auction show (decided 2026-10-05, amore-v2's Head of Engineering).
|
|
132
|
-
canShare: !isAuction,
|
|
171
|
+
// No share on an auction show (decided 2026-10-05, amore-v2's Head of Engineering), nor for a link that opens nothing.
|
|
172
|
+
canShare: !isAuction && (!featuredLink || !!featuredLink.url),
|
|
133
173
|
favorite: !!featuredProduct && wishlist.has(featuredProduct.id),
|
|
134
174
|
onOpenProduct: () => {
|
|
135
175
|
if (featuredProduct)
|
|
136
176
|
openProduct(featuredProduct);
|
|
177
|
+
else if (featuredLink)
|
|
178
|
+
openShowLink(featuredLink);
|
|
137
179
|
},
|
|
138
180
|
onToggleFavorite: () => {
|
|
139
181
|
if (featuredProduct)
|
|
@@ -142,17 +184,21 @@ function useLiveShop() {
|
|
|
142
184
|
onShare: () => {
|
|
143
185
|
if (featuredProduct)
|
|
144
186
|
void shareProduct(featuredProduct);
|
|
187
|
+
else if (featuredLink)
|
|
188
|
+
void shareAddress(featuredLink.url);
|
|
145
189
|
},
|
|
146
190
|
},
|
|
147
191
|
shopButton: {
|
|
148
192
|
// On an auction show too: there its sheet lists the lots (`useLiveAuction`'s `shopButton.lots`).
|
|
149
193
|
visible: !hidden,
|
|
150
|
-
products,
|
|
194
|
+
/** The products and the links the host added (`LiveShopLink`), in the host's order, the featured one first. */
|
|
195
|
+
products: shopItems,
|
|
151
196
|
onScreenProductId: featuredId,
|
|
152
197
|
lotNumbers,
|
|
153
198
|
favoriteIds: wishlist.ids,
|
|
154
199
|
auctionProductIds,
|
|
155
200
|
onPressProduct: openProduct,
|
|
201
|
+
onOpenLink: openShowLink,
|
|
156
202
|
onToggleFavorite: (product) => void wishlist.toggle(product),
|
|
157
203
|
onQuickAdd: quickAdd.add,
|
|
158
204
|
addingProductIds: quickAdd.addingProductIds,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLiveShop.js","sourceRoot":"","sources":["../../src/react/useLiveShop.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useLiveShop.js","sourceRoot":"","sources":["../../src/react/useLiveShop.ts"],"names":[],"mappings":";;AAoCA,oCAOC;AAGD,oCAEC;AA0CD,kCA+JC;AAzPD;;;;GAIG;AACH,sDAAyH;AACzH,iCAA6C;AAC7C,+CAA+C;AAE/C,0CAAoE;AAEpE,8CAA6G;AAC7G,4CAA2C;AAC3C,0CAA4C;AAC5C,+DAA2D;AAC3D,uDAAgE;AAChE,6CAAgH;AAehH;;;;GAIG;AACI,KAAK,UAAU,YAAY,CAAC,GAA8B;IAC/D,IAAI,CAAC,GAAG;QAAE,OAAO;IACjB,IAAI,CAAC;QACH,MAAM,oBAAK,CAAC,KAAK,CAAC,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IACxE,CAAC;IAAC,MAAM,CAAC;QACP,gCAAgC;IAClC,CAAC;AACH,CAAC;AAED,qIAAqI;AAC9H,KAAK,UAAU,YAAY,CAAC,OAAgB;IACjD,MAAM,YAAY,CAAC,IAA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,EAAE;YACV,iGAAiG;YACjG,OAAO,EAAE,CAAC,MAAM;YAChB,+GAA+G;YAC/G,QAAQ,EAAE,SAAS;YACnB,iBAAiB,EAAE,UAAU;YAC7B,UAAU;YACV,WAAW,EAAE,QAAQ,CAAC,GAAG;YACzB,iBAAiB;YACjB,cAAc,EAAE,WAAW;YAC3B,UAAU,EAAE,YAAY;YACxB,gBAAgB,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,KAAK,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;YACrE,UAAU,EAAE,QAAQ,CAAC,GAAG;YACxB,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;SAC5C;QACD,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE;QACjD,qFAAqF;QACrF,SAAS,EAAE,EAAE,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The Replay screen's page model (0.14.0, moved from amore-v2's `src/core/hooks/useReplayPage.ts`: old
|
|
3
|
-
* Amore's Replay, rebuilt
|
|
4
|
-
* `
|
|
3
|
+
* Amore's Replay, rebuilt; 0.15.0 adds its link lots and a tap on the video that pauses and plays, from
|
|
4
|
+
* amore-v2's `eng928/integration`). The routes are the app's (`LiveSellingProvider`'s `routes`); the
|
|
5
|
+
* route's `feedId` and `streamId` params are read here, and `feedId` is set as the shopper swipes.
|
|
5
6
|
*/
|
|
6
7
|
import { type Product } from '@tiledev/sdk-shopify';
|
|
7
|
-
import
|
|
8
|
+
import { type ShowLink } from '../linkLots';
|
|
9
|
+
import type { ReplayCommentItem, ReplayNowProduct, ReplayShopLink, ReplayShow } from '../pageTypes';
|
|
8
10
|
/**
|
|
9
11
|
* Everything the Replay screen wires, so the screen stays plain tiles. Call it from the Replay screen
|
|
10
12
|
* and from each of its tiles' wiring.
|
|
@@ -29,6 +31,10 @@ import type { ReplayCommentItem, ReplayNowProduct, ReplayShow } from '../pageTyp
|
|
|
29
31
|
* here stops a live show's bubble, as the Live screen stops this one's.
|
|
30
32
|
* - **The playhead** is read twice a second. A seek is held until the player reports arriving there,
|
|
31
33
|
* so the bar never jumps back to where it was.
|
|
34
|
+
* - **A tap on the video pauses or plays** (0.15.0; decided 2026-10-20 by amore-v2's Head of
|
|
35
|
+
* Engineering, as the clips reel's; until then a tap showed or hid the controls): the controls' own
|
|
36
|
+
* Play and Pause, which shows the controls for their 4 s, so the skips and the bar are in reach.
|
|
37
|
+
* While the shopper has paused, the player draws the reel's play mark (`player.paused`).
|
|
32
38
|
* - **The product on screen** is the one whose time window covers the playhead
|
|
33
39
|
* (`liveSelling.replays.segments`, `productOnScreen`); before the first window, the first tagged
|
|
34
40
|
* product. Picking a product in the shop sheet goes to where the host first showed it, playing, then
|
|
@@ -37,6 +43,13 @@ import type { ReplayCommentItem, ReplayNowProduct, ReplayShow } from '../pageTyp
|
|
|
37
43
|
* page. Every add from there is credited to the recording (`replayShowCredit`): `_replay_id` on the
|
|
38
44
|
* line, `replayAddToCart` (`track`), and the cart's `_apptile_attribution` count against the show's
|
|
39
45
|
* `streamingId`, never the replay's feed id. Products are read at sdk-shopify's `CARD_IMAGE`.
|
|
46
|
+
* - **Links the host added** (0.15.0; amore-v2, 2026-10-19: lots that are web addresses, mostly
|
|
47
|
+
* affiliate links): the feed lists only products, so the show's record (`liveSelling.streams.byId`) is
|
|
48
|
+
* read with them, once per recording per visit, and gives the shop its order, the links among the
|
|
49
|
+
* products (`recordingShopItems`). A link can be the lot on screen (its time window, by its id) and is
|
|
50
|
+
* a card in the sheet (`ReplayShopLink`); a tap opens it inside the app, the show in the bubble as for
|
|
51
|
+
* the cart (`routes.openLink`), and share shares its address. An unreadable record leaves the products
|
|
52
|
+
* alone, as before, and is reported.
|
|
40
53
|
* - **The chat** is the show's comments file (`liveSelling.replays.comments`), revealed up to the
|
|
41
54
|
* playhead, the newest 60 (`replayCommentsAt`).
|
|
42
55
|
* - **A view** is counted once per recording per visit (not on the web, where the Tile preview would
|
|
@@ -55,6 +68,7 @@ export declare function useReplayPage(): {
|
|
|
55
68
|
player: import("expo-video").VideoPlayer | null;
|
|
56
69
|
videoReady: boolean;
|
|
57
70
|
buffering: boolean;
|
|
71
|
+
paused: boolean;
|
|
58
72
|
onVideoFirstFrame: () => void;
|
|
59
73
|
onTapVideo: () => void;
|
|
60
74
|
onSwipeToNext: () => void;
|
|
@@ -98,11 +112,13 @@ export declare function useReplayPage(): {
|
|
|
98
112
|
};
|
|
99
113
|
shopBar: {
|
|
100
114
|
visible: boolean;
|
|
101
|
-
products
|
|
115
|
+
/** The products and the links the host added (`ReplayShopLink`), in the record's order. */
|
|
116
|
+
products: (Product | ShowLink)[];
|
|
102
117
|
onScreenProductId: string | null;
|
|
103
118
|
favoriteIds: string[];
|
|
104
119
|
auctionProductIds: string[];
|
|
105
120
|
onPressProduct: (product: Product) => void;
|
|
121
|
+
onOpenLink: (link: Pick<ReplayShopLink, "url" | "title">) => void;
|
|
106
122
|
onToggleFavorite: (product: Product) => undefined;
|
|
107
123
|
onQuickAdd: (product: Product) => void;
|
|
108
124
|
addingProductIds: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useReplayPage.d.ts","sourceRoot":"","sources":["../../src/react/useReplayPage.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"useReplayPage.d.ts","sourceRoot":"","sources":["../../src/react/useReplayPage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAQL,KAAK,OAAO,EACb,MAAM,sBAAsB,CAAC;AAM9B,OAAO,EAAkD,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI5F,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAuCpG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,aAAa;IA8YzB,6DAA6D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA4C3C,MAAM;uBAIP,MAAM;2BAIF,MAAM;;;;;;;;;;;;;;;;;;;;QAgCzB,2FAA2F;;;;;kCA/JnF,OAAO;2BAgEV,IAAI,CAAC,cAAc,EAAE,KAAK,GAAG,OAAO,CAAC;oCAsGd,OAAO;;;;;;;;EASxC;AAED,kEAAkE;AAClE,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC"}
|