@tiledev/sdk-apptile-live-selling 0.14.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +36 -11
  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 +11 -2
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +34 -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 -10
package/README.md CHANGED
@@ -6,7 +6,8 @@ its own config plugin.
6
6
 
7
7
  **Headless.** The root ships one component (`LiveVideoTarget`, because a render target is unavoidably
8
8
  native). Your header, comments list, bid bar and sheets stay yours. Since 0.14.0 the floating bubbles a
9
- shrunk show plays in come from a separate entry, `/ui` (§3, "The Live and Replay pages").
9
+ shrunk show plays in come from the root as well as a separate entry, `/ui` (§3, "The Live and Replay
10
+ pages"); import them from the root (0.15.1).
10
11
 
11
12
  **Storefront-agnostic.** Products, cart writes and the auction checkout come from an adapter you
12
13
  supply. An app on `@tiledev/sdk-shopify` can take that adapter ready-made (§4, "On Shopify"), along
@@ -79,7 +80,8 @@ picture-in-picture in the native package. `@tiledev/sdk-shopify` is required sin
79
80
  loaded by the main entry since 0.14.0: `@react-navigation/native` (7), `expo-video` (3),
80
81
  `expo-keep-awake` (15), `@react-native-async-storage/async-storage` (2) and
81
82
  `@tiledev/sdk-analytics-core`. `@expo/vector-icons`, `react-native-safe-area-context` and
82
- `@tiledev/react-native-performant-image` are optional: only `/ui` loads them.
83
+ `@tiledev/react-native-performant-image` are required since 0.15.1, when the root began exporting the
84
+ bubbles too (they were optional, for `/ui` alone, in 0.14.0 and 0.15.0).
83
85
 
84
86
  **Everything ships from the package root**, including the providers, the hooks, `LiveVideoTarget` and
85
87
  the Shopify helpers. There is no `./react` or `./shopify` subpath — a subpath is reachable only through
@@ -448,18 +450,19 @@ const rail = useLiveRail({ screenOnShow: useIsFocused() });
448
450
  hidden from this viewer rather than say there are none. On the web, the three run over the idle session
449
451
  and empty wins.
450
452
 
451
- ### The Live and Replay pages (0.14.0)
453
+ ### The Live, Replay and Clips pages (0.14.0, 0.15.0)
452
454
 
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.
455
+ The Live screen, the Replay screen and (0.15.0) the Clips page as page models, moved from amore-v2 so an
456
+ app built on it keeps no copy: the screen and each tile's wiring call the same hook, and spread its
457
+ fields into the tiles. Built for an app on sdk-shopify.
456
458
 
457
459
  ```tsx
458
460
  import {
459
461
  ShopifyLiveSellingProvider, ShopifyLiveSessionProvider, ReplayPlayerProvider,
460
462
  GIVEAWAY_PRIZE_KEY, REHEARSALS, type LiveSellingRoutes,
461
463
  } from '@tiledev/sdk-apptile-live-selling';
462
- import { LiveBubble, ReplayBubble } from '@tiledev/sdk-apptile-live-selling/ui';
464
+ // From the root since 0.15.1 (the Tile web preview resolves a subpath to the root module); `/ui` still works.
465
+ import { LiveBubble, ReplayBubble } from '@tiledev/sdk-apptile-live-selling';
463
466
 
464
467
  // Where the pages send the shopper: the app's routes, set once.
465
468
  const routes: LiveSellingRoutes = {
@@ -471,6 +474,12 @@ const routes: LiveSellingRoutes = {
471
474
  openCart: ({ itemsYouWon }, nav) => nav.navigate('Cart', itemsYouWon ? { screen: 'ItemsYouWon' } : undefined),
472
475
  openVariantPage: (params, nav) => nav.navigate('VariantSelector', params),
473
476
  openSignIn: (method, nav) => nav.navigate('SignIn', { method }),
477
+ // 0.15.0, optional: a link from a show (https only), the show already in the bubble. Without it,
478
+ // links are words.
479
+ openLink: (url, title, nav) => {
480
+ const screen = screenForLink(url, title); // the app's: its product, collection or web page
481
+ if (screen) nav.navigate(screen.route, screen.params);
482
+ },
474
483
  sheets: ['VariantSelector', 'SignIn'],
475
484
  };
476
485
 
@@ -482,6 +491,8 @@ const routes: LiveSellingRoutes = {
482
491
  track={analytics.track}
483
492
  onWarning={captureWarning}
484
493
  shopName={APP_NAME}
494
+ // 0.15.0: the names nobody watching may go by, from a list the app publishes (`blockedNamesFrom`).
495
+ blockedNames={blockedNamesFrom(publishedBlockedNames)}
485
496
  >
486
497
  <ShopifyLiveSessionProvider>
487
498
  <ReplayPlayerProvider>
@@ -495,13 +506,16 @@ const routes: LiveSellingRoutes = {
495
506
 
496
507
  ```tsx
497
508
  // 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
509
+ const page = useLivePage(); // page.player, page.header, page.chat.{comments, commentBox, …}, page.openLink
510
+ const shop = useLiveShop({ openLink: page.openLink }); // shop.productCard, shopButton, soldChips, cartChips
500
511
  const auction = useLiveAuction({ openItemsYouWon: page.header.onCart });
501
512
  const giveawaysAndPolls = useLiveGiveawaysAndPolls();
502
513
 
503
514
  // The Replay screen, and each of its tiles' wiring:
504
515
  const replay = useReplayPage(); // replay.player, header, controls, nowCard, comments, shopBar, missing
516
+
517
+ // The Clips page (0.15.0), and each of its tiles' wiring:
518
+ const clips = useClipsPage(); // clips.reel (the reel tile), clips.header, clips.hasReel, clips.isFocused
505
519
  ```
506
520
 
507
521
  - **Routes stay the app's.** A route taken inside a screen is handed that screen's navigation (to
@@ -515,8 +529,19 @@ const replay = useReplayPage(); // replay.player, header, controls, nowCard, c
515
529
  - **The variant page** gets `VariantPageParams` (a handle, a show's credit, `beingAuctioned`). It
516
530
  reports a landed add with `reportShowAdd(credit, track, product, variant)`; product grids elsewhere
517
531
  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.
532
+ - **Links from a show** (0.15.0): a host's or moderator's link in the chat, and lots the host added as
533
+ web addresses (`LiveShopLink`, `ReplayShopLink`: in the Shop sheet among the products, featured on the
534
+ card, among an auction's lots, on screen in a recording). Only an https address opens (`opensInApp`),
535
+ through `routes.openLink`, with the show in the bubble; without that route they are words.
536
+ - **Names** (0.15.0): a signed-in shopper whose account has no first name is asked once, by a comment
537
+ or a giveaway entry, and the name goes on the account (`useAccountName`, sdk-shopify's
538
+ `updateProfile`); the team's names (`blockedNames`) are refused as they are typed. A comment box can
539
+ send a signed-out shopper to sign in instead ("Sign in to comment": `signedOut`, `onSignInToComment`,
540
+ `keyboardRequest`).
541
+ - **The Live header** gets the cart hold's end times (`header.holdEndTimes`, 0.15.0); **a tap on the
542
+ Replay video** pauses and plays (`player.paused`, 0.15.0).
543
+ - **The tiles' types** (`LiveFeaturedProduct`, `LiveAuctionLot`, `ReplayNowProduct`, `LiveShopLink`,
544
+ `ClipReelItem`…) are this package's, so a tile imports them from here.
520
545
  - **On the web** the hooks and bubbles run over the idle session: the Live screen's tiles draw nothing,
521
546
  the Replay screen plays.
522
547
 
@@ -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';
@@ -80,5 +82,12 @@ export type * from './sessionTypes';
80
82
  */
81
83
  export { createOngoingLiveStore, ONGOING_LIVE_POLL_IDLE_MS, ONGOING_LIVE_POLL_LIVE_MS, type OngoingLivePolling, type OngoingLiveSnapshot, type OngoingLiveStore, } from './ongoingLive';
82
84
  export * from './react/index';
85
+ /**
86
+ * The floating bubbles, from the package root too (0.15.1). The Tile web preview loads a package by its
87
+ * name, so an app's `import … from '@tiledev/sdk-apptile-live-selling/ui'` there can arrive as this root
88
+ * module, where the bubbles weren't: `LiveBubble` undefined, React error #130 at the app's root. Import
89
+ * them from here; `/ui` still works where subpaths resolve (Metro on a phone).
90
+ */
91
+ export { BubbleFrame, BUBBLE_CHIP_COLOR, LiveBubble, ReplayBubble, type BubbleFrameProps, type LiveBubbleProps, type ReplayBubbleProps, } from './ui';
83
92
  export { readsOnPastHidden, readsRecordingsAgainOnView, showListStatus, winsTotal, type ShowListStatus, type ShowListInput } from './showPages';
84
93
  //# 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,YA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cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAGvF,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,gBAAgB,CAAC;AAEpC;;;;;;;;;;;;GAYG;AACH,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AACvB,cAAc,eAAe,CAAC;AAE9B;;;;;GAKG;AACH,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,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.ReplayBubble = exports.LiveBubble = exports.BUBBLE_CHIP_COLOR = exports.BubbleFrame = 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; } });
@@ -286,6 +307,17 @@ Object.defineProperty(exports, "createOngoingLiveStore", { enumerable: true, get
286
307
  Object.defineProperty(exports, "ONGOING_LIVE_POLL_IDLE_MS", { enumerable: true, get: function () { return ongoingLive_1.ONGOING_LIVE_POLL_IDLE_MS; } });
287
308
  Object.defineProperty(exports, "ONGOING_LIVE_POLL_LIVE_MS", { enumerable: true, get: function () { return ongoingLive_1.ONGOING_LIVE_POLL_LIVE_MS; } });
288
309
  __exportStar(require("./react/index"), exports);
310
+ /**
311
+ * The floating bubbles, from the package root too (0.15.1). The Tile web preview loads a package by its
312
+ * name, so an app's `import … from '@tiledev/sdk-apptile-live-selling/ui'` there can arrive as this root
313
+ * module, where the bubbles weren't: `LiveBubble` undefined, React error #130 at the app's root. Import
314
+ * them from here; `/ui` still works where subpaths resolve (Metro on a phone).
315
+ */
316
+ var ui_1 = require("./ui");
317
+ Object.defineProperty(exports, "BubbleFrame", { enumerable: true, get: function () { return ui_1.BubbleFrame; } });
318
+ Object.defineProperty(exports, "BUBBLE_CHIP_COLOR", { enumerable: true, get: function () { return ui_1.BUBBLE_CHIP_COLOR; } });
319
+ Object.defineProperty(exports, "LiveBubble", { enumerable: true, get: function () { return ui_1.LiveBubble; } });
320
+ Object.defineProperty(exports, "ReplayBubble", { enumerable: true, get: function () { return ui_1.ReplayBubble; } });
289
321
  var showPages_1 = require("./showPages");
290
322
  Object.defineProperty(exports, "readsOnPastHidden", { enumerable: true, get: function () { return showPages_1.readsOnPastHidden; } });
291
323
  Object.defineProperty(exports, "readsRecordingsAgainOnView", { enumerable: true, get: function () { return showPages_1.readsRecordingsAgainOnView; } });
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,oHAAA,0BAA0B,OAAA;AAC1B,kHAAA,wBAAwB,OAAA;AACxB,sGAAA,YAAY,OAAA;AAEd,2CAAiF;AAAxE,4GAAA,cAAc,OAAA;AAAE,2GAAA,aAAa,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAE1D,yGAAyG;AACzG,qCAMmB;AALjB,uGAAA,YAAY,OAAA;AACZ,wGAAA,aAA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gJ;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,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAElE;AAED,sHAAsH;AACtH,MAAM,WAAW,QAAQ;IACvB,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;OAGG;IACH,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAED,4GAA4G;AAC5G,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,KAAK,EAAE,MAAM,GAAG,MAA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 -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;A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