@streamlayer/react-ui 1.26.1 → 1.27.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 (205) hide show
  1. package/lib/app/app/Advertisement/index.d.ts +1 -0
  2. package/lib/app/app/Advertisement/index.js +125 -92
  3. package/lib/app/app/Banner/index.d.ts +6 -0
  4. package/lib/app/app/Banner/index.js +6 -0
  5. package/lib/app/app/Features/Gamification/Question.d.ts +4 -0
  6. package/lib/app/app/Features/Gamification/Question.js +79 -50
  7. package/lib/app/app/Features/Gamification/QuestionAdvertisement.d.ts +6 -0
  8. package/lib/app/app/Features/Gamification/QuestionAdvertisement.js +46 -0
  9. package/lib/app/app/Features/Gamification/Tabs.js +12 -12
  10. package/lib/app/app/Features/Gamification/index.d.ts +3 -0
  11. package/lib/app/app/Features/Gamification/index.js +56 -52
  12. package/lib/app/app/Features/index.d.ts +1 -0
  13. package/lib/app/app/Features/index.js +6 -4
  14. package/lib/app/app/InApp/index.d.ts +1 -0
  15. package/lib/app/app/InApp/index.js +44 -17
  16. package/lib/app/app/Insight/index.d.ts +3 -0
  17. package/lib/app/app/Insight/index.js +33 -30
  18. package/lib/app/app/Layout/index.d.ts +17 -0
  19. package/lib/app/app/Layout/index.js +105 -0
  20. package/lib/app/app/Layout/styles.d.ts +12 -0
  21. package/lib/app/app/Layout/styles.js +64 -0
  22. package/lib/app/app/Notifications/Onboarding/Notification/styles.d.ts +7 -1
  23. package/lib/app/app/Notifications/styles.d.ts +18 -2
  24. package/lib/app/app/index.d.ts +1 -0
  25. package/lib/app/app/index.js +91 -85
  26. package/lib/app/app/story/index.js +56 -58
  27. package/lib/app/app/story/promotion/index.js +31 -36
  28. package/lib/app/app/story/promotion/styles.d.ts +3 -1
  29. package/lib/app/app/story/promotion/video.js +63 -81
  30. package/lib/app/app/story/promotion-notification/styles.d.ts +3 -1
  31. package/lib/app/app/story/styles.d.ts +5 -1
  32. package/lib/app/app/story/styles.js +36 -16
  33. package/lib/app/app/story/video.d.ts +5 -1
  34. package/lib/app/app/story/video.js +70 -33
  35. package/lib/app/app/useApp.d.ts +1 -2
  36. package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.d.ts +7 -1
  37. package/lib/app/masters/BetPack/BetPackContent/index.js +175 -187
  38. package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +84 -84
  39. package/lib/app/masters/BetPack/BetPackOverlay/styles.d.ts +14 -2
  40. package/lib/app/masters/Features/Gamification/Question.js +19 -17
  41. package/lib/app/masters/Notifications/Onboarding/Notification/styles.d.ts +7 -1
  42. package/lib/app/masters/Notifications/styles.d.ts +18 -2
  43. package/lib/app/masters/masters.d.ts +4 -1
  44. package/lib/app/masters/useMastersApp.d.ts +1 -1
  45. package/lib/app/tgl/styles.d.ts +3 -1
  46. package/lib/app/{tvos → webos/Advertisement}/AdvertisementUI.d.ts +7 -1
  47. package/lib/app/webos/Advertisement/AdvertisementUI.js +63 -0
  48. package/lib/app/{tvos/Advertisement.d.ts → webos/Advertisement/index.d.ts} +3 -1
  49. package/lib/app/webos/Advertisement/index.js +119 -0
  50. package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +15 -0
  51. package/lib/app/webos/ExposedPauseAd/PauseAd.js +93 -0
  52. package/lib/app/webos/ExposedPauseAd/styles.d.ts +12 -0
  53. package/lib/app/webos/ExposedPauseAd/styles.js +64 -0
  54. package/lib/app/webos/Question/index.d.ts +9 -0
  55. package/lib/app/webos/Question/index.js +56 -0
  56. package/lib/app/webos/index.d.ts +24 -0
  57. package/lib/app/webos/index.js +65 -0
  58. package/lib/app/webos/story.d.ts +9 -0
  59. package/lib/app/webos/story.js +74 -0
  60. package/lib/app/webos/styles.js +4 -0
  61. package/lib/app/webos/ui/Layout/index.js +78 -0
  62. package/lib/app/{tvos → webos}/ui/Layout/styles.js +25 -25
  63. package/lib/app/webos/ui/Sidebar/PromoAction.d.ts +7 -0
  64. package/lib/app/webos/ui/Sidebar/PromoAction.js +63 -0
  65. package/lib/app/{tvos → webos}/ui/Sidebar/index.d.ts +6 -0
  66. package/lib/app/webos/ui/Sidebar/index.js +176 -0
  67. package/lib/app/{tvos → webos}/ui/Sidebar/styles.d.ts +7 -3
  68. package/lib/app/{tvos → webos}/ui/Sidebar/styles.js +175 -170
  69. package/lib/app/webos/ui/insight/index.d.ts +9 -0
  70. package/lib/app/webos/ui/insight/index.js +100 -0
  71. package/lib/app/webos/ui/insight/styles.d.ts +12 -0
  72. package/lib/app/webos/ui/insight/styles.js +51 -0
  73. package/lib/app/webos/useTvButton.d.ts +9 -0
  74. package/lib/app/webos/useTvButton.js +23 -0
  75. package/lib/assets/style.css +1 -1
  76. package/lib/hooks/analytics.d.ts +14 -0
  77. package/lib/hooks/showIn.d.ts +9 -0
  78. package/lib/hooks/useKeyboardNavigation.d.ts +15 -0
  79. package/lib/hooks/useKeyboardNavigation.js +74 -0
  80. package/lib/index-T1iiS0ZO.js +17 -0
  81. package/lib/ui/advertisement/banner/index.d.ts +3 -0
  82. package/lib/ui/advertisement/banner/index.js +29 -17
  83. package/lib/ui/advertisement/banner/styles.d.ts +5 -1
  84. package/lib/ui/advertisement/index.d.ts +4 -1
  85. package/lib/ui/advertisement/index.js +56 -44
  86. package/lib/ui/advertisement/notification/index.d.ts +2 -0
  87. package/lib/ui/advertisement/notification/index.js +50 -34
  88. package/lib/ui/advertisement/notification/lower-third/index.d.ts +2 -0
  89. package/lib/ui/advertisement/notification/lower-third/index.js +42 -26
  90. package/lib/ui/advertisement/notification/lower-third/styles.d.ts +11 -0
  91. package/lib/ui/advertisement/notification/lower-third/styles.js +39 -24
  92. package/lib/ui/advertisement/notification/styles.d.ts +18 -1
  93. package/lib/ui/advertisement/notification/styles.js +48 -33
  94. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.d.ts +2 -2
  95. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +1 -1
  96. package/lib/ui/advertisement/overlay/index.d.ts +4 -1
  97. package/lib/ui/advertisement/overlay/index.js +135 -77
  98. package/lib/ui/gamification/detail/header/index.d.ts +2 -0
  99. package/lib/ui/gamification/detail/header/index.js +19 -16
  100. package/lib/ui/gamification/detail/header/styles.d.ts +15 -3
  101. package/lib/ui/gamification/detail/header/styles.js +1 -1
  102. package/lib/ui/gamification/detail/sponsor/index.d.ts +1 -0
  103. package/lib/ui/gamification/detail/sponsor/index.js +25 -13
  104. package/lib/ui/gamification/invite-link/styles.d.ts +14 -2
  105. package/lib/ui/gamification/leaderboard/list-item/styles.d.ts +7 -1
  106. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.d.ts +14 -2
  107. package/lib/ui/gamification/onboarding/styles.d.ts +10 -2
  108. package/lib/ui/gamification/points/styles.d.ts +7 -1
  109. package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.d.ts +48 -0
  110. package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.js +94 -0
  111. package/lib/ui/gamification/question/inapp/notification/AdNotification/index.d.ts +9 -0
  112. package/lib/ui/gamification/question/inapp/notification/AdNotification/index.js +99 -0
  113. package/lib/ui/gamification/question/inapp/notification/AdNotification/styles.d.ts +42 -0
  114. package/lib/ui/gamification/question/inapp/notification/AdNotification/styles.js +117 -0
  115. package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.js +9 -8
  116. package/lib/ui/gamification/question/inapp/notification/styles.d.ts +7 -1
  117. package/lib/ui/gamification/question/inapp/onboarding/index.js +12 -12
  118. package/lib/ui/gamification/question/inapp/onboarding/styles.d.ts +18 -2
  119. package/lib/ui/gamification/question/inapp/prediction-result/frames/content.js +9 -9
  120. package/lib/ui/gamification/question/inapp/prediction-result/frames/styles.d.ts +7 -1
  121. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/content.d.ts +5 -0
  122. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/content.js +49 -0
  123. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.d.ts +12 -0
  124. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.js +56 -0
  125. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/lines.d.ts +1 -0
  126. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/lines.js +34 -0
  127. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step1.d.ts +1 -0
  128. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step1.js +19 -0
  129. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step2.d.ts +4 -0
  130. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step2.js +34 -0
  131. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step3.d.ts +7 -0
  132. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/step3.js +43 -0
  133. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/styles.d.ts +9 -0
  134. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/styles.js +20 -0
  135. package/lib/ui/gamification/question/inapp/prediction-result-ad/index.d.ts +10 -0
  136. package/lib/ui/gamification/question/inapp/prediction-result-ad/index.js +20 -0
  137. package/lib/ui/gamification/question/inapp/prediction-result-ad/styles.d.ts +11 -0
  138. package/lib/ui/gamification/question/inapp/prediction-result-ad/styles.js +34 -0
  139. package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +38 -5
  140. package/lib/ui/gamification/question/notification/styles.d.ts +14 -2
  141. package/lib/ui/gamification/question/styles.d.ts +26 -4
  142. package/lib/ui/gamification/vote/alert/styles.d.ts +7 -1
  143. package/lib/ui/gamification/vote/feedback/styles.d.ts +19 -2
  144. package/lib/ui/gamification/vote/feedbackAlert/index.d.ts +9 -0
  145. package/lib/ui/gamification/vote/feedbackAlert/index.js +11 -0
  146. package/lib/ui/gamification/vote/feedbackAlert/styles.d.ts +11 -0
  147. package/lib/ui/gamification/vote/feedbackAlert/styles.js +30 -0
  148. package/lib/ui/gamification/vote/index.d.ts +3 -1
  149. package/lib/ui/gamification/vote/index.js +160 -130
  150. package/lib/ui/gamification/vote/insight-details/index.js +8 -7
  151. package/lib/ui/gamification/vote/insight-details/styles.d.ts +7 -1
  152. package/lib/ui/gamification/vote/styles.d.ts +29 -4
  153. package/lib/ui/gamification/vote/vote-option/index.d.ts +3 -0
  154. package/lib/ui/gamification/vote/vote-option/index.js +72 -64
  155. package/lib/ui/gamification/vote/vote-option/styles.d.ts +7 -1
  156. package/lib/ui/gamification/vote/win-bar/styles.d.ts +19 -2
  157. package/lib/ui/icons/index.d.ts +1 -0
  158. package/lib/ui/icons/index.js +80 -79
  159. package/lib/ui/modal/index.js +12 -17
  160. package/lib/ui/questions/insight/index.d.ts +4 -1
  161. package/lib/ui/questions/insight/index.js +29 -26
  162. package/lib/ui/questions/twitter/account/styles.d.ts +7 -1
  163. package/lib/ui/questions/twitter/index.d.ts +1 -0
  164. package/lib/ui/questions/twitter/index.js +27 -19
  165. package/lib/ui/theme/constants.d.ts +2 -0
  166. package/lib/ui/theme/constants.js +2 -0
  167. package/lib/ui/theme/masters-theme.js +1 -0
  168. package/lib/ui/theme/utils.d.ts +10 -0
  169. package/lib/ui/theme/utils.js +77 -0
  170. package/lib/ui/video-player/index.d.ts +10 -2
  171. package/lib/ui/video-player/index.js +189 -110
  172. package/lib/ui/video-player/styles.d.ts +36 -0
  173. package/lib/ui/video-player/styles.js +59 -11
  174. package/lib/utils/common.d.ts +6 -0
  175. package/lib/utils/createDemo.d.ts +12 -0
  176. package/lib/utils/debug/components/bypassLogin.d.ts +6 -0
  177. package/lib/utils/debug/components/copyLogs.d.ts +1 -0
  178. package/lib/utils/debug/components/developer.d.ts +14 -0
  179. package/lib/utils/debug/components/envToggle.d.ts +6 -0
  180. package/lib/utils/debug/components/eventInput.d.ts +8 -0
  181. package/lib/utils/debug/components/sdkKey.d.ts +6 -0
  182. package/lib/utils/debug/components/styles.d.ts +1 -0
  183. package/lib/utils/debug/index.d.ts +36 -0
  184. package/lib/utils/debug/storage.d.ts +14 -0
  185. package/lib/utils/decorators/container.d.ts +6 -0
  186. package/lib/utils/decorators/container.js +5 -5
  187. package/lib/utils/decorators/masters.d.ts +2 -0
  188. package/lib/utils/decorators/styles.d.ts +2 -0
  189. package/lib/utils/login.d.ts +3 -0
  190. package/lib/utils/storage.d.ts +14 -0
  191. package/package.json +27 -20
  192. package/lib/app/tvos/Advertisement.js +0 -88
  193. package/lib/app/tvos/AdvertisementUI.js +0 -40
  194. package/lib/app/tvos/index.d.ts +0 -16
  195. package/lib/app/tvos/index.js +0 -23
  196. package/lib/app/tvos/story.d.ts +0 -6
  197. package/lib/app/tvos/story.js +0 -34
  198. package/lib/app/tvos/styles.js +0 -4
  199. package/lib/app/tvos/ui/Layout/index.js +0 -76
  200. package/lib/app/tvos/ui/Sidebar/PromoAction.d.ts +0 -2
  201. package/lib/app/tvos/ui/Sidebar/PromoAction.js +0 -62
  202. package/lib/app/tvos/ui/Sidebar/index.js +0 -114
  203. /package/lib/app/{tvos → webos}/styles.d.ts +0 -0
  204. /package/lib/app/{tvos → webos}/ui/Layout/index.d.ts +0 -0
  205. /package/lib/app/{tvos → webos}/ui/Layout/styles.d.ts +0 -0
@@ -1,112 +1,118 @@
1
- import { jsx as n, jsxs as u } from "react/jsx-runtime";
2
- import { cx as h } from "@linaria/core";
3
- import { SDKContainer as A, SDKScrollContainer as F } from "./styles.js";
4
- import { useSdkFeature as v } from "../useSdkFeature.js";
5
- import { useSdkResponsive as x } from "../useSdkResponsive.js";
6
- import { useSdkScroll as N } from "../useSdkScroll.js";
7
- import { useAnalyticsListener as g, newTabLinkListener as y } from "../../hooks/analytics.js";
8
- import { useRef as f, useMemo as C, useEffect as D } from "react";
9
- import { useStore as K } from "@streamlayer/react-polyfills";
10
- import { resetCss as m } from "../../ui/theme/theme.js";
11
- import { ActiveFeature as L, StandaloneFeature as b } from "./Features/index.js";
12
- import { SDKNavigation as j, SDKHeader as R } from "./Navigation/index.js";
13
- import { SDKNotifications as w } from "./Notifications/index.js";
14
- import { useAppApp as E } from "./useApp.js";
15
- import { AppContext as H } from "./useAppContext.js";
16
- const I = ({
1
+ import { jsx as n, jsxs as h } from "react/jsx-runtime";
2
+ import { cx as A } from "@linaria/core";
3
+ import { SDKContainer as y, SDKScrollContainer as C } from "./styles.js";
4
+ import { useSdkFeature as D } from "../useSdkFeature.js";
5
+ import { useSdkResponsive as K } from "../useSdkResponsive.js";
6
+ import { useSdkScroll as L } from "../useSdkScroll.js";
7
+ import { useAnalyticsListener as R, newTabLinkListener as b } from "../../hooks/analytics.js";
8
+ import { useState as j, useRef as F, useMemo as w, useEffect as E } from "react";
9
+ import { useStore as v } from "@streamlayer/react-polyfills";
10
+ import { resetCss as u } from "../../ui/theme/theme.js";
11
+ import { ActiveFeature as H, StandaloneFeature as I } from "./Features/index.js";
12
+ import { SDKNavigation as M, SDKHeader as P } from "./Navigation/index.js";
13
+ import { SDKNotifications as V } from "./Notifications/index.js";
14
+ import { useAppApp as Y } from "./useApp.js";
15
+ import { AppContext as q } from "./useAppContext.js";
16
+ const z = ({
17
17
  sdk: e,
18
- className: t,
19
- scrollStore: r,
20
- appNode: l,
21
- scrollNode: o,
22
- responsiveStore: s
18
+ className: l,
19
+ scrollStore: o,
20
+ appNode: a,
21
+ scrollNode: m,
22
+ responsiveStore: r
23
23
  }) => {
24
- const [, i] = v(e);
25
- return /* @__PURE__ */ n(L, {
26
- className: t,
27
- scrollNode: o,
28
- appNode: l,
29
- scrollStore: r,
30
- feature: i,
31
- responsiveStore: s,
24
+ const [, t] = D(e);
25
+ return /* @__PURE__ */ n(H, {
26
+ className: l,
27
+ scrollNode: m,
28
+ appNode: a,
29
+ scrollStore: o,
30
+ feature: t,
31
+ responsiveStore: r,
32
32
  sdk: e
33
33
  });
34
- }, M = ({
34
+ }, B = ({
35
35
  sdk: e,
36
- className: t,
37
- appNode: r,
38
- responsiveStore: l
36
+ muted: l,
37
+ className: o,
38
+ appNode: a,
39
+ responsiveStore: m
39
40
  }) => {
40
- const o = K(e.featuresList.getStore());
41
- return o ? Array.from(o, (s) => {
42
- const i = e.getFeature(s);
43
- return i ? /* @__PURE__ */ n(b, {
44
- className: t,
45
- appNode: r,
41
+ const r = v(e.featuresList.getStore());
42
+ return r ? Array.from(r, (t) => {
43
+ const i = e.getFeature(t);
44
+ return i ? /* @__PURE__ */ n(I, {
45
+ className: o,
46
+ muted: l,
47
+ appNode: a,
46
48
  feature: i,
47
- responsiveStore: l,
49
+ responsiveStore: m,
48
50
  sdk: e
49
- }, s) : null;
51
+ }, t) : null;
50
52
  }) : null;
51
- }, _ = ({
53
+ }, oe = ({
52
54
  sdk: e,
53
- topNavigation: t
55
+ muted: l,
56
+ topNavigation: o
54
57
  }) => {
55
- const r = f(null), l = f(null), [o] = x(r), [s, i] = N(r, o), {
56
- sdkReady: p,
57
- activeFeature: c,
58
- isLogged: d
59
- } = E(e), a = !!p;
60
- g(r, {
61
- enabled: a,
58
+ const [a, m] = j(!0), r = F(null), t = v(e.uiState), i = F(null), [c] = K(r), [p, d] = L(r, c), {
59
+ sdkReady: x,
60
+ activeFeature: f,
61
+ isLogged: N
62
+ } = Y(e), s = !!x;
63
+ R(r, {
64
+ enabled: s,
62
65
  event: "click",
63
- listener: y
66
+ listener: b
64
67
  });
65
- const S = C(() => ({
68
+ const g = w(() => ({
66
69
  sdk: e,
67
- topNavigation: t
68
- }), [e, t]);
69
- return D(() => {
70
+ topNavigation: o
71
+ }), [e, o]);
72
+ return E(() => {
70
73
  import("./Features/Gamification/gamification-feature.js");
71
- }, []), /* @__PURE__ */ n(H.Provider, {
72
- value: S,
73
- children: /* @__PURE__ */ u(A, {
74
- ref: r,
75
- className: t ? "" : "c10llmat",
76
- children: [a && t && /* @__PURE__ */ n(j, {
77
- className: m,
74
+ }, []), /* @__PURE__ */ n(q.Provider, {
75
+ value: g,
76
+ children: /* @__PURE__ */ h(y, {
77
+ ref: (S) => {
78
+ r.current = S, m(!!S);
79
+ },
80
+ className: o ? "" : "c10llmat",
81
+ children: [s && o && t.app && /* @__PURE__ */ n(M, {
82
+ className: A(u, "sl-hide-on-modal"),
78
83
  sdk: e,
79
- ref: l
80
- }), a && !t && !!c && /* @__PURE__ */ n(R, {
81
- className: h(m, "sl-hide-on-modal"),
84
+ ref: i
85
+ }), s && !o && !!f && t.app && /* @__PURE__ */ n(P, {
86
+ className: A(u, "sl-hide-on-modal"),
82
87
  sdk: e,
83
- ref: l
84
- }), /* @__PURE__ */ u(F, {
88
+ ref: i
89
+ }), /* @__PURE__ */ h(C, {
85
90
  className: "sl-hide-on-modal",
86
- ref: s,
87
- "data-nav": (!!c && a).toString(),
88
- children: [a && /* @__PURE__ */ n(w, {
91
+ ref: p,
92
+ "data-nav": (!!f && s).toString(),
93
+ children: [s && t.app && /* @__PURE__ */ n(V, {
89
94
  sdk: e,
90
- scrollNode: s,
91
- headerNode: l,
95
+ scrollNode: p,
96
+ headerNode: i,
92
97
  appNode: r,
93
- scrollStore: i,
94
- responsiveStore: o,
95
- hasActiveFeature: !!c
96
- }), a && /* @__PURE__ */ n(I, {
97
- scrollStore: i,
98
- responsiveStore: o,
99
- scrollNode: s,
98
+ scrollStore: d,
99
+ responsiveStore: c,
100
+ hasActiveFeature: !!f
101
+ }), s && t.app && /* @__PURE__ */ n(z, {
102
+ scrollStore: d,
103
+ responsiveStore: c,
104
+ scrollNode: p,
100
105
  appNode: r,
101
- className: m,
106
+ className: u,
102
107
  sdk: e
103
- }), a && /* @__PURE__ */ n(M, {
104
- responsiveStore: o,
108
+ }), s && a && /* @__PURE__ */ n(B, {
109
+ muted: l,
110
+ responsiveStore: c,
105
111
  appNode: r,
106
- className: m,
112
+ className: u,
107
113
  sdk: e
108
114
  })]
109
- }), a && !d && /* @__PURE__ */ n("div", {
115
+ }), s && !N && a && t.app && /* @__PURE__ */ n("div", {
110
116
  style: {
111
117
  display: "flex",
112
118
  alignItems: "center",
@@ -120,5 +126,5 @@ const I = ({
120
126
  });
121
127
  };
122
128
  export {
123
- _ as App
129
+ oe as App
124
130
  };
@@ -1,65 +1,63 @@
1
- import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
- import { styled as a } from "@linaria/react";
3
- import { StreamLayerProvider as l, StreamLayerSDKEvent as d, useStreamLayer as c, useStreamLayerUI as m } from "@streamlayer/react";
4
- import { App as u } from "../index.js";
5
- import { useStreamLayerDebug as f } from "../../../utils/debug/index.js";
6
- import { Video as y } from "./video.js";
1
+ import { jsxs as i, jsx as t, Fragment as p } from "react/jsx-runtime";
2
+ import { App as m } from "../index.js";
3
+ import { StreamLayerSDKAdvertisement as u } from "../Advertisement/index.js";
4
+ import { StreamLayerSDKNotification as c } from "../InApp/index.js";
5
+ import { Layout as l } from "../Layout/index.js";
6
+ import { useState as f } from "react";
7
+ import { StreamLayerProvider as S, StreamLayerSDKEvent as b, useStreamLayer as d, useStreamLayerUI as h } from "@streamlayer/react";
8
+ import { useStreamLayerDebug as y } from "../../../utils/debug/index.js";
9
+ import { Video as v } from "./video.js";
10
+ import { VideoContainer as A, VideoMuteButton as L } from "./styles.js";
7
11
  const s = () => {
8
12
  console.log("deep link handled cb");
9
- }, v = () => {
10
- console.log("video player handled cb");
11
- }, h = ({
12
- withSidebarNotification: n
13
- }) => {
14
- const r = c(), e = m();
15
- return !r || !e.app && !e.appNotification || !e.app && e.appNotification && !n ? null : /* @__PURE__ */ o(u, {
16
- sdk: r,
17
- onDeepLinkHandled: s
18
- });
19
- }, A = /* @__PURE__ */ a("div")({
20
- name: "Container",
21
- class: "c1a4qh28",
22
- propsAsIs: !1
23
- }), S = /* @__PURE__ */ a("div")({
24
- name: "Body",
25
- class: "b9h8kuk",
26
- propsAsIs: !1
27
- }), k = /* @__PURE__ */ a("div")({
28
- name: "AppContainer",
29
- class: "a1wkro2j",
30
- propsAsIs: !1
31
- }), P = ({
32
- sdkKey: n,
33
- eventId: r,
13
+ }, k = ({ withSidebarNotification: r }) => {
14
+ const o = d(), e = h();
15
+ return !o || !e.app && !e.appNotification && !e.appSidebar || !e.app && !e.appSidebar && e.appNotification && !r ? null : /* @__PURE__ */ t(m, { sdk: o, onDeepLinkHandled: s });
16
+ }, g = () => {
17
+ const r = d(), [o, e] = f(!1);
18
+ return r ? /* @__PURE__ */ t(
19
+ l,
20
+ {
21
+ sdk: r,
22
+ banner: /* @__PURE__ */ t(u, { sdk: r, banner: "bottom", persistent: !0 }),
23
+ sidebar: /* @__PURE__ */ i(p, { children: [
24
+ /* @__PURE__ */ t(u, { sdk: r, sidebar: "right", muted: !o, skipAutoClose: !0, externalAd: !0, persistent: !0 }),
25
+ /* @__PURE__ */ t(k, { withSidebarNotification: !1 })
26
+ ] }),
27
+ notification: /* @__PURE__ */ i(p, { children: [
28
+ /* @__PURE__ */ t(u, { sdk: r, notification: !0, persistent: !0 }),
29
+ /* @__PURE__ */ t(c, { sdk: r })
30
+ ] }),
31
+ children: /* @__PURE__ */ i(A, { className: "divAnchor", children: [
32
+ /* @__PURE__ */ t(v, { muted: o, toggleMute: e }),
33
+ /* @__PURE__ */ t(L, { onClick: () => e((n) => !n), children: o ? "unmute" : "mute" })
34
+ ] })
35
+ }
36
+ ) : null;
37
+ }, M = ({
38
+ sdkKey: r,
39
+ eventId: o,
34
40
  production: e,
35
- friendsTab: p
41
+ friendsTab: n
36
42
  }) => {
37
- const t = f({
38
- sdkKey: n,
39
- eventId: r,
40
- production: e
41
- });
42
- return /* @__PURE__ */ i(l, {
43
- sdkKey: t.sdkKey,
44
- production: t.env === "production",
45
- autoEnable: !0,
46
- onDeepLinkHandled: s,
47
- videoPlayerController: v,
48
- withAd: !1,
49
- friendsTab: p,
50
- children: [/* @__PURE__ */ i(S, {
51
- children: [/* @__PURE__ */ o(y, {}), /* @__PURE__ */ o(A, {
52
- children: /* @__PURE__ */ o(k, {
53
- children: /* @__PURE__ */ o(h, {
54
- withSidebarNotification: !1
55
- })
56
- })
57
- })]
58
- }), /* @__PURE__ */ o(d, {
59
- event: t.event
60
- })]
61
- });
43
+ const a = y({ sdkKey: r, eventId: o, production: e });
44
+ return /* @__PURE__ */ i(
45
+ S,
46
+ {
47
+ sdkKey: a.sdkKey,
48
+ production: a.env === "production",
49
+ autoEnable: !0,
50
+ onDeepLinkHandled: s,
51
+ withAd: !0,
52
+ withAdNotification: !0,
53
+ friendsTab: n,
54
+ children: [
55
+ /* @__PURE__ */ t(g, {}),
56
+ /* @__PURE__ */ t(b, { event: a.event })
57
+ ]
58
+ }
59
+ );
62
60
  };
63
61
  export {
64
- P as AppStory
62
+ M as AppStory
65
63
  };
@@ -1,57 +1,52 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
- import { styled as t } from "@linaria/react";
3
- import { StreamLayerProvider as y } from "@streamlayer/react";
4
- import { useStreamLayerDebug as v } from "../../../../utils/debug/index.js";
5
- import { Content as b } from "./content.js";
6
- import { Video as f } from "./video.js";
7
- const u = /* @__PURE__ */ t("div")({
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { styled as r } from "@linaria/react";
3
+ import { StreamLayerProvider as l } from "@streamlayer/react";
4
+ import { useStreamLayerDebug as y } from "../../../../utils/debug/index.js";
5
+ import { Video as u } from "./video.js";
6
+ const v = /* @__PURE__ */ r("div")({
8
7
  name: "Body",
9
8
  class: "bqh4lcc",
10
9
  propsAsIs: !1
11
- }), h = /* @__PURE__ */ t("div")({
10
+ }), f = /* @__PURE__ */ r("div")({
12
11
  name: "Main",
13
12
  class: "mgga81b",
14
13
  propsAsIs: !1
15
- }), B = ({
16
- isMobileScreen: n,
14
+ }), k = ({
15
+ isMobileScreen: t,
17
16
  promotionId: s,
18
- sdkKey: i,
19
- eventId: d,
20
- sidebar: a,
21
- skipAutoClose: r,
22
- production: m,
17
+ sdkKey: n,
18
+ eventId: i,
19
+ sidebar: d,
20
+ skipAutoClose: m,
21
+ production: a,
23
22
  banner: c,
24
23
  layoutMode: p = "side-by-side"
25
24
  }) => {
26
- const o = v({
27
- sdkKey: i,
28
- eventId: d,
29
- production: m
25
+ const e = y({
26
+ sdkKey: n,
27
+ eventId: i,
28
+ production: a
30
29
  });
31
- return /* @__PURE__ */ e(h, {
32
- children: /* @__PURE__ */ l(y, {
33
- sdkKey: o.sdkKey,
34
- event: o.event,
35
- production: o.env === "production",
30
+ return /* @__PURE__ */ o(f, {
31
+ children: /* @__PURE__ */ o(l, {
32
+ sdkKey: e.sdkKey,
33
+ event: e.event,
34
+ production: e.env === "production",
36
35
  autoEnable: !0,
37
- children: [/* @__PURE__ */ e(u, {
38
- children: /* @__PURE__ */ e(f, {
39
- event: o.event,
36
+ children: /* @__PURE__ */ o(v, {
37
+ children: /* @__PURE__ */ o(u, {
38
+ event: e.event,
40
39
  banner: c,
41
- sidebar: a,
40
+ sidebar: d,
42
41
  layoutMode: p,
43
42
  promotionId: s,
44
- skipAutoClose: r,
45
- isMobileScreen: n
43
+ skipAutoClose: m,
44
+ isMobileScreen: t
46
45
  })
47
- }), /* @__PURE__ */ e("h3", {
48
- children: "Overlay View (should appear between two text blocks)"
49
- }), /* @__PURE__ */ e(b, {
50
- skipAutoClose: r
51
- })]
46
+ })
52
47
  })
53
48
  });
54
49
  };
55
50
  export {
56
- B as PromotionStory
51
+ k as PromotionStory
57
52
  };
@@ -3,4 +3,6 @@ export declare const VideoFrame: import('@linaria/react').StyledComponent<import
3
3
  export declare const AdvSidebar: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
4
  export declare const AdvContent: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
5
  export declare const AdvBanner: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
6
- export declare const PromoButton: any;
6
+ export declare const PromoButton: {
7
+ __wyw_meta: unknown;
8
+ } & import('react').FC<import('../../../../ui/button').ButtonProps>;
@@ -1,56 +1,71 @@
1
- import { jsxs as a, Fragment as g, jsx as r } from "react/jsx-runtime";
2
- import { useRef as y, useState as x, useCallback as P, useEffect as V } from "react";
3
- import { useStreamLayer as A } from "@streamlayer/react";
4
- import { StreamLayerSDKAdvertisement as d } from "../../Advertisement/index.js";
5
- import { StreamLayerThemeProvider as h } from "../../../../ui/theme/index.js";
6
- import { PromoButton as C, VideoFrame as w, AdvSidebar as F, VideoPlayerWrap as L, AdvBanner as S, AdvContent as T } from "./styles.js";
7
- const K = ({ isMobileScreen: o, skipAutoClose: n, sidebar: l, banner: p, event: m, promotionId: s, layoutMode: t }) => {
8
- const e = A(), u = y(null), [f, v] = x(!1), c = P(({ muted: i }) => {
9
- v(i);
1
+ import { jsxs as d, Fragment as g, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as v, useState as y, useCallback as V, useEffect as x } from "react";
3
+ import { useStreamLayer as P } from "@streamlayer/react";
4
+ import { StreamLayerSDKAdvertisement as l } from "../../Advertisement/index.js";
5
+ import { Layout as b } from "../../Layout/index.js";
6
+ import { PromoButton as w, VideoFrame as F } from "./styles.js";
7
+ const D = ({ isMobileScreen: o, skipAutoClose: a, sidebar: u, banner: p, event: m, promotionId: n, layoutMode: i }) => {
8
+ const e = P(), c = v(null), [h, f] = y(!1), s = V(({ muted: t }) => {
9
+ f(t);
10
10
  }, []);
11
- return V(() => (e == null || e.addVideoPlayerController(c), () => {
12
- e == null || e.removeVideoPlayerController(c);
13
- }), [e, c]), /* @__PURE__ */ a(g, { children: [
14
- s && /* @__PURE__ */ a(C, { onClick: () => {
15
- var i;
16
- (i = u.current) == null || i.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
17
- e == null || e.getFeature(12).background.advertisement.show(s);
11
+ return x(() => (e == null || e.addVideoPlayerController(s), () => {
12
+ e == null || e.removeVideoPlayerController(s);
13
+ }), [e, s]), /* @__PURE__ */ d(g, { children: [
14
+ n && /* @__PURE__ */ d(w, { onClick: () => {
15
+ var t;
16
+ (t = c.current) == null || t.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
17
+ e == null || e.getFeature(12).background.advertisement.show(n);
18
18
  }, 200);
19
19
  }, children: [
20
20
  "open promotion: ",
21
- s
21
+ n
22
22
  ] }),
23
- /* @__PURE__ */ a(w, { ref: u, "data-testid": "video-frame", children: [
24
- /* @__PURE__ */ r(
25
- F,
26
- {
27
- style: {
28
- ...t === "cover" ? { position: "absolute" } : {},
29
- ...l === "left" ? { left: 0 } : { right: 0, order: 3 },
30
- ...o ? { maxWidth: "calc(300px + env(safe-area-inset-left))" } : {}
31
- },
32
- children: e && /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(
33
- d,
34
- {
35
- isMobileScreen: o,
36
- event: m,
37
- sdk: e,
38
- sidebar: l,
39
- layoutMode: t,
40
- skipAutoClose: n,
41
- skipTypeCheck: !0,
42
- externalAd: !0,
43
- persistent: !0
44
- }
45
- ) })
46
- }
47
- ),
48
- /* @__PURE__ */ a(L, { children: [
49
- /* @__PURE__ */ r("div", { className: "divAnchor", children: /* @__PURE__ */ r(
23
+ /* @__PURE__ */ r(F, { ref: c, "data-testid": "video-frame", children: e && /* @__PURE__ */ r(
24
+ b,
25
+ {
26
+ sdk: e,
27
+ sidebar: /* @__PURE__ */ r(
28
+ l,
29
+ {
30
+ isMobileScreen: o,
31
+ event: m,
32
+ sdk: e,
33
+ sidebar: u,
34
+ layoutMode: i,
35
+ skipAutoClose: a,
36
+ externalAd: !0,
37
+ persistent: !0
38
+ }
39
+ ),
40
+ banner: /* @__PURE__ */ r(
41
+ l,
42
+ {
43
+ isMobileScreen: o,
44
+ event: m,
45
+ sdk: e,
46
+ banner: p,
47
+ layoutMode: i,
48
+ skipAutoClose: a,
49
+ persistent: !0
50
+ }
51
+ ),
52
+ overlay: /* @__PURE__ */ r(
53
+ l,
54
+ {
55
+ isMobileScreen: o,
56
+ event: m,
57
+ sdk: e,
58
+ sidebar: u,
59
+ layoutMode: i,
60
+ skipAutoClose: a,
61
+ persistent: !0
62
+ }
63
+ ),
64
+ children: /* @__PURE__ */ r("div", { className: "divAnchor", children: /* @__PURE__ */ r(
50
65
  "video",
51
66
  {
52
67
  src: "https://storage.googleapis.com/gvabox/media/samples/stock.mp4",
53
- muted: f,
68
+ muted: h,
54
69
  width: "100%",
55
70
  height: "100%",
56
71
  autoplay: "autoplay",
@@ -58,44 +73,11 @@ const K = ({ isMobileScreen: o, skipAutoClose: n, sidebar: l, banner: p, event:
58
73
  playsInline: !0,
59
74
  controls: !0
60
75
  }
61
- ) }),
62
- /* @__PURE__ */ r(
63
- S,
64
- {
65
- style: {
66
- ...t === "cover" ? { position: "absolute" } : {},
67
- ...p === "top" ? { top: 0, order: -1 } : { bottom: 0 }
68
- },
69
- children: e && /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(
70
- d,
71
- {
72
- isMobileScreen: o,
73
- event: m,
74
- sdk: e,
75
- banner: p,
76
- layoutMode: t,
77
- skipAutoClose: n,
78
- persistent: !0
79
- }
80
- ) })
81
- }
82
- )
83
- ] })
84
- ] }),
85
- /* @__PURE__ */ r(T, { children: e && /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(
86
- d,
87
- {
88
- isMobileScreen: o,
89
- event: m,
90
- sdk: e,
91
- sidebar: l,
92
- layoutMode: t,
93
- skipAutoClose: n,
94
- persistent: !0
76
+ ) })
95
77
  }
96
- ) }) })
78
+ ) })
97
79
  ] });
98
80
  };
99
81
  export {
100
- K as Video
82
+ D as Video
101
83
  };
@@ -1,4 +1,6 @@
1
1
  export declare const VideoPlayerWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
2
  export declare const VideoFrame: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
3
  export declare const AdvBanner: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
- export declare const PromoButton: any;
4
+ export declare const PromoButton: {
5
+ __wyw_meta: unknown;
6
+ } & import('react').FC<import('../../../../ui/button').ButtonProps>;
@@ -1,5 +1,9 @@
1
+ export declare const VideoContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
+ export declare const VideoMuteButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
1
3
  export declare const PointsContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
4
  export declare const VideoPlayerWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
5
  export declare const VideoFrame: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
6
  export declare const LinkToLogin: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLAnchorElement> & import('react').AnchorHTMLAttributes<HTMLAnchorElement> & Record<never, unknown>>;
5
- export declare const NotificationContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
7
+ export declare const VideoTag: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLVideoElement> & import('react').VideoHTMLAttributes<HTMLVideoElement> & Record<never, unknown>>;
8
+ export declare const VideoIFrame: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLIFrameElement> & import('react').IframeHTMLAttributes<HTMLIFrameElement> & Record<never, unknown>>;
9
+ export declare const Preload: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;