@streamlayer/react 1.1.3 → 1.1.5

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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as n, jsxs as L, Fragment as E } from "react/jsx-runtime";
2
- import { u as C, F as r2, s as u, T as j, i as i2, x as a2, b as l2, N as d2, k as c2, M as p2, g as u2, h as C2, C as v2, j as h2, O as K, m as x, l as m2, n as g2, o as L2, p as X, q as f2, r as S2, t as y2, v as U, w as k2, y as J, z as _, I as e2, c as P, A as N2, B as b2, D as z, E as A2, G as I2, H as $2, e as E2, J as T, P as Q, Q as V2, R as w2, U as R2, a as H2, V as q, W as T2, X as x2, L as F, Y as F2, Z as D2, _ as M2, $ as O2, f as D, a0 as U2, a1 as _2, S as P2, a2 as B2, a3 as G2 } from "./index2.js";
3
- import { createContext as z2, useContext as s2, useRef as $, useState as b, useEffect as k, useTransition as Q2, lazy as q2, useMemo as H, Suspense as Z2, forwardRef as Y2, useLayoutEffect as W2, useCallback as R, Component as j2 } from "react";
2
+ import { u as C, F as r2, s as u, T as j, i as i2, p as a2, b as l2, N as d2, k as c2, M as p2, g as u2, h as C2, C as v2, j as h2, O as K, m as x, l as m2, n as g2, o as L2, q as X, r as f2, t as S2, v as y2, w as U, x as k2, y as J, z as _, I as e2, c as P, A as N2, B as b2, D as z, E as A2, G as I2, H as $2, e as E2, J as T, K as q, P as V2, R as w2, U as R2, a as H2, V as Q, W as T2, X as x2, L as F, Y as F2, Z as D2, _ as M2, $ as O2, f as D, a0 as U2, a1 as _2, S as P2, a2 as B2, a3 as G2 } from "./index2.js";
3
+ import { createContext as z2, useContext as s2, useRef as $, useState as b, useEffect as k, useTransition as q2, lazy as Q2, useMemo as H, Suspense as Z2, forwardRef as Y2, useLayoutEffect as W2, useCallback as R, Component as j2 } from "react";
4
4
  import { Q as K2, S as I } from "./useStreamLayerApp2.js";
5
5
  const M = /* @__PURE__ */ u("div")({
6
6
  name: "LoadingContainer",
@@ -153,7 +153,7 @@ const M = /* @__PURE__ */ u("div")({
153
153
  };
154
154
  }, [e]), /* @__PURE__ */ n(K, { loading: !(t != null && t.summary), ...t == null ? void 0 : t.summary, successRate: (s = t == null ? void 0 : t.percentage) == null ? void 0 : s.correct });
155
155
  }, d0 = ({ gamification: e, className: s, scrollStore: t, scrollNode: o, appNode: i, style: r, responsiveStore: a }) => {
156
- const { tabsShown: p } = C(t, { keys: ["tabsShown"] }), [d, c] = b(x.HOME), [, l] = Q2(), { sdkInDesktopView: h, screen: f } = C(a, { keys: ["sdkInDesktopView"] }), S = (g) => {
156
+ const { tabsShown: p } = C(t, { keys: ["tabsShown"] }), [d, c] = b(x.HOME), [, l] = q2(), { sdkInDesktopView: h, screen: f } = C(a, { keys: ["sdkInDesktopView"] }), S = (g) => {
157
157
  l(() => {
158
158
  var y;
159
159
  c(g), h === !1 && (((y = i.current) == null ? void 0 : y.getBoundingClientRect().y) || 0) < 0 && U(i, f.size, { behavior: "instant" });
@@ -255,7 +255,7 @@ const M = /* @__PURE__ */ u("div")({
255
255
  useContainer: !a,
256
256
  children: c
257
257
  });
258
- }, v0 = q2(() => import("./gamification-feature2.js")), h0 = ({ sdk: e, feature: s, className: t, scrollStore: o, appNode: i, scrollNode: r, responsiveStore: a }) => {
258
+ }, v0 = Q2(() => import("./gamification-feature2.js")), h0 = ({ sdk: e, feature: s, className: t, scrollStore: o, appNode: i, scrollNode: r, responsiveStore: a }) => {
259
259
  const p = H(() => s && s.featureConfig.get().type === I.GAMES ? /* @__PURE__ */ n(X2, { className: t, sdk: e, feature: s, children: /* @__PURE__ */ n(
260
260
  v0,
261
261
  {
@@ -559,11 +559,11 @@ const M = /* @__PURE__ */ u("div")({
559
559
  name: "HiddenContainer",
560
560
  class: "hrthymv",
561
561
  propsAsIs: !0
562
- }), Q0 = /* @__PURE__ */ u("div")({
562
+ }), q0 = /* @__PURE__ */ u("div")({
563
563
  name: "NotificationRefreshing",
564
564
  class: "n13rok4i",
565
565
  propsAsIs: !1
566
- }), q0 = () => $2, Z0 = /* @__PURE__ */ u(q0())({
566
+ }), Q0 = () => $2, Z0 = /* @__PURE__ */ u(Q0())({
567
567
  name: "Pill",
568
568
  class: "pht79xf",
569
569
  propsAsIs: !0
@@ -597,7 +597,7 @@ const M = /* @__PURE__ */ u("div")({
597
597
  return s.type === T.QUESTION ? /* @__PURE__ */ L(E, {
598
598
  children: [/* @__PURE__ */ n(z0, {
599
599
  ref: d,
600
- children: /* @__PURE__ */ n(Q, {
600
+ children: /* @__PURE__ */ n(q, {
601
601
  ...s
602
602
  })
603
603
  }), /* @__PURE__ */ L(B0, {
@@ -609,11 +609,11 @@ const M = /* @__PURE__ */ u("div")({
609
609
  style: {
610
610
  height: "100%"
611
611
  },
612
- children: /* @__PURE__ */ n(Q, {
612
+ children: /* @__PURE__ */ n(q, {
613
613
  ...s,
614
614
  controlVideo: p == null ? void 0 : p.controlVideoPlayer
615
615
  })
616
- }), /* @__PURE__ */ n(Q0, {}, s.id)]
616
+ }), /* @__PURE__ */ n(q0, {}, s.id)]
617
617
  })]
618
618
  }) : s.type === T.QUESTION_RESOLVED && (r = (i = s.data) == null ? void 0 : i.question) != null && r.predictionResult ? /* @__PURE__ */ n(V2, {
619
619
  style: {
@@ -805,10 +805,10 @@ const M = /* @__PURE__ */ u("div")({
805
805
  ${e}
806
806
  --color-${s.toLowerCase().replaceAll("_", "-")}: ${t};
807
807
  `, "");
808
- `${s1}${w.REGULAR}${w.REGULAR}${w.COLOR}${w.SERIF}${w.WEIGHT_DEFAULT}${q.down("xl")`
808
+ `${s1}${w.REGULAR}${w.REGULAR}${w.COLOR}${w.SERIF}${w.WEIGHT_DEFAULT}${Q.down("xl")`
809
809
  --header-offset: 56px;
810
810
  --watch-live-header: 46px;
811
- `}${q.intermediate("xl", "lg")`
811
+ `}${Q.intermediate("xl", "lg")`
812
812
  --header-offset: 76px;
813
813
  `}`;
814
814
  const t1 = "m1ojpy2l", n1 = ({ children: e, style: s }) => /* @__PURE__ */ n("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ n("div", { className: t1, style: s, children: e }) }), o1 = ({ sdk: e, className: s, scrollStore: t, appNode: o, scrollNode: i, responsiveStore: r }) => {
package/lib/es/points.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
2
  import { useState as p, useEffect as u } from "react";
3
3
  import { s as t, c as m, f as d, d as f, u as S, F as y } from "./index2.js";
4
- import { u as v, i as h } from "./app.js";
4
+ import { u as v, d as h } from "./app.js";
5
5
  import { S as g } from "./useStreamLayerApp2.js";
6
6
  const A = /* @__PURE__ */ t("div")({
7
7
  name: "PointsContainer",
@@ -46,14 +46,14 @@ const A = /* @__PURE__ */ t("div")({
46
46
  }, [e]), /* @__PURE__ */ r(F, { points: i, onClick: () => {
47
47
  s.status.get() === y.Suspended && s.openFeature();
48
48
  } });
49
- }, j = ({ sdk: s }) => {
49
+ }, $ = ({ sdk: s }) => {
50
50
  if (!S(s.featuresList.getStore()))
51
51
  return null;
52
52
  const e = s.getFeature(g.GAMES);
53
53
  return e ? /* @__PURE__ */ r(L, { gamification: e }) : null;
54
54
  }, K = () => {
55
55
  const s = v();
56
- return s ? /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(j, { sdk: s }) }) }) : null;
56
+ return s ? /* @__PURE__ */ r("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r($, { sdk: s }) }) }) : null;
57
57
  };
58
58
  export {
59
59
  K as StreamLayerSDKPoints