@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,39 +0,0 @@
|
|
|
1
|
-
import { Snackbar } from '@mui/material'
|
|
2
|
-
import { ErrorBoundary, ErrorRender } from '@xylabs/react-error'
|
|
3
|
-
import type { PropsWithChildren } from 'react'
|
|
4
|
-
import React, { useMemo } from 'react'
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
useManageDappInjectableParamsFromRoute, useManageDappPathFromRoute, useSyncOsRegisteredAccessInterfaces,
|
|
8
|
-
} from './hooks/index.ts'
|
|
9
|
-
import { DappMetaTags } from './MetaTags.tsx'
|
|
10
|
-
import type { DappWindowProps } from './types/index.ts'
|
|
11
|
-
|
|
12
|
-
/** A component that can load immediately, but delays node loading and dapp mounting till corresponding launch intent arrives */
|
|
13
|
-
export const DappWindow: React.FC<DappWindowProps & PropsWithChildren> = ({
|
|
14
|
-
children, context, dapp, dappMenuProperties, dappState,
|
|
15
|
-
}) => {
|
|
16
|
-
const { name } = dapp?.config ?? {}
|
|
17
|
-
|
|
18
|
-
const { active } = dappState ?? {}
|
|
19
|
-
|
|
20
|
-
useSyncOsRegisteredAccessInterfaces(context)
|
|
21
|
-
const routingError = useManageDappPathFromRoute(context, name)
|
|
22
|
-
const injectableErrors = useManageDappInjectableParamsFromRoute(context)
|
|
23
|
-
|
|
24
|
-
const resolvedErrors = useMemo(() => [...injectableErrors, routingError].filter(Boolean), [injectableErrors, routingError])
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<ErrorBoundary>
|
|
28
|
-
<DappMetaTags active={active} activePath={dappMenuProperties?.activePath} dappName={name} />
|
|
29
|
-
{resolvedErrors.map(error => (
|
|
30
|
-
<Snackbar
|
|
31
|
-
key={error?.message}
|
|
32
|
-
open={!!error}
|
|
33
|
-
message={<ErrorRender error={error} scope="DappWindow" />}
|
|
34
|
-
/>
|
|
35
|
-
))}
|
|
36
|
-
{children}
|
|
37
|
-
</ErrorBoundary>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Fade, styled, Typography,
|
|
3
|
-
} from '@mui/material'
|
|
4
|
-
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
5
|
-
import { FlexCol } from '@xylabs/react-flexbox'
|
|
6
|
-
import type { DappName } from '@xyo-network/os-model'
|
|
7
|
-
import React, { useEffect, useState } from 'react'
|
|
8
|
-
|
|
9
|
-
import { LoadingOsLogo } from '../../../LoadingOsLogo/index.ts'
|
|
10
|
-
import { useSkipLoadingScreen } from './hooks/index.ts'
|
|
11
|
-
import { TextTrail } from './Trail.js'
|
|
12
|
-
|
|
13
|
-
export interface DappLoadingFlexBoxProps extends FlexBoxProps {
|
|
14
|
-
minimize: boolean
|
|
15
|
-
name?: DappName
|
|
16
|
-
open: boolean
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const DappLoadingFlexbox: React.FC<DappLoadingFlexBoxProps> = ({
|
|
20
|
-
minimize, open, name, ...props
|
|
21
|
-
}) => {
|
|
22
|
-
// keep slash visible when open is false
|
|
23
|
-
const [fadeIn, setFadeIn] = useState(!open)
|
|
24
|
-
const [trail, setTrail] = useState(false)
|
|
25
|
-
const skipLoadingScreen = useSkipLoadingScreen()
|
|
26
|
-
|
|
27
|
-
// For now, loading of the node is instantaneous so this is meant to ensure we pause 1.5s minimum before
|
|
28
|
-
// hiding splash ui
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
if (open) {
|
|
31
|
-
if (skipLoadingScreen) {
|
|
32
|
-
setFadeIn(false)
|
|
33
|
-
return
|
|
34
|
-
}
|
|
35
|
-
// Sets time of load experience & fade
|
|
36
|
-
const fadeInTimeout = setTimeout(() => {
|
|
37
|
-
setFadeIn(false)
|
|
38
|
-
}, 2000)
|
|
39
|
-
|
|
40
|
-
let trailTimeout = setTimeout(() => {
|
|
41
|
-
setTrail(true)
|
|
42
|
-
// Re-set trail after time passes
|
|
43
|
-
trailTimeout = setTimeout(() => {
|
|
44
|
-
setTrail(false)
|
|
45
|
-
}, 4000)
|
|
46
|
-
}, 300)
|
|
47
|
-
return () => {
|
|
48
|
-
clearTimeout(fadeInTimeout)
|
|
49
|
-
clearTimeout(trailTimeout)
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
// if not open and not minimized, reset fadeIn
|
|
53
|
-
if (!minimize) {
|
|
54
|
-
setFadeIn(true)
|
|
55
|
-
}
|
|
56
|
-
}, [minimize, open, skipLoadingScreen])
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
<Fade in={fadeIn} unmountOnExit>
|
|
60
|
-
<StyledSplashContainer {...props}>
|
|
61
|
-
<LoadingOsLogo widthInPixels={100} busy position="absolute" />
|
|
62
|
-
<TextTrail open={trail} flexDirection="row">
|
|
63
|
-
<Typography
|
|
64
|
-
textAlign="center"
|
|
65
|
-
sx={{ fontSize: { md: '3em', xs: '2em' } }}
|
|
66
|
-
>
|
|
67
|
-
Loading
|
|
68
|
-
</Typography>
|
|
69
|
-
<Typography
|
|
70
|
-
textAlign="center"
|
|
71
|
-
sx={{ fontSize: { md: '3em', xs: '2em' } }}
|
|
72
|
-
>
|
|
73
|
-
{name}
|
|
74
|
-
</Typography>
|
|
75
|
-
<Typography
|
|
76
|
-
textAlign="center"
|
|
77
|
-
sx={{ fontSize: { md: '3em', xs: '2em' } }}
|
|
78
|
-
>
|
|
79
|
-
dApp
|
|
80
|
-
</Typography>
|
|
81
|
-
</TextTrail>
|
|
82
|
-
</StyledSplashContainer>
|
|
83
|
-
</Fade>
|
|
84
|
-
)
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const StyledSplashContainer = styled(FlexCol, { name: 'StyledSplashContainer' })(({ theme }) => {
|
|
88
|
-
return {
|
|
89
|
-
background: theme.vars?.palette.background.default,
|
|
90
|
-
color: theme.vars?.palette.text.primary,
|
|
91
|
-
gap: theme.spacing(1),
|
|
92
|
-
height: '100%',
|
|
93
|
-
left: 0,
|
|
94
|
-
position: 'absolute',
|
|
95
|
-
top: 0,
|
|
96
|
-
width: '100%',
|
|
97
|
-
zIndex: 999,
|
|
98
|
-
}
|
|
99
|
-
})
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { NameTransforms } from '@xyo-network/os-runtime'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { Helmet } from 'react-helmet'
|
|
4
|
-
|
|
5
|
-
export interface DappMetaTagsProps {
|
|
6
|
-
active?: boolean
|
|
7
|
-
activePath?: string
|
|
8
|
-
dappName?: string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const DappMetaTags: React.FC<DappMetaTagsProps> = ({
|
|
12
|
-
active, activePath, dappName,
|
|
13
|
-
}) => {
|
|
14
|
-
return active
|
|
15
|
-
? (
|
|
16
|
-
<Helmet>
|
|
17
|
-
<title>
|
|
18
|
-
{activePath ? `${new NameTransforms(activePath).deSlug()} | ` : ''}
|
|
19
|
-
{' '}
|
|
20
|
-
{dappName}
|
|
21
|
-
{' '}
|
|
22
|
-
dApp
|
|
23
|
-
</title>
|
|
24
|
-
</Helmet>
|
|
25
|
-
)
|
|
26
|
-
: null
|
|
27
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { usePromise } from '@xylabs/react-promise'
|
|
2
|
-
import { useProvidedNode } from '@xyo-network/react-node'
|
|
3
|
-
import React from 'react'
|
|
4
|
-
|
|
5
|
-
export const NodeManifest = () => {
|
|
6
|
-
const [node] = useProvidedNode()
|
|
7
|
-
const [nodeManifest] = usePromise(async () => await node?.manifest(3), [node])
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<>
|
|
11
|
-
{node
|
|
12
|
-
? <pre>{JSON.stringify(nodeManifest, null, 2)}</pre>
|
|
13
|
-
: null}
|
|
14
|
-
</>
|
|
15
|
-
)
|
|
16
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { ErrorRender } from '@xylabs/react-error'
|
|
2
|
-
import { FlexCol } from '@xylabs/react-flexbox'
|
|
3
|
-
import { NameTransforms } from '@xyo-network/os-runtime'
|
|
4
|
-
import { NodeProvider } from '@xyo-network/react-node'
|
|
5
|
-
import { WalletProvider } from '@xyo-network/react-wallet'
|
|
6
|
-
import React from 'react'
|
|
7
|
-
|
|
8
|
-
import { XyOsUiContextProvider } from '../../../XyOsUi/index.ts'
|
|
9
|
-
import { DappAccessFlexbox } from '../access-interface/index.ts'
|
|
10
|
-
import { DappBar } from './AppBar.tsx'
|
|
11
|
-
import { DappChrome } from './Chrome.tsx'
|
|
12
|
-
import { DappBottomNavigation, DappMenuDrawer } from './components/index.ts'
|
|
13
|
-
import { useDecomposeDapp } from './hooks/index.ts'
|
|
14
|
-
import { DappLoadingFlexbox } from './LoadingFlexbox.tsx'
|
|
15
|
-
import type { DappWindowProps } from './types/index.ts'
|
|
16
|
-
|
|
17
|
-
/** A pure component that can render a dapp via props only */
|
|
18
|
-
export const DappRendered: React.FC<DappWindowProps> = ({
|
|
19
|
-
context, dapp, dappMenuProperties, dappState, dappWallet, errors,
|
|
20
|
-
}) => {
|
|
21
|
-
const {
|
|
22
|
-
DappComponent, name, scrollable = true, version,
|
|
23
|
-
} = useDecomposeDapp(dapp)
|
|
24
|
-
|
|
25
|
-
const { active, minimized } = dappState ?? {}
|
|
26
|
-
|
|
27
|
-
const hasErrors = errors && errors.length > 0
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<DappChrome
|
|
31
|
-
/* Keep DappBar outside of the Dapp's Node Provider so it can still see the intentArchivist for close and minimize */
|
|
32
|
-
appBar={(
|
|
33
|
-
<DappBar
|
|
34
|
-
context={context}
|
|
35
|
-
name={name}
|
|
36
|
-
version={version}
|
|
37
|
-
title={dappMenuProperties?.activePath ? new NameTransforms(dappMenuProperties.activePath).deSlug() : ''}
|
|
38
|
-
/>
|
|
39
|
-
)}
|
|
40
|
-
height="100dvh"
|
|
41
|
-
width="100dvw"
|
|
42
|
-
largeScreenMenu={active && (
|
|
43
|
-
<DappMenuDrawer
|
|
44
|
-
context={context}
|
|
45
|
-
name={name}
|
|
46
|
-
version={version}
|
|
47
|
-
{...dappMenuProperties}
|
|
48
|
-
/>
|
|
49
|
-
)}
|
|
50
|
-
smallScreenMenu={active && (
|
|
51
|
-
<DappBottomNavigation
|
|
52
|
-
{...dappMenuProperties}
|
|
53
|
-
sx={{ display: dappMenuProperties?.menuConfig ? 'flex' : 'none' }}
|
|
54
|
-
/>
|
|
55
|
-
)}
|
|
56
|
-
/* Ensure that loading goes away when error occurs */
|
|
57
|
-
splashScreen={hasErrors ? null : <DappLoadingFlexbox minimize={!!minimized} name={name} open={!!active} />}
|
|
58
|
-
>
|
|
59
|
-
{hasErrors
|
|
60
|
-
? (
|
|
61
|
-
<FlexCol padding={2}>
|
|
62
|
-
{errors?.map(error => (
|
|
63
|
-
<ErrorRender key={error?.message} error={error} scope="DappWindow" />
|
|
64
|
-
))}
|
|
65
|
-
</FlexCol>
|
|
66
|
-
)
|
|
67
|
-
: null}
|
|
68
|
-
<WalletProvider rootWallet={dappWallet}>
|
|
69
|
-
{/* Only load the dapp component when the dapp's node exists and dapp is launched */}
|
|
70
|
-
{context === null
|
|
71
|
-
? null
|
|
72
|
-
: (
|
|
73
|
-
<XyOsUiContextProvider value={context}>
|
|
74
|
-
{/* Prevent dapps from reaching out to the os node */}
|
|
75
|
-
<NodeProvider node={context?.root}>
|
|
76
|
-
{active
|
|
77
|
-
? (
|
|
78
|
-
<>
|
|
79
|
-
<FlexCol
|
|
80
|
-
position="absolute"
|
|
81
|
-
top={0}
|
|
82
|
-
left={0}
|
|
83
|
-
right={0}
|
|
84
|
-
bottom={0}
|
|
85
|
-
alignItems="stretch"
|
|
86
|
-
justifyContent="stretch"
|
|
87
|
-
sx={{ overflowY: scrollable ? 'auto' : 'hidden' }}
|
|
88
|
-
>
|
|
89
|
-
<DappComponent name={dapp?.config.name} />
|
|
90
|
-
</FlexCol>
|
|
91
|
-
<DappAccessFlexbox context={context} />
|
|
92
|
-
</>
|
|
93
|
-
)
|
|
94
|
-
: null}
|
|
95
|
-
</NodeProvider>
|
|
96
|
-
</XyOsUiContextProvider>
|
|
97
|
-
)}
|
|
98
|
-
</WalletProvider>
|
|
99
|
-
</DappChrome>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { a, useTrail } from '@react-spring/web'
|
|
2
|
-
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
3
|
-
import React from 'react'
|
|
4
|
-
|
|
5
|
-
interface TextTrailProps extends FlexBoxProps {
|
|
6
|
-
open: boolean
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const TextTrail: React.FC<TextTrailProps> = ({ open, children }) => {
|
|
10
|
-
const items = React.Children.toArray(children)
|
|
11
|
-
const trail = useTrail(items.length, {
|
|
12
|
-
config: {
|
|
13
|
-
friction: 200, mass: 5, tension: 2000,
|
|
14
|
-
},
|
|
15
|
-
from: {
|
|
16
|
-
height: 'auto', opacity: 0, y: 20,
|
|
17
|
-
},
|
|
18
|
-
height: 'auto',
|
|
19
|
-
opacity: open ? 1 : 0,
|
|
20
|
-
y: open ? 0 : 60,
|
|
21
|
-
})
|
|
22
|
-
return (
|
|
23
|
-
<div>
|
|
24
|
-
{trail.map(({ height, ...style }, index) => (
|
|
25
|
-
<a.div key={index} style={style}>
|
|
26
|
-
<a.div style={{ height }}>
|
|
27
|
-
{items[index]}
|
|
28
|
-
</a.div>
|
|
29
|
-
</a.div>
|
|
30
|
-
))}
|
|
31
|
-
</div>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Card, CardContent, Chip, Container, Divider, Typography, useTheme,
|
|
3
|
-
} from '@mui/material'
|
|
4
|
-
import { FlexGrowCol, FlexRow } from '@xylabs/react-flexbox'
|
|
5
|
-
import { alphaCss } from '@xylabs/react-theme'
|
|
6
|
-
import type { DappName, DappVersion } from '@xyo-network/os-model'
|
|
7
|
-
import type { PropsWithChildren } from 'react'
|
|
8
|
-
import React from 'react'
|
|
9
|
-
|
|
10
|
-
import { InstallButtonSection } from './InstallButtonSection.js'
|
|
11
|
-
import { SummarySection } from './SummarySection.js'
|
|
12
|
-
|
|
13
|
-
export interface DefaultComingSoonProps extends PropsWithChildren {
|
|
14
|
-
children?: React.ReactNode
|
|
15
|
-
dappIconSvg?: string
|
|
16
|
-
desc?: Array<string>
|
|
17
|
-
developerLink?: string
|
|
18
|
-
name?: DappName
|
|
19
|
-
version?: DappVersion
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const defaultDescription = ['Description coming soon!']
|
|
23
|
-
|
|
24
|
-
export const DefaultComingSoon: React.FC<DefaultComingSoonProps> = ({
|
|
25
|
-
children,
|
|
26
|
-
desc = defaultDescription,
|
|
27
|
-
developerLink = 'https://xylabs.com',
|
|
28
|
-
name,
|
|
29
|
-
dappIconSvg,
|
|
30
|
-
version,
|
|
31
|
-
}) => {
|
|
32
|
-
const theme = useTheme()
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<Container
|
|
36
|
-
maxWidth="md"
|
|
37
|
-
sx={{
|
|
38
|
-
minHeight: '100%', overflow: 'auto', paddingTop: 2, width: '100%',
|
|
39
|
-
}}
|
|
40
|
-
>
|
|
41
|
-
{version
|
|
42
|
-
? null
|
|
43
|
-
: (
|
|
44
|
-
<FlexRow width="100%" paddingBottom={2}>
|
|
45
|
-
<Chip
|
|
46
|
-
label="This app is not yet publicly available on xyOS"
|
|
47
|
-
sx={{
|
|
48
|
-
backgroundColor: alphaCss(theme.vars?.palette.info.main ?? '#000', 0.2), color: theme.vars?.palette.info.main, width: '100%',
|
|
49
|
-
}}
|
|
50
|
-
>
|
|
51
|
-
</Chip>
|
|
52
|
-
</FlexRow>
|
|
53
|
-
)}
|
|
54
|
-
<FlexGrowCol width="100%" alignItems="flex-start" minHeight="100%">
|
|
55
|
-
<FlexGrowCol width="100%" alignItems="stretch" justifyContent="flex-start" gap={2}>
|
|
56
|
-
<SummarySection dappIconSvg={dappIconSvg} name={name} version={version} developerLink={developerLink} />
|
|
57
|
-
<InstallButtonSection />
|
|
58
|
-
<Divider flexItem />
|
|
59
|
-
<Card>
|
|
60
|
-
<CardContent>
|
|
61
|
-
<FlexGrowCol justifyContent="flex-start" alignItems="flex-start">
|
|
62
|
-
<Typography variant="h6" gutterBottom>
|
|
63
|
-
Learn more about
|
|
64
|
-
{' '}
|
|
65
|
-
{name}
|
|
66
|
-
</Typography>
|
|
67
|
-
{desc?.map((paragraph: string, index: number) => {
|
|
68
|
-
return (
|
|
69
|
-
<Typography gutterBottom paddingBottom={1} key={index} variant="body1">
|
|
70
|
-
{paragraph}
|
|
71
|
-
</Typography>
|
|
72
|
-
)
|
|
73
|
-
})}
|
|
74
|
-
</FlexGrowCol>
|
|
75
|
-
</CardContent>
|
|
76
|
-
</Card>
|
|
77
|
-
{children}
|
|
78
|
-
</FlexGrowCol>
|
|
79
|
-
</FlexGrowCol>
|
|
80
|
-
</Container>
|
|
81
|
-
)
|
|
82
|
-
}
|
package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/DeveloperLinkSection.tsx
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { useTheme } from '@mui/material'
|
|
2
|
-
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
3
|
-
import { FlexGrowRow } from '@xylabs/react-flexbox'
|
|
4
|
-
import { LinkEx } from '@xylabs/react-link'
|
|
5
|
-
import React from 'react'
|
|
6
|
-
|
|
7
|
-
export interface DeveloperLinkSectionProps extends FlexBoxProps {
|
|
8
|
-
developerLink: string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const DeveloperLinkSection: React.FC<DeveloperLinkSectionProps> = ({ developerLink = 'https://xylabs.com', ...props }) => {
|
|
12
|
-
const theme = useTheme()
|
|
13
|
-
return (
|
|
14
|
-
<FlexGrowRow
|
|
15
|
-
gap={1}
|
|
16
|
-
sx={{
|
|
17
|
-
alignItems: 'flex-start',
|
|
18
|
-
flexDirection: { md: 'row', xs: 'column' },
|
|
19
|
-
}}
|
|
20
|
-
{...props}
|
|
21
|
-
>
|
|
22
|
-
<LinkEx color={theme.vars?.palette.info.main} href={developerLink} target="_blank">
|
|
23
|
-
{developerLink}
|
|
24
|
-
</LinkEx>
|
|
25
|
-
</FlexGrowRow>
|
|
26
|
-
)
|
|
27
|
-
}
|
package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/InstallButtonSection.tsx
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ButtonEx } from '@xylabs/react-button'
|
|
2
|
-
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
3
|
-
import { FlexRow } from '@xylabs/react-flexbox'
|
|
4
|
-
import React from 'react'
|
|
5
|
-
|
|
6
|
-
export interface InstallButtonSectionProps extends FlexBoxProps {
|
|
7
|
-
installLink?: string
|
|
8
|
-
notificationLink?: string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const InstallButtonSection: React.FC<InstallButtonSectionProps> = ({
|
|
12
|
-
installLink = '',
|
|
13
|
-
notificationLink = 'https://xyo.network/newsletter',
|
|
14
|
-
...props
|
|
15
|
-
}) => {
|
|
16
|
-
return (
|
|
17
|
-
<FlexRow
|
|
18
|
-
width="100%"
|
|
19
|
-
gap={1}
|
|
20
|
-
sx={{
|
|
21
|
-
alignItems: 'flex-start',
|
|
22
|
-
flexDirection: { md: 'row', xs: 'column' },
|
|
23
|
-
}}
|
|
24
|
-
{...props}
|
|
25
|
-
>
|
|
26
|
-
<ButtonEx fullWidth variant="contained" disabled href={installLink}>
|
|
27
|
-
Install
|
|
28
|
-
</ButtonEx>
|
|
29
|
-
<ButtonEx fullWidth variant="outlined" href={notificationLink} target="_blank">
|
|
30
|
-
Get Notified When Available
|
|
31
|
-
</ButtonEx>
|
|
32
|
-
</FlexRow>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { VerifiedRounded } from '@mui/icons-material'
|
|
2
|
-
import {
|
|
3
|
-
Card, CardContent, Typography, useTheme,
|
|
4
|
-
} from '@mui/material'
|
|
5
|
-
import {
|
|
6
|
-
FlexGrowCol, FlexGrowRow, FlexRow,
|
|
7
|
-
} from '@xylabs/react-flexbox'
|
|
8
|
-
import type { DappName, DappVersion } from '@xyo-network/os-model'
|
|
9
|
-
import React from 'react'
|
|
10
|
-
|
|
11
|
-
import { RenderHtml } from '../../../../RenderHtml.tsx'
|
|
12
|
-
import { DeveloperLinkSection } from './DeveloperLinkSection.js'
|
|
13
|
-
|
|
14
|
-
export interface SummarySectionProps {
|
|
15
|
-
dappIconSvg?: string
|
|
16
|
-
developerLink: string
|
|
17
|
-
name?: DappName
|
|
18
|
-
version?: DappVersion
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const SummarySection: React.FC<SummarySectionProps> = ({
|
|
22
|
-
name, dappIconSvg, version = '1.0', developerLink = 'https://xylabs.com',
|
|
23
|
-
}) => {
|
|
24
|
-
const theme = useTheme()
|
|
25
|
-
return (
|
|
26
|
-
<Card sx={{ width: '100%' }}>
|
|
27
|
-
<CardContent>
|
|
28
|
-
<FlexRow
|
|
29
|
-
gap={3}
|
|
30
|
-
alignItems="flex-start"
|
|
31
|
-
sx={{ flexDirection: 'column', width: '100%' }}
|
|
32
|
-
>
|
|
33
|
-
<FlexGrowRow
|
|
34
|
-
sx={{ gap: { md: 2, xs: 1 } }}
|
|
35
|
-
alignItems="flex-start"
|
|
36
|
-
>
|
|
37
|
-
<Card elevation={0} variant="outlined">
|
|
38
|
-
<CardContent>
|
|
39
|
-
{dappIconSvg
|
|
40
|
-
? <RenderHtml htmlString={dappIconSvg} />
|
|
41
|
-
: null}
|
|
42
|
-
</CardContent>
|
|
43
|
-
</Card>
|
|
44
|
-
<FlexGrowCol alignItems="flex-start">
|
|
45
|
-
<FlexGrowCol alignItems="flex-start">
|
|
46
|
-
<Typography
|
|
47
|
-
sx={{ fontSize: { md: theme.typography.h1.fontSize, xs: theme.typography.h5.fontSize } }}
|
|
48
|
-
fontWeight={theme.typography.fontWeightBold}
|
|
49
|
-
>
|
|
50
|
-
{name}
|
|
51
|
-
</Typography>
|
|
52
|
-
<Typography gutterBottom variant="subtitle2">
|
|
53
|
-
Version:
|
|
54
|
-
{' '}
|
|
55
|
-
{version}
|
|
56
|
-
</Typography>
|
|
57
|
-
</FlexGrowCol>
|
|
58
|
-
<FlexGrowRow gap={0.5} alignItems="center" justifyContent="center">
|
|
59
|
-
<VerifiedRounded color="success" fontSize="small" />
|
|
60
|
-
<Typography variant="body1" color={theme.vars?.palette.success.main}>
|
|
61
|
-
XY Labs
|
|
62
|
-
</Typography>
|
|
63
|
-
</FlexGrowRow>
|
|
64
|
-
{developerLink
|
|
65
|
-
? <DeveloperLinkSection developerLink={developerLink} />
|
|
66
|
-
: null}
|
|
67
|
-
</FlexGrowCol>
|
|
68
|
-
</FlexGrowRow>
|
|
69
|
-
</FlexRow>
|
|
70
|
-
</CardContent>
|
|
71
|
-
</Card>
|
|
72
|
-
)
|
|
73
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './DefaultComingSoon.js'
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BugReport, KeyboardArrowDownRounded, KeyboardArrowUpRounded,
|
|
3
|
-
} from '@mui/icons-material'
|
|
4
|
-
import {
|
|
5
|
-
Card,
|
|
6
|
-
Collapse,
|
|
7
|
-
Divider,
|
|
8
|
-
IconButton,
|
|
9
|
-
Stack,
|
|
10
|
-
Toolbar,
|
|
11
|
-
Tooltip,
|
|
12
|
-
Typography,
|
|
13
|
-
useTheme,
|
|
14
|
-
} from '@mui/material'
|
|
15
|
-
import { RotationAnimation } from '@xylabs/react-animation'
|
|
16
|
-
import { FlexCol, FlexRow } from '@xylabs/react-flexbox'
|
|
17
|
-
import { LinkEx } from '@xylabs/react-link'
|
|
18
|
-
import { ColorSchemeButton } from '@xylabs/react-theme'
|
|
19
|
-
import React, { useState } from 'react'
|
|
20
|
-
|
|
21
|
-
import { XyoOSLogoWhite } from './img/index.ts'
|
|
22
|
-
import { socialLinksData } from './SocialData.js'
|
|
23
|
-
|
|
24
|
-
export interface BottomMenuAreaProps {
|
|
25
|
-
backgroundColor: string
|
|
26
|
-
openDebug: () => void
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const BottomMenuArea: React.FC<BottomMenuAreaProps> = ({ openDebug, backgroundColor }) => {
|
|
30
|
-
const theme = useTheme()
|
|
31
|
-
const [expanded, setExpanded] = useState(false)
|
|
32
|
-
|
|
33
|
-
// Toggle expand/collapse
|
|
34
|
-
const handleExpandClick = () => {
|
|
35
|
-
setExpanded(!expanded)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<Card
|
|
40
|
-
sx={{
|
|
41
|
-
position: 'relative',
|
|
42
|
-
borderTopLeftRadius: '10px',
|
|
43
|
-
borderTopRightRadius: '10px',
|
|
44
|
-
borderBottomLeftRadius: '0px',
|
|
45
|
-
borderBottomRightRadius: '0px',
|
|
46
|
-
backgroundColor: backgroundColor,
|
|
47
|
-
overflow: 'hidden',
|
|
48
|
-
}}
|
|
49
|
-
elevation={4}
|
|
50
|
-
>
|
|
51
|
-
{/* Collapsed View */}
|
|
52
|
-
<FlexCol paddingY={1} alignItems="stretch">
|
|
53
|
-
<Stack
|
|
54
|
-
paddingX={2}
|
|
55
|
-
justifyContent="space-between"
|
|
56
|
-
flexDirection="row"
|
|
57
|
-
gap={0.5}
|
|
58
|
-
onClick={handleExpandClick}
|
|
59
|
-
sx={{ textTransform: 'none', cursor: 'pointer' }}
|
|
60
|
-
>
|
|
61
|
-
<Typography gutterBottom={false}>More</Typography>
|
|
62
|
-
{expanded ? <KeyboardArrowUpRounded sx={{ color: '#fff' }} /> : <KeyboardArrowDownRounded sx={{ color: '#fff' }} />}
|
|
63
|
-
</Stack>
|
|
64
|
-
</FlexCol>
|
|
65
|
-
{/* Expanded Content */}
|
|
66
|
-
<Collapse in={expanded} timeout="auto" unmountOnExit sx={{ paddingBottom: 3, color: '#fff' }}>
|
|
67
|
-
<Divider flexItem></Divider>
|
|
68
|
-
<FlexCol alignItems="center">
|
|
69
|
-
<Toolbar sx={{ paddingX: 1.5 }}>
|
|
70
|
-
<Tooltip title="Debug Node View">
|
|
71
|
-
<IconButton onClick={openDebug} sx={{ color: '#fff' }}>
|
|
72
|
-
<BugReport />
|
|
73
|
-
</IconButton>
|
|
74
|
-
</Tooltip>
|
|
75
|
-
<Tooltip title="Toggle Light/Dark Mode">
|
|
76
|
-
<span>
|
|
77
|
-
<ColorSchemeButton />
|
|
78
|
-
</span>
|
|
79
|
-
</Tooltip>
|
|
80
|
-
</Toolbar>
|
|
81
|
-
<FlexRow flexWrap="wrap">
|
|
82
|
-
{socialLinksData.map(social => (
|
|
83
|
-
<RotationAnimation key={social.link} rotation={20}>
|
|
84
|
-
<IconButton
|
|
85
|
-
sx={{ color: '#fff' }}
|
|
86
|
-
href={social.link}
|
|
87
|
-
target="_blank"
|
|
88
|
-
|
|
89
|
-
>
|
|
90
|
-
{social.icon}
|
|
91
|
-
</IconButton>
|
|
92
|
-
</RotationAnimation>
|
|
93
|
-
))}
|
|
94
|
-
</FlexRow>
|
|
95
|
-
<FlexRow padding={1} justifyContent="center" gap={0.5}>
|
|
96
|
-
<Typography variant="body2" color={theme.vars?.palette.text.primary}>
|
|
97
|
-
Powered By
|
|
98
|
-
</Typography>
|
|
99
|
-
<img
|
|
100
|
-
style={{ color: theme.vars?.palette.text.primary, fill: theme.vars?.palette.text.primary }}
|
|
101
|
-
src={XyoOSLogoWhite}
|
|
102
|
-
width="auto"
|
|
103
|
-
height="20px"
|
|
104
|
-
/>
|
|
105
|
-
</FlexRow>
|
|
106
|
-
<Typography variant="caption" color={theme.vars?.palette.text.primary}>
|
|
107
|
-
Copyright © 2024 XY Labs, Inc.
|
|
108
|
-
</Typography>
|
|
109
|
-
<Stack gap={0.5} flexDirection="row">
|
|
110
|
-
<LinkEx color="inherit" target="_blank" href="https://xylabs.com/privacy/">
|
|
111
|
-
<Typography variant="caption">Privacy</Typography>
|
|
112
|
-
</LinkEx>
|
|
113
|
-
{' '}
|
|
114
|
-
•
|
|
115
|
-
{' '}
|
|
116
|
-
<LinkEx color="inherit" target="_blank" href="https://xylabs.com/terms/">
|
|
117
|
-
<Typography variant="caption">Terms</Typography>
|
|
118
|
-
</LinkEx>
|
|
119
|
-
{' '}
|
|
120
|
-
•
|
|
121
|
-
{' '}
|
|
122
|
-
<LinkEx color="inherit" target="_blank" href="https://xyo.network/">
|
|
123
|
-
<Typography variant="caption">XYO Website</Typography>
|
|
124
|
-
</LinkEx>
|
|
125
|
-
</Stack>
|
|
126
|
-
</FlexCol>
|
|
127
|
-
</Collapse>
|
|
128
|
-
</Card>
|
|
129
|
-
)
|
|
130
|
-
}
|