@xyo-network/os-react-runtime 7.2.1 → 7.3.0
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/dist/browser/helpers/BridgeActivityHelper.d.ts +1 -1
- package/dist/browser/helpers/BrowserLocator.d.ts +1 -1
- package/dist/browser/helpers/BrowserLocator.d.ts.map +1 -1
- package/dist/browser/helpers/widget/Caller.d.ts.map +1 -1
- package/dist/browser/img/backgrounds/index.d.ts +18 -18
- package/dist/browser/img/backgrounds/index.d.ts.map +1 -1
- package/dist/browser/index.mjs +208 -178
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/modules/Dapp/Alert/RenderErrorWithSupportLink.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/Button/StyledDappIconBuilder.d.ts +1 -1
- package/dist/browser/modules/Dapp/Button/lib/decomposeProps.d.ts +9 -1098
- package/dist/browser/modules/Dapp/Button/lib/decomposeProps.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/Page/DappPathSwitcher.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/LoadingFlexbox.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.d.ts +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/menu/BottomNavigation.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/menu/Drawer.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/menu/StyledListItems.d.ts +1 -1
- package/dist/browser/modules/Dapp/modules/Window/components/menu/img/index.d.ts +2 -2
- package/dist/browser/modules/Dapp/modules/Window/components/menu/img/index.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/hooks/menu/useDappMenu.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/hooks/menu/useDappMenuCaller.d.ts +2 -2
- package/dist/browser/modules/Dapp/modules/Window/hooks/menu/useDappMenuCaller.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/access-interface/components/Dialog.d.ts.map +1 -1
- package/dist/browser/modules/LoadingOsLogo/img/index.d.ts +1 -1
- package/dist/browser/modules/LoadingOsLogo/img/index.d.ts.map +1 -1
- package/dist/browser/modules/XyOsUi/lib/XyOsUi.d.ts.map +1 -1
- package/dist/browser/modules/bios/hooks/useKernel.d.ts +1 -1
- package/dist/browser/modules/bios/hooks/useKernel.d.ts.map +1 -1
- package/dist/browser/modules/dapps/accounts/components/AccountCard.d.ts +1 -1
- package/dist/browser/modules/dapps/accounts/components/AccountCard.d.ts.map +1 -1
- package/dist/browser/modules/dapps/accounts/models/CreditCardInput.d.ts +2 -2
- package/dist/browser/modules/dapps/accounts/models/CreditCardInput.d.ts.map +1 -1
- package/dist/browser/modules/dapps/table/head/components/StyledTableRowHeader.d.ts +1 -1
- package/dist/browser/modules/intent/useDappIntentListener2.d.ts.map +1 -1
- package/dist/browser/modules/intent/useNavigateIntent.d.ts +2 -2
- package/dist/browser/modules/intent/useNavigateIntent.d.ts.map +1 -1
- package/dist/browser/modules/network/components/LoadingIndicator.d.ts.map +1 -1
- package/dist/browser/modules/os/hooks/useDappRegistrationResults.d.ts.map +1 -1
- package/dist/browser/modules/os/hooks/useDappRegistry.d.ts.map +1 -1
- package/dist/browser/modules/os/hooks/useDappSeedPhraseRepository.d.ts +1 -1
- package/dist/browser/modules/os/hooks/useDappSeedPhraseRepository.d.ts.map +1 -1
- package/dist/browser/modules/resource/ResourceHooks.d.ts.map +1 -1
- package/dist/browser/modules/resource/useSyncExternalPayloadStore.d.ts.map +1 -1
- package/dist/browser/modules/stack/useStackReady.d.ts.map +1 -1
- package/dist/browser/modules/widgets/Types/Stat/Subtitle.d.ts +1 -1
- package/dist/browser/modules/widgets/Types/Stat/Unit.d.ts +1 -1
- package/dist/browser/modules/widgets/Types/Stat/Value.d.ts +1 -1
- package/dist/browser/modules/widgets/Types/Tables/BooleanTable.d.ts +4 -4
- package/package.json +324 -69
- package/dist/browser/modules/Dapp/modules/Window/components/menu/stories/DefaultData.d.ts +0 -10
- package/dist/browser/modules/Dapp/modules/Window/components/menu/stories/DefaultData.d.ts.map +0 -1
- package/dist/browser/modules/Dapp/modules/Window/components/menu/stories/Drawer.stories.d.ts +0 -6
- package/dist/browser/modules/Dapp/modules/Window/components/menu/stories/Drawer.stories.d.ts.map +0 -1
- package/src/helpers/BridgeActivityHelper.ts +0 -39
- package/src/helpers/BrowserLocator.ts +0 -19
- package/src/helpers/NodePalettes.ts +0 -84
- package/src/helpers/index.ts +0 -5
- package/src/helpers/monitor/XyOsBrowserMonitor.ts +0 -14
- package/src/helpers/monitor/index.ts +0 -1
- package/src/helpers/widget/Caller.tsx +0 -125
- package/src/helpers/widget/index.ts +0 -1
- package/src/img/backgrounds/candy-dark@3x.webp +0 -0
- package/src/img/backgrounds/candy-light@3x.webp +0 -0
- package/src/img/backgrounds/candyApple-dark@3x.webp +0 -0
- package/src/img/backgrounds/candyApple-light@3x.webp +0 -0
- package/src/img/backgrounds/images.d.ts +0 -5
- package/src/img/backgrounds/index.ts +0 -18
- package/src/img/backgrounds/moss-dark@3x.webp +0 -0
- package/src/img/backgrounds/moss-light@3x.webp +0 -0
- package/src/img/backgrounds/ocean-dark@3x.webp +0 -0
- package/src/img/backgrounds/ocean-light@3x.webp +0 -0
- package/src/img/backgrounds/peachYogurt-dark@3x.webp +0 -0
- package/src/img/backgrounds/peachYogurt-light@3x.webp +0 -0
- package/src/img/backgrounds/sherbet-dark@3x.webp +0 -0
- package/src/img/backgrounds/sherbet-light@3x.webp +0 -0
- package/src/img/backgrounds/spring-dark@3x.webp +0 -0
- package/src/img/backgrounds/spring-light@3x.webp +0 -0
- package/src/img/backgrounds/sunset-dark@3x.webp +0 -0
- package/src/img/backgrounds/sunset-light@3x.webp +0 -0
- package/src/img/backgrounds/xyo-dark@3x.webp +0 -0
- package/src/img/backgrounds/xyo-light@3x.webp +0 -0
- package/src/img/index.ts +0 -1
- package/src/index.ts +0 -5
- package/src/interfaces/StackReady.ts +0 -6
- package/src/interfaces/index.ts +0 -1
- package/src/modules/Dapp/Alert/RenderErrorWithSupportLink.tsx +0 -50
- package/src/modules/Dapp/Alert/index.ts +0 -1
- package/src/modules/Dapp/Button/IconEx.tsx +0 -96
- package/src/modules/Dapp/Button/LaunchFrame.tsx +0 -77
- package/src/modules/Dapp/Button/StyledComponents.tsx +0 -55
- package/src/modules/Dapp/Button/StyledDappIconBuilder.tsx +0 -17
- package/src/modules/Dapp/Button/hooks/index.ts +0 -1
- package/src/modules/Dapp/Button/hooks/useLaunchPoint.tsx +0 -31
- package/src/modules/Dapp/Button/index.ts +0 -4
- package/src/modules/Dapp/Button/lib/decomposeProps.tsx +0 -15
- package/src/modules/Dapp/Button/lib/index.ts +0 -1
- package/src/modules/Dapp/Container.tsx +0 -63
- package/src/modules/Dapp/ContainerFlexbox.tsx +0 -30
- package/src/modules/Dapp/Debug/Dialog.tsx +0 -54
- package/src/modules/Dapp/Debug/index.ts +0 -1
- package/src/modules/Dapp/EnterAnimation.tsx +0 -54
- package/src/modules/Dapp/Page/DappPage.tsx +0 -115
- package/src/modules/Dapp/Page/DappPathSwitcher.tsx +0 -58
- package/src/modules/Dapp/Page/DividerChip.tsx +0 -31
- package/src/modules/Dapp/Page/Row.tsx +0 -69
- package/src/modules/Dapp/Page/index.ts +0 -3
- package/src/modules/Dapp/RenderHtml.tsx +0 -12
- package/src/modules/Dapp/index.ts +0 -8
- package/src/modules/Dapp/lib/DappState.ts +0 -5
- package/src/modules/Dapp/lib/DefaultIconSize.ts +0 -1
- package/src/modules/Dapp/lib/deriveDappState.ts +0 -16
- package/src/modules/Dapp/lib/index.ts +0 -3
- package/src/modules/Dapp/modules/Window/AppBar.tsx +0 -115
- package/src/modules/Dapp/modules/Window/Chrome.tsx +0 -79
- package/src/modules/Dapp/modules/Window/DappWindow.tsx +0 -39
- package/src/modules/Dapp/modules/Window/LoadingFlexbox.tsx +0 -99
- package/src/modules/Dapp/modules/Window/MetaTags.tsx +0 -27
- package/src/modules/Dapp/modules/Window/NodeManifest.tsx +0 -16
- package/src/modules/Dapp/modules/Window/Rendered.tsx +0 -101
- package/src/modules/Dapp/modules/Window/Trail.tsx +0 -33
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.tsx +0 -82
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/DeveloperLinkSection.tsx +0 -27
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/InstallButtonSection.tsx +0 -34
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/SummarySection.tsx +0 -73
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/index.ts +0 -1
- package/src/modules/Dapp/modules/Window/components/index.ts +0 -2
- package/src/modules/Dapp/modules/Window/components/menu/BottomMenuArea.tsx +0 -130
- package/src/modules/Dapp/modules/Window/components/menu/BottomNavigation.tsx +0 -66
- package/src/modules/Dapp/modules/Window/components/menu/Drawer.tsx +0 -160
- package/src/modules/Dapp/modules/Window/components/menu/SocialData.tsx +0 -68
- package/src/modules/Dapp/modules/Window/components/menu/StyledListItems.tsx +0 -36
- package/src/modules/Dapp/modules/Window/components/menu/img/index.ts +0 -2
- package/src/modules/Dapp/modules/Window/components/menu/img/xyoOS-Icon-Black.svg +0 -1
- package/src/modules/Dapp/modules/Window/components/menu/img/xyoOS-Icon-White.svg +0 -1
- package/src/modules/Dapp/modules/Window/components/menu/index.ts +0 -3
- package/src/modules/Dapp/modules/Window/components/menu/stories/DefaultData.tsx +0 -118
- package/src/modules/Dapp/modules/Window/components/menu/stories/Drawer.stories.tsx +0 -36
- package/src/modules/Dapp/modules/Window/components/menu/stories/default.manifest.json +0 -20
- package/src/modules/Dapp/modules/Window/hooks/index.ts +0 -8
- package/src/modules/Dapp/modules/Window/hooks/lib/DappPathHelpers.ts +0 -34
- package/src/modules/Dapp/modules/Window/hooks/lib/detectCustomer.ts +0 -21
- package/src/modules/Dapp/modules/Window/hooks/lib/index.ts +0 -2
- package/src/modules/Dapp/modules/Window/hooks/menu/index.ts +0 -5
- package/src/modules/Dapp/modules/Window/hooks/menu/useAddDappMenuItems.ts +0 -25
- package/src/modules/Dapp/modules/Window/hooks/menu/useBuildDappMenuResource.ts +0 -39
- package/src/modules/Dapp/modules/Window/hooks/menu/useDappMenu.ts +0 -71
- package/src/modules/Dapp/modules/Window/hooks/menu/useDappMenuCaller.ts +0 -22
- package/src/modules/Dapp/modules/Window/hooks/menu/useDappMenuDependencies.ts +0 -16
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/RoutingNodes.md +0 -7
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/index.ts +0 -4
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.tsx +0 -55
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappIntentRequest.tsx +0 -68
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappPathFromRoute.tsx +0 -75
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappStateFromRoute.tsx +0 -51
- package/src/modules/Dapp/modules/Window/hooks/route/index.ts +0 -1
- package/src/modules/Dapp/modules/Window/hooks/useDebugClick.ts +0 -61
- package/src/modules/Dapp/modules/Window/hooks/useDecomposeDapp.tsx +0 -21
- package/src/modules/Dapp/modules/Window/hooks/useExposedNode.ts +0 -6
- package/src/modules/Dapp/modules/Window/hooks/useSkipLoadingScreen.tsx +0 -17
- package/src/modules/Dapp/modules/Window/hooks/useSyncOsRegisteredAccessInterfaces.tsx +0 -36
- package/src/modules/Dapp/modules/Window/index.ts +0 -7
- package/src/modules/Dapp/modules/Window/types/DappMenuProperties.ts +0 -9
- package/src/modules/Dapp/modules/Window/types/DappWindowProps.ts +0 -14
- package/src/modules/Dapp/modules/Window/types/index.ts +0 -2
- package/src/modules/Dapp/modules/access-interface/components/Dialog.tsx +0 -132
- package/src/modules/Dapp/modules/access-interface/components/Flexbox.tsx +0 -29
- package/src/modules/Dapp/modules/access-interface/components/index.ts +0 -2
- package/src/modules/Dapp/modules/access-interface/hooks/index.ts +0 -1
- package/src/modules/Dapp/modules/access-interface/hooks/useDialogState.tsx +0 -28
- package/src/modules/Dapp/modules/access-interface/index.ts +0 -2
- package/src/modules/Dapp/modules/index.ts +0 -2
- package/src/modules/Dapp/useDappCaller.ts +0 -16
- package/src/modules/LoadingOsLogo/LoadingOsLogo.tsx +0 -54
- package/src/modules/LoadingOsLogo/img/index.ts +0 -1
- package/src/modules/LoadingOsLogo/img/xyoOS-Icon.svg +0 -1
- package/src/modules/LoadingOsLogo/index.ts +0 -1
- package/src/modules/XyOsUi/contexts/XyOsUiContext.ts +0 -10
- package/src/modules/XyOsUi/contexts/index.ts +0 -1
- package/src/modules/XyOsUi/index.ts +0 -2
- package/src/modules/XyOsUi/lib/XyOsUi.ts +0 -51
- package/src/modules/XyOsUi/lib/index.ts +0 -1
- package/src/modules/access-requests/NameServiceRegistrationHooks.ts +0 -36
- package/src/modules/access-requests/index.ts +0 -2
- package/src/modules/access-requests/useBuildDappAccessRequestResource.ts +0 -38
- package/src/modules/bios/hooks/index.ts +0 -2
- package/src/modules/bios/hooks/useBios.ts +0 -25
- package/src/modules/bios/hooks/useKernel.ts +0 -36
- package/src/modules/bios/index.ts +0 -1
- package/src/modules/dapps/accounts/components/AccountCard.tsx +0 -57
- package/src/modules/dapps/accounts/components/AnimatedComponents/GenericAnimations/ShiftAnimation.tsx +0 -116
- package/src/modules/dapps/accounts/components/AnimatedComponents/GenericAnimations/index.ts +0 -1
- package/src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.tsx +0 -23
- package/src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPointList.tsx +0 -24
- package/src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/index.ts +0 -2
- package/src/modules/dapps/accounts/components/AnimatedComponents/index.ts +0 -2
- package/src/modules/dapps/accounts/components/InputFields/CoinbaseEmail.tsx +0 -41
- package/src/modules/dapps/accounts/components/InputFields/PrimaryCryptowallet.tsx +0 -42
- package/src/modules/dapps/accounts/components/InputFields/SecondaryCryptowallet.tsx +0 -42
- package/src/modules/dapps/accounts/components/InputFields/index.ts +0 -3
- package/src/modules/dapps/accounts/components/PaymentMethods.tsx +0 -51
- package/src/modules/dapps/accounts/components/index.ts +0 -3
- package/src/modules/dapps/accounts/hooks/index.ts +0 -1
- package/src/modules/dapps/accounts/hooks/useAccountArchivist.ts +0 -5
- package/src/modules/dapps/accounts/icon/Icon.tsx +0 -49
- package/src/modules/dapps/accounts/icon/custom-accounts-icon.svg +0 -1
- package/src/modules/dapps/accounts/icon/index.ts +0 -1
- package/src/modules/dapps/accounts/index.ts +0 -3
- package/src/modules/dapps/accounts/models/CreditCardInput.ts +0 -20
- package/src/modules/dapps/accounts/models/index.ts +0 -1
- package/src/modules/dapps/index.ts +0 -3
- package/src/modules/dapps/name-service/DomainIcon.tsx +0 -12
- package/src/modules/dapps/name-service/index.ts +0 -1
- package/src/modules/dapps/table/NextIteratorFlexbox.tsx +0 -33
- package/src/modules/dapps/table/head/Payload.ts +0 -11
- package/src/modules/dapps/table/head/Schema.ts +0 -4
- package/src/modules/dapps/table/head/components/Head.tsx +0 -47
- package/src/modules/dapps/table/head/components/StyledTableRowHeader.tsx +0 -6
- package/src/modules/dapps/table/head/components/index.ts +0 -1
- package/src/modules/dapps/table/head/hooks/index.ts +0 -1
- package/src/modules/dapps/table/head/hooks/useVisibleColumns.tsx +0 -15
- package/src/modules/dapps/table/head/index.ts +0 -4
- package/src/modules/dapps/table/index.ts +0 -2
- package/src/modules/index.ts +0 -12
- package/src/modules/intent/DappIntentResourceHooks.ts +0 -35
- package/src/modules/intent/index.ts +0 -7
- package/src/modules/intent/useClearIntents.ts +0 -14
- package/src/modules/intent/useDappIntentCaller.ts +0 -17
- package/src/modules/intent/useDappIntentListener.ts +0 -53
- package/src/modules/intent/useDappIntentListener2.ts +0 -48
- package/src/modules/intent/useNavigateIntent.ts +0 -51
- package/src/modules/intent/useSendDappIntent.ts +0 -38
- package/src/modules/network/components/LoadingIndicator.tsx +0 -51
- package/src/modules/network/components/NetworkButton.tsx +0 -27
- package/src/modules/network/components/NetworkReady.tsx +0 -31
- package/src/modules/network/components/StyledLoadingIndicator.tsx +0 -49
- package/src/modules/network/components/index.ts +0 -3
- package/src/modules/network/hooks/index.ts +0 -2
- package/src/modules/network/hooks/lib/NetworkState.ts +0 -8
- package/src/modules/network/hooks/lib/createNetworkState.ts +0 -20
- package/src/modules/network/hooks/lib/index.ts +0 -2
- package/src/modules/network/hooks/useOsNetwork.tsx +0 -17
- package/src/modules/network/hooks/useXyoPublicNetwork.tsx +0 -17
- package/src/modules/network/index.ts +0 -2
- package/src/modules/os/hooks/index.ts +0 -8
- package/src/modules/os/hooks/useDappContextCreator.ts +0 -89
- package/src/modules/os/hooks/useDappRegistrationResults.ts +0 -30
- package/src/modules/os/hooks/useDappRegistry.ts +0 -19
- package/src/modules/os/hooks/useDappSeedPhraseRepository.ts +0 -19
- package/src/modules/os/hooks/useOsSettingsCaller.ts +0 -19
- package/src/modules/os/hooks/usePhraseFile.ts +0 -33
- package/src/modules/os/hooks/useTabs.ts +0 -14
- package/src/modules/os/hooks/useWidgetDapps.ts +0 -23
- package/src/modules/os/index.ts +0 -1
- package/src/modules/resource/ResourceHooks.ts +0 -45
- package/src/modules/resource/index.ts +0 -3
- package/src/modules/resource/useCleanup.ts +0 -10
- package/src/modules/resource/useSyncExternalPayloadStore.ts +0 -37
- package/src/modules/stack/index.ts +0 -1
- package/src/modules/stack/useStackReady.ts +0 -48
- package/src/modules/widgets/StackOfWidgets.tsx +0 -149
- package/src/modules/widgets/Types/BarGraph/HorizontalBarGraph.tsx +0 -58
- package/src/modules/widgets/Types/BarGraph/StyledLinearProgress.tsx +0 -12
- package/src/modules/widgets/Types/BarGraph/index.ts +0 -2
- package/src/modules/widgets/Types/DataColumns/TwoColFourStat.tsx +0 -34
- package/src/modules/widgets/Types/DataColumns/TwoColTwoStat.tsx +0 -39
- package/src/modules/widgets/Types/DataColumns/index.ts +0 -1
- package/src/modules/widgets/Types/Examples/BarGraph.tsx +0 -10
- package/src/modules/widgets/Types/Examples/BooleanTable.tsx +0 -27
- package/src/modules/widgets/Types/Examples/TwoColTwoStat.tsx +0 -27
- package/src/modules/widgets/Types/Examples/index.ts +0 -3
- package/src/modules/widgets/Types/Stat/Insight.ts +0 -9
- package/src/modules/widgets/Types/Stat/InsightStatProps.ts +0 -7
- package/src/modules/widgets/Types/Stat/Stat.tsx +0 -41
- package/src/modules/widgets/Types/Stat/Subtitle.tsx +0 -14
- package/src/modules/widgets/Types/Stat/Unit.tsx +0 -13
- package/src/modules/widgets/Types/Stat/Value.tsx +0 -16
- package/src/modules/widgets/Types/Stat/index.ts +0 -3
- package/src/modules/widgets/Types/Tables/BooleanTable.tsx +0 -88
- package/src/modules/widgets/Types/Tables/index.ts +0 -1
- package/src/modules/widgets/Types/index.ts +0 -4
- package/src/modules/widgets/WidgetCard.tsx +0 -111
- package/src/modules/widgets/WidgetCardExamples.tsx +0 -31
- package/src/modules/widgets/index.ts +0 -2
- package/src/settings/Theme/ThemeCssVars.ts +0 -228
- package/src/settings/Theme/ThemeProvider.tsx +0 -20
- package/src/settings/Theme/index.ts +0 -1
- package/src/settings/index.ts +0 -1
- package/src/types/global.d.ts +0 -11
- package/src/types/images.d.ts +0 -4
- package/src/utils/DappInstallTypeFilters.ts +0 -27
- package/src/utils/getApiDomain.ts +0 -14
- package/src/utils/index.ts +0 -3
- package/src/utils/useOnWindowResize.tsx +0 -18
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { BottomNavigationProps } from '@mui/material'
|
|
2
|
-
import {
|
|
3
|
-
BottomNavigation, BottomNavigationAction, Paper, styled,
|
|
4
|
-
} from '@mui/material'
|
|
5
|
-
import { useIsDark } from '@xylabs/react-theme'
|
|
6
|
-
import type { DappNavItem, DappNavMenuConfig } from '@xyo-network/os-model'
|
|
7
|
-
import React, { useEffect, useState } from 'react'
|
|
8
|
-
|
|
9
|
-
export interface DappBottomNavigationProps extends BottomNavigationProps {
|
|
10
|
-
activePath?: string
|
|
11
|
-
menuConfig?: DappNavMenuConfig
|
|
12
|
-
menuItems?: DappNavItem[]
|
|
13
|
-
onPathChange?: (to: string) => void
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const DappBottomNavigation: React.FC<DappBottomNavigationProps> = ({
|
|
17
|
-
activePath, menuConfig, menuItems, onPathChange, ...props
|
|
18
|
-
}) => {
|
|
19
|
-
const [activeIndex, setActiveIndex] = useState(0)
|
|
20
|
-
|
|
21
|
-
// update based off active path changes
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
if (menuConfig?.defaultPath && menuItems && activePath) {
|
|
24
|
-
setActiveIndex(menuItems.findIndex(item => activePath === item.path))
|
|
25
|
-
}
|
|
26
|
-
}, [activePath, menuConfig, menuItems])
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<Paper elevation={3}>
|
|
30
|
-
<BottomNavigation
|
|
31
|
-
value={activeIndex}
|
|
32
|
-
onChange={(_, value) => {
|
|
33
|
-
setActiveIndex(value)
|
|
34
|
-
const to = menuItems?.[value].path
|
|
35
|
-
if (to) onPathChange?.(to)
|
|
36
|
-
}}
|
|
37
|
-
showLabels
|
|
38
|
-
{...props}
|
|
39
|
-
>
|
|
40
|
-
{menuItems?.map(({ svgIcon: icon, primaryText }, index) => {
|
|
41
|
-
return (
|
|
42
|
-
<StyledBottomNavigationAction
|
|
43
|
-
className="bottom-nav-action"
|
|
44
|
-
key={index}
|
|
45
|
-
label={primaryText}
|
|
46
|
-
icon={(
|
|
47
|
-
<span
|
|
48
|
-
ref={(ref) => {
|
|
49
|
-
if (ref) {
|
|
50
|
-
ref.innerHTML = icon ?? ''
|
|
51
|
-
}
|
|
52
|
-
}}
|
|
53
|
-
/>
|
|
54
|
-
)}
|
|
55
|
-
/>
|
|
56
|
-
)
|
|
57
|
-
})}
|
|
58
|
-
</BottomNavigation>
|
|
59
|
-
</Paper>
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const StyledBottomNavigationAction = styled(BottomNavigationAction, { name: 'StyledBottomNavigationAction' })(({ theme }) => {
|
|
64
|
-
const darkMode = useIsDark()
|
|
65
|
-
return { '&.Mui-selected': { color: darkMode ? theme.vars?.palette.primary.main : theme.vars?.palette.secondary.main } }
|
|
66
|
-
})
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import type { DrawerProps } from '@mui/material'
|
|
2
|
-
import {
|
|
3
|
-
alpha,
|
|
4
|
-
Drawer,
|
|
5
|
-
List,
|
|
6
|
-
ListItem,
|
|
7
|
-
ListItemIcon,
|
|
8
|
-
ListItemText,
|
|
9
|
-
Tooltip,
|
|
10
|
-
Typography,
|
|
11
|
-
useTheme,
|
|
12
|
-
} from '@mui/material'
|
|
13
|
-
import {
|
|
14
|
-
FlexCol, FlexGrowRow, FlexRow,
|
|
15
|
-
} from '@xylabs/react-flexbox'
|
|
16
|
-
import {
|
|
17
|
-
alphaCss, darkenCss, useIsDark,
|
|
18
|
-
} from '@xylabs/react-theme'
|
|
19
|
-
import type {
|
|
20
|
-
DappName, DappNavItem, DappNavMenuConfig, DappVersion, XyOsContext,
|
|
21
|
-
} from '@xyo-network/os-model'
|
|
22
|
-
import { XyOsMonitor } from '@xyo-network/os-runtime'
|
|
23
|
-
import React, { useEffect, useState } from 'react'
|
|
24
|
-
|
|
25
|
-
import { DebugDialogWithNode } from '../../../../Debug/index.ts'
|
|
26
|
-
import { RenderHtml } from '../../../../RenderHtml.tsx'
|
|
27
|
-
import { useDebugClick } from '../../hooks/index.ts'
|
|
28
|
-
import { BottomMenuArea } from './BottomMenuArea.tsx'
|
|
29
|
-
import { StyledListItemButton, StyledMenuIconWrapSpan } from './StyledListItems.tsx'
|
|
30
|
-
|
|
31
|
-
export interface DappMenuDrawerProps extends DrawerProps {
|
|
32
|
-
activePath?: string
|
|
33
|
-
context?: XyOsContext | null
|
|
34
|
-
iconSvg?: string
|
|
35
|
-
menuConfig?: DappNavMenuConfig
|
|
36
|
-
menuItems?: DappNavItem[]
|
|
37
|
-
name?: DappName
|
|
38
|
-
onPathChange?: (to: string) => void
|
|
39
|
-
version?: DappVersion
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export const DappMenuDrawer: React.FC<DappMenuDrawerProps> = ({
|
|
43
|
-
activePath,
|
|
44
|
-
context,
|
|
45
|
-
iconSvg,
|
|
46
|
-
name,
|
|
47
|
-
menuConfig,
|
|
48
|
-
menuItems,
|
|
49
|
-
onPathChange,
|
|
50
|
-
version,
|
|
51
|
-
...props
|
|
52
|
-
}) => {
|
|
53
|
-
const [path, setPath] = useState('')
|
|
54
|
-
const darkMode = useIsDark()
|
|
55
|
-
const theme = useTheme()
|
|
56
|
-
const drawerColor = darkMode ? theme.vars?.palette.background.paper : darkenCss(theme.vars?.palette.primary.main ?? '#fff', 0.5)
|
|
57
|
-
const activeColor = theme.vars?.palette.primary.light
|
|
58
|
-
|
|
59
|
-
useEffect(() => {
|
|
60
|
-
if (menuConfig?.defaultPath && menuItems && activePath) {
|
|
61
|
-
const newPath = menuItems.find(item => activePath === item.path)?.path ?? ''
|
|
62
|
-
setPath(newPath)
|
|
63
|
-
}
|
|
64
|
-
}, [activePath, menuConfig, menuItems])
|
|
65
|
-
|
|
66
|
-
const handleChange = (to: string) => {
|
|
67
|
-
XyOsMonitor.trackEvent('Visit dApp Page', { Page: to })
|
|
68
|
-
setPath(to)
|
|
69
|
-
onPathChange?.(to)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
const {
|
|
73
|
-
closeDebug, debugOpen, openDebug,
|
|
74
|
-
} = useDebugClick()
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<Drawer
|
|
78
|
-
variant="permanent"
|
|
79
|
-
anchor="left"
|
|
80
|
-
PaperProps={{
|
|
81
|
-
sx: {
|
|
82
|
-
position: 'static', backgroundColor: drawerColor, borderRight: 'none',
|
|
83
|
-
},
|
|
84
|
-
}}
|
|
85
|
-
sx={{ width: '280px' }}
|
|
86
|
-
{...props}
|
|
87
|
-
>
|
|
88
|
-
<FlexCol alignItems="stretch" justifyContent="space-between" height="100dvh">
|
|
89
|
-
<FlexCol alignItems="stretch" justifyContent="flex-start" flexGrow={1} overflow="auto">
|
|
90
|
-
<Tooltip title={version}>
|
|
91
|
-
<FlexGrowRow
|
|
92
|
-
id="dapp-name-and-icon"
|
|
93
|
-
padding={2}
|
|
94
|
-
justifyContent="flex-start"
|
|
95
|
-
gap={1}
|
|
96
|
-
sx={{ cursor: 'pointer' }}
|
|
97
|
-
flexGrow={0}
|
|
98
|
-
>
|
|
99
|
-
{iconSvg ? RenderHtml({ htmlString: iconSvg }) : null}
|
|
100
|
-
<Typography noWrap variant="h6" letterSpacing="-1px">
|
|
101
|
-
{name}
|
|
102
|
-
</Typography>
|
|
103
|
-
</FlexGrowRow>
|
|
104
|
-
</Tooltip>
|
|
105
|
-
<DebugDialogWithNode closeDebug={closeDebug} debugOpen={debugOpen} context={context} />
|
|
106
|
-
<List sx={{ p: 0, overflow: 'auto' }}>
|
|
107
|
-
{menuItems?.map(({
|
|
108
|
-
svgIcon: icon, primaryText, path: pathFromPayload,
|
|
109
|
-
}) => (
|
|
110
|
-
<ListItem
|
|
111
|
-
key={primaryText}
|
|
112
|
-
disablePadding
|
|
113
|
-
sx={{ paddingBottom: 1 }}
|
|
114
|
-
>
|
|
115
|
-
<StyledListItemButton
|
|
116
|
-
onClick={() => handleChange(pathFromPayload)}
|
|
117
|
-
active={pathFromPayload === path}
|
|
118
|
-
disableRipple
|
|
119
|
-
disableTouchRipple
|
|
120
|
-
>
|
|
121
|
-
<FlexRow
|
|
122
|
-
flexGrow={1}
|
|
123
|
-
paddingX={2}
|
|
124
|
-
paddingY={0.5}
|
|
125
|
-
sx={{ '&:hover': { backgroundColor: alpha('#ffffff', 0.05) }, 'borderRadius': '10px' }}
|
|
126
|
-
>
|
|
127
|
-
<ListItemIcon
|
|
128
|
-
sx={{ color: pathFromPayload === path ? activeColor : alpha('#fff', 0.3), justifyContent: 'center' }}
|
|
129
|
-
>
|
|
130
|
-
<StyledMenuIconWrapSpan
|
|
131
|
-
ref={(ref: HTMLSpanElement | null) => {
|
|
132
|
-
if (ref !== null) {
|
|
133
|
-
ref.innerHTML = icon ?? ''
|
|
134
|
-
}
|
|
135
|
-
}}
|
|
136
|
-
/>
|
|
137
|
-
</ListItemIcon>
|
|
138
|
-
<ListItemText
|
|
139
|
-
slotProps={{
|
|
140
|
-
primary: {
|
|
141
|
-
typography: {
|
|
142
|
-
fontWeight: path === pathFromPayload ? 'bold' : 'inherit',
|
|
143
|
-
color: pathFromPayload === path ? 'inherit' : alphaCss(theme.vars?.palette.text.primary ?? '#000', 0.5),
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
}}
|
|
147
|
-
primary={primaryText}
|
|
148
|
-
style={{ opacity: pathFromPayload === path ? 1 : 0.5 }}
|
|
149
|
-
/>
|
|
150
|
-
</FlexRow>
|
|
151
|
-
</StyledListItemButton>
|
|
152
|
-
</ListItem>
|
|
153
|
-
))}
|
|
154
|
-
</List>
|
|
155
|
-
</FlexCol>
|
|
156
|
-
<BottomMenuArea openDebug={openDebug} backgroundColor={theme.vars?.palette.primary.dark ?? '#000'} />
|
|
157
|
-
</FlexCol>
|
|
158
|
-
</Drawer>
|
|
159
|
-
)
|
|
160
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Facebook, Instagram, LinkedIn, Reddit, StorefrontRounded, Telegram, X, YouTube,
|
|
3
|
-
} from '@mui/icons-material'
|
|
4
|
-
import type { ReactNode } from 'react'
|
|
5
|
-
import React from 'react'
|
|
6
|
-
import { FaDiscord } from 'react-icons/fa'
|
|
7
|
-
|
|
8
|
-
interface socialLinksDataProps {
|
|
9
|
-
icon: ReactNode
|
|
10
|
-
link: string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const socialLinksData: socialLinksDataProps[] = [
|
|
14
|
-
{
|
|
15
|
-
icon: (
|
|
16
|
-
<Facebook style={{ fontSize: '24px' }} />
|
|
17
|
-
),
|
|
18
|
-
link: 'https://www.facebook.com/OfficialXYO',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
icon: (
|
|
22
|
-
<X style={{ fontSize: '24px' }} />
|
|
23
|
-
),
|
|
24
|
-
link: 'https://twitter.com/OfficialXYO',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
icon: (
|
|
28
|
-
<Instagram style={{ fontSize: '24px' }} />
|
|
29
|
-
),
|
|
30
|
-
link: 'https://www.instagram.com/officialxyo/',
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
icon: (
|
|
34
|
-
<Telegram style={{ fontSize: '24px' }} />
|
|
35
|
-
),
|
|
36
|
-
link: 'https://t.me/xyonetwork',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
icon: (
|
|
40
|
-
<Reddit style={{ fontSize: '24px' }} />
|
|
41
|
-
),
|
|
42
|
-
link: 'https://www.reddit.com/r/XYONetwork/',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
icon: (
|
|
46
|
-
<YouTube style={{ fontSize: '24px' }} />
|
|
47
|
-
),
|
|
48
|
-
link: 'https://www.youtube.com/channel/UCyZDqb9pgntVHJVt1pxXtsw',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
icon: (
|
|
52
|
-
<LinkedIn style={{ fontSize: '24px' }} />
|
|
53
|
-
),
|
|
54
|
-
link: 'https://www.linkedin.com/company/officialxyo/',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
icon: (
|
|
58
|
-
<FaDiscord style={{ fontSize: '24px' }} />
|
|
59
|
-
),
|
|
60
|
-
link: 'https://discord.gg/officialxyo',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
icon: (
|
|
64
|
-
<StorefrontRounded style={{ fontSize: '24px' }} />
|
|
65
|
-
),
|
|
66
|
-
link: 'https://shop.xyo.network',
|
|
67
|
-
},
|
|
68
|
-
]
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ListItemButton, styled } from '@mui/material'
|
|
2
|
-
|
|
3
|
-
// Styled span for wrapping menu icons
|
|
4
|
-
export const StyledMenuIconWrapSpan = styled('span', { name: 'StyledMenuIconWrapSpan' })(() => ({
|
|
5
|
-
alignItems: 'center',
|
|
6
|
-
display: 'inline-flex',
|
|
7
|
-
flexDirection: 'column',
|
|
8
|
-
}))
|
|
9
|
-
|
|
10
|
-
export const StyledListItemButton = styled(ListItemButton, { name: 'StyledListItemButton', shouldForwardProp: prop => prop !== 'active' })<{
|
|
11
|
-
active?: boolean
|
|
12
|
-
}>(({ theme, active }) => {
|
|
13
|
-
const activeOrHoverColor = theme.vars?.palette.primary.main
|
|
14
|
-
|
|
15
|
-
return {
|
|
16
|
-
'position': 'relative',
|
|
17
|
-
'padding': '8px 16px',
|
|
18
|
-
'borderRadius': '12px',
|
|
19
|
-
'transition': 'background-color 0.3s ease',
|
|
20
|
-
'&:hover': {
|
|
21
|
-
backgroundColor: 'transparent',
|
|
22
|
-
borderRadius: '12px',
|
|
23
|
-
},
|
|
24
|
-
'&::before': {
|
|
25
|
-
content: '""',
|
|
26
|
-
position: 'absolute',
|
|
27
|
-
left: 0,
|
|
28
|
-
top: 0,
|
|
29
|
-
bottom: 0,
|
|
30
|
-
width: '6px',
|
|
31
|
-
backgroundColor: active ? activeOrHoverColor : 'transparent',
|
|
32
|
-
borderRadius: '0 4px 4px 0',
|
|
33
|
-
transition: 'background-color 0.3s ease',
|
|
34
|
-
},
|
|
35
|
-
}
|
|
36
|
-
})
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 900"><defs><style>.cls-1{fill:#000;}.cls-1,.cls-2{stroke-width:0px;}.cls-2{fill:#a8a8a8;opacity:.21;}</style></defs><path class="cls-2" d="M864.29,297.43c-2.44-6.58-9.76-9.94-16.34-7.5l-143.74,53.26L533.2,21.88c-1.85-3.48-5.21-5.9-9.09-6.56-3.89-.66-7.85.51-10.75,3.18l-267.76,246.55-118-97.86c-5.4-4.48-13.42-3.73-17.9,1.67-4.48,5.4-3.73,13.42,1.67,17.9l118,97.86L36.62,593.37c-2.09,3.34-2.5,7.46-1.14,11.15s4.37,6.54,8.13,7.72l347.4,108.61-25.75,151.12c-1.18,6.92,3.48,13.49,10.4,14.67.24.04.47.07.7.1,6.66.76,12.82-3.81,13.96-10.5l25.75-151.12,363.77,12.56c3.94.14,7.71-1.56,10.22-4.59,2.51-3.03,3.48-7.06,2.62-10.9l-79.64-355.16,143.75-53.26c6.58-2.44,9.94-9.75,7.5-16.34ZM518.49,48.34l156.33,293.75-401.12-68.35,244.79-225.4ZM674.37,367.8l-264.69,319.16-144.06-388.81,408.75,69.65ZM66.9,592.88l176.22-282.26,141.37,381.56-317.59-99.29ZM431.72,700.22l259.75-313.21,72.81,324.69-332.56-11.48Z"/><path class="cls-1" d="M865.04,302.64c.01-.2.02-.4.03-.6,0-.33,0-.66-.03-.99-.01-.2-.02-.39-.04-.58-.04-.35-.1-.71-.17-1.06-.03-.16-.05-.32-.09-.48-.12-.5-.26-1.01-.45-1.5-.18-.49-.4-.97-.64-1.43-.08-.15-.17-.29-.25-.43-.17-.31-.35-.61-.55-.9-.12-.17-.24-.33-.37-.49-.19-.25-.39-.5-.6-.74-.14-.16-.29-.32-.45-.47-.22-.22-.45-.44-.68-.65-.1-.08-.18-.18-.27-.26L530.1,18.07c-.34-.28-.7-.53-1.07-.77-.09-.06-.17-.13-.26-.19-.62-.39-1.26-.7-1.92-.98-.18-.07-.36-.14-.54-.21-.71-.26-1.43-.47-2.16-.6,0,0-.01,0-.02,0,0,0,0,0-.01,0-.67-.11-1.35-.15-2.03-.16-.37,0-.73,0-1.09.03-.23.02-.46.06-.7.09-.86.11-1.69.31-2.5.59-.07.03-.15.04-.23.07l-.32.12c-.2.08-.4.13-.59.22L115.08,165.06c-.11.04-.22.1-.33.15-.3.12-.59.25-.88.39-.19.1-.38.19-.57.3-.27.15-.54.32-.81.5-.17.12-.35.22-.52.35-.27.2-.53.42-.79.64-.14.12-.28.23-.41.35-.35.33-.68.68-1,1.05-.04.05-.08.1-.12.14-.32.38-.6.78-.87,1.2-.09.14-.16.29-.25.43-.18.31-.36.62-.51.94-.08.17-.15.35-.23.53-.13.31-.25.62-.36.93-.06.19-.12.38-.17.57-.09.33-.17.65-.23.98-.02.11-.06.22-.08.33l-72.09,423.12c-.07.43-.11.87-.13,1.3,0,.11-.03.22-.03.33-.03.73.02,1.44.12,2.16.02.19.06.38.09.57.13.74.31,1.48.57,2.19,0,0,0,0,0,0,0,.02.01.03.02.04.2.53.43,1.04.7,1.53.12.22.26.42.38.63.17.28.33.56.52.82.17.23.35.44.54.66.18.22.36.44.56.65.2.21.42.4.63.6.16.14.29.3.46.43l330.39,274c.08.07.17.12.25.18.32.25.65.49.99.71.15.09.29.19.44.28.44.26.9.5,1.37.7.04.02.08.04.12.06.51.21,1.03.39,1.56.53.17.05.35.08.53.12.24.06.47.12.71.16.23.04.46.07.69.1.47.05.95.08,1.42.08.15,0,.3-.02.45-.02.32-.01.65-.02.97-.06.18-.02.36-.06.54-.08.29-.04.58-.09.86-.15.19-.04.38-.1.56-.15.28-.08.55-.16.82-.25.08-.03.15-.04.23-.07l402.48-149.13s.06-.03.09-.04c.39-.15.76-.32,1.13-.51.12-.06.24-.1.35-.16.44-.24.88-.51,1.29-.8.03-.02.06-.04.09-.06.55-.39,1.07-.85,1.56-1.34.83-.82,1.54-1.76,2.11-2.78.09-.17.19-.33.27-.5.32-.64.61-1.3.82-2,.03-.11.05-.22.08-.33.12-.42.23-.84.3-1.27l72.09-423.12c.02-.11.02-.22.03-.33.05-.34.08-.67.1-1.01ZM771.44,701.13l-101.05-83.8,158.61-254.06-57.56,337.86ZM121.2,242.67l65.53,292.26-123.1,45.61,57.57-337.87ZM656.65,591.33l-141.37-381.56,317.59,99.3-176.22,282.26ZM508.76,181.1l22.05-129.41,263.81,218.79-285.86-89.37ZM483.7,176.83l-299.33-10.33L505.75,47.42l-22.05,129.41ZM208.31,514.94l-72.81-324.69,332.56,11.48-259.75,313.21ZM490.1,214.98l144.06,388.81-382.98-65.25-25.77-4.39L490.1,214.98ZM246.9,563.6l379.17,64.6-244.79,225.4-156.33-293.74,21.95,3.74ZM654.16,636.9l101.05,83.8-321.38,119.08,220.33-202.88ZM72.47,604.37l123.1-45.61,140.72,264.4-84.17-69.81-179.65-148.98Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 900"><defs><style>.cls-1{fill:#a8a8a8;opacity:.21;}.cls-1,.cls-2{stroke-width:0px;}.cls-2{fill:#fff;}</style></defs><path class="cls-1" d="M864.29,297.43c-2.44-6.58-9.76-9.94-16.34-7.5l-143.74,53.26L533.2,21.88c-1.85-3.48-5.21-5.9-9.09-6.56-3.89-.66-7.85.51-10.75,3.18l-267.76,246.55-118-97.86c-5.4-4.48-13.42-3.73-17.9,1.67-4.48,5.4-3.73,13.42,1.67,17.9l118,97.86L36.62,593.37c-2.09,3.34-2.5,7.46-1.14,11.15s4.37,6.54,8.13,7.72l347.4,108.61-25.75,151.12c-1.18,6.92,3.48,13.49,10.4,14.67.24.04.47.07.7.1,6.66.76,12.82-3.81,13.96-10.5l25.75-151.12,363.77,12.56c3.94.14,7.71-1.56,10.22-4.59,2.51-3.03,3.48-7.06,2.62-10.9l-79.64-355.16,143.75-53.26c6.58-2.44,9.94-9.75,7.5-16.34ZM518.49,48.34l156.33,293.75-401.12-68.35,244.79-225.4ZM674.37,367.8l-264.69,319.16-144.06-388.81,408.75,69.65ZM66.9,592.88l176.22-282.26,141.37,381.56-317.59-99.29ZM431.72,700.22l259.75-313.21,72.81,324.69-332.56-11.48Z"/><path class="cls-2" d="M865.04,302.64c.01-.2.02-.4.03-.6,0-.33,0-.66-.03-.99-.01-.2-.02-.39-.04-.58-.04-.35-.1-.71-.17-1.06-.03-.16-.05-.32-.09-.48-.12-.5-.26-1.01-.45-1.5-.18-.49-.4-.97-.64-1.43-.08-.15-.17-.29-.25-.43-.17-.31-.35-.61-.55-.9-.12-.17-.24-.33-.37-.49-.19-.25-.39-.5-.6-.74-.14-.16-.29-.32-.45-.47-.22-.22-.45-.44-.68-.65-.1-.08-.18-.18-.27-.26L530.1,18.07c-.34-.28-.7-.53-1.07-.77-.09-.06-.17-.13-.26-.19-.62-.39-1.26-.7-1.92-.98-.18-.07-.36-.14-.54-.21-.71-.26-1.43-.47-2.16-.6,0,0-.01,0-.02,0,0,0,0,0-.01,0-.67-.11-1.35-.15-2.03-.16-.37,0-.73,0-1.09.03-.23.02-.46.06-.7.09-.86.11-1.69.31-2.5.59-.07.03-.15.04-.23.07l-.32.12c-.2.08-.4.13-.59.22L115.08,165.06c-.11.04-.22.1-.33.15-.3.12-.59.25-.88.39-.19.1-.38.19-.57.3-.27.15-.54.32-.81.5-.17.12-.35.22-.52.35-.27.2-.53.42-.79.64-.14.12-.28.23-.41.35-.35.33-.68.68-1,1.05-.04.05-.08.1-.12.14-.32.38-.6.78-.87,1.2-.09.14-.16.29-.25.43-.18.31-.36.62-.51.94-.08.17-.15.35-.23.53-.13.31-.25.62-.36.93-.06.19-.12.38-.17.57-.09.33-.17.65-.23.98-.02.11-.06.22-.08.33l-72.09,423.12c-.07.43-.11.87-.13,1.3,0,.11-.03.22-.03.33-.03.73.02,1.44.12,2.16.02.19.06.38.09.57.13.74.31,1.48.57,2.19,0,0,0,0,0,0,0,.02.01.03.02.04.2.53.43,1.04.7,1.53.12.22.26.42.38.63.17.28.33.56.52.82.17.23.35.44.54.66.18.22.36.44.56.65.2.21.42.4.63.6.16.14.29.3.46.43l330.39,274c.08.07.17.12.25.18.32.25.65.49.99.71.15.09.29.19.44.28.44.26.9.5,1.37.7.04.02.08.04.12.06.51.21,1.03.39,1.56.53.17.05.35.08.53.12.24.06.47.12.71.16.23.04.46.07.69.1.47.05.95.08,1.42.08.15,0,.3-.02.45-.02.32-.01.65-.02.97-.06.18-.02.36-.06.54-.08.29-.04.58-.09.86-.15.19-.04.38-.1.56-.15.28-.08.55-.16.82-.25.08-.03.15-.04.23-.07l402.48-149.13s.06-.03.09-.04c.39-.15.76-.32,1.13-.51.12-.06.24-.1.35-.16.44-.24.88-.51,1.29-.8.03-.02.06-.04.09-.06.55-.39,1.07-.85,1.56-1.34.83-.82,1.54-1.76,2.11-2.78.09-.17.19-.33.27-.5.32-.64.61-1.3.82-2,.03-.11.05-.22.08-.33.12-.42.23-.84.3-1.27l72.09-423.12c.02-.11.02-.22.03-.33.05-.34.08-.67.1-1.01ZM771.44,701.13l-101.05-83.8,158.61-254.06-57.56,337.86ZM121.2,242.67l65.53,292.26-123.1,45.61,57.57-337.87ZM656.65,591.33l-141.37-381.56,317.59,99.3-176.22,282.26ZM508.76,181.1l22.05-129.41,263.81,218.79-285.86-89.37ZM483.7,176.83l-299.33-10.33L505.75,47.42l-22.05,129.41ZM208.31,514.94l-72.81-324.69,332.56,11.48-259.75,313.21ZM490.1,214.98l144.06,388.81-382.98-65.25-25.77-4.39L490.1,214.98ZM246.9,563.6l379.17,64.6-244.79,225.4-156.33-293.74,21.95,3.74ZM654.16,636.9l101.05,83.8-321.38,119.08,220.33-202.88ZM72.47,604.37l123.1-45.61,140.72,264.4-84.17-69.81-179.65-148.98Z"/></svg>
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @stylistic/max-len */
|
|
2
|
-
import type {
|
|
3
|
-
DappConfig,
|
|
4
|
-
DappIcon,
|
|
5
|
-
DappName,
|
|
6
|
-
DappNavItem,
|
|
7
|
-
DappNavMenuConfig,
|
|
8
|
-
DappPackageManifestPayload,
|
|
9
|
-
DappVersion,
|
|
10
|
-
} from '@xyo-network/os-model'
|
|
11
|
-
import {
|
|
12
|
-
DappConfigSchema,
|
|
13
|
-
DappIconSchema,
|
|
14
|
-
DappMode,
|
|
15
|
-
DappNavItemSchema,
|
|
16
|
-
DappNavMenuConfigSchema,
|
|
17
|
-
} from '@xyo-network/os-model'
|
|
18
|
-
|
|
19
|
-
import DefaultDappManifest from './default.manifest.json' with { type: 'json' }
|
|
20
|
-
|
|
21
|
-
export const DefaultName: DappName = 'DApp Name' as const
|
|
22
|
-
|
|
23
|
-
const version: DappVersion = '1.0.0'
|
|
24
|
-
|
|
25
|
-
export const DefaultConfig: DappConfig = {
|
|
26
|
-
manifest: DefaultDappManifest as unknown as DappPackageManifestPayload,
|
|
27
|
-
modes: [DappMode.Window],
|
|
28
|
-
name: DefaultName,
|
|
29
|
-
schema: DappConfigSchema,
|
|
30
|
-
sources: ['network.xyo.dapp.Default.source'],
|
|
31
|
-
version,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const DefaultDappIcon: DappIcon = {
|
|
35
|
-
active: false,
|
|
36
|
-
installed: 'preInstalled',
|
|
37
|
-
name: DefaultName,
|
|
38
|
-
schema: DappIconSchema,
|
|
39
|
-
type: 'system',
|
|
40
|
-
version,
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export const DefaultPayloads = [DefaultConfig, DefaultDappIcon]
|
|
44
|
-
|
|
45
|
-
export type DefaultMenuItemPaths = 'all' | 'payment-methods' | 'keys' | 'links' | 'crypto' | 'emails' | 'phones' | 'dapps'
|
|
46
|
-
|
|
47
|
-
export const DefaultMenuItems: DappNavItem<DefaultMenuItemPaths>[] = [
|
|
48
|
-
{
|
|
49
|
-
path: 'payment-methods',
|
|
50
|
-
primaryText: 'Payment Methods',
|
|
51
|
-
schema: DappNavItemSchema,
|
|
52
|
-
svgIcon: `
|
|
53
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="none"><path fill="currentColor" d="M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z"/></svg>
|
|
54
|
-
`,
|
|
55
|
-
weight: 0,
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
path: 'keys',
|
|
59
|
-
primaryText: 'API Keys',
|
|
60
|
-
schema: DappNavItemSchema,
|
|
61
|
-
svgIcon: `
|
|
62
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="none"><path fill="currentColor" d="M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z"/></svg>
|
|
63
|
-
`,
|
|
64
|
-
weight: 0,
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
path: 'links',
|
|
68
|
-
primaryText: 'Linked Default',
|
|
69
|
-
schema: DappNavItemSchema,
|
|
70
|
-
svgIcon: `
|
|
71
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="none"><path fill="currentColor" d="M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z"/></svg>
|
|
72
|
-
`,
|
|
73
|
-
weight: 0,
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
path: 'crypto',
|
|
77
|
-
primaryText: 'Crypto Wallets',
|
|
78
|
-
schema: DappNavItemSchema,
|
|
79
|
-
svgIcon: `
|
|
80
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="none"><path fill="currentColor" d="M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z"/></svg>
|
|
81
|
-
`,
|
|
82
|
-
weight: 0,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
path: 'emails',
|
|
86
|
-
primaryText: 'Email Addresses',
|
|
87
|
-
schema: DappNavItemSchema,
|
|
88
|
-
svgIcon: `
|
|
89
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="none"><path fill="currentColor" d="M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z"/></svg>
|
|
90
|
-
`,
|
|
91
|
-
weight: 0,
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
path: 'phones',
|
|
95
|
-
primaryText: 'Phone Numbers',
|
|
96
|
-
schema: DappNavItemSchema,
|
|
97
|
-
svgIcon: `
|
|
98
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="none"><path fill="currentColor" d="M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z"/></svg>
|
|
99
|
-
`,
|
|
100
|
-
weight: 0,
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
path: 'dapps',
|
|
104
|
-
primaryText: 'Dapps',
|
|
105
|
-
schema: DappNavItemSchema,
|
|
106
|
-
svgIcon: `
|
|
107
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="none"><path fill="currentColor" d="M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z"/></svg>
|
|
108
|
-
`,
|
|
109
|
-
weight: 0,
|
|
110
|
-
},
|
|
111
|
-
]
|
|
112
|
-
|
|
113
|
-
export const DefaultMenuConfig: DappNavMenuConfig = {
|
|
114
|
-
defaultPath: 'payment-methods',
|
|
115
|
-
schema: DappNavMenuConfigSchema,
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export const DefaultMenuPayloads = [...DefaultMenuItems, DefaultMenuConfig]
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryFn } from '@storybook/react-vite'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { BrowserRouter } from 'react-router-dom'
|
|
4
|
-
|
|
5
|
-
import { DappMenuDrawer } from '../Drawer.tsx'
|
|
6
|
-
import {
|
|
7
|
-
DefaultConfig, DefaultMenuConfig, DefaultMenuItems,
|
|
8
|
-
} from './DefaultData.tsx'
|
|
9
|
-
|
|
10
|
-
const StorybookEntry: Meta = {
|
|
11
|
-
component: DappMenuDrawer,
|
|
12
|
-
title: 'shared/DappMenuDrawer',
|
|
13
|
-
parameters: { layout: 'fullscreen' },
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const Template: StoryFn<typeof DappMenuDrawer> = (props) => {
|
|
17
|
-
return (
|
|
18
|
-
<BrowserRouter>
|
|
19
|
-
<DappMenuDrawer {...props}>
|
|
20
|
-
</DappMenuDrawer>
|
|
21
|
-
</BrowserRouter>
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const Default = Template.bind({})
|
|
26
|
-
Default.args = {
|
|
27
|
-
activePath: DefaultMenuConfig.defaultPath,
|
|
28
|
-
menuConfig: DefaultMenuConfig,
|
|
29
|
-
menuItems: DefaultMenuItems,
|
|
30
|
-
name: DefaultConfig.name,
|
|
31
|
-
version: DefaultConfig.version,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { Default }
|
|
35
|
-
|
|
36
|
-
export default StorybookEntry
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/compilations/dapp-package-manifest-schema.json",
|
|
3
|
-
"nodes": [
|
|
4
|
-
{
|
|
5
|
-
"config": {
|
|
6
|
-
"accountPath": "0'",
|
|
7
|
-
"name": "DefaultNode",
|
|
8
|
-
"schema": "network.xyo.node.config"
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"external": {
|
|
13
|
-
"modules": [
|
|
14
|
-
{
|
|
15
|
-
"name": "OsDefaultNode"
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
"schema": "network.xyo.manifest.package.dapp"
|
|
20
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './lib/index.ts'
|
|
2
|
-
export * from './menu/index.ts'
|
|
3
|
-
export * from './route/index.ts'
|
|
4
|
-
export * from './useDebugClick.ts'
|
|
5
|
-
export * from './useDecomposeDapp.tsx'
|
|
6
|
-
export * from './useExposedNode.ts'
|
|
7
|
-
export * from './useSkipLoadingScreen.js'
|
|
8
|
-
export * from './useSyncOsRegisteredAccessInterfaces.js'
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { NameTransforms } from '@xyo-network/os-runtime'
|
|
2
|
-
|
|
3
|
-
export const DappPathHelpers = {
|
|
4
|
-
// update the url based off the path
|
|
5
|
-
deriveDestinationPath(path: string, defaultPath: string | undefined, dappName?: string) {
|
|
6
|
-
const rootPath = `/${new NameTransforms(dappName ?? '').slug()}`
|
|
7
|
-
const nestedPath = `${rootPath}/${path}`
|
|
8
|
-
return path === defaultPath ? rootPath : nestedPath
|
|
9
|
-
},
|
|
10
|
-
// derive the path for the nav selection
|
|
11
|
-
derivePathForNavSelection(newPath?: string, currentPath?: string, defaultPath?: string) {
|
|
12
|
-
let derivedPath: string | undefined
|
|
13
|
-
|
|
14
|
-
// If the path is not set, set it to the default path
|
|
15
|
-
if (newPath === undefined && defaultPath) {
|
|
16
|
-
derivedPath = defaultPath
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// If the path has changed, update the selection (the back button case where onPathChanged was not called)
|
|
20
|
-
if (newPath && currentPath !== newPath) {
|
|
21
|
-
derivedPath = newPath
|
|
22
|
-
}
|
|
23
|
-
return derivedPath
|
|
24
|
-
},
|
|
25
|
-
// detect duplicate nav selections
|
|
26
|
-
detectDuplicateSelections(lastSavedPath?: string, path?: string, defaultPath?: string) {
|
|
27
|
-
// If the path is the default path and the current path ref is empty, then we are already at the default path
|
|
28
|
-
const selectedDefaultPathAgain = path === defaultPath && lastSavedPath === ''
|
|
29
|
-
// If the path is the same as the last seen path, then we don't need to navigate
|
|
30
|
-
const pathIsUnchanged = lastSavedPath === path
|
|
31
|
-
|
|
32
|
-
return selectedDefaultPathAgain || pathIsUnchanged
|
|
33
|
-
},
|
|
34
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export const CustomerParams = [
|
|
2
|
-
{ key: 'utm_source', value: 'coin' },
|
|
3
|
-
{
|
|
4
|
-
key: 'receipt', matches: '*', value: 'receiptHash',
|
|
5
|
-
},
|
|
6
|
-
]
|
|
7
|
-
|
|
8
|
-
export const detectCustomer = () => {
|
|
9
|
-
return CustomerParams.find((customerParamSet) => {
|
|
10
|
-
const searchParams = new URLSearchParams(globalThis.location.search)
|
|
11
|
-
const searchParamValue = searchParams.get(customerParamSet.key)
|
|
12
|
-
|
|
13
|
-
// if the customerParamSet.key is present and matches in *, we don't care about the value
|
|
14
|
-
if (searchParams.has(customerParamSet.key) && customerParamSet.matches === '*') {
|
|
15
|
-
return true
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// if the customerParamSet.value is defined, we care if the key is present and the value matches
|
|
19
|
-
return searchParamValue && searchParamValue === customerParamSet.value
|
|
20
|
-
})
|
|
21
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { usePromise } from '@xylabs/react-promise'
|
|
2
|
-
import type { Payload } from '@xyo-network/payload-model'
|
|
3
|
-
|
|
4
|
-
import { useXyOsUiContext } from '../../../../../XyOsUi/index.ts'
|
|
5
|
-
import { DappMenuResourceHooks } from './useBuildDappMenuResource.ts'
|
|
6
|
-
import { useDappMenuCaller } from './useDappMenuCaller.ts'
|
|
7
|
-
|
|
8
|
-
export const useAddDappMenuItems = (payloads: Payload[]) => {
|
|
9
|
-
const xyOs = useXyOsUiContext()
|
|
10
|
-
const {
|
|
11
|
-
menuItemSelections, menuConfigs, resourceError,
|
|
12
|
-
} = DappMenuResourceHooks.resourceViewsFromContext(xyOs)
|
|
13
|
-
const dappMenuCaller = useDappMenuCaller()
|
|
14
|
-
|
|
15
|
-
const [, addMenuItemsError] = usePromise(async () => {
|
|
16
|
-
await dappMenuCaller?.add(payloads)
|
|
17
|
-
}, [payloads, dappMenuCaller])
|
|
18
|
-
|
|
19
|
-
return {
|
|
20
|
-
addMenuItemsError,
|
|
21
|
-
menuConfig: menuConfigs?.[0],
|
|
22
|
-
path: menuItemSelections?.[0],
|
|
23
|
-
error: resourceError,
|
|
24
|
-
}
|
|
25
|
-
}
|