@xyo-network/os-react-runtime 5.0.11 → 5.0.13

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.
Files changed (43) hide show
  1. package/dist/browser/index.mjs +73 -61
  2. package/dist/browser/index.mjs.map +1 -1
  3. package/dist/types/helpers/BridgeActivityHelper.d.ts +3 -7
  4. package/dist/types/helpers/BridgeActivityHelper.d.ts.map +1 -1
  5. package/dist/types/modules/Dapp/Button/StyledComponents.d.ts.map +1 -1
  6. package/dist/types/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.d.ts.map +1 -1
  7. package/dist/types/modules/Dapp/modules/Window/components/menu/Drawer.d.ts.map +1 -1
  8. package/dist/types/modules/Dapp/modules/Window/components/menu/StyledListItems.d.ts +1 -1
  9. package/dist/types/modules/Dapp/modules/Window/hooks/useExposedNode.d.ts +1 -3
  10. package/dist/types/modules/Dapp/modules/Window/hooks/useExposedNode.d.ts.map +1 -1
  11. package/dist/types/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.d.ts.map +1 -1
  12. package/dist/types/modules/dapps/accounts/hooks/useAccountArchivist.d.ts +1 -3
  13. package/dist/types/modules/dapps/accounts/hooks/useAccountArchivist.d.ts.map +1 -1
  14. package/dist/types/modules/dapps/table/head/components/StyledTableRowHeader.d.ts.map +1 -1
  15. package/dist/types/modules/widgets/StackOfWidgets.d.ts.map +1 -1
  16. package/dist/types/modules/widgets/Types/BarGraph/StyledLinearProgress.d.ts.map +1 -1
  17. package/dist/types/modules/widgets/Types/Tables/BooleanTable.d.ts.map +1 -1
  18. package/dist/types/modules/widgets/WidgetCard.d.ts.map +1 -1
  19. package/dist/types/settings/Theme/ThemeCssVars.d.ts.map +1 -1
  20. package/package.json +57 -58
  21. package/src/helpers/BridgeActivityHelper.ts +1 -1
  22. package/src/modules/Dapp/Button/LaunchFrame.tsx +1 -1
  23. package/src/modules/Dapp/Button/StyledComponents.tsx +7 -6
  24. package/src/modules/Dapp/Button/StyledDappIconBuilder.tsx +1 -1
  25. package/src/modules/Dapp/modules/Window/Chrome.tsx +2 -2
  26. package/src/modules/Dapp/modules/Window/LoadingFlexbox.tsx +2 -2
  27. package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.tsx +3 -2
  28. package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/DeveloperLinkSection.tsx +1 -1
  29. package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/SummarySection.tsx +1 -1
  30. package/src/modules/Dapp/modules/Window/components/menu/BottomMenuArea.tsx +3 -3
  31. package/src/modules/Dapp/modules/Window/components/menu/BottomNavigation.tsx +1 -1
  32. package/src/modules/Dapp/modules/Window/components/menu/Drawer.tsx +13 -8
  33. package/src/modules/Dapp/modules/Window/components/menu/StyledListItems.tsx +1 -1
  34. package/src/modules/Dapp/modules/Window/components/menu/stories/Drawer.stories.tsx +2 -1
  35. package/src/modules/dapps/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.tsx +3 -4
  36. package/src/modules/dapps/table/head/components/StyledTableRowHeader.tsx +1 -1
  37. package/src/modules/network/components/LoadingIndicator.tsx +4 -4
  38. package/src/modules/widgets/StackOfWidgets.tsx +3 -4
  39. package/src/modules/widgets/Types/BarGraph/StyledLinearProgress.tsx +3 -4
  40. package/src/modules/widgets/Types/Tables/BooleanTable.tsx +5 -4
  41. package/src/modules/widgets/WidgetCard.tsx +4 -3
  42. package/src/settings/Theme/ThemeCssVars.ts +8 -7
  43. package/src/utils/DappInstallTypeFilters.ts +2 -2
@@ -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: alpha(theme.palette.background.paper, 0.2),
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
- alpha, LinearProgress, styled,
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 ${alpha(theme.palette.text.secondary, 0.3)}`,
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
- alpha, Paper, styled, TableRow, Typography,
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: alpha(theme.palette.text.disabled, 0.5),
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
- alpha, Box, CardContent, IconButton, Tooltip, Typography, useTheme,
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: alpha(theme.palette.background.paper, 0.4),
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
- alpha, createTheme, darken, lighten,
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: alpha(theme.palette.background.paper, 0.2),
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: alpha(theme.palette.background.paper, 0.7),
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
- ?.filter(isPreInstalledDappSet)
19
- .sort((a, b) => (a.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1))
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[]) {