@tiledev/sdk-apptile-live-selling 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/README.md +443 -34
  2. package/dist/auctionComments.d.ts +25 -0
  3. package/dist/auctionComments.d.ts.map +1 -0
  4. package/dist/auctionComments.js +28 -0
  5. package/dist/auctionComments.js.map +1 -0
  6. package/dist/auctionRules.d.ts +76 -0
  7. package/dist/auctionRules.d.ts.map +1 -0
  8. package/dist/auctionRules.js +106 -0
  9. package/dist/auctionRules.js.map +1 -0
  10. package/dist/auctions.d.ts.map +1 -1
  11. package/dist/auctions.js +19 -10
  12. package/dist/auctions.js.map +1 -1
  13. package/dist/client.d.ts +51 -2
  14. package/dist/client.d.ts.map +1 -1
  15. package/dist/client.js +123 -23
  16. package/dist/client.js.map +1 -1
  17. package/dist/commentHistory.d.ts +66 -0
  18. package/dist/commentHistory.d.ts.map +1 -0
  19. package/dist/commentHistory.js +125 -0
  20. package/dist/commentHistory.js.map +1 -0
  21. package/dist/engine.native.d.ts.map +1 -1
  22. package/dist/engine.native.js +17 -845
  23. package/dist/engine.native.js.map +1 -1
  24. package/dist/giveawayPrize.d.ts +13 -0
  25. package/dist/giveawayPrize.d.ts.map +1 -0
  26. package/dist/giveawayPrize.js +18 -0
  27. package/dist/giveawayPrize.js.map +1 -0
  28. package/dist/giveawayPrizeLines.d.ts +67 -0
  29. package/dist/giveawayPrizeLines.d.ts.map +1 -0
  30. package/dist/giveawayPrizeLines.js +48 -0
  31. package/dist/giveawayPrizeLines.js.map +1 -0
  32. package/dist/giveawayRoster.d.ts +53 -0
  33. package/dist/giveawayRoster.d.ts.map +1 -0
  34. package/dist/giveawayRoster.js +93 -0
  35. package/dist/giveawayRoster.js.map +1 -0
  36. package/dist/heldComments.d.ts +29 -0
  37. package/dist/heldComments.d.ts.map +1 -0
  38. package/dist/heldComments.js +61 -0
  39. package/dist/heldComments.js.map +1 -0
  40. package/dist/hiddenShows.d.ts +34 -0
  41. package/dist/hiddenShows.d.ts.map +1 -0
  42. package/dist/hiddenShows.js +42 -0
  43. package/dist/hiddenShows.js.map +1 -0
  44. package/dist/index.d.ts +17 -2
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +86 -3
  47. package/dist/index.js.map +1 -1
  48. package/dist/liveShow.d.ts +58 -0
  49. package/dist/liveShow.d.ts.map +1 -0
  50. package/dist/liveShow.js +55 -0
  51. package/dist/liveShow.js.map +1 -0
  52. package/dist/pipWindow.d.ts +85 -0
  53. package/dist/pipWindow.d.ts.map +1 -0
  54. package/dist/pipWindow.js +88 -0
  55. package/dist/pipWindow.js.map +1 -0
  56. package/dist/polls.d.ts.map +1 -1
  57. package/dist/polls.js +3 -0
  58. package/dist/polls.js.map +1 -1
  59. package/dist/react/LiveSellingProvider.d.ts +10 -1
  60. package/dist/react/LiveSellingProvider.d.ts.map +1 -1
  61. package/dist/react/LiveSellingProvider.js +6 -2
  62. package/dist/react/LiveSellingProvider.js.map +1 -1
  63. package/dist/react/LiveVideoTarget.d.ts.map +1 -1
  64. package/dist/react/LiveVideoTarget.js +41 -3
  65. package/dist/react/LiveVideoTarget.js.map +1 -1
  66. package/dist/react/clocks.d.ts +29 -0
  67. package/dist/react/clocks.d.ts.map +1 -0
  68. package/dist/react/clocks.js +124 -0
  69. package/dist/react/clocks.js.map +1 -0
  70. package/dist/react/index.d.ts +7 -2
  71. package/dist/react/index.d.ts.map +1 -1
  72. package/dist/react/index.js +15 -1
  73. package/dist/react/index.js.map +1 -1
  74. package/dist/react/index.web.d.ts +9 -2
  75. package/dist/react/index.web.d.ts.map +1 -1
  76. package/dist/react/index.web.js +27 -4
  77. package/dist/react/index.web.js.map +1 -1
  78. package/dist/react/startSignIn.d.ts +3 -0
  79. package/dist/react/startSignIn.d.ts.map +1 -0
  80. package/dist/react/startSignIn.js +19 -0
  81. package/dist/react/startSignIn.js.map +1 -0
  82. package/dist/react/useAuctionBidGate.d.ts +54 -4
  83. package/dist/react/useAuctionBidGate.d.ts.map +1 -1
  84. package/dist/react/useAuctionBidGate.js +169 -25
  85. package/dist/react/useAuctionBidGate.js.map +1 -1
  86. package/dist/react/useAuctionWins.d.ts +9 -1
  87. package/dist/react/useAuctionWins.d.ts.map +1 -1
  88. package/dist/react/useAuctionWins.js +9 -3
  89. package/dist/react/useAuctionWins.js.map +1 -1
  90. package/dist/react/useGiveawayEntry.d.ts +59 -0
  91. package/dist/react/useGiveawayEntry.d.ts.map +1 -0
  92. package/dist/react/useGiveawayEntry.js +170 -0
  93. package/dist/react/useGiveawayEntry.js.map +1 -0
  94. package/dist/react/useGiveawayPrize.d.ts +12 -0
  95. package/dist/react/useGiveawayPrize.d.ts.map +1 -0
  96. package/dist/react/useGiveawayPrize.js +53 -0
  97. package/dist/react/useGiveawayPrize.js.map +1 -0
  98. package/dist/react/useHiddenShows.d.ts +10 -0
  99. package/dist/react/useHiddenShows.d.ts.map +1 -0
  100. package/dist/react/useHiddenShows.js +30 -0
  101. package/dist/react/useHiddenShows.js.map +1 -0
  102. package/dist/react/useLiveSession.d.ts +7 -3
  103. package/dist/react/useLiveSession.d.ts.map +1 -1
  104. package/dist/react/useLiveSession.js +522 -157
  105. package/dist/react/useLiveSession.js.map +1 -1
  106. package/dist/react/useLiveShow.d.ts +3 -0
  107. package/dist/react/useLiveShow.d.ts.map +1 -0
  108. package/dist/react/useLiveShow.js +21 -0
  109. package/dist/react/useLiveShow.js.map +1 -0
  110. package/dist/react/useLiveStreams.d.ts.map +1 -1
  111. package/dist/react/useLiveStreams.js +6 -2
  112. package/dist/react/useLiveStreams.js.map +1 -1
  113. package/dist/react/useOngoingLive.d.ts +1 -0
  114. package/dist/react/useOngoingLive.d.ts.map +1 -1
  115. package/dist/react/useOngoingLive.js +7 -1
  116. package/dist/react/useOngoingLive.js.map +1 -1
  117. package/dist/react/useReplays.d.ts +12 -0
  118. package/dist/react/useReplays.d.ts.map +1 -1
  119. package/dist/react/useReplays.js +56 -24
  120. package/dist/react/useReplays.js.map +1 -1
  121. package/dist/react/useStreamInfo.d.ts +13 -2
  122. package/dist/react/useStreamInfo.d.ts.map +1 -1
  123. package/dist/react/useStreamInfo.js +31 -5
  124. package/dist/react/useStreamInfo.js.map +1 -1
  125. package/dist/replayPages.d.ts +31 -0
  126. package/dist/replayPages.d.ts.map +1 -0
  127. package/dist/replayPages.js +34 -0
  128. package/dist/replayPages.js.map +1 -0
  129. package/dist/replays.d.ts +7 -0
  130. package/dist/replays.d.ts.map +1 -1
  131. package/dist/replays.js +52 -22
  132. package/dist/replays.js.map +1 -1
  133. package/dist/session.d.ts +39 -6
  134. package/dist/session.d.ts.map +1 -1
  135. package/dist/session.js +209 -22
  136. package/dist/session.js.map +1 -1
  137. package/dist/sessionTypes.d.ts +190 -14
  138. package/dist/sessionTypes.d.ts.map +1 -1
  139. package/dist/sessionTypes.js +2 -1
  140. package/dist/sessionTypes.js.map +1 -1
  141. package/dist/shopifyCommerce.d.ts +149 -0
  142. package/dist/shopifyCommerce.d.ts.map +1 -0
  143. package/dist/shopifyCommerce.js +123 -0
  144. package/dist/shopifyCommerce.js.map +1 -0
  145. package/dist/shopifyIdentity.d.ts +51 -0
  146. package/dist/shopifyIdentity.d.ts.map +1 -0
  147. package/dist/shopifyIdentity.js +52 -0
  148. package/dist/shopifyIdentity.js.map +1 -0
  149. package/dist/shopifyIds.d.ts +9 -0
  150. package/dist/shopifyIds.d.ts.map +1 -0
  151. package/dist/shopifyIds.js +18 -0
  152. package/dist/shopifyIds.js.map +1 -0
  153. package/dist/showLinks.d.ts +24 -0
  154. package/dist/showLinks.d.ts.map +1 -0
  155. package/dist/showLinks.js +23 -0
  156. package/dist/showLinks.js.map +1 -0
  157. package/dist/showLots.d.ts +28 -0
  158. package/dist/showLots.d.ts.map +1 -0
  159. package/dist/showLots.js +51 -0
  160. package/dist/showLots.js.map +1 -0
  161. package/dist/showNames.d.ts +45 -0
  162. package/dist/showNames.d.ts.map +1 -0
  163. package/dist/showNames.js +74 -0
  164. package/dist/showNames.js.map +1 -0
  165. package/dist/streams.d.ts +27 -1
  166. package/dist/streams.d.ts.map +1 -1
  167. package/dist/streams.js +90 -21
  168. package/dist/streams.js.map +1 -1
  169. package/dist/types.d.ts +195 -8
  170. package/dist/types.d.ts.map +1 -1
  171. package/dist/types.js +2 -1
  172. package/dist/types.js.map +1 -1
  173. package/dist/wire.d.ts +31 -0
  174. package/dist/wire.d.ts.map +1 -1
  175. package/dist/wire.js +25 -0
  176. package/dist/wire.js.map +1 -1
  177. package/dist/zego.d.ts +3 -1
  178. package/dist/zego.d.ts.map +1 -1
  179. package/dist/zego.js +1 -1
  180. package/dist/zegoEngine.d.ts +168 -0
  181. package/dist/zegoEngine.d.ts.map +1 -0
  182. package/dist/zegoEngine.js +1052 -0
  183. package/dist/zegoEngine.js.map +1 -0
  184. package/package.json +3 -2
@@ -51,7 +51,9 @@ exports.NativeVideoView = (0, react_1.forwardRef)(function NativeVideoView(props
51
51
  function LiveVideoTarget({ active, muted, autoPip = false, style, children, }) {
52
52
  const viewRef = (0, react_1.useRef)(null);
53
53
  const { status, muted: shopperMuted, actions } = (0, useLiveSession_1.useLiveSession)();
54
- const claim = (0, react_1.useCallback)(() => {
54
+ /* `force` is false only from the foreground re-claim below; `onLayout` passes its event here, so
55
+ anything but an explicit `false` forces. */
56
+ const claim = (0, react_1.useCallback)((force = true) => {
55
57
  if (!active)
56
58
  return;
57
59
  if (status !== 'playing' && status !== 'connecting')
@@ -61,9 +63,41 @@ function LiveVideoTarget({ active, muted, autoPip = false, style, children, }) {
61
63
  return;
62
64
  // Forced: this runs when the surface takes ownership, and the engine may still believe it is
63
65
  // rendering into this view when in fact the view was torn down behind another screen.
64
- actions.bindVideoView(tag, true);
66
+ actions.bindVideoView(tag, force !== false);
65
67
  }, [active, status, actions]);
66
68
  (0, react_1.useEffect)(claim, [claim]);
69
+ /**
70
+ * Back from the background: take the picture again if the engine let go of it.
71
+ *
72
+ * With no system window granted, the session stops playback a moment after the app leaves, and that
73
+ * forgets the bound view. Coming back, the session's own foreground handler re-issues playback only
74
+ * into a view it still has — none — and nothing here re-ran, because `active` and `status` had not
75
+ * changed: a blank surface over a show that was playing (ENG-580, the white bubble after a comment
76
+ * link). Freckled Poppy withheld `active` for one commit to force a re-claim; this asks directly.
77
+ *
78
+ * Unforced, so a view the engine is still playing into is left alone, and on the next task rather
79
+ * than now, so the session's own re-issue goes first.
80
+ */
81
+ const claimRef = (0, react_1.useRef)(claim);
82
+ claimRef.current = claim;
83
+ (0, react_1.useEffect)(() => {
84
+ let pending = null;
85
+ const subscription = react_native_1.AppState.addEventListener('change', (next) => {
86
+ if (next !== 'active')
87
+ return;
88
+ if (pending)
89
+ clearTimeout(pending);
90
+ pending = setTimeout(() => {
91
+ pending = null;
92
+ claimRef.current(false);
93
+ }, 0);
94
+ });
95
+ return () => {
96
+ subscription.remove();
97
+ if (pending)
98
+ clearTimeout(pending);
99
+ };
100
+ }, []);
67
101
  /**
68
102
  * The sound, in its own effect — and the split from `claim` is load-bearing twice over.
69
103
  *
@@ -79,6 +113,10 @@ function LiveVideoTarget({ active, muted, autoPip = false, style, children, }) {
79
113
  * write nothing at all, which kept a handover clean — the arriving surface states the answer — but
80
114
  * also left the room audible when NOTHING arrived. It now stands the room down instead, deferred so
81
115
  * a handover still reads as one continuous sound; see `videoTargets`.
116
+ *
117
+ * Restated on every `status` change as well. A card mounted during a cold start said "silent" while
118
+ * the engine did not exist yet, and nothing said it again once it did: the host was audible over
119
+ * the Home tab (Freckled Poppy). `connecting` → `playing` is exactly the moment to repeat it.
82
120
  */
83
121
  (0, react_1.useEffect)(() => {
84
122
  if (!active) {
@@ -89,7 +127,7 @@ function LiveVideoTarget({ active, muted, autoPip = false, style, children, }) {
89
127
  const release = (0, videoTargets_1.holdVideoTarget)();
90
128
  actions.setOutputMuted(muted !== null && muted !== void 0 ? muted : shopperMuted);
91
129
  return release;
92
- }, [active, muted, shopperMuted, actions]);
130
+ }, [active, muted, shopperMuted, status, actions]);
93
131
  /**
94
132
  * The handover request, released on the way out.
95
133
  *
@@ -1 +1 @@
1
- {"version":3,"file":"LiveVideoTarget.js","sourceRoot":"","sources":["../../src/react/LiveVideoTarget.ts"],"names":[],"mappings":";;;AA0FA,0CAyEC;AAnKD;;;;;;;;;;;;;GAaG;AACH,iCAAkF;AAElF,+CAA8C;AAG9C,oDAAiD;AACjD,qDAAkD;AAClD,iDAAmE;AAGnE;;;;;;;;;GASG;AACH,4FAA4F;AAC5F,MAAM,iBAAiB,GACrB,uBAAQ,CAAC,EAAE,KAAK,KAAK;IACnB,CAAC,CAAC,SAAS;IACX,CAAC,CAAC,8DAA8D;QAC9D,OAAO,CAAC,iCAAiC,CAAC,CAAC,eAAe,CAAC;AAEjE,qGAAqG;AACxF,QAAA,sBAAsB,GAAG,iBAAiB,IAAI,IAAI,CAAC;AAEhE;;;;GAIG;AACU,QAAA,eAAe,GAAG,IAAA,kBAAU,EAAqB,SAAS,eAAe,CAAC,KAAK,EAAE,GAAG;IAC/F,IAAI,CAAC,iBAAiB;QAAE,OAAO,IAAA,qBAAa,EAAC,mBAAI,EAAE,KAAK,CAAC,CAAC;IAC1D,OAAO,IAAA,qBAAa,EAAC,iBAAiB,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;AAC7D,CAAC,CAAC,CAAC;AAsCH,SAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,KAAK,EACL,OAAO,GAAG,KAAK,EACf,KAAK,EACL,QAAQ,GACa;IACrB,MAAM,OAAO,GAAG,IAAA,cAAM,EAAU,IAAI,CAAC,CAAC;IACtC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAElE,MAAM,KAAK,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QAC7B,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,IAAI,MAAM,KAAK,SAAS,IAA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,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;QACrE,QAAQ,EAAE,KAAK;KAChB,CAAC,EACF,QAAQ,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * How long until a countdown with `timeLeftMs` to go shows a different second, plus a few
3
+ * milliseconds. The countdown shows `Math.ceil(timeLeftMs / 1000)`, which changes each time the time
4
+ * left crosses a whole second. Null once nothing is left: the countdown stays at zero.
5
+ */
6
+ export declare function waitBeforeCountdownChanges(timeLeftMs: number): number | null;
7
+ /**
8
+ * How long until the show's clock, `elapsedMs` since the start, shows a different second, plus a few
9
+ * milliseconds. The clock shows `Math.floor(elapsedMs / 1000)`. Before the start (negative: the phone's
10
+ * clock is behind the gateway's) it shows 0 until one second past the start.
11
+ */
12
+ export declare function waitBeforeShowClockChanges(elapsedMs: number): number;
13
+ /**
14
+ * The time left until `closesAt` (ms, ≥ 0): the auction round's countdown.
15
+ *
16
+ * Pass `session.auction.closesAt`. The component that calls this is drawn again once a second, as the
17
+ * second it shows (`Math.ceil(timeLeftMs / 1000)`) changes, and never after the countdown reaches zero.
18
+ * With no round (`null`) it is 0 and nothing runs.
19
+ */
20
+ export declare function useAuctionCountdown(closesAt: number | null | undefined): number;
21
+ /**
22
+ * The time since `startedAt` (ms, ≥ 0): the show's clock.
23
+ *
24
+ * Pass `session.stream?.startedAtMs`. The component that calls this is drawn again once a second, as
25
+ * the second it shows (`Math.floor(elapsedMs / 1000)`) changes. With no start time (`null`) it is 0 and
26
+ * nothing runs; pass `null` too while the clock isn't shown (an ended show) to stop it.
27
+ */
28
+ export declare function useShowClock(startedAt: number | null | undefined): number;
29
+ //# sourceMappingURL=clocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clocks.d.ts","sourceRoot":"","sources":["../../src/react/clocks.ts"],"names":[],"mappings":"AA0CA;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG5E;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGpE;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAuB/E;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAqBzE"}
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.waitBeforeCountdownChanges = waitBeforeCountdownChanges;
4
+ exports.waitBeforeShowClockChanges = waitBeforeShowClockChanges;
5
+ exports.useAuctionCountdown = useAuctionCountdown;
6
+ exports.useShowClock = useShowClock;
7
+ /**
8
+ * The two clocks a live screen shows, kept inside the component that shows them.
9
+ *
10
+ * The session holds moments, never clocks: `auction.closesAt` (when the round closes) and
11
+ * `stream.startedAtMs` (when the show started). A session that ticked drew every component reading it
12
+ * on every tick, and the session is app-wide — before 0.9.0 that was every reader, five times a second
13
+ * during an auction round. These hooks count to a moment inside the one component that calls them, so
14
+ * only that component is drawn again as its clock moves.
15
+ *
16
+ * **Once a second, on the second.** Each hook wakes a few milliseconds after the second it shows
17
+ * changes, never on a free-running interval: a 1 s interval started at an arbitrary moment drifts
18
+ * against the deadline and shows one second twice and skips another (which is why the session's old
19
+ * auction clock ran at 200 ms). The clocks apps draw show whole seconds, so nothing they show changes
20
+ * between two wakes.
21
+ *
22
+ * **They read `Date.now()` as they draw.** A wake only asks for the component to be drawn again; the
23
+ * time left (or since the start) is worked out at the moment of drawing, so a component drawn for any
24
+ * other reason — a new bid, a new deadline — shows the right second too, with no stored time to go
25
+ * stale.
26
+ *
27
+ * They take the moment as a number rather than reading the session, so a tile can call them with its
28
+ * own props, and they work outside `LiveSessionProvider` and on the web. Only `react` is imported, so
29
+ * this file (and the pure helpers in it) loads in Node and in a test runner with no native modules.
30
+ */
31
+ const react_1 = require("react");
32
+ const SECOND_MS = 1000;
33
+ /** How far past the edge of a second to wake, so the second shown has surely changed. */
34
+ const PAST_THE_EDGE_MS = 5;
35
+ /**
36
+ * The longest single wait before the show starts. A start time far in the future (bad data, or a phone
37
+ * clock hours out) would otherwise ask for a timer longer than a timer can hold, which fires at once.
38
+ */
39
+ const LONGEST_WAIT_MS = 60 * SECOND_MS;
40
+ /** A time in milliseconds, or null for anything that isn't one. */
41
+ function timeOrNull(value) {
42
+ return typeof value === 'number' && Number.isFinite(value) ? value : null;
43
+ }
44
+ /**
45
+ * How long until a countdown with `timeLeftMs` to go shows a different second, plus a few
46
+ * milliseconds. The countdown shows `Math.ceil(timeLeftMs / 1000)`, which changes each time the time
47
+ * left crosses a whole second. Null once nothing is left: the countdown stays at zero.
48
+ */
49
+ function waitBeforeCountdownChanges(timeLeftMs) {
50
+ if (!(timeLeftMs > 0))
51
+ return null;
52
+ return (timeLeftMs % SECOND_MS || SECOND_MS) + PAST_THE_EDGE_MS;
53
+ }
54
+ /**
55
+ * How long until the show's clock, `elapsedMs` since the start, shows a different second, plus a few
56
+ * milliseconds. The clock shows `Math.floor(elapsedMs / 1000)`. Before the start (negative: the phone's
57
+ * clock is behind the gateway's) it shows 0 until one second past the start.
58
+ */
59
+ function waitBeforeShowClockChanges(elapsedMs) {
60
+ const untilNextSecond = elapsedMs < 0 ? SECOND_MS - elapsedMs : SECOND_MS - (elapsedMs % SECOND_MS);
61
+ return Math.min(untilNextSecond + PAST_THE_EDGE_MS, LONGEST_WAIT_MS);
62
+ }
63
+ /**
64
+ * The time left until `closesAt` (ms, ≥ 0): the auction round's countdown.
65
+ *
66
+ * Pass `session.auction.closesAt`. The component that calls this is drawn again once a second, as the
67
+ * second it shows (`Math.ceil(timeLeftMs / 1000)`) changes, and never after the countdown reaches zero.
68
+ * With no round (`null`) it is 0 and nothing runs.
69
+ */
70
+ function useAuctionCountdown(closesAt) {
71
+ const deadline = timeOrNull(closesAt);
72
+ /** Counts the wakes. The number means nothing; setting it is what draws this component again. */
73
+ const [, setWakes] = (0, react_1.useState)(0);
74
+ (0, react_1.useEffect)(() => {
75
+ if (deadline === null)
76
+ return;
77
+ let timer = null;
78
+ const waitForNextSecond = () => {
79
+ const wait = waitBeforeCountdownChanges(deadline - Date.now());
80
+ if (wait === null)
81
+ return;
82
+ timer = setTimeout(() => {
83
+ setWakes((wakes) => wakes + 1);
84
+ waitForNextSecond();
85
+ }, wait);
86
+ };
87
+ waitForNextSecond();
88
+ return () => {
89
+ if (timer)
90
+ clearTimeout(timer);
91
+ };
92
+ }, [deadline]);
93
+ return deadline === null ? 0 : Math.max(0, deadline - Date.now());
94
+ }
95
+ /**
96
+ * The time since `startedAt` (ms, ≥ 0): the show's clock.
97
+ *
98
+ * Pass `session.stream?.startedAtMs`. The component that calls this is drawn again once a second, as
99
+ * the second it shows (`Math.floor(elapsedMs / 1000)`) changes. With no start time (`null`) it is 0 and
100
+ * nothing runs; pass `null` too while the clock isn't shown (an ended show) to stop it.
101
+ */
102
+ function useShowClock(startedAt) {
103
+ const start = timeOrNull(startedAt);
104
+ /** Counts the wakes. The number means nothing; setting it is what draws this component again. */
105
+ const [, setWakes] = (0, react_1.useState)(0);
106
+ (0, react_1.useEffect)(() => {
107
+ if (start === null)
108
+ return;
109
+ let timer = null;
110
+ const waitForNextSecond = () => {
111
+ timer = setTimeout(() => {
112
+ setWakes((wakes) => wakes + 1);
113
+ waitForNextSecond();
114
+ }, waitBeforeShowClockChanges(Date.now() - start));
115
+ };
116
+ waitForNextSecond();
117
+ return () => {
118
+ if (timer)
119
+ clearTimeout(timer);
120
+ };
121
+ }, [start]);
122
+ return start === null ? 0 : Math.max(0, Date.now() - start);
123
+ }
124
+ //# sourceMappingURL=clocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloc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,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;gBAC/B,iBAAiB,EAAE,CAAC;YACtB,CAAC,EAAE,0BAA0B,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC;QACrD,CAAC,CAAC;QACF,iBAAiB,EAAE,CAAC;QACpB,OAAO,GAAG,EAAE;YACV,IAAI,KAAK;gBAAE,YAAY,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;AAC9D,CAAC"}
@@ -5,6 +5,7 @@
5
5
  * client and the native engine work without React entirely.
6
6
  */
7
7
  export { LiveSellingProvider, useLiveSelling, type LiveSellingProviderProps, type LiveSellingContextType, } from './LiveSellingProvider';
8
+ export { useHiddenShows, type HiddenShowsForViewer } from './useHiddenShows';
8
9
  export { useOngoingLive, type UseOngoingLiveState } from './useOngoingLive';
9
10
  export { refreshOngoingLive } from '../ongoingLiveStore';
10
11
  export { useLiveStreams, type UseLiveStreamsState } from './useLiveStreams';
@@ -12,9 +13,13 @@ export { useAuction, type UseAuctionState } from './useAuction';
12
13
  export { useReplays, type UseReplaysOptions, type UseReplaysState } from './useReplays';
13
14
  export { useClips, type UseClipsState } from './useClips';
14
15
  export { LiveSessionProvider, useLiveSession, type LiveSessionProviderProps, } from './useLiveSession';
15
- export { useStreamInfo, refreshStreamRecords, refreshStreamRecordsIfStale, } from './useStreamInfo';
16
+ export { useLiveShow } from './useLiveShow';
17
+ export { useAuctionCountdown, useShowClock } from './clocks';
18
+ export { useStreamInfo, refreshStreamRecords, refreshStreamRecordsIfStale, type UseStreamInfoState, } from './useStreamInfo';
16
19
  export { LiveVideoTarget, NativeVideoView, isNativeVideoSupported, type LiveVideoTargetProps, } from './LiveVideoTarget';
17
- export { useAuctionBidGate, SHEET_HANDOFF_MS, type AuctionBidGate, type BidBlocker } from './useAuctionBidGate';
20
+ export { useAuctionBidGate, SHEET_HANDOFF_MS, type AuctionBidGate, type BidBlocker, type BidRefusal, type UseAuctionBidGateOptions, } from './useAuctionBidGate';
21
+ export { useGiveawayEntry, type GiveawayDraw, type UseGiveawayEntryState, type SessionForGiveaway, type UseGiveawayEntryOptions, } from './useGiveawayEntry';
22
+ export { useGiveawayPrize, type UseGiveawayPrizeState } from './useGiveawayPrize';
18
23
  export { useAuctionWins, type AuctionWinRow, type UseAuctionWinsOptions, type UseAuctionWinsState, } from './useAuctionWins';
19
24
  export { nativeViewTag } from '../nativeViewTag';
20
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AACxF,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,KAAK,wBAAwB,GAC9B,MAAM,kBAAkB,CA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AAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,2BAA2B,EAC3B,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,KAAK,oBAAoB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,wBAAwB,GAC9B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,GAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAClF,OAAO,EACL,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nativeViewTag = exports.useAuctionWins = exports.SHEET_HANDOFF_MS = exports.useAuctionBidGate = exports.isNativeVideoSupported = exports.NativeVideoView = exports.LiveVideoTarget = exports.refreshStreamRecordsIfStale = exports.refreshStreamRecords = exports.useStreamInfo = exports.useLiveSession = exports.LiveSessionProvider = exports.useClips = exports.useReplays = exports.useAuction = exports.useLiveStreams = exports.refreshOngoingLive = exports.useOngoingLive = exports.useLiveSelling = exports.LiveSellingProvider = void 0;
3
+ exports.nativeViewTag = exports.useAuctionWins = exports.useGiveawayPrize = exports.useGiveawayEntry = exports.SHEET_HANDOFF_MS = exports.useAuctionBidGate = exports.isNativeVideoSupported = exports.NativeVideoView = exports.LiveVideoTarget = exports.refreshStreamRecordsIfStale = exports.refreshStreamRecords = exports.useStreamInfo = exports.useShowClock = exports.useAuctionCountdown = exports.useLiveShow = exports.useLiveSession = exports.LiveSessionProvider = exports.useClips = exports.useReplays = exports.useAuction = exports.useLiveStreams = exports.refreshOngoingLive = exports.useOngoingLive = exports.useHiddenShows = exports.useLiveSelling = exports.LiveSellingProvider = void 0;
4
4
  /**
5
5
  * React helpers for `@tiledev/sdk-apptile-live-selling` — the provider and the read hooks.
6
6
  *
@@ -10,6 +10,8 @@ exports.nativeViewTag = exports.useAuctionWins = exports.SHEET_HANDOFF_MS = expo
10
10
  var LiveSellingProvider_1 = require("./LiveSellingProvider");
11
11
  Object.defineProperty(exports, "LiveSellingProvider", { enumerable: true, get: function () { return LiveSellingProvider_1.LiveSellingProvider; } });
12
12
  Object.defineProperty(exports, "useLiveSelling", { enumerable: true, get: function () { return LiveSellingProvider_1.useLiveSelling; } });
13
+ var useHiddenShows_1 = require("./useHiddenShows");
14
+ Object.defineProperty(exports, "useHiddenShows", { enumerable: true, get: function () { return useHiddenShows_1.useHiddenShows; } });
13
15
  var useOngoingLive_1 = require("./useOngoingLive");
14
16
  Object.defineProperty(exports, "useOngoingLive", { enumerable: true, get: function () { return useOngoingLive_1.useOngoingLive; } });
15
17
  var ongoingLiveStore_1 = require("../ongoingLiveStore");
@@ -26,6 +28,13 @@ Object.defineProperty(exports, "useClips", { enumerable: true, get: function ()
26
28
  var useLiveSession_1 = require("./useLiveSession");
27
29
  Object.defineProperty(exports, "LiveSessionProvider", { enumerable: true, get: function () { return useLiveSession_1.LiveSessionProvider; } });
28
30
  Object.defineProperty(exports, "useLiveSession", { enumerable: true, get: function () { return useLiveSession_1.useLiveSession; } });
31
+ // The show a screen is about, once the session holds its record (0.9.0).
32
+ var useLiveShow_1 = require("./useLiveShow");
33
+ Object.defineProperty(exports, "useLiveShow", { enumerable: true, get: function () { return useLiveShow_1.useLiveShow; } });
34
+ // The clocks a screen shows, kept in the component that shows them: the session itself never ticks.
35
+ var clocks_1 = require("./clocks");
36
+ Object.defineProperty(exports, "useAuctionCountdown", { enumerable: true, get: function () { return clocks_1.useAuctionCountdown; } });
37
+ Object.defineProperty(exports, "useShowClock", { enumerable: true, get: function () { return clocks_1.useShowClock; } });
29
38
  var useStreamInfo_1 = require("./useStreamInfo");
30
39
  Object.defineProperty(exports, "useStreamInfo", { enumerable: true, get: function () { return useStreamInfo_1.useStreamInfo; } });
31
40
  Object.defineProperty(exports, "refreshStreamRecords", { enumerable: true, get: function () { return useStreamInfo_1.refreshStreamRecords; } });
@@ -37,6 +46,11 @@ Object.defineProperty(exports, "isNativeVideoSupported", { enumerable: true, get
37
46
  var useAuctionBidGate_1 = require("./useAuctionBidGate");
38
47
  Object.defineProperty(exports, "useAuctionBidGate", { enumerable: true, get: function () { return useAuctionBidGate_1.useAuctionBidGate; } });
39
48
  Object.defineProperty(exports, "SHEET_HANDOFF_MS", { enumerable: true, get: function () { return useAuctionBidGate_1.SHEET_HANDOFF_MS; } });
49
+ // The giveaway's flows on a screen (0.9.0): the entry, its sheet and sign-in, the draw; the prize.
50
+ var useGiveawayEntry_1 = require("./useGiveawayEntry");
51
+ Object.defineProperty(exports, "useGiveawayEntry", { enumerable: true, get: function () { return useGiveawayEntry_1.useGiveawayEntry; } });
52
+ var useGiveawayPrize_1 = require("./useGiveawayPrize");
53
+ Object.defineProperty(exports, "useGiveawayPrize", { enumerable: true, get: function () { return useGiveawayPrize_1.useGiveawayPrize; } });
40
54
  var useAuctionWins_1 = require("./useAuctionWins");
41
55
  Object.defineProperty(exports, "useAuctionWins", { enumerable: true, get: function () { return useAuctionWins_1.useAuctionWins; } });
42
56
  // React Native only, so it lives here rather than on the root entry.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AAC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mDAI0B;AAHxB,qHAAA,mBAAmB,OAAA;AACnB,gHAAA,cAAc,OAAA;AAGhB,yEAAyE;AACzE,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,oGAAoG;AACpG,mCAA6D;AAApD,6GAAA,mBAAmB,OAAA;AAAE,sGAAA,YAAY,OAAA;AAC1C,iDAKyB;AAJvB,8GAAA,aAAa,OAAA;AACb,qHAAA,oBAAoB,OAAA;AACpB,4HAAA,2BAA2B,OAAA;AAG7B,qDAK2B;AAJzB,kHAAA,eAAe,OAAA;AACf,kHAAA,eAAe,OAAA;AACf,yHAAA,sBAAsB,OAAA;AAGxB,yDAO6B;AAN3B,sHAAA,iBAAiB,OAAA;AACjB,qHAAA,gBAAgB,OAAA;AAMlB,mGAAmG;AACnG,uDAM4B;AAL1B,oHAAA,gBAAgB,OAAA;AAMlB,uDAAkF;AAAzE,oHAAA,gBAAgB,OAAA;AACzB,mDAK0B;AAJxB,gHAAA,cAAc,OAAA;AAKhB,qEAAqE;AACrE,kDAAiD;AAAxC,8GAAA,aAAa,OAAA"}
@@ -1,20 +1,25 @@
1
1
  import { View } from 'react-native';
2
2
  import type { ViewProps } from 'react-native';
3
+ import { type LiveShow } from '../liveShow';
3
4
  import type { LiveSession } from '../sessionTypes';
4
5
  import type { AuctionBidGate, UseAuctionBidGateOptions } from './useAuctionBidGate';
5
6
  import type { UseAuctionWinsOptions, UseAuctionWinsState } from './useAuctionWins';
6
7
  import type { LiveSessionProviderProps } from './useLiveSession';
7
8
  import type { LiveVideoTargetProps } from './LiveVideoTarget';
8
9
  export { LiveSellingProvider, useLiveSelling, type LiveSellingProviderProps, type LiveSellingContextType, } from './LiveSellingProvider';
10
+ export { useHiddenShows, type HiddenShowsForViewer } from './useHiddenShows';
9
11
  export { useOngoingLive, type UseOngoingLiveState } from './useOngoingLive';
10
12
  export { refreshOngoingLive } from '../ongoingLiveStore';
11
13
  export { useLiveStreams, type UseLiveStreamsState } from './useLiveStreams';
12
14
  export { useAuction, type UseAuctionState } from './useAuction';
13
15
  export { useReplays, type UseReplaysOptions, type UseReplaysState } from './useReplays';
14
16
  export { useClips, type UseClipsState } from './useClips';
15
- export { useStreamInfo, refreshStreamRecords, refreshStreamRecordsIfStale, } from './useStreamInfo';
17
+ export { useStreamInfo, refreshStreamRecords, refreshStreamRecordsIfStale, type UseStreamInfoState, } from './useStreamInfo';
18
+ export { useAuctionCountdown, useShowClock } from './clocks';
19
+ export { useGiveawayEntry, type GiveawayDraw, type UseGiveawayEntryState, type SessionForGiveaway, type UseGiveawayEntryOptions, } from './useGiveawayEntry';
20
+ export { useGiveawayPrize, type UseGiveawayPrizeState } from './useGiveawayPrize';
16
21
  export { nativeViewTag } from '../nativeViewTag';
17
- export type { AuctionBidGate, BidBlocker } from './useAuctionBidGate';
22
+ export type { AuctionBidGate, BidBlocker, BidRefusal, UseAuctionBidGateOptions } from './useAuctionBidGate';
18
23
  export type { AuctionWinRow, UseAuctionWinsOptions, UseAuctionWinsState } from './useAuctionWins';
19
24
  export type { LiveSessionProviderProps } from './useLiveSession';
20
25
  export type { LiveVideoTargetProps } from './LiveVideoTarget';
@@ -24,6 +29,8 @@ export declare function LiveSessionProvider({ children }: LiveSessionProviderPro
24
29
  * behaves the same as one inside it, because on the web there is only ever this one session.
25
30
  */
26
31
  export declare function useLiveSession<TRaw = unknown>(): LiveSession<TRaw>;
32
+ /** `useLiveShow` over the idle session: always `ended`, with no show, whatever the id. */
33
+ export declare function useLiveShow(_streamingId: string | null | undefined): LiveShow;
27
34
  export declare const isNativeVideoSupported = false;
28
35
  /**
29
36
  * A plain `View`, which is what the native file falls back to on a build without the Zego SDK:
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../src/react/index.web.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,KAAK,EAA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AQ,EAAE,EAAE,wBAAwB,+FAEzE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,GAAG,OAAO,KAAK,WAAW,CAAC,IAAI,CAAC,CAElE;AAKD,0FAA0F;AAC1F,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,CAE7E;AAID,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,eAAe,+FAE1B,CAAC;AAEH,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,oBAAoB,6CAExE;AAID,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,iGAAiG;AACjG,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,cAAc,CAepF;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,GAAG,OAAO,EAC3C,QAAQ,CAAC,EAAE,qBAAqB,GAC/B,mBAAmB,CAAC,IAAI,CAAC,CAe3B"}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SHEET_HANDOFF_MS = exports.NativeVideoView = exports.isNativeVideoSupported = exports.nativeViewTag = exports.refreshStreamRecordsIfStale = exports.refreshStreamRecords = exports.useStreamInfo = exports.useClips = exports.useReplays = exports.useAuction = exports.useLiveStreams = exports.refreshOngoingLive = exports.useOngoingLive = exports.useLiveSelling = exports.LiveSellingProvider = void 0;
3
+ exports.SHEET_HANDOFF_MS = exports.NativeVideoView = exports.isNativeVideoSupported = exports.nativeViewTag = exports.useGiveawayPrize = exports.useGiveawayEntry = exports.useShowClock = exports.useAuctionCountdown = exports.refreshStreamRecordsIfStale = exports.refreshStreamRecords = exports.useStreamInfo = exports.useClips = exports.useReplays = exports.useAuction = exports.useLiveStreams = exports.refreshOngoingLive = exports.useOngoingLive = exports.useHiddenShows = exports.useLiveSelling = exports.LiveSellingProvider = void 0;
4
4
  exports.LiveSessionProvider = LiveSessionProvider;
5
5
  exports.useLiveSession = useLiveSession;
6
+ exports.useLiveShow = useLiveShow;
6
7
  exports.LiveVideoTarget = LiveVideoTarget;
7
8
  exports.useAuctionBidGate = useAuctionBidGate;
8
9
  exports.useAuctionWins = useAuctionWins;
@@ -32,11 +33,14 @@ exports.useAuctionWins = useAuctionWins;
32
33
  */
33
34
  const react_1 = require("react");
34
35
  const react_native_1 = require("react-native");
36
+ const liveShow_1 = require("../liveShow");
35
37
  const sessionTypes_1 = require("../sessionTypes");
36
38
  // Real on the web: the gateway is plain HTTP, and the engine it configures is the no-op build.
37
39
  var LiveSellingProvider_1 = require("./LiveSellingProvider");
38
40
  Object.defineProperty(exports, "LiveSellingProvider", { enumerable: true, get: function () { return LiveSellingProvider_1.LiveSellingProvider; } });
39
41
  Object.defineProperty(exports, "useLiveSelling", { enumerable: true, get: function () { return LiveSellingProvider_1.useLiveSelling; } });
42
+ var useHiddenShows_1 = require("./useHiddenShows");
43
+ Object.defineProperty(exports, "useHiddenShows", { enumerable: true, get: function () { return useHiddenShows_1.useHiddenShows; } });
40
44
  var useOngoingLive_1 = require("./useOngoingLive");
41
45
  Object.defineProperty(exports, "useOngoingLive", { enumerable: true, get: function () { return useOngoingLive_1.useOngoingLive; } });
42
46
  var ongoingLiveStore_1 = require("../ongoingLiveStore");
@@ -53,6 +57,16 @@ var useStreamInfo_1 = require("./useStreamInfo");
53
57
  Object.defineProperty(exports, "useStreamInfo", { enumerable: true, get: function () { return useStreamInfo_1.useStreamInfo; } });
54
58
  Object.defineProperty(exports, "refreshStreamRecords", { enumerable: true, get: function () { return useStreamInfo_1.refreshStreamRecords; } });
55
59
  Object.defineProperty(exports, "refreshStreamRecordsIfStale", { enumerable: true, get: function () { return useStreamInfo_1.refreshStreamRecordsIfStale; } });
60
+ // Real on the web: plain React timers, counting to a number the caller passes.
61
+ var clocks_1 = require("./clocks");
62
+ Object.defineProperty(exports, "useAuctionCountdown", { enumerable: true, get: function () { return clocks_1.useAuctionCountdown; } });
63
+ Object.defineProperty(exports, "useShowClock", { enumerable: true, get: function () { return clocks_1.useShowClock; } });
64
+ // Real on the web: they read only the session a screen passes in (here the idle one, so no giveaway is
65
+ // ever open) and the adapter's catalogue.
66
+ var useGiveawayEntry_1 = require("./useGiveawayEntry");
67
+ Object.defineProperty(exports, "useGiveawayEntry", { enumerable: true, get: function () { return useGiveawayEntry_1.useGiveawayEntry; } });
68
+ var useGiveawayPrize_1 = require("./useGiveawayPrize");
69
+ Object.defineProperty(exports, "useGiveawayPrize", { enumerable: true, get: function () { return useGiveawayPrize_1.useGiveawayPrize; } });
56
70
  // Already returns null off device — react-native-web *throws* from `findNodeHandle`, which this
57
71
  // wraps, so the honest answer costs nothing here.
58
72
  var nativeViewTag_1 = require("../nativeViewTag");
@@ -81,8 +95,8 @@ const IDLE_ACTIONS = {
81
95
  releaseStream: () => undefined,
82
96
  enterPip: () => undefined,
83
97
  exitPip: () => undefined,
84
- placeBid: async () => undefined,
85
- enterGiveaway: async () => undefined,
98
+ placeBid: async () => ({ sent: false, reason: 'noShow' }),
99
+ enterGiveaway: async () => ({ entered: false, reason: 'noGiveaway' }),
86
100
  dismissAuctionWin: () => undefined,
87
101
  dismissGiveawayResult: () => undefined,
88
102
  };
@@ -102,7 +116,6 @@ const IDLE_SESSION = {
102
116
  poll: null,
103
117
  muted: true,
104
118
  videoTag: null,
105
- elapsedMs: 0,
106
119
  pipMode: 'none',
107
120
  guest: {
108
121
  mode: false,
@@ -115,6 +128,7 @@ const IDLE_SESSION = {
115
128
  viewerName: null,
116
129
  auction: sessionTypes_1.IDLE_AUCTION,
117
130
  giveaway: sessionTypes_1.IDLE_GIVEAWAY,
131
+ pinnedComment: null,
118
132
  error: null,
119
133
  actions: IDLE_ACTIONS,
120
134
  };
@@ -129,6 +143,12 @@ function LiveSessionProvider({ children }) {
129
143
  function useLiveSession() {
130
144
  return IDLE_SESSION;
131
145
  }
146
+ /** The idle session's show: none, and `ended`. One object, as the session never changes here. */
147
+ const IDLE_SHOW = (0, liveShow_1.liveShowFor)(IDLE_SESSION, null);
148
+ /** `useLiveShow` over the idle session: always `ended`, with no show, whatever the id. */
149
+ function useLiveShow(_streamingId) {
150
+ return IDLE_SHOW;
151
+ }
132
152
  // ─── The video ───────────────────────────────────────────────────────────────
133
153
  exports.isNativeVideoSupported = false;
134
154
  /**
@@ -154,6 +174,8 @@ function useAuctionBidGate(_options) {
154
174
  chooseVariant: () => undefined,
155
175
  dismiss: () => undefined,
156
176
  refreshUnpaidWins: () => undefined,
177
+ refusal: null,
178
+ bidOnItsWay: false,
157
179
  }), []);
158
180
  }
159
181
  /**
@@ -163,6 +185,7 @@ function useAuctionBidGate(_options) {
163
185
  function useAuctionWins(_options) {
164
186
  return (0, react_1.useMemo)(() => ({
165
187
  rows: [],
188
+ giveawayVariantIds: new Set(),
166
189
  totalBids: 0,
167
190
  streamingId: null,
168
191
  loading: false,
@@ -1 +1 @@
1
- {"version":3,"file":"index.web.js","sourceRoot":"","sources":["../../src/react/index.web.ts"],"names":[],"mappings":";;;AAiIA,kDAEC;AAMD,wCAEC;AAeD,0CAEC;AAOD,8CAaC;AAMD,wCAgBC;AAtMD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,iCAA0E;AAC1E,+CAAoC;AAIpC,kDAA8D;AAO9D,+FAA+F;AAC/F,6DAK+B;AAJ7B,0HAAA,mBAAmB,OAAA;AACnB,qHAAA,cAAc,OAAA;AAIhB,mDAA4E;AAAnE,gHAAA,cAAc,OAAA;AACvB,wDAAyD;AAAhD,sHAAA,kBAAkB,OAAA;AAC3B,mDAA4E;AAAnE,gHAAA,cAAc,OAAA;AACvB,2CAAgE;AAAvD,wGAAA,UAAU,OAAA;AACnB,2CAAwF;AAA/E,wGAAA,UAAU,OAAA;AACnB,uCAA0D;AAAjD,oGAAA,QAAQ,OAAA;AACjB,iDAIyB;AAHvB,8GAAA,aAAa,OAAA;AACb,qHAAA,oBA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AAE,CAAC,SAAS;QACxB,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,IAAI;KAC3B,CAAC,EACF,EAAE,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Calls the app's `startSignIn`; a failure to start it, thrown or rejected, is logged at `at`. */
2
+ export declare function startTheSignIn(startSignIn: () => unknown, at: string): void;
3
+ //# sourceMappingURL=startSignIn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"startSignIn.d.ts","sourceRoot":"","sources":["../../src/react/startSignIn.ts"],"names":[],"mappings":"AAOA,mGAAmG;AACnG,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,OAAO,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAM3E"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.startTheSignIn = startTheSignIn;
4
+ /**
5
+ * Starting the app's sign-in from a hook (0.9.0): the bid gate and the giveaway entry both hand the
6
+ * shopper to the app's own sign-in, and neither may let a sign-in that fails to start throw into the
7
+ * tap that asked for it.
8
+ */
9
+ const client_1 = require("../client");
10
+ /** Calls the app's `startSignIn`; a failure to start it, thrown or rejected, is logged at `at`. */
11
+ function startTheSignIn(startSignIn, at) {
12
+ try {
13
+ void Promise.resolve(startSignIn()).catch((caught) => (0, client_1.getLogger)().error(caught, { at }));
14
+ }
15
+ catch (caught) {
16
+ (0, client_1.getLogger)().error(caught, { at });
17
+ }
18
+ }
19
+ //# sourceMappingURL=startSignIn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"startSignIn.js","sourceRoot":"","sources":["../../src/react/startSignIn.ts"],"names":[],"mappings":";;AAQA,wCAMC;AAdD;;;;GAIG;AACH,sCAAsC;AAEtC,mGAAmG;AACnG,SAAgB,cAAc,CAAC,WAA0B,EAAE,EAAU;IACnE,IAAI,CAAC;QACH,KAAK,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAA,kBAAS,GAAE,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3F,CAAC;IAAC,OAAO,MAAM,EAAE,CAAC;QAChB,IAAA,kBAAS,GAAE,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACpC,CAAC;AACH,CAAC"}