@xyo-network/dapp-template 7.3.1 → 7.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/neutral/index.mjs +127 -110
- package/dist/neutral/index.mjs.map +7 -1
- package/dist/node/index.mjs +127 -110
- package/dist/node/index.mjs.map +7 -1
- package/package.json +98 -100
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// src/components/host/DappHost.tsx
|
|
5
2
|
import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
|
|
6
3
|
import { DappRendered } from "@xyo-network/os-react-runtime";
|
|
7
|
-
import React2 from "react";
|
|
8
4
|
|
|
9
5
|
// src/helpers/registration/useInitializeDappAdHoc.tsx
|
|
10
6
|
import { usePromise } from "@xylabs/react-promise";
|
|
11
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
useDappMenu,
|
|
9
|
+
useManageDappInjectableParamsFromRoute,
|
|
10
|
+
useManageDappPathFromRoute,
|
|
11
|
+
useXyOsUiContext
|
|
12
|
+
} from "@xyo-network/os-react-runtime";
|
|
12
13
|
import { DappInitializer } from "@xyo-network/os-runtime";
|
|
13
14
|
var dappState = {
|
|
14
15
|
active: true,
|
|
15
16
|
minimized: false,
|
|
16
17
|
closed: false
|
|
17
18
|
};
|
|
18
|
-
var useInitializeDappAdHoc =
|
|
19
|
+
var useInitializeDappAdHoc = (dapp) => {
|
|
19
20
|
const xyOs = useXyOsUiContext();
|
|
20
21
|
const [installedDapp, nodeCreateError] = usePromise(async () => {
|
|
21
22
|
if (xyOs && dapp) {
|
|
22
23
|
const installer = new DappInitializer({
|
|
23
|
-
allowedNames: [
|
|
24
|
-
dapp.config.name
|
|
25
|
-
],
|
|
24
|
+
allowedNames: [dapp.config.name],
|
|
26
25
|
dapp,
|
|
27
26
|
xnsNetwork: void 0,
|
|
28
27
|
xnsNodeUrl: void 0,
|
|
@@ -30,10 +29,7 @@ var useInitializeDappAdHoc = /* @__PURE__ */ __name((dapp) => {
|
|
|
30
29
|
});
|
|
31
30
|
return await installer.install();
|
|
32
31
|
}
|
|
33
|
-
}, [
|
|
34
|
-
xyOs,
|
|
35
|
-
dapp
|
|
36
|
-
]);
|
|
32
|
+
}, [xyOs, dapp]);
|
|
37
33
|
const { dappWallet, context } = installedDapp ?? {};
|
|
38
34
|
const routingError = useManageDappPathFromRoute(context, dapp.config.name);
|
|
39
35
|
const injectableErrors = useManageDappInjectableParamsFromRoute(context);
|
|
@@ -43,13 +39,9 @@ var useInitializeDappAdHoc = /* @__PURE__ */ __name((dapp) => {
|
|
|
43
39
|
dappMenu,
|
|
44
40
|
dappState,
|
|
45
41
|
dappWallet,
|
|
46
|
-
errors: [
|
|
47
|
-
routingError,
|
|
48
|
-
nodeCreateError,
|
|
49
|
-
...injectableErrors
|
|
50
|
-
].filter(Boolean)
|
|
42
|
+
errors: [routingError, nodeCreateError, ...injectableErrors].filter(Boolean)
|
|
51
43
|
};
|
|
52
|
-
}
|
|
44
|
+
};
|
|
53
45
|
|
|
54
46
|
// src/components/host/XyOsHost.tsx
|
|
55
47
|
import { Typography } from "@mui/material";
|
|
@@ -59,20 +51,19 @@ import { Kernel } from "@xyo-network/kernel";
|
|
|
59
51
|
import { XyOsUiContextProvider } from "@xyo-network/os-react-runtime";
|
|
60
52
|
import { EventBus, XyOs } from "@xyo-network/os-runtime";
|
|
61
53
|
import { HDWallet, ModuleFactoryLocator } from "@xyo-network/sdk-js";
|
|
62
|
-
import
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
]);
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
]);
|
|
54
|
+
import { useMemo } from "react";
|
|
55
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
56
|
+
var XyOsHost = ({
|
|
57
|
+
children,
|
|
58
|
+
eventBus,
|
|
59
|
+
kernel,
|
|
60
|
+
locator: locator2,
|
|
61
|
+
wallet
|
|
62
|
+
}) => {
|
|
63
|
+
const [walletToUse] = usePromise2(async () => wallet ?? await HDWallet.random(), [wallet]);
|
|
64
|
+
const eventBusToUse = useMemo(() => eventBus ?? new EventBus(), [kernel]);
|
|
65
|
+
const kernelToUse = useMemo(() => kernel ?? new Kernel(), [kernel]);
|
|
66
|
+
const locatorToUse = useMemo(() => locator2 ?? new ModuleFactoryLocator(), [locator2]);
|
|
76
67
|
const [os, error] = usePromise2(async () => {
|
|
77
68
|
if (walletToUse && kernelToUse && eventBusToUse && locatorToUse) {
|
|
78
69
|
const os2 = new XyOs({
|
|
@@ -83,63 +74,96 @@ var XyOsHost = /* @__PURE__ */ __name(({ children, eventBus, kernel, locator: lo
|
|
|
83
74
|
await os2.boot(walletToUse, locatorToUse);
|
|
84
75
|
return os2;
|
|
85
76
|
}
|
|
86
|
-
}, [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
77
|
+
}, [kernelToUse, walletToUse, locator2, eventBusToUse, locatorToUse]);
|
|
78
|
+
return os ? /* @__PURE__ */ jsx(XyOsUiContextProvider, { value: os, children }) : /* @__PURE__ */ jsxs(FlexCol, { children: [
|
|
79
|
+
/* @__PURE__ */ jsxs(Typography, { children: [
|
|
80
|
+
"wallet:",
|
|
81
|
+
walletToUse ? "ready" : "loading"
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ jsxs(Typography, { children: [
|
|
84
|
+
"kernel:",
|
|
85
|
+
kernelToUse ? "ready" : "loading"
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ jsxs(Typography, { children: [
|
|
88
|
+
"os:",
|
|
89
|
+
os ? "ready" : "loading"
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsxs(Typography, { children: [
|
|
92
|
+
"os-error:",
|
|
93
|
+
error?.message
|
|
94
|
+
] })
|
|
95
|
+
] });
|
|
96
|
+
};
|
|
97
97
|
|
|
98
98
|
// src/components/host/DappHost.tsx
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
100
|
+
var DappHostInner = ({ dapp }) => {
|
|
101
|
+
const {
|
|
102
102
|
context,
|
|
103
|
-
|
|
104
|
-
dappMenuProperties: dappMenu,
|
|
103
|
+
dappMenu,
|
|
105
104
|
dappState: dappState2,
|
|
106
105
|
dappWallet,
|
|
107
106
|
errors
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
} = useInitializeDappAdHoc(dapp);
|
|
108
|
+
return /* @__PURE__ */ jsx2(FlexCol2, { children: /* @__PURE__ */ jsx2(
|
|
109
|
+
DappRendered,
|
|
110
|
+
{
|
|
111
|
+
context,
|
|
112
|
+
dapp,
|
|
113
|
+
dappMenuProperties: dappMenu,
|
|
114
|
+
dappState: dappState2,
|
|
115
|
+
dappWallet,
|
|
116
|
+
errors
|
|
117
|
+
}
|
|
118
|
+
) });
|
|
119
|
+
};
|
|
120
|
+
var DappHost = ({ dapp }) => /* @__PURE__ */ jsx2(XyOsHost, { children: /* @__PURE__ */ jsx2(DappHostInner, { dapp }) });
|
|
113
121
|
|
|
114
122
|
// src/components/host/Routable.tsx
|
|
115
|
-
import React4 from "react";
|
|
116
123
|
import { BrowserRouter } from "react-router-dom";
|
|
117
124
|
|
|
118
125
|
// src/components/host/Routes.tsx
|
|
119
|
-
import React3 from "react";
|
|
120
126
|
import { Route, Routes } from "react-router-dom";
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
128
|
+
var DappRoutes = (args) => /* @__PURE__ */ jsxs2(Routes, { children: [
|
|
129
|
+
/* @__PURE__ */ jsx3(
|
|
130
|
+
Route,
|
|
131
|
+
{
|
|
132
|
+
path: "/",
|
|
133
|
+
element: /* @__PURE__ */ jsx3(DappHost, { ...args })
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ jsx3(
|
|
137
|
+
Route,
|
|
138
|
+
{
|
|
139
|
+
path: "/:dappName",
|
|
140
|
+
element: /* @__PURE__ */ jsx3(DappHost, { ...args })
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
/* @__PURE__ */ jsx3(
|
|
144
|
+
Route,
|
|
145
|
+
{
|
|
146
|
+
path: "/:dappName/:path/*",
|
|
147
|
+
element: /* @__PURE__ */ jsx3(DappHost, { ...args })
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
/* @__PURE__ */ jsx3(
|
|
151
|
+
Route,
|
|
152
|
+
{
|
|
153
|
+
path: "*",
|
|
154
|
+
element: /* @__PURE__ */ jsx3(DappHost, { ...args })
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
] });
|
|
134
158
|
|
|
135
159
|
// src/components/host/Routable.tsx
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
dapp
|
|
141
|
-
})
|
|
142
|
-
}
|
|
160
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
161
|
+
var RoutableDapp = ({ dapp }) => {
|
|
162
|
+
return /* @__PURE__ */ jsxs3(BrowserRouter, { children: [
|
|
163
|
+
/* @__PURE__ */ jsx4(DappRoutes, { dapp }),
|
|
164
|
+
/* @__PURE__ */ jsx4(DappHost, { dapp })
|
|
165
|
+
] });
|
|
166
|
+
};
|
|
143
167
|
|
|
144
168
|
// src/dapp.manifest.json
|
|
145
169
|
var dapp_manifest_default = {
|
|
@@ -225,19 +249,21 @@ var CustomDappParams = {
|
|
|
225
249
|
};
|
|
226
250
|
|
|
227
251
|
// src/Payloads.ts
|
|
228
|
-
import {
|
|
252
|
+
import {
|
|
253
|
+
DappConfigSchema,
|
|
254
|
+
DappIconSchema,
|
|
255
|
+
DappMode,
|
|
256
|
+
DappNavItemSchema,
|
|
257
|
+
DappNavMenuConfigSchema
|
|
258
|
+
} from "@xyo-network/os-model";
|
|
229
259
|
var CustomDappName = "Custom Dapp";
|
|
230
260
|
var version = "1.0.0";
|
|
231
261
|
var CustomDappConfig = {
|
|
232
262
|
manifest: dapp_manifest_default,
|
|
233
|
-
modes: [
|
|
234
|
-
DappMode.Window
|
|
235
|
-
],
|
|
263
|
+
modes: [DappMode.Window],
|
|
236
264
|
name: CustomDappName,
|
|
237
265
|
schema: DappConfigSchema,
|
|
238
|
-
sources: [
|
|
239
|
-
"network.xyo.dapp.accounts.source"
|
|
240
|
-
],
|
|
266
|
+
sources: ["network.xyo.dapp.accounts.source"],
|
|
241
267
|
version
|
|
242
268
|
};
|
|
243
269
|
var CustomDappIcon = {
|
|
@@ -248,10 +274,7 @@ var CustomDappIcon = {
|
|
|
248
274
|
type: "system",
|
|
249
275
|
version
|
|
250
276
|
};
|
|
251
|
-
var DappPayloads = [
|
|
252
|
-
CustomDappConfig,
|
|
253
|
-
CustomDappIcon
|
|
254
|
-
];
|
|
277
|
+
var DappPayloads = [CustomDappConfig, CustomDappIcon];
|
|
255
278
|
var CustomDappMenuItems = [
|
|
256
279
|
{
|
|
257
280
|
path: "home",
|
|
@@ -276,46 +299,40 @@ var CustomDappMenuConfig = {
|
|
|
276
299
|
defaultPath: "home",
|
|
277
300
|
schema: DappNavMenuConfigSchema
|
|
278
301
|
};
|
|
279
|
-
var CustomDappMenuPayloads = [
|
|
280
|
-
...CustomDappMenuItems,
|
|
281
|
-
CustomDappMenuConfig
|
|
282
|
-
];
|
|
302
|
+
var CustomDappMenuPayloads = [...CustomDappMenuItems, CustomDappMenuConfig];
|
|
283
303
|
|
|
284
304
|
// src/Dapp.tsx
|
|
285
305
|
import { ErrorRender } from "@xylabs/react-error";
|
|
286
306
|
import { DappPathSwitcher, useAddDappMenuItems } from "@xyo-network/os-react-runtime";
|
|
287
|
-
import React6 from "react";
|
|
288
307
|
|
|
289
308
|
// src/CustomDappPathToComponent.tsx
|
|
290
309
|
import { FlexRow } from "@xylabs/react-flexbox";
|
|
291
|
-
import
|
|
310
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
292
311
|
var CustomDappPathToComponent = [
|
|
293
312
|
{
|
|
294
|
-
component: /* @__PURE__ */
|
|
313
|
+
component: /* @__PURE__ */ jsx5(FlexRow, {}),
|
|
295
314
|
path: "home"
|
|
296
315
|
}
|
|
297
316
|
];
|
|
298
317
|
|
|
299
318
|
// src/Dapp.tsx
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
319
|
+
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
320
|
+
var CustomDapp = () => {
|
|
321
|
+
const {
|
|
322
|
+
menuConfig,
|
|
323
|
+
path,
|
|
324
|
+
error
|
|
325
|
+
} = useAddDappMenuItems(CustomDappMenuPayloads);
|
|
326
|
+
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
327
|
+
/* @__PURE__ */ jsx6(ErrorRender, { error, scope: "CustomDapp" }),
|
|
328
|
+
/* @__PURE__ */ jsx6(DappPathSwitcher, { activePath: path?.path ?? menuConfig?.defaultPath, pathToComponent: CustomDappPathToComponent })
|
|
329
|
+
] });
|
|
330
|
+
};
|
|
310
331
|
|
|
311
332
|
// src/UiParams.ts
|
|
312
333
|
var CustomDappUiParams = {
|
|
313
334
|
...CustomDappParams,
|
|
314
|
-
modes: {
|
|
315
|
-
window: {
|
|
316
|
-
component: CustomDapp
|
|
317
|
-
}
|
|
318
|
-
}
|
|
335
|
+
modes: { window: { component: CustomDapp } }
|
|
319
336
|
};
|
|
320
337
|
export {
|
|
321
338
|
CustomDappConfig,
|
|
@@ -333,4 +350,4 @@ export {
|
|
|
333
350
|
dapp_manifest_default as accountsDappManifest,
|
|
334
351
|
useInitializeDappAdHoc
|
|
335
352
|
};
|
|
336
|
-
//# sourceMappingURL=index.mjs.map
|
|
353
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/host/DappHost.tsx","../../src/helpers/registration/useInitializeDappAdHoc.tsx","../../src/components/host/XyOsHost.tsx","../../src/components/host/Routable.tsx","../../src/components/host/Routes.tsx","../../src/dapp.manifest.json","../../src/Params.ts","../../src/icon/Icon.tsx","../../src/Payloads.ts","../../src/Dapp.tsx","../../src/CustomDappPathToComponent.tsx","../../src/UiParams.ts"],"sourcesContent":["import { FlexCol } from '@xylabs/react-flexbox'\nimport type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport { DappRendered } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { useInitializeDappAdHoc } from '../../helpers/index.ts'\nimport { XyOsHost } from './XyOsHost.tsx'\n\nexport interface DappHostProps {\n dapp: RegisteredReactDapp\n}\n\nexport const DappHostInner: React.FC<DappHostProps> = ({ dapp }) => {\n const {\n context, dappMenu, dappState, dappWallet, errors,\n } = useInitializeDappAdHoc(dapp)\n\n return (\n <FlexCol>\n <DappRendered\n context={context}\n dapp={dapp}\n dappMenuProperties={dappMenu}\n dappState={dappState}\n dappWallet={dappWallet}\n errors={errors}\n />\n </FlexCol>\n )\n}\n\nexport const DappHost: React.FC<DappHostProps> = ({ dapp }) => (\n <XyOsHost>\n <DappHostInner dapp={dapp} />\n </XyOsHost>\n)\n","import { usePromise } from '@xylabs/react-promise'\nimport type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport {\n useDappMenu, useManageDappInjectableParamsFromRoute, useManageDappPathFromRoute, useXyOsUiContext,\n} from '@xyo-network/os-react-runtime'\nimport { DappInitializer } from '@xyo-network/os-runtime'\n\nconst dappState = {\n active: true, minimized: false, closed: false,\n}\n\nexport const useInitializeDappAdHoc = (dapp: RegisteredReactDapp) => {\n const xyOs = useXyOsUiContext()\n\n const [installedDapp, nodeCreateError] = usePromise(async () => {\n if (xyOs && dapp) {\n const installer = new DappInitializer({\n allowedNames: [dapp.config.name],\n dapp,\n xnsNetwork: undefined,\n xnsNodeUrl: undefined,\n xyOs,\n })\n return await installer.install()\n }\n }, [xyOs, dapp])\n\n const { dappWallet, context } = installedDapp ?? {}\n\n // support for routing\n const routingError = useManageDappPathFromRoute(context, dapp.config.name)\n const injectableErrors = useManageDappInjectableParamsFromRoute(context)\n\n const dappMenu = useDappMenu(context, dapp.config.name)\n\n return {\n context,\n dappMenu,\n dappState,\n dappWallet,\n errors: [routingError, nodeCreateError, ...injectableErrors].filter(Boolean),\n }\n}\n","import { Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { usePromise } from '@xylabs/react-promise'\nimport { Kernel } from '@xyo-network/kernel'\nimport type { KernelExternal } from '@xyo-network/kernel-model'\nimport { XyOsUiContextProvider } from '@xyo-network/os-react-runtime'\nimport { EventBus, XyOs } from '@xyo-network/os-runtime'\nimport { HDWallet, ModuleFactoryLocator } from '@xyo-network/sdk-js'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport React, { useMemo } from 'react'\n\nexport interface XyOsHostProps {\n children?: React.ReactNode\n eventBus?: EventBus\n kernel?: KernelExternal\n locator?: ModuleFactoryLocator\n wallet?: WalletInstance\n}\n\nexport const XyOsHost: React.FC<XyOsHostProps> = ({\n children, eventBus, kernel, locator, wallet,\n}) => {\n const [walletToUse] = usePromise(async () => wallet ?? await HDWallet.random(), [wallet])\n const eventBusToUse: EventBus = useMemo(() => eventBus ?? new EventBus(), [kernel])\n const kernelToUse: KernelExternal = useMemo(() => kernel ?? new Kernel(), [kernel])\n const locatorToUse = useMemo(() => locator ?? new ModuleFactoryLocator(), [locator])\n\n const [os, error] = usePromise(async () => {\n if (walletToUse && kernelToUse && eventBusToUse && locatorToUse) {\n const os = new XyOs({\n kernel: kernelToUse, eventBus: new EventBus(), locator: locatorToUse,\n })\n await os.boot(walletToUse, locatorToUse)\n return os\n }\n }, [kernelToUse, walletToUse, locator, eventBusToUse, locatorToUse])\n\n return os\n ? <XyOsUiContextProvider value={os}>{children}</XyOsUiContextProvider>\n : (\n <FlexCol>\n <Typography>\n wallet:\n {walletToUse ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n kernel:\n {kernelToUse ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n os:\n {os ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n os-error:\n {error?.message}\n </Typography>\n </FlexCol>\n )\n}\n","import React from 'react'\nimport { BrowserRouter } from 'react-router-dom'\n\nimport type { DappHostProps } from './DappHost.tsx'\nimport { DappHost } from './DappHost.tsx'\nimport { DappRoutes } from './Routes.tsx'\n\nexport const RoutableDapp: React.FC<DappHostProps> = ({ dapp }) => {\n return (\n <BrowserRouter>\n <DappRoutes dapp={dapp} />\n <DappHost dapp={dapp} />\n </BrowserRouter>\n )\n}\n","import React from 'react'\nimport { Route, Routes } from 'react-router-dom'\n\nimport { DappHost, type DappHostProps } from './DappHost.tsx'\n\nexport const DappRoutes: React.FC<DappHostProps> = args => (\n <Routes>\n <Route\n path=\"/\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"/:dappName\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"/:dappName/:path/*\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"*\"\n element={(\n <DappHost {...args} />\n )}\n />\n </Routes>\n)\n","{\n \"$schema\": \"https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/compilations/dapp-package-manifest-schema.json\",\n \"nodes\": [\n {\n \"config\": {\n \"accountPath\": \"0'\",\n \"name\": \"CustomDappNode\",\n \"schema\": \"network.xyo.node.config\"\n },\n \"modules\": {\n \"private\": [],\n \"public\": [\n {\n \"config\": {\n \"accountPath\": \"1'\",\n \"name\": \"DappArchivist\",\n \"schema\": \"network.xyo.archivist.config\"\n }\n }\n ]\n }\n }\n ],\n \"schema\": \"network.xyo.manifest.package.dapp\"\n}","import type { UnregisteredDapp } from '@xyo-network/os-model'\nimport { ModuleFactoryLocator } from '@xyo-network/sdk-js'\n\nimport { CustomDappIconSvg } from './icon/index.ts'\n\nconst locator = new ModuleFactoryLocator()\n\nexport const CustomDappParams: UnregisteredDapp['params'] = {\n iconSvg: CustomDappIconSvg,\n locator,\n}\n\nexport default CustomDappParams\n","/* eslint-disable @stylistic/max-len */\nexport const CustomDappIconSvg = `\n<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\">\n <path\n fill=\"transparent\"\n d=\"M6.44,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M18.01,27.91c-.55.55-.83,1.22-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83s-1.44.28-2,.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M33.56,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M36.55,26.94c-.82-.82-1.82-1.23-3-1.23-.32,0-.63.04-.93.11-.3.07-.59.17-.87.31l-5.87-8.09c-.18.03-.36.05-.56.05h-1.13l6.42,8.83c-.39.4-.7.85-.93,1.36-.23.51-.35,1.06-.35,1.66,0,1.18.41,2.17,1.23,3s1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3-.41-2.17-1.23-3ZM35.55,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M19.29,25.73c-1,.16-1.84.64-2.52,1.42-.67.79-1.01,1.7-1.01,2.75,0,1.18.41,2.17,1.23,3,.82.82,1.82,1.23,3,1.23s2.17-.41,3-1.23c.82-.82,1.23-1.82,1.23-3,0-1.05-.34-1.97-1.01-2.74-.67-.78-1.51-1.25-2.52-1.43v-7.65h-1.41v7.65ZM22,27.91c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M14.1,18l-5.89,8.08c-.28-.13-.56-.22-.86-.28-.29-.06-.6-.09-.91-.09-1.18,0-2.17.41-3,1.23-.82.82-1.23,1.82-1.23,3s.41,2.17,1.23,3,1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3c0-.6-.12-1.15-.36-1.66s-.56-.96-.95-1.36l6.45-8.83h-1c-.25,0-.48-.03-.7-.08ZM8.44,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,12.91c1.26,0,2.46.19,3.61.56,1.15.37,2.23.88,3.23,1.54V4.86c0-.44-.15-.82-.46-1.12s-.68-.46-1.12-.46h-10.52c-.44,0-.82.15-1.12.46s-.46.68-.46,1.12v10.15c1-.66,2.08-1.17,3.23-1.54s2.36-.56,3.61-.56ZM17.7,5.83c.63-.63,1.4-.95,2.3-.95s1.66.32,2.3.95.95,1.4.95,2.3-.32,1.66-.95,2.3-1.4.95-2.3.95-1.66-.32-2.3-.95-.95-1.4-.95-2.3.32-1.66.95-2.3Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,10.32c.6,0,1.12-.21,1.55-.64.43-.43.65-.94.65-1.55s-.22-1.12-.65-1.55c-.43-.43-.95-.65-1.55-.65s-1.12.22-1.55.65-.64.95-.64,1.55.21,1.12.64,1.55.94.64,1.55.64Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M20,11.37c.9,0,1.66-.32,2.3-.95s.95-1.4.95-2.3-.32-1.66-.95-2.3-1.4-.95-2.3-.95-1.66.32-2.3.95-.95,1.4-.95,2.3.32,1.66.95,2.3,1.4.95,2.3.95ZM18.45,6.58c.43-.43.95-.65,1.55-.65s1.12.22,1.55.65c.43.43.65.95.65,1.55s-.22,1.12-.65,1.55c-.43.43-.95.64-1.55.64s-1.12-.21-1.55-.64-.64-.95-.64-1.55.21-1.12.64-1.55Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M27.21,2.9c-.5-.5-1.15-.75-1.95-.75h-10.52c-.8,0-1.45.25-1.95.75-.5.5-.75,1.15-.75,1.95v10.52c0,.8.25,1.45.75,1.95.35.35.77.56,1.25.67.22.05.45.08.7.08h10.52c.2,0,.38-.02.56-.05.55-.09,1.01-.33,1.39-.71.5-.5.75-1.15.75-1.95V4.86c0-.8-.25-1.45-.75-1.95ZM25.93,16.74c-.26.14-.55.22-.86.22h-10.15s-.08-.01-.12-.01c-.25-.02-.5-.08-.74-.2-.28-.14-.45-.35-.5-.63.99-.7,2.03-1.22,3.12-1.57s2.19-.52,3.31-.52,2.27.18,3.4.55c1.13.36,2.18.88,3.16,1.54-.15.27-.36.48-.63.63ZM26.84,15.01c-1-.66-2.08-1.17-3.23-1.54-1.15-.37-2.36-.56-3.61-.56s-2.46.19-3.61.56-2.23.88-3.23,1.54V4.86c0-.44.15-.82.46-1.12s.68-.46,1.12-.46h10.52c.44,0,.82.15,1.12.46s.46.68.46,1.12v10.15Z\"\n />\n </svg>\n `\n","/* eslint-disable @stylistic/max-len */\nimport type {\n DappConfig,\n DappIcon,\n DappName,\n DappNavItem,\n DappNavMenuConfig,\n DappPackageManifestPayload,\n DappVersion,\n} from '@xyo-network/os-model'\nimport {\n DappConfigSchema,\n DappIconSchema,\n DappMode,\n DappNavItemSchema,\n DappNavMenuConfigSchema,\n} from '@xyo-network/os-model'\n\nimport dappManifest from './dapp.manifest.json' with { type: 'json' }\n\nexport const CustomDappName: DappName = 'Custom Dapp' as const\n\nconst version: DappVersion = '1.0.0'\n\nexport const CustomDappConfig: DappConfig = {\n manifest: dappManifest as unknown as DappPackageManifestPayload,\n modes: [DappMode.Window],\n name: CustomDappName,\n schema: DappConfigSchema,\n sources: ['network.xyo.dapp.accounts.source'],\n version,\n}\n\nexport const CustomDappIcon: DappIcon = {\n active: false,\n installed: 'installed',\n name: CustomDappName,\n schema: DappIconSchema,\n type: 'system',\n version,\n}\n\nexport const DappPayloads = [CustomDappConfig, CustomDappIcon]\n\nexport type CustomDappMenuItemPaths = 'home' | 'settings'\n\nconst CustomDappMenuItems: DappNavItem<CustomDappMenuItemPaths>[] = [\n {\n path: 'home',\n primaryText: 'Home',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n {\n path: 'settings',\n primaryText: 'Settings',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n]\n\nconst CustomDappMenuConfig: DappNavMenuConfig = {\n defaultPath: 'home',\n schema: DappNavMenuConfigSchema,\n}\n\nexport const CustomDappMenuPayloads = [...CustomDappMenuItems, CustomDappMenuConfig]\n","import { ErrorRender } from '@xylabs/react-error'\nimport { DappPathSwitcher, useAddDappMenuItems } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { CustomDappPathToComponent } from './CustomDappPathToComponent.tsx'\nimport { CustomDappMenuPayloads } from './Payloads.ts'\n\nexport const CustomDapp = () => {\n const {\n menuConfig, path, error,\n } = useAddDappMenuItems(CustomDappMenuPayloads)\n\n return (\n <>\n <ErrorRender error={error} scope=\"CustomDapp\" />\n <DappPathSwitcher activePath={path?.path ?? menuConfig?.defaultPath} pathToComponent={CustomDappPathToComponent} />\n </>\n )\n}\n","import { FlexRow } from '@xylabs/react-flexbox'\nimport type { PathToComponent } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nexport const CustomDappPathToComponent: PathToComponent[] = [\n {\n component: <FlexRow />,\n path: 'home',\n },\n]\n","import type { UnregisteredReactDapp } from '@xyo-network/os-react-model'\n\nimport { CustomDapp } from './Dapp.tsx'\nimport { CustomDappParams } from './Params.ts'\n\nexport const CustomDappUiParams: UnregisteredReactDapp['params'] = {\n ...CustomDappParams,\n modes: { window: { component: CustomDapp } },\n}\n\nexport default CustomDappUiParams\n"],"mappings":";;;;AAAA,SAASA,WAAAA,gBAAe;AAExB,SAASC,oBAAoB;AAC7B,OAAOC,YAAW;;;ACHlB,SAASC,kBAAkB;AAE3B,SACEC,aAAaC,wCAAwCC,4BAA4BC,wBAC5E;AACP,SAASC,uBAAuB;AAEhC,IAAMC,YAAY;EAChBC,QAAQ;EAAMC,WAAW;EAAOC,QAAQ;AAC1C;AAEO,IAAMC,yBAAyB,wBAACC,SAAAA;AACrC,QAAMC,OAAOC,iBAAAA;AAEb,QAAM,CAACC,eAAeC,eAAAA,IAAmBC,WAAW,YAAA;AAClD,QAAIJ,QAAQD,MAAM;AAChB,YAAMM,YAAY,IAAIC,gBAAgB;QACpCC,cAAc;UAACR,KAAKS,OAAOC;;QAC3BV;QACAW,YAAYC;QACZC,YAAYD;QACZX;MACF,CAAA;AACA,aAAO,MAAMK,UAAUQ,QAAO;IAChC;EACF,GAAG;IAACb;IAAMD;GAAK;AAEf,QAAM,EAAEe,YAAYC,QAAO,IAAKb,iBAAiB,CAAC;AAGlD,QAAMc,eAAeC,2BAA2BF,SAAShB,KAAKS,OAAOC,IAAI;AACzE,QAAMS,mBAAmBC,uCAAuCJ,OAAAA;AAEhE,QAAMK,WAAWC,YAAYN,SAAShB,KAAKS,OAAOC,IAAI;AAEtD,SAAO;IACLM;IACAK;IACA1B;IACAoB;IACAQ,QAAQ;MAACN;MAAcb;SAAoBe;MAAkBK,OAAOC,OAAAA;EACtE;AACF,GA/BsC;;;ACXtC,SAASC,kBAAkB;AAC3B,SAASC,eAAe;AACxB,SAASC,cAAAA,mBAAkB;A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;;;ADDK,IAAMC,aAAa,6BAAA;AACxB,QAAM,EACJC,YAAYC,MAAMC,MAAK,IACrBC,oBAAoBC,sBAAAA;AAExB,SACE,gBAAAC,OAAA,cAAAA,OAAA,UAAA,MACE,gBAAAA,OAAA,cAACC,aAAAA;IAAYJ;IAAcK,OAAM;MACjC,gBAAAF,OAAA,cAACG,kBAAAA;IAAiBC,YAAYR,MAAMA,QAAQD,YAAYU;IAAaC,iBAAiBC;;AAG5F,GAX0B;;;AEFnB,IAAMC,qBAAsD;EACjE,GAAGC;EACHC,OAAO;IAAEC,QAAQ;MAAEC,WAAWC;IAAW;EAAE;AAC7C;","names":["FlexCol","DappRendered","React","usePromise","useDappMenu","useManageDappInjectableParamsFromRoute","useManageDappPathFromRoute","useXyOsUiContext","DappInitializer","dappState","active","minimized","closed","useInitializeDappAdHoc","dapp","xyOs","useXyOsUiContext","installedDapp","nodeCreateError","usePromise","installer","DappInitializer","allowedNames","config","name","xnsNetwork","undefined","xnsNodeUrl","install","dappWallet","context","routingError","useManageDappPathFromRoute","injectableErrors","useManageDappInjectableParamsFromRoute","dappMenu","useDappMenu","errors","filter","Boolean","Typography","FlexCol","usePromise","Kernel","XyOsUiContextProvider","EventBus","XyOs","HDWallet","ModuleFactoryLocator","React","useMemo","XyOsHost","children","eventBus","kernel","locator","wallet","walletToUse","usePromise","HDWallet","random","eventBusToUse","useMemo","EventBus","kernelToUse","Kernel","locatorToUse","ModuleFactoryLocator","os","error","XyOs","boot","XyOsUiContextProvider","value","FlexCol","Typography","message","DappHostInner","dapp","context","dappMenu","dappState","dappWallet","errors","useInitializeDappAdHoc","React","FlexCol","DappRendered","dappMenuProperties","DappHost","XyOsHost","React","BrowserRouter","React","Route","Routes","DappRoutes","args","React","Routes","Route","path","element","DappHost","RoutableDapp","dapp","React","BrowserRouter","DappRoutes","DappHost","ModuleFactoryLocator","CustomDappIconSvg","locator","ModuleFactoryLocator","CustomDappParams","iconSvg","CustomDappIconSvg","DappConfigSchema","DappIconSchema","DappMode","DappNavItemSchema","DappNavMenuConfigSchema","CustomDappName","version","CustomDappConfig","manifest","dappManifest","modes","DappMode","Window","name","schema","DappConfigSchema","sources","CustomDappIcon","active","installed","DappIconSchema","type","DappPayloads","CustomDappMenuItems","path","primaryText","DappNavItemSchema","svgIcon","weight","CustomDappMenuConfig","defaultPath","DappNavMenuConfigSchema","CustomDappMenuPayloads","ErrorRender","DappPathSwitcher","useAddDappMenuItems","React","FlexRow","React","CustomDappPathToComponent","component","path","CustomDapp","menuConfig","path","error","useAddDappMenuItems","CustomDappMenuPayloads","React","ErrorRender","scope","DappPathSwitcher","activePath","defaultPath","pathToComponent","CustomDappPathToComponent","CustomDappUiParams","CustomDappParams","modes","window","component","CustomDapp"]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/host/DappHost.tsx", "../../src/helpers/registration/useInitializeDappAdHoc.tsx", "../../src/components/host/XyOsHost.tsx", "../../src/components/host/Routable.tsx", "../../src/components/host/Routes.tsx", "../../src/dapp.manifest.json", "../../src/Params.ts", "../../src/icon/Icon.tsx", "../../src/Payloads.ts", "../../src/Dapp.tsx", "../../src/CustomDappPathToComponent.tsx", "../../src/UiParams.ts"],
|
|
4
|
+
"sourcesContent": ["import { FlexCol } from '@xylabs/react-flexbox'\nimport type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport { DappRendered } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { useInitializeDappAdHoc } from '../../helpers/index.ts'\nimport { XyOsHost } from './XyOsHost.tsx'\n\nexport interface DappHostProps {\n dapp: RegisteredReactDapp\n}\n\nexport const DappHostInner: React.FC<DappHostProps> = ({ dapp }) => {\n const {\n context, dappMenu, dappState, dappWallet, errors,\n } = useInitializeDappAdHoc(dapp)\n\n return (\n <FlexCol>\n <DappRendered\n context={context}\n dapp={dapp}\n dappMenuProperties={dappMenu}\n dappState={dappState}\n dappWallet={dappWallet}\n errors={errors}\n />\n </FlexCol>\n )\n}\n\nexport const DappHost: React.FC<DappHostProps> = ({ dapp }) => (\n <XyOsHost>\n <DappHostInner dapp={dapp} />\n </XyOsHost>\n)\n", "import { usePromise } from '@xylabs/react-promise'\nimport type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport {\n useDappMenu, useManageDappInjectableParamsFromRoute, useManageDappPathFromRoute, useXyOsUiContext,\n} from '@xyo-network/os-react-runtime'\nimport { DappInitializer } from '@xyo-network/os-runtime'\n\nconst dappState = {\n active: true, minimized: false, closed: false,\n}\n\nexport const useInitializeDappAdHoc = (dapp: RegisteredReactDapp) => {\n const xyOs = useXyOsUiContext()\n\n const [installedDapp, nodeCreateError] = usePromise(async () => {\n if (xyOs && dapp) {\n const installer = new DappInitializer({\n allowedNames: [dapp.config.name],\n dapp,\n xnsNetwork: undefined,\n xnsNodeUrl: undefined,\n xyOs,\n })\n return await installer.install()\n }\n }, [xyOs, dapp])\n\n const { dappWallet, context } = installedDapp ?? {}\n\n // support for routing\n const routingError = useManageDappPathFromRoute(context, dapp.config.name)\n const injectableErrors = useManageDappInjectableParamsFromRoute(context)\n\n const dappMenu = useDappMenu(context, dapp.config.name)\n\n return {\n context,\n dappMenu,\n dappState,\n dappWallet,\n errors: [routingError, nodeCreateError, ...injectableErrors].filter(Boolean),\n }\n}\n", "import { Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { usePromise } from '@xylabs/react-promise'\nimport { Kernel } from '@xyo-network/kernel'\nimport type { KernelExternal } from '@xyo-network/kernel-model'\nimport { XyOsUiContextProvider } from '@xyo-network/os-react-runtime'\nimport { EventBus, XyOs } from '@xyo-network/os-runtime'\nimport { HDWallet, ModuleFactoryLocator } from '@xyo-network/sdk-js'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport React, { useMemo } from 'react'\n\nexport interface XyOsHostProps {\n children?: React.ReactNode\n eventBus?: EventBus\n kernel?: KernelExternal\n locator?: ModuleFactoryLocator\n wallet?: WalletInstance\n}\n\nexport const XyOsHost: React.FC<XyOsHostProps> = ({\n children, eventBus, kernel, locator, wallet,\n}) => {\n const [walletToUse] = usePromise(async () => wallet ?? await HDWallet.random(), [wallet])\n const eventBusToUse: EventBus = useMemo(() => eventBus ?? new EventBus(), [kernel])\n const kernelToUse: KernelExternal = useMemo(() => kernel ?? new Kernel(), [kernel])\n const locatorToUse = useMemo(() => locator ?? new ModuleFactoryLocator(), [locator])\n\n const [os, error] = usePromise(async () => {\n if (walletToUse && kernelToUse && eventBusToUse && locatorToUse) {\n const os = new XyOs({\n kernel: kernelToUse, eventBus: new EventBus(), locator: locatorToUse,\n })\n await os.boot(walletToUse, locatorToUse)\n return os\n }\n }, [kernelToUse, walletToUse, locator, eventBusToUse, locatorToUse])\n\n return os\n ? <XyOsUiContextProvider value={os}>{children}</XyOsUiContextProvider>\n : (\n <FlexCol>\n <Typography>\n wallet:\n {walletToUse ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n kernel:\n {kernelToUse ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n os:\n {os ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n os-error:\n {error?.message}\n </Typography>\n </FlexCol>\n )\n}\n", "import React from 'react'\nimport { BrowserRouter } from 'react-router-dom'\n\nimport type { DappHostProps } from './DappHost.tsx'\nimport { DappHost } from './DappHost.tsx'\nimport { DappRoutes } from './Routes.tsx'\n\nexport const RoutableDapp: React.FC<DappHostProps> = ({ dapp }) => {\n return (\n <BrowserRouter>\n <DappRoutes dapp={dapp} />\n <DappHost dapp={dapp} />\n </BrowserRouter>\n )\n}\n", "import React from 'react'\nimport { Route, Routes } from 'react-router-dom'\n\nimport { DappHost, type DappHostProps } from './DappHost.tsx'\n\nexport const DappRoutes: React.FC<DappHostProps> = args => (\n <Routes>\n <Route\n path=\"/\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"/:dappName\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"/:dappName/:path/*\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"*\"\n element={(\n <DappHost {...args} />\n )}\n />\n </Routes>\n)\n", "{\n \"$schema\": \"https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/compilations/dapp-package-manifest-schema.json\",\n \"nodes\": [\n {\n \"config\": {\n \"accountPath\": \"0'\",\n \"name\": \"CustomDappNode\",\n \"schema\": \"network.xyo.node.config\"\n },\n \"modules\": {\n \"private\": [],\n \"public\": [\n {\n \"config\": {\n \"accountPath\": \"1'\",\n \"name\": \"DappArchivist\",\n \"schema\": \"network.xyo.archivist.config\"\n }\n }\n ]\n }\n }\n ],\n \"schema\": \"network.xyo.manifest.package.dapp\"\n}", "import type { UnregisteredDapp } from '@xyo-network/os-model'\nimport { ModuleFactoryLocator } from '@xyo-network/sdk-js'\n\nimport { CustomDappIconSvg } from './icon/index.ts'\n\nconst locator = new ModuleFactoryLocator()\n\nexport const CustomDappParams: UnregisteredDapp['params'] = {\n iconSvg: CustomDappIconSvg,\n locator,\n}\n\nexport default CustomDappParams\n", "/* eslint-disable @stylistic/max-len */\nexport const CustomDappIconSvg = `\n<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\">\n <path\n fill=\"transparent\"\n d=\"M6.44,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M18.01,27.91c-.55.55-.83,1.22-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83s-1.44.28-2,.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M33.56,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M36.55,26.94c-.82-.82-1.82-1.23-3-1.23-.32,0-.63.04-.93.11-.3.07-.59.17-.87.31l-5.87-8.09c-.18.03-.36.05-.56.05h-1.13l6.42,8.83c-.39.4-.7.85-.93,1.36-.23.51-.35,1.06-.35,1.66,0,1.18.41,2.17,1.23,3s1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3-.41-2.17-1.23-3ZM35.55,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M19.29,25.73c-1,.16-1.84.64-2.52,1.42-.67.79-1.01,1.7-1.01,2.75,0,1.18.41,2.17,1.23,3,.82.82,1.82,1.23,3,1.23s2.17-.41,3-1.23c.82-.82,1.23-1.82,1.23-3,0-1.05-.34-1.97-1.01-2.74-.67-.78-1.51-1.25-2.52-1.43v-7.65h-1.41v7.65ZM22,27.91c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M14.1,18l-5.89,8.08c-.28-.13-.56-.22-.86-.28-.29-.06-.6-.09-.91-.09-1.18,0-2.17.41-3,1.23-.82.82-1.23,1.82-1.23,3s.41,2.17,1.23,3,1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3c0-.6-.12-1.15-.36-1.66s-.56-.96-.95-1.36l6.45-8.83h-1c-.25,0-.48-.03-.7-.08ZM8.44,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,12.91c1.26,0,2.46.19,3.61.56,1.15.37,2.23.88,3.23,1.54V4.86c0-.44-.15-.82-.46-1.12s-.68-.46-1.12-.46h-10.52c-.44,0-.82.15-1.12.46s-.46.68-.46,1.12v10.15c1-.66,2.08-1.17,3.23-1.54s2.36-.56,3.61-.56ZM17.7,5.83c.63-.63,1.4-.95,2.3-.95s1.66.32,2.3.95.95,1.4.95,2.3-.32,1.66-.95,2.3-1.4.95-2.3.95-1.66-.32-2.3-.95-.95-1.4-.95-2.3.32-1.66.95-2.3Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,10.32c.6,0,1.12-.21,1.55-.64.43-.43.65-.94.65-1.55s-.22-1.12-.65-1.55c-.43-.43-.95-.65-1.55-.65s-1.12.22-1.55.65-.64.95-.64,1.55.21,1.12.64,1.55.94.64,1.55.64Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M20,11.37c.9,0,1.66-.32,2.3-.95s.95-1.4.95-2.3-.32-1.66-.95-2.3-1.4-.95-2.3-.95-1.66.32-2.3.95-.95,1.4-.95,2.3.32,1.66.95,2.3,1.4.95,2.3.95ZM18.45,6.58c.43-.43.95-.65,1.55-.65s1.12.22,1.55.65c.43.43.65.95.65,1.55s-.22,1.12-.65,1.55c-.43.43-.95.64-1.55.64s-1.12-.21-1.55-.64-.64-.95-.64-1.55.21-1.12.64-1.55Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M27.21,2.9c-.5-.5-1.15-.75-1.95-.75h-10.52c-.8,0-1.45.25-1.95.75-.5.5-.75,1.15-.75,1.95v10.52c0,.8.25,1.45.75,1.95.35.35.77.56,1.25.67.22.05.45.08.7.08h10.52c.2,0,.38-.02.56-.05.55-.09,1.01-.33,1.39-.71.5-.5.75-1.15.75-1.95V4.86c0-.8-.25-1.45-.75-1.95ZM25.93,16.74c-.26.14-.55.22-.86.22h-10.15s-.08-.01-.12-.01c-.25-.02-.5-.08-.74-.2-.28-.14-.45-.35-.5-.63.99-.7,2.03-1.22,3.12-1.57s2.19-.52,3.31-.52,2.27.18,3.4.55c1.13.36,2.18.88,3.16,1.54-.15.27-.36.48-.63.63ZM26.84,15.01c-1-.66-2.08-1.17-3.23-1.54-1.15-.37-2.36-.56-3.61-.56s-2.46.19-3.61.56-2.23.88-3.23,1.54V4.86c0-.44.15-.82.46-1.12s.68-.46,1.12-.46h10.52c.44,0,.82.15,1.12.46s.46.68.46,1.12v10.15Z\"\n />\n </svg>\n `\n", "/* eslint-disable @stylistic/max-len */\nimport type {\n DappConfig,\n DappIcon,\n DappName,\n DappNavItem,\n DappNavMenuConfig,\n DappPackageManifestPayload,\n DappVersion,\n} from '@xyo-network/os-model'\nimport {\n DappConfigSchema,\n DappIconSchema,\n DappMode,\n DappNavItemSchema,\n DappNavMenuConfigSchema,\n} from '@xyo-network/os-model'\n\nimport dappManifest from './dapp.manifest.json' with { type: 'json' }\n\nexport const CustomDappName: DappName = 'Custom Dapp' as const\n\nconst version: DappVersion = '1.0.0'\n\nexport const CustomDappConfig: DappConfig = {\n manifest: dappManifest as unknown as DappPackageManifestPayload,\n modes: [DappMode.Window],\n name: CustomDappName,\n schema: DappConfigSchema,\n sources: ['network.xyo.dapp.accounts.source'],\n version,\n}\n\nexport const CustomDappIcon: DappIcon = {\n active: false,\n installed: 'installed',\n name: CustomDappName,\n schema: DappIconSchema,\n type: 'system',\n version,\n}\n\nexport const DappPayloads = [CustomDappConfig, CustomDappIcon]\n\nexport type CustomDappMenuItemPaths = 'home' | 'settings'\n\nconst CustomDappMenuItems: DappNavItem<CustomDappMenuItemPaths>[] = [\n {\n path: 'home',\n primaryText: 'Home',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n {\n path: 'settings',\n primaryText: 'Settings',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n]\n\nconst CustomDappMenuConfig: DappNavMenuConfig = {\n defaultPath: 'home',\n schema: DappNavMenuConfigSchema,\n}\n\nexport const CustomDappMenuPayloads = [...CustomDappMenuItems, CustomDappMenuConfig]\n", "import { ErrorRender } from '@xylabs/react-error'\nimport { DappPathSwitcher, useAddDappMenuItems } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { CustomDappPathToComponent } from './CustomDappPathToComponent.tsx'\nimport { CustomDappMenuPayloads } from './Payloads.ts'\n\nexport const CustomDapp = () => {\n const {\n menuConfig, path, error,\n } = useAddDappMenuItems(CustomDappMenuPayloads)\n\n return (\n <>\n <ErrorRender error={error} scope=\"CustomDapp\" />\n <DappPathSwitcher activePath={path?.path ?? menuConfig?.defaultPath} pathToComponent={CustomDappPathToComponent} />\n </>\n )\n}\n", "import { FlexRow } from '@xylabs/react-flexbox'\nimport type { PathToComponent } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nexport const CustomDappPathToComponent: PathToComponent[] = [\n {\n component: <FlexRow />,\n path: 'home',\n },\n]\n", "import type { UnregisteredReactDapp } from '@xyo-network/os-react-model'\n\nimport { CustomDapp } from './Dapp.tsx'\nimport { CustomDappParams } from './Params.ts'\n\nexport const CustomDappUiParams: UnregisteredReactDapp['params'] = {\n ...CustomDappParams,\n modes: { window: { component: CustomDapp } },\n}\n\nexport default CustomDappUiParams\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAAA,gBAAe;AAExB,SAAS,oBAAoB;;;ACF7B,SAAS,kBAAkB;AAE3B;AAAA,EACE;AAAA,EAAa;AAAA,EAAwC;AAAA,EAA4B;AAAA,OAC5E;AACP,SAAS,uBAAuB;AAEhC,IAAM,YAAY;AAAA,EAChB,QAAQ;AAAA,EAAM,WAAW;AAAA,EAAO,QAAQ;AAC1C;AAEO,IAAM,yBAAyB,CAAC,SAA8B;AACnE,QAAM,OAAO,iBAAiB;AAE9B,QAAM,CAAC,eAAe,eAAe,IAAI,WAAW,YAAY;AAC9D,QAAI,QAAQ,MAAM;AAChB,YAAM,YAAY,IAAI,gBAAgB;AAAA,QACpC,cAAc,CAAC,KAAK,OAAO,IAAI;AAAA,QAC/B;AAAA,QACA,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ;AAAA,MACF,CAAC;AACD,aAAO,MAAM,UAAU,QAAQ;AAAA,IACjC;AAAA,EACF,GAAG,CAAC,MAAM,IAAI,CAAC;AAEf,QAAM,EAAE,YAAY,QAAQ,IAAI,iBAAiB,CAAC;AAGlD,QAAM,eAAe,2BAA2B,SAAS,KAAK,OAAO,IAAI;AACzE,QAAM,mBAAmB,uCAAuC,OAAO;AAEvE,QAAM,WAAW,YAAY,SAAS,KAAK,OAAO,IAAI;AAEtD,SAAO;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|
6
|
+
"names": ["FlexCol", "usePromise", "locator", "os", "jsx", "dappState", "FlexCol", "jsx", "jsxs", "jsx", "jsxs", "ModuleFactoryLocator", "ModuleFactoryLocator", "jsx", "jsx", "jsxs"]
|
|
7
|
+
}
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,28 +1,27 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// src/components/host/DappHost.tsx
|
|
5
2
|
import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
|
|
6
3
|
import { DappRendered } from "@xyo-network/os-react-runtime";
|
|
7
|
-
import React2 from "react";
|
|
8
4
|
|
|
9
5
|
// src/helpers/registration/useInitializeDappAdHoc.tsx
|
|
10
6
|
import { usePromise } from "@xylabs/react-promise";
|
|
11
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
useDappMenu,
|
|
9
|
+
useManageDappInjectableParamsFromRoute,
|
|
10
|
+
useManageDappPathFromRoute,
|
|
11
|
+
useXyOsUiContext
|
|
12
|
+
} from "@xyo-network/os-react-runtime";
|
|
12
13
|
import { DappInitializer } from "@xyo-network/os-runtime";
|
|
13
14
|
var dappState = {
|
|
14
15
|
active: true,
|
|
15
16
|
minimized: false,
|
|
16
17
|
closed: false
|
|
17
18
|
};
|
|
18
|
-
var useInitializeDappAdHoc =
|
|
19
|
+
var useInitializeDappAdHoc = (dapp) => {
|
|
19
20
|
const xyOs = useXyOsUiContext();
|
|
20
21
|
const [installedDapp, nodeCreateError] = usePromise(async () => {
|
|
21
22
|
if (xyOs && dapp) {
|
|
22
23
|
const installer = new DappInitializer({
|
|
23
|
-
allowedNames: [
|
|
24
|
-
dapp.config.name
|
|
25
|
-
],
|
|
24
|
+
allowedNames: [dapp.config.name],
|
|
26
25
|
dapp,
|
|
27
26
|
xnsNetwork: void 0,
|
|
28
27
|
xnsNodeUrl: void 0,
|
|
@@ -30,10 +29,7 @@ var useInitializeDappAdHoc = /* @__PURE__ */ __name((dapp) => {
|
|
|
30
29
|
});
|
|
31
30
|
return await installer.install();
|
|
32
31
|
}
|
|
33
|
-
}, [
|
|
34
|
-
xyOs,
|
|
35
|
-
dapp
|
|
36
|
-
]);
|
|
32
|
+
}, [xyOs, dapp]);
|
|
37
33
|
const { dappWallet, context } = installedDapp ?? {};
|
|
38
34
|
const routingError = useManageDappPathFromRoute(context, dapp.config.name);
|
|
39
35
|
const injectableErrors = useManageDappInjectableParamsFromRoute(context);
|
|
@@ -43,13 +39,9 @@ var useInitializeDappAdHoc = /* @__PURE__ */ __name((dapp) => {
|
|
|
43
39
|
dappMenu,
|
|
44
40
|
dappState,
|
|
45
41
|
dappWallet,
|
|
46
|
-
errors: [
|
|
47
|
-
routingError,
|
|
48
|
-
nodeCreateError,
|
|
49
|
-
...injectableErrors
|
|
50
|
-
].filter(Boolean)
|
|
42
|
+
errors: [routingError, nodeCreateError, ...injectableErrors].filter(Boolean)
|
|
51
43
|
};
|
|
52
|
-
}
|
|
44
|
+
};
|
|
53
45
|
|
|
54
46
|
// src/components/host/XyOsHost.tsx
|
|
55
47
|
import { Typography } from "@mui/material";
|
|
@@ -59,20 +51,19 @@ import { Kernel } from "@xyo-network/kernel";
|
|
|
59
51
|
import { XyOsUiContextProvider } from "@xyo-network/os-react-runtime";
|
|
60
52
|
import { EventBus, XyOs } from "@xyo-network/os-runtime";
|
|
61
53
|
import { HDWallet, ModuleFactoryLocator } from "@xyo-network/sdk-js";
|
|
62
|
-
import
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
]);
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
]);
|
|
54
|
+
import { useMemo } from "react";
|
|
55
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
56
|
+
var XyOsHost = ({
|
|
57
|
+
children,
|
|
58
|
+
eventBus,
|
|
59
|
+
kernel,
|
|
60
|
+
locator: locator2,
|
|
61
|
+
wallet
|
|
62
|
+
}) => {
|
|
63
|
+
const [walletToUse] = usePromise2(async () => wallet ?? await HDWallet.random(), [wallet]);
|
|
64
|
+
const eventBusToUse = useMemo(() => eventBus ?? new EventBus(), [kernel]);
|
|
65
|
+
const kernelToUse = useMemo(() => kernel ?? new Kernel(), [kernel]);
|
|
66
|
+
const locatorToUse = useMemo(() => locator2 ?? new ModuleFactoryLocator(), [locator2]);
|
|
76
67
|
const [os, error] = usePromise2(async () => {
|
|
77
68
|
if (walletToUse && kernelToUse && eventBusToUse && locatorToUse) {
|
|
78
69
|
const os2 = new XyOs({
|
|
@@ -83,63 +74,96 @@ var XyOsHost = /* @__PURE__ */ __name(({ children, eventBus, kernel, locator: lo
|
|
|
83
74
|
await os2.boot(walletToUse, locatorToUse);
|
|
84
75
|
return os2;
|
|
85
76
|
}
|
|
86
|
-
}, [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
77
|
+
}, [kernelToUse, walletToUse, locator2, eventBusToUse, locatorToUse]);
|
|
78
|
+
return os ? /* @__PURE__ */ jsx(XyOsUiContextProvider, { value: os, children }) : /* @__PURE__ */ jsxs(FlexCol, { children: [
|
|
79
|
+
/* @__PURE__ */ jsxs(Typography, { children: [
|
|
80
|
+
"wallet:",
|
|
81
|
+
walletToUse ? "ready" : "loading"
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ jsxs(Typography, { children: [
|
|
84
|
+
"kernel:",
|
|
85
|
+
kernelToUse ? "ready" : "loading"
|
|
86
|
+
] }),
|
|
87
|
+
/* @__PURE__ */ jsxs(Typography, { children: [
|
|
88
|
+
"os:",
|
|
89
|
+
os ? "ready" : "loading"
|
|
90
|
+
] }),
|
|
91
|
+
/* @__PURE__ */ jsxs(Typography, { children: [
|
|
92
|
+
"os-error:",
|
|
93
|
+
error?.message
|
|
94
|
+
] })
|
|
95
|
+
] });
|
|
96
|
+
};
|
|
97
97
|
|
|
98
98
|
// src/components/host/DappHost.tsx
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
100
|
+
var DappHostInner = ({ dapp }) => {
|
|
101
|
+
const {
|
|
102
102
|
context,
|
|
103
|
-
|
|
104
|
-
dappMenuProperties: dappMenu,
|
|
103
|
+
dappMenu,
|
|
105
104
|
dappState: dappState2,
|
|
106
105
|
dappWallet,
|
|
107
106
|
errors
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
} = useInitializeDappAdHoc(dapp);
|
|
108
|
+
return /* @__PURE__ */ jsx2(FlexCol2, { children: /* @__PURE__ */ jsx2(
|
|
109
|
+
DappRendered,
|
|
110
|
+
{
|
|
111
|
+
context,
|
|
112
|
+
dapp,
|
|
113
|
+
dappMenuProperties: dappMenu,
|
|
114
|
+
dappState: dappState2,
|
|
115
|
+
dappWallet,
|
|
116
|
+
errors
|
|
117
|
+
}
|
|
118
|
+
) });
|
|
119
|
+
};
|
|
120
|
+
var DappHost = ({ dapp }) => /* @__PURE__ */ jsx2(XyOsHost, { children: /* @__PURE__ */ jsx2(DappHostInner, { dapp }) });
|
|
113
121
|
|
|
114
122
|
// src/components/host/Routable.tsx
|
|
115
|
-
import React4 from "react";
|
|
116
123
|
import { BrowserRouter } from "react-router-dom";
|
|
117
124
|
|
|
118
125
|
// src/components/host/Routes.tsx
|
|
119
|
-
import React3 from "react";
|
|
120
126
|
import { Route, Routes } from "react-router-dom";
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
128
|
+
var DappRoutes = (args) => /* @__PURE__ */ jsxs2(Routes, { children: [
|
|
129
|
+
/* @__PURE__ */ jsx3(
|
|
130
|
+
Route,
|
|
131
|
+
{
|
|
132
|
+
path: "/",
|
|
133
|
+
element: /* @__PURE__ */ jsx3(DappHost, { ...args })
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ jsx3(
|
|
137
|
+
Route,
|
|
138
|
+
{
|
|
139
|
+
path: "/:dappName",
|
|
140
|
+
element: /* @__PURE__ */ jsx3(DappHost, { ...args })
|
|
141
|
+
}
|
|
142
|
+
),
|
|
143
|
+
/* @__PURE__ */ jsx3(
|
|
144
|
+
Route,
|
|
145
|
+
{
|
|
146
|
+
path: "/:dappName/:path/*",
|
|
147
|
+
element: /* @__PURE__ */ jsx3(DappHost, { ...args })
|
|
148
|
+
}
|
|
149
|
+
),
|
|
150
|
+
/* @__PURE__ */ jsx3(
|
|
151
|
+
Route,
|
|
152
|
+
{
|
|
153
|
+
path: "*",
|
|
154
|
+
element: /* @__PURE__ */ jsx3(DappHost, { ...args })
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
] });
|
|
134
158
|
|
|
135
159
|
// src/components/host/Routable.tsx
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
dapp
|
|
141
|
-
})
|
|
142
|
-
}
|
|
160
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
161
|
+
var RoutableDapp = ({ dapp }) => {
|
|
162
|
+
return /* @__PURE__ */ jsxs3(BrowserRouter, { children: [
|
|
163
|
+
/* @__PURE__ */ jsx4(DappRoutes, { dapp }),
|
|
164
|
+
/* @__PURE__ */ jsx4(DappHost, { dapp })
|
|
165
|
+
] });
|
|
166
|
+
};
|
|
143
167
|
|
|
144
168
|
// src/dapp.manifest.json
|
|
145
169
|
var dapp_manifest_default = {
|
|
@@ -225,19 +249,21 @@ var CustomDappParams = {
|
|
|
225
249
|
};
|
|
226
250
|
|
|
227
251
|
// src/Payloads.ts
|
|
228
|
-
import {
|
|
252
|
+
import {
|
|
253
|
+
DappConfigSchema,
|
|
254
|
+
DappIconSchema,
|
|
255
|
+
DappMode,
|
|
256
|
+
DappNavItemSchema,
|
|
257
|
+
DappNavMenuConfigSchema
|
|
258
|
+
} from "@xyo-network/os-model";
|
|
229
259
|
var CustomDappName = "Custom Dapp";
|
|
230
260
|
var version = "1.0.0";
|
|
231
261
|
var CustomDappConfig = {
|
|
232
262
|
manifest: dapp_manifest_default,
|
|
233
|
-
modes: [
|
|
234
|
-
DappMode.Window
|
|
235
|
-
],
|
|
263
|
+
modes: [DappMode.Window],
|
|
236
264
|
name: CustomDappName,
|
|
237
265
|
schema: DappConfigSchema,
|
|
238
|
-
sources: [
|
|
239
|
-
"network.xyo.dapp.accounts.source"
|
|
240
|
-
],
|
|
266
|
+
sources: ["network.xyo.dapp.accounts.source"],
|
|
241
267
|
version
|
|
242
268
|
};
|
|
243
269
|
var CustomDappIcon = {
|
|
@@ -248,10 +274,7 @@ var CustomDappIcon = {
|
|
|
248
274
|
type: "system",
|
|
249
275
|
version
|
|
250
276
|
};
|
|
251
|
-
var DappPayloads = [
|
|
252
|
-
CustomDappConfig,
|
|
253
|
-
CustomDappIcon
|
|
254
|
-
];
|
|
277
|
+
var DappPayloads = [CustomDappConfig, CustomDappIcon];
|
|
255
278
|
var CustomDappMenuItems = [
|
|
256
279
|
{
|
|
257
280
|
path: "home",
|
|
@@ -276,46 +299,40 @@ var CustomDappMenuConfig = {
|
|
|
276
299
|
defaultPath: "home",
|
|
277
300
|
schema: DappNavMenuConfigSchema
|
|
278
301
|
};
|
|
279
|
-
var CustomDappMenuPayloads = [
|
|
280
|
-
...CustomDappMenuItems,
|
|
281
|
-
CustomDappMenuConfig
|
|
282
|
-
];
|
|
302
|
+
var CustomDappMenuPayloads = [...CustomDappMenuItems, CustomDappMenuConfig];
|
|
283
303
|
|
|
284
304
|
// src/Dapp.tsx
|
|
285
305
|
import { ErrorRender } from "@xylabs/react-error";
|
|
286
306
|
import { DappPathSwitcher, useAddDappMenuItems } from "@xyo-network/os-react-runtime";
|
|
287
|
-
import React6 from "react";
|
|
288
307
|
|
|
289
308
|
// src/CustomDappPathToComponent.tsx
|
|
290
309
|
import { FlexRow } from "@xylabs/react-flexbox";
|
|
291
|
-
import
|
|
310
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
292
311
|
var CustomDappPathToComponent = [
|
|
293
312
|
{
|
|
294
|
-
component: /* @__PURE__ */
|
|
313
|
+
component: /* @__PURE__ */ jsx5(FlexRow, {}),
|
|
295
314
|
path: "home"
|
|
296
315
|
}
|
|
297
316
|
];
|
|
298
317
|
|
|
299
318
|
// src/Dapp.tsx
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
319
|
+
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
320
|
+
var CustomDapp = () => {
|
|
321
|
+
const {
|
|
322
|
+
menuConfig,
|
|
323
|
+
path,
|
|
324
|
+
error
|
|
325
|
+
} = useAddDappMenuItems(CustomDappMenuPayloads);
|
|
326
|
+
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
327
|
+
/* @__PURE__ */ jsx6(ErrorRender, { error, scope: "CustomDapp" }),
|
|
328
|
+
/* @__PURE__ */ jsx6(DappPathSwitcher, { activePath: path?.path ?? menuConfig?.defaultPath, pathToComponent: CustomDappPathToComponent })
|
|
329
|
+
] });
|
|
330
|
+
};
|
|
310
331
|
|
|
311
332
|
// src/UiParams.ts
|
|
312
333
|
var CustomDappUiParams = {
|
|
313
334
|
...CustomDappParams,
|
|
314
|
-
modes: {
|
|
315
|
-
window: {
|
|
316
|
-
component: CustomDapp
|
|
317
|
-
}
|
|
318
|
-
}
|
|
335
|
+
modes: { window: { component: CustomDapp } }
|
|
319
336
|
};
|
|
320
337
|
export {
|
|
321
338
|
CustomDappConfig,
|
|
@@ -333,4 +350,4 @@ export {
|
|
|
333
350
|
dapp_manifest_default as accountsDappManifest,
|
|
334
351
|
useInitializeDappAdHoc
|
|
335
352
|
};
|
|
336
|
-
//# sourceMappingURL=index.mjs.map
|
|
353
|
+
//# sourceMappingURL=index.mjs.map
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/host/DappHost.tsx","../../src/helpers/registration/useInitializeDappAdHoc.tsx","../../src/components/host/XyOsHost.tsx","../../src/components/host/Routable.tsx","../../src/components/host/Routes.tsx","../../src/dapp.manifest.json","../../src/Params.ts","../../src/icon/Icon.tsx","../../src/Payloads.ts","../../src/Dapp.tsx","../../src/CustomDappPathToComponent.tsx","../../src/UiParams.ts"],"sourcesContent":["import { FlexCol } from '@xylabs/react-flexbox'\nimport type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport { DappRendered } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { useInitializeDappAdHoc } from '../../helpers/index.ts'\nimport { XyOsHost } from './XyOsHost.tsx'\n\nexport interface DappHostProps {\n dapp: RegisteredReactDapp\n}\n\nexport const DappHostInner: React.FC<DappHostProps> = ({ dapp }) => {\n const {\n context, dappMenu, dappState, dappWallet, errors,\n } = useInitializeDappAdHoc(dapp)\n\n return (\n <FlexCol>\n <DappRendered\n context={context}\n dapp={dapp}\n dappMenuProperties={dappMenu}\n dappState={dappState}\n dappWallet={dappWallet}\n errors={errors}\n />\n </FlexCol>\n )\n}\n\nexport const DappHost: React.FC<DappHostProps> = ({ dapp }) => (\n <XyOsHost>\n <DappHostInner dapp={dapp} />\n </XyOsHost>\n)\n","import { usePromise } from '@xylabs/react-promise'\nimport type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport {\n useDappMenu, useManageDappInjectableParamsFromRoute, useManageDappPathFromRoute, useXyOsUiContext,\n} from '@xyo-network/os-react-runtime'\nimport { DappInitializer } from '@xyo-network/os-runtime'\n\nconst dappState = {\n active: true, minimized: false, closed: false,\n}\n\nexport const useInitializeDappAdHoc = (dapp: RegisteredReactDapp) => {\n const xyOs = useXyOsUiContext()\n\n const [installedDapp, nodeCreateError] = usePromise(async () => {\n if (xyOs && dapp) {\n const installer = new DappInitializer({\n allowedNames: [dapp.config.name],\n dapp,\n xnsNetwork: undefined,\n xnsNodeUrl: undefined,\n xyOs,\n })\n return await installer.install()\n }\n }, [xyOs, dapp])\n\n const { dappWallet, context } = installedDapp ?? {}\n\n // support for routing\n const routingError = useManageDappPathFromRoute(context, dapp.config.name)\n const injectableErrors = useManageDappInjectableParamsFromRoute(context)\n\n const dappMenu = useDappMenu(context, dapp.config.name)\n\n return {\n context,\n dappMenu,\n dappState,\n dappWallet,\n errors: [routingError, nodeCreateError, ...injectableErrors].filter(Boolean),\n }\n}\n","import { Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { usePromise } from '@xylabs/react-promise'\nimport { Kernel } from '@xyo-network/kernel'\nimport type { KernelExternal } from '@xyo-network/kernel-model'\nimport { XyOsUiContextProvider } from '@xyo-network/os-react-runtime'\nimport { EventBus, XyOs } from '@xyo-network/os-runtime'\nimport { HDWallet, ModuleFactoryLocator } from '@xyo-network/sdk-js'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport React, { useMemo } from 'react'\n\nexport interface XyOsHostProps {\n children?: React.ReactNode\n eventBus?: EventBus\n kernel?: KernelExternal\n locator?: ModuleFactoryLocator\n wallet?: WalletInstance\n}\n\nexport const XyOsHost: React.FC<XyOsHostProps> = ({\n children, eventBus, kernel, locator, wallet,\n}) => {\n const [walletToUse] = usePromise(async () => wallet ?? await HDWallet.random(), [wallet])\n const eventBusToUse: EventBus = useMemo(() => eventBus ?? new EventBus(), [kernel])\n const kernelToUse: KernelExternal = useMemo(() => kernel ?? new Kernel(), [kernel])\n const locatorToUse = useMemo(() => locator ?? new ModuleFactoryLocator(), [locator])\n\n const [os, error] = usePromise(async () => {\n if (walletToUse && kernelToUse && eventBusToUse && locatorToUse) {\n const os = new XyOs({\n kernel: kernelToUse, eventBus: new EventBus(), locator: locatorToUse,\n })\n await os.boot(walletToUse, locatorToUse)\n return os\n }\n }, [kernelToUse, walletToUse, locator, eventBusToUse, locatorToUse])\n\n return os\n ? <XyOsUiContextProvider value={os}>{children}</XyOsUiContextProvider>\n : (\n <FlexCol>\n <Typography>\n wallet:\n {walletToUse ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n kernel:\n {kernelToUse ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n os:\n {os ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n os-error:\n {error?.message}\n </Typography>\n </FlexCol>\n )\n}\n","import React from 'react'\nimport { BrowserRouter } from 'react-router-dom'\n\nimport type { DappHostProps } from './DappHost.tsx'\nimport { DappHost } from './DappHost.tsx'\nimport { DappRoutes } from './Routes.tsx'\n\nexport const RoutableDapp: React.FC<DappHostProps> = ({ dapp }) => {\n return (\n <BrowserRouter>\n <DappRoutes dapp={dapp} />\n <DappHost dapp={dapp} />\n </BrowserRouter>\n )\n}\n","import React from 'react'\nimport { Route, Routes } from 'react-router-dom'\n\nimport { DappHost, type DappHostProps } from './DappHost.tsx'\n\nexport const DappRoutes: React.FC<DappHostProps> = args => (\n <Routes>\n <Route\n path=\"/\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"/:dappName\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"/:dappName/:path/*\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"*\"\n element={(\n <DappHost {...args} />\n )}\n />\n </Routes>\n)\n","{\n \"$schema\": \"https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/compilations/dapp-package-manifest-schema.json\",\n \"nodes\": [\n {\n \"config\": {\n \"accountPath\": \"0'\",\n \"name\": \"CustomDappNode\",\n \"schema\": \"network.xyo.node.config\"\n },\n \"modules\": {\n \"private\": [],\n \"public\": [\n {\n \"config\": {\n \"accountPath\": \"1'\",\n \"name\": \"DappArchivist\",\n \"schema\": \"network.xyo.archivist.config\"\n }\n }\n ]\n }\n }\n ],\n \"schema\": \"network.xyo.manifest.package.dapp\"\n}","import type { UnregisteredDapp } from '@xyo-network/os-model'\nimport { ModuleFactoryLocator } from '@xyo-network/sdk-js'\n\nimport { CustomDappIconSvg } from './icon/index.ts'\n\nconst locator = new ModuleFactoryLocator()\n\nexport const CustomDappParams: UnregisteredDapp['params'] = {\n iconSvg: CustomDappIconSvg,\n locator,\n}\n\nexport default CustomDappParams\n","/* eslint-disable @stylistic/max-len */\nexport const CustomDappIconSvg = `\n<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\">\n <path\n fill=\"transparent\"\n d=\"M6.44,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M18.01,27.91c-.55.55-.83,1.22-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83s-1.44.28-2,.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M33.56,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M36.55,26.94c-.82-.82-1.82-1.23-3-1.23-.32,0-.63.04-.93.11-.3.07-.59.17-.87.31l-5.87-8.09c-.18.03-.36.05-.56.05h-1.13l6.42,8.83c-.39.4-.7.85-.93,1.36-.23.51-.35,1.06-.35,1.66,0,1.18.41,2.17,1.23,3s1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3-.41-2.17-1.23-3ZM35.55,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M19.29,25.73c-1,.16-1.84.64-2.52,1.42-.67.79-1.01,1.7-1.01,2.75,0,1.18.41,2.17,1.23,3,.82.82,1.82,1.23,3,1.23s2.17-.41,3-1.23c.82-.82,1.23-1.82,1.23-3,0-1.05-.34-1.97-1.01-2.74-.67-.78-1.51-1.25-2.52-1.43v-7.65h-1.41v7.65ZM22,27.91c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M14.1,18l-5.89,8.08c-.28-.13-.56-.22-.86-.28-.29-.06-.6-.09-.91-.09-1.18,0-2.17.41-3,1.23-.82.82-1.23,1.82-1.23,3s.41,2.17,1.23,3,1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3c0-.6-.12-1.15-.36-1.66s-.56-.96-.95-1.36l6.45-8.83h-1c-.25,0-.48-.03-.7-.08ZM8.44,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,12.91c1.26,0,2.46.19,3.61.56,1.15.37,2.23.88,3.23,1.54V4.86c0-.44-.15-.82-.46-1.12s-.68-.46-1.12-.46h-10.52c-.44,0-.82.15-1.12.46s-.46.68-.46,1.12v10.15c1-.66,2.08-1.17,3.23-1.54s2.36-.56,3.61-.56ZM17.7,5.83c.63-.63,1.4-.95,2.3-.95s1.66.32,2.3.95.95,1.4.95,2.3-.32,1.66-.95,2.3-1.4.95-2.3.95-1.66-.32-2.3-.95-.95-1.4-.95-2.3.32-1.66.95-2.3Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,10.32c.6,0,1.12-.21,1.55-.64.43-.43.65-.94.65-1.55s-.22-1.12-.65-1.55c-.43-.43-.95-.65-1.55-.65s-1.12.22-1.55.65-.64.95-.64,1.55.21,1.12.64,1.55.94.64,1.55.64Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M20,11.37c.9,0,1.66-.32,2.3-.95s.95-1.4.95-2.3-.32-1.66-.95-2.3-1.4-.95-2.3-.95-1.66.32-2.3.95-.95,1.4-.95,2.3.32,1.66.95,2.3,1.4.95,2.3.95ZM18.45,6.58c.43-.43.95-.65,1.55-.65s1.12.22,1.55.65c.43.43.65.95.65,1.55s-.22,1.12-.65,1.55c-.43.43-.95.64-1.55.64s-1.12-.21-1.55-.64-.64-.95-.64-1.55.21-1.12.64-1.55Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M27.21,2.9c-.5-.5-1.15-.75-1.95-.75h-10.52c-.8,0-1.45.25-1.95.75-.5.5-.75,1.15-.75,1.95v10.52c0,.8.25,1.45.75,1.95.35.35.77.56,1.25.67.22.05.45.08.7.08h10.52c.2,0,.38-.02.56-.05.55-.09,1.01-.33,1.39-.71.5-.5.75-1.15.75-1.95V4.86c0-.8-.25-1.45-.75-1.95ZM25.93,16.74c-.26.14-.55.22-.86.22h-10.15s-.08-.01-.12-.01c-.25-.02-.5-.08-.74-.2-.28-.14-.45-.35-.5-.63.99-.7,2.03-1.22,3.12-1.57s2.19-.52,3.31-.52,2.27.18,3.4.55c1.13.36,2.18.88,3.16,1.54-.15.27-.36.48-.63.63ZM26.84,15.01c-1-.66-2.08-1.17-3.23-1.54-1.15-.37-2.36-.56-3.61-.56s-2.46.19-3.61.56-2.23.88-3.23,1.54V4.86c0-.44.15-.82.46-1.12s.68-.46,1.12-.46h10.52c.44,0,.82.15,1.12.46s.46.68.46,1.12v10.15Z\"\n />\n </svg>\n `\n","/* eslint-disable @stylistic/max-len */\nimport type {\n DappConfig,\n DappIcon,\n DappName,\n DappNavItem,\n DappNavMenuConfig,\n DappPackageManifestPayload,\n DappVersion,\n} from '@xyo-network/os-model'\nimport {\n DappConfigSchema,\n DappIconSchema,\n DappMode,\n DappNavItemSchema,\n DappNavMenuConfigSchema,\n} from '@xyo-network/os-model'\n\nimport dappManifest from './dapp.manifest.json' with { type: 'json' }\n\nexport const CustomDappName: DappName = 'Custom Dapp' as const\n\nconst version: DappVersion = '1.0.0'\n\nexport const CustomDappConfig: DappConfig = {\n manifest: dappManifest as unknown as DappPackageManifestPayload,\n modes: [DappMode.Window],\n name: CustomDappName,\n schema: DappConfigSchema,\n sources: ['network.xyo.dapp.accounts.source'],\n version,\n}\n\nexport const CustomDappIcon: DappIcon = {\n active: false,\n installed: 'installed',\n name: CustomDappName,\n schema: DappIconSchema,\n type: 'system',\n version,\n}\n\nexport const DappPayloads = [CustomDappConfig, CustomDappIcon]\n\nexport type CustomDappMenuItemPaths = 'home' | 'settings'\n\nconst CustomDappMenuItems: DappNavItem<CustomDappMenuItemPaths>[] = [\n {\n path: 'home',\n primaryText: 'Home',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n {\n path: 'settings',\n primaryText: 'Settings',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n]\n\nconst CustomDappMenuConfig: DappNavMenuConfig = {\n defaultPath: 'home',\n schema: DappNavMenuConfigSchema,\n}\n\nexport const CustomDappMenuPayloads = [...CustomDappMenuItems, CustomDappMenuConfig]\n","import { ErrorRender } from '@xylabs/react-error'\nimport { DappPathSwitcher, useAddDappMenuItems } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { CustomDappPathToComponent } from './CustomDappPathToComponent.tsx'\nimport { CustomDappMenuPayloads } from './Payloads.ts'\n\nexport const CustomDapp = () => {\n const {\n menuConfig, path, error,\n } = useAddDappMenuItems(CustomDappMenuPayloads)\n\n return (\n <>\n <ErrorRender error={error} scope=\"CustomDapp\" />\n <DappPathSwitcher activePath={path?.path ?? menuConfig?.defaultPath} pathToComponent={CustomDappPathToComponent} />\n </>\n )\n}\n","import { FlexRow } from '@xylabs/react-flexbox'\nimport type { PathToComponent } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nexport const CustomDappPathToComponent: PathToComponent[] = [\n {\n component: <FlexRow />,\n path: 'home',\n },\n]\n","import type { UnregisteredReactDapp } from '@xyo-network/os-react-model'\n\nimport { CustomDapp } from './Dapp.tsx'\nimport { CustomDappParams } from './Params.ts'\n\nexport const CustomDappUiParams: UnregisteredReactDapp['params'] = {\n ...CustomDappParams,\n modes: { window: { component: CustomDapp } },\n}\n\nexport default CustomDappUiParams\n"],"mappings":";;;;AAAA,SAASA,WAAAA,gBAAe;AAExB,SAASC,oBAAoB;AAC7B,OAAOC,YAAW;;;ACHlB,SAASC,kBAAkB;AAE3B,SACEC,aAAaC,wCAAwCC,4BAA4BC,wBAC5E;AACP,SAASC,uBAAuB;AAEhC,IAAMC,YAAY;EAChBC,QAAQ;EAAMC,WAAW;EAAOC,QAAQ;AAC1C;AAEO,IAAMC,yBAAyB,wBAACC,SAAAA;AACrC,QAAMC,OAAOC,iBAAAA;AAEb,QAAM,CAACC,eAAeC,eAAAA,IAAmBC,WAAW,YAAA;AAClD,QAAIJ,QAAQD,MAAM;AAChB,YAAMM,YAAY,IAAIC,gBAAgB;QACpCC,cAAc;UAACR,KAAKS,OAAOC;;QAC3BV;QACAW,YAAYC;QACZC,YAAYD;QACZX;MACF,CAAA;AACA,aAAO,MAAMK,UAAUQ,QAAO;IAChC;EACF,GAAG;IAACb;IAAMD;GAAK;AAEf,QAAM,EAAEe,YAAYC,QAAO,IAAKb,iBAAiB,CAAC;AAGlD,QAAMc,eAAeC,2BAA2BF,SAAShB,KAAKS,OAAOC,IAAI;AACzE,QAAMS,mBAAmBC,uCAAuCJ,OAAAA;AAEhE,QAAMK,WAAWC,YAAYN,SAAShB,KAAKS,OAAOC,IAAI;AAEtD,SAAO;IACLM;IACAK;IACA1B;IACAoB;IACAQ,QAAQ;MAACN;MAAcb;SAAoBe;MAAkBK,OAAOC,OAAAA;EACtE;AACF,GA/BsC;;;ACXtC,SAASC,kBAAkB;AAC3B,SAASC,eAAe;AACxB,SAASC,cAAAA,mBAAkB;AAC3B,SAASC,cAAc;AAEvB,SAASC,6BAA6B;AACtC,SAASC,U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C,MAAMC,MAAK,IACrBC,oBAAoBC,sBAAAA;AAExB,SACE,gBAAAC,OAAA,cAAAA,OAAA,UAAA,MACE,gBAAAA,OAAA,cAACC,aAAAA;IAAYJ;IAAcK,OAAM;MACjC,gBAAAF,OAAA,cAACG,kBAAAA;IAAiBC,YAAYR,MAAMA,QAAQD,YAAYU;IAAaC,iBAAiBC;;AAG5F,GAX0B;;;AEFnB,IAAMC,qBAAsD;EACjE,GAAGC;EACHC,OAAO;IAAEC,QAAQ;MAAEC,WAAWC;IAAW;EAAE;AAC7C;","names":["FlexCol","DappRendered","React","usePromise","useDappMenu","useManageDappInjectableParamsFromRoute","useManageDappPathFromRoute","useXyOsUiContext","DappInitializer","dappState","active","minimized","closed","useInitializeDappAdHoc","dapp","xyOs","useXyOsUiContext","installedDapp","nodeCreateError","usePromise","installer","DappInitializer","allowedNames","config","name","xnsNetwork","undefined","xnsNodeUrl","install","dappWallet","context","routingError","useManageDappPathFromRoute","injectableErrors","useManageDappInjectableParamsFromRoute","dappMenu","useDappMenu","errors","filter","Boolean","Typography","FlexCol","usePromise","Kernel","XyOsUiContextProvider","EventBus","XyOs","HDWallet","ModuleFactoryLocator","React","useMemo","XyOsHost","children","eventBus","kernel","locator","wallet","walletToUse","usePromise","HDWallet","random","eventBusToUse","useMemo","EventBus","kernelToUse","Kernel","locatorToUse","ModuleFactoryLocator","os","error","XyOs","boot","XyOsUiContextProvider","value","FlexCol","Typography","message","DappHostInner","dapp","context","dappMenu","dappState","dappWallet","errors","useInitializeDappAdHoc","React","FlexCol","DappRendered","dappMenuProperties","DappHost","XyOsHost","React","BrowserRouter","React","Route","Routes","DappRoutes","args","React","Routes","Route","path","element","DappHost","RoutableDapp","dapp","React","BrowserRouter","DappRoutes","DappHost","ModuleFactoryLocator","CustomDappIconSvg","locator","ModuleFactoryLocator","CustomDappParams","iconSvg","CustomDappIconSvg","DappConfigSchema","DappIconSchema","DappMode","DappNavItemSchema","DappNavMenuConfigSchema","CustomDappName","version","CustomDappConfig","manifest","dappManifest","modes","DappMode","Window","name","schema","DappConfigSchema","sources","CustomDappIcon","active","installed","DappIconSchema","type","DappPayloads","CustomDappMenuItems","path","primaryText","DappNavItemSchema","svgIcon","weight","CustomDappMenuConfig","defaultPath","DappNavMenuConfigSchema","CustomDappMenuPayloads","ErrorRender","DappPathSwitcher","useAddDappMenuItems","React","FlexRow","React","CustomDappPathToComponent","component","path","CustomDapp","menuConfig","path","error","useAddDappMenuItems","CustomDappMenuPayloads","React","ErrorRender","scope","DappPathSwitcher","activePath","defaultPath","pathToComponent","CustomDappPathToComponent","CustomDappUiParams","CustomDappParams","modes","window","component","CustomDapp"]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/host/DappHost.tsx", "../../src/helpers/registration/useInitializeDappAdHoc.tsx", "../../src/components/host/XyOsHost.tsx", "../../src/components/host/Routable.tsx", "../../src/components/host/Routes.tsx", "../../src/dapp.manifest.json", "../../src/Params.ts", "../../src/icon/Icon.tsx", "../../src/Payloads.ts", "../../src/Dapp.tsx", "../../src/CustomDappPathToComponent.tsx", "../../src/UiParams.ts"],
|
|
4
|
+
"sourcesContent": ["import { FlexCol } from '@xylabs/react-flexbox'\nimport type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport { DappRendered } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { useInitializeDappAdHoc } from '../../helpers/index.ts'\nimport { XyOsHost } from './XyOsHost.tsx'\n\nexport interface DappHostProps {\n dapp: RegisteredReactDapp\n}\n\nexport const DappHostInner: React.FC<DappHostProps> = ({ dapp }) => {\n const {\n context, dappMenu, dappState, dappWallet, errors,\n } = useInitializeDappAdHoc(dapp)\n\n return (\n <FlexCol>\n <DappRendered\n context={context}\n dapp={dapp}\n dappMenuProperties={dappMenu}\n dappState={dappState}\n dappWallet={dappWallet}\n errors={errors}\n />\n </FlexCol>\n )\n}\n\nexport const DappHost: React.FC<DappHostProps> = ({ dapp }) => (\n <XyOsHost>\n <DappHostInner dapp={dapp} />\n </XyOsHost>\n)\n", "import { usePromise } from '@xylabs/react-promise'\nimport type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport {\n useDappMenu, useManageDappInjectableParamsFromRoute, useManageDappPathFromRoute, useXyOsUiContext,\n} from '@xyo-network/os-react-runtime'\nimport { DappInitializer } from '@xyo-network/os-runtime'\n\nconst dappState = {\n active: true, minimized: false, closed: false,\n}\n\nexport const useInitializeDappAdHoc = (dapp: RegisteredReactDapp) => {\n const xyOs = useXyOsUiContext()\n\n const [installedDapp, nodeCreateError] = usePromise(async () => {\n if (xyOs && dapp) {\n const installer = new DappInitializer({\n allowedNames: [dapp.config.name],\n dapp,\n xnsNetwork: undefined,\n xnsNodeUrl: undefined,\n xyOs,\n })\n return await installer.install()\n }\n }, [xyOs, dapp])\n\n const { dappWallet, context } = installedDapp ?? {}\n\n // support for routing\n const routingError = useManageDappPathFromRoute(context, dapp.config.name)\n const injectableErrors = useManageDappInjectableParamsFromRoute(context)\n\n const dappMenu = useDappMenu(context, dapp.config.name)\n\n return {\n context,\n dappMenu,\n dappState,\n dappWallet,\n errors: [routingError, nodeCreateError, ...injectableErrors].filter(Boolean),\n }\n}\n", "import { Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { usePromise } from '@xylabs/react-promise'\nimport { Kernel } from '@xyo-network/kernel'\nimport type { KernelExternal } from '@xyo-network/kernel-model'\nimport { XyOsUiContextProvider } from '@xyo-network/os-react-runtime'\nimport { EventBus, XyOs } from '@xyo-network/os-runtime'\nimport { HDWallet, ModuleFactoryLocator } from '@xyo-network/sdk-js'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\nimport React, { useMemo } from 'react'\n\nexport interface XyOsHostProps {\n children?: React.ReactNode\n eventBus?: EventBus\n kernel?: KernelExternal\n locator?: ModuleFactoryLocator\n wallet?: WalletInstance\n}\n\nexport const XyOsHost: React.FC<XyOsHostProps> = ({\n children, eventBus, kernel, locator, wallet,\n}) => {\n const [walletToUse] = usePromise(async () => wallet ?? await HDWallet.random(), [wallet])\n const eventBusToUse: EventBus = useMemo(() => eventBus ?? new EventBus(), [kernel])\n const kernelToUse: KernelExternal = useMemo(() => kernel ?? new Kernel(), [kernel])\n const locatorToUse = useMemo(() => locator ?? new ModuleFactoryLocator(), [locator])\n\n const [os, error] = usePromise(async () => {\n if (walletToUse && kernelToUse && eventBusToUse && locatorToUse) {\n const os = new XyOs({\n kernel: kernelToUse, eventBus: new EventBus(), locator: locatorToUse,\n })\n await os.boot(walletToUse, locatorToUse)\n return os\n }\n }, [kernelToUse, walletToUse, locator, eventBusToUse, locatorToUse])\n\n return os\n ? <XyOsUiContextProvider value={os}>{children}</XyOsUiContextProvider>\n : (\n <FlexCol>\n <Typography>\n wallet:\n {walletToUse ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n kernel:\n {kernelToUse ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n os:\n {os ? 'ready' : 'loading'}\n </Typography>\n <Typography>\n os-error:\n {error?.message}\n </Typography>\n </FlexCol>\n )\n}\n", "import React from 'react'\nimport { BrowserRouter } from 'react-router-dom'\n\nimport type { DappHostProps } from './DappHost.tsx'\nimport { DappHost } from './DappHost.tsx'\nimport { DappRoutes } from './Routes.tsx'\n\nexport const RoutableDapp: React.FC<DappHostProps> = ({ dapp }) => {\n return (\n <BrowserRouter>\n <DappRoutes dapp={dapp} />\n <DappHost dapp={dapp} />\n </BrowserRouter>\n )\n}\n", "import React from 'react'\nimport { Route, Routes } from 'react-router-dom'\n\nimport { DappHost, type DappHostProps } from './DappHost.tsx'\n\nexport const DappRoutes: React.FC<DappHostProps> = args => (\n <Routes>\n <Route\n path=\"/\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"/:dappName\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"/:dappName/:path/*\"\n element={(\n <DappHost {...args} />\n )}\n />\n <Route\n path=\"*\"\n element={(\n <DappHost {...args} />\n )}\n />\n </Routes>\n)\n", "{\n \"$schema\": \"https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/compilations/dapp-package-manifest-schema.json\",\n \"nodes\": [\n {\n \"config\": {\n \"accountPath\": \"0'\",\n \"name\": \"CustomDappNode\",\n \"schema\": \"network.xyo.node.config\"\n },\n \"modules\": {\n \"private\": [],\n \"public\": [\n {\n \"config\": {\n \"accountPath\": \"1'\",\n \"name\": \"DappArchivist\",\n \"schema\": \"network.xyo.archivist.config\"\n }\n }\n ]\n }\n }\n ],\n \"schema\": \"network.xyo.manifest.package.dapp\"\n}", "import type { UnregisteredDapp } from '@xyo-network/os-model'\nimport { ModuleFactoryLocator } from '@xyo-network/sdk-js'\n\nimport { CustomDappIconSvg } from './icon/index.ts'\n\nconst locator = new ModuleFactoryLocator()\n\nexport const CustomDappParams: UnregisteredDapp['params'] = {\n iconSvg: CustomDappIconSvg,\n locator,\n}\n\nexport default CustomDappParams\n", "/* eslint-disable @stylistic/max-len */\nexport const CustomDappIconSvg = `\n<svg id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 40 40\">\n <path\n fill=\"transparent\"\n d=\"M6.44,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M18.01,27.91c-.55.55-.83,1.22-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83s-1.44.28-2,.83Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M33.56,27.12c-.78,0-1.44.28-2,.83-.55.55-.83,1.21-.83,1.99s.28,1.44.83,2c.55.55,1.21.83,1.99.83s1.44-.28,2-.83c.55-.55.83-1.21.83-1.99s-.28-1.44-.83-2c-.55-.55-1.21-.83-1.99-.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M36.55,26.94c-.82-.82-1.82-1.23-3-1.23-.32,0-.63.04-.93.11-.3.07-.59.17-.87.31l-5.87-8.09c-.18.03-.36.05-.56.05h-1.13l6.42,8.83c-.39.4-.7.85-.93,1.36-.23.51-.35,1.06-.35,1.66,0,1.18.41,2.17,1.23,3s1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3-.41-2.17-1.23-3ZM35.55,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M19.29,25.73c-1,.16-1.84.64-2.52,1.42-.67.79-1.01,1.7-1.01,2.75,0,1.18.41,2.17,1.23,3,.82.82,1.82,1.23,3,1.23s2.17-.41,3-1.23c.82-.82,1.23-1.82,1.23-3,0-1.05-.34-1.97-1.01-2.74-.67-.78-1.51-1.25-2.52-1.43v-7.65h-1.41v7.65ZM22,27.91c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M14.1,18l-5.89,8.08c-.28-.13-.56-.22-.86-.28-.29-.06-.6-.09-.91-.09-1.18,0-2.17.41-3,1.23-.82.82-1.23,1.82-1.23,3s.41,2.17,1.23,3,1.82,1.23,3,1.23,2.17-.41,3-1.23,1.23-1.82,1.23-3c0-.6-.12-1.15-.36-1.66s-.56-.96-.95-1.36l6.45-8.83h-1c-.25,0-.48-.03-.7-.08ZM8.44,31.93c-.55.55-1.22.83-2,.83s-1.44-.28-1.99-.83c-.55-.55-.83-1.22-.83-2s.28-1.44.83-1.99c.55-.55,1.22-.83,2-.83s1.44.28,1.99.83c.55.55.83,1.22.83,2s-.28,1.44-.83,1.99Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,12.91c1.26,0,2.46.19,3.61.56,1.15.37,2.23.88,3.23,1.54V4.86c0-.44-.15-.82-.46-1.12s-.68-.46-1.12-.46h-10.52c-.44,0-.82.15-1.12.46s-.46.68-.46,1.12v10.15c1-.66,2.08-1.17,3.23-1.54s2.36-.56,3.61-.56ZM17.7,5.83c.63-.63,1.4-.95,2.3-.95s1.66.32,2.3.95.95,1.4.95,2.3-.32,1.66-.95,2.3-1.4.95-2.3.95-1.66-.32-2.3-.95-.95-1.4-.95-2.3.32-1.66.95-2.3Z\"\n />\n <path\n fill=\"transparent\"\n d=\"M20,10.32c.6,0,1.12-.21,1.55-.64.43-.43.65-.94.65-1.55s-.22-1.12-.65-1.55c-.43-.43-.95-.65-1.55-.65s-1.12.22-1.55.65-.64.95-.64,1.55.21,1.12.64,1.55.94.64,1.55.64Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M20,11.37c.9,0,1.66-.32,2.3-.95s.95-1.4.95-2.3-.32-1.66-.95-2.3-1.4-.95-2.3-.95-1.66.32-2.3.95-.95,1.4-.95,2.3.32,1.66.95,2.3,1.4.95,2.3.95ZM18.45,6.58c.43-.43.95-.65,1.55-.65s1.12.22,1.55.65c.43.43.65.95.65,1.55s-.22,1.12-.65,1.55c-.43.43-.95.64-1.55.64s-1.12-.21-1.55-.64-.64-.95-.64-1.55.21-1.12.64-1.55Z\"\n />\n <path\n fill=\"currentColor\"\n d=\"M27.21,2.9c-.5-.5-1.15-.75-1.95-.75h-10.52c-.8,0-1.45.25-1.95.75-.5.5-.75,1.15-.75,1.95v10.52c0,.8.25,1.45.75,1.95.35.35.77.56,1.25.67.22.05.45.08.7.08h10.52c.2,0,.38-.02.56-.05.55-.09,1.01-.33,1.39-.71.5-.5.75-1.15.75-1.95V4.86c0-.8-.25-1.45-.75-1.95ZM25.93,16.74c-.26.14-.55.22-.86.22h-10.15s-.08-.01-.12-.01c-.25-.02-.5-.08-.74-.2-.28-.14-.45-.35-.5-.63.99-.7,2.03-1.22,3.12-1.57s2.19-.52,3.31-.52,2.27.18,3.4.55c1.13.36,2.18.88,3.16,1.54-.15.27-.36.48-.63.63ZM26.84,15.01c-1-.66-2.08-1.17-3.23-1.54-1.15-.37-2.36-.56-3.61-.56s-2.46.19-3.61.56-2.23.88-3.23,1.54V4.86c0-.44.15-.82.46-1.12s.68-.46,1.12-.46h10.52c.44,0,.82.15,1.12.46s.46.68.46,1.12v10.15Z\"\n />\n </svg>\n `\n", "/* eslint-disable @stylistic/max-len */\nimport type {\n DappConfig,\n DappIcon,\n DappName,\n DappNavItem,\n DappNavMenuConfig,\n DappPackageManifestPayload,\n DappVersion,\n} from '@xyo-network/os-model'\nimport {\n DappConfigSchema,\n DappIconSchema,\n DappMode,\n DappNavItemSchema,\n DappNavMenuConfigSchema,\n} from '@xyo-network/os-model'\n\nimport dappManifest from './dapp.manifest.json' with { type: 'json' }\n\nexport const CustomDappName: DappName = 'Custom Dapp' as const\n\nconst version: DappVersion = '1.0.0'\n\nexport const CustomDappConfig: DappConfig = {\n manifest: dappManifest as unknown as DappPackageManifestPayload,\n modes: [DappMode.Window],\n name: CustomDappName,\n schema: DappConfigSchema,\n sources: ['network.xyo.dapp.accounts.source'],\n version,\n}\n\nexport const CustomDappIcon: DappIcon = {\n active: false,\n installed: 'installed',\n name: CustomDappName,\n schema: DappIconSchema,\n type: 'system',\n version,\n}\n\nexport const DappPayloads = [CustomDappConfig, CustomDappIcon]\n\nexport type CustomDappMenuItemPaths = 'home' | 'settings'\n\nconst CustomDappMenuItems: DappNavItem<CustomDappMenuItemPaths>[] = [\n {\n path: 'home',\n primaryText: 'Home',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n {\n path: 'settings',\n primaryText: 'Settings',\n schema: DappNavItemSchema,\n svgIcon: `\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24\" viewBox=\"0 -960 960 960\" width=\"24\" fill=\"none\"><path fill=\"currentColor\" d=\"M420-360h120l-23-129q20-10 31.5-29t11.5-42q0-33-23.5-56.5T480-640q-33 0-56.5 23.5T400-560q0 23 11.5 42t31.5 29l-23 129Zm60 280q-139-35-229.5-159.5T160-516v-244l320-120 320 120v244q0 152-90.5 276.5T480-80Zm0-84q104-33 172-132t68-220v-189l-240-90-240 90v189q0 121 68 220t172 132Zm0-316Z\"/></svg>\n `,\n weight: 0,\n },\n]\n\nconst CustomDappMenuConfig: DappNavMenuConfig = {\n defaultPath: 'home',\n schema: DappNavMenuConfigSchema,\n}\n\nexport const CustomDappMenuPayloads = [...CustomDappMenuItems, CustomDappMenuConfig]\n", "import { ErrorRender } from '@xylabs/react-error'\nimport { DappPathSwitcher, useAddDappMenuItems } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nimport { CustomDappPathToComponent } from './CustomDappPathToComponent.tsx'\nimport { CustomDappMenuPayloads } from './Payloads.ts'\n\nexport const CustomDapp = () => {\n const {\n menuConfig, path, error,\n } = useAddDappMenuItems(CustomDappMenuPayloads)\n\n return (\n <>\n <ErrorRender error={error} scope=\"CustomDapp\" />\n <DappPathSwitcher activePath={path?.path ?? menuConfig?.defaultPath} pathToComponent={CustomDappPathToComponent} />\n </>\n )\n}\n", "import { FlexRow } from '@xylabs/react-flexbox'\nimport type { PathToComponent } from '@xyo-network/os-react-runtime'\nimport React from 'react'\n\nexport const CustomDappPathToComponent: PathToComponent[] = [\n {\n component: <FlexRow />,\n path: 'home',\n },\n]\n", "import type { UnregisteredReactDapp } from '@xyo-network/os-react-model'\n\nimport { CustomDapp } from './Dapp.tsx'\nimport { CustomDappParams } from './Params.ts'\n\nexport const CustomDappUiParams: UnregisteredReactDapp['params'] = {\n ...CustomDappParams,\n modes: { window: { component: CustomDapp } },\n}\n\nexport default CustomDappUiParams\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAAA,gBAAe;AAExB,SAAS,oBAAoB;;;ACF7B,SAAS,kBAAkB;AAE3B;AAAA,EACE;AAAA,EAAa;AAAA,EAAwC;AAAA,EAA4B;AAAA,OAC5E;AACP,SAAS,uBAAuB;AAEhC,IAAM,YAAY;AAAA,EAChB,QAAQ;AAAA,EAAM,WAAW;AAAA,EAAO,QAAQ;AAC1C;AAEO,IAAM,yBAAyB,CAAC,SAA8B;AACnE,QAAM,OAAO,iBAAiB;AAE9B,QAAM,CAAC,eAAe,eAAe,IAAI,WAAW,YAAY;AAC9D,QAAI,QAAQ,MAAM;AAChB,YAAM,YAAY,IAAI,gBAAgB;AAAA,QACpC,cAAc,CAAC,KAAK,OAAO,IAAI;AAAA,QAC/B;AAAA,QACA,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ;AAAA,MACF,CAAC;AACD,aAAO,MAAM,UAAU,QAAQ;AAAA,IACjC;AAAA,EACF,GAAG,CAAC,MAAM,IAAI,CAAC;AAEf,QAAM,EAAE,YAAY,QAAQ,IAAI,iBAAiB,CAAC;AAGlD,QAAM,eAAe,2BAA2B,SAAS,KAAK,OAAO,IAAI;AACzE,QAAM,mBAAmB,uCAAuC,OAAO;AAEvE,QAAM,WAAW,YAAY,SAAS,KAAK,OAAO,IAAI;AAEtD,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA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lexCol", "jsx", "jsxs", "jsx", "jsxs", "ModuleFactoryLocator", "ModuleFactoryLocator", "jsx", "jsx", "jsxs"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/dapp-template",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.1",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -35,57 +35,56 @@
|
|
|
35
35
|
"README.md"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@xyo-network/kernel
|
|
39
|
-
"@xyo-network/
|
|
40
|
-
"@xyo-network/os-
|
|
41
|
-
"@xyo-network/
|
|
42
|
-
"@xyo-network/os-react-
|
|
43
|
-
"@xyo-network/os-runtime": "~7.
|
|
38
|
+
"@xyo-network/kernel": "~7.4.1",
|
|
39
|
+
"@xyo-network/kernel-model": "~7.4.1",
|
|
40
|
+
"@xyo-network/os-model": "~7.4.1",
|
|
41
|
+
"@xyo-network/os-react-runtime": "~7.4.1",
|
|
42
|
+
"@xyo-network/os-react-model": "~7.4.1",
|
|
43
|
+
"@xyo-network/os-runtime": "~7.4.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@bitauth/libauth": "~3.0.0",
|
|
47
47
|
"@emotion/react": "^11.14.0",
|
|
48
48
|
"@emotion/styled": "^11.14.1",
|
|
49
49
|
"@metamask/providers": "^22.1.1",
|
|
50
|
-
"@mui/icons-material": "^
|
|
51
|
-
"@mui/material": "^
|
|
52
|
-
"@mui/system": "
|
|
53
|
-
"@mui/x-charts": "~
|
|
54
|
-
"@mui/x-tree-view": "~
|
|
50
|
+
"@mui/icons-material": "^9.0.1",
|
|
51
|
+
"@mui/material": "^9.0.1",
|
|
52
|
+
"@mui/system": "~9.0.1",
|
|
53
|
+
"@mui/x-charts": "~9.2",
|
|
54
|
+
"@mui/x-tree-view": "~9.1",
|
|
55
55
|
"@opentelemetry/api": "^1.9.1",
|
|
56
56
|
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
57
57
|
"@react-spring/web": "~10.0.3",
|
|
58
58
|
"@scure/base": "~2.2.0",
|
|
59
59
|
"@scure/bip39": "~2.2.0",
|
|
60
|
-
"@storybook/react-vite": "
|
|
61
|
-
"@textea/json-viewer": "~4.0.1",
|
|
62
|
-
"@types/node": "~25.6.1",
|
|
60
|
+
"@storybook/react-vite": "^10.4.0",
|
|
63
61
|
"@types/react": "~19.2.14",
|
|
64
|
-
"@xylabs/geo": "^5.1.
|
|
65
|
-
"@xylabs/indexed-db": "^5.1.
|
|
66
|
-
"@xylabs/pixel": "^5.1.
|
|
67
|
-
"@xylabs/react-animation": "~
|
|
68
|
-
"@xylabs/react-async-effect": "~
|
|
69
|
-
"@xylabs/react-button": "~
|
|
70
|
-
"@xylabs/react-common": "~
|
|
71
|
-
"@xylabs/react-crypto": "~
|
|
72
|
-
"@xylabs/react-error": "~
|
|
73
|
-
"@xylabs/react-flexbox": "~
|
|
74
|
-
"@xylabs/react-hooks": "~
|
|
75
|
-
"@xylabs/react-identicon": "~
|
|
76
|
-
"@xylabs/react-link": "~
|
|
77
|
-
"@xylabs/react-number-status": "~
|
|
78
|
-
"@xylabs/react-promise": "~
|
|
79
|
-
"@xylabs/react-quick-tip-button": "~
|
|
80
|
-
"@xylabs/react-select": "~
|
|
81
|
-
"@xylabs/react-shared": "~
|
|
82
|
-
"@xylabs/react-theme": "~
|
|
83
|
-
"@xylabs/sdk-js": "^5.1.
|
|
84
|
-
"@xylabs/
|
|
85
|
-
"@xylabs/
|
|
86
|
-
"@xylabs/
|
|
87
|
-
"@xylabs/tsconfig
|
|
88
|
-
"@xylabs/tsconfig-
|
|
62
|
+
"@xylabs/geo": "^5.1.3",
|
|
63
|
+
"@xylabs/indexed-db": "^5.1.3",
|
|
64
|
+
"@xylabs/pixel": "^5.1.3",
|
|
65
|
+
"@xylabs/react-animation": "~8.0.3",
|
|
66
|
+
"@xylabs/react-async-effect": "~8.0.3",
|
|
67
|
+
"@xylabs/react-button": "~8.0.3",
|
|
68
|
+
"@xylabs/react-common": "~8.0.3",
|
|
69
|
+
"@xylabs/react-crypto": "~8.0.3",
|
|
70
|
+
"@xylabs/react-error": "~8.0.3",
|
|
71
|
+
"@xylabs/react-flexbox": "~8.0.3",
|
|
72
|
+
"@xylabs/react-hooks": "~8.0.3",
|
|
73
|
+
"@xylabs/react-identicon": "~8.0.3",
|
|
74
|
+
"@xylabs/react-link": "~8.0.3",
|
|
75
|
+
"@xylabs/react-number-status": "~8.0.3",
|
|
76
|
+
"@xylabs/react-promise": "~8.0.3",
|
|
77
|
+
"@xylabs/react-quick-tip-button": "~8.0.3",
|
|
78
|
+
"@xylabs/react-select": "~8.0.3",
|
|
79
|
+
"@xylabs/react-shared": "~8.0.3",
|
|
80
|
+
"@xylabs/react-theme": "~8.0.3",
|
|
81
|
+
"@xylabs/sdk-js": "^5.1.3",
|
|
82
|
+
"@xylabs/sdk-react": "~8.0.3",
|
|
83
|
+
"@xylabs/threads": "^5.1.3",
|
|
84
|
+
"@xylabs/toolchain": "~8.0.8",
|
|
85
|
+
"@xylabs/tsconfig": "^8.0.8",
|
|
86
|
+
"@xylabs/tsconfig-dom": "^8.0.8",
|
|
87
|
+
"@xylabs/tsconfig-react": "~8.0.8",
|
|
89
88
|
"@xyo-network/account": "~5.6.2",
|
|
90
89
|
"@xyo-network/account-model": "~5.6.3",
|
|
91
90
|
"@xyo-network/api": "~5.6.2",
|
|
@@ -127,16 +126,16 @@
|
|
|
127
126
|
"@xyo-network/payload-wrapper": "~5.6.2",
|
|
128
127
|
"@xyo-network/payloadset-plugin": "^5.6.4",
|
|
129
128
|
"@xyo-network/query-payload-plugin": "~5.6.3",
|
|
130
|
-
"@xyo-network/react-archivist": "~
|
|
131
|
-
"@xyo-network/react-card": "~
|
|
132
|
-
"@xyo-network/react-form-credit-card": "~
|
|
133
|
-
"@xyo-network/react-node": "~
|
|
134
|
-
"@xyo-network/react-node-renderer": "~
|
|
135
|
-
"@xyo-network/react-payload-raw-info": "~
|
|
136
|
-
"@xyo-network/react-payload-table": "~
|
|
137
|
-
"@xyo-network/react-shared": "~
|
|
138
|
-
"@xyo-network/react-table": "~
|
|
139
|
-
"@xyo-network/react-wallet": "~
|
|
129
|
+
"@xyo-network/react-archivist": "~8.0.1",
|
|
130
|
+
"@xyo-network/react-card": "~8.0.1",
|
|
131
|
+
"@xyo-network/react-form-credit-card": "~8.0.1",
|
|
132
|
+
"@xyo-network/react-node": "~8.0.1",
|
|
133
|
+
"@xyo-network/react-node-renderer": "~8.0.1",
|
|
134
|
+
"@xyo-network/react-payload-raw-info": "~8.0.1",
|
|
135
|
+
"@xyo-network/react-payload-table": "~8.0.1",
|
|
136
|
+
"@xyo-network/react-shared": "~8.0.1",
|
|
137
|
+
"@xyo-network/react-table": "~8.0.1",
|
|
138
|
+
"@xyo-network/react-wallet": "~8.0.1",
|
|
140
139
|
"@xyo-network/schema-cache": "~5.6.3",
|
|
141
140
|
"@xyo-network/schema-payload-plugin": "~5.6.3",
|
|
142
141
|
"@xyo-network/sdk-js": "~5.6.4",
|
|
@@ -153,84 +152,83 @@
|
|
|
153
152
|
"buffer": "^6.0.3",
|
|
154
153
|
"card-validator": "~10.0.4",
|
|
155
154
|
"chalk": "^5.6.2",
|
|
155
|
+
"clsx": "~2.1.1",
|
|
156
156
|
"cytoscape": "^3.33.3",
|
|
157
157
|
"cytoscape-cola": "~2.5.1",
|
|
158
158
|
"cytoscape-cose-bilkent": "~4.1.0",
|
|
159
|
-
"cytoscape-dagre": "~
|
|
159
|
+
"cytoscape-dagre": "~3.0",
|
|
160
160
|
"cytoscape-euler": "~1.2.4",
|
|
161
161
|
"debug": "~4.4.3",
|
|
162
|
-
"eslint": "~10.
|
|
162
|
+
"eslint": "~10.4.0",
|
|
163
163
|
"ethers": "^6.16.0",
|
|
164
164
|
"fast-deep-equal": "~3.1.3",
|
|
165
165
|
"hash-wasm": "~4.12.0",
|
|
166
166
|
"idb": "^8.0.3",
|
|
167
|
-
"js-cookie": "~3.0.
|
|
167
|
+
"js-cookie": "~3.0.7",
|
|
168
168
|
"lru-cache": "^11.3.6",
|
|
169
169
|
"luxon": "~3.7.2",
|
|
170
170
|
"mapbox-gl": "^3.23.1",
|
|
171
171
|
"md5": "~2.3",
|
|
172
|
-
"mixpanel-browser": "^2.
|
|
172
|
+
"mixpanel-browser": "^2.79.0",
|
|
173
173
|
"numeral": "~2.0.6",
|
|
174
174
|
"observable-fns": "~0.6.1",
|
|
175
175
|
"pako": "^2.1.0",
|
|
176
176
|
"query-string": "~9.3.1",
|
|
177
177
|
"react": "^19.2.6",
|
|
178
178
|
"react-dom": "^19.2.6",
|
|
179
|
-
"react-helmet": "~6.1.0",
|
|
180
179
|
"react-icons": "~5.6.0",
|
|
181
180
|
"react-is": "^19.2.6",
|
|
182
|
-
"react-router-dom": "
|
|
181
|
+
"react-router-dom": "^7.15.1",
|
|
183
182
|
"react-use-gesture": "~9.1.3",
|
|
184
183
|
"recharts": "~3.8.1",
|
|
185
184
|
"rollbar": "~3.1.0",
|
|
186
185
|
"spark-md5": "~3.0.2",
|
|
187
186
|
"store2": "~2.14.4",
|
|
188
|
-
"storybook": "~10.
|
|
187
|
+
"storybook": "~10.4.0",
|
|
189
188
|
"string-to-color": "~2.2.2",
|
|
190
|
-
"typescript": "~
|
|
191
|
-
"viem": "^2.
|
|
192
|
-
"vite": "
|
|
189
|
+
"typescript": "~6.0.3",
|
|
190
|
+
"viem": "^2.49.3",
|
|
191
|
+
"vite": "^8.0.13",
|
|
193
192
|
"wasm-feature-detect": "~1.8.0",
|
|
194
193
|
"webextension-polyfill": "^0.12.0",
|
|
195
|
-
"zod": "^4.4.3"
|
|
194
|
+
"zod": "^4.4.3",
|
|
195
|
+
"zustand": "~5.0.13"
|
|
196
196
|
},
|
|
197
197
|
"peerDependencies": {
|
|
198
198
|
"@bitauth/libauth": "~3.0",
|
|
199
199
|
"@emotion/react": "^11.14",
|
|
200
|
-
"@emotion/styled": "^11.14",
|
|
201
200
|
"@metamask/providers": "^22.1",
|
|
202
|
-
"@mui/icons-material": "^
|
|
203
|
-
"@mui/material": "^
|
|
204
|
-
"@mui/system": "
|
|
205
|
-
"@mui/x-charts": "~
|
|
206
|
-
"@mui/x-tree-view": "~
|
|
201
|
+
"@mui/icons-material": "^9.0",
|
|
202
|
+
"@mui/material": "^9.0",
|
|
203
|
+
"@mui/system": "~9.0",
|
|
204
|
+
"@mui/x-charts": "~9.2",
|
|
205
|
+
"@mui/x-tree-view": "~9.1",
|
|
207
206
|
"@opentelemetry/api": "^1.9",
|
|
208
207
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
209
208
|
"@react-spring/web": "~10.0",
|
|
210
209
|
"@scure/base": "~2.2",
|
|
211
210
|
"@scure/bip39": "~2.2",
|
|
212
|
-
"@textea/json-viewer": "~4.0",
|
|
213
|
-
"@types/node": "~25.6",
|
|
214
211
|
"@xylabs/geo": "^5.0",
|
|
215
212
|
"@xylabs/indexed-db": "^5.0",
|
|
216
213
|
"@xylabs/pixel": "^5.1",
|
|
217
|
-
"@xylabs/react-animation": "~
|
|
218
|
-
"@xylabs/react-async-effect": "~
|
|
219
|
-
"@xylabs/react-button": "~
|
|
220
|
-
"@xylabs/react-common": "~
|
|
221
|
-
"@xylabs/react-crypto": "~
|
|
222
|
-
"@xylabs/react-error": "~
|
|
223
|
-
"@xylabs/react-flexbox": "~
|
|
224
|
-
"@xylabs/react-hooks": "~
|
|
225
|
-
"@xylabs/react-identicon": "~
|
|
226
|
-
"@xylabs/react-link": "~
|
|
227
|
-
"@xylabs/react-number-status": "~
|
|
228
|
-
"@xylabs/react-promise": "~
|
|
229
|
-
"@xylabs/react-quick-tip-button": "~
|
|
230
|
-
"@xylabs/react-select": "~
|
|
231
|
-
"@xylabs/react-shared": "~
|
|
232
|
-
"@xylabs/react-theme": "~
|
|
214
|
+
"@xylabs/react-animation": "~8.0",
|
|
215
|
+
"@xylabs/react-async-effect": "~8.0",
|
|
216
|
+
"@xylabs/react-button": "~8.0",
|
|
217
|
+
"@xylabs/react-common": "~8.0",
|
|
218
|
+
"@xylabs/react-crypto": "~8.0",
|
|
219
|
+
"@xylabs/react-error": "~8.0",
|
|
220
|
+
"@xylabs/react-flexbox": "~8.0",
|
|
221
|
+
"@xylabs/react-hooks": "~8.0",
|
|
222
|
+
"@xylabs/react-identicon": "~8.0",
|
|
223
|
+
"@xylabs/react-link": "~8.0",
|
|
224
|
+
"@xylabs/react-number-status": "~8.0",
|
|
225
|
+
"@xylabs/react-promise": "~8.0",
|
|
226
|
+
"@xylabs/react-quick-tip-button": "~8.0",
|
|
227
|
+
"@xylabs/react-select": "~8.0",
|
|
228
|
+
"@xylabs/react-shared": "~8.0",
|
|
229
|
+
"@xylabs/react-theme": "~8.0",
|
|
233
230
|
"@xylabs/sdk-js": "^5.0",
|
|
231
|
+
"@xylabs/sdk-react": "~8.0",
|
|
234
232
|
"@xylabs/threads": "^5.0",
|
|
235
233
|
"@xyo-network/account": "~5.6",
|
|
236
234
|
"@xyo-network/account-model": "~5.6",
|
|
@@ -273,16 +271,16 @@
|
|
|
273
271
|
"@xyo-network/payload-wrapper": "~5.6",
|
|
274
272
|
"@xyo-network/payloadset-plugin": "^5.5",
|
|
275
273
|
"@xyo-network/query-payload-plugin": "~5.6",
|
|
276
|
-
"@xyo-network/react-archivist": "~
|
|
277
|
-
"@xyo-network/react-card": "~
|
|
278
|
-
"@xyo-network/react-form-credit-card": "~
|
|
279
|
-
"@xyo-network/react-node": "~
|
|
280
|
-
"@xyo-network/react-node-renderer": "~
|
|
281
|
-
"@xyo-network/react-payload-raw-info": "~
|
|
282
|
-
"@xyo-network/react-payload-table": "~
|
|
283
|
-
"@xyo-network/react-shared": "~
|
|
284
|
-
"@xyo-network/react-table": "~
|
|
285
|
-
"@xyo-network/react-wallet": "~
|
|
274
|
+
"@xyo-network/react-archivist": "~8.0",
|
|
275
|
+
"@xyo-network/react-card": "~8.0",
|
|
276
|
+
"@xyo-network/react-form-credit-card": "~8.0",
|
|
277
|
+
"@xyo-network/react-node": "~8.0",
|
|
278
|
+
"@xyo-network/react-node-renderer": "~8.0",
|
|
279
|
+
"@xyo-network/react-payload-raw-info": "~8.0",
|
|
280
|
+
"@xyo-network/react-payload-table": "~8.0",
|
|
281
|
+
"@xyo-network/react-shared": "~8.0",
|
|
282
|
+
"@xyo-network/react-table": "~8.0",
|
|
283
|
+
"@xyo-network/react-wallet": "~8.0",
|
|
286
284
|
"@xyo-network/schema-cache": "~5.6",
|
|
287
285
|
"@xyo-network/schema-payload-plugin": "~5.6",
|
|
288
286
|
"@xyo-network/sdk-js": "~5.6",
|
|
@@ -299,10 +297,11 @@
|
|
|
299
297
|
"buffer": "^6.0",
|
|
300
298
|
"card-validator": "~10.0",
|
|
301
299
|
"chalk": "^5.6",
|
|
300
|
+
"clsx": "~2.1",
|
|
302
301
|
"cytoscape": "^3.33",
|
|
303
302
|
"cytoscape-cola": "~2.5",
|
|
304
303
|
"cytoscape-cose-bilkent": "~4.1",
|
|
305
|
-
"cytoscape-dagre": "~
|
|
304
|
+
"cytoscape-dagre": "~3.0",
|
|
306
305
|
"cytoscape-euler": "~1.2",
|
|
307
306
|
"debug": "~4.4",
|
|
308
307
|
"ethers": "^6.16",
|
|
@@ -321,21 +320,20 @@
|
|
|
321
320
|
"query-string": "~9.3",
|
|
322
321
|
"react": "^19.2",
|
|
323
322
|
"react-dom": "^19.2",
|
|
324
|
-
"react-helmet": "~6.1",
|
|
325
323
|
"react-icons": "~5.6",
|
|
326
324
|
"react-is": "^19.2",
|
|
327
|
-
"react-router-dom": "
|
|
325
|
+
"react-router-dom": "^7.15",
|
|
328
326
|
"react-use-gesture": "~9.1",
|
|
329
327
|
"recharts": "~3.8",
|
|
330
328
|
"rollbar": "~3.1",
|
|
331
329
|
"spark-md5": "~3.0",
|
|
332
330
|
"store2": "~2.14",
|
|
333
331
|
"string-to-color": "~2.2",
|
|
334
|
-
"typescript": "~5.9",
|
|
335
332
|
"viem": "^2.48",
|
|
336
333
|
"wasm-feature-detect": "~1.8",
|
|
337
334
|
"webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0",
|
|
338
|
-
"zod": "^4.3"
|
|
335
|
+
"zod": "^4.3",
|
|
336
|
+
"zustand": "~5.0"
|
|
339
337
|
},
|
|
340
338
|
"engines": {
|
|
341
339
|
"node": ">=22"
|