@streamlayer/react-ui 0.35.0 → 0.37.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/index.d.ts +13 -0
- package/lib/ui/app/Features/FeatureProvider.d.ts +9 -0
- package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +5 -0
- package/lib/ui/app/Features/Gamification/Question.d.ts +7 -0
- package/lib/ui/app/Features/Gamification/QuestionsList.d.ts +6 -0
- package/lib/ui/app/Features/Gamification/Tabs.d.ts +5 -0
- package/lib/ui/app/Features/Gamification/UserSummary.d.ts +5 -0
- package/lib/ui/app/Features/Gamification/index.d.ts +7 -0
- package/lib/ui/app/Features/Highlights/Insight.d.ts +7 -0
- package/lib/ui/app/Features/Highlights/Insights.d.ts +6 -0
- package/lib/ui/app/Features/Highlights/index.d.ts +7 -0
- package/lib/ui/app/Features/index.d.ts +8 -0
- package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +11 -0
- package/lib/ui/app/Navigation/MastersNavigation/index.js +11 -10
- package/lib/ui/app/Navigation/index.d.ts +9 -0
- package/lib/ui/app/Notifications/index.d.ts +5 -0
- package/lib/ui/app/masters.d.ts +14 -0
- package/lib/ui/app/{index.js → masters.js} +35 -25
- package/lib/ui/app/styles.d.ts +3 -0
- package/lib/ui/app/useMastersApp.d.ts +21 -0
- package/lib/ui/app/useMastersApp.js +47 -0
- package/lib/ui/app/useSdkFeature.d.ts +9 -0
- package/lib/ui/demo/DemoPoints.d.ts +5 -0
- package/lib/ui/demo/Gamification.d.ts +7 -0
- package/lib/ui/demo/Highlights.d.ts +7 -0
- package/lib/ui/demo/Login.d.ts +5 -0
- package/lib/ui/demo/components/EventProvider.d.ts +2 -0
- package/lib/ui/demo/components/Insight.d.ts +7 -0
- package/lib/ui/demo/components/Insights.d.ts +6 -0
- package/lib/ui/demo/components/Leaderboard.d.ts +5 -0
- package/lib/ui/demo/components/Question.d.ts +7 -0
- package/lib/ui/demo/components/QuestionsList.d.ts +6 -0
- package/lib/ui/demo/components/UserSummary.d.ts +5 -0
- package/lib/ui/demo/components/index.d.ts +7 -0
- package/lib/ui/demo/index.d.ts +5 -0
- package/lib/ui/demo/index.js +43 -51
- package/lib/ui/demo/styles.d.ts +6 -0
- package/lib/ui/gamification/common-header/index.d.ts +8 -0
- package/lib/ui/gamification/common-header/styles.d.ts +4 -0
- package/lib/ui/gamification/detailed-insight/index.d.ts +12 -0
- package/lib/ui/gamification/detailed-insight/styles.d.ts +8 -0
- package/lib/ui/gamification/insight/index.d.ts +11 -0
- package/lib/ui/gamification/insight/styles.d.ts +9 -0
- package/lib/ui/gamification/insight-list/index.d.ts +13 -0
- package/lib/ui/gamification/insight-list/styles.d.ts +3 -0
- package/lib/ui/gamification/leaderboard-invite-link/index.d.ts +8 -0
- package/lib/ui/gamification/leaderboard-invite-link/styles.d.ts +8 -0
- package/lib/ui/gamification/leaderboard-item/index.d.ts +7 -0
- package/lib/ui/gamification/leaderboard-item/styles.d.ts +10 -0
- package/lib/ui/gamification/leaderboard-item-detail/index.d.ts +7 -0
- package/lib/ui/gamification/leaderboard-item-detail/styles.d.ts +2 -0
- package/lib/ui/gamification/leaderboard-list/index.d.ts +8 -0
- package/lib/ui/gamification/leaderboard-list/styles.d.ts +2 -0
- package/lib/ui/gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.d.ts +7 -0
- package/lib/ui/gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.d.ts +5 -0
- package/lib/ui/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index.d.ts +8 -0
- package/lib/ui/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/styles.d.ts +8 -0
- package/lib/ui/gamification/onboarding/components/onboarding-slides/onboarding-rules/index.d.ts +8 -0
- package/lib/ui/gamification/onboarding/components/onboarding-slides/onboarding-rules/styles.d.ts +7 -0
- package/lib/ui/gamification/onboarding/index.d.ts +21 -0
- package/lib/ui/gamification/onboarding/styles.d.ts +11 -0
- package/lib/ui/gamification/points/index.d.ts +4 -0
- package/lib/ui/gamification/points/styles.d.ts +7 -0
- package/lib/ui/gamification/question/index.d.ts +5 -0
- package/lib/ui/gamification/question/styles.d.ts +12 -0
- package/lib/ui/gamification/question-list/index.d.ts +8 -0
- package/lib/ui/gamification/question-list/styles.d.ts +4 -0
- package/lib/ui/gamification/tabs/index.d.ts +17 -0
- package/lib/ui/gamification/tabs/styles.d.ts +5 -0
- package/lib/ui/gamification/user-statistics/components/rank/index.d.ts +7 -0
- package/lib/ui/gamification/user-statistics/components/rank/styles.d.ts +4 -0
- package/lib/ui/gamification/user-statistics/components/statistics/index.d.ts +7 -0
- package/lib/ui/gamification/user-statistics/components/statistics/styles.d.ts +3 -0
- package/lib/ui/gamification/user-statistics/index.d.ts +14 -0
- package/lib/ui/gamification/user-statistics/styles.d.ts +16 -0
- package/lib/ui/gamification/vote/components/voting-header/components/points/index.d.ts +6 -0
- package/lib/ui/gamification/vote/components/voting-header/components/points/styles.d.ts +6 -0
- package/lib/ui/gamification/vote/components/voting-header/components/timer/index.d.ts +8 -0
- package/lib/ui/gamification/vote/components/voting-header/components/timer/styles.d.ts +2 -0
- package/lib/ui/gamification/vote/components/voting-header/index.d.ts +12 -0
- package/lib/ui/gamification/vote/components/voting-header/styles.d.ts +11 -0
- package/lib/ui/gamification/vote/components/voting-option/index.d.ts +20 -0
- package/lib/ui/gamification/vote/components/voting-option/styles.d.ts +13 -0
- package/lib/ui/gamification/vote/index.d.ts +13 -0
- package/lib/ui/gamification/vote/styles.d.ts +9 -0
- package/lib/ui/icons/index.d.ts +43 -0
- package/lib/ui/login/index.d.ts +6 -0
- package/lib/ui/login/styles.d.ts +8 -0
- package/lib/ui/navigation/button/Channels.d.ts +4 -0
- package/lib/ui/navigation/button/FeaturedGroups.d.ts +4 -0
- package/lib/ui/navigation/button/LeaderBoard.d.ts +4 -0
- package/lib/ui/navigation/button/index.d.ts +12 -0
- package/lib/ui/navigation/button/styles.d.ts +3 -0
- package/lib/ui/navigation/index.d.ts +6 -0
- package/lib/ui/navigation/masters.d.ts +5 -0
- package/lib/ui/notifications/decorator.d.ts +4 -0
- package/lib/ui/notifications/index.d.ts +5 -0
- package/lib/ui/notifications/notification/index.d.ts +6 -0
- package/lib/ui/notifications/notification/onboarding-inapp/index.d.ts +3 -0
- package/lib/ui/notifications/notification/onboarding-inapp/styles.d.ts +12 -0
- package/lib/ui/notifications/notification/question-inapp/index.d.ts +3 -0
- package/lib/ui/notifications/notification/question-inapp/styles.d.ts +10 -0
- package/lib/ui/notifications/notification/styles.d.ts +2 -0
- package/lib/ui/notifications/styles.d.ts +2 -0
- package/lib/ui/theme/ThemeColors.d.ts +1 -0
- package/lib/ui/theme/Typography.d.ts +2 -0
- package/lib/ui/theme/constants.d.ts +79 -0
- package/lib/ui/theme/index.d.ts +5 -0
- package/lib/ui/theme/masters.d.ts +1 -0
- package/lib/ui/theme/theme.d.ts +3 -0
- package/lib/utils/createDemo.js +6 -6
- package/lib/utils/{components → debug/components}/developer.js +22 -27
- package/lib/utils/{components → debug/components}/envToggle.js +2 -0
- package/lib/utils/{components → debug/components}/styles.js +8 -0
- package/lib/utils/debug/index.js +33 -0
- package/lib/utils/debug/storage.js +52 -0
- package/package.json +27 -16
- /package/lib/utils/{components → debug/components}/bypassLogin.js +0 -0
- /package/lib/utils/{components → debug/components}/eventInput.js +0 -0
- /package/lib/utils/{components → debug/components}/sdkKey.js +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FeatureType } from '@streamlayer/sdk-web-types';
|
|
3
|
+
export type ButtonProps = {
|
|
4
|
+
id: FeatureType | string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
label?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
position?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SButton: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const ButtonIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Navigation: import("@linaria/react").StyledMeta & import("react").FC<{
|
|
3
|
+
children: import("react").ReactElement<import("./button").ButtonProps, string | import("react").JSXElementConstructor<any>>[];
|
|
4
|
+
className?: string | undefined;
|
|
5
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const BackgroundBlock: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const Icon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const ContentWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
|
+
export declare const SponsorLogo: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
7
|
+
export declare const SponsorText: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
|
|
8
|
+
export declare const ContentTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
9
|
+
export declare const ContentSubtitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
10
|
+
export declare const ActionBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
11
|
+
export declare const CloseBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
12
|
+
export declare const IconClose: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const IconWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare const Icon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
5
|
+
export declare const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
6
|
+
export declare const TitleWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
7
|
+
export declare const Title: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
8
|
+
export declare const CloseBtnWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
9
|
+
export declare const CloseBtn: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
|
|
10
|
+
export declare const CloseIcon: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ThemeColors: () => import("react/jsx-runtime").JSX.Element[];
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export declare const MASTERS_COLORS: {
|
|
2
|
+
PRIMARY_GREEN1: string;
|
|
3
|
+
PRIMARY_GREEN2: string;
|
|
4
|
+
PRIMARY_GREEN3: string;
|
|
5
|
+
PRIMARY_GREEN4: string;
|
|
6
|
+
SECONDARY_RED1: string;
|
|
7
|
+
SECONDARY_RED2: string;
|
|
8
|
+
SECONDARY_YELLOW: string;
|
|
9
|
+
SECONDARY_GREEN5: string;
|
|
10
|
+
NEUTRALS_WHITE: string;
|
|
11
|
+
NEUTRALS_GRAY1: string;
|
|
12
|
+
NEUTRALS_GRAY2: string;
|
|
13
|
+
NEUTRALS_GRAY3: string;
|
|
14
|
+
NEUTRALS_GRAY4: string;
|
|
15
|
+
NEUTRALS_GRAY5: string;
|
|
16
|
+
NEUTRALS_GRAY6: string;
|
|
17
|
+
NEUTRALS_GRAY7: string;
|
|
18
|
+
NEUTRALS_GRAY8: string;
|
|
19
|
+
NEUTRALS_GRAY9: string;
|
|
20
|
+
NEUTRALS_BLACK: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const COLORS: {
|
|
23
|
+
BG_TRANSPARENT: string;
|
|
24
|
+
BG_TRANSPARENT_VOTE_CONTAINER: string;
|
|
25
|
+
BG_TRANSPARENT_ITEM: string;
|
|
26
|
+
BG_TRANSPARENT_ITEM_VOTE: string;
|
|
27
|
+
BG_TRANSPARENT_ITEM_SUCCESS: string;
|
|
28
|
+
BG_TRANSPARENT_ITEM_ERROR: string;
|
|
29
|
+
BG_TRANSPARENT_VOTE_PROGRESS: string;
|
|
30
|
+
BG_TRANSPARENT_VOTE_PROGRESS_SUCCESS: string;
|
|
31
|
+
BG_TRANSPARENT_VOTE_PROGRESS_ERROR: string;
|
|
32
|
+
BG_TRANSPARENT_USER_CONTAINER: string;
|
|
33
|
+
BG_TRANSPARENT_ONBOARDING_INAPP: string;
|
|
34
|
+
LEADERBOARD_UNIT: string;
|
|
35
|
+
BLUE_PRIMARY: string;
|
|
36
|
+
RED_PRIMARY: string;
|
|
37
|
+
RED_SECONDARY: string;
|
|
38
|
+
BLUE_QUESTION_ACTION_BTN: string;
|
|
39
|
+
WHITE: string;
|
|
40
|
+
GREY_1: string;
|
|
41
|
+
GREY_2: string;
|
|
42
|
+
GREY_3: string;
|
|
43
|
+
GREY_4: string;
|
|
44
|
+
GREY_PRIMARY_ONBOARDING_INAPP: string;
|
|
45
|
+
BLACK_1: string;
|
|
46
|
+
GREEN_1: string;
|
|
47
|
+
RED_1: string;
|
|
48
|
+
RED_2: string;
|
|
49
|
+
GREY_PRIMARY: string;
|
|
50
|
+
DIVIDER_COLOR_PRIMARY: string;
|
|
51
|
+
DIVIDER_COLOR_SECONDARY: string;
|
|
52
|
+
GREEN_PRIMARY_BTN: string;
|
|
53
|
+
} & {
|
|
54
|
+
PRIMARY_GREEN1: string;
|
|
55
|
+
PRIMARY_GREEN2: string;
|
|
56
|
+
PRIMARY_GREEN3: string;
|
|
57
|
+
PRIMARY_GREEN4: string;
|
|
58
|
+
SECONDARY_RED1: string;
|
|
59
|
+
SECONDARY_RED2: string;
|
|
60
|
+
SECONDARY_YELLOW: string;
|
|
61
|
+
SECONDARY_GREEN5: string;
|
|
62
|
+
NEUTRALS_WHITE: string;
|
|
63
|
+
NEUTRALS_GRAY1: string;
|
|
64
|
+
NEUTRALS_GRAY2: string;
|
|
65
|
+
NEUTRALS_GRAY3: string;
|
|
66
|
+
NEUTRALS_GRAY4: string;
|
|
67
|
+
NEUTRALS_GRAY5: string;
|
|
68
|
+
NEUTRALS_GRAY6: string;
|
|
69
|
+
NEUTRALS_GRAY7: string;
|
|
70
|
+
NEUTRALS_GRAY8: string;
|
|
71
|
+
NEUTRALS_GRAY9: string;
|
|
72
|
+
NEUTRALS_BLACK: string;
|
|
73
|
+
};
|
|
74
|
+
export declare const FONT: {
|
|
75
|
+
REGULAR: string;
|
|
76
|
+
SERIF: string;
|
|
77
|
+
COLOR: string;
|
|
78
|
+
};
|
|
79
|
+
export declare const colors: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mastersVariables: import("@linaria/core").LinariaClassName;
|
package/lib/utils/createDemo.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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
3
|
import { anonymous as l } from "@streamlayer/sdk-web-anonymous-auth";
|
|
4
|
-
import { Developer as D } from "./components/developer.js";
|
|
4
|
+
import { Developer as D } from "./debug/components/developer.js";
|
|
5
5
|
import { DeveloperStorage as w } from "./storage.js";
|
|
6
6
|
import { useStreamLayerApp as x } from "./useStreamLayerApp.js";
|
|
7
7
|
import "@linaria/react";
|
|
8
|
-
import "./components/bypassLogin.js";
|
|
9
|
-
import "./components/envToggle.js";
|
|
10
|
-
import "./components/eventInput.js";
|
|
8
|
+
import "./debug/components/bypassLogin.js";
|
|
9
|
+
import "./debug/components/envToggle.js";
|
|
10
|
+
import "./debug/components/eventInput.js";
|
|
11
11
|
import "@nanostores/react";
|
|
12
12
|
import "@streamlayer/sdk-web-core";
|
|
13
|
-
import "./components/styles.js";
|
|
14
|
-
import "./components/sdkKey.js";
|
|
13
|
+
import "./debug/components/styles.js";
|
|
14
|
+
import "./debug/components/sdkKey.js";
|
|
15
15
|
import "@streamlayer/sdk-web-storage";
|
|
16
16
|
import "@streamlayer/sdk-web";
|
|
17
17
|
function K({
|
|
@@ -1,38 +1,33 @@
|
|
|
1
1
|
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { DeveloperStorage as
|
|
5
|
-
import { BypassLogin as
|
|
6
|
-
import { EnvToggle as
|
|
2
|
+
import { styled as p } from "@linaria/react";
|
|
3
|
+
import { useMemo as f, useState as g } from "react";
|
|
4
|
+
import { DeveloperStorage as u } from "../../storage.js";
|
|
5
|
+
import { BypassLogin as b } from "./bypassLogin.js";
|
|
6
|
+
import { EnvToggle as h } from "./envToggle.js";
|
|
7
7
|
import { EventInput as v } from "./eventInput.js";
|
|
8
8
|
import { SdkKey as y } from "./sdkKey.js";
|
|
9
9
|
import "@streamlayer/sdk-web-storage";
|
|
10
10
|
import "@nanostores/react";
|
|
11
11
|
import "@streamlayer/sdk-web-core";
|
|
12
12
|
import "./styles.js";
|
|
13
|
-
const w =
|
|
13
|
+
const w = p.div`
|
|
14
14
|
position: fixed;
|
|
15
15
|
bottom: 0;
|
|
16
16
|
right: 0;
|
|
17
17
|
max-width: 600px;
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
font-family: system-ui;
|
|
20
|
+
background: rgba(29, 123, 255, 0.5);
|
|
21
|
+
border-top-left-radius: 10px;
|
|
22
|
+
backdrop-filter: blur(5px);
|
|
23
|
+
`, D = p.div`
|
|
19
24
|
flex-direction: column;
|
|
20
25
|
gap: 10px;
|
|
21
26
|
margin-right: 60px;
|
|
22
27
|
display: flex;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@keyframes show-dev-items {
|
|
27
|
-
from {
|
|
28
|
-
transform: scale(0);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
to {
|
|
32
|
-
transform: scale(1);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
`, j = i.button`
|
|
28
|
+
margin-left: 10px;
|
|
29
|
+
margin-top: 10px;
|
|
30
|
+
`, j = p.button`
|
|
36
31
|
position: absolute;
|
|
37
32
|
z-index: 10000;
|
|
38
33
|
bottom: 10px;
|
|
@@ -71,19 +66,19 @@ const w = i.div`
|
|
|
71
66
|
width: 100%;
|
|
72
67
|
height: 4px;
|
|
73
68
|
}
|
|
74
|
-
`, q = ({ sdk: t, sdkKey:
|
|
75
|
-
const r =
|
|
69
|
+
`, q = ({ sdk: t, sdkKey: d, setSdkKey: i, env: s, setEnv: n, event: m, setEvent: l }) => {
|
|
70
|
+
const r = f(() => new u(), []), [a, x] = g(!1);
|
|
76
71
|
return /* @__PURE__ */ e(w, { children: [
|
|
77
|
-
/* @__PURE__ */ e(j, { "data-opened": a.toString(), onClick: () =>
|
|
72
|
+
/* @__PURE__ */ e(j, { "data-opened": a.toString(), onClick: () => x((c) => !c), children: [
|
|
78
73
|
/* @__PURE__ */ o("span", {}),
|
|
79
74
|
/* @__PURE__ */ o("span", {}),
|
|
80
75
|
/* @__PURE__ */ o("span", {})
|
|
81
76
|
] }),
|
|
82
77
|
a && /* @__PURE__ */ e(D, { children: [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
t && /* @__PURE__ */ o(v, { sdk: t, storage: r, event:
|
|
86
|
-
t && /* @__PURE__ */ o(
|
|
78
|
+
n && /* @__PURE__ */ o(h, { env: s, setEnv: n, storage: r }),
|
|
79
|
+
i && /* @__PURE__ */ o(y, { sdkKey: d, setSdkKey: i, storage: r }),
|
|
80
|
+
t && /* @__PURE__ */ o(v, { sdk: t, storage: r, event: m, setEvent: l }),
|
|
81
|
+
t && /* @__PURE__ */ o(b, { sdk: t, storage: r })
|
|
87
82
|
] })
|
|
88
83
|
] });
|
|
89
84
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as i } 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/envToggle.js";
|
|
11
|
+
import "./components/eventInput.js";
|
|
12
|
+
import "@nanostores/react";
|
|
13
|
+
import "@streamlayer/sdk-web-core";
|
|
14
|
+
import "./components/styles.js";
|
|
15
|
+
import "./components/sdkKey.js";
|
|
16
|
+
const M = () => {
|
|
17
|
+
const e = a(() => new c(), []), [t, o] = r(e.getEnv()), [m, s] = r(e.getSdkKey() || "set-sdk-key"), [p, n] = r(e.getEvent() || "");
|
|
18
|
+
return {
|
|
19
|
+
env: t,
|
|
20
|
+
setEnv: o,
|
|
21
|
+
sdkKey: m,
|
|
22
|
+
setSdkKey: s,
|
|
23
|
+
event: p,
|
|
24
|
+
setEvent: n
|
|
25
|
+
};
|
|
26
|
+
}, h = (e) => {
|
|
27
|
+
const t = u();
|
|
28
|
+
return /* @__PURE__ */ i(v, { sdk: t, ...e });
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
h as StreamLayerDebug,
|
|
32
|
+
M as useStreamLayerDebug
|
|
33
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
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 {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("dev");
|
|
8
|
+
// Schema
|
|
9
|
+
t(this, "setSchema", (e) => {
|
|
10
|
+
this.write("schema", e);
|
|
11
|
+
});
|
|
12
|
+
t(this, "getSchema", () => this.read(
|
|
13
|
+
"schema"
|
|
14
|
+
/* SCHEMA */
|
|
15
|
+
));
|
|
16
|
+
// Token
|
|
17
|
+
t(this, "setToken", (e) => {
|
|
18
|
+
this.write("token", e);
|
|
19
|
+
});
|
|
20
|
+
t(this, "getToken", () => this.read(
|
|
21
|
+
"token"
|
|
22
|
+
/* TOKEN */
|
|
23
|
+
));
|
|
24
|
+
// Event
|
|
25
|
+
t(this, "setEvent", (e) => {
|
|
26
|
+
this.write("event", e);
|
|
27
|
+
});
|
|
28
|
+
t(this, "getEvent", () => this.read(
|
|
29
|
+
"event"
|
|
30
|
+
/* EVENT */
|
|
31
|
+
));
|
|
32
|
+
// SDK_KEY
|
|
33
|
+
t(this, "setSdkKey", (e) => {
|
|
34
|
+
this.write("sdkKey", e);
|
|
35
|
+
});
|
|
36
|
+
t(this, "getSdkKey", () => this.read(
|
|
37
|
+
"sdkKey"
|
|
38
|
+
/* SDK_KEY */
|
|
39
|
+
));
|
|
40
|
+
// ENV
|
|
41
|
+
t(this, "setEnv", (e) => {
|
|
42
|
+
this.write("env", e);
|
|
43
|
+
});
|
|
44
|
+
t(this, "getEnv", () => this.read(
|
|
45
|
+
"env"
|
|
46
|
+
/* ENV */
|
|
47
|
+
) || "production");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
d as DeveloperStorage
|
|
52
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
"default": "./lib/index.js",
|
|
11
11
|
"types": "./lib/index.d.js"
|
|
12
12
|
},
|
|
13
|
+
"./masters": {
|
|
14
|
+
"import": "./lib/ui/app/masters.js",
|
|
15
|
+
"default": "./lib/ui/app/masters.js",
|
|
16
|
+
"types": "./lib/ui/app/masters.d.js"
|
|
17
|
+
},
|
|
13
18
|
"./*": {
|
|
14
19
|
"import": "./lib/*/index.js",
|
|
15
20
|
"default": "./lib/*/index.js",
|
|
@@ -21,28 +26,33 @@
|
|
|
21
26
|
"package.json"
|
|
22
27
|
],
|
|
23
28
|
"peerDependencies": {
|
|
24
|
-
"@streamlayer/sl-eslib": "^5.
|
|
25
|
-
"@streamlayer/feature-gamification": "^0.
|
|
26
|
-
"@streamlayer/sdk-web": "^0.28.
|
|
27
|
-
"@streamlayer/sdk-web-anonymous-auth": "^0.10.
|
|
28
|
-
"@streamlayer/sdk-web-api": "^0.0.
|
|
29
|
-
"@streamlayer/sdk-web-core": "^0.14.
|
|
30
|
-
"@streamlayer/sdk-web-features": "^0.10.
|
|
31
|
-
"@streamlayer/sdk-web-interfaces": "^0.18.
|
|
32
|
-
"@streamlayer/sdk-web-notifications": "^0.10.
|
|
33
|
-
"@streamlayer/sdk-web-storage": "^0.3.
|
|
34
|
-
"@streamlayer/sdk-web-types": "^0.16.
|
|
29
|
+
"@streamlayer/sl-eslib": "^5.52.0",
|
|
30
|
+
"@streamlayer/feature-gamification": "^0.18.0",
|
|
31
|
+
"@streamlayer/sdk-web": "^0.28.2",
|
|
32
|
+
"@streamlayer/sdk-web-anonymous-auth": "^0.10.11",
|
|
33
|
+
"@streamlayer/sdk-web-api": "^0.0.6",
|
|
34
|
+
"@streamlayer/sdk-web-core": "^0.14.2",
|
|
35
|
+
"@streamlayer/sdk-web-features": "^0.10.5",
|
|
36
|
+
"@streamlayer/sdk-web-interfaces": "^0.18.4",
|
|
37
|
+
"@streamlayer/sdk-web-notifications": "^0.10.3",
|
|
38
|
+
"@streamlayer/sdk-web-storage": "^0.3.6",
|
|
39
|
+
"@streamlayer/sdk-web-types": "^0.16.4"
|
|
40
|
+
},
|
|
41
|
+
"nx": {
|
|
42
|
+
"implicitDependencies": [
|
|
43
|
+
"!react"
|
|
44
|
+
]
|
|
35
45
|
},
|
|
36
46
|
"devDependencies": {
|
|
37
47
|
"@connectrpc/connect": "^1.1.3",
|
|
38
48
|
"@connectrpc/connect-web": "^1.1.3",
|
|
39
49
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
40
50
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
41
|
-
"@linaria/babel-preset": "^5.0.
|
|
51
|
+
"@linaria/babel-preset": "^5.0.4",
|
|
42
52
|
"@linaria/core": "^5.0.2",
|
|
43
|
-
"@linaria/esbuild": "^5.0.
|
|
53
|
+
"@linaria/esbuild": "^5.0.4",
|
|
44
54
|
"@linaria/react": "^5.0.3",
|
|
45
|
-
"@linaria/vite": "^5.0.
|
|
55
|
+
"@linaria/vite": "^5.0.4",
|
|
46
56
|
"@nanostores/react": "^0.7.1",
|
|
47
57
|
"@storybook/addon-docs": "^7.5.3",
|
|
48
58
|
"@storybook/addon-styling": "^1.3.7",
|
|
@@ -62,6 +72,7 @@
|
|
|
62
72
|
"vite-plugin-node-polyfills": "^0.16.0",
|
|
63
73
|
"vite-plugin-svgr": "^4.1.0",
|
|
64
74
|
"vite-svg-loader": "^4.0.0",
|
|
65
|
-
"vite-tsconfig-paths": "^4.2.1"
|
|
75
|
+
"vite-tsconfig-paths": "^4.2.1",
|
|
76
|
+
"@streamlayer/react": "^0.23.1"
|
|
66
77
|
}
|
|
67
78
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|