@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.
- package/lib/ActionButton/index.d.ts +1 -1
- package/lib/ActionButton/index.js +9 -9
- package/lib/ActivityIndicator/index.js +6 -7
- package/lib/Address/compact-text.d.ts +1 -1
- package/lib/Address/compact-text.js +6 -7
- package/lib/Address/did-address.js +4 -4
- package/lib/Address/index.js +6 -6
- package/lib/Address/responsive-did-address.js +17 -17
- package/lib/Alert/index.d.ts +1 -1
- package/lib/Alert/index.js +8 -8
- package/lib/AnimationWaiter/index.js +10 -10
- package/lib/Async/index.js +4 -4
- package/lib/Avatar/etherscan-blockies.js +15 -15
- package/lib/Avatar/index.d.ts +1 -1
- package/lib/Avatar/index.js +6 -6
- package/lib/Badge/index.js +5 -5
- package/lib/Blocklet/blocklet.js +10 -10
- package/lib/Blocklet/index.js +6 -5
- package/lib/Blocklet/utils.js +1 -1
- package/lib/BlockletContext/index.d.ts +1 -1
- package/lib/BlockletContext/index.js +1 -1
- package/lib/BlockletNFT/index.js +19 -19
- package/lib/BlockletV2/blocklet.d.ts +1 -1
- package/lib/BlockletV2/blocklet.js +36 -37
- package/lib/BlockletV2/components/icon-text.d.ts +1 -1
- package/lib/BlockletV2/components/icon-text.js +13 -13
- package/lib/BlockletV2/components/tooltip-icon.js +22 -20
- package/lib/BlockletV2/index.js +8 -7
- package/lib/BlockletV2/utils.js +1 -1
- package/lib/Button/index.js +1 -1
- package/lib/Button/wrap.js +3 -3
- package/lib/ButtonGroup/index.js +1 -1
- package/lib/Center/index.js +4 -4
- package/lib/ClickToCopy/copy-button.js +3 -3
- package/lib/ClickToCopy/index.js +5 -5
- package/lib/CloseButton/index.js +2 -2
- package/lib/CodeBlock/index.js +3 -3
- package/lib/Colors/index.js +3 -3
- package/lib/Config/config-provider.js +15 -16
- package/lib/Config/index.js +3 -5
- package/lib/Config/theme-mode-toggle.js +1 -1
- package/lib/ContactForm/index.js +26 -25
- package/lib/CookieConsent/index.js +1 -1
- package/lib/CountDown/index.js +2 -2
- package/lib/DID/index.js +79 -78
- package/lib/DIDConnect/app-icon.js +10 -10
- package/lib/DIDConnect/app-info-item.js +5 -5
- package/lib/DIDConnect/auth-apps/auth-apps-info.js +1 -1
- package/lib/DIDConnect/auth-apps/index.js +56 -56
- package/lib/DIDConnect/did-connect-container.js +35 -36
- package/lib/DIDConnect/did-connect-footer.js +7 -7
- package/lib/DIDConnect/index.js +10 -10
- package/lib/DIDConnect/landing-page.js +45 -46
- package/lib/DIDConnect/powered-by.js +2 -2
- package/lib/DIDConnect/request-storage-access-api-dialog.js +44 -45
- package/lib/DIDConnect/with-container.js +25 -26
- package/lib/DIDConnect/with-ux-theme.js +6 -7
- package/lib/Datatable/CustomToolbar.d.ts +3 -1
- package/lib/Datatable/CustomToolbar.js +13 -13
- package/lib/Datatable/TableSearch.js +2 -2
- package/lib/Datatable/index.js +6 -6
- package/lib/Dialog/confirm.d.ts +1 -1
- package/lib/Dialog/confirm.js +20 -20
- package/lib/Dialog/dialog.js +7 -7
- package/lib/Dialog/index.js +3 -3
- package/lib/Dialog/types.d.ts +20 -0
- package/lib/Dialog/use-confirm.js +1 -1
- package/lib/DriftBot/index.js +1 -1
- package/lib/Earth/index.js +10 -10
- package/lib/Empty/index.js +1 -1
- package/lib/ErrorBoundary/fallback.js +15 -15
- package/lib/ErrorBoundary/index.js +1 -6
- package/lib/Footer/index.d.ts +1 -1
- package/lib/Footer/index.js +7 -7
- package/lib/Header/addon-button.d.ts +1 -1
- package/lib/Header/addon-button.js +11 -6
- package/lib/Header/auto-hidden.js +1 -1
- package/lib/Header/header.js +4 -4
- package/lib/Header/index.js +3 -3
- package/lib/Header/responsive-header.d.ts +1 -1
- package/lib/Header/responsive-header.js +33 -34
- package/lib/Icon/image.js +2 -2
- package/lib/Icon/index.js +12 -12
- package/lib/Img/index.js +1 -1
- package/lib/InfoRow/index.d.ts +1 -1
- package/lib/InfoRow/index.js +1 -2
- package/lib/Layout/dashboard/external-link.d.ts +1 -1
- package/lib/Layout/dashboard/external-link.js +1 -1
- package/lib/Layout/dashboard/full-page.js +8 -8
- package/lib/Layout/dashboard/index.js +30 -32
- package/lib/Layout/dashboard/sidebar.js +3 -3
- package/lib/Layout/dashboard-legacy/header.js +12 -12
- package/lib/Layout/dashboard-legacy/index.js +20 -20
- package/lib/Layout/dashboard-legacy/sidebar.d.ts +1 -1
- package/lib/Layout/dashboard-legacy/sidebar.js +20 -13
- package/lib/Layout/index.js +7 -7
- package/lib/LoadingMask/index.d.ts +1 -1
- package/lib/LoadingMask/index.js +4 -4
- package/lib/Locale/context.js +27 -27
- package/lib/Locale/selector.d.ts +1 -1
- package/lib/Locale/selector.js +4 -4
- package/lib/Logo/index.js +19 -19
- package/lib/Metric/index.js +2 -2
- package/lib/NFTDisplay/aspect-ratio-container.d.ts +1 -1
- package/lib/NFTDisplay/aspect-ratio-container.js +1 -1
- package/lib/NFTDisplay/broken.js +2 -2
- package/lib/NFTDisplay/index.js +38 -35
- package/lib/NFTDisplay/loading.js +1 -1
- package/lib/NFTDisplay/render-svg.js +4 -4
- package/lib/NFTDisplay/svg-embedder/img.js +3 -3
- package/lib/NFTDisplay/svg-embedder/inline-svg.js +1 -1
- package/lib/NavMenu/index.js +2 -2
- package/lib/NavMenu/nav-menu.js +46 -44
- package/lib/NavMenu/products.js +33 -33
- package/lib/NavMenu/style.js +1 -1
- package/lib/NavMenu/sub-item-group.js +1 -1
- package/lib/PageScroller/index.js +53 -53
- package/lib/PageScroller/story/FullPage.js +27 -27
- package/lib/PageScroller/story/PageContain.js +8 -8
- package/lib/Passport/index.js +3 -2
- package/lib/Passport/passport.js +2 -2
- package/lib/PhoneInput/country-select.js +24 -24
- package/lib/PhoneInput/index.js +13 -13
- package/lib/PoweredByArcBlock/index.js +10 -6
- package/lib/PricingTable/PricingPlan.js +1 -1
- package/lib/PricingTable/index.js +3 -3
- package/lib/QRCode/index.js +5 -5
- package/lib/RelativeTime/index.js +17 -17
- package/lib/Result/common.js +4 -6
- package/lib/Result/index.js +2 -2
- package/lib/Result/result.js +5 -5
- package/lib/Screenshot/BaseScreenshot/index.js +3 -3
- package/lib/Screenshot/index.d.ts +1 -1
- package/lib/Screenshot/index.js +10 -10
- package/lib/SessionBlocklet/index.js +8 -8
- package/lib/SessionManager/index.js +3 -2
- package/lib/SessionUser/components/did-space.d.ts +1 -1
- package/lib/SessionUser/components/did-space.js +14 -14
- package/lib/SessionUser/components/logged-in.js +33 -33
- package/lib/SessionUser/components/quick-login-item.js +29 -29
- package/lib/SessionUser/components/session-user-item.js +27 -27
- package/lib/SessionUser/components/session-user-switch.js +4 -4
- package/lib/SessionUser/components/un-login.js +7 -7
- package/lib/SessionUser/components/user-info.js +16 -16
- package/lib/SessionUser/index.js +2 -2
- package/lib/SharedBridge/index.js +23 -23
- package/lib/Spinner/index.js +2 -2
- package/lib/SplitButton/index.d.ts +1 -1
- package/lib/SplitButton/index.js +2 -2
- package/lib/Success/index.js +1 -1
- package/lib/Switch/index.js +1 -1
- package/lib/Tabs/index.js +16 -9
- package/lib/Tag/index.d.ts +1 -1
- package/lib/Tag/index.js +7 -7
- package/lib/TextCollapse/index.js +3 -3
- package/lib/Theme/index.js +11 -22
- package/lib/Theme/theme-provider.js +60 -55
- package/lib/Theme/theme.js +5 -4
- package/lib/Toast/index.js +11 -11
- package/lib/Typography/index.js +13 -13
- package/lib/UserCard/Cards/avatar-only.js +2 -2
- package/lib/UserCard/Cards/basic-info.d.ts +1 -1
- package/lib/UserCard/Cards/basic-info.js +4 -4
- package/lib/UserCard/Cards/index.d.ts +1 -1
- package/lib/UserCard/Cards/index.js +4 -4
- package/lib/UserCard/Cards/name-only.js +1 -1
- package/lib/UserCard/Container/card.js +8 -8
- package/lib/UserCard/Container/dialog.js +2 -2
- package/lib/UserCard/Content/basic.js +3 -3
- package/lib/UserCard/Content/clock.js +3 -3
- package/lib/UserCard/Content/minimal.d.ts +1 -1
- package/lib/UserCard/Content/minimal.js +8 -8
- package/lib/UserCard/Content/tooltip-avatar.js +18 -18
- package/lib/UserCard/components.js +23 -23
- package/lib/UserCard/index.js +12 -12
- package/lib/Util/index.js +2 -2
- package/lib/VerificationCode/index.js +2 -2
- package/lib/Video/index.js +2 -2
- package/lib/Wallet/Action.js +4 -4
- package/lib/Wallet/Download.js +6 -6
- package/lib/Wallet/Open.js +1 -1
- package/lib/WalletOSIcon/index.d.ts +2 -2
- package/lib/WalletOSIcon/index.js +8 -3
- package/lib/WebWalletSWKeeper/index.d.ts +3 -1
- package/lib/WebWalletSWKeeper/index.js +6 -3
- package/lib/WechatPrompt/index.js +1 -1
- package/lib/global.d.ts +28 -0
- package/lib/hooks/use-blocklet-logo.js +13 -15
- package/lib/hooks/use-clock.js +1 -1
- package/lib/index.js +74 -79
- package/lib/type.d.ts +44 -0
- package/lib/withTheme/index.d.ts +3 -2
- package/lib/withTheme/index.js +13 -14
- package/lib/withTracker/error_boundary.js +1 -1
- package/package.json +7 -7
- package/src/ActionButton/index.jsx +1 -1
- package/src/Address/compact-text.jsx +1 -1
- package/src/Address/did-address.tsx +1 -1
- package/src/Address/index.tsx +1 -1
- package/src/Address/responsive-did-address.tsx +3 -3
- package/src/Alert/index.jsx +1 -1
- package/src/Avatar/index.jsx +1 -1
- package/src/Badge/index.jsx +1 -1
- package/src/BlockletContext/index.tsx +1 -1
- package/src/BlockletNFT/index.jsx +1 -1
- package/src/BlockletV2/blocklet.tsx +1 -1
- package/src/BlockletV2/components/icon-text.tsx +4 -4
- package/src/BlockletV2/components/tooltip-icon.tsx +5 -3
- package/src/Button/wrap.jsx +1 -1
- package/src/Center/index.tsx +1 -1
- package/src/ClickToCopy/copy-button.tsx +1 -1
- package/src/CloseButton/index.tsx +1 -1
- package/src/ContactForm/index.tsx +9 -2
- package/src/DID/index.tsx +5 -4
- package/src/DIDConnect/app-info-item.tsx +1 -1
- package/src/DIDConnect/auth-apps/index.tsx +8 -8
- package/src/DIDConnect/did-connect-container.tsx +2 -2
- package/src/DIDConnect/did-connect-footer.tsx +1 -1
- package/src/DIDConnect/landing-page.tsx +6 -6
- package/src/DIDConnect/request-storage-access-api-dialog.tsx +1 -2
- package/src/Datatable/CustomToolbar.jsx +1 -1
- package/src/Datatable/index.jsx +2 -2
- package/src/Dialog/confirm.jsx +1 -1
- package/src/Earth/index.tsx +1 -1
- package/src/Footer/index.tsx +5 -2
- package/src/Header/addon-button.tsx +7 -2
- package/src/Header/header.tsx +1 -1
- package/src/Header/responsive-header.tsx +1 -2
- package/src/Icon/index.tsx +1 -1
- package/src/InfoRow/index.tsx +1 -2
- package/src/Layout/dashboard/external-link.tsx +1 -1
- package/src/Layout/dashboard/full-page.tsx +1 -1
- package/src/Layout/dashboard/index.tsx +1 -1
- package/src/Layout/dashboard/sidebar.tsx +5 -2
- package/src/Layout/dashboard-legacy/header.tsx +5 -5
- package/src/Layout/dashboard-legacy/index.tsx +3 -3
- package/src/Layout/dashboard-legacy/sidebar.tsx +10 -2
- package/src/Layout/index.tsx +2 -2
- package/src/LoadingMask/index.tsx +5 -5
- package/src/Locale/context.tsx +3 -3
- package/src/Locale/selector.tsx +1 -1
- package/src/Logo/index.tsx +1 -1
- package/src/NFTDisplay/aspect-ratio-container.tsx +1 -1
- package/src/NFTDisplay/index.tsx +2 -1
- package/src/NFTDisplay/render-svg.tsx +1 -1
- package/src/NavMenu/nav-menu.tsx +8 -5
- package/src/NavMenu/products.tsx +3 -1
- package/src/PageScroller/index.tsx +4 -4
- package/src/PhoneInput/country-select.tsx +3 -3
- package/src/PhoneInput/index.tsx +1 -1
- package/src/PoweredByArcBlock/index.tsx +5 -1
- package/src/QRCode/index.tsx +1 -1
- package/src/RelativeTime/index.tsx +3 -3
- package/src/Result/result.tsx +1 -1
- package/src/Screenshot/index.tsx +2 -2
- package/src/SessionUser/components/did-space.tsx +1 -1
- package/src/SessionUser/components/session-user-item.tsx +1 -1
- package/src/SharedBridge/index.tsx +2 -2
- package/src/Spinner/index.tsx +1 -1
- package/src/SplitButton/index.tsx +1 -1
- package/src/Success/index.tsx +1 -1
- package/src/Tabs/index.tsx +10 -3
- package/src/Tag/index.jsx +1 -1
- package/src/TextCollapse/index.tsx +1 -1
- package/src/Theme/theme-provider.tsx +11 -6
- package/src/Theme/theme.ts +5 -0
- package/src/Typography/index.tsx +1 -1
- package/src/UserCard/Cards/basic-info.tsx +1 -1
- package/src/UserCard/Cards/index.tsx +1 -1
- package/src/UserCard/Container/card.tsx +2 -2
- package/src/UserCard/Container/dialog.tsx +1 -1
- package/src/UserCard/Content/basic.tsx +2 -2
- package/src/UserCard/Content/minimal.tsx +1 -1
- package/src/UserCard/Content/tooltip-avatar.tsx +4 -4
- package/src/VerificationCode/index.tsx +1 -1
- package/src/WalletOSIcon/index.tsx +7 -2
- package/src/WebWalletSWKeeper/index.tsx +6 -1
- package/src/withTheme/index.tsx +7 -3
- package/vite.config.mjs +5 -2
- package/lib/ActionButton/ActionButton.stories.d.ts +0 -18
- package/lib/ActivityIndicator/ActivityIndicator.stories.d.ts +0 -8
- package/lib/Address/Address.stories.d.ts +0 -16
- package/lib/Alert/Alert.stories.d.ts +0 -28
- package/lib/AnimationWaiter/AnimationWaiter.stories.d.ts +0 -21
- package/lib/AnimationWaiter/dark-animation.json.js +0 -27
- package/lib/AnimationWaiter/default-animation.json.js +0 -29
- package/lib/Avatar/Avatar.stories.d.ts +0 -11
- package/lib/Badge/Badge.stories.d.ts +0 -13
- package/lib/Blocklet/Blocklet.stories.d.ts +0 -17
- package/lib/BlockletNFT/BlockletNFT.stories.d.ts +0 -17
- package/lib/BlockletV2/Blocklet.stories.d.ts +0 -18
- package/lib/Button/Button.stories.d.ts +0 -19
- package/lib/Center/Center.stories.d.ts +0 -18
- package/lib/ClickToCopy/ClickToCopy.stories.d.ts +0 -16
- package/lib/CodeBlock/CodeBlock.stories.d.ts +0 -20
- package/lib/Colors/Colors.stories.d.ts +0 -34
- package/lib/Config/Config.stories.d.ts +0 -14
- package/lib/ContactForm/ContactForm.stories.d.ts +0 -23
- package/lib/CookieConsent/CookieConsent.stories.d.ts +0 -18
- package/lib/CountDown/CountDown.stories.d.ts +0 -14
- package/lib/DID/DID.stories.d.ts +0 -15
- package/lib/Datatable/Datatable.stories.d.ts +0 -32
- package/lib/Dialog/Dialog.stories.d.ts +0 -20
- package/lib/DidLogo/Logo.stories.d.ts +0 -8
- package/lib/Earth/Earth.stories.d.ts +0 -18
- package/lib/Earth/countries.json.js +0 -13
- package/lib/Empty/Empty.stories.d.ts +0 -17
- package/lib/ErrorBoundary/ErrorBoundary.stories.d.ts +0 -12
- package/lib/Footer/Footer.stories.d.ts +0 -12
- package/lib/Header/Header.stories.d.ts +0 -21
- package/lib/Icon/Icon.stories.d.ts +0 -23
- package/lib/Img/Img.stories.d.ts +0 -13
- package/lib/InfoRow/InfoRow.stories.d.ts +0 -14
- package/lib/Layout/Layout.stories.d.ts +0 -23
- package/lib/Locale/LocaleSelector.stories.d.ts +0 -22
- package/lib/Logo/Logo.stories.d.ts +0 -22
- package/lib/Logo/images/logo-dark-text.svg.js +0 -5
- package/lib/Logo/images/logo-dark-top.svg.js +0 -5
- package/lib/Logo/images/logo-light-text.svg.js +0 -5
- package/lib/Logo/images/logo-light-top.svg.js +0 -5
- package/lib/Metric/Metric.stories.d.ts +0 -14
- package/lib/NFTDisplay/NFTBroken.svg.js +0 -108
- package/lib/NFTDisplay/NFTDisplay.stories.d.ts +0 -15
- package/lib/NavMenu/NavMenu.stories.d.ts +0 -17
- package/lib/NavMenu/images/OCAP.svg.js +0 -5
- package/lib/NavMenu/images/abt-network.svg.js +0 -7
- package/lib/NavMenu/images/ai-kit.svg.js +0 -7
- package/lib/NavMenu/images/aigne.svg.js +0 -7
- package/lib/NavMenu/images/aistro.svg.js +0 -5
- package/lib/NavMenu/images/arcsphere.svg.js +0 -10
- package/lib/NavMenu/images/blocklet-framework.svg.js +0 -7
- package/lib/NavMenu/images/blocklet-launcher.svg.js +0 -5
- package/lib/NavMenu/images/blocklet-server.svg.js +0 -7
- package/lib/NavMenu/images/blocklet-store.svg.js +0 -5
- package/lib/NavMenu/images/creator-studio.svg.js +0 -7
- package/lib/NavMenu/images/did-connect.svg.js +0 -5
- package/lib/NavMenu/images/did-name-service.svg.js +0 -5
- package/lib/NavMenu/images/did-wallet.svg.js +0 -7
- package/lib/NavMenu/images/did.svg.js +0 -5
- package/lib/NavMenu/images/nft-studio.svg.js +0 -5
- package/lib/NavMenu/images/vc.svg.js +0 -5
- package/lib/NavMenu/images/web3-kit.svg.js +0 -7
- package/lib/PageScroller/story/PageScroller.stories.d.ts +0 -13
- package/lib/PhoneInput/PhoneInput.stories.d.ts +0 -12
- package/lib/PricingTable/PricingTable.stories.d.ts +0 -8
- package/lib/QRCode/QRCode.stories.d.ts +0 -13
- package/lib/RelativeTime/RelativeTime.stories.d.ts +0 -20
- package/lib/Result/Result.stories.d.ts +0 -21
- package/lib/Screenshot/Screenshot.stories.d.ts +0 -13
- package/lib/SessionManager/SessionManager.stories.d.ts +0 -9
- package/lib/SessionUser/images/did-spaces.svg.js +0 -5
- package/lib/Sparkline/Sparkline.stories.d.ts +0 -12
- package/lib/Spinner/Spinner.stories.d.ts +0 -18
- package/lib/SplitButton/SplitButton.stories.d.ts +0 -15
- package/lib/Switch/Switch.stories.d.ts +0 -13
- package/lib/Tabs/Tabs.stories.d.ts +0 -14
- package/lib/Tag/Tag.stories.d.ts +0 -13
- package/lib/TextCollapse/TextCollapse.stories.d.ts +0 -28
- package/lib/Theme/Theme.stories.d.ts +0 -10
- package/lib/Toast/Toast.stories.d.ts +0 -15
- package/lib/UserCard/UserCard.stories.d.ts +0 -18
- package/lib/Util/WebWalletOpener.stories.d.ts +0 -5
- package/lib/Video/Video.stories.d.ts +0 -6
- package/lib/Wallet/Action.stories.d.ts +0 -8
- package/lib/Wallet/Download.stories.d.ts +0 -9
- package/lib/Wallet/OpenInWallet.stories.d.ts +0 -5
- package/lib/Wallet/images/android_download.svg.js +0 -5
- package/lib/Wallet/images/app-store.svg.js +0 -5
- package/lib/Wallet/images/google-play.svg.js +0 -5
- package/lib/ux.css +0 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
2
|
-
import { styled as e } from "../Theme
|
2
|
+
import { styled as e } from "../Theme";
|
3
3
|
function p({ aspect: t, children: i, ...n }) {
|
4
4
|
return /* @__PURE__ */ o(a, { aspect: t, ...n, children: /* @__PURE__ */ o("span", { className: "aspect-ratio-container__inner", children: i }) });
|
5
5
|
}
|
package/lib/NFTDisplay/broken.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
2
2
|
import { Box as o } from "@mui/material";
|
3
|
-
import { styled as i } from "../Theme
|
4
|
-
import r from "./NFTBroken.svg
|
3
|
+
import { styled as i } from "../Theme";
|
4
|
+
import r from "./NFTBroken.svg";
|
5
5
|
function c({ children: t = "Non-publicly accessible NFT" } = {}) {
|
6
6
|
return /* @__PURE__ */ n(s, { children: [
|
7
7
|
/* @__PURE__ */ e(r, { className: "nft-display-broken-background" }),
|
package/lib/NFTDisplay/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as n, jsxs as H, Fragment as J } from "react/jsx-runtime";
|
2
|
-
import { useRef as M, useState as
|
3
|
-
import
|
2
|
+
import { useRef as M, useState as A, useEffect as P } from "react";
|
3
|
+
import $ from "clsx";
|
4
4
|
import { Buffer as O } from "buffer";
|
5
5
|
import K from "lodash/get";
|
6
6
|
import Q from "pako";
|
@@ -8,15 +8,15 @@ import X from "base64-url";
|
|
8
8
|
import B from "is-svg";
|
9
9
|
import Y from "lodash/noop";
|
10
10
|
import { Box as Z } from "@mui/material";
|
11
|
-
import rr from "./aspect-ratio-container
|
12
|
-
import er from "./svg-embedder/img
|
13
|
-
import tr from "./svg-embedder/inline-svg
|
14
|
-
import or from "./loading
|
15
|
-
import C from "./broken
|
16
|
-
import { styled as nr } from "../Theme
|
17
|
-
import ir from "./displayApi
|
18
|
-
import sr from "./render-svg
|
19
|
-
function
|
11
|
+
import rr from "./aspect-ratio-container";
|
12
|
+
import er from "./svg-embedder/img";
|
13
|
+
import tr from "./svg-embedder/inline-svg";
|
14
|
+
import or from "./loading";
|
15
|
+
import C from "./broken";
|
16
|
+
import { styled as nr } from "../Theme";
|
17
|
+
import ir from "./displayApi";
|
18
|
+
import sr from "./render-svg";
|
19
|
+
function Dr(e) {
|
20
20
|
var s;
|
21
21
|
return (e == null ? void 0 : e.display) || ((s = e == null ? void 0 : e.data) == null ? void 0 : s.value);
|
22
22
|
}
|
@@ -34,9 +34,9 @@ function lr({
|
|
34
34
|
address: s,
|
35
35
|
inset: m,
|
36
36
|
aspect: g,
|
37
|
-
component:
|
37
|
+
component: b = "span",
|
38
38
|
className: z = "",
|
39
|
-
renderError:
|
39
|
+
renderError: T,
|
40
40
|
renderLoading: j,
|
41
41
|
preferredSvgEmbedder: E = "img",
|
42
42
|
checkSvg: x = !1,
|
@@ -45,21 +45,24 @@ function lr({
|
|
45
45
|
imageFilter: I = null,
|
46
46
|
...k
|
47
47
|
}) {
|
48
|
-
var
|
49
|
-
const
|
48
|
+
var F;
|
49
|
+
const R = (l) => (
|
50
|
+
// @ts-expect-error
|
51
|
+
/* @__PURE__ */ n(cr, { component: b, ...k, className: $(z, { "nft-display--inset": m }), children: l })
|
52
|
+
), a = M({});
|
50
53
|
try {
|
51
54
|
typeof e == "string" ? a.current = JSON.parse(e) : a.current = e;
|
52
|
-
const { vcId: l } = a.current, U = a.current.credentialSubject ? K(a.current, "credentialSubject.display") : a.current, { content: f, type: y } = U, G = y === "url", [t, c] =
|
55
|
+
const { vcId: l } = a.current, U = a.current.credentialSubject ? K(a.current, "credentialSubject.display") : a.current, { content: f, type: y } = U, G = y === "url", [t, c] = A({
|
53
56
|
loading: G,
|
54
57
|
error: !1,
|
55
58
|
loadingUrlType: !0,
|
56
59
|
urlType: null
|
57
|
-
}), [w,
|
60
|
+
}), [w, S] = A(h <= 0), d = ({ useImageFilter: o = !1, t: i } = {}) => {
|
58
61
|
const r = new URL(f);
|
59
62
|
return window.location.protocol === "https:" && r.protocol === "http:" && (r.protocol = "https:"), r.searchParams.has("assetId") || r.searchParams.append("assetId", s), !r.searchParams.has("vcId") && l && r.searchParams.append("vcId", l), o && I && Object.entries(I).forEach(([p, u]) => {
|
60
63
|
r.searchParams.append(p, u);
|
61
64
|
}), i && r.searchParams.append("t", i), r.href;
|
62
|
-
},
|
65
|
+
}, V = async () => {
|
63
66
|
var o, i;
|
64
67
|
try {
|
65
68
|
const r = await ir({
|
@@ -75,21 +78,21 @@ function lr({
|
|
75
78
|
c({ ...t, loadingUrlType: !1, urlType: null });
|
76
79
|
}
|
77
80
|
};
|
78
|
-
if (
|
81
|
+
if (P(() => {
|
79
82
|
let o;
|
80
|
-
return h > 0 && (o = setTimeout(() =>
|
81
|
-
}, []),
|
83
|
+
return h > 0 && (o = setTimeout(() => S(!0), h)), y === "url" && V(), () => clearTimeout(o);
|
84
|
+
}, []), P(() => {
|
82
85
|
(!t.loading && w || t.error) && W();
|
83
86
|
}, [t, w]), t.error)
|
84
87
|
throw new Error("Failed to render NFT Display.");
|
85
88
|
const v = () => {
|
86
89
|
t.loading && c({ ...t, loading: !1 });
|
87
|
-
}, N = () => {
|
88
|
-
c({ ...t, error: !0, loading: !1 });
|
89
90
|
}, D = () => {
|
91
|
+
c({ ...t, error: !0, loading: !1 });
|
92
|
+
}, N = () => {
|
90
93
|
const o = d({ useImageFilter: !0 });
|
91
|
-
return /* @__PURE__ */ n("img", { src: o, onError:
|
92
|
-
},
|
94
|
+
return /* @__PURE__ */ n("img", { src: o, onError: D, onLoad: v, alt: "NFT Display", style: { width: "auto", height: "auto" } });
|
95
|
+
}, _ = () => {
|
93
96
|
const o = t.urlType || "image/svg+xml", i = d(), r = new URL(i).pathname.toLowerCase();
|
94
97
|
return [
|
95
98
|
".jpg",
|
@@ -106,14 +109,14 @@ function lr({
|
|
106
109
|
".pjpeg",
|
107
110
|
".pjp",
|
108
111
|
".avif"
|
109
|
-
].some((u) => r.endsWith(u)) ?
|
112
|
+
].some((u) => r.endsWith(u)) ? N() : o.includes("text/html;") ? /* @__PURE__ */ n(C, {}) : (
|
110
113
|
// eslint-disable-next-line jsx-a11y/alt-text
|
111
114
|
/* @__PURE__ */ n(
|
112
115
|
"object",
|
113
116
|
{
|
114
117
|
type: o,
|
115
118
|
data: i,
|
116
|
-
onErrorCapture:
|
119
|
+
onErrorCapture: D,
|
117
120
|
onLoad: v,
|
118
121
|
style: { width: "100%", height: "100%", pointerEvents: "none" }
|
119
122
|
},
|
@@ -125,7 +128,7 @@ function lr({
|
|
125
128
|
if (f)
|
126
129
|
switch (y) {
|
127
130
|
case "url":
|
128
|
-
return t.loadingUrlType ? null : (o = t.urlType) != null && o.startsWith("image/svg+xml") ? /* @__PURE__ */ n(sr, { src: d(), onLoad: v }) : (i = t.urlType) != null && i.startsWith("image") ?
|
131
|
+
return t.loadingUrlType ? null : (o = t.urlType) != null && o.startsWith("image/svg+xml") ? /* @__PURE__ */ n(sr, { src: d(), onLoad: v }) : (i = t.urlType) != null && i.startsWith("image") ? N() : _();
|
129
132
|
case "uri":
|
130
133
|
return /* @__PURE__ */ n(
|
131
134
|
"img",
|
@@ -156,7 +159,7 @@ function lr({
|
|
156
159
|
}
|
157
160
|
throw new Error(`unsupported display protocol: ${U.type}`);
|
158
161
|
};
|
159
|
-
return
|
162
|
+
return R(
|
160
163
|
/* @__PURE__ */ H(J, { children: [
|
161
164
|
(t.loading || !w) && (j ? j() : /* @__PURE__ */ n(or, {})),
|
162
165
|
q()
|
@@ -165,8 +168,8 @@ function lr({
|
|
165
168
|
} catch (l) {
|
166
169
|
return console.error(l == null ? void 0 : l.message, {
|
167
170
|
nftId: s,
|
168
|
-
vcId: (
|
169
|
-
}),
|
171
|
+
vcId: (F = a == null ? void 0 : a.current) == null ? void 0 : F.vcId
|
172
|
+
}), R(T ? T() : /* @__PURE__ */ n(C, {}));
|
170
173
|
}
|
171
174
|
}
|
172
175
|
const cr = nr(Z)`
|
@@ -198,12 +201,12 @@ const cr = nr(Z)`
|
|
198
201
|
}
|
199
202
|
`;
|
200
203
|
function pr(e) {
|
201
|
-
return function({ aspect: s, inset: m, ...g }) {
|
204
|
+
return function({ aspect: s = void 0, inset: m = !1, ...g }) {
|
202
205
|
return s && s > 0 && !m ? /* @__PURE__ */ n(rr, { aspect: s, children: /* @__PURE__ */ n(e, { inset: !0, ...g }) }) : /* @__PURE__ */ n(e, { inset: m, ...g });
|
203
206
|
};
|
204
207
|
}
|
205
|
-
const
|
208
|
+
const Nr = pr(lr);
|
206
209
|
export {
|
207
|
-
|
208
|
-
|
210
|
+
Nr as default,
|
211
|
+
Dr as getNFTData
|
209
212
|
};
|
@@ -3,12 +3,12 @@ import m from "dompurify";
|
|
3
3
|
import { useAsyncEffect as f } from "ahooks";
|
4
4
|
import c from "axios";
|
5
5
|
import { useState as p } from "react";
|
6
|
-
import a from "./svg-embedder/inline-svg
|
7
|
-
function y({ src: e, onLoad: t }) {
|
6
|
+
import a from "./svg-embedder/inline-svg";
|
7
|
+
function y({ src: e, onLoad: t = void 0 }) {
|
8
8
|
const [r, s] = p("");
|
9
9
|
return f(async () => {
|
10
|
-
const
|
11
|
-
s(
|
10
|
+
const i = await c.get(e), n = m.sanitize(i.data);
|
11
|
+
s(n), t == null || t();
|
12
12
|
}, []), /* @__PURE__ */ o(a, { svg: r });
|
13
13
|
}
|
14
14
|
export {
|
@@ -1,15 +1,15 @@
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
2
|
-
import c from "./inline-svg
|
2
|
+
import c from "./inline-svg";
|
3
3
|
const i = (e) => {
|
4
4
|
const r = new Blob([e], { type: "image/svg+xml" });
|
5
5
|
return URL.createObjectURL(r);
|
6
6
|
};
|
7
|
-
function
|
7
|
+
function f({ svg: e, alt: r = "", fallback: n = !0, ...m }) {
|
8
8
|
if (n && e.indexOf("</foreignObject>") > -1)
|
9
9
|
return /* @__PURE__ */ o(c, { svg: e });
|
10
10
|
const t = i(e);
|
11
11
|
return /* @__PURE__ */ o("img", { src: t, onLoad: () => URL.revokeObjectURL(t), alt: r, ...m });
|
12
12
|
}
|
13
13
|
export {
|
14
|
-
|
14
|
+
f as default
|
15
15
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
2
2
|
import r from "react-shadow/emotion";
|
3
|
-
import { styled as o } from "../../Theme
|
3
|
+
import { styled as o } from "../../Theme";
|
4
4
|
function l({ svg: i, ...n }) {
|
5
5
|
return /* @__PURE__ */ t(e, { ...n, children: /* @__PURE__ */ t(d, { dangerouslySetInnerHTML: { __html: i } }) });
|
6
6
|
}
|
package/lib/NavMenu/index.js
CHANGED
package/lib/NavMenu/nav-menu.js
CHANGED
@@ -1,15 +1,14 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import {
|
1
|
+
import { jsxs as M, jsx as o } from "react/jsx-runtime";
|
2
|
+
import { useEffect as j, useRef as T, useLayoutEffect as ne, Children as V, isValidElement as te, cloneElement as re } from "react";
|
3
|
+
import { ClickAwayListener as oe } from "@mui/material";
|
4
4
|
import F from "clsx";
|
5
|
-
import {
|
6
|
-
import { useCreation as L, useReactive as
|
7
|
-
import
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import { SubContainer as
|
11
|
-
import "../Theme
|
12
|
-
import "../Theme/theme-provider.js";
|
5
|
+
import { ArrowForward as ae, ExpandMore as ie, Menu as le, MoreHoriz as se } from "@mui/icons-material";
|
6
|
+
import { useCreation as L, useReactive as ue, useMemoizedFn as A, useSize as ce, useThrottleFn as de } from "ahooks";
|
7
|
+
import me from "lodash/noop";
|
8
|
+
import { useNavMenuContext as B, NavMenuProvider as fe } from "./nav-menu-context";
|
9
|
+
import { NavMenuItem as ve, NavMenuSub as pe, NavMenuSubList as he, NavMenuStyled as Ce, NavMenuRoot as Ne } from "./style";
|
10
|
+
import { SubContainer as _e } from "./sub-container";
|
11
|
+
import { useTheme as be } from "../Theme";
|
13
12
|
function D(n) {
|
14
13
|
return n ? V.toArray(n).filter((a) => te(a) ? a.type === k || a.type === E : !1) : null;
|
15
14
|
}
|
@@ -21,17 +20,20 @@ function J({
|
|
21
20
|
mode: a = "horizontal",
|
22
21
|
children: C = null,
|
23
22
|
activeId: m = null,
|
23
|
+
// eslint-disable-next-line react/require-default-props
|
24
24
|
textColor: y,
|
25
|
+
// eslint-disable-next-line react/require-default-props
|
25
26
|
activeTextColor: g,
|
27
|
+
// eslint-disable-next-line react/require-default-props
|
26
28
|
bgColor: I,
|
27
|
-
onSelected: s,
|
29
|
+
onSelected: s = void 0,
|
28
30
|
...f
|
29
31
|
}) {
|
30
32
|
var O;
|
31
|
-
const r =
|
33
|
+
const r = be(), u = L(() => r.palette.text.secondary, [r]), v = L(() => r.palette.text.primary, [r]), i = L(() => r.palette.background.default, [r]), c = D(C);
|
32
34
|
if (!(n != null && n.length) && !(c != null && c.length))
|
33
35
|
throw new Error("One of 'items' or 'children' is required by NavMenu component.");
|
34
|
-
const t =
|
36
|
+
const t = ue({
|
35
37
|
activeId: m,
|
36
38
|
openedIds: [],
|
37
39
|
hiddenItemCount: 0
|
@@ -40,13 +42,13 @@ function J({
|
|
40
42
|
}), _ = A((e) => {
|
41
43
|
t.openedIds.push(e);
|
42
44
|
}), W = A((e) => {
|
43
|
-
t.openedIds = t.openedIds.filter((
|
45
|
+
t.openedIds = t.openedIds.filter((l) => l !== e);
|
44
46
|
}), z = L(() => ({
|
45
47
|
...t,
|
46
48
|
mode: a,
|
47
49
|
textColor: u,
|
48
50
|
activeTextColor: v,
|
49
|
-
bgColor:
|
51
|
+
bgColor: i,
|
50
52
|
activate: N,
|
51
53
|
open: _,
|
52
54
|
close: W
|
@@ -57,25 +59,25 @@ function J({
|
|
57
59
|
a,
|
58
60
|
u,
|
59
61
|
v,
|
60
|
-
|
62
|
+
i,
|
61
63
|
N,
|
62
64
|
_,
|
63
65
|
W
|
64
|
-
]), $ = T(null), p = T([]), w = T(null), q = T(0), S = t.hiddenItemCount === ((O = p.current) == null ? void 0 : O.length), K = S ? { marginLeft: "0px" } : void 0, Q = L(() => S ? /* @__PURE__ */ o(le, {}) : /* @__PURE__ */ o(
|
66
|
+
]), $ = T(null), p = T([]), w = T(null), q = T(0), S = t.hiddenItemCount === ((O = p.current) == null ? void 0 : O.length), K = S ? { marginLeft: "0px" } : void 0, Q = L(() => S ? /* @__PURE__ */ o(le, {}) : /* @__PURE__ */ o(se, {}), [S]), X = (e) => V.map(e, (l, h) => re(l, {
|
65
67
|
ref: (b) => {
|
66
68
|
p.current[h] = b;
|
67
69
|
}
|
68
|
-
})), x =
|
70
|
+
})), x = ce($.current), { run: R } = de(
|
69
71
|
A(() => {
|
70
|
-
let e = 0,
|
72
|
+
let e = 0, l = 0, h = !1;
|
71
73
|
const b = w.current ? w.current.offsetWidth + parseFloat(window.getComputedStyle(w.current).marginLeft) : 0;
|
72
74
|
p.current.forEach((d, P) => {
|
73
75
|
if (d) {
|
74
76
|
d.style.display = "flex";
|
75
77
|
const ee = P > 0 ? parseFloat(window.getComputedStyle(d).marginLeft) : 0, U = d.offsetWidth + ee;
|
76
|
-
q.current - b >= e + U && !h ? e += U : (d.style.display = "none", h = !0,
|
78
|
+
q.current - b >= e + U && !h ? e += U : (d.style.display = "none", h = !0, l++);
|
77
79
|
}
|
78
|
-
}),
|
80
|
+
}), l !== t.hiddenItemCount && (t.hiddenItemCount = l);
|
79
81
|
}),
|
80
82
|
{ wait: 100 }
|
81
83
|
);
|
@@ -90,7 +92,7 @@ function J({
|
|
90
92
|
}, [a, n]), j(() => {
|
91
93
|
m != null && (t.activeId = m);
|
92
94
|
}, [m]);
|
93
|
-
const Y = F("navmenu", `navmenu--${a}`, f.className), H = (e,
|
95
|
+
const Y = F("navmenu", `navmenu--${a}`, f.className), H = (e, l, h = 0) => {
|
94
96
|
const b = h === 0;
|
95
97
|
return e != null && e.children ? h > 0 ? null : /* @__PURE__ */ o(
|
96
98
|
E,
|
@@ -100,7 +102,7 @@ function J({
|
|
100
102
|
label: e.label,
|
101
103
|
variant: b ? "default" : "panel",
|
102
104
|
ref: b ? (d) => {
|
103
|
-
p.current[
|
105
|
+
p.current[l] = d;
|
104
106
|
} : void 0,
|
105
107
|
children: typeof e.children == "function" ? e.children : e.children.map(
|
106
108
|
(d, P) => H({ ...d, variant: "panel" }, P, h + 1)
|
@@ -117,29 +119,29 @@ function J({
|
|
117
119
|
active: e.active,
|
118
120
|
variant: e.variant,
|
119
121
|
ref: b ? (d) => {
|
120
|
-
p.current[
|
122
|
+
p.current[l] = d;
|
121
123
|
} : void 0
|
122
124
|
},
|
123
125
|
e.id
|
124
126
|
);
|
125
|
-
}, Z = n ? n == null ? void 0 : n.slice(-t.hiddenItemCount).map((e,
|
126
|
-
return /* @__PURE__ */ o(
|
127
|
-
n ? n.map((e,
|
127
|
+
}, Z = n ? n == null ? void 0 : n.slice(-t.hiddenItemCount).map((e, l) => H(e, l, 1)) : c == null ? void 0 : c.slice(-t.hiddenItemCount);
|
128
|
+
return /* @__PURE__ */ o(fe, { value: z, children: /* @__PURE__ */ o(Ce, { ...f, className: Y, $textColor: u, $bgColor: i, children: /* @__PURE__ */ M(Ne, { className: F("navmenu-root", `navmenu-root--${a}`), ref: $, children: [
|
129
|
+
n ? n.map((e, l) => H(e, l)) : X(c || []),
|
128
130
|
t.hiddenItemCount > 0 && /* @__PURE__ */ o(E, { expandIcon: !1, icon: Q, label: "", ref: w, style: K, children: Z })
|
129
131
|
] }) }) });
|
130
132
|
}
|
131
133
|
function k({
|
132
|
-
ref: n,
|
134
|
+
ref: n = void 0,
|
133
135
|
id: a = "",
|
134
136
|
icon: C = null,
|
135
137
|
label: m = "",
|
136
|
-
description: y,
|
138
|
+
description: y = void 0,
|
137
139
|
active: g = !1,
|
138
140
|
variant: I = "default",
|
139
|
-
onClick: s =
|
141
|
+
onClick: s = me,
|
140
142
|
...f
|
141
143
|
}) {
|
142
|
-
const r = G(a), { mode: u, activeId: v, activate:
|
144
|
+
const r = G(a), { mode: u, activeId: v, activate: i, activeTextColor: c } = B(), t = F(
|
143
145
|
"navmenu-item",
|
144
146
|
{ "navmenu-item--active": v === r },
|
145
147
|
`navmenu-item--${u}`,
|
@@ -147,17 +149,17 @@ function k({
|
|
147
149
|
f.className
|
148
150
|
);
|
149
151
|
return j(() => {
|
150
|
-
g && (
|
152
|
+
g && (i == null || i(r));
|
151
153
|
}, [g]), // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
152
154
|
/* @__PURE__ */ M(
|
153
|
-
|
155
|
+
ve,
|
154
156
|
{
|
155
157
|
...f,
|
156
158
|
className: t,
|
157
159
|
ref: n,
|
158
160
|
$activeTextColor: c,
|
159
161
|
onClick: () => {
|
160
|
-
s == null || s(),
|
162
|
+
s == null || s(), i == null || i(r);
|
161
163
|
},
|
162
164
|
children: [
|
163
165
|
C && /* @__PURE__ */ o("span", { className: "navmenu-item__icon", children: C }),
|
@@ -165,7 +167,7 @@ function k({
|
|
165
167
|
/* @__PURE__ */ M("span", { className: "navmenu-item__label", children: [
|
166
168
|
m,
|
167
169
|
" ",
|
168
|
-
/* @__PURE__ */ o(
|
170
|
+
/* @__PURE__ */ o(ae, { className: "navmenu-item__label-arrow" })
|
169
171
|
] }),
|
170
172
|
y && /* @__PURE__ */ o("span", { className: "navmenu-item__desc", children: y })
|
171
173
|
] })
|
@@ -175,15 +177,15 @@ function k({
|
|
175
177
|
}
|
176
178
|
k.displayName = "NavMenu.Item";
|
177
179
|
function E({
|
178
|
-
ref: n,
|
180
|
+
ref: n = void 0,
|
179
181
|
id: a = "",
|
180
182
|
icon: C = null,
|
181
183
|
label: m = null,
|
182
184
|
description: y,
|
183
185
|
variant: g = "default",
|
184
|
-
children: I,
|
186
|
+
children: I = void 0,
|
185
187
|
expandIcon: s = ({ isOpen: r }) => /* @__PURE__ */ o(
|
186
|
-
|
188
|
+
ie,
|
187
189
|
{
|
188
190
|
style: {
|
189
191
|
transform: `rotate(${r ? 180 : 0}deg)`
|
@@ -192,7 +194,7 @@ function E({
|
|
192
194
|
),
|
193
195
|
...f
|
194
196
|
}) {
|
195
|
-
const r = G(a), { openedIds: u, open: v, close:
|
197
|
+
const r = G(a), { openedIds: u, open: v, close: i, mode: c, activeTextColor: t } = B(), N = (u == null ? void 0 : u.includes(r)) ?? !1, _ = c === "inline", W = F(
|
196
198
|
"navmenu-sub",
|
197
199
|
"navmenu-item",
|
198
200
|
{ "navmenu-item--panel": g === "panel" },
|
@@ -200,10 +202,10 @@ function E({
|
|
200
202
|
f.className
|
201
203
|
), z = {
|
202
204
|
onClick: () => {
|
203
|
-
u != null && u.includes(r) ?
|
205
|
+
u != null && u.includes(r) ? i == null || i(r) : v == null || v(r);
|
204
206
|
}
|
205
207
|
}, $ = _ ? { onClick: (w) => w.stopPropagation() } : {}, p = /* @__PURE__ */ M(
|
206
|
-
|
208
|
+
pe,
|
207
209
|
{
|
208
210
|
...f,
|
209
211
|
className: W,
|
@@ -217,11 +219,11 @@ function E({
|
|
217
219
|
y && /* @__PURE__ */ o("span", { className: "navmenu-item__desc", children: y })
|
218
220
|
] }),
|
219
221
|
s && /* @__PURE__ */ o("span", { className: "navmenu-sub__expand-icon", children: typeof s == "function" ? s({ isOpen: N }) : s }),
|
220
|
-
/* @__PURE__ */ o(
|
222
|
+
/* @__PURE__ */ o(_e, { inline: _, ...$, children: typeof I == "function" ? I({ isOpen: N }) : /* @__PURE__ */ o(he, { className: "navmenu-sub__list", children: D(I) }) })
|
221
223
|
]
|
222
224
|
}
|
223
225
|
);
|
224
|
-
return _ ? p : /* @__PURE__ */ o(
|
226
|
+
return _ ? p : /* @__PURE__ */ o(oe, { onClickAway: () => i == null ? void 0 : i(r), children: p });
|
225
227
|
}
|
226
228
|
E.displayName = "NavMenu.Sub";
|
227
229
|
J.Item = k;
|
package/lib/NavMenu/products.js
CHANGED
@@ -3,30 +3,30 @@ import { useRef as u } from "react";
|
|
3
3
|
import { Link as t } from "react-router-dom";
|
4
4
|
import { useMemoizedFn as w, useCreation as k } from "ahooks";
|
5
5
|
import { Box as g, useTheme as h, Grid as l } from "@mui/material";
|
6
|
-
import f from "./sub-item-group
|
7
|
-
import { Item as S } from "./nav-menu
|
8
|
-
import { styled as v } from "../Theme
|
9
|
-
import { useNavMenuContext as y } from "./nav-menu-context
|
10
|
-
import { translate as $ } from "../Locale/util
|
11
|
-
import { useLocaleContext as
|
12
|
-
import
|
13
|
-
import I from "./images/nft-studio.svg
|
14
|
-
import
|
15
|
-
import
|
16
|
-
import
|
17
|
-
import D from "./images/aistro.svg
|
18
|
-
import K from "./images/blocklet-launcher.svg
|
19
|
-
import B from "./images/blocklet-store.svg
|
20
|
-
import W from "./images/web3-kit.svg
|
21
|
-
import F from "./images/blocklet-framework.svg
|
22
|
-
import G from "./images/abt-network.svg
|
23
|
-
import
|
24
|
-
import
|
25
|
-
import d from "./images/did.svg
|
26
|
-
import
|
27
|
-
import T from "./images/did-name-service.svg
|
28
|
-
import z from "./images/vc.svg
|
29
|
-
import O from "./images/did-connect.svg
|
6
|
+
import f from "./sub-item-group";
|
7
|
+
import { Item as S } from "./nav-menu";
|
8
|
+
import { styled as v } from "../Theme";
|
9
|
+
import { useNavMenuContext as y } from "./nav-menu-context";
|
10
|
+
import { translate as $ } from "../Locale/util";
|
11
|
+
import { useLocaleContext as A } from "../Locale/context";
|
12
|
+
import _ from "./images/ai-kit.svg";
|
13
|
+
import I from "./images/nft-studio.svg";
|
14
|
+
import C from "./images/creator-studio.svg";
|
15
|
+
import N from "./images/aigne.svg";
|
16
|
+
import x from "./images/arcsphere.svg";
|
17
|
+
import D from "./images/aistro.svg";
|
18
|
+
import K from "./images/blocklet-launcher.svg";
|
19
|
+
import B from "./images/blocklet-store.svg";
|
20
|
+
import W from "./images/web3-kit.svg";
|
21
|
+
import F from "./images/blocklet-framework.svg";
|
22
|
+
import G from "./images/abt-network.svg";
|
23
|
+
import P from "./images/blocklet-server.svg";
|
24
|
+
import L from "./images/OCAP.svg";
|
25
|
+
import d from "./images/did.svg";
|
26
|
+
import M from "./images/did-wallet.svg";
|
27
|
+
import T from "./images/did-name-service.svg";
|
28
|
+
import z from "./images/vc.svg";
|
29
|
+
import O from "./images/did-connect.svg";
|
30
30
|
import V from "./images/payment-kit.png";
|
31
31
|
const E = {
|
32
32
|
en: {
|
@@ -193,8 +193,8 @@ const E = {
|
|
193
193
|
margin-top: 0px;
|
194
194
|
}
|
195
195
|
`;
|
196
|
-
function ye({ className: c, isOpen: j, ...s }) {
|
197
|
-
const { mode: a } = y(), { palette: p } = h(), m = u(null), { locale: o = "en" } =
|
196
|
+
function ye({ className: c, isOpen: j = void 0, ...s }) {
|
197
|
+
const { mode: a } = y(), { palette: p } = h(), m = u(null), { locale: o = "en" } = A() || {}, r = w((i, n = {}) => $(E, i, o, "en", n)), b = k(() => [
|
198
198
|
{
|
199
199
|
type: "Group",
|
200
200
|
label: r("groups.applications"),
|
@@ -215,7 +215,7 @@ function ye({ className: c, isOpen: j, ...s }) {
|
|
215
215
|
}
|
216
216
|
),
|
217
217
|
description: r("products.creatorStudio.description"),
|
218
|
-
icon: /* @__PURE__ */ e(
|
218
|
+
icon: /* @__PURE__ */ e(C, {})
|
219
219
|
},
|
220
220
|
{
|
221
221
|
label: /* @__PURE__ */ e(t, { to: `https://www.aistro.io/${o}`, target: "_blank", rel: "noreferrer noopener", children: "Aistro" }),
|
@@ -225,12 +225,12 @@ function ye({ className: c, isOpen: j, ...s }) {
|
|
225
225
|
{
|
226
226
|
label: /* @__PURE__ */ e(t, { to: "https://www.aigne.io/", target: "_blank", rel: "noreferrer noopener", children: "AIGNE" }),
|
227
227
|
description: r("products.aigne.description"),
|
228
|
-
icon: /* @__PURE__ */ e(
|
228
|
+
icon: /* @__PURE__ */ e(N, { style: { filter: p.mode === "dark" ? "invert(1)" : "none" } })
|
229
229
|
},
|
230
230
|
{
|
231
231
|
label: /* @__PURE__ */ e(t, { to: `https://www.arcsphere.io/${o}`, target: "_blank", rel: "noreferrer noopener", children: "ArcSphere" }),
|
232
232
|
description: r("products.arcsphere.description"),
|
233
|
-
icon: /* @__PURE__ */ e(
|
233
|
+
icon: /* @__PURE__ */ e(x, {})
|
234
234
|
}
|
235
235
|
]
|
236
236
|
},
|
@@ -246,7 +246,7 @@ function ye({ className: c, isOpen: j, ...s }) {
|
|
246
246
|
{
|
247
247
|
label: /* @__PURE__ */ e(t, { to: `https://www.aikit.rocks/${o}`, target: "_blank", rel: "noreferrer noopener", children: "AI Kit" }),
|
248
248
|
description: r("products.aiKit.description"),
|
249
|
-
icon: /* @__PURE__ */ e(
|
249
|
+
icon: /* @__PURE__ */ e(_, {})
|
250
250
|
},
|
251
251
|
{
|
252
252
|
label: /* @__PURE__ */ e(t, { to: `https://www.blocklet.io/${o}/payment-kit`, target: "_blank", rel: "noreferrer noopener", children: "Payment Kit" }),
|
@@ -295,7 +295,7 @@ function ye({ className: c, isOpen: j, ...s }) {
|
|
295
295
|
{
|
296
296
|
label: /* @__PURE__ */ e(t, { to: `https://www.blocklet.io/${o}/blocklet-server`, target: "_blank", rel: "noreferrer noopener", children: "Blocklet Server" }),
|
297
297
|
description: r("products.blockletServer.description"),
|
298
|
-
icon: /* @__PURE__ */ e(
|
298
|
+
icon: /* @__PURE__ */ e(P, {})
|
299
299
|
},
|
300
300
|
{
|
301
301
|
label: /* @__PURE__ */ e(
|
@@ -308,7 +308,7 @@ function ye({ className: c, isOpen: j, ...s }) {
|
|
308
308
|
}
|
309
309
|
),
|
310
310
|
description: r("products.ocap.description"),
|
311
|
-
icon: /* @__PURE__ */ e(
|
311
|
+
icon: /* @__PURE__ */ e(L, {})
|
312
312
|
}
|
313
313
|
]
|
314
314
|
},
|
@@ -332,7 +332,7 @@ function ye({ className: c, isOpen: j, ...s }) {
|
|
332
332
|
{
|
333
333
|
label: /* @__PURE__ */ e(t, { to: `https://www.didwallet.io/${o}`, target: "_blank", rel: "noreferrer noopener", children: "DID Wallet" }),
|
334
334
|
description: r("products.didWallet.description"),
|
335
|
-
icon: /* @__PURE__ */ e(
|
335
|
+
icon: /* @__PURE__ */ e(M, {})
|
336
336
|
},
|
337
337
|
{
|
338
338
|
label: /* @__PURE__ */ e(t, { to: `https://www.didnames.io/${o}`, target: "_blank", rel: "noreferrer noopener", children: "DID Names" }),
|
package/lib/NavMenu/style.js
CHANGED