@xyo-network/os-react-runtime 5.0.12 → 6.0.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/index.mjs +102 -91
- package/dist/browser/index.mjs.map +1 -1
- package/dist/types/helpers/BridgeActivityHelper.d.ts +4 -20
- package/dist/types/helpers/BridgeActivityHelper.d.ts.map +1 -1
- package/dist/types/modules/Dapp/Button/StyledComponents.d.ts.map +1 -1
- package/dist/types/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.d.ts.map +1 -1
- package/dist/types/modules/Dapp/modules/Window/components/menu/Drawer.d.ts.map +1 -1
- package/dist/types/modules/Dapp/modules/Window/components/menu/StyledListItems.d.ts +1 -1
- package/dist/types/modules/Dapp/modules/Window/hooks/useExposedNode.d.ts +1 -9
- package/dist/types/modules/Dapp/modules/Window/hooks/useExposedNode.d.ts.map +1 -1
- package/dist/types/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.d.ts.map +1 -1
- package/dist/types/modules/dapps/accounts/hooks/useAccountArchivist.d.ts +1 -9
- package/dist/types/modules/dapps/accounts/hooks/useAccountArchivist.d.ts.map +1 -1
- package/dist/types/modules/dapps/table/head/components/StyledTableRowHeader.d.ts.map +1 -1
- package/dist/types/modules/widgets/StackOfWidgets.d.ts.map +1 -1
- package/dist/types/modules/widgets/Types/BarGraph/StyledLinearProgress.d.ts.map +1 -1
- package/dist/types/modules/widgets/Types/Tables/BooleanTable.d.ts.map +1 -1
- package/dist/types/modules/widgets/WidgetCard.d.ts.map +1 -1
- package/dist/types/settings/Theme/ThemeCssVars.d.ts.map +1 -1
- package/package.json +59 -60
- package/src/helpers/BridgeActivityHelper.ts +2 -2
- package/src/helpers/BrowserLocator.ts +4 -4
- package/src/modules/Dapp/Button/LaunchFrame.tsx +1 -1
- package/src/modules/Dapp/Button/StyledComponents.tsx +7 -6
- package/src/modules/Dapp/Button/StyledDappIconBuilder.tsx +1 -1
- package/src/modules/Dapp/modules/Window/Chrome.tsx +2 -2
- package/src/modules/Dapp/modules/Window/LoadingFlexbox.tsx +2 -2
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.tsx +3 -2
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/DeveloperLinkSection.tsx +1 -1
- package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/SummarySection.tsx +1 -1
- package/src/modules/Dapp/modules/Window/components/menu/BottomMenuArea.tsx +3 -3
- package/src/modules/Dapp/modules/Window/components/menu/BottomNavigation.tsx +1 -1
- package/src/modules/Dapp/modules/Window/components/menu/Drawer.tsx +13 -8
- package/src/modules/Dapp/modules/Window/components/menu/StyledListItems.tsx +1 -1
- package/src/modules/Dapp/modules/Window/components/menu/stories/Drawer.stories.tsx +2 -1
- package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.tsx +1 -1
- package/src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.tsx +3 -4
- package/src/modules/dapps/table/head/components/StyledTableRowHeader.tsx +1 -1
- package/src/modules/network/components/LoadingIndicator.tsx +4 -4
- package/src/modules/widgets/StackOfWidgets.tsx +3 -4
- package/src/modules/widgets/Types/BarGraph/StyledLinearProgress.tsx +3 -4
- package/src/modules/widgets/Types/Tables/BooleanTable.tsx +5 -4
- package/src/modules/widgets/WidgetCard.tsx +4 -3
- package/src/settings/Theme/ThemeCssVars.ts +8 -7
- package/src/utils/DappInstallTypeFilters.ts +2 -2
|
@@ -36,7 +36,7 @@ export const useManageDappInjectableParamsFromRoute = (context?: XyOsContext | n
|
|
|
36
36
|
try {
|
|
37
37
|
if (context) {
|
|
38
38
|
const mod = assertEx(await context?.root.resolve('DappArchivist'), () => 'DappArchivist not found')
|
|
39
|
-
archivist = asArchivistInstance(mod, () => 'DappArchivist not is not an Archivist')
|
|
39
|
+
archivist = asArchivistInstance(mod, () => 'DappArchivist not is not an Archivist', { required: true })
|
|
40
40
|
|
|
41
41
|
archivist.on('inserted', listener)
|
|
42
42
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { FiberManualRecordRounded } from '@mui/icons-material'
|
|
2
2
|
import type { BoxProps } from '@mui/material'
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
} from '@mui/material'
|
|
3
|
+
import { Box, useTheme } from '@mui/material'
|
|
4
|
+
import { alphaCss } from '@xylabs/react-theme'
|
|
6
5
|
import React from 'react'
|
|
7
6
|
|
|
8
7
|
export const TwoToneBulletPoint: React.FC<BoxProps> = (props) => {
|
|
@@ -13,7 +12,7 @@ export const TwoToneBulletPoint: React.FC<BoxProps> = (props) => {
|
|
|
13
12
|
fontSize="small"
|
|
14
13
|
sx={{
|
|
15
14
|
'&:hover': { padding: 0.2 },
|
|
16
|
-
'backgroundColor':
|
|
15
|
+
'backgroundColor': alphaCss(theme.vars?.palette.secondary.main ?? '#000', 0.2),
|
|
17
16
|
'borderRadius': 2,
|
|
18
17
|
'padding': 0.4,
|
|
19
18
|
}}
|
|
@@ -3,4 +3,4 @@ import { styled, TableRow } from '@mui/material'
|
|
|
3
3
|
export const StyledTableRowHeader = styled(
|
|
4
4
|
TableRow,
|
|
5
5
|
{ name: 'StyledTableRowHeader' },
|
|
6
|
-
)(({ theme }) => ({ '& .MuiTableCell-root': { backgroundColor: theme.palette.background.paper } }))
|
|
6
|
+
)(({ theme }) => ({ '& .MuiTableCell-root': { backgroundColor: theme.vars?.palette.background.paper } }))
|
|
@@ -22,11 +22,11 @@ export const NetworkLoadingIndicator: React.FC<NetworkLoadingIndicatorProps> = (
|
|
|
22
22
|
const theme = useTheme()
|
|
23
23
|
const { networkReady } = useOsNetwork()
|
|
24
24
|
|
|
25
|
-
const highContrastSuccessColor = darkMode ? theme.palette.success.dark : theme.palette.success.main
|
|
26
|
-
const successColor = highContrast ? highContrastSuccessColor : theme.palette.success.main
|
|
25
|
+
const highContrastSuccessColor = darkMode ? theme.vars?.palette.success.dark : theme.vars?.palette.success.main
|
|
26
|
+
const successColor = highContrast ? highContrastSuccessColor : theme.vars?.palette.success.main
|
|
27
27
|
|
|
28
|
-
const highContrastErrorColor = darkMode ? theme.palette.success.dark : theme.palette.error.main
|
|
29
|
-
const errorColor = highContrast ? highContrastErrorColor : theme.palette.error.main
|
|
28
|
+
const highContrastErrorColor = darkMode ? theme.vars?.palette.success.dark : theme.vars?.palette.error.main
|
|
29
|
+
const errorColor = highContrast ? highContrastErrorColor : theme.vars?.palette.error.main
|
|
30
30
|
|
|
31
31
|
const NetworkComponent = useMemo(() => {
|
|
32
32
|
if (networkReady) {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// Example from https://codesandbox.io/p/sandbox/cards-stack-to6uf?
|
|
2
|
-
import {
|
|
3
|
-
alpha, Box, useTheme,
|
|
4
|
-
} from '@mui/material'
|
|
2
|
+
import { Box, useTheme } from '@mui/material'
|
|
5
3
|
import {
|
|
6
4
|
animated, to as interpolate, useSprings,
|
|
7
5
|
} from '@react-spring/web'
|
|
6
|
+
import { alphaCss } from '@xylabs/react-theme'
|
|
8
7
|
import type { ReactNode } from 'react'
|
|
9
8
|
import React, { useState } from 'react'
|
|
10
9
|
import { useDrag } from 'react-use-gesture'
|
|
@@ -112,7 +111,7 @@ function Deck() {
|
|
|
112
111
|
style={{
|
|
113
112
|
// WebkitBackdropFilter: 'blur(10px)',
|
|
114
113
|
// backdropFilter: 'blur(10px)',
|
|
115
|
-
backgroundColor:
|
|
114
|
+
backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#000', 0.2),
|
|
116
115
|
backgroundPosition: 'center center',
|
|
117
116
|
backgroundRepeat: 'no-repeat',
|
|
118
117
|
backgroundSize: 'auto 85%',
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from '@mui/material'
|
|
1
|
+
import { LinearProgress, styled } from '@mui/material'
|
|
2
|
+
import { alphaCss } from '@xylabs/react-theme'
|
|
4
3
|
|
|
5
4
|
export const StyledLinearProgress = styled(LinearProgress, { name: 'StyledLinearProgress' })(({ theme }) => ({
|
|
6
5
|
'& .MuiLinearProgress-bar': { borderRadius: theme.shape.borderRadius },
|
|
7
6
|
'MozBoxSizing': 'border-box',
|
|
8
7
|
'WebkitBoxSizing': 'border-box',
|
|
9
8
|
'background': 'transparent',
|
|
10
|
-
'borderBottom': `1px solid ${
|
|
9
|
+
'borderBottom': `1px solid ${alphaCss(theme.vars?.palette.text.secondary ?? '#000', 0.3)}`,
|
|
11
10
|
'boxSizing': 'border-box',
|
|
12
11
|
'height': theme.spacing(0.25),
|
|
13
12
|
}))
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import { CircleRounded } from '@mui/icons-material'
|
|
3
3
|
import type { SvgIcon } from '@mui/material'
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
Paper, styled, TableRow, Typography,
|
|
6
6
|
} from '@mui/material'
|
|
7
7
|
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
8
8
|
import {
|
|
9
9
|
FlexCol, FlexGrowRow, FlexRow,
|
|
10
10
|
} from '@xylabs/react-flexbox'
|
|
11
|
+
import { alphaCss } from '@xylabs/react-theme'
|
|
11
12
|
import type { ReactNode } from 'react'
|
|
12
13
|
import React from 'react'
|
|
13
14
|
|
|
@@ -37,18 +38,18 @@ export const StyledLightTableRow = styled(Paper, { name: 'StyledLightTableRow' }
|
|
|
37
38
|
}))
|
|
38
39
|
|
|
39
40
|
export const StyledTableColumnTitle = styled(Typography, { name: 'StyledTableColumnTitle' })(({ theme }) => ({
|
|
40
|
-
color: theme.palette.text.secondary,
|
|
41
|
+
color: theme.vars?.palette.text.secondary,
|
|
41
42
|
fontWeight: theme.typography.fontWeightBold,
|
|
42
43
|
textTransform: 'uppercase',
|
|
43
44
|
}))
|
|
44
45
|
|
|
45
46
|
export const DefaultTrueOutput = styled<typeof SvgIcon>(CircleRounded, { name: 'DefaultTrueOutput' })(({ theme }) => ({
|
|
46
|
-
fill: theme.palette.success.main,
|
|
47
|
+
fill: theme.vars?.palette.success.main,
|
|
47
48
|
fontSize: '10px',
|
|
48
49
|
}))
|
|
49
50
|
|
|
50
51
|
export const DefaultFalseOutput = styled<typeof SvgIcon>(CircleRounded, { name: 'DefaultFalseOutput' })(({ theme }) => ({
|
|
51
|
-
fill:
|
|
52
|
+
fill: alphaCss(theme.vars?.palette.text.disabled ?? '#111', 0.5),
|
|
52
53
|
fontSize: '10px',
|
|
53
54
|
}))
|
|
54
55
|
|
|
@@ -2,12 +2,13 @@ import {
|
|
|
2
2
|
ArrowForwardRounded, HistoryRounded, RefreshRounded,
|
|
3
3
|
} from '@mui/icons-material'
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
Box, CardContent, IconButton, Tooltip, Typography, useTheme,
|
|
6
6
|
} from '@mui/material'
|
|
7
7
|
import { ButtonEx } from '@xylabs/react-button'
|
|
8
8
|
import {
|
|
9
9
|
FlexCol, FlexGrowRow, FlexRow,
|
|
10
10
|
} from '@xylabs/react-flexbox'
|
|
11
|
+
import { alphaCss } from '@xylabs/react-theme'
|
|
11
12
|
import type { SimpleCardProps } from '@xyo-network/react-card'
|
|
12
13
|
import { CardEx } from '@xyo-network/react-card'
|
|
13
14
|
import { DateTime } from 'luxon'
|
|
@@ -67,7 +68,7 @@ export const WidgetCard: React.FC<WidgetCardProps> = ({
|
|
|
67
68
|
<CardEx
|
|
68
69
|
{...props}
|
|
69
70
|
sx={{
|
|
70
|
-
backgroundColor:
|
|
71
|
+
backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#000', 0.4),
|
|
71
72
|
display: 'flex',
|
|
72
73
|
height: '300px',
|
|
73
74
|
width: '300px',
|
|
@@ -80,7 +81,7 @@ export const WidgetCard: React.FC<WidgetCardProps> = ({
|
|
|
80
81
|
>
|
|
81
82
|
<FlexCol alignItems="stretch">
|
|
82
83
|
<FlexGrowRow justifyContent="space-between" alignItems="center">
|
|
83
|
-
<Typography color={theme.palette.text.primary} fontWeight={theme.typography.fontWeightMedium} variant="h6">
|
|
84
|
+
<Typography color={theme.vars?.palette.text.primary} fontWeight={theme.typography.fontWeightMedium} variant="h6">
|
|
84
85
|
{widgetName}
|
|
85
86
|
</Typography>
|
|
86
87
|
<IconButton>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
createTheme, darken, lighten,
|
|
3
3
|
} from '@mui/material'
|
|
4
|
+
import { alphaCss } from '@xylabs/react-theme'
|
|
4
5
|
|
|
5
6
|
declare module '@mui/material/styles' {
|
|
6
7
|
interface PaletteOptions {
|
|
@@ -101,7 +102,7 @@ export const ThemeCssVars = createTheme({
|
|
|
101
102
|
root: ({ theme }) => ({
|
|
102
103
|
WebkitBackdropFilter: 'blur(20px)',
|
|
103
104
|
backdropFilter: 'blur(20px)',
|
|
104
|
-
backgroundColor:
|
|
105
|
+
backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#000', 0.2),
|
|
105
106
|
boxShadow: 'none',
|
|
106
107
|
color: '#16163D',
|
|
107
108
|
...theme.applyStyles('dark', { color: '#CBC4CE' }),
|
|
@@ -114,7 +115,7 @@ export const ThemeCssVars = createTheme({
|
|
|
114
115
|
root: ({ theme }) => ({
|
|
115
116
|
WebkitBackdropFilter: 'blur(20px)',
|
|
116
117
|
backdropFilter: 'blur(20px)',
|
|
117
|
-
backgroundColor:
|
|
118
|
+
backgroundColor: alphaCss(theme.vars?.palette.background.paper ?? '#000', 0.7),
|
|
118
119
|
display: 'flex',
|
|
119
120
|
flexDirection: 'column',
|
|
120
121
|
justifyContent: 'space-between',
|
|
@@ -152,7 +153,7 @@ export const ThemeCssVars = createTheme({
|
|
|
152
153
|
root: ({ theme }) => ({
|
|
153
154
|
'& .MuiTypography-root, & .MuiButton-root': { color: '#FFFFFF' },
|
|
154
155
|
'paperProps': { backgroundColor: '#19193F' },
|
|
155
|
-
...theme.applyStyles('dark', { color: theme.palette.secondary.main }),
|
|
156
|
+
...theme.applyStyles('dark', { color: theme.vars?.palette.secondary.main }),
|
|
156
157
|
}),
|
|
157
158
|
},
|
|
158
159
|
},
|
|
@@ -160,7 +161,7 @@ export const ThemeCssVars = createTheme({
|
|
|
160
161
|
defaultProps: { disableUnderline: true },
|
|
161
162
|
styleOverrides: {
|
|
162
163
|
root: ({ theme }) => ({
|
|
163
|
-
'&.Mui-error': { border: `${theme.palette.error.main} 1px solid` },
|
|
164
|
+
'&.Mui-error': { border: `${theme.vars?.palette.error.main} 1px solid` },
|
|
164
165
|
'border': 'transparent 1px solid',
|
|
165
166
|
'borderRadius': theme.shape.borderRadius,
|
|
166
167
|
}),
|
|
@@ -189,8 +190,8 @@ export const ThemeCssVars = createTheme({
|
|
|
189
190
|
...theme.typography.body1,
|
|
190
191
|
color: 'inherit',
|
|
191
192
|
maxWidth: 250,
|
|
192
|
-
border: `1px solid ${theme.palette.background.default}`,
|
|
193
|
-
backgroundColor: theme.palette.background.paper,
|
|
193
|
+
border: `1px solid ${theme.vars?.palette.background.default}`,
|
|
194
|
+
backgroundColor: theme.vars?.palette.background.paper,
|
|
194
195
|
padding: theme.spacing(1),
|
|
195
196
|
boxShadow: 'rgba(17, 12, 46, 0.15) 0px 48px 100px 0px',
|
|
196
197
|
}),
|
|
@@ -15,8 +15,8 @@ export const DappInstallTypeFilters: Record<
|
|
|
15
15
|
preInstalled(registeredDappSets?: RegisteredDappSet[]) {
|
|
16
16
|
return registeredDappSets && registeredDappSets?.length > 0
|
|
17
17
|
? registeredDappSets
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
?.filter(isPreInstalledDappSet)
|
|
19
|
+
.sort((a, b) => (a.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1))
|
|
20
20
|
: undefined
|
|
21
21
|
},
|
|
22
22
|
uninstalled(registeredDappSets?: RegisteredDappSet[]) {
|