@xyo-network/react-shared 7.4.2 → 7.5.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.
- package/dist/browser/components/BasicHero/BasicHero.stories.d.ts +2 -2
- package/dist/browser/components/BasicHero/BasicHero.stories.d.ts.map +1 -1
- package/dist/browser/components/LoadResult.stories.d.ts +4 -4
- package/dist/browser/components/SectionSpacingRow/SectionSpacingRow.stories.d.ts +1 -1
- package/dist/browser/components/SectionSpacingRow/SectionSpacingRow.stories.d.ts.map +1 -1
- package/dist/browser/components/StyleGuide/StyleGuide.stories.d.ts +1 -1
- package/dist/browser/components/StyleGuide/StyleGuide.stories.d.ts.map +1 -1
- package/dist/browser/components/TableCell/EllipsizeTableCell.stories.d.ts +3 -3
- package/dist/browser/components/TableCell/EllipsizeTableCell.stories.d.ts.map +1 -1
- package/dist/browser/components/TableCell/HashTableCell.d.ts +1 -1
- package/dist/browser/components/TableCell/HashTableCell.d.ts.map +1 -1
- package/dist/browser/components/ThemeTokenAvatar/ThemeTokenAvatar.stories.d.ts +1 -1
- package/dist/browser/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.stories.d.ts +1 -1
- package/dist/browser/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.stories.d.ts.map +1 -1
- package/dist/browser/components/TokenBar/TokenBar.stories.d.ts +2 -2
- package/dist/browser/components/TokenBar/TokenBar.stories.d.ts.map +1 -1
- package/dist/browser/components/TokenSummary/TokenSummary.stories.d.ts +2 -2
- package/dist/browser/components/TokenSummary/TokenSummary.stories.d.ts.map +1 -1
- package/dist/browser/components/bigint/Input.stories.d.ts +5 -5
- package/dist/browser/components/bigint/Input.stories.d.ts.map +1 -1
- package/dist/browser/components/bigint/TextField.d.ts.map +1 -1
- package/dist/browser/hooks/GradientStyles/GradientStyle.stories.d.ts +1 -1
- package/dist/browser/hooks/GradientStyles/GradientStyle.stories.d.ts.map +1 -1
- package/dist/browser/hooks/payload/usePayloadHash.d.ts +4 -5
- package/dist/browser/hooks/payload/usePayloadHash.d.ts.map +1 -1
- package/dist/browser/index.mjs +593 -631
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +32 -33
- package/src/components/TableCell/HashTableCell.tsx +1 -1
- package/src/components/bigint/TextField.tsx +1 -2
- package/src/hooks/payload/useBoundWitnessValidate.tsx +1 -1
- package/src/hooks/payload/usePayloadHash.tsx +1 -1
- package/src/hooks/payload/usePayloadValidate.tsx +1 -1
package/dist/browser/index.mjs
CHANGED
|
@@ -1,27 +1,32 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
1
4
|
// src/components/Ampersand.tsx
|
|
2
5
|
import { Typography } from "@mui/material";
|
|
3
|
-
import
|
|
4
|
-
var Ampersand = (props) => {
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
-
|
|
6
|
+
import React from "react";
|
|
7
|
+
var Ampersand = /* @__PURE__ */ __name((props) => {
|
|
8
|
+
return /* @__PURE__ */ React.createElement(Typography, {
|
|
9
|
+
marginX: 1,
|
|
10
|
+
component: "span",
|
|
11
|
+
...props
|
|
12
|
+
}, "&");
|
|
13
|
+
}, "Ampersand");
|
|
7
14
|
|
|
8
15
|
// src/components/BasicHero/BasicHero.tsx
|
|
9
|
-
import {
|
|
10
|
-
Container,
|
|
11
|
-
Grid,
|
|
12
|
-
styled,
|
|
13
|
-
Typography as Typography2
|
|
14
|
-
} from "@mui/material";
|
|
16
|
+
import { Container, Grid, styled, Typography as Typography2 } from "@mui/material";
|
|
15
17
|
import { ButtonEx } from "@xylabs/react-button";
|
|
16
18
|
import { FlexGrowCol, FlexGrowRow } from "@xylabs/react-flexbox";
|
|
17
19
|
import { LinkEx } from "@xylabs/react-link";
|
|
18
20
|
import { useIsSmall } from "@xylabs/react-theme";
|
|
21
|
+
import React2 from "react";
|
|
19
22
|
|
|
20
23
|
// src/hooks/GradientStyles/GradientStyles.tsx
|
|
21
24
|
import { useIsDark } from "@xylabs/react-theme";
|
|
22
|
-
var colorfulGradientLightMode = () => {
|
|
25
|
+
var colorfulGradientLightMode = /* @__PURE__ */ __name(() => {
|
|
23
26
|
return {
|
|
24
|
-
background: {
|
|
27
|
+
background: {
|
|
28
|
+
backgroundImage: "-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)"
|
|
29
|
+
},
|
|
25
30
|
border: {
|
|
26
31
|
borderImage: "-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)",
|
|
27
32
|
borderImageSlice: 1,
|
|
@@ -37,10 +42,12 @@ var colorfulGradientLightMode = () => {
|
|
|
37
42
|
display: "inline-block"
|
|
38
43
|
}
|
|
39
44
|
};
|
|
40
|
-
};
|
|
41
|
-
var colorfulGradientDarkMode = () => {
|
|
45
|
+
}, "colorfulGradientLightMode");
|
|
46
|
+
var colorfulGradientDarkMode = /* @__PURE__ */ __name(() => {
|
|
42
47
|
return {
|
|
43
|
-
background: {
|
|
48
|
+
background: {
|
|
49
|
+
backgroundImage: "-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)"
|
|
50
|
+
},
|
|
44
51
|
border: {
|
|
45
52
|
borderImage: "-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)",
|
|
46
53
|
borderImageSlice: 1,
|
|
@@ -56,19 +63,19 @@ var colorfulGradientDarkMode = () => {
|
|
|
56
63
|
display: "inline-block"
|
|
57
64
|
}
|
|
58
65
|
};
|
|
59
|
-
};
|
|
60
|
-
var useGradientStyles = () => {
|
|
66
|
+
}, "colorfulGradientDarkMode");
|
|
67
|
+
var useGradientStyles = /* @__PURE__ */ __name(() => {
|
|
61
68
|
const dark = useIsDark();
|
|
62
69
|
const styles = dark ? colorfulGradientDarkMode() : colorfulGradientLightMode();
|
|
63
70
|
return styles;
|
|
64
|
-
};
|
|
71
|
+
}, "useGradientStyles");
|
|
65
72
|
|
|
66
73
|
// src/hooks/payload/useBoundWitnessValidate.tsx
|
|
67
|
-
import { assertEx } from "@xylabs/assert";
|
|
68
74
|
import { usePromise } from "@xylabs/react-promise";
|
|
75
|
+
import { assertEx } from "@xylabs/sdk-js";
|
|
69
76
|
import { BoundWitnessValidator } from "@xyo-network/boundwitness-validator";
|
|
70
77
|
import { isAnyPayload } from "@xyo-network/payload-model";
|
|
71
|
-
var useValidateBoundWitness = (input) => {
|
|
78
|
+
var useValidateBoundWitness = /* @__PURE__ */ __name((input) => {
|
|
72
79
|
const [output, validationError] = usePromise(async () => {
|
|
73
80
|
if (!input) return;
|
|
74
81
|
const object = JSON.parse(input);
|
|
@@ -78,58 +85,79 @@ var useValidateBoundWitness = (input) => {
|
|
|
78
85
|
payload: validPayload,
|
|
79
86
|
errors: errors2
|
|
80
87
|
};
|
|
81
|
-
}, [
|
|
88
|
+
}, [
|
|
89
|
+
input
|
|
90
|
+
]);
|
|
82
91
|
const { payload, errors } = output ?? {};
|
|
83
92
|
return {
|
|
84
93
|
payload,
|
|
85
|
-
errors: [
|
|
94
|
+
errors: [
|
|
95
|
+
validationError,
|
|
96
|
+
...errors ?? []
|
|
97
|
+
].filter((error) => !!error)
|
|
86
98
|
};
|
|
87
|
-
};
|
|
99
|
+
}, "useValidateBoundWitness");
|
|
88
100
|
|
|
89
101
|
// src/hooks/payload/usePayloadHash.tsx
|
|
90
102
|
import { usePromise as usePromise2 } from "@xylabs/react-promise";
|
|
91
103
|
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
92
|
-
var usePayloadHash = (payload) => {
|
|
104
|
+
var usePayloadHash = /* @__PURE__ */ __name((payload) => {
|
|
93
105
|
return usePayloadRootHash(payload);
|
|
94
|
-
};
|
|
95
|
-
var usePayloadDataHash = (payload) => {
|
|
96
|
-
return usePromise2(async () => payload ? await PayloadBuilder.dataHash(payload) : void 0, [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
}, "usePayloadHash");
|
|
107
|
+
var usePayloadDataHash = /* @__PURE__ */ __name((payload) => {
|
|
108
|
+
return usePromise2(async () => payload ? await PayloadBuilder.dataHash(payload) : void 0, [
|
|
109
|
+
payload
|
|
110
|
+
])[0];
|
|
111
|
+
}, "usePayloadDataHash");
|
|
112
|
+
var usePayloadRootHash = /* @__PURE__ */ __name((payload) => {
|
|
113
|
+
return usePromise2(async () => payload ? await PayloadBuilder.hash(payload) : void 0, [
|
|
114
|
+
payload
|
|
115
|
+
])[0];
|
|
116
|
+
}, "usePayloadRootHash");
|
|
117
|
+
var usePayloadHashes = /* @__PURE__ */ __name((payloads) => {
|
|
118
|
+
return usePromise2(async () => payloads ? await Promise.all(payloads.map(async (payload) => [
|
|
119
|
+
payload,
|
|
120
|
+
await PayloadBuilder.dataHash(payload)
|
|
121
|
+
])) : void 0, [
|
|
122
|
+
payloads
|
|
123
|
+
])[0];
|
|
124
|
+
}, "usePayloadHashes");
|
|
107
125
|
|
|
108
126
|
// src/hooks/payload/usePayloadValidate.tsx
|
|
109
|
-
import { assertEx as assertEx2 } from "@xylabs/
|
|
127
|
+
import { assertEx as assertEx2 } from "@xylabs/sdk-js";
|
|
110
128
|
import { PayloadBuilder as PayloadBuilder2 } from "@xyo-network/payload-builder";
|
|
111
129
|
import { isAnyPayload as isAnyPayload2 } from "@xyo-network/payload-model";
|
|
112
130
|
import { useMemo } from "react";
|
|
113
|
-
var usePayloadValidate = (input) => {
|
|
131
|
+
var usePayloadValidate = /* @__PURE__ */ __name((input) => {
|
|
114
132
|
return useMemo(() => {
|
|
115
133
|
if (!input) return {};
|
|
116
134
|
try {
|
|
117
135
|
const object = JSON.parse(input);
|
|
118
136
|
const validPayload = assertEx2(isAnyPayload2(object) ? object : null, () => "Invalid payload");
|
|
119
137
|
const { schema, ...fields } = validPayload;
|
|
120
|
-
const payload = new PayloadBuilder2({
|
|
121
|
-
|
|
138
|
+
const payload = new PayloadBuilder2({
|
|
139
|
+
schema
|
|
140
|
+
}).fields(fields).build();
|
|
141
|
+
return {
|
|
142
|
+
payload
|
|
143
|
+
};
|
|
122
144
|
} catch (error) {
|
|
123
|
-
return {
|
|
145
|
+
return {
|
|
146
|
+
errors: [
|
|
147
|
+
error
|
|
148
|
+
]
|
|
149
|
+
};
|
|
124
150
|
}
|
|
125
|
-
}, [
|
|
126
|
-
|
|
151
|
+
}, [
|
|
152
|
+
input
|
|
153
|
+
]);
|
|
154
|
+
}, "usePayloadValidate");
|
|
127
155
|
|
|
128
156
|
// src/hooks/useDataState.ts
|
|
129
157
|
import { useState } from "react";
|
|
130
|
-
var useDataState = (defaultValue) => {
|
|
158
|
+
var useDataState = /* @__PURE__ */ __name((defaultValue) => {
|
|
131
159
|
const [state, setState] = useState(defaultValue);
|
|
132
|
-
const setDataState = (value) => {
|
|
160
|
+
const setDataState = /* @__PURE__ */ __name((value) => {
|
|
133
161
|
try {
|
|
134
162
|
if (JSON.stringify(value) !== JSON.stringify(state)) {
|
|
135
163
|
setState(value);
|
|
@@ -137,16 +165,19 @@ var useDataState = (defaultValue) => {
|
|
|
137
165
|
} catch {
|
|
138
166
|
console.error("setDataState failed! Make sure data type is stringifiable!");
|
|
139
167
|
}
|
|
140
|
-
};
|
|
141
|
-
return [
|
|
142
|
-
|
|
168
|
+
}, "setDataState");
|
|
169
|
+
return [
|
|
170
|
+
state,
|
|
171
|
+
setDataState
|
|
172
|
+
];
|
|
173
|
+
}, "useDataState");
|
|
143
174
|
|
|
144
175
|
// src/hooks/useMediaQuery.ts
|
|
145
176
|
import { useMediaQuery } from "@mui/material";
|
|
146
177
|
|
|
147
178
|
// src/hooks/useShareForwardRef.ts
|
|
148
179
|
import { useEffect, useRef } from "react";
|
|
149
|
-
var useShareForwardedRef = (forwardedRef, refresh = 0) => {
|
|
180
|
+
var useShareForwardedRef = /* @__PURE__ */ __name((forwardedRef, refresh = 0) => {
|
|
150
181
|
const innerRef = useRef(null);
|
|
151
182
|
useEffect(() => {
|
|
152
183
|
if (!forwardedRef) {
|
|
@@ -157,329 +188,282 @@ var useShareForwardedRef = (forwardedRef, refresh = 0) => {
|
|
|
157
188
|
} else {
|
|
158
189
|
forwardedRef.current = innerRef.current;
|
|
159
190
|
}
|
|
160
|
-
}, [
|
|
191
|
+
}, [
|
|
192
|
+
forwardedRef,
|
|
193
|
+
refresh
|
|
194
|
+
]);
|
|
161
195
|
return innerRef;
|
|
162
|
-
};
|
|
196
|
+
}, "useShareForwardedRef");
|
|
163
197
|
|
|
164
198
|
// src/components/BasicHero/BasicHero.tsx
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
}) => {
|
|
173
|
-
return /* @__PURE__ */ jsxs(
|
|
174
|
-
FlexGrowRow,
|
|
175
|
-
{
|
|
176
|
-
width: "100%",
|
|
177
|
-
sx: {
|
|
178
|
-
flexDirection: { md: "row", xs: "column" },
|
|
179
|
-
justifyContent: { md: backgroundImageAlignment ? "flex-start" : "center", xs: "center" }
|
|
199
|
+
var SubLinkSection = /* @__PURE__ */ __name(({ backgroundImageAlignment, subLinkIcon, subLinkPath, subLinkText1, subLinkText2 }) => {
|
|
200
|
+
return /* @__PURE__ */ React2.createElement(FlexGrowRow, {
|
|
201
|
+
width: "100%",
|
|
202
|
+
sx: {
|
|
203
|
+
flexDirection: {
|
|
204
|
+
md: "row",
|
|
205
|
+
xs: "column"
|
|
180
206
|
},
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
] }) : null,
|
|
186
|
-
/* @__PURE__ */ jsxs(Typography2, { children: [
|
|
187
|
-
subLinkText1,
|
|
188
|
-
"\xA0"
|
|
189
|
-
] }),
|
|
190
|
-
/* @__PURE__ */ jsx2(LinkEx, { href: subLinkPath, underline: "always", target: "_blank", color: "inherit", children: /* @__PURE__ */ jsx2(Typography2, { children: subLinkText2 }) })
|
|
191
|
-
]
|
|
207
|
+
justifyContent: {
|
|
208
|
+
md: backgroundImageAlignment ? "flex-start" : "center",
|
|
209
|
+
xs: "center"
|
|
210
|
+
}
|
|
192
211
|
}
|
|
193
|
-
)
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
})
|
|
212
|
+
}, subLinkIcon ? /* @__PURE__ */ React2.createElement("span", null, subLinkIcon, "\xA0") : null, /* @__PURE__ */ React2.createElement(Typography2, null, subLinkText1, "\xA0"), /* @__PURE__ */ React2.createElement(LinkEx, {
|
|
213
|
+
href: subLinkPath,
|
|
214
|
+
underline: "always",
|
|
215
|
+
target: "_blank",
|
|
216
|
+
color: "inherit"
|
|
217
|
+
}, /* @__PURE__ */ React2.createElement(Typography2, null, subLinkText2)));
|
|
218
|
+
}, "SubLinkSection");
|
|
219
|
+
var ButtonSection = /* @__PURE__ */ __name(({ href, to, buttonText }) => {
|
|
200
220
|
const isMobile = useIsSmall();
|
|
201
|
-
return href ? /* @__PURE__ */
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
sx: { display: href || to ? "flex" : "none" },
|
|
215
|
-
children: buttonText
|
|
221
|
+
return href ? /* @__PURE__ */ React2.createElement(ButtonEx, {
|
|
222
|
+
fullWidth: true,
|
|
223
|
+
marginTop: 1,
|
|
224
|
+
marginBottom: 1,
|
|
225
|
+
marginRight: isMobile ? 2 : 1,
|
|
226
|
+
marginLeft: isMobile ? 2 : 0,
|
|
227
|
+
target: href ?? "_blank",
|
|
228
|
+
href,
|
|
229
|
+
color: "primary",
|
|
230
|
+
variant: "contained",
|
|
231
|
+
paddingX: 3,
|
|
232
|
+
sx: {
|
|
233
|
+
display: href || to ? "flex" : "none"
|
|
216
234
|
}
|
|
217
|
-
) : to ? /* @__PURE__ */
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
sx: { display: href || to ? "flex" : "none" },
|
|
230
|
-
children: buttonText
|
|
235
|
+
}, buttonText) : to ? /* @__PURE__ */ React2.createElement(ButtonEx, {
|
|
236
|
+
fullWidth: true,
|
|
237
|
+
marginTop: 1,
|
|
238
|
+
marginBottom: 1,
|
|
239
|
+
marginRight: isMobile ? 2 : 1,
|
|
240
|
+
marginLeft: isMobile ? 2 : 0,
|
|
241
|
+
to,
|
|
242
|
+
color: "primary",
|
|
243
|
+
variant: "contained",
|
|
244
|
+
paddingX: 3,
|
|
245
|
+
sx: {
|
|
246
|
+
display: href || to ? "flex" : "none"
|
|
231
247
|
}
|
|
232
|
-
) : /* @__PURE__ */
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
sx: { display: href || to ? "flex" : "none" },
|
|
244
|
-
children: buttonText
|
|
248
|
+
}, buttonText) : /* @__PURE__ */ React2.createElement(ButtonEx, {
|
|
249
|
+
fullWidth: true,
|
|
250
|
+
marginTop: 1,
|
|
251
|
+
marginBottom: 1,
|
|
252
|
+
marginRight: isMobile ? 2 : 1,
|
|
253
|
+
marginLeft: isMobile ? 2 : 0,
|
|
254
|
+
color: "primary",
|
|
255
|
+
variant: "contained",
|
|
256
|
+
paddingX: 3,
|
|
257
|
+
sx: {
|
|
258
|
+
display: href || to ? "flex" : "none"
|
|
245
259
|
}
|
|
246
|
-
);
|
|
247
|
-
};
|
|
248
|
-
var BasicHero = ({
|
|
249
|
-
backgroundImage,
|
|
250
|
-
title,
|
|
251
|
-
gradientTitle,
|
|
252
|
-
backgroundColor,
|
|
253
|
-
textColor,
|
|
254
|
-
desc,
|
|
255
|
-
heroImage,
|
|
256
|
-
title2,
|
|
257
|
-
subLinkText1,
|
|
258
|
-
subLinkText2,
|
|
259
|
-
subLinkPath,
|
|
260
|
-
button1Text,
|
|
261
|
-
button2Text,
|
|
262
|
-
button2To,
|
|
263
|
-
button1To,
|
|
264
|
-
button2Href,
|
|
265
|
-
button1Href,
|
|
266
|
-
subLinkIcon,
|
|
267
|
-
sx,
|
|
268
|
-
...props
|
|
269
|
-
// eslint-disable-next-line complexity
|
|
270
|
-
}) => {
|
|
260
|
+
}, buttonText);
|
|
261
|
+
}, "ButtonSection");
|
|
262
|
+
var BasicHero = /* @__PURE__ */ __name(({ backgroundImage, title, gradientTitle, backgroundColor, textColor, desc, heroImage, title2, subLinkText1, subLinkText2, subLinkPath, button1Text, button2Text, button2To, button1To, button2Href, button1Href, subLinkIcon, sx, ...props }) => {
|
|
271
263
|
const isMobile = useIsSmall();
|
|
272
264
|
const styles = useGradientStyles();
|
|
273
|
-
const StyledSpan = styled("span")({
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
},
|
|
284
|
-
minHeight: {
|
|
285
|
-
md: "500px",
|
|
286
|
-
sm: "400px",
|
|
287
|
-
xs: "200px"
|
|
288
|
-
},
|
|
289
|
-
...sx
|
|
265
|
+
const StyledSpan = styled("span")({
|
|
266
|
+
...styles.heading
|
|
267
|
+
});
|
|
268
|
+
return /* @__PURE__ */ React2.createElement(FlexGrowCol, {
|
|
269
|
+
sx: {
|
|
270
|
+
backgroundImage: `url(${backgroundImage})`,
|
|
271
|
+
backgroundPosition: {
|
|
272
|
+
lg: "bottom",
|
|
273
|
+
md: "center left",
|
|
274
|
+
xs: "top left"
|
|
290
275
|
},
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
color: textColor ?? ""
|
|
276
|
+
minHeight: {
|
|
277
|
+
md: "500px",
|
|
278
|
+
sm: "400px",
|
|
279
|
+
xs: "200px"
|
|
296
280
|
},
|
|
297
|
-
...
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
},
|
|
318
|
-
children: /* @__PURE__ */ jsxs(FlexGrowCol, { paddingY: 2, sx: { alignItems: { xs: backgroundImage && !isMobile ? "flex-start" : "center" } }, children: [
|
|
319
|
-
/* @__PURE__ */ jsxs(Typography2, { variant: "h1", component: "h1", gutterBottom: true, textAlign: backgroundImage && !isMobile ? "left" : "center", children: [
|
|
320
|
-
title ? /* @__PURE__ */ jsx2("span", { children: `${title} ` }) : null,
|
|
321
|
-
gradientTitle ? /* @__PURE__ */ jsxs(StyledSpan, { children: [
|
|
322
|
-
" ",
|
|
323
|
-
` ${gradientTitle}`
|
|
324
|
-
] }) : null,
|
|
325
|
-
title2 ? /* @__PURE__ */ jsx2("span", { children: ` ${title2}` }) : null
|
|
326
|
-
] }),
|
|
327
|
-
/* @__PURE__ */ jsx2(Typography2, { variant: "body1", component: "h2", gutterBottom: true, textAlign: backgroundImage && !isMobile ? "left" : "center", children: desc }),
|
|
328
|
-
/* @__PURE__ */ jsxs(
|
|
329
|
-
FlexGrowRow,
|
|
330
|
-
{
|
|
331
|
-
sx: { flexDirection: { lg: "row", xs: "column" } },
|
|
332
|
-
width: "100%",
|
|
333
|
-
marginTop: 1,
|
|
334
|
-
children: [
|
|
335
|
-
button1Href ? /* @__PURE__ */ jsx2(ButtonSection, { href: button1Href, buttonText: button1Text }) : button1To ? /* @__PURE__ */ jsx2(ButtonSection, { to: button1To, buttonText: button1Text }) : /* @__PURE__ */ jsx2(ButtonSection, { buttonText: button1Text }),
|
|
336
|
-
button2Href ? /* @__PURE__ */ jsx2(ButtonSection, { href: button2Href, buttonText: button2Text }) : button2To ? /* @__PURE__ */ jsx2(ButtonSection, { to: button2To, buttonText: button2Text }) : /* @__PURE__ */ jsx2(ButtonSection, { buttonText: button2Text })
|
|
337
|
-
]
|
|
338
|
-
}
|
|
339
|
-
),
|
|
340
|
-
/* @__PURE__ */ jsx2(
|
|
341
|
-
SubLinkSection,
|
|
342
|
-
{
|
|
343
|
-
subLinkIcon,
|
|
344
|
-
subLinkText1,
|
|
345
|
-
subLinkText2,
|
|
346
|
-
subLinkPath,
|
|
347
|
-
backgroundImageAlignment: backgroundImage ? true : false
|
|
348
|
-
}
|
|
349
|
-
)
|
|
350
|
-
] })
|
|
351
|
-
}
|
|
352
|
-
),
|
|
353
|
-
/* @__PURE__ */ jsx2(Grid, { size: { xs: 12, md: 6 }, children: heroImage ? /* @__PURE__ */ jsx2("img", { src: heroImage, width: "100%" }) : null })
|
|
354
|
-
]
|
|
355
|
-
}
|
|
356
|
-
) })
|
|
281
|
+
...sx
|
|
282
|
+
},
|
|
283
|
+
style: {
|
|
284
|
+
backgroundColor: backgroundColor ?? "",
|
|
285
|
+
backgroundRepeat: "no-repeat",
|
|
286
|
+
backgroundSize: "cover",
|
|
287
|
+
color: textColor ?? ""
|
|
288
|
+
},
|
|
289
|
+
...props
|
|
290
|
+
}, /* @__PURE__ */ React2.createElement(Container, null, /* @__PURE__ */ React2.createElement(Grid, {
|
|
291
|
+
container: true,
|
|
292
|
+
justifyContent: "center",
|
|
293
|
+
alignItems: "center",
|
|
294
|
+
sx: {
|
|
295
|
+
alignItems: {
|
|
296
|
+
xs: "center"
|
|
297
|
+
},
|
|
298
|
+
justifyContent: {
|
|
299
|
+
xs: "center"
|
|
300
|
+
}
|
|
357
301
|
}
|
|
358
|
-
|
|
359
|
-
|
|
302
|
+
}, /* @__PURE__ */ React2.createElement(Grid, {
|
|
303
|
+
size: {
|
|
304
|
+
xs: 12,
|
|
305
|
+
sm: 8,
|
|
306
|
+
md: backgroundImage ? 6 : 8,
|
|
307
|
+
lg: backgroundImage ? 6 : 8
|
|
308
|
+
}
|
|
309
|
+
}, /* @__PURE__ */ React2.createElement(FlexGrowCol, {
|
|
310
|
+
paddingY: 2,
|
|
311
|
+
sx: {
|
|
312
|
+
alignItems: {
|
|
313
|
+
xs: backgroundImage && !isMobile ? "flex-start" : "center"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}, /* @__PURE__ */ React2.createElement(Typography2, {
|
|
317
|
+
variant: "h1",
|
|
318
|
+
component: "h1",
|
|
319
|
+
gutterBottom: true,
|
|
320
|
+
textAlign: backgroundImage && !isMobile ? "left" : "center"
|
|
321
|
+
}, title ? /* @__PURE__ */ React2.createElement("span", null, `${title} `) : null, gradientTitle ? /* @__PURE__ */ React2.createElement(StyledSpan, null, " ", ` ${gradientTitle}`) : null, title2 ? /* @__PURE__ */ React2.createElement("span", null, ` ${title2}`) : null), /* @__PURE__ */ React2.createElement(Typography2, {
|
|
322
|
+
variant: "body1",
|
|
323
|
+
component: "h2",
|
|
324
|
+
gutterBottom: true,
|
|
325
|
+
textAlign: backgroundImage && !isMobile ? "left" : "center"
|
|
326
|
+
}, desc), /* @__PURE__ */ React2.createElement(FlexGrowRow, {
|
|
327
|
+
sx: {
|
|
328
|
+
flexDirection: {
|
|
329
|
+
lg: "row",
|
|
330
|
+
xs: "column"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
width: "100%",
|
|
334
|
+
marginTop: 1
|
|
335
|
+
}, button1Href ? /* @__PURE__ */ React2.createElement(ButtonSection, {
|
|
336
|
+
href: button1Href,
|
|
337
|
+
buttonText: button1Text
|
|
338
|
+
}) : button1To ? /* @__PURE__ */ React2.createElement(ButtonSection, {
|
|
339
|
+
to: button1To,
|
|
340
|
+
buttonText: button1Text
|
|
341
|
+
}) : /* @__PURE__ */ React2.createElement(ButtonSection, {
|
|
342
|
+
buttonText: button1Text
|
|
343
|
+
}), button2Href ? /* @__PURE__ */ React2.createElement(ButtonSection, {
|
|
344
|
+
href: button2Href,
|
|
345
|
+
buttonText: button2Text
|
|
346
|
+
}) : button2To ? /* @__PURE__ */ React2.createElement(ButtonSection, {
|
|
347
|
+
to: button2To,
|
|
348
|
+
buttonText: button2Text
|
|
349
|
+
}) : /* @__PURE__ */ React2.createElement(ButtonSection, {
|
|
350
|
+
buttonText: button2Text
|
|
351
|
+
})), /* @__PURE__ */ React2.createElement(SubLinkSection, {
|
|
352
|
+
subLinkIcon,
|
|
353
|
+
subLinkText1,
|
|
354
|
+
subLinkText2,
|
|
355
|
+
subLinkPath,
|
|
356
|
+
backgroundImageAlignment: backgroundImage ? true : false
|
|
357
|
+
}))), /* @__PURE__ */ React2.createElement(Grid, {
|
|
358
|
+
size: {
|
|
359
|
+
xs: 12,
|
|
360
|
+
md: 6
|
|
361
|
+
}
|
|
362
|
+
}, heroImage ? /* @__PURE__ */ React2.createElement("img", {
|
|
363
|
+
src: heroImage,
|
|
364
|
+
width: "100%"
|
|
365
|
+
}) : null))));
|
|
366
|
+
}, "BasicHero");
|
|
360
367
|
|
|
361
368
|
// src/components/bigint/FixedPointPopover.tsx
|
|
362
|
-
import {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
} from "@mui/material";
|
|
367
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
368
|
-
var FixedPointPopover = ({
|
|
369
|
-
fixedPoint,
|
|
370
|
-
minFixedPoint: minimumPoint,
|
|
371
|
-
onFixedPointChange,
|
|
372
|
-
...props
|
|
373
|
-
}) => {
|
|
374
|
-
const handleChange = (event) => {
|
|
369
|
+
import { FormHelperText, Popover, TextField } from "@mui/material";
|
|
370
|
+
import React3 from "react";
|
|
371
|
+
var FixedPointPopover = /* @__PURE__ */ __name(({ fixedPoint, minFixedPoint: minimumPoint, onFixedPointChange, ...props }) => {
|
|
372
|
+
const handleChange = /* @__PURE__ */ __name((event) => {
|
|
375
373
|
const fixedPointInteger = Number.parseInt(event.target.value, 10);
|
|
376
374
|
if (Number.isNaN(fixedPointInteger)) return;
|
|
377
375
|
onFixedPointChange?.(fixedPointInteger);
|
|
378
|
-
};
|
|
379
|
-
return /* @__PURE__ */
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
376
|
+
}, "handleChange");
|
|
377
|
+
return /* @__PURE__ */ React3.createElement(Popover, {
|
|
378
|
+
slotProps: {
|
|
379
|
+
paper: {
|
|
380
|
+
sx: {
|
|
381
|
+
p: 2
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
...props
|
|
386
|
+
}, /* @__PURE__ */ React3.createElement(TextField, {
|
|
387
|
+
slotProps: {
|
|
388
|
+
htmlInput: {
|
|
389
|
+
min: minimumPoint
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
value: fixedPoint,
|
|
393
|
+
onChange: handleChange,
|
|
394
|
+
type: "number"
|
|
395
|
+
}), /* @__PURE__ */ React3.createElement(FormHelperText, null, "Set the Fixed Point"));
|
|
396
|
+
}, "FixedPointPopover");
|
|
384
397
|
|
|
385
398
|
// src/components/bigint/helpers/formatBigIntInput.ts
|
|
386
|
-
var formatBigIntInput = (rawValue) => {
|
|
399
|
+
var formatBigIntInput = /* @__PURE__ */ __name((rawValue) => {
|
|
387
400
|
const filteredValue = rawValue.replaceAll(/[^\d.]/g, "");
|
|
388
401
|
if (filteredValue.split(".").length > 2) return;
|
|
389
402
|
return filteredValue;
|
|
390
|
-
};
|
|
403
|
+
}, "formatBigIntInput");
|
|
391
404
|
|
|
392
405
|
// src/components/bigint/TextField.tsx
|
|
393
|
-
import {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
TextField as TextField2
|
|
397
|
-
} from "@mui/material";
|
|
398
|
-
import { toFixedPoint } from "@xylabs/decimal-precision";
|
|
399
|
-
import { isDefined } from "@xylabs/typeof";
|
|
400
|
-
import {
|
|
401
|
-
useEffect as useEffect2,
|
|
402
|
-
useMemo as useMemo2,
|
|
403
|
-
useState as useState3
|
|
404
|
-
} from "react";
|
|
406
|
+
import { FormControl, FormHelperText as FormHelperText2, TextField as TextField2 } from "@mui/material";
|
|
407
|
+
import { isDefined, toFixedPoint } from "@xylabs/sdk-js";
|
|
408
|
+
import React5, { useEffect as useEffect2, useMemo as useMemo2, useState as useState3 } from "react";
|
|
405
409
|
|
|
406
410
|
// src/components/bigint/InputAdornment.tsx
|
|
407
|
-
import {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
InputAdornment
|
|
411
|
-
} from "@mui/material";
|
|
412
|
-
import { useRef as useRef2, useState as useState2 } from "react";
|
|
413
|
-
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
414
|
-
var FixedPointInputAdornment = ({
|
|
415
|
-
fixedPoint,
|
|
416
|
-
minFixedPoint,
|
|
417
|
-
onFixedPointChange,
|
|
418
|
-
...props
|
|
419
|
-
}) => {
|
|
411
|
+
import { Avatar, IconButton, InputAdornment } from "@mui/material";
|
|
412
|
+
import React4, { useRef as useRef2, useState as useState2 } from "react";
|
|
413
|
+
var FixedPointInputAdornment = /* @__PURE__ */ __name(({ fixedPoint, minFixedPoint, onFixedPointChange, ...props }) => {
|
|
420
414
|
const ref = useRef2(null);
|
|
421
415
|
const [open, setOpen] = useState2(false);
|
|
422
|
-
return /* @__PURE__ */
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
) })
|
|
446
|
-
] });
|
|
447
|
-
};
|
|
416
|
+
return /* @__PURE__ */ React4.createElement(InputAdornment, props, /* @__PURE__ */ React4.createElement(FixedPointPopover, {
|
|
417
|
+
anchorEl: ref.current,
|
|
418
|
+
anchorOrigin: {
|
|
419
|
+
vertical: "bottom",
|
|
420
|
+
horizontal: "left"
|
|
421
|
+
},
|
|
422
|
+
fixedPoint,
|
|
423
|
+
minFixedPoint,
|
|
424
|
+
onClose: /* @__PURE__ */ __name(() => setOpen(false), "onClose"),
|
|
425
|
+
onFixedPointChange,
|
|
426
|
+
open
|
|
427
|
+
}), /* @__PURE__ */ React4.createElement(IconButton, {
|
|
428
|
+
size: "small",
|
|
429
|
+
ref,
|
|
430
|
+
onClick: /* @__PURE__ */ __name(() => setOpen(!open), "onClick")
|
|
431
|
+
}, /* @__PURE__ */ React4.createElement(Avatar, {
|
|
432
|
+
sx: {
|
|
433
|
+
fontSize: ".75rem",
|
|
434
|
+
height: "20px",
|
|
435
|
+
width: "20px"
|
|
436
|
+
}
|
|
437
|
+
}, fixedPoint)));
|
|
438
|
+
}, "FixedPointInputAdornment");
|
|
448
439
|
|
|
449
440
|
// src/components/bigint/TextField.tsx
|
|
450
|
-
|
|
451
|
-
var BigIntTextField = ({
|
|
452
|
-
defaultFixedPoint = 18,
|
|
453
|
-
defaultRawValue,
|
|
454
|
-
helperText,
|
|
455
|
-
hideAdornment,
|
|
456
|
-
onChangeFixedPoint,
|
|
457
|
-
onChangeFormatted,
|
|
458
|
-
onChange,
|
|
459
|
-
resetValue,
|
|
460
|
-
...props
|
|
461
|
-
}) => {
|
|
441
|
+
var BigIntTextField = /* @__PURE__ */ __name(({ defaultFixedPoint = 18, defaultRawValue, helperText, hideAdornment, onChangeFixedPoint, onChangeFormatted, onChange, resetValue, ...props }) => {
|
|
462
442
|
const [rawValue, setRawValue] = useState3("");
|
|
463
443
|
const [fixedPoint, setFixedPoint] = useState3(defaultFixedPoint);
|
|
464
444
|
const [error, setError] = useState3();
|
|
465
445
|
useMemo2(() => {
|
|
466
446
|
setRawValue("");
|
|
467
|
-
}, [
|
|
447
|
+
}, [
|
|
448
|
+
resetValue
|
|
449
|
+
]);
|
|
468
450
|
useMemo2(() => {
|
|
469
451
|
if (isDefined(defaultRawValue)) {
|
|
470
452
|
const formattedValue = formatBigIntInput(defaultRawValue);
|
|
471
453
|
if (formattedValue) setRawValue(formattedValue);
|
|
472
454
|
}
|
|
473
|
-
}, [
|
|
474
|
-
|
|
455
|
+
}, [
|
|
456
|
+
defaultRawValue
|
|
457
|
+
]);
|
|
458
|
+
const handleChange = /* @__PURE__ */ __name((event) => {
|
|
475
459
|
onChange?.(event);
|
|
476
460
|
const formattedValue = formatBigIntInput(event.target.value);
|
|
477
461
|
if (isDefined(formattedValue)) {
|
|
478
462
|
setRawValue(formattedValue);
|
|
479
463
|
onChangeFormatted?.(formattedValue);
|
|
480
464
|
}
|
|
481
|
-
};
|
|
482
|
-
const onFixedPointChange = (fixedPoint2) => setFixedPoint(fixedPoint2);
|
|
465
|
+
}, "handleChange");
|
|
466
|
+
const onFixedPointChange = /* @__PURE__ */ __name((fixedPoint2) => setFixedPoint(fixedPoint2), "onFixedPointChange");
|
|
483
467
|
const bigIntValue = useMemo2(() => {
|
|
484
468
|
if (rawValue) {
|
|
485
469
|
const fixedValue = toFixedPoint(rawValue, fixedPoint);
|
|
@@ -494,44 +478,45 @@ var BigIntTextField = ({
|
|
|
494
478
|
} else {
|
|
495
479
|
return;
|
|
496
480
|
}
|
|
497
|
-
}, [
|
|
481
|
+
}, [
|
|
482
|
+
rawValue,
|
|
483
|
+
fixedPoint
|
|
484
|
+
]);
|
|
498
485
|
useEffect2(() => {
|
|
499
486
|
onChangeFixedPoint?.(bigIntValue);
|
|
500
|
-
}, [
|
|
487
|
+
}, [
|
|
488
|
+
bigIntValue
|
|
489
|
+
]);
|
|
501
490
|
const minFixedPoint = rawValue.split(".")[1]?.length;
|
|
502
491
|
const resolvedHelperText = useMemo2(() => {
|
|
503
492
|
if (error) return "Cannot convert to BigInt";
|
|
504
493
|
return helperText ?? "Enter a number";
|
|
505
|
-
}, [
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
)
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
value: rawValue,
|
|
528
|
-
...props
|
|
494
|
+
}, [
|
|
495
|
+
helperText,
|
|
496
|
+
error
|
|
497
|
+
]);
|
|
498
|
+
return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(TextField2, {
|
|
499
|
+
onChange: handleChange,
|
|
500
|
+
type: "string",
|
|
501
|
+
error: Boolean(error),
|
|
502
|
+
slotProps: {
|
|
503
|
+
htmlInput: {
|
|
504
|
+
pattern: "[0-9]*[.]?[0-9]*"
|
|
505
|
+
},
|
|
506
|
+
input: {
|
|
507
|
+
startAdornment: hideAdornment ? null : /* @__PURE__ */ React5.createElement(FixedPointInputAdornment, {
|
|
508
|
+
position: "start",
|
|
509
|
+
fixedPoint,
|
|
510
|
+
minFixedPoint,
|
|
511
|
+
onFixedPointChange
|
|
512
|
+
})
|
|
529
513
|
}
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
};
|
|
534
|
-
|
|
514
|
+
},
|
|
515
|
+
value: rawValue,
|
|
516
|
+
...props
|
|
517
|
+
}), /* @__PURE__ */ React5.createElement(FormHelperText2, null, resolvedHelperText));
|
|
518
|
+
}, "BigIntTextField");
|
|
519
|
+
var WithFormControl = /* @__PURE__ */ __name(({ textFieldProps, ...props }) => /* @__PURE__ */ React5.createElement(FormControl, props, /* @__PURE__ */ React5.createElement(BigIntTextField, textFieldProps)), "WithFormControl");
|
|
535
520
|
|
|
536
521
|
// src/components/bigint/Input.ts
|
|
537
522
|
var BigIntInput = {
|
|
@@ -540,16 +525,12 @@ var BigIntInput = {
|
|
|
540
525
|
};
|
|
541
526
|
|
|
542
527
|
// src/components/Ellipsize.tsx
|
|
543
|
-
import {
|
|
544
|
-
|
|
545
|
-
styled as styled2,
|
|
546
|
-
Typography as Typography3
|
|
547
|
-
} from "@mui/material";
|
|
548
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
528
|
+
import { Box, styled as styled2, Typography as Typography3 } from "@mui/material";
|
|
529
|
+
import React6 from "react";
|
|
549
530
|
var ComponentName = "Ellipsize";
|
|
550
531
|
var EllipsizeRoot = styled2(Box, {
|
|
551
532
|
name: ComponentName,
|
|
552
|
-
shouldForwardProp: (prop) => prop !== "beforeLineHeight",
|
|
533
|
+
shouldForwardProp: /* @__PURE__ */ __name((prop) => prop !== "beforeLineHeight", "shouldForwardProp"),
|
|
553
534
|
slot: "Root"
|
|
554
535
|
})(({ beforeLineHeight = 0 }) => ({
|
|
555
536
|
"&": {
|
|
@@ -568,16 +549,14 @@ var EllipsizeRoot = styled2(Box, {
|
|
|
568
549
|
var EllipsizeInnerWrap = styled2(Box, {
|
|
569
550
|
name: ComponentName,
|
|
570
551
|
slot: "innerWrap"
|
|
571
|
-
})(() => ({
|
|
552
|
+
})(() => ({
|
|
553
|
+
position: "relative"
|
|
554
|
+
}));
|
|
572
555
|
var EllipsizeContentWrap = styled2(Typography3, {
|
|
573
556
|
name: ComponentName,
|
|
574
|
-
shouldForwardProp: (prop) => prop !== "ellipsisPosition",
|
|
557
|
+
shouldForwardProp: /* @__PURE__ */ __name((prop) => prop !== "ellipsisPosition", "shouldForwardProp"),
|
|
575
558
|
slot: "contentWrap"
|
|
576
|
-
})(({
|
|
577
|
-
theme,
|
|
578
|
-
ellipsisPosition,
|
|
579
|
-
fontFamily
|
|
580
|
-
}) => {
|
|
559
|
+
})(({ theme, ellipsisPosition, fontFamily }) => {
|
|
581
560
|
return theme.unstable_sx({
|
|
582
561
|
fontFamily: fontFamily ?? "monospace",
|
|
583
562
|
left: 0,
|
|
@@ -592,268 +571,275 @@ var EllipsizeContentWrap = styled2(Typography3, {
|
|
|
592
571
|
} : {}
|
|
593
572
|
});
|
|
594
573
|
});
|
|
595
|
-
var EllipsizeBox = ({
|
|
596
|
-
ref,
|
|
597
|
-
innerWrapProps,
|
|
598
|
-
children,
|
|
599
|
-
ellipsisPosition = "start",
|
|
600
|
-
disableSharedRef,
|
|
601
|
-
typographyProps,
|
|
602
|
-
...props
|
|
603
|
-
}) => {
|
|
574
|
+
var EllipsizeBox = /* @__PURE__ */ __name(({ ref, innerWrapProps, children, ellipsisPosition = "start", disableSharedRef, typographyProps, ...props }) => {
|
|
604
575
|
const sharedRef = useShareForwardedRef(ref);
|
|
605
576
|
const { sx: innerWrapSx, ...remainingInnerWrapProps } = innerWrapProps ?? {};
|
|
606
|
-
return /* @__PURE__ */
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
children: /* @__PURE__ */ jsx6(EllipsizeContentWrap, { component: "span", ellipsisPosition, variant: "body2", ...typographyProps, children })
|
|
577
|
+
return /* @__PURE__ */ React6.createElement(EllipsizeRoot, {
|
|
578
|
+
ref: sharedRef,
|
|
579
|
+
...props
|
|
580
|
+
}, /* @__PURE__ */ React6.createElement(EllipsizeInnerWrap, {
|
|
581
|
+
...remainingInnerWrapProps,
|
|
582
|
+
sx: {
|
|
583
|
+
alignItems: "center",
|
|
584
|
+
display: "flex",
|
|
585
|
+
...innerWrapSx
|
|
616
586
|
}
|
|
617
|
-
|
|
618
|
-
|
|
587
|
+
}, /* @__PURE__ */ React6.createElement(EllipsizeContentWrap, {
|
|
588
|
+
component: "span",
|
|
589
|
+
ellipsisPosition,
|
|
590
|
+
variant: "body2",
|
|
591
|
+
...typographyProps
|
|
592
|
+
}, children)));
|
|
593
|
+
}, "EllipsizeBox");
|
|
619
594
|
EllipsizeBox.displayName = "EllipsizeBox";
|
|
620
595
|
|
|
621
596
|
// src/components/LabeledTextFieldWrapper.tsx
|
|
622
597
|
import { Stack, Typography as Typography4 } from "@mui/material";
|
|
623
|
-
import
|
|
624
|
-
var LabeledTextFieldWrapper = ({
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
};
|
|
598
|
+
import React7 from "react";
|
|
599
|
+
var LabeledTextFieldWrapper = /* @__PURE__ */ __name(({ children, label, ...props }) => {
|
|
600
|
+
return /* @__PURE__ */ React7.createElement(Stack, {
|
|
601
|
+
flexDirection: "column",
|
|
602
|
+
...props
|
|
603
|
+
}, /* @__PURE__ */ React7.createElement(Typography4, {
|
|
604
|
+
gutterBottom: true,
|
|
605
|
+
variant: "caption"
|
|
606
|
+
}, label), children);
|
|
607
|
+
}, "LabeledTextFieldWrapper");
|
|
634
608
|
|
|
635
609
|
// src/components/ListItemButtonEx.tsx
|
|
636
610
|
import { ListItemButton } from "@mui/material";
|
|
611
|
+
import React8 from "react";
|
|
637
612
|
import { useNavigate } from "react-router-dom";
|
|
638
|
-
|
|
639
|
-
var ListItemButtonExTo = ({
|
|
640
|
-
to,
|
|
641
|
-
toOptions,
|
|
642
|
-
onClick,
|
|
643
|
-
...props
|
|
644
|
-
}) => {
|
|
613
|
+
var ListItemButtonExTo = /* @__PURE__ */ __name(({ to, toOptions, onClick, ...props }) => {
|
|
645
614
|
const navigate = useNavigate();
|
|
646
|
-
const localOnClick = (event) => {
|
|
615
|
+
const localOnClick = /* @__PURE__ */ __name((event) => {
|
|
647
616
|
onClick?.(event);
|
|
648
617
|
if (to) {
|
|
649
618
|
void navigate(to, toOptions);
|
|
650
619
|
}
|
|
651
|
-
};
|
|
652
|
-
return /* @__PURE__ */
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
};
|
|
620
|
+
}, "localOnClick");
|
|
621
|
+
return /* @__PURE__ */ React8.createElement(ListItemButton, {
|
|
622
|
+
onClick: localOnClick,
|
|
623
|
+
...props
|
|
624
|
+
});
|
|
625
|
+
}, "ListItemButtonExTo");
|
|
626
|
+
var ListItemButtonEx = /* @__PURE__ */ __name(({ to, ...props }) => {
|
|
627
|
+
return to ? /* @__PURE__ */ React8.createElement(ListItemButtonExTo, {
|
|
628
|
+
to,
|
|
629
|
+
...props
|
|
630
|
+
}) : /* @__PURE__ */ React8.createElement(ListItemButton, props);
|
|
631
|
+
}, "ListItemButtonEx");
|
|
657
632
|
|
|
658
633
|
// src/components/LoadResult.tsx
|
|
659
634
|
import { FlexGrowRow as FlexGrowRow2 } from "@xylabs/react-flexbox";
|
|
635
|
+
import React10 from "react";
|
|
660
636
|
|
|
661
637
|
// src/components/NotFound.tsx
|
|
662
638
|
import { Typography as Typography5 } from "@mui/material";
|
|
663
639
|
import { FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
|
|
664
|
-
import
|
|
665
|
-
var NotFound = (props) => {
|
|
666
|
-
return /* @__PURE__ */
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
640
|
+
import React9 from "react";
|
|
641
|
+
var NotFound = /* @__PURE__ */ __name((props) => {
|
|
642
|
+
return /* @__PURE__ */ React9.createElement(FlexGrowCol2, props, /* @__PURE__ */ React9.createElement(Typography5, {
|
|
643
|
+
variant: "h2"
|
|
644
|
+
}, "Sorry!"), /* @__PURE__ */ React9.createElement(Typography5, {
|
|
645
|
+
marginY: 3,
|
|
646
|
+
variant: "body2"
|
|
647
|
+
}, "Can't find anything here"));
|
|
648
|
+
}, "NotFound");
|
|
671
649
|
|
|
672
650
|
// src/components/LoadResult.tsx
|
|
673
|
-
import { Fragment as Fragment2, jsx as jsx10 } from "react/jsx-runtime";
|
|
674
651
|
function LoadResult(props) {
|
|
675
|
-
const {
|
|
676
|
-
notFound,
|
|
677
|
-
error,
|
|
678
|
-
searchResult,
|
|
679
|
-
children
|
|
680
|
-
} = props;
|
|
652
|
+
const { notFound, error, searchResult, children } = props;
|
|
681
653
|
if (notFound) {
|
|
682
|
-
return /* @__PURE__ */
|
|
654
|
+
return /* @__PURE__ */ React10.createElement(NotFound, null);
|
|
683
655
|
}
|
|
684
656
|
if (error) {
|
|
685
|
-
return /* @__PURE__ */
|
|
657
|
+
return /* @__PURE__ */ React10.createElement(React10.Fragment, null, children);
|
|
686
658
|
}
|
|
687
|
-
return searchResult === void 0 ? /* @__PURE__ */
|
|
659
|
+
return searchResult === void 0 ? /* @__PURE__ */ React10.createElement(FlexGrowRow2, {
|
|
660
|
+
busy: true,
|
|
661
|
+
minHeight: "50px"
|
|
662
|
+
}) : /* @__PURE__ */ React10.createElement(React10.Fragment, null, children);
|
|
688
663
|
}
|
|
664
|
+
__name(LoadResult, "LoadResult");
|
|
689
665
|
|
|
690
666
|
// src/components/Pipe.tsx
|
|
691
667
|
import { Typography as Typography6 } from "@mui/material";
|
|
692
|
-
import
|
|
693
|
-
var Pipe = (props) => {
|
|
694
|
-
return /* @__PURE__ */
|
|
695
|
-
|
|
668
|
+
import React11 from "react";
|
|
669
|
+
var Pipe = /* @__PURE__ */ __name((props) => {
|
|
670
|
+
return /* @__PURE__ */ React11.createElement(Typography6, {
|
|
671
|
+
marginX: 1,
|
|
672
|
+
component: "span",
|
|
673
|
+
...props
|
|
674
|
+
}, "|");
|
|
675
|
+
}, "Pipe");
|
|
696
676
|
|
|
697
677
|
// src/components/pluginValidation/DataMissing.tsx
|
|
698
678
|
import { Alert, AlertTitle } from "@mui/material";
|
|
699
|
-
import
|
|
700
|
-
var PayloadDataMissing = ({ alertBody, ...props }) => {
|
|
701
|
-
return /* @__PURE__ */
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
};
|
|
679
|
+
import React12 from "react";
|
|
680
|
+
var PayloadDataMissing = /* @__PURE__ */ __name(({ alertBody, ...props }) => {
|
|
681
|
+
return /* @__PURE__ */ React12.createElement(Alert, {
|
|
682
|
+
severity: "warning",
|
|
683
|
+
...props
|
|
684
|
+
}, /* @__PURE__ */ React12.createElement(AlertTitle, null, "Missing Data"), alertBody ?? "Payload is missing required data to render correctly");
|
|
685
|
+
}, "PayloadDataMissing");
|
|
706
686
|
|
|
707
687
|
// src/components/ScrollTableOnSm.tsx
|
|
708
688
|
import { styled as styled3 } from "@mui/material";
|
|
709
|
-
import
|
|
689
|
+
import React13 from "react";
|
|
710
690
|
var StyledScrollTableOnSm = styled3("div")(({ theme }) => ({
|
|
711
|
-
[theme.breakpoints.down("md")]: {
|
|
691
|
+
[theme.breakpoints.down("md")]: {
|
|
692
|
+
overflowX: "scroll"
|
|
693
|
+
},
|
|
712
694
|
display: "flex",
|
|
713
695
|
flexGrow: 1
|
|
714
696
|
}));
|
|
715
|
-
var ScrollTableOnSm = ({ children }) => /* @__PURE__ */
|
|
697
|
+
var ScrollTableOnSm = /* @__PURE__ */ __name(({ children }) => /* @__PURE__ */ React13.createElement(StyledScrollTableOnSm, null, children), "ScrollTableOnSm");
|
|
716
698
|
|
|
717
699
|
// src/components/SectionSpacingRow/SectionSpacingRow.tsx
|
|
718
700
|
import { useTheme } from "@mui/material";
|
|
719
701
|
import { FlexGrowRow as FlexGrowRow3 } from "@xylabs/react-flexbox";
|
|
720
|
-
import
|
|
721
|
-
var SectionSpacingRow = ({
|
|
722
|
-
ref,
|
|
723
|
-
children,
|
|
724
|
-
sx,
|
|
725
|
-
...props
|
|
726
|
-
}) => {
|
|
702
|
+
import React14 from "react";
|
|
703
|
+
var SectionSpacingRow = /* @__PURE__ */ __name(({ ref, children, sx, ...props }) => {
|
|
727
704
|
const theme = useTheme();
|
|
728
|
-
return /* @__PURE__ */
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
paddingTop: { md: theme.spacing(5), xs: theme.spacing(5) },
|
|
734
|
-
...sx
|
|
705
|
+
return /* @__PURE__ */ React14.createElement(FlexGrowRow3, {
|
|
706
|
+
sx: {
|
|
707
|
+
paddingBottom: {
|
|
708
|
+
md: theme.spacing(5),
|
|
709
|
+
xs: theme.spacing(5)
|
|
735
710
|
},
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
711
|
+
paddingTop: {
|
|
712
|
+
md: theme.spacing(5),
|
|
713
|
+
xs: theme.spacing(5)
|
|
714
|
+
},
|
|
715
|
+
...sx
|
|
716
|
+
},
|
|
717
|
+
width: "100%",
|
|
718
|
+
ref,
|
|
719
|
+
...props
|
|
720
|
+
}, children);
|
|
721
|
+
}, "SectionSpacingRow");
|
|
743
722
|
SectionSpacingRow.displayName = "SectionSpacingRow";
|
|
744
723
|
|
|
724
|
+
// src/components/TableCell/AddressTableCell.tsx
|
|
725
|
+
import React16 from "react";
|
|
726
|
+
|
|
745
727
|
// src/components/TableCell/EllipsisTableCell.tsx
|
|
746
728
|
import { styled as styled4, TableCell } from "@mui/material";
|
|
747
729
|
import { asLinkHrefOrToProps, LinkEx as LinkEx2 } from "@xylabs/react-link";
|
|
748
|
-
import { useMemo as useMemo3 } from "react";
|
|
749
|
-
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
730
|
+
import React15, { useMemo as useMemo3 } from "react";
|
|
750
731
|
var EllipsisTableCellRoot = styled4(TableCell, {
|
|
751
732
|
name: "EllipsisTableCell",
|
|
752
|
-
shouldForwardProp: (prop) => prop !== "width",
|
|
733
|
+
shouldForwardProp: /* @__PURE__ */ __name((prop) => prop !== "width", "shouldForwardProp"),
|
|
753
734
|
slot: "Root"
|
|
754
|
-
})(({ width = "100%" }) => ({
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
href,
|
|
759
|
-
link = false,
|
|
760
|
-
to,
|
|
761
|
-
value,
|
|
762
|
-
...props
|
|
763
|
-
}) => {
|
|
735
|
+
})(({ width = "100%" }) => ({
|
|
736
|
+
width
|
|
737
|
+
}));
|
|
738
|
+
var EllipsisTableCellWithRef = /* @__PURE__ */ __name(({ ref, children, href, link = false, to, value, ...props }) => {
|
|
764
739
|
const data = useMemo3(() => {
|
|
765
740
|
if (children) {
|
|
766
741
|
return children;
|
|
767
742
|
}
|
|
768
743
|
if (href || link || to) {
|
|
769
|
-
return /* @__PURE__ */
|
|
744
|
+
return /* @__PURE__ */ React15.createElement(LinkEx2, {
|
|
745
|
+
title: value,
|
|
746
|
+
...asLinkHrefOrToProps({
|
|
747
|
+
to,
|
|
748
|
+
href
|
|
749
|
+
}),
|
|
750
|
+
target: href ? "_blank" : void 0
|
|
751
|
+
}, value);
|
|
770
752
|
}
|
|
771
753
|
return value;
|
|
772
|
-
}, [
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
754
|
+
}, [
|
|
755
|
+
children,
|
|
756
|
+
href,
|
|
757
|
+
link,
|
|
758
|
+
to,
|
|
759
|
+
value
|
|
760
|
+
]);
|
|
761
|
+
return /* @__PURE__ */ React15.createElement(EllipsisTableCellRoot, props, /* @__PURE__ */ React15.createElement(EllipsizeBox, {
|
|
762
|
+
ref,
|
|
763
|
+
sx: {
|
|
764
|
+
cursor: link || to || href ? "pointer" : "inherit"
|
|
779
765
|
}
|
|
780
|
-
|
|
781
|
-
};
|
|
766
|
+
}, data));
|
|
767
|
+
}, "EllipsisTableCellWithRef");
|
|
782
768
|
EllipsisTableCellWithRef.displayName = "EllipsisTableCell";
|
|
783
769
|
var EllipsisTableCell = EllipsisTableCellWithRef;
|
|
784
770
|
|
|
785
771
|
// src/components/TableCell/AddressTableCell.tsx
|
|
786
|
-
|
|
787
|
-
var AddressTableCell = ({
|
|
788
|
-
ref,
|
|
789
|
-
value,
|
|
790
|
-
archive,
|
|
791
|
-
exploreDomain,
|
|
792
|
-
link,
|
|
793
|
-
...props
|
|
794
|
-
}) => {
|
|
772
|
+
var AddressTableCell = /* @__PURE__ */ __name(({ ref, value, archive, exploreDomain, link, ...props }) => {
|
|
795
773
|
const href = exploreDomain && archive ? `${exploreDomain}/archive/${archive}/address/${value}` : void 0;
|
|
796
774
|
const to = exploreDomain === void 0 && archive ? `/archive/${archive}/address/${value}` : void 0;
|
|
797
|
-
return /* @__PURE__ */
|
|
798
|
-
|
|
775
|
+
return /* @__PURE__ */ React16.createElement(EllipsisTableCell, {
|
|
776
|
+
value,
|
|
777
|
+
href,
|
|
778
|
+
to,
|
|
779
|
+
ref,
|
|
780
|
+
link,
|
|
781
|
+
...props
|
|
782
|
+
});
|
|
783
|
+
}, "AddressTableCell");
|
|
799
784
|
AddressTableCell.displayName = "AddressTableCell";
|
|
800
785
|
|
|
801
786
|
// src/components/TableCell/HashTableCell.tsx
|
|
802
|
-
import
|
|
803
|
-
var HashTableCell = ({
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
})
|
|
809
|
-
return /* @__PURE__ */ jsx17(
|
|
810
|
-
EllipsisTableCell,
|
|
811
|
-
{
|
|
812
|
-
value,
|
|
813
|
-
...props
|
|
814
|
-
}
|
|
815
|
-
);
|
|
816
|
-
};
|
|
787
|
+
import React17 from "react";
|
|
788
|
+
var HashTableCell = /* @__PURE__ */ __name(({ ref, value, dataType, ...props }) => {
|
|
789
|
+
return /* @__PURE__ */ React17.createElement(EllipsisTableCell, {
|
|
790
|
+
value,
|
|
791
|
+
...props
|
|
792
|
+
});
|
|
793
|
+
}, "HashTableCell");
|
|
817
794
|
|
|
818
795
|
// src/components/ThemeTokenAvatar/ThemeTokenAvatar.tsx
|
|
819
796
|
import { Avatar as Avatar2, useTheme as useTheme2 } from "@mui/material";
|
|
820
|
-
import
|
|
821
|
-
var ThemeTokenAvatar = ({ ...props }) => {
|
|
797
|
+
import React18 from "react";
|
|
798
|
+
var ThemeTokenAvatar = /* @__PURE__ */ __name(({ ...props }) => {
|
|
822
799
|
const theme = useTheme2();
|
|
823
|
-
return /* @__PURE__ */
|
|
824
|
-
|
|
800
|
+
return /* @__PURE__ */ React18.createElement(Avatar2, {
|
|
801
|
+
sx: {
|
|
802
|
+
background: theme.vars.palette.common.white
|
|
803
|
+
},
|
|
804
|
+
...props
|
|
805
|
+
});
|
|
806
|
+
}, "ThemeTokenAvatar");
|
|
825
807
|
|
|
826
808
|
// src/components/ThemeTokenAvatarGroup/ThemeTokenAvatarGroup.tsx
|
|
827
809
|
import { AvatarGroup } from "@mui/material";
|
|
828
|
-
import
|
|
829
|
-
var ThemeTokenAvatarGroup = ({ images, ...props }) => {
|
|
830
|
-
return /* @__PURE__ */
|
|
831
|
-
|
|
810
|
+
import React19 from "react";
|
|
811
|
+
var ThemeTokenAvatarGroup = /* @__PURE__ */ __name(({ images, ...props }) => {
|
|
812
|
+
return /* @__PURE__ */ React19.createElement(AvatarGroup, props, images?.map((image, index) => /* @__PURE__ */ React19.createElement(ThemeTokenAvatar, {
|
|
813
|
+
key: index,
|
|
814
|
+
src: image
|
|
815
|
+
})));
|
|
816
|
+
}, "ThemeTokenAvatarGroup");
|
|
832
817
|
|
|
833
818
|
// src/components/TokenBar/TokenBar.tsx
|
|
834
819
|
import { Paper, Typography as Typography7 } from "@mui/material";
|
|
835
820
|
import { FlexRow } from "@xylabs/react-flexbox";
|
|
836
|
-
import
|
|
837
|
-
var TokenBar = ({
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
};
|
|
821
|
+
import React20 from "react";
|
|
822
|
+
var TokenBar = /* @__PURE__ */ __name(({ text1, text1Props, text1Suffix, text2, text2Props, text2Suffix, ...props }) => {
|
|
823
|
+
return /* @__PURE__ */ React20.createElement(Paper, {
|
|
824
|
+
elevation: 0,
|
|
825
|
+
className: "TokenBar-root",
|
|
826
|
+
...props
|
|
827
|
+
}, /* @__PURE__ */ React20.createElement(FlexRow, {
|
|
828
|
+
justifyContent: "space-between"
|
|
829
|
+
}, /* @__PURE__ */ React20.createElement(Typography7, {
|
|
830
|
+
variant: "body1",
|
|
831
|
+
fontWeight: 300,
|
|
832
|
+
margin: 1,
|
|
833
|
+
...text1Props
|
|
834
|
+
}, text1, text1Suffix), /* @__PURE__ */ React20.createElement(Typography7, {
|
|
835
|
+
variant: "body1",
|
|
836
|
+
fontWeight: 300,
|
|
837
|
+
textTransform: "uppercase",
|
|
838
|
+
color: "gray",
|
|
839
|
+
margin: 1,
|
|
840
|
+
...text2Props
|
|
841
|
+
}, text2, text2Suffix)));
|
|
842
|
+
}, "TokenBar");
|
|
857
843
|
|
|
858
844
|
// src/components/TokenData/img/index.ts
|
|
859
845
|
import { default as default2 } from "./ada-JCPSRXND.png";
|
|
@@ -1006,7 +992,7 @@ var TokenData = [
|
|
|
1006
992
|
];
|
|
1007
993
|
|
|
1008
994
|
// src/components/TokenData/useGetTokenData.tsx
|
|
1009
|
-
var getTokenData = (symbols) => {
|
|
995
|
+
var getTokenData = /* @__PURE__ */ __name((symbols) => {
|
|
1010
996
|
return symbols?.map((symbol) => {
|
|
1011
997
|
const additionalTokenData = TokenData.find((x) => x.tokenSymbol.toLowerCase() === symbol?.toLowerCase());
|
|
1012
998
|
const checkedTokenData = additionalTokenData ?? {
|
|
@@ -1019,62 +1005,54 @@ var getTokenData = (symbols) => {
|
|
|
1019
1005
|
};
|
|
1020
1006
|
return checkedTokenData;
|
|
1021
1007
|
});
|
|
1022
|
-
};
|
|
1008
|
+
}, "getTokenData");
|
|
1023
1009
|
|
|
1024
1010
|
// src/components/TokenSummary/TokenSummary.tsx
|
|
1025
1011
|
import { CardHeader, Typography as Typography8 } from "@mui/material";
|
|
1026
|
-
import
|
|
1027
|
-
var TokenSummary = ({
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
}
|
|
1042
|
-
),
|
|
1043
|
-
children
|
|
1044
|
-
] });
|
|
1045
|
-
};
|
|
1012
|
+
import React21 from "react";
|
|
1013
|
+
var TokenSummary = /* @__PURE__ */ __name(({ icon, symbol, symbolElement, children, ...props }) => {
|
|
1014
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(CardHeader, {
|
|
1015
|
+
avatar: /* @__PURE__ */ React21.createElement(ThemeTokenAvatar, {
|
|
1016
|
+
src: icon,
|
|
1017
|
+
alt: symbol
|
|
1018
|
+
}),
|
|
1019
|
+
title: /* @__PURE__ */ React21.createElement(Typography8, {
|
|
1020
|
+
variant: "h6",
|
|
1021
|
+
fontWeight: 300,
|
|
1022
|
+
textTransform: "uppercase"
|
|
1023
|
+
}, symbolElement ?? symbol),
|
|
1024
|
+
...props
|
|
1025
|
+
}), children);
|
|
1026
|
+
}, "TokenSummary");
|
|
1046
1027
|
|
|
1047
1028
|
// src/components/TypographyEx.tsx
|
|
1048
1029
|
import { Typography as Typography9 } from "@mui/material";
|
|
1049
|
-
import
|
|
1050
|
-
var TypographyEx = ({ gradient, ...props }) => {
|
|
1030
|
+
import React22 from "react";
|
|
1031
|
+
var TypographyEx = /* @__PURE__ */ __name(({ gradient, ...props }) => {
|
|
1051
1032
|
const styles = useGradientStyles();
|
|
1052
|
-
return /* @__PURE__ */
|
|
1053
|
-
|
|
1033
|
+
return /* @__PURE__ */ React22.createElement(Typography9, {
|
|
1034
|
+
style: gradient === "text" ? styles.heading : void 0,
|
|
1035
|
+
...props
|
|
1036
|
+
});
|
|
1037
|
+
}, "TypographyEx");
|
|
1054
1038
|
|
|
1055
1039
|
// src/contexts/diviner/Context.ts
|
|
1056
1040
|
import { createContextEx } from "@xylabs/react-shared";
|
|
1057
|
-
var ResolvedDivinerContext = () => createContextEx();
|
|
1041
|
+
var ResolvedDivinerContext = /* @__PURE__ */ __name(() => createContextEx(), "ResolvedDivinerContext");
|
|
1058
1042
|
|
|
1059
1043
|
// src/contexts/diviner/Provider.tsx
|
|
1060
1044
|
import { useResetState } from "@xylabs/react-hooks";
|
|
1061
|
-
import { useMemo as useMemo4 } from "react";
|
|
1062
|
-
|
|
1063
|
-
var ResolvedDivinerProvider = ({
|
|
1064
|
-
diviner: divinerProp,
|
|
1065
|
-
required = false,
|
|
1066
|
-
children,
|
|
1067
|
-
context: Context
|
|
1068
|
-
}) => {
|
|
1045
|
+
import React23, { useMemo as useMemo4 } from "react";
|
|
1046
|
+
var ResolvedDivinerProvider = /* @__PURE__ */ __name(({ diviner: divinerProp, required = false, children, context: Context }) => {
|
|
1069
1047
|
const [diviner, setDiviner] = useResetState(divinerProp);
|
|
1070
1048
|
const value = useMemo4(() => {
|
|
1071
|
-
const resolveDiviner = () => {
|
|
1049
|
+
const resolveDiviner = /* @__PURE__ */ __name(() => {
|
|
1072
1050
|
if (divinerProp) {
|
|
1073
1051
|
return diviner === divinerProp ? diviner : void 0;
|
|
1074
1052
|
} else {
|
|
1075
1053
|
return diviner;
|
|
1076
1054
|
}
|
|
1077
|
-
};
|
|
1055
|
+
}, "resolveDiviner");
|
|
1078
1056
|
return {
|
|
1079
1057
|
diviner: resolveDiviner(),
|
|
1080
1058
|
provided: true,
|
|
@@ -1084,23 +1062,18 @@ var ResolvedDivinerProvider = ({
|
|
|
1084
1062
|
setDiviner,
|
|
1085
1063
|
divinerProp
|
|
1086
1064
|
]);
|
|
1087
|
-
return /* @__PURE__ */
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
children: diviner ? children : required ? null : children
|
|
1092
|
-
}
|
|
1093
|
-
);
|
|
1094
|
-
};
|
|
1065
|
+
return /* @__PURE__ */ React23.createElement(Context, {
|
|
1066
|
+
value
|
|
1067
|
+
}, diviner ? children : required ? null : children);
|
|
1068
|
+
}, "ResolvedDivinerProvider");
|
|
1095
1069
|
|
|
1096
1070
|
// src/contexts/ListMode/Context.ts
|
|
1097
1071
|
import { createContextEx as createContextEx2 } from "@xylabs/react-shared";
|
|
1098
1072
|
var ListModeContext = createContextEx2();
|
|
1099
1073
|
|
|
1100
1074
|
// src/contexts/ListMode/Provider.tsx
|
|
1101
|
-
import { useMemo as useMemo5, useState as useState4 } from "react";
|
|
1102
|
-
|
|
1103
|
-
var ListModeProvider = ({ children, defaultListMode }) => {
|
|
1075
|
+
import React24, { useMemo as useMemo5, useState as useState4 } from "react";
|
|
1076
|
+
var ListModeProvider = /* @__PURE__ */ __name(({ children, defaultListMode }) => {
|
|
1104
1077
|
const [listMode, setListMode] = useState4(defaultListMode ?? "default");
|
|
1105
1078
|
const value = useMemo5(() => ({
|
|
1106
1079
|
listMode,
|
|
@@ -1110,29 +1083,25 @@ var ListModeProvider = ({ children, defaultListMode }) => {
|
|
|
1110
1083
|
listMode,
|
|
1111
1084
|
setListMode
|
|
1112
1085
|
]);
|
|
1113
|
-
return /* @__PURE__ */
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
children
|
|
1118
|
-
}
|
|
1119
|
-
);
|
|
1120
|
-
};
|
|
1086
|
+
return /* @__PURE__ */ React24.createElement(ListModeContext, {
|
|
1087
|
+
value
|
|
1088
|
+
}, children);
|
|
1089
|
+
}, "ListModeProvider");
|
|
1121
1090
|
|
|
1122
1091
|
// src/contexts/ListMode/use.ts
|
|
1123
1092
|
import { useContextEx } from "@xylabs/react-shared";
|
|
1124
|
-
var useListMode = (required = false) => {
|
|
1093
|
+
var useListMode = /* @__PURE__ */ __name((required = false) => {
|
|
1125
1094
|
return useContextEx(ListModeContext, "ListMode", required);
|
|
1126
|
-
};
|
|
1095
|
+
}, "useListMode");
|
|
1127
1096
|
|
|
1128
1097
|
// src/lib/assertDefinedEx.ts
|
|
1129
|
-
var assertDefinedEx = (expr, message) => {
|
|
1098
|
+
var assertDefinedEx = /* @__PURE__ */ __name((expr, message) => {
|
|
1130
1099
|
if (expr !== null && expr !== void 0) return expr;
|
|
1131
1100
|
throw new Error(message);
|
|
1132
|
-
};
|
|
1101
|
+
}, "assertDefinedEx");
|
|
1133
1102
|
|
|
1134
1103
|
// src/lib/getActualPaddingX.ts
|
|
1135
|
-
var parseMeausureString = (measure, absolute) => {
|
|
1104
|
+
var parseMeausureString = /* @__PURE__ */ __name((measure, absolute) => {
|
|
1136
1105
|
if (measure !== void 0 && measure !== null && measure.length > 0) {
|
|
1137
1106
|
if (measure.endsWith("px")) {
|
|
1138
1107
|
return Number.parseFloat(measure.slice(0, Math.max(0, measure.length - 2)));
|
|
@@ -1148,8 +1117,8 @@ var parseMeausureString = (measure, absolute) => {
|
|
|
1148
1117
|
}
|
|
1149
1118
|
throw new Error(`Error Parsing Measure [${measure}]`);
|
|
1150
1119
|
}
|
|
1151
|
-
};
|
|
1152
|
-
var parsePadding = (padding) => {
|
|
1120
|
+
}, "parseMeausureString");
|
|
1121
|
+
var parsePadding = /* @__PURE__ */ __name((padding) => {
|
|
1153
1122
|
const parts = padding.split(" ");
|
|
1154
1123
|
switch (parts.length) {
|
|
1155
1124
|
case 4: {
|
|
@@ -1184,62 +1153,55 @@ var parsePadding = (padding) => {
|
|
|
1184
1153
|
};
|
|
1185
1154
|
}
|
|
1186
1155
|
}
|
|
1187
|
-
};
|
|
1188
|
-
var getActualPaddingX = (element) => {
|
|
1156
|
+
}, "parsePadding");
|
|
1157
|
+
var getActualPaddingX = /* @__PURE__ */ __name((element) => {
|
|
1189
1158
|
const padding = parsePadding(globalThis.getComputedStyle(element, null).getPropertyValue("padding"));
|
|
1190
1159
|
const paddingLeft = parseMeausureString(globalThis.getComputedStyle(element, null).getPropertyValue("padding-left") ?? padding?.left, element.clientWidth) ?? 0;
|
|
1191
1160
|
const paddingRight = parseMeausureString(globalThis.getComputedStyle(element, null).getPropertyValue("padding-right") ?? padding?.right, element.clientWidth) ?? 0;
|
|
1192
1161
|
return paddingLeft + paddingRight;
|
|
1193
|
-
};
|
|
1162
|
+
}, "getActualPaddingX");
|
|
1194
1163
|
|
|
1195
1164
|
// src/lib/networkComponents.tsx
|
|
1196
|
-
import {
|
|
1197
|
-
|
|
1198
|
-
HubRounded as HubRoundedIcon,
|
|
1199
|
-
InsertLinkRounded as InsertLinkRoundedIcon,
|
|
1200
|
-
Inventory2Rounded as Inventory2RoundedIcon,
|
|
1201
|
-
TimerRounded as TimerRoundedIcon,
|
|
1202
|
-
VisibilityRounded as VisibilityRoundedIcon
|
|
1203
|
-
} from "@mui/icons-material";
|
|
1204
|
-
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1165
|
+
import { BubbleChartRounded as BubbleChartRoundedIcon, HubRounded as HubRoundedIcon, InsertLinkRounded as InsertLinkRoundedIcon, Inventory2Rounded as Inventory2RoundedIcon, TimerRounded as TimerRoundedIcon, VisibilityRounded as VisibilityRoundedIcon } from "@mui/icons-material";
|
|
1166
|
+
import React25 from "react";
|
|
1205
1167
|
var networkComponents = [
|
|
1206
1168
|
{
|
|
1207
|
-
icon: (props) => /* @__PURE__ */
|
|
1169
|
+
icon: /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement(HubRoundedIcon, props), "icon"),
|
|
1208
1170
|
name: "Node",
|
|
1209
1171
|
slug: "node"
|
|
1210
1172
|
},
|
|
1211
1173
|
{
|
|
1212
|
-
icon: (props) => /* @__PURE__ */
|
|
1174
|
+
icon: /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement(TimerRoundedIcon, props), "icon"),
|
|
1213
1175
|
name: "Sentinel",
|
|
1214
1176
|
slug: "sentinel"
|
|
1215
1177
|
},
|
|
1216
1178
|
{
|
|
1217
|
-
icon: (props) => /* @__PURE__ */
|
|
1179
|
+
icon: /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement(InsertLinkRoundedIcon, props), "icon"),
|
|
1218
1180
|
name: "Bridge",
|
|
1219
1181
|
slug: "bridge"
|
|
1220
1182
|
},
|
|
1221
1183
|
{
|
|
1222
|
-
icon: (props) => /* @__PURE__ */
|
|
1184
|
+
icon: /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement(Inventory2RoundedIcon, props), "icon"),
|
|
1223
1185
|
name: "Archivist",
|
|
1224
1186
|
slug: "archivist"
|
|
1225
1187
|
},
|
|
1226
1188
|
{
|
|
1227
|
-
icon: (props) => /* @__PURE__ */
|
|
1189
|
+
icon: /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement(BubbleChartRoundedIcon, props), "icon"),
|
|
1228
1190
|
name: "Diviner",
|
|
1229
1191
|
slug: "diviner"
|
|
1230
1192
|
},
|
|
1231
1193
|
{
|
|
1232
|
-
icon: (props) => /* @__PURE__ */
|
|
1194
|
+
icon: /* @__PURE__ */ __name((props) => /* @__PURE__ */ React25.createElement(VisibilityRoundedIcon, props), "icon"),
|
|
1233
1195
|
name: "Witness",
|
|
1234
1196
|
slug: "witness"
|
|
1235
1197
|
}
|
|
1236
1198
|
];
|
|
1237
|
-
var findNetworkComponentIndex = (slug) => {
|
|
1199
|
+
var findNetworkComponentIndex = /* @__PURE__ */ __name((slug) => {
|
|
1238
1200
|
return networkComponents.findIndex((info) => info.slug === slug);
|
|
1239
|
-
};
|
|
1240
|
-
var findNetworkComponent = (slug) => {
|
|
1201
|
+
}, "findNetworkComponentIndex");
|
|
1202
|
+
var findNetworkComponent = /* @__PURE__ */ __name((slug) => {
|
|
1241
1203
|
return networkComponents.find((info) => info.slug === slug);
|
|
1242
|
-
};
|
|
1204
|
+
}, "findNetworkComponent");
|
|
1243
1205
|
export {
|
|
1244
1206
|
AddressTableCell,
|
|
1245
1207
|
Ampersand,
|