@xyo-network/react-powered-by-xyo 7.5.8 → 7.5.12

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 (32) hide show
  1. package/dist/browser/components/PoweredByXyo.d.ts.map +1 -1
  2. package/dist/browser/components/XyoBusy.d.ts.map +1 -1
  3. package/dist/browser/index.mjs +274 -336
  4. package/dist/browser/index.mjs.map +1 -1
  5. package/package.json +151 -44
  6. package/src/components/ArchivistSummary.tsx +0 -10
  7. package/src/components/BridgeSummary.tsx +0 -10
  8. package/src/components/DebugDialog.tsx +0 -23
  9. package/src/components/DivinerSummary.tsx +0 -10
  10. package/src/components/JsonViewerButton.tsx +0 -37
  11. package/src/components/ModuleAccordion.tsx +0 -28
  12. package/src/components/ModuleDetails.tsx +0 -92
  13. package/src/components/ModuleSummary.tsx +0 -45
  14. package/src/components/NodeDetails.tsx +0 -30
  15. package/src/components/NodeSummary.tsx +0 -31
  16. package/src/components/PoweredByXyo.tsx +0 -136
  17. package/src/components/PoweredByXyoButton.tsx +0 -55
  18. package/src/components/SentinelSummary.tsx +0 -10
  19. package/src/components/TypedModuleSummary.tsx +0 -38
  20. package/src/components/WitnessSummary.tsx +0 -10
  21. package/src/components/XyoBusy.tsx +0 -40
  22. package/src/components/index.ts +0 -14
  23. package/src/components/stories/PoweredByXyo.stories.tsx +0 -81
  24. package/src/components/stories/PoweredByXyoButton.stories.tsx +0 -21
  25. package/src/components/stories/XyoBusy.stories.tsx +0 -21
  26. package/src/components/stories/manifest.ts +0 -1
  27. package/src/components/stories/simple-node-inline-manifest.json +0 -56
  28. package/src/img/index.ts +0 -2
  29. package/src/img/xyo-color-logo-text-only.svg +0 -1
  30. package/src/img/xyo-color-logo.svg +0 -1
  31. package/src/index.ts +0 -1
  32. package/src/types/images.d.ts +0 -5
@@ -1,9 +1,5 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
1
  // src/components/ArchivistSummary.tsx
5
2
  import { Inventory2Rounded as Inventory2RoundedIcon } from "@mui/icons-material";
6
- import React2 from "react";
7
3
 
8
4
  // src/components/ModuleSummary.tsx
9
5
  import { Extension as ExtensionIcon } from "@mui/icons-material";
@@ -11,14 +7,16 @@ import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
11
7
  import { delay } from "@xylabs/sdk-js";
12
8
  import { useWeakModulesFromNode } from "@xyo-network/react-node";
13
9
  import { TypographyEx } from "@xyo-network/react-shared";
14
- import React, { useState } from "react";
15
- var ModuleSummary = /* @__PURE__ */ __name(({ children, icon, mod, ...props }) => {
16
- const [downModules] = useWeakModulesFromNode(void 0, {
17
- direction: "down"
18
- });
19
- const [upModules] = useWeakModulesFromNode(void 0, {
20
- direction: "up"
21
- });
10
+ import { useState } from "react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var ModuleSummary = ({
13
+ children,
14
+ icon,
15
+ mod,
16
+ ...props
17
+ }) => {
18
+ const [downModules] = useWeakModulesFromNode(void 0, { direction: "down" });
19
+ const [upModules] = useWeakModulesFromNode(void 0, { direction: "up" });
22
20
  const [busy, setBusy] = useState(false);
23
21
  const downModulesFromResolve = downModules?.length;
24
22
  const upModulesFromResolve = upModules?.length;
@@ -27,52 +25,48 @@ var ModuleSummary = /* @__PURE__ */ __name(({ children, icon, mod, ...props }) =
27
25
  await delay(2e3);
28
26
  setBusy(false);
29
27
  });
30
- return /* @__PURE__ */ React.createElement(FlexCol, {
31
- alignItems: "stretch",
32
- width: "100%",
33
- ...props
34
- }, /* @__PURE__ */ React.createElement(FlexRow, {
35
- justifyContent: "flex-start"
36
- }, /* @__PURE__ */ React.createElement(FlexRow, null, /* @__PURE__ */ React.createElement(TypographyEx, {
37
- color: busy ? "gray" : void 0
38
- }, icon ?? /* @__PURE__ */ React.createElement(ExtensionIcon, null)), /* @__PURE__ */ React.createElement(TypographyEx, {
39
- marginX: 1
40
- }, mod?.config?.name ?? "<Unknown>")), children ?? (downModulesFromResolve !== void 0 && upModulesFromResolve !== void 0) ? `[${downModulesFromResolve}\u2193/${upModulesFromResolve}\u2191]` : null));
41
- }, "ModuleSummary");
28
+ return /* @__PURE__ */ jsx(FlexCol, { alignItems: "stretch", width: "100%", ...props, children: /* @__PURE__ */ jsxs(FlexRow, { justifyContent: "flex-start", children: [
29
+ /* @__PURE__ */ jsxs(FlexRow, { children: [
30
+ /* @__PURE__ */ jsx(TypographyEx, { color: busy ? "gray" : void 0, children: icon ?? /* @__PURE__ */ jsx(ExtensionIcon, {}) }),
31
+ /* @__PURE__ */ jsx(TypographyEx, { marginX: 1, children: mod?.config?.name ?? "<Unknown>" })
32
+ ] }),
33
+ children ?? (downModulesFromResolve !== void 0 && upModulesFromResolve !== void 0) ? `[${downModulesFromResolve}\u2193/${upModulesFromResolve}\u2191]` : null
34
+ ] }) });
35
+ };
42
36
 
43
37
  // src/components/ArchivistSummary.tsx
44
- var ArchivistSummary = /* @__PURE__ */ __name(({ mod, ...props }) => {
45
- return /* @__PURE__ */ React2.createElement(ModuleSummary, {
46
- mod,
47
- icon: /* @__PURE__ */ React2.createElement(Inventory2RoundedIcon, null),
48
- ...props
49
- });
50
- }, "ArchivistSummary");
38
+ import { jsx as jsx2 } from "react/jsx-runtime";
39
+ var ArchivistSummary = ({ mod, ...props }) => {
40
+ return /* @__PURE__ */ jsx2(ModuleSummary, { mod, icon: /* @__PURE__ */ jsx2(Inventory2RoundedIcon, {}), ...props });
41
+ };
51
42
 
52
43
  // src/components/BridgeSummary.tsx
53
44
  import { InsertLinkRounded as InsertLinkRoundedIcon } from "@mui/icons-material";
54
- import React3 from "react";
55
- var BridgeSummary = /* @__PURE__ */ __name(({ mod, ...props }) => {
56
- return /* @__PURE__ */ React3.createElement(ModuleSummary, {
57
- mod,
58
- icon: /* @__PURE__ */ React3.createElement(InsertLinkRoundedIcon, null),
59
- ...props
60
- });
61
- }, "BridgeSummary");
45
+ import { jsx as jsx3 } from "react/jsx-runtime";
46
+ var BridgeSummary = ({ mod, ...props }) => {
47
+ return /* @__PURE__ */ jsx3(ModuleSummary, { mod, icon: /* @__PURE__ */ jsx3(InsertLinkRoundedIcon, {}), ...props });
48
+ };
62
49
 
63
50
  // src/components/DebugDialog.tsx
64
- import { Button, Dialog as Dialog2, DialogActions as DialogActions2, DialogContent as DialogContent2, DialogTitle as DialogTitle2 } from "@mui/material";
65
- import React13 from "react";
51
+ import {
52
+ Button,
53
+ Dialog as Dialog2,
54
+ DialogActions as DialogActions2,
55
+ DialogContent as DialogContent2,
56
+ DialogTitle as DialogTitle2
57
+ } from "@mui/material";
66
58
 
67
59
  // src/components/NodeDetails.tsx
68
60
  import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
69
61
  import { useProvidedNode, useWeakModulesFromNode as useWeakModulesFromNode3 } from "@xyo-network/react-node";
70
- import React12 from "react";
71
62
 
72
63
  // src/components/ModuleAccordion.tsx
73
64
  import { ExpandMore as ExpandMoreIcon } from "@mui/icons-material";
74
- import React11 from "react";
75
- import { Accordion, AccordionDetails, AccordionSummary } from "@mui/material";
65
+ import {
66
+ Accordion,
67
+ AccordionDetails,
68
+ AccordionSummary
69
+ } from "@mui/material";
76
70
 
77
71
  // src/components/ModuleDetails.tsx
78
72
  import { ButtonGroup } from "@mui/material";
@@ -82,87 +76,69 @@ import { usePromise } from "@xylabs/react-promise";
82
76
  import { ModuleDescriptionSchema } from "@xyo-network/module-model";
83
77
  import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
84
78
  import { Property } from "@xyo-network/react-property";
85
- import React5 from "react";
86
79
 
87
80
  // src/components/JsonViewerButton.tsx
88
- import { Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
81
+ import {
82
+ Dialog,
83
+ DialogActions,
84
+ DialogContent,
85
+ DialogTitle
86
+ } from "@mui/material";
89
87
  import { ButtonEx } from "@xylabs/react-button";
90
88
  import { JsonViewerEx } from "@xyo-network/react-payload-raw-info";
91
- import React4, { useState as useState2 } from "react";
92
- var JsonViewerButton = /* @__PURE__ */ __name(({ children, jsonViewProps, src, title, ...props }) => {
89
+ import { useState as useState2 } from "react";
90
+ import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
91
+ var JsonViewerButton = ({
92
+ children,
93
+ jsonViewProps,
94
+ src,
95
+ title,
96
+ ...props
97
+ }) => {
93
98
  const [open, setOpen] = useState2(false);
94
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(ButtonEx, {
95
- onClick: /* @__PURE__ */ __name(() => setOpen(!open), "onClick"),
96
- ...props
97
- }, children ?? "JSON"), /* @__PURE__ */ React4.createElement(Dialog, {
98
- open,
99
- onClose: /* @__PURE__ */ __name(() => setOpen(false), "onClose")
100
- }, title ? /* @__PURE__ */ React4.createElement(DialogTitle, null, title) : null, /* @__PURE__ */ React4.createElement(DialogContent, null, /* @__PURE__ */ React4.createElement(JsonViewerEx, {
101
- value: src,
102
- ...jsonViewProps
103
- })), /* @__PURE__ */ React4.createElement(DialogActions, null, /* @__PURE__ */ React4.createElement(ButtonEx, {
104
- onClick: /* @__PURE__ */ __name(() => setOpen(false), "onClick")
105
- }, "Close"))));
106
- }, "JsonViewerButton");
99
+ return /* @__PURE__ */ jsxs2(Fragment, { children: [
100
+ /* @__PURE__ */ jsx4(ButtonEx, { onClick: () => setOpen(!open), ...props, children: children ?? "JSON" }),
101
+ /* @__PURE__ */ jsxs2(Dialog, { open, onClose: () => setOpen(false), children: [
102
+ title ? /* @__PURE__ */ jsx4(DialogTitle, { children: title }) : null,
103
+ /* @__PURE__ */ jsx4(DialogContent, { children: /* @__PURE__ */ jsx4(JsonViewerEx, { value: src, ...jsonViewProps }) }),
104
+ /* @__PURE__ */ jsx4(DialogActions, { children: /* @__PURE__ */ jsx4(ButtonEx, { onClick: () => setOpen(false), children: "Close" }) })
105
+ ] })
106
+ ] });
107
+ };
107
108
 
108
109
  // src/components/ModuleDetails.tsx
109
- var ModuleDetails = /* @__PURE__ */ __name(({ mod, ...props }) => {
110
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
111
+ var ModuleDetails = ({ mod, ...props }) => {
110
112
  const [manifest] = usePromise(async () => {
111
113
  return await mod?.manifest();
112
- }, [
113
- mod
114
- ]);
114
+ }, [mod]);
115
115
  const [discover] = usePromise(async () => {
116
116
  return await mod?.state();
117
- }, [
118
- mod
119
- ]);
117
+ }, [mod]);
120
118
  const [describe] = usePromise(async () => {
121
119
  const state = await mod?.state();
122
120
  return state?.find(isPayloadOfSchemaType(ModuleDescriptionSchema));
123
- }, [
124
- mod
125
- ]);
121
+ }, [mod]);
126
122
  const queries = mod?.queries;
127
123
  const config = mod?.config;
128
- return /* @__PURE__ */ React5.createElement(FlexCol2, {
129
- alignItems: "stretch",
130
- ...props
131
- }, /* @__PURE__ */ React5.createElement(Property, {
132
- title: "Address",
133
- value: mod?.address
134
- }), /* @__PURE__ */ React5.createElement(FlexRow2, {
135
- gap: 1,
136
- justifyContent: "space-between"
137
- }, /* @__PURE__ */ React5.createElement(ButtonGroup, null, manifest ? /* @__PURE__ */ React5.createElement(JsonViewerButton, {
138
- variant: "contained",
139
- src: manifest
140
- }, "Manifest") : null, config ? /* @__PURE__ */ React5.createElement(JsonViewerButton, {
141
- variant: "contained",
142
- src: config
143
- }, "Config") : null, discover ? /* @__PURE__ */ React5.createElement(JsonViewerButton, {
144
- variant: "contained",
145
- src: discover
146
- }, "Discover") : null, describe ? /* @__PURE__ */ React5.createElement(JsonViewerButton, {
147
- variant: "contained",
148
- src: describe
149
- }, "Describe") : null, queries ? /* @__PURE__ */ React5.createElement(JsonViewerButton, {
150
- variant: "contained",
151
- src: queries
152
- }, "Queries") : null), /* @__PURE__ */ React5.createElement(ButtonGroup, null, /* @__PURE__ */ React5.createElement(ButtonEx2, {
153
- target: "_blank",
154
- href: `https://explore.xyo.network/block?network=main&address=${mod?.address}`,
155
- variant: "outlined"
156
- }, "Main"), /* @__PURE__ */ React5.createElement(ButtonEx2, {
157
- target: "_blank",
158
- href: `https://beta.explore.xyo.network/block?network=kerplunk&address=${mod?.address}`,
159
- variant: "outlined"
160
- }, "Kerplunk"), /* @__PURE__ */ React5.createElement(ButtonEx2, {
161
- target: "_blank",
162
- href: `https://beta.explore.xyo.network/block?network=local&address=${mod?.address}`,
163
- variant: "outlined"
164
- }, "Local"))));
165
- }, "ModuleDetails");
124
+ return /* @__PURE__ */ jsxs3(FlexCol2, { alignItems: "stretch", ...props, children: [
125
+ /* @__PURE__ */ jsx5(Property, { title: "Address", value: mod?.address }),
126
+ /* @__PURE__ */ jsxs3(FlexRow2, { gap: 1, justifyContent: "space-between", children: [
127
+ /* @__PURE__ */ jsxs3(ButtonGroup, { children: [
128
+ manifest ? /* @__PURE__ */ jsx5(JsonViewerButton, { variant: "contained", src: manifest, children: "Manifest" }) : null,
129
+ config ? /* @__PURE__ */ jsx5(JsonViewerButton, { variant: "contained", src: config, children: "Config" }) : null,
130
+ discover ? /* @__PURE__ */ jsx5(JsonViewerButton, { variant: "contained", src: discover, children: "Discover" }) : null,
131
+ describe ? /* @__PURE__ */ jsx5(JsonViewerButton, { variant: "contained", src: describe, children: "Describe" }) : null,
132
+ queries ? /* @__PURE__ */ jsx5(JsonViewerButton, { variant: "contained", src: queries, children: "Queries" }) : null
133
+ ] }),
134
+ /* @__PURE__ */ jsxs3(ButtonGroup, { children: [
135
+ /* @__PURE__ */ jsx5(ButtonEx2, { target: "_blank", href: `https://explore.xyo.network/block?network=main&address=${mod?.address}`, variant: "outlined", children: "Main" }),
136
+ /* @__PURE__ */ jsx5(ButtonEx2, { target: "_blank", href: `https://beta.explore.xyo.network/block?network=kerplunk&address=${mod?.address}`, variant: "outlined", children: "Kerplunk" }),
137
+ /* @__PURE__ */ jsx5(ButtonEx2, { target: "_blank", href: `https://beta.explore.xyo.network/block?network=local&address=${mod?.address}`, variant: "outlined", children: "Local" })
138
+ ] })
139
+ ] })
140
+ ] });
141
+ };
166
142
 
167
143
  // src/components/TypedModuleSummary.tsx
168
144
  import { isArchivistInstance } from "@xyo-network/archivist-model";
@@ -171,152 +147,98 @@ import { isDivinerInstance } from "@xyo-network/diviner-model";
171
147
  import { isNodeInstance } from "@xyo-network/node-model";
172
148
  import { isSentinelInstance } from "@xyo-network/sentinel-model";
173
149
  import { isWitnessInstance } from "@xyo-network/witness-model";
174
- import React10 from "react";
175
150
 
176
151
  // src/components/DivinerSummary.tsx
177
152
  import { BubbleChartRounded as BubbleChartRoundedIcon } from "@mui/icons-material";
178
- import React6 from "react";
179
- var DivinerSummary = /* @__PURE__ */ __name(({ mod, ...props }) => {
180
- return /* @__PURE__ */ React6.createElement(ModuleSummary, {
181
- mod,
182
- icon: /* @__PURE__ */ React6.createElement(BubbleChartRoundedIcon, null),
183
- ...props
184
- });
185
- }, "DivinerSummary");
153
+ import { jsx as jsx6 } from "react/jsx-runtime";
154
+ var DivinerSummary = ({ mod, ...props }) => {
155
+ return /* @__PURE__ */ jsx6(ModuleSummary, { mod, icon: /* @__PURE__ */ jsx6(BubbleChartRoundedIcon, {}), ...props });
156
+ };
186
157
 
187
158
  // src/components/NodeSummary.tsx
188
159
  import { HubRounded as HubRoundedIcon } from "@mui/icons-material";
189
160
  import { usePromise as usePromise2 } from "@xylabs/react-promise";
190
161
  import { useWeakModulesFromNode as useWeakModulesFromNode2 } from "@xyo-network/react-node";
191
- import React7 from "react";
192
- var NodeSummary = /* @__PURE__ */ __name(({ mod, ...props }) => {
162
+ import { jsx as jsx7 } from "react/jsx-runtime";
163
+ var NodeSummary = ({ mod, ...props }) => {
193
164
  const [manifest] = usePromise2(async () => {
194
165
  return await mod?.manifest();
195
- }, [
196
- mod
197
- ]);
198
- const [downModules] = useWeakModulesFromNode2(void 0, {
199
- direction: "down"
200
- });
201
- const [upModules] = useWeakModulesFromNode2(void 0, {
202
- direction: "up"
203
- });
166
+ }, [mod]);
167
+ const [downModules] = useWeakModulesFromNode2(void 0, { direction: "down" });
168
+ const [upModules] = useWeakModulesFromNode2(void 0, { direction: "up" });
204
169
  const downModulesFromResolve = downModules?.length;
205
170
  const upModulesFromResolve = upModules?.length;
206
171
  const manifestPublicModules = manifest?.modules?.public?.length;
207
- return /* @__PURE__ */ React7.createElement(ModuleSummary, {
208
- mod,
209
- icon: /* @__PURE__ */ React7.createElement(HubRoundedIcon, null),
210
- ...props
211
- }, manifestPublicModules !== void 0 && downModulesFromResolve !== void 0 && upModulesFromResolve !== void 0 ? `[${manifestPublicModules}m/${downModulesFromResolve}\u2193/${upModulesFromResolve}\u2191]` : null);
212
- }, "NodeSummary");
172
+ return /* @__PURE__ */ jsx7(ModuleSummary, { mod, icon: /* @__PURE__ */ jsx7(HubRoundedIcon, {}), ...props, children: manifestPublicModules !== void 0 && downModulesFromResolve !== void 0 && upModulesFromResolve !== void 0 ? `[${manifestPublicModules}m/${downModulesFromResolve}\u2193/${upModulesFromResolve}\u2191]` : null });
173
+ };
213
174
 
214
175
  // src/components/SentinelSummary.tsx
215
176
  import { TimerRounded as TimerRoundedIcon } from "@mui/icons-material";
216
- import React8 from "react";
217
- var SentinelSummary = /* @__PURE__ */ __name(({ mod, ...props }) => {
218
- return /* @__PURE__ */ React8.createElement(ModuleSummary, {
219
- mod,
220
- icon: /* @__PURE__ */ React8.createElement(TimerRoundedIcon, null),
221
- ...props
222
- });
223
- }, "SentinelSummary");
177
+ import { jsx as jsx8 } from "react/jsx-runtime";
178
+ var SentinelSummary = ({ mod, ...props }) => {
179
+ return /* @__PURE__ */ jsx8(ModuleSummary, { mod, icon: /* @__PURE__ */ jsx8(TimerRoundedIcon, {}), ...props });
180
+ };
224
181
 
225
182
  // src/components/WitnessSummary.tsx
226
183
  import { VisibilityRounded as VisibilityRoundedIcon } from "@mui/icons-material";
227
- import React9 from "react";
228
- var WitnessSummary = /* @__PURE__ */ __name(({ mod, ...props }) => {
229
- return /* @__PURE__ */ React9.createElement(ModuleSummary, {
230
- mod,
231
- icon: /* @__PURE__ */ React9.createElement(VisibilityRoundedIcon, null),
232
- ...props
233
- });
234
- }, "WitnessSummary");
184
+ import { jsx as jsx9 } from "react/jsx-runtime";
185
+ var WitnessSummary = ({ mod, ...props }) => {
186
+ return /* @__PURE__ */ jsx9(ModuleSummary, { mod, icon: /* @__PURE__ */ jsx9(VisibilityRoundedIcon, {}), ...props });
187
+ };
235
188
 
236
189
  // src/components/TypedModuleSummary.tsx
237
- var TypedModuleSummary = /* @__PURE__ */ __name(({ mod, ...props }) => {
190
+ import { jsx as jsx10 } from "react/jsx-runtime";
191
+ var TypedModuleSummary = ({ mod, ...props }) => {
238
192
  if (isArchivistInstance(mod)) {
239
- return /* @__PURE__ */ React10.createElement(ArchivistSummary, {
240
- mod,
241
- ...props
242
- });
193
+ return /* @__PURE__ */ jsx10(ArchivistSummary, { mod, ...props });
243
194
  }
244
195
  if (isDivinerInstance(mod)) {
245
- return /* @__PURE__ */ React10.createElement(DivinerSummary, {
246
- mod,
247
- ...props
248
- });
196
+ return /* @__PURE__ */ jsx10(DivinerSummary, { mod, ...props });
249
197
  }
250
198
  if (isNodeInstance(mod)) {
251
- return /* @__PURE__ */ React10.createElement(NodeSummary, {
252
- mod,
253
- ...props
254
- });
199
+ return /* @__PURE__ */ jsx10(NodeSummary, { mod, ...props });
255
200
  }
256
201
  if (isWitnessInstance(mod)) {
257
- return /* @__PURE__ */ React10.createElement(WitnessSummary, {
258
- mod,
259
- ...props
260
- });
202
+ return /* @__PURE__ */ jsx10(WitnessSummary, { mod, ...props });
261
203
  }
262
204
  if (isBridgeInstance(mod)) {
263
- return /* @__PURE__ */ React10.createElement(BridgeSummary, {
264
- mod,
265
- ...props
266
- });
205
+ return /* @__PURE__ */ jsx10(BridgeSummary, { mod, ...props });
267
206
  }
268
207
  if (isSentinelInstance(mod)) {
269
- return /* @__PURE__ */ React10.createElement(SentinelSummary, {
270
- mod,
271
- ...props
272
- });
208
+ return /* @__PURE__ */ jsx10(SentinelSummary, { mod, ...props });
273
209
  }
274
- return /* @__PURE__ */ React10.createElement(ModuleSummary, {
275
- mod,
276
- ...props
277
- });
278
- }, "TypedModuleSummary");
210
+ return /* @__PURE__ */ jsx10(ModuleSummary, { mod, ...props });
211
+ };
279
212
 
280
213
  // src/components/ModuleAccordion.tsx
281
- var ModuleAccordion = /* @__PURE__ */ __name(({ mod, ...props }) => {
282
- return /* @__PURE__ */ React11.createElement(Accordion, props, /* @__PURE__ */ React11.createElement(AccordionSummary, {
283
- expandIcon: /* @__PURE__ */ React11.createElement(ExpandMoreIcon, null)
284
- }, /* @__PURE__ */ React11.createElement(TypedModuleSummary, {
285
- mod
286
- })), /* @__PURE__ */ React11.createElement(AccordionDetails, null, /* @__PURE__ */ React11.createElement(ModuleDetails, {
287
- mod
288
- })));
289
- }, "ModuleAccordion");
214
+ import { jsx as jsx11, jsxs as jsxs4 } from "react/jsx-runtime";
215
+ var ModuleAccordion = ({ mod, ...props }) => {
216
+ return /* @__PURE__ */ jsxs4(Accordion, { ...props, children: [
217
+ /* @__PURE__ */ jsx11(AccordionSummary, { expandIcon: /* @__PURE__ */ jsx11(ExpandMoreIcon, {}), children: /* @__PURE__ */ jsx11(TypedModuleSummary, { mod }) }),
218
+ /* @__PURE__ */ jsx11(AccordionDetails, { children: /* @__PURE__ */ jsx11(ModuleDetails, { mod }) })
219
+ ] });
220
+ };
290
221
 
291
222
  // src/components/NodeDetails.tsx
292
- var NodeDetails = /* @__PURE__ */ __name(({ mod, ...props }) => {
223
+ import { jsx as jsx12 } from "react/jsx-runtime";
224
+ var NodeDetails = ({ mod, ...props }) => {
293
225
  const [node = mod] = useProvidedNode();
294
- const [children] = useWeakModulesFromNode3(void 0, {
295
- node: node ?? void 0
296
- });
297
- return /* @__PURE__ */ React12.createElement(FlexCol3, {
298
- alignItems: "stretch",
299
- ...props
300
- }, children ? /* @__PURE__ */ React12.createElement(FlexCol3, {
301
- alignItems: "stretch",
302
- marginY: 1
303
- }, children?.map((child) => {
226
+ const [children] = useWeakModulesFromNode3(void 0, { node: node ?? void 0 });
227
+ return /* @__PURE__ */ jsx12(FlexCol3, { alignItems: "stretch", ...props, children: children ? /* @__PURE__ */ jsx12(FlexCol3, { alignItems: "stretch", marginY: 1, children: children?.map((child) => {
304
228
  const instance = child.deref();
305
- return instance ? /* @__PURE__ */ React12.createElement(ModuleAccordion, {
306
- key: instance.address,
307
- mod: instance
308
- }) : null;
309
- })) : null);
310
- }, "NodeDetails");
229
+ return instance ? /* @__PURE__ */ jsx12(ModuleAccordion, { mod: instance }, instance.address) : null;
230
+ }) }) : null });
231
+ };
311
232
 
312
233
  // src/components/DebugDialog.tsx
313
- var DebugDialog = /* @__PURE__ */ __name(({ onClose, ...props }) => {
314
- return /* @__PURE__ */ React13.createElement(Dialog2, props, /* @__PURE__ */ React13.createElement(DialogTitle2, null, "Xyo Module Viewer"), /* @__PURE__ */ React13.createElement(DialogContent2, null, /* @__PURE__ */ React13.createElement(NodeDetails, {
315
- width: "100%"
316
- })), /* @__PURE__ */ React13.createElement(DialogActions2, null, /* @__PURE__ */ React13.createElement(Button, {
317
- onClick: /* @__PURE__ */ __name((event) => onClose?.(event, "backdropClick"), "onClick")
318
- }, "Close")));
319
- }, "DebugDialog");
234
+ import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
235
+ var DebugDialog = ({ onClose, ...props }) => {
236
+ return /* @__PURE__ */ jsxs5(Dialog2, { ...props, children: [
237
+ /* @__PURE__ */ jsx13(DialogTitle2, { children: "Xyo Module Viewer" }),
238
+ /* @__PURE__ */ jsx13(DialogContent2, { children: /* @__PURE__ */ jsx13(NodeDetails, { width: "100%" }) }),
239
+ /* @__PURE__ */ jsx13(DialogActions2, { children: /* @__PURE__ */ jsx13(Button, { onClick: (event) => onClose?.(event, "backdropClick"), children: "Close" }) })
240
+ ] });
241
+ };
320
242
 
321
243
  // src/components/PoweredByXyo.tsx
322
244
  import { Paper } from "@mui/material";
@@ -324,13 +246,13 @@ import { useAsyncEffect } from "@xylabs/react-async-effect";
324
246
  import { FlexCol as FlexCol6 } from "@xylabs/react-flexbox";
325
247
  import { delay as delay2, forget } from "@xylabs/sdk-js";
326
248
  import { useProvidedNode as useProvidedNode2 } from "@xyo-network/react-node";
327
- import React16, { useMemo, useState as useState5 } from "react";
249
+ import { useState as useState5 } from "react";
328
250
 
329
251
  // src/components/PoweredByXyoButton.tsx
330
252
  import { Typography } from "@mui/material";
331
253
  import { ButtonEx as ButtonEx3 } from "@xylabs/react-button";
332
254
  import { FlexCol as FlexCol5, FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
333
- import React15, { useEffect, useState as useState4 } from "react";
255
+ import { useEffect as useEffect2, useState as useState4 } from "react";
334
256
 
335
257
  // src/img/xyo-color-logo.svg
336
258
  var xyo_color_logo_default = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 238"><defs><style>.cls-1{fill:#8d8fc6;}.cls-2{fill:#579fd6;}.cls-3{fill:#f27046;}.cls-4{fill:#eb407a;}</style></defs><path class="cls-1" d="M74.5,28.33,21.29,120.5,74.5,212.67H180.94l1.76-3,51.46-89.13L180.94,28.33ZM84.65,40.54h78.83L111.65,56.93a15.85,15.85,0,0,1,2,5l59.66-18.81L185.22,101a20.12,20.12,0,0,1,5.36-.78l-10-47.91,37.87,65.53h-7.62a24.21,24.21,0,0,1,.15,2.68,23.29,23.29,0,0,1-.15,2.68h7.62l-39.1,67.75,10.92-50.13A20.57,20.57,0,0,1,185,140l-12.88,59-58.37-19.53a17.61,17.61,0,0,1-1.7,5l47.5,15.92H84.65l4-6.85A20.17,20.17,0,0,1,83.93,191L80,197.78,42.67,133.13l37,32.66a20.52,20.52,0,0,1,3.6-4L36.69,120.66,85,77.79a17.45,17.45,0,0,1-3.19-4.32l-39.46,35L80,43.22l5.56,9.69A17.51,17.51,0,0,1,90.12,50Zm28.24,31.17a16.15,16.15,0,0,1-2.68,4.64l62,35.81a19.74,19.74,0,0,1,2.83-4.54Zm-20,10.51v75.33a18,18,0,0,1,2.47-.16,17.18,17.18,0,0,1,2.89.21v-75a11.21,11.21,0,0,1-1.29,0,17.57,17.57,0,0,1-4.07-.47Zm79.34,46.63-62.08,35.81a18.45,18.45,0,0,1,2.68,4.68l62.23-36a19.68,19.68,0,0,1-2.83-4.53Z"/><path class="cls-2" d="M97,48.58a17.06,17.06,0,1,0,17,17,17.08,17.08,0,0,0-17-17Zm0,5.36a11.7,11.7,0,1,1-11.7,11.69A11.65,11.65,0,0,1,97,53.94Z"/><path class="cls-3" d="M95.37,157.39a18.73,18.73,0,1,0,18.7,18.7,18.74,18.74,0,0,0-18.7-18.7Zm0,5.31A13.4,13.4,0,1,1,82,176.09a13.37,13.37,0,0,1,13.4-13.39Z"/><path class="cls-4" d="M190.73,100.2A20.3,20.3,0,1,0,211,120.5a20.34,20.34,0,0,0-20.3-20.3Zm0,5.36a14.94,14.94,0,1,1-14.94,14.94,14.88,14.88,0,0,1,14.94-14.94Z"/></svg>';
@@ -340,79 +262,100 @@ var xyo_color_logo_text_only_default = '<svg id="Layer_1" data-name="Layer 1" xm
340
262
 
341
263
  // src/components/XyoBusy.tsx
342
264
  import { FlexCol as FlexCol4 } from "@xylabs/react-flexbox";
343
- import React14, { useState as useState3 } from "react";
344
- var XyoBusy = /* @__PURE__ */ __name(({ widthInPixels, busy, spinsPerSecond = 0.5, ...props }) => {
265
+ import { useEffect, useState as useState3 } from "react";
266
+ import { jsx as jsx14 } from "react/jsx-runtime";
267
+ var XyoBusy = ({
268
+ widthInPixels,
269
+ busy,
270
+ spinsPerSecond = 0.5,
271
+ ...props
272
+ }) => {
345
273
  const [imageLoaded, setImageLoaded] = useState3(false);
346
- if (!imageLoaded) {
347
- const img = new Image();
348
- img.addEventListener("load", () => setImageLoaded(true));
349
- img.src = xyo_color_logo_default;
350
- }
351
- return imageLoaded ? /* @__PURE__ */ React14.createElement(FlexCol4, {
352
- sx: {
353
- "@keyframes spin": {
354
- "0%": {
355
- transform: "rotate(360deg)"
274
+ useEffect(() => {
275
+ if (!imageLoaded) {
276
+ const img = new Image();
277
+ const onLoad = () => setImageLoaded(true);
278
+ img.addEventListener("load", onLoad);
279
+ img.src = xyo_color_logo_default;
280
+ return () => img.removeEventListener("load", onLoad);
281
+ }
282
+ }, [imageLoaded]);
283
+ return imageLoaded ? /* @__PURE__ */ jsx14(
284
+ FlexCol4,
285
+ {
286
+ sx: {
287
+ "@keyframes spin": {
288
+ "0%": { transform: "rotate(360deg)" },
289
+ "100%": { transform: "rotate(0deg)" }
356
290
  },
357
- "100%": {
358
- transform: "rotate(0deg)"
359
- }
291
+ "animation": busy ? `spin ${1 / spinsPerSecond}s linear infinite` : void 0,
292
+ "animationDirection": "reverse"
360
293
  },
361
- "animation": busy ? `spin ${1 / spinsPerSecond}s linear infinite` : void 0,
362
- "animationDirection": "reverse"
363
- },
364
- ...props
365
- }, /* @__PURE__ */ React14.createElement("img", {
366
- src: xyo_color_logo_default,
367
- height: widthInPixels ?? 22
368
- })) : null;
369
- }, "XyoBusy");
294
+ ...props,
295
+ children: /* @__PURE__ */ jsx14("img", { src: xyo_color_logo_default, height: widthInPixels ?? 22 })
296
+ }
297
+ ) : null;
298
+ };
370
299
 
371
300
  // src/components/PoweredByXyoButton.tsx
372
- var PoweredByXyoButton = /* @__PURE__ */ __name(({ busy = false, logoHeight, logoTextSize, ...props }) => {
301
+ import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
302
+ var PoweredByXyoButton = ({
303
+ busy = false,
304
+ logoHeight,
305
+ logoTextSize,
306
+ ...props
307
+ }) => {
373
308
  const [imageLoaded, setImageLoaded] = useState4(false);
374
- useEffect(() => {
309
+ useEffect2(() => {
375
310
  const img = new Image();
376
- const onImageLoaded = /* @__PURE__ */ __name(() => setImageLoaded(true), "onImageLoaded");
311
+ const onImageLoaded = () => setImageLoaded(true);
377
312
  img.addEventListener("load", onImageLoaded);
378
313
  img.src = xyo_color_logo_text_only_default;
379
314
  return () => {
380
315
  img.removeEventListener("load", onImageLoaded);
381
316
  };
382
317
  }, []);
383
- return imageLoaded ? /* @__PURE__ */ React15.createElement(ButtonEx3, {
384
- ...props,
385
- target: props.target ?? "_blank",
386
- variant: props.variant ?? "text",
387
- sx: {
388
- textDecoration: "none",
389
- borderRadius: 0,
390
- padding: 0,
391
- ...props.sx
318
+ return imageLoaded ? /* @__PURE__ */ jsx15(
319
+ ButtonEx3,
320
+ {
321
+ ...props,
322
+ target: props.target ?? "_blank",
323
+ variant: props.variant ?? "text",
324
+ sx: {
325
+ textDecoration: "none",
326
+ borderRadius: 0,
327
+ padding: 0,
328
+ ...props.sx
329
+ },
330
+ children: /* @__PURE__ */ jsxs6(FlexCol5, { padding: 0.5, children: [
331
+ /* @__PURE__ */ jsx15(Typography, { style: { fontSize: logoTextSize ?? 10 }, fontSize: "small", children: "Powered by" }),
332
+ /* @__PURE__ */ jsxs6(FlexRow3, { children: [
333
+ /* @__PURE__ */ jsx15(XyoBusy, { busy }),
334
+ /* @__PURE__ */ jsx15("img", { src: xyo_color_logo_text_only_default, height: logoHeight ?? 24, width: 45 })
335
+ ] })
336
+ ] })
392
337
  }
393
- }, /* @__PURE__ */ React15.createElement(FlexCol5, {
394
- padding: 0.5
395
- }, /* @__PURE__ */ React15.createElement(Typography, {
396
- style: {
397
- fontSize: logoTextSize ?? 10
398
- },
399
- fontSize: "small"
400
- }, "Powered by"), /* @__PURE__ */ React15.createElement(FlexRow3, null, /* @__PURE__ */ React15.createElement(XyoBusy, {
401
- busy
402
- }), /* @__PURE__ */ React15.createElement("img", {
403
- src: xyo_color_logo_text_only_default,
404
- height: logoHeight ?? 24,
405
- width: 45
406
- })))) : null;
407
- }, "PoweredByXyoButton");
338
+ ) : null;
339
+ };
408
340
 
409
341
  // src/components/PoweredByXyo.tsx
410
- var PoweredByXyo = /* @__PURE__ */ __name(({ autoStop, busy, buttonProps, debugDialog = false, disableAnimation = false, href = "https://xyo.network", logoHeight, logoTextSize, onButtonClick, node: propNode, ...props }) => {
342
+ import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
343
+ var PoweredByXyo = ({
344
+ autoStop,
345
+ busy,
346
+ buttonProps,
347
+ debugDialog = false,
348
+ disableAnimation = false,
349
+ href = "https://xyo.network",
350
+ logoHeight,
351
+ logoTextSize,
352
+ onButtonClick,
353
+ node: propNode,
354
+ ...props
355
+ }) => {
411
356
  const [node] = useProvidedNode2();
412
357
  const [debugDialogOpen, setDebugDialogOpen] = useState5(false);
413
- const busyMap = useMemo(() => ({}), [
414
- node
415
- ]);
358
+ const busyMap = {};
416
359
  const activeBusy = busy ?? Object.values(busyMap).includes(true);
417
360
  const activeOnButtonClick = (debugDialog ? (event) => {
418
361
  if (event.shiftKey && event.altKey) {
@@ -422,77 +365,72 @@ var PoweredByXyo = /* @__PURE__ */ __name(({ autoStop, busy, buttonProps, debugD
422
365
  }
423
366
  } : void 0) ?? onButtonClick;
424
367
  const activeHref = activeOnButtonClick ? void 0 : href;
425
- const onKeyDownEscListener = /* @__PURE__ */ __name((event) => {
368
+ const onKeyDownEscListener = (event) => {
426
369
  if (event.key === "Escape" && debugDialogOpen) {
427
370
  setDebugDialogOpen(false);
428
371
  }
429
- }, "onKeyDownEscListener");
430
- useAsyncEffect(async () => {
431
- const activeNode = propNode ?? node;
432
- if (disableAnimation) {
433
- return;
434
- } else if (activeNode) {
435
- const mods = await activeNode?.resolve("*");
436
- mods?.map((mod) => {
437
- return mod.on("moduleBusy", ({ mod: mod2, busy: busy2 }) => {
438
- busyMap[mod2.address] = busy2;
372
+ };
373
+ useAsyncEffect(
374
+ async () => {
375
+ const activeNode = propNode ?? node;
376
+ if (disableAnimation) {
377
+ return;
378
+ } else if (activeNode) {
379
+ const mods = await activeNode?.resolve("*");
380
+ mods?.map((mod) => {
381
+ return mod.on("moduleBusy", ({ mod: mod2, busy: busy2 }) => {
382
+ busyMap[mod2.address] = busy2;
383
+ if (autoStop) {
384
+ forget(
385
+ (async () => {
386
+ await delay2(1e3);
387
+ busyMap[mod2.address] = false;
388
+ })()
389
+ );
390
+ }
391
+ });
392
+ });
393
+ activeNode?.on("moduleBusy", ({ mod, busy: busy2 }) => {
394
+ busyMap[mod.address] = busy2;
439
395
  if (autoStop) {
440
- forget((async () => {
441
- await delay2(1e3);
442
- busyMap[mod2.address] = false;
443
- })());
396
+ forget(
397
+ (async () => {
398
+ await delay2(1e3);
399
+ busyMap[mod.address] = false;
400
+ })()
401
+ );
444
402
  }
445
403
  });
446
- });
447
- activeNode?.on("moduleBusy", ({ mod, busy: busy2 }) => {
448
- busyMap[mod.address] = busy2;
449
- if (autoStop) {
450
- forget((async () => {
451
- await delay2(1e3);
452
- busyMap[mod.address] = false;
453
- })());
454
- }
455
- });
456
- }
457
- }, [
458
- disableAnimation,
459
- propNode,
460
- node,
461
- busyMap,
462
- autoStop
463
- ]);
464
- return /* @__PURE__ */ React16.createElement(FlexCol6, {
465
- alignItems: "stretch",
466
- position: "absolute",
467
- bottom: "0",
468
- left: "0",
469
- ...props
470
- }, /* @__PURE__ */ React16.createElement(Paper, {
471
- sx: {
472
- borderRadius: 0
473
- }
474
- }, activeHref ? /* @__PURE__ */ React16.createElement(PoweredByXyoButton, {
475
- onClick: activeOnButtonClick,
476
- href: activeHref,
477
- busy: activeBusy,
478
- logoHeight,
479
- logoTextSize,
480
- fullWidth: true,
481
- ...buttonProps
482
- }) : /* @__PURE__ */ React16.createElement(PoweredByXyoButton, {
483
- onClick: activeOnButtonClick,
484
- busy: activeBusy,
485
- logoHeight,
486
- logoTextSize,
487
- fullWidth: true,
488
- ...buttonProps
489
- })), debugDialog && debugDialogOpen ? /* @__PURE__ */ React16.createElement(DebugDialog, {
490
- fullScreen: true,
491
- open: debugDialogOpen,
492
- onClose: /* @__PURE__ */ __name(() => setDebugDialogOpen(false), "onClose"),
493
- onKeyDown: onKeyDownEscListener
494
- }) : null);
495
- }, "PoweredByXyo");
404
+ }
405
+ },
406
+ [disableAnimation, propNode, node, busyMap, autoStop]
407
+ );
408
+ return /* @__PURE__ */ jsxs7(FlexCol6, { alignItems: "stretch", position: "absolute", bottom: "0", left: "0", ...props, children: [
409
+ /* @__PURE__ */ jsx16(Paper, { sx: { borderRadius: 0 }, children: activeHref ? /* @__PURE__ */ jsx16(
410
+ PoweredByXyoButton,
411
+ {
412
+ onClick: activeOnButtonClick,
413
+ href: activeHref,
414
+ busy: activeBusy,
415
+ logoHeight,
416
+ logoTextSize,
417
+ fullWidth: true,
418
+ ...buttonProps
419
+ }
420
+ ) : /* @__PURE__ */ jsx16(
421
+ PoweredByXyoButton,
422
+ {
423
+ onClick: activeOnButtonClick,
424
+ busy: activeBusy,
425
+ logoHeight,
426
+ logoTextSize,
427
+ fullWidth: true,
428
+ ...buttonProps
429
+ }
430
+ ) }),
431
+ debugDialog && debugDialogOpen ? /* @__PURE__ */ jsx16(DebugDialog, { fullScreen: true, open: debugDialogOpen, onClose: () => setDebugDialogOpen(false), onKeyDown: onKeyDownEscListener }) : null
432
+ ] });
433
+ };
496
434
  export {
497
435
  ArchivistSummary,
498
436
  BridgeSummary,