@xyo-network/react-chain-shared 1.20.17 → 1.20.18
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
CHANGED
|
@@ -121,7 +121,7 @@ var LabelValueStack = /* @__PURE__ */ __name(({ labels, values, ...props }) => {
|
|
|
121
121
|
}, "LabelValueStack");
|
|
122
122
|
|
|
123
123
|
// src/story/buildRandomBlockchain.ts
|
|
124
|
-
import { buildRandomChain } from "@xyo-network/chain-protocol";
|
|
124
|
+
import { buildRandomChain } from "@xyo-network/chain-protocol-test";
|
|
125
125
|
import { Account } from "@xyo-network/sdk-js";
|
|
126
126
|
var buildRandomBlockChain = /* @__PURE__ */ __name(async (blockCount = 10) => {
|
|
127
127
|
const initialBlockProducer = await Account.random();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/menu-item/ActiveMenuItem.tsx","../../src/components/stack/DetailsStack.tsx","../../src/components/stack/LabelValueStack.tsx","../../src/story/buildRandomBlockchain.ts","../../src/story/IframeWalletWarningDecorator.tsx"],"sourcesContent":["import type { MenuItemProps } from '@mui/material'\nimport {\n MenuItem, styled, useTheme,\n} from '@mui/material'\nimport React from 'react'\n\nexport const ActiveMenuItem: React.FC<MenuItemProps & { active?: boolean }> = ({\n active, children, sx, ...props\n}) => {\n const theme = useTheme()\n return (\n <StyledMenuItem\n disableRipple\n sx={{\n // left border color and background color for active state\n 'borderLeft': `5px solid ${active ? theme.vars.palette.secondary.light : 'transparent'}`,\n 'backgroundColor': active ? theme.vars.palette.secondary.dark : 'transparent',\n // force white text color for active state for improved readability with background color\n 'color': active ? 'white' : 'unset',\n '&:hover': {\n // overriding default hover color and backgroundColor since active state conflicts visually with\n // default styles of MenuItem hover\n ...(active ? { backgroundColor: theme.vars.palette.secondary.dark } : {}),\n color: active ? 'white' : 'unset',\n },\n ...sx,\n }}\n {...props}\n >\n {children}\n </StyledMenuItem>\n )\n}\n\nconst StyledMenuItem = styled(MenuItem, { name: 'StyledMenuItem' })(({ theme }) => ({\n display: 'flex-inline',\n flexDirection: 'row',\n gap: theme.spacing(1),\n padding: 0,\n paddingLeft: theme.spacing(1),\n marginBottom: theme.spacing(1),\n}))\n","import type { StackProps } from '@mui/material'\nimport {\n Stack, styled, Tooltip, Typography,\n useTheme,\n} from '@mui/material'\nimport { isDefined } from '@xylabs/sdk-js'\nimport type {\n ComponentType, ReactNode, SVGAttributes,\n} from 'react'\nimport React, { useMemo } from 'react'\n\nconst isComponentType = (value: unknown): value is ComponentType<SVGAttributes<SVGElement>> =>\n typeof value === 'function'\n || (typeof value === 'object' && value !== null && ('$$typeof' in value || 'render' in value))\n\nexport interface DetailsStackProps extends StackProps {\n IconComponent?: ComponentType<SVGAttributes<SVGElement>> | ReactNode\n heading?: string\n tooltipTitle?: string\n}\n\nexport const DetailsStack: React.FC<DetailsStackProps> = ({\n IconComponent, heading, children, tooltipTitle, ...props\n}) => {\n const theme = useTheme()\n\n const hasTooltip = isDefined(tooltipTitle)\n const resolvedIconComponent = useMemo(() => {\n return isComponentType(IconComponent)\n ? (\n <IconComponent\n style={{\n /** height and marginTop adjusted to account for font not filling container with line-height: 1 */\n height: '0.85rem',\n marginTop: 0.5,\n marginLeft: theme.spacing(1),\n }}\n />\n )\n : IconComponent ?? null\n }, [IconComponent, theme])\n\n return (\n <Stack direction=\"column\" flexGrow={1} flexWrap=\"wrap\" minWidth=\"1px\" {...props}>\n <SectionHeadingTypography>\n {heading}\n {hasTooltip\n ? (\n <Tooltip title={tooltipTitle}>\n <span>{resolvedIconComponent}</span>\n </Tooltip>\n )\n : resolvedIconComponent}\n </SectionHeadingTypography>\n {children}\n </Stack>\n )\n}\n\nconst SectionHeadingTypography = styled(Typography, { name: 'SectionHeadingTypography' })(({ theme }) => ({\n display: 'flex',\n fontFamily: 'monospace',\n lineHeight: 1,\n marginBottom: theme.spacing(1.5),\n}))\n","import type { StackProps } from '@mui/material'\nimport {\n Stack, Typography, useTheme,\n} from '@mui/material'\nimport { ellipsize, isAddress } from '@xylabs/sdk-js'\nimport React from 'react'\n\nexport interface LabelValueStackProps extends StackProps {\n labels: string[]\n values: (string | undefined)[]\n}\n\nexport const LabelValueStack: React.FC<LabelValueStackProps> = ({\n labels, values, ...props\n}) => {\n const theme = useTheme()\n const formattedValue = (value: string | undefined): string | undefined => {\n if (isAddress(value)) {\n return ellipsize(value, 8)\n }\n return value\n }\n return (\n <Stack flexDirection=\"row\" flexGrow={1} {...props}>\n <Stack>\n {labels.map(label => (\n <Typography\n fontWeight=\"300\"\n key={label}\n variant=\"body2\"\n sx={{ borderBottom: `1px solid ${theme.vars?.palette.divider}`, opacity: 0.7 }}\n >\n {label}\n :\n </Typography>\n ))}\n </Stack>\n <Stack alignItems=\"end\" flexGrow={1}>\n {values.map((value, index) => (\n <Typography\n title={value}\n fontFamily=\"monospace\"\n variant=\"body2\"\n // Use matching label as key since values might be the same\n key={labels[index]}\n width=\"100%\"\n sx={{\n display: 'flex', justifyContent: 'end', borderBottom: `1px solid ${theme.vars?.palette.divider}`,\n }}\n >\n {formattedValue(value)}\n </Typography>\n ))}\n </Stack>\n </Stack>\n )\n}\n","import { buildRandomChain } from '@xyo-network/chain-protocol'\nimport { Account } from '@xyo-network/sdk-js'\n\ntype BuildRandomChainResult = Awaited<ReturnType<typeof buildRandomChain>>\n\nexport const buildRandomBlockChain = async (blockCount = 10): Promise<BuildRandomChainResult> => {\n // Create a producer\n const initialBlockProducer = await Account.random()\n\n // Create multiple blocks\n const blocks = await buildRandomChain(initialBlockProducer, blockCount)\n return blocks\n}\n\nexport const buildRandomBlockChainBlocksOnly = async (blockCount = 10): Promise<BuildRandomChainResult> => {\n const chain = await buildRandomChain(await Account.random(), blockCount)\n return chain\n}\n","import { Alert, Stack } from '@mui/material'\nimport type { Decorator } from '@storybook/react-vite'\nimport { isXyoGlobal } from '@xyo-network/react-chain-model'\nimport React from 'react'\n\nconst inIframe = globalThis.self !== window.top\n\n/**\n * Storybook decorator that displays warning banners when:\n * - the story is rendered inside an iframe (prompt user to open in a standalone tab), or\n * - the XYO wallet extension is not detected (prompt user to install it).\n *\n * Stories that require direct browser-extension access should use this decorator.\n */\nexport const IframeWalletWarningDecorator: Decorator = (Story, args) => {\n const hasXyoGlobal = isXyoGlobal((globalThis as Record<string, unknown>).xyo)\n return (\n <Stack gap={2}>\n {inIframe\n ? (\n <Alert severity=\"warning\">\n This story is running in an iframe. Please run it in a standalone browser window to test the wallet extension.\n </Alert>\n )\n : null}\n {hasXyoGlobal\n ? null\n : (\n <Alert severity=\"warning\">\n No wallet extension found. Please install the Xyo Wallet Chrome Extension.\n </Alert>\n )}\n <Story {...args} />\n </Stack>\n )\n}\n"],"mappings":";;;;AACA,SACEA,UAAUC,QAAQC,gBACb;AACP,OAAOC,WAAW;AAEX,IAAMC,iBAAiE,wBAAC,EAC7EC,QAAQC,UAAUC,IAAI,GAAGC,MAAAA,MAC1B;AACC,QAAMC,QAAQC,SAAAA;AACd,SACE,sBAAA,cAACC,gBAAAA;IACCC,eAAAA;IACAL,IAAI;;MAEF,cAAc,aAAaF,SAASI,MAAMI,KAAKC,QAAQC,UAAUC,QAAQ,aAAA;MACzE,mBAAmBX,SAASI,MAAMI,KAAKC,QAAQC,UAAUE,OAAO;;MAEhE,SAASZ,SAAS,UAAU;MAC5B,WAAW;;;QAGT,GAAIA,SAAS;UAAEa,iBAAiBT,MAAMI,KAAKC,QAAQC,UAAUE;QAAK,IAAI,CAAC;QACvEE,OAAOd,SAAS,UAAU;MAC5B;MACA,GAAGE;IACL;IACC,GAAGC;KAEHF,QAAAA;AAGP,GA1B8E;AA4B9E,IAAMK,iBAAiBS,OAAOC,UAAU;EAAEC,MAAM;AAAiB,CAAA,EAAG,CAAC,EAAEb,MAAK,OAAQ;EAClFc,SAAS;EACTC,eAAe;EACfC,KAAKhB,MAAMiB,QAAQ,CAAA;EACnBC,SAAS;EACTC,aAAanB,MAAMiB,QAAQ,CAAA;EAC3BG,cAAcp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AAQC,OAAM,GAAIH,UAAAA;AAC7D,SAAOO;AACT,GAH+C;;;ACd/C,SAASC,OAAOC,SAAAA,cAAa;AAE7B,SAASC,mBAAmB;AAC5B,OAAOC,YAAW;AAElB,IAAMC,WAAWC,WAAWC,SAASC,OAAOC;AASrC,IAAMC,+BAA0C,wBAACC,OAAOC,SAAAA;AAC7D,QAAMC,eAAeC,YAAaR,WAAuCS,GAAG;AAC5E,SACE,gBAAAC,OAAA,cAACC,QAAAA;IAAMC,KAAK;KACTb,WAEK,gBAAAW,OAAA,cAACG,OAAAA;IAAMC,UAAS;KAAU,gHAAA,IAI5B,MACHP,eACG,OAEE,gBAAAG,OAAA,cAACG,OAAAA;IAAMC,UAAS;KAAU,4EAAA,GAIhC,gBAAAJ,OAAA,cAACL,OAAUC,IAAAA,CAAAA;AAGjB,GArBuD;","names":["MenuItem","styled","useTheme","React","ActiveMenuItem","active","children","sx","props","theme","useTheme","StyledMenuItem","disableRipple","vars","palette","secondary","light","dark","backgroundColor","color","styled","MenuItem","name","display","flexDirection","gap","spacing","padding","paddingLeft","marginBottom","Stack","styled","Tooltip","Typography","useTheme","isDefined","React","useMemo","isComponentType","value","DetailsStack","IconComponent","heading","children","tooltipTitle","props","theme","useTheme","hasTooltip","isDefined","resolvedIconComponent","useMemo","React","style","height","marginTop","marginLeft","spacing","Stack","direction","flexGrow","flexWrap","minWidth","SectionHeadingTypography","Tooltip","title","span","styled","Typography","name","display","fontFamily","lineHeight","marginBottom","Stack","Typography","useTheme","ellipsize","isAddress","React","LabelValueStack","labels","values","props","theme","useTheme","formattedValue","value","isAddress","ellipsize","React","Stack","flexDirection","flexGrow","map","label","Typography","fontWeight","key","variant","sx","borderBottom","vars","palette","divider","opacity","alignItems","index","title","fontFamily","width","display","justifyContent","buildRandomChain","Account","buildRandomBlockChain","blockCount","initialBlockProducer","Account","random","blocks","buildRandomChain","buildRandomBlockChainBlocksOnly","chain","Alert","Stack","isXyoGlobal","React","inIframe","globalThis","self","window","top","IframeWalletWarningDecorator","Story","args","hasXyoGlobal","isXyoGlobal","xyo","React","Stack","gap","Alert","severity"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/menu-item/ActiveMenuItem.tsx","../../src/components/stack/DetailsStack.tsx","../../src/components/stack/LabelValueStack.tsx","../../src/story/buildRandomBlockchain.ts","../../src/story/IframeWalletWarningDecorator.tsx"],"sourcesContent":["import type { MenuItemProps } from '@mui/material'\nimport {\n MenuItem, styled, useTheme,\n} from '@mui/material'\nimport React from 'react'\n\nexport const ActiveMenuItem: React.FC<MenuItemProps & { active?: boolean }> = ({\n active, children, sx, ...props\n}) => {\n const theme = useTheme()\n return (\n <StyledMenuItem\n disableRipple\n sx={{\n // left border color and background color for active state\n 'borderLeft': `5px solid ${active ? theme.vars.palette.secondary.light : 'transparent'}`,\n 'backgroundColor': active ? theme.vars.palette.secondary.dark : 'transparent',\n // force white text color for active state for improved readability with background color\n 'color': active ? 'white' : 'unset',\n '&:hover': {\n // overriding default hover color and backgroundColor since active state conflicts visually with\n // default styles of MenuItem hover\n ...(active ? { backgroundColor: theme.vars.palette.secondary.dark } : {}),\n color: active ? 'white' : 'unset',\n },\n ...sx,\n }}\n {...props}\n >\n {children}\n </StyledMenuItem>\n )\n}\n\nconst StyledMenuItem = styled(MenuItem, { name: 'StyledMenuItem' })(({ theme }) => ({\n display: 'flex-inline',\n flexDirection: 'row',\n gap: theme.spacing(1),\n padding: 0,\n paddingLeft: theme.spacing(1),\n marginBottom: theme.spacing(1),\n}))\n","import type { StackProps } from '@mui/material'\nimport {\n Stack, styled, Tooltip, Typography,\n useTheme,\n} from '@mui/material'\nimport { isDefined } from '@xylabs/sdk-js'\nimport type {\n ComponentType, ReactNode, SVGAttributes,\n} from 'react'\nimport React, { useMemo } from 'react'\n\nconst isComponentType = (value: unknown): value is ComponentType<SVGAttributes<SVGElement>> =>\n typeof value === 'function'\n || (typeof value === 'object' && value !== null && ('$$typeof' in value || 'render' in value))\n\nexport interface DetailsStackProps extends StackProps {\n IconComponent?: ComponentType<SVGAttributes<SVGElement>> | ReactNode\n heading?: string\n tooltipTitle?: string\n}\n\nexport const DetailsStack: React.FC<DetailsStackProps> = ({\n IconComponent, heading, children, tooltipTitle, ...props\n}) => {\n const theme = useTheme()\n\n const hasTooltip = isDefined(tooltipTitle)\n const resolvedIconComponent = useMemo(() => {\n return isComponentType(IconComponent)\n ? (\n <IconComponent\n style={{\n /** height and marginTop adjusted to account for font not filling container with line-height: 1 */\n height: '0.85rem',\n marginTop: 0.5,\n marginLeft: theme.spacing(1),\n }}\n />\n )\n : IconComponent ?? null\n }, [IconComponent, theme])\n\n return (\n <Stack direction=\"column\" flexGrow={1} flexWrap=\"wrap\" minWidth=\"1px\" {...props}>\n <SectionHeadingTypography>\n {heading}\n {hasTooltip\n ? (\n <Tooltip title={tooltipTitle}>\n <span>{resolvedIconComponent}</span>\n </Tooltip>\n )\n : resolvedIconComponent}\n </SectionHeadingTypography>\n {children}\n </Stack>\n )\n}\n\nconst SectionHeadingTypography = styled(Typography, { name: 'SectionHeadingTypography' })(({ theme }) => ({\n display: 'flex',\n fontFamily: 'monospace',\n lineHeight: 1,\n marginBottom: theme.spacing(1.5),\n}))\n","import type { StackProps } from '@mui/material'\nimport {\n Stack, Typography, useTheme,\n} from '@mui/material'\nimport { ellipsize, isAddress } from '@xylabs/sdk-js'\nimport React from 'react'\n\nexport interface LabelValueStackProps extends StackProps {\n labels: string[]\n values: (string | undefined)[]\n}\n\nexport const LabelValueStack: React.FC<LabelValueStackProps> = ({\n labels, values, ...props\n}) => {\n const theme = useTheme()\n const formattedValue = (value: string | undefined): string | undefined => {\n if (isAddress(value)) {\n return ellipsize(value, 8)\n }\n return value\n }\n return (\n <Stack flexDirection=\"row\" flexGrow={1} {...props}>\n <Stack>\n {labels.map(label => (\n <Typography\n fontWeight=\"300\"\n key={label}\n variant=\"body2\"\n sx={{ borderBottom: `1px solid ${theme.vars?.palette.divider}`, opacity: 0.7 }}\n >\n {label}\n :\n </Typography>\n ))}\n </Stack>\n <Stack alignItems=\"end\" flexGrow={1}>\n {values.map((value, index) => (\n <Typography\n title={value}\n fontFamily=\"monospace\"\n variant=\"body2\"\n // Use matching label as key since values might be the same\n key={labels[index]}\n width=\"100%\"\n sx={{\n display: 'flex', justifyContent: 'end', borderBottom: `1px solid ${theme.vars?.palette.divider}`,\n }}\n >\n {formattedValue(value)}\n </Typography>\n ))}\n </Stack>\n </Stack>\n )\n}\n","import { buildRandomChain } from '@xyo-network/chain-protocol-test'\nimport { Account } from '@xyo-network/sdk-js'\n\ntype BuildRandomChainResult = Awaited<ReturnType<typeof buildRandomChain>>\n\nexport const buildRandomBlockChain = async (blockCount = 10): Promise<BuildRandomChainResult> => {\n // Create a producer\n const initialBlockProducer = await Account.random()\n\n // Create multiple blocks\n const blocks = await buildRandomChain(initialBlockProducer, blockCount)\n return blocks\n}\n\nexport const buildRandomBlockChainBlocksOnly = async (blockCount = 10): Promise<BuildRandomChainResult> => {\n const chain = await buildRandomChain(await Account.random(), blockCount)\n return chain\n}\n","import { Alert, Stack } from '@mui/material'\nimport type { Decorator } from '@storybook/react-vite'\nimport { isXyoGlobal } from '@xyo-network/react-chain-model'\nimport React from 'react'\n\nconst inIframe = globalThis.self !== window.top\n\n/**\n * Storybook decorator that displays warning banners when:\n * - the story is rendered inside an iframe (prompt user to open in a standalone tab), or\n * - the XYO wallet extension is not detected (prompt user to install it).\n *\n * Stories that require direct browser-extension access should use this decorator.\n */\nexport const IframeWalletWarningDecorator: Decorator = (Story, args) => {\n const hasXyoGlobal = isXyoGlobal((globalThis as Record<string, unknown>).xyo)\n return (\n <Stack gap={2}>\n {inIframe\n ? (\n <Alert severity=\"warning\">\n This story is running in an iframe. Please run it in a standalone browser window to test the wallet extension.\n </Alert>\n )\n : null}\n {hasXyoGlobal\n ? null\n : (\n <Alert severity=\"warning\">\n No wallet extension found. Please install the Xyo Wallet Chrome Extension.\n </Alert>\n )}\n <Story {...args} />\n </Stack>\n )\n}\n"],"mappings":";;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A,GAIhC,gBAAAJ,OAAA,cAACL,OAAUC,IAAAA,CAAAA;AAGjB,GArBuD;","names":["MenuItem","styled","useTheme","React","ActiveMenuItem","active","children","sx","props","theme","useTheme","StyledMenuItem","disableRipple","vars","palette","secondary","light","dark","backgroundColor","color","styled","MenuItem","name","display","flexDirection","gap","spacing","padding","paddingLeft","marginBottom","Stack","styled","Tooltip","Typography","useTheme","isDefined","React","useMemo","isComponentType","value","DetailsStack","IconComponent","heading","children","tooltipTitle","props","theme","useTheme","hasTooltip","isDefined","resolvedIconComponent","useMemo","React","style","height","marginTop","marginLeft","spacing","Stack","direction","flexGrow","flexWrap","minWidth","SectionHeadingTypography","Tooltip","title","span","styled","Typography","name","display","fontFamily","lineHeight","marginBottom","Stack","Typography","useTheme","ellipsize","isAddress","React","LabelValueStack","labels","values","props","theme","useTheme","formattedValue","value","isAddress","ellipsize","React","Stack","flexDirection","flexGrow","map","label","Typography","fontWeight","key","variant","sx","borderBottom","vars","palette","divider","opacity","alignItems","index","title","fontFamily","width","display","justifyContent","buildRandomChain","Account","buildRandomBlockChain","blockCount","initialBlockProducer","Account","random","blocks","buildRandomChain","buildRandomBlockChainBlocksOnly","chain","Alert","Stack","isXyoGlobal","React","inIframe","globalThis","self","window","top","IframeWalletWarningDecorator","Story","args","hasXyoGlobal","isXyoGlobal","xyo","React","Stack","gap","Alert","severity"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildRandomChain } from '@xyo-network/chain-protocol';
|
|
1
|
+
import { buildRandomChain } from '@xyo-network/chain-protocol-test';
|
|
2
2
|
type BuildRandomChainResult = Awaited<ReturnType<typeof buildRandomChain>>;
|
|
3
3
|
export declare const buildRandomBlockChain: (blockCount?: number) => Promise<BuildRandomChainResult>;
|
|
4
4
|
export declare const buildRandomBlockChainBlocksOnly: (blockCount?: number) => Promise<BuildRandomChainResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildRandomBlockchain.d.ts","sourceRoot":"","sources":["../../../src/story/buildRandomBlockchain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"buildRandomBlockchain.d.ts","sourceRoot":"","sources":["../../../src/story/buildRandomBlockchain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAGnE,KAAK,sBAAsB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAA;AAE1E,eAAO,MAAM,qBAAqB,GAAU,mBAAe,KAAG,OAAO,CAAC,sBAAsB,CAO3F,CAAA;AAED,eAAO,MAAM,+BAA+B,GAAU,mBAAe,KAAG,OAAO,CAAC,sBAAsB,CAGrG,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@xyo-network/react-chain-shared",
|
|
4
|
-
"version": "1.20.
|
|
4
|
+
"version": "1.20.18",
|
|
5
5
|
"description": "XYO Layer One React SDK",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -31,8 +31,6 @@
|
|
|
31
31
|
},
|
|
32
32
|
"./package.json": "./package.json"
|
|
33
33
|
},
|
|
34
|
-
"module": "./dist/browser/index.mjs",
|
|
35
|
-
"types": "./dist/browser/index.d.ts",
|
|
36
34
|
"files": [
|
|
37
35
|
"dist",
|
|
38
36
|
"!**/*.bench.*",
|
|
@@ -44,20 +42,19 @@
|
|
|
44
42
|
"@mui/material": ">=6 <8",
|
|
45
43
|
"@storybook/react-vite": "^10.3.5",
|
|
46
44
|
"@xylabs/sdk-js": "~5.0.95",
|
|
47
|
-
"@xyo-network/chain-
|
|
48
|
-
"@xyo-network/
|
|
45
|
+
"@xyo-network/react-chain-model": "~1.20.18",
|
|
46
|
+
"@xyo-network/chain-protocol-test": "~1.20.18"
|
|
49
47
|
},
|
|
50
48
|
"devDependencies": {
|
|
51
49
|
"@emotion/react": "~11.14.0",
|
|
52
50
|
"@emotion/styled": "~11.14.1",
|
|
53
51
|
"@opentelemetry/api": "^1",
|
|
54
|
-
"@types/node": "^25.
|
|
52
|
+
"@types/node": "^25.6.0",
|
|
55
53
|
"@types/react": "~19.2.14",
|
|
56
|
-
"@xylabs/
|
|
57
|
-
"@xylabs/
|
|
58
|
-
"@xylabs/tsconfig": "~7.
|
|
59
|
-
"@xylabs/tsconfig-
|
|
60
|
-
"@xylabs/tsconfig-react": "~7.9.6",
|
|
54
|
+
"@xylabs/toolchain": "~7.10.7",
|
|
55
|
+
"@xylabs/tsconfig": "~7.10.7",
|
|
56
|
+
"@xylabs/tsconfig-dom": "~7.10.7",
|
|
57
|
+
"@xylabs/tsconfig-react": "~7.10.7",
|
|
61
58
|
"@xyo-network/account": "~5.3.30",
|
|
62
59
|
"@xyo-network/account-model": "~5.3.30",
|
|
63
60
|
"@xyo-network/api-models": "~5.3.30",
|
|
@@ -112,7 +109,6 @@
|
|
|
112
109
|
"axios": "^1.15.0",
|
|
113
110
|
"esbuild": "*",
|
|
114
111
|
"ethers": "^6.16.0",
|
|
115
|
-
"mongodb": "^7.1.1",
|
|
116
112
|
"pako": "~2.1.0",
|
|
117
113
|
"react": "~19.2.5",
|
|
118
114
|
"react-dom": "~19.2.5",
|