@blocklet/ui-react 3.0.7 → 3.0.8
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/@types/index.d.ts +204 -3
- package/lib/BlockletStudio/index.d.ts +27 -26
- package/lib/ComponentInstaller/index.d.ts +15 -15
- package/lib/ComponentInstaller/installer-item.d.ts +10 -10
- package/lib/ComponentInstaller/locales.d.ts +2 -2
- package/lib/ComponentInstaller/use-component-installed.d.ts +2 -2
- package/lib/ComponentManager/components/add-component.d.ts +16 -13
- package/lib/ComponentManager/components/check-component.d.ts +2 -2
- package/lib/ComponentManager/components/publish-component.d.ts +10 -7
- package/lib/ComponentManager/components/resource-dialog.d.ts +13 -11
- package/lib/ComponentManager/index.d.ts +3 -4
- package/lib/ComponentManager/libs/locales.d.ts +14 -19
- package/lib/Dashboard/index.d.ts +16 -13
- package/lib/Footer/brand.d.ts +8 -8
- package/lib/Footer/copyright.d.ts +7 -7
- package/lib/Footer/index.d.ts +2 -2
- package/lib/Footer/internal-footer.d.ts +25 -22
- package/lib/Footer/layout/plain.d.ts +15 -12
- package/lib/Footer/layout/row.d.ts +7 -7
- package/lib/Footer/layout/standard.d.ts +16 -13
- package/lib/Footer/links.d.ts +15 -12
- package/lib/Footer/social-media.d.ts +8 -8
- package/lib/Header/index.d.ts +23 -13
- package/lib/Icon/index.d.ts +9 -7
- package/lib/Notifications/Snackbar.d.ts +16 -8
- package/lib/Notifications/hooks/use-title.d.ts +48 -9
- package/lib/Notifications/hooks/use-width.d.ts +2 -2
- package/lib/Notifications/utils.d.ts +69 -9
- package/lib/UserCenter/components/config-inviter.d.ts +4 -4
- package/lib/UserCenter/components/config-profile.d.ts +5 -5
- package/lib/UserCenter/components/danger-zone.d.ts +1 -2
- package/lib/UserCenter/components/editable-field.d.ts +34 -30
- package/lib/UserCenter/components/nft.d.ts +4 -4
- package/lib/UserCenter/components/notification.d.ts +5 -5
- package/lib/UserCenter/components/passport.d.ts +5 -5
- package/lib/UserCenter/components/privacy.d.ts +11 -5
- package/lib/UserCenter/components/settings.d.ts +10 -8
- package/lib/UserCenter/components/status-dialog/date-picker.d.ts +10 -9
- package/lib/UserCenter/components/status-dialog/index.d.ts +12 -9
- package/lib/UserCenter/components/status-selector/duration-menu.d.ts +7 -7
- package/lib/UserCenter/components/status-selector/index.d.ts +9 -8
- package/lib/UserCenter/components/status-selector/menu-item.d.ts +24 -9
- package/lib/UserCenter/components/storage/action.d.ts +9 -7
- package/lib/UserCenter/components/storage/connected.d.ts +5 -4
- package/lib/UserCenter/components/storage/delete.d.ts +6 -5
- package/lib/UserCenter/components/storage/disconnect.d.ts +2 -2
- package/lib/UserCenter/components/storage/index.d.ts +2 -2
- package/lib/UserCenter/components/storage/preview-nft.d.ts +5 -5
- package/lib/UserCenter/components/third-party-login/index.d.ts +4 -4
- package/lib/UserCenter/components/third-party-login/third-party-item.d.ts +13 -4
- package/lib/UserCenter/components/user-center.d.ts +16 -15
- package/lib/UserCenter/components/user-info/address.d.ts +16 -7
- package/lib/UserCenter/components/user-info/index.d.ts +4 -5
- package/lib/UserCenter/components/user-info/link-preview-input.d.ts +5 -6
- package/lib/UserCenter/components/user-info/metadata.d.ts +10 -7
- package/lib/UserCenter/components/user-info/switch-role.d.ts +7 -6
- package/lib/UserCenter/components/user-info/timezone-select.d.ts +8 -7
- package/lib/UserCenter/components/user-info/user-basic-info.d.ts +13 -12
- package/lib/UserCenter/components/user-info/user-info-item.d.ts +11 -6
- package/lib/UserCenter/components/user-info/user-info.d.ts +6 -6
- package/lib/UserCenter/components/user-info/user-status.d.ts +9 -9
- package/lib/UserCenter/components/user-info/utils.d.ts +33 -15
- package/lib/UserCenter/components/webhook-item.d.ts +2 -10
- package/lib/UserCenter/index.d.ts +1 -2
- package/lib/UserCenter/libs/locales.d.ts +345 -513
- package/lib/UserCenter/libs/utils.d.ts +4 -3
- package/lib/UserSessions/components/user-session-info.d.ts +5 -5
- package/lib/UserSessions/components/user-sessions.d.ts +20 -8
- package/lib/UserSessions/index.d.ts +1 -2
- package/lib/UserSessions/libs/locales.d.ts +60 -88
- package/lib/UserSessions/libs/utils.d.ts +2 -3
- package/lib/blocklets.d.ts +9 -10
- package/lib/common/domain-warning.d.ts +7 -7
- package/lib/common/header-addons.d.ts +9 -9
- package/lib/common/link-blocker.d.ts +6 -3
- package/lib/common/notification-addon.d.ts +6 -6
- package/lib/common/overridable-theme-provider.d.ts +10 -7
- package/lib/common/wallet-hidden-topbar.d.ts +1 -2
- package/lib/common/ws.d.ts +3 -4
- package/lib/contexts/config-user-space.d.ts +27 -7
- package/lib/hooks/use-mobile.d.ts +3 -3
- package/lib/index.d.ts +10 -12
- package/lib/libs/client.d.ts +2 -3
- package/lib/libs/constant.d.ts +1 -2
- package/lib/libs/spaces.d.ts +2 -3
- package/lib/libs/with-hide-when-embed.d.ts +2 -3
- package/lib/types.d.ts +31 -32
- package/lib/utils.d.ts +10 -11
- package/package.json +6 -6
- package/lib/UserCenter/components/storage/icons/empty-spaces-nft.svg.d.ts +0 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { AxiosError } from 'axios';
|
|
2
|
+
import { CreatePassportProps } from '../../@types';
|
|
3
|
+
export declare const formatAxiosError: (err: AxiosError) => string;
|
|
4
|
+
export declare const createPassportSvg: (props: CreatePassportProps) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
user:
|
|
4
|
-
sessionUser: any;
|
|
5
|
-
}): import(
|
|
1
|
+
import { User } from '../../@types';
|
|
2
|
+
export default function UserSessionInfo({ user, sessionUser }: {
|
|
3
|
+
readonly user: User;
|
|
4
|
+
readonly sessionUser: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { UserSession } from '@blocklet/js-sdk';
|
|
2
|
+
import { User } from '../../@types';
|
|
3
|
+
export default function UserSessions({ user, showAction, showUser, getUserSessions, showOffline, }: {
|
|
4
|
+
readonly user: User & {
|
|
5
|
+
userSessions?: any[];
|
|
6
|
+
};
|
|
7
|
+
readonly showAction?: boolean;
|
|
8
|
+
readonly showUser?: boolean;
|
|
9
|
+
readonly showOffline?: boolean;
|
|
10
|
+
readonly getUserSessions: (params: {
|
|
11
|
+
page: number;
|
|
12
|
+
pageSize: number;
|
|
13
|
+
status?: 'online' | 'expired' | 'offline';
|
|
14
|
+
}) => Promise<{
|
|
15
|
+
paging: {
|
|
16
|
+
total: number;
|
|
17
|
+
};
|
|
18
|
+
list: UserSession[];
|
|
19
|
+
}>;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { o as UserSessions };
|
|
1
|
+
export { default as UserSessions } from './components/user-sessions';
|
|
@@ -1,88 +1,60 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
let lastLoginIp_1: string;
|
|
62
|
-
export { lastLoginIp_1 as lastLoginIp };
|
|
63
|
-
let logoutAll_1: string;
|
|
64
|
-
export { logoutAll_1 as logoutAll };
|
|
65
|
-
let logoutAllTips_1: string;
|
|
66
|
-
export { logoutAllTips_1 as logoutAllTips };
|
|
67
|
-
let logout_1: string;
|
|
68
|
-
export { logout_1 as logout };
|
|
69
|
-
let currentSession_1: string;
|
|
70
|
-
export { currentSession_1 as currentSession };
|
|
71
|
-
let unknown_1: string;
|
|
72
|
-
export { unknown_1 as unknown };
|
|
73
|
-
let expired_1: string;
|
|
74
|
-
export { expired_1 as expired };
|
|
75
|
-
let remove_1: string;
|
|
76
|
-
export { remove_1 as remove };
|
|
77
|
-
let logoutThisSession_1: string;
|
|
78
|
-
export { logoutThisSession_1 as logoutThisSession };
|
|
79
|
-
let logoutThisSessionConfirm_1: string;
|
|
80
|
-
export { logoutThisSessionConfirm_1 as logoutThisSessionConfirm };
|
|
81
|
-
let logoutAllSession_1: string;
|
|
82
|
-
export { logoutAllSession_1 as logoutAllSession };
|
|
83
|
-
let logoutAllSessionConfirm_1: string;
|
|
84
|
-
export { logoutAllSessionConfirm_1 as logoutAllSessionConfirm };
|
|
85
|
-
let online_1: string;
|
|
86
|
-
export { online_1 as online };
|
|
87
|
-
}
|
|
88
|
-
}
|
|
1
|
+
export declare const translations: {
|
|
2
|
+
zh: {
|
|
3
|
+
confirm: string;
|
|
4
|
+
cancel: string;
|
|
5
|
+
visitorId: string;
|
|
6
|
+
deviceType: string;
|
|
7
|
+
platform: string;
|
|
8
|
+
walletOS: string;
|
|
9
|
+
role: string;
|
|
10
|
+
fullname: string;
|
|
11
|
+
email: string;
|
|
12
|
+
avatar: string;
|
|
13
|
+
user: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
lastLoginIp: string;
|
|
17
|
+
actions: string;
|
|
18
|
+
logoutAll: string;
|
|
19
|
+
logoutAllTips: string;
|
|
20
|
+
logout: string;
|
|
21
|
+
currentSession: string;
|
|
22
|
+
unknown: string;
|
|
23
|
+
expired: string;
|
|
24
|
+
remove: string;
|
|
25
|
+
logoutThisSession: string;
|
|
26
|
+
logoutThisSessionConfirm: string;
|
|
27
|
+
logoutAllSession: string;
|
|
28
|
+
logoutAllSessionConfirm: string;
|
|
29
|
+
online: string;
|
|
30
|
+
};
|
|
31
|
+
en: {
|
|
32
|
+
confirm: string;
|
|
33
|
+
cancel: string;
|
|
34
|
+
visitorId: string;
|
|
35
|
+
deviceType: string;
|
|
36
|
+
platform: string;
|
|
37
|
+
walletOS: string;
|
|
38
|
+
role: string;
|
|
39
|
+
fullname: string;
|
|
40
|
+
email: string;
|
|
41
|
+
avatar: string;
|
|
42
|
+
user: string;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
updatedAt: string;
|
|
45
|
+
actions: string;
|
|
46
|
+
lastLoginIp: string;
|
|
47
|
+
logoutAll: string;
|
|
48
|
+
logoutAllTips: string;
|
|
49
|
+
logout: string;
|
|
50
|
+
currentSession: string;
|
|
51
|
+
unknown: string;
|
|
52
|
+
expired: string;
|
|
53
|
+
remove: string;
|
|
54
|
+
logoutThisSession: string;
|
|
55
|
+
logoutThisSessionConfirm: string;
|
|
56
|
+
logoutAllSession: string;
|
|
57
|
+
logoutAllSessionConfirm: string;
|
|
58
|
+
online: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare function
|
|
2
|
-
declare function
|
|
3
|
-
export { g as batchIp2Region, l as ip2Region };
|
|
1
|
+
export declare function ip2Region(ip: string): Promise<string>;
|
|
2
|
+
export declare function batchIp2Region(ips: string[]): Promise<string[]>;
|
package/lib/blocklets.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
declare function L(r: any, o?: string): any;
|
|
8
|
-
declare function g(r: any): {
|
|
1
|
+
export const publicPath: any;
|
|
2
|
+
export function formatTheme(theme: any): any;
|
|
3
|
+
export function getLink(link: any, locale?: string): any;
|
|
4
|
+
export function getLocalizedNavigation(navigation: any, locale?: string): any;
|
|
5
|
+
export function formatNavigation(navigation: any): any;
|
|
6
|
+
export function parseNavigation(navigation: any): {
|
|
9
7
|
header: never[];
|
|
10
8
|
footer: never[];
|
|
11
9
|
social: never[];
|
|
@@ -14,5 +12,6 @@ declare function g(r: any): {
|
|
|
14
12
|
sessionManager: never[];
|
|
15
13
|
userCenter: never[];
|
|
16
14
|
} | null;
|
|
17
|
-
|
|
18
|
-
export
|
|
15
|
+
export function formatBlockletInfo(blockletInfo: any): any;
|
|
16
|
+
export function filterValidNavItems(navigation?: any[]): any;
|
|
17
|
+
export function filterNavByRole(nav: object[], userRole: string): any;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
declare function P({ locale: i, session: s }: {
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
declare function DomainWarning({ locale, session }: {
|
|
4
3
|
locale?: string | undefined;
|
|
5
4
|
session?: {} | undefined;
|
|
6
|
-
}): import(
|
|
7
|
-
declare namespace
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
declare namespace DomainWarning {
|
|
8
7
|
namespace propTypes {
|
|
9
|
-
let locale:
|
|
10
|
-
let session:
|
|
8
|
+
let locale: PropTypes.Requireable<string>;
|
|
9
|
+
let session: PropTypes.Requireable<object>;
|
|
11
10
|
}
|
|
12
11
|
}
|
|
12
|
+
export default DomainWarning;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { SessionManagerProps
|
|
3
|
-
|
|
4
|
-
declare function O({ formattedBlocklet: s, addons: e, showDomainWarningDialog: c, sessionManagerProps: d }: {
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
import { SessionManagerProps } from '../types';
|
|
3
|
+
declare function HeaderAddons({ formattedBlocklet, addons, showDomainWarningDialog, sessionManagerProps, }: {
|
|
5
4
|
formattedBlocklet: any;
|
|
6
5
|
addons?: null | undefined;
|
|
7
6
|
showDomainWarningDialog?: boolean | undefined;
|
|
@@ -9,11 +8,12 @@ declare function O({ formattedBlocklet: s, addons: e, showDomainWarningDialog: c
|
|
|
9
8
|
showRole: boolean;
|
|
10
9
|
} | undefined;
|
|
11
10
|
}): import('react').FunctionComponentElement<import('react').FragmentProps>;
|
|
12
|
-
declare namespace
|
|
11
|
+
declare namespace HeaderAddons {
|
|
13
12
|
namespace propTypes {
|
|
14
|
-
export let formattedBlocklet:
|
|
15
|
-
export let addons:
|
|
16
|
-
export {
|
|
17
|
-
export let showDomainWarningDialog:
|
|
13
|
+
export let formattedBlocklet: PropTypes.Validator<object>;
|
|
14
|
+
export let addons: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.ReactNodeLike>>;
|
|
15
|
+
export { SessionManagerProps as sessionManagerProps };
|
|
16
|
+
export let showDomainWarningDialog: PropTypes.Requireable<boolean>;
|
|
18
17
|
}
|
|
19
18
|
}
|
|
19
|
+
export default HeaderAddons;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
1
|
+
export default LinkBlocker;
|
|
2
|
+
/**
|
|
3
|
+
* 适用于 header/footer/dashboard "preview mode", 阻止内部组件中所有 link 的默认点击行为
|
|
4
|
+
*/
|
|
5
|
+
declare function LinkBlocker({ ...rest }: {
|
|
3
6
|
[x: string]: any;
|
|
4
|
-
}): import(
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
declare function P({ session: r }: {
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
declare function NotificationAddon({ session }: {
|
|
4
3
|
session?: {} | undefined;
|
|
5
|
-
}): import(
|
|
6
|
-
declare namespace
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
5
|
+
declare namespace NotificationAddon {
|
|
7
6
|
namespace propTypes {
|
|
8
|
-
let session:
|
|
7
|
+
let session: PropTypes.Requireable<object>;
|
|
9
8
|
}
|
|
10
9
|
}
|
|
10
|
+
export default NotificationAddon;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
/**
|
|
3
|
+
* 允许 theme 被覆盖的 ThemeProvider 组件, 默认使用 ux default theme, 可以传入 theme 进行覆盖
|
|
4
|
+
*/
|
|
5
|
+
declare function OverridableThemeProvider({ theme: themeOverrides, children }: {
|
|
4
6
|
theme?: null | undefined;
|
|
5
7
|
children: any;
|
|
6
|
-
}): import(
|
|
7
|
-
declare namespace
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare namespace OverridableThemeProvider {
|
|
8
10
|
namespace propTypes {
|
|
9
|
-
let children:
|
|
10
|
-
let theme:
|
|
11
|
+
let children: PropTypes.Validator<any>;
|
|
12
|
+
let theme: PropTypes.Requireable<object>;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
15
|
+
export default OverridableThemeProvider;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
declare function s(): void;
|
|
1
|
+
export function useWalletHiddenTopbar(): void;
|
package/lib/common/ws.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { c as create, l as default, E as useListenWsClient };
|
|
1
|
+
export function create(endpoint?: string): any;
|
|
2
|
+
export default function getWsClient(endpoint?: string): any;
|
|
3
|
+
export function useListenWsClient(endpoint?: string): any;
|
|
@@ -1,7 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Session } from '../@types';
|
|
2
|
+
export interface SpaceGateway {
|
|
3
|
+
did: string;
|
|
4
|
+
name: string;
|
|
5
|
+
url: string;
|
|
6
|
+
endpoint: string;
|
|
7
|
+
}
|
|
8
|
+
export interface SettingStorageEndpoint {
|
|
9
|
+
(endpoint: string | undefined): void | Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
interface ConfigUserSpaceContextType {
|
|
12
|
+
loading: boolean;
|
|
13
|
+
spaceGateway: SpaceGateway | undefined;
|
|
14
|
+
session: Session;
|
|
15
|
+
deleteSpaceGateway: (spaceGateway: SpaceGateway) => Promise<void>;
|
|
16
|
+
updateSpaceGateway: (updateSpaceGateway: SpaceGateway) => Promise<void>;
|
|
17
|
+
storageEndpoint: string;
|
|
18
|
+
settingStorageEndpoint: SettingStorageEndpoint;
|
|
19
|
+
hasStorageEndpoint: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const ConfigUserSpaceContext: import('react').Context<ConfigUserSpaceContextType>;
|
|
22
|
+
declare const Consumer: import('react').Consumer<ConfigUserSpaceContextType>;
|
|
23
|
+
declare function ConfigUserSpaceProvider({ children }: {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function useConfigUserSpaceContext(): ConfigUserSpaceContextType;
|
|
27
|
+
export { ConfigUserSpaceContext, ConfigUserSpaceProvider, Consumer as ConfigUserSpaceConsumer, useConfigUserSpaceContext, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
key?:
|
|
1
|
+
import { Breakpoint } from '@mui/material';
|
|
2
|
+
export default function useMobile({ key }?: {
|
|
3
|
+
key?: number | Breakpoint;
|
|
4
4
|
}): boolean;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { default as c } from './ComponentInstaller/use-component-installed.js';
|
|
12
|
-
export { A as AddComponent, x as BlockletStudio, p as CheckComponent, n as ComponentInstaller, s as Dashboard, a as Footer, t as Header, d as Icon, S as PublishComponent, i as UserCenter, b as UserSessions, c as useComponentInstaller };
|
|
1
|
+
export { default as Header } from './Header';
|
|
2
|
+
export { default as Footer } from './Footer';
|
|
3
|
+
export { default as Dashboard } from './Dashboard';
|
|
4
|
+
export { default as Icon } from './Icon';
|
|
5
|
+
export { default as ComponentInstaller } from './ComponentInstaller';
|
|
6
|
+
export { default as BlockletStudio } from './BlockletStudio';
|
|
7
|
+
export { default as useComponentInstaller } from './ComponentInstaller/use-component-installed';
|
|
8
|
+
export * from './UserCenter';
|
|
9
|
+
export * from './UserSessions';
|
|
10
|
+
export * from './ComponentManager';
|
package/lib/libs/client.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { BlockletSDK
|
|
2
|
-
export
|
|
3
|
-
declare const e: o;
|
|
1
|
+
import { BlockletSDK } from '@blocklet/js-sdk';
|
|
2
|
+
export declare const client: BlockletSDK;
|
package/lib/libs/constant.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
declare const e: "blocklet-ui-react-embed-mode";
|
|
1
|
+
export declare const EMBED_MODE_KEY = "blocklet-ui-react-embed-mode";
|
package/lib/libs/spaces.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare function
|
|
2
|
-
declare function
|
|
3
|
-
export { i as getSpaceHomeUrl, c as getSpaceNftDisplayUrlFromEndpoint };
|
|
1
|
+
export declare function getSpaceNftDisplayUrlFromEndpoint(endpoint: string): string;
|
|
2
|
+
export declare function getSpaceHomeUrl(endpoint: string): string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
(n: any): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | null;
|
|
1
|
+
export default function withHideWhenEmbed<T extends object>(Component: React.ComponentType<T>): {
|
|
2
|
+
(props: T): import("react/jsx-runtime").JSX.Element | null;
|
|
4
3
|
displayName: string;
|
|
5
4
|
};
|
package/lib/types.d.ts
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
|
|
3
|
-
appLogo:
|
|
4
|
-
appName:
|
|
5
|
-
theme:
|
|
6
|
-
background:
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export const BlockletMetaProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
3
|
+
appLogo: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
4
|
+
appName: PropTypes.Requireable<string>;
|
|
5
|
+
theme: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
+
background: PropTypes.Requireable<string>;
|
|
7
7
|
}>>;
|
|
8
|
-
enableConnect:
|
|
9
|
-
enableLocale:
|
|
10
|
-
navigation:
|
|
11
|
-
title:
|
|
12
|
-
link:
|
|
13
|
-
icon:
|
|
14
|
-
items:
|
|
15
|
-
title:
|
|
16
|
-
link:
|
|
8
|
+
enableConnect: PropTypes.Requireable<boolean>;
|
|
9
|
+
enableLocale: PropTypes.Requireable<boolean>;
|
|
10
|
+
navigation: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
11
|
+
title: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
|
|
12
|
+
link: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
|
|
13
|
+
icon: PropTypes.Requireable<string>;
|
|
14
|
+
items: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
15
|
+
title: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
|
|
16
|
+
link: PropTypes.Requireable<NonNullable<string | object | null | undefined>>;
|
|
17
17
|
}> | null | undefined)[]>;
|
|
18
18
|
}> | null | undefined)[]>;
|
|
19
19
|
}>>;
|
|
20
|
-
|
|
21
|
-
showText:
|
|
22
|
-
showRole:
|
|
23
|
-
switchDid:
|
|
24
|
-
switchProfile:
|
|
25
|
-
switchPassport:
|
|
26
|
-
disableLogout:
|
|
27
|
-
onLogin:
|
|
28
|
-
onLogout:
|
|
29
|
-
onSwitchDid:
|
|
30
|
-
onSwitchProfile:
|
|
31
|
-
onSwitchPassport:
|
|
32
|
-
menu:
|
|
33
|
-
menuRender:
|
|
34
|
-
dark:
|
|
35
|
-
size:
|
|
20
|
+
export const SessionManagerProps: PropTypes.Requireable<PropTypes.InferProps<{
|
|
21
|
+
showText: PropTypes.Requireable<boolean>;
|
|
22
|
+
showRole: PropTypes.Requireable<boolean>;
|
|
23
|
+
switchDid: PropTypes.Requireable<boolean>;
|
|
24
|
+
switchProfile: PropTypes.Requireable<boolean>;
|
|
25
|
+
switchPassport: PropTypes.Requireable<boolean>;
|
|
26
|
+
disableLogout: PropTypes.Requireable<boolean>;
|
|
27
|
+
onLogin: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
|
+
onLogout: PropTypes.Requireable<(...args: any[]) => any>;
|
|
29
|
+
onSwitchDid: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
|
+
onSwitchProfile: PropTypes.Requireable<(...args: any[]) => any>;
|
|
31
|
+
onSwitchPassport: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
|
+
menu: PropTypes.Requireable<any[]>;
|
|
33
|
+
menuRender: PropTypes.Requireable<(...args: any[]) => any>;
|
|
34
|
+
dark: PropTypes.Requireable<boolean>;
|
|
35
|
+
size: PropTypes.Requireable<number>;
|
|
36
36
|
}>>;
|
|
37
|
-
export { n as BlockletMetaProps, t as SessionManagerProps };
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export { E as compareVersions, x as countRecursive, V as filterRecursive, S as flatRecursive, W as isIconifyString, P as isUrl, d as mapRecursive, A as matchPath, k as matchPaths, v as splitNavColumns };
|
|
1
|
+
export function mapRecursive(array: any, fn: any, childrenKey?: string): any;
|
|
2
|
+
export function flatRecursive(array: any, childrenKey?: string): any[];
|
|
3
|
+
export function countRecursive(array: any, childrenKey?: string): number;
|
|
4
|
+
export function filterRecursive(array: any, predicate: any, childrenKey?: string): any;
|
|
5
|
+
export function isUrl(str: any): boolean;
|
|
6
|
+
export function isIconifyString(str: any): boolean;
|
|
7
|
+
export function matchPath(path: any): any;
|
|
8
|
+
export function matchPaths(paths?: any[]): number;
|
|
9
|
+
export function splitNavColumns(items: any, options?: {}): never[][];
|
|
10
|
+
export function compareVersions(version1: any, version2: any): any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/ui-react",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.8",
|
|
4
4
|
"description": "Some useful front-end web components that can be used in Blocklets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"lint": "eslint src tests --ext js --ext jsx --ext tsx --ext ts",
|
|
22
22
|
"lint:fix": "npm run lint -- --fix",
|
|
23
23
|
"clean": "rm -rf lib",
|
|
24
|
-
"build": "vite build",
|
|
24
|
+
"build": "npm run clean &&vite build",
|
|
25
25
|
"watch": "vite build --watch",
|
|
26
26
|
"precommit": "CI=1 npm run lint",
|
|
27
27
|
"prepush": "CI=1 npm run lint",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@abtnode/constant": "^1.16.44",
|
|
37
37
|
"@abtnode/util": "^1.16.44",
|
|
38
|
-
"@arcblock/bridge": "3.0.
|
|
39
|
-
"@arcblock/icons": "3.0.
|
|
40
|
-
"@arcblock/react-hooks": "3.0.
|
|
38
|
+
"@arcblock/bridge": "3.0.8",
|
|
39
|
+
"@arcblock/icons": "3.0.8",
|
|
40
|
+
"@arcblock/react-hooks": "3.0.8",
|
|
41
41
|
"@arcblock/ws": "^1.20.15",
|
|
42
42
|
"@blocklet/constant": "^1.16.44",
|
|
43
43
|
"@blocklet/did-space-react": "^1.0.63",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"jest": "^29.7.0",
|
|
91
91
|
"unbuild": "^2.0.0"
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "30b21395b2f3ef6824df728aeafd10e9dea173d9"
|
|
94
94
|
}
|