@xyo-network/react-chain-shared 1.23.0 → 1.23.2
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 +156 -116
- package/dist/browser/index.mjs.map +7 -1
- package/package.json +13 -13
package/dist/browser/index.mjs
CHANGED
|
@@ -1,35 +1,41 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// src/components/menu-item/ActiveMenuItem.tsx
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import {
|
|
3
|
+
MenuItem,
|
|
4
|
+
styled,
|
|
5
|
+
useTheme
|
|
6
|
+
} from "@mui/material";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var ActiveMenuItem = ({
|
|
9
|
+
active,
|
|
10
|
+
children,
|
|
11
|
+
sx,
|
|
12
|
+
...props
|
|
13
|
+
}) => {
|
|
8
14
|
const theme = useTheme();
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
StyledMenuItem,
|
|
17
|
+
{
|
|
18
|
+
disableRipple: true,
|
|
19
|
+
sx: {
|
|
20
|
+
// left border color and background color for active state
|
|
21
|
+
"borderLeft": `5px solid ${active ? theme.vars.palette.secondary.light : "transparent"}`,
|
|
22
|
+
"backgroundColor": active ? theme.vars.palette.secondary.dark : "transparent",
|
|
23
|
+
// force white text color for active state for improved readability with background color
|
|
24
|
+
"color": active ? "white" : "unset",
|
|
25
|
+
"&:hover": {
|
|
26
|
+
// overriding default hover color and backgroundColor since active state conflicts visually with
|
|
27
|
+
// default styles of MenuItem hover
|
|
28
|
+
...active ? { backgroundColor: theme.vars.palette.secondary.dark } : {},
|
|
29
|
+
color: active ? "white" : "unset"
|
|
30
|
+
},
|
|
31
|
+
...sx
|
|
24
32
|
},
|
|
25
|
-
...
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
var StyledMenuItem = styled(MenuItem, {
|
|
31
|
-
name: "StyledMenuItem"
|
|
32
|
-
})(({ theme }) => ({
|
|
33
|
+
...props,
|
|
34
|
+
children
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
var StyledMenuItem = styled(MenuItem, { name: "StyledMenuItem" })(({ theme }) => ({
|
|
33
39
|
display: "flex-inline",
|
|
34
40
|
flexDirection: "row",
|
|
35
41
|
gap: theme.spacing(1),
|
|
@@ -39,46 +45,60 @@ var StyledMenuItem = styled(MenuItem, {
|
|
|
39
45
|
}));
|
|
40
46
|
|
|
41
47
|
// src/components/stack/DetailsStack.tsx
|
|
42
|
-
import {
|
|
48
|
+
import {
|
|
49
|
+
Stack,
|
|
50
|
+
styled as styled2,
|
|
51
|
+
Tooltip,
|
|
52
|
+
Typography,
|
|
53
|
+
useTheme as useTheme2
|
|
54
|
+
} from "@mui/material";
|
|
43
55
|
import { isDefined } from "@xylabs/sdk-js";
|
|
44
|
-
import
|
|
45
|
-
|
|
46
|
-
var
|
|
56
|
+
import { useMemo } from "react";
|
|
57
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
58
|
+
var isComponentType = (value) => typeof value === "function" || typeof value === "object" && value !== null && ("$$typeof" in value || "render" in value);
|
|
59
|
+
var DetailsStack = ({
|
|
60
|
+
IconComponent,
|
|
61
|
+
heading,
|
|
62
|
+
children,
|
|
63
|
+
tooltipTitle,
|
|
64
|
+
...props
|
|
65
|
+
}) => {
|
|
47
66
|
const theme = useTheme2();
|
|
48
67
|
const hasTooltip = isDefined(tooltipTitle);
|
|
49
68
|
const resolvedIconComponent = useMemo(() => {
|
|
50
|
-
return isComponentType(IconComponent) ? /* @__PURE__ */
|
|
51
|
-
|
|
52
|
-
/** height and marginTop adjusted to account for font not filling container with line-height: 1 */
|
|
53
|
-
height: "0.85rem",
|
|
54
|
-
marginTop: 0.5,
|
|
55
|
-
marginLeft: theme.spacing(1)
|
|
56
|
-
}
|
|
57
|
-
}) : IconComponent ?? null;
|
|
58
|
-
}, [
|
|
59
|
-
IconComponent,
|
|
60
|
-
theme
|
|
61
|
-
]);
|
|
62
|
-
return /* @__PURE__ */ React2.createElement(Stack, {
|
|
63
|
-
direction: "column",
|
|
64
|
-
...props,
|
|
65
|
-
sx: [
|
|
69
|
+
return isComponentType(IconComponent) ? /* @__PURE__ */ jsx2(
|
|
70
|
+
IconComponent,
|
|
66
71
|
{
|
|
72
|
+
style: {
|
|
73
|
+
/** height and marginTop adjusted to account for font not filling container with line-height: 1 */
|
|
74
|
+
height: "0.85rem",
|
|
75
|
+
marginTop: 0.5,
|
|
76
|
+
marginLeft: theme.spacing(1)
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
) : IconComponent ?? null;
|
|
80
|
+
}, [IconComponent, theme]);
|
|
81
|
+
return /* @__PURE__ */ jsxs(
|
|
82
|
+
Stack,
|
|
83
|
+
{
|
|
84
|
+
direction: "column",
|
|
85
|
+
...props,
|
|
86
|
+
sx: [{
|
|
67
87
|
flexGrow: 1,
|
|
68
88
|
flexWrap: "wrap",
|
|
69
89
|
minWidth: "1px"
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
|
|
90
|
+
}, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ jsxs(SectionHeadingTypography, { children: [
|
|
93
|
+
heading,
|
|
94
|
+
hasTooltip ? /* @__PURE__ */ jsx2(Tooltip, { title: tooltipTitle, children: /* @__PURE__ */ jsx2("span", { children: resolvedIconComponent }) }) : resolvedIconComponent
|
|
95
|
+
] }),
|
|
96
|
+
children
|
|
73
97
|
]
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}, "DetailsStack");
|
|
79
|
-
var SectionHeadingTypography = styled2(Typography, {
|
|
80
|
-
name: "SectionHeadingTypography"
|
|
81
|
-
})(({ theme }) => ({
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
};
|
|
101
|
+
var SectionHeadingTypography = styled2(Typography, { name: "SectionHeadingTypography" })(({ theme }) => ({
|
|
82
102
|
display: "flex",
|
|
83
103
|
fontFamily: "monospace",
|
|
84
104
|
lineHeight: 1,
|
|
@@ -86,86 +106,106 @@ var SectionHeadingTypography = styled2(Typography, {
|
|
|
86
106
|
}));
|
|
87
107
|
|
|
88
108
|
// src/components/stack/LabelValueStack.tsx
|
|
89
|
-
import {
|
|
109
|
+
import {
|
|
110
|
+
Stack as Stack2,
|
|
111
|
+
Typography as Typography2,
|
|
112
|
+
useTheme as useTheme3
|
|
113
|
+
} from "@mui/material";
|
|
90
114
|
import { ellipsize, isAddress } from "@xylabs/sdk-js";
|
|
91
|
-
import
|
|
92
|
-
var LabelValueStack =
|
|
115
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
116
|
+
var LabelValueStack = ({
|
|
117
|
+
labels,
|
|
118
|
+
values,
|
|
119
|
+
...props
|
|
120
|
+
}) => {
|
|
93
121
|
const theme = useTheme3();
|
|
94
|
-
const formattedValue =
|
|
122
|
+
const formattedValue = (value) => {
|
|
95
123
|
if (isAddress(value)) {
|
|
96
124
|
return ellipsize(value, 8);
|
|
97
125
|
}
|
|
98
126
|
return value;
|
|
99
|
-
}
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
127
|
+
};
|
|
128
|
+
return /* @__PURE__ */ jsxs2(
|
|
129
|
+
Stack2,
|
|
130
|
+
{
|
|
131
|
+
...props,
|
|
132
|
+
sx: [{
|
|
104
133
|
flexDirection: "row",
|
|
105
134
|
flexGrow: 1
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
135
|
+
}, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ jsx3(Stack2, { children: labels.map((label) => /* @__PURE__ */ jsxs2(
|
|
138
|
+
Typography2,
|
|
139
|
+
{
|
|
140
|
+
variant: "body2",
|
|
141
|
+
sx: {
|
|
142
|
+
fontWeight: "300",
|
|
143
|
+
borderBottom: `1px solid ${theme.vars?.palette.divider}`,
|
|
144
|
+
opacity: 0.7
|
|
145
|
+
},
|
|
146
|
+
children: [
|
|
147
|
+
label,
|
|
148
|
+
":"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
label
|
|
152
|
+
)) }),
|
|
153
|
+
/* @__PURE__ */ jsx3(
|
|
154
|
+
Stack2,
|
|
155
|
+
{
|
|
156
|
+
sx: {
|
|
157
|
+
alignItems: "end",
|
|
158
|
+
flexGrow: 1
|
|
159
|
+
},
|
|
160
|
+
children: values.map((value, index) => /* @__PURE__ */ jsx3(
|
|
161
|
+
Typography2,
|
|
162
|
+
{
|
|
163
|
+
title: value,
|
|
164
|
+
variant: "body2",
|
|
165
|
+
sx: {
|
|
166
|
+
fontFamily: "monospace",
|
|
167
|
+
width: "100%",
|
|
168
|
+
display: "flex",
|
|
169
|
+
justifyContent: "end",
|
|
170
|
+
borderBottom: `1px solid ${theme.vars?.palette.divider}`
|
|
171
|
+
},
|
|
172
|
+
children: formattedValue(value)
|
|
173
|
+
},
|
|
174
|
+
labels[index]
|
|
175
|
+
))
|
|
176
|
+
}
|
|
177
|
+
)
|
|
109
178
|
]
|
|
110
|
-
]
|
|
111
|
-
}, /* @__PURE__ */ React3.createElement(Stack2, null, labels.map((label) => /* @__PURE__ */ React3.createElement(Typography2, {
|
|
112
|
-
key: label,
|
|
113
|
-
variant: "body2",
|
|
114
|
-
sx: {
|
|
115
|
-
fontWeight: "300",
|
|
116
|
-
borderBottom: `1px solid ${theme.vars?.palette.divider}`,
|
|
117
|
-
opacity: 0.7
|
|
118
|
-
}
|
|
119
|
-
}, label, ":"))), /* @__PURE__ */ React3.createElement(Stack2, {
|
|
120
|
-
sx: {
|
|
121
|
-
alignItems: "end",
|
|
122
|
-
flexGrow: 1
|
|
123
179
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
variant: "body2",
|
|
127
|
-
// Use matching label as key since values might be the same
|
|
128
|
-
key: labels[index],
|
|
129
|
-
sx: {
|
|
130
|
-
fontFamily: "monospace",
|
|
131
|
-
width: "100%",
|
|
132
|
-
display: "flex",
|
|
133
|
-
justifyContent: "end",
|
|
134
|
-
borderBottom: `1px solid ${theme.vars?.palette.divider}`
|
|
135
|
-
}
|
|
136
|
-
}, formattedValue(value)))));
|
|
137
|
-
}, "LabelValueStack");
|
|
180
|
+
);
|
|
181
|
+
};
|
|
138
182
|
|
|
139
183
|
// src/story/buildRandomBlockchain.ts
|
|
140
184
|
import { buildRandomChain } from "@xyo-network/chain-protocol-test";
|
|
141
185
|
import { Account } from "@xyo-network/sdk-js";
|
|
142
|
-
var buildRandomBlockChain =
|
|
186
|
+
var buildRandomBlockChain = async (blockCount = 10) => {
|
|
143
187
|
const initialBlockProducer = await Account.random();
|
|
144
188
|
const blocks = await buildRandomChain(initialBlockProducer, blockCount);
|
|
145
189
|
return blocks;
|
|
146
|
-
}
|
|
147
|
-
var buildRandomBlockChainBlocksOnly =
|
|
190
|
+
};
|
|
191
|
+
var buildRandomBlockChainBlocksOnly = async (blockCount = 10) => {
|
|
148
192
|
const chain = await buildRandomChain(await Account.random(), blockCount);
|
|
149
193
|
return chain;
|
|
150
|
-
}
|
|
194
|
+
};
|
|
151
195
|
|
|
152
196
|
// src/story/IframeWalletWarningDecorator.tsx
|
|
153
197
|
import { Alert, Stack as Stack3 } from "@mui/material";
|
|
154
198
|
import { isXyoGlobal } from "@xyo-network/react-chain-model";
|
|
155
|
-
import
|
|
199
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
156
200
|
var inIframe = globalThis.self !== window.top;
|
|
157
|
-
var IframeWalletWarningDecorator =
|
|
201
|
+
var IframeWalletWarningDecorator = (Story, args) => {
|
|
158
202
|
const hasXyoGlobal = isXyoGlobal(globalThis.xyo);
|
|
159
|
-
return /* @__PURE__ */
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
}, "This story is running in an iframe. Please run it in a standalone browser window to test the wallet extension.") : null, hasXyoGlobal ? null : /* @__PURE__ */ React4.createElement(Alert, {
|
|
166
|
-
severity: "warning"
|
|
167
|
-
}, "No wallet extension found. Please install the Xyo Wallet Chrome Extension."), /* @__PURE__ */ React4.createElement(Story, args));
|
|
168
|
-
}, "IframeWalletWarningDecorator");
|
|
203
|
+
return /* @__PURE__ */ jsxs3(Stack3, { sx: { gap: 2 }, children: [
|
|
204
|
+
inIframe ? /* @__PURE__ */ jsx4(Alert, { severity: "warning", children: "This story is running in an iframe. Please run it in a standalone browser window to test the wallet extension." }) : null,
|
|
205
|
+
hasXyoGlobal ? null : /* @__PURE__ */ jsx4(Alert, { severity: "warning", children: "No wallet extension found. Please install the Xyo Wallet Chrome Extension." }),
|
|
206
|
+
/* @__PURE__ */ jsx4(Story, { ...args })
|
|
207
|
+
] });
|
|
208
|
+
};
|
|
169
209
|
export {
|
|
170
210
|
ActiveMenuItem,
|
|
171
211
|
DetailsStack,
|
|
@@ -174,4 +214,4 @@ export {
|
|
|
174
214
|
buildRandomBlockChain,
|
|
175
215
|
buildRandomBlockChainBlocksOnly
|
|
176
216
|
};
|
|
177
|
-
//# sourceMappingURL=index.mjs.map
|
|
217
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1,7 @@
|
|
|
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\n/**\n * @deprecated Use {@link ActiveMenuItem} from `@xyo-network/xl1-react-client-sdk/shared` instead.\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\n/**\n * @deprecated Use {@link DetailsStackProps} from `@xyo-network/xl1-react-client-sdk/shared` instead.\n */\nexport interface DetailsStackProps extends StackProps {\n IconComponent?: ComponentType<SVGAttributes<SVGElement>> | ReactNode\n heading?: string\n tooltipTitle?: string\n}\n\n/**\n * @deprecated Use {@link DetailsStack} from `@xyo-network/xl1-react-client-sdk/shared` instead.\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\n direction=\"column\"\n {...props}\n sx={[{\n flexGrow: 1,\n flexWrap: 'wrap',\n minWidth: '1px',\n }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\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\n/**\n * @deprecated Use {@link LabelValueStackProps} from `@xyo-network/xl1-react-client-sdk/shared` instead.\n */\nexport interface LabelValueStackProps extends StackProps {\n labels: string[]\n values: (string | undefined)[]\n}\n\n/**\n * @deprecated Use {@link LabelValueStack} from `@xyo-network/xl1-react-client-sdk/shared` instead.\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\n {...props}\n sx={[{\n flexDirection: 'row',\n flexGrow: 1,\n }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\n <Stack>\n {labels.map(label => (\n <Typography\n key={label}\n variant=\"body2\"\n sx={{\n fontWeight: '300',\n borderBottom: `1px solid ${theme.vars?.palette.divider}`,\n opacity: 0.7,\n }}\n >\n {label}\n :\n </Typography>\n ))}\n </Stack>\n <Stack\n sx={{\n alignItems: 'end',\n flexGrow: 1,\n }}\n >\n {values.map((value, index) => (\n <Typography\n title={value}\n variant=\"body2\"\n // Use matching label as key since values might be the same\n key={labels[index]}\n sx={{\n fontFamily: 'monospace',\n width: '100%',\n display: 'flex',\n justifyContent: 'end',\n 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 sx={{ 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;AAKX,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,cAAcpB,MAAMiB,QAAQ,CAAA;AAC9B,EAAA;;;AC3CA,SACEI,OAAOC,UAAAA,SAAQC,SAASC,YACxBC,YAAAA,iBACK;AACP,SAASC,iBAAiB;AAI1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,kCAAkC,8BAAON,aAAa,OAAE;AACnE,QAAMO,QAAQ,MAAMF,iBAAiB,MAAMH,QAAQC,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,IAAI;MAAEC,KAAK;IAAE;KACjBd,WAEK,gBAAAW,OAAA,cAACI,OAAAA;IAAMC,UAAS;KAAU,gHAAA,IAI5B,MACHR,eACG,OAEE,gBAAAG,OAAA,cAACI,OAAAA;IAAMC,UAAS;KAAU,4EAAA,GAIhC,gBAAAL,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","sx","flexGrow","flexWrap","minWidth","Array","isArray","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","sx","flexDirection","flexGrow","Array","isArray","map","label","Typography","key","variant","fontWeight","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","sx","gap","Alert","severity"]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
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"],
|
|
4
|
+
"sourcesContent": ["import type { MenuItemProps } from '@mui/material'\nimport {\n MenuItem, styled, useTheme,\n} from '@mui/material'\nimport React from 'react'\n\n/**\n * @deprecated Use {@link ActiveMenuItem} from `@xyo-network/xl1-react-client-sdk/shared` instead.\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\n/**\n * @deprecated Use {@link DetailsStackProps} from `@xyo-network/xl1-react-client-sdk/shared` instead.\n */\nexport interface DetailsStackProps extends StackProps {\n IconComponent?: ComponentType<SVGAttributes<SVGElement>> | ReactNode\n heading?: string\n tooltipTitle?: string\n}\n\n/**\n * @deprecated Use {@link DetailsStack} from `@xyo-network/xl1-react-client-sdk/shared` instead.\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\n direction=\"column\"\n {...props}\n sx={[{\n flexGrow: 1,\n flexWrap: 'wrap',\n minWidth: '1px',\n }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\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\n/**\n * @deprecated Use {@link LabelValueStackProps} from `@xyo-network/xl1-react-client-sdk/shared` instead.\n */\nexport interface LabelValueStackProps extends StackProps {\n labels: string[]\n values: (string | undefined)[]\n}\n\n/**\n * @deprecated Use {@link LabelValueStack} from `@xyo-network/xl1-react-client-sdk/shared` instead.\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\n {...props}\n sx={[{\n flexDirection: 'row',\n flexGrow: 1,\n }, ...(Array.isArray(props.sx) ? props.sx : [props.sx])]}\n >\n <Stack>\n {labels.map(label => (\n <Typography\n key={label}\n variant=\"body2\"\n sx={{\n fontWeight: '300',\n borderBottom: `1px solid ${theme.vars?.palette.divider}`,\n opacity: 0.7,\n }}\n >\n {label}\n :\n </Typography>\n ))}\n </Stack>\n <Stack\n sx={{\n alignItems: 'end',\n flexGrow: 1,\n }}\n >\n {values.map((value, index) => (\n <Typography\n title={value}\n variant=\"body2\"\n // Use matching label as key since values might be the same\n key={labels[index]}\n sx={{\n fontFamily: 'monospace',\n width: '100%',\n display: 'flex',\n justifyContent: 'end',\n 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 sx={{ 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"],
|
|
5
|
+
"mappings": ";AACA;AAAA,EACE;AAAA,EAAU;AAAA,EAAQ;AAAA,OACb;AAWH;AALG,IAAM,iBAAiE,CAAC;AAAA,EAC7E;AAAA,EAAQ;AAAA,EAAU;AAAA,EAAI,GAAG;AAC3B,MAAM;AACJ,QAAM,QAAQ,SAAS;AACvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa;AAAA,MACb,IAAI;AAAA;AAAA,QAEF,cAAc,aAAa,SAAS,MAAM,KAAK,QAAQ,UAAU,QAAQ,aAAa;AAAA,QACtF,mBAAmB,SAAS,MAAM,KAAK,QAAQ,UAAU,OAAO;AAAA;AAAA,QAEhE,SAAS,SAAS,UAAU;AAAA,QAC5B,WAAW;AAAA;AAAA;AAAA,UAGT,GAAI,SAAS,EAAE,iBAAiB,MAAM,KAAK,QAAQ,UAAU,KAAK,IAAI,CAAC;AAAA,UACvE,OAAO,SAAS,UAAU;AAAA,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;AAAA,IACH,eACG,OAEE,gBAAAA,KAAC,SAAM,UAAS,WAAU,wFAE1B;AAAA,IAEN,gBAAAA,KAAC,SAAO,GAAG,MAAM;AAAA,KACnB;AAEJ;",
|
|
6
|
+
"names": ["styled", "useTheme", "jsx", "Stack", "Typography", "useTheme", "jsx", "jsxs", "Stack", "jsx", "jsxs"]
|
|
7
|
+
}
|
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.23.
|
|
4
|
+
"version": "1.23.2",
|
|
5
5
|
"description": "XYO Layer One React SDK",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -39,29 +39,29 @@
|
|
|
39
39
|
"README.md"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@xyo-network/chain-protocol-test": "~1.23.
|
|
43
|
-
"@xyo-network/react-chain-model": "~1.23.
|
|
42
|
+
"@xyo-network/chain-protocol-test": "~1.23.2",
|
|
43
|
+
"@xyo-network/react-chain-model": "~1.23.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@bitauth/libauth": "~3.0.0",
|
|
47
47
|
"@metamask/json-rpc-engine": "^10.5.0",
|
|
48
48
|
"@metamask/providers": "^22.1.1",
|
|
49
49
|
"@metamask/utils": "~11.11.0",
|
|
50
|
-
"@mui/material": "~9.0",
|
|
50
|
+
"@mui/material": "~9.0.1",
|
|
51
51
|
"@opentelemetry/api": "^1.9.1",
|
|
52
52
|
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
53
53
|
"@scure/base": "~2.2.0",
|
|
54
54
|
"@scure/bip39": "~2.2.0",
|
|
55
|
-
"@storybook/react-vite": "^10.
|
|
55
|
+
"@storybook/react-vite": "^10.4.0",
|
|
56
56
|
"@types/react": "^19.2.14",
|
|
57
57
|
"@xylabs/fetch": "~5.1.2",
|
|
58
58
|
"@xylabs/geo": "^5.1.2",
|
|
59
59
|
"@xylabs/sdk-js": "^5.1.2",
|
|
60
60
|
"@xylabs/threads": "~5.1.2",
|
|
61
|
-
"@xylabs/toolchain": "~
|
|
62
|
-
"@xylabs/tsconfig": "~
|
|
63
|
-
"@xylabs/tsconfig-dom": "~
|
|
64
|
-
"@xylabs/tsconfig-react": "~
|
|
61
|
+
"@xylabs/toolchain": "~8.0.4",
|
|
62
|
+
"@xylabs/tsconfig": "~8.0.4",
|
|
63
|
+
"@xylabs/tsconfig-dom": "~8.0.4",
|
|
64
|
+
"@xylabs/tsconfig-react": "~8.0.3",
|
|
65
65
|
"@xyo-network/account": "~5.6.2",
|
|
66
66
|
"@xyo-network/account-model": "~5.6.3",
|
|
67
67
|
"@xyo-network/api": "~5.6.2",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@xyo-network/sdk-protocol-js": "~5.6.3",
|
|
82
82
|
"@xyo-network/wallet": "~5.6.2",
|
|
83
83
|
"@xyo-network/wallet-model": "^5.6.3",
|
|
84
|
-
"@xyo-network/xl1-sdk": "^1.30.
|
|
84
|
+
"@xyo-network/xl1-sdk": "^1.30.2",
|
|
85
85
|
"ajv": "^8.20.0",
|
|
86
86
|
"async-mutex": "^0.5.0",
|
|
87
87
|
"bn.js": "^5.2.3",
|
|
@@ -100,10 +100,10 @@
|
|
|
100
100
|
"react": "^19.2.6",
|
|
101
101
|
"react-dom": "^19.2.6",
|
|
102
102
|
"store2": "~2.14.4",
|
|
103
|
-
"storybook": "^10.
|
|
104
|
-
"typescript": "~
|
|
103
|
+
"storybook": "^10.4.0",
|
|
104
|
+
"typescript": "~6.0.3",
|
|
105
105
|
"uuid": "~14.0.0",
|
|
106
|
-
"vite": "^8.0.
|
|
106
|
+
"vite": "^8.0.13",
|
|
107
107
|
"wasm-feature-detect": "~1.8.0",
|
|
108
108
|
"webextension-polyfill": "^0.12.0",
|
|
109
109
|
"zod": "~4.4.3"
|