@xyo-network/dapp-template 4.2.3 → 4.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/neutral/{components/Dapp.d.ts → CustomDappPathToComponent.d.ts} +1 -1
  2. package/dist/neutral/CustomDappPathToComponent.d.ts.map +1 -0
  3. package/dist/neutral/Dapp.d.ts.map +1 -0
  4. package/dist/neutral/{DappHost.d.ts → components/host/DappHost.d.ts} +1 -0
  5. package/dist/neutral/components/host/DappHost.d.ts.map +1 -0
  6. package/dist/neutral/components/host/Routable.d.ts +4 -0
  7. package/dist/neutral/components/host/Routable.d.ts.map +1 -0
  8. package/dist/neutral/components/host/Routes.d.ts +4 -0
  9. package/dist/neutral/components/host/Routes.d.ts.map +1 -0
  10. package/dist/neutral/components/host/XyOsHost.d.ts.map +1 -0
  11. package/dist/neutral/components/host/index.d.ts +5 -0
  12. package/dist/neutral/components/host/index.d.ts.map +1 -0
  13. package/dist/neutral/components/index.d.ts +1 -1
  14. package/dist/neutral/components/index.d.ts.map +1 -1
  15. package/dist/neutral/helpers/registration/index.d.ts +1 -1
  16. package/dist/neutral/helpers/registration/index.d.ts.map +1 -1
  17. package/dist/neutral/helpers/registration/{useInstallDapp.d.ts → useInitializeDappAdHoc.d.ts} +7 -2
  18. package/dist/neutral/helpers/registration/useInitializeDappAdHoc.d.ts.map +1 -0
  19. package/dist/neutral/index.d.ts +2 -2
  20. package/dist/neutral/index.d.ts.map +1 -1
  21. package/dist/neutral/index.mjs +139 -102
  22. package/dist/neutral/index.mjs.map +1 -1
  23. package/dist/node/{components/Dapp.d.ts → CustomDappPathToComponent.d.ts} +1 -1
  24. package/dist/node/CustomDappPathToComponent.d.ts.map +1 -0
  25. package/dist/node/Dapp.d.ts.map +1 -0
  26. package/dist/node/{DappHost.d.ts → components/host/DappHost.d.ts} +1 -0
  27. package/dist/node/components/host/DappHost.d.ts.map +1 -0
  28. package/dist/node/components/host/Routable.d.ts +4 -0
  29. package/dist/node/components/host/Routable.d.ts.map +1 -0
  30. package/dist/node/components/host/Routes.d.ts +4 -0
  31. package/dist/node/components/host/Routes.d.ts.map +1 -0
  32. package/dist/node/components/host/XyOsHost.d.ts.map +1 -0
  33. package/dist/node/components/host/index.d.ts +5 -0
  34. package/dist/node/components/host/index.d.ts.map +1 -0
  35. package/dist/node/components/index.d.ts +1 -1
  36. package/dist/node/components/index.d.ts.map +1 -1
  37. package/dist/node/helpers/registration/index.d.ts +1 -1
  38. package/dist/node/helpers/registration/index.d.ts.map +1 -1
  39. package/dist/node/helpers/registration/{useInstallDapp.d.ts → useInitializeDappAdHoc.d.ts} +7 -2
  40. package/dist/node/helpers/registration/useInitializeDappAdHoc.d.ts.map +1 -0
  41. package/dist/node/index.d.ts +2 -2
  42. package/dist/node/index.d.ts.map +1 -1
  43. package/dist/node/index.mjs +139 -102
  44. package/dist/node/index.mjs.map +1 -1
  45. package/package.json +7 -7
  46. package/src/{window/Dapp.tsx → Dapp.tsx} +2 -2
  47. package/src/UiParams.ts +1 -1
  48. package/src/components/host/DappHost.tsx +36 -0
  49. package/src/components/host/Routable.tsx +15 -0
  50. package/src/components/host/Routes.tsx +33 -0
  51. package/src/components/host/index.ts +4 -0
  52. package/src/components/index.ts +1 -1
  53. package/src/dapp.stories.tsx +5 -43
  54. package/src/helpers/registration/index.ts +1 -1
  55. package/src/helpers/registration/{useInstallDapp.tsx → useInitializeDappAdHoc.tsx} +6 -1
  56. package/src/index.ts +2 -2
  57. package/dist/neutral/DappHost.d.ts.map +0 -1
  58. package/dist/neutral/XyOsHost.d.ts.map +0 -1
  59. package/dist/neutral/components/Dapp.d.ts.map +0 -1
  60. package/dist/neutral/helpers/registration/useInstallDapp.d.ts.map +0 -1
  61. package/dist/neutral/window/Dapp.d.ts.map +0 -1
  62. package/dist/neutral/window/index.d.ts +0 -2
  63. package/dist/neutral/window/index.d.ts.map +0 -1
  64. package/dist/node/DappHost.d.ts.map +0 -1
  65. package/dist/node/XyOsHost.d.ts.map +0 -1
  66. package/dist/node/components/Dapp.d.ts.map +0 -1
  67. package/dist/node/helpers/registration/useInstallDapp.d.ts.map +0 -1
  68. package/dist/node/window/Dapp.d.ts.map +0 -1
  69. package/dist/node/window/index.d.ts +0 -2
  70. package/dist/node/window/index.d.ts.map +0 -1
  71. package/src/DappHost.tsx +0 -30
  72. package/src/window/index.ts +0 -1
  73. /package/dist/neutral/{window/Dapp.d.ts → Dapp.d.ts} +0 -0
  74. /package/dist/neutral/{XyOsHost.d.ts → components/host/XyOsHost.d.ts} +0 -0
  75. /package/dist/node/{window/Dapp.d.ts → Dapp.d.ts} +0 -0
  76. /package/dist/node/{XyOsHost.d.ts → components/host/XyOsHost.d.ts} +0 -0
  77. /package/src/{components/Dapp.tsx → CustomDappPathToComponent.tsx} +0 -0
  78. /package/src/{XyOsHost.tsx → components/host/XyOsHost.tsx} +0 -0
@@ -1,3 +1,3 @@
1
1
  import type { PathToComponent } from '@xyo-network/os-react-runtime';
2
2
  export declare const CustomDappPathToComponent: PathToComponent[];
3
- //# sourceMappingURL=Dapp.d.ts.map
3
+ //# sourceMappingURL=CustomDappPathToComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomDappPathToComponent.d.ts","sourceRoot":"","sources":["../../src/CustomDappPathToComponent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAGpE,eAAO,MAAM,yBAAyB,EAAE,eAAe,EAKtD,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dapp.d.ts","sourceRoot":"","sources":["../../src/Dapp.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU,+CAWtB,CAAA"}
@@ -3,5 +3,6 @@ import React from 'react';
3
3
  export interface DappHostProps {
4
4
  dapp: RegisteredReactDapp;
5
5
  }
6
+ export declare const DappHostInner: React.FC<DappHostProps>;
6
7
  export declare const DappHost: React.FC<DappHostProps>;
7
8
  //# sourceMappingURL=DappHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DappHost.d.ts","sourceRoot":"","sources":["../../../../src/components/host/DappHost.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEtE,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiBjD,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAI5C,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { DappHostProps } from './DappHost.tsx';
3
+ export declare const RoutableDapp: React.FC<DappHostProps>;
4
+ //# sourceMappingURL=Routable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Routable.d.ts","sourceRoot":"","sources":["../../../../src/components/host/Routable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAInD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAOhD,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { type DappHostProps } from './DappHost.tsx';
3
+ export declare const DappRoutes: React.FC<DappHostProps>;
4
+ //# sourceMappingURL=Routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Routes.d.ts","sourceRoot":"","sources":["../../../../src/components/host/Routes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE7D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA2B9C,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XyOsHost.d.ts","sourceRoot":"","sources":["../../../../src/components/host/XyOsHost.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAE1E,OAAO,EAAE,QAAQ,EAAQ,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,MAAM,CAAC,EAAE,cAAc,CAAA;CACxB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwC5C,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from './DappHost.tsx';
2
+ export * from './Routable.tsx';
3
+ export * from './Routes.tsx';
4
+ export * from './XyOsHost.tsx';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/host/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './Dapp.tsx';
1
+ export * from './host/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
@@ -1,3 +1,3 @@
1
1
  export * from './DappInitializer.ts';
2
- export * from './useInstallDapp.tsx';
2
+ export * from './useInitializeDappAdHoc.tsx';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/registration/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/helpers/registration/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,8BAA8B,CAAA"}
@@ -1,8 +1,13 @@
1
1
  import type { RegisteredReactDapp } from '@xyo-network/os-react-model';
2
- export declare const useInitializeDapp: (dapp: RegisteredReactDapp) => {
2
+ export declare const useInitializeDappAdHoc: (dapp: RegisteredReactDapp) => {
3
3
  context: import("@xyo-network/os-model").XyOsContext | null | undefined;
4
4
  dappMenu: import("@xyo-network/os-react-runtime").DappMenuProperties;
5
+ dappState: {
6
+ active: boolean;
7
+ minimized: boolean;
8
+ closed: boolean;
9
+ };
5
10
  dappWallet: import("@xyo-network/wallet-model").WalletInstance | undefined;
6
11
  errors: (Error | undefined)[];
7
12
  };
8
- //# sourceMappingURL=useInstallDapp.d.ts.map
13
+ //# sourceMappingURL=useInitializeDappAdHoc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInitializeDappAdHoc.d.ts","sourceRoot":"","sources":["../../../../src/helpers/registration/useInitializeDappAdHoc.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAWtE,eAAO,MAAM,sBAAsB,SAAU,mBAAmB;;;;;;;;;;CA+B/D,CAAA"}
@@ -1,7 +1,7 @@
1
+ export * from './components/host/XyOsHost.tsx';
2
+ export * from './components/index.ts';
1
3
  export { default as accountsDappManifest } from './dapp.manifest.json';
2
- export * from './DappHost.tsx';
3
4
  export * from './Params.ts';
4
5
  export * from './Payloads.ts';
5
6
  export * from './UiParams.ts';
6
- export * from './XyOsHost.tsx';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAA;AAC9C,cAAc,uBAAuB,CAAA;AACrC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AACtE,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA"}
@@ -1,42 +1,55 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
 
4
- // src/dapp.manifest.json
5
- var dapp_manifest_default = {
6
- $schema: "https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/compilations/dapp-package-manifest-schema.json",
7
- nodes: [
8
- {
9
- config: {
10
- accountPath: "0'",
11
- name: "Node",
12
- schema: "network.xyo.node.config"
13
- },
14
- modules: {
15
- private: [],
16
- public: [
17
- {
18
- config: {
19
- accountPath: "1'",
20
- name: "DappArchivist",
21
- dbName: "DappArchivist",
22
- storeName: "payloads",
23
- schema: "network.xyo.archivist.config",
24
- labels: {
25
- "network.xyo.archivist.persistence.scope": "device"
26
- }
27
- }
28
- }
29
- ]
30
- }
4
+ // src/components/host/XyOsHost.tsx
5
+ import { Typography } from "@mui/material";
6
+ import { FlexCol } from "@xylabs/react-flexbox";
7
+ import { usePromise } from "@xylabs/react-promise";
8
+ import { HDWallet } from "@xyo-network/account";
9
+ import { Kernel } from "@xyo-network/kernel";
10
+ import { ModuleFactoryLocator } from "@xyo-network/module-factory-locator";
11
+ import { XyOsUiContextProvider } from "@xyo-network/os-react-runtime";
12
+ import { EventBus, XyOs } from "@xyo-network/os-runtime";
13
+ import React, { useMemo } from "react";
14
+ var XyOsHost = /* @__PURE__ */ __name(({ children, eventBus, kernel, locator: locator2, wallet }) => {
15
+ const [walletToUse] = usePromise(async () => wallet ?? await HDWallet.random(), [
16
+ wallet
17
+ ]);
18
+ const eventBusToUse = useMemo(() => eventBus ?? new EventBus(), [
19
+ kernel
20
+ ]);
21
+ const kernelToUse = useMemo(() => kernel ?? new Kernel(), [
22
+ kernel
23
+ ]);
24
+ const locatorToUse = useMemo(() => locator2 ?? new ModuleFactoryLocator(), [
25
+ locator2
26
+ ]);
27
+ const [os, error] = usePromise(async () => {
28
+ if (walletToUse && kernelToUse && eventBusToUse && locatorToUse) {
29
+ const os2 = new XyOs({
30
+ kernel: kernelToUse,
31
+ eventBus: new EventBus(),
32
+ locator: locatorToUse
33
+ });
34
+ await os2.boot(walletToUse, locatorToUse);
35
+ return os2;
31
36
  }
32
- ],
33
- schema: "network.xyo.manifest.package.dapp"
34
- };
37
+ }, [
38
+ kernelToUse,
39
+ walletToUse,
40
+ locator2,
41
+ eventBusToUse,
42
+ locatorToUse
43
+ ]);
44
+ return os ? /* @__PURE__ */ React.createElement(XyOsUiContextProvider, {
45
+ value: os
46
+ }, children) : /* @__PURE__ */ React.createElement(FlexCol, null, /* @__PURE__ */ React.createElement(Typography, null, "wallet:", walletToUse ? "ready" : "loading"), /* @__PURE__ */ React.createElement(Typography, null, "kernel:", kernelToUse ? "ready" : "loading"), /* @__PURE__ */ React.createElement(Typography, null, "os:", os ? "ready" : "loading"), /* @__PURE__ */ React.createElement(Typography, null, "os-error:", error?.message));
47
+ }, "XyOsHost");
35
48
 
36
- // src/DappHost.tsx
49
+ // src/components/host/DappHost.tsx
37
50
  import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
38
51
  import { DappRendered } from "@xyo-network/os-react-runtime";
39
- import React2, { useMemo as useMemo2 } from "react";
52
+ import React2 from "react";
40
53
 
41
54
  // src/helpers/registration/DappInitializer.ts
42
55
  import { assertEx } from "@xylabs/assert";
@@ -76,12 +89,17 @@ var DappInitializer = class {
76
89
  }
77
90
  };
78
91
 
79
- // src/helpers/registration/useInstallDapp.tsx
80
- import { usePromise } from "@xylabs/react-promise";
92
+ // src/helpers/registration/useInitializeDappAdHoc.tsx
93
+ import { usePromise as usePromise2 } from "@xylabs/react-promise";
81
94
  import { useDappMenu, useManageDappInjectableParamsFromRoute, useManageDappPathFromRoute, useXyOsUiContext } from "@xyo-network/os-react-runtime";
82
- var useInitializeDapp = /* @__PURE__ */ __name((dapp) => {
95
+ var dappState = {
96
+ active: true,
97
+ minimized: false,
98
+ closed: false
99
+ };
100
+ var useInitializeDappAdHoc = /* @__PURE__ */ __name((dapp) => {
83
101
  const xyOs = useXyOsUiContext();
84
- const [installedDapp, nodeCreateError] = usePromise(async () => {
102
+ const [installedDapp, nodeCreateError] = usePromise2(async () => {
85
103
  if (xyOs && dapp) {
86
104
  const installer = new DappInitializer({
87
105
  allowedNames: [
@@ -105,6 +123,7 @@ var useInitializeDapp = /* @__PURE__ */ __name((dapp) => {
105
123
  return {
106
124
  context,
107
125
  dappMenu,
126
+ dappState,
108
127
  dappWallet,
109
128
  errors: [
110
129
  routingError,
@@ -112,70 +131,85 @@ var useInitializeDapp = /* @__PURE__ */ __name((dapp) => {
112
131
  ...injectableErrors
113
132
  ].filter(Boolean)
114
133
  };
115
- }, "useInitializeDapp");
116
-
117
- // src/XyOsHost.tsx
118
- import { Typography } from "@mui/material";
119
- import { FlexCol } from "@xylabs/react-flexbox";
120
- import { usePromise as usePromise2 } from "@xylabs/react-promise";
121
- import { HDWallet } from "@xyo-network/account";
122
- import { Kernel } from "@xyo-network/kernel";
123
- import { ModuleFactoryLocator } from "@xyo-network/module-factory-locator";
124
- import { XyOsUiContextProvider } from "@xyo-network/os-react-runtime";
125
- import { EventBus, XyOs } from "@xyo-network/os-runtime";
126
- import React, { useMemo } from "react";
127
- var XyOsHost = /* @__PURE__ */ __name(({ children, eventBus, kernel, locator: locator2, wallet }) => {
128
- const [walletToUse] = usePromise2(async () => wallet ?? await HDWallet.random(), [
129
- wallet
130
- ]);
131
- const eventBusToUse = useMemo(() => eventBus ?? new EventBus(), [
132
- kernel
133
- ]);
134
- const kernelToUse = useMemo(() => kernel ?? new Kernel(), [
135
- kernel
136
- ]);
137
- const locatorToUse = useMemo(() => locator2 ?? new ModuleFactoryLocator(), [
138
- locator2
139
- ]);
140
- const [os, error] = usePromise2(async () => {
141
- if (walletToUse && kernelToUse && eventBusToUse && locatorToUse) {
142
- const os2 = new XyOs({
143
- kernel: kernelToUse,
144
- eventBus: new EventBus(),
145
- locator: locatorToUse
146
- });
147
- await os2.boot(walletToUse, locatorToUse);
148
- return os2;
149
- }
150
- }, [
151
- kernelToUse,
152
- walletToUse,
153
- locator2,
154
- eventBusToUse,
155
- locatorToUse
156
- ]);
157
- return os ? /* @__PURE__ */ React.createElement(XyOsUiContextProvider, {
158
- value: os
159
- }, children) : /* @__PURE__ */ React.createElement(FlexCol, null, /* @__PURE__ */ React.createElement(Typography, null, "wallet:", walletToUse ? "ready" : "loading"), /* @__PURE__ */ React.createElement(Typography, null, "kernel:", kernelToUse ? "ready" : "loading"), /* @__PURE__ */ React.createElement(Typography, null, "os:", os ? "ready" : "loading"), /* @__PURE__ */ React.createElement(Typography, null, "os-error:", error?.message));
160
- }, "XyOsHost");
134
+ }, "useInitializeDappAdHoc");
161
135
 
162
- // src/DappHost.tsx
163
- var DappHost = /* @__PURE__ */ __name(({ dapp }) => {
164
- const { context, dappMenu, dappWallet, errors } = useInitializeDapp(dapp);
165
- const dappState = useMemo2(() => ({
166
- active: true,
167
- minimized: false,
168
- closed: false
169
- }), []);
170
- return /* @__PURE__ */ React2.createElement(XyOsHost, null, /* @__PURE__ */ React2.createElement(FlexCol2, null, /* @__PURE__ */ React2.createElement(DappRendered, {
136
+ // src/components/host/DappHost.tsx
137
+ var DappHostInner = /* @__PURE__ */ __name(({ dapp }) => {
138
+ const { context, dappMenu, dappState: dappState2, dappWallet, errors } = useInitializeDappAdHoc(dapp);
139
+ return /* @__PURE__ */ React2.createElement(FlexCol2, null, /* @__PURE__ */ React2.createElement(DappRendered, {
171
140
  context,
172
141
  dapp,
173
142
  dappMenuProperties: dappMenu,
174
- dappState,
143
+ dappState: dappState2,
175
144
  dappWallet,
176
145
  errors
177
- })));
178
- }, "DappHost");
146
+ }));
147
+ }, "DappHostInner");
148
+ var DappHost = /* @__PURE__ */ __name(({ dapp }) => /* @__PURE__ */ React2.createElement(XyOsHost, null, /* @__PURE__ */ React2.createElement(DappHostInner, {
149
+ dapp
150
+ })), "DappHost");
151
+
152
+ // src/components/host/Routable.tsx
153
+ import React4 from "react";
154
+ import { BrowserRouter } from "react-router-dom";
155
+
156
+ // src/components/host/Routes.tsx
157
+ import React3 from "react";
158
+ import { Route, Routes } from "react-router-dom";
159
+ var DappRoutes = /* @__PURE__ */ __name((args) => /* @__PURE__ */ React3.createElement(Routes, null, /* @__PURE__ */ React3.createElement(Route, {
160
+ path: "/",
161
+ element: /* @__PURE__ */ React3.createElement(DappHost, args)
162
+ }), /* @__PURE__ */ React3.createElement(Route, {
163
+ path: "/:dappName",
164
+ element: /* @__PURE__ */ React3.createElement(DappHost, args)
165
+ }), /* @__PURE__ */ React3.createElement(Route, {
166
+ path: "/:dappName/:path/*",
167
+ element: /* @__PURE__ */ React3.createElement(DappHost, args)
168
+ }), /* @__PURE__ */ React3.createElement(Route, {
169
+ path: "*",
170
+ element: /* @__PURE__ */ React3.createElement(DappHost, args)
171
+ })), "DappRoutes");
172
+
173
+ // src/components/host/Routable.tsx
174
+ var RoutableDapp = /* @__PURE__ */ __name(({ dapp }) => {
175
+ return /* @__PURE__ */ React4.createElement(BrowserRouter, null, /* @__PURE__ */ React4.createElement(DappRoutes, {
176
+ dapp
177
+ }), /* @__PURE__ */ React4.createElement(DappHost, {
178
+ dapp
179
+ }));
180
+ }, "RoutableDapp");
181
+
182
+ // src/dapp.manifest.json
183
+ var dapp_manifest_default = {
184
+ $schema: "https://raw.githubusercontent.com/XYOracleNetwork/sdk-xyo-client-js/main/packages/manifest/src/compilations/dapp-package-manifest-schema.json",
185
+ nodes: [
186
+ {
187
+ config: {
188
+ accountPath: "0'",
189
+ name: "Node",
190
+ schema: "network.xyo.node.config"
191
+ },
192
+ modules: {
193
+ private: [],
194
+ public: [
195
+ {
196
+ config: {
197
+ accountPath: "1'",
198
+ name: "DappArchivist",
199
+ dbName: "DappArchivist",
200
+ storeName: "payloads",
201
+ schema: "network.xyo.archivist.config",
202
+ labels: {
203
+ "network.xyo.archivist.persistence.scope": "device"
204
+ }
205
+ }
206
+ }
207
+ ]
208
+ }
209
+ }
210
+ ],
211
+ schema: "network.xyo.manifest.package.dapp"
212
+ };
179
213
 
180
214
  // src/Params.ts
181
215
  import { IndexedDbArchivist } from "@xyo-network/archivist-indexeddb";
@@ -292,28 +326,28 @@ var CustomDappMenuPayloads = [
292
326
  CustomDappMenuConfig
293
327
  ];
294
328
 
295
- // src/window/Dapp.tsx
329
+ // src/Dapp.tsx
296
330
  import { ErrorRender } from "@xylabs/react-error";
297
331
  import { DappPathSwitcher, useAddDappMenuItems } from "@xyo-network/os-react-runtime";
298
- import React4 from "react";
332
+ import React6 from "react";
299
333
 
300
- // src/components/Dapp.tsx
334
+ // src/CustomDappPathToComponent.tsx
301
335
  import { FlexRow } from "@xylabs/react-flexbox";
302
- import React3 from "react";
336
+ import React5 from "react";
303
337
  var CustomDappPathToComponent = [
304
338
  {
305
- component: /* @__PURE__ */ React3.createElement(FlexRow, null),
339
+ component: /* @__PURE__ */ React5.createElement(FlexRow, null),
306
340
  path: "home"
307
341
  }
308
342
  ];
309
343
 
310
- // src/window/Dapp.tsx
344
+ // src/Dapp.tsx
311
345
  var CustomDapp = /* @__PURE__ */ __name(() => {
312
346
  const { menuConfig, path, error } = useAddDappMenuItems(CustomDappMenuPayloads);
313
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(ErrorRender, {
347
+ return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(ErrorRender, {
314
348
  error,
315
349
  scope: "CustomDapp"
316
- }), /* @__PURE__ */ React4.createElement(DappPathSwitcher, {
350
+ }), /* @__PURE__ */ React6.createElement(DappPathSwitcher, {
317
351
  activePath: path?.path ?? menuConfig?.defaultPath,
318
352
  pathToComponent: CustomDappPathToComponent
319
353
  }));
@@ -336,7 +370,10 @@ export {
336
370
  CustomDappParams,
337
371
  CustomDappUiParams,
338
372
  DappHost,
373
+ DappHostInner,
339
374
  DappPayloads,
375
+ DappRoutes,
376
+ RoutableDapp,
340
377
  XyOsHost,
341
378
  dapp_manifest_default as accountsDappManifest
342
379
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/dapp.manifest.json","../../src/DappHost.tsx","../../src/helpers/registration/DappInitializer.ts","../../src/helpers/registration/useInstallDapp.tsx","../../src/XyOsHost.tsx","../../src/Params.ts","../../src/icon/Icon.tsx","../../src/Payloads.ts","../../src/window/Dapp.tsx","../../src/components/Dapp.tsx","../../src/UiParams.ts"],"sourcesContent":["{\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\": \"Node\",\n \"schema\": \"network.xyo.node.config\"\n },\n \"modules\": {\n \"private\": [],\n \"public\": [\n {\n \"config\": {\n \"accountPath\": \"1'\",\n \"name\": \"DappArchivist\",\n \"dbName\": \"DappArchivist\",\n \"storeName\": \"payloads\",\n \"schema\": \"network.xyo.archivist.config\",\n \"labels\": {\n \"network.xyo.archivist.persistence.scope\": \"device\"\n }\n }\n }\n ]\n }\n }\n ],\n \"schema\": \"network.xyo.manifest.package.dapp\"\n}","import { FlexCol } from '@xylabs/react-flexbox'\nimport type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport type { DappState } from '@xyo-network/os-react-runtime'\nimport { DappRendered } from '@xyo-network/os-react-runtime'\nimport React, { useMemo } from 'react'\n\nimport { useInitializeDapp } from './helpers/index.ts'\nimport { XyOsHost } from './XyOsHost.tsx'\n\nexport interface DappHostProps {\n dapp: RegisteredReactDapp\n}\n\nexport const DappHost: React.FC<DappHostProps> = ({ dapp }) => {\n const {\n context, dappMenu, dappWallet, errors,\n } = useInitializeDapp(dapp)\n\n const dappState: DappState = useMemo(() => ({\n active: true, minimized: false, closed: false,\n }), [])\n\n return (\n <XyOsHost>\n <FlexCol>\n <DappRendered context={context} dapp={dapp} dappMenuProperties={dappMenu} dappState={dappState} dappWallet={dappWallet} errors={errors} />\n </FlexCol>\n </XyOsHost>\n )\n}\n","import { assertEx } from '@xylabs/assert'\nimport type { WindowDappNodeSet, XyOsContext } from '@xyo-network/os-model'\nimport type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport { DappSeedPhraseRepository, RunningDappCache } from '@xyo-network/os-runtime'\n\nexport interface DappInitializerConfig {\n allowedNames: string[]\n dapp: RegisteredReactDapp\n xnsNetwork: string | undefined\n xnsNodeUrl: string | undefined\n xyOs: XyOsContext\n}\n\nexport class DappInitializer {\n private _config: DappInitializerConfig\n\n constructor(config: DappInitializerConfig) {\n this._config = config\n }\n\n get config() {\n return assertEx(this._config, () => new Error('Options not set'))\n }\n\n async install(): Promise<WindowDappNodeSet> {\n const dappWithWalletId = await this.installDappWallet()\n\n return await this.initializeDappContext(dappWithWalletId)\n }\n\n private async initializeDappContext(dappWithWalletId: RegisteredReactDapp): Promise<WindowDappNodeSet> {\n const {\n allowedNames, xnsNetwork, xnsNodeUrl, xyOs,\n } = this.config\n\n return await RunningDappCache.findOrCreate(dappWithWalletId, xyOs, allowedNames ?? [], xnsNodeUrl, xnsNetwork)\n }\n\n private async installDappWallet(): Promise<RegisteredReactDapp> {\n const { xyOs, dapp } = this.config\n const dappSeedPhraseRepository = new DappSeedPhraseRepository(xyOs, [dapp.config.name])\n const walletId = await dappSeedPhraseRepository.findOrCreate(dapp.config.name)\n\n // Update the dapp with the walletId\n return {\n ...dapp,\n config: {\n ...dapp.config,\n walletId,\n },\n }\n }\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'\n\nimport { DappInitializer } from './DappInitializer.ts'\n\nexport const useInitializeDapp = (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 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 { HDWallet, type WalletInstance } from '@xyo-network/account'\nimport { Kernel } from '@xyo-network/kernel'\nimport type { KernelExternal } from '@xyo-network/kernel-model'\nimport { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport { XyOsUiContextProvider } from '@xyo-network/os-react-runtime'\nimport { EventBus, XyOs } from '@xyo-network/os-runtime'\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 { IndexedDbArchivist } from '@xyo-network/archivist-indexeddb'\nimport { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport type { UnregisteredDapp } from '@xyo-network/os-model'\n\nimport { CustomDappIconSvg } from './icon/index.ts'\n\nconst locator = new ModuleFactoryLocator()\nlocator.register(IndexedDbArchivist)\n\nexport const CustomDappParams: UnregisteredDapp['params'] = {\n iconSvg: CustomDappIconSvg,\n locator,\n}\n\nexport { CustomDappParams as default }\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' assert { 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 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 '../components/index.ts'\nimport { CustomDappMenuPayloads } from '../Payloads.js'\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 { CustomDappParams } from './Params.js'\nimport { CustomDapp } from './window/index.ts'\n\nexport const CustomDappUiParams: UnregisteredReactDapp['params'] = {\n ...CustomDappParams,\n modes: { window: { component: CustomDapp } },\n}\n\nexport { CustomDappUiParams as default }\n"],"mappings":";;;;AAAA;AAAA,EACE,SAAW;AAAA,EACX,OAAS;AAAA,IACP;AAAA,MACE,QAAU;AAAA,QACR,aAAe;AAAA,QACf,MAAQ;AAAA,QACR,QAAU;AAAA,MACZ;AAAA,MACA,SAAW;AAAA,QACT,SAAW,CAAC;AAAA,QACZ,QAAU;AAAA,UACR;AAAA,YACE,QAAU;AAAA,cACR,aAAe;AAAA,cACf,MAAQ;A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QAAQ;MAAEC,WAAWC;IAAW;EAAE;AAC7C;","names":["FlexCol","DappRendered","React","useMemo","assertEx","DappSeedPhraseRepository","RunningDappCache","DappInitializer","_config","constructor","config","assertEx","Error","install","dappWithWalletId","installDappWallet","initializeDappContext","allowedNames","xnsNetwork","xnsNodeUrl","xyOs","RunningDappCache","findOrCreate","dapp","dappSeedPhraseRepository","DappSeedPhraseRepository","name","walletId","usePromise","useDappMenu","useManageDappInjectableParamsFromRoute","useManageDappPathFromRoute","useXyOsUiContext","useInitializeDapp","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","HDWallet","Kernel","ModuleFactoryLocator","XyOsUiContextProvider","EventBus","XyOs","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","DappHost","dapp","context","dappMenu","dappWallet","errors","useInitializeDapp","dappState","useMemo","active","minimized","closed","React","XyOsHost","FlexCol","DappRendered","dappMenuProperties","IndexedDbArchivist","ModuleFactoryLocator","CustomDappIconSvg","locator","ModuleFactoryLocator","register","IndexedDbArchivist","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
+ {"version":3,"sources":["../../src/components/host/XyOsHost.tsx","../../src/components/host/DappHost.tsx","../../src/helpers/registration/DappInitializer.ts","../../src/helpers/registration/useInitializeDappAdHoc.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 { Typography } from '@mui/material'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { usePromise } from '@xylabs/react-promise'\nimport { HDWallet, type WalletInstance } from '@xyo-network/account'\nimport { Kernel } from '@xyo-network/kernel'\nimport type { KernelExternal } from '@xyo-network/kernel-model'\nimport { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport { XyOsUiContextProvider } from '@xyo-network/os-react-runtime'\nimport { EventBus, XyOs } from '@xyo-network/os-runtime'\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 { 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 { assertEx } from '@xylabs/assert'\nimport type { WindowDappNodeSet, XyOsContext } from '@xyo-network/os-model'\nimport type { RegisteredReactDapp } from '@xyo-network/os-react-model'\nimport { DappSeedPhraseRepository, RunningDappCache } from '@xyo-network/os-runtime'\n\nexport interface DappInitializerConfig {\n allowedNames: string[]\n dapp: RegisteredReactDapp\n xnsNetwork: string | undefined\n xnsNodeUrl: string | undefined\n xyOs: XyOsContext\n}\n\nexport class DappInitializer {\n private _config: DappInitializerConfig\n\n constructor(config: DappInitializerConfig) {\n this._config = config\n }\n\n get config() {\n return assertEx(this._config, () => new Error('Options not set'))\n }\n\n async install(): Promise<WindowDappNodeSet> {\n const dappWithWalletId = await this.installDappWallet()\n\n return await this.initializeDappContext(dappWithWalletId)\n }\n\n private async initializeDappContext(dappWithWalletId: RegisteredReactDapp): Promise<WindowDappNodeSet> {\n const {\n allowedNames, xnsNetwork, xnsNodeUrl, xyOs,\n } = this.config\n\n return await RunningDappCache.findOrCreate(dappWithWalletId, xyOs, allowedNames ?? [], xnsNodeUrl, xnsNetwork)\n }\n\n private async installDappWallet(): Promise<RegisteredReactDapp> {\n const { xyOs, dapp } = this.config\n const dappSeedPhraseRepository = new DappSeedPhraseRepository(xyOs, [dapp.config.name])\n const walletId = await dappSeedPhraseRepository.findOrCreate(dapp.config.name)\n\n // Update the dapp with the walletId\n return {\n ...dapp,\n config: {\n ...dapp.config,\n walletId,\n },\n }\n }\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'\n\nimport { DappInitializer } from './DappInitializer.ts'\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 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\": \"Node\",\n \"schema\": \"network.xyo.node.config\"\n },\n \"modules\": {\n \"private\": [],\n \"public\": [\n {\n \"config\": {\n \"accountPath\": \"1'\",\n \"name\": \"DappArchivist\",\n \"dbName\": \"DappArchivist\",\n \"storeName\": \"payloads\",\n \"schema\": \"network.xyo.archivist.config\",\n \"labels\": {\n \"network.xyo.archivist.persistence.scope\": \"device\"\n }\n }\n }\n ]\n }\n }\n ],\n \"schema\": \"network.xyo.manifest.package.dapp\"\n}","import { IndexedDbArchivist } from '@xyo-network/archivist-indexeddb'\nimport { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport type { UnregisteredDapp } from '@xyo-network/os-model'\n\nimport { CustomDappIconSvg } from './icon/index.ts'\n\nconst locator = new ModuleFactoryLocator()\nlocator.register(IndexedDbArchivist)\n\nexport const CustomDappParams: UnregisteredDapp['params'] = {\n iconSvg: CustomDappIconSvg,\n locator,\n}\n\nexport { CustomDappParams as default }\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' assert { 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 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.js'\n\nexport const CustomDappUiParams: UnregisteredReactDapp['params'] = {\n ...CustomDappParams,\n modes: { window: { component: CustomDapp } },\n}\n\nexport { CustomDappUiParams as default }\n"],"mappings":";;;;AAAA,SAASA,kBAAkB;AAC3B,SAASC,eAAe;AACxB,SAASC,kBAAkB;AAC3B,SAASC,gBAAqC;AAC9C,SAAS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B;EACtCC,QAAQ;EACRC,WAAW;EACXN,MAAMR;EACNS,QAAQM;EACRC,MAAM;EACNf;AACF;AAEO,IAAMgB,eAAe;EAACf;EAAkBU;;AAI/C,IAAMM,sBAA8D;EAClE;IACEC,MAAM;IACNC,aAAa;IACbX,QAAQY;IACRC,SAAS;;;IAGTC,QAAQ;EACV;EACA;IACEJ,MAAM;IACNC,aAAa;IACbX,QAAQY;IACRC,SAAS;;;IAGTC,QAAQ;EACV;;AAGF,IAAMC,uBAA0C;EAC9CC,aAAa;EACbhB,QAAQiB;AACV;AAEO,IAAMC,yBAAyB;KAAIT;EAAqBM;;;;ACxE/D,SAASI,mBAAmB;AAC5B,SAASC,kBAAkBC,2BAA2B;AACtD,OAAOC,YAAW;;;ACFlB,SAASC,eAAe;AAExB,OAAOC,YAAW;AAEX,IAAMC,4BAA+C;EAC1D;IACEC,WAAW,gBAAAF,OAAA,cAACD,SAAAA,IAAAA;IACZI,MAAM;EACR;;;;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":["Typography","FlexCol","usePromise","HDWallet","Kernel","ModuleFactoryLocator","XyOsUiContextProvider","EventBus","XyOs","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","FlexCol","DappRendered","React","assertEx","DappSeedPhraseRepository","RunningDappCache","DappInitializer","_config","constructor","config","assertEx","Error","install","dappWithWalletId","installDappWallet","initializeDappContext","allowedNames","xnsNetwork","xnsNodeUrl","xyOs","RunningDappCache","findOrCreate","dapp","dappSeedPhraseRepository","DappSeedPhraseRepository","name","walletId","usePromise","useDappMenu","useManageDappInjectableParamsFromRoute","useManageDappPathFromRoute","useXyOsUiContext","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","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","IndexedDbArchivist","ModuleFactoryLocator","CustomDappIconSvg","locator","ModuleFactoryLocator","register","IndexedDbArchivist","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,3 +1,3 @@
1
1
  import type { PathToComponent } from '@xyo-network/os-react-runtime';
2
2
  export declare const CustomDappPathToComponent: PathToComponent[];
3
- //# sourceMappingURL=Dapp.d.ts.map
3
+ //# sourceMappingURL=CustomDappPathToComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomDappPathToComponent.d.ts","sourceRoot":"","sources":["../../src/CustomDappPathToComponent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAGpE,eAAO,MAAM,yBAAyB,EAAE,eAAe,EAKtD,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dapp.d.ts","sourceRoot":"","sources":["../../src/Dapp.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU,+CAWtB,CAAA"}
@@ -3,5 +3,6 @@ import React from 'react';
3
3
  export interface DappHostProps {
4
4
  dapp: RegisteredReactDapp;
5
5
  }
6
+ export declare const DappHostInner: React.FC<DappHostProps>;
6
7
  export declare const DappHost: React.FC<DappHostProps>;
7
8
  //# sourceMappingURL=DappHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DappHost.d.ts","sourceRoot":"","sources":["../../../../src/components/host/DappHost.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEtE,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiBjD,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAI5C,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { DappHostProps } from './DappHost.tsx';
3
+ export declare const RoutableDapp: React.FC<DappHostProps>;
4
+ //# sourceMappingURL=Routable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Routable.d.ts","sourceRoot":"","sources":["../../../../src/components/host/Routable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAInD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAOhD,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { type DappHostProps } from './DappHost.tsx';
3
+ export declare const DappRoutes: React.FC<DappHostProps>;
4
+ //# sourceMappingURL=Routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Routes.d.ts","sourceRoot":"","sources":["../../../../src/components/host/Routes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAE7D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA2B9C,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XyOsHost.d.ts","sourceRoot":"","sources":["../../../../src/components/host/XyOsHost.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAE1E,OAAO,EAAE,QAAQ,EAAQ,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,OAAO,CAAC,EAAE,oBAAoB,CAAA;IAC9B,MAAM,CAAC,EAAE,cAAc,CAAA;CACxB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwC5C,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from './DappHost.tsx';
2
+ export * from './Routable.tsx';
3
+ export * from './Routes.tsx';
4
+ export * from './XyOsHost.tsx';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/host/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA"}