@streamlayer/react-ui 0.98.1 → 0.99.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 (109) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/{index-jRXrW6ie.js → index-Bicco-Aq.js} +1 -1
  3. package/lib/{index-z0QjLiEL.js → index-CZvwzN5o.js} +1 -1
  4. package/lib/index.js +4 -8
  5. package/lib/ui/app/Features/Gamification/Friends.js +10 -23
  6. package/lib/ui/app/Features/Gamification/Leaderboard.js +30 -45
  7. package/lib/ui/app/Features/Gamification/Question.js +31 -63
  8. package/lib/ui/app/Features/Gamification/QuestionsList.js +8 -34
  9. package/lib/ui/app/Features/Gamification/Tabs.js +25 -82
  10. package/lib/ui/app/Features/Gamification/UserSummary.js +12 -21
  11. package/lib/ui/app/Features/Gamification/gamification-feature.js +2 -93
  12. package/lib/ui/app/Features/Gamification/index.js +52 -133
  13. package/lib/ui/app/Features/index.js +21 -109
  14. package/lib/ui/app/Navigation/MastersNavigation/index.js +16 -22
  15. package/lib/ui/app/Navigation/index.js +9 -12
  16. package/lib/ui/app/Notifications/Onboarding/Notification/index.js +13 -16
  17. package/lib/ui/app/Notifications/Onboarding/Notification/styles.js +18 -20
  18. package/lib/ui/app/Notifications/Onboarding/index.js +55 -82
  19. package/lib/ui/app/Notifications/index.js +96 -148
  20. package/lib/ui/app/Notifications/styles.js +10 -15
  21. package/lib/ui/app/Points/index.js +18 -26
  22. package/lib/ui/app/masters.js +60 -179
  23. package/lib/ui/app/useClipboardCopy.js +11 -15
  24. package/lib/ui/app/useMastersApp.js +34 -44
  25. package/lib/ui/app/useSdkResponsive.js +18 -19
  26. package/lib/ui/app/useSdkScroll.js +5 -6
  27. package/lib/ui/button/index.js +3 -4
  28. package/lib/ui/gamification/copyNotification/index.js +5 -7
  29. package/lib/ui/gamification/detail/header/index.js +15 -18
  30. package/lib/ui/gamification/detail/header/styles.js +12 -14
  31. package/lib/ui/gamification/detail/sponsor/index.js +2 -3
  32. package/lib/ui/gamification/insight/index.js +5 -6
  33. package/lib/ui/gamification/insight-list/index.js +3 -6
  34. package/lib/ui/gamification/invite-link/index.js +11 -17
  35. package/lib/ui/gamification/invite-link/styles.js +13 -15
  36. package/lib/ui/gamification/leaderboard/index.js +21 -28
  37. package/lib/ui/gamification/leaderboard/list-item/index.js +19 -22
  38. package/lib/ui/gamification/leaderboard/list-item/styles.js +16 -18
  39. package/lib/ui/gamification/leaderboard/static.js +19 -23
  40. package/lib/ui/gamification/leaderboard/styles.js +1 -1
  41. package/lib/ui/gamification/onboarding/index.js +51 -73
  42. package/lib/ui/gamification/onboarding/invitingUser/index.js +10 -11
  43. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +3 -2
  44. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +17 -20
  45. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +2 -0
  46. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +21 -11
  47. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/index.js +21 -30
  48. package/lib/ui/gamification/onboarding/slides/onboarding-invite-card/styles.js +22 -24
  49. package/lib/ui/gamification/onboarding/slides/onboarding-rules/index.js +5 -7
  50. package/lib/ui/gamification/onboarding/slides/onboarding-terms/index.js +2 -3
  51. package/lib/ui/gamification/onboarding/styles.js +14 -17
  52. package/lib/ui/gamification/points/index.js +9 -15
  53. package/lib/ui/gamification/points/styles.js +12 -14
  54. package/lib/ui/gamification/question/index.js +22 -26
  55. package/lib/ui/gamification/question/insight/index.js +7 -15
  56. package/lib/ui/gamification/question/list/index.js +33 -54
  57. package/lib/ui/gamification/question/notification/index.js +22 -35
  58. package/lib/ui/gamification/question/notification/insight/index.js +12 -17
  59. package/lib/ui/gamification/question/notification/pill/index.js +7 -9
  60. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +11 -12
  61. package/lib/ui/gamification/question/notification/prediction-result/index.js +45 -51
  62. package/lib/ui/gamification/question/notification/prediction-result/styles.js +23 -26
  63. package/lib/ui/gamification/question/notification/styles.js +17 -19
  64. package/lib/ui/gamification/question/notification/tweet/index.js +8 -18
  65. package/lib/ui/gamification/question/styles.js +32 -34
  66. package/lib/ui/gamification/question/twitter/index.js +8 -20
  67. package/lib/ui/gamification/question/twitter/styles.js +4 -6
  68. package/lib/ui/gamification/tabs/index.js +6 -7
  69. package/lib/ui/gamification/user-statistics/components/rank/index.js +4 -5
  70. package/lib/ui/gamification/user-statistics/components/statistic/index.js +0 -1
  71. package/lib/ui/gamification/user-statistics/index.js +2 -6
  72. package/lib/ui/gamification/vote/expired-alert/index.js +8 -10
  73. package/lib/ui/gamification/vote/feedback/index.js +19 -23
  74. package/lib/ui/gamification/vote/feedback/styles.js +20 -23
  75. package/lib/ui/gamification/vote/index.js +77 -91
  76. package/lib/ui/gamification/vote/insight-details/index.js +9 -16
  77. package/lib/ui/gamification/vote/twitter-details/index.js +7 -17
  78. package/lib/ui/gamification/vote/vote-option/index.js +21 -24
  79. package/lib/ui/gamification/vote/vote-option/styles.js +24 -26
  80. package/lib/ui/gamification/vote/win-bar/index.js +29 -37
  81. package/lib/ui/gamification/vote/win-bar/styles.js +16 -19
  82. package/lib/ui/login/demo.d.ts +1 -0
  83. package/lib/ui/login/demo.js +5 -17
  84. package/lib/ui/login/index.js +29 -35
  85. package/lib/ui/modal/index.js +9 -10
  86. package/lib/ui/navigation/button/Channels.js +5 -8
  87. package/lib/ui/navigation/button/FeaturedGroups.js +3 -6
  88. package/lib/ui/navigation/button/LeaderBoard.js +8 -11
  89. package/lib/ui/navigation/button/index.js +10 -11
  90. package/lib/ui/navigation/masters.js +2 -3
  91. package/lib/ui/questions/insight/index.js +14 -19
  92. package/lib/ui/questions/twitter/account/index.js +13 -15
  93. package/lib/ui/questions/twitter/account/styles.js +14 -16
  94. package/lib/ui/questions/twitter/index.js +31 -38
  95. package/lib/ui/skeleton/index.js +3 -4
  96. package/lib/ui/theme/index.js +3 -5
  97. package/lib/ui/video-player/index.js +44 -38
  98. package/lib/utils/createDemo.js +18 -28
  99. package/lib/utils/debug/components/copyLogs.js +2 -3
  100. package/lib/utils/debug/components/developer.js +20 -24
  101. package/lib/utils/debug/components/eventInput.js +9 -10
  102. package/lib/utils/debug/components/sdkKey.js +9 -10
  103. package/lib/utils/debug/index.js +17 -28
  104. package/lib/utils/debug/storage.js +32 -14
  105. package/lib/utils/decorators/container.js +5 -9
  106. package/lib/utils/storage.js +32 -14
  107. package/package.json +25 -25
  108. /package/lib/{index-uEuzH3jr.js → index-xuotMAFm.js} +0 -0
  109. /package/lib/{styles_z07sl8-w40geAFS.js → styles_z07sl8-l0sNRNKZ.js} +0 -0
@@ -1,34 +1,23 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { useMemo as a, useState as r } from "react";
3
- import { useStreamLayer as u } from "@streamlayer/react";
4
- import { Developer as v } from "./components/developer.js";
5
- import { DeveloperStorage as c } from "./storage.js";
6
- import "@linaria/react";
7
- import "../storage.js";
8
- import "@streamlayer/sdk-web-storage";
9
- import "./components/bypassLogin.js";
10
- import "./components/copyLogs.js";
11
- import "./components/styles.js";
12
- import "./components/envToggle.js";
13
- import "./components/eventInput.js";
14
- import "@nanostores/react";
15
- import "@streamlayer/sdk-web-core";
16
- import "./components/sdkKey.js";
17
- const h = () => {
18
- const t = a(() => new c(), []), [e, o] = r(t.getEnv()), [m, s] = r(t.getSdkKey() || "set-sdk-key"), [p, i] = r(t.getEvent() || "");
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() || "");
19
8
  return {
20
- env: e,
9
+ env: t,
21
10
  setEnv: o,
22
- sdkKey: m,
23
- setSdkKey: s,
24
- event: p,
25
- setEvent: i
11
+ sdkKey: s,
12
+ setSdkKey: n,
13
+ event: m,
14
+ setEvent: a
26
15
  };
27
- }, q = (t) => {
28
- const e = u();
29
- return /* @__PURE__ */ n(v, { sdk: e, ...t });
16
+ }, D = (e) => {
17
+ const t = v();
18
+ return /* @__PURE__ */ p(c, { sdk: t, ...e });
30
19
  };
31
20
  export {
32
- q as StreamLayerDebug,
33
- h as useStreamLayerDebug
21
+ D as StreamLayerDebug,
22
+ i as useStreamLayerDebug
34
23
  };
@@ -1,34 +1,52 @@
1
- import { Storage as t } from "@streamlayer/sdk-web-storage";
2
- class i extends t {
1
+ var n = Object.defineProperty;
2
+ var i = (s, r, e) => r in s ? n(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
3
+ var t = (s, r, e) => (i(s, typeof r != "symbol" ? r + "" : r, e), e);
4
+ import { Storage as h } from "@streamlayer/sdk-web-storage";
5
+ class d extends h {
3
6
  constructor() {
4
- super("dev"), this.setSchema = (e) => {
7
+ super("dev");
8
+ // Schema
9
+ t(this, "setSchema", (e) => {
5
10
  this.write("schema", e);
6
- }, this.getSchema = () => this.read(
11
+ });
12
+ t(this, "getSchema", () => this.read(
7
13
  "schema"
8
14
  /* SCHEMA */
9
- ), this.setToken = (e) => {
15
+ ));
16
+ // Token
17
+ t(this, "setToken", (e) => {
10
18
  this.write("token", e);
11
- }, this.getToken = () => this.read(
19
+ });
20
+ t(this, "getToken", () => this.read(
12
21
  "token"
13
22
  /* TOKEN */
14
- ), this.setEvent = (e) => {
23
+ ));
24
+ // Event
25
+ t(this, "setEvent", (e) => {
15
26
  this.write("event", e);
16
- }, this.getEvent = () => this.read(
27
+ });
28
+ t(this, "getEvent", () => this.read(
17
29
  "event"
18
30
  /* EVENT */
19
- ), this.setSdkKey = (e) => {
31
+ ));
32
+ // SDK_KEY
33
+ t(this, "setSdkKey", (e) => {
20
34
  this.write("sdkKey", e);
21
- }, this.getSdkKey = () => this.read(
35
+ });
36
+ t(this, "getSdkKey", () => this.read(
22
37
  "sdkKey"
23
38
  /* SDK_KEY */
24
- ), this.setEnv = (e) => {
39
+ ));
40
+ // ENV
41
+ t(this, "setEnv", (e) => {
25
42
  this.write("env", e);
26
- }, this.getEnv = () => this.read(
43
+ });
44
+ t(this, "getEnv", () => this.read(
27
45
  "env"
28
46
  /* ENV */
29
- ) || "production";
47
+ ) || "production");
30
48
  }
31
49
  }
32
50
  export {
33
- i as DeveloperStorage
51
+ d as DeveloperStorage
34
52
  };
@@ -1,12 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { StreamLayerThemeProvider as o } from "../../ui/theme/index.js";
3
- import { AppContainer as t } from "./styles.js";
4
- import "../../ui/theme/theme.js";
5
- import "../../ui/theme/breakpoints.js";
6
- import "../../ui/theme/constants.js";
7
- import "@linaria/react";
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, {}) }) }) });
2
+ import { StreamLayerThemeProvider as n } from "../../ui/theme/index.js";
3
+ import { AppContainer as o } from "./styles.js";
4
+ const c = (e) => /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(e, {}) }), d = (e) => /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(e, {}) }) }) });
9
5
  export {
10
- l as container,
11
- a as theme
6
+ d as container,
7
+ c as theme
12
8
  };
@@ -1,34 +1,52 @@
1
- import { Storage as t } from "@streamlayer/sdk-web-storage";
2
- class i extends t {
1
+ var n = Object.defineProperty;
2
+ var i = (s, r, e) => r in s ? n(s, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[r] = e;
3
+ var t = (s, r, e) => (i(s, typeof r != "symbol" ? r + "" : r, e), e);
4
+ import { Storage as h } from "@streamlayer/sdk-web-storage";
5
+ class d extends h {
3
6
  constructor() {
4
- super("dev"), this.setSchema = (e) => {
7
+ super("dev");
8
+ // Schema
9
+ t(this, "setSchema", (e) => {
5
10
  this.write("schema", e);
6
- }, this.getSchema = () => this.read(
11
+ });
12
+ t(this, "getSchema", () => this.read(
7
13
  "schema"
8
14
  /* SCHEMA */
9
- ), this.setToken = (e) => {
15
+ ));
16
+ // Token
17
+ t(this, "setToken", (e) => {
10
18
  this.write("token", e);
11
- }, this.getToken = () => this.read(
19
+ });
20
+ t(this, "getToken", () => this.read(
12
21
  "token"
13
22
  /* TOKEN */
14
- ), this.setEvent = (e) => {
23
+ ));
24
+ // Event
25
+ t(this, "setEvent", (e) => {
15
26
  this.write("event", e);
16
- }, this.getEvent = () => this.read(
27
+ });
28
+ t(this, "getEvent", () => this.read(
17
29
  "event"
18
30
  /* EVENT */
19
- ), this.setSdkKey = (e) => {
31
+ ));
32
+ // SDK_KEY
33
+ t(this, "setSdkKey", (e) => {
20
34
  this.write("sdkKey", e);
21
- }, this.getSdkKey = () => this.read(
35
+ });
36
+ t(this, "getSdkKey", () => this.read(
22
37
  "sdkKey"
23
38
  /* SDK_KEY */
24
- ), this.setEnv = (e) => {
39
+ ));
40
+ // ENV
41
+ t(this, "setEnv", (e) => {
25
42
  this.write("env", e);
26
- }, this.getEnv = () => this.read(
43
+ });
44
+ t(this, "getEnv", () => this.read(
27
45
  "env"
28
46
  /* ENV */
29
- ) || "production";
47
+ ) || "production");
30
48
  }
31
49
  }
32
50
  export {
33
- i as DeveloperStorage
51
+ d as DeveloperStorage
34
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.98.1",
3
+ "version": "0.99.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -36,26 +36,26 @@
36
36
  ],
37
37
  "peerDependencies": {
38
38
  "@lottiefiles/react-lottie-player": "^3.5.3",
39
- "@streamlayer/sl-eslib": "^5.83.1",
39
+ "@streamlayer/sl-eslib": "^5.84.0",
40
40
  "@types/lodash.throttle": "^4.1.9",
41
41
  "lodash.throttle": "^4.1.1",
42
42
  "nanoid": "3.3.7",
43
43
  "react-infinite-scroller": "^1.2.6",
44
- "react-virtualized-auto-sizer": "^1.0.21",
44
+ "react-virtualized-auto-sizer": "^1.0.24",
45
45
  "react-window": "^1.8.10",
46
46
  "react-window-infinite-loader": "^1.0.9",
47
- "@streamlayer/feature-gamification": "^0.40.0",
48
- "@streamlayer/sdk-web": "^0.33.2",
49
- "@streamlayer/sdk-web-analytics": "^0.1.2",
50
- "@streamlayer/sdk-web-anonymous-auth": "^0.11.44",
51
- "@streamlayer/sdk-web-api": "^0.24.2",
52
- "@streamlayer/sdk-web-core": "^0.22.2",
53
- "@streamlayer/sdk-web-features": "^0.11.26",
54
- "@streamlayer/sdk-web-interfaces": "^0.21.0",
55
- "@streamlayer/sdk-web-logger": "^0.5.18",
56
- "@streamlayer/sdk-web-notifications": "^0.15.1",
57
- "@streamlayer/sdk-web-storage": "^0.4.5",
58
- "@streamlayer/sdk-web-types": "^0.23.0"
47
+ "@streamlayer/feature-gamification": "^0.40.1",
48
+ "@streamlayer/sdk-web": "^0.33.3",
49
+ "@streamlayer/sdk-web-analytics": "^0.1.3",
50
+ "@streamlayer/sdk-web-anonymous-auth": "^0.11.45",
51
+ "@streamlayer/sdk-web-api": "^0.24.3",
52
+ "@streamlayer/sdk-web-core": "^0.22.3",
53
+ "@streamlayer/sdk-web-features": "^0.11.27",
54
+ "@streamlayer/sdk-web-interfaces": "^0.21.1",
55
+ "@streamlayer/sdk-web-logger": "^0.5.19",
56
+ "@streamlayer/sdk-web-notifications": "^0.15.2",
57
+ "@streamlayer/sdk-web-storage": "^0.4.6",
58
+ "@streamlayer/sdk-web-types": "^0.23.1"
59
59
  },
60
60
  "nx": {
61
61
  "implicitDependencies": [
@@ -63,20 +63,20 @@
63
63
  ]
64
64
  },
65
65
  "devDependencies": {
66
- "@connectrpc/connect": "^1.3.0",
67
- "@connectrpc/connect-web": "^1.3.0",
66
+ "@connectrpc/connect": "^1.4.0",
67
+ "@connectrpc/connect-web": "^1.4.0",
68
68
  "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
69
69
  "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
70
70
  "@linaria/babel-preset": "^5.0.4",
71
71
  "@linaria/core": "^6.0.0",
72
72
  "@linaria/react": "^6.0.0",
73
73
  "@nanostores/react": "^0.7.2",
74
- "@storybook/addon-docs": "^7.6.11",
74
+ "@storybook/addon-docs": "^8.0.0",
75
75
  "@storybook/addon-styling": "^1.3.7",
76
- "@storybook/addon-viewport": "^7.6.11",
77
- "@storybook/blocks": "^7.6.11",
76
+ "@storybook/addon-viewport": "^8.0.0",
77
+ "@storybook/blocks": "^8.0.0",
78
78
  "@storybook/jest": "~0.2.3",
79
- "@storybook/react": "^7.6.11",
79
+ "@storybook/react": "^8.0.0",
80
80
  "@storybook/testing-library": "~0.2.2",
81
81
  "@types/react-infinite-scroller": "^1.2.5",
82
82
  "@types/react-window": "^1.8.8",
@@ -91,11 +91,11 @@
91
91
  "react-phone-number-input": "^3.3.9",
92
92
  "rollup-plugin-node-polyfills": "^0.2.1",
93
93
  "tslib": "^2.6.2",
94
- "vite": "5.0.12",
95
- "vite-plugin-node-polyfills": "^0.19.0",
94
+ "vite": "5.1.6",
95
+ "vite-plugin-node-polyfills": "^0.21.0",
96
96
  "vite-plugin-svgr": "^4.2.0",
97
97
  "vite-svg-loader": "^5.1.0",
98
- "vite-tsconfig-paths": "^4.3.1",
99
- "@streamlayer/react": "^0.41.3"
98
+ "vite-tsconfig-paths": "^4.3.2",
99
+ "@streamlayer/react": "^0.41.4"
100
100
  }
101
101
  }
File without changes