@tiledev/sdk-apptile-live-selling 0.15.4 → 0.16.0-beta.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 +44 -5
- package/dist/checkoutRefused.d.ts +9 -0
- package/dist/checkoutRefused.d.ts.map +1 -0
- package/dist/checkoutRefused.js +16 -0
- package/dist/checkoutRefused.js.map +1 -0
- package/dist/clips.d.ts +4 -2
- package/dist/clips.d.ts.map +1 -1
- package/dist/clips.js +76 -15
- package/dist/clips.js.map +1 -1
- package/dist/giveawayPrizes.d.ts +20 -0
- package/dist/giveawayPrizes.d.ts.map +1 -0
- package/dist/giveawayPrizes.js +50 -0
- package/dist/giveawayPrizes.js.map +1 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -3
- package/dist/index.js.map +1 -1
- package/dist/livePages.d.ts +11 -1
- package/dist/livePages.d.ts.map +1 -1
- package/dist/livePages.js +29 -0
- package/dist/livePages.js.map +1 -1
- package/dist/pageOptions.d.ts +16 -0
- package/dist/pageOptions.d.ts.map +1 -1
- package/dist/pageOptions.js +4 -1
- package/dist/pageOptions.js.map +1 -1
- package/dist/pageTypes.d.ts +1 -1
- package/dist/pageTypes.d.ts.map +1 -1
- package/dist/react/LiveSellingProvider.d.ts +8 -2
- package/dist/react/LiveSellingProvider.d.ts.map +1 -1
- package/dist/react/LiveSellingProvider.js +10 -2
- package/dist/react/LiveSellingProvider.js.map +1 -1
- package/dist/react/index.d.ts +6 -5
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +6 -2
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.web.d.ts +5 -4
- package/dist/react/index.web.d.ts.map +1 -1
- package/dist/react/index.web.js +5 -2
- package/dist/react/index.web.js.map +1 -1
- package/dist/react/replayPlayer.d.ts +2 -0
- package/dist/react/replayPlayer.d.ts.map +1 -1
- package/dist/react/replayPlayer.js +11 -1
- package/dist/react/replayPlayer.js.map +1 -1
- package/dist/react/shopifyProviders.d.ts +10 -5
- package/dist/react/shopifyProviders.d.ts.map +1 -1
- package/dist/react/shopifyProviders.js +14 -4
- package/dist/react/shopifyProviders.js.map +1 -1
- package/dist/react/showPages.d.ts.map +1 -1
- package/dist/react/showPages.js +4 -2
- package/dist/react/showPages.js.map +1 -1
- package/dist/react/useAuctionBidGate.d.ts +8 -2
- package/dist/react/useAuctionBidGate.d.ts.map +1 -1
- package/dist/react/useAuctionBidGate.js +59 -2
- package/dist/react/useAuctionBidGate.js.map +1 -1
- package/dist/react/useAuctionWins.d.ts +5 -3
- package/dist/react/useAuctionWins.d.ts.map +1 -1
- package/dist/react/useAuctionWins.js +7 -2
- package/dist/react/useAuctionWins.js.map +1 -1
- package/dist/react/useClips.d.ts +7 -1
- package/dist/react/useClips.d.ts.map +1 -1
- package/dist/react/useClips.js +20 -7
- package/dist/react/useClips.js.map +1 -1
- package/dist/react/useFeaturedClip.d.ts +5 -1
- package/dist/react/useFeaturedClip.d.ts.map +1 -1
- package/dist/react/useFeaturedClip.js +6 -4
- package/dist/react/useFeaturedClip.js.map +1 -1
- package/dist/react/useGiveawayPrizes.d.ts +4 -0
- package/dist/react/useGiveawayPrizes.d.ts.map +1 -0
- package/dist/react/useGiveawayPrizes.js +58 -0
- package/dist/react/useGiveawayPrizes.js.map +1 -0
- package/dist/react/useLiveAuction.d.ts.map +1 -1
- package/dist/react/useLiveAuction.js +9 -5
- package/dist/react/useLiveAuction.js.map +1 -1
- package/dist/react/useLiveChat.d.ts +6 -1
- package/dist/react/useLiveChat.d.ts.map +1 -1
- package/dist/react/useLiveChat.js +31 -9
- package/dist/react/useLiveChat.js.map +1 -1
- package/dist/react/useLivePage.d.ts +12 -6
- package/dist/react/useLivePage.d.ts.map +1 -1
- package/dist/react/useLivePage.js +33 -18
- package/dist/react/useLivePage.js.map +1 -1
- package/dist/react/useReplayPage.d.ts +22 -3
- package/dist/react/useReplayPage.d.ts.map +1 -1
- package/dist/react/useReplayPage.js +102 -97
- package/dist/react/useReplayPage.js.map +1 -1
- package/dist/react/useSilentAuctionLot.d.ts +2 -0
- package/dist/react/useSilentAuctionLot.d.ts.map +1 -1
- package/dist/react/useSilentAuctionLot.js +17 -1
- package/dist/react/useSilentAuctionLot.js.map +1 -1
- package/dist/react/useSilentAuctionLots.d.ts +2 -0
- package/dist/react/useSilentAuctionLots.d.ts.map +1 -1
- package/dist/react/useSilentAuctionLots.js +1 -0
- package/dist/react/useSilentAuctionLots.js.map +1 -1
- package/dist/react/useSilentAuctionRounds.d.ts +2 -1
- package/dist/react/useSilentAuctionRounds.d.ts.map +1 -1
- package/dist/react/useSilentAuctionRounds.js +1 -1
- package/dist/react/useSilentAuctionRounds.js.map +1 -1
- package/dist/shopifyCommerce.d.ts +18 -5
- package/dist/shopifyCommerce.d.ts.map +1 -1
- package/dist/shopifyCommerce.js +42 -11
- package/dist/shopifyCommerce.js.map +1 -1
- package/dist/silentAuctionFeed.d.ts +2 -0
- package/dist/silentAuctionFeed.d.ts.map +1 -1
- package/dist/silentAuctionFeed.js +12 -2
- package/dist/silentAuctionFeed.js.map +1 -1
- package/dist/silentAuctionRules.d.ts +29 -0
- package/dist/silentAuctionRules.d.ts.map +1 -1
- package/dist/silentAuctionRules.js +53 -0
- package/dist/silentAuctionRules.js.map +1 -1
- package/dist/storeData.d.ts +45 -0
- package/dist/storeData.d.ts.map +1 -0
- package/dist/storeData.js +35 -0
- package/dist/storeData.js.map +1 -0
- package/dist/types.d.ts +27 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/viewerRules.d.ts +39 -0
- package/dist/viewerRules.d.ts.map +1 -0
- package/dist/viewerRules.js +46 -0
- package/dist/viewerRules.js.map +1 -0
- package/dist/zegoEngine.d.ts.map +1 -1
- package/dist/zegoEngine.js +14 -7
- package/dist/zegoEngine.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -470,7 +470,8 @@ const routes: LiveSellingRoutes = {
|
|
|
470
470
|
openReplay: (feedId) => navigationRef.dispatch(CommonActions.navigate('Replay', { feedId }, { pop: true })),
|
|
471
471
|
replaceWithReplay: (feedId, nav) => nav.dispatch(StackActions.replace('Replay', { feedId })),
|
|
472
472
|
backToLiveTab: (nav) => nav.dispatch(StackActions.popTo('Tabs', { screen: 'LiveTab' })),
|
|
473
|
-
|
|
473
|
+
// Back to the tabs already there: a navigate pushes a second Tabs over Live (0.16.0: every back goes Home).
|
|
474
|
+
openHome: (nav) => nav.dispatch(StackActions.popTo('Tabs', { screen: 'Home' })),
|
|
474
475
|
openCart: ({ itemsYouWon }, nav) => nav.navigate('Cart', itemsYouWon ? { screen: 'ItemsYouWon' } : undefined),
|
|
475
476
|
openVariantPage: (params, nav) => nav.navigate('VariantSelector', params),
|
|
476
477
|
openSignIn: (method, nav) => nav.navigate('SignIn', { method }),
|
|
@@ -692,6 +693,7 @@ typed with `useAuctionWins<Product>()` / `useLiveSession<Product>()`.
|
|
|
692
693
|
| `shopify` | yes | The app's sdk-shopify client (`shopify`): its `products.byIds` and `cart.create` |
|
|
693
694
|
| `cartSourceName` | yes | `source_name` on the wins cart |
|
|
694
695
|
| `prizeWriteKey` | yes | The line attribute this store's cart transform reads for a prize. No default: a wrong one charges a winner full price |
|
|
696
|
+
| `winningBidKey` | no | The line attribute the store's cart transform reprices a win by. Default `_winningBid` (0.16.0) |
|
|
695
697
|
| `buyer` | yes | Who pays: `{ customerAccessToken, email? }`, or null for a guest cart. `createShopifyLiveIdentity(...).buyer` |
|
|
696
698
|
| `imageTransform` | no | The products' photo size, passed to `products.byIds` |
|
|
697
699
|
| `extraLineAttributes` | no | `(win) => ShopifyAttribute[]`: more attributes on each win's line, after the adapter's own (a final-sale stamp, say) |
|
|
@@ -701,8 +703,9 @@ typed with `useAuctionWins<Product>()` / `useLiveSession<Product>()`.
|
|
|
701
703
|
left out, and each `LiveProduct` keeps the Shopify `Product` on `raw`. Each variant carries its own
|
|
702
704
|
photo, when it has one (`imageUrl`, 0.9.0).
|
|
703
705
|
- `createAuctionCheckout(wins, auctionId)`: the contract above. A cart of its own; each win a line of
|
|
704
|
-
one stamped `_winningBid` (or `prizeWriteKey: "true"`)
|
|
705
|
-
`source_name`, `source_type: "auction"`,
|
|
706
|
+
one stamped `_winningBid` (`winningBidKey`; or `prizeWriteKey: "true"`), `_winIndex` and a silent
|
|
707
|
+
auction's `_lotNumber` (0.16.0); the giveaway discount codes; `source_name`, `source_type: "auction"`,
|
|
708
|
+
`auction_id` (every show the lines were won on, comma-joined, 0.16.0); the buyer when there is one (a guest cart when
|
|
706
709
|
there isn't, or reading it fails). Each win is charged on the variant `useAuctionWins` shows: the
|
|
707
710
|
recorded one when it belongs to the product, else the first that can be sold, else the first. Throws
|
|
708
711
|
when there is nothing to check out or none of the wins can be sold.
|
|
@@ -787,13 +790,18 @@ const gate = useAuctionBidGate({
|
|
|
787
790
|
screenOnShow: isFocused, // back on show still signed out: the held bid is dropped
|
|
788
791
|
});
|
|
789
792
|
|
|
790
|
-
// gate.blocker: 'signIn' | 'unpaidWins' | 'terms' | 'variant' | null
|
|
793
|
+
// gate.blocker: 'signIn' | 'blocked' | 'checkingAccount' | 'accountUnknown' | 'unpaidWins' | 'terms' | 'variant' | null
|
|
791
794
|
gate.requestBid(); // the round's minimum — the slide gesture
|
|
792
795
|
gate.requestBid(250); // a custom bid
|
|
793
796
|
gate.refusal; // { id, reason: 'outbid' | 'overCap', amount } | null (atAmountShown)
|
|
794
797
|
gate.bidOnItsWay; // true for BID_ON_ITS_WAY_MS (1.2 s) after a bid goes
|
|
795
798
|
```
|
|
796
799
|
|
|
800
|
+
The store's bar (0.16.0): the provider's `viewerRestrictions` (on Shopify, the customer's `BIDBLOCKED` /
|
|
801
|
+
`APPBLOCKED` tags). Barred, a bid stops at `blocked`, before unpaid wins. Not read yet, it waits at
|
|
802
|
+
`checkingAccount` ("Checking your account…") while they are read again, then goes on (or stops at `blocked`);
|
|
803
|
+
not read within `ACCOUNT_CHECK_LIMIT_MS` (10 s) it is dropped at `accountUnknown`.
|
|
804
|
+
|
|
797
805
|
Signed in → nothing outstanding on another stream → rules accepted once per install → a variant chosen
|
|
798
806
|
(once per round, not per bid). The requested bid is held while you clear the blockers and then placed, so
|
|
799
807
|
finishing the last panel completes the bid they originally asked for. A held bid belongs to its round:
|
|
@@ -877,8 +885,11 @@ const lots = useSilentAuctionLots({ order, screenOnShow: useIsFocused(), pollInt
|
|
|
877
885
|
// lots.status, lots.items ({ lot, product }), lots.upcoming, lots.refresh(), lots.readingAhead, lots.hasMore
|
|
878
886
|
|
|
879
887
|
// The product page's console.
|
|
888
|
+
// The page reads the auction metafields on its own read (0.16.0; never with every product: winners' emails):
|
|
889
|
+
const page = useProductPage(handle, { metafields: AUCTION_METAFIELDS.product, variantMetafields: AUCTION_METAFIELDS.variant });
|
|
880
890
|
const auction = useSilentAuctionLot(product?.id ?? null, { customerId, signedIn, email, variantId, screenOnShow: useIsFocused() });
|
|
881
|
-
const bar = productPageBuyBar({ lot: auction.lot, lotStatus: auction.status, ...
|
|
891
|
+
const bar = productPageBuyBar({ lot: auction.lot, lotStatus: auction.status, ...productAuctionGates(page.product, variantId), nowMs: Date.now() });
|
|
892
|
+
// A copy read without them (a card's, the device's) is not known: neither bar shows until the page's read lands.
|
|
882
893
|
// auction.nextBid, auction.bidCap, auction.leading, auction.phase, auction.extended, auction.placeBid(amount?)
|
|
883
894
|
|
|
884
895
|
// My Bids.
|
|
@@ -1109,6 +1120,34 @@ can be driven with no room, socket or React — from Node, import it as
|
|
|
1109
1120
|
- **Consuming via `file:` or a workspace link?** Hoist `@types/react`. The `.d.ts` otherwise resolves
|
|
1110
1121
|
against the SDK's own nested copy, and React 18's `ReactNode` isn't assignable to React 19's.
|
|
1111
1122
|
|
|
1123
|
+
**A product's featured clip** (0.15.3; read as 33.2.0 did since 0.16.0): `useFeaturedClip(product.id, { enabled })`
|
|
1124
|
+
(or `liveSelling.clips.featuredForProduct`) is the clip the merchant ranked first for that product, cut to its
|
|
1125
|
+
window (`videoUrl`, `startMs`, `endMs`), with its products and `recordingId` / `streamingId` to open it on Replay
|
|
1126
|
+
(the route's `clip`), or null. `isCopyOfClip(media, clip)` spots Shopify's own copy of it among the product's videos.
|
|
1127
|
+
|
|
1128
|
+
**The store-data standard** (0.16.0, `storeData.ts`): `BID_BLOCKED_TAG`, `APP_BLOCKED_TAG`, `LOT_TAG`,
|
|
1129
|
+
`AUCTION_METAFIELDS` and `viewerRestrictionsFrom(tags)`. Every store sets its Shopify data up to match;
|
|
1130
|
+
sdk-shopify names none of them, so the app passes them where it reads (the product page's own metafields, a
|
|
1131
|
+
search `queryTemplate` such as `{query}* -tag:${LOT_TAG}` for a store that hides lots from search).
|
|
1132
|
+
|
|
1133
|
+
**A wins checkout that can't be trusted is refused** (0.16.0): `createAuctionCheckout` throws
|
|
1134
|
+
`CheckoutRefusedError` (its message is for the shopper) for a won item that can't be bought any more, a win with
|
|
1135
|
+
no winning price above 0, or no auction id; `useAuctionWins().error` shows the message.
|
|
1136
|
+
|
|
1137
|
+
**Also new in 0.16.0** (details in the CHANGELOG):
|
|
1138
|
+
|
|
1139
|
+
| What | Where |
|
|
1140
|
+
| --- | --- |
|
|
1141
|
+
| A barred or not-yet-read viewer's bid | the gate's `blocked`, `checkingAccount`, `accountUnknown` steps; `ACCOUNT_CHECK_LIMIT_MS`, `RESTRICTIONS_REFRESH_MS` |
|
|
1142
|
+
| The reaction limit | `reactionButton.limitNotice` (`{ id, message }`); `createReactionBudget()` |
|
|
1143
|
+
| Recent clips for a store with no reel | `clips.recent()`, `useClips({ source: 'recent', enabled })` |
|
|
1144
|
+
| Replay of a clip | the Replay route's `clip` (a `ClipItem`); `replayClipWindow`, `replayOfClip` |
|
|
1145
|
+
| Replay's taps and end | `useReplayPage({ tapVideo: 'showControls', controlsShowMs })`; `player.finished` |
|
|
1146
|
+
| A silent auction's last bid variant | `useSilentAuctionLot().bidVariantId` |
|
|
1147
|
+
| Lots kept on a failed refresh | `useSilentAuctionLots().refreshFailed` |
|
|
1148
|
+
| The wins cart | `_lotNumber` (`LOT_NUMBER_KEY`), `winningBidKey`, `auctionIdsOf`, `CheckoutRefusedError` |
|
|
1149
|
+
| Giveaway prizes onto the cart | `config.giveawayPrizes`, `collectGiveawayPrizes`, `useGiveawayPrizes({ active })` (default: the screen's focus) |
|
|
1150
|
+
|
|
1112
1151
|
## Not included
|
|
1113
1152
|
|
|
1114
1153
|
UI beyond the bubbles (`/ui`) · a storefront · navigation (the pages take the app's `routes`) · a static
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A wins checkout refused rather than charge a wrong price or leave a lot unsettled (0.16.0, as Spark*l's
|
|
3
|
+
* 33.2.0 refused it): a won item that can't be bought any more, a win with no winning price, or no auction
|
|
4
|
+
* to settle. Its `message` is for the shopper, saying what to do; `useAuctionWins().error` shows it as it is.
|
|
5
|
+
*/
|
|
6
|
+
export declare class CheckoutRefusedError extends Error {
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=checkoutRefused.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkoutRefused.d.ts","sourceRoot":"","sources":["../src/checkoutRefused.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CheckoutRefusedError = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* A wins checkout refused rather than charge a wrong price or leave a lot unsettled (0.16.0, as Spark*l's
|
|
6
|
+
* 33.2.0 refused it): a won item that can't be bought any more, a win with no winning price, or no auction
|
|
7
|
+
* to settle. Its `message` is for the shopper, saying what to do; `useAuctionWins().error` shows it as it is.
|
|
8
|
+
*/
|
|
9
|
+
class CheckoutRefusedError extends Error {
|
|
10
|
+
constructor(message) {
|
|
11
|
+
super(message);
|
|
12
|
+
this.name = 'CheckoutRefusedError';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.CheckoutRefusedError = CheckoutRefusedError;
|
|
16
|
+
//# sourceMappingURL=checkoutRefused.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkoutRefused.js","sourceRoot":"","sources":["../src/checkoutRefused.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,MAAa,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AALD,oDAKC"}
|
package/dist/clips.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ClipItem, ClipsAPI } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* The featured clip among a product's clips
|
|
4
|
-
* active
|
|
3
|
+
* The featured clip among a product's clips (`rows`, or the gateway's `{ data: rows }`): the first ranked 1
|
|
4
|
+
* (`pdp_rank` 1 or "1"; the gateway puts it first), active, with a playlist and an id; null when the merchant
|
|
5
|
+
* has featured none. Its window, products and poster as above; `recordingId` / `streamingId` open it on
|
|
6
|
+
* Replay with its chat (0.16.0). Pure, for tests.
|
|
5
7
|
*/
|
|
6
8
|
export declare function featuredClipOf(rows: unknown): ClipItem | null;
|
|
7
9
|
/** A Shopify product video is the clip worker's copy of `clip` (its alt names the clip), so not shown twice. */
|
package/dist/clips.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clips.d.ts","sourceRoot":"","sources":["../src/clips.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"clips.d.ts","sourceRoot":"","sources":["../src/clips.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AA+ElD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,IAAI,CAoB7D;AAKD,gHAAgH;AAChH,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAGtI;AAKD,eAAO,MAAM,KAAK,EAAE,QA2DnB,CAAC"}
|
package/dist/clips.js
CHANGED
|
@@ -13,28 +13,65 @@ exports.isCopyOfClip = isCopyOfClip;
|
|
|
13
13
|
* applied, and each clip silently plays a whole show from the top.
|
|
14
14
|
*/
|
|
15
15
|
const client_1 = require("./client");
|
|
16
|
+
/** Recordings read, and of those how many asked for their clips, by `clips.recent()`. */
|
|
17
|
+
const RECENT_CLIPS_RECORDINGS = 10;
|
|
18
|
+
const RECENT_CLIPS_PROBES = 4;
|
|
19
|
+
function chunkToClip(chunk, index, recordingId) {
|
|
20
|
+
var _a, _b, _c;
|
|
21
|
+
const source = (chunk.streaming_url || chunk.url || '').trim();
|
|
22
|
+
if (!source)
|
|
23
|
+
return null;
|
|
24
|
+
return {
|
|
25
|
+
id: chunk._id || `${recordingId}-clip-${index}`,
|
|
26
|
+
title: ((_a = chunk.title) === null || _a === void 0 ? void 0 : _a.trim()) || '',
|
|
27
|
+
posterUrl: ((_b = chunk.thumbnail) === null || _b === void 0 ? void 0 : _b.trim()) || ((_c = chunk.thumbnail_image) === null || _c === void 0 ? void 0 : _c.trim()) || null,
|
|
28
|
+
productIds: clipProductIds(chunk),
|
|
29
|
+
recordingId: chunk.feed_id || recordingId,
|
|
30
|
+
...clipWindowOf(source, chunk),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
16
33
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
34
|
+
* A clip's window in its recording, and the playlist without the inert trim params: the row's own segment
|
|
35
|
+
* times when it has both (end after start), else the URL's `?start=&end=` (ms, each on its own). An end at or
|
|
36
|
+
* before the start is dropped. Read with a regex rather than `URL.searchParams`, which React Native does not
|
|
37
|
+
* implement for reading a parsed URL back.
|
|
19
38
|
*/
|
|
20
|
-
function
|
|
39
|
+
function clipWindowOf(url, segment) {
|
|
21
40
|
const [videoUrl, query = ''] = url.split('?');
|
|
41
|
+
const start = segment === null || segment === void 0 ? void 0 : segment.segment_start_time;
|
|
42
|
+
const end = segment === null || segment === void 0 ? void 0 : segment.segment_end_time;
|
|
43
|
+
if (typeof start === 'number' && typeof end === 'number' && end > start)
|
|
44
|
+
return { videoUrl, startMs: start, endMs: end };
|
|
22
45
|
const readMs = (key) => {
|
|
23
|
-
const found = query.match(new RegExp(`(?:^|&)${key}=(\\d+)`));
|
|
46
|
+
const found = query.match(new RegExp(`(?:^|&)${key}=(\\d+(?:\\.\\d+)?)`));
|
|
24
47
|
return found ? Number(found[1]) : null;
|
|
25
48
|
};
|
|
26
|
-
|
|
49
|
+
const startMs = readMs('start');
|
|
50
|
+
const endMs = readMs('end');
|
|
51
|
+
return { videoUrl, startMs, endMs: endMs !== null && startMs !== null && endMs <= startMs ? null : endMs };
|
|
52
|
+
}
|
|
53
|
+
/** The products a clip sells: its lots (`product_info`, links left out), else `product_ids`; as Shopify gids. */
|
|
54
|
+
function clipProductIds(row) {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
const lots = ((_a = row.product_info) !== null && _a !== void 0 ? _a : [])
|
|
57
|
+
.filter((info) => !!(info === null || info === void 0 ? void 0 : info.store_product_id) && info.product_type !== 'url')
|
|
58
|
+
.map((info) => info.store_product_id);
|
|
59
|
+
return (lots.length ? lots : (_b = row.product_ids) !== null && _b !== void 0 ? _b : []).map(client_1.toProductGid);
|
|
27
60
|
}
|
|
28
61
|
/**
|
|
29
|
-
* The featured clip among a product's clips
|
|
30
|
-
* active
|
|
62
|
+
* The featured clip among a product's clips (`rows`, or the gateway's `{ data: rows }`): the first ranked 1
|
|
63
|
+
* (`pdp_rank` 1 or "1"; the gateway puts it first), active, with a playlist and an id; null when the merchant
|
|
64
|
+
* has featured none. Its window, products and poster as above; `recordingId` / `streamingId` open it on
|
|
65
|
+
* Replay with its chat (0.16.0). Pure, for tests.
|
|
31
66
|
*/
|
|
32
67
|
function featuredClipOf(rows) {
|
|
33
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
34
|
-
|
|
68
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
69
|
+
const list = Array.isArray(rows) ? rows : rows === null || rows === void 0 ? void 0 : rows.data;
|
|
70
|
+
if (!Array.isArray(list))
|
|
35
71
|
return null;
|
|
36
|
-
for (const row of
|
|
37
|
-
|
|
72
|
+
for (const row of list) {
|
|
73
|
+
// eslint-disable-next-line eqeqeq -- the gateway sends the rank as a number or a string.
|
|
74
|
+
if (!row || row.pdp_rank == null || row.pdp_rank != 1 || row.is_active === false)
|
|
38
75
|
continue;
|
|
39
76
|
const url = ((_a = row.streaming_url) === null || _a === void 0 ? void 0 : _a.trim()) || ((_b = row.url) === null || _b === void 0 ? void 0 : _b.trim());
|
|
40
77
|
const id = ((_c = row._id) === null || _c === void 0 ? void 0 : _c.trim()) || ((_d = row.feed_id) === null || _d === void 0 ? void 0 : _d.trim());
|
|
@@ -44,8 +81,10 @@ function featuredClipOf(rows) {
|
|
|
44
81
|
id,
|
|
45
82
|
title: ((_e = row.title) === null || _e === void 0 ? void 0 : _e.trim()) || '',
|
|
46
83
|
posterUrl: ((_f = row.thumbnail) === null || _f === void 0 ? void 0 : _f.trim()) || ((_g = row.thumbnail_image) === null || _g === void 0 ? void 0 : _g.trim()) || null,
|
|
47
|
-
productIds: (
|
|
48
|
-
|
|
84
|
+
productIds: clipProductIds(row),
|
|
85
|
+
recordingId: ((_h = row.feed_id) === null || _h === void 0 ? void 0 : _h.trim()) || null,
|
|
86
|
+
streamingId: ((_j = row.streaming_id) === null || _j === void 0 ? void 0 : _j.trim()) || null,
|
|
87
|
+
...clipWindowOf(url, row),
|
|
49
88
|
};
|
|
50
89
|
}
|
|
51
90
|
return null;
|
|
@@ -83,10 +122,32 @@ exports.clips = {
|
|
|
83
122
|
title: ((_a = item.title) === null || _a === void 0 ? void 0 : _a.trim()) || '',
|
|
84
123
|
posterUrl: ((_b = item.thumbnail) === null || _b === void 0 ? void 0 : _b.trim()) || null,
|
|
85
124
|
productIds: ((_c = item.product_ids) !== null && _c !== void 0 ? _c : []).map(client_1.toProductGid),
|
|
86
|
-
...
|
|
125
|
+
...clipWindowOf(item.url),
|
|
87
126
|
});
|
|
88
127
|
});
|
|
89
128
|
},
|
|
129
|
+
async recent({ recordings = RECENT_CLIPS_RECORDINGS, probes = RECENT_CLIPS_PROBES } = {}) {
|
|
130
|
+
var _a, _b, _c, _d;
|
|
131
|
+
const body = await (0, client_1.liveSellingRequest)(
|
|
132
|
+
// The service resolves the company from the header and never reads this path segment.
|
|
133
|
+
'/widget/plugin/shoppable-feeds/app', { params: { limit: recordings } });
|
|
134
|
+
const recordingIds = ((_b = (_a = body.data) === null || _a === void 0 ? void 0 : _a.feeds) !== null && _b !== void 0 ? _b : []).map((feed) => feed === null || feed === void 0 ? void 0 : feed.feed_id).filter((id) => !!id);
|
|
135
|
+
for (const recordingId of recordingIds.slice(0, probes)) {
|
|
136
|
+
let rows = [];
|
|
137
|
+
try {
|
|
138
|
+
const page = await (0, client_1.liveSellingRequest)('/live-streaming/plugin/shoppable-feeds/chunks', { params: { shoppable_feed_id: recordingId, page: 1 } });
|
|
139
|
+
rows = (_d = (_c = page.data) === null || _c === void 0 ? void 0 : _c.streaming_shoppable_feeds) !== null && _d !== void 0 ? _d : [];
|
|
140
|
+
}
|
|
141
|
+
catch {
|
|
142
|
+
// A recording that can't be cut into clips isn't the reel failing: the next one is asked.
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
const found = rows.map((row, index) => chunkToClip(row, index, recordingId)).filter((clip) => !!clip);
|
|
146
|
+
if (found.length)
|
|
147
|
+
return found;
|
|
148
|
+
}
|
|
149
|
+
return [];
|
|
150
|
+
},
|
|
90
151
|
async featuredForProduct(productId) {
|
|
91
152
|
const productNumber = productNumberOf(productId);
|
|
92
153
|
if (!productNumber)
|
|
@@ -94,7 +155,7 @@ exports.clips = {
|
|
|
94
155
|
const body = await (0, client_1.liveSellingRequest)('/shoppable-feeds/product/v2', {
|
|
95
156
|
params: { store_product_id: productNumber, company_id: (0, client_1.getConfig)().companyId },
|
|
96
157
|
});
|
|
97
|
-
return featuredClipOf(body
|
|
158
|
+
return featuredClipOf(body);
|
|
98
159
|
},
|
|
99
160
|
};
|
|
100
161
|
//# sourceMappingURL=clips.js.map
|
package/dist/clips.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clips.js","sourceRoot":"","sources":["../src/clips.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"clips.js","sourceRoot":"","sources":["../src/clips.ts"],"names":[],"mappings":";;;AA+FA,wCAoBC;AAMD,oCAGC;AA5HD;;;;;;;;GAQG;AACH,qCAAuE;AAkBvE,yFAAyF;AACzF,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAE9B,SAAS,WAAW,CAAC,KAAe,EAAE,KAAa,EAAE,WAAmB;;IACtE,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/D,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,OAAO;QACL,EAAE,EAAE,KAAK,CAAC,GAAG,IAAI,GAAG,WAAW,SAAS,KAAK,EAAE;QAC/C,KAAK,EAAE,CAAA,MAAA,KA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CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,SAAiB;QACxC,MAAM,aAAa,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;QACjD,IAAI,CAAC,aAAa;YAAE,OAAO,IAAI,CAAC;QAChC,MAAM,IAAI,GAAG,MAAM,IAAA,2BAAkB,EAAU,6BAA6B,EAAE;YAC5E,MAAM,EAAE,EAAE,gBAAgB,EAAE,aAAa,EAAE,UAAU,EAAE,IAAA,kBAAS,GAAE,CAAC,SAAS,EAAE;SAC/E,CAAC,CAAC;QACH,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface GiveawayPrizesConfig {
|
|
2
|
+
/** The giveaway service's base URL. */
|
|
3
|
+
url: string;
|
|
4
|
+
/** The store's Apptile app id, which the service files claims under. */
|
|
5
|
+
appId: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GiveawayPrizeCollection {
|
|
8
|
+
/** Prizes owed, delivered or not. */
|
|
9
|
+
pending: number;
|
|
10
|
+
/** Claims that landed in the cart on this call: re-read the cart when there are any. */
|
|
11
|
+
delivered: string[];
|
|
12
|
+
}
|
|
13
|
+
/** The service's answer, read. A 409 (the cart is gone) and any other refusal: nothing collected. */
|
|
14
|
+
export declare function prizeCollectionFrom(status: number, body: unknown): GiveawayPrizeCollection | null;
|
|
15
|
+
/**
|
|
16
|
+
* Collects what `customerId` (Shopify's numeric id or GID) has won into `cartId`, or reports what is owed
|
|
17
|
+
* when there is no cart. Null when unconfigured, refused or unreachable; never throws.
|
|
18
|
+
*/
|
|
19
|
+
export declare function collectGiveawayPrizes(customerId: string, cartId: string | null): Promise<GiveawayPrizeCollection | null>;
|
|
20
|
+
//# sourceMappingURL=giveawayPrizes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"giveawayPrizes.d.ts","sourceRoot":"","sources":["../src/giveawayPrizes.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,oBAAoB;IACnC,uCAAuC;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,wFAAwF;IACxF,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,qGAAqG;AACrG,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI,CAOjG;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAoB9H"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prizeCollectionFrom = prizeCollectionFrom;
|
|
4
|
+
exports.collectGiveawayPrizes = collectGiveawayPrizes;
|
|
5
|
+
/**
|
|
6
|
+
* Giveaway prizes onto the shopper's current cart (0.16.0). A won prize stays a claim on Apptile's
|
|
7
|
+
* giveaway service until an order pays for it, so it can go into whatever cart the shopper has now
|
|
8
|
+
* (the one they entered with is usually checked out by then). Given a cart, the service adds the line,
|
|
9
|
+
* its code and its prize stamp, and says what it delivered; without one it only says what is owed.
|
|
10
|
+
*/
|
|
11
|
+
const client_1 = require("./client");
|
|
12
|
+
/** The service's answer, read. A 409 (the cart is gone) and any other refusal: nothing collected. */
|
|
13
|
+
function prizeCollectionFrom(status, body) {
|
|
14
|
+
if (status < 200 || status >= 300)
|
|
15
|
+
return null;
|
|
16
|
+
const record = (body !== null && body !== void 0 ? body : {});
|
|
17
|
+
return {
|
|
18
|
+
pending: typeof record.pending === 'number' ? record.pending : 0,
|
|
19
|
+
delivered: Array.isArray(record.delivered) ? record.delivered.filter((key) => typeof key === 'string') : [],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Collects what `customerId` (Shopify's numeric id or GID) has won into `cartId`, or reports what is owed
|
|
24
|
+
* when there is no cart. Null when unconfigured, refused or unreachable; never throws.
|
|
25
|
+
*/
|
|
26
|
+
async function collectGiveawayPrizes(customerId, cartId) {
|
|
27
|
+
const config = (0, client_1.isConfigured)() ? (0, client_1.getConfig)().giveawayPrizes : undefined;
|
|
28
|
+
if (!(config === null || config === void 0 ? void 0 : config.url) || !customerId)
|
|
29
|
+
return null;
|
|
30
|
+
const url = `${config.url.replace(/\/$/, '')}/hydrate`;
|
|
31
|
+
try {
|
|
32
|
+
return await (0, client_1.withRequestTimeout)(url, async (signal) => {
|
|
33
|
+
const response = await fetch(url, {
|
|
34
|
+
method: 'POST',
|
|
35
|
+
headers: { 'content-type': 'application/json' },
|
|
36
|
+
body: JSON.stringify({ appId: config.appId, customerId: customerId.split('/').pop(), cartId }),
|
|
37
|
+
signal,
|
|
38
|
+
});
|
|
39
|
+
const body = await response.json().catch(() => null);
|
|
40
|
+
if (!response.ok && response.status !== 409)
|
|
41
|
+
(0, client_1.getLogger)().error(new Error(`giveaway prizes refused: ${response.status}`), { at: 'giveawayPrizes' });
|
|
42
|
+
return prizeCollectionFrom(response.status, body);
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
catch (caught) {
|
|
46
|
+
(0, client_1.getLogger)().error(caught, { at: 'giveawayPrizes' });
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=giveawayPrizes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"giveawayPrizes.js","sourceRoot":"","sources":["../src/giveawayPrizes.ts"],"names":[],"mappings":";;AAuBA,kDAOC;AAMD,sDAoBC;AAxDD;;;;;GAKG;AACH,qCAAkF;AAgBlF,qGAAqG;AACrG,SAAgB,mBAAm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C,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC;gBAC9F,MAAM;aACP,CAAC,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;YACrD,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG;gBAAE,IAAA,kBAAS,GAAE,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,4BAA4B,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC;YACnJ,OAAO,mBAAmB,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,IAAA,kBAAS,GAAE,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -33,9 +33,9 @@ export { liveAttributionSourceFor, replayAttributionSourceFor, type AttributionS
|
|
|
33
33
|
export { toCommentSegments, hasCommentLink, classifyCommentLink, toUrlPreview, displayHost, type CommentLink, type CommentLinkCard, type CommentSegment, type StoreCommentLink, } from './commentLinks';
|
|
34
34
|
export { resolveCommentLinkCard, cachedCommentLinkCard, clearCommentLinkCards } from './commentLinkCards';
|
|
35
35
|
export { silentAuctions, SILENT_AUCTION_API_URL, BID_RECORD_BATCH_SIZE } from './silentAuctions';
|
|
36
|
-
export { toSilentAuctionLot, lotsFromResponse, lotProductGid, lotKey, lotPhase, timeLeftMs, inExtensionWindow, wasExtended, nextBid, bidCapState, isLeading, lotStatus, orderLots, upcomingGroups, myBidsTabs, productPageBuyBar, bidRecordEntries, bidRecordEntry, queryableBidEntries, toSilentAuctionRound, BID_RECORD_NAMESPACE, BID_RECORD_KEY, type SilentAuctionLot, type SilentAuctionPhase, type SilentAuctionLotStatus, type SilentAuctionOrder, type BidCapState, type ProductPageBuyBarInput, type SilentAuctionRound, type SilentAuctionRoundLot, } from './silentAuctionRules';
|
|
36
|
+
export { toSilentAuctionLot, lotsFromResponse, lotProductGid, lotKey, lotPhase, timeLeftMs, inExtensionWindow, wasExtended, nextBid, bidCapState, isLeading, lotStatus, orderLots, upcomingGroups, myBidsTabs, productPageBuyBar, productAuctionGates, type ProductWithAuctionGates, bidRecordEntries, bidRecordEntry, queryableBidEntries, toSilentAuctionRound, BID_RECORD_NAMESPACE, BID_RECORD_KEY, type SilentAuctionLot, type SilentAuctionPhase, type SilentAuctionLotStatus, type SilentAuctionOrder, type BidCapState, type ProductPageBuyBarInput, type SilentAuctionRound, type SilentAuctionRoundLot, } from './silentAuctionRules';
|
|
37
37
|
export { createSilentAuctionFeed, type SilentAuctionFeed, type SilentAuctionFeedOptions, type SilentAuctionFeedState, type SilentAuctionItem, } from './silentAuctionFeed';
|
|
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';
|
|
38
|
+
export { createShopifyLiveCommerce, liveProductFromShopify, chargedVariantId, AUCTION_CART_SOURCE_TYPE, WINNING_BID_KEY, WIN_INDEX_KEY, LOT_NUMBER_KEY, auctionIdsOf, 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
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';
|
|
@@ -46,14 +46,16 @@ export { featuredFirst, withLotFieldsFromRecord } from './showLots';
|
|
|
46
46
|
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
|
+
export { collectGiveawayPrizes, type GiveawayPrizesConfig, type GiveawayPrizeCollection } from './giveawayPrizes';
|
|
49
50
|
export { isTheVariant, givenAwayVariant } from './giveawayPrize';
|
|
50
51
|
export { variantPageParams, auctionLotPageParams, liveShowCredit, replayShowCredit, reportShowAdd, showQuickAddOptions, type ShowCredit, type ShowQuickAdd, type VariantPageParams, } from './showCredit';
|
|
51
52
|
export { announceAddToLiveRoom, type LiveRoomAnnouncement } from './liveRoom';
|
|
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 { BACK_ACTIONS, NO_HOLDS, REPLAY_COMMENTS_SHOWN, accountLoadingOf, accountNameAsk, accountNameToComplete, chatNameAsk, firstShownAt, giveawayNameAsk, holdEndTimesOf, isCoveredOnlyBySheet, isTheShow, playerMs, productOnScreen, replayClipWindow, replayCommentsAt, replayOfClip, tidyAccountName, type AccountForNames, type ChatNameInput, type StackStateForSheets, } from './livePages';
|
|
53
54
|
export { opensInApp, linkLotPrice, showLinkOf, recordingShopItems, isShowLink, type ShowLink, type LinkLotFields, type RecordLot, } from './linkLots';
|
|
54
55
|
export { featuredClipOf, isCopyOfClip } from './clips';
|
|
55
56
|
export { CLIP_THUMB_PIXELS, clipProductId, clipReelItems, type ProductForClip } from './clipsPage';
|
|
56
|
-
export { NO_ROUTES, consoleWarning, pageOptionsReading, reportLiveWarning, type LivePageOptions, type LivePageOptionsInput, type LiveSellingRoutes, type LiveTrack, type LiveWarning, type ScreenNavigation, type SignInPageMethod, } from './pageOptions';
|
|
57
|
+
export { NO_ROUTES, NO_RESTRICTIONS, consoleWarning, pageOptionsReading, reportLiveWarning, type LivePageOptions, type LivePageOptionsInput, type LiveSellingRoutes, type LiveTrack, type LiveWarning, type ScreenNavigation, type SignInPageMethod, type ViewerRestrictions, } from './pageOptions';
|
|
58
|
+
export { createReactionBudget, restrictionStepFor, replayControlsRule, REPLAY_CONTROLS_SHOW_MS, REACTION_BUDGET, REACTION_BUDGET_AFTER_PRODUCT_CHANGE, REACTION_LIMIT_MESSAGE, type ReactionBudget, } from './viewerRules';
|
|
57
59
|
export type * from './pageTypes';
|
|
58
60
|
export { sessionReducer, initialSessionState, deriveStatus, roundClosesAt, nextExpiryAt, isNothingOnAir, withOffAirSettled, isTheEndedGiveaway, SOLD_CARD_MS, REACTION_MS, CART_CARD_MS, } from './session';
|
|
59
61
|
export { capabilitiesFor, LIVE_CAPABILITIES, AUCTION_CAPABILITIES, REPLAY_CAPABILITIES, IDLE_AUCTION, IDLE_GIVEAWAY, } from './sessionTypes';
|
|
@@ -91,4 +93,6 @@ export * from './react/index';
|
|
|
91
93
|
*/
|
|
92
94
|
export { BubbleFrame, BUBBLE_CHIP_COLOR, LiveBubble, ReplayBubble, type BubbleFrameProps, type LiveBubbleProps, type ReplayBubbleProps, } from './ui';
|
|
93
95
|
export { readsOnPastHidden, readsRecordingsAgainOnView, showListStatus, winsTotal, type ShowListStatus, type ShowListInput } from './showPages';
|
|
96
|
+
export { AUCTION_METAFIELDS, APP_BLOCKED_TAG, BID_BLOCKED_TAG, LOT_TAG, viewerRestrictionsFrom } from './storeData';
|
|
97
|
+
export { CheckoutRefusedError } from './checkoutRefused';
|
|
94
98
|
//# sourceMappingURL=index.d.ts.map
|
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,OAA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M,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;AAChJ,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,eAAe,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACpH,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,9 +31,10 @@ 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.
|
|
36
|
-
exports.
|
|
34
|
+
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.auctionIdsOf = exports.LOT_NUMBER_KEY = 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.productAuctionGates = 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.replayClipWindow = 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.collectGiveawayPrizes = 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 = exports.firstNameOf = exports.publicName = exports.REHEARSALS = void 0;
|
|
36
|
+
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.REACTION_LIMIT_MESSAGE = exports.REACTION_BUDGET_AFTER_PRODUCT_CHANGE = exports.REACTION_BUDGET = exports.REPLAY_CONTROLS_SHOW_MS = exports.replayControlsRule = exports.restrictionStepFor = exports.createReactionBudget = exports.reportLiveWarning = exports.pageOptionsReading = exports.consoleWarning = exports.NO_RESTRICTIONS = exports.NO_ROUTES = exports.clipReelItems = exports.clipProductId = exports.CLIP_THUMB_PIXELS = exports.isCopyOfClip = exports.featuredClipOf = exports.isShowLink = exports.recordingShopItems = exports.showLinkOf = exports.linkLotPrice = exports.opensInApp = exports.tidyAccountName = exports.replayOfClip = exports.replayCommentsAt = void 0;
|
|
37
|
+
exports.CheckoutRefusedError = exports.viewerRestrictionsFrom = exports.LOT_TAG = exports.BID_BLOCKED_TAG = exports.APP_BLOCKED_TAG = exports.AUCTION_METAFIELDS = exports.winsTotal = exports.showListStatus = exports.readsRecordingsAgainOnView = exports.readsOnPastHidden = exports.ReplayBubble = exports.LiveBubble = void 0;
|
|
37
38
|
// The imperative client (default + named).
|
|
38
39
|
var liveSelling_1 = require("./liveSelling");
|
|
39
40
|
Object.defineProperty(exports, "liveSelling", { enumerable: true, get: function () { return liveSelling_1.liveSelling; } });
|
|
@@ -134,6 +135,7 @@ Object.defineProperty(exports, "orderLots", { enumerable: true, get: function ()
|
|
|
134
135
|
Object.defineProperty(exports, "upcomingGroups", { enumerable: true, get: function () { return silentAuctionRules_1.upcomingGroups; } });
|
|
135
136
|
Object.defineProperty(exports, "myBidsTabs", { enumerable: true, get: function () { return silentAuctionRules_1.myBidsTabs; } });
|
|
136
137
|
Object.defineProperty(exports, "productPageBuyBar", { enumerable: true, get: function () { return silentAuctionRules_1.productPageBuyBar; } });
|
|
138
|
+
Object.defineProperty(exports, "productAuctionGates", { enumerable: true, get: function () { return silentAuctionRules_1.productAuctionGates; } });
|
|
137
139
|
Object.defineProperty(exports, "bidRecordEntries", { enumerable: true, get: function () { return silentAuctionRules_1.bidRecordEntries; } });
|
|
138
140
|
Object.defineProperty(exports, "bidRecordEntry", { enumerable: true, get: function () { return silentAuctionRules_1.bidRecordEntry; } });
|
|
139
141
|
Object.defineProperty(exports, "queryableBidEntries", { enumerable: true, get: function () { return silentAuctionRules_1.queryableBidEntries; } });
|
|
@@ -152,6 +154,8 @@ Object.defineProperty(exports, "chargedVariantId", { enumerable: true, get: func
|
|
|
152
154
|
Object.defineProperty(exports, "AUCTION_CART_SOURCE_TYPE", { enumerable: true, get: function () { return shopifyCommerce_1.AUCTION_CART_SOURCE_TYPE; } });
|
|
153
155
|
Object.defineProperty(exports, "WINNING_BID_KEY", { enumerable: true, get: function () { return shopifyCommerce_1.WINNING_BID_KEY; } });
|
|
154
156
|
Object.defineProperty(exports, "WIN_INDEX_KEY", { enumerable: true, get: function () { return shopifyCommerce_1.WIN_INDEX_KEY; } });
|
|
157
|
+
Object.defineProperty(exports, "LOT_NUMBER_KEY", { enumerable: true, get: function () { return shopifyCommerce_1.LOT_NUMBER_KEY; } });
|
|
158
|
+
Object.defineProperty(exports, "auctionIdsOf", { enumerable: true, get: function () { return shopifyCommerce_1.auctionIdsOf; } });
|
|
155
159
|
var shopifyIdentity_1 = require("./shopifyIdentity");
|
|
156
160
|
Object.defineProperty(exports, "createShopifyLiveIdentity", { enumerable: true, get: function () { return shopifyIdentity_1.createShopifyLiveIdentity; } });
|
|
157
161
|
var giveawayPrizeLines_1 = require("./giveawayPrizeLines");
|
|
@@ -206,6 +210,8 @@ Object.defineProperty(exports, "GOOD_CHANCE_OVER", { enumerable: true, get: func
|
|
|
206
210
|
Object.defineProperty(exports, "openingBidFor", { enumerable: true, get: function () { return auctionRules_1.openingBidFor; } });
|
|
207
211
|
var auctionComments_1 = require("./auctionComments");
|
|
208
212
|
Object.defineProperty(exports, "classifyComment", { enumerable: true, get: function () { return auctionComments_1.classifyComment; } });
|
|
213
|
+
var giveawayPrizes_1 = require("./giveawayPrizes");
|
|
214
|
+
Object.defineProperty(exports, "collectGiveawayPrizes", { enumerable: true, get: function () { return giveawayPrizes_1.collectGiveawayPrizes; } });
|
|
209
215
|
var giveawayPrize_1 = require("./giveawayPrize");
|
|
210
216
|
Object.defineProperty(exports, "isTheVariant", { enumerable: true, get: function () { return giveawayPrize_1.isTheVariant; } });
|
|
211
217
|
Object.defineProperty(exports, "givenAwayVariant", { enumerable: true, get: function () { return giveawayPrize_1.givenAwayVariant; } });
|
|
@@ -236,7 +242,9 @@ Object.defineProperty(exports, "isCoveredOnlyBySheet", { enumerable: true, get:
|
|
|
236
242
|
Object.defineProperty(exports, "isTheShow", { enumerable: true, get: function () { return livePages_1.isTheShow; } });
|
|
237
243
|
Object.defineProperty(exports, "playerMs", { enumerable: true, get: function () { return livePages_1.playerMs; } });
|
|
238
244
|
Object.defineProperty(exports, "productOnScreen", { enumerable: true, get: function () { return livePages_1.productOnScreen; } });
|
|
245
|
+
Object.defineProperty(exports, "replayClipWindow", { enumerable: true, get: function () { return livePages_1.replayClipWindow; } });
|
|
239
246
|
Object.defineProperty(exports, "replayCommentsAt", { enumerable: true, get: function () { return livePages_1.replayCommentsAt; } });
|
|
247
|
+
Object.defineProperty(exports, "replayOfClip", { enumerable: true, get: function () { return livePages_1.replayOfClip; } });
|
|
240
248
|
Object.defineProperty(exports, "tidyAccountName", { enumerable: true, get: function () { return livePages_1.tidyAccountName; } });
|
|
241
249
|
// Link lots and the links a show opens in the app (0.15.0, moved from amore-v2's `linkLots`).
|
|
242
250
|
var linkLots_1 = require("./linkLots");
|
|
@@ -256,9 +264,18 @@ Object.defineProperty(exports, "clipProductId", { enumerable: true, get: functio
|
|
|
256
264
|
Object.defineProperty(exports, "clipReelItems", { enumerable: true, get: function () { return clipsPage_1.clipReelItems; } });
|
|
257
265
|
var pageOptions_1 = require("./pageOptions");
|
|
258
266
|
Object.defineProperty(exports, "NO_ROUTES", { enumerable: true, get: function () { return pageOptions_1.NO_ROUTES; } });
|
|
267
|
+
Object.defineProperty(exports, "NO_RESTRICTIONS", { enumerable: true, get: function () { return pageOptions_1.NO_RESTRICTIONS; } });
|
|
259
268
|
Object.defineProperty(exports, "consoleWarning", { enumerable: true, get: function () { return pageOptions_1.consoleWarning; } });
|
|
260
269
|
Object.defineProperty(exports, "pageOptionsReading", { enumerable: true, get: function () { return pageOptions_1.pageOptionsReading; } });
|
|
261
270
|
Object.defineProperty(exports, "reportLiveWarning", { enumerable: true, get: function () { return pageOptions_1.reportLiveWarning; } });
|
|
271
|
+
var viewerRules_1 = require("./viewerRules");
|
|
272
|
+
Object.defineProperty(exports, "createReactionBudget", { enumerable: true, get: function () { return viewerRules_1.createReactionBudget; } });
|
|
273
|
+
Object.defineProperty(exports, "restrictionStepFor", { enumerable: true, get: function () { return viewerRules_1.restrictionStepFor; } });
|
|
274
|
+
Object.defineProperty(exports, "replayControlsRule", { enumerable: true, get: function () { return viewerRules_1.replayControlsRule; } });
|
|
275
|
+
Object.defineProperty(exports, "REPLAY_CONTROLS_SHOW_MS", { enumerable: true, get: function () { return viewerRules_1.REPLAY_CONTROLS_SHOW_MS; } });
|
|
276
|
+
Object.defineProperty(exports, "REACTION_BUDGET", { enumerable: true, get: function () { return viewerRules_1.REACTION_BUDGET; } });
|
|
277
|
+
Object.defineProperty(exports, "REACTION_BUDGET_AFTER_PRODUCT_CHANGE", { enumerable: true, get: function () { return viewerRules_1.REACTION_BUDGET_AFTER_PRODUCT_CHANGE; } });
|
|
278
|
+
Object.defineProperty(exports, "REACTION_LIMIT_MESSAGE", { enumerable: true, get: function () { return viewerRules_1.REACTION_LIMIT_MESSAGE; } });
|
|
262
279
|
// The session state machine — pure, and usable without React for tests or a custom host.
|
|
263
280
|
var session_1 = require("./session");
|
|
264
281
|
Object.defineProperty(exports, "sessionReducer", { enumerable: true, get: function () { return session_1.sessionReducer; } });
|
|
@@ -327,4 +344,12 @@ Object.defineProperty(exports, "readsOnPastHidden", { enumerable: true, get: fun
|
|
|
327
344
|
Object.defineProperty(exports, "readsRecordingsAgainOnView", { enumerable: true, get: function () { return showPages_1.readsRecordingsAgainOnView; } });
|
|
328
345
|
Object.defineProperty(exports, "showListStatus", { enumerable: true, get: function () { return showPages_1.showListStatus; } });
|
|
329
346
|
Object.defineProperty(exports, "winsTotal", { enumerable: true, get: function () { return showPages_1.winsTotal; } });
|
|
347
|
+
var storeData_1 = require("./storeData");
|
|
348
|
+
Object.defineProperty(exports, "AUCTION_METAFIELDS", { enumerable: true, get: function () { return storeData_1.AUCTION_METAFIELDS; } });
|
|
349
|
+
Object.defineProperty(exports, "APP_BLOCKED_TAG", { enumerable: true, get: function () { return storeData_1.APP_BLOCKED_TAG; } });
|
|
350
|
+
Object.defineProperty(exports, "BID_BLOCKED_TAG", { enumerable: true, get: function () { return storeData_1.BID_BLOCKED_TAG; } });
|
|
351
|
+
Object.defineProperty(exports, "LOT_TAG", { enumerable: true, get: function () { return storeData_1.LOT_TAG; } });
|
|
352
|
+
Object.defineProperty(exports, "viewerRestrictionsFrom", { enumerable: true, get: function () { return storeData_1.viewerRestrictionsFrom; } });
|
|
353
|
+
var checkoutRefused_1 = require("./checkoutRefused");
|
|
354
|
+
Object.defineProperty(exports, "CheckoutRefusedError", { enumerable: true, get: function () { return checkoutRefused_1.CheckoutRefusedError; } });
|
|
330
355
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAA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