@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,34 +1,34 @@
1
1
  import { jsx as i, jsxs as R } from "react/jsx-runtime";
2
2
  import { createContext as _, use as B, useState as L, useRef as j, useMemo as h, useCallback as C, useEffect as k } from "react";
3
- import { useTheme as $, StyledEngineProvider as D, ThemeProvider as K, CssBaseline as U, GlobalStyles as V } from "@mui/material";
4
- import w from "lodash/set";
5
- import { BLOCKLET_THEME_PREFER_KEY as d, isValidThemeMode as W, getDefaultThemePrefer as x } from "@blocklet/theme";
6
- import { useLocationState as q } from "../hooks/use-location-state.js";
7
- import { createTheme as g, lazyCreateDefaultTheme as z, isUxTheme as A, isTheme as F } from "./theme.js";
8
- const G = g(), v = _({});
3
+ import { useTheme as y, StyledEngineProvider as D, ThemeProvider as K, CssBaseline as U, GlobalStyles as V } from "@mui/material";
4
+ import v from "lodash/set";
5
+ import { BLOCKLET_THEME_PREFER_KEY as b, isValidThemeMode as W, getDefaultThemePrefer as w } from "@blocklet/theme";
6
+ import { useLocationState as q } from "../hooks/use-location-state";
7
+ import { createTheme as g, lazyCreateDefaultTheme as z, isUxTheme as A, isTheme as F } from "./theme";
8
+ const G = g(), $ = _({});
9
9
  function H() {
10
- return B(v);
10
+ return B($);
11
11
  }
12
- const y = (c) => c ? c === "system" ? x({ theme: { prefer: "system" } }) : c : x();
13
- function I({ className: c }) {
14
- const e = $();
12
+ const x = (l) => l ? l === "system" ? w({ theme: { prefer: "system" } }) : l : w();
13
+ function I({ className: l = void 0 }) {
14
+ const e = y();
15
15
  if (e.palette.mode === "dark") {
16
- const s = "transparent", l = e.palette.grey[300], r = (c || "").trim().split(/\s+/).filter(Boolean).map((n) => n.startsWith(".") ? n : `.${n}`).join(" "), o = r ? `${r}::-webkit-scrollbar, ${r} *::-webkit-scrollbar` : "*::-webkit-scrollbar", a = r ? `${r}::-webkit-scrollbar-track, ${r} *::-webkit-scrollbar-track` : "*::-webkit-scrollbar-track", u = r ? `${r}::-webkit-scrollbar-thumb, ${r} *::-webkit-scrollbar-thumb` : "*::-webkit-scrollbar-thumb", b = r ? `${r}, ${r} *` : "*";
16
+ const s = "transparent", n = e.palette.grey[300], o = (l || "").trim().split(/\s+/).filter(Boolean).map((c) => c.startsWith(".") ? c : `.${c}`).join(" "), r = o ? `${o}::-webkit-scrollbar, ${o} *::-webkit-scrollbar` : "*::-webkit-scrollbar", a = o ? `${o}::-webkit-scrollbar-track, ${o} *::-webkit-scrollbar-track` : "*::-webkit-scrollbar-track", m = o ? `${o}::-webkit-scrollbar-thumb, ${o} *::-webkit-scrollbar-thumb` : "*::-webkit-scrollbar-thumb", d = o ? `${o}, ${o} *` : "*";
17
17
  return /* @__PURE__ */ i(
18
18
  V,
19
19
  {
20
20
  styles: {
21
21
  // Chrome, Safari, Edge
22
22
  "@supports selector(::-webkit-scrollbar)": {
23
- [o]: {
23
+ [r]: {
24
24
  width: "12px",
25
25
  height: "12px"
26
26
  },
27
27
  [a]: {
28
28
  background: s
29
29
  },
30
- [u]: {
31
- background: l,
30
+ [m]: {
31
+ background: n,
32
32
  borderRadius: "6px",
33
33
  border: "2px solid",
34
34
  borderColor: s,
@@ -41,9 +41,9 @@ function I({ className: c }) {
41
41
  },
42
42
  // Firefox
43
43
  "@supports not selector(::-webkit-scrollbar)": {
44
- [b]: {
44
+ [d]: {
45
45
  scrollbarWidth: "auto",
46
- scrollbarColor: `${l} ${s}`
46
+ scrollbarColor: `${n} ${s}`
47
47
  }
48
48
  }
49
49
  }
@@ -53,77 +53,82 @@ function I({ className: c }) {
53
53
  return null;
54
54
  }
55
55
  function E({
56
- children: c,
56
+ children: l = null,
57
57
  theme: e = G,
58
58
  injectFirst: s = !0,
59
- darkSchemeClass: l = ""
59
+ darkSchemeClass: n = ""
60
60
  }) {
61
- const r = h(() => typeof e == "function" || F(e) ? e : g(e), [e]);
61
+ const o = h(() => typeof e == "function" || F(e) ? e : g(e), [e]);
62
62
  return (
63
63
  // injectFirst 会影响 makeStyles 自定义样式和 mui styles 覆盖问题
64
- /* @__PURE__ */ i(D, { injectFirst: s, children: /* @__PURE__ */ R(K, { theme: r, children: [
64
+ /* @__PURE__ */ i(D, { injectFirst: s, children: /* @__PURE__ */ R(K, { theme: o, children: [
65
65
  /* @__PURE__ */ i(U, {}),
66
- /* @__PURE__ */ i(I, { className: l }),
67
- c
66
+ /* @__PURE__ */ i(I, { className: n }),
67
+ l
68
68
  ] }) })
69
69
  );
70
70
  }
71
71
  function N({
72
- children: c,
73
- theme: e,
74
- prefer: s,
75
- disableBlockletTheme: l = !1,
76
- ...r
72
+ children: l = null,
73
+ theme: e = void 0,
74
+ prefer: s = void 0,
75
+ disableBlockletTheme: n = !1,
76
+ ...o
77
77
  }) {
78
- const [o, a] = L(() => y(s)), u = $(), b = q(), n = j(null), p = h(() => {
78
+ const [r, a] = L(() => x(s)), m = y(), d = q(), c = j(null), p = h(() => {
79
79
  let t = {};
80
- const m = z(o);
80
+ const u = z(r);
81
81
  if (e)
82
82
  if (typeof e == "function") {
83
- const M = m();
84
- A(u) ? t = { ...e(u, { mode: o }) } : t = { ...e(M, { mode: o }) };
83
+ const M = u();
84
+ A(m) ? t = { ...e(m, { mode: r }) } : t = { ...e(M, { mode: r }) };
85
85
  } else
86
86
  t = { ...e };
87
- return w(t, "palette.mode", o), w(t, "mode", o), t;
88
- }, [o, e, u]), f = h(() => g({ ...p, disableBlockletTheme: l }), [p, l]), T = C(() => {
89
- const t = o === "light" ? "dark" : "light";
90
- a(t), sessionStorage.removeItem(d), localStorage.setItem(d, t);
91
- }, [o, a]), S = C(
87
+ return v(t, "palette.mode", r), v(t, "mode", r), t;
88
+ }, [r, e, m]), f = h(() => g({ ...p, disableBlockletTheme: n }), [p, n]), T = C(() => {
89
+ const t = r === "light" ? "dark" : "light";
90
+ a(t), sessionStorage.removeItem(b), localStorage.setItem(b, t);
91
+ }, [r, a]), S = C(
92
92
  (t) => {
93
- o !== t && (a(t), sessionStorage.removeItem(d), localStorage.setItem(d, t));
93
+ r !== t && (a(t), sessionStorage.removeItem(b), localStorage.setItem(b, t));
94
94
  },
95
- [o, a]
95
+ [r, a]
96
96
  ), P = h(
97
97
  () => ({
98
- mode: o,
98
+ mode: r,
99
99
  toggleMode: T,
100
100
  changeMode: S,
101
101
  prefer: s
102
102
  }),
103
- [o, s, T, S]
103
+ [r, s, T, S]
104
104
  );
105
105
  return k(() => {
106
- a(y(s));
107
- }, [s, a, b.search]), k(() => {
108
- const t = new URLSearchParams(b.search).get("theme");
109
- W(t) && sessionStorage.setItem(d, t);
110
- }, [b.search]), k(() => {
111
- n.current || (n.current = document.querySelector('meta[name="theme-color"]'));
106
+ a(x(s));
107
+ }, [s, a, d.search]), k(() => {
108
+ const t = new URLSearchParams(d.search).get("theme");
109
+ W(t) && sessionStorage.setItem(b, t);
110
+ }, [d.search]), k(() => {
111
+ c.current || (c.current = document.querySelector('meta[name="theme-color"]'));
112
112
  const t = f.palette.background.default;
113
- if (n.current)
114
- n.current.setAttribute("content", t);
113
+ if (c.current)
114
+ c.current.setAttribute("content", t);
115
115
  else {
116
- const m = document.createElement("meta");
117
- m.name = "theme-color", m.content = t, document.head.appendChild(m), n.current = m;
116
+ const u = document.createElement("meta");
117
+ u.name = "theme-color", u.content = t, document.head.appendChild(u), c.current = u;
118
118
  }
119
- }, [f.palette.background.default]), /* @__PURE__ */ i(v, { value: P, children: /* @__PURE__ */ i(E, { theme: f, ...r, children: c }) });
119
+ }, [f.palette.background.default]), /* @__PURE__ */ i($, { value: P, children: /* @__PURE__ */ i(E, { theme: f, ...o, children: l }) });
120
120
  }
121
- function te({ children: c, prefer: e, enableColorScheme: s = !1, ...l }) {
122
- const { toggleMode: r } = H();
123
- return s || e || !r ? /* @__PURE__ */ i(N, { prefer: e, ...l, children: c }) : /* @__PURE__ */ i(E, { ...l, children: c });
121
+ function te({
122
+ children: l = null,
123
+ prefer: e = void 0,
124
+ enableColorScheme: s = !1,
125
+ ...n
126
+ }) {
127
+ const { toggleMode: o } = H();
128
+ return s || e || !o ? /* @__PURE__ */ i(N, { prefer: e, ...n, children: l }) : /* @__PURE__ */ i(E, { ...n, children: l });
124
129
  }
125
130
  export {
126
- v as ColorSchemeContext,
131
+ $ as ColorSchemeContext,
127
132
  te as default,
128
133
  H as useColorScheme
129
134
  };
@@ -2,8 +2,8 @@ import { createTheme as f, responsiveFontSizes as _ } from "@mui/material";
2
2
  import { deepmerge as d } from "@mui/utils";
3
3
  import { deepmerge as X } from "@mui/utils";
4
4
  import b from "webfontloader";
5
- import { DEFAULT_FONTS as C, getDefaultThemePrefer as k, getBlockletThemeOptions as h, BLOCKLET_THEME_DARK as x, BLOCKLET_THEME_LIGHT as A } from "@blocklet/theme";
6
- import { deepmergeAll as E, cleanedObj as m } from "../Util/index.js";
5
+ import { DEFAULT_FONTS as C, BLOCKLET_THEME_DARK as k, BLOCKLET_THEME_LIGHT as x, getBlockletThemeOptions as h, getDefaultThemePrefer as A } from "@blocklet/theme";
6
+ import { deepmergeAll as E, cleanedObj as m } from "../Util";
7
7
  import "@fontsource/roboto/latin-400.css";
8
8
  import "@fontsource/roboto/latin-500.css";
9
9
  import "@fontsource/roboto/latin-700.css";
@@ -42,7 +42,7 @@ function w(e) {
42
42
  });
43
43
  }
44
44
  function T(e = "light") {
45
- return e === "dark" ? x : A;
45
+ return e === "dark" ? k : x;
46
46
  }
47
47
  function v(e) {
48
48
  let t = null;
@@ -60,6 +60,7 @@ const p = ({ palette: e, components: t, overrides: o, ...r }) => ({
60
60
  },
61
61
  ...r
62
62
  }), L = {
63
+ // @ts-expect-error
63
64
  themeName: "ArcBlock",
64
65
  pageWidth: "md",
65
66
  disableBlockletTheme: !1,
@@ -86,7 +87,7 @@ const p = ({ palette: e, components: t, overrides: o, ...r }) => ({
86
87
  }
87
88
  }, U = (...e) => {
88
89
  var l;
89
- const t = k(), o = v(t), r = e.reduce(
90
+ const t = A(), o = v(t), r = e.reduce(
90
91
  (O, c) => d(O, p(typeof c == "function" ? c(o()) : c)),
91
92
  p(L)
92
93
  ), n = r.mode || ((l = r.palette) == null ? void 0 : l.mode) || t, i = h(n), F = T(n), { disableBlockletTheme: g } = r, y = E(
@@ -1,8 +1,8 @@
1
- import { jsxs as d, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as k, jsx as s } from "react/jsx-runtime";
2
2
  import { createRef as g } from "react";
3
3
  import { SnackbarProvider as b, useSnackbar as h } from "notistack";
4
4
  import { IconButton as S } from "@mui/material";
5
- import { Close as v } from "@mui/icons-material";
5
+ import { Close as x } from "@mui/icons-material";
6
6
  import e from "lodash/noop";
7
7
  let l = e, u = e, f = e, m = e, p = e;
8
8
  const t = (o, r) => (i, n = {}) => o(i, {
@@ -10,12 +10,12 @@ const t = (o, r) => (i, n = {}) => o(i, {
10
10
  variant: r,
11
11
  ...n
12
12
  });
13
- function H({ children: o, anchorOrigin: r, ...i }) {
14
- const n = g(), k = (c) => () => {
13
+ function P({ children: o, anchorOrigin: r, ...i }) {
14
+ const n = g(), d = (c) => () => {
15
15
  var a;
16
16
  (a = n.current) == null || a.closeSnackbar(c);
17
17
  };
18
- return /* @__PURE__ */ d(
18
+ return /* @__PURE__ */ k(
19
19
  b,
20
20
  {
21
21
  anchorOrigin: {
@@ -25,19 +25,19 @@ function H({ children: o, anchorOrigin: r, ...i }) {
25
25
  },
26
26
  ...i,
27
27
  ref: n,
28
- action: (c) => /* @__PURE__ */ s(S, { "aria-label": "close", color: "inherit", onClick: k(c), size: "large", children: /* @__PURE__ */ s(v, { style: { fontSize: 16 } }) }, "close"),
28
+ action: (c) => /* @__PURE__ */ s(S, { "aria-label": "close", color: "inherit", onClick: d(c), size: "large", children: /* @__PURE__ */ s(x, { style: { fontSize: 16 } }) }, "close"),
29
29
  children: [
30
- /* @__PURE__ */ s(w, {}),
30
+ /* @__PURE__ */ s(v, {}),
31
31
  o
32
32
  ]
33
33
  }
34
34
  );
35
35
  }
36
- function w() {
36
+ function v() {
37
37
  const { enqueueSnackbar: o, closeSnackbar: r } = h();
38
38
  return l = t(o, "success"), u = t(o, "error"), f = t(o, "warning"), m = t(o, "info"), p = r, null;
39
39
  }
40
- const P = {
40
+ const R = {
41
41
  success: (o, r = {}) => l(o, r),
42
42
  error: (o, r = { autoHideDuration: 15e3 }) => u(o, r),
43
43
  warning: (o, r = {}) => f(o, r),
@@ -45,6 +45,6 @@ const P = {
45
45
  close: (o) => p(o)
46
46
  };
47
47
  export {
48
- H as ToastProvider,
49
- P as default
48
+ P as ToastProvider,
49
+ R as default
50
50
  };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as g, jsx as a } from "react/jsx-runtime";
2
- import { Box as x, Typography as d, Skeleton as y } from "@mui/material";
3
- import { useReactive as C, useSize as c, useCreation as b } from "ahooks";
4
- import v from "lodash/noop";
2
+ import { Box as x, Typography as u, Skeleton as y } from "@mui/material";
3
+ import { useReactive as v, useSize as c, useCreation as C } from "ahooks";
4
+ import b from "lodash/noop";
5
5
  import { useRef as m, useEffect as w } from "react";
6
6
  let p = -1;
7
7
  function T() {
@@ -18,27 +18,27 @@ function M({
18
18
  children: t = null,
19
19
  minFontSize: f = 12,
20
20
  /* 设置为 auto 时字体会自动收缩,直到达到浏览器最小字体限制 */
21
- fontSize: n,
21
+ fontSize: n = void 0,
22
22
  sx: s,
23
- onShrink: i = v,
23
+ onShrink: i = b,
24
24
  ...r
25
25
  }) {
26
- const u = m(null), z = m(null), e = C({
26
+ const d = m(null), z = m(null), e = v({
27
27
  // @ts-expect-error
28
28
  fontSize: n,
29
29
  loading: !0
30
- }), o = c(u.current), l = c(z.current);
30
+ }), o = c(d.current), l = c(z.current);
31
31
  return w(() => {
32
32
  if (e.loading)
33
33
  if (n === "auto") {
34
34
  if (o && !e.initialSize) {
35
- const S = getComputedStyle(u.current).fontSize;
35
+ const S = getComputedStyle(d.current).fontSize;
36
36
  e.initialSize = Number(S.replace("px", "")), e.fontSize = e.initialSize;
37
37
  }
38
38
  p < 0 && (p = T()), e.fontSize <= p ? (e.loading = !1, i == null || i({ fontSize: e.fontSize, initialSize: e.initialSize })) : l && o && (l.width < o.width && e.fontSize > f ? e.fontSize-- : (e.loading = !1, i == null || i({ fontSize: e.fontSize, initialSize: e.initialSize })));
39
39
  } else
40
40
  e.loading = !1;
41
- }, [n, o == null ? void 0 : o.width, l == null ? void 0 : l.width]), b(() => n === "auto" ? e.loading : !1, [n, e.loading]) ? /* @__PURE__ */ g(
41
+ }, [n, o == null ? void 0 : o.width, l == null ? void 0 : l.width]), C(() => n === "auto" ? e.loading : !1, [n, e.loading]) ? /* @__PURE__ */ g(
42
42
  x,
43
43
  {
44
44
  ref: z,
@@ -46,11 +46,11 @@ function M({
46
46
  flex: 1
47
47
  },
48
48
  children: [
49
- /* @__PURE__ */ a(d, { ...r, sx: s, noWrap: !0, children: /* @__PURE__ */ a(y, { variant: "text", sx: { fontSize: "1rem" } }) }),
49
+ /* @__PURE__ */ a(u, { ...r, sx: s, noWrap: !0, children: /* @__PURE__ */ a(y, { variant: "text", sx: { fontSize: "1rem" } }) }),
50
50
  /* @__PURE__ */ a(
51
- d,
51
+ u,
52
52
  {
53
- ref: u,
53
+ ref: d,
54
54
  ...r,
55
55
  sx: {
56
56
  ...s,
@@ -66,7 +66,7 @@ function M({
66
66
  ]
67
67
  }
68
68
  ) : /* @__PURE__ */ a(
69
- d,
69
+ u,
70
70
  {
71
71
  ...r,
72
72
  sx: {
@@ -1,6 +1,6 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { InfoType as d } from "../types.js";
3
- import l from "../Content/tooltip-avatar.js";
2
+ import { InfoType as d } from "../types";
3
+ import l from "../Content/tooltip-avatar";
4
4
  function u(i) {
5
5
  const { user: r, infoType: n, avatarSize: o = 48, shouldShowHoverCard: f = !1, renderCardContent: e, ...t } = i;
6
6
  return n === d.NameOnly ? /* @__PURE__ */ a(
@@ -5,5 +5,5 @@ interface BasicCardProps extends Omit<UserCardProps, 'user'> {
5
5
  shouldShowHoverCard: boolean;
6
6
  renderCardContent?: () => React.ReactNode | null;
7
7
  }
8
- declare function BasicCard(props: BasicCardProps): import("react/jsx-runtime").JSX.Element;
8
+ declare function BasicCard({ ...props }: BasicCardProps): import("react/jsx-runtime").JSX.Element;
9
9
  export default BasicCard;
@@ -1,9 +1,9 @@
1
1
  import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
2
  import { Box as r } from "@mui/material";
3
- import { InfoType as t } from "../types.js";
4
- import f from "../Content/minimal.js";
5
- import c from "../Content/basic.js";
6
- function y(n) {
3
+ import { InfoType as t } from "../types";
4
+ import f from "../Content/minimal";
5
+ import c from "../Content/basic";
6
+ function y({ ...n }) {
7
7
  const {
8
8
  user: i,
9
9
  avatarSize: s = 40,
@@ -5,5 +5,5 @@ interface DetailedCardProps extends Omit<UserCardProps, 'user'> {
5
5
  shouldShowHoverCard: boolean;
6
6
  renderCardContent?: () => React.ReactNode | null;
7
7
  }
8
- declare function DetailedCard(props: DetailedCardProps): import("react/jsx-runtime").JSX.Element;
8
+ declare function DetailedCard({ ...props }: DetailedCardProps): import("react/jsx-runtime").JSX.Element;
9
9
  export default DetailedCard;
@@ -1,8 +1,8 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { InfoType as a } from "../types.js";
3
- import i from "./name-only.js";
4
- import m from "./basic-info.js";
5
- function l(r) {
2
+ import { InfoType as a } from "../types";
3
+ import i from "./name-only";
4
+ import m from "./basic-info";
5
+ function l({ ...r }) {
6
6
  const { infoType: e = a.Minimal } = r;
7
7
  switch (e) {
8
8
  case a.NameOnly:
@@ -1,6 +1,6 @@
1
1
  import { jsxs as o, Fragment as i, jsx as n } from "react/jsx-runtime";
2
2
  import { Typography as m } from "@mui/material";
3
- import { renderAvatar as d } from "../components.js";
3
+ import { renderAvatar as d } from "../components";
4
4
  function c(a) {
5
5
  const { user: r, avatarSize: t = 48, onAvatarClick: e } = a;
6
6
  return /* @__PURE__ */ o(i, { children: [
@@ -1,13 +1,13 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { Paper as d, Box as p } from "@mui/material";
3
- import { CardType as r } from "../types.js";
4
- import { mergeSx as n } from "../../Util/style.js";
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { Paper as m, Box as p } from "@mui/material";
3
+ import { CardType as r } from "../types";
4
+ import { mergeSx as n } from "../../Util/style";
5
5
  function b({
6
6
  children: e,
7
7
  cardType: o = r.Detailed,
8
- variant: m = "box",
9
- containerRef: t,
10
- sx: i
8
+ variant: l = "box",
9
+ containerRef: t = void 0,
10
+ sx: i = {}
11
11
  }) {
12
12
  const a = {
13
13
  minWidth: 320,
@@ -18,7 +18,7 @@ function b({
18
18
  borderColor: "divider"
19
19
  } : {}
20
20
  };
21
- return m === "paper" ? /* @__PURE__ */ l(d, { ref: t, elevation: 0, sx: a, children: e }) : /* @__PURE__ */ l(
21
+ return l === "paper" ? /* @__PURE__ */ d(m, { ref: t, elevation: 0, sx: a, children: e }) : /* @__PURE__ */ d(
22
22
  p,
23
23
  {
24
24
  ref: t,
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { useTheme as t, Box as d } from "@mui/material";
3
- import { mergeSx as a } from "../../Util/style.js";
4
- function p({ children: o, sx: r }) {
3
+ import { mergeSx as a } from "../../Util/style";
4
+ function p({ children: o, sx: r = {} }) {
5
5
  const e = t();
6
6
  return /* @__PURE__ */ i(
7
7
  d,
@@ -12,7 +12,7 @@ import V from "@arcblock/icons/lib/Email";
12
12
  import B from "@arcblock/icons/lib/Timezone";
13
13
  import { withoutProtocol as R } from "ufo";
14
14
  import { useCallback as G, useMemo as N } from "react";
15
- import Z from "./clock.js";
15
+ import Z from "./clock";
16
16
  const q = {
17
17
  timezone: B,
18
18
  email: V,
@@ -71,7 +71,7 @@ function K({ value: e }) {
71
71
  ) })
72
72
  ] });
73
73
  }
74
- function S({ field: e, value: s, children: a }) {
74
+ function S({ field: e, value: s, children: a = null }) {
75
75
  const h = q[e], m = k().palette.mode === "dark", c = x(m);
76
76
  return /* @__PURE__ */ y(
77
77
  f,
@@ -90,7 +90,7 @@ function S({ field: e, value: s, children: a }) {
90
90
  e
91
91
  );
92
92
  }
93
- function se({ user: e, renderFields: s }) {
93
+ function se({ user: e, renderFields: s = void 0 }) {
94
94
  var w;
95
95
  const a = p(() => s ?? ["bio", "email", "phone", "location", "timezone", "link"], [s]), h = p(() => a.includes("bio"), [a]), l = p(() => e.metadata ?? {
96
96
  joinedAt: e == null ? void 0 : e.createdAt,
@@ -1,9 +1,9 @@
1
1
  import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
2
  import { Box as c, Typography as l, Tooltip as f } from "@mui/material";
3
3
  import { useMemoizedFn as p } from "ahooks";
4
- import h from "../../hooks/use-clock.js";
5
- import { translate as d } from "../../Locale/util.js";
6
- import { useLocaleContext as x } from "../../Locale/context.js";
4
+ import h from "../../hooks/use-clock";
5
+ import { translate as d } from "../../Locale/util";
6
+ import { useLocaleContext as x } from "../../Locale/context";
7
7
  const u = {
8
8
  en: {
9
9
  localTime: "Local Time",
@@ -8,6 +8,6 @@ interface MinimalContentProps extends UserCardProps {
8
8
  avatarProps?: UserCardProps['avatarProps'];
9
9
  shortenLabelProps?: UserCardProps['shortenLabelProps'];
10
10
  }
11
- declare function MinimalContent(props: MinimalContentProps): import("react/jsx-runtime").JSX.Element;
11
+ declare function MinimalContent({ ...props }: MinimalContentProps): import("react/jsx-runtime").JSX.Element;
12
12
  declare const _default: React.MemoExoticComponent<typeof MinimalContent>;
13
13
  export default _default;
@@ -1,14 +1,14 @@
1
1
  import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
2
  import { memo as x } from "react";
3
3
  import { Box as o, Typography as g } from "@mui/material";
4
- import { DID as y } from "../../DID/index.js";
5
- import C from "./tooltip-avatar.js";
6
- import { renderTopRight as b } from "../components.js";
7
- import v from "./shorten-label.js";
8
- function W(n) {
4
+ import { DID as y } from "../../DID";
5
+ import C from "./tooltip-avatar";
6
+ import { renderTopRight as b } from "../components";
7
+ import v from "./shorten-label";
8
+ function W({ ...a }) {
9
9
  const {
10
10
  user: e,
11
- showDid: a,
11
+ showDid: n,
12
12
  didProps: l,
13
13
  avatarSize: s,
14
14
  shouldShowHoverCard: d,
@@ -19,7 +19,7 @@ function W(n) {
19
19
  shortenLabelProps: h,
20
20
  renderName: i,
21
21
  ...u
22
- } = n;
22
+ } = a;
23
23
  return /* @__PURE__ */ r(
24
24
  o,
25
25
  {
@@ -69,7 +69,7 @@ function W(n) {
69
69
  children: i ? i(e) : /* @__PURE__ */ t(v, { sx: { fontWeight: 500 }, ...h, children: e.fullName || e.email || e.did })
70
70
  }
71
71
  ),
72
- a && e.did ? /* @__PURE__ */ t(y, { did: e.did, size: 14, copyable: !0, compact: !0, locale: "en", sx: { lineHeight: 1.5 }, ...l ?? {} }) : null
72
+ n && e.did ? /* @__PURE__ */ t(y, { did: e.did, size: 14, copyable: !0, compact: !0, locale: "en", sx: { lineHeight: 1.5 }, ...l ?? {} }) : null
73
73
  ] })
74
74
  ]
75
75
  }
@@ -1,28 +1,28 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { Tooltip as l, Zoom as f } from "@mui/material";
3
- import { renderAvatar as c } from "../components.js";
4
- function d({
5
- user: i,
2
+ import { Tooltip as i, Zoom as f } from "@mui/material";
3
+ import { renderAvatar as c } from "../components";
4
+ function x({
5
+ user: l,
6
6
  avatarSize: m,
7
- shouldShowHoverCard: e,
8
- renderCardContent: o,
9
- tooltipTitle: t,
10
- tooltipProps: a,
11
- avatarProps: p,
7
+ shouldShowHoverCard: r,
8
+ renderCardContent: e = void 0,
9
+ tooltipTitle: t = void 0,
10
+ tooltipProps: a = void 0,
11
+ avatarProps: p = void 0,
12
12
  onAvatarClick: s
13
13
  }) {
14
- const r = c(
15
- i,
14
+ const o = c(
15
+ l,
16
16
  m,
17
17
  p,
18
18
  s,
19
- e || !!t
19
+ r || !!t
20
20
  );
21
- return t ? /* @__PURE__ */ n(l, { enterDelay: 200, title: t, placement: "bottom", ...a ?? {}, children: r }) : e ? /* @__PURE__ */ n(
22
- l,
21
+ return t ? /* @__PURE__ */ n(i, { enterDelay: 200, title: t, placement: "bottom", ...a ?? {}, children: o }) : r ? /* @__PURE__ */ n(
22
+ i,
23
23
  {
24
24
  enterDelay: 200,
25
- title: o ? o() : null,
25
+ title: e ? e() : null,
26
26
  placement: "bottom",
27
27
  arrow: !1,
28
28
  ...a ?? {},
@@ -41,10 +41,10 @@ function d({
41
41
  slots: {
42
42
  transition: f
43
43
  },
44
- children: r
44
+ children: o
45
45
  }
46
- ) : r;
46
+ ) : o;
47
47
  }
48
48
  export {
49
- d as default
49
+ x as default
50
50
  };