@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.
Files changed (76) hide show
  1. package/README.md +30 -8
  2. package/dist/clipsPage.d.ts +29 -0
  3. package/dist/clipsPage.d.ts.map +1 -0
  4. package/dist/clipsPage.js +49 -0
  5. package/dist/clipsPage.js.map +1 -0
  6. package/dist/index.d.ts +4 -2
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +23 -2
  9. package/dist/index.js.map +1 -1
  10. package/dist/linkLots.d.ts +64 -0
  11. package/dist/linkLots.d.ts.map +1 -0
  12. package/dist/linkLots.js +84 -0
  13. package/dist/linkLots.js.map +1 -0
  14. package/dist/livePages.d.ts +91 -4
  15. package/dist/livePages.d.ts.map +1 -1
  16. package/dist/livePages.js +101 -4
  17. package/dist/livePages.js.map +1 -1
  18. package/dist/pageOptions.d.ts +24 -6
  19. package/dist/pageOptions.d.ts.map +1 -1
  20. package/dist/pageOptions.js +20 -3
  21. package/dist/pageOptions.js.map +1 -1
  22. package/dist/pageTypes.d.ts +58 -0
  23. package/dist/pageTypes.d.ts.map +1 -1
  24. package/dist/react/LiveSellingProvider.d.ts +11 -3
  25. package/dist/react/LiveSellingProvider.d.ts.map +1 -1
  26. package/dist/react/LiveSellingProvider.js +26 -8
  27. package/dist/react/LiveSellingProvider.js.map +1 -1
  28. package/dist/react/index.d.ts +3 -1
  29. package/dist/react/index.d.ts.map +1 -1
  30. package/dist/react/index.js +6 -1
  31. package/dist/react/index.js.map +1 -1
  32. package/dist/react/index.web.d.ts +3 -1
  33. package/dist/react/index.web.d.ts.map +1 -1
  34. package/dist/react/index.web.js +7 -1
  35. package/dist/react/index.web.js.map +1 -1
  36. package/dist/react/shopifyProviders.d.ts +4 -3
  37. package/dist/react/shopifyProviders.d.ts.map +1 -1
  38. package/dist/react/shopifyProviders.js +6 -4
  39. package/dist/react/shopifyProviders.js.map +1 -1
  40. package/dist/react/useAccountName.d.ts +8 -0
  41. package/dist/react/useAccountName.d.ts.map +1 -0
  42. package/dist/react/useAccountName.js +49 -0
  43. package/dist/react/useAccountName.js.map +1 -0
  44. package/dist/react/useClipsPage.d.ts +47 -0
  45. package/dist/react/useClipsPage.d.ts.map +1 -0
  46. package/dist/react/useClipsPage.js +130 -0
  47. package/dist/react/useClipsPage.js.map +1 -0
  48. package/dist/react/useLiveAuction.d.ts +5 -3
  49. package/dist/react/useLiveAuction.d.ts.map +1 -1
  50. package/dist/react/useLiveAuction.js +10 -5
  51. package/dist/react/useLiveAuction.js.map +1 -1
  52. package/dist/react/useLiveChat.d.ts +42 -7
  53. package/dist/react/useLiveChat.d.ts.map +1 -1
  54. package/dist/react/useLiveChat.js +90 -12
  55. package/dist/react/useLiveChat.js.map +1 -1
  56. package/dist/react/useLiveGiveawaysAndPolls.d.ts +14 -3
  57. package/dist/react/useLiveGiveawaysAndPolls.d.ts.map +1 -1
  58. package/dist/react/useLiveGiveawaysAndPolls.js +56 -11
  59. package/dist/react/useLiveGiveawaysAndPolls.js.map +1 -1
  60. package/dist/react/useLivePage.d.ts +22 -1
  61. package/dist/react/useLivePage.d.ts.map +1 -1
  62. package/dist/react/useLivePage.js +51 -11
  63. package/dist/react/useLivePage.js.map +1 -1
  64. package/dist/react/useLiveShop.d.ts +25 -5
  65. package/dist/react/useLiveShop.d.ts.map +1 -1
  66. package/dist/react/useLiveShop.js +65 -19
  67. package/dist/react/useLiveShop.js.map +1 -1
  68. package/dist/react/useReplayPage.d.ts +20 -4
  69. package/dist/react/useReplayPage.d.ts.map +1 -1
  70. package/dist/react/useReplayPage.js +94 -33
  71. package/dist/react/useReplayPage.js.map +1 -1
  72. package/dist/showNames.d.ts +11 -0
  73. package/dist/showNames.d.ts.map +1 -1
  74. package/dist/showNames.js +23 -1
  75. package/dist/showNames.js.map +1 -1
  76. package/package.json +1 -1
package/README.md CHANGED
@@ -448,11 +448,11 @@ const rail = useLiveRail({ screenOnShow: useIsFocused() });
448
448
  hidden from this viewer rather than say there are none. On the web, the three run over the idle session
449
449
  and empty wins.
450
450
 
451
- ### The Live and Replay pages (0.14.0)
451
+ ### The Live, Replay and Clips pages (0.14.0, 0.15.0)
452
452
 
453
- The Live screen and the Replay screen as page models, moved from amore-v2 so an app built on it keeps
454
- no copy: the screen and each tile's wiring call the same hook, and spread its fields into the tiles.
455
- Built for an app on sdk-shopify.
453
+ The Live screen, the Replay screen and (0.15.0) the Clips page as page models, moved from amore-v2 so an
454
+ app built on it keeps no copy: the screen and each tile's wiring call the same hook, and spread its
455
+ fields into the tiles. Built for an app on sdk-shopify.
456
456
 
457
457
  ```tsx
458
458
  import {
@@ -471,6 +471,12 @@ const routes: LiveSellingRoutes = {
471
471
  openCart: ({ itemsYouWon }, nav) => nav.navigate('Cart', itemsYouWon ? { screen: 'ItemsYouWon' } : undefined),
472
472
  openVariantPage: (params, nav) => nav.navigate('VariantSelector', params),
473
473
  openSignIn: (method, nav) => nav.navigate('SignIn', { method }),
474
+ // 0.15.0, optional: a link from a show (https only), the show already in the bubble. Without it,
475
+ // links are words.
476
+ openLink: (url, title, nav) => {
477
+ const screen = screenForLink(url, title); // the app's: its product, collection or web page
478
+ if (screen) nav.navigate(screen.route, screen.params);
479
+ },
474
480
  sheets: ['VariantSelector', 'SignIn'],
475
481
  };
476
482
 
@@ -482,6 +488,8 @@ const routes: LiveSellingRoutes = {
482
488
  track={analytics.track}
483
489
  onWarning={captureWarning}
484
490
  shopName={APP_NAME}
491
+ // 0.15.0: the names nobody watching may go by, from a list the app publishes (`blockedNamesFrom`).
492
+ blockedNames={blockedNamesFrom(publishedBlockedNames)}
485
493
  >
486
494
  <ShopifyLiveSessionProvider>
487
495
  <ReplayPlayerProvider>
@@ -495,13 +503,16 @@ const routes: LiveSellingRoutes = {
495
503
 
496
504
  ```tsx
497
505
  // The Live screen, and each of its tiles' wiring:
498
- const page = useLivePage(); // page.player, page.header, page.chat.{comments, commentBox, …}
499
- const shop = useLiveShop(); // shop.productCard, shop.shopButton, shop.soldChips, shop.cartChips
506
+ const page = useLivePage(); // page.player, page.header, page.chat.{comments, commentBox, …}, page.openLink
507
+ const shop = useLiveShop({ openLink: page.openLink }); // shop.productCard, shopButton, soldChips, cartChips
500
508
  const auction = useLiveAuction({ openItemsYouWon: page.header.onCart });
501
509
  const giveawaysAndPolls = useLiveGiveawaysAndPolls();
502
510
 
503
511
  // The Replay screen, and each of its tiles' wiring:
504
512
  const replay = useReplayPage(); // replay.player, header, controls, nowCard, comments, shopBar, missing
513
+
514
+ // The Clips page (0.15.0), and each of its tiles' wiring:
515
+ const clips = useClipsPage(); // clips.reel (the reel tile), clips.header, clips.hasReel, clips.isFocused
505
516
  ```
506
517
 
507
518
  - **Routes stay the app's.** A route taken inside a screen is handed that screen's navigation (to
@@ -515,8 +526,19 @@ const replay = useReplayPage(); // replay.player, header, controls, nowCard, c
515
526
  - **The variant page** gets `VariantPageParams` (a handle, a show's credit, `beingAuctioned`). It
516
527
  reports a landed add with `reportShowAdd(credit, track, product, variant)`; product grids elsewhere
517
528
  get sdk-shopify's quick-add options from `showQuickAddOptions(openVariantPage)`.
518
- - **The tiles' types** (`LiveFeaturedProduct`, `LiveAuctionLot`, `ReplayNowProduct`…) are this
519
- package's, so a tile imports them from here.
529
+ - **Links from a show** (0.15.0): a host's or moderator's link in the chat, and lots the host added as
530
+ web addresses (`LiveShopLink`, `ReplayShopLink`: in the Shop sheet among the products, featured on the
531
+ card, among an auction's lots, on screen in a recording). Only an https address opens (`opensInApp`),
532
+ through `routes.openLink`, with the show in the bubble; without that route they are words.
533
+ - **Names** (0.15.0): a signed-in shopper whose account has no first name is asked once, by a comment
534
+ or a giveaway entry, and the name goes on the account (`useAccountName`, sdk-shopify's
535
+ `updateProfile`); the team's names (`blockedNames`) are refused as they are typed. A comment box can
536
+ send a signed-out shopper to sign in instead ("Sign in to comment": `signedOut`, `onSignInToComment`,
537
+ `keyboardRequest`).
538
+ - **The Live header** gets the cart hold's end times (`header.holdEndTimes`, 0.15.0); **a tap on the
539
+ Replay video** pauses and plays (`player.paused`, 0.15.0).
540
+ - **The tiles' types** (`LiveFeaturedProduct`, `LiveAuctionLot`, `ReplayNowProduct`, `LiveShopLink`,
541
+ `ClipReelItem`…) are this package's, so a tile imports them from here.
520
542
  - **On the web** the hooks and bubbles run over the idle session: the Live screen's tiles draw nothing,
521
543
  the Replay screen plays.
522
544
 
@@ -0,0 +1,29 @@
1
+ import type { ClipReelItem } from './pageTypes';
2
+ import type { ClipItem } from './types';
3
+ /** The reel's product bar photo: 56pt wide at 3×. */
4
+ export declare const CLIP_THUMB_PIXELS = 168;
5
+ /** A clip's product as far as the reel reads it (sdk-shopify's `Product` has it). */
6
+ export interface ProductForClip {
7
+ title: string;
8
+ priceRange: {
9
+ min: {
10
+ amount: string;
11
+ currencyCode: string;
12
+ };
13
+ };
14
+ featuredImage?: {
15
+ url: string;
16
+ } | null;
17
+ images?: {
18
+ url: string;
19
+ }[];
20
+ }
21
+ /** The clip's product: the first the collection lists for it. */
22
+ export declare function clipProductId(clip: Pick<ClipItem, 'productIds'>): string | null;
23
+ /**
24
+ * The reel, in the collection's order: each clip with its product's title, price and photo (the bar's
25
+ * size). A clip whose product the store no longer has (`null`), or hasn't been read yet, is left out:
26
+ * there is nothing to buy from it.
27
+ */
28
+ export declare function clipReelItems(clips: readonly ClipItem[], productsById: ReadonlyMap<string, ProductForClip | null>, thumbPixels?: number): ClipReelItem[];
29
+ //# sourceMappingURL=clipsPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipsPage.d.ts","sourceRoot":"","sources":["../src/clipsPage.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,qDAAqD;AACrD,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC,qFAAqF;AACrF,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE;QAAE,GAAG,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,YAAY,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IAC9D,aAAa,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACvC,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC5B;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG,MAAM,GAAG,IAAI,CAE/E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,SAAS,QAAQ,EAAE,EAC1B,YAAY,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC,EACxD,WAAW,GAAE,MAA0B,GACtC,YAAY,EAAE,CAoBhB"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CLIP_THUMB_PIXELS = void 0;
4
+ exports.clipProductId = clipProductId;
5
+ exports.clipReelItems = clipReelItems;
6
+ /**
7
+ * The rules behind the Clips page (0.15.0, moved from amore-v2's `useClipsPage`): which clips the reel
8
+ * shows, each with its product, ready to draw. The hook is `react/useClipsPage.ts`.
9
+ *
10
+ * Free of React and React Native, so it loads in plain Node for tests (sdk-shopify's `formatMoney` and
11
+ * `sizedImageUrl` are plain functions).
12
+ */
13
+ const sdk_shopify_1 = require("@tiledev/sdk-shopify");
14
+ /** The reel's product bar photo: 56pt wide at 3×. */
15
+ exports.CLIP_THUMB_PIXELS = 168;
16
+ /** The clip's product: the first the collection lists for it. */
17
+ function clipProductId(clip) {
18
+ var _a;
19
+ return (_a = clip.productIds[0]) !== null && _a !== void 0 ? _a : null;
20
+ }
21
+ /**
22
+ * The reel, in the collection's order: each clip with its product's title, price and photo (the bar's
23
+ * size). A clip whose product the store no longer has (`null`), or hasn't been read yet, is left out:
24
+ * there is nothing to buy from it.
25
+ */
26
+ function clipReelItems(clips, productsById, thumbPixels = exports.CLIP_THUMB_PIXELS) {
27
+ return clips.flatMap((clip) => {
28
+ var _a, _b, _c, _d;
29
+ const productId = clipProductId(clip);
30
+ const product = productId ? productsById.get(productId) : null;
31
+ if (!product)
32
+ return [];
33
+ return [
34
+ {
35
+ id: clip.id,
36
+ videoUrl: clip.videoUrl,
37
+ posterUrl: clip.posterUrl,
38
+ startMs: clip.startMs,
39
+ endMs: clip.endMs,
40
+ product: {
41
+ title: product.title,
42
+ price: (0, sdk_shopify_1.formatMoney)(product.priceRange.min),
43
+ imageUrl: (0, sdk_shopify_1.sizedImageUrl)((_b = (_a = product.featuredImage) === null || _a === void 0 ? void 0 : _a.url) !== null && _b !== void 0 ? _b : (_d = (_c = product.images) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.url, thumbPixels),
44
+ },
45
+ },
46
+ ];
47
+ });
48
+ }
49
+ //# sourceMappingURL=clipsPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clipsPage.js","sourceRoot":"","sources":["../src/clipsPage.ts"],"names":[],"mappings":";;;AAwBA,sCAEC;AAOD,sCAwBC;AAzDD;;;;;;GAMG;AACH,sDAAkE;AAKlE,qDAAqD;AACxC,QAAA,iBAAiB,GAAG,GAAG,CAAC;AAUrC,iEAAiE;AACjE,SAAgB,aAAa,CAAC,IAAkC;;IAC9D,OAAO,MAAA,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,mCAAI,IAAI,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAC3B,KAA0B,EAC1B,YAAwD,EACxD,cAAsB,yBAAiB;IAEvC,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;;QAC5B,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/D,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,CAAC;QACxB,OAAO;YACL;gBACE,EAAE,EAAE,IAAI,CAAC,EAAE;gBACX,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,OAAO,EAAE;oBACP,KAAK,EAAE,OAAO,CAAC,KAAK;oBACpB,KAAK,EAAE,IAAA,yBAAW,EAAC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC;oBAC1C,QAAQ,EAAE,IAAA,2BAAa,EAAC,MAAA,MAAA,OAAO,CAAC,aAAa,0CAAE,GAAG,mCAAI,MAAA,MAAA,OAAO,CAAC,MAAM,0CAAG,CAAC,CAAC,0CAAE,GAAG,EAAE,WAAW,CAAC;iBAC7F;aACF;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
package/dist/index.d.ts CHANGED
@@ -40,7 +40,7 @@ export { createShopifyLiveIdentity, type ShopifyCustomerSession, type ShopifyLiv
40
40
  export { GIVEAWAY_CODE_PREFIX, GIVEAWAY_PRIZE_KEY, GIVEAWAY_PRIZE_KEYS, isGiveawayCode, isGiveawayPrizeLine, prizeLinePrice, prizesCoveredByGiveawayCodes, type CartLineForGiveawayCodes, type GiveawayPrizeLineOptions, type PrizeLinePrice, } from './giveawayPrizeLines';
41
41
  export { giveawayPrizeExtension, type GiveawayPrizeExtension, type GiveawayPrizeExtensionOptions, type CartLineForPrizes, } from './cartExtension';
42
42
  export { isHiddenFrom, isHiddenShow, seesHiddenShows, withoutHiddenShows, REHEARSALS } from './hiddenShows';
43
- export { publicName, firstNameOf, viewerNameFor, sameRoomName, isBlockedViewerName, DEFAULT_BLOCKED_VIEWER_NAMES, type NamedCustomer, } from './showNames';
43
+ export { publicName, firstNameOf, viewerNameFor, sameRoomName, isBlockedViewerName, DEFAULT_BLOCKED_VIEWER_NAMES, MOST_BLOCKED_NAMES, blockedNamesFrom, type NamedCustomer, } from './showNames';
44
44
  export { liveShowFor, canPlayInCard, type LiveShow, type LiveShowStatus, type SessionForCard, type SessionForShow, } from './liveShow';
45
45
  export { featuredFirst, withLotFieldsFromRecord } from './showLots';
46
46
  export { showLinkDestination } from './showLinks';
@@ -49,7 +49,9 @@ export { classifyComment, type CommentLine } from './auctionComments';
49
49
  export { isTheVariant, givenAwayVariant } from './giveawayPrize';
50
50
  export { variantPageParams, auctionLotPageParams, liveShowCredit, replayShowCredit, reportShowAdd, showQuickAddOptions, type ShowCredit, type ShowQuickAdd, type VariantPageParams, } from './showCredit';
51
51
  export { announceAddToLiveRoom, type LiveRoomAnnouncement } from './liveRoom';
52
- export { BACK_ACTIONS, REPLAY_COMMENTS_SHOWN, chatNameAsk, firstShownAt, isCoveredOnlyBySheet, isTheShow, playerMs, productOnScreen, replayCommentsAt, type ChatNameInput, type StackStateForSheets, } from './livePages';
52
+ export { BACK_ACTIONS, NO_HOLDS, REPLAY_COMMENTS_SHOWN, accountLoadingOf, accountNameAsk, accountNameToComplete, chatNameAsk, firstShownAt, giveawayNameAsk, holdEndTimesOf, isCoveredOnlyBySheet, isTheShow, playerMs, productOnScreen, replayCommentsAt, tidyAccountName, type AccountForNames, type ChatNameInput, type StackStateForSheets, } from './livePages';
53
+ export { opensInApp, linkLotPrice, showLinkOf, recordingShopItems, isShowLink, type ShowLink, type LinkLotFields, type RecordLot, } from './linkLots';
54
+ export { CLIP_THUMB_PIXELS, clipProductId, clipReelItems, type ProductForClip } from './clipsPage';
53
55
  export { NO_ROUTES, consoleWarning, pageOptionsReading, reportLiveWarning, type LivePageOptions, type LivePageOptionsInput, type LiveSellingRoutes, type LiveTrack, type LiveWarning, type ScreenNavigation, type SignInPageMethod, } from './pageOptions';
54
56
  export type * from './pageTypes';
55
57
  export { sessionReducer, initialSessionState, deriveStatus, roundClosesAt, nextExpiryAt, isNothingOnAir, withOffAirSettled, isTheEndedGiveaway, SOLD_CARD_MS, REACTION_MS, CART_CARD_MS, } from './session';
@@ -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,EA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,iBAAiB,EAAE,0BAA0B,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -32,8 +32,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
33
  exports.resolveCommentLinkCard = 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
34
  exports.firstNameOf = exports.publicName = exports.REHEARSALS = exports.withoutHiddenShows = exports.seesHiddenShows = exports.isHiddenShow = exports.isHiddenFrom = exports.giveawayPrizeExtension = exports.prizesCoveredByGiveawayCodes = exports.prizeLinePrice = exports.isGiveawayPrizeLine = exports.isGiveawayCode = exports.GIVEAWAY_PRIZE_KEYS = exports.GIVEAWAY_PRIZE_KEY = exports.GIVEAWAY_CODE_PREFIX = exports.createShopifyLiveIdentity = exports.WIN_INDEX_KEY = exports.WINNING_BID_KEY = exports.AUCTION_CART_SOURCE_TYPE = exports.chargedVariantId = exports.liveProductFromShopify = exports.createShopifyLiveCommerce = exports.createSilentAuctionFeed = exports.BID_RECORD_KEY = exports.BID_RECORD_NAMESPACE = exports.toSilentAuctionRound = exports.queryableBidEntries = exports.bidRecordEntry = exports.bidRecordEntries = exports.productPageBuyBar = exports.myBidsTabs = exports.upcomingGroups = exports.orderLots = exports.lotStatus = exports.isLeading = exports.bidCapState = exports.nextBid = exports.wasExtended = exports.inExtensionWindow = exports.timeLeftMs = exports.lotPhase = exports.lotKey = exports.lotProductGid = exports.lotsFromResponse = exports.toSilentAuctionLot = exports.BID_RECORD_BATCH_SIZE = exports.SILENT_AUCTION_API_URL = exports.silentAuctions = exports.clearCommentLinkCards = exports.cachedCommentLinkCard = void 0;
35
- exports.isTheEndedGiveaway = exports.withOffAirSettled = exports.isNothingOnAir = exports.nextExpiryAt = exports.roundClosesAt = exports.deriveStatus = exports.initialSessionState = exports.sessionReducer = exports.reportLiveWarning = exports.pageOptionsReading = exports.consoleWarning = exports.NO_ROUTES = exports.replayCommentsAt = exports.productOnScreen = exports.playerMs = exports.isTheShow = exports.isCoveredOnlyBySheet = exports.firstShownAt = exports.chatNameAsk = exports.REPLAY_COMMENTS_SHOWN = exports.BACK_ACTIONS = exports.announceAddToLiveRoom = exports.showQuickAddOptions = exports.reportShowAdd = exports.replayShowCredit = exports.liveShowCredit = exports.auctionLotPageParams = exports.variantPageParams = 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.DEFAULT_BLOCKED_VIEWER_NAMES = exports.isBlockedViewerName = exports.sameRoomName = exports.viewerNameFor = void 0;
36
- exports.winsTotal = exports.showListStatus = exports.readsRecordingsAgainOnView = 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 = exports.CART_CARD_MS = exports.REACTION_MS = exports.SOLD_CARD_MS = void 0;
35
+ exports.showLinkOf = exports.linkLotPrice = exports.opensInApp = exports.tidyAccountName = exports.replayCommentsAt = exports.productOnScreen = exports.playerMs = exports.isTheShow = exports.isCoveredOnlyBySheet = exports.holdEndTimesOf = exports.giveawayNameAsk = exports.firstShownAt = exports.chatNameAsk = exports.accountNameToComplete = exports.accountNameAsk = exports.accountLoadingOf = exports.REPLAY_COMMENTS_SHOWN = exports.NO_HOLDS = exports.BACK_ACTIONS = exports.announceAddToLiveRoom = exports.showQuickAddOptions = exports.reportShowAdd = exports.replayShowCredit = exports.liveShowCredit = exports.auctionLotPageParams = exports.variantPageParams = 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.blockedNamesFrom = exports.MOST_BLOCKED_NAMES = exports.DEFAULT_BLOCKED_VIEWER_NAMES = exports.isBlockedViewerName = exports.sameRoomName = exports.viewerNameFor = void 0;
36
+ exports.winsTotal = exports.showListStatus = exports.readsRecordingsAgainOnView = 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 = 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.reportLiveWarning = exports.pageOptionsReading = exports.consoleWarning = exports.NO_ROUTES = exports.clipReelItems = exports.clipProductId = exports.CLIP_THUMB_PIXELS = exports.isShowLink = exports.recordingShopItems = void 0;
37
37
  // The imperative client (default + named).
38
38
  var liveSelling_1 = require("./liveSelling");
39
39
  Object.defineProperty(exports, "liveSelling", { enumerable: true, get: function () { return liveSelling_1.liveSelling; } });
@@ -181,6 +181,8 @@ Object.defineProperty(exports, "viewerNameFor", { enumerable: true, get: functio
181
181
  Object.defineProperty(exports, "sameRoomName", { enumerable: true, get: function () { return showNames_1.sameRoomName; } });
182
182
  Object.defineProperty(exports, "isBlockedViewerName", { enumerable: true, get: function () { return showNames_1.isBlockedViewerName; } });
183
183
  Object.defineProperty(exports, "DEFAULT_BLOCKED_VIEWER_NAMES", { enumerable: true, get: function () { return showNames_1.DEFAULT_BLOCKED_VIEWER_NAMES; } });
184
+ Object.defineProperty(exports, "MOST_BLOCKED_NAMES", { enumerable: true, get: function () { return showNames_1.MOST_BLOCKED_NAMES; } });
185
+ Object.defineProperty(exports, "blockedNamesFrom", { enumerable: true, get: function () { return showNames_1.blockedNamesFrom; } });
184
186
  var liveShow_1 = require("./liveShow");
185
187
  Object.defineProperty(exports, "liveShowFor", { enumerable: true, get: function () { return liveShow_1.liveShowFor; } });
186
188
  Object.defineProperty(exports, "canPlayInCard", { enumerable: true, get: function () { return liveShow_1.canPlayInCard; } });
@@ -221,14 +223,33 @@ var liveRoom_1 = require("./liveRoom");
221
223
  Object.defineProperty(exports, "announceAddToLiveRoom", { enumerable: true, get: function () { return liveRoom_1.announceAddToLiveRoom; } });
222
224
  var livePages_1 = require("./livePages");
223
225
  Object.defineProperty(exports, "BACK_ACTIONS", { enumerable: true, get: function () { return livePages_1.BACK_ACTIONS; } });
226
+ Object.defineProperty(exports, "NO_HOLDS", { enumerable: true, get: function () { return livePages_1.NO_HOLDS; } });
224
227
  Object.defineProperty(exports, "REPLAY_COMMENTS_SHOWN", { enumerable: true, get: function () { return livePages_1.REPLAY_COMMENTS_SHOWN; } });
228
+ Object.defineProperty(exports, "accountLoadingOf", { enumerable: true, get: function () { return livePages_1.accountLoadingOf; } });
229
+ Object.defineProperty(exports, "accountNameAsk", { enumerable: true, get: function () { return livePages_1.accountNameAsk; } });
230
+ Object.defineProperty(exports, "accountNameToComplete", { enumerable: true, get: function () { return livePages_1.accountNameToComplete; } });
225
231
  Object.defineProperty(exports, "chatNameAsk", { enumerable: true, get: function () { return livePages_1.chatNameAsk; } });
226
232
  Object.defineProperty(exports, "firstShownAt", { enumerable: true, get: function () { return livePages_1.firstShownAt; } });
233
+ Object.defineProperty(exports, "giveawayNameAsk", { enumerable: true, get: function () { return livePages_1.giveawayNameAsk; } });
234
+ Object.defineProperty(exports, "holdEndTimesOf", { enumerable: true, get: function () { return livePages_1.holdEndTimesOf; } });
227
235
  Object.defineProperty(exports, "isCoveredOnlyBySheet", { enumerable: true, get: function () { return livePages_1.isCoveredOnlyBySheet; } });
228
236
  Object.defineProperty(exports, "isTheShow", { enumerable: true, get: function () { return livePages_1.isTheShow; } });
229
237
  Object.defineProperty(exports, "playerMs", { enumerable: true, get: function () { return livePages_1.playerMs; } });
230
238
  Object.defineProperty(exports, "productOnScreen", { enumerable: true, get: function () { return livePages_1.productOnScreen; } });
231
239
  Object.defineProperty(exports, "replayCommentsAt", { enumerable: true, get: function () { return livePages_1.replayCommentsAt; } });
240
+ Object.defineProperty(exports, "tidyAccountName", { enumerable: true, get: function () { return livePages_1.tidyAccountName; } });
241
+ // Link lots and the links a show opens in the app (0.15.0, moved from amore-v2's `linkLots`).
242
+ var linkLots_1 = require("./linkLots");
243
+ Object.defineProperty(exports, "opensInApp", { enumerable: true, get: function () { return linkLots_1.opensInApp; } });
244
+ Object.defineProperty(exports, "linkLotPrice", { enumerable: true, get: function () { return linkLots_1.linkLotPrice; } });
245
+ Object.defineProperty(exports, "showLinkOf", { enumerable: true, get: function () { return linkLots_1.showLinkOf; } });
246
+ Object.defineProperty(exports, "recordingShopItems", { enumerable: true, get: function () { return linkLots_1.recordingShopItems; } });
247
+ Object.defineProperty(exports, "isShowLink", { enumerable: true, get: function () { return linkLots_1.isShowLink; } });
248
+ // The Clips page's reel (0.15.0, moved from amore-v2's `useClipsPage`).
249
+ var clipsPage_1 = require("./clipsPage");
250
+ Object.defineProperty(exports, "CLIP_THUMB_PIXELS", { enumerable: true, get: function () { return clipsPage_1.CLIP_THUMB_PIXELS; } });
251
+ Object.defineProperty(exports, "clipProductId", { enumerable: true, get: function () { return clipsPage_1.clipProductId; } });
252
+ Object.defineProperty(exports, "clipReelItems", { enumerable: true, get: function () { return clipsPage_1.clipReelItems; } });
232
253
  var pageOptions_1 = require("./pageOptions");
233
254
  Object.defineProperty(exports, "NO_ROUTES", { enumerable: true, get: function () { return pageOptions_1.NO_ROUTES; } });
234
255
  Object.defineProperty(exports, "consoleWarning", { enumerable: true, get: function () { return pageOptions_1.consoleWarning; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;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AA;AACX,uGAAA,YAAY,OAAA;AAEd,+CAOwB;AANtB,+GAAA,eAAe,OAAA;AACf,iHAAA,iBAAiB,OAAA;AACjB,oHAAA,oBAAoB,OAAA;AACpB,mHAAA,mBAAmB,OAAA;AACnB,4GAAA,YAAY,OAAA;AACZ,6GAAA,aAAa,OAAA;AAGf,kFAAkF;AAClF;;;;;;GAMG;AACH,4FAAuF;AAA9E,0HAAA,OAAO,OAAA;AAAE,qIAAA,kBAAkB,OAAA;AAEpC,iCAAiC;AACjC,iCAA0C;AAAjC,wGAAA,eAAe,OAAA;AAIxB;;;;;;;;;;;;GAYG;AACH,6CAOuB;AANrB,qHAAA,sBAAsB,OAAA;AACtB,wHAAA,yBAAyB,OAAA;AACzB,wHAAA,yBAAyB,OAAA;AAK3B,gDAA8B;AAC9B,yCAAgJ;AAAvI,8GAAA,iBAAiB,OAAA;AAAE,uHAAA,0BAA0B,OAAA;AAAE,2GAAA,cAAc,OAAA;AAAE,sGAAA,SAAS,OAAA"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Whether a link can open inside the app: an https address. Plain `http:`, an email, a phone number,
3
+ * words or nothing: false, and the link is drawn as words, not something to tap. Where an https link
4
+ * goes is the app's (`LiveSellingProvider`'s `routes.openLink`).
5
+ */
6
+ export declare function opensInApp(url: string | null | undefined): boolean;
7
+ /** A link lot ready to draw: what the Live and Replay screens' link cards take (`LiveShopLink`, `ReplayShopLink`). */
8
+ export interface ShowLink {
9
+ /** Says this item is a link, not a product. */
10
+ kind: 'link';
11
+ /** The lot's key on the show: its address when the host gave it no id. */
12
+ id: string;
13
+ title: string;
14
+ /** Formatted ("$45.00"); empty when the host gave no price. */
15
+ price: string;
16
+ imageUrl: string | null;
17
+ /**
18
+ * The page, when a tap can open it inside the app (an https address, and an app that opens links);
19
+ * null otherwise, and the card is words, not a button.
20
+ */
21
+ url: string | null;
22
+ }
23
+ /** What a link lot carries, from the session (`LiveProduct`) or the show's record (`LiveStreamProduct`). */
24
+ export interface LinkLotFields {
25
+ id: string;
26
+ title: string;
27
+ /** The host's price, as the gateway sends it ("45.0"); none when unset. */
28
+ price: string | number | null | undefined;
29
+ /** The session leaves it null on a link lot: the shop's own currency then (`getCurrencyCode`). */
30
+ currencyCode?: string | null;
31
+ imageUrl?: string | null;
32
+ externalUrl?: string | null;
33
+ }
34
+ /** The host's price in the shop's currency ("$45.00"), or empty when there is none to show. */
35
+ export declare function linkLotPrice(price: LinkLotFields['price'], currencyCode?: string | null): string;
36
+ /**
37
+ * A link lot as its card draws it. `canOpen` false (an app that gave no `routes.openLink`): the address
38
+ * is kept from the card, so it is words, as for a link that isn't https.
39
+ */
40
+ export declare function showLinkOf(lot: LinkLotFields, { canOpen }?: {
41
+ canOpen?: boolean;
42
+ }): ShowLink;
43
+ /** A lot on a show's record (`LiveStreamProduct`), as far as a recording's shop reads it. */
44
+ export interface RecordLot {
45
+ storeProductId: string;
46
+ name: string;
47
+ price: string | number | null;
48
+ thumbnailUrl: string | null;
49
+ externalUrl?: string | null;
50
+ }
51
+ /**
52
+ * A recording's shop in the host's order (amore-v2, 2026-10-19): the show's record lists every lot, the
53
+ * links the host added among the products, so a link takes its place there and a product is found by
54
+ * its id (`productGidOf` the lot's). Products the record doesn't list (the replay feed's own list) follow
55
+ * in the feed's order. With no record (it couldn't be read) the products alone, as before.
56
+ */
57
+ export declare function recordingShopItems<Item extends {
58
+ id: string;
59
+ }>(products: readonly Item[], recordLots: readonly RecordLot[] | null, productGidOf: (storeProductId: string) => string, { canOpen }?: {
60
+ canOpen?: boolean;
61
+ }): (Item | ShowLink)[];
62
+ /** An item of a show's shop that is a link the host added, not a product. */
63
+ export declare function isShowLink<Item extends object>(item: Item | ShowLink): item is ShowLink;
64
+ //# sourceMappingURL=linkLots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linkLots.d.ts","sourceRoot":"","sources":["../src/linkLots.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,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I,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAC5D,QAAQ,EAAE,SAAS,IAAI,EAAE,EACzB,UAAU,EAAE,SAAS,SAAS,EAAE,GAAG,IAAI,EACvC,YAAY,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,MAAM,EAChD,EAAE,OAAc,EAAE,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7C,CAAC,IAAI,GAAG,QAAQ,CAAC,EAAE,CAqBrB;AAED,6EAA6E;AAC7E,wBAAgB,UAAU,CAAC,IAAI,SAAS,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,QAAQ,GAAG,IAAI,IAAI,QAAQ,CAEvF"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.opensInApp = opensInApp;
4
+ exports.linkLotPrice = linkLotPrice;
5
+ exports.showLinkOf = showLinkOf;
6
+ exports.recordingShopItems = recordingShopItems;
7
+ exports.isShowLink = isShowLink;
8
+ /**
9
+ * Link lots (0.15.0, moved from amore-v2's `src/core/utils/linkLots.ts` and the https rule of its
10
+ * `screenForLink`): a lot the host added as a web address (`product_type: "url"`) rather than a product
11
+ * of the store, mostly an affiliate link. The session hands them over among its products, in the host's
12
+ * order, with a title, a price, a photo and the address (`LiveProduct.externalUrl`), no sizes and no
13
+ * catalogue product (`raw`); a show's record has the same (`LiveStreamProduct.externalUrl`). One store's
14
+ * last 80 shows had 305 of 1,803 lots as links (17%), every one https and priced. They are opened, never
15
+ * bought: no Add to Cart, no favourite.
16
+ *
17
+ * Free of React and React Native, so it loads in plain Node for tests; the price is sdk-shopify's
18
+ * `formatMoney` in the shop's currency (`getCurrencyCode`), plain functions.
19
+ */
20
+ const sdk_shopify_1 = require("@tiledev/sdk-shopify");
21
+ /** An https address with a host and no spaces: the only kind of link that opens anything (an app's web page loads https only). */
22
+ const HTTPS_ADDRESS = /^https:\/\/[^\s/?#]+\S*$/i;
23
+ /**
24
+ * Whether a link can open inside the app: an https address. Plain `http:`, an email, a phone number,
25
+ * words or nothing: false, and the link is drawn as words, not something to tap. Where an https link
26
+ * goes is the app's (`LiveSellingProvider`'s `routes.openLink`).
27
+ */
28
+ function opensInApp(url) {
29
+ return typeof url === 'string' && HTTPS_ADDRESS.test(url.trim());
30
+ }
31
+ /** The host's price in the shop's currency ("$45.00"), or empty when there is none to show. */
32
+ function linkLotPrice(price, currencyCode) {
33
+ if (price === null || price === undefined || price === '')
34
+ return '';
35
+ const amount = Number(price);
36
+ if (!Number.isFinite(amount))
37
+ return '';
38
+ return (0, sdk_shopify_1.formatMoney)({ amount: String(amount), currencyCode: currencyCode || (0, sdk_shopify_1.getCurrencyCode)() || 'USD' });
39
+ }
40
+ /**
41
+ * A link lot as its card draws it. `canOpen` false (an app that gave no `routes.openLink`): the address
42
+ * is kept from the card, so it is words, as for a link that isn't https.
43
+ */
44
+ function showLinkOf(lot, { canOpen = true } = {}) {
45
+ var _a;
46
+ const address = typeof lot.externalUrl === 'string' ? lot.externalUrl.trim() : '';
47
+ return {
48
+ kind: 'link',
49
+ id: lot.id,
50
+ title: lot.title,
51
+ price: linkLotPrice(lot.price, lot.currencyCode),
52
+ imageUrl: (_a = lot.imageUrl) !== null && _a !== void 0 ? _a : null,
53
+ url: canOpen && opensInApp(address) ? address : null,
54
+ };
55
+ }
56
+ /**
57
+ * A recording's shop in the host's order (amore-v2, 2026-10-19): the show's record lists every lot, the
58
+ * links the host added among the products, so a link takes its place there and a product is found by
59
+ * its id (`productGidOf` the lot's). Products the record doesn't list (the replay feed's own list) follow
60
+ * in the feed's order. With no record (it couldn't be read) the products alone, as before.
61
+ */
62
+ function recordingShopItems(products, recordLots, productGidOf, { canOpen = true } = {}) {
63
+ if (!recordLots)
64
+ return [...products];
65
+ const placed = new Set();
66
+ const inOrder = [];
67
+ for (const lot of recordLots) {
68
+ if (lot.externalUrl) {
69
+ inOrder.push(showLinkOf({ id: lot.storeProductId, title: lot.name, price: lot.price, imageUrl: lot.thumbnailUrl, externalUrl: lot.externalUrl }, { canOpen }));
70
+ continue;
71
+ }
72
+ const product = products.find((item) => item.id === productGidOf(lot.storeProductId));
73
+ if (product && !placed.has(product.id)) {
74
+ placed.add(product.id);
75
+ inOrder.push(product);
76
+ }
77
+ }
78
+ return [...inOrder, ...products.filter((item) => !placed.has(item.id))];
79
+ }
80
+ /** An item of a show's shop that is a link the host added, not a product. */
81
+ function isShowLink(item) {
82
+ return item.kind === 'link';
83
+ }
84
+ //# sourceMappingURL=linkLots.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linkLots.js","sourceRoot":"","sources":["../src/linkLots.ts"],"names":[],"mappings":";;AAsBA,gCAEC;AAgCD,oCAKC;AAMD,gCAUC;AAiBD,gDA0BC;AAGD,gCAEC;AA7HD;;;;;;;;;;;GAWG;AACH,sDAAoE;AAEpE,kIAAkI;AAClI,MAAM,aAAa,GAAG,2BAA2B,CAAC;AAElD;;;;GAIG;AACH,SAAgB,UAAU,CAAC,GAA8B;IACvD,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;AACnE,CAAC;AA+BD,+FAA+F;AAC/F,SAAgB,YAAY,CAAC,KAA6B,EAAE,YAA4B;IACtF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IACrE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,EAAE,CAAC;IACxC,OAAO,IAAA,yBAAW,EAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,YAAY,IAAI,IAAA,6BAAe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AAC,WAAW,EAAE,EACvH,EAAE,OAAO,EAAE,CACZ,CACF,CAAC;YACF,SAAS;QACX,CAAC;QACD,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,YAAY,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC;QACtF,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;YACvC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,OAAO,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED,6EAA6E;AAC7E,SAAgB,UAAU,CAAsB,IAAqB;IACnE,OAAQ,IAAiB,CAAC,IAAI,KAAK,MAAM,CAAC;AAC5C,CAAC"}
@@ -3,9 +3,11 @@
3
3
  * `useLiveChat` and `useReplayPage`): which navigation is a back press, when a sheet leaves the show
4
4
  * playing, who the chat asks for a name, and what a recording shows at a point of its playhead.
5
5
  *
6
- * Pure, so it loads in plain Node for tests. The hooks (`react/useLivePage.ts` and the rest) apply them.
6
+ * Pure, so it loads in plain Node for tests (sdk-shopify's `cartLineFacts` is a plain function). The
7
+ * hooks (`react/useLivePage.ts` and the rest) apply them.
7
8
  */
8
- import type { ReplayCommentItem } from './pageTypes';
9
+ import { type Cart, type CartExtension } from '@tiledev/sdk-shopify';
10
+ import type { NameOnAccount, ReplayCommentItem } from './pageTypes';
9
11
  import type { Replay, ReplayComment, ReplaySegment } from './types';
10
12
  /**
11
13
  * The navigation actions that are a back press: the header's arrow and picture-in-picture button
@@ -54,6 +56,88 @@ export declare function chatNameAsk({ named, loggedIn, restoring, hasCustomer }:
54
56
  askForName: boolean;
55
57
  waitingForName: boolean;
56
58
  };
59
+ /**
60
+ * A cart with no holds: one list, so the header isn't handed a new one on every draw. A plain array, as
61
+ * the header tile types it (`holdEndTimes?: number[]`); never change it.
62
+ */
63
+ export declare const NO_HOLDS: number[];
64
+ /**
65
+ * When each of the cart's holds ends (0.15.0, amore-v2's ENG-691), for the Live header's timer under the
66
+ * cart button: each line's reservation as the Cart reads it (sdk-shopify's `cartLineFacts` over the
67
+ * provider's `cartExtensions`: Cart Hold's stamp). A giveaway prize and a service line have none, nor
68
+ * does a line Cart Hold never held. Every end, not only the soonest: the Live screen doesn't read the
69
+ * cart again when a hold runs out, so the soonest worked out here would stay on a hold that has ended;
70
+ * the header picks the soonest still running as it counts. `NO_HOLDS` when there are none.
71
+ */
72
+ export declare function holdEndTimesOf(cart: Cart | null | undefined, extensions: readonly CartExtension[]): number[];
73
+ /** The signed-in shopper's account, as far as the name asks read it (sdk-shopify's `useCustomer()`). */
74
+ export interface AccountForNames {
75
+ loggedIn: boolean;
76
+ /** A stored sign-in is still being read on app open. */
77
+ restoring?: boolean;
78
+ customer: {
79
+ firstName?: string | null;
80
+ lastName?: string | null;
81
+ } | null | undefined;
82
+ }
83
+ /**
84
+ * Signed in, the account not read yet (a stored sign-in on app open, or a moment after signing in, with
85
+ * the session and no profile): what to ask isn't known, so Send and Enter wait.
86
+ */
87
+ export declare function accountLoadingOf({ loggedIn, restoring, customer }: AccountForNames): boolean;
88
+ /**
89
+ * The name a signed-in shopper's account needs (0.15.0, amore-v2's ENG-686): read, and with no first
90
+ * name (blank, or only spaces) or with a name the show's team goes by. What it has, each part trimmed,
91
+ * for the ask to start from (a last name already there needn't be typed again). Null when it has a
92
+ * first name, while it loads, and when signed out (a guest's name stays on the phone).
93
+ */
94
+ export declare function accountNameToComplete(account: AccountForNames, blockedNames: readonly string[]): NameOnAccount | null;
95
+ /**
96
+ * A typed name as it goes on the account: each part's spaces closed up and trimmed, and the whole name
97
+ * ("Jane Doe", or "Jane" with no last name). Null with no first name, or a name the show's team goes by:
98
+ * nothing is saved.
99
+ */
100
+ export declare function tidyAccountName(typedFirstName: string, typedLastName: string, blockedNames: readonly string[]): {
101
+ firstName: string;
102
+ lastName: string;
103
+ fullName: string;
104
+ } | null;
105
+ /**
106
+ * What the comment box does about the shopper's name since 0.15.0 (amore-v2's ENG-686), beside
107
+ * `chatNameAsk`, 0.14.0's rule, which is unchanged:
108
+ *
109
+ * - **Ask** (`askForName`) a signed-in shopper whose account needs a name (`accountNameToComplete`):
110
+ * a first and a last name, saved to the account; and a signed-out shopper the room has no name for,
111
+ * saved on this phone.
112
+ * - **Wait** (`waitingForName`) while the account loads: Send is held, so nothing goes out as
113
+ * "Anonymous".
114
+ */
115
+ export declare function accountNameAsk({ named, loggedIn, restoring, accountLoading, nameToComplete, }: {
116
+ /** The room has a name for the shopper (`session.viewerName`). */
117
+ named: boolean;
118
+ loggedIn: boolean;
119
+ restoring: boolean;
120
+ accountLoading: boolean;
121
+ nameToComplete: NameOnAccount | null;
122
+ }): {
123
+ askForName: boolean;
124
+ waitingForName: boolean;
125
+ };
126
+ /**
127
+ * What a giveaway's "Entering As:" does about the shopper's name (entering needs a sign-in): ask a
128
+ * signed-in shopper whose account needs a name, or whom the room has no name for once their profile has
129
+ * arrived; wait while the account loads.
130
+ */
131
+ export declare function giveawayNameAsk({ named, loggedIn, hasCustomer, accountLoading, nameToComplete, }: {
132
+ named: boolean;
133
+ loggedIn: boolean;
134
+ hasCustomer: boolean;
135
+ accountLoading: boolean;
136
+ nameToComplete: NameOnAccount | null;
137
+ }): {
138
+ askForName: boolean;
139
+ waitingForName: boolean;
140
+ };
57
141
  /** A card passes the recording's feed id; a push passes its show's streaming id. Both find it. */
58
142
  export declare function isTheShow(replay: Pick<Replay, 'id' | 'streamingId'>, id: string): boolean;
59
143
  /** A time or length from the player, in seconds, as milliseconds; 0 when it has none yet. */
@@ -61,11 +145,14 @@ export declare function playerMs(seconds: number): number;
61
145
  /**
62
146
  * The product on screen at `atMs`: the one whose time window covers it (where windows overlap, the
63
147
  * host went back to something, and the last one is what they were on); before the first window (a
64
- * sale opens with a greeting), the first tagged product. Null with no products.
148
+ * sale opens with a greeting), the first tagged product. Null with no products. Since 0.15.0 the items
149
+ * can be a recording's shop, links among the products (`windowKeyOf`).
65
150
  */
66
151
  export declare function productOnScreen<Item extends {
67
152
  id: string;
68
- }>(segments: readonly ReplaySegment[], products: readonly Item[], atMs: number): Item | null;
153
+ }>(segments: readonly ReplaySegment[], products: readonly Item[], atMs: number,
154
+ /** The key a window names an item by (0.15.0): a product's id, or a link lot's as a product GID. */
155
+ windowKeyOf?: (item: Item) => string): Item | null;
69
156
  /** Where the host first showed a product, or null for one they never did (tagged, with no time window). */
70
157
  export declare function firstShownAt(segments: readonly ReplaySegment[], productId: string): number | null;
71
158
  /** Comments kept in the replay's chat pane: the newest of what has been said so far. */
@@ -1 +1 @@
1
- {"version":3,"file":"livePages.d.ts","sourceRoot":"","sources":["../src/livePages.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIpE;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,CAAC,MAAM,CAAuD,CAAC;AAErG,kGAAkG;AAClG,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAClD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,EAC7C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE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