@arcblock/ux 3.4.15 → 3.5.1

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 (333) hide show
  1. package/lib/package.json.js +1 -1
  2. package/package.json +10 -7
  3. package/src/ActionButton/ActionButton.stories.jsx +0 -61
  4. package/src/ActionButton/index.jsx +0 -106
  5. package/src/ActivityIndicator/ActivityIndicator.stories.jsx +0 -9
  6. package/src/ActivityIndicator/index.jsx +0 -140
  7. package/src/Address/Address.stories.jsx +0 -38
  8. package/src/Address/compact-text.jsx +0 -76
  9. package/src/Address/did-address.tsx +0 -223
  10. package/src/Address/index.tsx +0 -21
  11. package/src/Address/responsive-did-address.tsx +0 -154
  12. package/src/Alert/Alert.stories.jsx +0 -100
  13. package/src/Alert/index.jsx +0 -130
  14. package/src/AnimationWaiter/AnimationWaiter.stories.jsx +0 -35
  15. package/src/AnimationWaiter/dark-animation.json +0 -1
  16. package/src/AnimationWaiter/default-animation.json +0 -1
  17. package/src/AnimationWaiter/index.jsx +0 -296
  18. package/src/Async/index.tsx +0 -44
  19. package/src/Avatar/Avatar.stories.jsx +0 -11
  20. package/src/Avatar/did-motif.jsx +0 -38
  21. package/src/Avatar/etherscan-blockies.js +0 -81
  22. package/src/Avatar/index.jsx +0 -195
  23. package/src/Badge/Badge.stories.jsx +0 -41
  24. package/src/Badge/index.jsx +0 -101
  25. package/src/Blocklet/Blocklet.stories.jsx +0 -21
  26. package/src/Blocklet/blocklet.jsx +0 -276
  27. package/src/Blocklet/index.js +0 -5
  28. package/src/Blocklet/utils.jsx +0 -58
  29. package/src/BlockletContext/index.tsx +0 -72
  30. package/src/BlockletNFT/BlockletNFT.stories.jsx +0 -21
  31. package/src/BlockletNFT/index.jsx +0 -378
  32. package/src/BlockletV2/Blocklet.stories.jsx +0 -34
  33. package/src/BlockletV2/blocklet.tsx +0 -247
  34. package/src/BlockletV2/components/icon-text.tsx +0 -47
  35. package/src/BlockletV2/components/tooltip-icon.tsx +0 -52
  36. package/src/BlockletV2/index.ts +0 -6
  37. package/src/BlockletV2/utils.js +0 -75
  38. package/src/Button/Button.stories.jsx +0 -24
  39. package/src/Button/index.js +0 -9
  40. package/src/Button/wrap.jsx +0 -126
  41. package/src/ButtonGroup/index.js +0 -16
  42. package/src/CardSelector/index.tsx +0 -136
  43. package/src/Center/Center.stories.jsx +0 -20
  44. package/src/Center/index.tsx +0 -33
  45. package/src/ClickToCopy/ClickToCopy.stories.jsx +0 -24
  46. package/src/ClickToCopy/copy-button.tsx +0 -43
  47. package/src/ClickToCopy/hook.ts +0 -42
  48. package/src/ClickToCopy/index.tsx +0 -96
  49. package/src/CloseButton/index.tsx +0 -37
  50. package/src/CodeBlock/CodeBlock.stories.jsx +0 -22
  51. package/src/CodeBlock/LightBox.tsx +0 -87
  52. package/src/CodeBlock/index.tsx +0 -217
  53. package/src/Colors/Colors.stories.jsx +0 -211
  54. package/src/Colors/index.ts +0 -4
  55. package/src/Colors/themes/default.ts +0 -8
  56. package/src/Colors/themes/did-connect.ts +0 -64
  57. package/src/Colors/themes/temp.ts +0 -52
  58. package/src/Config/Config.stories.jsx +0 -16
  59. package/src/Config/config-provider.tsx +0 -62
  60. package/src/Config/index.ts +0 -2
  61. package/src/Config/theme-mode-toggle.tsx +0 -38
  62. package/src/ContactForm/ContactForm.stories.jsx +0 -32
  63. package/src/ContactForm/index.tsx +0 -264
  64. package/src/CookieConsent/CookieConsent.stories.jsx +0 -33
  65. package/src/CookieConsent/index.tsx +0 -104
  66. package/src/CountDown/CountDown.stories.jsx +0 -15
  67. package/src/CountDown/index.tsx +0 -170
  68. package/src/DID/DID.stories.jsx +0 -37
  69. package/src/DID/index.tsx +0 -393
  70. package/src/DIDConnect/app-icon.tsx +0 -37
  71. package/src/DIDConnect/app-info-item.tsx +0 -93
  72. package/src/DIDConnect/auth-apps/auth-apps-info.tsx +0 -77
  73. package/src/DIDConnect/auth-apps/index.tsx +0 -278
  74. package/src/DIDConnect/auth-apps/switch-role.tsx +0 -47
  75. package/src/DIDConnect/did-connect-container.tsx +0 -326
  76. package/src/DIDConnect/did-connect-footer.tsx +0 -76
  77. package/src/DIDConnect/did-connect-logo.tsx +0 -8
  78. package/src/DIDConnect/icons/did-wallet-logo.tsx +0 -18
  79. package/src/DIDConnect/icons/github-logo.tsx +0 -17
  80. package/src/DIDConnect/index.ts +0 -11
  81. package/src/DIDConnect/landing-page.tsx +0 -218
  82. package/src/DIDConnect/powered-by.tsx +0 -48
  83. package/src/DIDConnect/provider-icon.tsx +0 -62
  84. package/src/DIDConnect/request-storage-access-api-dialog.tsx +0 -304
  85. package/src/DIDConnect/with-container.tsx +0 -323
  86. package/src/DIDConnect/with-ux-theme.tsx +0 -22
  87. package/src/DIDLogo/Logo.stories.jsx +0 -11
  88. package/src/DIDLogo/index.tsx +0 -168
  89. package/src/Datatable/CustomToolbar.jsx +0 -415
  90. package/src/Datatable/Datatable.stories.jsx +0 -92
  91. package/src/Datatable/DatatableContext.jsx +0 -35
  92. package/src/Datatable/TableSearch.jsx +0 -166
  93. package/src/Datatable/index.jsx +0 -652
  94. package/src/Datatable/utils.js +0 -161
  95. package/src/Dialog/Dialog.stories.jsx +0 -21
  96. package/src/Dialog/confirm.jsx +0 -143
  97. package/src/Dialog/dialog.jsx +0 -199
  98. package/src/Dialog/index.js +0 -4
  99. package/src/Dialog/types.d.ts +0 -20
  100. package/src/Dialog/use-confirm.jsx +0 -188
  101. package/src/DriftBot/index.tsx +0 -81
  102. package/src/Earth/Earth.stories.jsx +0 -39
  103. package/src/Earth/countries.json +0 -8057
  104. package/src/Earth/index.tsx +0 -515
  105. package/src/Earth/util.ts +0 -72
  106. package/src/Empty/Empty.stories.jsx +0 -23
  107. package/src/Empty/index.jsx +0 -48
  108. package/src/ErrorBoundary/ErrorBoundary.stories.jsx +0 -13
  109. package/src/ErrorBoundary/fallback.tsx +0 -85
  110. package/src/ErrorBoundary/index.ts +0 -1
  111. package/src/Footer/Footer.stories.jsx +0 -13
  112. package/src/Footer/index.tsx +0 -130
  113. package/src/Header/Header.stories.jsx +0 -30
  114. package/src/Header/addon-button.tsx +0 -41
  115. package/src/Header/auto-hidden.tsx +0 -31
  116. package/src/Header/header-addons.tsx +0 -37
  117. package/src/Header/header.tsx +0 -214
  118. package/src/Header/index.ts +0 -3
  119. package/src/Header/responsive-header.tsx +0 -145
  120. package/src/Icon/Icon.stories.jsx +0 -45
  121. package/src/Icon/image.tsx +0 -53
  122. package/src/Icon/index.tsx +0 -63
  123. package/src/Img/Img.stories.jsx +0 -17
  124. package/src/Img/index.jsx +0 -258
  125. package/src/InfoRow/InfoRow.stories.jsx +0 -14
  126. package/src/InfoRow/index.tsx +0 -91
  127. package/src/Layout/Layout.stories.jsx +0 -24
  128. package/src/Layout/dashboard/external-link.tsx +0 -59
  129. package/src/Layout/dashboard/full-page.tsx +0 -58
  130. package/src/Layout/dashboard/index.tsx +0 -260
  131. package/src/Layout/dashboard/sidebar.tsx +0 -198
  132. package/src/Layout/dashboard-legacy/header.tsx +0 -156
  133. package/src/Layout/dashboard-legacy/index.tsx +0 -127
  134. package/src/Layout/dashboard-legacy/sidebar.tsx +0 -129
  135. package/src/Layout/index.tsx +0 -310
  136. package/src/LoadingMask/index.tsx +0 -108
  137. package/src/Locale/LocaleSelector.stories.jsx +0 -44
  138. package/src/Locale/browser-lang.ts +0 -65
  139. package/src/Locale/context.tsx +0 -162
  140. package/src/Locale/languages.ts +0 -58
  141. package/src/Locale/selector.tsx +0 -174
  142. package/src/Locale/util.ts +0 -38
  143. package/src/Logo/Logo.stories.jsx +0 -23
  144. package/src/Logo/images/logo-dark-text.svg +0 -3
  145. package/src/Logo/images/logo-dark-top.svg +0 -6
  146. package/src/Logo/images/logo-light-text.svg +0 -3
  147. package/src/Logo/images/logo-light-top.svg +0 -6
  148. package/src/Logo/index.tsx +0 -58
  149. package/src/Metric/Metric.stories.jsx +0 -29
  150. package/src/Metric/index.tsx +0 -130
  151. package/src/MuiWrap/index.tsx +0 -10
  152. package/src/NFTDisplay/NFTBroken.svg +0 -34
  153. package/src/NFTDisplay/NFTDisplay.stories.jsx +0 -30
  154. package/src/NFTDisplay/README.md +0 -59
  155. package/src/NFTDisplay/aspect-ratio-container.tsx +0 -36
  156. package/src/NFTDisplay/broken.tsx +0 -51
  157. package/src/NFTDisplay/displayApi.ts +0 -43
  158. package/src/NFTDisplay/index.tsx +0 -393
  159. package/src/NFTDisplay/loading.tsx +0 -16
  160. package/src/NFTDisplay/preview.tsx +0 -84
  161. package/src/NFTDisplay/render-svg.tsx +0 -21
  162. package/src/NFTDisplay/svg-embedder/img.tsx +0 -27
  163. package/src/NFTDisplay/svg-embedder/inline-svg.tsx +0 -36
  164. package/src/NavMenu/NavMenu.stories.jsx +0 -17
  165. package/src/NavMenu/images/OCAP.svg +0 -1
  166. package/src/NavMenu/images/abt-network.svg +0 -1
  167. package/src/NavMenu/images/ai-kit.svg +0 -1
  168. package/src/NavMenu/images/aigne-image-smith.svg +0 -1
  169. package/src/NavMenu/images/aigne.svg +0 -1
  170. package/src/NavMenu/images/aistro.png +0 -0
  171. package/src/NavMenu/images/arcsphere.svg +0 -1
  172. package/src/NavMenu/images/blocklet-framework.svg +0 -1
  173. package/src/NavMenu/images/blocklet-launcher.svg +0 -1
  174. package/src/NavMenu/images/blocklet-server.svg +0 -1
  175. package/src/NavMenu/images/blocklet-store.svg +0 -1
  176. package/src/NavMenu/images/creator-studio.svg +0 -1
  177. package/src/NavMenu/images/did-wallet.svg +0 -1
  178. package/src/NavMenu/images/did.svg +0 -1
  179. package/src/NavMenu/images/nft-studio.svg +0 -1
  180. package/src/NavMenu/images/payment-kit.png +0 -0
  181. package/src/NavMenu/images/vc.svg +0 -1
  182. package/src/NavMenu/images/web3-kit.svg +0 -1
  183. package/src/NavMenu/index.ts +0 -3
  184. package/src/NavMenu/nav-menu-context.tsx +0 -30
  185. package/src/NavMenu/nav-menu.tsx +0 -441
  186. package/src/NavMenu/products.tsx +0 -830
  187. package/src/NavMenu/style.ts +0 -258
  188. package/src/NavMenu/sub-container.tsx +0 -125
  189. package/src/NavMenu/sub-item-group.tsx +0 -42
  190. package/src/OrgTransfer/index.tsx +0 -53
  191. package/src/OrgTransfer/locales.ts +0 -25
  192. package/src/OrgTransfer/selector.tsx +0 -252
  193. package/src/OrgTransfer/type.ts +0 -31
  194. package/src/PageScroller/index.tsx +0 -316
  195. package/src/PageScroller/story/FifthComponent.jsx +0 -7
  196. package/src/PageScroller/story/FirstComponent.jsx +0 -7
  197. package/src/PageScroller/story/FourthComponent.jsx +0 -7
  198. package/src/PageScroller/story/FullPage.jsx +0 -55
  199. package/src/PageScroller/story/PageContain.jsx +0 -59
  200. package/src/PageScroller/story/PageScroller.stories.jsx +0 -18
  201. package/src/PageScroller/story/SecondComponent.jsx +0 -7
  202. package/src/PageScroller/story/ThirdComponent.jsx +0 -7
  203. package/src/PageScroller/story/index.css +0 -115
  204. package/src/PageScroller/usePrevValue.ts +0 -11
  205. package/src/Passport/index.ts +0 -3
  206. package/src/Passport/passport.tsx +0 -118
  207. package/src/PhoneInput/PhoneInput.stories.jsx +0 -12
  208. package/src/PhoneInput/country-select.tsx +0 -148
  209. package/src/PhoneInput/index.tsx +0 -269
  210. package/src/PoweredByArcBlock/index.tsx +0 -27
  211. package/src/PricingTable/PricingPlan.tsx +0 -120
  212. package/src/PricingTable/PricingTable.stories.jsx +0 -38
  213. package/src/PricingTable/index.tsx +0 -59
  214. package/src/QRCode/QRCode.stories.jsx +0 -13
  215. package/src/QRCode/index.tsx +0 -66
  216. package/src/RelativeTime/RelativeTime.stories.jsx +0 -20
  217. package/src/RelativeTime/index.tsx +0 -334
  218. package/src/Result/Result.stories.jsx +0 -61
  219. package/src/Result/common.tsx +0 -119
  220. package/src/Result/index.tsx +0 -30
  221. package/src/Result/result.tsx +0 -65
  222. package/src/Result/translations.ts +0 -57
  223. package/src/Screenshot/BaseScreenshot/index.tsx +0 -73
  224. package/src/Screenshot/BaseScreenshot/shells/Macbook.tsx +0 -38
  225. package/src/Screenshot/BaseScreenshot/shells/Phone.tsx +0 -35
  226. package/src/Screenshot/Screenshot.stories.jsx +0 -44
  227. package/src/Screenshot/devices.css +0 -1366
  228. package/src/Screenshot/index.tsx +0 -300
  229. package/src/SessionBlocklet/index.tsx +0 -178
  230. package/src/SessionManager/SessionManager.stories.jsx +0 -9
  231. package/src/SessionManager/index.tsx +0 -3
  232. package/src/SessionPermission/index.tsx +0 -26
  233. package/src/SessionUser/components/did-space.tsx +0 -68
  234. package/src/SessionUser/components/logged-in.tsx +0 -338
  235. package/src/SessionUser/components/quick-login-item.tsx +0 -132
  236. package/src/SessionUser/components/session-user-item.tsx +0 -93
  237. package/src/SessionUser/components/session-user-switch.tsx +0 -240
  238. package/src/SessionUser/components/un-login.tsx +0 -257
  239. package/src/SessionUser/components/user-info.tsx +0 -201
  240. package/src/SessionUser/index.tsx +0 -68
  241. package/src/SessionUser/libs/translation.ts +0 -30
  242. package/src/SessionUser/libs/utils.ts +0 -39
  243. package/src/SharedBridge/index.tsx +0 -126
  244. package/src/SocialShare/index.tsx +0 -194
  245. package/src/Sparkline/Sparkline.stories.jsx +0 -13
  246. package/src/Sparkline/index.tsx +0 -231
  247. package/src/Spinner/Spinner.stories.jsx +0 -98
  248. package/src/Spinner/index.tsx +0 -20
  249. package/src/SplitButton/SplitButton.stories.jsx +0 -32
  250. package/src/SplitButton/index.tsx +0 -116
  251. package/src/SplitButton/useClickAway.tsx +0 -24
  252. package/src/Success/index.tsx +0 -175
  253. package/src/Switch/Switch.stories.jsx +0 -16
  254. package/src/Switch/index.jsx +0 -79
  255. package/src/Tabs/Tabs.stories.jsx +0 -18
  256. package/src/Tabs/index.tsx +0 -255
  257. package/src/Tag/Tag.stories.jsx +0 -15
  258. package/src/Tag/index.jsx +0 -106
  259. package/src/TextCollapse/TextCollapse.stories.jsx +0 -73
  260. package/src/TextCollapse/index.tsx +0 -85
  261. package/src/Theme/Theme.stories.jsx +0 -11
  262. package/src/Theme/index.ts +0 -21
  263. package/src/Theme/theme-provider.tsx +0 -374
  264. package/src/Theme/theme.ts +0 -229
  265. package/src/Toast/Toast.stories.jsx +0 -28
  266. package/src/Toast/index.tsx +0 -80
  267. package/src/Typography/index.tsx +0 -124
  268. package/src/UserCard/Cards/avatar-only.tsx +0 -27
  269. package/src/UserCard/Cards/basic-info.tsx +0 -43
  270. package/src/UserCard/Cards/index.tsx +0 -16
  271. package/src/UserCard/Cards/social-actions.tsx +0 -196
  272. package/src/UserCard/Container/card.tsx +0 -63
  273. package/src/UserCard/Container/dialog.tsx +0 -37
  274. package/src/UserCard/Content/basic.tsx +0 -330
  275. package/src/UserCard/Content/clock.tsx +0 -82
  276. package/src/UserCard/Content/minimal.tsx +0 -113
  277. package/src/UserCard/Content/shorten-label.tsx +0 -32
  278. package/src/UserCard/Content/tooltip-avatar.tsx +0 -80
  279. package/src/UserCard/UserCard.stories.jsx +0 -19
  280. package/src/UserCard/components.tsx +0 -81
  281. package/src/UserCard/index.tsx +0 -132
  282. package/src/UserCard/types.ts +0 -165
  283. package/src/UserCard/use-follow.tsx +0 -111
  284. package/src/UserCard/utils.ts +0 -155
  285. package/src/Util/WebWalletOpener.stories.jsx +0 -5
  286. package/src/Util/client.ts +0 -4
  287. package/src/Util/constant.ts +0 -70
  288. package/src/Util/deprecate.tsx +0 -29
  289. package/src/Util/federated.ts +0 -125
  290. package/src/Util/iframe.ts +0 -19
  291. package/src/Util/index.ts +0 -760
  292. package/src/Util/logger.ts +0 -44
  293. package/src/Util/passport.ts +0 -127
  294. package/src/Util/security.ts +0 -72
  295. package/src/Util/style.ts +0 -17
  296. package/src/Util/wallet.ts +0 -35
  297. package/src/VerificationCode/index.tsx +0 -83
  298. package/src/Video/Video.stories.jsx +0 -6
  299. package/src/Video/index.tsx +0 -70
  300. package/src/Wallet/Action.stories.jsx +0 -8
  301. package/src/Wallet/Action.tsx +0 -118
  302. package/src/Wallet/Download.stories.jsx +0 -9
  303. package/src/Wallet/Download.tsx +0 -157
  304. package/src/Wallet/Open.tsx +0 -47
  305. package/src/Wallet/OpenInWallet.stories.jsx +0 -5
  306. package/src/Wallet/images/abtwallet.png +0 -0
  307. package/src/Wallet/images/android_download.svg +0 -22
  308. package/src/Wallet/images/app-store.svg +0 -30
  309. package/src/Wallet/images/google-play.svg +0 -69
  310. package/src/WalletOSIcon/index.tsx +0 -47
  311. package/src/WebWalletSWKeeper/index.tsx +0 -117
  312. package/src/WechatPrompt/images/android.png +0 -0
  313. package/src/WechatPrompt/images/ios.png +0 -0
  314. package/src/WechatPrompt/index.tsx +0 -75
  315. package/src/global.d.ts +0 -28
  316. package/src/hooks/use-blocklet-logo.tsx +0 -32
  317. package/src/hooks/use-clock.tsx +0 -62
  318. package/src/hooks/use-location-state.tsx +0 -117
  319. package/src/hooks/use-mobile.tsx +0 -6
  320. package/src/index.ts +0 -79
  321. package/src/type.d.ts +0 -44
  322. package/src/withTheme/index.tsx +0 -72
  323. package/src/withTracker/README.md +0 -37
  324. package/src/withTracker/action/bind-wallet.tsx +0 -17
  325. package/src/withTracker/action/login.tsx +0 -18
  326. package/src/withTracker/action/pay.tsx +0 -14
  327. package/src/withTracker/action/switch-passport.tsx +0 -20
  328. package/src/withTracker/constant/index.tsx +0 -3
  329. package/src/withTracker/env.tsx +0 -1
  330. package/src/withTracker/error_boundary.jsx +0 -34
  331. package/src/withTracker/index.tsx +0 -50
  332. package/src/withTracker/libs/utm.ts +0 -46
  333. package/vite.config.mjs +0 -37
@@ -1,393 +0,0 @@
1
- /* eslint-disable react-hooks/rules-of-hooks */
2
- import React, { useRef, useEffect, useState } from 'react';
3
- import clsx from 'clsx';
4
- import { Buffer } from 'buffer';
5
- import get from 'lodash/get';
6
- import pako from 'pako';
7
- import base64 from 'base64-url';
8
- import isSvg from 'is-svg';
9
- import noop from 'lodash/noop';
10
- import { Box, type BoxProps } from '@mui/material';
11
-
12
- import AspectRatioContainer from './aspect-ratio-container';
13
- import ImgSvgEmbedder from './svg-embedder/img';
14
- import InlineSvgEmbedder from './svg-embedder/inline-svg';
15
- import DefaultLoading from './loading';
16
- import DefaultBrokenImage from './broken';
17
- import { styled } from '../Theme';
18
- import displayApi from './displayApi';
19
- import RenderSvg from './render-svg';
20
-
21
- /**
22
- * 从 assetState 中获取 nft data, 兼容新旧两种类型的数据结构, 建议将该方法的返回值传入 NFTDisplay 组件的 data prop
23
- * - 旧: assetState.data.value (.credentialSubject.display)
24
- * - 新: assetState.display
25
- */
26
- export function getNFTData(assetState: Record<string, any>) {
27
- return assetState?.display || assetState?.data?.value;
28
- }
29
-
30
- function fromBase64(v: string) {
31
- if (typeof v !== 'string') {
32
- throw new Error('fromBase64 requires input to be a string');
33
- }
34
- return Buffer.from(base64.unescape(v), 'base64');
35
- }
36
-
37
- // const isVC = type => {
38
- // return String(type).includes('VerifiableCredential');
39
- // };
40
-
41
- // 仅针对非 url type 的情况
42
- const getSvgEmbedder = (preferredSvgEmbedder: 'img' | 'svg') => {
43
- const embedders = {
44
- img: ImgSvgEmbedder,
45
- svg: InlineSvgEmbedder,
46
- };
47
- return embedders[preferredSvgEmbedder];
48
- };
49
-
50
- export interface NFTDisplayProps extends BoxProps {
51
- /** asset data 可以是 raw data 和 parsed data */
52
- data: string | Record<string, any>;
53
- address: string;
54
- inset?: false | true;
55
- aspect?: number;
56
- component?: React.ElementType<any>;
57
- className?: string;
58
- renderError?: () => React.ReactNode;
59
- renderLoading?: () => React.ReactNode;
60
- /** 对于非 url type 的情况, 支持优先选用的 svg 嵌入方式, 默认是 img */
61
- preferredSvgEmbedder?: 'img' | 'svg';
62
- /** 针对非 url type 的情况, 检测 svg 有效性, 默认禁用 */
63
- checkSvg?: false | true;
64
- /** loading 最小显示时间 (避免闪烁) */
65
- minimumLoadingTime?: number;
66
- /** 完成回调, 无论加载成功|失败 */
67
- onCompleted?: () => void;
68
- /**
69
- * 图片处理,参考:https://team.arcblock.io/comment/docs/c158aee4-accd-42f4-9ced-6a23f28c00e0/en/blocklet-image-service-guide
70
- * 配置参数会全部转发给 Image Service
71
- */
72
- imageFilter?: object | null;
73
- }
74
-
75
- /**
76
- * TODO:
77
- * 考虑把 asset data 解析部分和 nft display 分离, android 端有相关使用场景 - 只传入 svg 或 url, 也可以传入 asset data,
78
- * 目前如果想直接传入 svg 或 url, 需要构造一个 asset data 的数据才能使用 NFTDisplay 组件
79
- */
80
- function NFTDisplay({
81
- data,
82
- address,
83
- inset,
84
- aspect,
85
- component = 'span',
86
- className = '',
87
- renderError,
88
- renderLoading,
89
- preferredSvgEmbedder = 'img',
90
- checkSvg = false,
91
- minimumLoadingTime = 0,
92
- onCompleted = noop,
93
- imageFilter = null,
94
- ...rest
95
- }: NFTDisplayProps) {
96
- const wrapRoot = (children: React.ReactNode) => (
97
- // @ts-expect-error
98
- <Root component={component} {...rest} className={clsx(className, { 'nft-display--inset': inset })}>
99
- {children}
100
- </Root>
101
- );
102
-
103
- const parsed = useRef<Record<string, any>>({});
104
- try {
105
- // 如果是 raw data 先解析
106
- if (typeof data === 'string') {
107
- parsed.current = JSON.parse(data);
108
- } else {
109
- parsed.current = data;
110
- }
111
-
112
- const { vcId } = parsed.current;
113
- // 需要兼容新旧两种类型的数据结构, nft data 有 credentialSubject 属性, 说明是旧 nft data, 否则是新 nft data
114
- const display = parsed.current.credentialSubject
115
- ? get(parsed.current, 'credentialSubject.display')
116
- : parsed.current;
117
- const { content, type } = display as { content: string; type: string };
118
- const isUrlType = type === 'url';
119
-
120
- // 首次加载, 对于 url type 的情况, loading 为 true
121
- const [state, setState] = useState<{
122
- loading: boolean;
123
- error: boolean;
124
- loadingUrlType: boolean;
125
- urlType: string | null;
126
- }>({
127
- loading: isUrlType,
128
- error: false,
129
- loadingUrlType: true,
130
- urlType: null,
131
- });
132
- const [minimumLoadingReady, setMinimumLoadingReady] = useState(minimumLoadingTime <= 0);
133
- // console.log('[debug] render', {type, minimumLoadingTime}, JSON.stringify(state))
134
-
135
- // assemble the complete url
136
- const getFullContentUrl = ({ useImageFilter = false, t }: { useImageFilter?: boolean; t?: string } = {}) => {
137
- const urlObj = new URL(content);
138
-
139
- // check protocol
140
- if (window.location.protocol === 'https:' && urlObj.protocol === 'http:') {
141
- urlObj.protocol = 'https:';
142
- }
143
-
144
- if (!urlObj.searchParams.has('assetId')) {
145
- urlObj.searchParams.append('assetId', address);
146
- }
147
-
148
- if (!urlObj.searchParams.has('vcId') && vcId) {
149
- urlObj.searchParams.append('vcId', vcId);
150
- }
151
-
152
- // image filter
153
- if (useImageFilter && imageFilter) {
154
- Object.entries(imageFilter).forEach(([key, value]) => {
155
- urlObj.searchParams.append(key, value);
156
- });
157
- }
158
-
159
- // other params
160
- if (t) {
161
- urlObj.searchParams.append('t', t);
162
- }
163
-
164
- return urlObj.href;
165
- };
166
-
167
- // get url content type
168
- const getUrlContentType = async () => {
169
- try {
170
- const response = await displayApi({
171
- url: getFullContentUrl({ useImageFilter: false, t: 'nftdisplay' }),
172
- method: 'HEAD',
173
- });
174
- // @ts-expect-error
175
- const contentType = response?.headers?.get('Content-Type');
176
- setState({ ...state, loadingUrlType: false, urlType: contentType });
177
- } catch (error) {
178
- console.error('Failed to fetch url content type', error);
179
- // display an error message when timeout occurs to avoid repeated waiting.
180
- if ((error as Error)?.message?.includes('timeout')) {
181
- setState({ ...state, loadingUrlType: false, loading: false, error: true });
182
- return;
183
- }
184
-
185
- setState({ ...state, loadingUrlType: false, urlType: null });
186
- }
187
- };
188
-
189
- useEffect(() => {
190
- let timer: NodeJS.Timeout;
191
- if (minimumLoadingTime > 0) {
192
- timer = setTimeout(() => setMinimumLoadingReady(true), minimumLoadingTime);
193
- }
194
-
195
- if (type === 'url') {
196
- getUrlContentType();
197
- }
198
-
199
- return () => clearTimeout(timer);
200
- // eslint-disable-next-line react-hooks/exhaustive-deps
201
- }, []);
202
-
203
- // onCompleted
204
- useEffect(() => {
205
- if ((!state.loading && minimumLoadingReady) || state.error) {
206
- onCompleted();
207
- }
208
- // eslint-disable-next-line react-hooks/exhaustive-deps
209
- }, [state, minimumLoadingReady]);
210
-
211
- if (state.error) {
212
- throw new Error('Failed to render NFT Display.');
213
- }
214
-
215
- const onLoad = () => {
216
- if (state.loading) {
217
- setState({ ...state, loading: false });
218
- }
219
- };
220
-
221
- const onError = () => {
222
- setState({ ...state, error: true, loading: false });
223
- };
224
-
225
- // render image
226
- const renderImg = () => {
227
- const url = getFullContentUrl({ useImageFilter: true });
228
- return (
229
- <img src={url} onError={onError} onLoad={onLoad} alt="NFT Display" style={{ width: 'auto', height: 'auto' }} />
230
- );
231
- };
232
-
233
- // render object
234
- const renderObject = () => {
235
- const objectType = state.urlType || 'image/svg+xml';
236
- const url = getFullContentUrl();
237
-
238
- // do naive image render
239
- const pathname = new URL(url).pathname.toLowerCase();
240
- const imageExtensions = [
241
- '.jpg',
242
- '.jpeg',
243
- '.png',
244
- '.gif',
245
- '.bmp',
246
- '.webp',
247
- '.svg',
248
- '.tiff',
249
- '.tif',
250
- '.ico',
251
- '.jfif',
252
- '.pjpeg',
253
- '.pjp',
254
- '.avif',
255
- ];
256
- if (imageExtensions.some((ext) => pathname.endsWith(ext))) {
257
- return renderImg();
258
- }
259
-
260
- // related: https://github.com/ArcBlock/did-spaces/issues/1367
261
- if (objectType.includes('text/html;')) {
262
- return <DefaultBrokenImage />;
263
- }
264
-
265
- return (
266
- // eslint-disable-next-line jsx-a11y/alt-text
267
- <object
268
- key={url}
269
- type={objectType}
270
- data={url}
271
- onErrorCapture={onError}
272
- onLoad={onLoad}
273
- style={{ width: '100%', height: '100%', pointerEvents: 'none' }}
274
- />
275
- );
276
- };
277
-
278
- const renderNFT = () => {
279
- if (content) {
280
- switch (type) {
281
- case 'url': {
282
- if (state.loadingUrlType) {
283
- return null;
284
- }
285
-
286
- if (state.urlType?.startsWith('image/svg+xml')) {
287
- return <RenderSvg src={getFullContentUrl()} onLoad={onLoad} />;
288
- }
289
-
290
- // render image
291
- if (state.urlType?.startsWith('image')) {
292
- return renderImg();
293
- }
294
-
295
- return renderObject();
296
- }
297
- case 'uri': {
298
- return (
299
- <img
300
- src={content}
301
- onError={() => setState({ ...state, error: true })}
302
- onLoad={() => setState({ ...state, loading: false })}
303
- alt="NFT Display"
304
- />
305
- );
306
- }
307
- case 'svg_gzipped': {
308
- const buffer = pako.ungzip(fromBase64(content), {});
309
- const svg = Buffer.from(buffer).toString('utf8');
310
- if (checkSvg && !isSvg(svg)) {
311
- throw new Error('Invalid SVG of type svg_gzipped');
312
- }
313
- const Embedder = getSvgEmbedder(preferredSvgEmbedder);
314
- return <Embedder svg={svg} />;
315
- }
316
- case 'svg': {
317
- if (checkSvg && !isSvg(content)) {
318
- throw new Error('Invalid SVG of type svg');
319
- }
320
- const Embedder = getSvgEmbedder(preferredSvgEmbedder);
321
- return <Embedder svg={content} />;
322
- }
323
- // TODO: 准备测试数据
324
- case 'html': {
325
- break;
326
- }
327
- default:
328
- }
329
- }
330
- throw new Error(`unsupported display protocol: ${display.type}`);
331
- };
332
-
333
- return wrapRoot(
334
- <>
335
- {(state.loading || !minimumLoadingReady) && (renderLoading ? renderLoading() : <DefaultLoading />)}
336
- {renderNFT()}
337
- </>
338
- );
339
- } catch (e) {
340
- console.error((e as Error)?.message, {
341
- nftId: address,
342
- vcId: parsed?.current?.vcId,
343
- });
344
- return wrapRoot(renderError ? renderError() : <DefaultBrokenImage />);
345
- }
346
- }
347
-
348
- const Root = styled(Box)`
349
- display: flex;
350
- justify-content: center;
351
- align-items: center;
352
- position: relative;
353
- /* 默认尺寸 */
354
- width: 150px;
355
- height: 150px;
356
- overflow: hidden;
357
-
358
- &,
359
- img,
360
- object {
361
- max-width: 100%;
362
- max-height: 100%;
363
- }
364
-
365
- img,
366
- object {
367
- width: 100%;
368
- height: 100%;
369
- }
370
-
371
- &.nft-display--inset {
372
- width: 100%;
373
- height: 100%;
374
- }
375
- `;
376
-
377
- function withAspectRatio(Component: React.ComponentType<NFTDisplayProps>) {
378
- // eslint-disable-next-line func-names, react/prop-types
379
- return function ({ aspect = undefined, inset = false, ...rest }: NFTDisplayProps) {
380
- // inset 比 aspect ratio 优先级高, 如果同时设置了 inset 和 aspect, 则后者不生效
381
- const applyAspectRatio = aspect && aspect > 0 && !inset;
382
- if (applyAspectRatio) {
383
- return (
384
- <AspectRatioContainer aspect={aspect}>
385
- <Component inset {...rest} />
386
- </AspectRatioContainer>
387
- );
388
- }
389
- return <Component inset={inset} {...rest} />;
390
- };
391
- }
392
-
393
- export default withAspectRatio(NFTDisplay);
@@ -1,16 +0,0 @@
1
- import { styled } from '../Theme';
2
-
3
- export default function Loading() {
4
- return <Root className="nft-display__loading">Loading...</Root>;
5
- }
6
-
7
- const Root = styled('span')`
8
- display: flex;
9
- justify-content: center;
10
- align-items: center;
11
- position: absolute;
12
- width: 100%;
13
- height: 100%;
14
- color: #ccc;
15
- background-color: #eee;
16
- `;
@@ -1,84 +0,0 @@
1
- import { Modal } from '@mui/material';
2
- import styled from '@emotion/styled';
3
- import NFTDisplay, { getNFTData } from '.';
4
-
5
- export interface NftInfo {
6
- address: string;
7
- data: Record<string, any>;
8
- display: Record<string, any>;
9
- issuer: string;
10
- }
11
-
12
- export default function NftPreview({
13
- visible,
14
- onClose,
15
- nft,
16
- }: {
17
- visible: boolean;
18
- onClose: () => void;
19
- nft: NftInfo | null;
20
- }) {
21
- if (!visible || !nft) {
22
- return null;
23
- }
24
-
25
- return (
26
- <NftPreviewRoot>
27
- {/* Preview Modal */}
28
- <Modal open={visible} onClose={onClose}>
29
- <ModalRoot onClick={onClose}>
30
- <NFTDisplay data={getNFTData(nft)} address={nft.address} inset />
31
- </ModalRoot>
32
- </Modal>
33
- </NftPreviewRoot>
34
- );
35
- }
36
-
37
- const NftPreviewRoot = styled.div`
38
- position: relative;
39
- width: 100%;
40
- height: 100%;
41
- cursor: pointer;
42
-
43
- &:hover {
44
- .mask {
45
- opacity: 1;
46
- }
47
- }
48
-
49
- .mask {
50
- position: absolute;
51
- top: 0;
52
- left: 0;
53
- display: flex;
54
- align-items: center;
55
- justify-content: center;
56
- width: 100%;
57
- height: 100%;
58
- background: rgba(0, 0, 0, 0.6);
59
- opacity: 0;
60
- transition: opacity 0.2s;
61
- }
62
- `;
63
-
64
- const ModalRoot = styled.div`
65
- display: flex;
66
- justify-content: center;
67
- align-items: center;
68
- height: 100vh;
69
- width: 100vw;
70
-
71
- img,
72
- object {
73
- max-width: 90vw;
74
- max-height: 75vh;
75
- }
76
-
77
- .nft-display--inset {
78
- > .MuiBox-root,
79
- .nft-display__loading {
80
- width: 75vmin;
81
- height: 75vmin;
82
- }
83
- }
84
- `;
@@ -1,21 +0,0 @@
1
- import DOMPurify from 'dompurify';
2
- import { useAsyncEffect } from 'ahooks';
3
- import axios from 'axios';
4
- import { useState } from 'react';
5
- import InlineSvg from './svg-embedder/inline-svg';
6
-
7
- function RenderSvg({ src, onLoad = undefined }: { src: string; onLoad?: () => void }) {
8
- const [svgContent, setSvgContent] = useState('');
9
-
10
- useAsyncEffect(async () => {
11
- // @note: 注意源站点需要允许跨域
12
- const response = await axios.get(src);
13
- const cleanSVG = DOMPurify.sanitize(response.data);
14
- setSvgContent(cleanSVG);
15
- onLoad?.();
16
- }, []);
17
-
18
- return <InlineSvg svg={svgContent} />;
19
- }
20
-
21
- export default RenderSvg;
@@ -1,27 +0,0 @@
1
- import InlineSvgEmbedder from './inline-svg';
2
-
3
- const svgToImgUrl = (svg: string) => {
4
- // fix: #225, https://stackoverflow.com/a/52135328)
5
- const blob = new Blob([svg], { type: 'image/svg+xml' });
6
- return URL.createObjectURL(blob);
7
- };
8
-
9
- export interface ImgEmbedderProps extends React.HTMLAttributes<HTMLImageElement> {
10
- svg: string;
11
- alt?: string;
12
- /** 对于包含 foreignObject 的 svg, fallback 到 inline svg + shadow DOM */
13
- fallback?: true | false;
14
- }
15
-
16
- /** 基于 <img> 嵌入 svg */
17
- function ImgEmbedder({ svg, alt = '', fallback = true, ...rest }: ImgEmbedderProps) {
18
- // 包含 foreignObject 的 svg, fallback 到 shadow dom
19
- if (fallback && svg.indexOf('</foreignObject>') > -1) {
20
- return <InlineSvgEmbedder svg={svg} />;
21
- }
22
-
23
- const url = svgToImgUrl(svg);
24
- return <img src={url} onLoad={() => URL.revokeObjectURL(url)} alt={alt} {...rest} />;
25
- }
26
-
27
- export default ImgEmbedder;
@@ -1,36 +0,0 @@
1
- import root from 'react-shadow/emotion';
2
- import { type SxProps } from '@mui/material';
3
-
4
- import { styled } from '../../Theme';
5
-
6
- export interface InlineSvgProps extends React.HTMLAttributes<HTMLSpanElement> {
7
- svg: string;
8
- sx?: SxProps;
9
- }
10
-
11
- /** inline svg 的方式嵌入 svg, 使用 shadow DOM 避免样式污染 */
12
- function InlineSvg({ svg, ...rest }: InlineSvgProps) {
13
- return (
14
- <Root {...rest}>
15
- <Inner dangerouslySetInnerHTML={{ __html: svg }} />
16
- </Root>
17
- );
18
- }
19
-
20
- const Root = styled(root.span)`
21
- display: block;
22
- width: 100%;
23
- height: 100%;
24
- `;
25
-
26
- const Inner = styled('div')`
27
- &,
28
- & > svg {
29
- height: 100%;
30
- width: 100%;
31
- min-width: 100%;
32
- max-width: 100%;
33
- }
34
- `;
35
-
36
- export default InlineSvg;
@@ -1,17 +0,0 @@
1
- export { default as BasicRouterLink } from './demo/basic-router-link';
2
- export { default as NestedNavigation } from './demo/nested-navigation';
3
- export { default as ActiveState } from './demo/active-state';
4
- export { default as UseItemsProp } from './demo/use-items-prop';
5
- export { default as LabelIconOnly } from './demo/label-icon-only';
6
- export { default as InlineMode } from './demo/inline-mode';
7
-
8
- export default {
9
- title: 'Navigation/NavMenu',
10
- parameters: {
11
- docs: {
12
- description: {
13
- component: 'The NavMenu component is used to provide a means to navigate through an app or website.',
14
- },
15
- },
16
- },
17
- };
@@ -1 +0,0 @@
1
- <svg width="420" height="420" viewBox="0 0 420 420" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M210.205 17.143V210m0 0 166.667 96.19M210.205 210 44.967 305.238" stroke="url(#a)" stroke-opacity=".6" stroke-width="18"/><path fill-rule="evenodd" clip-rule="evenodd" d="m247.638 178.49-37.433 21.613-37.284-21.527 27.416-47.8 1.297-2.26 8.571-14.945 8.571 14.866 1.337 2.316 27.525 47.737zm14.846-8.571-37.428-64.911-14.89-25.824-14.832 25.858-37.26 64.963-95.36-55.056 147.491-85.154 147.49 85.154-95.211 54.97zm-6.283 23.423-37.425 21.607v86.295l66.189-38.2 8.573-4.949-8.552-14.832-28.785-49.921zm-37.425 127.694 83.332-48.093 14.841-8.566-8.56-14.845-37.342-64.762 95.22-54.975v170.308l-147.491 85.153v-64.22zm-17.142-19.885v-86.202l-37.242-21.501-28.33 49.392-8.476 14.779 8.497 4.995 65.551 38.537zm-52.088-116.275-36.831 64.214-8.438 14.712 14.621 8.595 82.619 48.572.117.068v64.219L54.143 300.103V129.795l95.403 55.081zM210.205 10 45.571 105.051 37 110v200l164.634 95.051 8.571 4.949 8.571-4.949L383.41 310V110l-8.572-4.949L210.205 10z" fill="url(#b)"/><defs><linearGradient id="a" x1="632.433" y1="166.456" x2="334.741" y2="-292.388" gradientUnits="userSpaceOnUse"><stop stop-color="#4EF1BA"/><stop offset=".502" stop-color="#16CED1"/><stop offset="1" stop-color="#3773F2"/></linearGradient><linearGradient id="b" x1="210.205" y1="-190" x2="-189.795" y2="210" gradientUnits="userSpaceOnUse"><stop stop-color="#4EF1BA"/><stop offset=".502" stop-color="#16CED1"/><stop offset="1" stop-color="#3773F2"/></linearGradient></defs></svg>
@@ -1 +0,0 @@
1
- <svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="a" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="8" y="8" width="184" height="184"><path d="M192 100c0-50.81-41.19-92-92-92S8 49.19 8 100s41.19 92 92 92 92-41.19 92-92z" fill="#fff"/></mask><g mask="url(#a)"><path d="M192 100c0-50.81-41.19-92-92-92S8 49.19 8 100s41.19 92 92 92 92-41.19 92-92z" fill="#fff"/><path d="M192 8H8v184h184V8z" fill="url(#b)"/><path opacity=".6" fill-rule="evenodd" clip-rule="evenodd" d="M98.06 97.074v2.23l-1.942 1.115L40.2 132.536l1.941 3.344L100 102.648l57.859 33.232 1.941-3.344-55.918-32.117-1.941-1.115V32.84h-3.882v64.234z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="m100.404 28.62 62.156 35.886v71.771l-62.156 35.886-62.155-35.886V64.506l62.155-35.886zM44.076 65.627l38.653 22.317 17.676-30.615 17.675 30.614 38.653-22.316-56.329-32.52-56.328 32.52zm114.599 3.364-38.653 22.317 17.676 30.615-35.351 20.41v24.223l56.328-32.522V68.991zm-60.213 97.565v-24.223l-35.35-20.41 17.675-30.615L42.133 68.99v65.043l56.329 32.522zM84.15 93.25l-15.733 27.251 30.045 17.346v-36.335l-1.942-1.121-12.37-7.14zm18.197 44.597 30.043-17.346-15.733-27.25-12.368 7.14-1.942 1.121v36.335zm12.368-47.96-14.311-24.789-14.311 24.788 14.311 8.263 14.311-8.263z" fill="#fff"/></g><defs><linearGradient id="b" x1="100" y1="-84" x2="-84" y2="100" gradientUnits="userSpaceOnUse"><stop stop-color="#4EF1BA"/><stop offset=".502" stop-color="#16CED1"/><stop offset="1" stop-color="#3773F2"/></linearGradient></defs></svg>
@@ -1 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><g filter="url(#b)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.61 0h-1.218v2.15H10.31V0H9.09v2.15H8.007V0H6.788v2.15H5.707V0H4.488v2.183a2.765 2.765 0 0 0-2.305 2.305H0v1.22h2.15v1.08H0v1.218h2.15V9.09H0v1.219h2.15v1.083H0v1.219h2.15v1.083H0v1.219h2.15v1.08H0v1.22h2.15v1.083H0v1.218h2.183a2.764 2.764 0 0 0 2.305 2.303V24h1.219v-2.15h1.08V24h1.22v-2.15H9.09V24h1.219v-2.15h1.083V24h1.219v-2.15h1.083V24h1.219v-2.15h1.08V24h1.22v-2.15h1.083V24h1.218v-2.183a2.765 2.765 0 0 0 2.303-2.303H24v-1.218h-2.15v-1.084H24v-1.218h-2.15v-1.081H24v-1.219h-2.15v-1.083H24v-1.219h-2.15V10.31H24V9.09h-2.15V8.007H24V6.788h-2.15v-1.08H24v-1.22h-2.183a2.765 2.765 0 0 0-2.303-2.305V0h-1.218v2.15h-1.084V0h-1.218v2.15h-1.081V0h-1.219v2.15h-1.083V0z" fill="#1D9BF0"/></g><path d="M17.102 4.913H6.9c-1.098 0-1.988.89-1.988 1.988v10.2c0 1.099.89 1.989 1.988 1.989h10.2c1.099 0 1.989-.89 1.989-1.988V6.9c0-1.098-.89-1.988-1.988-1.988z" fill="url(#c)"/><path d="M8.387 7.918a.877.877 0 0 0-.53-.802V4.91H7.17v2.206a.874.874 0 1 0 1.218.802z" fill="#3AC8A0"/><path d="M8.387 11.13a.872.872 0 0 0-.3 1.69v6.27h.691v-6.311a.871.871 0 0 0-.391-1.654v.005z" fill="#E85F3D"/><path d="M11.944 14.673a.874.874 0 0 0-.348 1.676v2.74h.692v-2.74a.873.873 0 0 0-.344-1.676z" fill="#3AC8A0"/><path d="M17.306 10.482a.869.869 0 0 0-.759 1.302l-1.527 2.023v5.283h.69v-5.051l1.378-1.836c.068.015.137.023.207.024a.874.874 0 1 0 0-1.745h.01zm-4.433-.237a.994.994 0 0 0-.182.02l-1.379-1.828V4.913h-.689v3.763l1.508 2a.87.87 0 1 0 .745-.422l-.003-.009z" fill="#E85F3D"/><path d="M15.682 9.666a.874.874 0 0 0 .345-1.676V4.913h-.69V7.99a.874.874 0 0 0 .345 1.676z" fill="#3AC8A0"/><mask id="d" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="6" y="7" width="12" height="10"><path d="M15.25 10.5h-6.5a.5.5 0 0 0-.5.5v5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5v-5a.5.5 0 0 0-.5-.5z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7.75 11a1 1 0 0 1 1-1h6.5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-6.5a1 1 0 0 1-1-1v-5zm7.5 0h-6.5v5h6.5v-5z" fill="#fff"/><path d="M10.25 13a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1zm3.5 0a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1zM11 14a.5.5 0 0 0 0 1v-1zm2 1a.5.5 0 0 0 0-1v1zm-2 0h2v-1h-2v1z" fill="#000"/><path fill-rule="evenodd" clip-rule="evenodd" d="M12 8a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 12 8zm-5 4a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 7 12zm10 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2a.5.5 0 0 1 .5-.5z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11 8a1 1 0 1 1 2 0 1 1 0 0 1-2 0z" fill="#fff"/></mask><g mask="url(#d)"><path d="M6 6h12v12H6V6z" fill="#fff"/></g></g><defs><linearGradient id="c" x1="16.083" y1="19.958" x2="16.147" y2="6.277" gradientUnits="userSpaceOnUse"><stop stop-color="#369CFC"/><stop offset="1" stop-color="#1E65B5"/></linearGradient><clipPath id="a"><path fill="#fff" d="M0 0h24v24H0z"/></clipPath><filter id="b" x="0" y="0" width="24.4" height="24.4" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feColorMatrix in="SourceAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feMorphology radius=".8" in="SourceAlpha" result="effect1_innerShadow_697_8408"/><feOffset dx=".4" dy=".4"/><feGaussianBlur stdDeviation=".6"/><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0"/><feBlend in2="shape" result="effect1_innerShadow_697_8408"/></filter></defs></svg>
@@ -1 +0,0 @@
1
- <svg viewBox="0 0 902 902" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="902" height="902" rx="212" fill="url(#a)"/><rect x="166" y="247" width="569" height="409" rx="80" stroke="#fff" style="stroke:#fff;stroke-opacity:1" stroke-width="40"/><ellipse cx="371" cy="452" rx="37" ry="65" fill="#fff" style="fill:#fff;fill-opacity:1"/><ellipse cx="531" cy="452" rx="37" ry="65" fill="#fff" style="fill:#fff;fill-opacity:1"/><defs><linearGradient id="a" x1="84" y1="78.5" x2="811.5" y2="850.5" gradientUnits="userSpaceOnUse"><stop stop-color="#AAF4EF" style="stop-color:color(display-p3 .6667 .9569 .9373);stop-opacity:1"/><stop offset=".181" stop-color="#C7F37F" style="stop-color:color(display-p3 .7798 .9512 .4996);stop-opacity:1"/><stop offset=".361" stop-color="#FFD071" style="stop-color:color(display-p3 1 .8141 .4422);stop-opacity:1"/><stop offset=".546" stop-color="#FF9898" style="stop-color:color(display-p3 1 .596 .596);stop-opacity:1"/><stop offset=".722" stop-color="#FF89E0" style="stop-color:color(display-p3 1 .536 .8769);stop-opacity:1"/><stop offset=".899" stop-color="#B695FE" style="stop-color:color(display-p3 .7137 .5843 .9961);stop-opacity:1"/><stop offset="1" stop-color="#7C8EED" style="stop-color:color(display-p3 .4863 .5569 .9294);stop-opacity:1"/></linearGradient></defs></svg>
@@ -1 +0,0 @@
1
- <svg viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg"><rect x="73.16" y="109.16" width="253.435" height="181.679" rx="36.641" fill="none" stroke="currentColor" stroke-width="18.321"/><ellipse cx="164" cy="199.618" rx="16.03" ry="28.626" fill="currentColor"/><ellipse cx="234.991" cy="199.618" rx="16.03" ry="28.626" fill="currentColor"/></svg>
Binary file
@@ -1 +0,0 @@
1
- <svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="1024" height="1024" rx="250" fill="url(#a)"/><path fill-rule="evenodd" clip-rule="evenodd" d="M283.163 232.966c-9.334 5.389-9.334 18.86 0 24.249 4.331 2.5 9.668 2.5 14 0L402 196.687a14 14 0 0 0 7-12.125c0-10.777-11.666-17.513-21-12.124l-104.837 60.528zm-98.864 215.431a14 14 0 0 0-7-12.125c-9.333-5.388-21 1.347-21 12.125v123.207c0 10.777 11.667 17.513 21 12.124a14 14 0 0 0 7-12.124V448.397zm547.739 316.237a14 14 0 0 1 14 0c9.334 5.388 9.334 18.86 0 24.249L638 851.258c-9.333 5.389-21-1.347-21-12.124a14 14 0 0 1 7-12.124l108.038-62.376zm137.137-193.333c0 10.777-11.667 17.512-21 12.124a14.002 14.002 0 0 1-7-12.124V448.7a14 14 0 0 1 7-12.124c9.333-5.389 21 1.347 21 12.124v122.601zM409 839.438c0 10.777-11.666 17.513-21 12.124l-108.301-62.528c-9.334-5.388-9.334-18.86 0-24.248a14 14 0 0 1 14 0L402 827.313a14 14 0 0 1 7 12.125zm208-654.572c0-10.777 11.667-17.513 21-12.124l104.575 60.376c9.333 5.388 9.333 18.86 0 24.248a14 14 0 0 1-14 0L624 196.99a14 14 0 0 1-7-12.124z" fill="#fff" fill-opacity=".12"/><path fill-rule="evenodd" clip-rule="evenodd" d="M513.689 175.068c-17.416 0-31.534-14.118-31.534-31.534 0-17.416 14.118-31.534 31.534-31.534 17.416 0 31.534 14.118 31.534 31.534 0 17.416-14.118 31.534-31.534 31.534zM560.723 321.5c0 26.858-21.773 48.631-48.631 48.631s-48.631-21.773-48.631-48.631c0-26.859 21.773-48.632 48.631-48.632s48.631 21.773 48.631 48.632zm130.926 355.386c-26.858 0-48.631-21.773-48.631-48.631 0-26.859 21.773-48.632 48.631-48.632 26.859 0 48.632 21.773 48.632 48.632 0 26.858-21.773 48.631-48.632 48.631zm-411.498-48.631c0 26.858 21.773 48.631 48.632 48.631 26.858 0 48.631-21.773 48.631-48.631 0-26.859-21.773-48.632-48.631-48.632-26.859 0-48.632 21.773-48.632 48.632zm231.935-44.897c-39.255 0-71.077-31.822-71.077-71.077 0-39.254 31.822-71.077 71.077-71.077 39.255 0 71.077 31.823 71.077 71.077 0 39.255-31.822 71.077-71.077 71.077zm310.488 136.265c0 17.416 14.118 31.534 31.534 31.534 17.415 0 31.534-14.118 31.534-31.534 0-17.415-14.119-31.534-31.534-31.534-17.416 0-31.534 14.119-31.534 31.534zm-684.565 0c0 17.416 14.119 31.534 31.534 31.534 17.416 0 31.534-14.118 31.534-31.534 0-17.415-14.118-31.534-31.534-31.534-17.415 0-31.534 14.119-31.534 31.534z" fill="#fff"/><foreignObject x="118" y="252.842" width="787.643" height="679.157"><div xmlns="http://www.w3.org/1999/xhtml" style="backdrop-filter:blur(10px);clip-path:url(#b);height:100%;width:100%"/></foreignObject><path data-figma-bg-blur-radius="20" fill-rule="evenodd" clip-rule="evenodd" d="M541.484 880.466c0-17.416-14.119-31.534-31.534-31.534-17.416 0-31.534 14.118-31.534 31.534 0 17.415 14.118 31.534 31.534 31.534 17.415 0 31.534-14.119 31.534-31.534zm-340.416-576.09c0-17.415-14.118-31.534-31.534-31.534-17.416 0-31.534 14.119-31.534 31.534 0 17.416 14.118 31.534 31.534 31.534 17.416 0 31.534-14.118 31.534-31.534zm653.041-31.534c17.416 0 31.534 14.119 31.534 31.534 0 17.416-14.118 31.534-31.534 31.534-17.416 0-31.534-14.118-31.534-31.534 0-17.415 14.118-31.534 31.534-31.534zm-473.483 122.92c0-26.858-21.773-48.631-48.631-48.631-26.859 0-48.632 21.773-48.632 48.631 0 26.859 21.773 48.632 48.632 48.632 26.858 0 48.631-21.773 48.631-48.632zm314.236-48.631c26.858 0 48.631 21.773 48.631 48.631 0 26.859-21.773 48.632-48.631 48.632-26.859 0-48.632-21.773-48.632-48.632 0-26.858 21.773-48.631 48.632-48.631zm-182.77 438.221c26.858 0 48.631-21.774 48.631-48.632 0-26.858-21.773-48.631-48.631-48.631-26.859 0-48.632 21.773-48.632 48.631s21.773 48.632 48.632 48.632z" fill="#fff" fill-opacity=".56"/><defs><linearGradient id="a" x1="956" y1="962" x2="70" y2="65.5" gradientUnits="userSpaceOnUse"><stop stop-color="#060E13"/><stop offset="1" stop-color="#313434"/></linearGradient><clipPath id="b" transform="translate(-118 -252.842)"><path fill-rule="evenodd" clip-rule="evenodd" d="M541.484 880.466c0-17.416-14.119-31.534-31.534-31.534-17.416 0-31.534 14.118-31.534 31.534 0 17.415 14.118 31.534 31.534 31.534 17.415 0 31.534-14.119 31.534-31.534zm-340.416-576.09c0-17.415-14.118-31.534-31.534-31.534-17.416 0-31.534 14.119-31.534 31.534 0 17.416 14.118 31.534 31.534 31.534 17.416 0 31.534-14.118 31.534-31.534zm653.041-31.534c17.416 0 31.534 14.119 31.534 31.534 0 17.416-14.118 31.534-31.534 31.534-17.416 0-31.534-14.118-31.534-31.534 0-17.415 14.118-31.534 31.534-31.534zm-473.483 122.92c0-26.858-21.773-48.631-48.631-48.631-26.859 0-48.632 21.773-48.632 48.631 0 26.859 21.773 48.632 48.632 48.632 26.858 0 48.631-21.773 48.631-48.632zm314.236-48.631c26.858 0 48.631 21.773 48.631 48.631 0 26.859-21.773 48.632-48.631 48.632-26.859 0-48.632-21.773-48.632-48.632 0-26.858 21.773-48.631 48.632-48.631zm-182.77 438.221c26.858 0 48.631-21.774 48.631-48.632 0-26.858-21.773-48.631-48.631-48.631-26.859 0-48.632 21.773-48.632 48.631s21.773 48.632 48.632 48.632z"/></clipPath></defs></svg>
@@ -1 +0,0 @@
1
- <svg width="68" height="68" viewBox="0 0 68 68" fill="none" xmlns="http://www.w3.org/2000/svg"><mask id="c" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="4" y="3" width="59" height="62"><path d="M33.974 4.067 33.858 4l-.117.067-17.174 9.916-.117.068v13.187L5.117 33.78 5 33.848V53.95l.117.067 17.174 9.916.117.067.117-.067 11.303-6.527.03.017.03-.017 11.303 6.527.117.067.116-.067L62.6 54.017l.117-.068v-20.1l-.117-.067-11.333-6.543V14.05l-.117-.068-17.175-9.916zm15.037 11.286V25.97l-15.037-8.681-.116-.068-.117.067-15.036 8.682V15.353l15.153-8.749 15.153 8.749zm-3.703 46.043-9.166-5.292L51.15 47.44l.117-.067V29.842l9.195 5.309v17.496l-15.153 8.749zM16.566 47.44l15.007 8.664-9.165 5.292-15.153-8.749V35.151l9.195-5.309v17.531l.116.067zM32.73 35.37l-12.897-7.447 12.897-7.447V35.37zm-14.025 9.399V29.876l12.898 7.446-12.898 7.447zm16.28 9.4V39.274l12.898 7.447-12.898 7.446zm14.026-24.293v14.893l-12.898-7.447 12.898-7.446zm-16.28 9.4v14.892l-12.898-7.446 12.897-7.447zm2.254-3.907V20.476l12.898 7.447-12.898 7.446z" fill="url(#a)" stroke="url(#b)" stroke-width=".5"/></mask><g mask="url(#c)"><path d="M68 0H0v68h68V0z" fill="url(#d)"/></g><defs><linearGradient id="a" x1="36.103" y1="-30.336" x2="-29.543" y2="21.525" gradientUnits="userSpaceOnUse"><stop stop-color="#4EF1BA"/><stop offset=".502" stop-color="#16CED1"/><stop offset="1" stop-color="#3773F2"/></linearGradient><linearGradient id="b" x1="37.6" y1="-67.429" x2="-62.714" y2="20.675" gradientUnits="userSpaceOnUse"><stop stop-color="#4EF1BA"/><stop offset=".502" stop-color="#16CED1"/><stop offset="1" stop-color="#3773F2"/></linearGradient><linearGradient id="d" x1="38.445" y1="-81.994" x2="-76.754" y2="23.094" gradientUnits="userSpaceOnUse"><stop stop-color="#4EF1BA"/><stop offset=".502" stop-color="#16CED1"/><stop offset="1" stop-color="#3773F2"/></linearGradient></defs></svg>
@@ -1 +0,0 @@
1
- <svg width="40" height="39" viewBox="0 0 40 39" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m10.247 20.67-3.824-1.655c-.548-.22-.87-.62-.966-1.2-.096-.58.061-1.076.472-1.49l5.182-5.214a3.29 3.29 0 0 1 1.357-.828 3.156 3.156 0 0 1 1.604-.083l2.138.455c-1.453 1.739-2.611 3.318-3.475 4.74-.863 1.42-1.693 3.179-2.488 5.276zm24.18-16.14c.219 0 .438.055.658.166a2.174 2.174 0 0 1 .987.993c.11.22.164.441.164.662.11 2.566-.432 5.229-1.624 7.988-1.193 2.759-2.872 5.228-5.038 7.408-1.48 1.49-2.905 2.683-4.276 3.58-1.37.897-2.988 1.745-4.853 2.545-.356.138-.72.207-1.09.207-.37 0-.692-.138-.966-.414l-5.14-5.173a1.336 1.336 0 0 1-.411-.973c0-.372.068-.738.206-1.096.795-1.849 1.637-3.47 2.528-4.863.892-1.394 2.077-2.835 3.558-4.325 2.165-2.18 4.619-3.87 7.36-5.07 2.742-1.2 5.387-1.745 7.937-1.635zM23.982 16.863c.63.635 1.405.952 2.323.952.919 0 1.693-.317 2.324-.952.63-.634.945-1.414.945-2.338 0-.924-.315-1.704-.945-2.338-.63-.635-1.405-.952-2.324-.952-.918 0-1.693.317-2.323.952-.63.634-.946 1.414-.946 2.338 0 .924.315 1.704.946 2.338zm-3.783 13.824c2.083-.8 3.838-1.635 5.263-2.504 1.426-.87 3.002-2.035 4.73-3.497l.41 2.152c.11.552.083 1.096-.082 1.634-.164.538-.438 1-.822 1.387l-5.182 5.215c-.41.413-.904.565-1.48.455-.576-.11-.973-.442-1.193-.993l-1.644-3.85zm-13.365-3.56c.955-.965 2.121-1.455 3.499-1.469 1.378-.014 2.544.462 3.499 1.428.955.966 1.432 2.138 1.432 3.518s-.48 2.552-1.44 3.518c-.685.69-1.83 1.283-3.433 1.78-1.604.496-3.817.938-6.641 1.324.384-2.842.822-5.065 1.316-6.667.493-1.603 1.083-2.747 1.768-3.432z" fill="url(#a)"/><defs><linearGradient id="a" x1="34.187" y1="7.487" x2="7.292" y2="34.082" gradientUnits="userSpaceOnUse"><stop stop-color="#74D5D6"/><stop offset="1" stop-color="#56AFBE"/></linearGradient></defs></svg>
@@ -1 +0,0 @@
1
- <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#a)"><mask id="b" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="40" height="40"><path d="M40 0H0v40h40V0z" fill="#D9D9D9"/></mask><g mask="url(#b)"><path d="M11.917 8.278c-.733 0-1.356.256-1.87.77a2.545 2.545 0 0 0-.77 1.869c0 .733.257 1.356.77 1.869.514.513 1.137.77 1.87.77.733 0 1.356-.257 1.869-.77.513-.513.77-1.136.77-1.87 0-.732-.257-1.355-.77-1.869a2.545 2.545 0 0 0-1.87-.77zm0 17.592c-.733 0-1.356.257-1.87.77a2.545 2.545 0 0 0-.77 1.87c0 .732.257 1.355.77 1.868.514.514 1.137.77 1.87.77.733 0 1.356-.256 1.869-.77.513-.513.77-1.136.77-1.869 0-.733-.257-1.356-.77-1.869a2.545 2.545 0 0 0-1.87-.77zM5.759 3h28.148c.499 0 .917.169 1.254.506.337.337.506.755.506 1.253v12.315c0 .498-.169.916-.506 1.254a1.703 1.703 0 0 1-1.254.505H5.76c-.498 0-.916-.168-1.253-.505A1.703 1.703 0 0 1 4 17.074V4.76c0-.498.169-.916.506-1.253A1.702 1.702 0 0 1 5.759 3zm0 17.593h28.148c.499 0 .917.168 1.254.505.337.338.506.756.506 1.254v12.315c0 .498-.169.916-.506 1.253a1.702 1.702 0 0 1-1.254.506H5.76c-.498 0-.916-.169-1.253-.506A1.702 1.702 0 0 1 4 34.667V22.352c0-.498.169-.916.506-1.254a1.702 1.702 0 0 1 1.253-.505z" fill="url(#c)"/></g></g><defs><linearGradient id="c" x1="4" y1="19.713" x2="35.667" y2="19.713" gradientUnits="userSpaceOnUse"><stop stop-color="#2FD99C"/><stop offset="1" stop-color="#8CE598"/></linearGradient><clipPath id="a"><path fill="#fff" d="M0 0h40v40H0z"/></clipPath></defs></svg>