@streamlayer/react-ui 1.2.2 → 1.3.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 (142) hide show
  1. package/lib/app/app/Advertisement/index.d.ts +2 -1
  2. package/lib/app/app/Advertisement/index.js +66 -47
  3. package/lib/app/app/Features/FeatureProvider.d.ts +0 -1
  4. package/lib/app/app/Features/Gamification/Leaderboard.d.ts +0 -1
  5. package/lib/app/app/Features/Gamification/Question.d.ts +3 -1
  6. package/lib/app/app/Features/Gamification/Question.js +45 -41
  7. package/lib/app/app/Features/Gamification/QuestionsList.d.ts +0 -1
  8. package/lib/app/app/Features/Gamification/Tabs.d.ts +0 -1
  9. package/lib/app/app/Features/Gamification/UserSummary.d.ts +0 -1
  10. package/lib/app/app/Features/Gamification/gamification-feature.d.ts +0 -1
  11. package/lib/app/app/Features/Gamification/index.d.ts +0 -1
  12. package/lib/app/app/Features/index.d.ts +0 -1
  13. package/lib/app/app/Insight/index.d.ts +18 -0
  14. package/lib/app/app/Insight/index.js +62 -0
  15. package/lib/app/app/Navigation/index.d.ts +0 -1
  16. package/lib/app/app/Navigation/index.js +39 -31
  17. package/lib/app/app/Notifications/Onboarding/Notification/index.d.ts +0 -1
  18. package/lib/app/app/Notifications/Onboarding/index.d.ts +0 -1
  19. package/lib/app/app/Notifications/index.d.ts +0 -1
  20. package/lib/app/app/Notifications/styles.d.ts +1 -1
  21. package/lib/app/app/Points/index.d.ts +0 -1
  22. package/lib/app/app/index.d.ts +0 -1
  23. package/lib/app/app/story/index.d.ts +2 -10
  24. package/lib/app/app/story/index.js +44 -89
  25. package/lib/app/app/story/insight/index.d.ts +8 -0
  26. package/lib/app/app/story/insight/index.js +57 -0
  27. package/lib/app/app/story/insight/styles.d.ts +6 -0
  28. package/lib/app/app/story/insight/styles.js +30 -0
  29. package/lib/app/app/story/insight/video.d.ts +4 -0
  30. package/lib/app/app/story/insight/video.js +30 -0
  31. package/lib/app/app/story/promotion/content.d.ts +3 -0
  32. package/lib/app/app/story/{content.js → promotion/content.js} +22 -18
  33. package/lib/app/app/story/promotion/index.d.ts +9 -0
  34. package/lib/app/app/story/promotion/index.js +54 -0
  35. package/lib/app/app/story/promotion/styles.d.ts +6 -0
  36. package/lib/app/app/story/promotion/styles.js +35 -0
  37. package/lib/app/app/story/promotion/video.d.ts +8 -0
  38. package/lib/app/app/story/promotion/video.js +98 -0
  39. package/lib/app/app/story/settings/index.d.ts +1 -0
  40. package/lib/app/app/story/settings/index.js +14 -0
  41. package/lib/app/app/story/styles.d.ts +1 -6
  42. package/lib/app/app/story/styles.js +9 -34
  43. package/lib/app/app/story/video.d.ts +1 -10
  44. package/lib/app/app/story/video.js +35 -62
  45. package/lib/app/app/useApp.d.ts +0 -1
  46. package/lib/app/app/useAppContext.d.ts +0 -1
  47. package/lib/app/login/demo.d.ts +0 -1
  48. package/lib/app/login/demo.js +23 -9
  49. package/lib/app/masters/Features/FeatureProvider.d.ts +0 -1
  50. package/lib/app/masters/Features/Gamification/Leaderboard.d.ts +0 -1
  51. package/lib/app/masters/Features/Gamification/Question.d.ts +0 -1
  52. package/lib/app/masters/Features/Gamification/QuestionsList.d.ts +0 -1
  53. package/lib/app/masters/Features/Gamification/Tabs.d.ts +0 -1
  54. package/lib/app/masters/Features/Gamification/UserSummary.d.ts +0 -1
  55. package/lib/app/masters/Features/Gamification/gamification-feature.d.ts +0 -1
  56. package/lib/app/masters/Features/Gamification/index.d.ts +0 -1
  57. package/lib/app/masters/Features/index.d.ts +0 -1
  58. package/lib/app/masters/Navigation/MastersNavigation/index.d.ts +0 -1
  59. package/lib/app/masters/Notifications/Onboarding/Notification/index.d.ts +0 -1
  60. package/lib/app/masters/Notifications/Onboarding/index.d.ts +0 -1
  61. package/lib/app/masters/Notifications/index.d.ts +0 -1
  62. package/lib/app/masters/Notifications/styles.d.ts +1 -1
  63. package/lib/app/masters/Points/index.d.ts +0 -1
  64. package/lib/app/masters/masters.d.ts +0 -1
  65. package/lib/app/masters/useMastersApp.d.ts +0 -1
  66. package/lib/app/masters/useMastersContext.d.ts +0 -1
  67. package/lib/app/styles.d.ts +3 -3
  68. package/lib/app/useClipboardCopy.d.ts +0 -1
  69. package/lib/app/useSdkFeature.d.ts +0 -1
  70. package/lib/app/useSdkResponsive.d.ts +0 -1
  71. package/lib/app/useSdkScroll.d.ts +0 -1
  72. package/lib/assets/style.css +1 -1
  73. package/lib/ui/advertisement/banner/index.d.ts +1 -2
  74. package/lib/ui/advertisement/banner/index.js +16 -28
  75. package/lib/ui/advertisement/banner/styles.d.ts +3 -0
  76. package/lib/ui/advertisement/banner/styles.js +20 -0
  77. package/lib/ui/advertisement/index.d.ts +0 -1
  78. package/lib/ui/advertisement/index.js +13 -12
  79. package/lib/ui/advertisement/mock.d.ts +0 -1
  80. package/lib/ui/advertisement/overlay/index.d.ts +2 -1
  81. package/lib/ui/advertisement/overlay/index.js +61 -58
  82. package/lib/ui/advertisement/overlay/styles.d.ts +8 -4
  83. package/lib/ui/advertisement/overlay/styles.js +70 -62
  84. package/lib/ui/animated-counter/index.d.ts +0 -1
  85. package/lib/ui/gamification/constants.d.ts +0 -1
  86. package/lib/ui/gamification/detail/header/index.d.ts +0 -1
  87. package/lib/ui/gamification/insight/index.d.ts +0 -1
  88. package/lib/ui/gamification/insight-list/index.d.ts +0 -1
  89. package/lib/ui/gamification/leaderboard/index.d.ts +0 -1
  90. package/lib/ui/gamification/leaderboard/list-item/index.d.ts +0 -1
  91. package/lib/ui/gamification/leaderboard/static.d.ts +0 -1
  92. package/lib/ui/gamification/onboarding/index.d.ts +0 -1
  93. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +0 -1
  94. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +0 -1
  95. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.d.ts +0 -1
  96. package/lib/ui/gamification/question/index.d.ts +0 -1
  97. package/lib/ui/gamification/question/insight/index.d.ts +0 -1
  98. package/lib/ui/gamification/question/list/index.d.ts +0 -1
  99. package/lib/ui/gamification/question/notification/index.d.ts +0 -1
  100. package/lib/ui/gamification/question/notification/insight/index.d.ts +0 -1
  101. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/styles.d.ts +14 -14
  102. package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +0 -1
  103. package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +1 -1
  104. package/lib/ui/gamification/question/notification/tweet/index.d.ts +0 -1
  105. package/lib/ui/gamification/question/twitter/index.d.ts +0 -1
  106. package/lib/ui/gamification/vote/alert/index.d.ts +0 -1
  107. package/lib/ui/gamification/vote/feedback/index.d.ts +0 -1
  108. package/lib/ui/gamification/vote/index.d.ts +0 -1
  109. package/lib/ui/gamification/vote/insight-details/index.d.ts +0 -1
  110. package/lib/ui/gamification/vote/insight-details/index.js +7 -8
  111. package/lib/ui/gamification/vote/insight-details/styles.d.ts +1 -0
  112. package/lib/ui/gamification/vote/insight-details/styles.js +10 -4
  113. package/lib/ui/gamification/vote/twitter-details/index.d.ts +0 -1
  114. package/lib/ui/gamification/vote/vote-option/index.d.ts +0 -1
  115. package/lib/ui/gamification/vote/vote-option/styles.d.ts +2 -2
  116. package/lib/ui/gamification/vote/win-bar/index.d.ts +0 -1
  117. package/lib/ui/link/index.d.ts +1 -0
  118. package/lib/ui/link/index.js +9 -0
  119. package/lib/ui/navigation/button/Channels.d.ts +0 -1
  120. package/lib/ui/navigation/button/FeaturedGroups.d.ts +0 -1
  121. package/lib/ui/navigation/button/LeaderBoard.d.ts +0 -1
  122. package/lib/ui/navigation/button/index.d.ts +0 -1
  123. package/lib/ui/navigation/index.d.ts +0 -1
  124. package/lib/ui/questions/insight/index.d.ts +0 -1
  125. package/lib/ui/questions/twitter/index.d.ts +0 -1
  126. package/lib/ui/questions/twitter/styles.d.ts +2 -2
  127. package/lib/ui/show-in/index.d.ts +0 -1
  128. package/lib/ui/theme/breakpoints.d.ts +0 -1
  129. package/lib/ui/theme/index.d.ts +1 -0
  130. package/lib/ui/theme/index.js +4 -3
  131. package/lib/ui/theme/masters-theme.d.ts +0 -1
  132. package/lib/ui/theme/theme.js +42 -16
  133. package/lib/ui/timer/index.d.ts +0 -1
  134. package/lib/ui/video-player/index.d.ts +1 -0
  135. package/lib/ui/video-player/index.js +43 -43
  136. package/lib/utils/debug/index.js +45 -19
  137. package/package.json +26 -26
  138. package/lib/app/app/story/content.d.ts +0 -4
  139. package/lib/app/app/story/useResponsive.d.ts +0 -1
  140. package/lib/app/app/story/useResponsive.js +0 -15
  141. /package/lib/app/app/story/{login.d.ts → settings/login.d.ts} +0 -0
  142. /package/lib/app/app/story/{login.js → settings/login.js} +0 -0
@@ -1,113 +1,68 @@
1
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { styled as d } from "@linaria/react";
3
- import { useRef as A, useState as L, useEffect as m } from "react";
4
- import t from "screenfull";
5
- import { StreamLayerProvider as u, useStreamLayer as C } from "@streamlayer/react";
6
- import { App as S } from "../index.js";
7
- import { StreamLayerThemeProvider as E } from "../../../ui/theme/index.js";
8
- import { useStreamLayerDebug as F, StreamLayerDebug as x } from "../../../utils/debug/index.js";
9
- import { Content as P } from "./content.js";
10
- import { AppLogin as K } from "./login.js";
11
- import { Video as D } from "./video.js";
12
- const l = () => {
1
+ import { jsx as r, jsxs as d } from "react/jsx-runtime";
2
+ import { styled as t } from "@linaria/react";
3
+ import { useEffect as i } from "react";
4
+ import { StreamLayerProvider as l, useStreamLayer as p } from "@streamlayer/react";
5
+ import { App as c } from "../index.js";
6
+ import { StreamLayerThemeProvider as m } from "../../../ui/theme/index.js";
7
+ import { useStreamLayerDebug as f } from "../../../utils/debug/index.js";
8
+ import { Video as u } from "./video.js";
9
+ const s = () => {
13
10
  console.log("deep link handled cb");
14
- }, p = () => {
11
+ }, y = () => {
15
12
  console.log("video player handled cb");
16
- }, I = ({
17
- event: s
13
+ }, v = ({
14
+ event: o
18
15
  }) => {
19
- const r = C();
20
- return m(() => {
21
- r && r.openFeature(12);
22
- }, [r]), r ? /* @__PURE__ */ e(E, {
23
- children: /* @__PURE__ */ e(S, {
24
- sdk: r,
25
- event: s,
26
- onDeepLinkHandled: l
16
+ const e = p();
17
+ return i(() => {
18
+ e && e.openFeature(12);
19
+ }, [e]), e ? /* @__PURE__ */ r(m, {
20
+ children: /* @__PURE__ */ r(c, {
21
+ sdk: e,
22
+ event: o,
23
+ onDeepLinkHandled: s
27
24
  })
28
25
  }) : null;
29
- }, j = /* @__PURE__ */ d("div")({
26
+ }, h = /* @__PURE__ */ t("div")({
30
27
  name: "Container",
31
28
  class: "c1a4qh28",
32
29
  propsAsIs: !1
33
- }), T = /* @__PURE__ */ d("div")({
30
+ }), k = /* @__PURE__ */ t("div")({
34
31
  name: "Body",
35
32
  class: "b9h8kuk",
36
33
  propsAsIs: !1
37
- }), q = /* @__PURE__ */ d("div")({
34
+ }), A = /* @__PURE__ */ t("div")({
38
35
  name: "AppContainer",
39
36
  class: "a1wkro2j",
40
37
  propsAsIs: !1
41
- }), Q = ({
42
- settings: s,
43
- hideSdk: r,
44
- hideLogin: f,
45
- promotionId: y,
46
- hidePoints: v,
47
- sidebar: h,
48
- banner: b,
49
- layoutMode: g
38
+ }), D = ({
39
+ sdkKey: o,
40
+ eventId: e,
41
+ production: a
50
42
  }) => {
51
- const o = F(), a = A(), [w, c] = L(!1);
52
- if (m(() => {
53
- const n = () => {
54
- window.orientation !== 0 ? (document.body.style.height = window.outerHeight + 50 + "px", document.body.style.overflow = "hidden", c(!0)) : (document.body.style.height = "auto", document.body.style.overflow = "auto", c(!1)), setTimeout(function() {
55
- window.scrollTo(0, 0);
56
- }, 1e3);
57
- };
58
- return t.isEnabled || window.addEventListener("orientationchange", n), () => {
59
- t.isEnabled || window.removeEventListener("orientationchange", n);
60
- };
61
- }, []), s)
62
- return /* @__PURE__ */ i(u, {
63
- sdkKey: o.sdkKey,
64
- production: o.env === "production",
65
- autoEnable: !1,
66
- onDeepLinkHandled: l,
67
- videoPlayerController: p,
68
- children: [/* @__PURE__ */ e(K, {}), /* @__PURE__ */ e(x, {
69
- ...o,
70
- standalone: !0,
71
- hideAuth: !0
72
- })]
73
- });
74
- const k = () => {
75
- const n = a.current;
76
- t.isEnabled || alert("Fullscreen is not supported in your browser, rotate your device to landscape mode"), t.isFullscreen ? t.exit() : t.request(n, {
77
- navigationUI: "hide"
78
- });
79
- };
80
- return /* @__PURE__ */ i(u, {
81
- sdkKey: o.sdkKey,
82
- production: o.env === "production",
43
+ const n = f({
44
+ sdkKey: o,
45
+ eventId: e,
46
+ production: a
47
+ });
48
+ return /* @__PURE__ */ r(l, {
49
+ sdkKey: n.sdkKey,
50
+ production: n.env === "production",
83
51
  autoEnable: !0,
84
- onDeepLinkHandled: l,
85
- videoPlayerController: p,
86
- children: [/* @__PURE__ */ i(T, {
87
- ref: a,
88
- children: [/* @__PURE__ */ e(D, {
89
- event: o.event,
90
- hideLogin: f,
91
- toggleFullscreen: k,
92
- banner: b,
93
- sidebar: h,
94
- hidePoints: v,
95
- layoutMode: g,
96
- promotionId: y,
97
- fullscreen: w
98
- }), !r && /* @__PURE__ */ e(j, {
99
- children: /* @__PURE__ */ e(q, {
52
+ onDeepLinkHandled: s,
53
+ videoPlayerController: y,
54
+ children: /* @__PURE__ */ d(k, {
55
+ children: [/* @__PURE__ */ r(u, {}), /* @__PURE__ */ r(h, {
56
+ children: /* @__PURE__ */ r(A, {
100
57
  className: "StreamLayerSDK",
101
- children: /* @__PURE__ */ e(I, {
102
- event: o.event
58
+ children: /* @__PURE__ */ r(v, {
59
+ event: n.event
103
60
  })
104
61
  })
105
62
  })]
106
- }), /* @__PURE__ */ e(P, {
107
- event: o.event
108
- })]
63
+ })
109
64
  });
110
65
  };
111
66
  export {
112
- Q as AppStory
67
+ D as AppStory
113
68
  };
@@ -0,0 +1,8 @@
1
+ export declare const InsightStory: React.FC<{
2
+ sdkKey?: string;
3
+ eventId?: string;
4
+ production?: boolean;
5
+ onlyInsight?: boolean;
6
+ hideHeader?: boolean;
7
+ layoutMode?: 'side-by-side' | 'cover';
8
+ }>;
@@ -0,0 +1,57 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { styled as d } from "@linaria/react";
3
+ import { StreamLayerProvider as a, useStreamLayer as u } from "@streamlayer/react";
4
+ import { StreamLayerSDKInsight as p } from "../../Insight/index.js";
5
+ import { StreamLayerThemeProvider as c } from "../../../../ui/theme/index.js";
6
+ import { useStreamLayerDebug as y } from "../../../../utils/debug/index.js";
7
+ import { customTheme as f } from "./styles.js";
8
+ import { Video as h } from "./video.js";
9
+ const l = /* @__PURE__ */ d("div")({
10
+ name: "Body",
11
+ class: "buit6hv",
12
+ propsAsIs: !1
13
+ }), v = ({
14
+ event: o,
15
+ hideHeader: m
16
+ }) => {
17
+ const r = u();
18
+ return r ? /* @__PURE__ */ e(c, {
19
+ customTheme: f,
20
+ children: /* @__PURE__ */ e(p, {
21
+ hideHeader: m,
22
+ event: o,
23
+ sdk: r,
24
+ persistent: !0
25
+ })
26
+ }) : null;
27
+ }, B = ({
28
+ sdkKey: o,
29
+ eventId: m,
30
+ layoutMode: r,
31
+ production: n,
32
+ onlyInsight: s,
33
+ hideHeader: i
34
+ }) => {
35
+ const t = y({
36
+ sdkKey: o,
37
+ eventId: m,
38
+ production: n
39
+ });
40
+ return /* @__PURE__ */ e(a, {
41
+ sdkKey: t.sdkKey,
42
+ production: t.env === "production",
43
+ autoEnable: !0,
44
+ children: s ? /* @__PURE__ */ e(v, {
45
+ hideHeader: i,
46
+ event: t.event
47
+ }) : /* @__PURE__ */ e(l, {
48
+ children: /* @__PURE__ */ e(h, {
49
+ layoutMode: r,
50
+ event: t.event
51
+ })
52
+ })
53
+ });
54
+ };
55
+ export {
56
+ B as InsightStory
57
+ };
@@ -0,0 +1,6 @@
1
+ export declare const customTheme: import('@linaria/core').LinariaClassName;
2
+ export declare const VideoPlayerWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const VideoFrame: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
+ export declare const InsightContainerLBar: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
+ export declare const InsightContainerOverlay: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
6
+ export declare const InsightContainerMobile: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -0,0 +1,30 @@
1
+ import { styled as s } from "@linaria/react";
2
+ const a = "c1bibvvs", n = /* @__PURE__ */ s("div")({
3
+ name: "VideoPlayerWrap",
4
+ class: "v1kn8kyk",
5
+ propsAsIs: !1
6
+ }), i = /* @__PURE__ */ s("div")({
7
+ name: "VideoFrame",
8
+ class: "v1i1m23p",
9
+ propsAsIs: !1
10
+ }), o = /* @__PURE__ */ s("div")({
11
+ name: "InsightContainerLBar",
12
+ class: "i1gjlsv0",
13
+ propsAsIs: !1
14
+ }), r = /* @__PURE__ */ s("div")({
15
+ name: "InsightContainerOverlay",
16
+ class: "iz2841u",
17
+ propsAsIs: !1
18
+ }), t = /* @__PURE__ */ s("div")({
19
+ name: "InsightContainerMobile",
20
+ class: "i16grq96",
21
+ propsAsIs: !1
22
+ });
23
+ export {
24
+ o as InsightContainerLBar,
25
+ t as InsightContainerMobile,
26
+ r as InsightContainerOverlay,
27
+ i as VideoFrame,
28
+ n as VideoPlayerWrap,
29
+ a as customTheme
30
+ };
@@ -0,0 +1,4 @@
1
+ export declare const Video: React.FC<{
2
+ event?: string;
3
+ layoutMode?: 'side-by-side' | 'cover';
4
+ }>;
@@ -0,0 +1,30 @@
1
+ import { jsxs as o, Fragment as d, jsx as e } from "react/jsx-runtime";
2
+ import { useRef as h } from "react";
3
+ import { useStreamLayer as l } from "@streamlayer/react";
4
+ import { StreamLayerSDKInsight as i } from "../../Insight/index.js";
5
+ import { StreamLayerThemeProvider as n } from "../../../../ui/theme/index.js";
6
+ import { VideoFrame as c, customTheme as s, VideoPlayerWrap as p, InsightContainerMobile as u, InsightContainerOverlay as g, InsightContainerLBar as f } from "./styles.js";
7
+ const x = ({ event: t, layoutMode: a }) => {
8
+ const r = l(), m = h(null);
9
+ return /* @__PURE__ */ o(d, { children: [
10
+ /* @__PURE__ */ o(c, { ref: m, "data-testid": "video-frame", children: [
11
+ /* @__PURE__ */ e(a === "cover" ? g : f, { children: r && /* @__PURE__ */ e(n, { customTheme: s, children: /* @__PURE__ */ e(i, { event: t, sdk: r, persistent: !0 }) }) }),
12
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e("div", { className: "divAnchor", children: /* @__PURE__ */ e(
13
+ "video",
14
+ {
15
+ src: "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
16
+ width: "100%",
17
+ height: "100%",
18
+ autoplay: "autoplay",
19
+ loop: !0,
20
+ playsInline: !0,
21
+ controls: !0
22
+ }
23
+ ) }) })
24
+ ] }),
25
+ /* @__PURE__ */ e(u, { children: r && /* @__PURE__ */ e(n, { customTheme: s, children: /* @__PURE__ */ e(i, { event: t, sdk: r, persistent: !0 }) }) })
26
+ ] });
27
+ };
28
+ export {
29
+ x as Video
30
+ };
@@ -0,0 +1,3 @@
1
+ export declare const Content: React.FC<{
2
+ event?: string;
3
+ }>;
@@ -1,30 +1,34 @@
1
1
  import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
- import { styled as s } from "@linaria/react";
3
- import { useStreamLayer as m } from "@streamlayer/react";
4
- import { StreamLayerSDKAdvertisement as o } from "../Advertisement/index.js";
5
- import { theme as i } from "../../../ui/theme/theme.js";
6
- const a = /* @__PURE__ */ s("div")({
2
+ import { styled as r } from "@linaria/react";
3
+ import { useStreamLayer as o } from "@streamlayer/react";
4
+ import { StreamLayerSDKAdvertisement as i } from "../../Advertisement/index.js";
5
+ import { theme as a } from "../../../../ui/theme/theme.js";
6
+ const d = /* @__PURE__ */ r("div")({
7
7
  name: "Container",
8
- class: "c15py6sl",
8
+ class: "c1g3vhjc",
9
9
  propsAsIs: !1
10
- }), c = ({
11
- event: r
10
+ }), n = /* @__PURE__ */ r("div")({
11
+ name: "Div",
12
+ class: "d1626h38",
13
+ propsAsIs: !1
14
+ }), h = ({
15
+ event: m
12
16
  }) => {
13
- const n = m();
14
- return n ? /* @__PURE__ */ e(a, {
15
- className: i,
17
+ const s = o();
18
+ return s ? /* @__PURE__ */ e(d, {
19
+ className: a,
16
20
  "data-testid": "overlay",
17
- children: [/* @__PURE__ */ e("div", {
21
+ children: [/* @__PURE__ */ e(n, {
18
22
  children: ["Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. ", /* @__PURE__ */ t("br", {}), "-------------"]
19
- }), /* @__PURE__ */ t(o, {
20
- event: r,
21
- sdk: n
22
- }), /* @__PURE__ */ e("div", {
23
+ }), /* @__PURE__ */ t(i, {
24
+ event: m,
25
+ sdk: s,
26
+ persistent: !0
27
+ }), /* @__PURE__ */ e(n, {
23
28
  children: ["-------------", /* @__PURE__ */ t("br", {}), "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book."]
24
29
  })]
25
30
  }) : null;
26
31
  };
27
32
  export {
28
- a as Container,
29
- c as Content
33
+ h as Content
30
34
  };
@@ -0,0 +1,9 @@
1
+ export declare const PromotionStory: React.FC<{
2
+ isMobileScreen?: boolean;
3
+ promotionId?: string;
4
+ sdkKey?: string;
5
+ eventId?: string;
6
+ production?: boolean;
7
+ sidebar: 'left' | 'right';
8
+ banner: 'top' | 'bottom';
9
+ }>;
@@ -0,0 +1,54 @@
1
+ import { jsx as e, jsxs as p } 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 { Content as u } from "./content.js";
6
+ import { Video as v } from "./video.js";
7
+ const b = /* @__PURE__ */ r("div")({
8
+ name: "Body",
9
+ class: "bqh4lcc",
10
+ propsAsIs: !1
11
+ }), f = /* @__PURE__ */ r("div")({
12
+ name: "Main",
13
+ class: "mgga81b",
14
+ propsAsIs: !1
15
+ }), j = ({
16
+ isMobileScreen: t,
17
+ promotionId: s,
18
+ sdkKey: n,
19
+ eventId: i,
20
+ sidebar: d,
21
+ production: a,
22
+ banner: m,
23
+ layoutMode: c = "side-by-side"
24
+ }) => {
25
+ const o = y({
26
+ sdkKey: n,
27
+ eventId: i,
28
+ production: a
29
+ });
30
+ return /* @__PURE__ */ e(f, {
31
+ children: /* @__PURE__ */ p(l, {
32
+ sdkKey: o.sdkKey,
33
+ production: o.env === "production",
34
+ autoEnable: !0,
35
+ children: [/* @__PURE__ */ e(b, {
36
+ children: /* @__PURE__ */ e(v, {
37
+ event: o.event,
38
+ banner: m,
39
+ sidebar: d,
40
+ layoutMode: c,
41
+ promotionId: s,
42
+ isMobileScreen: t
43
+ })
44
+ }), /* @__PURE__ */ e("h3", {
45
+ children: "Overlay View (should appear between two text blocks)"
46
+ }), /* @__PURE__ */ e(u, {
47
+ event: o.event
48
+ })]
49
+ })
50
+ });
51
+ };
52
+ export {
53
+ j as PromotionStory
54
+ };
@@ -0,0 +1,6 @@
1
+ export declare const VideoPlayerWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
+ export declare const VideoFrame: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const AdvSidebar: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
+ export declare const AdvContent: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
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;
@@ -0,0 +1,35 @@
1
+ import { styled as s } from "@linaria/react";
2
+ import { Button as o } from "../../../../ui/button/index.js";
3
+ const r = /* @__PURE__ */ s("div")({
4
+ name: "VideoPlayerWrap",
5
+ class: "v579p4x",
6
+ propsAsIs: !1
7
+ }), t = /* @__PURE__ */ s("div")({
8
+ name: "VideoFrame",
9
+ class: "v1kdno04",
10
+ propsAsIs: !1
11
+ }), d = /* @__PURE__ */ s("div")({
12
+ name: "AdvSidebar",
13
+ class: "a5twsnq",
14
+ propsAsIs: !1
15
+ }), p = /* @__PURE__ */ s("div")({
16
+ name: "AdvContent",
17
+ class: "ak0dmp5",
18
+ propsAsIs: !1
19
+ }), m = /* @__PURE__ */ s("div")({
20
+ name: "AdvBanner",
21
+ class: "avdjm8e",
22
+ propsAsIs: !1
23
+ }), a = () => o, c = /* @__PURE__ */ s(a())({
24
+ name: "PromoButton",
25
+ class: "p1cdpa00",
26
+ propsAsIs: !0
27
+ });
28
+ export {
29
+ m as AdvBanner,
30
+ p as AdvContent,
31
+ d as AdvSidebar,
32
+ c as PromoButton,
33
+ t as VideoFrame,
34
+ r as VideoPlayerWrap
35
+ };
@@ -0,0 +1,8 @@
1
+ export declare const Video: React.FC<{
2
+ sidebar: 'left' | 'right';
3
+ banner: 'top' | 'bottom';
4
+ layoutMode: 'cover' | 'side-by-side';
5
+ isMobileScreen?: boolean;
6
+ event?: string;
7
+ promotionId?: string;
8
+ }>;
@@ -0,0 +1,98 @@
1
+ import { jsxs as n, Fragment as v, jsx as r } from "react/jsx-runtime";
2
+ import { useRef as g, useState as V, useCallback as y, useEffect as w } from "react";
3
+ import { useStreamLayer as x } from "@streamlayer/react";
4
+ import { StreamLayerSDKAdvertisement as m } from "../../Advertisement/index.js";
5
+ import { StreamLayerThemeProvider as c } from "../../../../ui/theme/index.js";
6
+ import { PromoButton as P, VideoFrame as A, AdvSidebar as C, VideoPlayerWrap as b, AdvBanner as F, AdvContent as S } from "./styles.js";
7
+ const D = ({ isMobileScreen: o, sidebar: s, banner: h, event: a, promotionId: l, layoutMode: t }) => {
8
+ const e = x(), p = g(null), [u, f] = V(!0), d = y(({ muted: i }) => {
9
+ f(i);
10
+ }, []);
11
+ return w(() => (e == null || e.addVideoPlayerController(d), () => {
12
+ e == null || e.removeVideoPlayerController(d);
13
+ }), [e, d]), /* @__PURE__ */ n(v, { children: [
14
+ l && /* @__PURE__ */ n(P, { onClick: () => {
15
+ var i;
16
+ (i = p.current) == null || i.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
17
+ e == null || e.getFeature(12).background.advertisement.show(l);
18
+ }, 200);
19
+ }, children: [
20
+ "open promotion: ",
21
+ l
22
+ ] }),
23
+ /* @__PURE__ */ r("h3", { children: "Sidebar On Video View and Banner" }),
24
+ /* @__PURE__ */ r("p", { children: "On desktop, the width limit is 344px, and for mobile screens, it is 300px as designed." }),
25
+ /* @__PURE__ */ n(A, { ref: p, "data-testid": "video-frame", children: [
26
+ /* @__PURE__ */ r(
27
+ C,
28
+ {
29
+ style: {
30
+ ...t === "cover" ? { position: "absolute" } : {},
31
+ ...s === "left" ? { left: 0 } : { right: 0, order: 3 },
32
+ ...o ? { maxWidth: "calc(300px + env(safe-area-inset-left))" } : {}
33
+ },
34
+ children: e && /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(
35
+ m,
36
+ {
37
+ isMobileScreen: o,
38
+ event: a,
39
+ sdk: e,
40
+ sidebar: s,
41
+ layoutMode: t,
42
+ persistent: !0
43
+ }
44
+ ) })
45
+ }
46
+ ),
47
+ /* @__PURE__ */ n(b, { children: [
48
+ /* @__PURE__ */ r("div", { className: "divAnchor", children: /* @__PURE__ */ r(
49
+ "video",
50
+ {
51
+ src: "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
52
+ muted: u,
53
+ width: "100%",
54
+ height: "100%",
55
+ autoplay: "autoplay",
56
+ loop: !0,
57
+ playsInline: !0,
58
+ controls: !0
59
+ }
60
+ ) }),
61
+ /* @__PURE__ */ r(
62
+ F,
63
+ {
64
+ style: {
65
+ ...t === "cover" ? { position: "absolute" } : {},
66
+ ...h === "top" ? { top: 0, order: -1 } : { bottom: 0 }
67
+ },
68
+ children: e && /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(
69
+ m,
70
+ {
71
+ isMobileScreen: o,
72
+ event: a,
73
+ sdk: e,
74
+ banner: h,
75
+ layoutMode: t,
76
+ persistent: !0
77
+ }
78
+ ) })
79
+ }
80
+ )
81
+ ] })
82
+ ] }),
83
+ /* @__PURE__ */ r(S, { children: e && /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(
84
+ m,
85
+ {
86
+ isMobileScreen: o,
87
+ event: a,
88
+ sdk: e,
89
+ sidebar: s,
90
+ layoutMode: t,
91
+ persistent: !0
92
+ }
93
+ ) }) })
94
+ ] });
95
+ };
96
+ export {
97
+ D as Video
98
+ };
@@ -0,0 +1 @@
1
+ export declare const SettingsStory: React.FC;
@@ -0,0 +1,14 @@
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { StreamLayerProvider as o } from "@streamlayer/react";
3
+ import { useStreamLayerDebug as n, StreamLayerDebug as a } from "../../../../utils/debug/index.js";
4
+ import { AppLogin as i } from "./login.js";
5
+ const p = () => {
6
+ const r = n();
7
+ return /* @__PURE__ */ t(o, { sdkKey: r.sdkKey, production: r.env === "production", autoEnable: !1, children: [
8
+ /* @__PURE__ */ e(i, {}),
9
+ /* @__PURE__ */ e(a, { ...r, standalone: !0, hideAuth: !0 })
10
+ ] });
11
+ };
12
+ export {
13
+ p as SettingsStory
14
+ };
@@ -1,9 +1,4 @@
1
1
  export declare const PointsContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
2
  export declare const VideoPlayerWrap: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
3
  export declare const VideoFrame: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
- export declare const LoginContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
5
- export declare const FullscreenButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
6
- export declare const AdvSidebar: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
7
- export declare const AdvContent: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
8
- export declare const AdvBanner: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
9
- export declare const PromoButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
4
+ export declare const LinkToLogin: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLAnchorElement> & import('react').AnchorHTMLAttributes<HTMLAnchorElement> & Record<never, unknown>>;