@streamlayer/react 0.40.1 → 0.40.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index2.js CHANGED
@@ -1,28 +1,41 @@
1
1
  import { jsx as T } from "react/jsx-runtime";
2
- import { createContext as G, useMemo as d, useEffect as O } from "react";
2
+ import { createContext as d, useMemo as O, useEffect as a } from "react";
3
3
  import { useStreamLayerApp as c } from "./useStreamLayerApp.js";
4
- var f = /* @__PURE__ */ ((R) => (R[R.UNSET = 0] = "UNSET", R[R.CONNECTED = 1] = "CONNECTED", R[R.READY = 2] = "READY", R))(f || {});
5
- const B = G({
4
+ var B = /* @__PURE__ */ ((R) => (R[R.UNSET = 0] = "UNSET", R[R.CONNECTED = 1] = "CONNECTED", R[R.READY = 2] = "READY", R))(B || {});
5
+ const Y = d({
6
6
  status: 0,
7
7
  sdk: null
8
8
  }), P = ({
9
9
  sdkKey: R,
10
10
  plugins: E,
11
- children: A,
11
+ children: t,
12
12
  production: n = !0,
13
- autoEnable: s = !0,
14
- onDeepLinkHandled: _,
15
- videoPlayerController: r
13
+ autoEnable: S = !0,
14
+ onDeepLinkHandled: A,
15
+ videoPlayerController: _
16
16
  }) => {
17
- const e = c(R, E, n, s), S = d(() => e ? (r && e.addVideoPlayerController(r), _ && e.addDeepLinkHandler(_), {
17
+ const e = c({
18
+ sdkKey: R,
19
+ plugins: E,
20
+ production: n,
21
+ autoEnable: S,
22
+ onDeepLinkHandled: A,
23
+ videoPlayerController: _
24
+ }), G = O(() => e ? {
18
25
  sdk: e,
19
26
  status: 2
20
27
  /* READY */
21
- }) : { status: 1, sdk: null }, [e]);
22
- return O(() => () => {
23
- _ && (e == null || e.removeDeepLinkHandler(_)), r && (e == null || e.removeVideoPlayerController(r));
24
- }, [e]), /* @__PURE__ */ T(B.Provider, { value: S, children: A });
25
- }, D = {
28
+ } : { status: 1, sdk: null }, [e]);
29
+ return a(() => () => {
30
+ A && (e == null || e.removeDeepLinkHandler(A)), _ && (e == null || e.removeVideoPlayerController(_));
31
+ }, [e]), a(() => {
32
+ console.log("StreamLayerProvider mounted with props:", {
33
+ sdkKey: !!R,
34
+ onDeepLinkHandled: !!A,
35
+ videoPlayerController: !!_
36
+ });
37
+ }, [R, A, _]), /* @__PURE__ */ T(Y.Provider, { value: G, children: t });
38
+ }, f = {
26
39
  BG_TRANSPARENT: "rgba(0,0,0, .8)",
27
40
  BG_TRANSPARENT_VOTE_CONTAINER: "rgba(10, 14, 19, 0.8)",
28
41
  BG_TRANSPARENT_ITEM: "rgba(0, 0, 0, 0.7)",
@@ -51,7 +64,7 @@ const B = G({
51
64
  GREY_PRIMARY: "#909395",
52
65
  DIVIDER_COLOR_SECONDARY: "#53565a",
53
66
  GREEN_PRIMARY_BTN: "#009B77"
54
- }, Y = {
67
+ }, D = {
55
68
  PRIMARY_GREEN1: "#107D57",
56
69
  PRIMARY_GREEN2: "#006747",
57
70
  PRIMARY_GREEN3: "#1C4932",
@@ -73,7 +86,7 @@ const B = G({
73
86
  NEUTRALS_GRAY8: "#53565A",
74
87
  NEUTRALS_GRAY9: "#25282A",
75
88
  NEUTRALS_BLACK: "#000000"
76
- }, o = Object.assign({}, D, Y), t = {
89
+ }, s = Object.assign({}, f, D), r = {
77
90
  REGULAR: "'Benton Sans', BentonSans, Arial, Helvetica, sans-serif",
78
91
  SERIF: "'Tiempos', 'Tiempos Text', Times New Roman, serif",
79
92
  COLOR: "#fff",
@@ -85,53 +98,53 @@ const B = G({
85
98
  lg: 992,
86
99
  xl: 1215,
87
100
  xxl: 1440
88
- }, C = {
101
+ }, m = {
89
102
  landscape: "landscape",
90
103
  portrait: "portrait"
91
- }, l = Object.keys(o).reduce((R, E) => {
92
- const A = o[E];
104
+ }, p = Object.keys(s).reduce((R, E) => {
105
+ const t = s[E];
93
106
  return `
94
107
  ${R}
95
- --color-${E.toLowerCase().replaceAll("_", "-")}: ${A};
108
+ --color-${E.toLowerCase().replaceAll("_", "-")}: ${t};
96
109
  `;
97
- }, ""), a = (R) => (E) => `
110
+ }, ""), o = (R) => (E) => `
98
111
  @media only screen and (${R}) {
99
112
  ${E}
100
113
  }
101
- `, p = (R, E) => (A) => `
114
+ `, C = (R, E) => (t) => `
102
115
  @media only screen and (${R}) and (${E}) {
103
- ${A}
116
+ ${t}
104
117
  }
105
118
  `, i = {
106
119
  up: (R) => {
107
120
  const E = N[R];
108
- return a(`min-width: ${E}px`);
121
+ return o(`min-width: ${E}px`);
109
122
  },
110
123
  down: (R) => {
111
124
  const E = N[R] - 1;
112
- return a(`max-width: ${E}px`);
125
+ return o(`max-width: ${E}px`);
113
126
  },
114
127
  intermediate: (R, E) => {
115
- const A = N[R] - 1, n = N[E];
116
- return p(`max-width: ${A}px`, `min-width: ${n}px`);
128
+ const t = N[R] - 1, n = N[E];
129
+ return C(`max-width: ${t}px`, `min-width: ${n}px`);
117
130
  },
118
131
  orientation: (R) => {
119
- const E = C[R];
120
- return a(`orientation: ${E}`);
132
+ const E = m[R];
133
+ return o(`orientation: ${E}`);
121
134
  }
122
135
  };
123
- `${l}${t.REGULAR}${t.REGULAR}${t.COLOR}${t.SERIF}${t.WEIGHT_DEFAULT}${i.down("xl")`
136
+ `${p}${r.REGULAR}${r.REGULAR}${r.COLOR}${r.SERIF}${r.WEIGHT_DEFAULT}${i.down("xl")`
124
137
  --header-offset: 56px;
125
138
  `}${i.intermediate("xl", "lg")`
126
139
  --header-offset: 76px;
127
140
  `}`;
128
- const U = "StreamLayerCSSReset", F = "ttkj0ah", u = ({ children: R, style: E }) => /* @__PURE__ */ T("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ T("div", { className: F, style: E, children: R }) });
141
+ const u = "StreamLayerCSSReset", F = "ttkj0ah", U = ({ children: R, style: E }) => /* @__PURE__ */ T("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ T("div", { className: F, style: E, children: R }) });
129
142
  export {
130
- o as E,
143
+ s as E,
131
144
  N as O,
132
145
  P as S,
133
- B as a,
134
- f as b,
135
- U as m,
136
- u as p
146
+ Y as a,
147
+ B as b,
148
+ u as m,
149
+ U as p
137
150
  };