@xyo-network/react-shared 2.64.0 → 2.64.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.
Files changed (147) hide show
  1. package/dist/browser/components/Ampersand.js +3 -2
  2. package/dist/browser/components/Ampersand.js.map +1 -1
  3. package/dist/browser/components/BasicHero/BasicHero.js +71 -5
  4. package/dist/browser/components/BasicHero/BasicHero.js.map +1 -1
  5. package/dist/browser/components/BasicHero/index.js +203 -1
  6. package/dist/browser/components/BasicHero/index.js.map +1 -1
  7. package/dist/browser/components/Ellipsize.js +28 -8
  8. package/dist/browser/components/Ellipsize.js.map +1 -1
  9. package/dist/browser/components/ErrorBoundary.js +4 -3
  10. package/dist/browser/components/ErrorBoundary.js.map +1 -1
  11. package/dist/browser/components/ListItemButtonEx.js +4 -3
  12. package/dist/browser/components/ListItemButtonEx.js.map +1 -1
  13. package/dist/browser/components/LoadResult.js +19 -6
  14. package/dist/browser/components/LoadResult.js.map +1 -1
  15. package/dist/browser/components/NotFound.js +3 -2
  16. package/dist/browser/components/NotFound.js.map +1 -1
  17. package/dist/browser/components/Pipe.js +3 -2
  18. package/dist/browser/components/Pipe.js.map +1 -1
  19. package/dist/browser/components/ScrollTableOnSm.js +4 -3
  20. package/dist/browser/components/ScrollTableOnSm.js.map +1 -1
  21. package/dist/browser/components/SectionSpacingRow/SectionSpacingRow.js +3 -2
  22. package/dist/browser/components/SectionSpacingRow/SectionSpacingRow.js.map +1 -1
  23. package/dist/browser/components/SectionSpacingRow/index.js +26 -1
  24. package/dist/browser/components/SectionSpacingRow/index.js.map +1 -1
  25. package/dist/browser/components/StyleGuide/AppBars.example.js +3 -2
  26. package/dist/browser/components/StyleGuide/AppBars.example.js.map +1 -1
  27. package/dist/browser/components/StyleGuide/Buttons.example.js +5 -4
  28. package/dist/browser/components/StyleGuide/Buttons.example.js.map +1 -1
  29. package/dist/browser/components/StyleGuide/Papers.example.js +3 -2
  30. package/dist/browser/components/StyleGuide/Papers.example.js.map +1 -1
  31. package/dist/browser/components/StyleGuide/StyleGuide.example.js +99 -12
  32. package/dist/browser/components/StyleGuide/StyleGuide.example.js.map +1 -1
  33. package/dist/browser/components/StyleGuide/Texts.example.js +3 -2
  34. package/dist/browser/components/StyleGuide/Texts.example.js.map +1 -1
  35. package/dist/browser/components/StyleGuide/VariantContext.example.js +2 -1
  36. package/dist/browser/components/StyleGuide/VariantContext.example.js.map +1 -1
  37. package/dist/browser/components/TableCell/AddressTableCell.js +124 -4
  38. package/dist/browser/components/TableCell/AddressTableCell.js.map +1 -1
  39. package/dist/browser/components/TableCell/EllipsisTableCell.js +98 -9
  40. package/dist/browser/components/TableCell/EllipsisTableCell.js.map +1 -1
  41. package/dist/browser/components/TableCell/EllipsisTableCellDeprecated.js +107 -6
  42. package/dist/browser/components/TableCell/EllipsisTableCellDeprecated.js.map +1 -1
  43. package/dist/browser/components/TableCell/HashTableCell.js +126 -6
  44. package/dist/browser/components/TableCell/HashTableCell.js.map +1 -1
  45. package/dist/browser/components/TableCell/findParent.js +2 -1
  46. package/dist/browser/components/TableCell/findParent.js.map +1 -1
  47. package/dist/browser/components/TableCell/getRemainingRowWidth.js +2 -1
  48. package/dist/browser/components/TableCell/getRemainingRowWidth.js.map +1 -1
  49. package/dist/browser/components/TableCell/getSmallestParentWidth.js +2 -1
  50. package/dist/browser/components/TableCell/getSmallestParentWidth.js.map +1 -1
  51. package/dist/browser/components/TableCell/index.js +160 -3
  52. package/dist/browser/components/TableCell/index.js.map +1 -1
  53. package/dist/browser/components/ThemeTokenAvatar/ThemeTokenAvatar.js +3 -2
  54. package/dist/browser/components/ThemeTokenAvatar/ThemeTokenAvatar.js.map +1 -1
  55. package/dist/browser/components/ThemeTokenAvatar/index.js +10 -1
  56. package/dist/browser/components/ThemeTokenAvatar/index.js.map +1 -1
  57. package/dist/browser/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.js +14 -4
  58. package/dist/browser/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.js.map +1 -1
  59. package/dist/browser/components/ThemeTokenAvatarGroup/index.js +19 -1
  60. package/dist/browser/components/ThemeTokenAvatarGroup/index.js.map +1 -1
  61. package/dist/browser/components/TokenBar/TokenBar.js +3 -2
  62. package/dist/browser/components/TokenBar/TokenBar.js.map +1 -1
  63. package/dist/browser/components/TokenBar/index.js +19 -1
  64. package/dist/browser/components/TokenBar/index.js.map +1 -1
  65. package/dist/browser/components/TokenData/TokenData.js +34 -17
  66. package/dist/browser/components/TokenData/TokenData.js.map +1 -1
  67. package/dist/browser/components/TokenData/img/index.js +1 -0
  68. package/dist/browser/components/TokenData/img/index.js.map +1 -1
  69. package/dist/browser/components/TokenData/index.js +153 -2
  70. package/dist/browser/components/TokenData/index.js.map +1 -1
  71. package/dist/browser/components/TokenData/useGetTokenData.js +143 -2
  72. package/dist/browser/components/TokenData/useGetTokenData.js.map +1 -1
  73. package/dist/browser/components/TokenSummary/TokenSummary.js +16 -6
  74. package/dist/browser/components/TokenSummary/TokenSummary.js.map +1 -1
  75. package/dist/browser/components/TokenSummary/index.js +29 -1
  76. package/dist/browser/components/TokenSummary/index.js.map +1 -1
  77. package/dist/browser/components/TypographyEx.js +57 -3
  78. package/dist/browser/components/TypographyEx.js.map +1 -1
  79. package/dist/browser/components/index.js +730 -18
  80. package/dist/browser/components/index.js.map +1 -1
  81. package/dist/browser/components/pluginValidation/DataMissing.js +3 -2
  82. package/dist/browser/components/pluginValidation/DataMissing.js.map +1 -1
  83. package/dist/browser/components/pluginValidation/index.js +12 -1
  84. package/dist/browser/components/pluginValidation/index.js.map +1 -1
  85. package/dist/browser/contexts/ListMode/Context.js +6 -2
  86. package/dist/browser/contexts/ListMode/Context.js.map +1 -1
  87. package/dist/browser/contexts/ListMode/Provider.js +12 -3
  88. package/dist/browser/contexts/ListMode/Provider.js.map +1 -1
  89. package/dist/browser/contexts/ListMode/index.js +44 -4
  90. package/dist/browser/contexts/ListMode/index.js.map +1 -1
  91. package/dist/browser/contexts/ListMode/use.js +19 -3
  92. package/dist/browser/contexts/ListMode/use.js.map +1 -1
  93. package/dist/browser/contexts/Pixel/Context.js +6 -2
  94. package/dist/browser/contexts/Pixel/Context.js.map +1 -1
  95. package/dist/browser/contexts/Pixel/Provider.js +12 -3
  96. package/dist/browser/contexts/Pixel/Provider.js.map +1 -1
  97. package/dist/browser/contexts/Pixel/index.js +45 -4
  98. package/dist/browser/contexts/Pixel/index.js.map +1 -1
  99. package/dist/browser/contexts/Pixel/use.js +19 -3
  100. package/dist/browser/contexts/Pixel/use.js.map +1 -1
  101. package/dist/browser/contexts/contextEx/create.js +2 -1
  102. package/dist/browser/contexts/contextEx/create.js.map +1 -1
  103. package/dist/browser/contexts/contextEx/index.js +22 -4
  104. package/dist/browser/contexts/contextEx/index.js.map +1 -1
  105. package/dist/browser/contexts/contextEx/use.js +3 -2
  106. package/dist/browser/contexts/contextEx/use.js.map +1 -1
  107. package/dist/browser/contexts/diviner/Context.js +6 -2
  108. package/dist/browser/contexts/diviner/Context.js.map +1 -1
  109. package/dist/browser/contexts/diviner/Provider.js +3 -2
  110. package/dist/browser/contexts/diviner/Provider.js.map +1 -1
  111. package/dist/browser/contexts/diviner/index.js +40 -3
  112. package/dist/browser/contexts/diviner/index.js.map +1 -1
  113. package/dist/browser/contexts/index.js +116 -4
  114. package/dist/browser/contexts/index.js.map +1 -1
  115. package/dist/browser/hooks/GradientStyles/GradientStyles.js +4 -3
  116. package/dist/browser/hooks/GradientStyles/GradientStyles.js.map +1 -1
  117. package/dist/browser/hooks/GradientStyles/index.js +56 -1
  118. package/dist/browser/hooks/GradientStyles/index.js.map +1 -1
  119. package/dist/browser/hooks/index.js +126 -7
  120. package/dist/browser/hooks/index.js.map +1 -1
  121. package/dist/browser/hooks/useDataState.js +2 -1
  122. package/dist/browser/hooks/useDataState.js.map +1 -1
  123. package/dist/browser/hooks/useIsMobile.js +7 -2
  124. package/dist/browser/hooks/useIsMobile.js.map +1 -1
  125. package/dist/browser/hooks/useMediaQuery.js +1 -0
  126. package/dist/browser/hooks/useMediaQuery.js.map +1 -1
  127. package/dist/browser/hooks/usePayloadHash.js +3 -2
  128. package/dist/browser/hooks/usePayloadHash.js.map +1 -1
  129. package/dist/browser/hooks/usePromise.js +2 -1
  130. package/dist/browser/hooks/usePromise.js.map +1 -1
  131. package/dist/browser/hooks/useShareForwardRef.js +2 -1
  132. package/dist/browser/hooks/useShareForwardRef.js.map +1 -1
  133. package/dist/browser/index.js +988 -6
  134. package/dist/browser/index.js.map +1 -1
  135. package/dist/browser/lib/assertDefinedEx.js +2 -1
  136. package/dist/browser/lib/assertDefinedEx.js.map +1 -1
  137. package/dist/browser/lib/getActualPaddingX.js +4 -3
  138. package/dist/browser/lib/getActualPaddingX.js.map +1 -1
  139. package/dist/browser/lib/index.js +101 -3
  140. package/dist/browser/lib/index.js.map +1 -1
  141. package/dist/browser/lib/networkComponents.js +5 -4
  142. package/dist/browser/lib/networkComponents.js.map +1 -1
  143. package/dist/browser/lib/xyo.js +3 -2
  144. package/dist/browser/lib/xyo.js.map +1 -1
  145. package/dist/browser/models/index.js +0 -1
  146. package/dist/browser/models/index.js.map +1 -1
  147. package/package.json +13 -13
@@ -1,19 +1,731 @@
1
- export * from "./Ampersand";
2
- export * from "./BasicHero";
3
- export * from "./Ellipsize";
4
- export * from "./ErrorBoundary";
5
- export * from "./ListItemButtonEx";
6
- export * from "./LoadResult";
7
- export * from "./NotFound";
8
- export * from "./Pipe";
9
- export * from "./pluginValidation";
10
- export * from "./ScrollTableOnSm";
11
- export * from "./SectionSpacingRow";
12
- export * from "./TableCell";
13
- export * from "./ThemeTokenAvatar";
14
- export * from "./ThemeTokenAvatarGroup";
15
- export * from "./TokenBar";
16
- export * from "./TokenData";
17
- export * from "./TokenSummary";
18
- export * from "./TypographyEx";
1
+ // src/components/Ampersand.tsx
2
+ import { Typography } from "@mui/material";
3
+ import { jsx } from "react/jsx-runtime";
4
+ var Ampersand = (props) => {
5
+ return /* @__PURE__ */ jsx(Typography, { marginX: 1, component: "span", ...props, children: "&" });
6
+ };
7
+
8
+ // src/components/BasicHero/BasicHero.tsx
9
+ import { Container, Grid, Typography as Typography2 } from "@mui/material";
10
+ import { ButtonEx } from "@xylabs/react-button";
11
+ import { FlexGrowCol, FlexGrowRow } from "@xylabs/react-flexbox";
12
+ import { LinkEx } from "@xylabs/react-link";
13
+
14
+ // src/hooks/GradientStyles/GradientStyles.tsx
15
+ import { useTheme } from "@mui/material";
16
+ import { makeStyles } from "@mui/styles";
17
+ var colorfulGradientLightMode = () => {
18
+ return {
19
+ background: {
20
+ backgroundImage: "-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)"
21
+ },
22
+ border: {
23
+ borderImage: "-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)",
24
+ borderImageSlice: 1,
25
+ borderImageSource: "-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)",
26
+ borderRadius: 0,
27
+ borderStyle: "solid",
28
+ borderWidth: "2px"
29
+ },
30
+ heading: {
31
+ WebkitBackgroundClip: "text",
32
+ WebkitTextFillColor: "transparent",
33
+ background: "-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)",
34
+ display: "inline-block"
35
+ }
36
+ };
37
+ };
38
+ var colorfulGradientDarkMode = () => {
39
+ return {
40
+ background: {
41
+ backgroundImage: "-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)"
42
+ },
43
+ border: {
44
+ borderImage: "-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)",
45
+ borderImageSlice: 1,
46
+ borderImageSource: "-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)",
47
+ borderRadius: 0,
48
+ borderStyle: "solid",
49
+ borderWidth: "2px"
50
+ },
51
+ heading: {
52
+ WebkitBackgroundClip: "text",
53
+ WebkitTextFillColor: "transparent",
54
+ background: "-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)",
55
+ display: "inline-block"
56
+ }
57
+ };
58
+ };
59
+ var useGradientStyles = () => {
60
+ const theme = useTheme();
61
+ const styles = theme.palette.mode === "dark" ? colorfulGradientDarkMode() : colorfulGradientLightMode();
62
+ const classes = makeStyles(styles);
63
+ return { classes, styles };
64
+ };
65
+
66
+ // src/hooks/useIsMobile.ts
67
+ import { useTheme as useTheme2 } from "@mui/material";
68
+
69
+ // src/hooks/useMediaQuery.ts
70
+ import { useMediaQuery } from "@mui/material";
71
+
72
+ // src/hooks/useIsMobile.ts
73
+ var useIsMobile = () => {
74
+ const theme = useTheme2();
75
+ return useMediaQuery(theme.breakpoints.down("md"));
76
+ };
77
+
78
+ // src/hooks/useShareForwardRef.ts
79
+ import { useEffect, useRef } from "react";
80
+ var useShareForwardedRef = (forwardedRef, refresh = 0) => {
81
+ const innerRef = useRef(null);
82
+ useEffect(() => {
83
+ if (!forwardedRef) {
84
+ return;
85
+ }
86
+ if (typeof forwardedRef === "function") {
87
+ forwardedRef(innerRef.current);
88
+ return;
89
+ } else {
90
+ forwardedRef.current = innerRef.current;
91
+ }
92
+ }, [forwardedRef, refresh]);
93
+ return innerRef;
94
+ };
95
+
96
+ // src/components/BasicHero/BasicHero.tsx
97
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
98
+ var SubLinkSection = ({ backgroundImageAlignment, subLinkIcon, subLinkPath, subLinkText1, subLinkText2 }) => {
99
+ return /* @__PURE__ */ jsxs(
100
+ FlexGrowRow,
101
+ {
102
+ width: "100%",
103
+ sx: { flexDirection: { md: "row", xs: "column" }, justifyContent: { md: backgroundImageAlignment ? "flex-start" : "center", xs: "center" } },
104
+ children: [
105
+ subLinkIcon ? /* @__PURE__ */ jsxs("span", { children: [
106
+ subLinkIcon,
107
+ "\xA0"
108
+ ] }) : null,
109
+ /* @__PURE__ */ jsxs(Typography2, { children: [
110
+ subLinkText1,
111
+ "\xA0"
112
+ ] }),
113
+ /* @__PURE__ */ jsx2(LinkEx, { href: subLinkPath, underline: "always", target: "_blank", color: "inherit", children: /* @__PURE__ */ jsx2(Typography2, { children: subLinkText2 }) })
114
+ ]
115
+ }
116
+ );
117
+ };
118
+ var ButtonSection = ({ href, to, buttonText }) => {
119
+ const isMobile = useIsMobile();
120
+ return /* @__PURE__ */ jsx2(
121
+ ButtonEx,
122
+ {
123
+ fullWidth: true,
124
+ marginTop: 1,
125
+ marginBottom: 1,
126
+ marginRight: isMobile ? 2 : 1,
127
+ marginLeft: isMobile ? 2 : 0,
128
+ target: href ?? "_blank",
129
+ to,
130
+ href,
131
+ color: "primary",
132
+ variant: "contained",
133
+ paddingX: 3,
134
+ sx: { display: href || to ? "flex" : "none" },
135
+ children: buttonText
136
+ }
137
+ );
138
+ };
139
+ var BasicHero = ({
140
+ backgroundImage,
141
+ title,
142
+ gradientTitle,
143
+ backgroundColor,
144
+ textColor,
145
+ desc,
146
+ heroImage,
147
+ title2,
148
+ subLinkText1,
149
+ subLinkText2,
150
+ subLinkPath,
151
+ button1Text,
152
+ button2Text,
153
+ button2To,
154
+ button1To,
155
+ button2Href,
156
+ button1Href,
157
+ subLinkIcon,
158
+ sx,
159
+ ...props
160
+ }) => {
161
+ const isMobile = useIsMobile();
162
+ const { classes } = useGradientStyles();
163
+ return /* @__PURE__ */ jsx2(
164
+ FlexGrowCol,
165
+ {
166
+ sx: {
167
+ backgroundImage: `url(${backgroundImage})`,
168
+ backgroundPosition: { lg: "bottom", md: "center left", xs: "top left" },
169
+ minHeight: {
170
+ md: "500px",
171
+ sm: "400px",
172
+ xs: "200px"
173
+ },
174
+ ...sx ?? {}
175
+ },
176
+ style: {
177
+ backgroundColor: backgroundColor ?? "",
178
+ backgroundRepeat: "no-repeat",
179
+ backgroundSize: "cover",
180
+ color: textColor ?? ""
181
+ },
182
+ ...props,
183
+ children: /* @__PURE__ */ jsx2(Container, { children: /* @__PURE__ */ jsxs(
184
+ Grid,
185
+ {
186
+ container: true,
187
+ justifyContent: "center",
188
+ alignItems: "center",
189
+ sx: {
190
+ alignItems: { xs: "center" },
191
+ justifyContent: { xs: "center" }
192
+ },
193
+ children: [
194
+ /* @__PURE__ */ jsx2(Grid, { item: true, xs: 12, sm: 8, md: backgroundImage ? 6 : 8, lg: backgroundImage ? 6 : 8, children: /* @__PURE__ */ jsxs(FlexGrowCol, { paddingY: 2, sx: { alignItems: { xs: backgroundImage && !isMobile ? "flex-start" : "center" } }, children: [
195
+ /* @__PURE__ */ jsxs(Typography2, { variant: "h1", component: "h1", gutterBottom: true, textAlign: backgroundImage && !isMobile ? "left" : "center", children: [
196
+ title ? /* @__PURE__ */ jsx2("span", { children: `${title} ` }) : null,
197
+ gradientTitle ? /* @__PURE__ */ jsxs("span", { className: classes().heading, children: [
198
+ " ",
199
+ ` ${gradientTitle}`
200
+ ] }) : null,
201
+ title2 ? /* @__PURE__ */ jsx2("span", { children: ` ${title2}` }) : null
202
+ ] }),
203
+ /* @__PURE__ */ jsx2(Typography2, { variant: "body1", component: "h2", gutterBottom: true, textAlign: backgroundImage && !isMobile ? "left" : "center", children: desc }),
204
+ /* @__PURE__ */ jsxs(FlexGrowRow, { sx: { flexDirection: { lg: "row", xs: "column" } }, width: "100%", marginTop: 1, children: [
205
+ /* @__PURE__ */ jsx2(ButtonSection, { href: button1Href, to: button1To, buttonText: button1Text }),
206
+ /* @__PURE__ */ jsx2(ButtonSection, { href: button2Href, to: button2To, buttonText: button2Text })
207
+ ] }),
208
+ /* @__PURE__ */ jsx2(
209
+ SubLinkSection,
210
+ {
211
+ subLinkIcon,
212
+ subLinkText1,
213
+ subLinkText2,
214
+ subLinkPath,
215
+ backgroundImageAlignment: backgroundImage ? true : false
216
+ }
217
+ )
218
+ ] }) }),
219
+ /* @__PURE__ */ jsx2(Grid, { item: true, xs: 12, md: 6, children: heroImage ? /* @__PURE__ */ jsx2("img", { src: heroImage, width: "100%" }) : null })
220
+ ]
221
+ }
222
+ ) })
223
+ }
224
+ );
225
+ };
226
+
227
+ // src/components/Ellipsize.tsx
228
+ import { Box, styled, Typography as Typography3 } from "@mui/material";
229
+ import { forwardRef, useCallback, useState } from "react";
230
+ import { jsx as jsx3 } from "react/jsx-runtime";
231
+ var ComponentName = "Ellipsize";
232
+ var EllipsizeRoot = styled(Box, {
233
+ name: ComponentName,
234
+ shouldForwardProp: (prop) => prop !== "beforeLineHeight",
235
+ slot: "Root"
236
+ })(({ beforeLineHeight }) => ({
237
+ "&": {
238
+ // because the cell content ends up absolutely positioned, the cell doesn't know the content height.
239
+ // the pseudo element with a hidden character establishes the proper height of the content and hides it
240
+ ":before": {
241
+ content: "'nbsp;'",
242
+ display: "block",
243
+ // take the pseudo element out of the `display: block` flow so it won't push against our actual content
244
+ float: "left",
245
+ visibility: "hidden",
246
+ // since we are `display: block`, lineHeight is the height
247
+ ...beforeLineHeight && { lineHeight: beforeLineHeight }
248
+ }
249
+ }
250
+ }));
251
+ var EllipsizeInnerWrap = styled(Box, {
252
+ name: ComponentName,
253
+ slot: "innerWrap"
254
+ })(() => ({
255
+ position: "relative"
256
+ }));
257
+ var EllipsizeContentWrap = styled(Typography3, {
258
+ name: ComponentName,
259
+ shouldForwardProp: (prop) => prop !== "ellipsisPosition",
260
+ slot: "contentWrap"
261
+ })(({ theme, ellipsisPosition, fontFamily }) => {
262
+ return theme.unstable_sx({
263
+ fontFamily: fontFamily ?? "monospace",
264
+ left: 0,
265
+ overflow: "hidden",
266
+ position: "absolute",
267
+ right: 0,
268
+ textOverflow: "ellipsis",
269
+ whiteSpace: "nowrap",
270
+ ...ellipsisPosition === "start" ? {
271
+ direction: "rtl",
272
+ textAlign: "left"
273
+ } : {}
274
+ });
275
+ });
276
+ var useClientHeight = () => {
277
+ const [contentWrapHeight, setContentWrapHeight] = useState();
278
+ const contentWrapRef = useCallback((node) => {
279
+ if (node !== null) {
280
+ setContentWrapHeight(node.clientHeight + "px");
281
+ }
282
+ }, []);
283
+ return { contentWrapHeight, contentWrapRef };
284
+ };
285
+ var EllipsizeBox = forwardRef(
286
+ ({ children, ellipsisPosition = "start", disableSharedRef, typographyProps, ...props }, ref) => {
287
+ const { contentWrapRef, contentWrapHeight } = useClientHeight();
288
+ const sharedRef = useShareForwardedRef(ref);
289
+ return /* @__PURE__ */ jsx3(EllipsizeRoot, { beforeLineHeight: !!sharedRef && !disableSharedRef ? contentWrapHeight : void 0, ...props, ref, children: /* @__PURE__ */ jsx3(EllipsizeInnerWrap, { children: /* @__PURE__ */ jsx3(EllipsizeContentWrap, { ref: contentWrapRef, component: "span", ellipsisPosition, variant: "body2", ...typographyProps, children }) }) });
290
+ }
291
+ );
292
+ EllipsizeBox.displayName = "EllipsizeBox";
293
+
294
+ // src/components/ErrorBoundary.tsx
295
+ import { Typography as Typography4 } from "@mui/material";
296
+ import { FlexCol } from "@xylabs/react-flexbox";
297
+ import { Component } from "react";
298
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
299
+ var ErrorBoundary = class extends Component {
300
+ constructor(props) {
301
+ super(props);
302
+ this.state = { error: void 0 };
303
+ }
304
+ static getDerivedStateFromError(error) {
305
+ return { error };
306
+ }
307
+ componentDidCatch(error, errorInfo) {
308
+ console.error(`${error}: ${errorInfo}`);
309
+ }
310
+ render() {
311
+ if (this.state.error) {
312
+ if (this.props.fallbackWithError) {
313
+ return this.props.fallbackWithError(this.state.error);
314
+ }
315
+ return this.props.fallback ?? /* @__PURE__ */ jsxs2(FlexCol, { children: [
316
+ /* @__PURE__ */ jsx4(Typography4, { variant: "h1", children: "Something went wrong." }),
317
+ /* @__PURE__ */ jsxs2(Typography4, { variant: "body1", children: [
318
+ "[",
319
+ this.state.error?.message,
320
+ "]"
321
+ ] })
322
+ ] });
323
+ }
324
+ return this.props.children;
325
+ }
326
+ };
327
+
328
+ // src/components/ListItemButtonEx.tsx
329
+ import { ListItemButton } from "@mui/material";
330
+ import { useNavigate } from "react-router-dom";
331
+ import { jsx as jsx5 } from "react/jsx-runtime";
332
+ var ListItemButtonExTo = ({ to, toOptions, onClick, ...props }) => {
333
+ const navigate = useNavigate();
334
+ const localOnClick = (event) => {
335
+ onClick?.(event);
336
+ if (to) {
337
+ navigate(to, toOptions);
338
+ }
339
+ };
340
+ return /* @__PURE__ */ jsx5(ListItemButton, { onClick: localOnClick, ...props });
341
+ };
342
+ var ListItemButtonEx = ({ to, ...props }) => {
343
+ if (to) {
344
+ return /* @__PURE__ */ jsx5(ListItemButtonExTo, { to, ...props });
345
+ } else {
346
+ return /* @__PURE__ */ jsx5(ListItemButton, { ...props });
347
+ }
348
+ };
349
+
350
+ // src/components/LoadResult.tsx
351
+ import { FlexGrowRow as FlexGrowRow2 } from "@xylabs/react-flexbox";
352
+
353
+ // src/components/NotFound.tsx
354
+ import { Typography as Typography5 } from "@mui/material";
355
+ import { FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
356
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
357
+ var NotFound = (props) => {
358
+ return /* @__PURE__ */ jsxs3(FlexGrowCol2, { ...props, children: [
359
+ /* @__PURE__ */ jsx6(Typography5, { variant: "h2", children: "Sorry!" }),
360
+ /* @__PURE__ */ jsx6(Typography5, { marginY: 3, variant: "body2", children: "Can't find anything here" })
361
+ ] });
362
+ };
363
+
364
+ // src/components/LoadResult.tsx
365
+ import { Fragment, jsx as jsx7 } from "react/jsx-runtime";
366
+ function LoadResult(props) {
367
+ const { notFound, error, searchResult, children } = props;
368
+ if (notFound) {
369
+ return /* @__PURE__ */ jsx7(NotFound, {});
370
+ }
371
+ if (error) {
372
+ return /* @__PURE__ */ jsx7(Fragment, { children });
373
+ }
374
+ if (searchResult === void 0) {
375
+ return /* @__PURE__ */ jsx7(FlexGrowRow2, { busy: true, minHeight: "50px" });
376
+ } else {
377
+ return /* @__PURE__ */ jsx7(Fragment, { children });
378
+ }
379
+ }
380
+
381
+ // src/components/Pipe.tsx
382
+ import { Typography as Typography6 } from "@mui/material";
383
+ import { jsx as jsx8 } from "react/jsx-runtime";
384
+ var Pipe = (props) => {
385
+ return /* @__PURE__ */ jsx8(Typography6, { marginX: 1, component: "span", ...props, children: "|" });
386
+ };
387
+
388
+ // src/components/pluginValidation/DataMissing.tsx
389
+ import { Alert, AlertTitle } from "@mui/material";
390
+ import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
391
+ var PayloadDataMissing = ({ alertBody, ...props }) => {
392
+ return /* @__PURE__ */ jsxs4(Alert, { severity: "warning", ...props, children: [
393
+ /* @__PURE__ */ jsx9(AlertTitle, { children: "Missing Data" }),
394
+ alertBody ?? "Payload is missing required data to render correctly"
395
+ ] });
396
+ };
397
+
398
+ // src/components/ScrollTableOnSm.tsx
399
+ import { styled as styled2 } from "@mui/material";
400
+ import { jsx as jsx10 } from "react/jsx-runtime";
401
+ var StyledScrollTableOnSm = styled2("div")(({ theme }) => ({
402
+ [theme.breakpoints.down("md")]: {
403
+ overflowX: "scroll"
404
+ },
405
+ display: "flex",
406
+ flexGrow: 1
407
+ }));
408
+ var ScrollTableOnSm = ({ children }) => /* @__PURE__ */ jsx10(StyledScrollTableOnSm, { children });
409
+
410
+ // src/components/SectionSpacingRow/SectionSpacingRow.tsx
411
+ import { useTheme as useTheme3 } from "@mui/material";
412
+ import { FlexGrowRow as FlexGrowRow3 } from "@xylabs/react-flexbox";
413
+ import { forwardRef as forwardRef2 } from "react";
414
+ import { jsx as jsx11 } from "react/jsx-runtime";
415
+ var SectionSpacingRow = forwardRef2(({ children, sx, ...props }, ref) => {
416
+ const theme = useTheme3();
417
+ return /* @__PURE__ */ jsx11(
418
+ FlexGrowRow3,
419
+ {
420
+ sx: {
421
+ paddingBottom: { md: theme.spacing(5), xs: theme.spacing(5) },
422
+ paddingTop: { md: theme.spacing(5), xs: theme.spacing(5) },
423
+ ...sx
424
+ },
425
+ width: "100%",
426
+ ref,
427
+ ...props,
428
+ children
429
+ }
430
+ );
431
+ });
432
+ SectionSpacingRow.displayName = "SectionSpacingRow";
433
+
434
+ // src/components/TableCell/AddressTableCell.tsx
435
+ import { forwardRef as forwardRef4 } from "react";
436
+
437
+ // src/components/TableCell/EllipsisTableCell.tsx
438
+ import { styled as styled3, TableCell } from "@mui/material";
439
+ import { LinkEx as LinkEx2 } from "@xylabs/react-link";
440
+ import { forwardRef as forwardRef3, useMemo } from "react";
441
+ import { jsx as jsx12 } from "react/jsx-runtime";
442
+ var EllipsisTableCellRoot = styled3(TableCell, {
443
+ name: "EllipsisTableCell",
444
+ shouldForwardProp: (prop) => prop !== "width",
445
+ slot: "Root"
446
+ })(({ width = "100%" }) => ({
447
+ width
448
+ }));
449
+ var EllipsisTableCellWithRef = forwardRef3(
450
+ ({ children, href, link: link2 = false, to, value, ...props }, ref) => {
451
+ const data = useMemo(() => {
452
+ if (children) {
453
+ return children;
454
+ }
455
+ if (href || link2 || to) {
456
+ return /* @__PURE__ */ jsx12(LinkEx2, { title: value, to, href, target: href ? "_blank" : void 0, children: value });
457
+ }
458
+ return value;
459
+ }, [children, href, link2, to, value]);
460
+ return /* @__PURE__ */ jsx12(EllipsisTableCellRoot, { ref, ...props, children: /* @__PURE__ */ jsx12(EllipsizeBox, { sx: { cursor: link2 || to || href ? "pointer" : "inherit" }, children: data }) });
461
+ }
462
+ );
463
+ EllipsisTableCellWithRef.displayName = "EllipsisTableCell";
464
+ var EllipsisTableCell = EllipsisTableCellWithRef;
465
+
466
+ // src/components/TableCell/AddressTableCell.tsx
467
+ import { jsx as jsx13 } from "react/jsx-runtime";
468
+ var AddressTableCell = forwardRef4(({ value, archive, exploreDomain, link: link2, ...props }, ref) => {
469
+ const href = exploreDomain && archive ? `${exploreDomain}/archive/${archive}/address/${value}` : void 0;
470
+ const to = exploreDomain === void 0 && archive ? `/archive/${archive}/address/${value}` : void 0;
471
+ return /* @__PURE__ */ jsx13(EllipsisTableCell, { value, href, to, ref, link: link2, ...props });
472
+ });
473
+ AddressTableCell.displayName = "AddressTableCell";
474
+
475
+ // src/components/TableCell/HashTableCell.tsx
476
+ import { useEvent } from "@xyo-network/react-event";
477
+ import { useRef as useRef2 } from "react";
478
+ import { jsx as jsx14 } from "react/jsx-runtime";
479
+ var HashTableCell = ({ value, archive, dataType, network, exploreDomain, ...props }) => {
480
+ const ref = useRef2(null);
481
+ const [tableCellRef, dispatch] = useEvent(void 0, ref);
482
+ const hashPath = `/${dataType}/hash/${value}?network=${network ?? "main"}`;
483
+ const explorePath = archive ? `/archive/${archive}${hashPath}` : hashPath;
484
+ const handleCellClick = () => {
485
+ dispatch?.("hash", "click", value);
486
+ };
487
+ return /* @__PURE__ */ jsx14(
488
+ EllipsisTableCell,
489
+ {
490
+ onClick: handleCellClick,
491
+ ref: tableCellRef,
492
+ value,
493
+ href: exploreDomain ? `${exploreDomain}${explorePath}}` : void 0,
494
+ to: exploreDomain ? void 0 : explorePath,
495
+ ...props
496
+ }
497
+ );
498
+ };
499
+
500
+ // src/components/ThemeTokenAvatar/ThemeTokenAvatar.tsx
501
+ import { Avatar, useTheme as useTheme4 } from "@mui/material";
502
+ import { jsx as jsx15 } from "react/jsx-runtime";
503
+ var ThemeTokenAvatar = ({ ...props }) => {
504
+ const theme = useTheme4();
505
+ return /* @__PURE__ */ jsx15(Avatar, { sx: { background: theme.palette.common.white }, ...props });
506
+ };
507
+
508
+ // src/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.tsx
509
+ import { AvatarGroup } from "@mui/material";
510
+ import { jsx as jsx16 } from "react/jsx-runtime";
511
+ var ThemeTokenAvatarGroup = ({ images, ...props }) => {
512
+ return /* @__PURE__ */ jsx16(AvatarGroup, { ...props, children: images?.map((image, index) => /* @__PURE__ */ jsx16(ThemeTokenAvatar, { src: image }, index)) });
513
+ };
514
+
515
+ // src/components/TokenBar/TokenBar.tsx
516
+ import { Paper, Typography as Typography7 } from "@mui/material";
517
+ import { FlexRow } from "@xylabs/react-flexbox";
518
+ import { jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
519
+ var TokenBar = ({ text1, text1Props, text1Suffix, text2, text2Props, text2Suffix, ...props }) => {
520
+ return /* @__PURE__ */ jsx17(Paper, { elevation: 0, className: "TokenBar-root", ...props, children: /* @__PURE__ */ jsxs5(FlexRow, { justifyContent: "space-between", children: [
521
+ /* @__PURE__ */ jsxs5(Typography7, { variant: "body1", fontWeight: 300, margin: 1, ...text1Props, children: [
522
+ text1,
523
+ text1Suffix
524
+ ] }),
525
+ /* @__PURE__ */ jsxs5(Typography7, { variant: "body1", fontWeight: 300, textTransform: "uppercase", color: "gray", margin: 1, ...text2Props, children: [
526
+ text2,
527
+ text2Suffix
528
+ ] })
529
+ ] }) });
530
+ };
531
+
532
+ // src/components/TokenData/img/index.ts
533
+ import ada from "./TokenData/img/ada.png";
534
+ import btc from "./TokenData/img/btc.png";
535
+ import busd from "./TokenData/img/busd.png";
536
+ import dai from "./TokenData/img/dai.png";
537
+ import dogecoin from "./TokenData/img/dogecoin.png";
538
+ import dot from "./TokenData/img/dot.png";
539
+ import ethereum from "./TokenData/img/ethereum.png";
540
+ import frax from "./TokenData/img/frax.png";
541
+ import link from "./TokenData/img/link.png";
542
+ import sol from "./TokenData/img/sol.png";
543
+ import tether from "./TokenData/img/tether.png";
544
+ import usdCoin from "./TokenData/img/usd-coin.png";
545
+ import weth from "./TokenData/img/weth.png";
546
+ import wrappedBtc from "./TokenData/img/wrapped-bitcoin.png";
547
+ import xyo from "./TokenData/img/xyo.png";
548
+
549
+ // src/components/TokenData/TokenData.ts
550
+ var TokenData = [
551
+ {
552
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/multi-collateral-dai/",
553
+ etherscanLink: "https://etherscan.io/token/0x6b175474e89094c44da98b954eedeac495271d0f",
554
+ icon: dai,
555
+ readableName: "Dai",
556
+ tokenSymbol: "dai",
557
+ uniqueTokenId: "dai"
558
+ },
559
+ {
560
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/weth/",
561
+ etherscanLink: "https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
562
+ icon: weth,
563
+ readableName: "Weth",
564
+ tokenSymbol: "weth",
565
+ uniqueTokenId: "weth"
566
+ },
567
+ {
568
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/ethereum/",
569
+ etherscanLink: "n/a",
570
+ icon: ethereum,
571
+ readableName: "Ethereum",
572
+ tokenSymbol: "eth",
573
+ uniqueTokenId: "ethereum"
574
+ },
575
+ {
576
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/bitcoin/",
577
+ etherscanLink: "n/a",
578
+ icon: btc,
579
+ readableName: "Bitcoin",
580
+ tokenSymbol: "btc",
581
+ uniqueTokenId: "btc"
582
+ },
583
+ {
584
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/xyo/",
585
+ etherscanLink: "https://etherscan.io/token/0x55296f69f40ea6d20e478533c15a6b08b654e758",
586
+ icon: xyo,
587
+ readableName: "XYO",
588
+ tokenSymbol: "xyo",
589
+ uniqueTokenId: "xyo"
590
+ },
591
+ {
592
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/frax/",
593
+ etherscanLink: "https://etherscan.io/token/0x853d955acef822db058eb8505911ed77f175b99e",
594
+ icon: frax,
595
+ readableName: "Frax",
596
+ tokenSymbol: "frax",
597
+ uniqueTokenId: "frax"
598
+ },
599
+ {
600
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/wrapped-bitcoin/",
601
+ etherscanLink: "https://etherscan.io/token/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
602
+ icon: wrappedBtc,
603
+ readableName: "Wrapped BTC",
604
+ tokenSymbol: "wbtc",
605
+ uniqueTokenId: "wbtc"
606
+ },
607
+ {
608
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/usd-coin/",
609
+ etherscanLink: "https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
610
+ icon: usdCoin,
611
+ readableName: "USDC",
612
+ tokenSymbol: "usdc",
613
+ uniqueTokenId: "usdc"
614
+ },
615
+ {
616
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/tether/",
617
+ etherscanLink: "https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7",
618
+ icon: tether,
619
+ readableName: "Tether",
620
+ tokenSymbol: "usdt",
621
+ uniqueTokenId: "usdt"
622
+ },
623
+ {
624
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/cardano/",
625
+ etherscanLink: "https://etherscan.io/token/0xc14777c94229582e5758c5a79b83dde876b9be98",
626
+ icon: ada,
627
+ readableName: "Cardano",
628
+ tokenSymbol: "ada",
629
+ uniqueTokenId: "ada"
630
+ },
631
+ {
632
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/binance-usd/",
633
+ etherscanLink: "https://etherscan.io/token/0x4Fabb145d64652a948d72533023f6E7A623C7C53",
634
+ icon: busd,
635
+ readableName: "Binance USD",
636
+ tokenSymbol: "busd",
637
+ uniqueTokenId: "busd"
638
+ },
639
+ {
640
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/dogecoin/",
641
+ etherscanLink: "https://etherscan.io/token/0x7618b5024a6349f9aef10ddfd33e3428c734551e",
642
+ icon: dogecoin,
643
+ readableName: "Dogecoin",
644
+ tokenSymbol: "doge",
645
+ uniqueTokenId: "doge"
646
+ },
647
+ {
648
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/polkadot-new/",
649
+ etherscanLink: "https://etherscan.io/token/0x2d4fb6dd969992c881d8e534c747cc925d5ba221",
650
+ icon: dot,
651
+ readableName: "Polkadot",
652
+ tokenSymbol: "dot",
653
+ uniqueTokenId: "dot"
654
+ },
655
+ {
656
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/chainlink/",
657
+ etherscanLink: "https://etherscan.io/token/0x514910771af9ca656af840dff83e8264ecf986ca",
658
+ icon: link,
659
+ readableName: "ChainLink",
660
+ tokenSymbol: "link",
661
+ uniqueTokenId: "link"
662
+ },
663
+ {
664
+ coinmarketcapLink: "https://coinmarketcap.com/currencies/solana/",
665
+ etherscanLink: "https://etherscan.io/token/0x1f54638b7737193ffd86c19ec51907a7c41755d8",
666
+ icon: sol,
667
+ readableName: "Solana",
668
+ tokenSymbol: "sol",
669
+ uniqueTokenId: "sol"
670
+ }
671
+ ];
672
+
673
+ // src/components/TokenData/useGetTokenData.tsx
674
+ var useGetTokenData = (symbols) => {
675
+ return symbols?.map((symbol) => {
676
+ const additionalTokenData = TokenData.find((x) => x.tokenSymbol === symbol);
677
+ const checkedTokenData = additionalTokenData ? additionalTokenData : TokenData[0];
678
+ return checkedTokenData;
679
+ });
680
+ };
681
+
682
+ // src/components/TokenSummary/TokenSummary.tsx
683
+ import { CardHeader, Typography as Typography8 } from "@mui/material";
684
+ import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
685
+ var TokenSummary = ({ icon, symbol, symbolElement, children, ...props }) => {
686
+ return /* @__PURE__ */ jsxs6(Fragment2, { children: [
687
+ /* @__PURE__ */ jsx18(
688
+ CardHeader,
689
+ {
690
+ avatar: /* @__PURE__ */ jsx18(ThemeTokenAvatar, { src: icon, alt: symbol }),
691
+ title: /* @__PURE__ */ jsx18(Typography8, { variant: "h6", fontWeight: 300, textTransform: "uppercase", children: symbolElement ?? symbol }),
692
+ ...props
693
+ }
694
+ ),
695
+ children
696
+ ] });
697
+ };
698
+
699
+ // src/components/TypographyEx.tsx
700
+ import { Typography as Typography9 } from "@mui/material";
701
+ import { jsx as jsx19 } from "react/jsx-runtime";
702
+ var TypographyEx = ({ gradient, ...props }) => {
703
+ const { classes } = useGradientStyles();
704
+ return /* @__PURE__ */ jsx19(Typography9, { className: gradient === "text" ? classes().heading : void 0, ...props });
705
+ };
706
+ export {
707
+ AddressTableCell,
708
+ Ampersand,
709
+ BasicHero,
710
+ EllipsisTableCell,
711
+ EllipsisTableCellWithRef,
712
+ EllipsizeBox,
713
+ ErrorBoundary,
714
+ HashTableCell,
715
+ ListItemButtonEx,
716
+ ListItemButtonExTo,
717
+ LoadResult,
718
+ NotFound,
719
+ PayloadDataMissing,
720
+ Pipe,
721
+ ScrollTableOnSm,
722
+ SectionSpacingRow,
723
+ ThemeTokenAvatar,
724
+ ThemeTokenAvatarGroup,
725
+ TokenBar,
726
+ TokenData,
727
+ TokenSummary,
728
+ TypographyEx,
729
+ useGetTokenData
730
+ };
19
731
  //# sourceMappingURL=index.js.map