@xyo-network/os-react-runtime 7.2.1 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +210 -180
- 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 +304 -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,41 +0,0 @@
|
|
|
1
|
-
import { Skeleton } from '@mui/material'
|
|
2
|
-
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
3
|
-
import { FlexGrowCol } from '@xylabs/react-flexbox'
|
|
4
|
-
import React from 'react'
|
|
5
|
-
|
|
6
|
-
import type { InsightStatProps } from './InsightStatProps.ts'
|
|
7
|
-
import { InsightSubtitle } from './Subtitle.tsx'
|
|
8
|
-
import { InsightUnit } from './Unit.tsx'
|
|
9
|
-
import { InsightValue } from './Value.tsx'
|
|
10
|
-
|
|
11
|
-
export interface InsightStatBoxProps extends InsightStatProps, FlexBoxProps {}
|
|
12
|
-
|
|
13
|
-
export const InsightStatBox: React.FC<InsightStatBoxProps> = ({
|
|
14
|
-
uiInsightValue, insightColor, subtitle, unit, ...props
|
|
15
|
-
}) => (
|
|
16
|
-
<FlexGrowCol alignItems="start" {...props}>
|
|
17
|
-
{uiInsightValue
|
|
18
|
-
? (
|
|
19
|
-
<>
|
|
20
|
-
<span>
|
|
21
|
-
<InsightValue variant="caption" color={insightColor}>
|
|
22
|
-
{uiInsightValue}
|
|
23
|
-
</InsightValue>
|
|
24
|
-
{unit
|
|
25
|
-
? <InsightUnit variant="caption">{unit}</InsightUnit>
|
|
26
|
-
: null}
|
|
27
|
-
</span>
|
|
28
|
-
{subtitle
|
|
29
|
-
? <InsightSubtitle variant="caption">{subtitle}</InsightSubtitle>
|
|
30
|
-
: null}
|
|
31
|
-
</>
|
|
32
|
-
)
|
|
33
|
-
: (
|
|
34
|
-
<Skeleton
|
|
35
|
-
height="100%"
|
|
36
|
-
width="100%"
|
|
37
|
-
sx={{ display: 'flex', minHeight: '50px' }}
|
|
38
|
-
/>
|
|
39
|
-
)}
|
|
40
|
-
</FlexGrowCol>
|
|
41
|
-
)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { styled, Typography } from '@mui/material'
|
|
2
|
-
|
|
3
|
-
export const InsightSubtitle = styled(Typography, { name: 'InsightValueContext' })(({ theme }) => {
|
|
4
|
-
return {
|
|
5
|
-
'&.responsive-font-sizes': {
|
|
6
|
-
[theme.breakpoints.up('sm')]: { fontSize: 'calc(var(--baseFontSize) * 0.46)' },
|
|
7
|
-
[theme.breakpoints.up('md')]: { fontSize: 'calc(var(--baseFontSize) * 0.3)' },
|
|
8
|
-
},
|
|
9
|
-
'--baseFontSize': theme.spacing(1),
|
|
10
|
-
'fontSize': 'var(--baseFontSize)',
|
|
11
|
-
'letterSpacing': 0,
|
|
12
|
-
'opacity': 0.6,
|
|
13
|
-
}
|
|
14
|
-
})
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { styled, Typography } from '@mui/material'
|
|
2
|
-
|
|
3
|
-
export const InsightUnit = styled(Typography, { name: 'InsightUnit' })(({ theme }) => {
|
|
4
|
-
return {
|
|
5
|
-
'&.responsive-font-sizes': {
|
|
6
|
-
[theme.breakpoints.up('sm')]: { fontSize: 'calc(var(--baseFontSize) * 0.57)' },
|
|
7
|
-
[theme.breakpoints.up('lg')]: { fontSize: 'calc(var(--baseFontSize) * 0.35)' },
|
|
8
|
-
},
|
|
9
|
-
'fontSize': `var(--insightUnitFontSize, ${theme.spacing(1.85)})`,
|
|
10
|
-
'fontWeight': 500,
|
|
11
|
-
'letterSpacing': 0,
|
|
12
|
-
}
|
|
13
|
-
})
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { styled, Typography } from '@mui/material'
|
|
2
|
-
|
|
3
|
-
export const InsightValue = styled(Typography, { name: 'InsightValue' })(({ theme }) => {
|
|
4
|
-
return {
|
|
5
|
-
'&.responsive-font-sizes': {
|
|
6
|
-
[theme.breakpoints.up('sm')]: { fontSize: 'calc(var(--baseFontSize) * 0.95)' },
|
|
7
|
-
[theme.breakpoints.up('md')]: { fontSize: 'calc(var(--baseFontSize) * 0.72)' },
|
|
8
|
-
[theme.breakpoints.up('lg')]: { fontSize: 'calc(var(--baseFontSize) * 0.62)' },
|
|
9
|
-
},
|
|
10
|
-
'fontSize': `var(--insightValueFontSize, ${theme.spacing(3)})`,
|
|
11
|
-
'letterSpacing': 0,
|
|
12
|
-
'lineHeight': 1,
|
|
13
|
-
'marginRight': theme.spacing(0.5),
|
|
14
|
-
'whiteSpace': 'nowrap',
|
|
15
|
-
}
|
|
16
|
-
})
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { CircleRounded } from '@mui/icons-material'
|
|
2
|
-
import type { SvgIcon } from '@mui/material'
|
|
3
|
-
import {
|
|
4
|
-
Paper, styled, TableRow, Typography,
|
|
5
|
-
} from '@mui/material'
|
|
6
|
-
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
7
|
-
import {
|
|
8
|
-
FlexCol, FlexGrowRow, FlexRow,
|
|
9
|
-
} from '@xylabs/react-flexbox'
|
|
10
|
-
import { alphaCss } from '@xylabs/react-theme'
|
|
11
|
-
import type { ReactNode } from 'react'
|
|
12
|
-
import React from 'react'
|
|
13
|
-
|
|
14
|
-
export interface BooleanTablePropsItemProps {
|
|
15
|
-
name: string
|
|
16
|
-
value: boolean
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const sampleData: BooleanTablePropsItemProps[] = [
|
|
20
|
-
{ name: '@arietrouw', value: true },
|
|
21
|
-
{ name: '@officialxyo', value: false },
|
|
22
|
-
{ name: '0x187623121928634124', value: true },
|
|
23
|
-
{ name: '@coinwithus', value: true },
|
|
24
|
-
{ name: '0x871218376123894321', value: true },
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
export interface BooleanTableProps extends FlexBoxProps {
|
|
28
|
-
falseOutput?: ReactNode
|
|
29
|
-
items: BooleanTablePropsItemProps[]
|
|
30
|
-
tableHeaders: string[]
|
|
31
|
-
trueOutput?: ReactNode
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export const StyledLightTableRow = styled(Paper, { name: 'StyledLightTableRow' })(({ theme }) => ({
|
|
35
|
-
backgroundColor: 'transparent',
|
|
36
|
-
padding: theme.spacing(0.75),
|
|
37
|
-
}))
|
|
38
|
-
|
|
39
|
-
export const StyledTableColumnTitle = styled(Typography, { name: 'StyledTableColumnTitle' })(({ theme }) => ({
|
|
40
|
-
color: theme.vars?.palette.text.secondary,
|
|
41
|
-
fontWeight: theme.typography.fontWeightBold,
|
|
42
|
-
textTransform: 'uppercase',
|
|
43
|
-
}))
|
|
44
|
-
|
|
45
|
-
export const DefaultTrueOutput = styled<typeof SvgIcon>(CircleRounded, { name: 'DefaultTrueOutput' })(({ theme }) => ({
|
|
46
|
-
fill: theme.vars?.palette.success.main,
|
|
47
|
-
fontSize: '10px',
|
|
48
|
-
}))
|
|
49
|
-
|
|
50
|
-
export const DefaultFalseOutput = styled<typeof SvgIcon>(CircleRounded, { name: 'DefaultFalseOutput' })(({ theme }) => ({
|
|
51
|
-
fill: alphaCss(theme.vars?.palette.text.disabled ?? '#111', 0.5),
|
|
52
|
-
fontSize: '10px',
|
|
53
|
-
}))
|
|
54
|
-
|
|
55
|
-
const defaultTrueOutput = <DefaultTrueOutput />
|
|
56
|
-
const defaultFalseOutput = <DefaultFalseOutput />
|
|
57
|
-
|
|
58
|
-
export const BooleanTable: React.FC<BooleanTableProps> = ({
|
|
59
|
-
items = sampleData,
|
|
60
|
-
tableHeaders,
|
|
61
|
-
trueOutput = defaultTrueOutput,
|
|
62
|
-
falseOutput = defaultFalseOutput,
|
|
63
|
-
...props
|
|
64
|
-
}) => {
|
|
65
|
-
return (
|
|
66
|
-
<FlexCol alignItems="stretch" {...props}>
|
|
67
|
-
<FlexRow paddingBottom={0.5} justifyContent="space-between">
|
|
68
|
-
{tableHeaders.map(name => (
|
|
69
|
-
<StyledTableColumnTitle key={name} variant="caption">
|
|
70
|
-
{name}
|
|
71
|
-
</StyledTableColumnTitle>
|
|
72
|
-
))}
|
|
73
|
-
</FlexRow>
|
|
74
|
-
<FlexCol alignItems="stretch" gap={0.25}>
|
|
75
|
-
{items.slice(0, 4).map((item, index) => (
|
|
76
|
-
<TableRow key={index}>
|
|
77
|
-
<FlexGrowRow flexGrow={1} justifyContent="space-between">
|
|
78
|
-
<Typography variant="caption" noWrap maxWidth="70%">
|
|
79
|
-
{item.name}
|
|
80
|
-
</Typography>
|
|
81
|
-
{item.value ? trueOutput : falseOutput}
|
|
82
|
-
</FlexGrowRow>
|
|
83
|
-
</TableRow>
|
|
84
|
-
))}
|
|
85
|
-
</FlexCol>
|
|
86
|
-
</FlexCol>
|
|
87
|
-
)
|
|
88
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './BooleanTable.tsx'
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ArrowForwardRounded, HistoryRounded, RefreshRounded,
|
|
3
|
-
} from '@mui/icons-material'
|
|
4
|
-
import {
|
|
5
|
-
Box, CardContent, IconButton, Tooltip, Typography, useTheme,
|
|
6
|
-
} from '@mui/material'
|
|
7
|
-
import { ButtonEx } from '@xylabs/react-button'
|
|
8
|
-
import {
|
|
9
|
-
FlexCol, FlexGrowRow, FlexRow,
|
|
10
|
-
} from '@xylabs/react-flexbox'
|
|
11
|
-
import { alphaCss } from '@xylabs/react-theme'
|
|
12
|
-
import type { SimpleCardProps } from '@xyo-network/react-card'
|
|
13
|
-
import { CardEx } from '@xyo-network/react-card'
|
|
14
|
-
import { DateTime } from 'luxon'
|
|
15
|
-
import type { ReactNode } from 'react'
|
|
16
|
-
import React from 'react'
|
|
17
|
-
|
|
18
|
-
export interface WidgetCardProps extends SimpleCardProps {
|
|
19
|
-
timeOfData: number
|
|
20
|
-
widgetContent: ReactNode
|
|
21
|
-
widgetName: string
|
|
22
|
-
widgetPath: string
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const WidgetCard: React.FC<WidgetCardProps> = ({
|
|
26
|
-
widgetName, widgetContent, widgetPath, timeOfData = 1_715_875_087, ...props
|
|
27
|
-
}) => {
|
|
28
|
-
const theme = useTheme()
|
|
29
|
-
|
|
30
|
-
const formatTimeOfData = () => {
|
|
31
|
-
const timeNow = DateTime.now().toSeconds()
|
|
32
|
-
const secondsSinceDataRefreshed: number = timeNow - timeOfData
|
|
33
|
-
|
|
34
|
-
const getYearsAndMonths = () => {
|
|
35
|
-
const years = Math.floor(secondsSinceDataRefreshed / 31_536_000)
|
|
36
|
-
const months = Math.ceil((secondsSinceDataRefreshed - years * 31_536_000) / 2_628_288)
|
|
37
|
-
if (months === 12) {
|
|
38
|
-
return `${years + 1} Years Ago`
|
|
39
|
-
} else if (years > 1 && months > 1) {
|
|
40
|
-
return `${years} Years, ${months} Months Ago`
|
|
41
|
-
} else if (years === 1 && months > 1) {
|
|
42
|
-
return `${years} Year, ${months} Months Ago`
|
|
43
|
-
} else if (years > 1 && months === 1) {
|
|
44
|
-
return `${years} Years, ${months} Month Ago`
|
|
45
|
-
} else if (years === 1 && months === 1) {
|
|
46
|
-
return `${years} Year, ${months} Month Ago`
|
|
47
|
-
} else {
|
|
48
|
-
return `About ${years} Years Ago`
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (secondsSinceDataRefreshed < 60) {
|
|
53
|
-
return 'Less than 1 Minute Ago'
|
|
54
|
-
} else if (secondsSinceDataRefreshed < 3600) {
|
|
55
|
-
return `${DateTime.fromSeconds(secondsSinceDataRefreshed).toFormat('m')} Minutes Ago`
|
|
56
|
-
} else if (secondsSinceDataRefreshed < 86_400) {
|
|
57
|
-
return `${Math.ceil(secondsSinceDataRefreshed / 3600)} Hours Ago`
|
|
58
|
-
} else if (secondsSinceDataRefreshed < 2_628_288) {
|
|
59
|
-
return `${Math.ceil(secondsSinceDataRefreshed / 86_400)} Days Ago`
|
|
60
|
-
} else if (secondsSinceDataRefreshed < 31_536_000) {
|
|
61
|
-
return `${Math.ceil(secondsSinceDataRefreshed / 2_628_288)} Months Ago`
|
|
62
|
-
} else {
|
|
63
|
-
return getYearsAndMonths()
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<CardEx
|
|
69
|
-
{...props}
|
|
70
|
-
sx={{
|
|
71
|
-
backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#000', 0.4),
|
|
72
|
-
display: 'flex',
|
|
73
|
-
height: '300px',
|
|
74
|
-
width: '300px',
|
|
75
|
-
}}
|
|
76
|
-
>
|
|
77
|
-
<CardContent sx={{ height: '100%', padding: 1 }}>
|
|
78
|
-
<FlexCol sx={{
|
|
79
|
-
alignItems: 'stretch', height: '100%', justifyContent: 'space-between',
|
|
80
|
-
}}
|
|
81
|
-
>
|
|
82
|
-
<FlexCol alignItems="stretch">
|
|
83
|
-
<FlexGrowRow justifyContent="space-between" alignItems="center">
|
|
84
|
-
<Typography color={theme.vars?.palette.text.primary} fontWeight={theme.typography.fontWeightMedium} variant="h6">
|
|
85
|
-
{widgetName}
|
|
86
|
-
</Typography>
|
|
87
|
-
<IconButton>
|
|
88
|
-
<RefreshRounded />
|
|
89
|
-
</IconButton>
|
|
90
|
-
</FlexGrowRow>
|
|
91
|
-
<Box paddingY={2}>{widgetContent}</Box>
|
|
92
|
-
</FlexCol>
|
|
93
|
-
<FlexRow justifyContent="space-between" alignItems="center">
|
|
94
|
-
<Tooltip title={DateTime.fromSeconds(timeOfData).toFormat('DD ttt')}>
|
|
95
|
-
<FlexRow
|
|
96
|
-
gap={0.5}
|
|
97
|
-
sx={{ opacity: 0.5 }}
|
|
98
|
-
>
|
|
99
|
-
<HistoryRounded fontSize="small" color="inherit" />
|
|
100
|
-
<Typography variant="body2">{formatTimeOfData()}</Typography>
|
|
101
|
-
</FlexRow>
|
|
102
|
-
</Tooltip>
|
|
103
|
-
<ButtonEx size="small" to={widgetPath}>
|
|
104
|
-
<ArrowForwardRounded fontSize="small" />
|
|
105
|
-
</ButtonEx>
|
|
106
|
-
</FlexRow>
|
|
107
|
-
</FlexCol>
|
|
108
|
-
</CardContent>
|
|
109
|
-
</CardEx>
|
|
110
|
-
)
|
|
111
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Stack } from '@mui/material'
|
|
2
|
-
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
3
|
-
import { useIsDark } from '@xylabs/react-theme'
|
|
4
|
-
import React from 'react'
|
|
5
|
-
|
|
6
|
-
import { xyoDark, xyoLight } from '../../img/index.ts'
|
|
7
|
-
import { DappPage } from '../Dapp/index.ts'
|
|
8
|
-
import { StackOfWidgets } from './StackOfWidgets.tsx'
|
|
9
|
-
import {
|
|
10
|
-
ExampleBarGraphWidget, ExampleBooleanTableWidget, ExampleTwoColTwoStatWidget,
|
|
11
|
-
} from './Types/index.ts'
|
|
12
|
-
|
|
13
|
-
export const WidgetCardExamples: React.FC<FlexBoxProps> = () => {
|
|
14
|
-
// resolve the default name code for the palette
|
|
15
|
-
const darkMode = useIsDark()
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<DappPage
|
|
19
|
-
sx={{ backgroundImage: darkMode ? `url(${xyoDark})` : `url(${xyoLight})`, backgroundSize: 'cover' }}
|
|
20
|
-
container="xl"
|
|
21
|
-
title="Example Widget Cards"
|
|
22
|
-
>
|
|
23
|
-
<Stack gap={2} flexDirection="row" flexWrap="wrap">
|
|
24
|
-
<ExampleTwoColTwoStatWidget />
|
|
25
|
-
<ExampleBarGraphWidget />
|
|
26
|
-
<ExampleBooleanTableWidget />
|
|
27
|
-
<StackOfWidgets />
|
|
28
|
-
</Stack>
|
|
29
|
-
</DappPage>
|
|
30
|
-
)
|
|
31
|
-
}
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createTheme, darken, lighten,
|
|
3
|
-
} from '@mui/material'
|
|
4
|
-
import { alphaCss } from '@xylabs/react-theme'
|
|
5
|
-
|
|
6
|
-
declare module '@mui/material/styles' {
|
|
7
|
-
interface PaletteOptions {
|
|
8
|
-
iconBgGradientBuilder: (baseColor: string) => string
|
|
9
|
-
iconBgHoverGradientBuilder: (baseColor: string) => string
|
|
10
|
-
iconGradient: string
|
|
11
|
-
iconGradientHover: string
|
|
12
|
-
}
|
|
13
|
-
interface Palette {
|
|
14
|
-
iconBgGradientBuilder: (baseColor: string) => string
|
|
15
|
-
iconBgHoverGradientBuilder: (baseColor: string) => string
|
|
16
|
-
iconGradient: string
|
|
17
|
-
iconGradientHover: string
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const defaultIconBackground = '#A060E0'
|
|
22
|
-
export const defaultIconBackgroundHover = '#bdade8'
|
|
23
|
-
|
|
24
|
-
const DynamicIconBgGradientBuilder = {
|
|
25
|
-
iconBgGradientBuilder: (baseColor: string) => `linear-gradient(148deg, ${baseColor} 0%, ${darken(baseColor, 0.3)} 100%);`,
|
|
26
|
-
iconBgHoverGradientBuilder: (baseColor: string) => `linear-gradient(148deg, ${lighten(baseColor, 0.5)} 0%, ${lighten(baseColor, 0.2)} 100%);`,
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const StaticIconBgGradient = {
|
|
30
|
-
iconGradient: `linear-gradient(148deg, ${defaultIconBackground} 0%, ${darken(defaultIconBackground, 0.35)} 100%);`,
|
|
31
|
-
iconGradientHover: `linear-gradient(148deg, ${defaultIconBackgroundHover} 0%, ${darken(defaultIconBackgroundHover, 0.35)} 100%);`,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const lightPalette = {
|
|
35
|
-
background: {
|
|
36
|
-
default: '#F4F4F4',
|
|
37
|
-
paper: '#FFFFFF',
|
|
38
|
-
},
|
|
39
|
-
error: {
|
|
40
|
-
dark: '#AA0E0E',
|
|
41
|
-
light: '#F15555',
|
|
42
|
-
main: '#D81111',
|
|
43
|
-
},
|
|
44
|
-
...DynamicIconBgGradientBuilder,
|
|
45
|
-
...StaticIconBgGradient,
|
|
46
|
-
primary: { main: '#463dc6', light: '#b2adfb' },
|
|
47
|
-
secondary: { main: '#186ecc' },
|
|
48
|
-
success: {
|
|
49
|
-
dark: '#347f21',
|
|
50
|
-
light: '#94dd80',
|
|
51
|
-
main: '#62bc50',
|
|
52
|
-
},
|
|
53
|
-
text: {
|
|
54
|
-
disabled: '#49454D',
|
|
55
|
-
primary: '#0d0d47',
|
|
56
|
-
secondary: '#49454D',
|
|
57
|
-
},
|
|
58
|
-
warning: { main: '#ffc805' },
|
|
59
|
-
}
|
|
60
|
-
const darkPalette = {
|
|
61
|
-
background: {
|
|
62
|
-
default: '#020223',
|
|
63
|
-
paper: '#19193F',
|
|
64
|
-
},
|
|
65
|
-
error: { main: '#f6594e' },
|
|
66
|
-
success: {
|
|
67
|
-
main: '#7efc81',
|
|
68
|
-
contrastText: '#011e01',
|
|
69
|
-
},
|
|
70
|
-
...DynamicIconBgGradientBuilder,
|
|
71
|
-
...StaticIconBgGradient,
|
|
72
|
-
primary: { main: '#5658F3', light: '#7c72ff' },
|
|
73
|
-
secondary: {
|
|
74
|
-
main: '#66caf7',
|
|
75
|
-
contrastText: '#020223',
|
|
76
|
-
},
|
|
77
|
-
warning: { main: '#f7d866' },
|
|
78
|
-
text: {
|
|
79
|
-
disabled: '#a5acdb',
|
|
80
|
-
primary: '#E3E4EB',
|
|
81
|
-
secondary: '#e3e4eba3',
|
|
82
|
-
},
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/** @deprecated - use theme from \@xylabs/react-theme */
|
|
86
|
-
export const ThemeCssVars = createTheme({
|
|
87
|
-
colorSchemes: {
|
|
88
|
-
dark: { palette: darkPalette },
|
|
89
|
-
light: { palette: lightPalette },
|
|
90
|
-
},
|
|
91
|
-
components: {
|
|
92
|
-
MuiAccordion: {
|
|
93
|
-
styleOverrides: {
|
|
94
|
-
root: {
|
|
95
|
-
'&.Mui-expanded': { '&$expanded': { margin: '4px 0' } },
|
|
96
|
-
'boxShadow': 'none',
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
MuiAccordionSummary: { styleOverrides: { root: { boxShadow: 'none' } } },
|
|
101
|
-
MuiAppBar: {
|
|
102
|
-
styleOverrides: {
|
|
103
|
-
root: ({ theme }) => ({
|
|
104
|
-
WebkitBackdropFilter: 'blur(20px)',
|
|
105
|
-
backdropFilter: 'blur(20px)',
|
|
106
|
-
backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#000', 0.2),
|
|
107
|
-
boxShadow: 'none',
|
|
108
|
-
color: '#16163D',
|
|
109
|
-
...theme.applyStyles('dark', { color: '#CBC4CE' }),
|
|
110
|
-
}),
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
MuiCard: {
|
|
114
|
-
defaultProps: { elevation: 0 },
|
|
115
|
-
styleOverrides: {
|
|
116
|
-
root: ({ theme }) => ({
|
|
117
|
-
WebkitBackdropFilter: 'blur(20px)',
|
|
118
|
-
backdropFilter: 'blur(20px)',
|
|
119
|
-
backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#000', 0.7),
|
|
120
|
-
display: 'flex',
|
|
121
|
-
flexDirection: 'column',
|
|
122
|
-
justifyContent: 'space-between',
|
|
123
|
-
}),
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
MuiCardContent: {
|
|
127
|
-
styleOverrides: {
|
|
128
|
-
root: {
|
|
129
|
-
// This is to get rid of the extra padding at the end of Card Content that misaligns padding when there's only 1 item
|
|
130
|
-
'&:last-child': { paddingBottom: '16px' },
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
MuiCardHeader: {
|
|
135
|
-
styleOverrides: {
|
|
136
|
-
content: {
|
|
137
|
-
display: 'flex',
|
|
138
|
-
flexDirection: 'column',
|
|
139
|
-
overflow: 'hidden',
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
MuiChip: {
|
|
144
|
-
styleOverrides: {
|
|
145
|
-
root: {
|
|
146
|
-
borderRadius: 4,
|
|
147
|
-
fontWeight: 400,
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
MuiContainer: { styleOverrides: { root: { maxWidth: 'xl' } } },
|
|
152
|
-
MuiDrawer: {
|
|
153
|
-
styleOverrides: {
|
|
154
|
-
root: ({ theme }) => ({
|
|
155
|
-
'& .MuiTypography-root, & .MuiButton-root': { color: '#FFFFFF' },
|
|
156
|
-
'paperProps': { backgroundColor: '#19193F' },
|
|
157
|
-
...theme.applyStyles('dark', { color: theme.vars?.palette.secondary.main }),
|
|
158
|
-
}),
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
MuiFilledInput: {
|
|
162
|
-
defaultProps: { disableUnderline: true },
|
|
163
|
-
styleOverrides: {
|
|
164
|
-
root: ({ theme }) => ({
|
|
165
|
-
'&.Mui-error': { border: `${theme.vars?.palette.error.main} 1px solid` },
|
|
166
|
-
'border': 'transparent 1px solid',
|
|
167
|
-
'borderRadius': theme.shape.borderRadius,
|
|
168
|
-
}),
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
MuiLink: {
|
|
172
|
-
defaultProps: { underline: 'none' },
|
|
173
|
-
styleOverrides: { root: { '&:hover': { filter: 'brightness(75%)' } } },
|
|
174
|
-
},
|
|
175
|
-
MuiPaper: { defaultProps: { elevation: 0 } },
|
|
176
|
-
MuiTableCell: {
|
|
177
|
-
styleOverrides: {
|
|
178
|
-
body: {
|
|
179
|
-
fontFamily: 'monospace',
|
|
180
|
-
whiteSpace: 'nowrap',
|
|
181
|
-
},
|
|
182
|
-
head: {
|
|
183
|
-
fontWeight: 700,
|
|
184
|
-
whiteSpace: 'nowrap',
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
MuiTooltip: {
|
|
189
|
-
styleOverrides: {
|
|
190
|
-
tooltip: ({ theme }) => ({
|
|
191
|
-
...theme.typography.body1,
|
|
192
|
-
color: 'inherit',
|
|
193
|
-
maxWidth: 250,
|
|
194
|
-
border: `1px solid ${theme.vars?.palette.background.default}`,
|
|
195
|
-
backgroundColor: theme.vars?.palette.background.paper,
|
|
196
|
-
padding: theme.spacing(1),
|
|
197
|
-
boxShadow: 'rgba(17, 12, 46, 0.15) 0px 48px 100px 0px',
|
|
198
|
-
}),
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
shape: { borderRadius: 6 },
|
|
203
|
-
spacing: 12,
|
|
204
|
-
typography: {
|
|
205
|
-
allVariants: { fontFamily: ['Manrope', 'san-serif'].join(',') },
|
|
206
|
-
body1: { fontSize: '16px' },
|
|
207
|
-
button: {
|
|
208
|
-
fontSize: '1rem',
|
|
209
|
-
textTransform: 'capitalize',
|
|
210
|
-
},
|
|
211
|
-
fontWeightBold: 700,
|
|
212
|
-
fontWeightLight: 300,
|
|
213
|
-
fontWeightMedium: 600,
|
|
214
|
-
fontWeightRegular: 500,
|
|
215
|
-
h1: { fontSize: '3.2rem' },
|
|
216
|
-
h2: { fontSize: '2.7rem' },
|
|
217
|
-
h3: { fontSize: '2.24rem' },
|
|
218
|
-
h4: { fontSize: '2rem' },
|
|
219
|
-
h5: { fontSize: '1.5rem' },
|
|
220
|
-
h6: { fontSize: '1.2rem' },
|
|
221
|
-
subtitle1: {
|
|
222
|
-
fontWeight: 300,
|
|
223
|
-
opacity: '50%',
|
|
224
|
-
textTransform: 'uppercase',
|
|
225
|
-
},
|
|
226
|
-
subtitle2: { opacity: '50%' },
|
|
227
|
-
},
|
|
228
|
-
})
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type SupportedColorScheme, ThemeProvider } from '@mui/material'
|
|
2
|
-
import { XyosTheme } from '@xylabs/react-theme'
|
|
3
|
-
import type { PropsWithChildren } from 'react'
|
|
4
|
-
import React, { useMemo } from 'react'
|
|
5
|
-
|
|
6
|
-
/** @deprecated - rely on websites to construct their own theme provider */
|
|
7
|
-
export const AppOsThemeProvider: React.FC<PropsWithChildren> = ({ children }) => {
|
|
8
|
-
const initialValue: SupportedColorScheme | 'system' = useMemo(() => {
|
|
9
|
-
const validValues: SupportedColorScheme[] = ['light', 'dark']
|
|
10
|
-
const savedValue = localStorage.getItem('mui-mode')
|
|
11
|
-
if (savedValue && validValues.includes(savedValue as SupportedColorScheme)) return savedValue as SupportedColorScheme
|
|
12
|
-
return 'system'
|
|
13
|
-
}, [])
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<ThemeProvider theme={XyosTheme} defaultMode={initialValue}>
|
|
17
|
-
{children}
|
|
18
|
-
</ThemeProvider>
|
|
19
|
-
)
|
|
20
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ThemeProvider.js'
|
package/src/settings/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Theme/index.ts'
|
package/src/types/global.d.ts
DELETED
package/src/types/images.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { InstallationType, RegisteredDappSet } from '@xyo-network/os-model'
|
|
2
|
-
import {
|
|
3
|
-
isInstalledDappSet, isPreInstalledDappSet, isUnInstalledDappSet,
|
|
4
|
-
} from '@xyo-network/os-model'
|
|
5
|
-
|
|
6
|
-
export const DappInstallTypeFilters: Record<
|
|
7
|
-
InstallationType,
|
|
8
|
-
(registeredDappSets: RegisteredDappSet[] | undefined) => RegisteredDappSet[] | undefined
|
|
9
|
-
> = {
|
|
10
|
-
installed(registeredDappSets?: RegisteredDappSet[]) {
|
|
11
|
-
return registeredDappSets && registeredDappSets?.length > 0
|
|
12
|
-
? registeredDappSets?.filter(isInstalledDappSet).toSorted((a, b) => (a.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1))
|
|
13
|
-
: undefined
|
|
14
|
-
},
|
|
15
|
-
preInstalled(registeredDappSets?: RegisteredDappSet[]) {
|
|
16
|
-
return registeredDappSets && registeredDappSets?.length > 0
|
|
17
|
-
? registeredDappSets
|
|
18
|
-
?.filter(isPreInstalledDappSet)
|
|
19
|
-
.toSorted((a, b) => (a.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1))
|
|
20
|
-
: undefined
|
|
21
|
-
},
|
|
22
|
-
uninstalled(registeredDappSets?: RegisteredDappSet[]) {
|
|
23
|
-
return registeredDappSets && registeredDappSets?.length > 0
|
|
24
|
-
? registeredDappSets.filter(isUnInstalledDappSet).toSorted((a, b) => (a.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1))
|
|
25
|
-
: undefined
|
|
26
|
-
},
|
|
27
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const getApiDomain = (localHost: boolean, apiDomain: string | undefined) => {
|
|
2
|
-
if (apiDomain !== undefined) {
|
|
3
|
-
return apiDomain
|
|
4
|
-
}
|
|
5
|
-
if (localHost) {
|
|
6
|
-
return 'http://localhost:8080'
|
|
7
|
-
}
|
|
8
|
-
if (location.hostname.startsWith('beta')) {
|
|
9
|
-
return 'https://beta.archivist.xyo.network'
|
|
10
|
-
}
|
|
11
|
-
return 'https://archivist.xyo.network'
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { getApiDomain }
|
package/src/utils/index.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react'
|
|
2
|
-
|
|
3
|
-
export const useOnWindowResize = () => {
|
|
4
|
-
const [resized, setResized] = useState<UIEvent>()
|
|
5
|
-
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
const onResize = (event: UIEvent) => {
|
|
8
|
-
setResized(event)
|
|
9
|
-
}
|
|
10
|
-
globalThis.addEventListener('resize', onResize, false)
|
|
11
|
-
|
|
12
|
-
return () => {
|
|
13
|
-
globalThis.removeEventListener('resize', onResize)
|
|
14
|
-
}
|
|
15
|
-
}, [])
|
|
16
|
-
|
|
17
|
-
return resized
|
|
18
|
-
}
|