@streamlayer/react 1.24.5 → 1.24.6

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 (103) hide show
  1. package/lib/cjs/Question.js +1 -1
  2. package/lib/cjs/advertisement.js +26 -26
  3. package/lib/cjs/bet-pack.js +1 -1
  4. package/lib/cjs/feature.js +1 -1
  5. package/lib/cjs/{index-DvqmgCor.js → index-CfSdnrfA.js} +1 -1
  6. package/lib/cjs/index10.js +1 -1
  7. package/lib/cjs/index11.js +1 -1
  8. package/lib/cjs/index12.js +1 -1
  9. package/lib/cjs/index13.js +4 -1
  10. package/lib/cjs/index14.js +1 -4
  11. package/lib/cjs/index15.js +1 -1
  12. package/lib/cjs/index16.js +2 -2
  13. package/lib/cjs/index2.js +1 -1
  14. package/lib/cjs/index4.js +3 -3
  15. package/lib/cjs/index6.js +1 -1
  16. package/lib/cjs/index7.js +1 -1
  17. package/lib/cjs/index9.js +2 -2
  18. package/lib/cjs/insight.js +1 -1
  19. package/lib/cjs/masters2.js +3 -3
  20. package/lib/cjs/notification.js +1 -1
  21. package/lib/cjs/pause-ad.js +1 -1
  22. package/lib/cjs/points.js +1 -1
  23. package/lib/cjs/polymarket.js +1 -1
  24. package/lib/cjs/storage.js +1 -1
  25. package/lib/cjs/useStreamLayerApp2.js +13 -13
  26. package/lib/classic/cjs/Question.js +1 -1
  27. package/lib/classic/cjs/advertisement.js +26 -26
  28. package/lib/classic/cjs/bet-pack.js +3 -3
  29. package/lib/classic/cjs/feature.js +1 -1
  30. package/lib/classic/cjs/{index-DvqmgCor.js → index-CfSdnrfA.js} +1 -1
  31. package/lib/classic/cjs/index10.js +1 -1
  32. package/lib/classic/cjs/index11.js +1 -1
  33. package/lib/classic/cjs/index12.js +1 -1
  34. package/lib/classic/cjs/index13.js +1 -1
  35. package/lib/classic/cjs/index2.js +2 -2
  36. package/lib/classic/cjs/index5.js +1 -1
  37. package/lib/classic/cjs/index7.js +2 -2
  38. package/lib/classic/cjs/index8.js +1 -1
  39. package/lib/classic/cjs/index9.js +1 -1
  40. package/lib/classic/cjs/insight.js +1 -1
  41. package/lib/classic/cjs/notification2.js +1 -1
  42. package/lib/classic/cjs/pause-ad.js +1 -1
  43. package/lib/classic/cjs/points.js +1 -1
  44. package/lib/classic/cjs/polymarket.js +1 -1
  45. package/lib/classic/cjs/useStreamLayerApp2.js +13 -13
  46. package/lib/classic/es/Question.js +313 -198
  47. package/lib/classic/es/advertisement.js +1988 -1955
  48. package/lib/classic/es/bet-pack.js +12 -13
  49. package/lib/classic/es/feature.js +188 -37
  50. package/lib/{es/index-DvqmgCor.js → classic/es/index-CfSdnrfA.js} +1 -1
  51. package/lib/classic/es/index10.js +309 -2580
  52. package/lib/classic/es/index11.js +2580 -305
  53. package/lib/classic/es/index12.js +12 -12
  54. package/lib/classic/es/index13.js +2 -2
  55. package/lib/classic/es/index2.js +129 -121
  56. package/lib/classic/es/index5.js +0 -1
  57. package/lib/classic/es/index7.js +2 -2
  58. package/lib/classic/es/index8.js +1 -1
  59. package/lib/classic/es/index9.js +1 -1
  60. package/lib/classic/es/insight.js +1 -1
  61. package/lib/classic/es/notification2.js +137 -138
  62. package/lib/classic/es/pause-ad.js +124 -149
  63. package/lib/classic/es/points.js +3 -4
  64. package/lib/classic/es/polymarket.js +1 -1
  65. package/lib/classic/es/useStreamLayerApp2.js +2931 -2877
  66. package/lib/classic/source.css +1 -1
  67. package/lib/dist/cjs/{index-DvqmgCor.js → index-CfSdnrfA.js} +1 -1
  68. package/lib/dist/cjs/masters.js +31 -31
  69. package/lib/dist/es/{index-DvqmgCor.js → index-CfSdnrfA.js} +1 -1
  70. package/lib/dist/es/masters.js +7957 -7774
  71. package/lib/dist/index.d.ts +2 -0
  72. package/lib/es/Question.js +66 -65
  73. package/lib/es/advertisement.js +1988 -1955
  74. package/lib/es/bet-pack.js +1 -1
  75. package/lib/es/feature.js +188 -37
  76. package/lib/{classic/es/index-DvqmgCor.js → es/index-CfSdnrfA.js} +1 -1
  77. package/lib/es/index10.js +1 -1
  78. package/lib/es/index11.js +12 -12
  79. package/lib/es/index12.js +366 -2579
  80. package/lib/es/index13.js +789 -234
  81. package/lib/es/index14.js +293 -792
  82. package/lib/es/index15.js +2580 -305
  83. package/lib/es/index16.js +41 -42
  84. package/lib/es/index2.js +279 -271
  85. package/lib/es/index4.js +15 -16
  86. package/lib/es/index6.js +0 -1
  87. package/lib/es/index7.js +1 -1
  88. package/lib/es/index9.js +2 -2
  89. package/lib/es/insight.js +1 -1
  90. package/lib/es/masters2.js +194 -183
  91. package/lib/es/notification.js +22 -23
  92. package/lib/es/pause-ad.js +124 -149
  93. package/lib/es/points.js +20 -21
  94. package/lib/es/polymarket.js +1 -1
  95. package/lib/es/storage.js +1 -1
  96. package/lib/es/useStreamLayerApp2.js +2931 -2877
  97. package/lib/source.css +1 -1
  98. package/lib/style.css +1 -1
  99. package/package.json +72 -53
  100. package/lib/cjs/sl-types.js +0 -1
  101. package/lib/classic/cjs/sl-types.js +0 -1
  102. package/lib/classic/es/sl-types.js +0 -156
  103. package/lib/es/sl-types.js +0 -156
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),r=require("./sl-types.js"),l=require("react"),c=require("./index13.js"),A=require("./index14.js"),k=require("./utils.js"),m=require("./useStreamLayerApp2.js"),y=l.createContext({sdk:null,topNavigation:!1}),Q=()=>l.useContext(y),N=r.styled_default("div")({name:"QuestionAdvertisementContainer",class:"qwludgs",propsAsIs:!1}),C=r.styled_default("div")({name:"QuestionAdvertisementText",class:"qvce6pv",propsAsIs:!1}),_=r.styled_default("div")({name:"QuestionAdvertisementImage",class:"qsid7hx",propsAsIs:!1}),E=({sponsorLogo:s,id:n,hasBanner:a,setAdShowed:o})=>{const i=l.useRef();return l.useEffect(()=>(i.current=setTimeout(()=>{o(!0)},5e3),()=>{clearTimeout(i.current)}),[o,n,a]),e.jsxs(N,{children:[e.jsx(C,{children:"PRESENTED BY"}),e.jsx(_,{children:e.jsx("img",{src:s,alt:"ad-sponsor-logo"})})]})},j=r.styled_default("div")({name:"QuestionContainer",class:"q14ckf9e",propsAsIs:!1}),L=({openedQuestion:s,muted:n,webos:a})=>{const{sdk:o}=Q();return s?.attributes?.attributes.case==="insight"?e.jsx(c.f,{...s.attributes.attributes.value,muted:n,controlVideo:o?.controlVideoPlayer,webos:a}):s?.attributes?.attributes.case==="tweet"?e.jsx(c.a,{...s.attributes.attributes.value,muted:n,controlVideo:o?.controlVideoPlayer}):null},R=({extendedQuestion:s,vote:n,close:a,webos:o})=>{const{loading:i,data:u}=s;return u?e.jsx(A.Qe,{webos:o,vote:n,close:a,openedQuestion:u,isLoading:!!i}):e.jsx(A.Ze,{})},$=({gamification:s,sdk:n,muted:a,skipAutoClose:o,hideSponsor:i,className:u,hideHeader:h,webos:p})=>{const d=r.useStore(s.openedQuestion.$store),t=r.useStore(s.openedQuestion.$extendedStore),[T,q]=l.useState(!1),w=r.useStore(n.options),x=d?.attributes?.type===m.QuestionType.FACTOID,b=d?.attributes?.backgroundImage,g=t.data?.backgroundImage,S=x?b?.landscapeUrl:g?.landscapeUrl,I=x?b?.portraitUrl:g?.portraitUrl,f=k.y({containerId:w.containerId,landscapeUrl:S,portraitUrl:I});if(!d)return null;const v=d.type,U=t.data?.options?.options.case==="factoid"?t.data.options.options.value.closeTimer:void 0;return t.data&&t.data.adUnit===m.AdUnit.STANDART&&!T?e.jsxs(j,{className:u,children:[f,e.jsx(E,{id:t.data.id,hasBanner:!!t.data.promotion?.banner?.imageUrl,setAdShowed:q,sponsorLogo:t.data.promotion?.sponsor?.logo||t.data.sponsorship?.logo||""})]}):e.jsxs(j,{className:u,children:[f,!h&&e.jsx(c.O,{closeTimer:o?void 0:U,close:s.closeQuestion,type:d.attributes?.type||m.QuestionType.UNSET,webos:p}),v==="question"&&e.jsx(R,{webos:p,vote:s.submitAnswer,close:s.closeQuestion,extendedQuestion:t}),v!=="question"&&e.jsx(L,{muted:a,openedQuestion:d,webos:p}),!i&&e.jsx(c.d,{sponsorLogo:t.data?.promotion?.sponsor?.logo||t.data?.sponsorship?.logo})]})};exports._=$;exports.e=y;exports.p=Q;
1
+ "use strict";const s=require("react/jsx-runtime"),a=require("./feature.js"),u=require("react"),p=require("./index12.js"),A=require("./index13.js"),E=require("./utils.js"),c=require("./useStreamLayerApp2.js"),j=u.createContext({sdk:null,topNavigation:!1}),y=()=>u.useContext(j),N=a.styled_default("div")({name:"QuestionAdvertisementContainer",class:"qwludgs",propsAsIs:!1}),k=a.styled_default("div")({name:"QuestionAdvertisementText",class:"qvce6pv",propsAsIs:!1}),C=a.styled_default("div")({name:"QuestionAdvertisementImage",class:"qsid7hx",propsAsIs:!1}),R=({sponsorLogo:e,id:n,setAdShowed:i})=>{const o=u.useRef();return u.useEffect(()=>(o.current=setTimeout(()=>{i(!0)},5e3),()=>{clearTimeout(o.current)}),[i,n]),s.jsxs(N,{children:[s.jsx(k,{children:"PRESENTED BY"}),s.jsx(C,{children:s.jsx("img",{src:e,alt:"ad-sponsor-logo"})})]})},Q=a.styled_default("div")({name:"QuestionContainer",class:"q14ckf9e",propsAsIs:!1}),_=({openedQuestion:e,muted:n,webos:i})=>{const{sdk:o}=y();return e?.attributes?.attributes.case==="insight"?s.jsx(p.f,{...e.attributes.attributes.value,muted:n,controlVideo:o?.controlVideoPlayer,webos:i,questionId:e.id,fireEvent:e.fireEvent,isEventFired:e.isEventFired}):e?.attributes?.attributes.case==="tweet"?s.jsx(p.a,{...e.attributes.attributes.value,muted:n,controlVideo:o?.controlVideoPlayer}):null},L=({extendedQuestion:e,vote:n,close:i,webos:o})=>{const{loading:m,data:d}=e;return d?s.jsx(A.Qe,{webos:o,vote:n,close:i,openedQuestion:d,isLoading:!!m}):s.jsx(A.Ze,{})},D=({gamification:e,sdk:n,muted:i,skipAutoClose:o,hideSponsor:m,className:d,hideHeader:h,webos:x})=>{const r=a.useStore(e.openedQuestion.$store),t=a.useStore(e.openedQuestion.$extendedStore),[q,S]=u.useState(!1),T=a.useStore(n.options),f=r?.attributes?.type===c.QuestionType.FACTOID,b=r?.attributes?.backgroundImage,l=t.data?.backgroundImage,w=f?b?.landscapeUrl??l?.landscapeUrl:l?.landscapeUrl,U=f?b?.portraitUrl??l?.portraitUrl:l?.portraitUrl,v=E.y({containerId:T.containerId,landscapeUrl:w,portraitUrl:U});if(!r||!t.data)return null;const g=r.type,I=t.data?.options?.options.case==="factoid"?t.data.options.options.value.closeTimer:void 0;return t.data&&(t.data.adUnit===c.AdUnit.STANDART||t.data.promotion?.adUnit===c.AdUnit.STANDART)&&!q?s.jsxs(Q,{className:d,children:[v,s.jsx(R,{id:t.data.id,setAdShowed:S,sponsorLogo:t.data.promotion?.sponsor?.logo||t.data.sponsorship?.logo||""})]}):s.jsxs(Q,{className:d,children:[v,!h&&s.jsx(p.O,{closeTimer:o?void 0:I,close:e.closeQuestion,type:r.attributes?.type||c.QuestionType.UNSET,webos:x}),g==="question"&&s.jsx(L,{webos:x,vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:t}),g!=="question"&&s.jsx(_,{muted:i,openedQuestion:r,webos:x}),!m&&s.jsx(p.d,{sponsorLogo:t.data?.promotion?.sponsor?.logo||t.data?.sponsorship?.logo})]})};exports._=D;exports.e=j;exports.p=y;