@xyo-network/react-chain-blockchain 1.9.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/browser/components/block/BlockHeadingFlexbox.stories.d.ts +3 -3
  2. package/dist/browser/components/block/BlockHeadingFlexbox.stories.d.ts.map +1 -1
  3. package/dist/browser/components/block/table/Ex.stories.d.ts +3 -3
  4. package/dist/browser/components/block/table/Ex.stories.d.ts.map +1 -1
  5. package/dist/browser/components/block/table/row/TableRow.stories.d.ts +2 -2
  6. package/dist/browser/components/block/table/row/TableRow.stories.d.ts.map +1 -1
  7. package/dist/browser/components/chain/controls/PulseSvgIcon.d.ts +1 -1
  8. package/dist/browser/components/chain/controls/PulseSvgIcon.d.ts.map +1 -1
  9. package/dist/browser/components/chain/render/dynamic/flexbox/Flexbox.stories.d.ts +3 -3
  10. package/dist/browser/components/chain/render/dynamic/flexbox/Flexbox.stories.d.ts.map +1 -1
  11. package/dist/browser/components/chain/render/dynamic/flexbox/Remote.stories.d.ts +3 -3
  12. package/dist/browser/components/chain/render/dynamic/flexbox/Remote.stories.d.ts.map +1 -1
  13. package/dist/browser/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.d.ts.map +1 -1
  14. package/dist/browser/components/chain/render/dynamic/hooks/useRemoteBlockChainRenderProps.d.ts.map +1 -1
  15. package/dist/browser/components/chain/render/static/flexbox/Flexbox.stories.d.ts +3 -3
  16. package/dist/browser/components/chain/render/static/flexbox/Flexbox.stories.d.ts.map +1 -1
  17. package/dist/browser/components/chain/render/static/hooks/useStaticBlockRenderComponents.d.ts.map +1 -1
  18. package/dist/browser/components/chain/render/static/table/Ex.stories.d.ts +3 -3
  19. package/dist/browser/components/chain/render/static/table/Ex.stories.d.ts.map +1 -1
  20. package/dist/browser/components/chain/stats/producer/ProducerFlexbox.d.ts +1 -1
  21. package/dist/browser/components/chain/stats/producer/ProducerFlexbox.d.ts.map +1 -1
  22. package/dist/browser/components/chain/styled/BlockListWrapperFlexbox.d.ts +1 -1
  23. package/dist/browser/components/chain/styled/BlockListWrapperFlexbox.d.ts.map +1 -1
  24. package/dist/browser/components/payload/builder/producer-intent/Flexbox.stories.d.ts +1 -1
  25. package/dist/browser/components/payload/builder/producer-intent/Flexbox.stories.d.ts.map +1 -1
  26. package/dist/browser/components/payload/builder/transfer/Flexbox.stories.d.ts +1 -1
  27. package/dist/browser/components/payload/builder/transfer/Flexbox.stories.d.ts.map +1 -1
  28. package/dist/browser/components/transactions/submit/SubmitChain.stories.d.ts +1 -1
  29. package/dist/browser/components/transactions/submit/SubmitChain.stories.d.ts.map +1 -1
  30. package/dist/browser/hooks/chain-iterator/useChainIteratorParams.d.ts +1 -1
  31. package/dist/browser/index.mjs +1142 -1321
  32. package/dist/browser/index.mjs.map +1 -1
  33. package/dist/browser/types/render/BlockChainRenderProps.d.ts +2 -1
  34. package/dist/browser/types/render/BlockChainRenderProps.d.ts.map +1 -1
  35. package/package.json +62 -60
  36. package/src/components/chain/render/dynamic/flexbox/Flexbox.stories.tsx +2 -1
  37. package/src/components/chain/render/dynamic/flexbox/Remote.stories.tsx +2 -1
  38. package/src/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.ts +2 -1
  39. package/src/components/chain/render/dynamic/hooks/useRemoteBlockChainRenderProps.ts +2 -1
  40. package/src/components/chain/render/static/flexbox/Flexbox.stories.tsx +3 -2
  41. package/src/components/chain/render/static/hooks/useStaticBlockRenderComponents.ts +2 -1
  42. package/src/components/chain/render/static/table/Ex.stories.tsx +3 -2
  43. package/src/types/render/BlockChainRenderProps.ts +2 -1
@@ -1,11 +1,7 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/components/block/BlockHeadingFlexbox.tsx
5
2
  import { FlexCol as FlexCol2, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
6
3
  import { BWVerification, HashHeadingPaper } from "@xyo-network/react-boundwitness-plugin";
7
4
  import { usePayloadHash } from "@xyo-network/react-shared";
8
- import React14 from "react";
9
5
 
10
6
  // src/context/analyzer/context.ts
11
7
  import { createContextEx } from "@xylabs/react-shared";
@@ -13,22 +9,19 @@ var ChainAnalyzersContext = createContextEx();
13
9
 
14
10
  // src/context/analyzer/Provider.tsx
15
11
  import { isUndefined } from "@xylabs/typeof";
16
- import React, { useCallback, useMemo, useState } from "react";
17
- var ChainAnalyzersProvider = /* @__PURE__ */ __name(({ analyzers: analyzersProp, children }) => {
12
+ import {
13
+ useCallback,
14
+ useMemo,
15
+ useState
16
+ } from "react";
17
+ import { jsx } from "react/jsx-runtime";
18
+ var ChainAnalyzersProvider = ({ analyzers: analyzersProp, children }) => {
18
19
  const [analyzersState, setAnalyzersState] = useState(analyzersProp ?? {});
19
20
  const [statsUpdated, setStatsUpdated] = useState(Date.now());
20
- const analyzers = useMemo(() => ({
21
- ...analyzersProp,
22
- ...analyzersState
23
- }), [
24
- analyzersProp
25
- ]);
21
+ const analyzers = useMemo(() => ({ ...analyzersProp, ...analyzersState }), [analyzersProp]);
26
22
  const addAnalyzers = useCallback((analyzers2) => {
27
23
  if (isUndefined(analyzers2)) return;
28
- setAnalyzersState((prev) => ({
29
- ...prev,
30
- ...analyzers2
31
- }));
24
+ setAnalyzersState((prev) => ({ ...prev, ...analyzers2 }));
32
25
  }, []);
33
26
  const onBlock = useCallback(async (hydratedBlock) => {
34
27
  await Promise.resolve();
@@ -36,64 +29,55 @@ var ChainAnalyzersProvider = /* @__PURE__ */ __name(({ analyzers: analyzersProp,
36
29
  void analyzer.onBlock(hydratedBlock);
37
30
  setStatsUpdated(Date.now());
38
31
  }
39
- }, [
40
- analyzers
41
- ]);
32
+ }, [analyzers]);
42
33
  const value = useMemo(() => ({
43
34
  analyzers,
44
35
  addAnalyzers,
45
36
  onBlock,
46
37
  statsUpdated,
47
38
  provided: true
48
- }), [
49
- analyzers,
50
- addAnalyzers,
51
- onBlock,
52
- statsUpdated
53
- ]);
54
- return /* @__PURE__ */ React.createElement(ChainAnalyzersContext, {
55
- value
56
- }, children);
57
- }, "ChainAnalyzersProvider");
39
+ }), [analyzers, addAnalyzers, onBlock, statsUpdated]);
40
+ return /* @__PURE__ */ jsx(ChainAnalyzersContext, { value, children });
41
+ };
58
42
 
59
43
  // src/context/analyzer/use.ts
60
44
  import { useContextEx } from "@xylabs/react-shared";
61
- var useChainAnalyzersContext = /* @__PURE__ */ __name((required = false) => useContextEx(ChainAnalyzersContext, "ChainAnalyzers", required), "useChainAnalyzersContext");
45
+ var useChainAnalyzersContext = (required = false) => useContextEx(ChainAnalyzersContext, "ChainAnalyzers", required);
62
46
 
63
47
  // src/context/chain/Context.ts
64
48
  import { createContextEx as createContextEx2 } from "@xylabs/react-shared";
65
49
  var ChainInfoContext = createContextEx2();
66
50
 
67
51
  // src/context/chain/Provider.tsx
68
- import React2, { useMemo as useMemo2, useState as useState2 } from "react";
69
- var ChainInfoProvider = /* @__PURE__ */ __name(({ children, chainArchivist: chainArchivistProp, chainId: chainIdProp, chainIterator: chainIteratorProp }) => {
52
+ import { useMemo as useMemo2, useState as useState2 } from "react";
53
+ import { jsx as jsx2 } from "react/jsx-runtime";
54
+ var ChainInfoProvider = ({
55
+ children,
56
+ chainArchivist: chainArchivistProp,
57
+ chainId: chainIdProp,
58
+ chainIterator: chainIteratorProp
59
+ }) => {
70
60
  const [chainArchivist, setChainArchivist] = useState2(chainArchivistProp);
71
61
  const [chainId, setChainId] = useState2(chainIdProp);
72
62
  const [chainIterator, setChainIterator] = useState2(chainIteratorProp);
73
- const updateChainArchivist = /* @__PURE__ */ __name((chainArchivist2) => {
63
+ const updateChainArchivist = (chainArchivist2) => {
74
64
  setChainArchivist(chainArchivist2);
75
- }, "updateChainArchivist");
76
- const updateChainId = /* @__PURE__ */ __name((chainId2) => {
65
+ };
66
+ const updateChainId = (chainId2) => {
77
67
  setChainId(chainId2);
78
- }, "updateChainId");
79
- const updateChainIterator = /* @__PURE__ */ __name((chainIterator2) => {
68
+ };
69
+ const updateChainIterator = (chainIterator2) => {
80
70
  setChainIterator(chainIterator2);
81
- }, "updateChainIterator");
71
+ };
82
72
  useMemo2(() => {
83
73
  updateChainArchivist(chainArchivistProp);
84
- }, [
85
- chainArchivistProp
86
- ]);
74
+ }, [chainArchivistProp]);
87
75
  useMemo2(() => {
88
76
  updateChainId(chainIdProp);
89
- }, [
90
- chainIdProp
91
- ]);
77
+ }, [chainIdProp]);
92
78
  useMemo2(() => {
93
79
  updateChainIterator(chainIteratorProp);
94
- }, [
95
- chainIteratorProp
96
- ]);
80
+ }, [chainIteratorProp]);
97
81
  const chainState = useMemo2(() => ({
98
82
  chainArchivist,
99
83
  chainId,
@@ -102,26 +86,22 @@ var ChainInfoProvider = /* @__PURE__ */ __name(({ children, chainArchivist: chai
102
86
  updateChainId,
103
87
  updateChainIterator,
104
88
  provided: true
105
- }), [
106
- chainArchivist,
107
- chainId,
108
- chainIterator,
109
- updateChainArchivist,
110
- updateChainId,
111
- updateChainIterator
112
- ]);
113
- return /* @__PURE__ */ React2.createElement(ChainInfoContext, {
114
- value: chainState
115
- }, children);
116
- }, "ChainInfoProvider");
89
+ }), [chainArchivist, chainId, chainIterator, updateChainArchivist, updateChainId, updateChainIterator]);
90
+ return /* @__PURE__ */ jsx2(ChainInfoContext, { value: chainState, children });
91
+ };
117
92
 
118
93
  // src/context/polling/context.ts
119
94
  import { createContextEx as createContextEx3 } from "@xylabs/react-shared";
120
95
  var ChainPollingContext = createContextEx3();
121
96
 
122
97
  // src/context/polling/Provider.tsx
123
- import React3, { useCallback as useCallback2, useMemo as useMemo3, useState as useState3 } from "react";
124
- var ChainPollingProvider = /* @__PURE__ */ __name(({ children, pollingState: pollingStateProp = "running" }) => {
98
+ import {
99
+ useCallback as useCallback2,
100
+ useMemo as useMemo3,
101
+ useState as useState3
102
+ } from "react";
103
+ import { jsx as jsx3 } from "react/jsx-runtime";
104
+ var ChainPollingProvider = ({ children, pollingState: pollingStateProp = "running" }) => {
125
105
  const [pollingState, setPollingState] = useState3(pollingStateProp);
126
106
  const updatePollingState = useCallback2((newPollingState) => {
127
107
  setPollingState(newPollingState);
@@ -130,27 +110,26 @@ var ChainPollingProvider = /* @__PURE__ */ __name(({ children, pollingState: pol
130
110
  pollingState,
131
111
  provided: true,
132
112
  updatePollingState
133
- }), [
134
- pollingState,
135
- updatePollingState
136
- ]);
137
- return /* @__PURE__ */ React3.createElement(ChainPollingContext, {
138
- value
139
- }, children);
140
- }, "ChainPollingProvider");
113
+ }), [pollingState, updatePollingState]);
114
+ return /* @__PURE__ */ jsx3(ChainPollingContext, { value, children });
115
+ };
141
116
 
142
117
  // src/context/polling/use.ts
143
118
  import { useContextEx as useContextEx2 } from "@xylabs/react-shared";
144
- var useChainPollingContext = /* @__PURE__ */ __name((required = false) => useContextEx2(ChainPollingContext, "ChainPolling", required), "useChainPollingContext");
119
+ var useChainPollingContext = (required = false) => useContextEx2(ChainPollingContext, "ChainPolling", required);
145
120
 
146
121
  // src/components/transactions/submit/Builder.tsx
147
- import { Button, FormControl, TextField } from "@mui/material";
122
+ import {
123
+ Button,
124
+ FormControl,
125
+ TextField
126
+ } from "@mui/material";
148
127
  import { toHex } from "@xylabs/hex";
149
128
  import { FlexCol } from "@xylabs/react-flexbox";
150
129
  import { defaultTransactionFees } from "@xyo-network/xl1-protocol";
151
- import React4 from "react";
152
- var ChainTransactionBuilder = /* @__PURE__ */ __name(({ onSubmitTx }) => {
153
- const handleSubmit = /* @__PURE__ */ __name(async (event) => {
130
+ import { jsx as jsx4, jsxs } from "react/jsx-runtime";
131
+ var ChainTransactionBuilder = ({ onSubmitTx }) => {
132
+ const handleSubmit = async (event) => {
154
133
  event.preventDefault();
155
134
  const formData = new FormData(event.currentTarget);
156
135
  const chainTx = {
@@ -165,50 +144,31 @@ var ChainTransactionBuilder = /* @__PURE__ */ __name(({ onSubmitTx }) => {
165
144
  }
166
145
  };
167
146
  await onSubmitTx?.(chainTx);
168
- }, "handleSubmit");
169
- return /* @__PURE__ */ React4.createElement("form", {
170
- onSubmit: /* @__PURE__ */ __name((event) => void handleSubmit(event), "onSubmit"),
171
- style: {
172
- width: "100%"
173
- }
174
- }, /* @__PURE__ */ React4.createElement(FlexCol, {
175
- gap: 2
176
- }, /* @__PURE__ */ React4.createElement(FormControl, {
177
- fullWidth: true
178
- }, /* @__PURE__ */ React4.createElement(TextField, {
179
- label: "Chain Address",
180
- name: "chain",
181
- required: true
182
- })), /* @__PURE__ */ React4.createElement(FormControl, {
183
- fullWidth: true
184
- }, /* @__PURE__ */ React4.createElement(TextField, {
185
- label: "Gas",
186
- name: "gas",
187
- required: true
188
- })), /* @__PURE__ */ React4.createElement(FormControl, {
189
- fullWidth: true
190
- }, /* @__PURE__ */ React4.createElement(TextField, {
191
- label: "Not Before Block",
192
- name: "nbf",
193
- required: true
194
- })), /* @__PURE__ */ React4.createElement(FormControl, {
195
- fullWidth: true
196
- }, /* @__PURE__ */ React4.createElement(TextField, {
197
- label: "Not After Block",
198
- name: "exp",
199
- required: true
200
- })), /* @__PURE__ */ React4.createElement(Button, {
201
- type: "submit",
202
- variant: "contained"
203
- }, "Submit")));
204
- }, "ChainTransactionBuilder");
147
+ };
148
+ return /* @__PURE__ */ jsx4("form", { onSubmit: (event) => void handleSubmit(event), style: { width: "100%" }, children: /* @__PURE__ */ jsxs(FlexCol, { gap: 2, children: [
149
+ /* @__PURE__ */ jsx4(FormControl, { fullWidth: true, children: /* @__PURE__ */ jsx4(TextField, { label: "Chain Address", name: "chain", required: true }) }),
150
+ /* @__PURE__ */ jsx4(FormControl, { fullWidth: true, children: /* @__PURE__ */ jsx4(TextField, { label: "Gas", name: "gas", required: true }) }),
151
+ /* @__PURE__ */ jsx4(FormControl, { fullWidth: true, children: /* @__PURE__ */ jsx4(TextField, { label: "Not Before Block", name: "nbf", required: true }) }),
152
+ /* @__PURE__ */ jsx4(FormControl, { fullWidth: true, children: /* @__PURE__ */ jsx4(TextField, { label: "Not After Block", name: "exp", required: true }) }),
153
+ /* @__PURE__ */ jsx4(Button, { type: "submit", variant: "contained", children: "Submit" })
154
+ ] }) });
155
+ };
205
156
 
206
157
  // src/components/transactions/submit/Network.tsx
207
- import { FormControl as FormControl2, FormHelperText, TextField as TextField2 } from "@mui/material";
208
- import React5, { useState as useState4 } from "react";
209
- var ChainTransactionNetwork = /* @__PURE__ */ __name(({ network, onNetworkChange, ...props }) => {
158
+ import {
159
+ FormControl as FormControl2,
160
+ FormHelperText,
161
+ TextField as TextField2
162
+ } from "@mui/material";
163
+ import { useState as useState4 } from "react";
164
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
165
+ var ChainTransactionNetwork = ({
166
+ network,
167
+ onNetworkChange,
168
+ ...props
169
+ }) => {
210
170
  const [error, setError] = useState4();
211
- const handleChange = /* @__PURE__ */ __name((event) => {
171
+ const handleChange = (event) => {
212
172
  try {
213
173
  const url = new URL(event.target.value);
214
174
  setError(void 0);
@@ -217,25 +177,19 @@ var ChainTransactionNetwork = /* @__PURE__ */ __name(({ network, onNetworkChange
217
177
  console.error(error2);
218
178
  setError(error2);
219
179
  }
220
- }, "handleChange");
221
- return /* @__PURE__ */ React5.createElement(FormControl2, {
222
- fullWidth: true
223
- }, /* @__PURE__ */ React5.createElement(TextField2, {
224
- label: "Network",
225
- name: "network",
226
- onChange: handleChange,
227
- required: true,
228
- value: network,
229
- ...props
230
- }), /* @__PURE__ */ React5.createElement(FormHelperText, {
231
- sx: {
232
- color: error ? "red" : void 0
233
- }
234
- }, error ? "Not a valid url" : "Enter full url of archivist"));
235
- }, "ChainTransactionNetwork");
180
+ };
181
+ return /* @__PURE__ */ jsxs2(FormControl2, { fullWidth: true, children: [
182
+ /* @__PURE__ */ jsx5(TextField2, { label: "Network", name: "network", onChange: handleChange, required: true, value: network, ...props }),
183
+ /* @__PURE__ */ jsx5(FormHelperText, { sx: { color: error ? "red" : void 0 }, children: error ? "Not a valid url" : "Enter full url of archivist" })
184
+ ] });
185
+ };
236
186
 
237
187
  // src/components/transactions/submit/SubmitChain.tsx
238
- import { Alert, Grid, Typography } from "@mui/material";
188
+ import {
189
+ Alert,
190
+ Grid,
191
+ Typography
192
+ } from "@mui/material";
239
193
  import { axios } from "@xylabs/axios";
240
194
  import { ErrorRender } from "@xylabs/react-error";
241
195
  import { FlexGrowCol } from "@xylabs/react-flexbox";
@@ -244,100 +198,113 @@ import { ArchivistInsertQuerySchema } from "@xyo-network/archivist-model";
244
198
  import { QueryBoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
245
199
  import { PayloadBuilder } from "@xyo-network/payload-builder";
246
200
  import { buildTransaction } from "@xyo-network/xl1-protocol-sdk";
247
- import React6, { useState as useState5 } from "react";
201
+ import { useState as useState5 } from "react";
202
+ import { Fragment, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
248
203
  var BETA_PENDING_TRANSACTIONS_ARCHIVIST = "https://beta.api.chain.xyo.network/8050fee682a2762f504d5449d8269a6f17f0b693";
249
204
  var defaultNetwork = new URL(BETA_PENDING_TRANSACTIONS_ARCHIVIST);
250
- var SubmitChainTransaction = /* @__PURE__ */ __name(() => {
205
+ var SubmitChainTransaction = () => {
251
206
  const [network, setNetwork] = useState5(defaultNetwork);
252
207
  const [result, setResult] = useState5();
253
208
  const [error, setError] = useState5();
254
- const onSubmitTx = /* @__PURE__ */ __name(async (chainTx) => {
209
+ const onSubmitTx = async (chainTx) => {
255
210
  if (network) {
256
211
  const randomAccount = await Account.random();
257
- const [transactionBoundWitness] = await buildTransaction(chainTx.chain, [], [], randomAccount, chainTx.nbf, chainTx.exp);
258
- const insertQuery = new PayloadBuilder({
259
- schema: ArchivistInsertQuerySchema
260
- }).build();
261
- const [queryBoundWitness] = await new QueryBoundWitnessBuilder().payloads([
262
- transactionBoundWitness
263
- ]).query(insertQuery).signer(randomAccount).build();
264
- const response = await axios.post(network.href, [
265
- queryBoundWitness,
266
- [
267
- insertQuery,
268
- transactionBoundWitness,
269
- chainTx
270
- ]
271
- ]);
212
+ const [transactionBoundWitness] = await buildTransaction(
213
+ chainTx.chain,
214
+ [],
215
+ [],
216
+ randomAccount,
217
+ chainTx.nbf,
218
+ chainTx.exp
219
+ );
220
+ const insertQuery = new PayloadBuilder({ schema: ArchivistInsertQuerySchema }).build();
221
+ const [queryBoundWitness] = await new QueryBoundWitnessBuilder().payloads([transactionBoundWitness]).query(insertQuery).signer(randomAccount).build();
222
+ const response = await axios.post(network.href, [queryBoundWitness, [insertQuery, transactionBoundWitness, chainTx]]);
272
223
  if (response.data.errors.length > 0) {
273
224
  setError(new Error(response.data.errors.map((e) => e.message).join("\n")));
274
225
  } else {
275
226
  setResult(response.data.data);
276
227
  }
277
228
  }
278
- }, "onSubmitTx");
279
- const onNetworkChange = /* @__PURE__ */ __name((url) => {
229
+ };
230
+ const onNetworkChange = (url) => {
280
231
  setNetwork(url);
281
- }, "onNetworkChange");
282
- return /* @__PURE__ */ React6.createElement(Grid, {
283
- container: true
284
- }, /* @__PURE__ */ React6.createElement(Grid, {
285
- size: {
286
- xs: 12,
287
- sm: 6,
288
- md: 4
232
+ };
233
+ return /* @__PURE__ */ jsx6(Grid, { container: true, children: /* @__PURE__ */ jsx6(
234
+ Grid,
235
+ {
236
+ size: {
237
+ xs: 12,
238
+ sm: 6,
239
+ md: 4
240
+ },
241
+ children: /* @__PURE__ */ jsxs3(FlexGrowCol, { alignItems: "start", gap: 2, children: [
242
+ /* @__PURE__ */ jsx6(ChainTransactionNetwork, { network, onNetworkChange }),
243
+ network ? /* @__PURE__ */ jsx6(ChainTransactionBuilder, { onSubmitTx }) : null,
244
+ result?.[2].length === 0 ? /* @__PURE__ */ jsx6(Alert, { severity: "success", children: "Success" }) : null,
245
+ error ? /* @__PURE__ */ jsx6(ErrorRender, { error }) : null,
246
+ result?.[2] && result?.[2].length > 0 ? /* @__PURE__ */ jsx6(ErrorRender, { error: new Error("Failed insert...see result below") }) : null,
247
+ result ? /* @__PURE__ */ jsxs3(Fragment, { children: [
248
+ /* @__PURE__ */ jsx6(Typography, { variant: "h6", children: "Result:" }),
249
+ /* @__PURE__ */ jsx6("pre", { children: JSON.stringify(result, null, 2) })
250
+ ] }) : null
251
+ ] })
289
252
  }
290
- }, /* @__PURE__ */ React6.createElement(FlexGrowCol, {
291
- alignItems: "start",
292
- gap: 2
293
- }, /* @__PURE__ */ React6.createElement(ChainTransactionNetwork, {
294
- network,
295
- onNetworkChange
296
- }), network ? /* @__PURE__ */ React6.createElement(ChainTransactionBuilder, {
297
- onSubmitTx
298
- }) : null, result?.[2].length === 0 ? /* @__PURE__ */ React6.createElement(Alert, {
299
- severity: "success"
300
- }, "Success") : null, error ? /* @__PURE__ */ React6.createElement(ErrorRender, {
301
- error
302
- }) : null, result?.[2] && result?.[2].length > 0 ? /* @__PURE__ */ React6.createElement(ErrorRender, {
303
- error: new Error("Failed insert...see result below")
304
- }) : null, result ? /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(Typography, {
305
- variant: "h6"
306
- }, "Result:"), /* @__PURE__ */ React6.createElement("pre", null, JSON.stringify(result, null, 2))) : null)));
307
- }, "SubmitChainTransaction");
253
+ ) });
254
+ };
308
255
 
309
256
  // src/components/transactions/TransactionCountChip.tsx
310
257
  import CompareArrowsIcon from "@mui/icons-material/CompareArrows";
311
258
  import { Chip, Icon } from "@mui/material";
312
- import React7, { useMemo as useMemo4 } from "react";
313
- var TransactionCountChip = /* @__PURE__ */ __name(({ transactions, sx, ...props }) => {
259
+ import { useMemo as useMemo4 } from "react";
260
+ import { jsx as jsx7 } from "react/jsx-runtime";
261
+ var TransactionCountChip = ({
262
+ transactions,
263
+ sx,
264
+ ...props
265
+ }) => {
314
266
  const label = useMemo4(() => {
315
267
  if (!transactions) return "0";
316
268
  return transactions?.length > 10 ? "+10" : transactions.length;
317
- }, [
318
- transactions
319
- ]);
320
- return /* @__PURE__ */ React7.createElement(Chip, {
321
- avatar: /* @__PURE__ */ React7.createElement(Icon, null, /* @__PURE__ */ React7.createElement(CompareArrowsIcon, null)),
322
- label,
323
- title: transactions ? `Block contains ${transactions.length} transactions` : void 0,
324
- sx: {
325
- display: "inline-flex",
326
- alignItems: "center",
327
- justifyContent: "center",
328
- ...sx
329
- },
330
- ...props
331
- });
332
- }, "TransactionCountChip");
269
+ }, [transactions]);
270
+ return /* @__PURE__ */ jsx7(
271
+ Chip,
272
+ {
273
+ avatar: /* @__PURE__ */ jsx7(Icon, { children: /* @__PURE__ */ jsx7(CompareArrowsIcon, {}) }),
274
+ label,
275
+ title: transactions ? `Block contains ${transactions.length} transactions` : void 0,
276
+ sx: {
277
+ display: "inline-flex",
278
+ alignItems: "center",
279
+ justifyContent: "center",
280
+ ...sx
281
+ },
282
+ ...props
283
+ }
284
+ );
285
+ };
333
286
 
334
287
  // src/components/transactions/TransactionsQuickTipButton.tsx
335
288
  import { ContentCopy as ContentCopyIcon, Paid } from "@mui/icons-material";
336
- import { Alert as Alert2, AlertTitle, Collapse, Snackbar, Typography as Typography2 } from "@mui/material";
289
+ import {
290
+ Alert as Alert2,
291
+ AlertTitle,
292
+ Collapse,
293
+ Snackbar,
294
+ Typography as Typography2
295
+ } from "@mui/material";
337
296
  import { ErrorRender as ErrorRender2 } from "@xylabs/react-error";
338
- import { FlexGrowCol as FlexGrowCol2, FlexGrowRow, FlexRow } from "@xylabs/react-flexbox";
297
+ import {
298
+ FlexGrowCol as FlexGrowCol2,
299
+ FlexGrowRow,
300
+ FlexRow
301
+ } from "@xylabs/react-flexbox";
339
302
  import { QuickTipButton } from "@xylabs/react-quick-tip-button";
340
- import React8, { Fragment, useMemo as useMemo6, useState as useState7 } from "react";
303
+ import {
304
+ Fragment as Fragment2,
305
+ useMemo as useMemo6,
306
+ useState as useState7
307
+ } from "react";
341
308
 
342
309
  // src/hooks/chain-iterator/ChainIteratorStore.ts
343
310
  import { assertEx } from "@xylabs/assert";
@@ -345,9 +312,6 @@ import { ChainBlockNumberIterationService } from "@xyo-network/chain-services";
345
312
  import { PayloadBuilder as PayloadBuilder2 } from "@xyo-network/payload-builder";
346
313
  import { hydrateBlock } from "@xyo-network/xl1-protocol-sdk";
347
314
  var ChainIteratorStore = class _ChainIteratorStore {
348
- static {
349
- __name(this, "ChainIteratorStore");
350
- }
351
315
  _chainIterator;
352
316
  _externalListeners = [];
353
317
  _internalUnsubscribes = [];
@@ -368,14 +332,14 @@ var ChainIteratorStore = class _ChainIteratorStore {
368
332
  chainIterator,
369
333
  head: hydratedHead
370
334
  };
371
- const headUpdatedListener = /* @__PURE__ */ __name(async ({ blocks }) => {
335
+ const headUpdatedListener = async ({ blocks }) => {
372
336
  const hydratedBlock = await hydrateBlock(params.chainArchivist, await PayloadBuilder2.hash(blocks?.[0]));
373
337
  instance._values = {
374
338
  chainIterator,
375
339
  head: hydratedBlock
376
340
  };
377
341
  instance.emitChange();
378
- }, "headUpdatedListener");
342
+ };
379
343
  const unsubscribe = chainIterator.on("headUpdated", headUpdatedListener);
380
344
  const weakRefListener = new WeakRef(unsubscribe);
381
345
  instance._internalUnsubscribes.push(weakRefListener);
@@ -411,25 +375,29 @@ import { isDefined } from "@xylabs/typeof";
411
375
  import { BoundWitnessBuilder } from "@xyo-network/boundwitness-builder";
412
376
  import { isBlockBoundWitness } from "@xyo-network/xl1-protocol";
413
377
  import { getDefaultConfig } from "@xyo-network/xl1-protocol-sdk";
414
- var resolveDefinedHead = /* @__PURE__ */ __name(async (head, chainArchivist) => {
415
- const [headPayload] = await chainArchivist.get([
416
- head
417
- ]);
378
+ var resolveDefinedHead = async (head, chainArchivist) => {
379
+ const [headPayload] = await chainArchivist.get([head]);
418
380
  if (headPayload === void 0) {
419
381
  const [currentHead] = await new BoundWitnessBuilder().build();
420
382
  return currentHead;
421
383
  } else {
422
384
  return assertEx2(isBlockBoundWitness(headPayload) ? headPayload : void 0, () => `Expected a block bound witness: ${JSON.stringify(headPayload)}`);
423
385
  }
424
- }, "resolveDefinedHead");
425
- var useChainIteratorParams = /* @__PURE__ */ __name(({ chainArchivist, chainId, head, name }) => {
386
+ };
387
+ var useChainIteratorParams = ({
388
+ chainArchivist,
389
+ chainId,
390
+ head,
391
+ name
392
+ }) => {
426
393
  return usePromise(async () => {
427
394
  if (isDefined(chainArchivist) && isDefined(chainId) && isHash(head)) {
428
- const [result] = await chainArchivist.get([
429
- head
430
- ]);
395
+ const [result] = await chainArchivist.get([head]);
431
396
  const foundResult = assertEx2(result, () => `Head not found: ${head}`);
432
- const resolvedHead = assertEx2(isBlockBoundWitness(foundResult) ? foundResult : void 0, () => `Head is not a boundwitness: ${JSON.stringify(foundResult)}`);
397
+ const resolvedHead = assertEx2(
398
+ isBlockBoundWitness(foundResult) ? foundResult : void 0,
399
+ () => `Head is not a boundwitness: ${JSON.stringify(foundResult)}`
400
+ );
433
401
  const config = getDefaultConfig();
434
402
  config.chain.id = chainId;
435
403
  return {
@@ -440,26 +408,32 @@ var useChainIteratorParams = /* @__PURE__ */ __name(({ chainArchivist, chainId,
440
408
  name
441
409
  };
442
410
  }
443
- }, [
444
- chainArchivist,
445
- chainId,
446
- head
447
- ]);
448
- }, "useChainIteratorParams");
411
+ }, [chainArchivist, chainId, head]);
412
+ };
449
413
 
450
414
  // src/hooks/chain-iterator/useChainIteratorStore.ts
451
415
  import { usePromise as usePromise2 } from "@xylabs/react-promise";
452
- import { useEffect as useEffect2, useMemo as useMemo5, useRef, useSyncExternalStore } from "react";
416
+ import {
417
+ useEffect as useEffect2,
418
+ useMemo as useMemo5,
419
+ useRef,
420
+ useSyncExternalStore
421
+ } from "react";
453
422
 
454
423
  // src/hooks/chain-iterator/useChainIteratorUpdatingHead.ts
455
424
  import { toHex as toHex2 } from "@xylabs/hex";
456
425
  import { findMostRecentBlock } from "@xyo-network/chain-protocol";
457
426
  import { useEffect, useState as useState6 } from "react";
458
- var useChainIteratorUpdatingHead = /* @__PURE__ */ __name(({ chainIterator, interval = 500, maxBlocks, chainArchivist }) => {
427
+ var useChainIteratorUpdatingHead = ({
428
+ chainIterator,
429
+ interval = 500,
430
+ maxBlocks,
431
+ chainArchivist
432
+ }) => {
459
433
  const [error, setError] = useState6();
460
434
  useEffect(() => {
461
435
  let pollArchivistTimeout;
462
- const pollingFunction = /* @__PURE__ */ __name(async () => {
436
+ const pollingFunction = async () => {
463
437
  if (chainIterator && chainArchivist) {
464
438
  try {
465
439
  const currentHead = await chainIterator.head();
@@ -480,46 +454,34 @@ var useChainIteratorUpdatingHead = /* @__PURE__ */ __name(({ chainIterator, inte
480
454
  }
481
455
  }
482
456
  pollArchivistTimeout = setTimeout(() => void pollingFunction(), interval);
483
- }, "pollingFunction");
457
+ };
484
458
  void pollingFunction();
485
459
  return () => clearInterval(pollArchivistTimeout);
486
- }, [
487
- interval,
488
- chainIterator,
489
- chainArchivist,
490
- maxBlocks
491
- ]);
460
+ }, [interval, chainIterator, chainArchivist, maxBlocks]);
492
461
  return error;
493
- }, "useChainIteratorUpdatingHead");
462
+ };
494
463
 
495
464
  // src/hooks/chain-iterator/useChainIteratorStore.ts
496
465
  var stub = {};
497
- var useChainIteratorStore = /* @__PURE__ */ __name((chainIteratorParams) => {
466
+ var useChainIteratorStore = (chainIteratorParams) => {
498
467
  const [chainIteratorStore] = usePromise2(async () => {
499
468
  return chainIteratorParams ? await ChainIteratorStore.create(chainIteratorParams) : void 0;
500
- }, [
501
- chainIteratorParams
502
- ]);
469
+ }, [chainIteratorParams]);
503
470
  const { chainIterator } = chainIteratorStore || {};
504
471
  const chainArchivist = chainIteratorParams?.chainArchivist;
505
- const error = useChainIteratorUpdatingHead({
506
- chainIterator,
507
- chainArchivist
508
- });
472
+ const error = useChainIteratorUpdatingHead({ chainIterator, chainArchivist });
509
473
  useEffect2(() => {
510
474
  return () => {
511
475
  if (chainIteratorStore) {
512
476
  chainIteratorStore.cleanup();
513
477
  }
514
478
  };
515
- }, [
516
- chainIteratorStore
517
- ]);
479
+ }, [chainIteratorStore]);
518
480
  const cachedSnapshot = useRef({});
519
481
  const { getSnapShot, subscribe } = useMemo5(() => {
520
482
  if (chainIteratorStore) {
521
483
  return {
522
- getSnapShot: /* @__PURE__ */ __name(() => {
484
+ getSnapShot: () => {
523
485
  const snapshot = chainIteratorStore.getSnapshot();
524
486
  const newValues = {
525
487
  ...snapshot,
@@ -533,20 +495,18 @@ var useChainIteratorStore = /* @__PURE__ */ __name((chainIteratorParams) => {
533
495
  return newValues;
534
496
  }
535
497
  return cachedSnapshot.current;
536
- }, "getSnapShot"),
498
+ },
537
499
  subscribe: chainIteratorStore.subscribe.bind(chainIteratorStore)
538
500
  };
539
501
  }
540
502
  return {
541
- getSnapShot: /* @__PURE__ */ __name(() => stub, "getSnapShot"),
542
- subscribe: /* @__PURE__ */ __name(() => () => {
543
- }, "subscribe")
503
+ getSnapShot: () => stub,
504
+ subscribe: () => () => {
505
+ }
544
506
  };
545
- }, [
546
- chainIteratorStore
547
- ]);
507
+ }, [chainIteratorStore]);
548
508
  return useSyncExternalStore(subscribe, getSnapShot);
549
- }, "useChainIteratorStore");
509
+ };
550
510
 
551
511
  // src/hooks/useIterateChain.ts
552
512
  import { assertEx as assertEx3 } from "@xylabs/assert";
@@ -555,23 +515,18 @@ import { ChainBlockNumberIterationService as ChainBlockNumberIterationService2 }
555
515
  import { PayloadBuilder as PayloadBuilder3 } from "@xyo-network/payload-builder";
556
516
  import { isBlockBoundWitness as isBlockBoundWitness2 } from "@xyo-network/xl1-protocol";
557
517
  import { hydrateBlock as hydrateBlock2 } from "@xyo-network/xl1-protocol-sdk";
558
- var getHydratedBlock = /* @__PURE__ */ __name(async (chainArchivist, head) => {
518
+ var getHydratedBlock = async (chainArchivist, head) => {
559
519
  const headHash = await PayloadBuilder3.hash(head);
560
520
  return await hydrateBlock2(chainArchivist, headHash);
561
- }, "getHydratedBlock");
562
- var iterateChain = /* @__PURE__ */ __name(async (chainIteratorParams, maxDepth) => {
521
+ };
522
+ var iterateChain = async (chainIteratorParams, maxDepth) => {
563
523
  const { chainArchivist, head } = chainIteratorParams ?? {};
564
524
  const headPayload = assertEx3(isBlockBoundWitness2(head) ? head : null, () => "Head is not a Block Bound Witness");
565
525
  const headBlockBoundWitness = assertEx3(isBlockBoundWitness2(headPayload) ? headPayload : null, () => "Invalid head block");
566
- const chainIterator = await ChainBlockNumberIterationService2.create({
567
- head: headBlockBoundWitness,
568
- chainArchivist
569
- });
526
+ const chainIterator = await ChainBlockNumberIterationService2.create({ head: headBlockBoundWitness, chainArchivist });
570
527
  const chainHead = await chainIterator.head();
571
528
  let block = await getHydratedBlock(chainArchivist, chainHead);
572
- const blocks = [
573
- block
574
- ];
529
+ const blocks = [block];
575
530
  let depth = 1;
576
531
  while (true) {
577
532
  const [, next] = await chainIterator.previous(block[0].block, 2);
@@ -582,15 +537,12 @@ var iterateChain = /* @__PURE__ */ __name(async (chainIteratorParams, maxDepth)
582
537
  if (maxDepth !== void 0 && depth >= maxDepth || block?.[0].block === 0) break;
583
538
  }
584
539
  return blocks;
585
- }, "iterateChain");
586
- var useIterateChain = /* @__PURE__ */ __name((chainIteratorParams, maxDepth) => {
540
+ };
541
+ var useIterateChain = (chainIteratorParams, maxDepth) => {
587
542
  return usePromise3(async () => {
588
543
  return await iterateChain(chainIteratorParams, maxDepth);
589
- }, [
590
- chainIteratorParams,
591
- maxDepth
592
- ]);
593
- }, "useIterateChain");
544
+ }, [chainIteratorParams, maxDepth]);
545
+ };
594
546
 
595
547
  // src/hooks/useTxsFromBlock.ts
596
548
  import { usePromise as usePromise4 } from "@xylabs/react-promise";
@@ -598,92 +550,81 @@ import { usePromise as usePromise4 } from "@xylabs/react-promise";
598
550
  // src/helpers/txsFromBlock.ts
599
551
  import { HydratedBlockWrapper } from "@xyo-network/chain-wrappers";
600
552
  import { PayloadBuilder as PayloadBuilder4 } from "@xyo-network/payload-builder";
601
- var txsFromBlock = /* @__PURE__ */ __name(async (block) => {
553
+ var txsFromBlock = async (block) => {
602
554
  const wrapper = await HydratedBlockWrapper.parse(block);
603
555
  const txs = wrapper.transactions;
604
556
  const txPayloads = txs.map((tx) => tx.boundWitness);
605
557
  return await PayloadBuilder4.hashPairs(txPayloads);
606
- }, "txsFromBlock");
558
+ };
607
559
 
608
560
  // src/hooks/useTxsFromBlock.ts
609
- var useTxsFromBlock = /* @__PURE__ */ __name((block) => {
561
+ var useTxsFromBlock = (block) => {
610
562
  return usePromise4(async () => {
611
563
  if (block) {
612
564
  return await txsFromBlock(block);
613
565
  }
614
- }, [
615
- block
616
- ]);
617
- }, "useTxsFromBlock");
566
+ }, [block]);
567
+ };
618
568
 
619
569
  // src/components/transactions/TransactionsQuickTipButton.tsx
620
- var TransactionsQuickTipButton = /* @__PURE__ */ __name(({ block, ...props }) => {
570
+ import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
571
+ var TransactionsQuickTipButton = ({ block, ...props }) => {
621
572
  const [transactions, transactionsError] = useTxsFromBlock(block);
622
573
  const [copied, setCopied] = useState7(false);
623
574
  const [showError, setShowError] = useState7(false);
624
- useMemo6(() => transactionsError ? setShowError(true) : setShowError(false), [
625
- transactionsError
626
- ]);
627
- const onCopy = /* @__PURE__ */ __name(async (transactionHash) => {
575
+ useMemo6(() => transactionsError ? setShowError(true) : setShowError(false), [transactionsError]);
576
+ const onCopy = async (transactionHash) => {
628
577
  await navigator.clipboard.writeText(transactionHash);
629
578
  setCopied(true);
630
579
  setTimeout(() => {
631
580
  setCopied(false);
632
581
  }, 5e3);
633
- }, "onCopy");
634
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(QuickTipButton, {
635
- Icon: Paid,
636
- disabled: transactions?.length === 0,
637
- hoverText: `Transaction Count: ${transactions?.length ?? 0}`,
638
- disableDialog: transactions?.length === 0,
639
- dialogProps: {
640
- fullWidth: true,
641
- maxWidth: "md"
642
- },
643
- ...props
644
- }, transactions?.length === 0 ? null : /* @__PURE__ */ React8.createElement(FlexGrowCol2, {
645
- gap: 1,
646
- alignItems: "stretch"
647
- }, transactions?.map(([transaction, hash]) => /* @__PURE__ */ React8.createElement(Fragment, {
648
- key: hash
649
- }, /* @__PURE__ */ React8.createElement(FlexGrowRow, {
650
- gap: 2,
651
- justifyContent: "start"
652
- }, /* @__PURE__ */ React8.createElement(ContentCopyIcon, {
653
- sx: {
654
- cursor: "pointer"
655
- },
656
- onClick: /* @__PURE__ */ __name(() => void onCopy(hash), "onClick")
657
- }), /* @__PURE__ */ React8.createElement(Typography2, {
658
- sx: {
659
- overflow: "hidden",
660
- textOverflow: "ellipsis",
661
- whiteSpace: "nowrap"
662
- }
663
- }, hash)), /* @__PURE__ */ React8.createElement(FlexRow, null, /* @__PURE__ */ React8.createElement(Collapse, {
664
- in: copied,
665
- unmountOnExit: true
666
- }, /* @__PURE__ */ React8.createElement(Alert2, null, /* @__PURE__ */ React8.createElement(AlertTitle, null, "Previous hash copied to clipboard")))))))), /* @__PURE__ */ React8.createElement(Snackbar, {
667
- open: showError,
668
- onClose: /* @__PURE__ */ __name(() => setShowError(false), "onClose")
669
- }, /* @__PURE__ */ React8.createElement(ErrorRender2, {
670
- error: transactionsError,
671
- scope: "TransactionsQuickTipButton"
672
- })));
673
- }, "TransactionsQuickTipButton");
582
+ };
583
+ return /* @__PURE__ */ jsxs4(Fragment3, { children: [
584
+ /* @__PURE__ */ jsx8(
585
+ QuickTipButton,
586
+ {
587
+ Icon: Paid,
588
+ disabled: transactions?.length === 0,
589
+ hoverText: `Transaction Count: ${transactions?.length ?? 0}`,
590
+ disableDialog: transactions?.length === 0,
591
+ dialogProps: { fullWidth: true, maxWidth: "md" },
592
+ ...props,
593
+ children: transactions?.length === 0 ? null : /* @__PURE__ */ jsx8(FlexGrowCol2, { gap: 1, alignItems: "stretch", children: transactions?.map(([transaction, hash]) => /* @__PURE__ */ jsxs4(Fragment2, { children: [
594
+ /* @__PURE__ */ jsxs4(FlexGrowRow, { gap: 2, justifyContent: "start", children: [
595
+ /* @__PURE__ */ jsx8(ContentCopyIcon, { sx: { cursor: "pointer" }, onClick: () => void onCopy(hash) }),
596
+ /* @__PURE__ */ jsx8(
597
+ Typography2,
598
+ {
599
+ sx: {
600
+ overflow: "hidden",
601
+ textOverflow: "ellipsis",
602
+ whiteSpace: "nowrap"
603
+ },
604
+ children: hash
605
+ }
606
+ )
607
+ ] }),
608
+ /* @__PURE__ */ jsx8(FlexRow, { children: /* @__PURE__ */ jsx8(Collapse, { in: copied, unmountOnExit: true, children: /* @__PURE__ */ jsx8(Alert2, { children: /* @__PURE__ */ jsx8(AlertTitle, { children: "Previous hash copied to clipboard" }) }) }) })
609
+ ] }, hash)) })
610
+ }
611
+ ),
612
+ /* @__PURE__ */ jsx8(Snackbar, { open: showError, onClose: () => setShowError(false), children: /* @__PURE__ */ jsx8(ErrorRender2, { error: transactionsError, scope: "TransactionsQuickTipButton" }) })
613
+ ] });
614
+ };
674
615
 
675
616
  // src/components/block/hooks/useAnchorElement.ts
676
617
  import { useRef as useRef2, useState as useState8 } from "react";
677
- var useAnchorElement = /* @__PURE__ */ __name(() => {
618
+ var useAnchorElement = () => {
678
619
  const [anchorEl, setAnchorEl] = useState8(null);
679
620
  const anchorRef = useRef2(null);
680
621
  const open = Boolean(anchorEl);
681
- const handleClick = /* @__PURE__ */ __name((event) => {
622
+ const handleClick = (event) => {
682
623
  setAnchorEl(event.currentTarget);
683
- }, "handleClick");
684
- const handleClose = /* @__PURE__ */ __name(() => {
624
+ };
625
+ const handleClose = () => {
685
626
  setAnchorEl(null);
686
- }, "handleClose");
627
+ };
687
628
  return {
688
629
  anchorEl,
689
630
  anchorRef,
@@ -691,121 +632,102 @@ var useAnchorElement = /* @__PURE__ */ __name(() => {
691
632
  handleClick,
692
633
  handleClose
693
634
  };
694
- }, "useAnchorElement");
635
+ };
695
636
 
696
637
  // src/components/block/hooks/useBlockHeadingEvents.ts
697
638
  import { useEvent } from "@xyo-network/react-event";
698
- var useBlockHeadingEvents = /* @__PURE__ */ __name((...args) => {
639
+ var useBlockHeadingEvents = (...args) => {
699
640
  return useEvent(...args);
700
- }, "useBlockHeadingEvents");
641
+ };
701
642
 
702
643
  // src/components/block/hooks/useBlockProducer.ts
703
644
  import { useMemo as useMemo7 } from "react";
704
- var useBlockProducer = /* @__PURE__ */ __name((block) => {
645
+ var useBlockProducer = (block) => {
705
646
  return useMemo7(() => {
706
647
  if (block) {
707
648
  const producer = block[0].addresses[0];
708
649
  return producer;
709
650
  }
710
- }, [
711
- block
712
- ]);
713
- }, "useBlockProducer");
651
+ }, [block]);
652
+ };
714
653
 
715
654
  // src/components/block/hooks/useDynamicBlockComponents.ts
716
655
  import { useState as useState9 } from "react";
717
656
 
718
657
  // src/components/block/helpers/blockProducer.ts
719
- var blockProducer = /* @__PURE__ */ __name((block) => {
658
+ var blockProducer = (block) => {
720
659
  return block.addresses[0];
721
- }, "blockProducer");
660
+ };
722
661
 
723
662
  // src/components/block/helpers/buildBlockChainRenderComponent.tsx
724
- import React9 from "react";
725
- var buildBlockChainRenderComponent = /* @__PURE__ */ __name(async (BlockComponent, blockComponentProps) => {
663
+ import { jsx as jsx9 } from "react/jsx-runtime";
664
+ var buildBlockChainRenderComponent = async (BlockComponent, blockComponentProps) => {
726
665
  const { block, ...remainingProps } = blockComponentProps;
727
666
  const blockTxs = await txsFromBlock(block);
728
667
  const txHashes = blockTxs.map(([_, hash]) => hash);
729
668
  const item = {
730
- child: /* @__PURE__ */ React9.createElement(BlockComponent, {
731
- block,
732
- transactions: txHashes,
733
- ...remainingProps
734
- }),
669
+ child: /* @__PURE__ */ jsx9(
670
+ BlockComponent,
671
+ {
672
+ block,
673
+ transactions: txHashes,
674
+ ...remainingProps
675
+ }
676
+ ),
735
677
  key: block[0].block.toString(),
736
678
  block
737
679
  };
738
680
  return item;
739
- }, "buildBlockChainRenderComponent");
681
+ };
740
682
 
741
683
  // src/components/block/helpers/payloadCountsFromBlock.ts
742
684
  import { BoundWitnessSchema } from "@xyo-network/boundwitness-model";
743
685
  import { isTransactionBoundWitness } from "@xyo-network/xl1-protocol";
744
- var payloadCountsFromBlock = /* @__PURE__ */ __name(([block, payloads]) => {
686
+ var payloadCountsFromBlock = ([block, payloads]) => {
745
687
  const publicPayloads = block.payload_schemas.filter((schema) => schema !== BoundWitnessSchema);
746
688
  const transactionHashes = payloads.filter((payload) => isTransactionBoundWitness(payload)).flatMap((payload) => payload.payload_hashes);
747
689
  const privateHashes = transactionHashes.filter((hash) => !publicPayloads.includes(hash));
748
- return [
749
- publicPayloads.length,
750
- privateHashes.length
751
- ];
752
- }, "payloadCountsFromBlock");
690
+ return [publicPayloads.length, privateHashes.length];
691
+ };
753
692
 
754
693
  // src/components/block/hooks/useDynamicBlockComponents.ts
755
- var useDynamicBlockComponents = /* @__PURE__ */ __name((BlockComponent, params, maxBlocks) => {
694
+ var useDynamicBlockComponents = (BlockComponent, params, maxBlocks) => {
756
695
  const { chainArchivist } = params ?? {};
757
696
  const [blockChainRenderComponents, setBlockChainRenderComponents] = useState9([]);
758
697
  const { onBlock } = useChainAnalyzersContext();
759
- const onAddBlock = /* @__PURE__ */ __name(async (block) => {
698
+ const onAddBlock = async (block) => {
760
699
  if (!block || !chainArchivist) return;
761
- const blockComponentProps = {
762
- block
763
- };
700
+ const blockComponentProps = { block };
764
701
  const newBlockComponent = await buildBlockChainRenderComponent(BlockComponent, blockComponentProps);
765
702
  if (block?.[0].block !== blockChainRenderComponents[0]?.block?.[0].block) {
766
703
  void onBlock?.(block);
767
704
  setBlockChainRenderComponents((blockComponents) => {
768
- const newBlockComponents = [
769
- newBlockComponent,
770
- ...blockComponents
771
- ];
705
+ const newBlockComponents = [newBlockComponent, ...blockComponents];
772
706
  if (maxBlocks !== void 0 && newBlockComponents.length > maxBlocks) {
773
707
  newBlockComponents.pop();
774
708
  }
775
709
  return newBlockComponents;
776
710
  });
777
711
  }
778
- }, "onAddBlock");
779
- return {
780
- blockChainRenderComponents,
781
- onAddBlock
782
712
  };
783
- }, "useDynamicBlockComponents");
713
+ return { blockChainRenderComponents, onAddBlock };
714
+ };
784
715
 
785
716
  // src/components/block/hooks/usePayloadCountsFromBlock.ts
786
717
  import { useMemo as useMemo8 } from "react";
787
- var usePayloadCountsFromBlock = /* @__PURE__ */ __name((block) => {
718
+ var usePayloadCountsFromBlock = (block) => {
788
719
  return useMemo8(() => {
789
720
  if (block) {
790
- return [
791
- ...payloadCountsFromBlock(block),
792
- void 0
793
- ];
721
+ return [...payloadCountsFromBlock(block), void 0];
794
722
  }
795
- return [
796
- void 0,
797
- void 0,
798
- void 0
799
- ];
800
- }, [
801
- block
802
- ]);
803
- }, "usePayloadCountsFromBlock");
723
+ return [void 0, void 0, void 0];
724
+ }, [block]);
725
+ };
804
726
 
805
727
  // src/components/block/hooks/useStaticBlockComponents.ts
806
728
  import { usePromise as usePromise5 } from "@xylabs/react-promise";
807
729
  import { isDefined as isDefined2 } from "@xylabs/typeof";
808
- var useStaticBlockComponents = /* @__PURE__ */ __name((BlockComponent, params, blocks) => {
730
+ var useStaticBlockComponents = (BlockComponent, params, blocks) => {
809
731
  const { onBlock } = useChainAnalyzersContext();
810
732
  const [blockComponents, blockComponentsError] = usePromise5(async () => {
811
733
  const resolvedBlockWithStorage = blocks ?? [];
@@ -814,78 +736,74 @@ var useStaticBlockComponents = /* @__PURE__ */ __name((BlockComponent, params, b
814
736
  if (isDefined2(onBlock)) {
815
737
  await onBlock(block);
816
738
  }
817
- const blockComponentProps = {
818
- block,
819
- defaultExpanded: true
820
- };
739
+ const blockComponentProps = { block, defaultExpanded: true };
821
740
  return await buildBlockChainRenderComponent(BlockComponent, blockComponentProps);
822
741
  }));
823
- }, [
824
- blocks,
825
- params,
826
- BlockComponent
827
- ]);
828
- return {
829
- blockComponents,
830
- errors: blockComponentsError
831
- };
832
- }, "useStaticBlockComponents");
742
+ }, [blocks, params, BlockComponent]);
743
+ return { blockComponents, errors: blockComponentsError };
744
+ };
833
745
 
834
746
  // src/components/block/LinkedDivider.tsx
835
747
  import { Divider, Stack } from "@mui/material";
836
- import React10 from "react";
837
- var LinkedDivider = /* @__PURE__ */ __name(() => {
838
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Stack, {
839
- className: "divider-spacer",
840
- justifyContent: "end",
841
- sx: {
842
- width: "50%",
843
- height: 24,
844
- justifyContent: "end"
845
- }
846
- }, /* @__PURE__ */ React10.createElement(Divider, {
847
- className: "divider",
848
- orientation: "vertical",
849
- flexItem: true,
850
- sx: {
851
- borderRightWidth: 2,
852
- height: 24,
853
- transition: "height 1s"
748
+ import { Fragment as Fragment4, jsx as jsx10 } from "react/jsx-runtime";
749
+ var LinkedDivider = () => {
750
+ return /* @__PURE__ */ jsx10(Fragment4, { children: /* @__PURE__ */ jsx10(
751
+ Stack,
752
+ {
753
+ className: "divider-spacer",
754
+ justifyContent: "end",
755
+ sx: {
756
+ width: "50%",
757
+ height: 24,
758
+ justifyContent: "end"
759
+ },
760
+ children: /* @__PURE__ */ jsx10(
761
+ Divider,
762
+ {
763
+ className: "divider",
764
+ orientation: "vertical",
765
+ flexItem: true,
766
+ sx: {
767
+ borderRightWidth: 2,
768
+ height: 24,
769
+ transition: "height 1s"
770
+ }
771
+ }
772
+ )
854
773
  }
855
- })));
856
- }, "LinkedDivider");
774
+ ) });
775
+ };
857
776
 
858
777
  // src/components/block/menu/Expanded.tsx
859
778
  import { MoreVert } from "@mui/icons-material";
860
779
  import { IconButton, Menu } from "@mui/material";
861
780
  import { BWJsonMenuItem, BWPreviousHashMenuItem } from "@xyo-network/react-boundwitness-plugin";
862
- import React11 from "react";
863
- var BlockMenuExpanded = /* @__PURE__ */ __name(({ block }) => {
864
- const { anchorEl, anchorRef, open, handleClick, handleClose } = useAnchorElement();
865
- return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(IconButton, {
866
- ref: anchorRef,
867
- size: "small",
868
- onClick: handleClick
869
- }, /* @__PURE__ */ React11.createElement(MoreVert, {
870
- fontSize: "inherit"
871
- })), /* @__PURE__ */ React11.createElement(Menu, {
872
- open,
781
+ import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
782
+ var BlockMenuExpanded = ({ block }) => {
783
+ const {
873
784
  anchorEl,
874
- anchorOrigin: {
875
- horizontal: "left",
876
- vertical: "bottom"
877
- },
878
- onClose: handleClose
879
- }, /* @__PURE__ */ React11.createElement(BWPreviousHashMenuItem, {
880
- boundwitness: block?.[0],
881
- dense: true,
882
- onDialogClose: handleClose
883
- }), /* @__PURE__ */ React11.createElement(BWJsonMenuItem, {
884
- boundwitness: block?.[0],
885
- dense: true,
886
- onDialogClose: handleClose
887
- })));
888
- }, "BlockMenuExpanded");
785
+ anchorRef,
786
+ open,
787
+ handleClick,
788
+ handleClose
789
+ } = useAnchorElement();
790
+ return /* @__PURE__ */ jsxs5(Fragment5, { children: [
791
+ /* @__PURE__ */ jsx11(IconButton, { ref: anchorRef, size: "small", onClick: handleClick, children: /* @__PURE__ */ jsx11(MoreVert, { fontSize: "inherit" }) }),
792
+ /* @__PURE__ */ jsxs5(
793
+ Menu,
794
+ {
795
+ open,
796
+ anchorEl,
797
+ anchorOrigin: { horizontal: "left", vertical: "bottom" },
798
+ onClose: handleClose,
799
+ children: [
800
+ /* @__PURE__ */ jsx11(BWPreviousHashMenuItem, { boundwitness: block?.[0], dense: true, onDialogClose: handleClose }),
801
+ /* @__PURE__ */ jsx11(BWJsonMenuItem, { boundwitness: block?.[0], dense: true, onDialogClose: handleClose })
802
+ ]
803
+ }
804
+ )
805
+ ] });
806
+ };
889
807
 
890
808
  // src/components/block/ProducerChip.tsx
891
809
  import { Chip as Chip2 } from "@mui/material";
@@ -893,117 +811,122 @@ import { EthAddressWrapper } from "@xylabs/eth-address";
893
811
  import { toAddress } from "@xylabs/hex";
894
812
  import { isString, isUndefined as isUndefined2 } from "@xylabs/typeof";
895
813
  import { BlockiesAvatar } from "@xyo-network/react-chain-blockies";
896
- import React13, { useMemo as useMemo9 } from "react";
814
+ import { useMemo as useMemo9 } from "react";
897
815
 
898
816
  // src/components/block/ChipSkeleton.tsx
899
817
  import { Skeleton } from "@mui/material";
900
- import React12 from "react";
901
- var ChipSkeleton = /* @__PURE__ */ __name((props) => {
902
- return /* @__PURE__ */ React12.createElement(Skeleton, {
903
- width: 100,
904
- ...props
905
- });
906
- }, "ChipSkeleton");
818
+ import { jsx as jsx12 } from "react/jsx-runtime";
819
+ var ChipSkeleton = (props) => {
820
+ return /* @__PURE__ */ jsx12(Skeleton, { width: 100, ...props });
821
+ };
907
822
 
908
823
  // src/components/block/ProducerChip.tsx
909
- var formatProducerAddress = /* @__PURE__ */ __name((address) => {
824
+ import { jsx as jsx13 } from "react/jsx-runtime";
825
+ var formatProducerAddress = (address) => {
910
826
  if (isUndefined2(address) || !isString(address)) return void 0;
911
827
  const formattedAddress = toAddress(address);
912
828
  return EthAddressWrapper.parse(formattedAddress)?.toShortString(4);
913
- }, "formatProducerAddress");
914
- var BlockProducerChip = /* @__PURE__ */ __name(({ block, sx, ...props }) => {
829
+ };
830
+ var BlockProducerChip = ({
831
+ block,
832
+ sx,
833
+ ...props
834
+ }) => {
915
835
  const blockProducer2 = block?.[0].addresses[0];
916
836
  const shortedBlockProducer = blockProducer2 === void 0 ? null : formatProducerAddress(blockProducer2);
917
- const avatar = useMemo9(() => blockProducer2 === "" ? void 0 : /* @__PURE__ */ React13.createElement(BlockiesAvatar, {
918
- blockiesOptions: {
919
- seed: blockProducer2
837
+ const avatar = useMemo9(() => blockProducer2 === "" ? void 0 : /* @__PURE__ */ jsx13(BlockiesAvatar, { blockiesOptions: { seed: blockProducer2 } }), [blockProducer2]);
838
+ return /* @__PURE__ */ jsx13(
839
+ Chip2,
840
+ {
841
+ avatar,
842
+ label: shortedBlockProducer ?? /* @__PURE__ */ jsx13(ChipSkeleton, { width: 115 }),
843
+ title: `Block producer: ${blockProducer2}`,
844
+ sx: {
845
+ fontFamily: "monospace",
846
+ cursor: "pointer",
847
+ ...sx
848
+ },
849
+ ...props
920
850
  }
921
- }), [
922
- blockProducer2
923
- ]);
924
- return /* @__PURE__ */ React13.createElement(Chip2, {
925
- avatar,
926
- label: shortedBlockProducer ?? /* @__PURE__ */ React13.createElement(ChipSkeleton, {
927
- width: 115
928
- }),
929
- title: `Block producer: ${blockProducer2}`,
930
- sx: {
931
- fontFamily: "monospace",
932
- cursor: "pointer",
933
- ...sx
934
- },
935
- ...props
936
- });
937
- }, "BlockProducerChip");
851
+ );
852
+ };
938
853
 
939
854
  // src/components/block/BlockHeadingFlexbox.tsx
940
- var BlockHeadingFlexbox = /* @__PURE__ */ __name(({ block, defaultExpanded, transactions }) => {
855
+ import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
856
+ var BlockHeadingFlexbox = ({
857
+ block,
858
+ defaultExpanded,
859
+ transactions
860
+ }) => {
941
861
  const hash = usePayloadHash(block?.[0]);
942
862
  const [blockHeadingRef, blockHeadingListener] = useBlockHeadingEvents();
943
863
  const { pollingState } = useChainPollingContext();
944
864
  const expanded = pollingState === "paused" || defaultExpanded;
945
- const handleTransactionCountClick = /* @__PURE__ */ __name((event, transactions2) => {
865
+ const handleTransactionCountClick = (event, transactions2) => {
946
866
  event.stopPropagation();
947
867
  blockHeadingListener("transaction-count", "click", JSON.stringify(transactions2));
948
- }, "handleTransactionCountClick");
949
- return /* @__PURE__ */ React14.createElement(FlexCol2, {
950
- className: "block-heading-flexbox",
951
- alignItems: "stretch",
952
- ref: blockHeadingRef,
953
- onClick: /* @__PURE__ */ __name(() => blockHeadingListener("block-hash", "click", hash), "onClick")
954
- }, /* @__PURE__ */ React14.createElement(LinkedDivider, null), /* @__PURE__ */ React14.createElement(HashHeadingPaper, {
955
- hash,
956
- heading: block?.[0].block === void 0 ? "" : block?.[0].block.toString(),
957
- paperProps: {
958
- sx: {
959
- p: 1,
960
- width: "100%"
961
- }
962
- },
963
- AdornmentEnd: /* @__PURE__ */ React14.createElement(FlexRow2, {
964
- gap: 1
965
- }, /* @__PURE__ */ React14.createElement(BlockProducerChip, {
966
- block
967
- }), /* @__PURE__ */ React14.createElement(TransactionCountChip, {
968
- onClick: /* @__PURE__ */ __name((e) => handleTransactionCountClick(e, transactions ?? []), "onClick"),
969
- transactions
970
- }), /* @__PURE__ */ React14.createElement(BWVerification, {
971
- iconColors: true,
972
- boundwitness: block?.[0]
973
- }), /* @__PURE__ */ React14.createElement("span", {
974
- style: {
975
- // maxWidth is required for css animation to work and 28px is the width of the icon button
976
- display: "flex",
977
- transition: "max-width .5s",
978
- maxWidth: expanded ? "28px" : 0
868
+ };
869
+ return /* @__PURE__ */ jsxs6(FlexCol2, { className: "block-heading-flexbox", alignItems: "stretch", ref: blockHeadingRef, onClick: () => blockHeadingListener("block-hash", "click", hash), children: [
870
+ /* @__PURE__ */ jsx14(LinkedDivider, {}),
871
+ /* @__PURE__ */ jsx14(
872
+ HashHeadingPaper,
873
+ {
874
+ hash,
875
+ heading: block?.[0].block === void 0 ? "" : block?.[0].block.toString(),
876
+ paperProps: { sx: { p: 1, width: "100%" } },
877
+ AdornmentEnd: /* @__PURE__ */ jsxs6(FlexRow2, { gap: 1, children: [
878
+ /* @__PURE__ */ jsx14(BlockProducerChip, { block }),
879
+ /* @__PURE__ */ jsx14(
880
+ TransactionCountChip,
881
+ {
882
+ onClick: (e) => handleTransactionCountClick(e, transactions ?? []),
883
+ transactions
884
+ }
885
+ ),
886
+ /* @__PURE__ */ jsx14(BWVerification, { iconColors: true, boundwitness: block?.[0] }),
887
+ /* @__PURE__ */ jsx14(
888
+ "span",
889
+ {
890
+ style: {
891
+ // maxWidth is required for css animation to work and 28px is the width of the icon button
892
+ display: "flex",
893
+ transition: "max-width .5s",
894
+ maxWidth: expanded ? "28px" : 0
895
+ },
896
+ children: /* @__PURE__ */ jsx14(BlockMenuExpanded, { block })
897
+ }
898
+ )
899
+ ] }),
900
+ identiconProps: { p: 0.75, size: 18 }
979
901
  }
980
- }, /* @__PURE__ */ React14.createElement(BlockMenuExpanded, {
981
- block
982
- }))),
983
- identiconProps: {
984
- p: 0.75,
985
- size: 18
986
- }
987
- }));
988
- }, "BlockHeadingFlexbox");
902
+ )
903
+ ] });
904
+ };
989
905
 
990
906
  // src/components/block/table/cell/BlockNumber.tsx
991
- import { TableCell, Tooltip, Typography as Typography3 } from "@mui/material";
992
- import React15 from "react";
993
- var BlockNumberTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
907
+ import {
908
+ TableCell,
909
+ Tooltip,
910
+ Typography as Typography3
911
+ } from "@mui/material";
912
+ import { jsx as jsx15 } from "react/jsx-runtime";
913
+ var BlockNumberTableCell = ({
914
+ block,
915
+ linked,
916
+ ...props
917
+ }) => {
994
918
  const blockNumber = block?.[0].block;
995
- return /* @__PURE__ */ React15.createElement(TableCell, props, /* @__PURE__ */ React15.createElement(Tooltip, {
996
- title: `Block Number: ${blockNumber}`
997
- }, /* @__PURE__ */ React15.createElement(Typography3, {
998
- component: "span",
999
- variant: "body1"
1000
- }, blockNumber)));
1001
- }, "BlockNumberTableCell");
919
+ return /* @__PURE__ */ jsx15(TableCell, { ...props, children: /* @__PURE__ */ jsx15(Tooltip, { title: `Block Number: ${blockNumber}`, children: /* @__PURE__ */ jsx15(Typography3, { component: "span", variant: "body1", children: blockNumber }) }) });
920
+ };
1002
921
 
1003
922
  // src/components/block/table/cell/Epoch.tsx
1004
- import { Skeleton as Skeleton2, TableCell as TableCell2, Tooltip as Tooltip2, Typography as Typography4 } from "@mui/material";
923
+ import {
924
+ Skeleton as Skeleton2,
925
+ TableCell as TableCell2,
926
+ Tooltip as Tooltip2,
927
+ Typography as Typography4
928
+ } from "@mui/material";
1005
929
  import { isDefined as isDefined3 } from "@xylabs/typeof";
1006
- import React16 from "react";
1007
930
 
1008
931
  // src/components/block/table/cell/lib/timeFunctions.ts
1009
932
  var dateFormat = Intl.DateTimeFormat(globalThis.navigator.language ?? "en-US", {
@@ -1014,7 +937,7 @@ var dateFormat = Intl.DateTimeFormat(globalThis.navigator.language ?? "en-US", {
1014
937
  minute: "2-digit",
1015
938
  second: "2-digit"
1016
939
  });
1017
- var timeAgo = /* @__PURE__ */ __name((epoch, locale = navigator.language ?? "en-US") => {
940
+ var timeAgo = (epoch, locale = navigator.language ?? "en-US") => {
1018
941
  const now = Date.now();
1019
942
  const diffInSeconds = Math.floor((now - epoch) / 1e3);
1020
943
  const units = [
@@ -1057,46 +980,54 @@ var timeAgo = /* @__PURE__ */ __name((epoch, locale = navigator.language ?? "en-
1057
980
  for (const unit of units) {
1058
981
  if (Math.abs(diffInSeconds) < unit.max) {
1059
982
  const value = Math.round(diffInSeconds / unit.value);
1060
- return new Intl.RelativeTimeFormat(locale, {
1061
- numeric: "auto"
1062
- }).format(-value, unit.name);
983
+ return new Intl.RelativeTimeFormat(locale, { numeric: "auto" }).format(-value, unit.name);
1063
984
  }
1064
985
  }
1065
- }, "timeAgo");
986
+ };
1066
987
 
1067
988
  // src/components/block/table/cell/Epoch.tsx
1068
- var BlockEpochTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
989
+ import { jsx as jsx16 } from "react/jsx-runtime";
990
+ var BlockEpochTableCell = ({
991
+ block,
992
+ linked,
993
+ ...props
994
+ }) => {
1069
995
  const epoch = block?.[0]?.$epoch;
1070
996
  const dateTime = dateFormat.format(epoch);
1071
997
  const age = isDefined3(epoch) ? timeAgo(epoch) : void 0;
1072
- return /* @__PURE__ */ React16.createElement(TableCell2, props, /* @__PURE__ */ React16.createElement(Tooltip2, {
1073
- title: `Block Epoch: ${dateTime}`
1074
- }, /* @__PURE__ */ React16.createElement(Typography4, {
1075
- component: "span",
1076
- variant: "body1"
1077
- }, age ?? /* @__PURE__ */ React16.createElement(Skeleton2, {
1078
- width: 115
1079
- }))));
1080
- }, "BlockEpochTableCell");
998
+ return /* @__PURE__ */ jsx16(TableCell2, { ...props, children: /* @__PURE__ */ jsx16(Tooltip2, { title: `Block Epoch: ${dateTime}`, children: /* @__PURE__ */ jsx16(Typography4, { component: "span", variant: "body1", children: age ?? /* @__PURE__ */ jsx16(Skeleton2, { width: 115 }) }) }) });
999
+ };
1081
1000
 
1082
1001
  // src/components/block/table/cell/Hash.tsx
1083
- import { Link, TableCell as TableCell3, Tooltip as Tooltip3 } from "@mui/material";
1002
+ import {
1003
+ Link,
1004
+ TableCell as TableCell3,
1005
+ Tooltip as Tooltip3
1006
+ } from "@mui/material";
1084
1007
  import { isHash as isHash2 } from "@xylabs/hex";
1085
1008
  import { usePayloadRootHash } from "@xyo-network/react-shared";
1086
- import React18, { useState as useState10 } from "react";
1009
+ import { useState as useState10 } from "react";
1087
1010
 
1088
1011
  // src/components/FeatureNotAvailable.tsx
1089
- import { Button as Button2, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
1090
- import React17 from "react";
1091
- var FeatureNotAvailable = /* @__PURE__ */ __name(({ featureName = "Feature", ...props }) => /* @__PURE__ */ React17.createElement(Dialog, props, /* @__PURE__ */ React17.createElement(DialogTitle, null, `${featureName} Not Available`), /* @__PURE__ */ React17.createElement(DialogContent, null, "This feature is not currently available. Either you do not have access to it or it is currently undergoing maintenance."), /* @__PURE__ */ React17.createElement(DialogActions, null, /* @__PURE__ */ React17.createElement(Button2, {
1092
- onClick: /* @__PURE__ */ __name((e) => props.onClose?.(e, "backdropClick"), "onClick")
1093
- }, "Close"))), "FeatureNotAvailable");
1012
+ import {
1013
+ Button as Button2,
1014
+ Dialog,
1015
+ DialogActions,
1016
+ DialogContent,
1017
+ DialogTitle
1018
+ } from "@mui/material";
1019
+ import { jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
1020
+ var FeatureNotAvailable = ({ featureName = "Feature", ...props }) => /* @__PURE__ */ jsxs7(Dialog, { ...props, children: [
1021
+ /* @__PURE__ */ jsx17(DialogTitle, { children: `${featureName} Not Available` }),
1022
+ /* @__PURE__ */ jsx17(DialogContent, { children: "This feature is not currently available. Either you do not have access to it or it is currently undergoing maintenance." }),
1023
+ /* @__PURE__ */ jsx17(DialogActions, { children: /* @__PURE__ */ jsx17(Button2, { onClick: (e) => props.onClose?.(e, "backdropClick"), children: "Close" }) })
1024
+ ] });
1094
1025
 
1095
1026
  // src/components/block/table/cell/hooks/useLinkedBlockItem.tsx
1096
1027
  import { useEvent as useEvent2 } from "@xyo-network/react-event";
1097
- var useLinkedBlockItem = /* @__PURE__ */ __name((noun, data) => {
1028
+ var useLinkedBlockItem = (noun, data) => {
1098
1029
  const [ref, dispatch] = useEvent2();
1099
- const handleClick = /* @__PURE__ */ __name((event) => {
1030
+ const handleClick = (event) => {
1100
1031
  event.preventDefault();
1101
1032
  event.stopPropagation();
1102
1033
  if (noun === void 0) {
@@ -1108,79 +1039,91 @@ var useLinkedBlockItem = /* @__PURE__ */ __name((noun, data) => {
1108
1039
  if (!isTextSelected) {
1109
1040
  dispatch(noun, "click", data);
1110
1041
  }
1111
- }, "handleClick");
1112
- return [
1113
- ref,
1114
- handleClick
1115
- ];
1116
- }, "useLinkedBlockItem");
1042
+ };
1043
+ return [ref, handleClick];
1044
+ };
1117
1045
 
1118
1046
  // src/components/block/table/cell/Hash.tsx
1119
- var BlockHashTableCell = /* @__PURE__ */ __name(({ block, notAvailableDialog, linked, ...props }) => {
1047
+ import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
1048
+ var BlockHashTableCell = ({
1049
+ block,
1050
+ notAvailableDialog,
1051
+ linked,
1052
+ ...props
1053
+ }) => {
1120
1054
  const hash = usePayloadRootHash(block?.[0]);
1121
1055
  const [ref, handleClick] = useLinkedBlockItem("block-hash", hash);
1122
1056
  const [notAvailable, setNotAvailable] = useState10(false);
1123
1057
  const shortenedHash = isHash2(hash) ? `${hash.slice(0, 4)}...${hash.slice(-5, -1)}` : void 0;
1124
- return /* @__PURE__ */ React18.createElement(TableCell3, {
1125
- ref,
1126
- ...props
1127
- }, /* @__PURE__ */ React18.createElement(Tooltip3, {
1128
- title: `Block Hash: ${hash}`
1129
- }, linked ? /* @__PURE__ */ React18.createElement(Link, {
1130
- sx: {
1131
- cursor: "pointer"
1132
- },
1133
- onClick: linked ? handleClick : () => setNotAvailable(true)
1134
- }, shortenedHash ?? /* @__PURE__ */ React18.createElement(ChipSkeleton, null)) : /* @__PURE__ */ React18.createElement("span", null, shortenedHash ?? /* @__PURE__ */ React18.createElement(ChipSkeleton, null))), notAvailableDialog && notAvailable ? /* @__PURE__ */ React18.createElement(FeatureNotAvailable, {
1135
- featureName: "Block Details",
1136
- open: notAvailable,
1137
- onClick: /* @__PURE__ */ __name(() => setNotAvailable(false), "onClick")
1138
- }) : null);
1139
- }, "BlockHashTableCell");
1058
+ return /* @__PURE__ */ jsxs8(TableCell3, { ref, ...props, children: [
1059
+ /* @__PURE__ */ jsx18(Tooltip3, { title: `Block Hash: ${hash}`, children: linked ? /* @__PURE__ */ jsx18(
1060
+ Link,
1061
+ {
1062
+ sx: { cursor: "pointer" },
1063
+ onClick: linked ? handleClick : () => setNotAvailable(true),
1064
+ children: shortenedHash ?? /* @__PURE__ */ jsx18(ChipSkeleton, {})
1065
+ }
1066
+ ) : /* @__PURE__ */ jsx18("span", { children: shortenedHash ?? /* @__PURE__ */ jsx18(ChipSkeleton, {}) }) }),
1067
+ notAvailableDialog && notAvailable ? /* @__PURE__ */ jsx18(FeatureNotAvailable, { featureName: "Block Details", open: notAvailable, onClick: () => setNotAvailable(false) }) : null
1068
+ ] });
1069
+ };
1140
1070
 
1141
1071
  // src/components/block/table/cell/JsonView.tsx
1142
1072
  import { DataObject } from "@mui/icons-material";
1143
- import { Button as Button3, Dialog as Dialog2, DialogActions as DialogActions2, DialogContent as DialogContent2, DialogTitle as DialogTitle2, IconButton as IconButton2, TableCell as TableCell4 } from "@mui/material";
1073
+ import {
1074
+ Button as Button3,
1075
+ Dialog as Dialog2,
1076
+ DialogActions as DialogActions2,
1077
+ DialogContent as DialogContent2,
1078
+ DialogTitle as DialogTitle2,
1079
+ IconButton as IconButton2,
1080
+ TableCell as TableCell4
1081
+ } from "@mui/material";
1144
1082
  import { ellipsize } from "@xylabs/eth-address";
1145
1083
  import { isHash as isHash3 } from "@xylabs/hex";
1146
1084
  import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
1147
1085
  import { JsonViewerEx } from "@xyo-network/react-payload-raw-info";
1148
1086
  import { usePayloadRootHash as usePayloadRootHash2 } from "@xyo-network/react-shared";
1149
- import React19, { useState as useState11 } from "react";
1150
- var BlockJsonViewTableCell = /* @__PURE__ */ __name(({ block, ...props }) => {
1087
+ import { useState as useState11 } from "react";
1088
+ import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
1089
+ var BlockJsonViewTableCell = ({ block, ...props }) => {
1151
1090
  const [open, setOpen] = useState11(false);
1152
- const onClose = /* @__PURE__ */ __name(() => setOpen(false), "onClose");
1091
+ const onClose = () => setOpen(false);
1153
1092
  const hash = usePayloadRootHash2(block?.[0]);
1154
1093
  const title = isHash3(hash) ? `JSON for ${ellipsize(hash, 5)}` : "JSON";
1155
- return /* @__PURE__ */ React19.createElement(TableCell4, props, /* @__PURE__ */ React19.createElement(FlexRow3, {
1156
- onClick: /* @__PURE__ */ __name((e) => e.stopPropagation(), "onClick"),
1157
- sx: {
1158
- width: "100%"
1159
- }
1160
- }, /* @__PURE__ */ React19.createElement(IconButton2, {
1161
- onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick")
1162
- }, /* @__PURE__ */ React19.createElement(DataObject, null)), /* @__PURE__ */ React19.createElement(Dialog2, {
1163
- open,
1164
- onClose
1165
- }, /* @__PURE__ */ React19.createElement(DialogTitle2, null, title), /* @__PURE__ */ React19.createElement(DialogContent2, null, /* @__PURE__ */ React19.createElement(JsonViewerEx, {
1166
- value: block
1167
- })), /* @__PURE__ */ React19.createElement(DialogActions2, {
1168
- sx: {
1169
- display: "flex",
1170
- flexDirection: "row",
1171
- justifyContent: "end"
1172
- }
1173
- }, /* @__PURE__ */ React19.createElement(Button3, {
1174
- variant: "contained",
1175
- onClick: onClose
1176
- }, "Close")))));
1177
- }, "BlockJsonViewTableCell");
1094
+ return /* @__PURE__ */ jsx19(TableCell4, { ...props, children: /* @__PURE__ */ jsxs9(FlexRow3, { onClick: (e) => e.stopPropagation(), sx: { width: "100%" }, children: [
1095
+ /* @__PURE__ */ jsx19(IconButton2, { onClick: () => setOpen(true), children: /* @__PURE__ */ jsx19(DataObject, {}) }),
1096
+ /* @__PURE__ */ jsxs9(Dialog2, { open, onClose, children: [
1097
+ /* @__PURE__ */ jsx19(DialogTitle2, { children: title }),
1098
+ /* @__PURE__ */ jsx19(DialogContent2, { children: /* @__PURE__ */ jsx19(JsonViewerEx, { value: block }) }),
1099
+ /* @__PURE__ */ jsx19(
1100
+ DialogActions2,
1101
+ {
1102
+ sx: {
1103
+ display: "flex",
1104
+ flexDirection: "row",
1105
+ justifyContent: "end"
1106
+ },
1107
+ children: /* @__PURE__ */ jsx19(Button3, { variant: "contained", onClick: onClose, children: "Close" })
1108
+ }
1109
+ )
1110
+ ] })
1111
+ ] }) });
1112
+ };
1178
1113
 
1179
1114
  // src/components/block/table/cell/PayloadCounts.tsx
1180
1115
  import { Error as Error2 } from "@mui/icons-material";
1181
- import { Link as Link2, TableCell as TableCell5, Tooltip as Tooltip4 } from "@mui/material";
1182
- import React20 from "react";
1183
- var BlockPayloadCountsTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
1116
+ import {
1117
+ Link as Link2,
1118
+ TableCell as TableCell5,
1119
+ Tooltip as Tooltip4
1120
+ } from "@mui/material";
1121
+ import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
1122
+ var BlockPayloadCountsTableCell = ({
1123
+ block,
1124
+ linked,
1125
+ ...props
1126
+ }) => {
1184
1127
  const [publicPayloads, privatePayloads, error] = usePayloadCountsFromBlock(block);
1185
1128
  const data = block && privatePayloads !== void 0 && publicPayloads !== void 0 ? {
1186
1129
  publicPayloads,
@@ -1189,340 +1132,306 @@ var BlockPayloadCountsTableCell = /* @__PURE__ */ __name(({ block, linked, ...pr
1189
1132
  } : void 0;
1190
1133
  const payloadCount = (publicPayloads ?? 0) + (privatePayloads ?? 0);
1191
1134
  const [ref, handleClick] = useLinkedBlockItem("payload-counts", data);
1192
- return /* @__PURE__ */ React20.createElement(TableCell5, {
1193
- ref,
1194
- ...props
1195
- }, /* @__PURE__ */ React20.createElement("span", null, error ? /* @__PURE__ */ React20.createElement(Tooltip4, {
1196
- title: error.message
1197
- }, /* @__PURE__ */ React20.createElement(Error2, {
1198
- color: "error"
1199
- })) : null, linked ? /* @__PURE__ */ React20.createElement(Tooltip4, {
1200
- title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`
1201
- }, /* @__PURE__ */ React20.createElement(Link2, {
1202
- onClick: handleClick,
1203
- sx: {
1204
- cursor: "pointer"
1205
- }
1206
- }, payloadCount)) : /* @__PURE__ */ React20.createElement(Tooltip4, {
1207
- title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`
1208
- }, /* @__PURE__ */ React20.createElement("span", null, payloadCount))));
1209
- }, "BlockPayloadCountsTableCell");
1135
+ return /* @__PURE__ */ jsx20(TableCell5, { ref, ...props, children: /* @__PURE__ */ jsxs10("span", { children: [
1136
+ error ? /* @__PURE__ */ jsx20(Tooltip4, { title: error.message, children: /* @__PURE__ */ jsx20(Error2, { color: "error" }) }) : null,
1137
+ linked ? /* @__PURE__ */ jsx20(Tooltip4, { title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`, children: /* @__PURE__ */ jsx20(
1138
+ Link2,
1139
+ {
1140
+ onClick: handleClick,
1141
+ sx: { cursor: "pointer" },
1142
+ children: payloadCount
1143
+ }
1144
+ ) }) : /* @__PURE__ */ jsx20(Tooltip4, { title: `Public Payloads: ${publicPayloads ?? "--"} Private Payloads: ${privatePayloads ?? "--"}`, children: /* @__PURE__ */ jsx20("span", { children: payloadCount }) })
1145
+ ] }) });
1146
+ };
1210
1147
 
1211
1148
  // src/components/block/table/cell/Producer.tsx
1212
1149
  import { TableCell as TableCell6, Tooltip as Tooltip5 } from "@mui/material";
1213
- import React21 from "react";
1214
- var BlockProducerTableCell = /* @__PURE__ */ __name(({ block, linked, notAvailableDialog, producerChipProps, ...props }) => {
1150
+ import React11 from "react";
1151
+ import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
1152
+ var BlockProducerTableCell = ({
1153
+ block,
1154
+ linked,
1155
+ notAvailableDialog,
1156
+ producerChipProps,
1157
+ ...props
1158
+ }) => {
1215
1159
  const [ref, handleClick] = useLinkedBlockItem("block-producer", JSON.stringify(block));
1216
1160
  const producer = useBlockProducer(block);
1217
- const [notAvailable, setNotAvailable] = React21.useState(false);
1218
- return /* @__PURE__ */ React21.createElement(TableCell6, {
1219
- ref,
1220
- ...props
1221
- }, /* @__PURE__ */ React21.createElement(Tooltip5, {
1222
- title: `Block Producer: ${producer}`
1223
- }, /* @__PURE__ */ React21.createElement(BlockProducerChip, {
1224
- sx: {
1225
- cursor: "pointer"
1226
- },
1227
- onClick: linked ? handleClick : () => setNotAvailable(true),
1228
- block,
1229
- ...producerChipProps
1230
- })), notAvailableDialog && notAvailable ? /* @__PURE__ */ React21.createElement(FeatureNotAvailable, {
1231
- featureName: "Producer Details",
1232
- open: notAvailable,
1233
- onClick: /* @__PURE__ */ __name(() => setNotAvailable(false), "onClick")
1234
- }) : null);
1235
- }, "BlockProducerTableCell");
1161
+ const [notAvailable, setNotAvailable] = React11.useState(false);
1162
+ return /* @__PURE__ */ jsxs11(TableCell6, { ref, ...props, children: [
1163
+ /* @__PURE__ */ jsx21(Tooltip5, { title: `Block Producer: ${producer}`, children: /* @__PURE__ */ jsx21(BlockProducerChip, { sx: { cursor: "pointer" }, onClick: linked ? handleClick : () => setNotAvailable(true), block, ...producerChipProps }) }),
1164
+ notAvailableDialog && notAvailable ? /* @__PURE__ */ jsx21(FeatureNotAvailable, { featureName: "Producer Details", open: notAvailable, onClick: () => setNotAvailable(false) }) : null
1165
+ ] });
1166
+ };
1236
1167
 
1237
1168
  // src/components/block/table/cell/TransactionCount.tsx
1238
1169
  import { Error as Error3 } from "@mui/icons-material";
1239
- import { Link as Link3, TableCell as TableCell7, Tooltip as Tooltip6 } from "@mui/material";
1240
- import React22, { useMemo as useMemo10 } from "react";
1241
- var BlockTransactionCountTableCell = /* @__PURE__ */ __name(({ block, linked, ...props }) => {
1170
+ import {
1171
+ Link as Link3,
1172
+ TableCell as TableCell7,
1173
+ Tooltip as Tooltip6
1174
+ } from "@mui/material";
1175
+ import { useMemo as useMemo10 } from "react";
1176
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
1177
+ var BlockTransactionCountTableCell = ({
1178
+ block,
1179
+ linked,
1180
+ ...props
1181
+ }) => {
1242
1182
  const [transactions, error] = useTxsFromBlock(block);
1243
- const txHashes = useMemo10(() => transactions?.map(([, hash]) => hash), [
1244
- transactions
1245
- ]);
1183
+ const txHashes = useMemo10(() => transactions?.map(([, hash]) => hash), [transactions]);
1246
1184
  const data = block && transactions !== void 0 ? {
1247
1185
  transactions: transactions.length,
1248
1186
  block: block[0]._hash
1249
1187
  } : void 0;
1250
1188
  const [ref, handleClick] = useLinkedBlockItem("transaction-count", data);
1251
- return /* @__PURE__ */ React22.createElement(TableCell7, {
1252
- ref,
1253
- ...props
1254
- }, /* @__PURE__ */ React22.createElement("span", null, error ? /* @__PURE__ */ React22.createElement(Tooltip6, {
1255
- title: error.message
1256
- }, /* @__PURE__ */ React22.createElement(Error3, {
1257
- color: "error"
1258
- })) : null, linked ? /* @__PURE__ */ React22.createElement(Link3, {
1259
- onClick: handleClick,
1260
- sx: {
1261
- cursor: "pointer"
1262
- }
1263
- }, txHashes?.length) : txHashes?.length));
1264
- }, "BlockTransactionCountTableCell");
1189
+ return /* @__PURE__ */ jsx22(TableCell7, { ref, ...props, children: /* @__PURE__ */ jsxs12("span", { children: [
1190
+ error ? /* @__PURE__ */ jsx22(Tooltip6, { title: error.message, children: /* @__PURE__ */ jsx22(Error3, { color: "error" }) }) : null,
1191
+ linked ? /* @__PURE__ */ jsx22(Link3, { onClick: handleClick, sx: { cursor: "pointer" }, children: txHashes?.length }) : txHashes?.length
1192
+ ] }) });
1193
+ };
1265
1194
 
1266
1195
  // src/components/block/table/cell/Verification.tsx
1267
1196
  import { CheckCircleOutlineRounded } from "@mui/icons-material";
1268
1197
  import { TableCell as TableCell8 } from "@mui/material";
1269
1198
  import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
1270
1199
  import { BWVerification as BWVerification2 } from "@xyo-network/react-boundwitness-plugin";
1271
- import React23 from "react";
1272
- var BlockVerificationTableCell = /* @__PURE__ */ __name(({ block, linked, deepValidation, ...props }) => {
1273
- return /* @__PURE__ */ React23.createElement(TableCell8, props, /* @__PURE__ */ React23.createElement(FlexRow4, {
1274
- onClick: /* @__PURE__ */ __name((e) => e.stopPropagation(), "onClick"),
1275
- sx: {
1276
- width: "100%"
1277
- }
1278
- }, deepValidation ? /* @__PURE__ */ React23.createElement(BWVerification2, {
1279
- iconColors: true,
1280
- boundwitness: block?.[0]
1281
- }) : /* @__PURE__ */ React23.createElement(CheckCircleOutlineRounded, {
1282
- color: "success"
1283
- })));
1284
- }, "BlockVerificationTableCell");
1200
+ import { jsx as jsx23 } from "react/jsx-runtime";
1201
+ var BlockVerificationTableCell = ({
1202
+ block,
1203
+ linked,
1204
+ deepValidation,
1205
+ ...props
1206
+ }) => {
1207
+ return /* @__PURE__ */ jsx23(TableCell8, { ...props, children: /* @__PURE__ */ jsx23(FlexRow4, { onClick: (e) => e.stopPropagation(), sx: { width: "100%" }, children: deepValidation ? /* @__PURE__ */ jsx23(BWVerification2, { iconColors: true, boundwitness: block?.[0] }) : /* @__PURE__ */ jsx23(CheckCircleOutlineRounded, { color: "success" }) }) });
1208
+ };
1285
1209
 
1286
1210
  // src/components/block/table/Ex.tsx
1287
1211
  import { TableBody } from "@mui/material";
1288
1212
  import { TableEx } from "@xyo-network/react-table";
1289
- import React25 from "react";
1290
1213
 
1291
1214
  // src/components/block/table/head/TableHead.tsx
1292
1215
  import { InfoOutline } from "@mui/icons-material";
1293
- import { TableCell as TableCell9, TableHead, TableRow, Tooltip as Tooltip7, Typography as Typography5 } from "@mui/material";
1216
+ import {
1217
+ TableCell as TableCell9,
1218
+ TableHead,
1219
+ TableRow,
1220
+ Tooltip as Tooltip7,
1221
+ Typography as Typography5
1222
+ } from "@mui/material";
1294
1223
  import { FlexRow as FlexRow5 } from "@xylabs/react-flexbox";
1295
- import React24 from "react";
1296
- var ToolTipTableCell = /* @__PURE__ */ __name(({ children, align, title, ...props }) => {
1297
- return /* @__PURE__ */ React24.createElement(TableCell9, {
1298
- title,
1299
- ...props
1300
- }, /* @__PURE__ */ React24.createElement(FlexRow5, {
1301
- justifyContent: align
1302
- }, /* @__PURE__ */ React24.createElement(Typography5, {
1303
- variant: "body2"
1304
- }, children), "\xA0", /* @__PURE__ */ React24.createElement(Tooltip7, {
1305
- title
1306
- }, /* @__PURE__ */ React24.createElement(InfoOutline, {
1307
- fontSize: "small"
1308
- }))));
1309
- }, "ToolTipTableCell");
1310
- var BlockchainTableHead = /* @__PURE__ */ __name(() => {
1311
- return /* @__PURE__ */ React24.createElement(TableHead, null, /* @__PURE__ */ React24.createElement(TableRow, null, /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
1312
- align: "left",
1313
- title: "The block number that is included in the block"
1314
- }, "Block"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
1315
- title: "The hash of the block",
1316
- sx: {
1317
- width: "20%"
1318
- }
1319
- }, "Hash"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
1320
- title: "The epoch of the block",
1321
- sx: {
1322
- width: "20%"
1323
- }
1324
- }, "Epoch"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
1325
- align: "left",
1326
- title: "The address of the block producer that produced the block",
1327
- sx: {
1328
- width: "20%"
1329
- }
1330
- }, "Block Producer"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
1331
- align: "left",
1332
- title: "Count of transactions that are included in the block"
1333
- }, "Transactions"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
1334
- align: "left",
1335
- title: "Count of public and private payload counts for the block"
1336
- }, "Payloads"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
1337
- align: "center",
1338
- title: "The result of the local validation check for the block"
1339
- }, "Valid"), /* @__PURE__ */ React24.createElement(ToolTipTableCell, {
1340
- align: "center",
1341
- title: "Link to display the raw JSON of the block"
1342
- }, "JSON")));
1343
- }, "BlockchainTableHead");
1224
+ import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
1225
+ var ToolTipTableCell = ({
1226
+ children,
1227
+ align,
1228
+ title,
1229
+ ...props
1230
+ }) => {
1231
+ return /* @__PURE__ */ jsx24(TableCell9, { title, ...props, children: /* @__PURE__ */ jsxs13(FlexRow5, { justifyContent: align, children: [
1232
+ /* @__PURE__ */ jsx24(Typography5, { variant: "body2", children }),
1233
+ "\xA0",
1234
+ /* @__PURE__ */ jsx24(Tooltip7, { title, children: /* @__PURE__ */ jsx24(InfoOutline, { fontSize: "small" }) })
1235
+ ] }) });
1236
+ };
1237
+ var BlockchainTableHead = () => {
1238
+ return /* @__PURE__ */ jsx24(TableHead, { children: /* @__PURE__ */ jsxs13(TableRow, { children: [
1239
+ /* @__PURE__ */ jsx24(ToolTipTableCell, { align: "left", title: "The block number that is included in the block", children: "Block" }),
1240
+ /* @__PURE__ */ jsx24(ToolTipTableCell, { title: "The hash of the block", sx: { width: "20%" }, children: "Hash" }),
1241
+ /* @__PURE__ */ jsx24(ToolTipTableCell, { title: "The epoch of the block", sx: { width: "20%" }, children: "Epoch" }),
1242
+ /* @__PURE__ */ jsx24(
1243
+ ToolTipTableCell,
1244
+ {
1245
+ align: "left",
1246
+ title: "The address of the block producer that produced the block",
1247
+ sx: { width: "20%" },
1248
+ children: "Block Producer"
1249
+ }
1250
+ ),
1251
+ /* @__PURE__ */ jsx24(ToolTipTableCell, { align: "left", title: "Count of transactions that are included in the block", children: "Transactions" }),
1252
+ /* @__PURE__ */ jsx24(ToolTipTableCell, { align: "left", title: "Count of public and private payload counts for the block", children: "Payloads" }),
1253
+ /* @__PURE__ */ jsx24(ToolTipTableCell, { align: "center", title: "The result of the local validation check for the block", children: "Valid" }),
1254
+ /* @__PURE__ */ jsx24(ToolTipTableCell, { align: "center", title: "Link to display the raw JSON of the block", children: "JSON" })
1255
+ ] }) });
1256
+ };
1344
1257
 
1345
1258
  // src/components/block/table/Ex.tsx
1346
- var BlockchainTableEx = /* @__PURE__ */ __name(({ ref, children, ...props }) => {
1347
- return /* @__PURE__ */ React25.createElement(TableEx, {
1348
- ref,
1349
- ...props
1350
- }, /* @__PURE__ */ React25.createElement(BlockchainTableHead, null), /* @__PURE__ */ React25.createElement(TableBody, null, children));
1351
- }, "BlockchainTableEx");
1259
+ import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
1260
+ var BlockchainTableEx = ({
1261
+ ref,
1262
+ children,
1263
+ ...props
1264
+ }) => {
1265
+ return /* @__PURE__ */ jsxs14(TableEx, { ref, ...props, children: [
1266
+ /* @__PURE__ */ jsx25(BlockchainTableHead, {}),
1267
+ /* @__PURE__ */ jsx25(TableBody, { children })
1268
+ ] });
1269
+ };
1352
1270
  BlockchainTableEx.displayName = "BlockchainTableEx";
1353
1271
 
1354
1272
  // src/components/block/table/row/TableRow.tsx
1355
1273
  import { TableRow as TableRow2, useTheme } from "@mui/material";
1356
1274
  import { alphaCss } from "@xylabs/react-theme";
1357
1275
  import { usePayloadRootHash as usePayloadRootHash3 } from "@xyo-network/react-shared";
1358
- import React26, { useMemo as useMemo11 } from "react";
1359
- var BlockChainTableRow = /* @__PURE__ */ __name(({ block, deepValidation, defaultExpanded, linked, sx, ...props }) => {
1360
- const linkedTableCellProps = useMemo11(() => ({
1361
- block,
1362
- linked
1363
- }), [
1364
- block,
1365
- linked
1366
- ]);
1367
- const defaultTableCellProps = useMemo11(() => ({
1368
- block
1369
- }), [
1370
- block
1371
- ]);
1276
+ import { useMemo as useMemo11 } from "react";
1277
+ import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
1278
+ var BlockChainTableRow = ({
1279
+ block,
1280
+ deepValidation,
1281
+ defaultExpanded,
1282
+ linked,
1283
+ sx,
1284
+ ...props
1285
+ }) => {
1286
+ const linkedTableCellProps = useMemo11(() => ({ block, linked }), [block, linked]);
1287
+ const defaultTableCellProps = useMemo11(() => ({ block }), [block]);
1372
1288
  const hash = usePayloadRootHash3(block?.[0]);
1373
1289
  const [ref, handleClick] = useLinkedBlockItem("block-hash", hash);
1374
1290
  const theme = useTheme();
1375
- return /* @__PURE__ */ React26.createElement(TableRow2, {
1376
- onClick: linked ? handleClick : void 0,
1377
- ref,
1378
- sx: {
1379
- "cursor": linked ? "pointer" : "default",
1380
- "overflowY": "scroll",
1381
- "&:hover": {
1382
- backgroundColor: alphaCss(theme.vars.palette.secondary.light, 0.15)
1291
+ return /* @__PURE__ */ jsxs15(
1292
+ TableRow2,
1293
+ {
1294
+ onClick: linked ? handleClick : void 0,
1295
+ ref,
1296
+ sx: {
1297
+ "cursor": linked ? "pointer" : "default",
1298
+ "overflowY": "scroll",
1299
+ "&:hover": { backgroundColor: alphaCss(theme.vars.palette.secondary.light, 0.15) },
1300
+ ...sx
1383
1301
  },
1384
- ...sx
1385
- },
1386
- ...props
1387
- }, /* @__PURE__ */ React26.createElement(BlockNumberTableCell, {
1388
- align: "left",
1389
- ...linkedTableCellProps
1390
- }), /* @__PURE__ */ React26.createElement(BlockHashTableCell, {
1391
- align: "left",
1392
- ...linkedTableCellProps
1393
- }), /* @__PURE__ */ React26.createElement(BlockEpochTableCell, {
1394
- align: "left",
1395
- ...linkedTableCellProps
1396
- }), /* @__PURE__ */ React26.createElement(BlockProducerTableCell, {
1397
- align: "left",
1398
- ...linkedTableCellProps
1399
- }), /* @__PURE__ */ React26.createElement(BlockTransactionCountTableCell, {
1400
- align: "left",
1401
- ...linkedTableCellProps
1402
- }), /* @__PURE__ */ React26.createElement(BlockPayloadCountsTableCell, {
1403
- align: "left",
1404
- ...linkedTableCellProps
1405
- }), /* @__PURE__ */ React26.createElement(BlockVerificationTableCell, {
1406
- deepValidation,
1407
- ...defaultTableCellProps
1408
- }), /* @__PURE__ */ React26.createElement(BlockJsonViewTableCell, defaultTableCellProps));
1409
- }, "BlockChainTableRow");
1302
+ ...props,
1303
+ children: [
1304
+ /* @__PURE__ */ jsx26(BlockNumberTableCell, { align: "left", ...linkedTableCellProps }),
1305
+ /* @__PURE__ */ jsx26(BlockHashTableCell, { align: "left", ...linkedTableCellProps }),
1306
+ /* @__PURE__ */ jsx26(BlockEpochTableCell, { align: "left", ...linkedTableCellProps }),
1307
+ /* @__PURE__ */ jsx26(BlockProducerTableCell, { align: "left", ...linkedTableCellProps }),
1308
+ /* @__PURE__ */ jsx26(BlockTransactionCountTableCell, { align: "left", ...linkedTableCellProps }),
1309
+ /* @__PURE__ */ jsx26(BlockPayloadCountsTableCell, { align: "left", ...linkedTableCellProps }),
1310
+ /* @__PURE__ */ jsx26(BlockVerificationTableCell, { deepValidation, ...defaultTableCellProps }),
1311
+ /* @__PURE__ */ jsx26(BlockJsonViewTableCell, { ...defaultTableCellProps })
1312
+ ]
1313
+ }
1314
+ );
1315
+ };
1410
1316
 
1411
1317
  // src/components/chain/controls/PollingControlsFlexbox.tsx
1412
- import { Autorenew, Pause } from "@mui/icons-material";
1413
- import { Alert as Alert3, AlertTitle as AlertTitle2, Grow, Icon as Icon2, IconButton as IconButton4, Tooltip as Tooltip8 } from "@mui/material";
1318
+ import {
1319
+ Autorenew,
1320
+ Pause
1321
+ } from "@mui/icons-material";
1322
+ import {
1323
+ Alert as Alert3,
1324
+ AlertTitle as AlertTitle2,
1325
+ Grow,
1326
+ Icon as Icon2,
1327
+ IconButton as IconButton4,
1328
+ Tooltip as Tooltip8
1329
+ } from "@mui/material";
1414
1330
  import { FlexRow as FlexRow6 } from "@xylabs/react-flexbox";
1415
- import React31, { memo } from "react";
1331
+ import { memo } from "react";
1416
1332
 
1417
1333
  // src/components/chain/stats/Dialog.tsx
1418
1334
  import { QueryStats } from "@mui/icons-material";
1419
- import { Dialog as Dialog3, DialogContent as DialogContent3, DialogTitle as DialogTitle3, IconButton as IconButton3 } from "@mui/material";
1420
- import React29, { useState as useState12 } from "react";
1335
+ import {
1336
+ Dialog as Dialog3,
1337
+ DialogContent as DialogContent3,
1338
+ DialogTitle as DialogTitle3,
1339
+ IconButton as IconButton3
1340
+ } from "@mui/material";
1341
+ import { useState as useState12 } from "react";
1421
1342
 
1422
1343
  // src/components/chain/stats/producer/ProducerFlexbox.tsx
1423
- import { ListItem, styled, Typography as Typography6 } from "@mui/material";
1344
+ import {
1345
+ ListItem,
1346
+ styled,
1347
+ Typography as Typography6
1348
+ } from "@mui/material";
1424
1349
  import { ErrorRender as ErrorRender3 } from "@xylabs/react-error";
1425
1350
  import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
1426
1351
  import { isChainSummaryProducers } from "@xyo-network/chain-analyze";
1427
- import React28, { useMemo as useMemo12 } from "react";
1352
+ import { useMemo as useMemo12 } from "react";
1428
1353
 
1429
1354
  // src/components/chain/stats/producer/Table.tsx
1430
- import { Table, TableBody as TableBody2, TableCell as TableCell10, TableHead as TableHead2, TableRow as TableRow3, useTheme as useTheme2 } from "@mui/material";
1355
+ import {
1356
+ Table,
1357
+ TableBody as TableBody2,
1358
+ TableCell as TableCell10,
1359
+ TableHead as TableHead2,
1360
+ TableRow as TableRow3,
1361
+ useTheme as useTheme2
1362
+ } from "@mui/material";
1431
1363
  import { BlockiesAvatar as BlockiesAvatar2 } from "@xyo-network/react-chain-blockies";
1432
- import React27 from "react";
1433
- var ChainProducerStatsTable = /* @__PURE__ */ __name(({ producers, ...props }) => {
1364
+ import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
1365
+ var ChainProducerStatsTable = ({ producers, ...props }) => {
1434
1366
  const theme = useTheme2();
1435
- return /* @__PURE__ */ React27.createElement(Table, props, /* @__PURE__ */ React27.createElement(TableHead2, null, /* @__PURE__ */ React27.createElement(TableRow3, null, /* @__PURE__ */ React27.createElement(TableCell10, null, "Address"), /* @__PURE__ */ React27.createElement(TableCell10, null, "Blocks Produced"), /* @__PURE__ */ React27.createElement(TableCell10, null, "Rewards Earned Produced"))), /* @__PURE__ */ React27.createElement(TableBody2, null, producers?.map((producer) => /* @__PURE__ */ React27.createElement(TableRow3, {
1436
- key: producer.address
1437
- }, /* @__PURE__ */ React27.createElement(TableCell10, null, /* @__PURE__ */ React27.createElement(BlockiesAvatar2, {
1438
- blockiesOptions: {
1439
- seed: producer.address
1440
- },
1441
- sx: {
1442
- height: theme.spacing(2.75),
1443
- width: theme.spacing(2.75)
1444
- }
1445
- })), /* @__PURE__ */ React27.createElement(TableCell10, null, producer.blocksProduced.toString()), /* @__PURE__ */ React27.createElement(TableCell10, null, producer.rewardsEarned.toString())))));
1446
- }, "ChainProducerStatsTable");
1367
+ return /* @__PURE__ */ jsxs16(Table, { ...props, children: [
1368
+ /* @__PURE__ */ jsx27(TableHead2, { children: /* @__PURE__ */ jsxs16(TableRow3, { children: [
1369
+ /* @__PURE__ */ jsx27(TableCell10, { children: "Address" }),
1370
+ /* @__PURE__ */ jsx27(TableCell10, { children: "Blocks Produced" }),
1371
+ /* @__PURE__ */ jsx27(TableCell10, { children: "Rewards Earned Produced" })
1372
+ ] }) }),
1373
+ /* @__PURE__ */ jsx27(TableBody2, { children: producers?.map((producer) => /* @__PURE__ */ jsxs16(TableRow3, { children: [
1374
+ /* @__PURE__ */ jsx27(TableCell10, { children: /* @__PURE__ */ jsx27(BlockiesAvatar2, { blockiesOptions: { seed: producer.address }, sx: { height: theme.spacing(2.75), width: theme.spacing(2.75) } }) }),
1375
+ /* @__PURE__ */ jsx27(TableCell10, { children: producer.blocksProduced.toString() }),
1376
+ /* @__PURE__ */ jsx27(TableCell10, { children: producer.rewardsEarned.toString() })
1377
+ ] }, producer.address)) })
1378
+ ] });
1379
+ };
1447
1380
 
1448
1381
  // src/components/chain/stats/producer/ProducerFlexbox.tsx
1449
- var BlockProducerStatsFlexbox = /* @__PURE__ */ __name(({ payload, ...props }) => {
1382
+ import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
1383
+ var BlockProducerStatsFlexbox = ({ payload, ...props }) => {
1450
1384
  const [producer, producerError] = useMemo12(() => {
1451
1385
  if (payload) {
1452
- return isChainSummaryProducers(payload) ? [
1453
- payload
1454
- ] : [
1455
- void 0,
1456
- new Error("Payload is not a Chain Producer")
1457
- ];
1386
+ return isChainSummaryProducers(payload) ? [payload] : [void 0, new Error("Payload is not a Chain Producer")];
1458
1387
  } else {
1459
1388
  return [];
1460
1389
  }
1461
- }, [
1462
- payload
1463
- ]);
1464
- const producersArray = useMemo12(() => Object.values(producer?.producers ?? {}), [
1465
- producer
1466
- ]);
1467
- return /* @__PURE__ */ React28.createElement(FlexCol3, {
1468
- alignItems: "start",
1469
- gap: 1,
1470
- ...props
1471
- }, /* @__PURE__ */ React28.createElement(ErrorRender3, {
1472
- error: producerError,
1473
- scope: "BlockProducerStatsFlexbox"
1474
- }), /* @__PURE__ */ React28.createElement(Typography6, {
1475
- fontSize: "1rem"
1476
- }, "Block Producers"), /* @__PURE__ */ React28.createElement(ChainProducerStatsTable, {
1477
- producers: producersArray
1478
- }));
1479
- }, "BlockProducerStatsFlexbox");
1390
+ }, [payload]);
1391
+ const producersArray = useMemo12(() => Object.values(producer?.producers ?? {}), [producer]);
1392
+ return /* @__PURE__ */ jsxs17(FlexCol3, { alignItems: "start", gap: 1, ...props, children: [
1393
+ /* @__PURE__ */ jsx28(ErrorRender3, { error: producerError, scope: "BlockProducerStatsFlexbox" }),
1394
+ /* @__PURE__ */ jsx28(Typography6, { fontSize: "1rem", children: "Block Producers" }),
1395
+ /* @__PURE__ */ jsx28(ChainProducerStatsTable, { producers: producersArray })
1396
+ ] });
1397
+ };
1480
1398
  var StyledListItem = styled(ListItem)(() => ({
1481
1399
  paddingTop: 0,
1482
1400
  paddingBottom: 0
1483
1401
  }));
1484
1402
 
1485
1403
  // src/components/chain/stats/Dialog.tsx
1486
- var ChainAnalyzerStatsDialog = /* @__PURE__ */ __name((props) => {
1404
+ import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
1405
+ var ChainAnalyzerStatsDialog = (props) => {
1487
1406
  const { analyzers, statsUpdated } = useChainAnalyzersContext();
1488
- return /* @__PURE__ */ React29.createElement(Dialog3, props, /* @__PURE__ */ React29.createElement(DialogTitle3, null, "Chain Analysis"), /* @__PURE__ */ React29.createElement(DialogContent3, null, statsUpdated > 0 && Object.entries(analyzers).map(([id2, analyzer]) => /* @__PURE__ */ React29.createElement("div", {
1489
- key: id2
1490
- }, id2 === "producers" && /* @__PURE__ */ React29.createElement(BlockProducerStatsFlexbox, {
1491
- payload: analyzer.result()
1492
- })))));
1493
- }, "ChainAnalyzerStatsDialog");
1494
- var ChainAnalyzerStatsDialogFromContext = /* @__PURE__ */ __name((props) => {
1407
+ return /* @__PURE__ */ jsxs18(Dialog3, { ...props, children: [
1408
+ /* @__PURE__ */ jsx29(DialogTitle3, { children: "Chain Analysis" }),
1409
+ /* @__PURE__ */ jsx29(DialogContent3, { children: statsUpdated > 0 && Object.entries(analyzers).map(([id2, analyzer]) => /* @__PURE__ */ jsx29("div", { children: id2 === "producers" && /* @__PURE__ */ jsx29(BlockProducerStatsFlexbox, { payload: analyzer.result() }) }, id2)) })
1410
+ ] });
1411
+ };
1412
+ var ChainAnalyzerStatsDialogFromContext = (props) => {
1495
1413
  const [open, setOpen] = useState12(false);
1496
- const handleClose = /* @__PURE__ */ __name(() => setOpen(false), "handleClose");
1497
- return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(IconButton3, {
1498
- onClick: /* @__PURE__ */ __name(() => setOpen(true), "onClick")
1499
- }, /* @__PURE__ */ React29.createElement(QueryStats, null)), /* @__PURE__ */ React29.createElement(ChainAnalyzerStatsDialog, {
1500
- onClose: handleClose,
1501
- open,
1502
- ...props
1503
- }));
1504
- }, "ChainAnalyzerStatsDialogFromContext");
1414
+ const handleClose = () => setOpen(false);
1415
+ return /* @__PURE__ */ jsxs18(Fragment6, { children: [
1416
+ /* @__PURE__ */ jsx29(IconButton3, { onClick: () => setOpen(true), children: /* @__PURE__ */ jsx29(QueryStats, {}) }),
1417
+ /* @__PURE__ */ jsx29(ChainAnalyzerStatsDialog, { onClose: handleClose, open, ...props })
1418
+ ] });
1419
+ };
1505
1420
 
1506
1421
  // src/components/chain/controls/PulseSvgIcon.tsx
1507
- import { createSvgIcon, keyframes, styled as styled2 } from "@mui/material";
1508
- import React30 from "react";
1509
- var PulseSvgIcon = createSvgIcon(/* @__PURE__ */ React30.createElement("svg", {
1510
- viewBox: "0 0 80 80",
1511
- version: "1.1",
1512
- xmlns: "http://www.w3.org/2000/svg"
1513
- }, /* @__PURE__ */ React30.createElement("g", {
1514
- transform: "translate(34,34)"
1515
- }, /* @__PURE__ */ React30.createElement("circle", {
1516
- className: "core",
1517
- cx: "0",
1518
- cy: "0",
1519
- r: "6"
1520
- }), /* @__PURE__ */ React30.createElement("circle", {
1521
- className: "radar",
1522
- cx: "0",
1523
- cy: "0",
1524
- r: "6"
1525
- }))), "PulseSvgIcon");
1422
+ import {
1423
+ createSvgIcon,
1424
+ keyframes,
1425
+ styled as styled2
1426
+ } from "@mui/material";
1427
+ import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
1428
+ var PulseSvgIcon = createSvgIcon(
1429
+ /* @__PURE__ */ jsx30("svg", { viewBox: "0 0 80 80", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxs19("g", { transform: "translate(34,34)", children: [
1430
+ /* @__PURE__ */ jsx30("circle", { className: "core", cx: "0", cy: "0", r: "6" }),
1431
+ /* @__PURE__ */ jsx30("circle", { className: "radar", cx: "0", cy: "0", r: "6" })
1432
+ ] }) }),
1433
+ "PulseSvgIcon"
1434
+ );
1526
1435
  var pulse1 = keyframes`
1527
1436
  0% {
1528
1437
  opacity: 0;
@@ -1578,57 +1487,62 @@ var StyledPulseSvgIcon = styled2(PulseSvgIcon)(({ theme }) => {
1578
1487
  });
1579
1488
 
1580
1489
  // src/components/chain/controls/PollingControlsFlexbox.tsx
1581
- var PollingControlsFlexbox = /* @__PURE__ */ __name(({ blocksBehind, pollingState, setPollingState }) => {
1490
+ import { jsx as jsx31, jsxs as jsxs20 } from "react/jsx-runtime";
1491
+ var PollingControlsFlexbox = ({
1492
+ blocksBehind,
1493
+ pollingState,
1494
+ setPollingState
1495
+ }) => {
1582
1496
  const paused = pollingState === "paused";
1583
1497
  const running = pollingState === "running";
1584
- return /* @__PURE__ */ React31.createElement(FlexRow6, {
1585
- justifyContent: "space-between",
1586
- width: "100%"
1587
- }, /* @__PURE__ */ React31.createElement(FlexRow6, {
1588
- gap: 2
1589
- }, running && /* @__PURE__ */ React31.createElement(IconButton4, {
1590
- onClick: /* @__PURE__ */ __name(() => setPollingState?.("paused"), "onClick"),
1591
- title: "Pause Block Stream"
1592
- }, /* @__PURE__ */ React31.createElement(Pause, null)), paused && /* @__PURE__ */ React31.createElement(IconButton4, {
1593
- onClick: /* @__PURE__ */ __name(() => setPollingState?.("running"), "onClick"),
1594
- title: "Re-Sync Block Stream"
1595
- }, /* @__PURE__ */ React31.createElement(Autorenew, null)), /* @__PURE__ */ React31.createElement(ChainAnalyzerStatsDialogFromContext, null)), /* @__PURE__ */ React31.createElement(FlexRow6, {
1596
- gap: 2
1597
- }, /* @__PURE__ */ React31.createElement(Grow, {
1598
- in: (blocksBehind ?? 0) > 0
1599
- }, /* @__PURE__ */ React31.createElement(Tooltip8, {
1600
- title: "Click to Re-Sync"
1601
- }, /* @__PURE__ */ React31.createElement(Alert3, {
1602
- sx: {
1603
- py: 0,
1604
- px: 1,
1605
- cursor: "pointer"
1606
- },
1607
- severity: "warning",
1608
- onClick: /* @__PURE__ */ __name(() => setPollingState?.("running"), "onClick")
1609
- }, /* @__PURE__ */ React31.createElement(AlertTitle2, {
1610
- sx: {
1611
- mb: 0
1612
- }
1613
- }, "Behind:", " ", blocksBehind)))), /* @__PURE__ */ React31.createElement(Icon2, null, /* @__PURE__ */ React31.createElement(StyledPulseSvgIcon, {
1614
- className: running ? "" : "paused"
1615
- }))));
1616
- }, "PollingControlsFlexbox");
1617
- var MemoizedPollingControlsFlexbox = /* @__PURE__ */ memo(PollingControlsFlexbox);
1498
+ return /* @__PURE__ */ jsxs20(FlexRow6, { justifyContent: "space-between", width: "100%", children: [
1499
+ /* @__PURE__ */ jsxs20(FlexRow6, { gap: 2, children: [
1500
+ running && /* @__PURE__ */ jsx31(IconButton4, { onClick: () => setPollingState?.("paused"), title: "Pause Block Stream", children: /* @__PURE__ */ jsx31(Pause, {}) }),
1501
+ paused && /* @__PURE__ */ jsx31(IconButton4, { onClick: () => setPollingState?.("running"), title: "Re-Sync Block Stream", children: /* @__PURE__ */ jsx31(Autorenew, {}) }),
1502
+ /* @__PURE__ */ jsx31(ChainAnalyzerStatsDialogFromContext, {})
1503
+ ] }),
1504
+ /* @__PURE__ */ jsxs20(FlexRow6, { gap: 2, children: [
1505
+ /* @__PURE__ */ jsx31(Grow, { in: (blocksBehind ?? 0) > 0, children: /* @__PURE__ */ jsx31(Tooltip8, { title: "Click to Re-Sync", children: /* @__PURE__ */ jsx31(
1506
+ Alert3,
1507
+ {
1508
+ sx: {
1509
+ py: 0,
1510
+ px: 1,
1511
+ cursor: "pointer"
1512
+ },
1513
+ severity: "warning",
1514
+ onClick: () => setPollingState?.("running"),
1515
+ children: /* @__PURE__ */ jsxs20(AlertTitle2, { sx: { mb: 0 }, children: [
1516
+ "Behind:",
1517
+ " ",
1518
+ blocksBehind
1519
+ ] })
1520
+ }
1521
+ ) }) }),
1522
+ /* @__PURE__ */ jsx31(Icon2, { children: /* @__PURE__ */ jsx31(StyledPulseSvgIcon, { className: running ? "" : "paused" }) })
1523
+ ] })
1524
+ ] });
1525
+ };
1526
+ var MemoizedPollingControlsFlexbox = memo(PollingControlsFlexbox);
1618
1527
 
1619
1528
  // src/components/chain/dialog/Dialog.tsx
1620
- import { Button as Button4, Dialog as Dialog4, DialogActions as DialogActions3, DialogContent as DialogContent4 } from "@mui/material";
1621
- import React32 from "react";
1622
- var TransactionsDialog = /* @__PURE__ */ __name((props) => {
1623
- return /* @__PURE__ */ React32.createElement(Dialog4, props, /* @__PURE__ */ React32.createElement(DialogContent4, null, "Transactions Dialog"), /* @__PURE__ */ React32.createElement(DialogActions3, null, /* @__PURE__ */ React32.createElement(Button4, {
1624
- variant: "outlined",
1625
- onClick: /* @__PURE__ */ __name((e) => props?.onClose?.(e, "escapeKeyDown"), "onClick")
1626
- }, "Close")));
1627
- }, "TransactionsDialog");
1529
+ import {
1530
+ Button as Button4,
1531
+ Dialog as Dialog4,
1532
+ DialogActions as DialogActions3,
1533
+ DialogContent as DialogContent4
1534
+ } from "@mui/material";
1535
+ import { jsx as jsx32, jsxs as jsxs21 } from "react/jsx-runtime";
1536
+ var TransactionsDialog = (props) => {
1537
+ return /* @__PURE__ */ jsxs21(Dialog4, { ...props, children: [
1538
+ /* @__PURE__ */ jsx32(DialogContent4, { children: "Transactions Dialog" }),
1539
+ /* @__PURE__ */ jsx32(DialogActions3, { children: /* @__PURE__ */ jsx32(Button4, { variant: "outlined", onClick: (e) => props?.onClose?.(e, "escapeKeyDown"), children: "Close" }) })
1540
+ ] });
1541
+ };
1628
1542
 
1629
1543
  // src/components/chain/hooks/useOnBlock.ts
1630
1544
  import { useEffect as useEffect3, useRef as useRef3 } from "react";
1631
- var useOnBlock = /* @__PURE__ */ __name((initialHeadNumber, onAddBlock, liveHead, pollingState) => {
1545
+ var useOnBlock = (initialHeadNumber, onAddBlock, liveHead, pollingState) => {
1632
1546
  const blocksWhilePaused = useRef3([]);
1633
1547
  const lastLiveHead = useRef3(liveHead);
1634
1548
  useEffect3(() => {
@@ -1651,63 +1565,52 @@ var useOnBlock = /* @__PURE__ */ __name((initialHeadNumber, onAddBlock, liveHead
1651
1565
  void onAddBlock(liveHead);
1652
1566
  }
1653
1567
  }
1654
- }, [
1655
- liveHead,
1656
- pollingState
1657
- ]);
1568
+ }, [liveHead, pollingState]);
1658
1569
  return blocksWhilePaused.current;
1659
- }, "useOnBlock");
1570
+ };
1660
1571
 
1661
1572
  // src/components/chain/pagination/BlockChainPagination.tsx
1662
1573
  import { TablePaginationActions } from "@xyo-network/react-payload-table";
1663
- import React33 from "react";
1664
- var BlockChainPagination = /* @__PURE__ */ __name(({ count = 0, onPageChange, page, rowsPerPage = 10 }) => {
1665
- return /* @__PURE__ */ React33.createElement(TablePaginationActions, {
1666
- count,
1667
- onPageChange,
1668
- page,
1669
- rowsPerPage
1670
- });
1671
- }, "BlockChainPagination");
1574
+ import { jsx as jsx33 } from "react/jsx-runtime";
1575
+ var BlockChainPagination = ({
1576
+ count = 0,
1577
+ onPageChange,
1578
+ page,
1579
+ rowsPerPage = 10
1580
+ }) => {
1581
+ return /* @__PURE__ */ jsx33(TablePaginationActions, { count, onPageChange, page, rowsPerPage });
1582
+ };
1672
1583
 
1673
1584
  // src/components/chain/pagination/hooks/usePagination.tsx
1674
1585
  import { useMemo as useMemo13, useState as useState13 } from "react";
1675
- var useChainPagination = /* @__PURE__ */ __name((pageSize, blockComponents) => {
1586
+ var useChainPagination = (pageSize, blockComponents) => {
1676
1587
  const [page, setPage] = useState13(0);
1677
1588
  const paginatedBlockComponents = useMemo13(() => {
1678
1589
  const startIndex = page * pageSize;
1679
1590
  const endIndex = startIndex + pageSize;
1680
1591
  return blockComponents?.slice(startIndex, endIndex);
1681
- }, [
1682
- blockComponents,
1683
- page,
1684
- pageSize
1685
- ]);
1686
- const onPageChange = /* @__PURE__ */ __name((_event, newPage) => {
1592
+ }, [blockComponents, page, pageSize]);
1593
+ const onPageChange = (_event, newPage) => {
1687
1594
  setPage(newPage);
1688
- }, "onPageChange");
1595
+ };
1689
1596
  return {
1690
1597
  onPageChange,
1691
1598
  page,
1692
1599
  paginatedBlockComponents
1693
1600
  };
1694
- }, "useChainPagination");
1601
+ };
1695
1602
 
1696
1603
  // src/components/chain/render/dynamic/flexbox/variants/Base.tsx
1697
1604
  import { ErrorRender as ErrorRender4 } from "@xylabs/react-error";
1698
1605
  import { FlexCol as FlexCol5 } from "@xylabs/react-flexbox";
1699
- import React35 from "react";
1700
1606
 
1701
1607
  // src/components/chain/list/Animated.tsx
1702
1608
  import { AnimatedList } from "@xylabs/react-animation";
1703
- import React34 from "react";
1704
1609
 
1705
1610
  // src/components/chain/styled/BlockListWrapperFlexbox.tsx
1706
1611
  import { styled as styled3 } from "@mui/material";
1707
1612
  import { FlexCol as FlexCol4 } from "@xylabs/react-flexbox";
1708
- var BlockListWrapperFlexBox = styled3(FlexCol4, {
1709
- name: "BlockListWrapperFlexbox"
1710
- })(() => ({
1613
+ var BlockListWrapperFlexBox = styled3(FlexCol4, { name: "BlockListWrapperFlexbox" })(() => ({
1711
1614
  "& > div:nth-of-type(2) .block-heading-flexbox .divider-spacer": {
1712
1615
  // hide the spacer for the first element
1713
1616
  visibility: "hidden"
@@ -1720,40 +1623,42 @@ var BlockListWrapperFlexBox = styled3(FlexCol4, {
1720
1623
  }));
1721
1624
 
1722
1625
  // src/components/chain/list/Animated.tsx
1723
- var BlockListAnimated = /* @__PURE__ */ __name(({ blockChainRenderComponents }) => {
1724
- return /* @__PURE__ */ React34.createElement(BlockListWrapperFlexBox, {
1725
- alignItems: "stretch",
1726
- width: "100%"
1727
- }, /* @__PURE__ */ React34.createElement(AnimatedList, {
1728
- fullWidth: true,
1729
- items: blockChainRenderComponents
1730
- }));
1731
- }, "BlockListAnimated");
1626
+ import { jsx as jsx34 } from "react/jsx-runtime";
1627
+ var BlockListAnimated = ({ blockChainRenderComponents }) => {
1628
+ return /* @__PURE__ */ jsx34(
1629
+ BlockListWrapperFlexBox,
1630
+ {
1631
+ alignItems: "stretch",
1632
+ width: "100%",
1633
+ children: /* @__PURE__ */ jsx34(
1634
+ AnimatedList,
1635
+ {
1636
+ fullWidth: true,
1637
+ items: blockChainRenderComponents
1638
+ }
1639
+ )
1640
+ }
1641
+ );
1642
+ };
1732
1643
 
1733
1644
  // src/components/chain/render/dynamic/hooks/useDynamicBlockRenderComponents.ts
1734
1645
  import { useMemo as useMemo14 } from "react";
1735
- var useDynamicBlockRenderComponents = /* @__PURE__ */ __name((BlockComponent, blockChainRenderProps) => {
1646
+ var useDynamicBlockRenderComponents = (BlockComponent, blockChainRenderProps) => {
1736
1647
  const { maxBlocks } = blockChainRenderProps ?? {};
1737
- const chainIteratorParams = useMemo14(() => blockChainRenderProps ?? {
1738
- name: "unknown"
1739
- }, [
1740
- blockChainRenderProps
1741
- ]);
1648
+ const chainIteratorParams = useMemo14(() => blockChainRenderProps ?? { name: "unknown" }, [blockChainRenderProps]);
1742
1649
  const [params, paramsError] = useChainIteratorParams(chainIteratorParams);
1743
1650
  const { blockChainRenderComponents, onAddBlock } = useDynamicBlockComponents(BlockComponent, params, maxBlocks);
1744
1651
  const { head: liveHead } = useChainIteratorStore(params);
1745
1652
  const { pollingState, updatePollingState } = useChainPollingContext();
1746
1653
  const blocksWhilePaused = useOnBlock(blockChainRenderComponents[0]?.block?.[0].block, onAddBlock, liveHead, pollingState);
1747
1654
  return {
1748
- errors: [
1749
- paramsError
1750
- ],
1655
+ errors: [paramsError],
1751
1656
  blockChainRenderComponents,
1752
1657
  blocksWhilePaused,
1753
1658
  updatePollingState,
1754
1659
  pollingState
1755
1660
  };
1756
- }, "useDynamicBlockRenderComponents");
1661
+ };
1757
1662
 
1758
1663
  // src/components/chain/render/dynamic/hooks/useRemoteBlockChainRenderProps.ts
1759
1664
  import { usePromise as usePromise6 } from "@xylabs/react-promise";
@@ -1763,111 +1668,94 @@ import { useMemo as useMemo15 } from "react";
1763
1668
  import { assertEx as assertEx4 } from "@xylabs/assert";
1764
1669
  import { asArchivistInstance } from "@xyo-network/archivist-model";
1765
1670
  import { HttpBridge, HttpBridgeConfigSchema } from "@xyo-network/bridge-http";
1766
- var getChainArchivistFromBridge = /* @__PURE__ */ __name(async (params) => {
1671
+ var getChainArchivistFromBridge = async (params) => {
1767
1672
  const { url, chainArchivistModuleId } = params;
1768
- const config = {
1769
- schema: HttpBridgeConfigSchema,
1770
- client: {
1771
- url
1772
- }
1773
- };
1774
- const bridge = await HttpBridge.create({
1775
- config
1776
- });
1673
+ const config = { schema: HttpBridgeConfigSchema, client: { url } };
1674
+ const bridge = await HttpBridge.create({ config });
1777
1675
  const resolved = await bridge.resolve(chainArchivistModuleId);
1778
1676
  const mod = assertEx4(resolved, () => `Module ${chainArchivistModuleId} not found`);
1779
1677
  return assertEx4(asArchivistInstance(mod), () => `Module ${chainArchivistModuleId} is not an archivist`);
1780
- }, "getChainArchivistFromBridge");
1678
+ };
1781
1679
 
1782
1680
  // src/lib/getChainId.ts
1783
1681
  import { toAddress as toAddress2 } from "@xylabs/hex";
1784
1682
  var id = toAddress2("ce080bf3043a40c6c8838c7e813c00ab53df1684");
1785
- var getChainId = /* @__PURE__ */ __name(() => {
1683
+ var getChainId = () => {
1786
1684
  return id;
1787
- }, "getChainId");
1685
+ };
1788
1686
 
1789
1687
  // src/components/chain/render/dynamic/hooks/useRemoteBlockChainRenderProps.ts
1790
- var useRemoteBlockChainRenderProps = /* @__PURE__ */ __name((chainArchivistModuleId, url, blockChainRenderPropsArg) => {
1688
+ var useRemoteBlockChainRenderProps = (chainArchivistModuleId, url, blockChainRenderPropsArg) => {
1791
1689
  const [chainArchivist, chainArchivistError] = usePromise6(async () => {
1792
1690
  if (url !== void 0 && chainArchivistModuleId !== void 0) {
1793
- return await getChainArchivistFromBridge({
1794
- url,
1795
- chainArchivistModuleId
1796
- });
1691
+ return await getChainArchivistFromBridge({ url, chainArchivistModuleId });
1797
1692
  }
1798
- }, [
1799
- url,
1800
- chainArchivistModuleId
1801
- ]);
1693
+ }, [url, chainArchivistModuleId]);
1802
1694
  const blockChainRenderProps = useMemo15(() => ({
1803
1695
  ...blockChainRenderPropsArg,
1804
1696
  chainArchivist,
1805
1697
  name: "blockChainRenderProps"
1806
- }), [
1807
- blockChainRenderPropsArg,
1808
- chainArchivist
1809
- ]);
1698
+ }), [blockChainRenderPropsArg, chainArchivist]);
1810
1699
  return {
1811
1700
  blockChainRenderProps,
1812
1701
  error: chainArchivistError
1813
1702
  };
1814
- }, "useRemoteBlockChainRenderProps");
1703
+ };
1815
1704
 
1816
1705
  // src/components/chain/render/dynamic/flexbox/variants/Base.tsx
1817
- var DynamicListBase = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
1818
- const { errors, blockChainRenderComponents, blocksWhilePaused, pollingState, updatePollingState } = useDynamicBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps);
1819
- return /* @__PURE__ */ React35.createElement(FlexCol5, {
1820
- alignItems: "start",
1821
- ...props
1822
- }, errors?.map((error) => /* @__PURE__ */ React35.createElement(ErrorRender4, {
1823
- error,
1824
- key: error?.name,
1825
- scope: "DynamicBlockchainRenderFlexboxInner"
1826
- })), /* @__PURE__ */ React35.createElement(MemoizedPollingControlsFlexbox, {
1827
- blocksBehind: blocksWhilePaused?.length,
1706
+ import { jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
1707
+ var DynamicListBase = ({ blockChainRenderProps, ...props }) => {
1708
+ const {
1709
+ errors,
1710
+ blockChainRenderComponents,
1711
+ blocksWhilePaused,
1828
1712
  pollingState,
1829
- setPollingState: updatePollingState
1830
- }), /* @__PURE__ */ React35.createElement(BlockListAnimated, {
1831
- blockChainRenderComponents
1832
- }));
1833
- }, "DynamicListBase");
1713
+ updatePollingState
1714
+ } = useDynamicBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps);
1715
+ return /* @__PURE__ */ jsxs22(FlexCol5, { alignItems: "start", ...props, children: [
1716
+ errors?.map((error) => /* @__PURE__ */ jsx35(ErrorRender4, { error, scope: "DynamicBlockchainRenderFlexboxInner" }, error?.name)),
1717
+ /* @__PURE__ */ jsx35(
1718
+ MemoizedPollingControlsFlexbox,
1719
+ {
1720
+ blocksBehind: blocksWhilePaused?.length,
1721
+ pollingState,
1722
+ setPollingState: updatePollingState
1723
+ }
1724
+ ),
1725
+ /* @__PURE__ */ jsx35(BlockListAnimated, { blockChainRenderComponents })
1726
+ ] });
1727
+ };
1834
1728
 
1835
1729
  // src/components/chain/render/dynamic/flexbox/variants/WithAnalysis.tsx
1836
1730
  import { isAddress } from "@xylabs/hex";
1837
1731
  import { ChainProducersAnalyzer } from "@xyo-network/chain-analyze";
1838
- import React36, { useMemo as useMemo16 } from "react";
1839
- var WithAnalysis = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
1732
+ import { useMemo as useMemo16 } from "react";
1733
+ import { jsx as jsx36 } from "react/jsx-runtime";
1734
+ var WithAnalysis = ({ blockChainRenderProps, ...props }) => {
1840
1735
  const { chainId } = blockChainRenderProps ?? {};
1841
1736
  const analyzers = useMemo16(() => {
1842
1737
  if (isAddress(chainId)) {
1843
- return {
1844
- producers: new ChainProducersAnalyzer()
1845
- };
1738
+ return { producers: new ChainProducersAnalyzer() };
1846
1739
  }
1847
- }, [
1848
- chainId
1849
- ]);
1850
- return /* @__PURE__ */ React36.createElement(ChainAnalyzersProvider, {
1851
- analyzers
1852
- }, /* @__PURE__ */ React36.createElement(ChainPollingProvider, null, /* @__PURE__ */ React36.createElement(DynamicListBase, {
1853
- blockChainRenderProps,
1854
- ...props
1855
- })));
1856
- }, "WithAnalysis");
1740
+ }, [chainId]);
1741
+ return /* @__PURE__ */ jsx36(ChainAnalyzersProvider, { analyzers, children: /* @__PURE__ */ jsx36(ChainPollingProvider, { children: /* @__PURE__ */ jsx36(DynamicListBase, { blockChainRenderProps, ...props }) }) });
1742
+ };
1857
1743
 
1858
1744
  // src/components/chain/render/dynamic/flexbox/variants/WithRemote.tsx
1859
1745
  import { ErrorRender as ErrorRender5 } from "@xylabs/react-error";
1860
- import React37 from "react";
1861
- var WithRemote = /* @__PURE__ */ __name(({ url, chainArchivistModuleId, blockChainRenderProps: blockChainRenderPropsArg, ...props }) => {
1746
+ import { Fragment as Fragment7, jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
1747
+ var WithRemote = ({
1748
+ url,
1749
+ chainArchivistModuleId,
1750
+ blockChainRenderProps: blockChainRenderPropsArg,
1751
+ ...props
1752
+ }) => {
1862
1753
  const { error, blockChainRenderProps } = useRemoteBlockChainRenderProps(chainArchivistModuleId, url, blockChainRenderPropsArg);
1863
- return /* @__PURE__ */ React37.createElement(React37.Fragment, null, /* @__PURE__ */ React37.createElement(ErrorRender5, {
1864
- error,
1865
- scope: "RemoteChainProviderFlexbox"
1866
- }), /* @__PURE__ */ React37.createElement(WithAnalysis, {
1867
- blockChainRenderProps,
1868
- ...props
1869
- }));
1870
- }, "WithRemote");
1754
+ return /* @__PURE__ */ jsxs23(Fragment7, { children: [
1755
+ /* @__PURE__ */ jsx37(ErrorRender5, { error, scope: "RemoteChainProviderFlexbox" }),
1756
+ /* @__PURE__ */ jsx37(WithAnalysis, { blockChainRenderProps, ...props })
1757
+ ] });
1758
+ };
1871
1759
 
1872
1760
  // src/components/chain/render/dynamic/flexbox/Flexbox.tsx
1873
1761
  var DynamicBlockchainRenderFlexbox = {
@@ -1879,155 +1767,154 @@ var DynamicBlockchainRenderFlexbox = {
1879
1767
  // src/components/chain/render/static/flexbox/variants/Base.tsx
1880
1768
  import { ErrorRender as ErrorRender6 } from "@xylabs/react-error";
1881
1769
  import { FlexCol as FlexCol6, FlexGrowRow as FlexGrowRow2 } from "@xylabs/react-flexbox";
1882
- import React38 from "react";
1883
1770
 
1884
1771
  // src/components/chain/render/static/hooks/useStaticBlockRenderComponents.ts
1885
1772
  import { exists } from "@xylabs/exists";
1886
1773
  import { useMemo as useMemo17 } from "react";
1887
1774
  var DEFAULT_PAGE_SIZE = 25;
1888
- var useStaticBlockRenderComponents = /* @__PURE__ */ __name((BlockComponent, blockChainRenderProps) => {
1775
+ var useStaticBlockRenderComponents = (BlockComponent, blockChainRenderProps) => {
1889
1776
  const { maxBlocks } = blockChainRenderProps ?? {};
1890
1777
  const pageSize = blockChainRenderProps?.pageSize ?? DEFAULT_PAGE_SIZE;
1891
- const chainIteratorParams = useMemo17(() => blockChainRenderProps ?? {
1892
- name: "unknown"
1893
- }, [
1894
- blockChainRenderProps
1895
- ]);
1778
+ const chainIteratorParams = useMemo17(() => blockChainRenderProps ?? { name: "unknown" }, [blockChainRenderProps]);
1896
1779
  const [params, paramsError] = useChainIteratorParams(chainIteratorParams);
1897
1780
  const [blocks, blocksError] = useIterateChain(params, maxBlocks);
1898
1781
  const { blockComponents, errors: blockComponentsError } = useStaticBlockComponents(BlockComponent, params, blocks);
1899
- const { onPageChange, page, paginatedBlockComponents } = useChainPagination(pageSize, blockComponents);
1782
+ const {
1783
+ onPageChange,
1784
+ page,
1785
+ paginatedBlockComponents
1786
+ } = useChainPagination(pageSize, blockComponents);
1900
1787
  return {
1901
1788
  paginatedBlockComponents,
1902
1789
  blockComponents,
1903
- errors: [
1904
- paramsError,
1905
- blocksError,
1906
- blockComponentsError
1907
- ].filter(exists),
1790
+ errors: [paramsError, blocksError, blockComponentsError].filter(exists),
1908
1791
  onPageChange,
1909
1792
  page,
1910
1793
  pageSize
1911
1794
  };
1912
- }, "useStaticBlockRenderComponents");
1795
+ };
1913
1796
 
1914
1797
  // src/components/chain/render/static/flexbox/variants/Base.tsx
1915
- var StaticListBase = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
1916
- const { blockComponents, errors, paginatedBlockComponents, onPageChange, page, pageSize } = useStaticBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps);
1917
- return /* @__PURE__ */ React38.createElement(FlexCol6, {
1918
- alignItems: "start",
1919
- gap: 2,
1920
- width: "100%",
1921
- ...props
1922
- }, errors?.map((error) => /* @__PURE__ */ React38.createElement(ErrorRender6, {
1923
- error,
1924
- key: error.name,
1925
- scope: "StaticBlockchainFlexboxInner"
1926
- })), (paginatedBlockComponents?.length ?? 0) > 0 ? /* @__PURE__ */ React38.createElement(FlexGrowRow2, {
1927
- justifyContent: "space-between",
1928
- width: "100%"
1929
- }, /* @__PURE__ */ React38.createElement(ChainAnalyzerStatsDialogFromContext, null), /* @__PURE__ */ React38.createElement(BlockChainPagination, {
1930
- count: blockComponents?.length ?? 0,
1798
+ import { jsx as jsx38, jsxs as jsxs24 } from "react/jsx-runtime";
1799
+ var StaticListBase = ({ blockChainRenderProps, ...props }) => {
1800
+ const {
1801
+ blockComponents,
1802
+ errors,
1803
+ paginatedBlockComponents,
1931
1804
  onPageChange,
1932
1805
  page,
1933
- rowsPerPage: pageSize
1934
- })) : null, /* @__PURE__ */ React38.createElement(BlockListAnimated, {
1935
- blockChainRenderComponents: paginatedBlockComponents
1936
- }));
1937
- }, "StaticListBase");
1806
+ pageSize
1807
+ } = useStaticBlockRenderComponents(BlockHeadingFlexbox, blockChainRenderProps);
1808
+ return /* @__PURE__ */ jsxs24(FlexCol6, { alignItems: "start", gap: 2, width: "100%", ...props, children: [
1809
+ errors?.map((error) => /* @__PURE__ */ jsx38(ErrorRender6, { error, scope: "StaticBlockchainFlexboxInner" }, error.name)),
1810
+ (paginatedBlockComponents?.length ?? 0) > 0 ? /* @__PURE__ */ jsxs24(FlexGrowRow2, { justifyContent: "space-between", width: "100%", children: [
1811
+ /* @__PURE__ */ jsx38(ChainAnalyzerStatsDialogFromContext, {}),
1812
+ /* @__PURE__ */ jsx38(BlockChainPagination, { count: blockComponents?.length ?? 0, onPageChange, page, rowsPerPage: pageSize })
1813
+ ] }) : null,
1814
+ /* @__PURE__ */ jsx38(BlockListAnimated, { blockChainRenderComponents: paginatedBlockComponents })
1815
+ ] });
1816
+ };
1938
1817
 
1939
1818
  // src/components/chain/render/static/flexbox/variants/WithAnalysis.tsx
1940
1819
  import { isAddress as isAddress2 } from "@xylabs/hex";
1941
1820
  import { ChainProducersAnalyzer as ChainProducersAnalyzer2 } from "@xyo-network/chain-analyze";
1942
- import React39, { useMemo as useMemo18 } from "react";
1943
- var WithAnalysis2 = /* @__PURE__ */ __name(({ blockChainRenderProps, ...props }) => {
1821
+ import { useMemo as useMemo18 } from "react";
1822
+ import { jsx as jsx39 } from "react/jsx-runtime";
1823
+ var WithAnalysis2 = ({ blockChainRenderProps, ...props }) => {
1944
1824
  const { chainId } = blockChainRenderProps ?? {};
1945
1825
  const analyzers = useMemo18(() => {
1946
1826
  if (isAddress2(chainId)) {
1947
- return {
1948
- producers: new ChainProducersAnalyzer2()
1949
- };
1827
+ return { producers: new ChainProducersAnalyzer2() };
1950
1828
  }
1951
- }, [
1952
- chainId
1953
- ]);
1954
- return /* @__PURE__ */ React39.createElement(ChainAnalyzersProvider, {
1955
- analyzers
1956
- }, /* @__PURE__ */ React39.createElement(StaticListBase, {
1957
- blockChainRenderProps,
1958
- ...props
1959
- }));
1960
- }, "WithAnalysis");
1829
+ }, [chainId]);
1830
+ return /* @__PURE__ */ jsx39(ChainAnalyzersProvider, { analyzers, children: /* @__PURE__ */ jsx39(StaticListBase, { blockChainRenderProps, ...props }) });
1831
+ };
1961
1832
 
1962
1833
  // src/components/chain/render/static/flexbox/Flexbox.tsx
1963
- var StaticBlockchainRenderFlexBox = {
1964
- Base: StaticListBase,
1965
- WithAnalysis: WithAnalysis2
1966
- };
1834
+ var StaticBlockchainRenderFlexBox = { Base: StaticListBase, WithAnalysis: WithAnalysis2 };
1967
1835
 
1968
1836
  // src/components/payload/builder/Flexbox.tsx
1969
1837
  import { FlexCol as FlexCol7 } from "@xylabs/react-flexbox";
1970
1838
  import { JsonViewerEx as JsonViewerEx2 } from "@xyo-network/react-payload-raw-info";
1971
- import React40, { useState as useState14 } from "react";
1972
- var PayloadBuilderFlexbox = /* @__PURE__ */ __name(({ BuilderComponent, onBuild, ...props }) => {
1839
+ import { useState as useState14 } from "react";
1840
+ import { jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
1841
+ var PayloadBuilderFlexbox = ({
1842
+ BuilderComponent,
1843
+ onBuild,
1844
+ ...props
1845
+ }) => {
1973
1846
  const [payload, setPayload] = useState14();
1974
- const onBuildLocal = /* @__PURE__ */ __name((payload2) => {
1847
+ const onBuildLocal = (payload2) => {
1975
1848
  onBuild?.(payload2);
1976
1849
  setPayload(payload2);
1977
- }, "onBuildLocal");
1978
- return /* @__PURE__ */ React40.createElement(FlexCol7, {
1979
- gap: 2,
1980
- ...props
1981
- }, /* @__PURE__ */ React40.createElement(BuilderComponent, {
1982
- onBuild: onBuildLocal
1983
- }), payload && /* @__PURE__ */ React40.createElement(JsonViewerEx2, {
1984
- value: payload
1985
- }));
1986
- }, "PayloadBuilderFlexbox");
1850
+ };
1851
+ return /* @__PURE__ */ jsxs25(FlexCol7, { gap: 2, ...props, children: [
1852
+ /* @__PURE__ */ jsx40(BuilderComponent, { onBuild: onBuildLocal }),
1853
+ payload && /* @__PURE__ */ jsx40(JsonViewerEx2, { value: payload })
1854
+ ] });
1855
+ };
1987
1856
 
1988
1857
  // src/components/payload/builder/producer-intent/Form.tsx
1989
1858
  import { Button as Button5, FormControl as FormControl5 } from "@mui/material";
1990
1859
  import { createProducerChainStakeIntent } from "@xyo-network/chain-protocol";
1991
- import React43, { useMemo as useMemo20, useState as useState17 } from "react";
1860
+ import { useMemo as useMemo20, useState as useState17 } from "react";
1992
1861
 
1993
1862
  // src/components/payload/fields/BlockNumberTextField.tsx
1994
- import { FormControl as FormControl3, FormHelperText as FormHelperText2, TextField as TextField3 } from "@mui/material";
1995
- import React41, { useState as useState15 } from "react";
1996
- var BlockNumberTextField = /* @__PURE__ */ __name(({ errorMessage, onBlockNumberChanged, onChange, ...props }) => {
1863
+ import {
1864
+ FormControl as FormControl3,
1865
+ FormHelperText as FormHelperText2,
1866
+ TextField as TextField3
1867
+ } from "@mui/material";
1868
+ import { useState as useState15 } from "react";
1869
+ import { jsx as jsx41, jsxs as jsxs26 } from "react/jsx-runtime";
1870
+ var BlockNumberTextField = ({
1871
+ errorMessage,
1872
+ onBlockNumberChanged,
1873
+ onChange,
1874
+ ...props
1875
+ }) => {
1997
1876
  const [blockNumber, setBlockNumber] = useState15();
1998
- const handleChange = /* @__PURE__ */ __name((e) => {
1877
+ const handleChange = (e) => {
1999
1878
  const value = e.target.value.replaceAll(/\D/g, "");
2000
1879
  setBlockNumber(value.length > 0 ? Number(value) : void 0);
2001
1880
  onBlockNumberChanged?.(Number.parseInt(value));
2002
1881
  onChange?.(e);
2003
- }, "handleChange");
1882
+ };
2004
1883
  const errored = errorMessage !== void 0;
2005
- return /* @__PURE__ */ React41.createElement(FormControl3, {
2006
- fullWidth: true
2007
- }, /* @__PURE__ */ React41.createElement(TextField3, {
2008
- error: errored,
2009
- onChange: handleChange,
2010
- type: "number",
2011
- value: blockNumber ?? "",
2012
- ...props
2013
- }), errored && /* @__PURE__ */ React41.createElement(FormHelperText2, {
2014
- sx: {
2015
- color: "error.main"
2016
- }
2017
- }, errorMessage));
2018
- }, "BlockNumberTextField");
1884
+ return /* @__PURE__ */ jsxs26(FormControl3, { fullWidth: true, children: [
1885
+ /* @__PURE__ */ jsx41(
1886
+ TextField3,
1887
+ {
1888
+ error: errored,
1889
+ onChange: handleChange,
1890
+ type: "number",
1891
+ value: blockNumber ?? "",
1892
+ ...props
1893
+ }
1894
+ ),
1895
+ errored && /* @__PURE__ */ jsx41(FormHelperText2, { sx: { color: "error.main" }, children: errorMessage })
1896
+ ] });
1897
+ };
2019
1898
 
2020
1899
  // src/components/payload/fields/XyoAddressTextField.tsx
2021
- import { FormControl as FormControl4, FormHelperText as FormHelperText3, TextField as TextField4 } from "@mui/material";
1900
+ import {
1901
+ FormControl as FormControl4,
1902
+ FormHelperText as FormHelperText3,
1903
+ TextField as TextField4
1904
+ } from "@mui/material";
2022
1905
  import { asAddress, isAddress as isAddress3 } from "@xylabs/hex";
2023
- import React42, { useMemo as useMemo19, useState as useState16 } from "react";
2024
- var XyoAddressTextField = /* @__PURE__ */ __name(({ onAddressChanged, onChange, resetValue, ...props }) => {
1906
+ import { useMemo as useMemo19, useState as useState16 } from "react";
1907
+ import { jsx as jsx42, jsxs as jsxs27 } from "react/jsx-runtime";
1908
+ var XyoAddressTextField = ({
1909
+ onAddressChanged,
1910
+ onChange,
1911
+ resetValue,
1912
+ ...props
1913
+ }) => {
2025
1914
  const [address, setAddress] = useState16("");
2026
1915
  const [addressError, setAddressError] = useState16();
2027
- useMemo19(() => setAddress(""), [
2028
- resetValue
2029
- ]);
2030
- const handleChange = /* @__PURE__ */ __name((event) => {
1916
+ useMemo19(() => setAddress(""), [resetValue]);
1917
+ const handleChange = (event) => {
2031
1918
  const { value } = event.target;
2032
1919
  onChange?.(event);
2033
1920
  const xyoAddress = asAddress(value);
@@ -2036,31 +1923,32 @@ var XyoAddressTextField = /* @__PURE__ */ __name(({ onAddressChanged, onChange,
2036
1923
  }
2037
1924
  setAddressError(void 0);
2038
1925
  setAddress(value);
2039
- }, "handleChange");
2040
- const handleBlur = /* @__PURE__ */ __name(() => {
1926
+ };
1927
+ const handleBlur = () => {
2041
1928
  const xyoAddress = asAddress(address);
2042
1929
  if (!isAddress3(xyoAddress)) {
2043
1930
  setAddressError(new Error("Invalid address"));
2044
1931
  onAddressChanged?.();
2045
1932
  }
2046
- }, "handleBlur");
2047
- return /* @__PURE__ */ React42.createElement(FormControl4, {
2048
- fullWidth: true
2049
- }, /* @__PURE__ */ React42.createElement(TextField4, {
2050
- error: !!addressError,
2051
- onBlur: handleBlur,
2052
- onChange: handleChange,
2053
- value: address,
2054
- ...props
2055
- }), addressError && /* @__PURE__ */ React42.createElement(FormHelperText3, {
2056
- sx: {
2057
- color: "error.main"
2058
- }
2059
- }, addressError.message));
2060
- }, "XyoAddressTextField");
1933
+ };
1934
+ return /* @__PURE__ */ jsxs27(FormControl4, { fullWidth: true, children: [
1935
+ /* @__PURE__ */ jsx42(
1936
+ TextField4,
1937
+ {
1938
+ error: !!addressError,
1939
+ onBlur: handleBlur,
1940
+ onChange: handleChange,
1941
+ value: address,
1942
+ ...props
1943
+ }
1944
+ ),
1945
+ addressError && /* @__PURE__ */ jsx42(FormHelperText3, { sx: { color: "error.main" }, children: addressError.message })
1946
+ ] });
1947
+ };
2061
1948
 
2062
1949
  // src/components/payload/builder/producer-intent/Form.tsx
2063
- var ProducerIntentBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
1950
+ import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs28 } from "react/jsx-runtime";
1951
+ var ProducerIntentBuilderForm = ({ onBuild }) => {
2064
1952
  const [delegate, setDelegate] = useState17();
2065
1953
  const [exp, setExp] = useState17();
2066
1954
  const [nbf, setNbf] = useState17();
@@ -2077,64 +1965,66 @@ var ProducerIntentBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
2077
1965
  }
2078
1966
  }
2079
1967
  }
2080
- }, [
2081
- delegate,
2082
- exp,
2083
- nbf
2084
- ]);
2085
- const onBuildLocal = /* @__PURE__ */ __name(() => {
1968
+ }, [delegate, exp, nbf]);
1969
+ const onBuildLocal = () => {
2086
1970
  if (onBuild && intentPayload) onBuild?.(intentPayload);
2087
- }, "onBuildLocal");
2088
- return /* @__PURE__ */ React43.createElement(React43.Fragment, null, /* @__PURE__ */ React43.createElement(FormControl5, {
2089
- fullWidth: true
2090
- }, /* @__PURE__ */ React43.createElement(XyoAddressTextField, {
2091
- label: "Delegate",
2092
- name: "delegate",
2093
- onAddressChanged: setDelegate,
2094
- required: true,
2095
- size: "small"
2096
- })), /* @__PURE__ */ React43.createElement(FormControl5, {
2097
- fullWidth: true
2098
- }, /* @__PURE__ */ React43.createElement(BlockNumberTextField, {
2099
- errorMessage: blockRangeError?.message,
2100
- label: "Expires",
2101
- name: "exp",
2102
- onBlockNumberChanged: setExp,
2103
- required: true,
2104
- size: "small"
2105
- })), /* @__PURE__ */ React43.createElement(FormControl5, {
2106
- fullWidth: true
2107
- }, /* @__PURE__ */ React43.createElement(BlockNumberTextField, {
2108
- errorMessage: blockRangeError?.message,
2109
- label: "Not Before",
2110
- name: "nbf",
2111
- onBlockNumberChanged: setNbf,
2112
- required: true,
2113
- size: "small"
2114
- })), /* @__PURE__ */ React43.createElement(Button5, {
2115
- disabled: !intentPayload,
2116
- variant: "contained",
2117
- onClick: onBuildLocal
2118
- }, "Build"));
2119
- }, "ProducerIntentBuilderForm");
2120
-
2121
- // src/components/payload/builder/transfer/Flexbox.tsx
2122
- import React46 from "react";
1971
+ };
1972
+ return /* @__PURE__ */ jsxs28(Fragment8, { children: [
1973
+ /* @__PURE__ */ jsx43(FormControl5, { fullWidth: true, children: /* @__PURE__ */ jsx43(XyoAddressTextField, { label: "Delegate", name: "delegate", onAddressChanged: setDelegate, required: true, size: "small" }) }),
1974
+ /* @__PURE__ */ jsx43(FormControl5, { fullWidth: true, children: /* @__PURE__ */ jsx43(
1975
+ BlockNumberTextField,
1976
+ {
1977
+ errorMessage: blockRangeError?.message,
1978
+ label: "Expires",
1979
+ name: "exp",
1980
+ onBlockNumberChanged: setExp,
1981
+ required: true,
1982
+ size: "small"
1983
+ }
1984
+ ) }),
1985
+ /* @__PURE__ */ jsx43(FormControl5, { fullWidth: true, children: /* @__PURE__ */ jsx43(
1986
+ BlockNumberTextField,
1987
+ {
1988
+ errorMessage: blockRangeError?.message,
1989
+ label: "Not Before",
1990
+ name: "nbf",
1991
+ onBlockNumberChanged: setNbf,
1992
+ required: true,
1993
+ size: "small"
1994
+ }
1995
+ ) }),
1996
+ /* @__PURE__ */ jsx43(Button5, { disabled: !intentPayload, variant: "contained", onClick: onBuildLocal, children: "Build" })
1997
+ ] });
1998
+ };
2123
1999
 
2124
2000
  // src/components/payload/builder/transfer/Form.tsx
2125
2001
  import { Button as Button6, FormControl as FormControl7 } from "@mui/material";
2126
2002
  import { isAddress as isAddress5 } from "@xylabs/hex";
2127
2003
  import { TransferSchema } from "@xyo-network/xl1-protocol";
2128
- import React45, { useMemo as useMemo22, useState as useState19 } from "react";
2004
+ import { useMemo as useMemo22, useState as useState19 } from "react";
2129
2005
 
2130
2006
  // src/components/payload/builder/transfer/builder/SingleFlexbox.tsx
2131
2007
  import { RemoveCircle } from "@mui/icons-material";
2132
- import { FormControl as FormControl6, Icon as Icon3, IconButton as IconButton5 } from "@mui/material";
2008
+ import {
2009
+ FormControl as FormControl6,
2010
+ Icon as Icon3,
2011
+ IconButton as IconButton5
2012
+ } from "@mui/material";
2133
2013
  import { isAddress as isAddress4, toHex as toHex3 } from "@xylabs/hex";
2134
2014
  import { FlexRow as FlexRow7 } from "@xylabs/react-flexbox";
2135
2015
  import { BigIntInput } from "@xyo-network/react-shared";
2136
- import React44, { useEffect as useEffect4, useMemo as useMemo21, useState as useState18 } from "react";
2137
- var SingleTransferBuilderFlexbox = /* @__PURE__ */ __name(({ onTransferUpdated, onRemoveTransfer, singleTransfer, ...props }) => {
2016
+ import {
2017
+ useEffect as useEffect4,
2018
+ useMemo as useMemo21,
2019
+ useState as useState18
2020
+ } from "react";
2021
+ import { jsx as jsx44, jsxs as jsxs29 } from "react/jsx-runtime";
2022
+ var SingleTransferBuilderFlexbox = ({
2023
+ onTransferUpdated,
2024
+ onRemoveTransfer,
2025
+ singleTransfer,
2026
+ ...props
2027
+ }) => {
2138
2028
  const [toAddress3, setToAddress] = useState18();
2139
2029
  const [amount, setAmount] = useState18();
2140
2030
  const transferAmount = useMemo21(() => {
@@ -2145,42 +2035,20 @@ var SingleTransferBuilderFlexbox = /* @__PURE__ */ __name(({ onTransferUpdated,
2145
2035
  to: toAddress3
2146
2036
  };
2147
2037
  }
2148
- }, [
2149
- toAddress3,
2150
- amount
2151
- ]);
2038
+ }, [toAddress3, amount]);
2152
2039
  useEffect4(() => {
2153
2040
  if (transferAmount) onTransferUpdated?.(transferAmount);
2154
- }, [
2155
- transferAmount
2156
- ]);
2157
- return /* @__PURE__ */ React44.createElement(FlexRow7, {
2158
- alignItems: "start",
2159
- gap: 1,
2160
- ...props
2161
- }, /* @__PURE__ */ React44.createElement(FormControl6, {
2162
- fullWidth: true
2163
- }, /* @__PURE__ */ React44.createElement(XyoAddressTextField, {
2164
- label: "To",
2165
- name: "to",
2166
- onAddressChanged: setToAddress,
2167
- required: true,
2168
- size: "small"
2169
- })), /* @__PURE__ */ React44.createElement(FormControl6, {
2170
- fullWidth: true
2171
- }, /* @__PURE__ */ React44.createElement(BigIntInput.TextField, {
2172
- label: "Amount",
2173
- name: "amount",
2174
- onChangeFixedPoint: setAmount,
2175
- required: true,
2176
- size: "small"
2177
- })), /* @__PURE__ */ React44.createElement(IconButton5, {
2178
- onClick: /* @__PURE__ */ __name(() => onRemoveTransfer?.(singleTransfer.transferId), "onClick")
2179
- }, /* @__PURE__ */ React44.createElement(Icon3, null, /* @__PURE__ */ React44.createElement(RemoveCircle, null))));
2180
- }, "SingleTransferBuilderFlexbox");
2041
+ }, [transferAmount]);
2042
+ return /* @__PURE__ */ jsxs29(FlexRow7, { alignItems: "start", gap: 1, ...props, children: [
2043
+ /* @__PURE__ */ jsx44(FormControl6, { fullWidth: true, children: /* @__PURE__ */ jsx44(XyoAddressTextField, { label: "To", name: "to", onAddressChanged: setToAddress, required: true, size: "small" }) }),
2044
+ /* @__PURE__ */ jsx44(FormControl6, { fullWidth: true, children: /* @__PURE__ */ jsx44(BigIntInput.TextField, { label: "Amount", name: "amount", onChangeFixedPoint: setAmount, required: true, size: "small" }) }),
2045
+ /* @__PURE__ */ jsx44(IconButton5, { onClick: () => onRemoveTransfer?.(singleTransfer.transferId), children: /* @__PURE__ */ jsx44(Icon3, { children: /* @__PURE__ */ jsx44(RemoveCircle, {}) }) })
2046
+ ] });
2047
+ };
2181
2048
 
2182
2049
  // src/components/payload/builder/transfer/Form.tsx
2183
- var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
2050
+ import { Fragment as Fragment9, jsx as jsx45, jsxs as jsxs30 } from "react/jsx-runtime";
2051
+ var TransferBuilderForm = ({ onBuild }) => {
2184
2052
  const [fromAddress, setFromAddress] = useState19();
2185
2053
  const [transfers, setTransfers] = useState19([]);
2186
2054
  const transferPayload = useMemo22(() => {
@@ -2196,70 +2064,58 @@ var TransferBuilderForm = /* @__PURE__ */ __name(({ onBuild }) => {
2196
2064
  epoch: Date.now()
2197
2065
  };
2198
2066
  }
2199
- }, [
2200
- fromAddress,
2201
- transfers
2202
- ]);
2203
- const onBuildLocal = /* @__PURE__ */ __name(() => {
2067
+ }, [fromAddress, transfers]);
2068
+ const onBuildLocal = () => {
2204
2069
  if (onBuild && transferPayload) onBuild?.(transferPayload);
2205
- }, "onBuildLocal");
2206
- const onTransferAdded = /* @__PURE__ */ __name(() => {
2070
+ };
2071
+ const onTransferAdded = () => {
2207
2072
  const transferAmount = {
2208
2073
  amount: "",
2209
2074
  transferId: Date.now(),
2210
2075
  to: ""
2211
2076
  };
2212
- setTransfers((prev) => [
2213
- ...prev,
2214
- transferAmount
2215
- ]);
2216
- }, "onTransferAdded");
2217
- const onTransferRemoved = /* @__PURE__ */ __name((transferId) => {
2077
+ setTransfers((prev) => [...prev, transferAmount]);
2078
+ };
2079
+ const onTransferRemoved = (transferId) => {
2218
2080
  setTransfers((prev) => prev.filter((transfer) => transfer.transferId !== transferId));
2219
- }, "onTransferRemoved");
2220
- const onTransferUpdated = /* @__PURE__ */ __name((singleTransfer) => {
2081
+ };
2082
+ const onTransferUpdated = (singleTransfer) => {
2221
2083
  setTransfers((prev) => prev.map((transfer) => {
2222
2084
  if (transfer.transferId === singleTransfer.transferId) {
2223
2085
  return singleTransfer;
2224
2086
  }
2225
2087
  return transfer;
2226
2088
  }));
2227
- }, "onTransferUpdated");
2228
- return /* @__PURE__ */ React45.createElement(React45.Fragment, null, /* @__PURE__ */ React45.createElement(FormControl7, {
2229
- fullWidth: true
2230
- }, /* @__PURE__ */ React45.createElement(XyoAddressTextField, {
2231
- label: "From",
2232
- name: "from",
2233
- onAddressChanged: setFromAddress,
2234
- required: true,
2235
- size: "small"
2236
- })), /* @__PURE__ */ React45.createElement(Button6, {
2237
- onClick: onTransferAdded,
2238
- size: "small",
2239
- variant: "contained"
2240
- }, "Add Transfer"), transfers.map((transfer) => /* @__PURE__ */ React45.createElement(SingleTransferBuilderFlexbox, {
2241
- key: transfer.transferId,
2242
- onTransferUpdated,
2243
- onRemoveTransfer: onTransferRemoved,
2244
- singleTransfer: transfer,
2245
- sx: {
2246
- width: "100%"
2247
- }
2248
- })), /* @__PURE__ */ React45.createElement(Button6, {
2249
- disabled: !transferPayload,
2250
- variant: "contained",
2251
- onClick: onBuildLocal
2252
- }, "Build"));
2253
- }, "TransferBuilderForm");
2089
+ };
2090
+ return /* @__PURE__ */ jsxs30(Fragment9, { children: [
2091
+ /* @__PURE__ */ jsx45(FormControl7, { fullWidth: true, children: /* @__PURE__ */ jsx45(XyoAddressTextField, { label: "From", name: "from", onAddressChanged: setFromAddress, required: true, size: "small" }) }),
2092
+ /* @__PURE__ */ jsx45(Button6, { onClick: onTransferAdded, size: "small", variant: "contained", children: "Add Transfer" }),
2093
+ transfers.map((transfer) => /* @__PURE__ */ jsx45(
2094
+ SingleTransferBuilderFlexbox,
2095
+ {
2096
+ onTransferUpdated,
2097
+ onRemoveTransfer: onTransferRemoved,
2098
+ singleTransfer: transfer,
2099
+ sx: { width: "100%" }
2100
+ },
2101
+ transfer.transferId
2102
+ )),
2103
+ /* @__PURE__ */ jsx45(Button6, { disabled: !transferPayload, variant: "contained", onClick: onBuildLocal, children: "Build" })
2104
+ ] });
2105
+ };
2254
2106
 
2255
2107
  // src/components/payload/builder/transfer/Flexbox.tsx
2256
- var TransferBuilderFlexbox = /* @__PURE__ */ __name(({ onBuild, ...props }) => /* @__PURE__ */ React46.createElement(PayloadBuilderFlexbox, {
2257
- gap: 4,
2258
- alignItems: "start",
2259
- BuilderComponent: TransferBuilderForm,
2260
- onBuild,
2261
- ...props
2262
- }), "TransferBuilderFlexbox");
2108
+ import { jsx as jsx46 } from "react/jsx-runtime";
2109
+ var TransferBuilderFlexbox = ({ onBuild, ...props }) => /* @__PURE__ */ jsx46(
2110
+ PayloadBuilderFlexbox,
2111
+ {
2112
+ gap: 4,
2113
+ alignItems: "start",
2114
+ BuilderComponent: TransferBuilderForm,
2115
+ onBuild,
2116
+ ...props
2117
+ }
2118
+ );
2263
2119
 
2264
2120
  // src/stories/ChainArchivistDecorator.tsx
2265
2121
  import { CircularProgress } from "@mui/material";
@@ -2268,35 +2124,24 @@ import { MemoryArchivist } from "@xyo-network/archivist-memory";
2268
2124
  import { ArchivistConfigSchema } from "@xyo-network/archivist-model";
2269
2125
  import { buildRandomBlockChain } from "@xyo-network/react-chain-shared";
2270
2126
  import { flattenHydratedBlocks } from "@xyo-network/xl1-protocol-sdk";
2271
- import React47, { useEffect as useEffect5 } from "react";
2272
- var ChainArchivistDecorator = /* @__PURE__ */ __name((Story, context) => {
2127
+ import { useEffect as useEffect5 } from "react";
2128
+ import { jsx as jsx47 } from "react/jsx-runtime";
2129
+ var ChainArchivistDecorator = (Story, context) => {
2273
2130
  const [randomBlockChain] = usePromise7(async () => await buildRandomBlockChain(), []);
2274
2131
  const [blockChainRenderProps, blockChainRenderPropsError] = usePromise7(async () => {
2275
2132
  if (randomBlockChain) {
2276
- const chainArchivist = await MemoryArchivist.create({
2277
- config: {
2278
- schema: ArchivistConfigSchema,
2279
- name: "ChainArchivist"
2280
- }
2281
- });
2133
+ const chainArchivist = await MemoryArchivist.create({ config: { schema: ArchivistConfigSchema, name: "ChainArchivist" } });
2282
2134
  const flattened = flattenHydratedBlocks(randomBlockChain);
2283
2135
  await chainArchivist.insert(flattened);
2284
2136
  const chainId = await getChainId();
2285
- return {
2286
- chainArchivist,
2287
- chainId
2288
- };
2137
+ return { chainArchivist, chainId };
2289
2138
  }
2290
- }, [
2291
- randomBlockChain
2292
- ]);
2139
+ }, [randomBlockChain]);
2293
2140
  useEffect5(() => {
2294
2141
  if (blockChainRenderPropsError) {
2295
2142
  console.error(blockChainRenderPropsError);
2296
2143
  }
2297
- }, [
2298
- blockChainRenderPropsError
2299
- ]);
2144
+ }, [blockChainRenderPropsError]);
2300
2145
  const props = {
2301
2146
  ...context,
2302
2147
  args: {
@@ -2308,8 +2153,8 @@ var ChainArchivistDecorator = /* @__PURE__ */ __name((Story, context) => {
2308
2153
  }
2309
2154
  }
2310
2155
  };
2311
- return blockChainRenderProps?.chainArchivist ? /* @__PURE__ */ React47.createElement(Story, props) : /* @__PURE__ */ React47.createElement(CircularProgress, null);
2312
- }, "ChainArchivistDecorator");
2156
+ return blockChainRenderProps?.chainArchivist ? /* @__PURE__ */ jsx47(Story, { ...props }) : /* @__PURE__ */ jsx47(CircularProgress, {});
2157
+ };
2313
2158
 
2314
2159
  // src/stories/ChainArchivistDelayedInsertDecorator.tsx
2315
2160
  import { CircularProgress as CircularProgress2 } from "@mui/material";
@@ -2319,21 +2164,17 @@ import { MemoryArchivist as MemoryArchivist2 } from "@xyo-network/archivist-memo
2319
2164
  import { ArchivistConfigSchema as ArchivistConfigSchema2 } from "@xyo-network/archivist-model";
2320
2165
  import { buildRandomBlockChain as buildRandomBlockChain2 } from "@xyo-network/react-chain-shared";
2321
2166
  import { flattenHydratedBlock } from "@xyo-network/xl1-protocol-sdk";
2322
- import React48, { useEffect as useEffect6, useState as useState20 } from "react";
2167
+ import { useEffect as useEffect6, useState as useState20 } from "react";
2168
+ import { jsx as jsx48 } from "react/jsx-runtime";
2323
2169
  var chainArchivistRef;
2324
- var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, context) => {
2170
+ var ChainArchivistDelayedInsertDecorator = (Story, context) => {
2325
2171
  const [firstBlock, setFirstBlock] = useState20();
2326
2172
  const [randomBlockChain] = usePromise8(async () => await buildRandomBlockChain2(), []);
2327
2173
  const [chainArchivist] = usePromise8(async () => {
2328
2174
  if (chainArchivistRef) {
2329
2175
  return chainArchivistRef;
2330
2176
  } else {
2331
- chainArchivistRef = await MemoryArchivist2.create({
2332
- config: {
2333
- schema: ArchivistConfigSchema2,
2334
- name: "ChainArchivist"
2335
- }
2336
- });
2177
+ chainArchivistRef = await MemoryArchivist2.create({ config: { schema: ArchivistConfigSchema2, name: "ChainArchivist" } });
2337
2178
  return chainArchivistRef;
2338
2179
  }
2339
2180
  }, []);
@@ -2346,26 +2187,16 @@ var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, contex
2346
2187
  await delay(1e3);
2347
2188
  }
2348
2189
  }
2349
- }, [
2350
- chainArchivist,
2351
- randomBlockChain
2352
- ]);
2190
+ }, [chainArchivist, randomBlockChain]);
2353
2191
  useEffect6(() => {
2354
2192
  if (delayedInsertError) {
2355
2193
  console.error(delayedInsertError);
2356
2194
  }
2357
- }, [
2358
- delayedInsertError
2359
- ]);
2195
+ }, [delayedInsertError]);
2360
2196
  const [blockChainRenderProps] = usePromise8(async () => {
2361
2197
  const chainId = await getChainId();
2362
- return {
2363
- chainArchivist,
2364
- chainId
2365
- };
2366
- }, [
2367
- chainArchivist
2368
- ]);
2198
+ return { chainArchivist, chainId };
2199
+ }, [chainArchivist]);
2369
2200
  const props = {
2370
2201
  ...context,
2371
2202
  args: {
@@ -2377,8 +2208,8 @@ var ChainArchivistDelayedInsertDecorator = /* @__PURE__ */ __name((Story, contex
2377
2208
  }
2378
2209
  }
2379
2210
  };
2380
- return firstBlock ? /* @__PURE__ */ React48.createElement(Story, props) : /* @__PURE__ */ React48.createElement(CircularProgress2, null);
2381
- }, "ChainArchivistDelayedInsertDecorator");
2211
+ return firstBlock ? /* @__PURE__ */ jsx48(Story, { ...props }) : /* @__PURE__ */ jsx48(CircularProgress2, {});
2212
+ };
2382
2213
 
2383
2214
  // src/stories/ChainInfoContextDecorator.tsx
2384
2215
  import { assertEx as assertEx5 } from "@xylabs/assert";
@@ -2387,12 +2218,12 @@ import { isDefined as isDefined4 } from "@xylabs/typeof";
2387
2218
  import { ChainBlockNumberIterationService as ChainBlockNumberIterationService3 } from "@xyo-network/chain-services";
2388
2219
  import { findFirstMatching } from "@xyo-network/chain-utils";
2389
2220
  import { isBlockBoundWitness as isBlockBoundWitness3 } from "@xyo-network/xl1-protocol";
2390
- import React49 from "react";
2221
+ import { jsx as jsx49 } from "react/jsx-runtime";
2391
2222
  var archivistConfig = {
2392
2223
  url: "http://localhost:8080",
2393
2224
  chainArchivistModuleId: "XYOPublic:XYOChain:Chain"
2394
2225
  };
2395
- var ChainInfoContextDecorator = /* @__PURE__ */ __name((Story, context) => {
2226
+ var ChainInfoContextDecorator = (Story, context) => {
2396
2227
  const [chainIdResponse] = usePromise9(async () => {
2397
2228
  return await getChainId();
2398
2229
  }, []);
@@ -2404,21 +2235,11 @@ var ChainInfoContextDecorator = /* @__PURE__ */ __name((Story, context) => {
2404
2235
  if (isDefined4(chainArchivist) && isDefined4(chainId)) {
2405
2236
  const firstMatch = assertEx5(await findFirstMatching(chainArchivist), () => `No head found in archivist: ${chainArchivist.id} `);
2406
2237
  const head = assertEx5(isBlockBoundWitness3(firstMatch) ? firstMatch : void 0, () => `Expected a block bound witness: ${JSON.stringify(firstMatch)}`);
2407
- return await ChainBlockNumberIterationService3.create({
2408
- chainArchivist,
2409
- head
2410
- });
2238
+ return await ChainBlockNumberIterationService3.create({ chainArchivist, head });
2411
2239
  }
2412
- }, [
2413
- chainArchivist,
2414
- chainId
2415
- ]);
2416
- return /* @__PURE__ */ React49.createElement(ChainInfoProvider, {
2417
- chainArchivist,
2418
- chainId,
2419
- chainIterator
2420
- }, /* @__PURE__ */ React49.createElement(Story, context));
2421
- }, "ChainInfoContextDecorator");
2240
+ }, [chainArchivist, chainId]);
2241
+ return /* @__PURE__ */ jsx49(ChainInfoProvider, { chainArchivist, chainId, chainIterator, children: /* @__PURE__ */ jsx49(Story, { ...context }) });
2242
+ };
2422
2243
  export {
2423
2244
  BlockChainPagination,
2424
2245
  BlockChainTableRow,