@arcblock/ux 3.1.55 → 3.1.57

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.
@@ -1,11 +1,11 @@
1
- import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
- import { memo as g } from "react";
3
- import { useMediaQuery as w, Box as n, Typography as y, Divider as C } from "@mui/material";
1
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
2
+ import { memo as w } from "react";
3
+ import { useMediaQuery as g, Box as o, Typography as y, Divider as C } from "@mui/material";
4
4
  import { DID as S } from "../../DID/index.js";
5
5
  import b from "./tooltip-avatar.js";
6
6
  import { renderTopRight as v } from "../components.js";
7
- import W from "./shorten-label.js";
8
- import j from "../Cards/social-actions.js";
7
+ import j from "./shorten-label.js";
8
+ import W from "../Cards/social-actions.js";
9
9
  function A({ ...s }) {
10
10
  const {
11
11
  user: e,
@@ -13,16 +13,16 @@ function A({ ...s }) {
13
13
  didProps: d,
14
14
  avatarSize: m,
15
15
  shouldShowHoverCard: p,
16
- renderCardContent: f,
16
+ renderCardContent: h,
17
17
  renderTopRightContent: l,
18
- topRightMaxWidth: h,
18
+ topRightMaxWidth: f,
19
19
  avatarProps: x,
20
20
  shortenLabelProps: u,
21
21
  renderName: a,
22
- ...o
23
- } = s, i = w("(max-width:500px)");
24
- return /* @__PURE__ */ r(
25
- n,
22
+ ...i
23
+ } = s, n = g("(max-width:500px)");
24
+ return /* @__PURE__ */ t(
25
+ o,
26
26
  {
27
27
  className: "user-card__avatar-content",
28
28
  sx: {
@@ -30,82 +30,88 @@ function A({ ...s }) {
30
30
  justifyContent: "space-between",
31
31
  alignItems: "center"
32
32
  },
33
- children: [
34
- /* @__PURE__ */ r(
35
- n,
36
- {
37
- sx: {
38
- display: "flex",
39
- justifyContent: "space-between",
40
- flexDirection: i ? "column" : "row",
41
- alignItems: i ? "flex-start" : "center",
42
- gap: i ? 2 : 1,
43
- flex: 1,
44
- minWidth: 0,
45
- flexWrap: "wrap"
46
- },
47
- children: [
48
- /* @__PURE__ */ r(n, { sx: { display: "flex", justifyContent: "flex-start", alignItems: "center", gap: 1, flex: 1 }, children: [
49
- /* @__PURE__ */ t(
50
- b,
51
- {
52
- user: e,
53
- avatarSize: m,
54
- shouldShowHoverCard: p,
55
- renderCardContent: f,
56
- avatarProps: x,
57
- ...o
58
- }
59
- ),
60
- /* @__PURE__ */ r(n, { children: [
33
+ children: /* @__PURE__ */ r(
34
+ o,
35
+ {
36
+ sx: {
37
+ display: "flex",
38
+ justifyContent: "space-between",
39
+ flexDirection: n ? "column" : "row",
40
+ alignItems: n ? "flex-start" : "center",
41
+ gap: n ? 2 : 1,
42
+ flex: 1,
43
+ minWidth: 0,
44
+ flexWrap: "wrap"
45
+ },
46
+ children: [
47
+ /* @__PURE__ */ r(
48
+ o,
49
+ {
50
+ sx: { display: "flex", justifyContent: "flex-start", alignItems: "center", gap: 1, flex: 1, width: "100%" },
51
+ children: [
61
52
  /* @__PURE__ */ t(
62
- y,
53
+ b,
63
54
  {
64
- variant: "subtitle1",
65
- className: "user-card__full-name-label",
66
- noWrap: !0,
67
- sx: {
68
- fontWeight: 500,
69
- color: "text.primary",
70
- fontSize: 18,
71
- lineHeight: 1.1
72
- },
73
- children: a ? a(e) : /* @__PURE__ */ t(W, { sx: { fontWeight: 500 }, ...u, children: e.fullName || e.email || e.did })
55
+ user: e,
56
+ avatarSize: m,
57
+ shouldShowHoverCard: p,
58
+ renderCardContent: h,
59
+ avatarProps: x,
60
+ ...i
74
61
  }
75
62
  ),
76
- c && e.did ? /* @__PURE__ */ t(
77
- S,
78
- {
79
- did: e.did,
80
- size: 14,
81
- copyable: !0,
82
- compact: !0,
83
- locale: "en",
84
- sx: { lineHeight: 1.5 },
85
- ...d ?? {}
86
- }
87
- ) : null
88
- ] })
89
- ] }),
90
- i && !l && o.showSocialActions ? /* @__PURE__ */ t(C, { sx: { width: "100%" } }) : null,
91
- l ? null : /* @__PURE__ */ t(
92
- j,
93
- {
94
- onFollowClick: o.onFollowClick,
95
- showSocialActions: o.showSocialActions,
96
- user: e,
97
- session: o.session
98
- }
99
- )
100
- ]
101
- }
102
- ),
103
- v(l, h)
104
- ]
63
+ /* @__PURE__ */ r(o, { sx: { width: "100%" }, children: [
64
+ /* @__PURE__ */ r(o, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 1, width: "100%" }, children: [
65
+ /* @__PURE__ */ t(
66
+ y,
67
+ {
68
+ variant: "subtitle1",
69
+ className: "user-card__full-name-label",
70
+ noWrap: !0,
71
+ sx: {
72
+ fontWeight: 500,
73
+ color: "text.primary",
74
+ fontSize: 18,
75
+ lineHeight: 1.1
76
+ },
77
+ children: a ? a(e) : /* @__PURE__ */ t(j, { sx: { fontWeight: 500 }, ...u, children: e.fullName || e.email || e.did })
78
+ }
79
+ ),
80
+ v(l, f)
81
+ ] }),
82
+ c && e.did ? /* @__PURE__ */ t(
83
+ S,
84
+ {
85
+ did: e.did,
86
+ size: 14,
87
+ copyable: !0,
88
+ compact: !0,
89
+ locale: "en",
90
+ sx: { lineHeight: 1.5 },
91
+ ...d ?? {}
92
+ }
93
+ ) : null
94
+ ] })
95
+ ]
96
+ }
97
+ ),
98
+ n && !l && i.showSocialActions ? /* @__PURE__ */ t(C, { sx: { width: "100%" } }) : null,
99
+ l ? null : /* @__PURE__ */ t(
100
+ W,
101
+ {
102
+ onFollowClick: i.onFollowClick,
103
+ showSocialActions: i.showSocialActions,
104
+ user: e,
105
+ session: i.session
106
+ }
107
+ )
108
+ ]
109
+ }
110
+ )
105
111
  }
106
112
  );
107
113
  }
108
- const P = g(A);
114
+ const P = w(A);
109
115
  export {
110
116
  P as default
111
117
  };
@@ -1,17 +1,18 @@
1
- import u from "debug";
2
- const i = u, d = (n) => new Proxy(window.console, {
3
- get(e, r) {
4
- return (...o) => {
1
+ import n from "debug";
2
+ const c = n, u = (o) => new Proxy(window.console, {
3
+ get(r, e) {
4
+ return (...i) => {
5
5
  try {
6
- return ["log", "debug", "info", "warn", "error"].includes(r) ? e[r](n, ...o) : e[r] instanceof Function ? e[r](...o) : e[r];
7
- } catch (t) {
8
- console.error(`Logger error in ${n}:`, t);
6
+ return ["log", "debug", "info", "warn", "error"].includes(e) ? r[e](o, ...i) : r[e] instanceof Function ? r[e](...i) : r[e];
7
+ } catch (l) {
8
+ console.error(`Logger error in ${o}:`, l);
9
9
  return;
10
10
  }
11
11
  };
12
12
  }
13
13
  });
14
+ window.blocklet?.ENABLE_DEBUG_TMP === "false" ? n.disable() : window.blocklet?.ENABLE_DEBUG_TMP && n.enable(window.blocklet?.ENABLE_DEBUG_TMP);
14
15
  export {
15
- i as createDebug,
16
- d as createLogger
16
+ c as createDebug,
17
+ u as createLogger
17
18
  };
@@ -1,4 +1,4 @@
1
- const e = "3.1.55", s = { "@blocklet/js-sdk": "1.17.0-beta-20251104-112713-e947b159" }, t = {
1
+ const e = "3.1.57", s = { "@blocklet/js-sdk": "1.17.0-beta-20251104-112713-e947b159" }, t = {
2
2
  version: e,
3
3
  dependencies: s
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "3.1.55",
3
+ "version": "3.1.57",
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": "ef9a2c0afa61214340d2065d3232573260cfd1a5",
71
+ "gitHead": "ff0e37a8ddeb14f0ebd4e1d55a308b17041e4d70",
72
72
  "dependencies": {
73
- "@arcblock/bridge": "3.1.55",
73
+ "@arcblock/bridge": "3.1.57",
74
74
  "@arcblock/did": "^1.27.2",
75
75
  "@arcblock/did-motif": "^1.1.14",
76
- "@arcblock/icons": "3.1.55",
77
- "@arcblock/nft-display": "3.1.55",
78
- "@arcblock/react-hooks": "3.1.55",
76
+ "@arcblock/icons": "3.1.57",
77
+ "@arcblock/nft-display": "3.1.57",
78
+ "@arcblock/react-hooks": "3.1.57",
79
79
  "@blocklet/js-sdk": "1.17.0-beta-20251104-112713-e947b159",
80
- "@blocklet/theme": "3.1.55",
80
+ "@blocklet/theme": "3.1.57",
81
81
  "@fontsource/roboto": "~5.1.1",
82
82
  "@fontsource/ubuntu-mono": "^5.2.6",
83
83
  "@iconify-icons/logos": "^1.2.36",
@@ -51,7 +51,8 @@ function MinimalContent({ ...props }: MinimalContentProps) {
51
51
  minWidth: 0,
52
52
  flexWrap: 'wrap',
53
53
  }}>
54
- <Box sx={{ display: 'flex', justifyContent: 'flex-start', alignItems: 'center', gap: 1, flex: 1 }}>
54
+ <Box
55
+ sx={{ display: 'flex', justifyContent: 'flex-start', alignItems: 'center', gap: 1, flex: 1, width: '100%' }}>
55
56
  <TooltipAvatar
56
57
  user={user}
57
58
  avatarSize={avatarSize}
@@ -60,25 +61,28 @@ function MinimalContent({ ...props }: MinimalContentProps) {
60
61
  avatarProps={avatarProps}
61
62
  {...rest}
62
63
  />
63
- <Box>
64
- <Typography
65
- variant="subtitle1"
66
- className="user-card__full-name-label"
67
- noWrap
68
- sx={{
69
- fontWeight: 500,
70
- color: 'text.primary',
71
- fontSize: 18,
72
- lineHeight: 1.1,
73
- }}>
74
- {renderName ? (
75
- renderName(user)
76
- ) : (
77
- <ShortenLabel sx={{ fontWeight: 500 }} {...shortenLabelProps}>
78
- {user.fullName || user.email || user.did}
79
- </ShortenLabel>
80
- )}
81
- </Typography>
64
+ <Box sx={{ width: '100%' }}>
65
+ <Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 1, width: '100%' }}>
66
+ <Typography
67
+ variant="subtitle1"
68
+ className="user-card__full-name-label"
69
+ noWrap
70
+ sx={{
71
+ fontWeight: 500,
72
+ color: 'text.primary',
73
+ fontSize: 18,
74
+ lineHeight: 1.1,
75
+ }}>
76
+ {renderName ? (
77
+ renderName(user)
78
+ ) : (
79
+ <ShortenLabel sx={{ fontWeight: 500 }} {...shortenLabelProps}>
80
+ {user.fullName || user.email || user.did}
81
+ </ShortenLabel>
82
+ )}
83
+ </Typography>
84
+ {renderTopRight(renderTopRightContent, topRightMaxWidth)}
85
+ </Box>
82
86
 
83
87
  {showDid && user.did ? (
84
88
  <DID
@@ -103,7 +107,6 @@ function MinimalContent({ ...props }: MinimalContentProps) {
103
107
  />
104
108
  ) : null}
105
109
  </Box>
106
- {renderTopRight(renderTopRightContent, topRightMaxWidth)}
107
110
  </Box>
108
111
  );
109
112
  }
@@ -25,3 +25,9 @@ export const createLogger = (namespace: string) => {
25
25
  },
26
26
  });
27
27
  };
28
+
29
+ if (window.blocklet?.ENABLE_DEBUG_TMP === 'false') {
30
+ debug.disable();
31
+ } else if (window.blocklet?.ENABLE_DEBUG_TMP) {
32
+ debug.enable(window.blocklet?.ENABLE_DEBUG_TMP);
33
+ }