@streamlayer/react-ui 0.91.1 → 0.93.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/assets/style.css +1 -1
- package/lib/index-keh7OLCY.js +67 -0
- package/lib/index.js +5 -4
- package/lib/ui/app/Features/Gamification/Friends.d.ts +2 -1
- package/lib/ui/app/Features/Gamification/Friends.js +6 -6
- package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +3 -2
- package/lib/ui/app/Features/Gamification/Leaderboard.js +26 -24
- package/lib/ui/app/Features/Gamification/Question.js +1 -1
- package/lib/ui/app/Features/Gamification/Tabs.d.ts +7 -2
- package/lib/ui/app/Features/Gamification/Tabs.js +42 -31
- package/lib/ui/app/Features/Gamification/gamification-feature.js +5 -2
- package/lib/ui/app/Features/Gamification/index.d.ts +6 -2
- package/lib/ui/app/Features/Gamification/index.js +86 -45
- package/lib/ui/app/Features/index.d.ts +6 -2
- package/lib/ui/app/Features/index.js +13 -11
- package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +3 -2
- package/lib/ui/app/Navigation/MastersNavigation/index.js +37 -31
- package/lib/ui/app/Navigation/index.js +6 -7
- package/lib/ui/app/Notifications/Onboarding/index.d.ts +2 -1
- package/lib/ui/app/Notifications/Onboarding/index.js +91 -73
- package/lib/ui/app/Notifications/index.d.ts +6 -2
- package/lib/ui/app/Notifications/index.js +120 -91
- package/lib/ui/app/Points/index.js +6 -5
- package/lib/ui/app/masters.d.ts +7 -0
- package/lib/ui/app/masters.js +73 -51
- package/lib/ui/app/styles.d.ts +1 -0
- package/lib/ui/app/styles.js +6 -1
- package/lib/ui/app/useClipboardCopy.d.ts +2 -1
- package/lib/ui/app/useImagesPreload.d.ts +4 -0
- package/lib/ui/app/useImagesPreload.js +23 -0
- package/lib/ui/app/useMastersApp.js +15 -14
- package/lib/ui/app/useSdkResponsive.d.ts +14 -0
- package/lib/ui/app/useSdkResponsive.js +46 -0
- package/lib/ui/app/useSdkScroll.d.ts +4 -1
- package/lib/ui/app/useSdkScroll.js +36 -85
- package/lib/ui/gamification/detail/header/index.js +11 -11
- package/lib/ui/gamification/detail/header/styles.d.ts +1 -1
- package/lib/ui/gamification/detail/header/styles.js +11 -11
- package/lib/ui/gamification/leaderboard/static.d.ts +2 -1
- package/lib/ui/gamification/onboarding/index.d.ts +5 -0
- package/lib/ui/gamification/onboarding/index.js +69 -42
- package/lib/ui/gamification/onboarding/invitingUser/index.d.ts +7 -0
- package/lib/ui/gamification/onboarding/invitingUser/index.js +16 -0
- package/lib/ui/gamification/onboarding/invitingUser/styles.d.ts +5 -0
- package/lib/ui/gamification/onboarding/invitingUser/styles.js +24 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +15 -13
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +9 -9
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.d.ts +2 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.d.ts +2 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +18 -12
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.d.ts +7 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +10 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.d.ts +5 -0
- package/lib/ui/gamification/onboarding/slides/onboarding-terms/styles.js +24 -0
- package/lib/ui/gamification/points/index.js +5 -4
- package/lib/ui/gamification/question/insight/index.js +5 -5
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +17 -17
- package/lib/ui/gamification/question/notification/prediction-result/index.js +37 -39
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +1 -1
- package/lib/ui/gamification/question/notification/prediction-result/styles.js +12 -12
- package/lib/ui/gamification/vote/index.js +55 -54
- package/lib/ui/gamification/vote/insight-details/index.js +1 -1
- package/lib/ui/gamification/vote/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/styles.js +17 -11
- package/lib/ui/gamification/vote/vote-option/index.js +62 -58
- package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -0
- package/lib/ui/gamification/vote/win-bar/index.js +21 -20
- package/lib/ui/navigation/button/LeaderBoard.js +5 -6
- package/lib/ui/navigation/index.js +6 -7
- package/lib/ui/navigation/masters.d.ts +2 -1
- package/lib/ui/navigation/masters.js +9 -6
- package/lib/ui/questions/insight/index.d.ts +1 -1
- package/lib/ui/questions/insight/index.js +18 -25
- package/lib/ui/skeleton/index.d.ts +7 -0
- package/lib/ui/skeleton/index.js +7 -0
- package/lib/ui/skeleton/styles.d.ts +2 -0
- package/lib/ui/skeleton/styles.js +9 -0
- package/lib/ui/theme/breakpoints.d.ts +4 -1
- package/lib/ui/theme/breakpoints.js +24 -12
- package/lib/ui/theme/constants.d.ts +4 -0
- package/lib/ui/theme/constants.js +6 -2
- package/lib/ui/theme/index.js +4 -3
- package/lib/ui/theme/theme.js +29 -21
- package/lib/utils/createDemo.js +12 -13
- package/lib/utils/debug/components/copyLogs.js +10 -9
- package/lib/utils/decorators/container.js +4 -3
- package/package.json +18 -18
- package/lib/LeaderBoard_fzzlxb-w40geAFS.js +0 -1
- package/lib/index_ej4hfx-w40geAFS.js +0 -1
- package/lib/masters_m6itlr-w40geAFS.js +0 -1
- package/lib/utils/useStreamLayerApp.js +0 -25
package/lib/utils/createDemo.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, jsxs as g, Fragment as y } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as u, useState as i, useEffect as E } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { useStreamLayerApp as l } from "@streamlayer/react/useStreamLayerApp";
|
|
4
|
+
import { anonymous as D } from "@streamlayer/sdk-web-anonymous-auth";
|
|
5
|
+
import { Developer as w } from "./debug/components/developer.js";
|
|
6
|
+
import { DeveloperStorage as x } from "./storage.js";
|
|
7
7
|
import "@linaria/react";
|
|
8
8
|
import "./debug/components/bypassLogin.js";
|
|
9
9
|
import "./debug/components/copyLogs.js";
|
|
@@ -14,36 +14,35 @@ import "@nanostores/react";
|
|
|
14
14
|
import "@streamlayer/sdk-web-core";
|
|
15
15
|
import "./debug/components/sdkKey.js";
|
|
16
16
|
import "@streamlayer/sdk-web-storage";
|
|
17
|
-
import "@streamlayer/sdk-web";
|
|
18
17
|
function K({
|
|
19
18
|
Component: o,
|
|
20
19
|
Story: r,
|
|
21
20
|
args: n,
|
|
22
21
|
autoEnable: a
|
|
23
22
|
}) {
|
|
24
|
-
const
|
|
23
|
+
const s = u(() => new x(), []), [p, f] = i(s.getEnv()), [c, v] = i(s.getSdkKey() || "set-sdk-key"), [m, k] = i(s.getEvent() || ""), S = u(() => {
|
|
25
24
|
const d = /* @__PURE__ */ new Set();
|
|
26
|
-
return d.add(
|
|
27
|
-
}, []), t =
|
|
25
|
+
return d.add(D), d;
|
|
26
|
+
}, []), t = l(c, S, p === "production", a);
|
|
28
27
|
return E(() => {
|
|
29
|
-
|
|
28
|
+
m && t && t.createEventSession(m);
|
|
30
29
|
}, [t]), /* @__PURE__ */ g(y, { children: [
|
|
31
30
|
t ? /* @__PURE__ */ e(o, { Story: r, sdk: t, args: n }) : /* @__PURE__ */ e("div", { children: "wait sdk..." }),
|
|
32
31
|
/* @__PURE__ */ e(
|
|
33
|
-
|
|
32
|
+
w,
|
|
34
33
|
{
|
|
35
34
|
sdk: t,
|
|
36
35
|
sdkKey: c,
|
|
37
36
|
setSdkKey: v,
|
|
38
37
|
env: p,
|
|
39
38
|
setEnv: f,
|
|
40
|
-
event:
|
|
39
|
+
event: m,
|
|
41
40
|
setEvent: k
|
|
42
41
|
}
|
|
43
42
|
)
|
|
44
43
|
] });
|
|
45
44
|
}
|
|
46
|
-
function
|
|
45
|
+
function O(o, r = !0) {
|
|
47
46
|
return {
|
|
48
47
|
decorators: [
|
|
49
48
|
(n) => /* @__PURE__ */ e(K, { Story: n, Component: o, autoEnable: r })
|
|
@@ -51,5 +50,5 @@ function P(o, r = !0) {
|
|
|
51
50
|
};
|
|
52
51
|
}
|
|
53
52
|
export {
|
|
54
|
-
|
|
53
|
+
O as createDemo
|
|
55
54
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { InputField as
|
|
1
|
+
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { InputField as r } from "./styles.js";
|
|
3
3
|
import "@linaria/react";
|
|
4
|
-
const
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
const p = () => /* @__PURE__ */ t(r, { children: [
|
|
5
|
+
/* @__PURE__ */ o("label", { children: "Subscription Logs" }),
|
|
6
|
+
/* @__PURE__ */ o("button", { onClick: () => {
|
|
7
|
+
navigator.clipboard.writeText(sessionStorage.getItem("slstreamlogs") || "").then(() => {
|
|
8
|
+
alert("Subscription Logs Copied to clipboard");
|
|
9
|
+
});
|
|
10
|
+
}, children: "Copy" })
|
|
10
11
|
] });
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
p as CopyLogs
|
|
13
14
|
};
|
|
@@ -2,10 +2,11 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { StreamLayerThemeProvider as o } from "../../ui/theme/index.js";
|
|
3
3
|
import { AppContainer as t } from "./styles.js";
|
|
4
4
|
import "../../ui/theme/theme.js";
|
|
5
|
+
import "../../ui/theme/breakpoints.js";
|
|
5
6
|
import "../../ui/theme/constants.js";
|
|
6
7
|
import "@linaria/react";
|
|
7
|
-
const
|
|
8
|
+
const a = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(e, {}) }), l = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(e, {}) }) }) });
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
l as container,
|
|
11
|
+
a as theme
|
|
11
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
],
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@lottiefiles/react-lottie-player": "*",
|
|
39
|
-
"@streamlayer/sl-eslib": "^5.
|
|
39
|
+
"@streamlayer/sl-eslib": "^5.64.1",
|
|
40
40
|
"@types/lodash.throttle": "^4.1.9",
|
|
41
41
|
"lodash.throttle": "^4.1.1",
|
|
42
42
|
"react-infinite-scroller": "^1.2.6",
|
|
43
43
|
"react-virtualized-auto-sizer": "^1.0.21",
|
|
44
44
|
"react-window": "^1.8.10",
|
|
45
45
|
"react-window-infinite-loader": "^1.0.9",
|
|
46
|
-
"@streamlayer/feature-gamification": "^0.
|
|
47
|
-
"@streamlayer/sdk-web": "^0.30.
|
|
48
|
-
"@streamlayer/sdk-web-anonymous-auth": "^0.11.
|
|
49
|
-
"@streamlayer/sdk-web-api": "^0.
|
|
50
|
-
"@streamlayer/sdk-web-core": "^0.18.
|
|
51
|
-
"@streamlayer/sdk-web-features": "^0.11.
|
|
52
|
-
"@streamlayer/sdk-web-
|
|
53
|
-
"@streamlayer/sdk-web-notifications": "^0.13.
|
|
54
|
-
"@streamlayer/sdk-web-
|
|
55
|
-
"@streamlayer/sdk-web-
|
|
56
|
-
"@streamlayer/sdk-web-
|
|
46
|
+
"@streamlayer/feature-gamification": "^0.35.1",
|
|
47
|
+
"@streamlayer/sdk-web": "^0.30.2",
|
|
48
|
+
"@streamlayer/sdk-web-anonymous-auth": "^0.11.34",
|
|
49
|
+
"@streamlayer/sdk-web-api": "^0.20.1",
|
|
50
|
+
"@streamlayer/sdk-web-core": "^0.18.2",
|
|
51
|
+
"@streamlayer/sdk-web-features": "^0.11.16",
|
|
52
|
+
"@streamlayer/sdk-web-interfaces": "^0.20.1",
|
|
53
|
+
"@streamlayer/sdk-web-notifications": "^0.13.7",
|
|
54
|
+
"@streamlayer/sdk-web-logger": "^0.5.12",
|
|
55
|
+
"@streamlayer/sdk-web-storage": "^0.3.12",
|
|
56
|
+
"@streamlayer/sdk-web-types": "^0.21.1"
|
|
57
57
|
},
|
|
58
58
|
"nx": {
|
|
59
59
|
"implicitDependencies": [
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"@linaria/core": "^6.0.0",
|
|
70
70
|
"@linaria/react": "^6.0.0",
|
|
71
71
|
"@nanostores/react": "^0.7.1",
|
|
72
|
-
"@storybook/addon-docs": "^7.6.
|
|
72
|
+
"@storybook/addon-docs": "^7.6.11",
|
|
73
73
|
"@storybook/addon-styling": "^1.3.7",
|
|
74
|
-
"@storybook/addon-viewport": "^7.6.
|
|
75
|
-
"@storybook/blocks": "^7.6.
|
|
74
|
+
"@storybook/addon-viewport": "^7.6.11",
|
|
75
|
+
"@storybook/blocks": "^7.6.11",
|
|
76
76
|
"@storybook/jest": "^0.2.3",
|
|
77
|
-
"@storybook/react": "^7.6.
|
|
77
|
+
"@storybook/react": "^7.6.11",
|
|
78
78
|
"@storybook/testing-library": "^0.2.2",
|
|
79
79
|
"@types/react-infinite-scroller": "^1.2.5",
|
|
80
80
|
"@types/react-window": "^1.8.8",
|
|
@@ -94,6 +94,6 @@
|
|
|
94
94
|
"vite-plugin-svgr": "^4.2.0",
|
|
95
95
|
"vite-svg-loader": "^5.1.0",
|
|
96
96
|
"vite-tsconfig-paths": "^4.3.1",
|
|
97
|
-
"@streamlayer/react": "^0.
|
|
97
|
+
"@streamlayer/react": "^0.37.1"
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { useState as i, useEffect as u } from "react";
|
|
2
|
-
import { StreamLayer as l } from "@streamlayer/sdk-web";
|
|
3
|
-
const h = (t, r, n, f) => {
|
|
4
|
-
const [c, a] = i(null);
|
|
5
|
-
return u(() => {
|
|
6
|
-
let s = !1;
|
|
7
|
-
if (!t)
|
|
8
|
-
throw new Error("sdk key should be provided");
|
|
9
|
-
const o = l(t, n, f);
|
|
10
|
-
if (r)
|
|
11
|
-
for (const e of r)
|
|
12
|
-
o.use(e);
|
|
13
|
-
return o.ready().then((e) => {
|
|
14
|
-
s || a(e.sdk);
|
|
15
|
-
}).catch((e) => console.log(e)), () => {
|
|
16
|
-
s = !0, o.close(function(e) {
|
|
17
|
-
if (e)
|
|
18
|
-
throw e;
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
}, [t, n]), c;
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
h as useStreamLayerApp
|
|
25
|
-
};
|