@streamlayer/react-ui 1.26.0 → 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -15,10 +15,15 @@
15
15
  "default": "./lib/app/masters/masters.js",
16
16
  "types": "./lib/app/masters/masters.d.ts"
17
17
  },
18
- "./tv": {
19
- "import": "./lib/app/tvos/index.js",
20
- "default": "./lib/app/tvos/index.js",
21
- "types": "./lib/app/tvos/index.d.ts"
18
+ "./webos": {
19
+ "import": "./lib/app/webos/index.js",
20
+ "default": "./lib/app/webos/index.js",
21
+ "types": "./lib/app/webos/index.d.ts"
22
+ },
23
+ "./webos/withTVRemote": {
24
+ "import": "./lib/app/webos/withTVRemote.js",
25
+ "default": "./lib/app/webos/withTVRemote.js",
26
+ "types": "./lib/app/webos/withTVRemote.d.ts"
22
27
  },
23
28
  "./mastersPoints": {
24
29
  "import": "./lib/app/masters/Points/index.js",
@@ -66,27 +71,28 @@
66
71
  ],
67
72
  "peerDependencies": {
68
73
  "@lottiefiles/react-lottie-player": "^3.5.4",
69
- "@streamlayer/sl-eslib": "^5.179.1",
74
+ "@streamlayer/sl-eslib": "^5.216.1",
70
75
  "@types/lodash.throttle": "^4.1.9",
71
76
  "lodash.throttle": "^4.1.1",
72
77
  "react-infinite-scroller": "^1.2.6",
73
78
  "react-virtualized-auto-sizer": "^1.0.24",
74
79
  "react-window": "^1.8.10",
80
+ "@noriginmedia/norigin-spatial-navigation": "^2.3.0",
75
81
  "react-window-infinite-loader": "^1.0.9",
76
82
  "uuid": "^11.1.0",
77
- "@streamlayer/feature-gamification": "^1.19.0",
78
- "@streamlayer/react-polyfills": "^0.1.25",
79
- "@streamlayer/sdk-web": "^1.13.0",
80
- "@streamlayer/sdk-web-analytics": "^1.10.0",
81
- "@streamlayer/sdk-web-anonymous-auth": "^1.1.44",
82
- "@streamlayer/sdk-web-api": "^1.11.0",
83
- "@streamlayer/sdk-web-core": "^1.14.0",
84
- "@streamlayer/sdk-web-features": "^1.0.65",
85
- "@streamlayer/sdk-web-interfaces": "^1.6.3",
86
- "@streamlayer/sdk-web-logger": "^1.0.65",
87
- "@streamlayer/sdk-web-notifications": "^1.3.27",
88
- "@streamlayer/sdk-web-storage": "^1.0.65",
89
- "@streamlayer/sdk-web-types": "^1.13.0"
83
+ "@streamlayer/feature-gamification": "^1.20.0",
84
+ "@streamlayer/react-polyfills": "^0.1.27",
85
+ "@streamlayer/sdk-web": "^1.14.0",
86
+ "@streamlayer/sdk-web-analytics": "^1.11.0",
87
+ "@streamlayer/sdk-web-anonymous-auth": "^1.1.46",
88
+ "@streamlayer/sdk-web-api": "^1.12.0",
89
+ "@streamlayer/sdk-web-core": "^1.15.0",
90
+ "@streamlayer/sdk-web-features": "^1.0.67",
91
+ "@streamlayer/sdk-web-interfaces": "^1.7.0",
92
+ "@streamlayer/sdk-web-logger": "^1.0.67",
93
+ "@streamlayer/sdk-web-notifications": "^1.3.29",
94
+ "@streamlayer/sdk-web-storage": "^1.0.67",
95
+ "@streamlayer/sdk-web-types": "^1.14.0"
90
96
  },
91
97
  "nx": {
92
98
  "implicitDependencies": [
@@ -113,6 +119,7 @@
113
119
  "@wyw-in-js/vite": "^0.5.3",
114
120
  "esbuild-plugin-babel": "^0.2.3",
115
121
  "glob": "^11.0.0",
122
+ "hls.js": "^1.6.13",
116
123
  "react": "18.3.1",
117
124
  "react-auth-code-input": "^3.2.1",
118
125
  "react-countdown-circle-timer": "^3.2.1",
@@ -126,7 +133,7 @@
126
133
  "vite-plugin-svgr": "^4.2.0",
127
134
  "vite-svg-loader": "^5.1.0",
128
135
  "vite-tsconfig-paths": "^5.0.1",
129
- "@streamlayer/react": "^1.17.0"
136
+ "@streamlayer/react": "^1.18.0"
130
137
  },
131
138
  "dependencies": {
132
139
  "@dailymotion/vast-client": "^6.2.0",
@@ -1,88 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { cx as c } from "@linaria/core";
3
- import { styled as p } from "@linaria/react";
4
- import { useAnalyticsListener as f } from "../../hooks/analytics.js";
5
- import { useRef as v } from "react";
6
- import { useStore as l } from "@streamlayer/react-polyfills";
7
- import { eventBus as d } from "@streamlayer/sdk-web-interfaces";
8
- import { FeatureType as A, PromotionType as y } from "@streamlayer/sdk-web-types";
9
- import { AdvertisementUI as g } from "./AdvertisementUI.js";
10
- const S = /* @__PURE__ */ p("div")({
11
- name: "AdvertisementUIWrap",
12
- class: "a3844y1",
13
- propsAsIs: !1
14
- }), b = (t) => {
15
- const e = t.target;
16
- if (e instanceof HTMLAnchorElement && e.target === "_blank") {
17
- const r = e.getAttribute("data-promo-id") || "", o = e.getAttribute("data-promo-type") || y.UNSET;
18
- e.getAttribute("data-a") === "button" && d.emit("advertisement", {
19
- action: "buttonSelect",
20
- payload: {
21
- id: r,
22
- type: o
23
- }
24
- }), e.getAttribute("data-a") === "banner" && d.emit("advertisement", {
25
- action: "bannerSelect",
26
- payload: {
27
- id: r,
28
- type: o
29
- }
30
- });
31
- }
32
- }, L = ({
33
- gamification: t,
34
- skipAutoClose: e,
35
- sidebar: r,
36
- banner: o,
37
- persistent: s,
38
- controlVideo: m
39
- }) => {
40
- const n = v(null), a = l(t.advertisement.$store);
41
- f(n, {
42
- enabled: !!a.data,
43
- event: "click",
44
- listener: b
45
- });
46
- const u = !o && !r;
47
- return a.data === void 0 || !s && a.isViewed ? null : /* @__PURE__ */ i(S, {
48
- ref: n,
49
- style: {
50
- height: u ? "auto" : "100%"
51
- },
52
- className: c("SL-AdvertisementUIWrap", "SL-AdvertisementUIWrap--lower-third"),
53
- children: /* @__PURE__ */ i(g, {
54
- sidebar: r,
55
- banner: o,
56
- advertisement: a.data,
57
- advertisementPaused: !!a.isPaused,
58
- togglePause: a.togglePause || (() => {
59
- }),
60
- close: a.close,
61
- markAsViewed: t.advertisement.markAsViewed,
62
- open: t.advertisement.open,
63
- skipAutoClose: e,
64
- controlVideo: m
65
- })
66
- });
67
- }, E = ({
68
- sdk: t,
69
- sidebar: e,
70
- banner: r,
71
- skipAutoClose: o,
72
- persistent: s
73
- }) => {
74
- if (!l(t.featuresList.getStore()))
75
- return null;
76
- const n = t.getFeature(A.GAMES);
77
- return n ? /* @__PURE__ */ i(L, {
78
- gamification: n,
79
- sidebar: e,
80
- banner: r,
81
- persistent: s,
82
- skipAutoClose: o,
83
- controlVideo: t.controlVideoPlayer
84
- }) : null;
85
- };
86
- export {
87
- E as StreamLayerSDKAdvertisementTVOs
88
- };
@@ -1,40 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { Banner as u } from "../../ui/advertisement/banner/index.js";
3
- import { Sidebar as c } from "../../ui/advertisement/sidebar/index.js";
4
- import { TVSidebar as s } from "./ui/Sidebar/index.js";
5
- const g = ({
6
- advertisement: o,
7
- close: t,
8
- skipAutoClose: m,
9
- sidebar: i,
10
- banner: n,
11
- markAsViewed: p,
12
- open: f,
13
- controlVideo: l,
14
- advertisementPaused: d,
15
- togglePause: e
16
- }) => o.promotion ? i ? /* @__PURE__ */ r(c, { className: "PromoSidebarContainer", direction: i, hiding: !1, children: /* @__PURE__ */ r(
17
- s,
18
- {
19
- markAsViewed: p,
20
- promotionId: o.question.id,
21
- promotion: o.promotion,
22
- onClose: t,
23
- open: f,
24
- controlVideo: l,
25
- skipAutoClose: m,
26
- advertisementPaused: d,
27
- togglePause: e
28
- }
29
- ) }) : n ? /* @__PURE__ */ r(
30
- u,
31
- {
32
- promotionId: o.question.id,
33
- hiding: !1,
34
- promotion: o.promotion,
35
- direction: n
36
- }
37
- ) : null : null;
38
- export {
39
- g as AdvertisementUI
40
- };
@@ -1,16 +0,0 @@
1
- import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
- export declare const StreamLayerSDKTv: React.FC<{
3
- persistent?: boolean;
4
- children: React.ReactNode;
5
- sdk: StreamLayerSDK;
6
- uiState: {
7
- promotionExternalAd?: boolean;
8
- promotionSidebar?: boolean;
9
- promotionOverlay?: boolean;
10
- promotionNotification?: boolean;
11
- promotionBanner?: boolean;
12
- app?: boolean;
13
- appNotification?: boolean;
14
- onboardingNotification?: boolean;
15
- };
16
- }>;
@@ -1,23 +0,0 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { useStore as n } from "@streamlayer/react-polyfills";
3
- import { FeatureType as u } from "@streamlayer/sdk-web-types";
4
- import { StreamLayerSDKAdvertisementTVOs as a } from "./Advertisement.js";
5
- import { SDKLayout as f } from "./ui/Layout/index.js";
6
- const l = ({ persistent: t, children: i, sdk: r, uiState: m }) => {
7
- if (!n(r.featuresList.getStore()))
8
- return null;
9
- const o = r.getFeature(u.GAMES);
10
- return o ? /* @__PURE__ */ e(
11
- f,
12
- {
13
- gamification: o,
14
- sidebar: /* @__PURE__ */ e(a, { sdk: r, persistent: t, sidebar: "right" }),
15
- banner: /* @__PURE__ */ e(a, { sdk: r, persistent: t, banner: "bottom" }),
16
- video: i,
17
- uiState: m
18
- }
19
- ) : null;
20
- };
21
- export {
22
- l as StreamLayerSDKTv
23
- };
@@ -1,6 +0,0 @@
1
- export declare const TVOsStory: React.FC<{
2
- sdkKey?: string;
3
- eventId?: string;
4
- production?: boolean;
5
- persistent?: boolean;
6
- }>;
@@ -1,34 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { StreamLayerProvider as n, useStreamLayer as u, useStreamLayerUI as i } from "@streamlayer/react";
3
- import { useStreamLayerDebug as m } from "../../utils/debug/index.js";
4
- import { StreamLayerSDKTv as d } from "./index.js";
5
- const p = ({ persistent: t }) => {
6
- const e = u(), o = i();
7
- return e ? /* @__PURE__ */ r(d, { sdk: e, persistent: t, uiState: o, children: /* @__PURE__ */ r(
8
- "video",
9
- {
10
- src: "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
11
- style: { width: "100%", height: "100%", borderRadius: 10 },
12
- autoPlay: !0,
13
- loop: !0,
14
- playsInline: !0,
15
- controls: !0
16
- }
17
- ) }) : null;
18
- }, S = ({ sdkKey: t, eventId: e, persistent: o, production: a }) => {
19
- const s = m({ sdkKey: t, eventId: e, production: a });
20
- return /* @__PURE__ */ r(
21
- n,
22
- {
23
- event: s.event,
24
- sdkKey: s.sdkKey,
25
- production: s.env === "production",
26
- autoEnable: !0,
27
- withAd: !0,
28
- children: /* @__PURE__ */ r(p, { persistent: o })
29
- }
30
- );
31
- };
32
- export {
33
- S as TVOsStory
34
- };
@@ -1,4 +0,0 @@
1
- const e = "c1ln9egv";
2
- export {
3
- e as customTheme
4
- };
@@ -1,76 +0,0 @@
1
- import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
- import { useRef as f, useCallback as x, useEffect as g } from "react";
3
- import { useStore as N } from "@streamlayer/react-polyfills";
4
- import { Container as R, ContentContainer as S, VideoContainer as V, AdContainer as k, AdLabel as z, VideoBox as A, VideoPlayer as E, Banner as L, Sidebar as j } from "./styles.js";
5
- const D = ({ gamification: b, sidebar: p, banner: y, video: C, uiState: l }) => {
6
- var m, u;
7
- const i = N(b.advertisement.$store), n = f(null), h = f(null), o = x(() => {
8
- const e = h.current, r = n.current;
9
- if (!e || !r)
10
- return;
11
- const { width: c, height: B } = e.getBoundingClientRect(), { width: v, height: w } = r.getBoundingClientRect();
12
- (c > v || B > w) && (e.style.width === "100%" ? (e.style.height = "100%", e.style.width = "auto") : (e.style.width = "100%", e.style.height = "auto"));
13
- }, []);
14
- g(() => {
15
- if (n.current) {
16
- const e = new ResizeObserver((r) => {
17
- for (const c of r)
18
- c.contentBoxSize && o();
19
- });
20
- return e.observe(n.current), () => {
21
- e.disconnect();
22
- };
23
- }
24
- return () => {
25
- };
26
- }, [o]), g(o);
27
- const a = l.promotionSidebar, s = l.promotionBanner;
28
- return /* @__PURE__ */ d(
29
- R,
30
- {
31
- style: { backgroundImage: `url(${(u = (m = i == null ? void 0 : i.data) == null ? void 0 : m.promotion) == null ? void 0 : u.backgroundImageLandscapeUrl})` },
32
- className: "Container",
33
- children: [
34
- /* @__PURE__ */ d(
35
- S,
36
- {
37
- className: "ContentContainer",
38
- style: {
39
- width: a ? "calc(100% - var(--sidebar-width))" : "100%"
40
- },
41
- children: [
42
- /* @__PURE__ */ d(
43
- V,
44
- {
45
- className: "VideoContainer",
46
- ref: n,
47
- style: {
48
- height: s ? "calc(100% - var(--banner-height))" : "100%"
49
- },
50
- children: [
51
- /* @__PURE__ */ t(k, { children: /* @__PURE__ */ t(z, { children: "Ad" }) }),
52
- /* @__PURE__ */ t(A, { ref: h, className: "VideoBox", children: /* @__PURE__ */ t(E, { className: "VideoPlayer", children: C }) })
53
- ]
54
- }
55
- ),
56
- /* @__PURE__ */ t(
57
- L,
58
- {
59
- className: "Banner",
60
- style: {
61
- height: s ? "var(--banner-height)" : "0px"
62
- },
63
- children: s && y
64
- }
65
- )
66
- ]
67
- }
68
- ),
69
- /* @__PURE__ */ t(j, { style: { width: a ? "var(--sidebar-width)" : "0px" }, className: "Sidebar", children: a && p })
70
- ]
71
- }
72
- );
73
- };
74
- export {
75
- D as SDKLayout
76
- };
@@ -1,2 +0,0 @@
1
- import { default as React } from 'react';
2
- export declare const PromoAction: React.ForwardRefExoticComponent<Omit<import('@streamlayer/sdk-web-types').RecursiveOmitHelper<import('@streamlayer/sl-eslib/interactive/interactive.common_pb').QuestionOptions_PromotionOptions, "$typeName">, "$typeName"> & React.RefAttributes<HTMLDivElement | HTMLAnchorElement>>;
@@ -1,62 +0,0 @@
1
- import { jsxs as c, jsx as n, Fragment as D } from "react/jsx-runtime";
2
- import { forwardRef as S } from "react";
3
- import { QRBlock as t, QR as d, QRDescBlock as u, LearnMore as E, QRHint as A, SendToUserButton as O, EnvelopeIcon as f, SendToUserText as x } from "./styles.js";
4
- const B = S(({ promotion: e }, r) => {
5
- var R, C, s, T, N, i, I;
6
- const l = e.buttonType, b = e.coupon, a = (R = e.banner) == null ? void 0 : R.url, h = e.type;
7
- return l === 1 ? /* @__PURE__ */ c(t, { children: [
8
- /* @__PURE__ */ n(d, { value: a, ref: r, tabIndex: 1 }),
9
- /* @__PURE__ */ c(u, { children: [
10
- /* @__PURE__ */ n(E, { children: "LEARN MORE" }),
11
- /* @__PURE__ */ n(A, { children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
12
- ] })
13
- ] }) : l === 3 ? /* @__PURE__ */ c(t, { children: [
14
- /* @__PURE__ */ n(d, { value: b, ref: r }),
15
- /* @__PURE__ */ c(u, { children: [
16
- /* @__PURE__ */ n(E, { style: { fontSize: 18, fontWeight: 400 }, children: "ADD TO APPLE WALLET" }),
17
- /* @__PURE__ */ n(A, { style: { fontSize: 17 }, children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
18
- ] })
19
- ] }) : l === 6 && h !== 4 ? /* @__PURE__ */ c(D, { children: [
20
- /* @__PURE__ */ c(
21
- O,
22
- {
23
- ref: r,
24
- tabIndex: 1,
25
- focusColor: (s = (C = e == null ? void 0 : e.banner) == null ? void 0 : C.ctaButton) == null ? void 0 : s.color,
26
- children: [
27
- /* @__PURE__ */ n(f, {}),
28
- "SEND INFO TO ACCOUNT EMAIL"
29
- ]
30
- }
31
- ),
32
- /* @__PURE__ */ c(t, { children: [
33
- /* @__PURE__ */ n(d, { value: a }),
34
- /* @__PURE__ */ c(u, { children: [
35
- /* @__PURE__ */ n(E, { children: "LEARN MORE" }),
36
- /* @__PURE__ */ n(A, { children: "SCAN QR CODE WITH YOUR PHONE CAMERA" })
37
- ] })
38
- ] })
39
- ] }) : l === 6 && h === 4 ? /* @__PURE__ */ c(
40
- O,
41
- {
42
- ref: r,
43
- tabIndex: 1,
44
- focusColor: (N = (T = e == null ? void 0 : e.banner) == null ? void 0 : T.ctaButton) == null ? void 0 : N.color,
45
- children: [
46
- /* @__PURE__ */ n(f, {}),
47
- /* @__PURE__ */ n(x, { children: "SEND INFO TO ACCOUNT EMAIL" })
48
- ]
49
- }
50
- ) : l === 4 ? /* @__PURE__ */ n(
51
- O,
52
- {
53
- ref: r,
54
- tabIndex: 1,
55
- focusColor: (I = (i = e == null ? void 0 : e.banner) == null ? void 0 : i.ctaButton) == null ? void 0 : I.color,
56
- children: "BACK TO VIDEO"
57
- }
58
- ) : null;
59
- });
60
- export {
61
- B as PromoAction
62
- };
@@ -1,114 +0,0 @@
1
- import { jsxs as l, jsx as r, Fragment as $ } from "react/jsx-runtime";
2
- import { useRef as d, useState as G, useEffect as a } from "react";
3
- import { AutoPlayVideo as J } from "@streamlayer/sdk-web-types";
4
- import { PromoAction as Q } from "./PromoAction.js";
5
- import { Container as X, Header as Y, BrandBlock as Z, LogoIcon as _, BrandText as ee, BrandNameContainer as re, BrandName as te, Sponsored as ne, CloseButton as oe, CloseIcon as ie, VideoBlock as ce, VideoWrapper as se, FocusableVideo as le, Paused as de, Title as ae, Description as ue } from "./styles.js";
6
- const we = (M) => {
7
- var E, B, R, I, P, S, C, L, N, T, U, O;
8
- const { promotion: e, open: u, togglePause: p, controlVideo: f, promotionId: A, onClose: H, markAsViewed: b } = M, i = d(null), g = d(null), v = d(null), k = d(null), [V, q] = G(0), n = d(0), z = e.type === 4 ? V : V / 2, x = !!((B = (E = e.banner) == null ? void 0 : E.video) != null && B.url), D = e.autoPlayVideo === J.ENABLED;
9
- let h = (R = e.banner) == null ? void 0 : R.url;
10
- return h && !h.startsWith("http") && (h = `https://${h}`), a(() => {
11
- if (!k.current) return;
12
- const c = new ResizeObserver(([o]) => {
13
- const m = o.contentRect.width;
14
- q(m);
15
- });
16
- return c.observe(k.current), () => {
17
- c.disconnect();
18
- };
19
- }, []), a(() => {
20
- var F;
21
- p == null || p(x || D), u == null || u();
22
- const c = () => {
23
- const t = [];
24
- return v.current && t.push(v.current), e.type === 5 && i.current && t.push(i.current), g.current && t.push(g.current), t;
25
- };
26
- let o = c();
27
- n.current = 0, (F = o[n.current]) == null || F.focus();
28
- const m = (t) => {
29
- var W, j;
30
- o = c();
31
- const y = o.length;
32
- if (y !== 0) {
33
- if (["ArrowDown", "ArrowRight"].includes(t.key)) {
34
- n.current = (n.current + 1) % y, (W = o[n.current]) == null || W.focus(), t.preventDefault();
35
- return;
36
- }
37
- if (["ArrowUp", "ArrowLeft"].includes(t.key)) {
38
- n.current = (n.current - 1 + y) % y, (j = o[n.current]) == null || j.focus(), t.preventDefault();
39
- return;
40
- }
41
- if (t.key === "Enter" || t.key === " ") {
42
- const s = o[n.current];
43
- if (!s) return;
44
- switch (s.tagName) {
45
- case "A":
46
- s.click();
47
- break;
48
- case "BUTTON":
49
- s.click();
50
- break;
51
- case "VIDEO":
52
- setTimeout(() => {
53
- const w = s;
54
- w.paused || w.ended ? w.play().then(() => {
55
- }).catch((K) => console.warn("⛔ start failed:", K)) : w.pause();
56
- }, 0);
57
- break;
58
- }
59
- t.preventDefault();
60
- }
61
- }
62
- };
63
- return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
64
- }, [e.type, x, D, u, p]), a(() => {
65
- A && e.type && b && b();
66
- }, [A, e.type, b]), a(() => () => {
67
- f == null || f({ muted: !1 });
68
- }, [f]), a(() => {
69
- e.type === 5 && i.current && i.current.focus();
70
- }, [e.type]), /* @__PURE__ */ l(X, { ref: k, tabIndex: 0, children: [
71
- /* @__PURE__ */ l(Y, { children: [
72
- e.logoMode === 1 && /* @__PURE__ */ l(Z, { children: [
73
- /* @__PURE__ */ r(_, { src: (I = e.sponsor) == null ? void 0 : I.logo, alt: "Logo" }),
74
- /* @__PURE__ */ l(ee, { children: [
75
- /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(te, { children: (P = e.sponsor) == null ? void 0 : P.name }) }),
76
- /* @__PURE__ */ r(ne, { children: "SPONSORED" })
77
- ] })
78
- ] }),
79
- e.logoMode === 2 && e.type === 4 && /* @__PURE__ */ r("img", { src: (S = e.sponsor) == null ? void 0 : S.logo, alt: "Video paused preview", style: { height: "56px" } }),
80
- /* @__PURE__ */ r(oe, { ref: g, onClick: H, children: /* @__PURE__ */ r(ie, {}) })
81
- ] }),
82
- e.logoMode === 2 && e.type !== 4 && /* @__PURE__ */ r(
83
- "img",
84
- {
85
- src: (C = e.sponsor) == null ? void 0 : C.logo,
86
- alt: "Video paused preview",
87
- style: {
88
- display: "block",
89
- alignSelf: "center",
90
- maxHeight: "72px",
91
- width: "auto"
92
- }
93
- }
94
- ),
95
- ((L = e.banner) == null ? void 0 : L.imageUrl) && /* @__PURE__ */ r(ce, { style: { height: z }, children: /* @__PURE__ */ r(
96
- "img",
97
- {
98
- src: (N = e.banner) == null ? void 0 : N.imageUrl,
99
- alt: "Video paused preview",
100
- style: { width: "100%", height: "100%", objectFit: "cover" }
101
- }
102
- ) }),
103
- ((T = e.banner) == null ? void 0 : T.video) && /* @__PURE__ */ r(se, { children: /* @__PURE__ */ r(le, { ref: v, tabIndex: 0, muted: !1, autoPlay: !1, loop: !0, playsInline: !0, controls: !0, children: /* @__PURE__ */ r("source", { src: e.banner.video.url, type: "video/mp4" }) }) }),
104
- /* @__PURE__ */ r(de, { children: "PAUSED" }),
105
- e.type === 5 && /* @__PURE__ */ l($, { children: [
106
- /* @__PURE__ */ r(ae, { children: (U = e.banner) == null ? void 0 : U.title }),
107
- /* @__PURE__ */ r(ue, { children: (O = e.banner) == null ? void 0 : O.body })
108
- ] }),
109
- /* @__PURE__ */ r(Q, { promotion: e, ref: i })
110
- ] });
111
- };
112
- export {
113
- we as TVSidebar
114
- };
File without changes
File without changes
File without changes