@streamlayer/react-ui 1.2.1 → 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 +73 -61
  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
@@ -6,7 +6,7 @@ export declare const Title: import('@linaria/react').StyledComponent<import('rea
6
6
  export declare const PointsTitle: {
7
7
  __wyw_meta: unknown;
8
8
  } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
9
- as?: import('react').ElementType;
9
+ as?: React.ElementType;
10
10
  }>;
11
11
  export declare const Subtitle: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
12
12
  export declare const SubtitleFG: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,6 +1,5 @@
1
1
  import { Notification } from '@streamlayer/sdk-web-notifications';
2
2
  import { TwitterContentProps } from '../../../../questions/twitter';
3
-
4
3
  export declare const Tweet: React.FC<TwitterContentProps & {
5
4
  action: Notification['action'];
6
5
  }>;
@@ -1,6 +1,5 @@
1
1
  import { TwitterContentProps } from '../../../questions/twitter';
2
2
  import { VideoPlayerProps } from '../../../video-player';
3
-
4
3
  type TwitterProps = TwitterContentProps & {
5
4
  controlVideo: VideoPlayerProps['controlVideo'];
6
5
  };
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  type AlertProps = {
4
3
  icon: 'icon-check-circle';
5
4
  title: string;
@@ -1,5 +1,4 @@
1
1
  import { QuestionType } from '@streamlayer/sdk-web-types';
2
-
3
2
  interface FeedbackProps {
4
3
  feedbackMessages?: Partial<Record<'correctFeedback' | 'incorrectFeedback', {
5
4
  description: string;
@@ -1,5 +1,4 @@
1
1
  import { ExtendedQuestion } from '@streamlayer/sdk-web-types';
2
-
3
2
  interface VoteProps {
4
3
  openedQuestion: ExtendedQuestion;
5
4
  isLoading: boolean;
@@ -1,3 +1,2 @@
1
1
  import { InsightContentProps } from '../../../questions/insight';
2
-
3
2
  export declare const InsightDetails: React.FC<InsightContentProps>;
@@ -1,14 +1,13 @@
1
- import { jsxs as o, jsx as l } from "react/jsx-runtime";
2
- import { SvgIcon as b } from "../../../icons/index.js";
1
+ import { jsxs as l, jsx as o } from "react/jsx-runtime";
3
2
  import { InsightContent as k } from "../../../questions/insight/index.js";
4
- import { Container as c, WebLinkBtn as e } from "./styles.js";
5
- const x = ({ instantView: r, ...m }) => /* @__PURE__ */ o(c, { children: [
6
- /* @__PURE__ */ l(k, { instantView: r, ...m, isDetail: !0 }),
7
- (r == null ? void 0 : r.webLink) && /* @__PURE__ */ o(e, { href: r == null ? void 0 : r.webLink.url, target: "_blank", "data-analytics": "web-link", children: [
3
+ import { Container as m, WebLinkBtn as c, WebLinkIcon as e } from "./styles.js";
4
+ const p = ({ instantView: r, ...b }) => /* @__PURE__ */ l(m, { children: [
5
+ /* @__PURE__ */ o(k, { instantView: r, ...b, isDetail: !0 }),
6
+ (r == null ? void 0 : r.webLink) && /* @__PURE__ */ l(c, { href: r == null ? void 0 : r.webLink.url, target: "_blank", "data-analytics": "web-link", children: [
8
7
  r == null ? void 0 : r.webLink.label,
9
- /* @__PURE__ */ l(b, { name: "icon-external-link" })
8
+ /* @__PURE__ */ o(e, { name: "icon-external-link" })
10
9
  ] })
11
10
  ] });
12
11
  export {
13
- x as InsightDetails
12
+ p as InsightDetails
14
13
  };
@@ -1,2 +1,3 @@
1
1
  export declare const Container: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
2
  export declare const WebLinkBtn: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLAnchorElement> & import('react').AnchorHTMLAttributes<HTMLAnchorElement> & Record<never, unknown>>;
3
+ export declare const WebLinkIcon: any;
@@ -1,14 +1,20 @@
1
1
  import { styled as s } from "@linaria/react";
2
- const n = /* @__PURE__ */ s("div")({
2
+ import { SvgIcon as n } from "../../../icons/index.js";
3
+ const a = /* @__PURE__ */ s("div")({
3
4
  name: "Container",
4
5
  class: "c1euiow",
5
6
  propsAsIs: !1
6
- }), o = /* @__PURE__ */ s("a")({
7
+ }), c = /* @__PURE__ */ s("a")({
7
8
  name: "WebLinkBtn",
8
9
  class: "w19zie3h",
9
10
  propsAsIs: !1
11
+ }), o = () => n, i = /* @__PURE__ */ s(o())({
12
+ name: "WebLinkIcon",
13
+ class: "wyg5v7z",
14
+ propsAsIs: !0
10
15
  });
11
16
  export {
12
- n as Container,
13
- o as WebLinkBtn
17
+ a as Container,
18
+ c as WebLinkBtn,
19
+ i as WebLinkIcon
14
20
  };
@@ -1,3 +1,2 @@
1
1
  import { TwitterContentProps } from '../../../questions/twitter';
2
-
3
2
  export declare const TwitterDetails: React.FC<TwitterContentProps>;
@@ -1,5 +1,4 @@
1
1
  import { QuestionType, QuestionImages, QuestionStatus, ExtendedQuestionAnswer } from '@streamlayer/sdk-web-types';
2
-
3
2
  export type VotingOptionProps = ExtendedQuestionAnswer & {
4
3
  questionVoted: boolean;
5
4
  youSelected: boolean;
@@ -8,12 +8,12 @@ export declare const Icon: import('@linaria/react').StyledComponent<import('reac
8
8
  export declare const IconDefault: {
9
9
  __wyw_meta: unknown;
10
10
  } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown> & {
11
- as?: import('react').ElementType;
11
+ as?: React.ElementType;
12
12
  }>;
13
13
  export declare const IconCircle: {
14
14
  __wyw_meta: unknown;
15
15
  } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown> & {
16
- as?: import('react').ElementType;
16
+ as?: React.ElementType;
17
17
  }>;
18
18
  export declare const Title: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLSpanElement> & import('react').HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
19
19
  export declare const Indicators: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLSpanElement> & import('react').HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
@@ -1,5 +1,4 @@
1
1
  import { QuestionType } from '@streamlayer/sdk-web-types';
2
-
3
2
  interface WinBarProps {
4
3
  title?: string;
5
4
  points?: number;
@@ -0,0 +1 @@
1
+ export declare const Link: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLAnchorElement> & import('react').AnchorHTMLAttributes<HTMLAnchorElement> & Record<never, unknown>>;
@@ -0,0 +1,9 @@
1
+ import { styled as s } from "@linaria/react";
2
+ const o = /* @__PURE__ */ s("a")({
3
+ name: "Link",
4
+ class: "l1sgte8c",
5
+ propsAsIs: !1
6
+ });
7
+ export {
8
+ o as Link
9
+ };
@@ -1,4 +1,3 @@
1
1
  import { ButtonProps } from '.';
2
-
3
2
  export declare const ChannelsButtonId = "channels";
4
3
  export declare const ChannelsButton: React.FC<Omit<ButtonProps, 'label' | 'id' | 'icon'>>;
@@ -1,5 +1,4 @@
1
1
  import { ButtonProps } from '.';
2
-
3
2
  export declare const FeaturedGroupsButtonId = "featuredGroups";
4
3
  export declare const FeaturedGroupsButton: React.FC<Omit<ButtonProps, 'label' | 'id' | 'icon'> & {
5
4
  labelFull: boolean;
@@ -1,4 +1,3 @@
1
1
  import { ButtonProps } from '.';
2
-
3
2
  export declare const LeaderBoardButtonId = "leaderboard";
4
3
  export declare const LeaderBoardButton: React.FC<Omit<ButtonProps, 'label' | 'id' | 'icon'>>;
@@ -1,5 +1,4 @@
1
1
  import { FeatureType } from '@streamlayer/sdk-web-types';
2
-
3
2
  export type ButtonProps = {
4
3
  id: FeatureType | string;
5
4
  icon?: React.ReactNode;
@@ -1,5 +1,4 @@
1
1
  import { ButtonProps } from './button';
2
-
3
2
  export declare const Navigation: React.FC<{
4
3
  children: React.ReactElement<ButtonProps>[];
5
4
  className?: string;
@@ -1,6 +1,5 @@
1
1
  import { InsightHistory } from '@streamlayer/sdk-web-types';
2
2
  import { VideoPlayerProps } from '../../video-player';
3
-
4
3
  export type InsightContentProps = InsightHistory & {
5
4
  isDetail?: boolean;
6
5
  controlVideo: VideoPlayerProps['controlVideo'];
@@ -1,6 +1,5 @@
1
1
  import { TweetHistory } from '@streamlayer/sdk-web-types';
2
2
  import { VideoPlayerProps } from '../../video-player';
3
-
4
3
  export type TwitterContentProps = TweetHistory & {
5
4
  isDetail?: boolean;
6
5
  controlVideo: VideoPlayerProps['controlVideo'];
@@ -7,10 +7,10 @@ export declare const Image: import('@linaria/react').StyledComponent<import('rea
7
7
  export declare const ImageFullSize: {
8
8
  __wyw_meta: unknown;
9
9
  } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown> & {
10
- as?: import('react').ElementType;
10
+ as?: React.ElementType;
11
11
  }>;
12
12
  export declare const ImageHalfSize: {
13
13
  __wyw_meta: unknown;
14
14
  } & import('react').FunctionComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown> & {
15
- as?: import('react').ElementType;
15
+ as?: React.ElementType;
16
16
  }>;
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  type ShowInProps = {
4
3
  children: React.ReactNode | React.ReactNode[];
5
4
  style?: React.CSSProperties;
@@ -1,5 +1,4 @@
1
1
  import { BREAKPOINTS, ORIENTATION } from './constants';
2
-
3
2
  export type Breakpoints = keyof typeof BREAKPOINTS;
4
3
  export type Orientation = keyof typeof ORIENTATION;
5
4
  export declare const breakpoints: {
@@ -1,4 +1,5 @@
1
1
  export declare const StreamLayerThemeProvider: React.FC<{
2
2
  children: React.ReactNode;
3
3
  style?: React.CSSProperties;
4
+ customTheme?: string;
4
5
  }>;
@@ -1,6 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { theme as a } from "./theme.js";
3
- const i = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: a, style: m, children: r }) });
2
+ import { cx as a } from "@linaria/core";
3
+ import { theme as t } from "./theme.js";
4
+ const d = ({ children: r, customTheme: m, style: o }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: a(t, m), style: o, children: r }) });
4
5
  export {
5
- i as StreamLayerThemeProvider
6
+ d as StreamLayerThemeProvider
6
7
  };
@@ -1,5 +1,4 @@
1
1
  import { ICOLORS } from './constants';
2
-
3
2
  export declare const MASTERS_COLORS: ICOLORS;
4
3
  export declare const mastersThemeStr: string;
5
4
  export declare const mastersTheme: import('@linaria/core').LinariaClassName;
@@ -1,7 +1,7 @@
1
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import { breakpoints as n } from "./breakpoints.js";
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import { breakpoints as o } from "./breakpoints.js";
3
3
  import { colors as s, colorsAdvertisement as h, FONT as t } from "./constants.js";
4
- const l = `
4
+ const p = `
5
5
  ${s}
6
6
  ${h}
7
7
  --font-family: ${t.REGULAR};
@@ -23,18 +23,44 @@ const l = `
23
23
  --max-width: 600px;
24
24
  --max-notifications-width: 400px;
25
25
 
26
- ${n.down("xl")`
26
+ ${o.down("xl")`
27
27
  --header-offset: 0px;
28
28
  --watch-live-header: 46px;
29
29
  `}
30
30
 
31
- ${n.intermediate("xl", "lg")`
31
+ ${o.intermediate("xl", "lg")`
32
32
  --header-offset: 0px;
33
33
  `}
34
- `, f = "StreamLayerCSSReset", x = "ttkj0ah", u = () => /* @__PURE__ */ e("table", {
35
- children: /* @__PURE__ */ r("table", {
34
+
35
+ --insight-image-ratio: 16/9;
36
+
37
+ --adv-side-indents: 16px;
38
+ --adv-top-indent: 32px;
39
+ --adv-header-height: 52px;
40
+ --adv-media-row-gap: 24px;
41
+ --adv-sponsor-logo-size: 32px;
42
+ --adv-sponsor-font-size: 16px;
43
+ --adv-header-border: 1px solid var(--color-adv-border-primary);
44
+ --adv-header-shift: 0;
45
+ --adv-media-shift: 0;
46
+ --adv-hide-on-mobile: unset;
47
+
48
+ .mobile-view {
49
+ --adv-side-indents: 16px;
50
+ --adv-hide-on-mobile: none;
51
+ --adv-header-shift: -10px;
52
+ --adv-media-shift: -10px;
53
+ --adv-top-indent: 4px;
54
+ --adv-header-border: none;
55
+ --adv-header-height: 48px;
56
+ --adv-media-row-gap: 22.5px;
57
+ --adv-sponsor-logo-size: 28px;
58
+ --adv-sponsor-font-size: 12px;
59
+ }
60
+ `, f = "StreamLayerCSSReset", v = "ttkj0ah", c = () => /* @__PURE__ */ e("table", {
61
+ children: /* @__PURE__ */ a("table", {
36
62
  children: [/* @__PURE__ */ e("thead", {
37
- children: /* @__PURE__ */ r("tr", {
63
+ children: /* @__PURE__ */ a("tr", {
38
64
  children: [/* @__PURE__ */ e("th", {
39
65
  children: "name"
40
66
  }), /* @__PURE__ */ e("th", {
@@ -42,13 +68,13 @@ const l = `
42
68
  })]
43
69
  })
44
70
  }), /* @__PURE__ */ e("tbody", {
45
- children: l.split(";").map((o) => {
46
- const i = o.trim(), [a, d] = i.split(":");
47
- return /* @__PURE__ */ r("tr", {
71
+ children: p.split(";").map((d) => {
72
+ const i = d.trim(), [r, n] = i.split(":");
73
+ return /* @__PURE__ */ a("tr", {
48
74
  children: [/* @__PURE__ */ e("td", {
49
- children: a
75
+ children: r
50
76
  }), /* @__PURE__ */ e("td", {
51
- children: d
77
+ children: n
52
78
  })]
53
79
  }, i);
54
80
  })
@@ -56,8 +82,8 @@ const l = `
56
82
  })
57
83
  });
58
84
  export {
59
- u as ThemeVariables,
85
+ c as ThemeVariables,
60
86
  f as resetCss,
61
- x as theme,
62
- l as themeStr
87
+ v as theme,
88
+ p as themeStr
63
89
  };
@@ -1,5 +1,4 @@
1
1
  import { default as React } from 'react';
2
-
3
2
  interface TimerProps {
4
3
  isPlaying?: boolean;
5
4
  duration?: number;
@@ -6,6 +6,7 @@ export type VideoPlayerProps = {
6
6
  source?: string;
7
7
  controlVideo?: (props: ControlVideoProps) => void;
8
8
  aspectRatio?: string;
9
+ onPlay?: () => void;
9
10
  };
10
11
  export declare const pauseAllVideos: () => void;
11
12
  /**
@@ -1,85 +1,85 @@
1
- import { jsxs as C, jsx as o } from "react/jsx-runtime";
2
- import { cx as E } from "@linaria/core";
3
- import { useRef as S, useState as v, useCallback as d, useEffect as y } from "react";
4
- import { eventBus as T } from "@streamlayer/sdk-web-interfaces";
1
+ import { jsxs as E, jsx as i } from "react/jsx-runtime";
2
+ import { cx as S } from "@linaria/core";
3
+ import { useRef as T, useState as d, useCallback as h, useEffect as y } from "react";
4
+ import { eventBus as L } from "@streamlayer/sdk-web-interfaces";
5
5
  import { SvgIcon as P } from "../icons/index.js";
6
- import { Container as L, ToggleIconPause as j, Player as k, Poster as H, Control as M } from "./styles.js";
7
- const A = (s, a) => {
6
+ import { Container as j, ToggleIconPause as k, Player as H, Poster as M, Control as A } from "./styles.js";
7
+ const B = (s, a) => {
8
8
  for (const t of s)
9
9
  t.isIntersecting || t.target instanceof HTMLVideoElement && !t.target.paused && (a.unobserve(t.target), t.target.pause());
10
- }, h = new IntersectionObserver(A, { threshold: 0.5 }), m = /* @__PURE__ */ new Set(), B = (s) => {
11
- h.observe(s), m.add(s);
12
- }, i = (s) => {
13
- h.unobserve(s), m.delete(s);
14
- }, F = () => {
15
- for (const s of m)
16
- s instanceof HTMLVideoElement && !s.paused && (s.pause(), i(s));
17
- }, K = ({ poster: s, source: a, aspectRatio: t, controlVideo: r }) => {
18
- const e = S(null), [c, l] = v(!1), [p, b] = v(!0), I = d(() => {
10
+ }, I = new IntersectionObserver(B, { threshold: 0.5 }), p = /* @__PURE__ */ new Set(), F = (s) => {
11
+ I.observe(s), p.add(s);
12
+ }, u = (s) => {
13
+ I.unobserve(s), p.delete(s);
14
+ }, N = () => {
15
+ for (const s of p)
16
+ s instanceof HTMLVideoElement && !s.paused && (s.pause(), u(s));
17
+ }, Q = ({ poster: s, source: a, aspectRatio: t, controlVideo: r, onPlay: c }) => {
18
+ const e = T(null), [f, l] = d(!1), [b, g] = d(!0), O = h(() => {
19
19
  r == null || r({ muted: !0 });
20
- }, [r]), u = d(() => {
20
+ }, [r]), o = h(() => {
21
21
  r == null || r({ muted: !1 });
22
- }, [r]), O = (n) => {
22
+ }, [r]), w = (n) => {
23
23
  n.stopPropagation();
24
- const g = e == null ? void 0 : e.current;
25
- if (g) {
26
- if (c)
27
- g.pause(), e.current && i(e.current);
24
+ const v = e == null ? void 0 : e.current;
25
+ if (v) {
26
+ if (f)
27
+ v.pause(), e.current && u(e.current);
28
28
  else {
29
- const f = e == null ? void 0 : e.current;
30
- if (!f)
29
+ const m = e == null ? void 0 : e.current;
30
+ if (!m)
31
31
  return;
32
- F(), B(f), f.play().catch((x) => console.log(x)), b(!1);
32
+ N(), F(m), m.play().catch((C) => console.log(C)), g(!1);
33
33
  }
34
- T.emit("interactions", {
34
+ L.emit("interactions", {
35
35
  action: "tap",
36
36
  payload: {}
37
37
  });
38
38
  }
39
- }, w = () => {
39
+ }, x = () => {
40
40
  var n;
41
- e.current && i(e.current), (n = e == null ? void 0 : e.current) == null || n.load(), b(!0);
41
+ e.current && u(e.current), (n = e == null ? void 0 : e.current) == null || n.load(), g(!0);
42
42
  };
43
43
  return y(() => {
44
- e.current && i(e.current);
44
+ e.current && u(e.current);
45
45
  }, []), y(() => {
46
46
  const n = e == null ? void 0 : e.current;
47
47
  return () => {
48
- n && (n.paused || u(), i(n));
48
+ n && (n.paused || o(), u(n));
49
49
  };
50
- }, [u]), /* @__PURE__ */ C(
51
- L,
50
+ }, [o]), /* @__PURE__ */ E(
51
+ j,
52
52
  {
53
- onClick: O,
54
- className: E(c && j),
53
+ onClick: w,
54
+ className: S(f && k),
55
55
  style: t ? { aspectRatio: t } : {},
56
56
  children: [
57
- /* @__PURE__ */ o(
58
- k,
57
+ /* @__PURE__ */ i(
58
+ H,
59
59
  {
60
60
  ref: e,
61
61
  src: a,
62
62
  onPlay: () => {
63
- I(), l(!0);
63
+ O(), l(!0), c == null || c();
64
64
  },
65
65
  onPause: () => {
66
- u(), l(!1);
66
+ o(), l(!1);
67
67
  },
68
68
  onEnded: () => {
69
- u(), l(!1), w();
69
+ o(), l(!1), x();
70
70
  },
71
- style: { visibility: p ? "hidden" : "visible" },
71
+ style: { visibility: b ? "hidden" : "visible" },
72
72
  controls: !1,
73
73
  playsInline: !0
74
74
  }
75
75
  ),
76
- /* @__PURE__ */ o(H, { src: s, style: { visibility: p ? "visible" : "hidden" } }),
77
- /* @__PURE__ */ o(M, { children: c ? /* @__PURE__ */ o(P, { name: "icon-pause" }) : /* @__PURE__ */ o(P, { name: "icon-play" }) })
76
+ /* @__PURE__ */ i(M, { src: s, style: { visibility: b ? "visible" : "hidden" } }),
77
+ /* @__PURE__ */ i(A, { children: f ? /* @__PURE__ */ i(P, { name: "icon-pause" }) : /* @__PURE__ */ i(P, { name: "icon-play" }) })
78
78
  ]
79
79
  }
80
80
  );
81
81
  };
82
82
  export {
83
- K as VideoPlayer,
84
- F as pauseAllVideos
83
+ Q as VideoPlayer,
84
+ N as pauseAllVideos
85
85
  };
@@ -1,23 +1,49 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { useMemo as u, useState as r } from "react";
3
- import { useStreamLayer as v } from "@streamlayer/react";
4
- import { Developer as c } from "./components/developer.js";
5
- import { DeveloperStorage as g } from "./storage.js";
6
- const i = () => {
7
- const e = u(() => new g(), []), [t, o] = r(e.getEnv()), [s, n] = r(e.getSdkKey() || "set-sdk-key"), [m, a] = r(e.getEvent() || "");
8
- return {
9
- env: t,
10
- setEnv: o,
11
- sdkKey: s,
12
- setSdkKey: n,
13
- event: m,
14
- setEvent: a
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { useMemo as y, useState as n, useEffect as o } from "react";
3
+ import { useStreamLayer as m } from "@streamlayer/react";
4
+ import { Developer as k } from "./components/developer.js";
5
+ import { DeveloperStorage as a } from "./storage.js";
6
+ const E = {
7
+ args: {
8
+ sdkKey: void 0,
9
+ eventId: void 0,
10
+ production: !1
11
+ },
12
+ argTypes: {
13
+ sdkKey: {
14
+ type: "string"
15
+ },
16
+ eventId: {
17
+ type: "string"
18
+ },
19
+ production: {
20
+ type: "boolean"
21
+ }
22
+ }
23
+ }, I = (e = {}) => {
24
+ const t = y(() => new a(), []), [s, d] = n(
25
+ e.production !== void 0 ? e.production ? "production" : "development" : t.getEnv()
26
+ ), [v, i] = n(e.sdkKey || t.getSdkKey() || "set-sdk-key"), [c, r] = n(e.eventId || t.getEvent() || "");
27
+ return o(() => {
28
+ e.sdkKey && (i(e.sdkKey), t.setSdkKey(e.sdkKey));
29
+ }, [e.sdkKey, t]), o(() => {
30
+ e.eventId && (r(e.eventId), t.setEvent(e.eventId));
31
+ }, [e.eventId, t]), o(() => {
32
+ e.production !== void 0 && (d(e.production ? "production" : "development"), t.setEnv(e.production ? "production" : "development"));
33
+ }, [e.production, t]), {
34
+ env: s,
35
+ setEnv: d,
36
+ sdkKey: v,
37
+ setSdkKey: i,
38
+ event: c,
39
+ setEvent: r
15
40
  };
16
- }, D = (e) => {
17
- const t = v();
18
- return /* @__PURE__ */ p(c, { sdk: t, ...e });
41
+ }, b = (e) => {
42
+ const t = m();
43
+ return /* @__PURE__ */ u(k, { sdk: t, ...e });
19
44
  };
20
45
  export {
21
- D as StreamLayerDebug,
22
- i as useStreamLayerDebug
46
+ b as StreamLayerDebug,
47
+ E as storybookOptions,
48
+ I as useStreamLayerDebug
23
49
  };