@arcblock/ux 3.0.7 → 3.0.9

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 (188) hide show
  1. package/lib/ActionButton/index.js +8 -8
  2. package/lib/ActivityIndicator/index.js +7 -6
  3. package/lib/Address/compact-text.js +3 -2
  4. package/lib/Address/did-address.js +3 -3
  5. package/lib/Address/index.js +2 -2
  6. package/lib/Address/responsive-did-address.js +3 -3
  7. package/lib/Alert/index.js +7 -7
  8. package/lib/AnimationWaiter/dark-animation.json.js +27 -0
  9. package/lib/AnimationWaiter/default-animation.json.js +29 -0
  10. package/lib/AnimationWaiter/index.js +10 -10
  11. package/lib/Async/index.js +4 -4
  12. package/lib/Avatar/etherscan-blockies.js +15 -15
  13. package/lib/Avatar/index.js +5 -5
  14. package/lib/Badge/index.js +4 -4
  15. package/lib/Blocklet/blocklet.js +10 -10
  16. package/lib/Blocklet/index.js +5 -6
  17. package/lib/Blocklet/utils.js +1 -1
  18. package/lib/BlockletContext/index.js +1 -1
  19. package/lib/BlockletNFT/index.js +18 -18
  20. package/lib/BlockletV2/blocklet.js +36 -35
  21. package/lib/BlockletV2/components/icon-text.js +1 -1
  22. package/lib/BlockletV2/components/tooltip-icon.js +1 -1
  23. package/lib/BlockletV2/index.js +7 -8
  24. package/lib/BlockletV2/utils.js +1 -1
  25. package/lib/Button/index.js +1 -1
  26. package/lib/Button/wrap.js +2 -2
  27. package/lib/ButtonGroup/index.js +1 -1
  28. package/lib/Center/index.js +1 -1
  29. package/lib/ClickToCopy/copy-button.js +1 -1
  30. package/lib/ClickToCopy/index.js +5 -5
  31. package/lib/CloseButton/index.js +1 -1
  32. package/lib/CodeBlock/index.js +3 -3
  33. package/lib/Colors/index.js +3 -3
  34. package/lib/Config/config-provider.js +16 -15
  35. package/lib/Config/index.js +5 -3
  36. package/lib/Config/theme-mode-toggle.js +1 -1
  37. package/lib/ContactForm/index.js +4 -4
  38. package/lib/CookieConsent/index.js +1 -1
  39. package/lib/CountDown/index.js +2 -2
  40. package/lib/DID/index.js +49 -49
  41. package/lib/DIDConnect/app-icon.js +10 -10
  42. package/lib/DIDConnect/app-info-item.js +4 -4
  43. package/lib/DIDConnect/auth-apps/auth-apps-info.js +1 -1
  44. package/lib/DIDConnect/auth-apps/index.js +9 -9
  45. package/lib/DIDConnect/did-connect-container.js +19 -18
  46. package/lib/DIDConnect/did-connect-footer.js +6 -6
  47. package/lib/DIDConnect/index.js +10 -10
  48. package/lib/DIDConnect/landing-page.js +30 -29
  49. package/lib/DIDConnect/powered-by.js +2 -2
  50. package/lib/DIDConnect/request-storage-access-api-dialog.js +5 -5
  51. package/lib/DIDConnect/with-container.js +26 -25
  52. package/lib/DIDConnect/with-ux-theme.js +7 -6
  53. package/lib/Datatable/CustomToolbar.js +12 -12
  54. package/lib/Datatable/TableSearch.js +2 -2
  55. package/lib/Datatable/index.js +4 -4
  56. package/lib/Dialog/confirm.js +10 -10
  57. package/lib/Dialog/dialog.js +7 -7
  58. package/lib/Dialog/index.js +3 -3
  59. package/lib/Dialog/use-confirm.js +1 -1
  60. package/lib/DriftBot/index.js +1 -1
  61. package/lib/Earth/countries.json.js +13 -0
  62. package/lib/Earth/index.js +9 -9
  63. package/lib/Empty/index.js +1 -1
  64. package/lib/ErrorBoundary/fallback.js +15 -15
  65. package/lib/ErrorBoundary/index.js +6 -1
  66. package/lib/Footer/index.js +3 -3
  67. package/lib/Header/auto-hidden.js +1 -1
  68. package/lib/Header/header.js +3 -3
  69. package/lib/Header/index.js +3 -3
  70. package/lib/Header/responsive-header.js +6 -6
  71. package/lib/Icon/image.js +2 -2
  72. package/lib/Icon/index.js +18 -18
  73. package/lib/Img/index.js +1 -1
  74. package/lib/InfoRow/index.js +1 -1
  75. package/lib/Layout/dashboard/index.js +31 -29
  76. package/lib/Layout/dashboard/sidebar.js +2 -2
  77. package/lib/Layout/dashboard-legacy/header.js +2 -2
  78. package/lib/Layout/dashboard-legacy/index.js +4 -4
  79. package/lib/Layout/dashboard-legacy/sidebar.js +8 -8
  80. package/lib/Layout/index.js +5 -5
  81. package/lib/Locale/context.js +20 -20
  82. package/lib/Locale/selector.js +3 -3
  83. package/lib/Logo/images/logo-dark-text.svg.js +5 -0
  84. package/lib/Logo/images/logo-dark-top.svg.js +5 -0
  85. package/lib/Logo/images/logo-light-text.svg.js +5 -0
  86. package/lib/Logo/images/logo-light-top.svg.js +5 -0
  87. package/lib/Logo/index.js +18 -18
  88. package/lib/Metric/index.js +2 -2
  89. package/lib/NFTDisplay/NFTBroken.svg.js +108 -0
  90. package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
  91. package/lib/NFTDisplay/broken.js +2 -2
  92. package/lib/NFTDisplay/index.js +35 -35
  93. package/lib/NFTDisplay/loading.js +1 -1
  94. package/lib/NFTDisplay/render-svg.js +1 -1
  95. package/lib/NFTDisplay/svg-embedder/img.js +3 -3
  96. package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
  97. package/lib/NavMenu/images/OCAP.svg.js +5 -0
  98. package/lib/NavMenu/images/abt-network.svg.js +7 -0
  99. package/lib/NavMenu/images/ai-kit.svg.js +7 -0
  100. package/lib/NavMenu/images/aigne.svg.js +7 -0
  101. package/lib/NavMenu/images/aistro.svg.js +5 -0
  102. package/lib/NavMenu/images/arcsphere.svg.js +10 -0
  103. package/lib/NavMenu/images/blocklet-framework.svg.js +7 -0
  104. package/lib/NavMenu/images/blocklet-launcher.svg.js +5 -0
  105. package/lib/NavMenu/images/blocklet-server.svg.js +7 -0
  106. package/lib/NavMenu/images/blocklet-store.svg.js +5 -0
  107. package/lib/NavMenu/images/creator-studio.svg.js +7 -0
  108. package/lib/NavMenu/images/did-connect.svg.js +5 -0
  109. package/lib/NavMenu/images/did-name-service.svg.js +5 -0
  110. package/lib/NavMenu/images/did-wallet.svg.js +7 -0
  111. package/lib/NavMenu/images/did.svg.js +5 -0
  112. package/lib/NavMenu/images/nft-studio.svg.js +5 -0
  113. package/lib/NavMenu/images/vc.svg.js +5 -0
  114. package/lib/NavMenu/images/web3-kit.svg.js +7 -0
  115. package/lib/NavMenu/index.js +2 -2
  116. package/lib/NavMenu/nav-menu.js +23 -22
  117. package/lib/NavMenu/products.js +32 -32
  118. package/lib/NavMenu/style.js +1 -1
  119. package/lib/NavMenu/sub-item-group.js +1 -1
  120. package/lib/PageScroller/index.js +19 -19
  121. package/lib/PageScroller/story/FullPage.js +27 -27
  122. package/lib/PageScroller/story/PageContain.js +8 -8
  123. package/lib/Passport/index.js +2 -3
  124. package/lib/Passport/passport.js +2 -2
  125. package/lib/PhoneInput/country-select.js +1 -1
  126. package/lib/PhoneInput/index.js +2 -2
  127. package/lib/PricingTable/PricingPlan.js +1 -1
  128. package/lib/PricingTable/index.js +3 -3
  129. package/lib/RelativeTime/index.js +1 -1
  130. package/lib/Result/common.js +6 -4
  131. package/lib/Result/index.js +2 -2
  132. package/lib/Result/result.js +1 -1
  133. package/lib/Screenshot/BaseScreenshot/index.js +3 -3
  134. package/lib/Screenshot/index.js +9 -9
  135. package/lib/SessionBlocklet/index.js +8 -8
  136. package/lib/SessionManager/index.js +2 -3
  137. package/lib/SessionUser/components/did-space.js +14 -14
  138. package/lib/SessionUser/components/logged-in.js +33 -33
  139. package/lib/SessionUser/components/quick-login-item.js +29 -29
  140. package/lib/SessionUser/components/session-user-item.js +23 -23
  141. package/lib/SessionUser/components/session-user-switch.js +4 -4
  142. package/lib/SessionUser/components/un-login.js +7 -7
  143. package/lib/SessionUser/components/user-info.js +16 -16
  144. package/lib/SessionUser/images/did-spaces.svg.js +5 -0
  145. package/lib/SessionUser/index.js +2 -2
  146. package/lib/SharedBridge/index.js +23 -23
  147. package/lib/Spinner/index.js +1 -1
  148. package/lib/SplitButton/index.js +1 -1
  149. package/lib/Switch/index.js +1 -1
  150. package/lib/Tabs/index.js +1 -1
  151. package/lib/Tag/index.js +6 -6
  152. package/lib/TextCollapse/index.js +2 -2
  153. package/lib/Theme/index.js +22 -11
  154. package/lib/Theme/theme-provider.js +2 -2
  155. package/lib/Theme/theme.js +4 -4
  156. package/lib/Toast/index.js +11 -11
  157. package/lib/UserCard/Cards/avatar-only.js +2 -2
  158. package/lib/UserCard/Cards/basic-info.js +3 -3
  159. package/lib/UserCard/Cards/index.js +3 -3
  160. package/lib/UserCard/Cards/name-only.js +1 -1
  161. package/lib/UserCard/Container/card.js +2 -2
  162. package/lib/UserCard/Container/dialog.js +1 -1
  163. package/lib/UserCard/Content/basic.js +1 -1
  164. package/lib/UserCard/Content/clock.js +3 -3
  165. package/lib/UserCard/Content/minimal.js +8 -8
  166. package/lib/UserCard/Content/tooltip-avatar.js +1 -1
  167. package/lib/UserCard/components.js +23 -23
  168. package/lib/UserCard/index.js +12 -12
  169. package/lib/Util/index.js +2 -2
  170. package/lib/VerificationCode/index.js +1 -1
  171. package/lib/Video/index.js +2 -2
  172. package/lib/Wallet/Action.js +4 -4
  173. package/lib/Wallet/Download.js +6 -6
  174. package/lib/Wallet/Open.js +1 -1
  175. package/lib/Wallet/images/android_download.svg.js +5 -0
  176. package/lib/Wallet/images/app-store.svg.js +5 -0
  177. package/lib/Wallet/images/google-play.svg.js +5 -0
  178. package/lib/WalletOSIcon/index.js +1 -1
  179. package/lib/WebWalletSWKeeper/index.js +2 -2
  180. package/lib/WechatPrompt/index.js +1 -1
  181. package/lib/hooks/use-blocklet-logo.js +15 -13
  182. package/lib/hooks/use-clock.js +1 -1
  183. package/lib/index.js +79 -74
  184. package/lib/ux.css +1 -0
  185. package/lib/withTheme/index.js +7 -6
  186. package/lib/withTracker/error_boundary.js +1 -1
  187. package/package.json +7 -7
  188. package/vite.config.mjs +1 -1
@@ -19,9 +19,9 @@ import b from "highlight.js/lib/languages/plaintext";
19
19
  import B from "highlight.js/lib/languages/markdown";
20
20
  import "highlight.js/styles/atom-one-dark.css";
21
21
  import { FileCopy as S, Check as T } from "@mui/icons-material";
22
- import o from "../Colors";
23
- import { styled as A } from "../Theme";
24
- import E from "./LightBox";
22
+ import o from "../Colors/themes/default.js";
23
+ import { styled as A } from "../Theme/index.js";
24
+ import E from "./LightBox.js";
25
25
  e.registerLanguage("javascript", n);
26
26
  e.registerLanguage("js", n);
27
27
  e.registerLanguage("jsx", n);
@@ -1,6 +1,6 @@
1
- import { default as t } from "./themes/default";
2
- import { default as f } from "./themes/temp";
3
- import { default as d } from "./themes/did-connect";
1
+ import { default as t } from "./themes/default.js";
2
+ import { default as f } from "./themes/temp.js";
3
+ import { default as d } from "./themes/did-connect.js";
4
4
  export {
5
5
  t as default,
6
6
  d as didConnectColors,
@@ -1,16 +1,17 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { LocaleProvider as C, useLocaleContext as p } from "../Locale/context";
3
- import x, { useColorScheme as a } from "../Theme/theme-provider";
4
- import { useTheme as d } from "../Theme";
5
- function S({
2
+ import { LocaleProvider as p, useLocaleContext as C } from "../Locale/context.js";
3
+ import x, { useColorScheme as a } from "../Theme/theme-provider.js";
4
+ import { useTheme as d } from "@mui/material";
5
+ import "../Theme/theme.js";
6
+ function T({
6
7
  children: o,
7
8
  // theme provider
8
9
  theme: e,
9
10
  injectFirst: r,
10
11
  darkSchemeClass: m,
11
- prefer: n,
12
- disableBlockletTheme: c = !1,
13
- enableColorScheme: i,
12
+ prefer: i,
13
+ disableBlockletTheme: n = !1,
14
+ enableColorScheme: c,
14
15
  // locale provider
15
16
  locale: f,
16
17
  fallbackLocale: s,
@@ -24,11 +25,11 @@ function S({
24
25
  theme: e,
25
26
  injectFirst: r,
26
27
  darkSchemeClass: m,
27
- prefer: n,
28
- disableBlockletTheme: c,
29
- enableColorScheme: i,
28
+ prefer: i,
29
+ disableBlockletTheme: n,
30
+ enableColorScheme: c,
30
31
  children: /* @__PURE__ */ t(
31
- C,
32
+ p,
32
33
  {
33
34
  locale: f,
34
35
  fallbackLocale: s,
@@ -41,8 +42,8 @@ function S({
41
42
  }
42
43
  );
43
44
  }
44
- function T() {
45
- const o = d(), e = p(), r = a();
45
+ function j() {
46
+ const o = d(), e = C(), r = a();
46
47
  return {
47
48
  theme: o,
48
49
  ...e,
@@ -50,6 +51,6 @@ function T() {
50
51
  };
51
52
  }
52
53
  export {
53
- S as ConfigProvider,
54
- T as useConfig
54
+ T as ConfigProvider,
55
+ j as useConfig
55
56
  };
@@ -1,5 +1,7 @@
1
- export * from "./config-provider";
2
- import { default as f } from "./theme-mode-toggle";
1
+ import { ConfigProvider as r, useConfig as f } from "./config-provider.js";
2
+ import { default as d } from "./theme-mode-toggle.js";
3
3
  export {
4
- f as ThemeModeToggle
4
+ r as ConfigProvider,
5
+ d as ThemeModeToggle,
6
+ f as useConfig
5
7
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { IconButton as l } from "@mui/material";
3
3
  import { Brightness2Outlined as s, LightModeOutlined as m } from "@mui/icons-material";
4
- import { useColorScheme as u } from "../Theme/theme-provider";
4
+ import { useColorScheme as u } from "../Theme/theme-provider.js";
5
5
  function h() {
6
6
  var r, t;
7
7
  const { mode: n, toggleMode: o, prefer: i } = u();
@@ -2,10 +2,10 @@ import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
2
  import f from "react";
3
3
  import g from "axios";
4
4
  import { Typography as m, CircularProgress as b } from "@mui/material";
5
- import { mergeProps as y } from "../Util";
6
- import { warn as x } from "../Util/deprecate";
7
- import v from "../Button";
8
- import { styled as w } from "../Theme";
5
+ import { mergeProps as y } from "../Util/index.js";
6
+ import { warn as x } from "../Util/deprecate.js";
7
+ import v from "../Button/index.js";
8
+ import { styled as w } from "../Theme/index.js";
9
9
  function S({ formId: t, portalId: e }, s, r) {
10
10
  const a = `https://api.hsforms.com/submissions/v3/integration/submit/${e}/${t}`;
11
11
  return g.post(a, {
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
2
2
  import { Button as d } from "@mui/material";
3
3
  import s from "react-cookie-consent";
4
4
  import { resetCookieConsentValue as y } from "react-cookie-consent";
5
- import { styled as p } from "../Theme";
5
+ import { styled as p } from "../Theme/index.js";
6
6
  const n = {
7
7
  en: {
8
8
  content: "We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content, to analyze our website traffic, and to understand where our visitors are coming from.",
@@ -1,8 +1,8 @@
1
1
  import { jsxs as g, jsx as s } from "react/jsx-runtime";
2
2
  import { Component as b } from "react";
3
3
  import p from "lodash/isUndefined";
4
- import { getColor as u, mergeProps as y } from "../Util";
5
- import { styled as k } from "../Theme";
4
+ import { getColor as u, mergeProps as y } from "../Util/index.js";
5
+ import { styled as k } from "../Theme/index.js";
6
6
  const c = 60, d = 60 * c, m = 24 * d;
7
7
  function h(e) {
8
8
  const n = (/* @__PURE__ */ new Date()).getTime(), t = Math.round((e - n) / 1e3), i = Math.floor(t / m), r = Math.floor(t % m / d), o = Math.floor(t % m % d / c), a = Math.round(t % m % d % c);
package/lib/DID/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { jsxs as x, Fragment as H, jsx as r } from "react/jsx-runtime";
2
- import { getDIDMotifInfo as q } from "@arcblock/did-motif";
3
- import { types as S } from "@ocap/mcrypto";
4
- import B from "qrcode.react";
1
+ import { jsxs as x, Fragment as H, jsx as t } from "react/jsx-runtime";
2
+ import { getDIDMotifInfo as j } from "@arcblock/did-motif";
3
+ import { types as P } from "@ocap/mcrypto";
4
+ import q from "qrcode.react";
5
5
  import { Icon as X } from "@iconify/react";
6
6
  import Y from "@iconify-icons/material-symbols/qr-code-rounded";
7
- import { Box as N, Dialog as G, DialogContent as J, Typography as E } from "@mui/material";
7
+ import { Box as N, Dialog as G, DialogContent as J, Typography as S } from "@mui/material";
8
8
  import { useMemoizedFn as v, useCreation as g } from "ahooks";
9
9
  import { useRef as K, useState as V, useImperativeHandle as Z } from "react";
10
10
  import { toAddress as ee } from "@arcblock/did";
11
11
  import oe from "lodash/noop";
12
- import F from "../Address";
13
- import te from "../Avatar";
14
- import { DID_PREFIX as re } from "../Util/constant";
15
- import { translate as ne } from "../Locale/util";
16
- import { isEthereumDid as se, getDIDColor as ie } from "../Util";
12
+ import k from "../Address/index.js";
13
+ import re from "../Avatar/index.js";
14
+ import { DID_PREFIX as te } from "../Util/constant.js";
15
+ import { translate as ne } from "../Locale/util.js";
16
+ import { isEthereumDid as se, getDIDColor as ie } from "../Util/index.js";
17
17
  const ae = {
18
18
  en: {
19
19
  scanQrcode: "Scan with DID Wallet to view the {role}",
@@ -25,11 +25,11 @@ const ae = {
25
25
  download: "下载",
26
26
  downloadTips: "没有 DID Wallet ?"
27
27
  }
28
- }, A = "xenon-2020-01-15", k = {
28
+ }, A = "xenon-2020-01-15", W = {
29
29
  main: A,
30
30
  "main.abtnetwork.io": A,
31
31
  "beta.abtnetwork.io": "beta"
32
- }, le = (e, t, o) => o ? ie(e) : t.color, de = (e) => !{
32
+ }, le = (e, r, o) => o ? ie(e) : r.color, de = (e) => !{
33
33
  0: !0,
34
34
  // ACCOUNT
35
35
  6: !0,
@@ -37,14 +37,14 @@ const ae = {
37
37
  17: !0
38
38
  // TOKEN
39
39
  }[e], ce = (e) => {
40
- if (e === S.RoleType.ROLE_ANY)
40
+ if (e === P.RoleType.ROLE_ANY)
41
41
  return "DID";
42
- const [t] = Object.entries(S.RoleType).find((o) => o[1] === e) || [];
43
- return t ? t.toLowerCase().replace(/role_(\S)/g, (o, n) => n.toUpperCase()) : "DID";
44
- }, pe = (e, t, o) => t || de(e.roleType) ? o * 0.75 : o;
45
- function L({ did: e, showAvatar: t }) {
46
- const o = se(e), n = o ? void 0 : q(e), f = g(() => o ? e : `${re}${e}`, [e, o]), c = v((i, a) => [
47
- /* @__PURE__ */ r(
42
+ const [r] = Object.entries(P.RoleType).find((o) => o[1] === e) || [];
43
+ return r ? r.toLowerCase().replace(/role_(\S)/g, (o, n) => n.toUpperCase()) : "DID";
44
+ }, pe = (e, r, o) => r || de(e.roleType) ? o * 0.75 : o;
45
+ function F({ did: e, showAvatar: r }) {
46
+ const o = se(e), n = o ? void 0 : j(e), f = g(() => o ? e : `${te}${e}`, [e, o]), c = v((i, a) => [
47
+ /* @__PURE__ */ t(
48
48
  "span",
49
49
  {
50
50
  style: { flex: "0 0 auto", color: le(e, n, o) },
@@ -56,8 +56,8 @@ function L({ did: e, showAvatar: t }) {
56
56
  o ? "ETH" : "ABT",
57
57
  ":"
58
58
  ] }, `${a}-prefix-abt-${i}`),
59
- t && /* @__PURE__ */ r(
60
- te,
59
+ r && /* @__PURE__ */ t(
60
+ re,
61
61
  {
62
62
  src: "",
63
63
  did: e,
@@ -79,7 +79,7 @@ function L({ did: e, showAvatar: t }) {
79
79
  }
80
80
  function _e({
81
81
  ref: e = void 0,
82
- ...t
82
+ ...r
83
83
  }) {
84
84
  const {
85
85
  did: o,
@@ -101,7 +101,7 @@ function _e({
101
101
  style: w,
102
102
  className: Q,
103
103
  sx: m
104
- } = t, s = ee(o), d = {
104
+ } = r, s = ee(o), d = {
105
105
  size: T,
106
106
  component: l,
107
107
  copyable: R,
@@ -115,9 +115,9 @@ function _e({
115
115
  style: w,
116
116
  className: Q,
117
117
  sx: m
118
- }, C = K(null), { content: W, getPrepend: M } = L({ did: s, showAvatar: c }), [U, b] = V(!1), O = v(() => {
118
+ }, C = K(null), { content: L, getPrepend: M } = F({ did: s, showAvatar: c }), [U, b] = V(!1), B = v(() => {
119
119
  b(!1);
120
- }), j = v((y) => {
120
+ }), O = v((y) => {
121
121
  y.stopPropagation(), y.preventDefault(), b(!0);
122
122
  });
123
123
  return Z(e, () => new Proxy(
@@ -127,27 +127,27 @@ function _e({
127
127
  },
128
128
  {
129
129
  get(y, z) {
130
- var P;
131
- return y[z] || ((P = C == null ? void 0 : C.current) == null ? void 0 : P[z]);
130
+ var E;
131
+ return y[z] || ((E = C == null ? void 0 : C.current) == null ? void 0 : E[z]);
132
132
  }
133
133
  }
134
134
  )), /* @__PURE__ */ x(H, { children: [
135
- /* @__PURE__ */ r(
136
- F,
135
+ /* @__PURE__ */ t(
136
+ k,
137
137
  {
138
138
  locale: a,
139
- content: W,
139
+ content: L,
140
140
  ...d,
141
141
  ref: C,
142
142
  prepend: M(d.size, "address"),
143
143
  append: /* @__PURE__ */ x(H, { children: [
144
- i ? /* @__PURE__ */ r(
144
+ i ? /* @__PURE__ */ t(
145
145
  N,
146
146
  {
147
147
  id: "did-qrcode-button",
148
148
  component: X,
149
149
  icon: Y,
150
- onClick: j,
150
+ onClick: O,
151
151
  sx: {
152
152
  flexShrink: 0,
153
153
  cursor: "pointer",
@@ -162,7 +162,7 @@ function _e({
162
162
  },
163
163
  "address"
164
164
  ),
165
- /* @__PURE__ */ r(
165
+ /* @__PURE__ */ t(
166
166
  ue,
167
167
  {
168
168
  did: s,
@@ -170,7 +170,7 @@ function _e({
170
170
  roleType: f,
171
171
  showAvatar: c,
172
172
  open: U,
173
- onClose: O,
173
+ onClose: B,
174
174
  ...d
175
175
  }
176
176
  )
@@ -178,7 +178,7 @@ function _e({
178
178
  }
179
179
  function ue({
180
180
  did: e,
181
- chainId: t = void 0,
181
+ chainId: r = void 0,
182
182
  roleType: o = void 0,
183
183
  showAvatar: n = !0,
184
184
  // DialogProps
@@ -191,10 +191,10 @@ function ue({
191
191
  locale: l = "en",
192
192
  ...R
193
193
  }) {
194
- const h = v((m, s = {}) => ne(ae, m, l, "en", s)), { isEthDid: p, content: u, didMotifInfo: D, getPrepend: $ } = L({ did: e, showAvatar: n }), I = g(() => ["zh", "en"].includes(l) ? `https://www.didwallet.io/${l}` : "https://www.didwallet.io/en", [l]), _ = g(() => /* @__PURE__ */ x(H, { children: [
194
+ const h = v((m, s = {}) => ne(ae, m, l, "en", s)), { isEthDid: p, content: u, didMotifInfo: D, getPrepend: $ } = F({ did: e, showAvatar: n }), I = g(() => ["zh", "en"].includes(l) ? `https://www.didwallet.io/${l}` : "https://www.didwallet.io/en", [l]), _ = g(() => /* @__PURE__ */ x(H, { children: [
195
195
  h("downloadTips"),
196
196
  " ",
197
- /* @__PURE__ */ r(
197
+ /* @__PURE__ */ t(
198
198
  N,
199
199
  {
200
200
  component: "a",
@@ -213,19 +213,19 @@ function ue({
213
213
  )
214
214
  ] }), [I]), w = g(() => {
215
215
  var m;
216
- if (t)
217
- return k[t] || t;
216
+ if (r)
217
+ return W[r] || r;
218
218
  if (p) return "1";
219
219
  try {
220
220
  const s = (m = window.blocklet) == null ? void 0 : m.CHAIN_HOST, d = new URL(s).hostname;
221
221
  if (d)
222
- return k[d] || A;
222
+ return W[d] || A;
223
223
  } catch (s) {
224
224
  console.warn("Failed to parse chainHost:", s);
225
225
  }
226
226
  return A;
227
- }, [p, t]), Q = g(() => p ? `ethereum:abtwallet.io/i?address=${u}&action=didRecognize&chainID=${w}` : `abt://abtwallet.io/i?did=${u}&action=didRecognize&chainID=${w}`, [u, p, w]);
228
- return /* @__PURE__ */ r(
227
+ }, [p, r]), Q = g(() => p ? `ethereum:abtwallet.io/i?address=${u}&action=didRecognize&chainID=${w}` : `abt://abtwallet.io/i?did=${u}&action=didRecognize&chainID=${w}`, [u, p, w]);
228
+ return /* @__PURE__ */ t(
229
229
  G,
230
230
  {
231
231
  open: f,
@@ -241,9 +241,9 @@ function ue({
241
241
  }
242
242
  },
243
243
  children: /* @__PURE__ */ x(J, { align: "center", sx: { p: 3 }, children: [
244
- /* @__PURE__ */ r(E, { sx: { mb: 2, fontWeight: 500, fontSize: 18 }, children: h("scanQrcode", { role: ce(o || (D == null ? void 0 : D.roleType)) }) }),
245
- /* @__PURE__ */ r(
246
- B,
244
+ /* @__PURE__ */ t(S, { sx: { mb: 2, fontWeight: 500, fontSize: 18 }, children: h("scanQrcode", { role: ce(o || (D == null ? void 0 : D.roleType)) }) }),
245
+ /* @__PURE__ */ t(
246
+ q,
247
247
  {
248
248
  value: Q,
249
249
  size: 256,
@@ -251,8 +251,8 @@ function ue({
251
251
  level: "M"
252
252
  }
253
253
  ),
254
- /* @__PURE__ */ r(N, { sx: { mt: 1.5, textAlign: "center" }, children: /* @__PURE__ */ r(
255
- F,
254
+ /* @__PURE__ */ t(N, { sx: { mt: 1.5, textAlign: "center" }, children: /* @__PURE__ */ t(
255
+ k,
256
256
  {
257
257
  locale: l,
258
258
  content: u,
@@ -264,8 +264,8 @@ function ue({
264
264
  },
265
265
  "dialog-address"
266
266
  ) }),
267
- /* @__PURE__ */ r(
268
- E,
267
+ /* @__PURE__ */ t(
268
+ S,
269
269
  {
270
270
  variant: "body2",
271
271
  sx: {
@@ -1,26 +1,26 @@
1
- import { jsx as m } from "react/jsx-runtime";
1
+ import { jsx as i } from "react/jsx-runtime";
2
2
  import { useState as p } from "react";
3
3
  import { joinURL as a } from "ufo";
4
- import c from "../Img";
5
- import { isUrl as f } from "../Util";
6
- import s from "../Avatar";
7
- function L({ appInfo: r, size: t = 32, ...i }) {
4
+ import u from "../Img/index.js";
5
+ import { isUrl as c } from "../Util/index.js";
6
+ import d from "../Avatar/index.js";
7
+ function E({ appInfo: r, size: t = 32, ...m }) {
8
8
  const [e, l] = p(!1);
9
9
  if (e || !(r.appUrl || r.appLogo))
10
- return /* @__PURE__ */ m(s, { did: r.appPid, size: t });
10
+ return /* @__PURE__ */ i(d, { did: r.appPid, size: t });
11
11
  let o = r.appLogo || "";
12
- return f(o) || (o = a(r.appUrl || "", o)), /* @__PURE__ */ m(
13
- c,
12
+ return c(o) || (o = a(r.appUrl || "", o)), /* @__PURE__ */ i(
13
+ u,
14
14
  {
15
15
  src: o,
16
16
  alt: r.appName || "Blocklet Icon",
17
17
  width: t,
18
18
  height: t,
19
- ...i,
19
+ ...m,
20
20
  onError: () => l(!0)
21
21
  }
22
22
  );
23
23
  }
24
24
  export {
25
- L as default
25
+ E as default
26
26
  };
@@ -4,10 +4,10 @@ import f from "@iconify-icons/material-symbols/check";
4
4
  import { Icon as d } from "@iconify/react";
5
5
  import { useSize as h, useCreation as u } from "ahooks";
6
6
  import { useRef as x } from "react";
7
- import { DID as w } from "../DID";
8
- import { mergeSx as I } from "../Util/style";
9
- import N from "./app-icon";
10
- import { DID_CONNECT_MEDIUM_WIDTH as C } from "../Util/constant";
7
+ import { DID as w } from "../DID/index.js";
8
+ import { mergeSx as I } from "../Util/style.js";
9
+ import N from "./app-icon.js";
10
+ import { DID_CONNECT_MEDIUM_WIDTH as C } from "../Util/constant.js";
11
11
  function b({
12
12
  appInfo: r,
13
13
  active: l = !1,
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
2
  import { Box as e, Typography as l } from "@mui/material";
3
- import o from "../../Img";
3
+ import o from "../../Img/index.js";
4
4
  function c({
5
5
  requestAppInfo: r,
6
6
  currentAppInfo: a
@@ -2,15 +2,15 @@ import { jsx as i, jsxs as r, Fragment as G } from "react/jsx-runtime";
2
2
  import { CircularProgress as x, Box as l, Stack as H, Button as v, Typography as J, Link as K } from "@mui/material";
3
3
  import { useReactive as O, useMemoizedFn as t } from "ahooks";
4
4
  import c from "lodash/noop";
5
- import Q from "../did-connect-container";
6
- import S from "./auth-apps-info";
7
- import V from "../../Center";
8
- import X from "../landing-page";
9
- import { translate as Y } from "../../Locale/util";
10
- import { useLocaleContext as Z } from "../../Locale/context";
11
- import _ from "../../UserCard";
12
- import { InfoType as $, CardType as P } from "../../UserCard/types";
13
- import { mergeSx as b } from "../../Util/style";
5
+ import Q from "../did-connect-container.js";
6
+ import S from "./auth-apps-info.js";
7
+ import V from "../../Center/index.js";
8
+ import X from "../landing-page.js";
9
+ import { translate as Y } from "../../Locale/util.js";
10
+ import { useLocaleContext as Z } from "../../Locale/context.js";
11
+ import _ from "../../UserCard/index.js";
12
+ import { InfoType as $, CardType as P } from "../../UserCard/types.js";
13
+ import { mergeSx as b } from "../../Util/style.js";
14
14
  const ee = {
15
15
  en: {
16
16
  notThis: "Not this?",
@@ -1,15 +1,16 @@
1
1
  import { jsx as t, jsxs as m } from "react/jsx-runtime";
2
2
  import { memo as J, createElement as U, useRef as X } from "react";
3
3
  import { useBrowser as Y } from "@arcblock/react-hooks";
4
- import { Backdrop as Z, useMediaQuery as P, Box as l, Drawer as ee, SwipeableDrawer as oe, Dialog as re, DialogContent as ne } from "@mui/material";
5
- import { useCreation as ae, useDebounce as ie } from "ahooks";
6
- import te from "color-convert";
7
- import { getDIDMotifInfo as de } from "@arcblock/did-motif";
8
- import ce from "lodash/noop";
9
- import { useTheme as le } from "../Theme";
10
- import { mergeSx as c } from "../Util/style";
11
- import { isEthereumDid as ue, getDIDColor as se, hexToRgba as u } from "../Util";
12
- import h from "./did-connect-footer";
4
+ import { Backdrop as Z, useMediaQuery as P, useTheme as ee, Box as l, Drawer as oe, SwipeableDrawer as re, Dialog as ne, DialogContent as ae } from "@mui/material";
5
+ import { useCreation as ie, useDebounce as te } from "ahooks";
6
+ import de from "color-convert";
7
+ import { getDIDMotifInfo as ce } from "@arcblock/did-motif";
8
+ import le from "lodash/noop";
9
+ import "../Theme/theme.js";
10
+ import "../Theme/theme-provider.js";
11
+ import { mergeSx as c } from "../Util/style.js";
12
+ import { isEthereumDid as ue, getDIDColor as se, hexToRgba as u } from "../Util/index.js";
13
+ import h from "./did-connect-footer.js";
13
14
  const j = J(({ ref: a, ...f }) => /* @__PURE__ */ U(
14
15
  Z,
15
16
  {
@@ -24,28 +25,28 @@ const j = J(({ ref: a, ...f }) => /* @__PURE__ */ U(
24
25
  key: "background"
25
26
  }
26
27
  ));
27
- function Se({
28
+ function ye({
28
29
  open: a = !1,
29
30
  popup: f = !1,
30
31
  hideCloseButton: w = !1,
31
32
  children: g,
32
33
  appPid: E = void 0,
33
34
  slotProps: e = void 0,
34
- onClose: G = ce,
35
+ onClose: G = le,
35
36
  keepMounted: k = !1
36
37
  }) {
37
38
  var y, A, L, _, B, I, z, M;
38
- const n = ae(() => {
39
- const o = E || window.blocklet.appPid, r = ue(o), i = r ? void 0 : de(o);
39
+ const n = ie(() => {
40
+ const o = E || window.blocklet.appPid, r = ue(o), i = r ? void 0 : ce(o);
40
41
  return r ? se(o) : i.color;
41
42
  }, []), C = X(null), N = Y(), O = P("(max-width:640px)");
42
43
  let s = "page";
43
44
  f && (s = "dialog", O && N.mobile.any && (s = "drawer"));
44
- const b = le(), T = ((A = (y = b == null ? void 0 : b.transitions) == null ? void 0 : y.duration) == null ? void 0 : A.leavingScreen) || 500, W = ie(a, {
45
+ const b = ee(), T = ((A = (y = b == null ? void 0 : b.transitions) == null ? void 0 : y.duration) == null ? void 0 : A.leavingScreen) || 500, W = te(a, {
45
46
  wait: T
46
47
  }), D = (o, r) => {
47
48
  ["backdropClick", "escapeKeyDown"].includes(r) || G();
48
- }, v = W || a || k, F = w ? ee : oe, H = te.hex.hsl(n), [R, $, d] = H, x = [0, 30, 60, 30, 0, 30, 60, 30], K = Math.max(...x), Q = Math.min(...x);
49
+ }, v = W || a || k, F = w ? oe : re, H = de.hex.hsl(n), [R, $, d] = H, x = [0, 30, 60, 30, 0, 30, 60, 30], K = Math.max(...x), Q = Math.min(...x);
49
50
  let p = !1;
50
51
  (d * (100 + K) / 100 > 100 || d * (100 + Q) / 100 < 0) && (p = !0);
51
52
  const V = `linear-gradient(45deg, ${x.map((o) => {
@@ -206,7 +207,7 @@ function Se({
206
207
  ]
207
208
  }
208
209
  ) : /* @__PURE__ */ t(
209
- re,
210
+ ne,
210
211
  {
211
212
  open: a,
212
213
  slots: {
@@ -230,7 +231,7 @@ function Se({
230
231
  )
231
232
  },
232
233
  children: /* @__PURE__ */ m(
233
- ne,
234
+ ae,
234
235
  {
235
236
  sx: {
236
237
  maxWidth: "calc(100vw - 18px)",
@@ -251,5 +252,5 @@ function Se({
251
252
  );
252
253
  }
253
254
  export {
254
- Se as default
255
+ ye as default
255
256
  };
@@ -3,12 +3,12 @@ import { Box as a } from "@mui/material";
3
3
  import { useSize as c, useCreation as d } from "ahooks";
4
4
  import { useRef as x } from "react";
5
5
  import u from "@arcblock/react-hooks/lib/useBrowser";
6
- import b from "./powered-by";
7
- import h from "./app-info-item";
8
- import w from "./app-icon";
9
- import { hexToRgba as g, getDIDColor as I } from "../Util";
10
- import { mergeSx as C } from "../Util/style";
11
- import { DID_CONNECT_MEDIUM_WIDTH as D } from "../Util/constant";
6
+ import b from "./powered-by.js";
7
+ import h from "./app-info-item.js";
8
+ import w from "./app-icon.js";
9
+ import { hexToRgba as g, getDIDColor as I } from "../Util/index.js";
10
+ import { mergeSx as C } from "../Util/style.js";
11
+ import { DID_CONNECT_MEDIUM_WIDTH as D } from "../Util/constant.js";
12
12
  function z({
13
13
  currentAppInfo: r = globalThis.blocklet,
14
14
  currentAppColor: n = ((s) => (s = globalThis.blocklet) == null ? void 0 : s.appPid)() ? I(((f) => (f = globalThis.blocklet) == null ? void 0 : f.appPid)()) : "#fff",
@@ -1,13 +1,13 @@
1
- import { default as t } from "./did-connect-footer";
2
- import { default as a } from "./app-info-item";
3
- import { default as p } from "./app-icon";
4
- import { default as m } from "./powered-by";
5
- import { default as u } from "./with-container";
6
- import { default as l } from "./with-ux-theme";
7
- import { default as D } from "./did-connect-logo";
8
- import { default as i } from "./did-connect-container";
9
- import { default as I } from "./request-storage-access-api-dialog";
10
- import { default as h } from "./auth-apps";
1
+ import { default as t } from "./did-connect-footer.js";
2
+ import { default as a } from "./app-info-item.js";
3
+ import { default as p } from "./app-icon.js";
4
+ import { default as m } from "./powered-by.js";
5
+ import { default as u } from "./with-container.js";
6
+ import { default as l } from "./with-ux-theme.js";
7
+ import { default as D } from "./did-connect-logo.js";
8
+ import { default as i } from "./did-connect-container.js";
9
+ import { default as I } from "./request-storage-access-api-dialog.js";
10
+ import { default as h } from "./auth-apps/index.js";
11
11
  export {
12
12
  p as AppIcon,
13
13
  a as AppInfoItem,