@tiledev/sdk-apptile-live-selling 0.13.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -12
- package/dist/giveawayPrizeLines.d.ts +10 -0
- package/dist/giveawayPrizeLines.d.ts.map +1 -1
- package/dist/giveawayPrizeLines.js +11 -1
- package/dist/giveawayPrizeLines.js.map +1 -1
- package/dist/hiddenShows.d.ts +10 -0
- package/dist/hiddenShows.d.ts.map +1 -1
- package/dist/hiddenShows.js +11 -0
- package/dist/hiddenShows.js.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -2
- package/dist/index.js.map +1 -1
- package/dist/livePages.d.ts +79 -0
- package/dist/livePages.d.ts.map +1 -0
- package/dist/livePages.js +90 -0
- package/dist/livePages.js.map +1 -0
- package/dist/liveRoom.d.ts +21 -0
- package/dist/liveRoom.d.ts.map +1 -0
- package/dist/liveRoom.js +28 -0
- package/dist/liveRoom.js.map +1 -0
- package/dist/pageOptions.d.ts +100 -0
- package/dist/pageOptions.d.ts.map +1 -0
- package/dist/pageOptions.js +82 -0
- package/dist/pageOptions.js.map +1 -0
- package/dist/pageTypes.d.ts +127 -0
- package/dist/pageTypes.d.ts.map +1 -0
- package/dist/pageTypes.js +3 -0
- package/dist/pageTypes.js.map +1 -0
- package/dist/react/LiveSellingProvider.d.ts +23 -1
- package/dist/react/LiveSellingProvider.d.ts.map +1 -1
- package/dist/react/LiveSellingProvider.js +26 -2
- package/dist/react/LiveSellingProvider.js.map +1 -1
- package/dist/react/index.d.ts +10 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +29 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.web.d.ts +11 -32
- package/dist/react/index.web.d.ts.map +1 -1
- package/dist/react/index.web.js +46 -139
- package/dist/react/index.web.js.map +1 -1
- package/dist/react/navigation.d.ts +13 -0
- package/dist/react/navigation.d.ts.map +1 -0
- package/dist/react/navigation.js +7 -0
- package/dist/react/navigation.js.map +1 -0
- package/dist/react/platformSession.d.ts +16 -0
- package/dist/react/platformSession.d.ts.map +1 -0
- package/dist/react/platformSession.js +28 -0
- package/dist/react/platformSession.js.map +1 -0
- package/dist/react/platformSession.web.d.ts +35 -0
- package/dist/react/platformSession.web.d.ts.map +1 -0
- package/dist/react/platformSession.web.js +148 -0
- package/dist/react/platformSession.web.js.map +1 -0
- package/dist/react/replayPlayer.d.ts +74 -0
- package/dist/react/replayPlayer.d.ts.map +1 -0
- package/dist/react/replayPlayer.js +279 -0
- package/dist/react/replayPlayer.js.map +1 -0
- package/dist/react/shopifyProviders.d.ts +68 -0
- package/dist/react/shopifyProviders.d.ts.map +1 -0
- package/dist/react/shopifyProviders.js +98 -0
- package/dist/react/shopifyProviders.js.map +1 -0
- package/dist/react/useKeepScreenAwake.d.ts +2 -0
- package/dist/react/useKeepScreenAwake.d.ts.map +1 -0
- package/dist/react/useKeepScreenAwake.js +34 -0
- package/dist/react/useKeepScreenAwake.js.map +1 -0
- package/dist/react/useLiveAuction.d.ts +104 -0
- package/dist/react/useLiveAuction.d.ts.map +1 -0
- package/dist/react/useLiveAuction.js +244 -0
- package/dist/react/useLiveAuction.js.map +1 -0
- package/dist/react/useLiveChat.d.ts +75 -0
- package/dist/react/useLiveChat.d.ts.map +1 -0
- package/dist/react/useLiveChat.js +131 -0
- package/dist/react/useLiveChat.js.map +1 -0
- package/dist/react/useLiveGiveawaysAndPolls.d.ts +84 -0
- package/dist/react/useLiveGiveawaysAndPolls.d.ts.map +1 -0
- package/dist/react/useLiveGiveawaysAndPolls.js +180 -0
- package/dist/react/useLiveGiveawaysAndPolls.js.map +1 -0
- package/dist/react/useLivePage.d.ts +113 -0
- package/dist/react/useLivePage.d.ts.map +1 -0
- package/dist/react/useLivePage.js +264 -0
- package/dist/react/useLivePage.js.map +1 -0
- package/dist/react/useLiveShop.d.ts +83 -0
- package/dist/react/useLiveShop.d.ts.map +1 -0
- package/dist/react/useLiveShop.js +165 -0
- package/dist/react/useLiveShop.js.map +1 -0
- package/dist/react/useReplayPage.d.ts +117 -0
- package/dist/react/useReplayPage.d.ts.map +1 -0
- package/dist/react/useReplayPage.js +504 -0
- package/dist/react/useReplayPage.js.map +1 -0
- package/dist/showCredit.d.ts +87 -0
- package/dist/showCredit.d.ts.map +1 -0
- package/dist/showCredit.js +120 -0
- package/dist/showCredit.js.map +1 -0
- package/dist/ui/BubbleFrame.d.ts +38 -0
- package/dist/ui/BubbleFrame.d.ts.map +1 -0
- package/dist/ui/BubbleFrame.js +181 -0
- package/dist/ui/BubbleFrame.js.map +1 -0
- package/dist/ui/LiveBubble.d.ts +37 -0
- package/dist/ui/LiveBubble.d.ts.map +1 -0
- package/dist/ui/LiveBubble.js +101 -0
- package/dist/ui/LiveBubble.js.map +1 -0
- package/dist/ui/ReplayBubble.d.ts +23 -0
- package/dist/ui/ReplayBubble.d.ts.map +1 -0
- package/dist/ui/ReplayBubble.js +65 -0
- package/dist/ui/ReplayBubble.js.map +1 -0
- package/dist/ui.d.ts +27 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +34 -0
- package/dist/ui.js.map +1 -0
- package/package.json +36 -5
- package/ui/package.json +6 -0
package/README.md
CHANGED
|
@@ -4,13 +4,14 @@ Live selling, auctions and giveaways for React Native — the Apptile live-selli
|
|
|
4
4
|
singleton, a Zego room engine, an assembled session state machine, and system picture-in-picture with
|
|
5
5
|
its own config plugin.
|
|
6
6
|
|
|
7
|
-
**Headless.**
|
|
8
|
-
native). Your header, comments list, bid bar and sheets stay yours.
|
|
7
|
+
**Headless.** The root ships one component (`LiveVideoTarget`, because a render target is unavoidably
|
|
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
10
|
|
|
10
11
|
**Storefront-agnostic.** Products, cart writes and the auction checkout come from an adapter you
|
|
11
12
|
supply. An app on `@tiledev/sdk-shopify` can take that adapter ready-made (§4, "On Shopify"), along
|
|
12
|
-
with the cart's giveaway-prize helpers
|
|
13
|
-
|
|
13
|
+
with the cart's giveaway-prize helpers, built on the app's own sdk-shopify client. The Live and Replay
|
|
14
|
+
page models (0.14.0) are the exception: they are built for an app on sdk-shopify and call its hooks.
|
|
14
15
|
|
|
15
16
|
```bash
|
|
16
17
|
npm i @tiledev/sdk-apptile-live-selling @tiledev/sdk-apptile-live-selling-native
|
|
@@ -71,16 +72,24 @@ mistake here regardless of how the ranges are written.
|
|
|
71
72
|
|
|
72
73
|
Peers: `react` and `react-native` are needed by the main entry, which re-exports the React layer;
|
|
73
74
|
`zego-express-engine-reactnative` stays optional — off-device the engine resolves to a no-op, as does
|
|
74
|
-
picture-in-picture in the native package. `@tiledev/sdk-shopify`
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
picture-in-picture in the native package. `@tiledev/sdk-shopify` is required since 0.9.0, and since
|
|
76
|
+
0.14.0 at `>=0.21.0` and loaded from here: the Live and Replay page models call its hooks
|
|
77
|
+
(`useCustomer`, `useCart`, `useWishlist`, `useQuickAdd`, `useSignIn`) and read `isAuctioned` and
|
|
78
|
+
`CARD_IMAGE`, so they must resolve the app's own copy, the one its `ShopifyProvider` came from. Also
|
|
79
|
+
loaded by the main entry since 0.14.0: `@react-navigation/native` (7), `expo-video` (3),
|
|
80
|
+
`expo-keep-awake` (15), `@react-native-async-storage/async-storage` (2) and
|
|
81
|
+
`@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.
|
|
77
83
|
|
|
78
84
|
**Everything ships from the package root**, including the providers, the hooks, `LiveVideoTarget` and
|
|
79
85
|
the Shopify helpers. There is no `./react` or `./shopify` subpath — a subpath is reachable only through
|
|
80
86
|
the `exports` map, which a resolver that ignores it (node10, some test runners and bundlers) cannot see
|
|
81
87
|
at all, and an app testing a local build would need its Metro and Jest redirects changed for one
|
|
82
|
-
(decided 2026-10-06, Head of Engineering). What remains beside the root is `./types` (types alone)
|
|
83
|
-
|
|
88
|
+
(decided 2026-10-06, Head of Engineering). What remains beside the root is `./types` (types alone),
|
|
89
|
+
`./ui` (0.14.0: the bubbles, which need peers the root doesn't), and a wildcard for any module in
|
|
90
|
+
`dist` — `/session`, `/streams`, `/polls` — the escape hatch below. `/ui`, like `/types` and
|
|
91
|
+
`/session`, has a folder of its own in the package with a `package.json`, so a resolver that ignores the
|
|
92
|
+
`exports` map finds it too; an app testing a local build redirects it alongside the root.
|
|
84
93
|
|
|
85
94
|
> The root entry pulls in `react-native`, so it no longer loads in a plain Node runtime. Driving the
|
|
86
95
|
> pure data layer from Node — `sessionReducer`, the wire mappers — goes through the module subpaths
|
|
@@ -439,6 +448,78 @@ const rail = useLiveRail({ screenOnShow: useIsFocused() });
|
|
|
439
448
|
hidden from this viewer rather than say there are none. On the web, the three run over the idle session
|
|
440
449
|
and empty wins.
|
|
441
450
|
|
|
451
|
+
### The Live and Replay pages (0.14.0)
|
|
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.
|
|
456
|
+
|
|
457
|
+
```tsx
|
|
458
|
+
import {
|
|
459
|
+
ShopifyLiveSellingProvider, ShopifyLiveSessionProvider, ReplayPlayerProvider,
|
|
460
|
+
GIVEAWAY_PRIZE_KEY, REHEARSALS, type LiveSellingRoutes,
|
|
461
|
+
} from '@tiledev/sdk-apptile-live-selling';
|
|
462
|
+
import { LiveBubble, ReplayBubble } from '@tiledev/sdk-apptile-live-selling/ui';
|
|
463
|
+
|
|
464
|
+
// Where the pages send the shopper: the app's routes, set once.
|
|
465
|
+
const routes: LiveSellingRoutes = {
|
|
466
|
+
openLive: (streamId) => navigationRef.dispatch(CommonActions.navigate('Live', { streamId }, { pop: true })),
|
|
467
|
+
openReplay: (feedId) => navigationRef.dispatch(CommonActions.navigate('Replay', { feedId }, { pop: true })),
|
|
468
|
+
replaceWithReplay: (feedId, nav) => nav.dispatch(StackActions.replace('Replay', { feedId })),
|
|
469
|
+
backToLiveTab: (nav) => nav.dispatch(StackActions.popTo('Tabs', { screen: 'LiveTab' })),
|
|
470
|
+
openHome: (nav) => nav.navigate('Tabs', { screen: 'Home' }),
|
|
471
|
+
openCart: ({ itemsYouWon }, nav) => nav.navigate('Cart', itemsYouWon ? { screen: 'ItemsYouWon' } : undefined),
|
|
472
|
+
openVariantPage: (params, nav) => nav.navigate('VariantSelector', params),
|
|
473
|
+
openSignIn: (method, nav) => nav.navigate('SignIn', { method }),
|
|
474
|
+
sheets: ['VariantSelector', 'SignIn'],
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
<ShopifyLiveSellingProvider
|
|
478
|
+
config={{ ...LIVE_SELLING, haptics: Haptics, hiddenShows: REHEARSALS }}
|
|
479
|
+
cartSourceName={CART_SOURCE_NAME}
|
|
480
|
+
prizeWriteKey={GIVEAWAY_PRIZE_KEY}
|
|
481
|
+
routes={routes}
|
|
482
|
+
track={analytics.track}
|
|
483
|
+
onWarning={captureWarning}
|
|
484
|
+
shopName={APP_NAME}
|
|
485
|
+
>
|
|
486
|
+
<ShopifyLiveSessionProvider>
|
|
487
|
+
<ReplayPlayerProvider>
|
|
488
|
+
<AppNavigator />
|
|
489
|
+
<ReplayBubble chipColor={scrim} />
|
|
490
|
+
<LiveBubble chipColor={scrim} />
|
|
491
|
+
</ReplayPlayerProvider>
|
|
492
|
+
</ShopifyLiveSessionProvider>
|
|
493
|
+
</ShopifyLiveSellingProvider>
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
```tsx
|
|
497
|
+
// 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
|
|
500
|
+
const auction = useLiveAuction({ openItemsYouWon: page.header.onCart });
|
|
501
|
+
const giveawaysAndPolls = useLiveGiveawaysAndPolls();
|
|
502
|
+
|
|
503
|
+
// The Replay screen, and each of its tiles' wiring:
|
|
504
|
+
const replay = useReplayPage(); // replay.player, header, controls, nowCard, comments, shopBar, missing
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
- **Routes stay the app's.** A route taken inside a screen is handed that screen's navigation (to
|
|
508
|
+
replace it, or go back from it); `openLive` and `openReplay` are taken from outside the navigator (a
|
|
509
|
+
bubble, the session's `onPipRestore`). Without `routes`, each says so through `onWarning` and goes
|
|
510
|
+
nowhere. The hooks read the route's params themselves: `streamId` on Live, `feedId` or `streamId` on
|
|
511
|
+
Replay.
|
|
512
|
+
- **`track`** gets `liveJoin` (once per show per app run, never for a show `hiddenShows` names) and a
|
|
513
|
+
show's copy of each add (`streamAddToCart`, `replayAddToCart`); **`onWarning`** a read a page carried
|
|
514
|
+
on without; **`shopName`** goes in the bidding rules.
|
|
515
|
+
- **The variant page** gets `VariantPageParams` (a handle, a show's credit, `beingAuctioned`). It
|
|
516
|
+
reports a landed add with `reportShowAdd(credit, track, product, variant)`; product grids elsewhere
|
|
517
|
+
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.
|
|
520
|
+
- **On the web** the hooks and bubbles run over the idle session: the Live screen's tiles draw nothing,
|
|
521
|
+
the Replay screen plays.
|
|
522
|
+
|
|
442
523
|
### Store links in comments, as cards (0.12.0)
|
|
443
524
|
|
|
444
525
|
A host pastes a product or collection link into the chat; the comment can show it as a card with the
|
|
@@ -810,6 +891,7 @@ lives in the native package.)
|
|
|
810
891
|
|---|---|
|
|
811
892
|
| `engine.native.ts` — hands the real Zego module, `Platform.OS`, picture-in-picture and the token call to `ZegoLiveEngine` (`zegoEngine.ts`), which owns the room, plays into a rebindable view, publishes a guest's camera, and translates every Zego channel into a `LiveEvent` | `engine.ts` — no-op, `isNoop: true` |
|
|
812
893
|
| `react/index.ts` — the real providers, hooks and video target | `react/index.web.ts` — real client and read hooks, idle session, `View` in place of the texture view |
|
|
894
|
+
| `react/platformSession.ts` (0.14.0) — the session, its show, the video target, the bid gate and the wins, for the page hooks and the bubbles | `react/platformSession.web.ts` — the idle stand-ins `index.web.ts` re-exports |
|
|
813
895
|
|
|
814
896
|
The web file is not only about behaviour. `LiveVideoTarget` requires `zego-express-engine-reactnative`
|
|
815
897
|
for its texture view, and a bundler collects that `require` whichever branch would run it — so a web
|
|
@@ -975,7 +1057,7 @@ two copies of the same Expo module, and identical pod and module names collide a
|
|
|
975
1057
|
| `npm run lint` | Typechecks, emitting nothing |
|
|
976
1058
|
| `npm run clean` | Removes `dist` |
|
|
977
1059
|
| `npm test` | Compiles `src` + `test` to `.test-dist` and runs `node --test` — the reducer, the engine (against a stand-in Zego), the transport and the mappers |
|
|
978
|
-
| `npm pack` | The publish tarball — `dist`, `types`, `session` and nothing native |
|
|
1060
|
+
| `npm pack` | The publish tarball — `dist`, `types`, `session`, `ui` and nothing native |
|
|
979
1061
|
|
|
980
1062
|
The reducer is exported on its own (`sessionReducer`, `deriveStatus`, `roundClosesAt`, `nextExpiryAt`) and is pure, so it
|
|
981
1063
|
can be driven with no room, socket or React — from Node, import it as
|
|
@@ -1002,8 +1084,8 @@ can be driven with no room, socket or React — from Node, import it as
|
|
|
1002
1084
|
|
|
1003
1085
|
## Not included
|
|
1004
1086
|
|
|
1005
|
-
UI · a storefront · navigation
|
|
1006
|
-
collection).
|
|
1087
|
+
UI beyond the bubbles (`/ui`) · a storefront · navigation (the pages take the app's `routes`) · a static
|
|
1088
|
+
clip fallback (`clips.list()` reads only the configured collection).
|
|
1007
1089
|
|
|
1008
1090
|
## Verified against
|
|
1009
1091
|
|
|
@@ -12,6 +12,16 @@ import type { ShopifyMoney } from './shopifyCommerce';
|
|
|
12
12
|
* 2026-09-07, Amore 2026-10-05), and `_giveawayItem`, which Freckled Poppy's auction cart writes.
|
|
13
13
|
*/
|
|
14
14
|
export declare const GIVEAWAY_PRIZE_KEYS: readonly string[];
|
|
15
|
+
/**
|
|
16
|
+
* The key to stamp a prize with (0.14.0, moved from amore-v2's `src/core/providers/liveSelling.tsx`):
|
|
17
|
+
* `_isGiveawayItem`, the platform's. The live-selling service stamps it on the prize it adds to a
|
|
18
|
+
* winner's cart, the order webhook settles giveaway claims by it, and an app's wins checkout writes it
|
|
19
|
+
* (`ShopifyLiveSellingProvider`'s and `createShopifyLiveCommerce`'s `prizeWriteKey`). It only marks
|
|
20
|
+
* the line as a prize (a card of its own, no stepper or bin); the prize's `GIVEAWAY-…` discount code is
|
|
21
|
+
* what makes it free. Amore's since 2026-10-05; K-Marie's since 2026-10-19, which wrote `_giveawayItem`
|
|
22
|
+
* before (`GIVEAWAY_PRIZE_KEYS` still reads both).
|
|
23
|
+
*/
|
|
24
|
+
export declare const GIVEAWAY_PRIZE_KEY = "_isGiveawayItem";
|
|
15
25
|
export interface GiveawayPrizeLineOptions {
|
|
16
26
|
/** The keys that mark a prize on this store. Defaults to `GIVEAWAY_PRIZE_KEYS`, both spellings. */
|
|
17
27
|
keys?: readonly string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"giveawayPrizeLines.d.ts","sourceRoot":"","sources":["../src/giveawayPrizeLines.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAyC,CAAC;AAE3F,MAAM,WAAW,wBAAwB;IACvC,mGAAmG;IACnG,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBA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
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GIVEAWAY_CODE_PREFIX = exports.GIVEAWAY_PRIZE_KEYS = void 0;
|
|
3
|
+
exports.GIVEAWAY_CODE_PREFIX = exports.GIVEAWAY_PRIZE_KEY = exports.GIVEAWAY_PRIZE_KEYS = void 0;
|
|
4
4
|
exports.isGiveawayPrizeLine = isGiveawayPrizeLine;
|
|
5
5
|
exports.prizeLinePrice = prizeLinePrice;
|
|
6
6
|
exports.isGiveawayCode = isGiveawayCode;
|
|
@@ -12,6 +12,16 @@ exports.giveawayVariantIdsOf = giveawayVariantIdsOf;
|
|
|
12
12
|
* 2026-09-07, Amore 2026-10-05), and `_giveawayItem`, which Freckled Poppy's auction cart writes.
|
|
13
13
|
*/
|
|
14
14
|
exports.GIVEAWAY_PRIZE_KEYS = ['_isGiveawayItem', '_giveawayItem'];
|
|
15
|
+
/**
|
|
16
|
+
* The key to stamp a prize with (0.14.0, moved from amore-v2's `src/core/providers/liveSelling.tsx`):
|
|
17
|
+
* `_isGiveawayItem`, the platform's. The live-selling service stamps it on the prize it adds to a
|
|
18
|
+
* winner's cart, the order webhook settles giveaway claims by it, and an app's wins checkout writes it
|
|
19
|
+
* (`ShopifyLiveSellingProvider`'s and `createShopifyLiveCommerce`'s `prizeWriteKey`). It only marks
|
|
20
|
+
* the line as a prize (a card of its own, no stepper or bin); the prize's `GIVEAWAY-…` discount code is
|
|
21
|
+
* what makes it free. Amore's since 2026-10-05; K-Marie's since 2026-10-19, which wrote `_giveawayItem`
|
|
22
|
+
* before (`GIVEAWAY_PRIZE_KEYS` still reads both).
|
|
23
|
+
*/
|
|
24
|
+
exports.GIVEAWAY_PRIZE_KEY = '_isGiveawayItem';
|
|
15
25
|
/**
|
|
16
26
|
* Whether a cart line is stamped as a giveaway prize: any of `keys`, with any value but `"false"` (the
|
|
17
27
|
* service's value isn't documented, and a stamped line is a prize).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"giveawayPrizeLines.js","sourceRoot":"","sources":["../src/giveawayPrizeLines.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"giveawayPrizeLines.js","sourceRoot":"","sources":["../src/giveawayPrizeLines.ts"],"names":[],"mappings":";;;AAuCA,kDAMC;AAkBD,wCAYC;AAUD,wCAEC;AA2BD,oEAeC;AAOD,oDAIC;AAnID;;;;GAIG;AACU,QAAA,mBAAmB,GAAsB,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;AAE3F;;;;;;;;GAQG;AACU,QAAA,kBAAkB,GAAG,iBAAiB,CAAC;AAOpD;;;;;;GAMG;AACH,SAAgB,mBAAmB,CACjC,IAA+E,EAC/E,UAAoC,EAAE;;IAEtC,MAAM,IAAI,GAAG,MAAA,OAAO,CAAC,IAAI,mCAAI,2BAAmB,CAAC;IACjD,OAAO,CAAC,MAAA,IAAI,CAAC,UAAU,mCAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC;AAClH,CAAC;AAYD;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,IAI9B;IACC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACnD,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;IAClE,OAAO;QACL,UAAU,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE;QAC5F,YAAY,EAAE,KAAK,KAAK,CAAC;QACzB,QAAQ,EAAE,OAAO,GAAG,M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,MAAA,IAAI,CAAC,SAAS,mCAAI,EAAE,CAAA,EAAA,CAAC;SACvC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SACnD,MAAM,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9D,OAAO,uBAAuB,IAAI,IAAI,CAAC;AACzC,CAAC;AAED;;;;GAIG;AACH,SAAgB,oBAAoB,CAClC,IAAiE;IAEjE,OAAO,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC;AACpF,CAAC"}
|
package/dist/hiddenShows.d.ts
CHANGED
|
@@ -14,6 +14,16 @@
|
|
|
14
14
|
* the viewer from `LiveSellingProvider`'s `viewerEmail` and the rule from the config.
|
|
15
15
|
*/
|
|
16
16
|
import type { HiddenShows } from './types';
|
|
17
|
+
/**
|
|
18
|
+
* Rehearsals: the Apptile team's practice shows, for `config.hiddenShows` (0.14.0, moved from amore-v2's
|
|
19
|
+
* `REHEARSALS`, old Amore's rule from the live-selling kit's `internalLive.ts`). The team practises on
|
|
20
|
+
* the store's real gateway under the word `apptiletest`; a show whose title contains it, in any case
|
|
21
|
+
* ("ApptileTest run 2" too), is hidden from everyone but a shopper signed in with an `@apptile.io`
|
|
22
|
+
* email: not on Home, not on the Live tab, not as a recording, and their phone never joins its room.
|
|
23
|
+
* `useLivePage` never reports `liveJoin` for a show the rule names, whoever watches it. Not a default:
|
|
24
|
+
* an app passes it as `hiddenShows`.
|
|
25
|
+
*/
|
|
26
|
+
export declare const REHEARSALS: HiddenShows;
|
|
17
27
|
/** Whether a viewer signed in with this email sees hidden shows. No email (signed out): never. */
|
|
18
28
|
export declare function seesHiddenShows(viewerEmail: string | null | undefined, rule: HiddenShows | null | undefined): boolean;
|
|
19
29
|
/** Whether the rule hides this show by its title, from viewers who don't see hidden shows. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hiddenShows.d.ts","sourceRoot":"","sources":["../src/hiddenShows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAOrH;AAED,8FAA8F;AAC9F,wBAAgB,YAAY,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAOtH;AAED,8GAA8G;AAC9G,wBAAgB,YAAY,CAC1B,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,EAC1C,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,OAAO,CAET;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAC/D,KAAK,EAAE,IAAI,EAAE,EACb,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,EAAE,CAIR"}
|
|
1
|
+
{"version":3,"file":"hiddenShows.d.ts","sourceRoot":"","sources":["../src/hiddenShows.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,WAAuF,CAAC;AAEjH,kGAAkG;AAClG,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAOrH;AAED,8FAA8F;AAC9F,wBAAgB,YAAY,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAOtH;AAED,8GAA8G;AAC9G,wBAAgB,YAAY,CAC1B,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,EAC1C,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,OAAO,CAET;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,SAAS;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAC/D,KAAK,EAAE,IAAI,EAAE,EACb,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,IAAI,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACnC,IAAI,EAAE,CAIR"}
|
package/dist/hiddenShows.js
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REHEARSALS = void 0;
|
|
3
4
|
exports.seesHiddenShows = seesHiddenShows;
|
|
4
5
|
exports.isHiddenShow = isHiddenShow;
|
|
5
6
|
exports.isHiddenFrom = isHiddenFrom;
|
|
6
7
|
exports.withoutHiddenShows = withoutHiddenShows;
|
|
8
|
+
/**
|
|
9
|
+
* Rehearsals: the Apptile team's practice shows, for `config.hiddenShows` (0.14.0, moved from amore-v2's
|
|
10
|
+
* `REHEARSALS`, old Amore's rule from the live-selling kit's `internalLive.ts`). The team practises on
|
|
11
|
+
* the store's real gateway under the word `apptiletest`; a show whose title contains it, in any case
|
|
12
|
+
* ("ApptileTest run 2" too), is hidden from everyone but a shopper signed in with an `@apptile.io`
|
|
13
|
+
* email: not on Home, not on the Live tab, not as a recording, and their phone never joins its room.
|
|
14
|
+
* `useLivePage` never reports `liveJoin` for a show the rule names, whoever watches it. Not a default:
|
|
15
|
+
* an app passes it as `hiddenShows`.
|
|
16
|
+
*/
|
|
17
|
+
exports.REHEARSALS = { titleIncludes: ['apptiletest'], visibleToEmailDomains: ['apptile.io'] };
|
|
7
18
|
/** Whether a viewer signed in with this email sees hidden shows. No email (signed out): never. */
|
|
8
19
|
function seesHiddenShows(viewerEmail, rule) {
|
|
9
20
|
const email = (viewerEmail !== null && viewerEmail !== void 0 ? viewerEmail : '').trim().toLowerCase();
|
package/dist/hiddenShows.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hiddenShows.js","sourceRoot":"","sources":["../src/hiddenShows.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hiddenShows.js","sourceRoot":"","sources":["../src/hiddenShows.ts"],"names":[],"mappings":";;;AA6BA,0CAOC;AAGD,oCAOC;AAGD,oCAMC;AAMD,gDAQC;AApDD;;;;;;;;GAQG;AACU,QAAA,UAAU,GAAgB,EAAE,aAAa,EAAE,CAAC,aAAa,CAAC,EAAE,qBAAqB,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;AAEjH,kGAAkG;AAClG,SAAgB,eAAe,CAAC,WAAsC,EAAE,IAAoC;IAC1G,MAAM,KAAK,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAA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CAAC;IAC9D,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IAClE,OAAO,OAAO,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;AAC3D,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -37,9 +37,9 @@ export { toSilentAuctionLot, lotsFromResponse, lotProductGid, lotKey, lotPhase,
|
|
|
37
37
|
export { createSilentAuctionFeed, type SilentAuctionFeed, type SilentAuctionFeedOptions, type SilentAuctionFeedState, type SilentAuctionItem, } from './silentAuctionFeed';
|
|
38
38
|
export { createShopifyLiveCommerce, liveProductFromShopify, chargedVariantId, AUCTION_CART_SOURCE_TYPE, WINNING_BID_KEY, WIN_INDEX_KEY, type ShopifyAttribute, type ShopifyBuyer, type ShopifyCartLineInput, type ShopifyCollectionForCard, type ShopifyImageTransform, type ShopifyLiveCommerce, type ShopifyLiveCommerceOptions, type ShopifyMoney, type ShopifyProductForLive, type ShopifyProductsAndCart, } from './shopifyCommerce';
|
|
39
39
|
export { createShopifyLiveIdentity, type ShopifyCustomerSession, type ShopifyLiveIdentity, } from './shopifyIdentity';
|
|
40
|
-
export { GIVEAWAY_CODE_PREFIX, GIVEAWAY_PRIZE_KEYS, isGiveawayCode, isGiveawayPrizeLine, prizeLinePrice, prizesCoveredByGiveawayCodes, type CartLineForGiveawayCodes, type GiveawayPrizeLineOptions, type PrizeLinePrice, } from './giveawayPrizeLines';
|
|
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
|
-
export { isHiddenFrom, isHiddenShow, seesHiddenShows, withoutHiddenShows } from './hiddenShows';
|
|
42
|
+
export { isHiddenFrom, isHiddenShow, seesHiddenShows, withoutHiddenShows, REHEARSALS } from './hiddenShows';
|
|
43
43
|
export { publicName, firstNameOf, viewerNameFor, sameRoomName, isBlockedViewerName, DEFAULT_BLOCKED_VIEWER_NAMES, 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';
|
|
@@ -47,6 +47,11 @@ export { showLinkDestination } from './showLinks';
|
|
|
47
47
|
export { bidRefusal, quickBids, winChance, lotStateFor, isYourWin, BID_ON_ITS_WAY_MS, QUICK_BID_STEPS, VERY_HIGH_CHANCE_OVER, GOOD_CHANCE_OVER, type BidRound, type BidRefusalReason, type WinChance, openingBidFor } from './auctionRules';
|
|
48
48
|
export { classifyComment, type CommentLine } from './auctionComments';
|
|
49
49
|
export { isTheVariant, givenAwayVariant } from './giveawayPrize';
|
|
50
|
+
export { variantPageParams, auctionLotPageParams, liveShowCredit, replayShowCredit, reportShowAdd, showQuickAddOptions, type ShowCredit, type ShowQuickAdd, type VariantPageParams, } from './showCredit';
|
|
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';
|
|
53
|
+
export { NO_ROUTES, consoleWarning, pageOptionsReading, reportLiveWarning, type LivePageOptions, type LivePageOptionsInput, type LiveSellingRoutes, type LiveTrack, type LiveWarning, type ScreenNavigation, type SignInPageMethod, } from './pageOptions';
|
|
54
|
+
export type * from './pageTypes';
|
|
50
55
|
export { sessionReducer, initialSessionState, deriveStatus, roundClosesAt, nextExpiryAt, isNothingOnAir, withOffAirSettled, isTheEndedGiveaway, SOLD_CARD_MS, REACTION_MS, CART_CARD_MS, } from './session';
|
|
51
56
|
export { capabilitiesFor, LIVE_CAPABILITIES, AUCTION_CAPABILITIES, REPLAY_CAPABILITIES, IDLE_AUCTION, IDLE_GIVEAWAY, } from './sessionTypes';
|
|
52
57
|
/**
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,KA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,gBAAgB,GACtB,MAAM,eAAe,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,8 +31,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
31
31
|
};
|
|
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
|
-
exports.
|
|
35
|
-
exports.
|
|
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;
|
|
36
37
|
// The imperative client (default + named).
|
|
37
38
|
var liveSelling_1 = require("./liveSelling");
|
|
38
39
|
Object.defineProperty(exports, "liveSelling", { enumerable: true, get: function () { return liveSelling_1.liveSelling; } });
|
|
@@ -155,6 +156,7 @@ var shopifyIdentity_1 = require("./shopifyIdentity");
|
|
|
155
156
|
Object.defineProperty(exports, "createShopifyLiveIdentity", { enumerable: true, get: function () { return shopifyIdentity_1.createShopifyLiveIdentity; } });
|
|
156
157
|
var giveawayPrizeLines_1 = require("./giveawayPrizeLines");
|
|
157
158
|
Object.defineProperty(exports, "GIVEAWAY_CODE_PREFIX", { enumerable: true, get: function () { return giveawayPrizeLines_1.GIVEAWAY_CODE_PREFIX; } });
|
|
159
|
+
Object.defineProperty(exports, "GIVEAWAY_PRIZE_KEY", { enumerable: true, get: function () { return giveawayPrizeLines_1.GIVEAWAY_PRIZE_KEY; } });
|
|
158
160
|
Object.defineProperty(exports, "GIVEAWAY_PRIZE_KEYS", { enumerable: true, get: function () { return giveawayPrizeLines_1.GIVEAWAY_PRIZE_KEYS; } });
|
|
159
161
|
Object.defineProperty(exports, "isGiveawayCode", { enumerable: true, get: function () { return giveawayPrizeLines_1.isGiveawayCode; } });
|
|
160
162
|
Object.defineProperty(exports, "isGiveawayPrizeLine", { enumerable: true, get: function () { return giveawayPrizeLines_1.isGiveawayPrizeLine; } });
|
|
@@ -171,6 +173,7 @@ Object.defineProperty(exports, "isHiddenFrom", { enumerable: true, get: function
|
|
|
171
173
|
Object.defineProperty(exports, "isHiddenShow", { enumerable: true, get: function () { return hiddenShows_1.isHiddenShow; } });
|
|
172
174
|
Object.defineProperty(exports, "seesHiddenShows", { enumerable: true, get: function () { return hiddenShows_1.seesHiddenShows; } });
|
|
173
175
|
Object.defineProperty(exports, "withoutHiddenShows", { enumerable: true, get: function () { return hiddenShows_1.withoutHiddenShows; } });
|
|
176
|
+
Object.defineProperty(exports, "REHEARSALS", { enumerable: true, get: function () { return hiddenShows_1.REHEARSALS; } });
|
|
174
177
|
var showNames_1 = require("./showNames");
|
|
175
178
|
Object.defineProperty(exports, "publicName", { enumerable: true, get: function () { return showNames_1.publicName; } });
|
|
176
179
|
Object.defineProperty(exports, "firstNameOf", { enumerable: true, get: function () { return showNames_1.firstNameOf; } });
|
|
@@ -204,6 +207,33 @@ Object.defineProperty(exports, "classifyComment", { enumerable: true, get: funct
|
|
|
204
207
|
var giveawayPrize_1 = require("./giveawayPrize");
|
|
205
208
|
Object.defineProperty(exports, "isTheVariant", { enumerable: true, get: function () { return giveawayPrize_1.isTheVariant; } });
|
|
206
209
|
Object.defineProperty(exports, "givenAwayVariant", { enumerable: true, get: function () { return giveawayPrize_1.givenAwayVariant; } });
|
|
210
|
+
// The Live and Replay pages' rules and what credits an add to a show (0.14.0, moved from amore-v2).
|
|
211
|
+
// Pure, so an app's own tests can load them from `dist` (`showCredit`, `livePages`, `pageOptions`,
|
|
212
|
+
// `liveRoom`) without the native engine. The page hooks are on the React layer below.
|
|
213
|
+
var showCredit_1 = require("./showCredit");
|
|
214
|
+
Object.defineProperty(exports, "variantPageParams", { enumerable: true, get: function () { return showCredit_1.variantPageParams; } });
|
|
215
|
+
Object.defineProperty(exports, "auctionLotPageParams", { enumerable: true, get: function () { return showCredit_1.auctionLotPageParams; } });
|
|
216
|
+
Object.defineProperty(exports, "liveShowCredit", { enumerable: true, get: function () { return showCredit_1.liveShowCredit; } });
|
|
217
|
+
Object.defineProperty(exports, "replayShowCredit", { enumerable: true, get: function () { return showCredit_1.replayShowCredit; } });
|
|
218
|
+
Object.defineProperty(exports, "reportShowAdd", { enumerable: true, get: function () { return showCredit_1.reportShowAdd; } });
|
|
219
|
+
Object.defineProperty(exports, "showQuickAddOptions", { enumerable: true, get: function () { return showCredit_1.showQuickAddOptions; } });
|
|
220
|
+
var liveRoom_1 = require("./liveRoom");
|
|
221
|
+
Object.defineProperty(exports, "announceAddToLiveRoom", { enumerable: true, get: function () { return liveRoom_1.announceAddToLiveRoom; } });
|
|
222
|
+
var livePages_1 = require("./livePages");
|
|
223
|
+
Object.defineProperty(exports, "BACK_ACTIONS", { enumerable: true, get: function () { return livePages_1.BACK_ACTIONS; } });
|
|
224
|
+
Object.defineProperty(exports, "REPLAY_COMMENTS_SHOWN", { enumerable: true, get: function () { return livePages_1.REPLAY_COMMENTS_SHOWN; } });
|
|
225
|
+
Object.defineProperty(exports, "chatNameAsk", { enumerable: true, get: function () { return livePages_1.chatNameAsk; } });
|
|
226
|
+
Object.defineProperty(exports, "firstShownAt", { enumerable: true, get: function () { return livePages_1.firstShownAt; } });
|
|
227
|
+
Object.defineProperty(exports, "isCoveredOnlyBySheet", { enumerable: true, get: function () { return livePages_1.isCoveredOnlyBySheet; } });
|
|
228
|
+
Object.defineProperty(exports, "isTheShow", { enumerable: true, get: function () { return livePages_1.isTheShow; } });
|
|
229
|
+
Object.defineProperty(exports, "playerMs", { enumerable: true, get: function () { return livePages_1.playerMs; } });
|
|
230
|
+
Object.defineProperty(exports, "productOnScreen", { enumerable: true, get: function () { return livePages_1.productOnScreen; } });
|
|
231
|
+
Object.defineProperty(exports, "replayCommentsAt", { enumerable: true, get: function () { return livePages_1.replayCommentsAt; } });
|
|
232
|
+
var pageOptions_1 = require("./pageOptions");
|
|
233
|
+
Object.defineProperty(exports, "NO_ROUTES", { enumerable: true, get: function () { return pageOptions_1.NO_ROUTES; } });
|
|
234
|
+
Object.defineProperty(exports, "consoleWarning", { enumerable: true, get: function () { return pageOptions_1.consoleWarning; } });
|
|
235
|
+
Object.defineProperty(exports, "pageOptionsReading", { enumerable: true, get: function () { return pageOptions_1.pageOptionsReading; } });
|
|
236
|
+
Object.defineProperty(exports, "reportLiveWarning", { enumerable: true, get: function () { return pageOptions_1.reportLiveWarning; } });
|
|
207
237
|
// The session state machine — pure, and usable without React for tests or a custom host.
|
|
208
238
|
var session_1 = require("./session");
|
|
209
239
|
Object.defineProperty(exports, "sessionReducer", { enumerable: true, get: function () { return session_1.sessionReducer; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG
|
|
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;AA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A;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,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The rules behind the Live and Replay page models (0.14.0, moved from amore-v2's `useLivePage`,
|
|
3
|
+
* `useLiveChat` and `useReplayPage`): which navigation is a back press, when a sheet leaves the show
|
|
4
|
+
* playing, who the chat asks for a name, and what a recording shows at a point of its playhead.
|
|
5
|
+
*
|
|
6
|
+
* Pure, so it loads in plain Node for tests. The hooks (`react/useLivePage.ts` and the rest) apply them.
|
|
7
|
+
*/
|
|
8
|
+
import type { ReplayCommentItem } from './pageTypes';
|
|
9
|
+
import type { Replay, ReplayComment, ReplaySegment } from './types';
|
|
10
|
+
/**
|
|
11
|
+
* The navigation actions that are a back press: the header's arrow and picture-in-picture button
|
|
12
|
+
* (`goBack`, or `popTo` the tabs when nothing is behind), Android's back (`GO_BACK`) and the iOS swipe
|
|
13
|
+
* (native-stack's `POP`). Leaving any of these ways shrinks a show on air into the bubble. Being
|
|
14
|
+
* replaced (a link's show has a recording) or navigated away from is not going back.
|
|
15
|
+
*/
|
|
16
|
+
export declare const BACK_ACTIONS: ReadonlySet<string>;
|
|
17
|
+
/** A navigator's state, as far as `isCoveredOnlyBySheet` reads it (React Navigation's has it). */
|
|
18
|
+
export interface StackStateForSheets {
|
|
19
|
+
index: number;
|
|
20
|
+
routes: readonly {
|
|
21
|
+
key: string;
|
|
22
|
+
name: string;
|
|
23
|
+
}[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The screen (`screenKey`, its route key) is covered only by a page drawn as a sheet (`sheets`, the
|
|
27
|
+
* app's route names: the variant page, the Sign In page): the show plays on behind it, with the screen
|
|
28
|
+
* kept on, as if the screen were on show.
|
|
29
|
+
*/
|
|
30
|
+
export declare function isCoveredOnlyBySheet(state: StackStateForSheets | null | undefined, screenKey: string, sheets: readonly string[]): boolean;
|
|
31
|
+
/** Who the shopper is in the room, as far as the chat's name ask reads it. */
|
|
32
|
+
export interface ChatNameInput {
|
|
33
|
+
/** The room has a name for the shopper (`session.viewerName`). */
|
|
34
|
+
named: boolean;
|
|
35
|
+
/** sdk-shopify's `useCustomer().loggedIn`. */
|
|
36
|
+
loggedIn: boolean;
|
|
37
|
+
/** A stored sign-in is still being read on app open (`useCustomer().restoring`). */
|
|
38
|
+
restoring: boolean;
|
|
39
|
+
/** The signed-in shopper's account has been read (`useCustomer().customer`). */
|
|
40
|
+
hasCustomer: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* What the comment box does about the shopper's name: ask for one on the first Send (`askForName`,
|
|
44
|
+
* saved on this phone by the session's `chooseViewerName`), or wait while the account loads
|
|
45
|
+
* (`waitingForName`, Send held so nothing goes out as "Anonymous").
|
|
46
|
+
*
|
|
47
|
+
* Signed in, the account's name is the room's (`viewerNameFor`). Since sdk-apptile-live-selling 0.13.0
|
|
48
|
+
* an account with no name gives none (it was the email's part before the @), and nor does one with a
|
|
49
|
+
* name the show's team goes by: the room has no name, and the shopper is asked like a signed-out one
|
|
50
|
+
* once the account has loaded. amore-v2's chat waited for as long as a signed-in shopper had no name,
|
|
51
|
+
* which on 0.13.0 was for ever for such an account.
|
|
52
|
+
*/
|
|
53
|
+
export declare function chatNameAsk({ named, loggedIn, restoring, hasCustomer }: ChatNameInput): {
|
|
54
|
+
askForName: boolean;
|
|
55
|
+
waitingForName: boolean;
|
|
56
|
+
};
|
|
57
|
+
/** A card passes the recording's feed id; a push passes its show's streaming id. Both find it. */
|
|
58
|
+
export declare function isTheShow(replay: Pick<Replay, 'id' | 'streamingId'>, id: string): boolean;
|
|
59
|
+
/** A time or length from the player, in seconds, as milliseconds; 0 when it has none yet. */
|
|
60
|
+
export declare function playerMs(seconds: number): number;
|
|
61
|
+
/**
|
|
62
|
+
* The product on screen at `atMs`: the one whose time window covers it (where windows overlap, the
|
|
63
|
+
* 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.
|
|
65
|
+
*/
|
|
66
|
+
export declare function productOnScreen<Item extends {
|
|
67
|
+
id: string;
|
|
68
|
+
}>(segments: readonly ReplaySegment[], products: readonly Item[], atMs: number): Item | null;
|
|
69
|
+
/** Where the host first showed a product, or null for one they never did (tagged, with no time window). */
|
|
70
|
+
export declare function firstShownAt(segments: readonly ReplaySegment[], productId: string): number | null;
|
|
71
|
+
/** Comments kept in the replay's chat pane: the newest of what has been said so far. */
|
|
72
|
+
export declare const REPLAY_COMMENTS_SHOWN = 60;
|
|
73
|
+
/**
|
|
74
|
+
* The recording's chat as it stood at `atMs`: what had been said by then, the newest `shown`, oldest
|
|
75
|
+
* first. The comments file writes the host's rows as "You" (true on the console that recorded them),
|
|
76
|
+
* so those read as the host's too.
|
|
77
|
+
*/
|
|
78
|
+
export declare function replayCommentsAt(comments: readonly ReplayComment[], atMs: number, shown?: number): ReplayCommentItem[];
|
|
79
|
+
//# sourceMappingURL=livePages.d.ts.map
|
|
@@ -0,0 +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,M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