@streamlayer/react-ui 1.10.0 → 1.11.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.
- package/lib/app/app/Features/Gamification/Tabs.js +13 -13
- package/lib/app/app/Features/Gamification/index.js +66 -62
- package/lib/app/app/Navigation/index.d.ts +4 -0
- package/lib/app/app/Navigation/index.js +88 -48
- package/lib/app/app/index.js +82 -79
- package/lib/app/app/story/index.js +27 -24
- package/lib/app/app/useApp.d.ts +2 -0
- package/lib/app/app/useApp.js +8 -7
- package/lib/app/app/useAppContext.d.ts +2 -0
- package/lib/app/app/useAppContext.js +6 -5
- package/lib/assets/style.css +1 -1
- package/lib/ui/navigation/button/FeaturedGroups.d.ts +1 -1
- package/lib/ui/navigation/index.d.ts +5 -3
- package/lib/ui/navigation/index.js +11 -12
- package/lib/ui/navigation/masters.js +1 -1
- package/lib/ui/navigation/styles.d.ts +5 -0
- package/lib/ui/navigation/styles.js +16 -0
- package/lib/ui/theme/theme.js +8 -10
- package/package.json +14 -14
- package/lib/app/app/Navigation/SDKPillNode.d.ts +0 -1
- package/lib/app/app/Navigation/SDKPillNode.js +0 -9
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { styled as t } from "@linaria/react";
|
|
3
3
|
import { useEffect as i } from "react";
|
|
4
|
-
import { StreamLayerProvider as l, useStreamLayer as p } from "@streamlayer/react";
|
|
4
|
+
import { StreamLayerProvider as l, useStreamLayer as p, StreamLayerSDKEvent as m } from "@streamlayer/react";
|
|
5
5
|
import { App as c } from "../index.js";
|
|
6
|
-
import { StreamLayerThemeProvider as
|
|
7
|
-
import { useStreamLayerDebug as
|
|
8
|
-
import { Video as
|
|
9
|
-
const
|
|
6
|
+
import { StreamLayerThemeProvider as f } from "../../../ui/theme/index.js";
|
|
7
|
+
import { useStreamLayerDebug as u } from "../../../utils/debug/index.js";
|
|
8
|
+
import { Video as y } from "./video.js";
|
|
9
|
+
const a = () => {
|
|
10
10
|
console.log("deep link handled cb");
|
|
11
|
-
},
|
|
11
|
+
}, h = () => {
|
|
12
12
|
console.log("video player handled cb");
|
|
13
13
|
}, v = ({
|
|
14
14
|
event: o
|
|
@@ -16,44 +16,47 @@ const s = () => {
|
|
|
16
16
|
const e = p();
|
|
17
17
|
return i(() => {
|
|
18
18
|
e && e.openFeature(12);
|
|
19
|
-
}, [e]), e ? /* @__PURE__ */
|
|
20
|
-
children: /* @__PURE__ */ r(
|
|
19
|
+
}, [e, o]), e ? /* @__PURE__ */ s(f, {
|
|
20
|
+
children: [/* @__PURE__ */ r(m, {
|
|
21
|
+
event: o
|
|
22
|
+
}), /* @__PURE__ */ r(c, {
|
|
21
23
|
sdk: e,
|
|
22
24
|
event: o,
|
|
23
|
-
onDeepLinkHandled:
|
|
24
|
-
})
|
|
25
|
+
onDeepLinkHandled: a
|
|
26
|
+
})]
|
|
25
27
|
}) : null;
|
|
26
|
-
},
|
|
28
|
+
}, A = /* @__PURE__ */ t("div")({
|
|
27
29
|
name: "Container",
|
|
28
30
|
class: "c1a4qh28",
|
|
29
31
|
propsAsIs: !1
|
|
30
|
-
}),
|
|
32
|
+
}), S = /* @__PURE__ */ t("div")({
|
|
31
33
|
name: "Body",
|
|
32
34
|
class: "b9h8kuk",
|
|
33
35
|
propsAsIs: !1
|
|
34
|
-
}),
|
|
36
|
+
}), k = /* @__PURE__ */ t("div")({
|
|
35
37
|
name: "AppContainer",
|
|
36
38
|
class: "a1wkro2j",
|
|
37
39
|
propsAsIs: !1
|
|
38
|
-
}),
|
|
40
|
+
}), j = ({
|
|
39
41
|
sdkKey: o,
|
|
40
42
|
eventId: e,
|
|
41
|
-
production:
|
|
43
|
+
production: d
|
|
42
44
|
}) => {
|
|
43
|
-
const n =
|
|
45
|
+
const n = u({
|
|
44
46
|
sdkKey: o,
|
|
45
47
|
eventId: e,
|
|
46
|
-
production:
|
|
48
|
+
production: d
|
|
47
49
|
});
|
|
48
50
|
return /* @__PURE__ */ r(l, {
|
|
49
51
|
sdkKey: n.sdkKey,
|
|
50
52
|
production: n.env === "production",
|
|
51
53
|
autoEnable: !0,
|
|
52
|
-
onDeepLinkHandled:
|
|
53
|
-
videoPlayerController:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
onDeepLinkHandled: a,
|
|
55
|
+
videoPlayerController: h,
|
|
56
|
+
withAd: !1,
|
|
57
|
+
children: /* @__PURE__ */ s(S, {
|
|
58
|
+
children: [/* @__PURE__ */ r(y, {}), /* @__PURE__ */ r(A, {
|
|
59
|
+
children: /* @__PURE__ */ r(k, {
|
|
57
60
|
className: "StreamLayerSDK",
|
|
58
61
|
children: /* @__PURE__ */ r(v, {
|
|
59
62
|
event: n.event
|
|
@@ -64,5 +67,5 @@ const s = () => {
|
|
|
64
67
|
});
|
|
65
68
|
};
|
|
66
69
|
export {
|
|
67
|
-
|
|
70
|
+
j as AppStory
|
|
68
71
|
};
|
package/lib/app/app/useApp.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2
|
+
import { FeatureType } from '@streamlayer/sdk-web-types';
|
|
2
3
|
export declare const useAppApp: (sdk: StreamLayerSDK) => {
|
|
3
4
|
sdkReady: boolean;
|
|
5
|
+
activeFeature: FeatureType | undefined;
|
|
4
6
|
isLogged: boolean;
|
|
5
7
|
};
|
package/lib/app/app/useApp.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { useStore as
|
|
1
|
+
import { useStore as o } from "@nanostores/react";
|
|
2
2
|
import { useEffect as S } from "react";
|
|
3
|
-
import { FeatureType as
|
|
3
|
+
import { FeatureType as s } from "@streamlayer/sdk-web-types";
|
|
4
4
|
const A = (e) => {
|
|
5
|
-
const u =
|
|
5
|
+
const u = o(e.status), a = o(e.sdkStore.slStreamId), c = o(e.userId()), r = o(e.getActiveFeature()), n = u === "ready" && !!a.data;
|
|
6
6
|
return S(() => {
|
|
7
|
-
const t = e.getFeature(
|
|
8
|
-
t &&
|
|
9
|
-
p &&
|
|
7
|
+
const t = e.getFeature(s.GAMES);
|
|
8
|
+
t && r !== s.GAMES && (t.closeQuestion(), t.closeUser()), t == null || t.openedQuestionId.subscribe((p) => {
|
|
9
|
+
p && r !== s.GAMES && e.openFeature(s.GAMES);
|
|
10
10
|
});
|
|
11
|
-
}, [
|
|
11
|
+
}, [r, e]), {
|
|
12
12
|
sdkReady: n,
|
|
13
|
+
activeFeature: r,
|
|
13
14
|
isLogged: !!c
|
|
14
15
|
};
|
|
15
16
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
|
|
2
2
|
export declare const AppContext: import('react').Context<{
|
|
3
3
|
sdk: StreamLayerSDK | null;
|
|
4
|
+
topNavigation?: boolean;
|
|
4
5
|
}>;
|
|
5
6
|
export declare const useAppContext: () => {
|
|
6
7
|
sdk: StreamLayerSDK | null;
|
|
8
|
+
topNavigation?: boolean;
|
|
7
9
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { createContext as t, useContext as
|
|
2
|
-
const
|
|
3
|
-
sdk: null
|
|
4
|
-
|
|
1
|
+
import { createContext as t, useContext as o } from "react";
|
|
2
|
+
const e = t({
|
|
3
|
+
sdk: null,
|
|
4
|
+
topNavigation: !1
|
|
5
|
+
}), p = () => o(e);
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
e as AppContext,
|
|
7
8
|
p as useAppContext
|
|
8
9
|
};
|