@xyo-network/react-shared 10.0.5 → 10.0.6
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.d.ts +1 -6
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.mjs +2 -1413
- package/dist/browser/index.mjs.map +4 -4
- package/package.json +44 -8
- package/dist/browser/SizeProp.d.ts +0 -2
- package/dist/browser/SizeProp.d.ts.map +0 -1
- package/dist/browser/ada-JCPSRXND.png +0 -0
- package/dist/browser/btc-SRW7TEQV.png +0 -0
- package/dist/browser/busd-RAN4SWCI.png +0 -0
- package/dist/browser/components/Ampersand.d.ts +0 -4
- package/dist/browser/components/Ampersand.d.ts.map +0 -1
- package/dist/browser/components/BasicHero/BasicHero.d.ts +0 -26
- package/dist/browser/components/BasicHero/BasicHero.d.ts.map +0 -1
- package/dist/browser/components/BasicHero/index.d.ts +0 -2
- package/dist/browser/components/BasicHero/index.d.ts.map +0 -1
- package/dist/browser/components/Ellipsize.d.ts +0 -22
- package/dist/browser/components/Ellipsize.d.ts.map +0 -1
- package/dist/browser/components/LabeledTextFieldWrapper.d.ts +0 -7
- package/dist/browser/components/LabeledTextFieldWrapper.d.ts.map +0 -1
- package/dist/browser/components/ListItemButtonEx.d.ts +0 -11
- package/dist/browser/components/ListItemButtonEx.d.ts.map +0 -1
- package/dist/browser/components/LoadResult.d.ts +0 -12
- package/dist/browser/components/LoadResult.d.ts.map +0 -1
- package/dist/browser/components/NotFound.d.ts +0 -5
- package/dist/browser/components/NotFound.d.ts.map +0 -1
- package/dist/browser/components/Pipe.d.ts +0 -4
- package/dist/browser/components/Pipe.d.ts.map +0 -1
- package/dist/browser/components/ScrollTableOnSm.d.ts +0 -5
- package/dist/browser/components/ScrollTableOnSm.d.ts.map +0 -1
- package/dist/browser/components/SectionSpacingRow/SectionSpacingRow.d.ts +0 -7
- package/dist/browser/components/SectionSpacingRow/SectionSpacingRow.d.ts.map +0 -1
- package/dist/browser/components/SectionSpacingRow/index.d.ts +0 -2
- package/dist/browser/components/SectionSpacingRow/index.d.ts.map +0 -1
- package/dist/browser/components/TableCell/AddressTableCell.d.ts +0 -15
- package/dist/browser/components/TableCell/AddressTableCell.d.ts.map +0 -1
- package/dist/browser/components/TableCell/EllipsisTableCell.d.ts +0 -25
- package/dist/browser/components/TableCell/EllipsisTableCell.d.ts.map +0 -1
- package/dist/browser/components/TableCell/HashTableCell.d.ts +0 -16
- package/dist/browser/components/TableCell/HashTableCell.d.ts.map +0 -1
- package/dist/browser/components/TableCell/findParent.d.ts +0 -2
- package/dist/browser/components/TableCell/findParent.d.ts.map +0 -1
- package/dist/browser/components/TableCell/getRemainingRowWidth.d.ts +0 -3
- package/dist/browser/components/TableCell/getRemainingRowWidth.d.ts.map +0 -1
- package/dist/browser/components/TableCell/getSmallestParentWidth.d.ts +0 -2
- package/dist/browser/components/TableCell/getSmallestParentWidth.d.ts.map +0 -1
- package/dist/browser/components/TableCell/index.d.ts +0 -4
- package/dist/browser/components/TableCell/index.d.ts.map +0 -1
- package/dist/browser/components/ThemeTokenAvatar/ThemeTokenAvatar.d.ts +0 -4
- package/dist/browser/components/ThemeTokenAvatar/ThemeTokenAvatar.d.ts.map +0 -1
- package/dist/browser/components/ThemeTokenAvatar/index.d.ts +0 -2
- package/dist/browser/components/ThemeTokenAvatar/index.d.ts.map +0 -1
- package/dist/browser/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.d.ts +0 -7
- package/dist/browser/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.d.ts.map +0 -1
- package/dist/browser/components/ThemeTokenAvatarGroup/index.d.ts +0 -2
- package/dist/browser/components/ThemeTokenAvatarGroup/index.d.ts.map +0 -1
- package/dist/browser/components/TokenBar/TokenBar.d.ts +0 -13
- package/dist/browser/components/TokenBar/TokenBar.d.ts.map +0 -1
- package/dist/browser/components/TokenBar/index.d.ts +0 -2
- package/dist/browser/components/TokenBar/index.d.ts.map +0 -1
- package/dist/browser/components/TokenData/TokenData.d.ts +0 -10
- package/dist/browser/components/TokenData/TokenData.d.ts.map +0 -1
- package/dist/browser/components/TokenData/img/index.d.ts +0 -17
- package/dist/browser/components/TokenData/img/index.d.ts.map +0 -1
- package/dist/browser/components/TokenData/index.d.ts +0 -3
- package/dist/browser/components/TokenData/index.d.ts.map +0 -1
- package/dist/browser/components/TokenData/useGetTokenData.d.ts +0 -3
- package/dist/browser/components/TokenData/useGetTokenData.d.ts.map +0 -1
- package/dist/browser/components/TokenSummary/TokenSummary.d.ts +0 -11
- package/dist/browser/components/TokenSummary/TokenSummary.d.ts.map +0 -1
- package/dist/browser/components/TokenSummary/index.d.ts +0 -2
- package/dist/browser/components/TokenSummary/index.d.ts.map +0 -1
- package/dist/browser/components/TypographyEx.d.ts +0 -7
- package/dist/browser/components/TypographyEx.d.ts.map +0 -1
- package/dist/browser/components/bigint/FixedPointPopover.d.ts +0 -9
- package/dist/browser/components/bigint/FixedPointPopover.d.ts.map +0 -1
- package/dist/browser/components/bigint/Input.d.ts +0 -5
- package/dist/browser/components/bigint/Input.d.ts.map +0 -1
- package/dist/browser/components/bigint/InputAdornment.d.ts +0 -9
- package/dist/browser/components/bigint/InputAdornment.d.ts.map +0 -1
- package/dist/browser/components/bigint/TextField.d.ts +0 -16
- package/dist/browser/components/bigint/TextField.d.ts.map +0 -1
- package/dist/browser/components/bigint/helpers/formatBigIntInput.d.ts +0 -6
- package/dist/browser/components/bigint/helpers/formatBigIntInput.d.ts.map +0 -1
- package/dist/browser/components/bigint/helpers/index.d.ts +0 -2
- package/dist/browser/components/bigint/helpers/index.d.ts.map +0 -1
- package/dist/browser/components/bigint/index.d.ts +0 -6
- package/dist/browser/components/bigint/index.d.ts.map +0 -1
- package/dist/browser/components/index.d.ts +0 -20
- package/dist/browser/components/index.d.ts.map +0 -1
- package/dist/browser/components/pluginValidation/DataMissing.d.ts +0 -7
- package/dist/browser/components/pluginValidation/DataMissing.d.ts.map +0 -1
- package/dist/browser/components/pluginValidation/index.d.ts +0 -2
- package/dist/browser/components/pluginValidation/index.d.ts.map +0 -1
- package/dist/browser/contexts/ListMode/Context.d.ts +0 -17
- package/dist/browser/contexts/ListMode/Context.d.ts.map +0 -1
- package/dist/browser/contexts/ListMode/Provider.d.ts +0 -8
- package/dist/browser/contexts/ListMode/Provider.d.ts.map +0 -1
- package/dist/browser/contexts/ListMode/State.d.ts +0 -8
- package/dist/browser/contexts/ListMode/State.d.ts.map +0 -1
- package/dist/browser/contexts/ListMode/index.d.ts +0 -5
- package/dist/browser/contexts/ListMode/index.d.ts.map +0 -1
- package/dist/browser/contexts/ListMode/use.d.ts +0 -7
- package/dist/browser/contexts/ListMode/use.d.ts.map +0 -1
- package/dist/browser/contexts/diviner/Context.d.ts +0 -3
- package/dist/browser/contexts/diviner/Context.d.ts.map +0 -1
- package/dist/browser/contexts/diviner/Provider.d.ts +0 -11
- package/dist/browser/contexts/diviner/Provider.d.ts.map +0 -1
- package/dist/browser/contexts/diviner/State.d.ts +0 -7
- package/dist/browser/contexts/diviner/State.d.ts.map +0 -1
- package/dist/browser/contexts/diviner/index.d.ts +0 -4
- package/dist/browser/contexts/diviner/index.d.ts.map +0 -1
- package/dist/browser/contexts/index.d.ts +0 -3
- package/dist/browser/contexts/index.d.ts.map +0 -1
- package/dist/browser/dai-FZSM2RYY.png +0 -0
- package/dist/browser/dogecoin-QOIF7Q5M.png +0 -0
- package/dist/browser/dot-P5Z7IW2O.png +0 -0
- package/dist/browser/ethereum-3SLTXYTT.png +0 -0
- package/dist/browser/frax-TQDXCCOP.png +0 -0
- package/dist/browser/hooks/GradientStyles/GradientStyles.d.ts +0 -64
- package/dist/browser/hooks/GradientStyles/GradientStyles.d.ts.map +0 -1
- package/dist/browser/hooks/GradientStyles/index.d.ts +0 -2
- package/dist/browser/hooks/GradientStyles/index.d.ts.map +0 -1
- package/dist/browser/hooks/index.d.ts +0 -6
- package/dist/browser/hooks/index.d.ts.map +0 -1
- package/dist/browser/hooks/payload/index.d.ts +0 -5
- package/dist/browser/hooks/payload/index.d.ts.map +0 -1
- package/dist/browser/hooks/payload/types/ValidatedResponse.d.ts +0 -6
- package/dist/browser/hooks/payload/types/ValidatedResponse.d.ts.map +0 -1
- package/dist/browser/hooks/payload/types/index.d.ts +0 -2
- package/dist/browser/hooks/payload/types/index.d.ts.map +0 -1
- package/dist/browser/hooks/payload/useBoundWitnessValidate.d.ts +0 -4
- package/dist/browser/hooks/payload/useBoundWitnessValidate.d.ts.map +0 -1
- package/dist/browser/hooks/payload/usePayloadHash.d.ts +0 -6
- package/dist/browser/hooks/payload/usePayloadHash.d.ts.map +0 -1
- package/dist/browser/hooks/payload/usePayloadValidate.d.ts +0 -4
- package/dist/browser/hooks/payload/usePayloadValidate.d.ts.map +0 -1
- package/dist/browser/hooks/useDataState.d.ts +0 -3
- package/dist/browser/hooks/useDataState.d.ts.map +0 -1
- package/dist/browser/hooks/useMediaQuery.d.ts +0 -2
- package/dist/browser/hooks/useMediaQuery.d.ts.map +0 -1
- package/dist/browser/hooks/useShareForwardRef.d.ts +0 -4
- package/dist/browser/hooks/useShareForwardRef.d.ts.map +0 -1
- package/dist/browser/lib/assertDefinedEx.d.ts +0 -5
- package/dist/browser/lib/assertDefinedEx.d.ts.map +0 -1
- package/dist/browser/lib/getActualPaddingX.d.ts +0 -14
- package/dist/browser/lib/getActualPaddingX.d.ts.map +0 -1
- package/dist/browser/lib/index.d.ts +0 -4
- package/dist/browser/lib/index.d.ts.map +0 -1
- package/dist/browser/lib/networkComponents.d.ts +0 -12
- package/dist/browser/lib/networkComponents.d.ts.map +0 -1
- package/dist/browser/lib/xyo.d.ts +0 -4
- package/dist/browser/lib/xyo.d.ts.map +0 -1
- package/dist/browser/link-THYNVLXG.png +0 -0
- package/dist/browser/models/ListMode.d.ts +0 -2
- package/dist/browser/models/ListMode.d.ts.map +0 -1
- package/dist/browser/models/index.d.ts +0 -2
- package/dist/browser/models/index.d.ts.map +0 -1
- package/dist/browser/sol-A4J5S4EN.png +0 -0
- package/dist/browser/tether-3X63FB23.png +0 -0
- package/dist/browser/usd-coin-UCS44T5B.png +0 -0
- package/dist/browser/weth-HDGYDSJB.png +0 -0
- package/dist/browser/wrapped-bitcoin-TS5QFJLK.png +0 -0
- package/dist/browser/xl1-SFZAOI5T.png +0 -0
- package/dist/browser/xyo-RLMLL56X.png +0 -0
package/dist/browser/index.mjs
CHANGED
|
@@ -1,1414 +1,3 @@
|
|
|
1
|
-
// src/
|
|
2
|
-
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
var Ampersand = (props) => {
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
-
Typography,
|
|
7
|
-
{
|
|
8
|
-
component: "span",
|
|
9
|
-
...props,
|
|
10
|
-
sx: [{ marginX: 1 }, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
|
|
11
|
-
children: "&"
|
|
12
|
-
}
|
|
13
|
-
);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// src/components/BasicHero/BasicHero.tsx
|
|
17
|
-
import { ButtonEx } from "@ariestools/sdk-react/button";
|
|
18
|
-
import { FlexGrowCol, FlexGrowRow } from "@ariestools/sdk-react/flexbox";
|
|
19
|
-
import { LinkEx } from "@ariestools/sdk-react/link";
|
|
20
|
-
import { useIsSmall } from "@ariestools/sdk-react/theme";
|
|
21
|
-
import {
|
|
22
|
-
Box,
|
|
23
|
-
Container,
|
|
24
|
-
Grid,
|
|
25
|
-
Typography as Typography2
|
|
26
|
-
} from "@mui/material";
|
|
27
|
-
|
|
28
|
-
// src/hooks/GradientStyles/GradientStyles.tsx
|
|
29
|
-
import { useIsDark } from "@ariestools/sdk-react/theme";
|
|
30
|
-
var colorfulGradientLightMode = () => {
|
|
31
|
-
return {
|
|
32
|
-
background: { backgroundImage: "-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)" },
|
|
33
|
-
border: {
|
|
34
|
-
borderImage: "-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)",
|
|
35
|
-
borderImageSlice: 1,
|
|
36
|
-
borderImageSource: "-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)",
|
|
37
|
-
borderRadius: 0,
|
|
38
|
-
borderStyle: "solid",
|
|
39
|
-
borderWidth: "2px"
|
|
40
|
-
},
|
|
41
|
-
heading: {
|
|
42
|
-
WebkitBackgroundClip: "text",
|
|
43
|
-
WebkitTextFillColor: "transparent",
|
|
44
|
-
background: "-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)",
|
|
45
|
-
display: "inline-block"
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
var colorfulGradientDarkMode = () => {
|
|
50
|
-
return {
|
|
51
|
-
background: { backgroundImage: "-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)" },
|
|
52
|
-
border: {
|
|
53
|
-
borderImage: "-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)",
|
|
54
|
-
borderImageSlice: 1,
|
|
55
|
-
borderImageSource: "-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)",
|
|
56
|
-
borderRadius: 0,
|
|
57
|
-
borderStyle: "solid",
|
|
58
|
-
borderWidth: "2px"
|
|
59
|
-
},
|
|
60
|
-
heading: {
|
|
61
|
-
WebkitBackgroundClip: "text",
|
|
62
|
-
WebkitTextFillColor: "transparent",
|
|
63
|
-
background: "-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)",
|
|
64
|
-
display: "inline-block"
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
var useGradientStyles = () => {
|
|
69
|
-
const dark = useIsDark();
|
|
70
|
-
const styles = dark ? colorfulGradientDarkMode() : colorfulGradientLightMode();
|
|
71
|
-
return styles;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
// src/hooks/payload/useBoundWitnessValidate.tsx
|
|
75
|
-
import { assertEx } from "@ariestools/sdk";
|
|
76
|
-
import { usePromise } from "@ariestools/sdk-react/promise";
|
|
77
|
-
import { BoundWitnessValidator, isAnyPayload } from "@xyo-network/sdk";
|
|
78
|
-
var useValidateBoundWitness = (input) => {
|
|
79
|
-
const [output, validationError] = usePromise(async () => {
|
|
80
|
-
if (!input) return;
|
|
81
|
-
const object = JSON.parse(input);
|
|
82
|
-
const validPayload = assertEx(isAnyPayload(object) ? object : null, () => "Invalid payload");
|
|
83
|
-
const errors2 = await new BoundWitnessValidator(validPayload).validate();
|
|
84
|
-
return {
|
|
85
|
-
payload: validPayload,
|
|
86
|
-
errors: errors2
|
|
87
|
-
};
|
|
88
|
-
}, [input]);
|
|
89
|
-
const { payload, errors } = output ?? {};
|
|
90
|
-
return {
|
|
91
|
-
payload,
|
|
92
|
-
errors: [validationError, ...errors ?? []].filter((error) => !!error)
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
// src/hooks/payload/usePayloadHash.tsx
|
|
97
|
-
import { usePromise as usePromise2 } from "@ariestools/sdk-react/promise";
|
|
98
|
-
import { PayloadBuilder } from "@xyo-network/sdk";
|
|
99
|
-
var usePayloadHash = (payload) => {
|
|
100
|
-
return usePayloadRootHash(payload);
|
|
101
|
-
};
|
|
102
|
-
var usePayloadDataHash = (payload) => {
|
|
103
|
-
return usePromise2(async () => payload ? await PayloadBuilder.dataHash(payload) : void 0, [payload])[0];
|
|
104
|
-
};
|
|
105
|
-
var usePayloadRootHash = (payload) => {
|
|
106
|
-
return usePromise2(async () => payload ? await PayloadBuilder.hash(payload) : void 0, [payload])[0];
|
|
107
|
-
};
|
|
108
|
-
var usePayloadHashes = (payloads) => {
|
|
109
|
-
return usePromise2(
|
|
110
|
-
async () => payloads ? await Promise.all(payloads.map(async (payload) => [payload, await PayloadBuilder.dataHash(payload)])) : void 0,
|
|
111
|
-
[payloads]
|
|
112
|
-
)[0];
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
// src/hooks/payload/usePayloadValidate.tsx
|
|
116
|
-
import { assertEx as assertEx2 } from "@ariestools/sdk";
|
|
117
|
-
import { isAnyPayload as isAnyPayload2, PayloadBuilder as PayloadBuilder2 } from "@xyo-network/sdk";
|
|
118
|
-
import { useMemo } from "react";
|
|
119
|
-
var usePayloadValidate = (input) => {
|
|
120
|
-
return useMemo(() => {
|
|
121
|
-
if (!input) return {};
|
|
122
|
-
try {
|
|
123
|
-
const object = JSON.parse(input);
|
|
124
|
-
const validPayload = assertEx2(isAnyPayload2(object) ? object : null, () => "Invalid payload");
|
|
125
|
-
const { schema, ...fields } = validPayload;
|
|
126
|
-
const payload = new PayloadBuilder2({ schema }).fields(fields).build();
|
|
127
|
-
return { payload };
|
|
128
|
-
} catch (error) {
|
|
129
|
-
return { errors: [error] };
|
|
130
|
-
}
|
|
131
|
-
}, [input]);
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
// src/hooks/useDataState.ts
|
|
135
|
-
import { useState } from "react";
|
|
136
|
-
var useDataState = (defaultValue) => {
|
|
137
|
-
const [state, setState] = useState(defaultValue);
|
|
138
|
-
const setDataState = (value) => {
|
|
139
|
-
try {
|
|
140
|
-
if (JSON.stringify(value) !== JSON.stringify(state)) {
|
|
141
|
-
setState(value);
|
|
142
|
-
}
|
|
143
|
-
} catch {
|
|
144
|
-
console.error("setDataState failed! Make sure data type is stringifiable!");
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
return [state, setDataState];
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
// src/hooks/useMediaQuery.ts
|
|
151
|
-
import { useMediaQuery } from "@mui/material";
|
|
152
|
-
|
|
153
|
-
// src/hooks/useShareForwardRef.ts
|
|
154
|
-
import { useEffect, useRef } from "react";
|
|
155
|
-
var useShareForwardedRef = (forwardedRef, refresh = 0) => {
|
|
156
|
-
const innerRef = useRef(null);
|
|
157
|
-
useEffect(() => {
|
|
158
|
-
if (!forwardedRef) {
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
if (typeof forwardedRef === "function") {
|
|
162
|
-
forwardedRef(innerRef.current);
|
|
163
|
-
} else {
|
|
164
|
-
forwardedRef.current = innerRef.current;
|
|
165
|
-
}
|
|
166
|
-
}, [forwardedRef, refresh]);
|
|
167
|
-
return innerRef;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
// src/components/BasicHero/BasicHero.tsx
|
|
171
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
172
|
-
var SubLinkSection = ({
|
|
173
|
-
backgroundImageAlignment,
|
|
174
|
-
subLinkIcon,
|
|
175
|
-
subLinkPath,
|
|
176
|
-
subLinkText1,
|
|
177
|
-
subLinkText2
|
|
178
|
-
}) => {
|
|
179
|
-
return /* @__PURE__ */ jsxs(
|
|
180
|
-
FlexGrowRow,
|
|
181
|
-
{
|
|
182
|
-
sx: {
|
|
183
|
-
width: "100%",
|
|
184
|
-
flexDirection: { md: "row", xs: "column" },
|
|
185
|
-
justifyContent: { md: backgroundImageAlignment ? "flex-start" : "center", xs: "center" }
|
|
186
|
-
},
|
|
187
|
-
children: [
|
|
188
|
-
subLinkIcon ? /* @__PURE__ */ jsxs("span", { children: [
|
|
189
|
-
subLinkIcon,
|
|
190
|
-
"\xA0"
|
|
191
|
-
] }) : null,
|
|
192
|
-
/* @__PURE__ */ jsxs(Typography2, { children: [
|
|
193
|
-
subLinkText1,
|
|
194
|
-
"\xA0"
|
|
195
|
-
] }),
|
|
196
|
-
/* @__PURE__ */ jsx2(
|
|
197
|
-
LinkEx,
|
|
198
|
-
{
|
|
199
|
-
href: subLinkPath,
|
|
200
|
-
underline: "always",
|
|
201
|
-
target: "_blank",
|
|
202
|
-
sx: { color: "inherit" },
|
|
203
|
-
children: /* @__PURE__ */ jsx2(Typography2, { children: subLinkText2 })
|
|
204
|
-
}
|
|
205
|
-
)
|
|
206
|
-
]
|
|
207
|
-
}
|
|
208
|
-
);
|
|
209
|
-
};
|
|
210
|
-
var ButtonSection = ({
|
|
211
|
-
href,
|
|
212
|
-
to,
|
|
213
|
-
buttonText
|
|
214
|
-
}) => {
|
|
215
|
-
const isMobile = useIsSmall();
|
|
216
|
-
return href ? /* @__PURE__ */ jsx2(
|
|
217
|
-
ButtonEx,
|
|
218
|
-
{
|
|
219
|
-
fullWidth: true,
|
|
220
|
-
target: href ?? "_blank",
|
|
221
|
-
href,
|
|
222
|
-
variant: "contained",
|
|
223
|
-
sx: {
|
|
224
|
-
marginTop: 1,
|
|
225
|
-
marginBottom: 1,
|
|
226
|
-
marginRight: isMobile ? 2 : 1,
|
|
227
|
-
marginLeft: isMobile ? 2 : 0,
|
|
228
|
-
color: "primary",
|
|
229
|
-
paddingX: 3,
|
|
230
|
-
display: href || to ? "flex" : "none"
|
|
231
|
-
},
|
|
232
|
-
children: buttonText
|
|
233
|
-
}
|
|
234
|
-
) : to ? /* @__PURE__ */ jsx2(
|
|
235
|
-
ButtonEx,
|
|
236
|
-
{
|
|
237
|
-
fullWidth: true,
|
|
238
|
-
to,
|
|
239
|
-
variant: "contained",
|
|
240
|
-
sx: {
|
|
241
|
-
marginTop: 1,
|
|
242
|
-
marginBottom: 1,
|
|
243
|
-
marginRight: isMobile ? 2 : 1,
|
|
244
|
-
marginLeft: isMobile ? 2 : 0,
|
|
245
|
-
color: "primary",
|
|
246
|
-
paddingX: 3,
|
|
247
|
-
display: href || to ? "flex" : "none"
|
|
248
|
-
},
|
|
249
|
-
children: buttonText
|
|
250
|
-
}
|
|
251
|
-
) : /* @__PURE__ */ jsx2(
|
|
252
|
-
ButtonEx,
|
|
253
|
-
{
|
|
254
|
-
fullWidth: true,
|
|
255
|
-
variant: "contained",
|
|
256
|
-
sx: {
|
|
257
|
-
marginTop: 1,
|
|
258
|
-
marginBottom: 1,
|
|
259
|
-
marginRight: isMobile ? 2 : 1,
|
|
260
|
-
marginLeft: isMobile ? 2 : 0,
|
|
261
|
-
color: "primary",
|
|
262
|
-
paddingX: 3,
|
|
263
|
-
display: href || to ? "flex" : "none"
|
|
264
|
-
},
|
|
265
|
-
children: buttonText
|
|
266
|
-
}
|
|
267
|
-
);
|
|
268
|
-
};
|
|
269
|
-
var BasicHero = ({
|
|
270
|
-
backgroundImage,
|
|
271
|
-
title,
|
|
272
|
-
gradientTitle,
|
|
273
|
-
backgroundColor,
|
|
274
|
-
textColor,
|
|
275
|
-
desc,
|
|
276
|
-
heroImage,
|
|
277
|
-
title2,
|
|
278
|
-
subLinkText1,
|
|
279
|
-
subLinkText2,
|
|
280
|
-
subLinkPath,
|
|
281
|
-
button1Text,
|
|
282
|
-
button2Text,
|
|
283
|
-
button2To,
|
|
284
|
-
button1To,
|
|
285
|
-
button2Href,
|
|
286
|
-
button1Href,
|
|
287
|
-
subLinkIcon,
|
|
288
|
-
sx,
|
|
289
|
-
...props
|
|
290
|
-
// eslint-disable-next-line complexity
|
|
291
|
-
}) => {
|
|
292
|
-
const isMobile = useIsSmall();
|
|
293
|
-
const styles = useGradientStyles();
|
|
294
|
-
return /* @__PURE__ */ jsx2(
|
|
295
|
-
FlexGrowCol,
|
|
296
|
-
{
|
|
297
|
-
sx: {
|
|
298
|
-
backgroundImage: `url(${backgroundImage})`,
|
|
299
|
-
backgroundPosition: {
|
|
300
|
-
lg: "bottom",
|
|
301
|
-
md: "center left",
|
|
302
|
-
xs: "top left"
|
|
303
|
-
},
|
|
304
|
-
minHeight: {
|
|
305
|
-
md: "500px",
|
|
306
|
-
sm: "400px",
|
|
307
|
-
xs: "200px"
|
|
308
|
-
},
|
|
309
|
-
...sx
|
|
310
|
-
},
|
|
311
|
-
style: {
|
|
312
|
-
backgroundColor: backgroundColor ?? "",
|
|
313
|
-
backgroundRepeat: "no-repeat",
|
|
314
|
-
backgroundSize: "cover",
|
|
315
|
-
color: textColor ?? ""
|
|
316
|
-
},
|
|
317
|
-
...props,
|
|
318
|
-
children: /* @__PURE__ */ jsx2(Container, { children: /* @__PURE__ */ jsxs(
|
|
319
|
-
Grid,
|
|
320
|
-
{
|
|
321
|
-
container: true,
|
|
322
|
-
sx: {
|
|
323
|
-
justifyContent: "center",
|
|
324
|
-
alignItems: "center"
|
|
325
|
-
},
|
|
326
|
-
children: [
|
|
327
|
-
/* @__PURE__ */ jsx2(
|
|
328
|
-
Grid,
|
|
329
|
-
{
|
|
330
|
-
size: {
|
|
331
|
-
xs: 12,
|
|
332
|
-
sm: 8,
|
|
333
|
-
md: backgroundImage ? 6 : 8,
|
|
334
|
-
lg: backgroundImage ? 6 : 8
|
|
335
|
-
},
|
|
336
|
-
children: /* @__PURE__ */ jsxs(
|
|
337
|
-
FlexGrowCol,
|
|
338
|
-
{
|
|
339
|
-
sx: {
|
|
340
|
-
paddingY: 2,
|
|
341
|
-
alignItems: { xs: backgroundImage && !isMobile ? "flex-start" : "center" }
|
|
342
|
-
},
|
|
343
|
-
children: [
|
|
344
|
-
/* @__PURE__ */ jsxs(
|
|
345
|
-
Typography2,
|
|
346
|
-
{
|
|
347
|
-
variant: "h1",
|
|
348
|
-
component: "h1",
|
|
349
|
-
gutterBottom: true,
|
|
350
|
-
sx: { textAlign: backgroundImage && !isMobile ? "left" : "center" },
|
|
351
|
-
children: [
|
|
352
|
-
title ? /* @__PURE__ */ jsx2("span", { children: `${title} ` }) : null,
|
|
353
|
-
gradientTitle ? /* @__PURE__ */ jsxs(Box, { component: "span", sx: styles.heading, children: [
|
|
354
|
-
" ",
|
|
355
|
-
` ${gradientTitle}`
|
|
356
|
-
] }) : null,
|
|
357
|
-
title2 ? /* @__PURE__ */ jsx2("span", { children: ` ${title2}` }) : null
|
|
358
|
-
]
|
|
359
|
-
}
|
|
360
|
-
),
|
|
361
|
-
/* @__PURE__ */ jsx2(
|
|
362
|
-
Typography2,
|
|
363
|
-
{
|
|
364
|
-
variant: "body1",
|
|
365
|
-
component: "h2",
|
|
366
|
-
gutterBottom: true,
|
|
367
|
-
sx: { textAlign: backgroundImage && !isMobile ? "left" : "center" },
|
|
368
|
-
children: desc
|
|
369
|
-
}
|
|
370
|
-
),
|
|
371
|
-
/* @__PURE__ */ jsxs(
|
|
372
|
-
FlexGrowRow,
|
|
373
|
-
{
|
|
374
|
-
sx: {
|
|
375
|
-
width: "100%",
|
|
376
|
-
marginTop: 1,
|
|
377
|
-
flexDirection: { lg: "row", xs: "column" }
|
|
378
|
-
},
|
|
379
|
-
children: [
|
|
380
|
-
button1Href ? /* @__PURE__ */ jsx2(ButtonSection, { href: button1Href, buttonText: button1Text }) : button1To ? /* @__PURE__ */ jsx2(ButtonSection, { to: button1To, buttonText: button1Text }) : /* @__PURE__ */ jsx2(ButtonSection, { buttonText: button1Text }),
|
|
381
|
-
button2Href ? /* @__PURE__ */ jsx2(ButtonSection, { href: button2Href, buttonText: button2Text }) : button2To ? /* @__PURE__ */ jsx2(ButtonSection, { to: button2To, buttonText: button2Text }) : /* @__PURE__ */ jsx2(ButtonSection, { buttonText: button2Text })
|
|
382
|
-
]
|
|
383
|
-
}
|
|
384
|
-
),
|
|
385
|
-
/* @__PURE__ */ jsx2(
|
|
386
|
-
SubLinkSection,
|
|
387
|
-
{
|
|
388
|
-
subLinkIcon,
|
|
389
|
-
subLinkText1,
|
|
390
|
-
subLinkText2,
|
|
391
|
-
subLinkPath,
|
|
392
|
-
backgroundImageAlignment: backgroundImage ? true : false
|
|
393
|
-
}
|
|
394
|
-
)
|
|
395
|
-
]
|
|
396
|
-
}
|
|
397
|
-
)
|
|
398
|
-
}
|
|
399
|
-
),
|
|
400
|
-
/* @__PURE__ */ jsx2(Grid, { size: { xs: 12, md: 6 }, children: heroImage ? /* @__PURE__ */ jsx2("img", { src: heroImage, width: "100%" }) : null })
|
|
401
|
-
]
|
|
402
|
-
}
|
|
403
|
-
) })
|
|
404
|
-
}
|
|
405
|
-
);
|
|
406
|
-
};
|
|
407
|
-
|
|
408
|
-
// src/components/bigint/FixedPointPopover.tsx
|
|
409
|
-
import {
|
|
410
|
-
FormHelperText,
|
|
411
|
-
Popover,
|
|
412
|
-
TextField
|
|
413
|
-
} from "@mui/material";
|
|
414
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
415
|
-
var FixedPointPopover = ({
|
|
416
|
-
fixedPoint,
|
|
417
|
-
minFixedPoint: minimumPoint,
|
|
418
|
-
onFixedPointChange,
|
|
419
|
-
...props
|
|
420
|
-
}) => {
|
|
421
|
-
const handleChange = (event) => {
|
|
422
|
-
const fixedPointInteger = Number.parseInt(event.target.value, 10);
|
|
423
|
-
if (Number.isNaN(fixedPointInteger)) return;
|
|
424
|
-
onFixedPointChange?.(fixedPointInteger);
|
|
425
|
-
};
|
|
426
|
-
return /* @__PURE__ */ jsxs2(Popover, { slotProps: { paper: { sx: { p: 2 } } }, ...props, children: [
|
|
427
|
-
/* @__PURE__ */ jsx3(TextField, { slotProps: { htmlInput: { min: minimumPoint } }, value: fixedPoint, onChange: handleChange, type: "number" }),
|
|
428
|
-
/* @__PURE__ */ jsx3(FormHelperText, { children: "Set the Fixed Point" })
|
|
429
|
-
] });
|
|
430
|
-
};
|
|
431
|
-
|
|
432
|
-
// src/components/bigint/helpers/formatBigIntInput.ts
|
|
433
|
-
var formatBigIntInput = (rawValue) => {
|
|
434
|
-
const filteredValue = rawValue.replaceAll(/[^\d.]/g, "");
|
|
435
|
-
if (filteredValue.split(".").length > 2) return;
|
|
436
|
-
return filteredValue;
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
// src/components/bigint/TextField.tsx
|
|
440
|
-
import { isDefined, toFixedPoint } from "@ariestools/sdk";
|
|
441
|
-
import {
|
|
442
|
-
FormControl,
|
|
443
|
-
FormHelperText as FormHelperText2,
|
|
444
|
-
TextField as TextField2
|
|
445
|
-
} from "@mui/material";
|
|
446
|
-
import {
|
|
447
|
-
useEffect as useEffect3,
|
|
448
|
-
useMemo as useMemo2,
|
|
449
|
-
useState as useState3
|
|
450
|
-
} from "react";
|
|
451
|
-
|
|
452
|
-
// src/components/bigint/InputAdornment.tsx
|
|
453
|
-
import {
|
|
454
|
-
Avatar,
|
|
455
|
-
IconButton,
|
|
456
|
-
InputAdornment
|
|
457
|
-
} from "@mui/material";
|
|
458
|
-
import {
|
|
459
|
-
useEffect as useEffect2,
|
|
460
|
-
useRef as useRef2,
|
|
461
|
-
useState as useState2
|
|
462
|
-
} from "react";
|
|
463
|
-
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
464
|
-
var FixedPointInputAdornment = ({
|
|
465
|
-
fixedPoint,
|
|
466
|
-
minFixedPoint,
|
|
467
|
-
onFixedPointChange,
|
|
468
|
-
...props
|
|
469
|
-
}) => {
|
|
470
|
-
const ref = useRef2(null);
|
|
471
|
-
const [open, setOpen] = useState2(false);
|
|
472
|
-
const [anchorEl, setAnchorEl] = useState2(null);
|
|
473
|
-
useEffect2(() => {
|
|
474
|
-
setAnchorEl(ref.current);
|
|
475
|
-
}, []);
|
|
476
|
-
return /* @__PURE__ */ jsxs3(InputAdornment, { ...props, children: [
|
|
477
|
-
/* @__PURE__ */ jsx4(
|
|
478
|
-
FixedPointPopover,
|
|
479
|
-
{
|
|
480
|
-
anchorEl,
|
|
481
|
-
anchorOrigin: { vertical: "bottom", horizontal: "left" },
|
|
482
|
-
fixedPoint,
|
|
483
|
-
minFixedPoint,
|
|
484
|
-
onClose: () => setOpen(false),
|
|
485
|
-
onFixedPointChange,
|
|
486
|
-
open
|
|
487
|
-
}
|
|
488
|
-
),
|
|
489
|
-
/* @__PURE__ */ jsx4(IconButton, { size: "small", ref, onClick: () => setOpen(!open), children: /* @__PURE__ */ jsx4(
|
|
490
|
-
Avatar,
|
|
491
|
-
{
|
|
492
|
-
sx: {
|
|
493
|
-
fontSize: ".75rem",
|
|
494
|
-
height: "20px",
|
|
495
|
-
width: "20px"
|
|
496
|
-
},
|
|
497
|
-
children: fixedPoint
|
|
498
|
-
}
|
|
499
|
-
) })
|
|
500
|
-
] });
|
|
501
|
-
};
|
|
502
|
-
|
|
503
|
-
// src/components/bigint/TextField.tsx
|
|
504
|
-
import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
505
|
-
var BigIntTextField = ({
|
|
506
|
-
defaultFixedPoint = 18,
|
|
507
|
-
defaultRawValue,
|
|
508
|
-
helperText,
|
|
509
|
-
hideAdornment,
|
|
510
|
-
onChangeFixedPoint,
|
|
511
|
-
onChangeFormatted,
|
|
512
|
-
onChange,
|
|
513
|
-
resetValue,
|
|
514
|
-
...props
|
|
515
|
-
}) => {
|
|
516
|
-
const [rawValue, setRawValue] = useState3("");
|
|
517
|
-
const [fixedPoint, setFixedPoint] = useState3(defaultFixedPoint);
|
|
518
|
-
const [error, setError] = useState3();
|
|
519
|
-
const [previousResetValue, setPreviousResetValue] = useState3(resetValue);
|
|
520
|
-
if (resetValue !== previousResetValue) {
|
|
521
|
-
setPreviousResetValue(resetValue);
|
|
522
|
-
setRawValue("");
|
|
523
|
-
}
|
|
524
|
-
const [previousDefaultRawValue, setPreviousDefaultRawValue] = useState3(defaultRawValue);
|
|
525
|
-
if (defaultRawValue !== previousDefaultRawValue) {
|
|
526
|
-
setPreviousDefaultRawValue(defaultRawValue);
|
|
527
|
-
if (isDefined(defaultRawValue)) {
|
|
528
|
-
const formattedValue = formatBigIntInput(defaultRawValue);
|
|
529
|
-
if (formattedValue) setRawValue(formattedValue);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
const handleChange = (event) => {
|
|
533
|
-
onChange?.(event);
|
|
534
|
-
const formattedValue = formatBigIntInput(event.target.value);
|
|
535
|
-
if (isDefined(formattedValue)) {
|
|
536
|
-
setRawValue(formattedValue);
|
|
537
|
-
onChangeFormatted?.(formattedValue);
|
|
538
|
-
}
|
|
539
|
-
};
|
|
540
|
-
const onFixedPointChange = (fixedPoint2) => setFixedPoint(fixedPoint2);
|
|
541
|
-
useEffect3(() => {
|
|
542
|
-
const bigIntValue = () => {
|
|
543
|
-
if (rawValue) {
|
|
544
|
-
const fixedValue = toFixedPoint(rawValue, fixedPoint);
|
|
545
|
-
setError(void 0);
|
|
546
|
-
try {
|
|
547
|
-
return fixedValue;
|
|
548
|
-
} catch (e) {
|
|
549
|
-
console.error(e);
|
|
550
|
-
setError(e);
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
|
-
} else {
|
|
554
|
-
return;
|
|
555
|
-
}
|
|
556
|
-
};
|
|
557
|
-
onChangeFixedPoint?.(bigIntValue());
|
|
558
|
-
}, [fixedPoint, onChangeFixedPoint, rawValue]);
|
|
559
|
-
const minFixedPoint = rawValue.split(".", 2)[1]?.length;
|
|
560
|
-
const resolvedHelperText = useMemo2(() => {
|
|
561
|
-
if (error) return "Cannot convert to BigInt";
|
|
562
|
-
return helperText ?? "Enter a number";
|
|
563
|
-
}, [helperText, error]);
|
|
564
|
-
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
565
|
-
/* @__PURE__ */ jsx5(
|
|
566
|
-
TextField2,
|
|
567
|
-
{
|
|
568
|
-
onChange: handleChange,
|
|
569
|
-
type: "string",
|
|
570
|
-
error: Boolean(error),
|
|
571
|
-
slotProps: {
|
|
572
|
-
htmlInput: { pattern: "[0-9]*[.]?[0-9]*" },
|
|
573
|
-
input: {
|
|
574
|
-
startAdornment: hideAdornment ? null : /* @__PURE__ */ jsx5(
|
|
575
|
-
FixedPointInputAdornment,
|
|
576
|
-
{
|
|
577
|
-
position: "start",
|
|
578
|
-
fixedPoint,
|
|
579
|
-
minFixedPoint,
|
|
580
|
-
onFixedPointChange
|
|
581
|
-
}
|
|
582
|
-
)
|
|
583
|
-
}
|
|
584
|
-
},
|
|
585
|
-
value: rawValue,
|
|
586
|
-
...props
|
|
587
|
-
}
|
|
588
|
-
),
|
|
589
|
-
/* @__PURE__ */ jsx5(FormHelperText2, { children: resolvedHelperText })
|
|
590
|
-
] });
|
|
591
|
-
};
|
|
592
|
-
var WithFormControl = ({ textFieldProps, ...props }) => /* @__PURE__ */ jsx5(FormControl, { ...props, children: /* @__PURE__ */ jsx5(BigIntTextField, { ...textFieldProps }) });
|
|
593
|
-
|
|
594
|
-
// src/components/bigint/Input.ts
|
|
595
|
-
var BigIntInput = {
|
|
596
|
-
TextField: BigIntTextField,
|
|
597
|
-
WithFormControl
|
|
598
|
-
};
|
|
599
|
-
|
|
600
|
-
// src/components/Ellipsize.tsx
|
|
601
|
-
import {
|
|
602
|
-
Box as Box2,
|
|
603
|
-
styled,
|
|
604
|
-
Typography as Typography3
|
|
605
|
-
} from "@mui/material";
|
|
606
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
607
|
-
var ComponentName = "Ellipsize";
|
|
608
|
-
var EllipsizeRoot = styled(Box2, {
|
|
609
|
-
name: ComponentName,
|
|
610
|
-
shouldForwardProp: (prop) => prop !== "beforeLineHeight",
|
|
611
|
-
slot: "Root"
|
|
612
|
-
})(({ beforeLineHeight = 0 }) => ({
|
|
613
|
-
"&": {
|
|
614
|
-
// because the cell content ends up absolutely positioned, the cell doesn't know the content height.
|
|
615
|
-
// the pseudo element with a hidden character establishes the proper height of the content and hides it
|
|
616
|
-
":before": {
|
|
617
|
-
content: "'nbsp;'",
|
|
618
|
-
display: "block",
|
|
619
|
-
// take the pseudo element out of the `display: block` flow so it won't push against our actual content
|
|
620
|
-
float: "left",
|
|
621
|
-
lineHeight: beforeLineHeight,
|
|
622
|
-
visibility: "hidden"
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
}));
|
|
626
|
-
var EllipsizeInnerWrap = styled(Box2, {
|
|
627
|
-
name: ComponentName,
|
|
628
|
-
slot: "innerWrap"
|
|
629
|
-
})(() => ({ position: "relative" }));
|
|
630
|
-
var EllipsizeContentWrap = styled(Typography3, {
|
|
631
|
-
name: ComponentName,
|
|
632
|
-
shouldForwardProp: (prop) => prop !== "ellipsisPosition",
|
|
633
|
-
slot: "contentWrap"
|
|
634
|
-
})(({
|
|
635
|
-
theme,
|
|
636
|
-
ellipsisPosition,
|
|
637
|
-
fontFamily
|
|
638
|
-
}) => {
|
|
639
|
-
return theme.unstable_sx({
|
|
640
|
-
fontFamily: fontFamily ?? "monospace",
|
|
641
|
-
left: 0,
|
|
642
|
-
overflow: "hidden",
|
|
643
|
-
position: "absolute",
|
|
644
|
-
right: 0,
|
|
645
|
-
textOverflow: "ellipsis",
|
|
646
|
-
whiteSpace: "nowrap",
|
|
647
|
-
...ellipsisPosition === "start" && {
|
|
648
|
-
direction: "rtl",
|
|
649
|
-
textAlign: "left"
|
|
650
|
-
}
|
|
651
|
-
});
|
|
652
|
-
});
|
|
653
|
-
var EllipsizeBox = ({
|
|
654
|
-
ref,
|
|
655
|
-
innerWrapProps,
|
|
656
|
-
children,
|
|
657
|
-
ellipsisPosition = "start",
|
|
658
|
-
disableSharedRef,
|
|
659
|
-
typographyProps,
|
|
660
|
-
...props
|
|
661
|
-
}) => {
|
|
662
|
-
const sharedRef = useShareForwardedRef(ref);
|
|
663
|
-
const { sx: innerWrapSx, ...remainingInnerWrapProps } = innerWrapProps ?? {};
|
|
664
|
-
return /* @__PURE__ */ jsx6(EllipsizeRoot, { ref: sharedRef, ...props, children: /* @__PURE__ */ jsx6(
|
|
665
|
-
EllipsizeInnerWrap,
|
|
666
|
-
{
|
|
667
|
-
...remainingInnerWrapProps,
|
|
668
|
-
sx: {
|
|
669
|
-
alignItems: "center",
|
|
670
|
-
display: "flex",
|
|
671
|
-
...innerWrapSx
|
|
672
|
-
},
|
|
673
|
-
children: /* @__PURE__ */ jsx6(EllipsizeContentWrap, { component: "span", ellipsisPosition, variant: "body2", ...typographyProps, children })
|
|
674
|
-
}
|
|
675
|
-
) });
|
|
676
|
-
};
|
|
677
|
-
EllipsizeBox.displayName = "EllipsizeBox";
|
|
678
|
-
|
|
679
|
-
// src/components/LabeledTextFieldWrapper.tsx
|
|
680
|
-
import { Stack, Typography as Typography4 } from "@mui/material";
|
|
681
|
-
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
682
|
-
var LabeledTextFieldWrapper = ({
|
|
683
|
-
children,
|
|
684
|
-
label,
|
|
685
|
-
...props
|
|
686
|
-
}) => {
|
|
687
|
-
return /* @__PURE__ */ jsxs5(
|
|
688
|
-
Stack,
|
|
689
|
-
{
|
|
690
|
-
...props,
|
|
691
|
-
sx: [{ flexDirection: "column" }, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
|
|
692
|
-
children: [
|
|
693
|
-
/* @__PURE__ */ jsx7(Typography4, { gutterBottom: true, variant: "caption", children: label }),
|
|
694
|
-
children
|
|
695
|
-
]
|
|
696
|
-
}
|
|
697
|
-
);
|
|
698
|
-
};
|
|
699
|
-
|
|
700
|
-
// src/components/ListItemButtonEx.tsx
|
|
701
|
-
import { ListItemButton } from "@mui/material";
|
|
702
|
-
import { useNavigate } from "react-router-dom";
|
|
703
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
704
|
-
var ListItemButtonExTo = ({
|
|
705
|
-
to,
|
|
706
|
-
toOptions,
|
|
707
|
-
onClick,
|
|
708
|
-
...props
|
|
709
|
-
}) => {
|
|
710
|
-
const navigate = useNavigate();
|
|
711
|
-
const localOnClick = (event) => {
|
|
712
|
-
onClick?.(event);
|
|
713
|
-
if (to) {
|
|
714
|
-
void navigate(to, toOptions);
|
|
715
|
-
}
|
|
716
|
-
};
|
|
717
|
-
return /* @__PURE__ */ jsx8(ListItemButton, { onClick: localOnClick, ...props });
|
|
718
|
-
};
|
|
719
|
-
var ListItemButtonEx = ({ to, ...props }) => {
|
|
720
|
-
return to ? /* @__PURE__ */ jsx8(ListItemButtonExTo, { to, ...props }) : /* @__PURE__ */ jsx8(ListItemButton, { ...props });
|
|
721
|
-
};
|
|
722
|
-
|
|
723
|
-
// src/components/LoadResult.tsx
|
|
724
|
-
import { FlexGrowRow as FlexGrowRow2 } from "@ariestools/sdk-react/flexbox";
|
|
725
|
-
|
|
726
|
-
// src/components/NotFound.tsx
|
|
727
|
-
import { FlexGrowCol as FlexGrowCol2 } from "@ariestools/sdk-react/flexbox";
|
|
728
|
-
import { Typography as Typography5 } from "@mui/material";
|
|
729
|
-
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
730
|
-
var NotFound = (props) => {
|
|
731
|
-
return /* @__PURE__ */ jsxs6(FlexGrowCol2, { ...props, children: [
|
|
732
|
-
/* @__PURE__ */ jsx9(Typography5, { variant: "h2", children: "Sorry!" }),
|
|
733
|
-
/* @__PURE__ */ jsx9(
|
|
734
|
-
Typography5,
|
|
735
|
-
{
|
|
736
|
-
variant: "body2",
|
|
737
|
-
sx: { marginY: 3 },
|
|
738
|
-
children: "Can't find anything here"
|
|
739
|
-
}
|
|
740
|
-
)
|
|
741
|
-
] });
|
|
742
|
-
};
|
|
743
|
-
|
|
744
|
-
// src/components/LoadResult.tsx
|
|
745
|
-
import { Fragment as Fragment2, jsx as jsx10 } from "react/jsx-runtime";
|
|
746
|
-
function LoadResult(props) {
|
|
747
|
-
const {
|
|
748
|
-
notFound,
|
|
749
|
-
error,
|
|
750
|
-
searchResult,
|
|
751
|
-
children
|
|
752
|
-
} = props;
|
|
753
|
-
if (notFound) {
|
|
754
|
-
return /* @__PURE__ */ jsx10(NotFound, {});
|
|
755
|
-
}
|
|
756
|
-
if (error) {
|
|
757
|
-
return /* @__PURE__ */ jsx10(Fragment2, { children });
|
|
758
|
-
}
|
|
759
|
-
return searchResult === void 0 ? /* @__PURE__ */ jsx10(
|
|
760
|
-
FlexGrowRow2,
|
|
761
|
-
{
|
|
762
|
-
busy: true,
|
|
763
|
-
sx: { minHeight: "50px" }
|
|
764
|
-
}
|
|
765
|
-
) : /* @__PURE__ */ jsx10(Fragment2, { children });
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
// src/components/Pipe.tsx
|
|
769
|
-
import { Typography as Typography6 } from "@mui/material";
|
|
770
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
771
|
-
var Pipe = (props) => {
|
|
772
|
-
return /* @__PURE__ */ jsx11(
|
|
773
|
-
Typography6,
|
|
774
|
-
{
|
|
775
|
-
component: "span",
|
|
776
|
-
...props,
|
|
777
|
-
sx: [{ marginX: 1 }, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
|
|
778
|
-
children: "|"
|
|
779
|
-
}
|
|
780
|
-
);
|
|
781
|
-
};
|
|
782
|
-
|
|
783
|
-
// src/components/pluginValidation/DataMissing.tsx
|
|
784
|
-
import { Alert, AlertTitle } from "@mui/material";
|
|
785
|
-
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
786
|
-
var PayloadDataMissing = ({ alertBody, ...props }) => {
|
|
787
|
-
return /* @__PURE__ */ jsxs7(Alert, { severity: "warning", ...props, children: [
|
|
788
|
-
/* @__PURE__ */ jsx12(AlertTitle, { children: "Missing Data" }),
|
|
789
|
-
alertBody ?? "Payload is missing required data to render correctly"
|
|
790
|
-
] });
|
|
791
|
-
};
|
|
792
|
-
|
|
793
|
-
// src/components/ScrollTableOnSm.tsx
|
|
794
|
-
import { styled as styled2 } from "@mui/material";
|
|
795
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
796
|
-
var StyledScrollTableOnSm = styled2("div")(({ theme }) => ({
|
|
797
|
-
[theme.breakpoints.down("md")]: { overflowX: "scroll" },
|
|
798
|
-
display: "flex",
|
|
799
|
-
flexGrow: 1
|
|
800
|
-
}));
|
|
801
|
-
var ScrollTableOnSm = ({ children }) => /* @__PURE__ */ jsx13(StyledScrollTableOnSm, { children });
|
|
802
|
-
|
|
803
|
-
// src/components/SectionSpacingRow/SectionSpacingRow.tsx
|
|
804
|
-
import { FlexGrowRow as FlexGrowRow3 } from "@ariestools/sdk-react/flexbox";
|
|
805
|
-
import { useTheme } from "@mui/material";
|
|
806
|
-
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
807
|
-
var SectionSpacingRow = ({
|
|
808
|
-
ref,
|
|
809
|
-
children,
|
|
810
|
-
sx,
|
|
811
|
-
...props
|
|
812
|
-
}) => {
|
|
813
|
-
const theme = useTheme();
|
|
814
|
-
return /* @__PURE__ */ jsx14(
|
|
815
|
-
FlexGrowRow3,
|
|
816
|
-
{
|
|
817
|
-
ref,
|
|
818
|
-
...props,
|
|
819
|
-
sx: [{
|
|
820
|
-
width: "100%",
|
|
821
|
-
paddingBottom: { md: theme.spacing(5), xs: theme.spacing(5) },
|
|
822
|
-
paddingTop: { md: theme.spacing(5), xs: theme.spacing(5) }
|
|
823
|
-
}, ...Array.isArray(sx) ? sx : [sx]],
|
|
824
|
-
children
|
|
825
|
-
}
|
|
826
|
-
);
|
|
827
|
-
};
|
|
828
|
-
SectionSpacingRow.displayName = "SectionSpacingRow";
|
|
829
|
-
|
|
830
|
-
// src/components/TableCell/EllipsisTableCell.tsx
|
|
831
|
-
import { asLinkHrefOrToProps, LinkEx as LinkEx2 } from "@ariestools/sdk-react/link";
|
|
832
|
-
import { styled as styled3, TableCell } from "@mui/material";
|
|
833
|
-
import { useMemo as useMemo3 } from "react";
|
|
834
|
-
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
835
|
-
var EllipsisTableCellRoot = styled3(TableCell, {
|
|
836
|
-
name: "EllipsisTableCell",
|
|
837
|
-
shouldForwardProp: (prop) => prop !== "width",
|
|
838
|
-
slot: "Root"
|
|
839
|
-
})(({ width = "100%" }) => ({ width }));
|
|
840
|
-
var EllipsisTableCellWithRef = ({
|
|
841
|
-
ref,
|
|
842
|
-
children,
|
|
843
|
-
href,
|
|
844
|
-
link = false,
|
|
845
|
-
to,
|
|
846
|
-
value,
|
|
847
|
-
...props
|
|
848
|
-
}) => {
|
|
849
|
-
const data = useMemo3(() => {
|
|
850
|
-
if (children) {
|
|
851
|
-
return children;
|
|
852
|
-
}
|
|
853
|
-
if (href || link || to) {
|
|
854
|
-
return /* @__PURE__ */ jsx15(LinkEx2, { title: value, ...asLinkHrefOrToProps({ to, href }), target: href ? "_blank" : void 0, children: value });
|
|
855
|
-
}
|
|
856
|
-
return value;
|
|
857
|
-
}, [children, href, link, to, value]);
|
|
858
|
-
return /* @__PURE__ */ jsx15(EllipsisTableCellRoot, { ...props, children: /* @__PURE__ */ jsx15(
|
|
859
|
-
EllipsizeBox,
|
|
860
|
-
{
|
|
861
|
-
ref,
|
|
862
|
-
sx: { cursor: link || to || href ? "pointer" : "inherit" },
|
|
863
|
-
children: data
|
|
864
|
-
}
|
|
865
|
-
) });
|
|
866
|
-
};
|
|
867
|
-
EllipsisTableCellWithRef.displayName = "EllipsisTableCell";
|
|
868
|
-
var EllipsisTableCell = EllipsisTableCellWithRef;
|
|
869
|
-
|
|
870
|
-
// src/components/TableCell/AddressTableCell.tsx
|
|
871
|
-
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
872
|
-
var AddressTableCell = ({
|
|
873
|
-
ref,
|
|
874
|
-
value,
|
|
875
|
-
archive,
|
|
876
|
-
exploreDomain,
|
|
877
|
-
link,
|
|
878
|
-
...props
|
|
879
|
-
}) => {
|
|
880
|
-
const href = exploreDomain && archive ? `${exploreDomain}/archive/${archive}/address/${value}` : void 0;
|
|
881
|
-
const to = exploreDomain === void 0 && archive ? `/archive/${archive}/address/${value}` : void 0;
|
|
882
|
-
return /* @__PURE__ */ jsx16(EllipsisTableCell, { value, href, to, ref, link, ...props });
|
|
883
|
-
};
|
|
884
|
-
AddressTableCell.displayName = "AddressTableCell";
|
|
885
|
-
|
|
886
|
-
// src/components/TableCell/HashTableCell.tsx
|
|
887
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
888
|
-
var HashTableCell = ({
|
|
889
|
-
ref,
|
|
890
|
-
value,
|
|
891
|
-
dataType,
|
|
892
|
-
...props
|
|
893
|
-
}) => {
|
|
894
|
-
return /* @__PURE__ */ jsx17(
|
|
895
|
-
EllipsisTableCell,
|
|
896
|
-
{
|
|
897
|
-
value,
|
|
898
|
-
...props
|
|
899
|
-
}
|
|
900
|
-
);
|
|
901
|
-
};
|
|
902
|
-
|
|
903
|
-
// src/components/ThemeTokenAvatar/ThemeTokenAvatar.tsx
|
|
904
|
-
import { Avatar as Avatar2, useTheme as useTheme2 } from "@mui/material";
|
|
905
|
-
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
906
|
-
var ThemeTokenAvatar = ({ ...props }) => {
|
|
907
|
-
const theme = useTheme2();
|
|
908
|
-
return /* @__PURE__ */ jsx18(Avatar2, { sx: { background: theme.vars.palette.common.white }, ...props });
|
|
909
|
-
};
|
|
910
|
-
|
|
911
|
-
// src/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.tsx
|
|
912
|
-
import { AvatarGroup } from "@mui/material";
|
|
913
|
-
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
914
|
-
var ThemeTokenAvatarGroup = ({ images, ...props }) => {
|
|
915
|
-
return /* @__PURE__ */ jsx19(AvatarGroup, { ...props, children: images?.map((image) => /* @__PURE__ */ jsx19(ThemeTokenAvatar, { src: image }, image)) });
|
|
916
|
-
};
|
|
917
|
-
|
|
918
|
-
// src/components/TokenBar/TokenBar.tsx
|
|
919
|
-
import { FlexRow } from "@ariestools/sdk-react/flexbox";
|
|
920
|
-
import { Paper, Typography as Typography7 } from "@mui/material";
|
|
921
|
-
import { jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
922
|
-
var TokenBar = ({
|
|
923
|
-
text1,
|
|
924
|
-
text1Props,
|
|
925
|
-
text1Suffix,
|
|
926
|
-
text2,
|
|
927
|
-
text2Props,
|
|
928
|
-
text2Suffix,
|
|
929
|
-
...props
|
|
930
|
-
}) => {
|
|
931
|
-
return /* @__PURE__ */ jsx20(Paper, { elevation: 0, className: "TokenBar-root", ...props, children: /* @__PURE__ */ jsxs8(FlexRow, { sx: { justifyContent: "space-between" }, children: [
|
|
932
|
-
/* @__PURE__ */ jsxs8(
|
|
933
|
-
Typography7,
|
|
934
|
-
{
|
|
935
|
-
variant: "body1",
|
|
936
|
-
...text1Props,
|
|
937
|
-
sx: [{
|
|
938
|
-
fontWeight: 300,
|
|
939
|
-
margin: 1
|
|
940
|
-
}, ...Array.isArray(text1Props?.sx) ? text1Props.sx : [text1Props?.sx]],
|
|
941
|
-
children: [
|
|
942
|
-
text1,
|
|
943
|
-
text1Suffix
|
|
944
|
-
]
|
|
945
|
-
}
|
|
946
|
-
),
|
|
947
|
-
/* @__PURE__ */ jsxs8(
|
|
948
|
-
Typography7,
|
|
949
|
-
{
|
|
950
|
-
variant: "body1",
|
|
951
|
-
color: "gray",
|
|
952
|
-
...text2Props,
|
|
953
|
-
sx: [{
|
|
954
|
-
fontWeight: 300,
|
|
955
|
-
textTransform: "uppercase",
|
|
956
|
-
margin: 1
|
|
957
|
-
}, ...Array.isArray(text2Props?.sx) ? text2Props.sx : [text2Props?.sx]],
|
|
958
|
-
children: [
|
|
959
|
-
text2,
|
|
960
|
-
text2Suffix
|
|
961
|
-
]
|
|
962
|
-
}
|
|
963
|
-
)
|
|
964
|
-
] }) });
|
|
965
|
-
};
|
|
966
|
-
|
|
967
|
-
// src/components/TokenData/img/index.ts
|
|
968
|
-
import { default as default2 } from "./ada-JCPSRXND.png";
|
|
969
|
-
import { default as default3 } from "./btc-SRW7TEQV.png";
|
|
970
|
-
import { default as default4 } from "./busd-RAN4SWCI.png";
|
|
971
|
-
import { default as default5 } from "./dai-FZSM2RYY.png";
|
|
972
|
-
import { default as default6 } from "./dogecoin-QOIF7Q5M.png";
|
|
973
|
-
import { default as default7 } from "./dot-P5Z7IW2O.png";
|
|
974
|
-
import { default as default8 } from "./ethereum-3SLTXYTT.png";
|
|
975
|
-
import { default as default9 } from "./frax-TQDXCCOP.png";
|
|
976
|
-
import { default as default10 } from "./link-THYNVLXG.png";
|
|
977
|
-
import { default as default11 } from "./sol-A4J5S4EN.png";
|
|
978
|
-
import { default as default12 } from "./tether-3X63FB23.png";
|
|
979
|
-
import { default as default13 } from "./usd-coin-UCS44T5B.png";
|
|
980
|
-
import { default as default14 } from "./weth-HDGYDSJB.png";
|
|
981
|
-
import { default as default15 } from "./wrapped-bitcoin-TS5QFJLK.png";
|
|
982
|
-
import { default as default16 } from "./xl1-SFZAOI5T.png";
|
|
983
|
-
import { default as default17 } from "./xyo-RLMLL56X.png";
|
|
984
|
-
|
|
985
|
-
// src/components/TokenData/TokenData.ts
|
|
986
|
-
var TokenData = [
|
|
987
|
-
{
|
|
988
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/multi-collateral-dai/",
|
|
989
|
-
etherscanLink: "https://etherscan.io/token/0x6b175474e89094c44da98b954eedeac495271d0f",
|
|
990
|
-
icon: default5,
|
|
991
|
-
readableName: "Dai",
|
|
992
|
-
tokenSymbol: "dai",
|
|
993
|
-
uniqueTokenId: "dai"
|
|
994
|
-
},
|
|
995
|
-
{
|
|
996
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/weth/",
|
|
997
|
-
etherscanLink: "https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
|
998
|
-
icon: default14,
|
|
999
|
-
readableName: "Weth",
|
|
1000
|
-
tokenSymbol: "weth",
|
|
1001
|
-
uniqueTokenId: "weth"
|
|
1002
|
-
},
|
|
1003
|
-
{
|
|
1004
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/ethereum/",
|
|
1005
|
-
etherscanLink: "n/a",
|
|
1006
|
-
icon: default8,
|
|
1007
|
-
readableName: "Ethereum",
|
|
1008
|
-
tokenSymbol: "eth",
|
|
1009
|
-
uniqueTokenId: "ethereum"
|
|
1010
|
-
},
|
|
1011
|
-
{
|
|
1012
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/bitcoin/",
|
|
1013
|
-
etherscanLink: "n/a",
|
|
1014
|
-
icon: default3,
|
|
1015
|
-
readableName: "Bitcoin",
|
|
1016
|
-
tokenSymbol: "btc",
|
|
1017
|
-
uniqueTokenId: "btc"
|
|
1018
|
-
},
|
|
1019
|
-
{
|
|
1020
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/xl1/",
|
|
1021
|
-
etherscanLink: "https://etherscan.io/token/0xf72ae3e0da743033abd7a407557d684c1ae66aed",
|
|
1022
|
-
icon: default16,
|
|
1023
|
-
readableName: "XL1",
|
|
1024
|
-
tokenSymbol: "xl1",
|
|
1025
|
-
uniqueTokenId: "xl1"
|
|
1026
|
-
},
|
|
1027
|
-
{
|
|
1028
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/xyo/",
|
|
1029
|
-
etherscanLink: "https://etherscan.io/token/0x55296f69f40ea6d20e478533c15a6b08b654e758",
|
|
1030
|
-
icon: default17,
|
|
1031
|
-
readableName: "XYO",
|
|
1032
|
-
tokenSymbol: "xyo",
|
|
1033
|
-
uniqueTokenId: "xyo"
|
|
1034
|
-
},
|
|
1035
|
-
{
|
|
1036
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/frax/",
|
|
1037
|
-
etherscanLink: "https://etherscan.io/token/0x853d955acef822db058eb8505911ed77f175b99e",
|
|
1038
|
-
icon: default9,
|
|
1039
|
-
readableName: "Frax",
|
|
1040
|
-
tokenSymbol: "frax",
|
|
1041
|
-
uniqueTokenId: "frax"
|
|
1042
|
-
},
|
|
1043
|
-
{
|
|
1044
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/wrapped-bitcoin/",
|
|
1045
|
-
etherscanLink: "https://etherscan.io/token/0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
|
|
1046
|
-
icon: default15,
|
|
1047
|
-
readableName: "Wrapped BTC",
|
|
1048
|
-
tokenSymbol: "wbtc",
|
|
1049
|
-
uniqueTokenId: "wbtc"
|
|
1050
|
-
},
|
|
1051
|
-
{
|
|
1052
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/usd-coin/",
|
|
1053
|
-
etherscanLink: "https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
1054
|
-
icon: default13,
|
|
1055
|
-
readableName: "USDC",
|
|
1056
|
-
tokenSymbol: "usdc",
|
|
1057
|
-
uniqueTokenId: "usdc"
|
|
1058
|
-
},
|
|
1059
|
-
{
|
|
1060
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/tether/",
|
|
1061
|
-
etherscanLink: "https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7",
|
|
1062
|
-
icon: default12,
|
|
1063
|
-
readableName: "Tether",
|
|
1064
|
-
tokenSymbol: "usdt",
|
|
1065
|
-
uniqueTokenId: "usdt"
|
|
1066
|
-
},
|
|
1067
|
-
{
|
|
1068
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/cardano/",
|
|
1069
|
-
etherscanLink: "https://etherscan.io/token/0xc14777c94229582e5758c5a79b83dde876b9be98",
|
|
1070
|
-
icon: default2,
|
|
1071
|
-
readableName: "Cardano",
|
|
1072
|
-
tokenSymbol: "ada",
|
|
1073
|
-
uniqueTokenId: "ada"
|
|
1074
|
-
},
|
|
1075
|
-
{
|
|
1076
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/binance-usd/",
|
|
1077
|
-
etherscanLink: "https://etherscan.io/token/0x4Fabb145d64652a948d72533023f6E7A623C7C53",
|
|
1078
|
-
icon: default4,
|
|
1079
|
-
readableName: "Binance USD",
|
|
1080
|
-
tokenSymbol: "busd",
|
|
1081
|
-
uniqueTokenId: "busd"
|
|
1082
|
-
},
|
|
1083
|
-
{
|
|
1084
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/dogecoin/",
|
|
1085
|
-
etherscanLink: "https://etherscan.io/token/0x7618b5024a6349f9aef10ddfd33e3428c734551e",
|
|
1086
|
-
icon: default6,
|
|
1087
|
-
readableName: "Dogecoin",
|
|
1088
|
-
tokenSymbol: "doge",
|
|
1089
|
-
uniqueTokenId: "doge"
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/polkadot-new/",
|
|
1093
|
-
etherscanLink: "https://etherscan.io/token/0x2d4fb6dd969992c881d8e534c747cc925d5ba221",
|
|
1094
|
-
icon: default7,
|
|
1095
|
-
readableName: "Polkadot",
|
|
1096
|
-
tokenSymbol: "dot",
|
|
1097
|
-
uniqueTokenId: "dot"
|
|
1098
|
-
},
|
|
1099
|
-
{
|
|
1100
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/chainlink/",
|
|
1101
|
-
etherscanLink: "https://etherscan.io/token/0x514910771af9ca656af840dff83e8264ecf986ca",
|
|
1102
|
-
icon: default10,
|
|
1103
|
-
readableName: "ChainLink",
|
|
1104
|
-
tokenSymbol: "link",
|
|
1105
|
-
uniqueTokenId: "link"
|
|
1106
|
-
},
|
|
1107
|
-
{
|
|
1108
|
-
coinmarketcapLink: "https://coinmarketcap.com/currencies/solana/",
|
|
1109
|
-
etherscanLink: "https://etherscan.io/token/0x1f54638b7737193ffd86c19ec51907a7c41755d8",
|
|
1110
|
-
icon: default11,
|
|
1111
|
-
readableName: "Solana",
|
|
1112
|
-
tokenSymbol: "sol",
|
|
1113
|
-
uniqueTokenId: "sol"
|
|
1114
|
-
}
|
|
1115
|
-
];
|
|
1116
|
-
|
|
1117
|
-
// src/components/TokenData/useGetTokenData.tsx
|
|
1118
|
-
var getTokenData = (symbols) => {
|
|
1119
|
-
return symbols?.map((symbol) => {
|
|
1120
|
-
const additionalTokenData = TokenData.find((x) => x.tokenSymbol.toLowerCase() === symbol?.toLowerCase());
|
|
1121
|
-
const checkedTokenData = additionalTokenData ?? {
|
|
1122
|
-
coinmarketcapLink: "",
|
|
1123
|
-
etherscanLink: "",
|
|
1124
|
-
icon: "",
|
|
1125
|
-
readableName: "Unknown Token",
|
|
1126
|
-
tokenSymbol: "unknown",
|
|
1127
|
-
uniqueTokenId: "unknown"
|
|
1128
|
-
};
|
|
1129
|
-
return checkedTokenData;
|
|
1130
|
-
});
|
|
1131
|
-
};
|
|
1132
|
-
|
|
1133
|
-
// src/components/TokenSummary/TokenSummary.tsx
|
|
1134
|
-
import { CardHeader, Typography as Typography8 } from "@mui/material";
|
|
1135
|
-
import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1136
|
-
var TokenSummary = ({
|
|
1137
|
-
icon,
|
|
1138
|
-
symbol,
|
|
1139
|
-
symbolElement,
|
|
1140
|
-
children,
|
|
1141
|
-
...props
|
|
1142
|
-
}) => {
|
|
1143
|
-
return /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
1144
|
-
/* @__PURE__ */ jsx21(
|
|
1145
|
-
CardHeader,
|
|
1146
|
-
{
|
|
1147
|
-
avatar: /* @__PURE__ */ jsx21(ThemeTokenAvatar, { src: icon, alt: symbol }),
|
|
1148
|
-
title: /* @__PURE__ */ jsx21(
|
|
1149
|
-
Typography8,
|
|
1150
|
-
{
|
|
1151
|
-
variant: "h6",
|
|
1152
|
-
sx: {
|
|
1153
|
-
fontWeight: 300,
|
|
1154
|
-
textTransform: "uppercase"
|
|
1155
|
-
},
|
|
1156
|
-
children: symbolElement ?? symbol
|
|
1157
|
-
}
|
|
1158
|
-
),
|
|
1159
|
-
...props
|
|
1160
|
-
}
|
|
1161
|
-
),
|
|
1162
|
-
children
|
|
1163
|
-
] });
|
|
1164
|
-
};
|
|
1165
|
-
|
|
1166
|
-
// src/components/TypographyEx.tsx
|
|
1167
|
-
import { Typography as Typography9 } from "@mui/material";
|
|
1168
|
-
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1169
|
-
var TypographyEx = ({ gradient, ...props }) => {
|
|
1170
|
-
const styles = useGradientStyles();
|
|
1171
|
-
return /* @__PURE__ */ jsx22(Typography9, { style: gradient === "text" ? styles.heading : void 0, ...props });
|
|
1172
|
-
};
|
|
1173
|
-
|
|
1174
|
-
// src/contexts/diviner/Context.ts
|
|
1175
|
-
import { createContextEx } from "@ariestools/sdk-react/shared";
|
|
1176
|
-
var ResolvedDivinerContext = () => createContextEx();
|
|
1177
|
-
|
|
1178
|
-
// src/contexts/diviner/Provider.tsx
|
|
1179
|
-
import { useResetState } from "@ariestools/sdk-react/hooks";
|
|
1180
|
-
import { useMemo as useMemo4 } from "react";
|
|
1181
|
-
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1182
|
-
var ResolvedDivinerProvider = ({
|
|
1183
|
-
diviner: divinerProp,
|
|
1184
|
-
required = false,
|
|
1185
|
-
children,
|
|
1186
|
-
context: Context
|
|
1187
|
-
}) => {
|
|
1188
|
-
const [diviner, setDiviner] = useResetState(divinerProp);
|
|
1189
|
-
const value = useMemo4(() => {
|
|
1190
|
-
const resolveDiviner = () => {
|
|
1191
|
-
if (divinerProp) {
|
|
1192
|
-
return diviner === divinerProp ? diviner : void 0;
|
|
1193
|
-
} else {
|
|
1194
|
-
return diviner;
|
|
1195
|
-
}
|
|
1196
|
-
};
|
|
1197
|
-
return {
|
|
1198
|
-
diviner: resolveDiviner(),
|
|
1199
|
-
provided: true,
|
|
1200
|
-
setDiviner
|
|
1201
|
-
};
|
|
1202
|
-
}, [setDiviner, divinerProp, diviner]);
|
|
1203
|
-
return /* @__PURE__ */ jsx23(
|
|
1204
|
-
Context,
|
|
1205
|
-
{
|
|
1206
|
-
value,
|
|
1207
|
-
children: diviner ? children : required ? null : children
|
|
1208
|
-
}
|
|
1209
|
-
);
|
|
1210
|
-
};
|
|
1211
|
-
|
|
1212
|
-
// src/contexts/ListMode/Context.ts
|
|
1213
|
-
import { createContextEx as createContextEx2 } from "@ariestools/sdk-react/shared";
|
|
1214
|
-
var ListModeContext = createContextEx2();
|
|
1215
|
-
|
|
1216
|
-
// src/contexts/ListMode/Provider.tsx
|
|
1217
|
-
import { useMemo as useMemo5, useState as useState4 } from "react";
|
|
1218
|
-
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1219
|
-
var ListModeProvider = ({ children, defaultListMode }) => {
|
|
1220
|
-
const [listMode, setListMode] = useState4(defaultListMode ?? "default");
|
|
1221
|
-
const value = useMemo5(() => ({
|
|
1222
|
-
listMode,
|
|
1223
|
-
provided: true,
|
|
1224
|
-
setListMode
|
|
1225
|
-
}), [
|
|
1226
|
-
listMode,
|
|
1227
|
-
setListMode
|
|
1228
|
-
]);
|
|
1229
|
-
return /* @__PURE__ */ jsx24(
|
|
1230
|
-
ListModeContext,
|
|
1231
|
-
{
|
|
1232
|
-
value,
|
|
1233
|
-
children
|
|
1234
|
-
}
|
|
1235
|
-
);
|
|
1236
|
-
};
|
|
1237
|
-
|
|
1238
|
-
// src/contexts/ListMode/use.ts
|
|
1239
|
-
import { useContextEx } from "@ariestools/sdk-react/shared";
|
|
1240
|
-
var useListMode = (required = false) => {
|
|
1241
|
-
return useContextEx(ListModeContext, "ListMode", required);
|
|
1242
|
-
};
|
|
1243
|
-
|
|
1244
|
-
// src/lib/assertDefinedEx.ts
|
|
1245
|
-
var assertDefinedEx = (expr, message) => {
|
|
1246
|
-
if (expr !== null && expr !== void 0) return expr;
|
|
1247
|
-
throw new Error(message);
|
|
1248
|
-
};
|
|
1249
|
-
|
|
1250
|
-
// src/lib/getActualPaddingX.ts
|
|
1251
|
-
var parseMeausureString = (measure, absolute) => {
|
|
1252
|
-
if (measure !== void 0 && measure !== null && measure.length > 0) {
|
|
1253
|
-
if (measure.endsWith("px")) {
|
|
1254
|
-
return Number.parseFloat(measure.slice(0, Math.max(0, measure.length - 2)));
|
|
1255
|
-
} else if (measure.endsWith("%")) {
|
|
1256
|
-
if (absolute !== void 0) {
|
|
1257
|
-
return Number.parseFloat(measure.slice(0, Math.max(0, measure.length - 1))) / 100 * absolute;
|
|
1258
|
-
}
|
|
1259
|
-
throw new Error("Error Parsing Measure [missing absolute]");
|
|
1260
|
-
} else if (measure.endsWith("vw")) {
|
|
1261
|
-
return Number.parseFloat(measure.slice(0, Math.max(0, measure.length - 2))) / 100 * window.innerWidth;
|
|
1262
|
-
} else if (measure.endsWith("vh")) {
|
|
1263
|
-
return Number.parseFloat(measure.slice(0, Math.max(0, measure.length - 2))) / 100 * window.innerHeight;
|
|
1264
|
-
}
|
|
1265
|
-
throw new Error(`Error Parsing Measure [${measure}]`);
|
|
1266
|
-
}
|
|
1267
|
-
};
|
|
1268
|
-
var parsePadding = (padding) => {
|
|
1269
|
-
const parts = padding.split(" ");
|
|
1270
|
-
switch (parts.length) {
|
|
1271
|
-
case 4: {
|
|
1272
|
-
return {
|
|
1273
|
-
bottom: parts[2],
|
|
1274
|
-
left: parts[3],
|
|
1275
|
-
right: parts[1],
|
|
1276
|
-
top: parts[0]
|
|
1277
|
-
};
|
|
1278
|
-
}
|
|
1279
|
-
case 3: {
|
|
1280
|
-
return {
|
|
1281
|
-
bottom: parts[2],
|
|
1282
|
-
right: parts[1],
|
|
1283
|
-
top: parts[0]
|
|
1284
|
-
};
|
|
1285
|
-
}
|
|
1286
|
-
case 2: {
|
|
1287
|
-
return {
|
|
1288
|
-
bottom: parts[0],
|
|
1289
|
-
left: parts[1],
|
|
1290
|
-
right: parts[1],
|
|
1291
|
-
top: parts[0]
|
|
1292
|
-
};
|
|
1293
|
-
}
|
|
1294
|
-
case 1: {
|
|
1295
|
-
return {
|
|
1296
|
-
bottom: parts[0],
|
|
1297
|
-
left: parts[0],
|
|
1298
|
-
right: parts[0],
|
|
1299
|
-
top: parts[0]
|
|
1300
|
-
};
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
};
|
|
1304
|
-
var getActualPaddingX = (element) => {
|
|
1305
|
-
const padding = parsePadding(globalThis.getComputedStyle(element, null).getPropertyValue("padding"));
|
|
1306
|
-
const paddingLeft = parseMeausureString(globalThis.getComputedStyle(element, null).getPropertyValue("padding-left") ?? padding?.left, element.clientWidth) ?? 0;
|
|
1307
|
-
const paddingRight = parseMeausureString(globalThis.getComputedStyle(element, null).getPropertyValue("padding-right") ?? padding?.right, element.clientWidth) ?? 0;
|
|
1308
|
-
return paddingLeft + paddingRight;
|
|
1309
|
-
};
|
|
1310
|
-
|
|
1311
|
-
// src/lib/networkComponents.tsx
|
|
1312
|
-
import {
|
|
1313
|
-
BubbleChartRounded as BubbleChartRoundedIcon,
|
|
1314
|
-
HubRounded as HubRoundedIcon,
|
|
1315
|
-
InsertLinkRounded as InsertLinkRoundedIcon,
|
|
1316
|
-
Inventory2Rounded as Inventory2RoundedIcon,
|
|
1317
|
-
TimerRounded as TimerRoundedIcon,
|
|
1318
|
-
VisibilityRounded as VisibilityRoundedIcon
|
|
1319
|
-
} from "@mui/icons-material";
|
|
1320
|
-
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1321
|
-
var networkComponents = [
|
|
1322
|
-
{
|
|
1323
|
-
icon: (props) => /* @__PURE__ */ jsx25(HubRoundedIcon, { ...props }),
|
|
1324
|
-
name: "Node",
|
|
1325
|
-
slug: "node"
|
|
1326
|
-
},
|
|
1327
|
-
{
|
|
1328
|
-
icon: (props) => /* @__PURE__ */ jsx25(TimerRoundedIcon, { ...props }),
|
|
1329
|
-
name: "Sentinel",
|
|
1330
|
-
slug: "sentinel"
|
|
1331
|
-
},
|
|
1332
|
-
{
|
|
1333
|
-
icon: (props) => /* @__PURE__ */ jsx25(InsertLinkRoundedIcon, { ...props }),
|
|
1334
|
-
name: "Bridge",
|
|
1335
|
-
slug: "bridge"
|
|
1336
|
-
},
|
|
1337
|
-
{
|
|
1338
|
-
icon: (props) => /* @__PURE__ */ jsx25(Inventory2RoundedIcon, { ...props }),
|
|
1339
|
-
name: "Archivist",
|
|
1340
|
-
slug: "archivist"
|
|
1341
|
-
},
|
|
1342
|
-
{
|
|
1343
|
-
icon: (props) => /* @__PURE__ */ jsx25(BubbleChartRoundedIcon, { ...props }),
|
|
1344
|
-
name: "Diviner",
|
|
1345
|
-
slug: "diviner"
|
|
1346
|
-
},
|
|
1347
|
-
{
|
|
1348
|
-
icon: (props) => /* @__PURE__ */ jsx25(VisibilityRoundedIcon, { ...props }),
|
|
1349
|
-
name: "Witness",
|
|
1350
|
-
slug: "witness"
|
|
1351
|
-
}
|
|
1352
|
-
];
|
|
1353
|
-
var findNetworkComponentIndex = (slug) => {
|
|
1354
|
-
return networkComponents.findIndex((info) => info.slug === slug);
|
|
1355
|
-
};
|
|
1356
|
-
var findNetworkComponent = (slug) => {
|
|
1357
|
-
return networkComponents.find((info) => info.slug === slug);
|
|
1358
|
-
};
|
|
1359
|
-
export {
|
|
1360
|
-
AddressTableCell,
|
|
1361
|
-
Ampersand,
|
|
1362
|
-
BasicHero,
|
|
1363
|
-
BigIntInput,
|
|
1364
|
-
BigIntTextField,
|
|
1365
|
-
EllipsisTableCell,
|
|
1366
|
-
EllipsisTableCellWithRef,
|
|
1367
|
-
EllipsizeBox,
|
|
1368
|
-
FixedPointInputAdornment,
|
|
1369
|
-
FixedPointPopover,
|
|
1370
|
-
HashTableCell,
|
|
1371
|
-
LabeledTextFieldWrapper,
|
|
1372
|
-
ListItemButtonEx,
|
|
1373
|
-
ListItemButtonExTo,
|
|
1374
|
-
ListModeContext,
|
|
1375
|
-
ListModeProvider,
|
|
1376
|
-
LoadResult,
|
|
1377
|
-
NotFound,
|
|
1378
|
-
PayloadDataMissing,
|
|
1379
|
-
Pipe,
|
|
1380
|
-
ResolvedDivinerContext,
|
|
1381
|
-
ResolvedDivinerProvider,
|
|
1382
|
-
ScrollTableOnSm,
|
|
1383
|
-
SectionSpacingRow,
|
|
1384
|
-
ThemeTokenAvatar,
|
|
1385
|
-
ThemeTokenAvatarGroup,
|
|
1386
|
-
TokenBar,
|
|
1387
|
-
TokenData,
|
|
1388
|
-
TokenSummary,
|
|
1389
|
-
TypographyEx,
|
|
1390
|
-
WithFormControl,
|
|
1391
|
-
assertDefinedEx,
|
|
1392
|
-
colorfulGradientDarkMode,
|
|
1393
|
-
colorfulGradientLightMode,
|
|
1394
|
-
findNetworkComponent,
|
|
1395
|
-
findNetworkComponentIndex,
|
|
1396
|
-
formatBigIntInput,
|
|
1397
|
-
getActualPaddingX,
|
|
1398
|
-
getTokenData,
|
|
1399
|
-
networkComponents,
|
|
1400
|
-
parseMeausureString,
|
|
1401
|
-
parsePadding,
|
|
1402
|
-
useDataState,
|
|
1403
|
-
useGradientStyles,
|
|
1404
|
-
useListMode,
|
|
1405
|
-
useMediaQuery,
|
|
1406
|
-
usePayloadDataHash,
|
|
1407
|
-
usePayloadHash,
|
|
1408
|
-
usePayloadHashes,
|
|
1409
|
-
usePayloadRootHash,
|
|
1410
|
-
usePayloadValidate,
|
|
1411
|
-
useShareForwardedRef,
|
|
1412
|
-
useValidateBoundWitness
|
|
1413
|
-
};
|
|
1
|
+
// src/index.ts
|
|
2
|
+
export * from "@xyo-network/react-sdk/shared";
|
|
1414
3
|
//# sourceMappingURL=index.mjs.map
|