@arcblock/ux 3.0.5 → 3.0.7

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 (370) hide show
  1. package/lib/ActionButton/index.d.ts +1 -1
  2. package/lib/ActionButton/index.js +9 -9
  3. package/lib/ActivityIndicator/index.js +6 -7
  4. package/lib/Address/compact-text.d.ts +1 -1
  5. package/lib/Address/compact-text.js +6 -7
  6. package/lib/Address/did-address.js +4 -4
  7. package/lib/Address/index.js +6 -6
  8. package/lib/Address/responsive-did-address.js +17 -17
  9. package/lib/Alert/index.d.ts +1 -1
  10. package/lib/Alert/index.js +8 -8
  11. package/lib/AnimationWaiter/index.js +10 -10
  12. package/lib/Async/index.js +4 -4
  13. package/lib/Avatar/etherscan-blockies.js +15 -15
  14. package/lib/Avatar/index.d.ts +1 -1
  15. package/lib/Avatar/index.js +6 -6
  16. package/lib/Badge/index.js +5 -5
  17. package/lib/Blocklet/blocklet.js +10 -10
  18. package/lib/Blocklet/index.js +6 -5
  19. package/lib/Blocklet/utils.js +1 -1
  20. package/lib/BlockletContext/index.d.ts +1 -1
  21. package/lib/BlockletContext/index.js +1 -1
  22. package/lib/BlockletNFT/index.js +19 -19
  23. package/lib/BlockletV2/blocklet.d.ts +1 -1
  24. package/lib/BlockletV2/blocklet.js +36 -37
  25. package/lib/BlockletV2/components/icon-text.d.ts +1 -1
  26. package/lib/BlockletV2/components/icon-text.js +13 -13
  27. package/lib/BlockletV2/components/tooltip-icon.js +22 -20
  28. package/lib/BlockletV2/index.js +8 -7
  29. package/lib/BlockletV2/utils.js +1 -1
  30. package/lib/Button/index.js +1 -1
  31. package/lib/Button/wrap.js +3 -3
  32. package/lib/ButtonGroup/index.js +1 -1
  33. package/lib/Center/index.js +4 -4
  34. package/lib/ClickToCopy/copy-button.js +3 -3
  35. package/lib/ClickToCopy/index.js +5 -5
  36. package/lib/CloseButton/index.js +2 -2
  37. package/lib/CodeBlock/index.js +3 -3
  38. package/lib/Colors/index.js +3 -3
  39. package/lib/Config/config-provider.js +15 -16
  40. package/lib/Config/index.js +3 -5
  41. package/lib/Config/theme-mode-toggle.js +1 -1
  42. package/lib/ContactForm/index.js +26 -25
  43. package/lib/CookieConsent/index.js +1 -1
  44. package/lib/CountDown/index.js +2 -2
  45. package/lib/DID/index.js +79 -78
  46. package/lib/DIDConnect/app-icon.js +10 -10
  47. package/lib/DIDConnect/app-info-item.js +5 -5
  48. package/lib/DIDConnect/auth-apps/auth-apps-info.js +1 -1
  49. package/lib/DIDConnect/auth-apps/index.js +56 -56
  50. package/lib/DIDConnect/did-connect-container.js +35 -36
  51. package/lib/DIDConnect/did-connect-footer.js +7 -7
  52. package/lib/DIDConnect/index.js +10 -10
  53. package/lib/DIDConnect/landing-page.js +45 -46
  54. package/lib/DIDConnect/powered-by.js +2 -2
  55. package/lib/DIDConnect/request-storage-access-api-dialog.js +44 -45
  56. package/lib/DIDConnect/with-container.js +25 -26
  57. package/lib/DIDConnect/with-ux-theme.js +6 -7
  58. package/lib/Datatable/CustomToolbar.d.ts +3 -1
  59. package/lib/Datatable/CustomToolbar.js +13 -13
  60. package/lib/Datatable/TableSearch.js +2 -2
  61. package/lib/Datatable/index.js +6 -6
  62. package/lib/Dialog/confirm.d.ts +1 -1
  63. package/lib/Dialog/confirm.js +20 -20
  64. package/lib/Dialog/dialog.js +7 -7
  65. package/lib/Dialog/index.js +3 -3
  66. package/lib/Dialog/types.d.ts +20 -0
  67. package/lib/Dialog/use-confirm.js +1 -1
  68. package/lib/DriftBot/index.js +1 -1
  69. package/lib/Earth/index.js +10 -10
  70. package/lib/Empty/index.js +1 -1
  71. package/lib/ErrorBoundary/fallback.js +15 -15
  72. package/lib/ErrorBoundary/index.js +1 -6
  73. package/lib/Footer/index.d.ts +1 -1
  74. package/lib/Footer/index.js +7 -7
  75. package/lib/Header/addon-button.d.ts +1 -1
  76. package/lib/Header/addon-button.js +11 -6
  77. package/lib/Header/auto-hidden.js +1 -1
  78. package/lib/Header/header.js +4 -4
  79. package/lib/Header/index.js +3 -3
  80. package/lib/Header/responsive-header.d.ts +1 -1
  81. package/lib/Header/responsive-header.js +33 -34
  82. package/lib/Icon/image.js +2 -2
  83. package/lib/Icon/index.js +12 -12
  84. package/lib/Img/index.js +1 -1
  85. package/lib/InfoRow/index.d.ts +1 -1
  86. package/lib/InfoRow/index.js +1 -2
  87. package/lib/Layout/dashboard/external-link.d.ts +1 -1
  88. package/lib/Layout/dashboard/external-link.js +1 -1
  89. package/lib/Layout/dashboard/full-page.js +8 -8
  90. package/lib/Layout/dashboard/index.js +30 -32
  91. package/lib/Layout/dashboard/sidebar.js +3 -3
  92. package/lib/Layout/dashboard-legacy/header.js +12 -12
  93. package/lib/Layout/dashboard-legacy/index.js +20 -20
  94. package/lib/Layout/dashboard-legacy/sidebar.d.ts +1 -1
  95. package/lib/Layout/dashboard-legacy/sidebar.js +20 -13
  96. package/lib/Layout/index.js +7 -7
  97. package/lib/LoadingMask/index.d.ts +1 -1
  98. package/lib/LoadingMask/index.js +4 -4
  99. package/lib/Locale/context.js +27 -27
  100. package/lib/Locale/selector.d.ts +1 -1
  101. package/lib/Locale/selector.js +4 -4
  102. package/lib/Logo/index.js +19 -19
  103. package/lib/Metric/index.js +2 -2
  104. package/lib/NFTDisplay/aspect-ratio-container.d.ts +1 -1
  105. package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
  106. package/lib/NFTDisplay/broken.js +2 -2
  107. package/lib/NFTDisplay/index.js +38 -35
  108. package/lib/NFTDisplay/loading.js +1 -1
  109. package/lib/NFTDisplay/render-svg.js +4 -4
  110. package/lib/NFTDisplay/svg-embedder/img.js +3 -3
  111. package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
  112. package/lib/NavMenu/index.js +2 -2
  113. package/lib/NavMenu/nav-menu.js +46 -44
  114. package/lib/NavMenu/products.js +33 -33
  115. package/lib/NavMenu/style.js +1 -1
  116. package/lib/NavMenu/sub-item-group.js +1 -1
  117. package/lib/PageScroller/index.js +53 -53
  118. package/lib/PageScroller/story/FullPage.js +27 -27
  119. package/lib/PageScroller/story/PageContain.js +8 -8
  120. package/lib/Passport/index.js +3 -2
  121. package/lib/Passport/passport.js +2 -2
  122. package/lib/PhoneInput/country-select.js +24 -24
  123. package/lib/PhoneInput/index.js +13 -13
  124. package/lib/PoweredByArcBlock/index.js +10 -6
  125. package/lib/PricingTable/PricingPlan.js +1 -1
  126. package/lib/PricingTable/index.js +3 -3
  127. package/lib/QRCode/index.js +5 -5
  128. package/lib/RelativeTime/index.js +17 -17
  129. package/lib/Result/common.js +4 -6
  130. package/lib/Result/index.js +2 -2
  131. package/lib/Result/result.js +5 -5
  132. package/lib/Screenshot/BaseScreenshot/index.js +3 -3
  133. package/lib/Screenshot/index.d.ts +1 -1
  134. package/lib/Screenshot/index.js +10 -10
  135. package/lib/SessionBlocklet/index.js +8 -8
  136. package/lib/SessionManager/index.js +3 -2
  137. package/lib/SessionUser/components/did-space.d.ts +1 -1
  138. package/lib/SessionUser/components/did-space.js +14 -14
  139. package/lib/SessionUser/components/logged-in.js +33 -33
  140. package/lib/SessionUser/components/quick-login-item.js +29 -29
  141. package/lib/SessionUser/components/session-user-item.js +27 -27
  142. package/lib/SessionUser/components/session-user-switch.js +4 -4
  143. package/lib/SessionUser/components/un-login.js +7 -7
  144. package/lib/SessionUser/components/user-info.js +16 -16
  145. package/lib/SessionUser/index.js +2 -2
  146. package/lib/SharedBridge/index.js +23 -23
  147. package/lib/Spinner/index.js +2 -2
  148. package/lib/SplitButton/index.d.ts +1 -1
  149. package/lib/SplitButton/index.js +2 -2
  150. package/lib/Success/index.js +1 -1
  151. package/lib/Switch/index.js +1 -1
  152. package/lib/Tabs/index.js +16 -9
  153. package/lib/Tag/index.d.ts +1 -1
  154. package/lib/Tag/index.js +7 -7
  155. package/lib/TextCollapse/index.js +3 -3
  156. package/lib/Theme/index.js +11 -22
  157. package/lib/Theme/theme-provider.js +60 -55
  158. package/lib/Theme/theme.js +5 -4
  159. package/lib/Toast/index.js +11 -11
  160. package/lib/Typography/index.js +13 -13
  161. package/lib/UserCard/Cards/avatar-only.js +2 -2
  162. package/lib/UserCard/Cards/basic-info.d.ts +1 -1
  163. package/lib/UserCard/Cards/basic-info.js +4 -4
  164. package/lib/UserCard/Cards/index.d.ts +1 -1
  165. package/lib/UserCard/Cards/index.js +4 -4
  166. package/lib/UserCard/Cards/name-only.js +1 -1
  167. package/lib/UserCard/Container/card.js +8 -8
  168. package/lib/UserCard/Container/dialog.js +2 -2
  169. package/lib/UserCard/Content/basic.js +3 -3
  170. package/lib/UserCard/Content/clock.js +3 -3
  171. package/lib/UserCard/Content/minimal.d.ts +1 -1
  172. package/lib/UserCard/Content/minimal.js +8 -8
  173. package/lib/UserCard/Content/tooltip-avatar.js +18 -18
  174. package/lib/UserCard/components.js +23 -23
  175. package/lib/UserCard/index.js +12 -12
  176. package/lib/Util/index.js +2 -2
  177. package/lib/VerificationCode/index.js +2 -2
  178. package/lib/Video/index.js +2 -2
  179. package/lib/Wallet/Action.js +4 -4
  180. package/lib/Wallet/Download.js +6 -6
  181. package/lib/Wallet/Open.js +1 -1
  182. package/lib/WalletOSIcon/index.d.ts +2 -2
  183. package/lib/WalletOSIcon/index.js +8 -3
  184. package/lib/WebWalletSWKeeper/index.d.ts +3 -1
  185. package/lib/WebWalletSWKeeper/index.js +6 -3
  186. package/lib/WechatPrompt/index.js +1 -1
  187. package/lib/global.d.ts +28 -0
  188. package/lib/hooks/use-blocklet-logo.js +13 -15
  189. package/lib/hooks/use-clock.js +1 -1
  190. package/lib/index.js +74 -79
  191. package/lib/type.d.ts +44 -0
  192. package/lib/withTheme/index.d.ts +3 -2
  193. package/lib/withTheme/index.js +13 -14
  194. package/lib/withTracker/error_boundary.js +1 -1
  195. package/package.json +7 -7
  196. package/src/ActionButton/index.jsx +1 -1
  197. package/src/Address/compact-text.jsx +1 -1
  198. package/src/Address/did-address.tsx +1 -1
  199. package/src/Address/index.tsx +1 -1
  200. package/src/Address/responsive-did-address.tsx +3 -3
  201. package/src/Alert/index.jsx +1 -1
  202. package/src/Avatar/index.jsx +1 -1
  203. package/src/Badge/index.jsx +1 -1
  204. package/src/BlockletContext/index.tsx +1 -1
  205. package/src/BlockletNFT/index.jsx +1 -1
  206. package/src/BlockletV2/blocklet.tsx +1 -1
  207. package/src/BlockletV2/components/icon-text.tsx +4 -4
  208. package/src/BlockletV2/components/tooltip-icon.tsx +5 -3
  209. package/src/Button/wrap.jsx +1 -1
  210. package/src/Center/index.tsx +1 -1
  211. package/src/ClickToCopy/copy-button.tsx +1 -1
  212. package/src/CloseButton/index.tsx +1 -1
  213. package/src/ContactForm/index.tsx +9 -2
  214. package/src/DID/index.tsx +5 -4
  215. package/src/DIDConnect/app-info-item.tsx +1 -1
  216. package/src/DIDConnect/auth-apps/index.tsx +8 -8
  217. package/src/DIDConnect/did-connect-container.tsx +2 -2
  218. package/src/DIDConnect/did-connect-footer.tsx +1 -1
  219. package/src/DIDConnect/landing-page.tsx +6 -6
  220. package/src/DIDConnect/request-storage-access-api-dialog.tsx +1 -2
  221. package/src/Datatable/CustomToolbar.jsx +1 -1
  222. package/src/Datatable/index.jsx +2 -2
  223. package/src/Dialog/confirm.jsx +1 -1
  224. package/src/Earth/index.tsx +1 -1
  225. package/src/Footer/index.tsx +5 -2
  226. package/src/Header/addon-button.tsx +7 -2
  227. package/src/Header/header.tsx +1 -1
  228. package/src/Header/responsive-header.tsx +1 -2
  229. package/src/Icon/index.tsx +1 -1
  230. package/src/InfoRow/index.tsx +1 -2
  231. package/src/Layout/dashboard/external-link.tsx +1 -1
  232. package/src/Layout/dashboard/full-page.tsx +1 -1
  233. package/src/Layout/dashboard/index.tsx +1 -1
  234. package/src/Layout/dashboard/sidebar.tsx +5 -2
  235. package/src/Layout/dashboard-legacy/header.tsx +5 -5
  236. package/src/Layout/dashboard-legacy/index.tsx +3 -3
  237. package/src/Layout/dashboard-legacy/sidebar.tsx +10 -2
  238. package/src/Layout/index.tsx +2 -2
  239. package/src/LoadingMask/index.tsx +5 -5
  240. package/src/Locale/context.tsx +3 -3
  241. package/src/Locale/selector.tsx +1 -1
  242. package/src/Logo/index.tsx +1 -1
  243. package/src/NFTDisplay/aspect-ratio-container.tsx +1 -1
  244. package/src/NFTDisplay/index.tsx +2 -1
  245. package/src/NFTDisplay/render-svg.tsx +1 -1
  246. package/src/NavMenu/nav-menu.tsx +8 -5
  247. package/src/NavMenu/products.tsx +3 -1
  248. package/src/PageScroller/index.tsx +4 -4
  249. package/src/PhoneInput/country-select.tsx +3 -3
  250. package/src/PhoneInput/index.tsx +1 -1
  251. package/src/PoweredByArcBlock/index.tsx +5 -1
  252. package/src/QRCode/index.tsx +1 -1
  253. package/src/RelativeTime/index.tsx +3 -3
  254. package/src/Result/result.tsx +1 -1
  255. package/src/Screenshot/index.tsx +2 -2
  256. package/src/SessionUser/components/did-space.tsx +1 -1
  257. package/src/SessionUser/components/session-user-item.tsx +1 -1
  258. package/src/SharedBridge/index.tsx +2 -2
  259. package/src/Spinner/index.tsx +1 -1
  260. package/src/SplitButton/index.tsx +1 -1
  261. package/src/Success/index.tsx +1 -1
  262. package/src/Tabs/index.tsx +10 -3
  263. package/src/Tag/index.jsx +1 -1
  264. package/src/TextCollapse/index.tsx +1 -1
  265. package/src/Theme/theme-provider.tsx +11 -6
  266. package/src/Theme/theme.ts +5 -0
  267. package/src/Typography/index.tsx +1 -1
  268. package/src/UserCard/Cards/basic-info.tsx +1 -1
  269. package/src/UserCard/Cards/index.tsx +1 -1
  270. package/src/UserCard/Container/card.tsx +2 -2
  271. package/src/UserCard/Container/dialog.tsx +1 -1
  272. package/src/UserCard/Content/basic.tsx +2 -2
  273. package/src/UserCard/Content/minimal.tsx +1 -1
  274. package/src/UserCard/Content/tooltip-avatar.tsx +4 -4
  275. package/src/VerificationCode/index.tsx +1 -1
  276. package/src/WalletOSIcon/index.tsx +7 -2
  277. package/src/WebWalletSWKeeper/index.tsx +6 -1
  278. package/src/withTheme/index.tsx +7 -3
  279. package/vite.config.mjs +5 -2
  280. package/lib/ActionButton/ActionButton.stories.d.ts +0 -18
  281. package/lib/ActivityIndicator/ActivityIndicator.stories.d.ts +0 -8
  282. package/lib/Address/Address.stories.d.ts +0 -16
  283. package/lib/Alert/Alert.stories.d.ts +0 -28
  284. package/lib/AnimationWaiter/AnimationWaiter.stories.d.ts +0 -21
  285. package/lib/AnimationWaiter/dark-animation.json.js +0 -27
  286. package/lib/AnimationWaiter/default-animation.json.js +0 -29
  287. package/lib/Avatar/Avatar.stories.d.ts +0 -11
  288. package/lib/Badge/Badge.stories.d.ts +0 -13
  289. package/lib/Blocklet/Blocklet.stories.d.ts +0 -17
  290. package/lib/BlockletNFT/BlockletNFT.stories.d.ts +0 -17
  291. package/lib/BlockletV2/Blocklet.stories.d.ts +0 -18
  292. package/lib/Button/Button.stories.d.ts +0 -19
  293. package/lib/Center/Center.stories.d.ts +0 -18
  294. package/lib/ClickToCopy/ClickToCopy.stories.d.ts +0 -16
  295. package/lib/CodeBlock/CodeBlock.stories.d.ts +0 -20
  296. package/lib/Colors/Colors.stories.d.ts +0 -34
  297. package/lib/Config/Config.stories.d.ts +0 -14
  298. package/lib/ContactForm/ContactForm.stories.d.ts +0 -23
  299. package/lib/CookieConsent/CookieConsent.stories.d.ts +0 -18
  300. package/lib/CountDown/CountDown.stories.d.ts +0 -14
  301. package/lib/DID/DID.stories.d.ts +0 -15
  302. package/lib/Datatable/Datatable.stories.d.ts +0 -32
  303. package/lib/Dialog/Dialog.stories.d.ts +0 -20
  304. package/lib/DidLogo/Logo.stories.d.ts +0 -8
  305. package/lib/Earth/Earth.stories.d.ts +0 -18
  306. package/lib/Earth/countries.json.js +0 -13
  307. package/lib/Empty/Empty.stories.d.ts +0 -17
  308. package/lib/ErrorBoundary/ErrorBoundary.stories.d.ts +0 -12
  309. package/lib/Footer/Footer.stories.d.ts +0 -12
  310. package/lib/Header/Header.stories.d.ts +0 -21
  311. package/lib/Icon/Icon.stories.d.ts +0 -23
  312. package/lib/Img/Img.stories.d.ts +0 -13
  313. package/lib/InfoRow/InfoRow.stories.d.ts +0 -14
  314. package/lib/Layout/Layout.stories.d.ts +0 -23
  315. package/lib/Locale/LocaleSelector.stories.d.ts +0 -22
  316. package/lib/Logo/Logo.stories.d.ts +0 -22
  317. package/lib/Logo/images/logo-dark-text.svg.js +0 -5
  318. package/lib/Logo/images/logo-dark-top.svg.js +0 -5
  319. package/lib/Logo/images/logo-light-text.svg.js +0 -5
  320. package/lib/Logo/images/logo-light-top.svg.js +0 -5
  321. package/lib/Metric/Metric.stories.d.ts +0 -14
  322. package/lib/NFTDisplay/NFTBroken.svg.js +0 -108
  323. package/lib/NFTDisplay/NFTDisplay.stories.d.ts +0 -15
  324. package/lib/NavMenu/NavMenu.stories.d.ts +0 -17
  325. package/lib/NavMenu/images/OCAP.svg.js +0 -5
  326. package/lib/NavMenu/images/abt-network.svg.js +0 -7
  327. package/lib/NavMenu/images/ai-kit.svg.js +0 -7
  328. package/lib/NavMenu/images/aigne.svg.js +0 -7
  329. package/lib/NavMenu/images/aistro.svg.js +0 -5
  330. package/lib/NavMenu/images/arcsphere.svg.js +0 -10
  331. package/lib/NavMenu/images/blocklet-framework.svg.js +0 -7
  332. package/lib/NavMenu/images/blocklet-launcher.svg.js +0 -5
  333. package/lib/NavMenu/images/blocklet-server.svg.js +0 -7
  334. package/lib/NavMenu/images/blocklet-store.svg.js +0 -5
  335. package/lib/NavMenu/images/creator-studio.svg.js +0 -7
  336. package/lib/NavMenu/images/did-connect.svg.js +0 -5
  337. package/lib/NavMenu/images/did-name-service.svg.js +0 -5
  338. package/lib/NavMenu/images/did-wallet.svg.js +0 -7
  339. package/lib/NavMenu/images/did.svg.js +0 -5
  340. package/lib/NavMenu/images/nft-studio.svg.js +0 -5
  341. package/lib/NavMenu/images/vc.svg.js +0 -5
  342. package/lib/NavMenu/images/web3-kit.svg.js +0 -7
  343. package/lib/PageScroller/story/PageScroller.stories.d.ts +0 -13
  344. package/lib/PhoneInput/PhoneInput.stories.d.ts +0 -12
  345. package/lib/PricingTable/PricingTable.stories.d.ts +0 -8
  346. package/lib/QRCode/QRCode.stories.d.ts +0 -13
  347. package/lib/RelativeTime/RelativeTime.stories.d.ts +0 -20
  348. package/lib/Result/Result.stories.d.ts +0 -21
  349. package/lib/Screenshot/Screenshot.stories.d.ts +0 -13
  350. package/lib/SessionManager/SessionManager.stories.d.ts +0 -9
  351. package/lib/SessionUser/images/did-spaces.svg.js +0 -5
  352. package/lib/Sparkline/Sparkline.stories.d.ts +0 -12
  353. package/lib/Spinner/Spinner.stories.d.ts +0 -18
  354. package/lib/SplitButton/SplitButton.stories.d.ts +0 -15
  355. package/lib/Switch/Switch.stories.d.ts +0 -13
  356. package/lib/Tabs/Tabs.stories.d.ts +0 -14
  357. package/lib/Tag/Tag.stories.d.ts +0 -13
  358. package/lib/TextCollapse/TextCollapse.stories.d.ts +0 -28
  359. package/lib/Theme/Theme.stories.d.ts +0 -10
  360. package/lib/Toast/Toast.stories.d.ts +0 -15
  361. package/lib/UserCard/UserCard.stories.d.ts +0 -18
  362. package/lib/Util/WebWalletOpener.stories.d.ts +0 -5
  363. package/lib/Video/Video.stories.d.ts +0 -6
  364. package/lib/Wallet/Action.stories.d.ts +0 -8
  365. package/lib/Wallet/Download.stories.d.ts +0 -9
  366. package/lib/Wallet/OpenInWallet.stories.d.ts +0 -5
  367. package/lib/Wallet/images/android_download.svg.js +0 -5
  368. package/lib/Wallet/images/app-store.svg.js +0 -5
  369. package/lib/Wallet/images/google-play.svg.js +0 -5
  370. package/lib/ux.css +0 -1
@@ -1,20 +1,20 @@
1
- import { jsxs as d, jsx as r } from "react/jsx-runtime";
1
+ 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/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
- function S({ formId: t, portalId: e }, s, a) {
10
- const o = `https://api.hsforms.com/submissions/v3/integration/submit/${e}/${t}`;
11
- return g.post(o, {
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";
9
+ function S({ formId: t, portalId: e }, s, r) {
10
+ const a = `https://api.hsforms.com/submissions/v3/integration/submit/${e}/${t}`;
11
+ return g.post(a, {
12
12
  submittedAt: Date.now(),
13
13
  fields: Object.keys(s).map((i) => ({
14
14
  name: i.replace(/\s+/, "").toLowerCase(),
15
15
  value: s[i]
16
16
  })),
17
- context: a,
17
+ context: r,
18
18
  skipValidation: !1
19
19
  }).then((i) => i.data.inlineMessage).catch((i) => i.data ? i.data.message : "Form Submit Failed");
20
20
  }
@@ -23,9 +23,9 @@ const l = class l extends f.Component {
23
23
  super(e), this.onSubmit = async (s) => {
24
24
  s.preventDefault(), this.setState({ loading: !0 });
25
25
  try {
26
- const a = await S(
26
+ const r = await S(
27
27
  { formId: this.props.formId, portalId: this.props.portalId },
28
- this.fields.reduce((o, i) => (o[i] = this.state[i], o), {}),
28
+ this.fields.reduce((a, i) => (a[i] = this.state[i], a), {}),
29
29
  {
30
30
  pageUri: window.location.href,
31
31
  pageName: document.title
@@ -33,18 +33,18 @@ const l = class l extends f.Component {
33
33
  );
34
34
  this.setState({
35
35
  loading: !1,
36
- successMessage: a || this.props.successMessage
36
+ successMessage: r || this.props.successMessage
37
37
  });
38
- } catch (a) {
38
+ } catch (r) {
39
39
  this.setState({
40
40
  loading: !1,
41
- errorMessage: a ? a.message : "Form submit failed"
41
+ errorMessage: r ? r.message : "Form submit failed"
42
42
  });
43
43
  }
44
- }, this.getInputHandler = (s, a = {}) => (o) => {
44
+ }, this.getInputHandler = (s, r = {}) => (a) => {
45
45
  this.setState(
46
- Object.assign(a, {
47
- [s]: o.target.value
46
+ Object.assign(r, {
47
+ [s]: a.target.value
48
48
  })
49
49
  );
50
50
  }, typeof e.fields == "string" ? this.fields = e.fields.split(",").map((s) => s.trim()) : this.fields = e.fields, this.state = {
@@ -60,7 +60,7 @@ const l = class l extends f.Component {
60
60
  return typeof e.title > "u" && (e.title = "Signup for our news letter"), e.button || (e.button = "Subscribe"), e;
61
61
  }
62
62
  render() {
63
- const { className: e, style: s, title: a, button: o, layout: i } = this.deriveProps(), { loading: c, errorMessage: u, successMessage: p } = this.state;
63
+ const { className: e, style: s, title: r, button: a, layout: i } = this.deriveProps(), { loading: c, errorMessage: u, successMessage: p } = this.state;
64
64
  return /* @__PURE__ */ d(
65
65
  I,
66
66
  {
@@ -71,9 +71,9 @@ const l = class l extends f.Component {
71
71
  fieldCount: this.fields.length,
72
72
  name: "subscribe",
73
73
  children: [
74
- !!a && /* @__PURE__ */ r(m, { component: "p", className: "title", children: a }),
74
+ !!r && /* @__PURE__ */ o(m, { component: "p", className: "title", children: r }),
75
75
  /* @__PURE__ */ d("div", { className: "form-controls", children: [
76
- this.fields.map((n) => /* @__PURE__ */ r(
76
+ this.fields.map((n) => /* @__PURE__ */ o(
77
77
  "input",
78
78
  {
79
79
  required: !0,
@@ -85,7 +85,7 @@ const l = class l extends f.Component {
85
85
  },
86
86
  n
87
87
  )),
88
- /* @__PURE__ */ r(
88
+ /* @__PURE__ */ o(
89
89
  v,
90
90
  {
91
91
  variant: "outlined",
@@ -94,11 +94,11 @@ const l = class l extends f.Component {
94
94
  size: "large",
95
95
  disabled: c,
96
96
  className: "subscribe-btn-empty",
97
- children: c ? /* @__PURE__ */ r(b, { size: 28 }) : o
97
+ children: c ? /* @__PURE__ */ o(b, { size: 28 }) : a
98
98
  }
99
99
  )
100
100
  ] }),
101
- !!u && /* @__PURE__ */ r(
101
+ !!u && /* @__PURE__ */ o(
102
102
  m,
103
103
  {
104
104
  component: "p",
@@ -108,7 +108,7 @@ const l = class l extends f.Component {
108
108
  dangerouslySetInnerHTML: { __html: u }
109
109
  }
110
110
  ),
111
- !!p && /* @__PURE__ */ r(
111
+ !!p && /* @__PURE__ */ o(
112
112
  m,
113
113
  {
114
114
  component: "p",
@@ -163,7 +163,8 @@ const M = (t) => t.layout === "vertical" ? "100%" : `${Math.max(95 / (t.fieldCou
163
163
  width: ${(t) => M(t)};
164
164
  height: 50px;
165
165
  border: none;
166
- border-bottom: 1px solid ${(t) => t.theme.typography.color.main};
166
+ border-bottom: 1px solid
167
+ ${(t) => t.theme.typography.color.main};
167
168
  font-size: 16px;
168
169
  letter-spacing: 1.8px;
169
170
  outline: none;
@@ -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/index.js";
5
+ import { styled as p } from "../Theme";
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/index.js";
5
- import { styled as k } from "../Theme/index.js";
4
+ import { getColor as u, mergeProps as y } from "../Util";
5
+ import { styled as k } from "../Theme";
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,20 @@
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";
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";
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 S } from "@mui/material";
8
- import { useMemoizedFn as A, useCreation as g } from "ahooks";
7
+ import { Box as N, Dialog as G, DialogContent as J, Typography as E } from "@mui/material";
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
- import k from "../Address/index.js";
12
- import oe from "../Avatar/index.js";
13
- import { DID_PREFIX as re } from "../Util/constant.js";
14
- import { translate as te } from "../Locale/util.js";
15
- import { isEthereumDid as ne, getDIDColor as se } from "../Util/index.js";
16
- const ie = {
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";
17
+ const ae = {
17
18
  en: {
18
19
  scanQrcode: "Scan with DID Wallet to view the {role}",
19
20
  download: "Download",
@@ -24,29 +25,29 @@ const ie = {
24
25
  download: "下载",
25
26
  downloadTips: "没有 DID Wallet ?"
26
27
  }
27
- }, T = "xenon-2020-01-15", W = {
28
- main: T,
29
- "main.abtnetwork.io": T,
28
+ }, A = "xenon-2020-01-15", k = {
29
+ main: A,
30
+ "main.abtnetwork.io": A,
30
31
  "beta.abtnetwork.io": "beta"
31
- }, ae = (e, r, o) => o ? se(e) : r.color, le = (e) => !{
32
+ }, le = (e, t, o) => o ? ie(e) : t.color, de = (e) => !{
32
33
  0: !0,
33
34
  // ACCOUNT
34
35
  6: !0,
35
36
  // ASSET
36
37
  17: !0
37
38
  // TOKEN
38
- }[e], de = (e) => {
39
- if (e === P.RoleType.ROLE_ANY)
39
+ }[e], ce = (e) => {
40
+ if (e === S.RoleType.ROLE_ANY)
40
41
  return "DID";
41
- const [r] = Object.entries(P.RoleType).find((o) => o[1] === e) || [];
42
- return r ? r.toLowerCase().replace(/role_(\S)/g, (o, n) => n.toUpperCase()) : "DID";
43
- }, ce = (e, r, o) => r || le(e.roleType) ? o * 0.75 : o;
44
- function F({ did: e, showAvatar: r }) {
45
- const o = ne(e), n = o ? void 0 : j(e), m = g(() => o ? e : `${re}${e}`, [e, o]), c = A((i, a) => [
46
- /* @__PURE__ */ t(
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(
47
48
  "span",
48
49
  {
49
- style: { flex: "0 0 auto", color: ae(e, n, o) },
50
+ style: { flex: "0 0 auto", color: le(e, n, o) },
50
51
  children: "DID:"
51
52
  },
52
53
  `${a}-prefix-did-${i}`
@@ -55,12 +56,12 @@ function F({ did: e, showAvatar: r }) {
55
56
  o ? "ETH" : "ABT",
56
57
  ":"
57
58
  ] }, `${a}-prefix-abt-${i}`),
58
- r && /* @__PURE__ */ t(
59
- oe,
59
+ t && /* @__PURE__ */ r(
60
+ te,
60
61
  {
61
62
  src: "",
62
63
  did: e,
63
- size: ce(n, o, i || 18),
64
+ size: pe(n, o, i || 18),
64
65
  style: { display: "inline-flex", alignItems: "center", marginLeft: 2, marginRight: 4 },
65
66
  blockiesPadding: !1,
66
67
  className: "did-address-avatar",
@@ -72,22 +73,22 @@ function F({ did: e, showAvatar: r }) {
72
73
  return {
73
74
  isEthDid: o,
74
75
  didMotifInfo: n,
75
- content: m,
76
+ content: f,
76
77
  getPrepend: c
77
78
  };
78
79
  }
79
- function Re({
80
- ref: e,
81
- ...r
80
+ function _e({
81
+ ref: e = void 0,
82
+ ...t
82
83
  }) {
83
84
  const {
84
85
  did: o,
85
86
  chainId: n,
86
- roleType: m,
87
+ roleType: f,
87
88
  showAvatar: c = !0,
88
89
  showQrcode: i = !1,
89
90
  locale: a = "en",
90
- size: v = 0,
91
+ size: T = 0,
91
92
  component: l = "span",
92
93
  copyable: R = !0,
93
94
  responsive: h = !0,
@@ -99,9 +100,9 @@ function Re({
99
100
  endChars: _ = 6,
100
101
  style: w,
101
102
  className: Q,
102
- sx: f
103
- } = r, s = ee(o), d = {
104
- size: v,
103
+ sx: m
104
+ } = t, s = ee(o), d = {
105
+ size: T,
105
106
  component: l,
106
107
  copyable: R,
107
108
  responsive: h,
@@ -113,10 +114,10 @@ function Re({
113
114
  endChars: _,
114
115
  style: w,
115
116
  className: Q,
116
- sx: f
117
- }, C = K(null), { content: L, getPrepend: M } = F({ did: s, showAvatar: c }), [U, b] = V(!1), B = A(() => {
117
+ sx: m
118
+ }, C = K(null), { content: W, getPrepend: M } = L({ did: s, showAvatar: c }), [U, b] = V(!1), O = v(() => {
118
119
  b(!1);
119
- }), O = A((y) => {
120
+ }), j = v((y) => {
120
121
  y.stopPropagation(), y.preventDefault(), b(!0);
121
122
  });
122
123
  return Z(e, () => new Proxy(
@@ -126,27 +127,27 @@ function Re({
126
127
  },
127
128
  {
128
129
  get(y, z) {
129
- var E;
130
- return y[z] || ((E = C == null ? void 0 : C.current) == null ? void 0 : E[z]);
130
+ var P;
131
+ return y[z] || ((P = C == null ? void 0 : C.current) == null ? void 0 : P[z]);
131
132
  }
132
133
  }
133
134
  )), /* @__PURE__ */ x(H, { children: [
134
- /* @__PURE__ */ t(
135
- k,
135
+ /* @__PURE__ */ r(
136
+ F,
136
137
  {
137
138
  locale: a,
138
- content: L,
139
+ content: W,
139
140
  ...d,
140
141
  ref: C,
141
142
  prepend: M(d.size, "address"),
142
143
  append: /* @__PURE__ */ x(H, { children: [
143
- i ? /* @__PURE__ */ t(
144
+ i ? /* @__PURE__ */ r(
144
145
  N,
145
146
  {
146
147
  id: "did-qrcode-button",
147
148
  component: X,
148
149
  icon: Y,
149
- onClick: O,
150
+ onClick: j,
150
151
  sx: {
151
152
  flexShrink: 0,
152
153
  cursor: "pointer",
@@ -161,39 +162,39 @@ function Re({
161
162
  },
162
163
  "address"
163
164
  ),
164
- /* @__PURE__ */ t(
165
- pe,
165
+ /* @__PURE__ */ r(
166
+ ue,
166
167
  {
167
168
  did: s,
168
169
  chainId: n,
169
- roleType: m,
170
+ roleType: f,
170
171
  showAvatar: c,
171
172
  open: U,
172
- onClose: B,
173
+ onClose: O,
173
174
  ...d
174
175
  }
175
176
  )
176
177
  ] });
177
178
  }
178
- function pe({
179
+ function ue({
179
180
  did: e,
180
- chainId: r,
181
- roleType: o,
181
+ chainId: t = void 0,
182
+ roleType: o = void 0,
182
183
  showAvatar: n = !0,
183
184
  // DialogProps
184
- open: m,
185
+ open: f,
185
186
  fullScreen: c = !1,
186
187
  fullWidth: i = !1,
187
188
  scroll: a = "paper",
188
- onClose: v,
189
+ onClose: T = oe,
189
190
  // AddressProps
190
191
  locale: l = "en",
191
192
  ...R
192
193
  }) {
193
- const h = A((f, s = {}) => te(ie, f, 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: [
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
195
  h("downloadTips"),
195
196
  " ",
196
- /* @__PURE__ */ t(
197
+ /* @__PURE__ */ r(
197
198
  N,
198
199
  {
199
200
  component: "a",
@@ -211,24 +212,24 @@ function pe({
211
212
  }
212
213
  )
213
214
  ] }), [I]), w = g(() => {
214
- var f;
215
- if (r)
216
- return W[r] || r;
215
+ var m;
216
+ if (t)
217
+ return k[t] || t;
217
218
  if (p) return "1";
218
219
  try {
219
- const s = (f = window.blocklet) == null ? void 0 : f.CHAIN_HOST, d = new URL(s).hostname;
220
+ const s = (m = window.blocklet) == null ? void 0 : m.CHAIN_HOST, d = new URL(s).hostname;
220
221
  if (d)
221
- return W[d] || T;
222
+ return k[d] || A;
222
223
  } catch (s) {
223
224
  console.warn("Failed to parse chainHost:", s);
224
225
  }
225
- return T;
226
- }, [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]);
227
- return /* @__PURE__ */ t(
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(
228
229
  G,
229
230
  {
230
- open: m,
231
- onClose: v,
231
+ open: f,
232
+ onClose: T,
232
233
  fullScreen: c,
233
234
  fullWidth: i,
234
235
  scroll: a,
@@ -240,9 +241,9 @@ function pe({
240
241
  }
241
242
  },
242
243
  children: /* @__PURE__ */ x(J, { align: "center", sx: { p: 3 }, children: [
243
- /* @__PURE__ */ t(S, { sx: { mb: 2, fontWeight: 500, fontSize: 18 }, children: h("scanQrcode", { role: de(o || (D == null ? void 0 : D.roleType)) }) }),
244
- /* @__PURE__ */ t(
245
- q,
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,
246
247
  {
247
248
  value: Q,
248
249
  size: 256,
@@ -250,8 +251,8 @@ function pe({
250
251
  level: "M"
251
252
  }
252
253
  ),
253
- /* @__PURE__ */ t(N, { sx: { mt: 1.5, textAlign: "center" }, children: /* @__PURE__ */ t(
254
- k,
254
+ /* @__PURE__ */ r(N, { sx: { mt: 1.5, textAlign: "center" }, children: /* @__PURE__ */ r(
255
+ F,
255
256
  {
256
257
  locale: l,
257
258
  content: u,
@@ -263,8 +264,8 @@ function pe({
263
264
  },
264
265
  "dialog-address"
265
266
  ) }),
266
- /* @__PURE__ */ t(
267
- S,
267
+ /* @__PURE__ */ r(
268
+ E,
268
269
  {
269
270
  variant: "body2",
270
271
  sx: {
@@ -280,7 +281,7 @@ function pe({
280
281
  );
281
282
  }
282
283
  export {
283
- Re as DID,
284
- pe as DIDDialog,
285
- Re as default
284
+ _e as DID,
285
+ ue as DIDDialog,
286
+ _e as default
286
287
  };
@@ -1,26 +1,26 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as m } from "react/jsx-runtime";
2
2
  import { useState as p } from "react";
3
3
  import { joinURL as a } from "ufo";
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 }) {
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 }) {
8
8
  const [e, l] = p(!1);
9
9
  if (e || !(r.appUrl || r.appLogo))
10
- return /* @__PURE__ */ i(d, { did: r.appPid, size: t });
10
+ return /* @__PURE__ */ m(s, { did: r.appPid, size: t });
11
11
  let o = r.appLogo || "";
12
- return c(o) || (o = a(r.appUrl || "", o)), /* @__PURE__ */ i(
13
- u,
12
+ return f(o) || (o = a(r.appUrl || "", o)), /* @__PURE__ */ m(
13
+ c,
14
14
  {
15
15
  src: o,
16
16
  alt: r.appName || "Blocklet Icon",
17
17
  width: t,
18
18
  height: t,
19
- ...m,
19
+ ...i,
20
20
  onError: () => l(!0)
21
21
  }
22
22
  );
23
23
  }
24
24
  export {
25
- E as default
25
+ L as default
26
26
  };
@@ -4,15 +4,15 @@ 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/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";
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";
11
11
  function b({
12
12
  appInfo: r,
13
13
  active: l = !1,
14
14
  appLogo: s = null,
15
- sx: a
15
+ sx: a = {}
16
16
  }) {
17
17
  const t = x(null), o = h(t), n = u(() => o ? o.width < C - 50 : !0, [o, o == null ? void 0 : o.width]);
18
18
  return /* @__PURE__ */ p(
@@ -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/index.js";
3
+ import o from "../../Img";
4
4
  function c({
5
5
  requestAppInfo: r,
6
6
  currentAppInfo: a