@tiledev/sdk-apptile-live-selling 0.9.5 → 0.11.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 CHANGED
@@ -398,6 +398,33 @@ them where your tiles draw those moments. Without it, and always on the web, the
398
398
  is dropped; ticks are capped at 20 a second. The package doesn't depend on expo-haptics (an optional
399
399
  `require` wouldn't bundle in an app without it).
400
400
 
401
+ ### Whole pages (0.11.0)
402
+
403
+ Three page models, so an app's screens call the SDK and pass its fields to their components, with
404
+ routes as `on…` options:
405
+
406
+ ```tsx
407
+ const wins = useItemsYouWonPage({
408
+ signedIn: customer.loggedIn,
409
+ restoring: customer.restoring,
410
+ onCheckoutReady: ({ checkoutUrl }) => nav.navigate('Checkout', { checkoutUrl, source: 'auctionWins' }),
411
+ onCheckoutFailed: (message) => showToast(message, 'error'),
412
+ });
413
+ useFocusEffect(wins.viewed);
414
+ // wins.status, wins.rows, wins.total (money), wins.checkout(), wins.checkingOut
415
+
416
+ const tab = useLiveHubPage({ screenOnShow: useIsFocused() });
417
+ useFocusEffect(tab.viewed);
418
+ // tab.onAir, tab.viewerCount, tab.videoActive, tab.replays, tab.status, tab.loadMore, tab.pullToRefresh
419
+
420
+ const rail = useLiveRail({ screenOnShow: useIsFocused() });
421
+ // rail.onAir, rail.videoActive, rail.replays, rail.refresh(), rail.viewed()
422
+ ```
423
+
424
+ `tab.status` is never `empty` or `failed` while a show is on air, and the recordings read on past shows
425
+ hidden from this viewer rather than say there are none. On the web, the three run over the idle session
426
+ and empty wins.
427
+
401
428
  ## 4. Adapters
402
429
 
403
430
  The gateway only ever speaks in bare numeric product ids, because that is what the host dashboard
@@ -577,6 +604,15 @@ const { nowPerUnit, costsNothing, repriced } = prizeLinePrice(line);
577
604
  whether it covers the full price of every prize still costing something. When it does, show each prize
578
605
  as free; when it doesn't (two prizes of one size whose codes don't stack), their true prices stand.
579
606
  Prizes the store already made free, and what a code took off them, aren't counted.
607
+ - **On sdk-shopify's cart page** (0.10.0, sdk-shopify 0.14.0+), all of the above in one place: hand
608
+ `giveawayPrizeExtension({ keys })` to `ShopifyProvider`'s `cartExtensions`, and each prize line on
609
+ `useCartPage` gets its `prize` (`nowPerUnit`, `costsNothing` counting the giveaway codes, `fullPrice` to
610
+ strike through), and shows no reservation. `keys` are the store's own stamps (`['_isGiveawayItem']` on
611
+ Amore, `['_giveawayItem']` on Amber); left out, both.
612
+
613
+ ```tsx
614
+ const CART_EXTENSIONS = [cartHoldExtension(), giveawayPrizeExtension({ keys: ['_isGiveawayItem'] })];
615
+ ```
580
616
 
581
617
  ## 5. Auctions — the two rules that matter
582
618
 
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Live selling's part of sdk-shopify's cart page: which lines are giveaway prizes and what they cost.
3
+ * Hand it to `ShopifyProvider`'s `cartExtensions` (sdk-shopify 0.14.0+):
4
+ *
5
+ * const CART_EXTENSIONS = [cartHoldExtension(), giveawayPrizeExtension({ keys: ['_isGiveawayItem'] })];
6
+ *
7
+ * Then each prize line on `useCartPage` has its `prize`: what one unit costs now (`prizeLinePrice`),
8
+ * whether it is free (the store repriced it to nothing, or the cart's giveaway codes cover the prizes'
9
+ * full price wherever Shopify put them: `prizesCoveredByGiveawayCodes`), and the full price to strike
10
+ * through. A prize shows no reservation and no controls. Moved from amore-v2's `useCartPage` (0.10.0),
11
+ * where it was decided 2026-10-08, Head of Engineering: "Stamp only" (the stamp alone makes a prize) and
12
+ * "Giveaway codes cover all prizes".
13
+ *
14
+ * Typed by its shape rather than sdk-shopify's `CartExtension`, as the rest of this package's Shopify
15
+ * helpers are; amore-v2's type check holds the two together.
16
+ */
17
+ import { type CartLineForGiveawayCodes } from './giveawayPrizeLines';
18
+ import type { ShopifyMoney } from './shopifyCommerce';
19
+ export interface GiveawayPrizeExtensionOptions {
20
+ /** The keys that stamp a prize on this store (default `GIVEAWAY_PRIZE_KEYS`, both spellings). */
21
+ keys?: readonly string[];
22
+ }
23
+ /** A cart line as the extension reads it (sdk-shopify's `CartLine` has all of it). */
24
+ export type CartLineForPrizes = CartLineForGiveawayCodes;
25
+ /** sdk-shopify's `CartExtension`, as live selling fills it in. */
26
+ export interface GiveawayPrizeExtension {
27
+ name: 'giveaway-prizes';
28
+ lineFacts(line: CartLineForPrizes, cart: {
29
+ lines: readonly CartLineForPrizes[];
30
+ }): {
31
+ prize?: {
32
+ nowPerUnit: ShopifyMoney;
33
+ costsNothing: boolean;
34
+ fullPrice: ShopifyMoney | null;
35
+ };
36
+ };
37
+ }
38
+ export declare function giveawayPrizeExtension(options?: GiveawayPrizeExtensionOptions): GiveawayPrizeExtension;
39
+ //# sourceMappingURL=cartExtension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cartExtension.d.ts","sourceRoot":"","sources":["../src/cartExtension.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAKL,KAAK,wBAAwB,EAC9B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,6BAA6B;IAC5C,iGAAiG;IACjG,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAED,sFAAsF;AACtF,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;AAEzD,kEAAkE;AAClE,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,CACP,IAAI,EAAE,iBAAiB,EACvB,IAAI,EAAE;QAAE,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAA;KAAE,GAC5C;QAAE,KAAK,CAAC,EAAE;YAAE,UAAU,EAAE,YAAY,CAAC;YAAC,YAAY,EAAE,OAAO,CAAC;YAAC,SAAS,EAAE,YAAY,GAAG,IAAI,CAAA;SAAE,CAAA;KAAE,CAAC;CACpG;AAED,wBAAgB,sBAAsB,CAAC,OAAO,GAAE,6BAAkC,GAAG,sBAAsB,CA2B1G"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.giveawayPrizeExtension = giveawayPrizeExtension;
4
+ /**
5
+ * Live selling's part of sdk-shopify's cart page: which lines are giveaway prizes and what they cost.
6
+ * Hand it to `ShopifyProvider`'s `cartExtensions` (sdk-shopify 0.14.0+):
7
+ *
8
+ * const CART_EXTENSIONS = [cartHoldExtension(), giveawayPrizeExtension({ keys: ['_isGiveawayItem'] })];
9
+ *
10
+ * Then each prize line on `useCartPage` has its `prize`: what one unit costs now (`prizeLinePrice`),
11
+ * whether it is free (the store repriced it to nothing, or the cart's giveaway codes cover the prizes'
12
+ * full price wherever Shopify put them: `prizesCoveredByGiveawayCodes`), and the full price to strike
13
+ * through. A prize shows no reservation and no controls. Moved from amore-v2's `useCartPage` (0.10.0),
14
+ * where it was decided 2026-10-08, Head of Engineering: "Stamp only" (the stamp alone makes a prize) and
15
+ * "Giveaway codes cover all prizes".
16
+ *
17
+ * Typed by its shape rather than sdk-shopify's `CartExtension`, as the rest of this package's Shopify
18
+ * helpers are; amore-v2's type check holds the two together.
19
+ */
20
+ const giveawayPrizeLines_1 = require("./giveawayPrizeLines");
21
+ function giveawayPrizeExtension(options = {}) {
22
+ var _a;
23
+ const keys = (_a = options.keys) !== null && _a !== void 0 ? _a : giveawayPrizeLines_1.GIVEAWAY_PRIZE_KEYS;
24
+ // Whether the codes pay for every prize is the whole cart's answer: worked out once per cart.
25
+ let lastLines = null;
26
+ let lastCovered = false;
27
+ const coveredByCodes = (lines) => {
28
+ if (lines !== lastLines) {
29
+ lastLines = lines;
30
+ lastCovered = (0, giveawayPrizeLines_1.prizesCoveredByGiveawayCodes)(lines, { keys });
31
+ }
32
+ return lastCovered;
33
+ };
34
+ return {
35
+ name: 'giveaway-prizes',
36
+ lineFacts(line, cart) {
37
+ if (!(0, giveawayPrizeLines_1.isGiveawayPrizeLine)(line, { keys }))
38
+ return {};
39
+ const price = (0, giveawayPrizeLines_1.prizeLinePrice)(line);
40
+ const paidByCodes = coveredByCodes(cart.lines);
41
+ return {
42
+ prize: {
43
+ nowPerUnit: price.nowPerUnit,
44
+ costsNothing: price.costsNothing || paidByCodes,
45
+ fullPrice: price.repriced || paidByCodes ? line.merchandise.price : null,
46
+ },
47
+ };
48
+ },
49
+ };
50
+ }
51
+ //# sourceMappingURL=cartExtension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cartExtension.js","sourceRoot":"","sources":["../src/cartExtension.ts"],"names":[],"mappings":";;AA0CA,wDA2BC;AArED;;;;;;;;;;;;;;;GAeG;AACH,6DAM8B;AAoB9B,SAAgB,sBAAsB,CAAC,UAAyC,EAAE;;IAChF,MAAM,IAAI,GAAG,MAAA,OAAO,CAAC,IAAI,mCAAI,wCAAmB,CAAC;IACjD,8FAA8F;IAC9F,IAAI,SAAS,GAAwC,IAAI,CAAC;IAC1D,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,MAAM,cAAc,GAAG,CAAC,KAAmC,EAAE,EAAE;QAC7D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,SAAS,GAAG,KAAK,CAAC;YAClB,WAAW,GAAG,IAAA,iDAA4B,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC;IACF,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,SAAS,CAAC,IAAI,EAAE,IAAI;YAClB,IAAI,CAAC,IAAA,wCAAmB,EAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;gBAAE,OAAO,EAAE,CAAC;YACpD,MAAM,KAAK,GAAG,IAAA,mCAAc,EAAC,IAAI,CAAC,CAAC;YACnC,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC/C,OAAO;gBACL,KAAK,EAAE;oBACL,UAAU,EAAE,KAAK,CAAC,UAAU;oBAC5B,YAAY,EAAE,KAAK,CAAC,YAAY,IAAI,WAAW;oBAC/C,SAAS,EAAE,KAAK,CAAC,QAAQ,IAAI,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;iBACzE;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -34,6 +34,7 @@ export { toCommentSegments, hasCommentLink, classifyCommentLink, toUrlPreview, d
34
34
  export { createShopifyLiveCommerce, liveProductFromShopify, chargedVariantId, AUCTION_CART_SOURCE_TYPE, WINNING_BID_KEY, WIN_INDEX_KEY, type ShopifyAttribute, type ShopifyBuyer, type ShopifyCartLineInput, type ShopifyImageTransform, type ShopifyLiveCommerce, type ShopifyLiveCommerceOptions, type ShopifyMoney, type ShopifyProductForLive, type ShopifyProductsAndCart, } from './shopifyCommerce';
35
35
  export { createShopifyLiveIdentity, type ShopifyCustomerSession, type ShopifyLiveIdentity, } from './shopifyIdentity';
36
36
  export { GIVEAWAY_CODE_PREFIX, GIVEAWAY_PRIZE_KEYS, isGiveawayCode, isGiveawayPrizeLine, prizeLinePrice, prizesCoveredByGiveawayCodes, type CartLineForGiveawayCodes, type GiveawayPrizeLineOptions, type PrizeLinePrice, } from './giveawayPrizeLines';
37
+ export { giveawayPrizeExtension, type GiveawayPrizeExtension, type GiveawayPrizeExtensionOptions, type CartLineForPrizes, } from './cartExtension';
37
38
  export { isHiddenFrom, isHiddenShow, seesHiddenShows, withoutHiddenShows } from './hiddenShows';
38
39
  export { publicName, firstNameOf, viewerNameFor, sameRoomName, type NamedCustomer } from './showNames';
39
40
  export { liveShowFor, canPlayInCard, type LiveShow, type LiveShowStatus, type SessionForCard, type SessionForShow, } from './liveShow';
@@ -70,4 +71,5 @@ export type * from './sessionTypes';
70
71
  */
71
72
  export { createOngoingLiveStore, ONGOING_LIVE_POLL_IDLE_MS, ONGOING_LIVE_POLL_LIVE_MS, type OngoingLivePolling, type OngoingLiveSnapshot, type OngoingLiveStore, } from './ongoingLive';
72
73
  export * from './react/index';
74
+ export { readsOnPastHidden, showListStatus, winsTotal, type ShowListStatus, type ShowListInput } from './showPages';
73
75
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,WAAW,EAAE,WAAW,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AAIpE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAG5F,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AAGhD,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,0BAA0B,EAC1B,wBAAwB,EACxB,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGjF,OAAO,EACL,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,iBAAiB,GAClB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,cAAc,EACd,KAAK,qBAAqB,GAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC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,aAAa,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -31,8 +31,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
31
31
  };
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
33
  exports.createShopifyLiveCommerce = exports.displayHost = exports.toUrlPreview = exports.classifyCommentLink = exports.hasCommentLink = exports.toCommentSegments = exports.replayAttributionSourceFor = exports.liveAttributionSourceFor = exports.addLiveLine = exports.replayCartAttributesFor = exports.liveCartAttributesFor = exports.REPLAY_ID_ATTRIBUTE = exports.LIVE_STREAM_ID_ATTRIBUTE = exports.MAX_VIEWER_NAME = exports.resetCompanyFlagsCache = exports.toMixerLayout = exports.isYourGiveawayWin = exports.winnerIdFromRecord = exports.rosterFromRecord = exports.giveawayForLot = exports.GIVEAWAY_ROSTER_WAIT_MS = exports.GIVEAWAY_ROSTER_RETRY_MS = exports.HOST_SELF_NAME = exports.COMMENT_HISTORY_WINDOW = exports.mergeCommentHistory = exports.toCommentHistory = exports.toPinnedComment = exports.imageUrl = exports.toEmbeddedResults = exports.toLivePollResults = exports.toLivePoll = exports.toGiveawayEntries = exports.toLiveGiveaway = exports.toLiveStreamProduct = exports.toLiveStreams = exports.toLiveStream = exports.JOIN_RETRY_BASE_MS = exports.JOIN_ATTEMPTS = exports.ZegoLoginError = exports.toProductGid = exports.DEFAULT_OFF_AIR_GRACE_MS = exports.DEFAULT_REQUEST_TIMEOUT_MS = exports.LiveSellingTimeoutError = exports.LiveSellingError = exports.liveEngine = exports.LIVE_HAPTICS_TICK_GAP_MS = exports.createLiveHaptics = exports.liveHaptics = exports.default = exports.liveSelling = void 0;
34
- exports.capabilitiesFor = exports.CART_CARD_MS = exports.REACTION_MS = exports.SOLD_CARD_MS = exports.isTheEndedGiveaway = exports.withOffAirSettled = exports.isNothingOnAir = exports.nextExpiryAt = exports.roundClosesAt = exports.deriveStatus = exports.initialSessionState = exports.sessionReducer = exports.givenAwayVariant = exports.isTheVariant = exports.classifyComment = exports.openingBidFor = exports.GOOD_CHANCE_OVER = exports.VERY_HIGH_CHANCE_OVER = exports.QUICK_BID_STEPS = exports.BID_ON_ITS_WAY_MS = exports.isYourWin = exports.lotStateFor = exports.winChance = exports.quickBids = exports.bidRefusal = exports.showLinkDestination = exports.withLotFieldsFromRecord = exports.featuredFirst = exports.canPlayInCard = exports.liveShowFor = exports.sameRoomName = exports.viewerNameFor = exports.firstNameOf = exports.publicName = exports.withoutHiddenShows = exports.seesHiddenShows = exports.isHiddenShow = exports.isHiddenFrom = exports.prizesCoveredByGiveawayCodes = exports.prizeLinePrice = exports.isGiveawayPrizeLine = exports.isGiveawayCode = exports.GIVEAWAY_PRIZE_KEYS = exports.GIVEAWAY_CODE_PREFIX = exports.createShopifyLiveIdentity = exports.WIN_INDEX_KEY = exports.WINNING_BID_KEY = exports.AUCTION_CART_SOURCE_TYPE = exports.chargedVariantId = exports.liveProductFromShopify = void 0;
35
- exports.ONGOING_LIVE_POLL_LIVE_MS = exports.ONGOING_LIVE_POLL_IDLE_MS = exports.createOngoingLiveStore = exports.COMMENT_SOURCES = exports.isLivePipSupported = exports.livePip = exports.IDLE_GIVEAWAY = exports.IDLE_AUCTION = exports.REPLAY_CAPABILITIES = exports.AUCTION_CAPABILITIES = exports.LIVE_CAPABILITIES = void 0;
34
+ exports.CART_CARD_MS = exports.REACTION_MS = exports.SOLD_CARD_MS = exports.isTheEndedGiveaway = exports.withOffAirSettled = exports.isNothingOnAir = exports.nextExpiryAt = exports.roundClosesAt = exports.deriveStatus = exports.initialSessionState = exports.sessionReducer = exports.givenAwayVariant = exports.isTheVariant = exports.classifyComment = exports.openingBidFor = exports.GOOD_CHANCE_OVER = exports.VERY_HIGH_CHANCE_OVER = exports.QUICK_BID_STEPS = exports.BID_ON_ITS_WAY_MS = exports.isYourWin = exports.lotStateFor = exports.winChance = exports.quickBids = exports.bidRefusal = exports.showLinkDestination = exports.withLotFieldsFromRecord = exports.featuredFirst = exports.canPlayInCard = exports.liveShowFor = exports.sameRoomName = exports.viewerNameFor = exports.firstNameOf = exports.publicName = exports.withoutHiddenShows = exports.seesHiddenShows = exports.isHiddenShow = exports.isHiddenFrom = exports.giveawayPrizeExtension = exports.prizesCoveredByGiveawayCodes = exports.prizeLinePrice = exports.isGiveawayPrizeLine = exports.isGiveawayCode = exports.GIVEAWAY_PRIZE_KEYS = exports.GIVEAWAY_CODE_PREFIX = exports.createShopifyLiveIdentity = exports.WIN_INDEX_KEY = exports.WINNING_BID_KEY = exports.AUCTION_CART_SOURCE_TYPE = exports.chargedVariantId = exports.liveProductFromShopify = void 0;
35
+ exports.winsTotal = exports.showListStatus = exports.readsOnPastHidden = exports.ONGOING_LIVE_POLL_LIVE_MS = exports.ONGOING_LIVE_POLL_IDLE_MS = exports.createOngoingLiveStore = exports.COMMENT_SOURCES = exports.isLivePipSupported = exports.livePip = exports.IDLE_GIVEAWAY = exports.IDLE_AUCTION = exports.REPLAY_CAPABILITIES = exports.AUCTION_CAPABILITIES = exports.LIVE_CAPABILITIES = exports.capabilitiesFor = void 0;
36
36
  // The imperative client (default + named).
37
37
  var liveSelling_1 = require("./liveSelling");
38
38
  Object.defineProperty(exports, "liveSelling", { enumerable: true, get: function () { return liveSelling_1.liveSelling; } });
@@ -124,6 +124,9 @@ Object.defineProperty(exports, "isGiveawayCode", { enumerable: true, get: functi
124
124
  Object.defineProperty(exports, "isGiveawayPrizeLine", { enumerable: true, get: function () { return giveawayPrizeLines_1.isGiveawayPrizeLine; } });
125
125
  Object.defineProperty(exports, "prizeLinePrice", { enumerable: true, get: function () { return giveawayPrizeLines_1.prizeLinePrice; } });
126
126
  Object.defineProperty(exports, "prizesCoveredByGiveawayCodes", { enumerable: true, get: function () { return giveawayPrizeLines_1.prizesCoveredByGiveawayCodes; } });
127
+ // sdk-shopify's cart page (0.14.0+): giveaway prizes on its lines.
128
+ var cartExtension_1 = require("./cartExtension");
129
+ Object.defineProperty(exports, "giveawayPrizeExtension", { enumerable: true, get: function () { return cartExtension_1.giveawayPrizeExtension; } });
127
130
  // The live show helpers (0.9.0, "SDK move 5"): rules every live app kept its own copy of. Pure, so an
128
131
  // app's own tests can load them from `dist` (`hiddenShows`, `showNames`, `liveShow`, `showLots`,
129
132
  // `showLinks`) without the native engine.
@@ -215,4 +218,8 @@ Object.defineProperty(exports, "createOngoingLiveStore", { enumerable: true, get
215
218
  Object.defineProperty(exports, "ONGOING_LIVE_POLL_IDLE_MS", { enumerable: true, get: function () { return ongoingLive_1.ONGOING_LIVE_POLL_IDLE_MS; } });
216
219
  Object.defineProperty(exports, "ONGOING_LIVE_POLL_LIVE_MS", { enumerable: true, get: function () { return ongoingLive_1.ONGOING_LIVE_POLL_LIVE_MS; } });
217
220
  __exportStar(require("./react/index"), exports);
221
+ var showPages_1 = require("./showPages");
222
+ Object.defineProperty(exports, "readsOnPastHidden", { enumerable: true, get: function () { return showPages_1.readsOnPastHidden; } });
223
+ Object.defineProperty(exports, "showListStatus", { enumerable: true, get: function () { return showPages_1.showListStatus; } });
224
+ Object.defineProperty(exports, "winsTotal", { enumerable: true, get: function () { return showPages_1.winsTotal; } });
218
225
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;AAEH,2CAA2C;AAC3C,6CAAoE;AAA3D,0GAAA,WAAW,OAAA;AAAE,sGAAA,WAAW,OAAW;AAE5C,iGAAiG;AACjG,2CAA2C;AAC3C,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,yCAA4F;AAAnF,8GAAA,iBAAiB,OAAA;AAAE,qHAAA,wBAAwB,OAAA;AAEpD,0EAA0E;AAC1E,mCAAgD;AAAvC,oGAAA,MAAM,OAAc;AAE7B,uGAAuG;AACvG,mCAMkB;AALhB,0GAAA,gBAAgB,OAAA;AAChB,iHAAA,uBAAuB,OAAA;AACvB,oH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AAA"}
@@ -21,5 +21,7 @@ export { useAuctionBidGate, SHEET_HANDOFF_MS, type AuctionBidGate, type BidBlock
21
21
  export { useGiveawayEntry, type GiveawayDraw, type UseGiveawayEntryState, type SessionForGiveaway, type UseGiveawayEntryOptions, } from './useGiveawayEntry';
22
22
  export { useGiveawayPrize, type UseGiveawayPrizeState } from './useGiveawayPrize';
23
23
  export { useAuctionWins, type AuctionWinRow, type UseAuctionWinsOptions, type UseAuctionWinsState, } from './useAuctionWins';
24
+ export { useItemsYouWonPage, useLiveHubPage, useLiveRail } from './showPagesOnDevice';
25
+ export { useItemsYouWonPageFor, useLiveHubPageFor, useLiveRailFor, SHOWS_PAGE_SIZE, type ItemsYouWonPage, type LiveHubPage, type LiveRail, type SessionForShowPages, type UseItemsYouWonPageOptions, type UseLiveHubPageOptions, } from './showPages';
24
26
  export { nativeViewTag } from '../nativeViewTag';
25
27
  //# 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,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,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M,kBAAkB,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACtF,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,GAC3B,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nativeViewTag = exports.useAuctionWins = 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;
3
+ exports.nativeViewTag = exports.SHOWS_PAGE_SIZE = exports.useLiveRailFor = exports.useLiveHubPageFor = exports.useItemsYouWonPageFor = exports.useLiveRail = exports.useLiveHubPage = exports.useItemsYouWonPage = exports.useAuctionWins = 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
4
  /**
5
5
  * React helpers for `@tiledev/sdk-apptile-live-selling` — the provider and the read hooks.
6
6
  *
@@ -53,6 +53,16 @@ var useGiveawayPrize_1 = require("./useGiveawayPrize");
53
53
  Object.defineProperty(exports, "useGiveawayPrize", { enumerable: true, get: function () { return useGiveawayPrize_1.useGiveawayPrize; } });
54
54
  var useAuctionWins_1 = require("./useAuctionWins");
55
55
  Object.defineProperty(exports, "useAuctionWins", { enumerable: true, get: function () { return useAuctionWins_1.useAuctionWins; } });
56
+ // The page models (0.11.0): Items You Won, the Live tab, a home screen's live rail.
57
+ var showPagesOnDevice_1 = require("./showPagesOnDevice");
58
+ Object.defineProperty(exports, "useItemsYouWonPage", { enumerable: true, get: function () { return showPagesOnDevice_1.useItemsYouWonPage; } });
59
+ Object.defineProperty(exports, "useLiveHubPage", { enumerable: true, get: function () { return showPagesOnDevice_1.useLiveHubPage; } });
60
+ Object.defineProperty(exports, "useLiveRail", { enumerable: true, get: function () { return showPagesOnDevice_1.useLiveRail; } });
61
+ var showPages_1 = require("./showPages");
62
+ Object.defineProperty(exports, "useItemsYouWonPageFor", { enumerable: true, get: function () { return showPages_1.useItemsYouWonPageFor; } });
63
+ Object.defineProperty(exports, "useLiveHubPageFor", { enumerable: true, get: function () { return showPages_1.useLiveHubPageFor; } });
64
+ Object.defineProperty(exports, "useLiveRailFor", { enumerable: true, get: function () { return showPages_1.useLiveRailFor; } });
65
+ Object.defineProperty(exports, "SHOWS_PAGE_SIZE", { enumerable: true, get: function () { return showPages_1.SHOWS_PAGE_SIZE; } });
56
66
  // React Native only, so it lives here rather than on the root entry.
57
67
  var nativeViewTag_1 = require("../nativeViewTag");
58
68
  Object.defineProperty(exports, "nativeViewTag", { enumerable: true, get: function () { return nativeViewTag_1.nativeViewTag; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[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ionBidGate, UseAuctionBidGateOptions } from './useAuctionBidGa
6
6
  import type { UseAuctionWinsOptions, UseAuctionWinsState } from './useAuctionWins';
7
7
  import type { LiveSessionProviderProps } from './useLiveSession';
8
8
  import type { LiveVideoTargetProps } from './LiveVideoTarget';
9
+ import { type ItemsYouWonPage, type LiveHubPage, type LiveRail, type UseItemsYouWonPageOptions, type UseLiveHubPageOptions } from './showPages';
9
10
  export { LiveSellingProvider, useLiveSelling, type LiveSellingProviderProps, type LiveSellingContextType, } from './LiveSellingProvider';
10
11
  export { useHiddenShows, type HiddenShowsForViewer } from './useHiddenShows';
11
12
  export { useOngoingLive, type UseOngoingLiveState } from './useOngoingLive';
@@ -19,6 +20,7 @@ export { useAuctionCountdown, useShowClock } from './clocks';
19
20
  export { useGiveawayEntry, type GiveawayDraw, type UseGiveawayEntryState, type SessionForGiveaway, type UseGiveawayEntryOptions, } from './useGiveawayEntry';
20
21
  export { useGiveawayPrize, type UseGiveawayPrizeState } from './useGiveawayPrize';
21
22
  export { nativeViewTag } from '../nativeViewTag';
23
+ export { useItemsYouWonPageFor, useLiveHubPageFor, useLiveRailFor, SHOWS_PAGE_SIZE, type ItemsYouWonPage, type LiveHubPage, type LiveRail, type SessionForShowPages, type UseItemsYouWonPageOptions, type UseLiveHubPageOptions, } from './showPages';
22
24
  export type { AuctionBidGate, BidBlocker, BidRefusal, UseAuctionBidGateOptions } from './useAuctionBidGate';
23
25
  export type { AuctionWinRow, UseAuctionWinsOptions, UseAuctionWinsState } from './useAuctionWins';
24
26
  export type { LiveSessionProviderProps } from './useLiveSession';
@@ -47,4 +49,10 @@ export declare function useAuctionBidGate(_options: UseAuctionBidGateOptions): A
47
49
  * mints a cart and sends the shopper to checkout — not something a preview should be able to start.
48
50
  */
49
51
  export declare function useAuctionWins<TRaw = unknown>(_options?: UseAuctionWinsOptions): UseAuctionWinsState<TRaw>;
52
+ /** The Items You Won tab over the empty wins: signed in, it says nothing was won. */
53
+ export declare function useItemsYouWonPage<TRaw = unknown>(options: UseItemsYouWonPageOptions): ItemsYouWonPage<TRaw>;
54
+ /** The Live tab over the idle session: the recordings are real, the show on air never plays here. */
55
+ export declare function useLiveHubPage(options: UseLiveHubPageOptions): LiveHubPage;
56
+ /** A home screen's live rail over the idle session. */
57
+ export declare function useLiveRail(options: UseLiveHubPageOptions): LiveRail;
50
58
  //# sourceMappingURL=index.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../src/react/index.web.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,iBAAiB,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,KAAK,EAAiB,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG9D,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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AAE,MAAM,kBAAkB,CAAC;AACjE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAoE9D,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE,wBAAwB,+FAEzE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,GAAG,OAAO,KAAK,WAAW,CAAC,IAAI,CAAC,CAElE;AAKD,0FAA0F;AAC1F,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,CAE7E;AAID,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,eAAe,+FAE1B,CAAC;AAEH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,oBAAoB,6CAExE;AAID,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,iGAAiG;AACjG,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,cAAc,CAepF;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,GAAG,OAAO,EAC3C,QAAQ,CAAC,EAAE,qBAAqB,GAC/B,mBAAmB,CAAC,IAAI,CAAC,CAe3B;AAID,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"}
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SHEET_HANDOFF_MS = exports.NativeVideoView = exports.isNativeVideoSupported = exports.nativeViewTag = 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.SHEET_HANDOFF_MS = exports.NativeVideoView = exports.isNativeVideoSupported = exports.SHOWS_PAGE_SIZE = exports.useLiveRailFor = exports.useLiveHubPageFor = exports.useItemsYouWonPageFor = exports.nativeViewTag = 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
4
  exports.LiveSessionProvider = LiveSessionProvider;
5
5
  exports.useLiveSession = useLiveSession;
6
6
  exports.useLiveShow = useLiveShow;
7
7
  exports.LiveVideoTarget = LiveVideoTarget;
8
8
  exports.useAuctionBidGate = useAuctionBidGate;
9
9
  exports.useAuctionWins = useAuctionWins;
10
+ exports.useItemsYouWonPage = useItemsYouWonPage;
11
+ exports.useLiveHubPage = useLiveHubPage;
12
+ exports.useLiveRail = useLiveRail;
10
13
  /**
11
14
  * The React layer on the **web** — real where a browser can honestly do the work, inert where it
12
15
  * cannot. Metro resolves this file in place of `./index` for web, and TypeScript reads the native
@@ -35,6 +38,7 @@ const react_1 = require("react");
35
38
  const react_native_1 = require("react-native");
36
39
  const liveShow_1 = require("../liveShow");
37
40
  const sessionTypes_1 = require("../sessionTypes");
41
+ const showPages_1 = require("./showPages");
38
42
  // Real on the web: the gateway is plain HTTP, and the engine it configures is the no-op build.
39
43
  var LiveSellingProvider_1 = require("./LiveSellingProvider");
40
44
  Object.defineProperty(exports, "LiveSellingProvider", { enumerable: true, get: function () { return LiveSellingProvider_1.LiveSellingProvider; } });
@@ -71,6 +75,12 @@ Object.defineProperty(exports, "useGiveawayPrize", { enumerable: true, get: func
71
75
  // wraps, so the honest answer costs nothing here.
72
76
  var nativeViewTag_1 = require("../nativeViewTag");
73
77
  Object.defineProperty(exports, "nativeViewTag", { enumerable: true, get: function () { return nativeViewTag_1.nativeViewTag; } });
78
+ // Real on the web over the idle session and the empty wins below (0.11.0).
79
+ var showPages_2 = require("./showPages");
80
+ Object.defineProperty(exports, "useItemsYouWonPageFor", { enumerable: true, get: function () { return showPages_2.useItemsYouWonPageFor; } });
81
+ Object.defineProperty(exports, "useLiveHubPageFor", { enumerable: true, get: function () { return showPages_2.useLiveHubPageFor; } });
82
+ Object.defineProperty(exports, "useLiveRailFor", { enumerable: true, get: function () { return showPages_2.useLiveRailFor; } });
83
+ Object.defineProperty(exports, "SHOWS_PAGE_SIZE", { enumerable: true, get: function () { return showPages_2.SHOWS_PAGE_SIZE; } });
74
84
  // ─── The session ─────────────────────────────────────────────────────────────
75
85
  /** Every action, resolved and doing nothing. There is no room to send any of it to. */
76
86
  const IDLE_ACTIONS = {
@@ -195,4 +205,17 @@ function useAuctionWins(_options) {
195
205
  checkout: async () => null,
196
206
  }), []);
197
207
  }
208
+ // ─── The page models ─────────────────────────────────────────────────────────
209
+ /** The Items You Won tab over the empty wins: signed in, it says nothing was won. */
210
+ function useItemsYouWonPage(options) {
211
+ return (0, showPages_1.useItemsYouWonPageFor)(useAuctionWins(), options);
212
+ }
213
+ /** The Live tab over the idle session: the recordings are real, the show on air never plays here. */
214
+ function useLiveHubPage(options) {
215
+ return (0, showPages_1.useLiveHubPageFor)(IDLE_SESSION, options);
216
+ }
217
+ /** A home screen's live rail over the idle session. */
218
+ function useLiveRail(options) {
219
+ return (0, showPages_1.useLiveRailFor)(IDLE_SESSION, options);
220
+ }
198
221
  //# sourceMappingURL=index.web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../src/react/index.web.ts"],"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,EAAE,IAAI,GAAG,EAAU;QACrC,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,KAAK;QAClB,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS;QACxB,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI;KAC3B,CAAC,EACF,EAAE,CACH,CAAC;AACJ,CAAC;AAED,gFAAgF;AAEhF,qFAAqF;AACrF,SAAgB,kBAAkB,CAAiB,OAAkC;IACnF,OAAO,IAAA,iCAAqB,EAAC,cAAc,EAAQ,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC;AAED,qGAAqG;AACrG,SAAgB,cAAc,CAAC,OAA8B;IAC3D,OAAO,IAAA,6BAAiB,EAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AAED,uDAAuD;AACvD,SAAgB,WAAW,CAAC,OAA8B;IACxD,OAAO,IAAA,0BAAc,EAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,102 @@
1
+ import { type SessionForCard } from '../liveShow';
2
+ import { type ShowListStatus } from '../showPages';
3
+ import type { LiveStream, Replay } from '../types';
4
+ import type { AuctionWinRow, UseAuctionWinsState } from './useAuctionWins';
5
+ /** Recordings per read: the gateway's own page size. */
6
+ export declare const SHOWS_PAGE_SIZE = 20;
7
+ export interface UseItemsYouWonPageOptions {
8
+ /** Someone is signed in (the wins are on the customer's record): sdk-shopify's `useCustomer().loggedIn`. */
9
+ signedIn: boolean;
10
+ /** A stored session is still being read on app open (`useCustomer().restoring`). */
11
+ restoring?: boolean;
12
+ /** Checkout is starting (an `initiateCheckout`): what is being paid for. */
13
+ onCheckoutStarted?: (wins: {
14
+ totalItems: number;
15
+ totalValue: number;
16
+ currency: string;
17
+ }) => void;
18
+ /** The wins' own cart is ready: the app opens its checkout page on `checkoutUrl`. */
19
+ onCheckoutReady?: (checkout: {
20
+ checkoutUrl: string;
21
+ cartId?: string;
22
+ }) => void;
23
+ /** The cart couldn't be built; `message` says so (the SDK's words). */
24
+ onCheckoutFailed?: (message: string) => void;
25
+ }
26
+ export interface ItemsYouWonPage<TRaw = unknown> {
27
+ /**
28
+ * `signedOut` (and not reading a stored session), `loading` (that session, or the first read with
29
+ * nothing shown), `failed` (with nothing to show), `empty` (nothing won), `ready`.
30
+ */
31
+ status: 'signedOut' | 'loading' | 'failed' | 'empty' | 'ready';
32
+ rows: AuctionWinRow<TRaw>[];
33
+ /** The sum of the bids, in the wins' currency: nothing comes off (prizes are free). */
34
+ total: {
35
+ amount: string;
36
+ currencyCode: string;
37
+ };
38
+ /** A read is running with wins on screen (a pull). */
39
+ refreshing: boolean;
40
+ /** Reads the wins again (a pull, the failed state's Try again). */
41
+ refresh: () => void;
42
+ /** Call each time the tab comes into view: reads the wins again when signed in. Keeps one identity. */
43
+ viewed: () => void;
44
+ /** Builds the wins' own cart (each lot at its bid, prizes free), then `onCheckoutReady`. */
45
+ checkout: () => void;
46
+ checkingOut: boolean;
47
+ }
48
+ /** The Items You Won tab, over `useAuctionWins`' state. */
49
+ export declare function useItemsYouWonPageFor<TRaw = unknown>(wins: UseAuctionWinsState<TRaw>, options: UseItemsYouWonPageOptions): ItemsYouWonPage<TRaw>;
50
+ /** What the page models read of the app's live session. */
51
+ export type SessionForShowPages = SessionForCard & {
52
+ viewerCount: number;
53
+ };
54
+ export interface UseLiveHubPageOptions {
55
+ /** The tab is the screen on show (`useIsFocused()`): only then does its card play the show. */
56
+ screenOnShow: boolean;
57
+ }
58
+ export interface LiveHubPage {
59
+ /** The show on air (the app-wide `useOngoingLive`), or null. */
60
+ onAir: LiveStream | null;
61
+ /** How many are watching, once the session is in the show's room and has said; else null. */
62
+ viewerCount: number | null;
63
+ /** The card may play the show, muted (`canPlayInCard`): one picture at a time. */
64
+ videoActive: boolean;
65
+ /** The recordings this viewer can see, playable only, in the archive's order. */
66
+ replays: Replay[];
67
+ /** Where the recordings stand (`showListStatus`): never `empty` or `failed` while a show is on air. */
68
+ status: ShowListStatus;
69
+ /** The next page is on its way, with recordings on screen. */
70
+ loadingMore: boolean;
71
+ /** The next page, half a screen from the end: one ask at a time, none after the archive's end. */
72
+ loadMore: () => void;
73
+ /** A pull is running. */
74
+ refreshing: boolean;
75
+ /** Reads the show on air and the recordings' first page again. */
76
+ pullToRefresh: () => void;
77
+ /** Reads both again, without the pull's spinner (the failed state's Try again). */
78
+ refresh: () => void;
79
+ /**
80
+ * Call each time the tab comes into view: reads the show on air again, and on a return visit the
81
+ * recordings' first page too, unless the shopper has scrolled past it (a first-page read drops the
82
+ * pages below, and their place). Keeps one identity.
83
+ */
84
+ viewed: () => void;
85
+ }
86
+ /** The Live tab over a session. */
87
+ export declare function useLiveHubPageFor(session: SessionForShowPages, { screenOnShow }: UseLiveHubPageOptions): LiveHubPage;
88
+ export interface LiveRail {
89
+ /** The show on air, or null. */
90
+ onAir: LiveStream | null;
91
+ /** The rail's card may play the show, muted (`canPlayInCard`). */
92
+ videoActive: boolean;
93
+ /** The recent recordings, playable only. */
94
+ replays: Replay[];
95
+ /** Reads the show on air and the first page of recordings again (with the screen's own pull). */
96
+ refresh: () => Promise<void>;
97
+ /** Call each time the screen comes into view: reads the show on air again (the recordings keep their place). */
98
+ viewed: () => void;
99
+ }
100
+ /** A home screen's live rail over a session. */
101
+ export declare function useLiveRailFor(session: SessionForCard, { screenOnShow }: UseLiveHubPageOptions): LiveRail;
102
+ //# sourceMappingURL=showPages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showPages.d.ts","sourceRoot":"","sources":["../../src/react/showPages.ts"],"names":[],"mappings":"AASA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAgD,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,KA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C,IAAI,CAAC,CAAC;IAC7B,gHAAgH;IAChH,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,gDAAgD;AAChD,wBAAgB,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,YAAY,EAAE,EAAE,qBAAqB,GAAG,QAAQ,CAiBzG"}
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SHOWS_PAGE_SIZE = void 0;
4
+ exports.useItemsYouWonPageFor = useItemsYouWonPageFor;
5
+ exports.useLiveHubPageFor = useLiveHubPageFor;
6
+ exports.useLiveRailFor = useLiveRailFor;
7
+ /**
8
+ * Live selling's page models (0.11.0, moved from amore-v2's page hooks): the Items You Won tab, the Live
9
+ * tab (`LiveHub`) and a home screen's live rail. Each is the `…For` hook here, given the session or the
10
+ * wins it reads, so the web entry can hand it its idle stand-ins; the app calls the plain names
11
+ * (`useItemsYouWonPage`, `useLiveHubPage`, `useLiveRail`), which read them itself. No words, no
12
+ * formatting, no navigation: where the shopper goes is the app's `on…` option.
13
+ */
14
+ const react_1 = require("react");
15
+ const liveShow_1 = require("../liveShow");
16
+ const showPages_1 = require("../showPages");
17
+ const LiveSellingProvider_1 = require("./LiveSellingProvider");
18
+ const useOngoingLive_1 = require("./useOngoingLive");
19
+ const useReplays_1 = require("./useReplays");
20
+ /** Recordings per read: the gateway's own page size. */
21
+ exports.SHOWS_PAGE_SIZE = 20;
22
+ const CHECKOUT_FAILED = 'Could not start checkout. Please try again.';
23
+ /** The Items You Won tab, over `useAuctionWins`' state. */
24
+ function useItemsYouWonPageFor(wins, options) {
25
+ const optionsRef = (0, react_1.useRef)(options);
26
+ optionsRef.current = options;
27
+ const { refresh: readWins, checkout: buildCart } = wins;
28
+ const total = (0, react_1.useMemo)(() => (0, showPages_1.winsTotal)(wins.rows), [wins.rows]);
29
+ const hasWins = wins.rows.length > 0;
30
+ const viewed = (0, react_1.useCallback)(() => {
31
+ if (optionsRef.current.signedIn)
32
+ readWins();
33
+ }, [readWins]);
34
+ const rowsRef = (0, react_1.useRef)(wins.rows);
35
+ rowsRef.current = wins.rows;
36
+ const checkout = (0, react_1.useCallback)(() => {
37
+ var _a, _b;
38
+ const rows = rowsRef.current;
39
+ const totals = (0, showPages_1.winsTotal)(rows);
40
+ (_b = (_a = optionsRef.current).onCheckoutStarted) === null || _b === void 0 ? void 0 : _b.call(_a, { totalItems: rows.length, totalValue: Number(totals.amount), currency: totals.currencyCode });
41
+ void (async () => {
42
+ var _a, _b, _c, _d;
43
+ const cart = await buildCart();
44
+ if (!cart) {
45
+ (_b = (_a = optionsRef.current).onCheckoutFailed) === null || _b === void 0 ? void 0 : _b.call(_a, CHECKOUT_FAILED);
46
+ return;
47
+ }
48
+ (_d = (_c = optionsRef.current).onCheckoutReady) === null || _d === void 0 ? void 0 : _d.call(_c, cart);
49
+ })();
50
+ }, [buildCart]);
51
+ const { signedIn, restoring = false } = options;
52
+ let status;
53
+ if (!signedIn && !restoring)
54
+ status = 'signedOut';
55
+ else if (restoring || (wins.loading && !hasWins))
56
+ status = 'loading';
57
+ else if (hasWins)
58
+ status = 'ready';
59
+ else
60
+ status = wins.error ? 'failed' : 'empty';
61
+ return {
62
+ status,
63
+ rows: wins.rows,
64
+ total,
65
+ refreshing: wins.loading && hasWins,
66
+ refresh: readWins,
67
+ viewed,
68
+ checkout,
69
+ checkingOut: wins.checkingOut,
70
+ };
71
+ }
72
+ /** The Live tab over a session. */
73
+ function useLiveHubPageFor(session, { screenOnShow }) {
74
+ var _a;
75
+ const { ready } = (0, LiveSellingProvider_1.useLiveSelling)();
76
+ const onAirRead = (0, useOngoingLive_1.useOngoingLive)();
77
+ const recordings = (0, useReplays_1.useReplays)({ pageSize: exports.SHOWS_PAGE_SIZE, playableOnly: true });
78
+ const { refresh: refreshOnAir } = onAirRead;
79
+ const { refresh: refreshRecordings, loadMore: readNextPage, hasRead, hasMore, loading, error } = recordings;
80
+ const shownCount = recordings.replays.length;
81
+ const onAir = onAirRead.liveNow;
82
+ const sessionInTheRoom = !!onAir && ((_a = session.stream) === null || _a === void 0 ? void 0 : _a.streamingId) === onAir.streamingId;
83
+ const viewerCount = sessionInTheRoom && session.viewerCount > 0 ? session.viewerCount : null;
84
+ // One ask at a time: `useReplays` moves its offset with every answer, so two asks would skip a page.
85
+ // Not after a first read that failed with nothing to show: the failed state's Try again reads again.
86
+ const [loadingNextPage, setLoadingNextPage] = (0, react_1.useState)(false);
87
+ const askingForNextPage = (0, react_1.useRef)(false);
88
+ const loadMore = (0, react_1.useCallback)(() => {
89
+ if (askingForNextPage.current || !ready || !hasRead || !hasMore || loading || (!!error && shownCount === 0))
90
+ return;
91
+ askingForNextPage.current = true;
92
+ setLoadingNextPage(true);
93
+ void readNextPage().finally(() => {
94
+ askingForNextPage.current = false;
95
+ setLoadingNextPage(false);
96
+ });
97
+ }, [ready, hasRead, hasMore, loading, error, shownCount, readNextPage]);
98
+ // Everything read so far was hidden from this viewer and the archive goes on: read on.
99
+ const readingOn = (0, showPages_1.readsOnPastHidden)({ hasRead, shownCount, hasMore, failed: !!error });
100
+ (0, react_1.useEffect)(() => {
101
+ if (readingOn && !loading)
102
+ loadMore();
103
+ }, [readingOn, loading, loadMore]);
104
+ const refreshBoth = (0, react_1.useCallback)(() => Promise.all([refreshOnAir(), refreshRecordings()]), [refreshOnAir, refreshRecordings]);
105
+ const [refreshing, setRefreshing] = (0, react_1.useState)(false);
106
+ const pullToRefresh = (0, react_1.useCallback)(() => {
107
+ setRefreshing(true);
108
+ void refreshBoth().finally(() => setRefreshing(false));
109
+ }, [refreshBoth]);
110
+ const refresh = (0, react_1.useCallback)(() => void refreshBoth(), [refreshBoth]);
111
+ const latest = (0, react_1.useRef)({ ready, loading, shownCount, refreshOnAir, refreshRecordings });
112
+ latest.current = { ready, loading, shownCount, refreshOnAir, refreshRecordings };
113
+ const visitedBefore = (0, react_1.useRef)(false);
114
+ const viewed = (0, react_1.useCallback)(() => {
115
+ const firstVisit = !visitedBefore.current;
116
+ visitedBefore.current = true;
117
+ const now = latest.current;
118
+ if (!now.ready)
119
+ return; // The reads start by themselves once the SDK is ready.
120
+ void now.refreshOnAir();
121
+ // The first visit's recordings are `useReplays`' own first read.
122
+ if (!firstVisit && !now.loading && now.shownCount <= exports.SHOWS_PAGE_SIZE)
123
+ void now.refreshRecordings();
124
+ }, []);
125
+ return {
126
+ onAir,
127
+ viewerCount,
128
+ videoActive: (0, liveShow_1.canPlayInCard)({ session, show: onAir, screenOnShow }),
129
+ replays: recordings.replays,
130
+ status: (0, showPages_1.showListStatus)({ hasRead, loading, shownCount, hasMore, failed: !!error, onAir: !!onAir }),
131
+ loadingMore: loadingNextPage && shownCount > 0,
132
+ loadMore,
133
+ refreshing,
134
+ pullToRefresh,
135
+ refresh,
136
+ viewed,
137
+ };
138
+ }
139
+ /** A home screen's live rail over a session. */
140
+ function useLiveRailFor(session, { screenOnShow }) {
141
+ const { liveNow, refresh: refreshOnAir } = (0, useOngoingLive_1.useOngoingLive)();
142
+ const { replays, refresh: refreshRecordings } = (0, useReplays_1.useReplays)({ pageSize: exports.SHOWS_PAGE_SIZE, playableOnly: true });
143
+ const refresh = (0, react_1.useCallback)(() => Promise.all([refreshOnAir(), refreshRecordings()]).then(() => undefined), [refreshOnAir, refreshRecordings]);
144
+ const viewed = (0, react_1.useCallback)(() => {
145
+ void refreshOnAir();
146
+ }, [refreshOnAir]);
147
+ return {
148
+ onAir: liveNow,
149
+ videoActive: (0, liveShow_1.canPlayInCard)({ session, show: liveNow, screenOnShow }),
150
+ replays,
151
+ refresh,
152
+ viewed,
153
+ };
154
+ }
155
+ //# sourceMappingURL=showPages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showPages.js","sourceRoot":"","sources":["../../src/react/showPages.ts"],"names":[],"mappings":";;;AA0DA,sDA+CC;AA0CD,8CAkEC;AAkBD,wCAiBC;AAxPD;;;;;;GAMG;AACH,iCAA0E;AAE1E,0CAAiE;AACjE,4CAAiG;AA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AAgD;AAChD,SAAgB,cAAc,CAAC,OAAuB,EAAE,EAAE,YAAY,EAAyB;IAC7F,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC5D,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,GAAG,IAAA,uBAAU,EAAC,EAAE,QAAQ,EAAE,uBAAe,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9G,MAAM,OAAO,GAAG,IAAA,mBAAW,EACzB,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,EAC9E,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAClC,CAAC;IACF,MAAM,MAAM,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC9B,KAAK,YAAY,EAAE,CAAC;IACtB,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IACnB,OAAO;QACL,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,IAAA,wBAAa,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;QACpE,OAAO;QACP,OAAO;QACP,MAAM;KACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The page models on a device: each reads the real wins or the app's live session. The web entry
3
+ * (`index.web.ts`) builds the same three over its idle stand-ins.
4
+ */
5
+ import { type ItemsYouWonPage, type LiveHubPage, type LiveRail, type UseItemsYouWonPageOptions, type UseLiveHubPageOptions } from './showPages';
6
+ /**
7
+ * The Items You Won tab (0.11.0): the lots and prizes the shopper won and hasn't paid for
8
+ * (`useAuctionWins`), its states, and its checkout on a cart of its own.
9
+ */
10
+ export declare function useItemsYouWonPage<TRaw = unknown>(options: UseItemsYouWonPageOptions): ItemsYouWonPage<TRaw>;
11
+ /**
12
+ * The Live tab (0.11.0): the show on air, playing muted on its card when it may, and the recordings,
13
+ * paged through the whole archive, refreshed on each visit and on a pull.
14
+ */
15
+ export declare function useLiveHubPage(options: UseLiveHubPageOptions): LiveHubPage;
16
+ /** A home screen's live rail (0.11.0): the show on air and the recent recordings. */
17
+ export declare function useLiveRail(options: UseLiveHubPageOptions): LiveRail;
18
+ //# sourceMappingURL=showPagesOnDevice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showPagesOnDevice.d.ts","sourceRoot":"","sources":["../../src/react/showPagesOnDevice.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC3B,MAAM,aAAa,CAAC;AAIrB;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,GAAG,OAAO,EAAE,OAAO,EAAE,yBAAyB,GAAG,eAAe,CAAC,IAAI,CAAC,CAE5G;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,WAAW,CAE1E;AAED,qFAAqF;AACrF,wBAAgB,WAAW,CAAC,OAAO,EAAE,qBAAqB,GAAG,QAAQ,CAEpE"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useItemsYouWonPage = useItemsYouWonPage;
4
+ exports.useLiveHubPage = useLiveHubPage;
5
+ exports.useLiveRail = useLiveRail;
6
+ /**
7
+ * The page models on a device: each reads the real wins or the app's live session. The web entry
8
+ * (`index.web.ts`) builds the same three over its idle stand-ins.
9
+ */
10
+ const showPages_1 = require("./showPages");
11
+ const useAuctionWins_1 = require("./useAuctionWins");
12
+ const useLiveSession_1 = require("./useLiveSession");
13
+ /**
14
+ * The Items You Won tab (0.11.0): the lots and prizes the shopper won and hasn't paid for
15
+ * (`useAuctionWins`), its states, and its checkout on a cart of its own.
16
+ */
17
+ function useItemsYouWonPage(options) {
18
+ return (0, showPages_1.useItemsYouWonPageFor)((0, useAuctionWins_1.useAuctionWins)(), options);
19
+ }
20
+ /**
21
+ * The Live tab (0.11.0): the show on air, playing muted on its card when it may, and the recordings,
22
+ * paged through the whole archive, refreshed on each visit and on a pull.
23
+ */
24
+ function useLiveHubPage(options) {
25
+ return (0, showPages_1.useLiveHubPageFor)((0, useLiveSession_1.useLiveSession)(), options);
26
+ }
27
+ /** A home screen's live rail (0.11.0): the show on air and the recent recordings. */
28
+ function useLiveRail(options) {
29
+ return (0, showPages_1.useLiveRailFor)((0, useLiveSession_1.useLiveSession)(), options);
30
+ }
31
+ //# sourceMappingURL=showPagesOnDevice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showPagesOnDevice.js","sourceRoot":"","sources":["../../src/react/showPagesOnDevice.ts"],"names":[],"mappings":";;AAqBA,gDAEC;AAMD,wCAEC;AAGD,kCAEC;AApCD;;;GAGG;AACH,2CASqB;AACrB,qDAAkD;AAClD,qDAAkD;AAElD;;;GAGG;AACH,SAAgB,kBAAkB,CAAiB,OAAkC;IACnF,OAAO,IAAA,iCAAqB,EAAC,IAAA,+BAAc,GAAQ,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAC,OAA8B;IAC3D,OAAO,IAAA,6BAAiB,EAAC,IAAA,+BAAc,GAAE,EAAE,OAAO,CAAC,CAAC;AACtD,CAAC;AAED,qFAAqF;AACrF,SAAgB,WAAW,CAAC,OAA8B;IACxD,OAAO,IAAA,0BAAc,EAAC,IAAA,+BAAc,GAAE,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The rules behind live selling's page models (0.11.0, moved from amore-v2's page hooks), without
3
+ * React: where a list of shows stands, and the auction wins' total. The hooks are in `react/`.
4
+ */
5
+ /** Where the Live tab's recordings stand, for a page that shows one state at a time. */
6
+ export type ShowListStatus = 'loading' | 'empty' | 'failed' | 'ready';
7
+ export interface ShowListInput {
8
+ /** The recordings' first read has finished (`useReplays().hasRead`). */
9
+ hasRead: boolean;
10
+ /** A read is running. */
11
+ loading: boolean;
12
+ /** How many recordings this viewer can see. */
13
+ shownCount: number;
14
+ /** The archive goes on (`hasMore`). */
15
+ hasMore: boolean;
16
+ /** The last read failed. */
17
+ failed: boolean;
18
+ /** A show is on air: the page is never empty or failed while one is. */
19
+ onAir: boolean;
20
+ }
21
+ /**
22
+ * Everything read so far was left out (shows hidden from this viewer) and the archive goes on: the
23
+ * page reads on by itself rather than say there are no shows.
24
+ */
25
+ export declare function readsOnPastHidden({ hasRead, shownCount, hasMore, failed }: Omit<ShowListInput, 'loading' | 'onAir'>): boolean;
26
+ /**
27
+ * - `loading`: the first read, a read with nothing shown yet, or reading on past hidden shows.
28
+ * - `empty` / `failed`: nothing to show after reading, kept apart (a retry where there is nothing to
29
+ * show would say the app is broken); never while a show is on air, so the tab never says "No shows
30
+ * yet" over a running show.
31
+ * - `ready`: anything else.
32
+ */
33
+ export declare function showListStatus(input: ShowListInput): ShowListStatus;
34
+ /** The sum of the winning bids as money, in the wins' currency (a lot's product's), else `fallbackCurrency`. */
35
+ export declare function winsTotal(rows: readonly {
36
+ winningBid: number;
37
+ product: {
38
+ currencyCode?: string | null;
39
+ };
40
+ }[], fallbackCurrency?: string): {
41
+ amount: string;
42
+ currencyCode: string;
43
+ };
44
+ //# sourceMappingURL=showPages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showPages.d.ts","sourceRoot":"","sources":["../src/showPages.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wFAAwF;AACxF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5B,wEAAwE;IACxE,OAAO,EAAE,OAAO,CAAC;IACjB,yBAAyB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,4BAA4B;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,wEAAwE;IACxE,KAAK,EAAE,OAAO,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,GAAG,OAAO,CAAC,GAAG,OAAO,CAE7H;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,cAAc,CAKnE;AAED,gHAAgH;AAChH,wBAAgB,SAAS,CACvB,IAAI,EAAE,SAAS;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAA;CAAE,EAAE,EAClF,gBAAgB,SAAQ,GACvB;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAG1C"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /**
3
+ * The rules behind live selling's page models (0.11.0, moved from amore-v2's page hooks), without
4
+ * React: where a list of shows stands, and the auction wins' total. The hooks are in `react/`.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.readsOnPastHidden = readsOnPastHidden;
8
+ exports.showListStatus = showListStatus;
9
+ exports.winsTotal = winsTotal;
10
+ /**
11
+ * Everything read so far was left out (shows hidden from this viewer) and the archive goes on: the
12
+ * page reads on by itself rather than say there are no shows.
13
+ */
14
+ function readsOnPastHidden({ hasRead, shownCount, hasMore, failed }) {
15
+ return shownCount === 0 && hasRead && hasMore && !failed;
16
+ }
17
+ /**
18
+ * - `loading`: the first read, a read with nothing shown yet, or reading on past hidden shows.
19
+ * - `empty` / `failed`: nothing to show after reading, kept apart (a retry where there is nothing to
20
+ * show would say the app is broken); never while a show is on air, so the tab never says "No shows
21
+ * yet" over a running show.
22
+ * - `ready`: anything else.
23
+ */
24
+ function showListStatus(input) {
25
+ const firstLoad = !input.hasRead || (input.loading && input.shownCount === 0) || readsOnPastHidden(input);
26
+ if (firstLoad)
27
+ return 'loading';
28
+ if (input.shownCount > 0 || input.onAir)
29
+ return 'ready';
30
+ return input.failed ? 'failed' : 'empty';
31
+ }
32
+ /** The sum of the winning bids as money, in the wins' currency (a lot's product's), else `fallbackCurrency`. */
33
+ function winsTotal(rows, fallbackCurrency = 'USD') {
34
+ var _a;
35
+ const total = rows.reduce((sum, row) => sum + (Number.isFinite(row.winningBid) ? row.winningBid : 0), 0);
36
+ return { amount: total.toFixed(2), currencyCode: ((_a = rows[0]) === null || _a === void 0 ? void 0 : _a.product.currencyCode) || fallbackCurrency };
37
+ }
38
+ //# sourceMappingURL=showPages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"showPages.js","sourceRoot":"","sources":["../src/showPages.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAwBH,8CAEC;AASD,wCAKC;AAGD,8BAMC;AA7BD;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAA4C;IAClH,OAAO,UAAU,KAAK,CAAC,IAAI,OAAO,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC;AAC3D,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,KAAoB;IACjD,MAAM,SAAS,GAAG,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,UAAU,KAAK,CAAC,CAAC,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC1G,IAAI,SAAS;QAAE,OAAO,SAAS,CAAC;IAChC,IAAI,KAAK,CAAC,UAAU,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK;QAAE,OAAO,OAAO,CAAC;IACxD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;AAC3C,CAAC;AAED,gHAAgH;AAChH,SAAgB,SAAS,CACvB,IAAkF,EAClF,gBAAgB,GAAG,KAAK;;IAExB,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACzG,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAA,MAAA,IAAI,CAAC,CAAC,CAAC,0CAAE,OAAO,CAAC,YAAY,KAAI,gBAAgB,EAAE,CAAC;AACvG,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiledev/sdk-apptile-live-selling",
3
- "version": "0.9.5",
3
+ "version": "0.11.0",
4
4
  "description": "Live selling, auctions and giveaways for React Native — the Apptile live-selling gateway as a typed singleton, a Zego room engine behind a platform boundary, an assembled session state machine, and system picture-in-picture with its own config plugin. Commerce comes from an adapter.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,