@arcblock/ux 3.1.41 → 3.1.43
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/Header/header.js +10 -10
- package/lib/Header/responsive-header.js +28 -20
- package/lib/NavMenu/style.js +2 -3
- package/lib/UserCard/Content/minimal.js +3 -3
- package/lib/Util/constant.d.ts +1 -1
- package/lib/Util/constant.js +8 -8
- package/lib/package.json.js +1 -1
- package/package.json +7 -7
- package/src/Header/header.tsx +1 -1
- package/src/Header/responsive-header.tsx +10 -2
- package/src/NavMenu/style.ts +2 -3
- package/src/UserCard/Content/minimal.tsx +1 -1
- package/src/Util/constant.ts +1 -1
- package/src/Util/index.ts +1 -1
package/lib/Header/header.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { jsx as r, jsxs as t, Fragment as
|
2
|
-
import { Box as d, Container as
|
1
|
+
import { jsx as r, jsxs as t, Fragment as w } from "react/jsx-runtime";
|
2
|
+
import { Box as d, Container as y } from "@mui/material";
|
3
3
|
import { useRef as v, useState as N, useEffect as k } from "react";
|
4
4
|
import z from "./auto-hidden.js";
|
5
5
|
import { styled as W } from "../Theme/index.js";
|
@@ -14,24 +14,24 @@ function I({
|
|
14
14
|
prepend: f = null,
|
15
15
|
align: o = "left",
|
16
16
|
maxWidth: x = !1,
|
17
|
-
homeLink:
|
17
|
+
homeLink: a = "/",
|
18
18
|
...m
|
19
19
|
}) {
|
20
|
-
const
|
20
|
+
const i = v(null), [g, u] = N("0px"), b = { minWidth: g };
|
21
21
|
return k(() => {
|
22
22
|
const { searchParams: n } = new URL(window.location.href);
|
23
|
-
n.get("inviter") && window.localStorage.setItem("inviter", n.get("inviter")),
|
24
|
-
}, []), /* @__PURE__ */ r(B, { ...m, children: /* @__PURE__ */ t(
|
23
|
+
n.get("inviter") && window.localStorage.setItem("inviter", n.get("inviter")), i.current && u(`${i.current.offsetWidth}px`);
|
24
|
+
}, []), /* @__PURE__ */ r(B, { ...m, children: /* @__PURE__ */ t(y, { maxWidth: x, className: "header-container", children: [
|
25
25
|
f,
|
26
26
|
/* @__PURE__ */ r("div", { className: "header-brand-wrapper", style: b, children: (() => {
|
27
|
-
const n = /* @__PURE__ */ t(
|
28
|
-
e && /* @__PURE__ */ r("div", { className: "header-logo", ref:
|
27
|
+
const n = /* @__PURE__ */ t(w, { children: [
|
28
|
+
e && /* @__PURE__ */ r("div", { className: "header-logo", ref: i, children: e }),
|
29
29
|
l && /* @__PURE__ */ r(z, { height: 44, sx: { flexShrink: { xs: 1 } }, children: /* @__PURE__ */ t("div", { className: "header-brand", children: [
|
30
30
|
/* @__PURE__ */ r("div", { className: "header-brand-title", children: /* @__PURE__ */ r("h2", { children: l }) }),
|
31
31
|
/* @__PURE__ */ r("div", { className: "header-brand-desc", children: s })
|
32
32
|
] }) })
|
33
33
|
] });
|
34
|
-
return typeof
|
34
|
+
return typeof a == "function" ? a(n) : /* @__PURE__ */ r("a", { href: a, children: n });
|
35
35
|
})() }),
|
36
36
|
/* @__PURE__ */ r("div", { className: "header-brand-addon", children: h }),
|
37
37
|
o === "right" && /* @__PURE__ */ r(
|
@@ -138,7 +138,7 @@ const B = W(d)`
|
|
138
138
|
.header-menu {
|
139
139
|
display: inline-block;
|
140
140
|
}
|
141
|
-
.header-logo {
|
141
|
+
.header-brand-wrapper .header-logo {
|
142
142
|
height: 32px;
|
143
143
|
}
|
144
144
|
.header-brand {
|
@@ -1,22 +1,22 @@
|
|
1
1
|
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
2
2
|
import { useState as f } from "react";
|
3
|
-
import { useReactive as
|
4
|
-
import { Close as
|
5
|
-
import { Container as
|
6
|
-
import
|
7
|
-
import { styled as
|
8
|
-
function z({ prepend: n, children: r = null, ...
|
9
|
-
const a =
|
3
|
+
import { useReactive as v, useCreation as g } from "ahooks";
|
4
|
+
import { Close as y, Menu as h } from "@mui/icons-material";
|
5
|
+
import { Container as x, useTheme as b, useMediaQuery as w, Drawer as P, Button as k } from "@mui/material";
|
6
|
+
import u from "./header.js";
|
7
|
+
import { styled as s } from "../Theme/index.js";
|
8
|
+
function z({ prepend: n, children: r = null, ...i }) {
|
9
|
+
const a = b(), l = w(a.breakpoints.down("md")), [t, m] = f(!1), d = typeof r == "function" ? r({ isMobile: l, closeMenu: () => m(!1) }) : r, e = v({
|
10
10
|
changed: !1,
|
11
11
|
value: "",
|
12
12
|
priority: ""
|
13
13
|
});
|
14
|
-
return
|
14
|
+
return g(() => {
|
15
15
|
if (document.documentElement?.style) {
|
16
|
-
const
|
16
|
+
const p = () => {
|
17
17
|
e.changed && (e.value ? document.documentElement.style.setProperty("overflow", e.value, e.priority) : document.documentElement.style.removeProperty("overflow"), e.value = "", e.priority = "", e.changed = !1);
|
18
18
|
};
|
19
|
-
return t ? (e.changed = !0, e.value = document.documentElement.style.getPropertyValue("overflow"), e.priority = document.documentElement.style.getPropertyPriority("overflow"), document.documentElement.style.setProperty("overflow", "revert", "important")) :
|
19
|
+
return t ? (e.changed = !0, e.value = document.documentElement.style.getPropertyValue("overflow"), e.priority = document.documentElement.style.getPropertyPriority("overflow"), document.documentElement.style.setProperty("overflow", "revert", "important")) : p(), p;
|
20
20
|
}
|
21
21
|
return () => {
|
22
22
|
};
|
@@ -30,12 +30,12 @@ function z({ prepend: n, children: r = null, ...s }) {
|
|
30
30
|
className: "header-menu",
|
31
31
|
"aria-label": "header menu button",
|
32
32
|
onClick: () => m(!t),
|
33
|
-
children: t ? /* @__PURE__ */ o(
|
33
|
+
children: t ? /* @__PURE__ */ o(y, {}) : /* @__PURE__ */ o(h, {})
|
34
34
|
}
|
35
35
|
),
|
36
|
-
...
|
36
|
+
...i,
|
37
37
|
children: [
|
38
|
-
!l &&
|
38
|
+
!l && d,
|
39
39
|
l && /* @__PURE__ */ o(
|
40
40
|
P,
|
41
41
|
{
|
@@ -53,33 +53,41 @@ function z({ prepend: n, children: r = null, ...s }) {
|
|
53
53
|
},
|
54
54
|
slotProps: {
|
55
55
|
paper: {
|
56
|
-
|
56
|
+
sx: {
|
57
57
|
top: 64,
|
58
58
|
bottom: 0,
|
59
59
|
boxShadow: "none",
|
60
60
|
backgroundImage: "none",
|
61
|
-
backgroundColor: a.palette.background.paper
|
61
|
+
backgroundColor: a.palette.background.paper,
|
62
|
+
"& .navmenu.navmenu--inline": {
|
63
|
+
margin: 0,
|
64
|
+
padding: 0
|
65
|
+
}
|
62
66
|
}
|
63
67
|
}
|
64
68
|
},
|
65
|
-
children: /* @__PURE__ */ o(M, { children:
|
69
|
+
children: /* @__PURE__ */ o(M, { children: d })
|
66
70
|
}
|
67
71
|
)
|
68
72
|
]
|
69
73
|
}
|
70
|
-
) : /* @__PURE__ */ o(
|
74
|
+
) : /* @__PURE__ */ o(u, { prepend: n, ...i });
|
71
75
|
}
|
72
|
-
const C =
|
76
|
+
const C = s(u)`
|
73
77
|
.header-menu {
|
74
78
|
display: none;
|
75
79
|
}
|
76
80
|
${(n) => n.theme.breakpoints.down("md")} {
|
77
81
|
.header-menu {
|
78
82
|
display: flex;
|
79
|
-
|
83
|
+
padding-left: 6px;
|
84
|
+
padding-right: 6px;
|
85
|
+
min-width: 0;
|
86
|
+
margin-left: -4px;
|
87
|
+
margin-right: 8px;
|
80
88
|
}
|
81
89
|
}
|
82
|
-
`, M =
|
90
|
+
`, M = s(x)`
|
83
91
|
padding-top: 8px;
|
84
92
|
padding-bottom: 16px;
|
85
93
|
.navmenu {
|
package/lib/NavMenu/style.js
CHANGED
@@ -158,7 +158,7 @@ const o = i("nav", {
|
|
158
158
|
// inline 布局中
|
159
159
|
"&.navmenu-item--inline": {
|
160
160
|
margin: 0,
|
161
|
-
padding:
|
161
|
+
padding: 0,
|
162
162
|
minHeight: "48px",
|
163
163
|
lineHeight: "48px",
|
164
164
|
flexWrap: "wrap"
|
@@ -207,7 +207,6 @@ const o = i("nav", {
|
|
207
207
|
position: "static",
|
208
208
|
transform: "none",
|
209
209
|
flex: "1 0 100%",
|
210
|
-
margin: "0 -16px",
|
211
210
|
padding: 0,
|
212
211
|
height: 0,
|
213
212
|
overflow: "hidden",
|
@@ -220,7 +219,7 @@ const o = i("nav", {
|
|
220
219
|
},
|
221
220
|
".navmenu-sub__list": {
|
222
221
|
padding: 0,
|
223
|
-
paddingLeft: "
|
222
|
+
paddingLeft: "24px",
|
224
223
|
boxShadow: "none"
|
225
224
|
},
|
226
225
|
".navmenu-item__content": {
|
@@ -6,7 +6,7 @@ import b from "./tooltip-avatar.js";
|
|
6
6
|
import { renderTopRight as v } from "../components.js";
|
7
7
|
import W from "./shorten-label.js";
|
8
8
|
import j from "../Cards/social-actions.js";
|
9
|
-
function
|
9
|
+
function A({ ...s }) {
|
10
10
|
const {
|
11
11
|
user: e,
|
12
12
|
showDid: c,
|
@@ -87,7 +87,7 @@ function D({ ...s }) {
|
|
87
87
|
) : null
|
88
88
|
] })
|
89
89
|
] }),
|
90
|
-
i ? /* @__PURE__ */ t(C, { sx: { width: "100%" } }) : null,
|
90
|
+
i && (l || o.showSocialActions) ? /* @__PURE__ */ t(C, { sx: { width: "100%" } }) : null,
|
91
91
|
l ? null : /* @__PURE__ */ t(
|
92
92
|
j,
|
93
93
|
{
|
@@ -105,7 +105,7 @@ function D({ ...s }) {
|
|
105
105
|
}
|
106
106
|
);
|
107
107
|
}
|
108
|
-
const P = g(
|
108
|
+
const P = g(A);
|
109
109
|
export {
|
110
110
|
P as default
|
111
111
|
};
|
package/lib/Util/constant.d.ts
CHANGED
@@ -5,7 +5,7 @@ export declare const SESSION_TOKEN_STORAGE_KEY = "login_token";
|
|
5
5
|
export declare const REFRESH_TOKEN_STORAGE_KEY = "refresh_token";
|
6
6
|
export declare const RELAY_SOCKET_PREFIX = "/.well-known/service";
|
7
7
|
export declare const API_DID_PREFIX = "/api/did";
|
8
|
-
export declare const DASHBOARD_URL = "/.well-known/service/admin";
|
8
|
+
export declare const DASHBOARD_URL = "/.well-known/service/admin/overview";
|
9
9
|
export declare const PROFILE_URL = "/.well-known/service/user";
|
10
10
|
export declare const DID_SPACE_URL = "/.well-known/service/user/did-spaces";
|
11
11
|
export declare const NAVIGATION_URL = "/.well-known/service/admin/navigation";
|
package/lib/Util/constant.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
const T = 300,
|
1
|
+
const T = 300, e = 1800, t = "/.well-known/service", o = "login_token", _ = "refresh_token", I = "/.well-known/service", A = "/api/did", n = `${t}/admin/overview`, s = `${t}/user`, O = `${t}/user/did-spaces`, R = `${t}/admin/navigation`, i = "did:abt:", D = {
|
2
2
|
VALID: "valid",
|
3
3
|
REVOKED: "revoked"
|
4
4
|
}, E = {
|
@@ -11,7 +11,7 @@ const T = 300, _ = 1800, t = "/.well-known/service", e = "login_token", o = "ref
|
|
11
11
|
NFT: "nft",
|
12
12
|
PASSKEY: "passkey",
|
13
13
|
TWITTER: "twitter"
|
14
|
-
},
|
14
|
+
}, L = {
|
15
15
|
[E.EMAIL]: "Email",
|
16
16
|
[E.AUTH0]: "Auth0",
|
17
17
|
[E.APPLE]: "Apple",
|
@@ -34,18 +34,18 @@ export {
|
|
34
34
|
t as BLOCKLET_SERVICE_PATH_PREFIX,
|
35
35
|
n as DASHBOARD_URL,
|
36
36
|
T as DEFAULT_TIMEOUT,
|
37
|
-
|
37
|
+
e as DEFAULT_WINDOW_TIMEOUT,
|
38
38
|
a as DID_CONNECT_MEDIUM_WIDTH,
|
39
39
|
c as DID_CONNECT_SMALL_WIDTH,
|
40
|
-
|
40
|
+
i as DID_PREFIX,
|
41
41
|
O as DID_SPACE_URL,
|
42
42
|
E as LOGIN_PROVIDER,
|
43
|
-
|
43
|
+
L as LOGIN_PROVIDER_NAME,
|
44
44
|
R as NAVIGATION_URL,
|
45
45
|
l as OAUTH_PROVIDER,
|
46
|
-
|
46
|
+
D as PASSPORT_STATUS,
|
47
47
|
s as PROFILE_URL,
|
48
|
-
|
48
|
+
_ as REFRESH_TOKEN_STORAGE_KEY,
|
49
49
|
I as RELAY_SOCKET_PREFIX,
|
50
|
-
|
50
|
+
o as SESSION_TOKEN_STORAGE_KEY
|
51
51
|
};
|
package/lib/package.json.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "3.1.
|
3
|
+
"version": "3.1.43",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -68,16 +68,16 @@
|
|
68
68
|
"react": "^19.0.0",
|
69
69
|
"react-router-dom": "^6.22.3"
|
70
70
|
},
|
71
|
-
"gitHead": "
|
71
|
+
"gitHead": "f8ee8cbf1c349c55a31ed833de014f4db6222976",
|
72
72
|
"dependencies": {
|
73
|
-
"@arcblock/bridge": "3.1.
|
73
|
+
"@arcblock/bridge": "3.1.43",
|
74
74
|
"@arcblock/did": "^1.21.3",
|
75
75
|
"@arcblock/did-motif": "^1.1.14",
|
76
|
-
"@arcblock/icons": "3.1.
|
77
|
-
"@arcblock/nft-display": "3.1.
|
78
|
-
"@arcblock/react-hooks": "3.1.
|
76
|
+
"@arcblock/icons": "3.1.43",
|
77
|
+
"@arcblock/nft-display": "3.1.43",
|
78
|
+
"@arcblock/react-hooks": "3.1.43",
|
79
79
|
"@blocklet/js-sdk": "^1.16.49-beta-20250823-082650-626c1473",
|
80
|
-
"@blocklet/theme": "3.1.
|
80
|
+
"@blocklet/theme": "3.1.43",
|
81
81
|
"@fontsource/roboto": "~5.1.1",
|
82
82
|
"@fontsource/ubuntu-mono": "^5.2.6",
|
83
83
|
"@iconify-icons/logos": "^1.2.36",
|
package/src/Header/header.tsx
CHANGED
@@ -94,12 +94,16 @@ function ResponsiveHeader({ prepend, children = null, ...rest }: ResponsiveHeade
|
|
94
94
|
}}
|
95
95
|
slotProps={{
|
96
96
|
paper: {
|
97
|
-
|
97
|
+
sx: {
|
98
98
|
top: 64,
|
99
99
|
bottom: 0,
|
100
100
|
boxShadow: 'none',
|
101
101
|
backgroundImage: 'none',
|
102
102
|
backgroundColor: theme.palette.background.paper,
|
103
|
+
'& .navmenu.navmenu--inline': {
|
104
|
+
margin: 0,
|
105
|
+
padding: 0,
|
106
|
+
},
|
103
107
|
},
|
104
108
|
},
|
105
109
|
}}>
|
@@ -117,7 +121,11 @@ const Root = styled(Header)`
|
|
117
121
|
${(props) => props.theme.breakpoints.down('md')} {
|
118
122
|
.header-menu {
|
119
123
|
display: flex;
|
120
|
-
|
124
|
+
padding-left: 6px;
|
125
|
+
padding-right: 6px;
|
126
|
+
min-width: 0;
|
127
|
+
margin-left: -4px;
|
128
|
+
margin-right: 8px;
|
121
129
|
}
|
122
130
|
}
|
123
131
|
`;
|
package/src/NavMenu/style.ts
CHANGED
@@ -173,7 +173,7 @@ export const NavMenuItem = styled('li', {
|
|
173
173
|
// inline 布局中
|
174
174
|
'&.navmenu-item--inline': {
|
175
175
|
margin: 0,
|
176
|
-
padding:
|
176
|
+
padding: 0,
|
177
177
|
minHeight: '48px',
|
178
178
|
lineHeight: '48px',
|
179
179
|
flexWrap: 'wrap',
|
@@ -225,7 +225,6 @@ export const NavMenuSub = styled(NavMenuItem)(({ theme }) => ({
|
|
225
225
|
position: 'static',
|
226
226
|
transform: 'none',
|
227
227
|
flex: '1 0 100%',
|
228
|
-
margin: '0 -16px',
|
229
228
|
padding: 0,
|
230
229
|
height: 0,
|
231
230
|
overflow: 'hidden',
|
@@ -238,7 +237,7 @@ export const NavMenuSub = styled(NavMenuItem)(({ theme }) => ({
|
|
238
237
|
},
|
239
238
|
'.navmenu-sub__list': {
|
240
239
|
padding: 0,
|
241
|
-
paddingLeft: '
|
240
|
+
paddingLeft: '24px',
|
242
241
|
boxShadow: 'none',
|
243
242
|
},
|
244
243
|
'.navmenu-item__content': {
|
@@ -93,7 +93,7 @@ function MinimalContent({ ...props }: MinimalContentProps) {
|
|
93
93
|
) : null}
|
94
94
|
</Box>
|
95
95
|
</Box>
|
96
|
-
{isSmallScreen ? <Divider sx={{ width: '100%' }} /> : null}
|
96
|
+
{isSmallScreen && (renderTopRightContent || rest.showSocialActions) ? <Divider sx={{ width: '100%' }} /> : null}
|
97
97
|
{!renderTopRightContent ? (
|
98
98
|
<SocialActions
|
99
99
|
onFollowClick={rest.onFollowClick}
|
package/src/Util/constant.ts
CHANGED
@@ -7,7 +7,7 @@ export const REFRESH_TOKEN_STORAGE_KEY = 'refresh_token';
|
|
7
7
|
export const RELAY_SOCKET_PREFIX = '/.well-known/service';
|
8
8
|
export const API_DID_PREFIX = '/api/did';
|
9
9
|
|
10
|
-
export const DASHBOARD_URL = `${BLOCKLET_SERVICE_PATH_PREFIX}/admin`;
|
10
|
+
export const DASHBOARD_URL = `${BLOCKLET_SERVICE_PATH_PREFIX}/admin/overview`;
|
11
11
|
export const PROFILE_URL = `${BLOCKLET_SERVICE_PATH_PREFIX}/user`;
|
12
12
|
export const DID_SPACE_URL = `${BLOCKLET_SERVICE_PATH_PREFIX}/user/did-spaces`;
|
13
13
|
export const NAVIGATION_URL = `${BLOCKLET_SERVICE_PATH_PREFIX}/admin/navigation`;
|
package/src/Util/index.ts
CHANGED
@@ -687,7 +687,7 @@ export const getJsSdkVersion = () => {
|
|
687
687
|
* @param {*} version2
|
688
688
|
* @returns boolean
|
689
689
|
*/
|
690
|
-
export const compareVersions = (version1: string, version2: string) => {
|
690
|
+
export const compareVersions = (version1: string, version2: string): boolean => {
|
691
691
|
const getDateVersion = (version: string) => {
|
692
692
|
const match = version.match(/^(\d+\.\d+\.\d+(?:-[^-]+?-\d{8}))/);
|
693
693
|
return match ? match[1] : version;
|