@streamlayer/react 1.21.4 → 1.22.2

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 (168) hide show
  1. package/lib/app/masters.d.ts +2 -5
  2. package/lib/app/pause-ad.d.ts +1 -10
  3. package/lib/app/useStreamLayerApp.d.ts +1 -23
  4. package/lib/cjs/Question.js +1 -0
  5. package/lib/cjs/advertisement.js +40 -40
  6. package/lib/cjs/analytics.js +1 -0
  7. package/lib/cjs/auth.js +1 -1
  8. package/lib/cjs/bet-pack.js +1 -1
  9. package/lib/cjs/gamification-feature.js +1 -1
  10. package/lib/cjs/hooks-B0Qttldg.js +1 -0
  11. package/lib/cjs/index-DSi8Qgfs.js +1 -0
  12. package/lib/cjs/index.js +1 -1
  13. package/lib/cjs/index10.js +1 -0
  14. package/lib/cjs/index11.js +4 -0
  15. package/lib/cjs/index12.js +1 -0
  16. package/lib/cjs/index13.js +1 -0
  17. package/lib/cjs/index14.js +1 -0
  18. package/lib/cjs/index15.js +1 -0
  19. package/lib/cjs/index16.js +5 -0
  20. package/lib/cjs/index2.js +1 -5
  21. package/lib/cjs/index3.js +1 -0
  22. package/lib/cjs/index4.js +5 -0
  23. package/lib/cjs/index5.js +1 -0
  24. package/lib/cjs/index6.js +1 -0
  25. package/lib/cjs/index7.js +5 -0
  26. package/lib/cjs/index8.js +1 -0
  27. package/lib/cjs/index9.js +1 -0
  28. package/lib/cjs/insight.js +1 -1
  29. package/lib/cjs/masters.js +1 -1
  30. package/lib/cjs/masters2.js +6 -6
  31. package/lib/cjs/notification.js +1 -1
  32. package/lib/cjs/pause-ad.js +1 -1
  33. package/lib/cjs/points.js +1 -1
  34. package/lib/cjs/sl-types.js +15 -0
  35. package/lib/cjs/storage.js +1 -0
  36. package/lib/cjs/theme.js +17 -0
  37. package/lib/cjs/useStreamLayerApp.js +1 -1
  38. package/lib/cjs/useStreamLayerApp2.js +9 -9
  39. package/lib/cjs/utils.js +47 -0
  40. package/lib/cjs/vast-client.min.js +1 -0
  41. package/lib/classic/app/masters.d.ts +2 -5
  42. package/lib/classic/app/pause-ad.d.ts +1 -10
  43. package/lib/classic/app/useStreamLayerApp.d.ts +1 -23
  44. package/lib/classic/cjs/Question.js +1 -0
  45. package/lib/classic/cjs/advertisement.js +40 -40
  46. package/lib/classic/cjs/analytics.js +1 -0
  47. package/lib/classic/cjs/auth.js +1 -1
  48. package/lib/classic/cjs/bet-pack.js +4 -4
  49. package/lib/classic/cjs/gamification-feature.js +1 -1
  50. package/lib/classic/cjs/hooks-B0Qttldg.js +1 -0
  51. package/lib/classic/cjs/index-DSi8Qgfs.js +1 -0
  52. package/lib/classic/cjs/index.js +1 -1
  53. package/lib/classic/cjs/index10.js +1 -0
  54. package/lib/classic/cjs/index11.js +1 -0
  55. package/lib/classic/cjs/index12.js +1 -0
  56. package/lib/classic/cjs/index13.js +4 -0
  57. package/lib/classic/cjs/index2.js +5 -0
  58. package/lib/classic/cjs/index3.js +1 -0
  59. package/lib/classic/cjs/index4.js +1 -0
  60. package/lib/classic/cjs/index5.js +1 -0
  61. package/lib/classic/cjs/index6.js +5 -0
  62. package/lib/classic/cjs/index7.js +1 -0
  63. package/lib/classic/cjs/index8.js +1 -0
  64. package/lib/classic/cjs/index9.js +1 -0
  65. package/lib/classic/cjs/insight.js +1 -1
  66. package/lib/classic/cjs/notification.js +1 -1
  67. package/lib/classic/cjs/notification2.js +1 -0
  68. package/lib/classic/cjs/pause-ad.js +1 -1
  69. package/lib/classic/cjs/points.js +1 -1
  70. package/lib/classic/cjs/sl-types.js +15 -0
  71. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  72. package/lib/classic/cjs/useStreamLayerApp2.js +9 -9
  73. package/lib/classic/cjs/utils.js +47 -0
  74. package/lib/classic/cjs/vast-client.min.js +1 -0
  75. package/lib/classic/es/Question.js +392 -0
  76. package/lib/classic/es/advertisement.js +10375 -10374
  77. package/lib/classic/es/analytics.js +28 -0
  78. package/lib/classic/es/auth.js +4 -4
  79. package/lib/classic/es/bet-pack.js +56 -51
  80. package/lib/classic/es/gamification-feature.js +1 -1
  81. package/lib/classic/es/hooks-B0Qttldg.js +98 -0
  82. package/lib/classic/es/index-DSi8Qgfs.js +65 -0
  83. package/lib/classic/es/index.js +14 -15
  84. package/lib/classic/es/index10.js +87 -0
  85. package/lib/classic/es/index11.js +2361 -0
  86. package/lib/classic/es/index12.js +183 -0
  87. package/lib/classic/es/index13.js +835 -0
  88. package/lib/classic/es/index2.js +2621 -0
  89. package/lib/classic/es/index3.js +64 -0
  90. package/lib/classic/es/index4.js +19 -0
  91. package/lib/classic/es/index5.js +285 -0
  92. package/lib/classic/es/{index-l-eyvmpL.js → index6.js} +937 -937
  93. package/lib/classic/es/index7.js +7 -0
  94. package/lib/classic/es/index8.js +11 -0
  95. package/lib/classic/es/index9.js +319 -0
  96. package/lib/classic/es/insight.js +31 -32
  97. package/lib/classic/es/notification.js +7 -1006
  98. package/lib/classic/es/notification2.js +1117 -0
  99. package/lib/classic/es/pause-ad.js +139 -138
  100. package/lib/classic/es/points.js +39 -38
  101. package/lib/classic/es/sl-types.js +258 -0
  102. package/lib/classic/es/useStreamLayerApp.js +1 -2
  103. package/lib/classic/es/useStreamLayerApp2.js +2400 -2283
  104. package/lib/classic/es/utils.js +76 -0
  105. package/lib/{es/vast-client.min-B0NUra1B.js → classic/es/vast-client.min.js} +338 -338
  106. package/lib/classic/index.d.ts +5 -13
  107. package/lib/classic/masters.d.ts +1 -1
  108. package/lib/dist/cjs/index.js +1 -1
  109. package/lib/dist/cjs/masters.js +30 -30
  110. package/lib/dist/es/index.js +2 -2
  111. package/lib/dist/es/masters.js +5813 -6063
  112. package/lib/dist/index.d.ts +1332 -0
  113. package/lib/dist/style.css +1 -1
  114. package/lib/es/Question.js +136 -0
  115. package/lib/es/advertisement.js +10375 -10374
  116. package/lib/es/analytics.js +28 -0
  117. package/lib/es/auth.js +4 -4
  118. package/lib/es/bet-pack.js +7 -6
  119. package/lib/es/gamification-feature.js +1 -1
  120. package/lib/es/hooks-B0Qttldg.js +98 -0
  121. package/lib/es/index-DSi8Qgfs.js +65 -0
  122. package/lib/es/index.js +13 -14
  123. package/lib/es/index10.js +267 -0
  124. package/lib/es/index11.js +835 -0
  125. package/lib/es/index12.js +183 -0
  126. package/lib/es/index13.js +319 -0
  127. package/lib/es/index14.js +87 -0
  128. package/lib/es/index15.js +2355 -0
  129. package/lib/es/index16.js +1254 -0
  130. package/lib/es/index2.js +1349 -3363
  131. package/lib/es/index3.js +64 -0
  132. package/lib/es/index4.js +3418 -0
  133. package/lib/es/index5.js +19 -0
  134. package/lib/es/index6.js +285 -0
  135. package/lib/es/{index-l-eyvmpL.js → index7.js} +937 -937
  136. package/lib/es/index8.js +7 -0
  137. package/lib/es/index9.js +11 -0
  138. package/lib/es/insight.js +31 -32
  139. package/lib/es/masters.js +6 -5
  140. package/lib/es/masters2.js +189 -176
  141. package/lib/es/notification.js +124 -119
  142. package/lib/es/pause-ad.js +140 -139
  143. package/lib/es/points.js +40 -38
  144. package/lib/es/sl-types.js +277 -0
  145. package/lib/es/storage.js +113 -0
  146. package/lib/es/theme.js +47 -0
  147. package/lib/es/useStreamLayerApp.js +1 -2
  148. package/lib/es/useStreamLayerApp2.js +2399 -2282
  149. package/lib/es/utils.js +76 -0
  150. package/lib/{classic/es/vast-client.min-B0NUra1B.js → es/vast-client.min.js} +338 -338
  151. package/lib/index.d.ts +5 -13
  152. package/lib/masters.d.ts +1 -1
  153. package/lib/style.css +1 -1
  154. package/package.json +13 -48
  155. package/lib/app/event.d.ts +0 -6
  156. package/lib/app/provider.d.ts +0 -49
  157. package/lib/cjs/index-l-eyvmpL.js +0 -5
  158. package/lib/cjs/provider.js +0 -84
  159. package/lib/cjs/vast-client.min-B0NUra1B.js +0 -1
  160. package/lib/classic/app/event.d.ts +0 -6
  161. package/lib/classic/app/provider.d.ts +0 -49
  162. package/lib/classic/cjs/index-l-eyvmpL.js +0 -5
  163. package/lib/classic/cjs/provider.js +0 -68
  164. package/lib/classic/cjs/vast-client.min-B0NUra1B.js +0 -1
  165. package/lib/classic/es/provider.js +0 -7617
  166. package/lib/dist/cjs/gamification-feature2.js +0 -1
  167. package/lib/dist/es/gamification-feature2.js +0 -285
  168. package/lib/es/provider.js +0 -7693
@@ -1,10 +1,7 @@
1
1
  import { Component, ErrorInfo } from 'react';
2
- import { StreamLayerProps } from './provider';
3
2
  import '@streamlayer/react-ui/style.css';
4
- export { useStreamLayer } from './app';
5
- export declare const MastersStreamLayerProvider: React.FC<Omit<StreamLayerProps, 'autoEnable' | 'friendsTab' | 'hideFriends'> & {
6
- children: React.ReactNode;
7
- }>;
3
+ export { useStreamLayer } from '@streamlayer/react-ui/core/hooks';
4
+ export { MastersStreamLayerProvider } from '@streamlayer/react-ui/masters';
8
5
  export declare class MastersStreamLayerSDKReact extends Component<{
9
6
  betPack?: boolean;
10
7
  useContainer?: boolean;
@@ -1,14 +1,5 @@
1
1
  import { Component } from 'react';
2
- import { VideoPlayerCallback } from './provider';
3
- import '@streamlayer/sdk-web-api';
4
- import '@streamlayer/sdk-web-core';
5
- import '@streamlayer/sdk-web-types';
6
- import '@streamlayer/sdk-web-logger';
7
- import '@streamlayer/sdk-web-storage';
8
- import '@streamlayer/sdk-web-features';
9
- import '@streamlayer/sdk-web-interfaces';
10
- import '@streamlayer/sdk-web-notifications';
11
- import '@streamlayer/feature-gamification';
2
+ import { VideoPlayerCallback } from '@streamlayer/react-ui/core/provider';
12
3
  export type StreamLayerPauseAdProps = {
13
4
  children?: React.ReactNode;
14
5
  showPauseAd?: boolean;
@@ -1,23 +1 @@
1
- import { StreamLayerSDK, StreamLayerPlugin } from '@streamlayer/sdk-web-interfaces';
2
- import { DeepLinkCallback, VideoPlayerCallback, OnContentActivateCallback } from '@streamlayer/sdk-web-core';
3
- declare global {
4
- interface Window {
5
- sl: unknown;
6
- }
7
- }
8
- export declare const useStreamLayerApp: ({ sdkKey, plugins, production, autoEnable, onDeepLinkHandled, videoPlayerController, onContentActivate, hideFriends, skipOnboarding, withAdNotification, withAd, friendsTab, betPack, webOS, }: {
9
- sdkKey: string;
10
- plugins?: Set<StreamLayerPlugin>;
11
- production?: boolean;
12
- autoEnable?: boolean;
13
- onDeepLinkHandled?: DeepLinkCallback;
14
- videoPlayerController?: VideoPlayerCallback;
15
- onContentActivate?: OnContentActivateCallback;
16
- skipOnboarding?: boolean;
17
- withAdNotification?: boolean;
18
- hideFriends?: boolean;
19
- withAd?: boolean;
20
- betPack?: boolean;
21
- webOS?: boolean;
22
- friendsTab: "enabled" | "disabled" | "activatedGame";
23
- }) => StreamLayerSDK | null;
1
+ export { useStreamLayerApp } from '@streamlayer/react-ui/useStreamLayerApp';
@@ -0,0 +1 @@
1
+ "use strict";const o=require("react/jsx-runtime"),a=require("./sl-types.js"),u=require("react"),v=require("./index10.js"),E=require("./index11.js"),Y=require("./utils.js"),x=require("./useStreamLayerApp2.js"),$=u.createContext({sdk:null,topNavigation:!1}),B=()=>u.useContext($),G=a.styled_default("div")({name:"QuestionAdvertisementContainer",class:"qwludgs",propsAsIs:!1}),J=a.styled_default("div")({name:"QuestionAdvertisementText",class:"qvce6pv",propsAsIs:!1}),K=a.styled_default("div")({name:"QuestionAdvertisementImage",class:"qsid7hx",propsAsIs:!1}),M=({sponsorLogo:e,id:l,hasBanner:r,setAdShowed:n})=>{const i=u.useRef();return u.useEffect(()=>(i.current=setTimeout(()=>{n(!0)},5e3),()=>{clearTimeout(i.current)}),[n,l,r]),o.jsxs(G,{children:[o.jsx(J,{children:"PRESENTED BY"}),o.jsx(K,{children:o.jsx("img",{src:e,alt:"ad-sponsor-logo"})})]})},V=a.styled_default("div")({name:"QuestionContainer",class:"q14ckf9e",propsAsIs:!1}),W=({openedQuestion:e,muted:l,webos:r})=>{var n,i;const{sdk:t}=B();return((n=e==null?void 0:e.attributes)==null?void 0:n.attributes.case)==="insight"?o.jsx(v.x,{...e.attributes.attributes.value,muted:l,controlVideo:t==null?void 0:t.controlVideoPlayer,webos:r}):((i=e==null?void 0:e.attributes)==null?void 0:i.attributes.case)==="tweet"?o.jsx(v.a,{...e.attributes.attributes.value,muted:l,controlVideo:t==null?void 0:t.controlVideoPlayer}):null},X=({extendedQuestion:e,vote:l,close:r,webos:n})=>{const{loading:i,data:t}=e;return t?o.jsx(E.ee,{webos:n,vote:l,close:r,openedQuestion:t,isLoading:!!i}):o.jsx(E.te,{})},Z=({gamification:e,sdk:l,muted:r,skipAutoClose:n,hideSponsor:i,className:t,hideHeader:D,webos:m})=>{var b,g,h,A,j,y,Q,q,w,T,S,f,U,I,N,k;const d=a.useStore(e.openedQuestion.$store),s=a.useStore(e.openedQuestion.$extendedStore),[_,P]=u.useState(!1),H=a.useStore(l.options),C=((b=d==null?void 0:d.attributes)==null?void 0:b.type)===x.QuestionType.FACTOID,c=(g=d==null?void 0:d.attributes)==null?void 0:g.backgroundImage,p=(h=s.data)==null?void 0:h.backgroundImage,O=C?c==null?void 0:c.landscapeUrl:p==null?void 0:p.landscapeUrl,z=C?c==null?void 0:c.portraitUrl:p==null?void 0:p.portraitUrl,L=Y.y({containerId:H.containerId,landscapeUrl:O,portraitUrl:z});if(!d)return null;const R=d.type,F=((j=(A=s.data)==null?void 0:A.options)==null?void 0:j.options.case)==="factoid"?s.data.options.options.value.closeTimer:void 0;return s.data&&s.data.adUnit===x.AdUnit.STANDART&&!_?o.jsxs(V,{className:t,children:[L,o.jsx(M,{id:s.data.id,hasBanner:!!((Q=(y=s.data.promotion)==null?void 0:y.banner)!=null&&Q.imageUrl),setAdShowed:P,sponsorLogo:((w=(q=s.data.promotion)==null?void 0:q.sponsor)==null?void 0:w.logo)||((T=s.data.sponsorship)==null?void 0:T.logo)||""})]}):o.jsxs(V,{className:t,children:[L,!D&&o.jsx(v.y,{closeTimer:n?void 0:F,close:e.closeQuestion,type:((S=d.attributes)==null?void 0:S.type)||x.QuestionType.UNSET,webos:m}),R==="question"&&o.jsx(X,{webos:m,vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:s}),R!=="question"&&o.jsx(W,{muted:r,openedQuestion:d,webos:m}),!i&&o.jsx(v.d,{sponsorLogo:((I=(U=(f=s.data)==null?void 0:f.promotion)==null?void 0:U.sponsor)==null?void 0:I.logo)||((k=(N=s.data)==null?void 0:N.sponsorship)==null?void 0:k.logo)})]})};exports.e=$;exports.ht=Z;exports.p=B;