@streamlayer/react 1.23.0 → 1.23.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 (167) hide show
  1. package/lib/app/pause-ad.d.ts +2 -4
  2. package/lib/app/polymarket.d.ts +7 -0
  3. package/lib/cjs/Question.js +1 -1
  4. package/lib/cjs/advertisement.js +28 -223
  5. package/lib/cjs/analytics.js +1 -1
  6. package/lib/cjs/auth.js +1 -1
  7. package/lib/cjs/bet-pack.js +1 -1
  8. package/lib/cjs/feature.js +1 -0
  9. package/lib/cjs/gamification-feature.js +1 -1
  10. package/lib/cjs/gamification-feature2.js +1 -1
  11. package/lib/cjs/hooks-WfHlJH12.js +1 -0
  12. package/lib/cjs/index-eShKGO10.js +1 -5
  13. package/lib/cjs/index.js +1 -1
  14. package/lib/cjs/index10.js +1 -4
  15. package/lib/cjs/index11.js +3 -1
  16. package/lib/cjs/index12.js +1 -1
  17. package/lib/cjs/index13.js +3 -1
  18. package/lib/cjs/index14.js +1 -1
  19. package/lib/cjs/index15.js +1 -5
  20. package/lib/cjs/index16.js +3 -0
  21. package/lib/cjs/index2.js +1 -1
  22. package/lib/cjs/index3.js +1 -1
  23. package/lib/cjs/index4.js +3 -5
  24. package/lib/cjs/index5.js +1 -1
  25. package/lib/cjs/index6.js +1 -1
  26. package/lib/cjs/index7.js +1 -1
  27. package/lib/cjs/index8.js +1 -1
  28. package/lib/cjs/index9.js +1 -1
  29. package/lib/cjs/insight.js +1 -1
  30. package/lib/cjs/masters.js +1 -1
  31. package/lib/cjs/masters2.js +1 -13
  32. package/lib/cjs/notification.js +1 -1
  33. package/lib/cjs/pause-ad.js +1 -1
  34. package/lib/cjs/points.js +1 -1
  35. package/lib/cjs/polymarket.js +9 -0
  36. package/lib/cjs/sl-types.js +1 -15
  37. package/lib/cjs/storage.js +1 -1
  38. package/lib/cjs/style.css +1 -0
  39. package/lib/cjs/theme.js +1 -17
  40. package/lib/cjs/useStreamLayerApp.js +1 -1
  41. package/lib/cjs/useStreamLayerApp2.js +3 -17
  42. package/lib/cjs/utils.js +1 -47
  43. package/lib/classic/app/pause-ad.d.ts +2 -4
  44. package/lib/classic/app/polymarket.d.ts +7 -0
  45. package/lib/classic/cjs/Question.js +1 -1
  46. package/lib/classic/cjs/advertisement.js +28 -223
  47. package/lib/classic/cjs/analytics.js +1 -1
  48. package/lib/classic/cjs/auth.js +1 -1
  49. package/lib/classic/cjs/bet-pack.js +3 -5
  50. package/lib/classic/cjs/feature.js +1 -0
  51. package/lib/classic/cjs/gamification-feature.js +1 -1
  52. package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
  53. package/lib/classic/cjs/index-eShKGO10.js +1 -5
  54. package/lib/classic/cjs/index.js +1 -1
  55. package/lib/classic/cjs/index10.js +1 -1
  56. package/lib/classic/cjs/index11.js +1 -1
  57. package/lib/classic/cjs/index12.js +1 -4
  58. package/lib/classic/cjs/index13.js +3 -0
  59. package/lib/classic/cjs/index2.js +3 -5
  60. package/lib/classic/cjs/index3.js +1 -1
  61. package/lib/classic/cjs/index4.js +1 -1
  62. package/lib/classic/cjs/index5.js +1 -1
  63. package/lib/classic/cjs/index6.js +1 -1
  64. package/lib/classic/cjs/index7.js +1 -1
  65. package/lib/classic/cjs/index8.js +1 -1
  66. package/lib/classic/cjs/index9.js +3 -1
  67. package/lib/classic/cjs/insight.js +1 -1
  68. package/lib/classic/cjs/notification.js +1 -1
  69. package/lib/classic/cjs/notification2.js +1 -1
  70. package/lib/classic/cjs/pause-ad.js +1 -1
  71. package/lib/classic/cjs/points.js +1 -1
  72. package/lib/classic/cjs/polymarket.js +9 -0
  73. package/lib/classic/cjs/sl-types.js +1 -15
  74. package/lib/classic/cjs/style.css +1 -0
  75. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  76. package/lib/classic/cjs/useStreamLayerApp2.js +3 -17
  77. package/lib/classic/cjs/utils.js +1 -47
  78. package/lib/classic/es/Question.js +277 -264
  79. package/lib/classic/es/advertisement.js +34990 -18881
  80. package/lib/classic/es/analytics.js +58 -56
  81. package/lib/classic/es/auth.js +14 -8
  82. package/lib/classic/es/bet-pack.js +2448 -2418
  83. package/lib/classic/es/feature.js +108 -0
  84. package/lib/classic/es/gamification-feature.js +2 -2
  85. package/lib/classic/es/hooks-WfHlJH12.js +98 -0
  86. package/lib/classic/es/index-eShKGO10.js +948 -948
  87. package/lib/classic/es/index.js +13 -13
  88. package/lib/classic/es/index10.js +83 -2295
  89. package/lib/classic/es/index11.js +3095 -179
  90. package/lib/classic/es/index12.js +174 -821
  91. package/lib/classic/es/index13.js +850 -0
  92. package/lib/classic/es/index2.js +2099 -1763
  93. package/lib/classic/es/index3.js +11 -11
  94. package/lib/classic/es/index4.js +127 -127
  95. package/lib/classic/es/index5.js +3 -5
  96. package/lib/classic/es/index6.js +10 -11
  97. package/lib/classic/es/index7.js +6 -62
  98. package/lib/classic/es/index8.js +9 -316
  99. package/lib/classic/es/index9.js +316 -82
  100. package/lib/classic/es/insight.js +58 -53
  101. package/lib/classic/es/notification.js +5 -5
  102. package/lib/classic/es/notification2.js +765 -722
  103. package/lib/classic/es/pause-ad.js +190 -167
  104. package/lib/classic/es/points.js +55 -47
  105. package/lib/classic/es/polymarket.js +6848 -0
  106. package/lib/classic/es/sl-types.js +193 -125
  107. package/lib/classic/es/useStreamLayerApp.js +2 -2
  108. package/lib/classic/es/useStreamLayerApp2.js +9727 -7592
  109. package/lib/classic/es/utils.js +28 -28
  110. package/lib/classic/index.d.ts +1 -0
  111. package/lib/classic/style.css +1 -0
  112. package/lib/dist/cjs/gamification-feature.js +1 -1
  113. package/lib/dist/cjs/index-eShKGO10.js +1 -5
  114. package/lib/dist/cjs/index.js +1 -1
  115. package/lib/dist/cjs/masters.js +3 -77
  116. package/lib/dist/es/gamification-feature.js +2 -2
  117. package/lib/dist/es/index-eShKGO10.js +948 -948
  118. package/lib/dist/es/index.js +7 -8
  119. package/lib/dist/es/masters.js +18212 -14741
  120. package/lib/dist/index.d.ts +29 -8
  121. package/lib/dist/style.css +1 -1
  122. package/lib/es/Question.js +108 -106
  123. package/lib/es/advertisement.js +34990 -18881
  124. package/lib/es/analytics.js +58 -56
  125. package/lib/es/auth.js +14 -8
  126. package/lib/es/bet-pack.js +29 -17
  127. package/lib/es/feature.js +108 -0
  128. package/lib/es/gamification-feature.js +2 -2
  129. package/lib/es/gamification-feature2.js +2 -2
  130. package/lib/es/hooks-WfHlJH12.js +98 -0
  131. package/lib/es/index-eShKGO10.js +948 -948
  132. package/lib/es/index.js +14 -13
  133. package/lib/es/index10.js +258 -816
  134. package/lib/es/index11.js +837 -170
  135. package/lib/es/index12.js +181 -312
  136. package/lib/es/index13.js +316 -82
  137. package/lib/es/index14.js +83 -2350
  138. package/lib/es/index15.js +3069 -1224
  139. package/lib/es/index16.js +1453 -0
  140. package/lib/es/index2.js +1118 -984
  141. package/lib/es/index3.js +3 -62
  142. package/lib/es/index4.js +2424 -2407
  143. package/lib/es/index5.js +11 -11
  144. package/lib/es/index6.js +127 -127
  145. package/lib/es/index7.js +10 -7
  146. package/lib/es/index8.js +5 -9
  147. package/lib/es/index9.js +10 -265
  148. package/lib/es/insight.js +58 -53
  149. package/lib/es/masters.js +6 -5
  150. package/lib/es/masters2.js +696 -558
  151. package/lib/es/notification.js +697 -655
  152. package/lib/es/pause-ad.js +190 -167
  153. package/lib/es/points.js +56 -48
  154. package/lib/es/polymarket.js +6848 -0
  155. package/lib/es/sl-types.js +200 -132
  156. package/lib/es/storage.js +75 -74
  157. package/lib/es/theme.js +177 -31
  158. package/lib/es/useStreamLayerApp.js +2 -2
  159. package/lib/es/useStreamLayerApp2.js +9727 -7592
  160. package/lib/es/utils.js +28 -28
  161. package/lib/index.d.ts +1 -0
  162. package/lib/style.css +1 -1
  163. package/package.json +33 -20
  164. package/lib/cjs/hooks-B0Qttldg.js +0 -1
  165. package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
  166. package/lib/classic/es/hooks-B0Qttldg.js +0 -98
  167. package/lib/es/hooks-B0Qttldg.js +0 -98
@@ -1,3 +1,4 @@
1
+ import { StreamLayerSDKTvOptions } from '@streamlayer/react-ui/webos';
1
2
  import { Component } from 'react';
2
3
  import { VideoPlayerCallback } from '@streamlayer/react-ui/core/provider';
3
4
  export type StreamLayerPauseAdProps = {
@@ -12,10 +13,7 @@ export type StreamLayerPauseAdProps = {
12
13
  onRenderPauseAd?: (params: {
13
14
  rendered: boolean;
14
15
  }) => void;
15
- options?: {
16
- showPauseButton?: boolean;
17
- pauseAdDelay?: number;
18
- };
16
+ options?: StreamLayerSDKTvOptions;
19
17
  };
20
18
  export declare class StreamLayerPauseAd extends Component<StreamLayerPauseAdProps, {
21
19
  hasError: boolean;
@@ -0,0 +1,7 @@
1
+ import '@streamlayer/sdk-web-core/ui';
2
+ export declare const StreamLayerSDKPolymarketButton: React.FC<{
3
+ theme?: string;
4
+ }>;
5
+ export declare const StreamLayerSDKPolymarket: React.FC<{
6
+ theme?: string;
7
+ }>;
@@ -1 +1 @@
1
- "use strict";const o=require("react/jsx-runtime"),a=require("./sl-types.js"),u=require("react"),v=require("./index9.js"),E=require("./index10.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.u,{...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;
1
+ "use strict";require("core-js/modules/es.symbol.js"),require("core-js/modules/es.symbol.description.js"),require("core-js/modules/es.symbol.iterator.js"),require("core-js/modules/es.symbol.to-primitive.js"),require("core-js/modules/es.array.filter.js"),require("core-js/modules/es.array.from.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.date.to-primitive.js"),require("core-js/modules/es.number.constructor.js"),require("core-js/modules/es.object.define-properties.js"),require("core-js/modules/es.object.define-property.js"),require("core-js/modules/es.object.get-own-property-descriptor.js"),require("core-js/modules/es.object.get-own-property-descriptors.js"),require("core-js/modules/es.object.keys.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/es.regexp.exec.js"),require("core-js/modules/es.regexp.to-string.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/web.dom-collections.iterator.js");function e(r){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(r)}function r(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,s,n,i,u=[],l=!0,a=!1;try{if(n=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;l=!1}else for(;!(l=(o=n.call(t)).done)&&(u.push(o.value),u.length!==r);l=!0);}catch(d){a=!0,s=d}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(a)throw s}}return u}}(e,r)||function(e,r){if(e){if("string"==typeof e)return t(e,r);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=Array(r);t<r;t++)o[t]=e[t];return o}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?o(Object(t),!0).forEach(function(r){n(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function n(r,t,o){return(t=function(r){var t=function(r,t){if("object"!=e(r)||!r)return r;var o=r[Symbol.toPrimitive];if(void 0!==o){var s=o.call(r,t||"default");if("object"!=e(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(r)}(r,"string");return"symbol"==e(t)?t:t+""}(t))in r?Object.defineProperty(r,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[t]=o,r}var i=require("react/jsx-runtime"),u=require("./sl-types.js"),l=require("react"),a=require("./index10.js"),d=require("./index11.js"),c=require("./utils.js"),p=require("./useStreamLayerApp2.js"),m=l.createContext({sdk:null,topNavigation:!1}),j=function(){return l.useContext(m)},f=u.styled_default("div")({name:"QuestionAdvertisementContainer",class:"qwludgs",propsAsIs:!1}),b=u.styled_default("div")({name:"QuestionAdvertisementText",class:"qvce6pv",propsAsIs:!1}),v=u.styled_default("div")({name:"QuestionAdvertisementImage",class:"qsid7hx",propsAsIs:!1}),y=function(e){var r=e.sponsorLogo,t=e.id,o=e.hasBanner,s=e.setAdShowed,n=l.useRef();return l.useEffect(function(){return n.current=setTimeout(function(){s(!0)},5e3),function(){clearTimeout(n.current)}},[s,t,o]),i.jsxs(f,{children:[i.jsx(b,{children:"PRESENTED BY"}),i.jsx(v,{children:i.jsx("img",{src:r,alt:"ad-sponsor-logo"})})]})},g=u.styled_default("div")({name:"QuestionContainer",class:"q14ckf9e",propsAsIs:!1}),q=function(e){var r,t,o=e.openedQuestion,n=e.muted,u=e.webos,l=j().sdk;return"insight"===(null==(r=null==o?void 0:o.attributes)?void 0:r.attributes.case)?i.jsx(a.x,s(s({},o.attributes.attributes.value),{},{muted:n,controlVideo:null==l?void 0:l.controlVideoPlayer,webos:u})):"tweet"===(null==(t=null==o?void 0:o.attributes)?void 0:t.attributes.case)?i.jsx(a.a,s(s({},o.attributes.attributes.value),{},{muted:n,controlVideo:null==l?void 0:l.controlVideoPlayer})):null},x=function(e){var r=e.extendedQuestion,t=e.vote,o=e.close,s=e.webos,n=r.loading,u=r.data;return u?i.jsx(d.ee,{webos:s,vote:t,close:o,openedQuestion:u,isLoading:!!n}):i.jsx(d.te,{})};exports.e=m,exports.ht=function(e){var t,o,s,n,d,m,j,f,b,v,h,w,S,A,O,Q,P=e.gamification,T=e.sdk,I=e.muted,U=e.skipAutoClose,k=e.hideSponsor,E=e.className,N=e.hideHeader,C=e.webos,D=u.useStore(P.openedQuestion.$store),L=u.useStore(P.openedQuestion.$extendedStore),V=r(l.useState(!1),2),_=V[0],B=V[1],R=u.useStore(T.options),$=(null==(t=null==D?void 0:D.attributes)?void 0:t.type)===p.QuestionType.FACTOID,F=null==(o=null==D?void 0:D.attributes)?void 0:o.backgroundImage,H=null==(s=L.data)?void 0:s.backgroundImage,M=$?null==F?void 0:F.landscapeUrl:null==H?void 0:H.landscapeUrl,Y=$?null==F?void 0:F.portraitUrl:null==H?void 0:H.portraitUrl,z=c.y({containerId:R.containerId,landscapeUrl:M,portraitUrl:Y});if(!D)return null;var G=D.type,J="factoid"===(null==(d=null==(n=L.data)?void 0:n.options)?void 0:d.options.case)?L.data.options.options.value.closeTimer:void 0;return L.data&&L.data.adUnit===p.AdUnit.STANDART&&!_?i.jsxs(g,{className:E,children:[z,i.jsx(y,{id:L.data.id,hasBanner:!(null==(j=null==(m=L.data.promotion)?void 0:m.banner)||!j.imageUrl),setAdShowed:B,sponsorLogo:(null==(b=null==(f=L.data.promotion)?void 0:f.sponsor)?void 0:b.logo)||(null==(v=L.data.sponsorship)?void 0:v.logo)||""})]}):i.jsxs(g,{className:E,children:[z,!N&&i.jsx(a.y,{closeTimer:U?void 0:J,close:P.closeQuestion,type:(null==(h=D.attributes)?void 0:h.type)||p.QuestionType.UNSET,webos:C}),"question"===G&&i.jsx(x,{webos:C,vote:P.submitAnswer,close:P.closeQuestion,extendedQuestion:L}),"question"!==G&&i.jsx(q,{muted:I,openedQuestion:D,webos:C}),!k&&i.jsx(a.d,{sponsorLogo:(null==(A=null==(S=null==(w=L.data)?void 0:w.promotion)?void 0:S.sponsor)?void 0:A.logo)||(null==(Q=null==(O=L.data)?void 0:O.sponsorship)?void 0:Q.logo)})]})},exports.p=j;