@streamlayer/react-ui 1.33.2 → 1.34.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 (38) hide show
  1. package/lib/app/app/Polymarket/index.d.ts +4 -0
  2. package/lib/app/app/Polymarket/index.js +56 -0
  3. package/lib/app/app/Polymarket/story.d.ts +2 -0
  4. package/lib/app/app/Polymarket/story.js +17 -0
  5. package/lib/app/masters/useSdkResponsive.js +1 -1
  6. package/lib/app/masters/useSdkScroll.js +1 -1
  7. package/lib/app/useSdkResponsive.js +1 -1
  8. package/lib/app/useSdkScroll.js +1 -1
  9. package/lib/app/webos/Advertisement/index.js +61 -61
  10. package/lib/app/webos/ExposedPauseAd/PauseAd.js +130 -103
  11. package/lib/app/webos/Question/index.js +30 -27
  12. package/lib/app/webos/index.d.ts +1 -0
  13. package/lib/app/webos/ui/Sidebar/index.js +145 -141
  14. package/lib/app/webos/ui/Sidebar/styles.d.ts +2 -0
  15. package/lib/app/webos/ui/Sidebar/styles.js +95 -85
  16. package/lib/assets/style.css +1 -1
  17. package/lib/{index-tnt2CtQe.js → index-Deo5_bIg.js} +6 -12
  18. package/lib/{index-DSi8Qgfs.js → index-Fv2CC2QU.js} +4 -4
  19. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +1 -1
  20. package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +1 -1
  21. package/lib/ui/gamification/question/inapp/notification/AdNotification/index.d.ts +1 -0
  22. package/lib/ui/gamification/question/inapp/notification/AdNotification/index.js +62 -48
  23. package/lib/ui/gamification/question/inapp/prediction-result/index.d.ts +1 -0
  24. package/lib/ui/gamification/question/inapp/prediction-result/index.js +4 -4
  25. package/lib/ui/gamification/question/inapp/prediction-result-ad/index.d.ts +1 -0
  26. package/lib/ui/gamification/question/inapp/prediction-result-ad/index.js +27 -16
  27. package/lib/ui/gamification/vote/insight-details/index.js +5 -5
  28. package/lib/ui/polymarket/index.d.ts +21 -0
  29. package/lib/ui/polymarket/index.js +226 -0
  30. package/lib/ui/polymarket/styles.d.ts +13 -0
  31. package/lib/ui/polymarket/styles.js +69 -0
  32. package/lib/utils/decorators/container.d.ts +1 -0
  33. package/lib/utils/decorators/container.js +9 -8
  34. package/lib/utils/decorators/styles.d.ts +1 -0
  35. package/lib/utils/decorators/styles.js +9 -4
  36. package/package.json +19 -16
  37. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.d.ts +0 -10
  38. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js +0 -69
@@ -0,0 +1,69 @@
1
+ import { styled as s } from "@linaria/react";
2
+ const e = /* @__PURE__ */ s("div")({
3
+ name: "Container",
4
+ class: "c16uapq7",
5
+ propsAsIs: !1
6
+ }), o = /* @__PURE__ */ s("div")({
7
+ name: "Header",
8
+ class: "h1bkiv31",
9
+ propsAsIs: !1
10
+ }), n = /* @__PURE__ */ s("img")({
11
+ name: "Logo",
12
+ class: "l58x1zx",
13
+ propsAsIs: !1
14
+ }), l = /* @__PURE__ */ s("span")({
15
+ name: "AdTitle",
16
+ class: "aje8tdj",
17
+ propsAsIs: !1
18
+ }), p = /* @__PURE__ */ s("div")({
19
+ name: "Vol",
20
+ class: "v1b9hkhr",
21
+ propsAsIs: !1
22
+ }), c = /* @__PURE__ */ s("div")({
23
+ name: "Teams",
24
+ class: "t103i3ll",
25
+ propsAsIs: !1
26
+ }), r = /* @__PURE__ */ s("div")({
27
+ name: "Team",
28
+ class: "tv6559o",
29
+ propsAsIs: !1
30
+ }), t = /* @__PURE__ */ s("img")({
31
+ name: "TeamLogo",
32
+ class: "td9fhm",
33
+ propsAsIs: !1
34
+ }), m = /* @__PURE__ */ s("span")({
35
+ name: "TeamName",
36
+ class: "t1bg0qru",
37
+ propsAsIs: !1
38
+ }), d = /* @__PURE__ */ s("span")({
39
+ name: "TeamPercentage",
40
+ class: "t1k3nqya",
41
+ propsAsIs: !1
42
+ }), i = /* @__PURE__ */ s("div")({
43
+ name: "Draw",
44
+ class: "du878ld",
45
+ propsAsIs: !1
46
+ }), f = /* @__PURE__ */ s("span")({
47
+ name: "DrawPercentage",
48
+ class: "d11m2h7g",
49
+ propsAsIs: !1
50
+ }), A = /* @__PURE__ */ s("div")({
51
+ name: "Chart",
52
+ class: "cpgwa9e",
53
+ propsAsIs: !1
54
+ });
55
+ export {
56
+ l as AdTitle,
57
+ A as Chart,
58
+ e as Container,
59
+ i as Draw,
60
+ f as DrawPercentage,
61
+ o as Header,
62
+ n as Logo,
63
+ r as Team,
64
+ t as TeamLogo,
65
+ m as TeamName,
66
+ d as TeamPercentage,
67
+ c as Teams,
68
+ p as Vol
69
+ };
@@ -2,5 +2,6 @@ import { StoryContext, StoryFn } from '@storybook/react';
2
2
  export declare const mastersTheme: (Story: StoryFn, _context: StoryContext) => import("react/jsx-runtime").JSX.Element;
3
3
  export declare const theme: (Story: StoryFn, context: StoryContext) => import("react/jsx-runtime").JSX.Element;
4
4
  export declare const bgContainer: (Story: StoryFn) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const darkBgContainer: (Story: StoryFn) => import("react/jsx-runtime").JSX.Element;
5
6
  /** @deprecated */
6
7
  export declare const container: (Story: StoryFn) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,15 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { StreamLayerThemeProvider as n } from "../../ui/theme/index.js";
3
- import { StreamLayerMastersThemeProvider as m } from "../../ui/theme/masters.js";
4
- import { BGContainer as i, AppContainer as c } from "./styles.js";
5
- const l = (r, t) => /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(r, {}) }), p = (r, t) => {
3
+ import { StreamLayerMastersThemeProvider as i } from "../../ui/theme/masters.js";
4
+ import { BGContainer as m, DarkBGContainer as a, AppContainer as c } from "./styles.js";
5
+ const p = (r, t) => /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(r, {}) }), u = (r, t) => {
6
6
  const o = t.globals.theme || "dark";
7
7
  return /* @__PURE__ */ e(n, { themeMode: o, children: /* @__PURE__ */ e(r, {}) });
8
- }, f = (r) => /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(r, {}) }), u = (r) => /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {}) }) }) });
8
+ }, C = (r) => /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(r, {}) }), f = (r) => /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(r, {}) }), T = (r) => /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {}) }) }) });
9
9
  export {
10
- f as bgContainer,
11
- u as container,
12
- l as mastersTheme,
13
- p as theme
10
+ C as bgContainer,
11
+ T as container,
12
+ f as darkBgContainer,
13
+ p as mastersTheme,
14
+ u as theme
14
15
  };
@@ -1,2 +1,3 @@
1
1
  export declare const AppContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
2
  export declare const BGContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const DarkBGContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,14 +1,19 @@
1
1
  import { styled as s } from "@linaria/react";
2
- const a = /* @__PURE__ */ s("div")({
2
+ const n = /* @__PURE__ */ s("div")({
3
3
  name: "AppContainer",
4
4
  class: "azqfrs3",
5
5
  propsAsIs: !1
6
- }), o = /* @__PURE__ */ s("div")({
6
+ }), r = /* @__PURE__ */ s("div")({
7
7
  name: "BGContainer",
8
8
  class: "b1t42us",
9
9
  propsAsIs: !1
10
+ }), o = /* @__PURE__ */ s("div")({
11
+ name: "DarkBGContainer",
12
+ class: "drqlkba",
13
+ propsAsIs: !1
10
14
  });
11
15
  export {
12
- a as AppContainer,
13
- o as BGContainer
16
+ n as AppContainer,
17
+ r as BGContainer,
18
+ o as DarkBGContainer
14
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "1.33.2",
3
+ "version": "1.34.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -86,12 +86,12 @@
86
86
  ],
87
87
  "peerDependencies": {
88
88
  "@lottiefiles/react-lottie-player": "^3.5.4",
89
- "@streamlayer/sl-eslib": "^5.225.0",
89
+ "@noriginmedia/norigin-spatial-navigation": "^2.3.0",
90
+ "@streamlayer/sl-eslib": "^5.228.0",
90
91
  "lodash.throttle": "^4.1.1",
91
92
  "react-infinite-scroller": "^1.2.6",
92
93
  "react-virtualized-auto-sizer": "^1.0.24",
93
94
  "react-window": "^1.8.10",
94
- "@noriginmedia/norigin-spatial-navigation": "^2.3.0",
95
95
  "react-window-infinite-loader": "^1.0.9",
96
96
  "@dailymotion/vast-client": "^6.4.2",
97
97
  "react-qr-code": "^2.0.16",
@@ -110,19 +110,21 @@
110
110
  "react-countdown-circle-timer": "^3.2.1",
111
111
  "react-countup": "^6.5.3",
112
112
  "react-phone-number-input": "^3.4.8",
113
- "@streamlayer/feature-gamification": "^1.23.7",
114
- "@streamlayer/react-polyfills": "^0.1.52",
115
- "@streamlayer/sdk-web": "^1.16.7",
116
- "@streamlayer/sdk-web-analytics": "^1.14.2",
117
- "@streamlayer/sdk-web-anonymous-auth": "^1.3.7",
118
- "@streamlayer/sdk-web-api": "^1.14.7",
119
- "@streamlayer/sdk-web-core": "^1.18.2",
120
- "@streamlayer/sdk-web-features": "^1.0.92",
121
- "@streamlayer/sdk-web-interfaces": "^1.8.7",
122
- "@streamlayer/sdk-web-logger": "^1.0.92",
123
- "@streamlayer/sdk-web-notifications": "^1.3.54",
124
- "@streamlayer/sdk-web-storage": "^1.0.92",
125
- "@streamlayer/sdk-web-types": "^1.16.7"
113
+ "@streamlayer/feature-polymarket": "^0.1.0",
114
+ "@streamlayer/react-polyfills": "^0.2.0",
115
+ "@streamlayer/feature-gamification": "^1.24.0",
116
+ "@streamlayer/sdk-web": "^1.17.0",
117
+ "@streamlayer/sdk-web-analytics": "^1.15.0",
118
+ "@streamlayer/sdk-web-anonymous-auth": "^1.3.9",
119
+ "@streamlayer/feature-advertisement": "^0.1.0",
120
+ "@streamlayer/sdk-web-api": "^1.15.0",
121
+ "@streamlayer/sdk-web-core": "^1.19.0",
122
+ "@streamlayer/sdk-web-features": "^1.0.94",
123
+ "@streamlayer/sdk-web-interfaces": "^1.9.0",
124
+ "@streamlayer/sdk-web-notifications": "^1.3.56",
125
+ "@streamlayer/sdk-web-storage": "^1.0.94",
126
+ "@streamlayer/sdk-web-logger": "^1.0.94",
127
+ "@streamlayer/sdk-web-types": "^1.16.9"
126
128
  },
127
129
  "nx": {
128
130
  "implicitDependencies": [
@@ -148,6 +150,7 @@
148
150
  "@wyw-in-js/vite": "^0.5.3",
149
151
  "esbuild-plugin-babel": "^0.2.3",
150
152
  "glob": "^11.0.0",
153
+ "lightweight-charts": "^5.1.0",
151
154
  "rollup-plugin-node-polyfills": "^0.2.1",
152
155
  "screenfull": "^6.0.2",
153
156
  "tslib": "^2.7.0",
@@ -1,10 +0,0 @@
1
- type GAMStaticCore = Record<string, {
2
- id: string;
3
- url: string;
4
- imageSrc?: string;
5
- adUrl?: string;
6
- }>;
7
- export declare const useLoadGAMStatic: () => readonly [(adUrl: string) => Promise<{
8
- success: boolean;
9
- }>, import('nanostores').PreinitializedMapStore<GAMStaticCore> & object];
10
- export {};
@@ -1,69 +0,0 @@
1
- import { VASTClient as x } from "@dailymotion/vast-client";
2
- import { useRef as P, useCallback as V } from "react";
3
- import { eventBus as l } from "@streamlayer/sdk-web-interfaces";
4
- import { createLogger as k } from "@streamlayer/sdk-web-logger";
5
- import { m as I } from "../../../../../index-DSi8Qgfs.js";
6
- const K = {}, B = new x(), i = I(K), d = k("ui:gam-static"), b = (n) => new Promise((m, e) => {
7
- const r = new Image();
8
- r.onload = () => m(n), r.onerror = () => e(), r.src = n;
9
- }), j = () => {
10
- const n = P(0);
11
- return [V(async (e) => {
12
- var p, g, f, v, y, A, T, S, R, w, h;
13
- if ((p = i.get()[e]) != null && p.imageSrc)
14
- return { success: !0 };
15
- const r = Date.now();
16
- n.current = r, i.setKey(e, { id: "", url: e });
17
- try {
18
- l.emit("exposedPauseAd", {
19
- action: "load",
20
- payload: {}
21
- });
22
- const c = await B.get(e);
23
- if (d.debug(c, "parsedVAST"), n.current === r && i.get()[e].url) {
24
- const t = c.ads.find((s) => s.creatives.length > 0);
25
- if (t) {
26
- d.debug(t, "validAd");
27
- const s = t.creatives.find((o) => o.type === "nonlinear");
28
- if (s) {
29
- d.debug(s, "nonlinear");
30
- const o = (f = (g = s.variations) == null ? void 0 : g[0]) == null ? void 0 : f.staticResource, L = (y = (v = s.variations) == null ? void 0 : v[0]) == null ? void 0 : y.nonlinearClickThroughURLTemplate;
31
- if (o)
32
- return await b(o), i.setKey(e, {
33
- id: t.id || "",
34
- url: e,
35
- imageSrc: o,
36
- adUrl: L
37
- }), l.emit("exposedPauseAd", {
38
- action: "loaded",
39
- payload: {
40
- id: t.id || ""
41
- }
42
- }), { success: !0 };
43
- }
44
- const a = t.creatives.find((o) => o.type === "companion");
45
- d.debug(a, "companion");
46
- const u = (R = (S = (T = (A = a == null ? void 0 : a.variations) == null ? void 0 : A[0]) == null ? void 0 : T.staticResources) == null ? void 0 : S[0]) == null ? void 0 : R.url, C = (h = (w = a == null ? void 0 : a.variations) == null ? void 0 : w[0]) == null ? void 0 : h.companionClickThroughURLTemplate;
47
- if (u)
48
- return await b(u), i.setKey(e, {
49
- id: t.id || "",
50
- url: e,
51
- imageSrc: u,
52
- adUrl: C
53
- }), l.emit("exposedPauseAd", {
54
- action: "loaded",
55
- payload: {
56
- id: t.id || ""
57
- }
58
- }), { success: !0 };
59
- }
60
- }
61
- } catch (c) {
62
- console.error("Error parsing VAST", c);
63
- }
64
- return { success: !1 };
65
- }, []), i];
66
- };
67
- export {
68
- j as useLoadGAMStatic
69
- };