@streamlayer/react-ui 1.32.4 → 1.33.1

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 (154) hide show
  1. package/lib/app/app/Advertisement/index.d.ts +1 -1
  2. package/lib/app/app/Advertisement/index.js +14 -15
  3. package/lib/app/app/Banner/index.d.ts +1 -1
  4. package/lib/app/app/Features/FeatureProvider.d.ts +2 -2
  5. package/lib/app/app/Features/Gamification/Leaderboard.d.ts +1 -1
  6. package/lib/app/app/Features/Gamification/Leaderboard.js +46 -36
  7. package/lib/app/app/Features/Gamification/Question.d.ts +2 -2
  8. package/lib/app/app/Features/Gamification/Question.js +42 -42
  9. package/lib/app/app/Features/Gamification/QuestionAdvertisement.js +19 -25
  10. package/lib/app/app/Features/Gamification/QuestionsList.d.ts +1 -1
  11. package/lib/app/app/Features/Gamification/Tabs.d.ts +1 -1
  12. package/lib/app/app/Features/Gamification/UserSummary.d.ts +1 -1
  13. package/lib/app/app/Features/Gamification/index.d.ts +2 -2
  14. package/lib/app/app/Features/Gamification/index.js +29 -28
  15. package/lib/app/app/Features/index.d.ts +2 -2
  16. package/lib/app/app/InApp/index.d.ts +1 -1
  17. package/lib/app/app/Insight/index.d.ts +2 -2
  18. package/lib/app/app/Layout/index.d.ts +1 -1
  19. package/lib/app/app/Navigation/index.d.ts +1 -1
  20. package/lib/app/app/Notifications/Onboarding/Notification/index.d.ts +2 -2
  21. package/lib/app/app/Notifications/Onboarding/index.d.ts +2 -2
  22. package/lib/app/app/Notifications/Onboarding/index.js +45 -42
  23. package/lib/app/app/Notifications/index.d.ts +1 -1
  24. package/lib/app/app/Points/index.d.ts +1 -1
  25. package/lib/app/app/index.d.ts +1 -1
  26. package/lib/app/app/story/index.js +24 -24
  27. package/lib/app/app/story/insight/index.js +14 -15
  28. package/lib/app/app/story/insight/video.js +3 -3
  29. package/lib/app/app/story/promotion/content.js +5 -5
  30. package/lib/app/app/story/promotion/index.d.ts +1 -0
  31. package/lib/app/app/story/promotion/index.js +24 -25
  32. package/lib/app/app/story/promotion/video.d.ts +0 -1
  33. package/lib/app/app/story/promotion/video.js +41 -43
  34. package/lib/app/app/story/promotion-notification/index.js +15 -16
  35. package/lib/app/app/story/promotion-notification/video.d.ts +0 -1
  36. package/lib/app/app/story/promotion-notification/video.js +22 -30
  37. package/lib/app/app/story/settings/index.js +6 -6
  38. package/lib/app/app/story/settings/login.js +1 -1
  39. package/lib/app/app/story/video.js +28 -28
  40. package/lib/app/app/useApp.d.ts +1 -1
  41. package/lib/app/app/useAppContext.d.ts +1 -1
  42. package/lib/app/login/demo.js +19 -18
  43. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.d.ts +0 -1
  44. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +17 -17
  45. package/lib/app/masters/BetPack/BetPackContent/QuestionScreen/index.d.ts +2 -2
  46. package/lib/app/masters/BetPack/BetPackContent/index.d.ts +1 -1
  47. package/lib/app/masters/BetPack/BetPackOverlay/index.d.ts +1 -1
  48. package/lib/app/masters/BetPack/index.d.ts +1 -1
  49. package/lib/app/masters/Features/FeatureProvider.d.ts +2 -2
  50. package/lib/app/masters/Features/Gamification/Question.d.ts +1 -1
  51. package/lib/app/masters/Features/Gamification/QuestionsList.d.ts +1 -1
  52. package/lib/app/masters/Features/Gamification/Tabs.d.ts +1 -1
  53. package/lib/app/masters/Features/Gamification/UserSummary.d.ts +1 -1
  54. package/lib/app/masters/Features/Gamification/index.d.ts +1 -1
  55. package/lib/app/masters/Features/index.d.ts +2 -2
  56. package/lib/app/masters/Notifications/Onboarding/Notification/index.d.ts +2 -2
  57. package/lib/app/masters/Notifications/Onboarding/index.d.ts +2 -2
  58. package/lib/app/masters/Notifications/Onboarding/index.js +42 -39
  59. package/lib/app/masters/Notifications/index.d.ts +1 -1
  60. package/lib/app/masters/Points/index.d.ts +1 -1
  61. package/lib/app/masters/masters.d.ts +2 -1
  62. package/lib/app/masters/masters.js +34 -32
  63. package/lib/app/masters/provider.d.ts +4 -0
  64. package/lib/app/masters/provider.js +23 -0
  65. package/lib/app/masters/story/components.js +48 -52
  66. package/lib/app/masters/story/index.js +16 -15
  67. package/lib/app/masters/useMastersApp.d.ts +1 -1
  68. package/lib/app/masters/useMastersContext.d.ts +1 -1
  69. package/lib/app/tgl/index.d.ts +1 -0
  70. package/lib/app/tgl/index.js +19 -20
  71. package/lib/app/tgl/video.d.ts +0 -1
  72. package/lib/app/tgl/video.js +40 -42
  73. package/lib/app/useSdkFeature.d.ts +3 -3
  74. package/lib/app/webos/Advertisement/AdvertisementUI.d.ts +1 -1
  75. package/lib/app/webos/Advertisement/index.d.ts +1 -1
  76. package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +1 -1
  77. package/lib/app/webos/ExposedPauseAd/PauseAd.js +68 -68
  78. package/lib/app/webos/Question/index.d.ts +1 -1
  79. package/lib/app/webos/index.d.ts +1 -1
  80. package/lib/app/webos/story.js +26 -26
  81. package/lib/app/webos/ui/Sidebar/PromoAction.d.ts +1 -1
  82. package/lib/app/webos/ui/Sidebar/index.d.ts +2 -2
  83. package/lib/app/webos/ui/Sidebar/styles.js +82 -888
  84. package/lib/app/webos/ui/insight/index.d.ts +1 -1
  85. package/lib/assets/style.css +1 -1
  86. package/lib/core/app.d.ts +7 -0
  87. package/lib/core/app.js +14 -0
  88. package/lib/core/event.d.ts +6 -0
  89. package/lib/core/event.js +5 -0
  90. package/lib/core/hooks.d.ts +16 -0
  91. package/lib/core/hooks.js +8 -0
  92. package/lib/core/provider.d.ts +49 -0
  93. package/lib/core/provider.js +9 -0
  94. package/lib/hooks/analytics.d.ts +1 -1
  95. package/lib/hooks-B0Qttldg.js +99 -0
  96. package/lib/index.d.ts +0 -1
  97. package/lib/index.js +2 -4
  98. package/lib/ui/advertisement/banner/index.d.ts +3 -3
  99. package/lib/ui/advertisement/index.d.ts +1 -1
  100. package/lib/ui/advertisement/mock.d.ts +1 -1
  101. package/lib/ui/advertisement/notification/index.d.ts +1 -1
  102. package/lib/ui/advertisement/notification/lower-third/index.d.ts +1 -1
  103. package/lib/ui/advertisement/notification/lower-third/index.js +34 -30
  104. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +100 -33212
  105. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js +13 -13
  106. package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.d.ts +1 -1
  107. package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +63 -204
  108. package/lib/ui/advertisement/overlay/index.d.ts +2 -2
  109. package/lib/ui/close-btn/index.d.ts +1 -1
  110. package/lib/ui/gamification/constants.d.ts +1 -1
  111. package/lib/ui/gamification/detail/header/index.d.ts +1 -1
  112. package/lib/ui/gamification/insight/index.d.ts +1 -1
  113. package/lib/ui/gamification/insight-list/index.d.ts +1 -1
  114. package/lib/ui/gamification/leaderboard/list-item/index.d.ts +1 -1
  115. package/lib/ui/gamification/leaderboard/static.d.ts +1 -1
  116. package/lib/ui/gamification/onboarding/index.d.ts +2 -2
  117. package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.d.ts +2 -2
  118. package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.js +1 -1
  119. package/lib/ui/gamification/question/inapp/notification/AdNotification/index.d.ts +1 -1
  120. package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.d.ts +1 -1
  121. package/lib/ui/gamification/question/inapp/notification/index.d.ts +1 -1
  122. package/lib/ui/gamification/question/inapp/onboarding/index.d.ts +1 -1
  123. package/lib/ui/gamification/question/inapp/prediction-result/frames/index.d.ts +1 -1
  124. package/lib/ui/gamification/question/inapp/prediction-result/index.d.ts +1 -1
  125. package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.d.ts +1 -1
  126. package/lib/ui/gamification/question/inapp/prediction-result-ad/index.d.ts +1 -1
  127. package/lib/ui/gamification/question/index.d.ts +1 -1
  128. package/lib/ui/gamification/question/list/index.d.ts +1 -1
  129. package/lib/ui/gamification/question/notification/index.d.ts +1 -1
  130. package/lib/ui/gamification/question/notification/insight/index.d.ts +2 -2
  131. package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +1 -1
  132. package/lib/ui/gamification/question/notification/tweet/index.d.ts +1 -1
  133. package/lib/ui/gamification/vote/feedback/index.d.ts +1 -1
  134. package/lib/ui/gamification/vote/index.d.ts +1 -1
  135. package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -1
  136. package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -1
  137. package/lib/ui/icons/index.d.ts +198 -66
  138. package/lib/ui/navigation/button/index.d.ts +1 -1
  139. package/lib/ui/questions/insight/index.d.ts +1 -1
  140. package/lib/ui/questions/twitter/index.d.ts +1 -1
  141. package/lib/ui/video-player/index.js +26 -23
  142. package/lib/useStreamLayerApp.d.ts +23 -0
  143. package/lib/useStreamLayerApp.js +167 -0
  144. package/lib/utils/debug/components/bypassLogin.d.ts +1 -1
  145. package/lib/utils/debug/components/developer.d.ts +1 -1
  146. package/lib/utils/debug/components/eventInput.d.ts +1 -1
  147. package/lib/utils/debug/index.js +8 -8
  148. package/lib/utils/debug/storage.d.ts +1 -1
  149. package/lib/utils/storage.d.ts +1 -1
  150. package/package.json +42 -35
  151. package/lib/index-l-eyvmpL.js +0 -3758
  152. package/lib/utils/createDemo.d.ts +0 -12
  153. package/lib/utils/createDemo.js +0 -49
  154. package/lib/vast-client.min-B0NUra1B.js +0 -1060
@@ -0,0 +1,7 @@
1
+ export declare const StreamLayerSDKReact: React.FC<{
2
+ event?: string;
3
+ topNavigation?: boolean;
4
+ withSidebarNotification?: boolean;
5
+ muted?: boolean;
6
+ theme?: string;
7
+ }>;
@@ -0,0 +1,14 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { App as l } from "../app/app/index.js";
3
+ import { useContext as o } from "react";
4
+ import { StreamLayerThemeProvider as f } from "../ui/theme/index.js";
5
+ import { S as n, a as h, b as y, c as s } from "../hooks-B0Qttldg.js";
6
+ const b = ({ event: p, topNavigation: S, theme: c, muted: u, withSidebarNotification: d = !0 }) => {
7
+ const { sdk: t, status: i } = o(n), e = h(), m = y(), { event: a } = o(n);
8
+ if (i === s.UNSET)
9
+ throw new Error("Wrap app in `StreamLayerProvider`");
10
+ return i === s.CONNECTED ? /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: "wait" }) : t === null ? /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: "sdk not initialized" }) : !e.app && !e.appNotification && !e.appSidebar || !e.app && !e.appSidebar && e.appNotification && !d ? null : /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ r(f, { customTheme: c ?? m.theme, themeMode: m.themeMode, children: /* @__PURE__ */ r(l, { sdk: t, muted: u, event: (a == null ? void 0 : a.current) || p, topNavigation: S }) }) });
11
+ };
12
+ export {
13
+ b as StreamLayerSDKReact
14
+ };
@@ -0,0 +1,6 @@
1
+ export type StreamLayerSDKEventProps = {
2
+ event?: string;
3
+ };
4
+ export declare const StreamLayerSDKEvent: React.FC<StreamLayerSDKEventProps & {
5
+ internal?: boolean;
6
+ }>;
@@ -0,0 +1,5 @@
1
+ import "react";
2
+ import { e as a } from "../hooks-B0Qttldg.js";
3
+ export {
4
+ a as StreamLayerSDKEvent
5
+ };
@@ -0,0 +1,16 @@
1
+ import { StreamLayerOptions, StreamLayerSDK } from '../packages/sdk-web-interfaces/src/index.ts';
2
+ export declare const useStreamLayer: () => StreamLayerSDK | null;
3
+ export declare const useStreamLayerEvent: () => import('react').MutableRefObject<string> | undefined;
4
+ export declare const useStreamLayerTheme: () => Pick<StreamLayerOptions, "theme" | "themeMode">;
5
+ export declare const useStreamLayerUI: () => {
6
+ promotionExternalAd?: boolean;
7
+ promotionSidebar?: boolean;
8
+ promotionOverlay?: boolean;
9
+ promotionNotification?: boolean;
10
+ promotionBanner?: boolean;
11
+ app?: boolean;
12
+ appNotification?: boolean;
13
+ appSidebar?: boolean;
14
+ appBanner?: boolean;
15
+ onboardingNotification?: boolean;
16
+ };
@@ -0,0 +1,8 @@
1
+ import "react";
2
+ import { u as s, f as m, b as t, a as u } from "../hooks-B0Qttldg.js";
3
+ export {
4
+ s as useStreamLayer,
5
+ m as useStreamLayerEvent,
6
+ t as useStreamLayerTheme,
7
+ u as useStreamLayerUI
8
+ };
@@ -0,0 +1,49 @@
1
+ import { DeepLinkCallback } from '../packages/sdk-web-core/src/index.ts';
2
+ import { StreamLayerSDK, StreamLayerPlugin } from '../packages/sdk-web-interfaces/src/index.ts';
3
+ export type { DeepLinkCallback } from '../packages/sdk-web-core/src/index.ts';
4
+ export type ContentActivateParams = {
5
+ stage: 'activate' | 'deactivate';
6
+ id: string;
7
+ isViewed?: boolean;
8
+ hasNotification?: boolean;
9
+ type: 'advertisement' | 'insight' | 'poll' | 'trivia' | 'prediction' | 'tweet' | 'question';
10
+ };
11
+ export type VideoPlayerData = {
12
+ muted?: boolean;
13
+ play?: boolean;
14
+ };
15
+ export type VideoPlayerCallback = (videoPlayerData: VideoPlayerData) => void;
16
+ export type OnContentActivateCallback = (renderData: ContentActivateParams) => void;
17
+ export declare enum StreamLayerStatus {
18
+ UNSET = 0,
19
+ CONNECTED = 1,
20
+ READY = 2
21
+ }
22
+ export declare const StreamLayerContext: import('react').Context<{
23
+ status: StreamLayerStatus;
24
+ sdk: StreamLayerSDK | null;
25
+ event?: React.MutableRefObject<string>;
26
+ }>;
27
+ export type StreamLayerProps = {
28
+ sdkKey: string;
29
+ plugins?: Set<StreamLayerPlugin>;
30
+ event?: string;
31
+ production?: boolean;
32
+ autoEnable?: boolean;
33
+ onDeepLinkHandled?: DeepLinkCallback;
34
+ videoPlayerController?: VideoPlayerCallback;
35
+ onContentActivate?: OnContentActivateCallback;
36
+ theme?: string;
37
+ withAdNotification?: boolean;
38
+ withAd?: boolean;
39
+ hideFriends?: boolean;
40
+ friendsTab?: 'enabled' | 'disabled' | 'activatedGame';
41
+ themeMode?: 'light' | 'dark';
42
+ containerId?: string;
43
+ };
44
+ export declare const StreamLayerProvider: React.FC<StreamLayerProps & {
45
+ children: React.ReactNode;
46
+ skipOnboarding?: boolean;
47
+ betPack?: boolean;
48
+ webOS?: boolean;
49
+ }>;
@@ -0,0 +1,9 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "../useStreamLayerApp.js";
4
+ import { S as o, d as S, c as i } from "../hooks-B0Qttldg.js";
5
+ export {
6
+ o as StreamLayerContext,
7
+ S as StreamLayerProvider,
8
+ i as StreamLayerStatus
9
+ };
@@ -1,4 +1,4 @@
1
- import { EventBusData } from '@streamlayer/sdk-web-interfaces';
1
+ import { EventBusData } from '../packages/sdk-web-interfaces/src/index.ts';
2
2
  type Arguments<T> = T extends (...args: infer U) => void ? U : never;
3
3
  export declare const useAnalyticsHandle: (options: EventBusData) => (<T extends Function>(callback?: T) => (...args: Arguments<T>) => any)[];
4
4
  export declare const newTabLinkListener: (event: Event) => void;
@@ -0,0 +1,99 @@
1
+ import { useEffect as n, createContext as A, useRef as D, useMemo as R, useContext as m, useState as v } from "react";
2
+ import { jsxs as I, jsx as M } from "react/jsx-runtime";
3
+ import { useStreamLayerApp as g } from "./useStreamLayerApp.js";
4
+ const j = ({
5
+ event: e,
6
+ internal: o
7
+ }) => {
8
+ const s = B(), r = G();
9
+ return n(() => (s && (e && (s.createEventSession(e, o), r && (r.current = e)), !e && (r != null && r.current) && (s.createEventSession("", o), r.current = "")), () => {
10
+ s && s.disableApp();
11
+ }), [e, o, r, s]), null;
12
+ };
13
+ var Y = /* @__PURE__ */ ((e) => (e[e.UNSET = 0] = "UNSET", e[e.CONNECTED = 1] = "CONNECTED", e[e.READY = 2] = "READY", e))(Y || {});
14
+ const w = {
15
+ status: 0,
16
+ sdk: null
17
+ }, c = A(w), q = ({
18
+ sdkKey: e,
19
+ theme: o,
20
+ themeMode: s,
21
+ plugins: r,
22
+ children: f,
23
+ event: E,
24
+ production: x = !0,
25
+ autoEnable: K = !0,
26
+ withAdNotification: N,
27
+ withAd: C = !0,
28
+ betPack: a = !1,
29
+ hideFriends: T,
30
+ skipOnboarding: p,
31
+ friendsTab: S = "enabled",
32
+ onDeepLinkHandled: u,
33
+ videoPlayerController: i,
34
+ onContentActivate: U,
35
+ containerId: h,
36
+ webOS: b
37
+ }) => {
38
+ const t = g({
39
+ sdkKey: e,
40
+ plugins: r,
41
+ production: x,
42
+ autoEnable: K,
43
+ onDeepLinkHandled: u,
44
+ videoPlayerController: i,
45
+ onContentActivate: U,
46
+ hideFriends: T,
47
+ skipOnboarding: p,
48
+ withAdNotification: N,
49
+ withAd: C,
50
+ friendsTab: S,
51
+ betPack: a,
52
+ webOS: b
53
+ }), l = D(""), y = R(() => t ? { sdk: t, status: 2, event: l } : { status: 1, sdk: null, event: l }, [t]);
54
+ return n(() => {
55
+ t && (t.options.setKey("friendsTab", S), t.options.setKey("theme", o), t.options.setKey("themeMode", s), t.options.setKey("skipOnboarding", p), t.options.setKey("betPack", a), t.options.setKey("containerId", h));
56
+ }, [t, S, o, s, p, a, h]), n(() => () => {
57
+ u && (t == null || t.removeDeepLinkHandler(u)), i && (t == null || t.removeVideoPlayerController(i));
58
+ }, [t]), n(() => {
59
+ localStorage.getItem("SL_DEBUG") && console.log("StreamLayerProvider mounted with props:", {
60
+ sdkKey: !!e,
61
+ onDeepLinkHandled: !!u,
62
+ videoPlayerController: !!i
63
+ });
64
+ }, [e, u, i]), /* @__PURE__ */ I(c.Provider, { value: y, children: [
65
+ E !== void 0 && /* @__PURE__ */ M(j, { event: E }),
66
+ f
67
+ ] });
68
+ }, B = () => {
69
+ const { sdk: e } = m(c);
70
+ return e;
71
+ }, G = () => {
72
+ const { event: e } = m(c);
73
+ return e;
74
+ }, z = () => {
75
+ const { sdk: e } = m(c), [o, s] = v({});
76
+ return n(() => {
77
+ var r;
78
+ return e != null && e.options ? (r = e == null ? void 0 : e.options) == null ? void 0 : r.subscribe((f) => {
79
+ s({ theme: f.theme, themeMode: f.themeMode });
80
+ }) : () => {
81
+ };
82
+ }, [e == null ? void 0 : e.options]), o;
83
+ }, F = () => {
84
+ const { sdk: e } = m(c), [o, s] = v({});
85
+ return n(() => e != null && e.uiState ? e == null ? void 0 : e.uiState.subscribe((r) => {
86
+ s({ ...r });
87
+ }) : () => {
88
+ }, [e == null ? void 0 : e.uiState]), o;
89
+ };
90
+ export {
91
+ c as S,
92
+ F as a,
93
+ z as b,
94
+ Y as c,
95
+ q as d,
96
+ j as e,
97
+ G as f,
98
+ B as u
99
+ };
package/lib/index.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export { App } from './app/app';
2
- export { StreamLayerThemeProvider } from './ui/theme';
package/lib/index.js CHANGED
@@ -1,6 +1,4 @@
1
- import { App as o } from "./app/app/index.js";
2
- import { StreamLayerThemeProvider as p } from "./ui/theme/index.js";
1
+ import { App as r } from "./app/app/index.js";
3
2
  export {
4
- o as App,
5
- p as StreamLayerThemeProvider
3
+ r as App
6
4
  };
@@ -1,7 +1,7 @@
1
- import { Advertisement } from '@streamlayer/feature-gamification';
2
- import { PromotionOptions } from '@streamlayer/sdk-web-types';
1
+ import { Advertisement } from '../../../packages/feature-gamification/src/index.ts';
2
+ import { Promotion } from '../../../packages/sdk-web-types/src/index.ts';
3
3
  export declare const Banner: React.FC<{
4
- promotion: PromotionOptions;
4
+ promotion: Promotion;
5
5
  promotionId: string;
6
6
  direction?: 'top' | 'bottom';
7
7
  hiding?: boolean;
@@ -1,4 +1,4 @@
1
- import { Advertisement } from '@streamlayer/feature-gamification';
1
+ import { Advertisement } from '../../packages/feature-gamification/src/index.ts';
2
2
  import { ControlVideoCb } from '../video-player';
3
3
  export declare const AdvertisementUI: React.FC<{
4
4
  advertisement: Exclude<Advertisement['data'], undefined>;
@@ -1,4 +1,4 @@
1
- import { PromotionOptions } from '@streamlayer/sdk-web-types';
1
+ import { PromotionOptions } from '../../packages/sdk-web-types/src/index.ts';
2
2
  export declare const promotionMock: PromotionOptions;
3
3
  export declare const promotionMockWithVideo: PromotionOptions;
4
4
  export declare const promotionMockWithGAM: PromotionOptions;
@@ -1,4 +1,4 @@
1
- import { QuestionNotification, PromotionNotification } from '@streamlayer/sdk-web-types';
1
+ import { QuestionNotification, PromotionNotification } from '../../../packages/sdk-web-types/src/index.ts';
2
2
  export declare const NotificationMedia: React.FC<{
3
3
  src: string;
4
4
  imagePosition: PromotionNotification['imagePosition'];
@@ -1,4 +1,4 @@
1
- import { QuestionNotification, PromotionNotification } from '@streamlayer/sdk-web-types';
1
+ import { QuestionNotification, PromotionNotification } from '../../../../packages/sdk-web-types/src/index.ts';
2
2
  export declare const NotificationMedia: React.FC<{
3
3
  src: string;
4
4
  imagePosition: PromotionNotification['imagePosition'];
@@ -1,53 +1,57 @@
1
- import { jsx as i, jsxs as e, Fragment as m } from "react/jsx-runtime";
2
- import { withFocusable as O } from "../../../../app/webos/useTvButton.js";
3
- import { NotificationPromotionImagePosition as N, NotificationEnabled as t, NotificationSponsorLogoMode as _, CtaIconMode as I } from "@streamlayer/sdk-web-types";
4
- import { MediaImgBottom as C, MediaImgMiddle as f, NotificationContainer as L, NotificationContent as A, Body as S, Title as E, Text as P, Footer as x, Logo as D, Vector as F, CtaIcon as a, OpenButton as h, DismissButton as k } from "./styles.js";
5
- const R = {
6
- [N.BOTTOM]: C,
7
- [N.MIDDLE]: f
8
- }, w = ({ src: r, imagePosition: n }) => {
9
- const l = R[n] || C;
10
- return /* @__PURE__ */ i(l, { children: /* @__PURE__ */ i("img", { src: r, alt: "" }) });
11
- }, y = O(k), j = O(h), q = ({ notification: r, open: n, close: l, webos: s }) => {
1
+ import { jsx as i, jsxs as e, Fragment as I } from "react/jsx-runtime";
2
+ import { withFocusable as C } from "../../../../app/webos/useTvButton.js";
3
+ import { NotificationPromotionImagePosition as n, NotificationEnabled as t, NotificationSponsorLogoMode as E, CtaIconMode as O } from "@streamlayer/sdk-web-types";
4
+ import { MediaImgBottom as l, MediaImgMiddle as L, NotificationContainer as _, NotificationContent as f, Body as S, Title as A, Text as D, Footer as F, Logo as P, Vector as x, CtaIcon as a, OpenButton as T, DismissButton as R } from "./styles.js";
5
+ const k = {
6
+ [n.UNSET]: l,
7
+ [n.FIT]: l,
8
+ [n.CENTERED]: l,
9
+ [n.SOLID]: l,
10
+ [n.BOTTOM]: l,
11
+ [n.MIDDLE]: L
12
+ }, w = ({ src: r, imagePosition: s }) => {
13
+ const c = k[s];
14
+ return /* @__PURE__ */ i(c, { children: /* @__PURE__ */ i("img", { src: r, alt: "" }) });
15
+ }, y = C(R), j = C(T), V = ({ notification: r, open: s, close: c, webos: d }) => {
12
16
  if (!r || !r.promotion || r.enabled !== t.NOTIFICATION_ENABLED)
13
17
  return null;
14
- const { title: c, body: d, image: T, promotion: p } = r, { sponsorLogo: g, sponsorLogoMode: M, imagePosition: b, ctaButton: o } = p;
18
+ const { title: m, body: N, image: h, promotion: p } = r, { sponsorLogo: g, sponsorLogoMode: M, imagePosition: b, ctaButton: o } = p;
15
19
  return /* @__PURE__ */ e(
16
- L,
20
+ _,
17
21
  {
18
- "data-webos": s,
22
+ "data-webos": d,
19
23
  className: "SL_Lower_Third_Notification",
20
- onClick: s ? void 0 : n,
24
+ onClick: d ? void 0 : s,
21
25
  children: [
22
- /* @__PURE__ */ e(A, { children: [
23
- /* @__PURE__ */ i(w, { src: T, imagePosition: b }),
26
+ /* @__PURE__ */ e(f, { children: [
27
+ /* @__PURE__ */ i(w, { src: h, imagePosition: b }),
24
28
  /* @__PURE__ */ e(S, { children: [
25
- c && /* @__PURE__ */ i(E, { children: c }),
26
- d && /* @__PURE__ */ i(P, { children: d })
29
+ m && /* @__PURE__ */ i(A, { children: m }),
30
+ N && /* @__PURE__ */ i(D, { children: N })
27
31
  ] })
28
32
  ] }),
29
- /* @__PURE__ */ e(x, { children: [
30
- M !== _.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ e(m, { children: [
31
- /* @__PURE__ */ i(D, { children: /* @__PURE__ */ i("img", { src: g, alt: c }) }),
32
- /* @__PURE__ */ i(F, {})
33
+ /* @__PURE__ */ e(F, { children: [
34
+ M !== E.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ e(I, { children: [
35
+ /* @__PURE__ */ i(P, { children: /* @__PURE__ */ i("img", { src: g, alt: m }) }),
36
+ /* @__PURE__ */ i(x, {})
33
37
  ] }),
34
- s ? /* @__PURE__ */ e(m, { children: [
35
- /* @__PURE__ */ i(y, { webos: !0, onClick: l, children: "Dismiss" }),
38
+ d ? /* @__PURE__ */ e(I, { children: [
39
+ /* @__PURE__ */ i(y, { webos: !0, onClick: c, children: "Dismiss" }),
36
40
  /* @__PURE__ */ e(
37
41
  j,
38
42
  {
39
43
  webos: !0,
40
44
  autoFocus: !0,
41
45
  style: { color: o == null ? void 0 : o.textColor, backgroundColor: o == null ? void 0 : o.color },
42
- onClick: n,
46
+ onClick: s,
43
47
  children: [
44
- (o == null ? void 0 : o.ctaIcon) && (o == null ? void 0 : o.ctaIconMode) === I.CTA_ICON_TRANSPARENT && /* @__PURE__ */ i(a, { src: o == null ? void 0 : o.ctaIcon, alt: "cta-icon" }),
48
+ (o == null ? void 0 : o.ctaIcon) && (o == null ? void 0 : o.ctaIconMode) === O.CTA_ICON_TRANSPARENT && /* @__PURE__ */ i(a, { src: o == null ? void 0 : o.ctaIcon, alt: "cta-icon" }),
45
49
  (o == null ? void 0 : o.label) || "Open"
46
50
  ]
47
51
  }
48
52
  )
49
- ] }) : /* @__PURE__ */ e(h, { name: "promo-button", style: { color: o == null ? void 0 : o.textColor, backgroundColor: o == null ? void 0 : o.color }, children: [
50
- (o == null ? void 0 : o.ctaIcon) && (o == null ? void 0 : o.ctaIconMode) === I.CTA_ICON_TRANSPARENT && /* @__PURE__ */ i(a, { src: o == null ? void 0 : o.ctaIcon, alt: "cta-icon" }),
53
+ ] }) : /* @__PURE__ */ e(T, { name: "promo-button", style: { color: o == null ? void 0 : o.textColor, backgroundColor: o == null ? void 0 : o.color }, children: [
54
+ (o == null ? void 0 : o.ctaIcon) && (o == null ? void 0 : o.ctaIconMode) === O.CTA_ICON_TRANSPARENT && /* @__PURE__ */ i(a, { src: o == null ? void 0 : o.ctaIcon, alt: "cta-icon" }),
51
55
  (o == null ? void 0 : o.label) || "Open"
52
56
  ] })
53
57
  ] })
@@ -56,6 +60,6 @@ const R = {
56
60
  );
57
61
  };
58
62
  export {
59
- q as LowerThirdNotification,
63
+ V as LowerThirdNotification,
60
64
  w as NotificationMedia
61
65
  };