@xyo-network/os-react-runtime 4.2.0-rc.3 → 4.2.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.mjs +12 -10
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/DappWindow.d.ts +1 -0
- package/dist/browser/modules/Dapp/modules/Window/DappWindow.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/hooks/index.d.ts +1 -0
- package/dist/browser/modules/Dapp/modules/Window/hooks/index.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/modules/Dapp/modules/Window/DappWindow.tsx +9 -12
- package/src/modules/Dapp/modules/Window/hooks/index.ts +1 -0
- package/src/modules/Dapp/modules/Window/hooks/menu/useDappMenu.tsx +1 -1
package/dist/browser/index.mjs
CHANGED
|
@@ -3143,14 +3143,18 @@ var DappMenuDrawer = /* @__PURE__ */ __name(({ activePath, context, iconSvg, nam
|
|
|
3143
3143
|
}, "DappMenuDrawer");
|
|
3144
3144
|
|
|
3145
3145
|
// src/modules/Dapp/modules/Window/DappWindow.tsx
|
|
3146
|
-
var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWallet,
|
|
3146
|
+
var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWallet, errors, nodeCreateError }) => {
|
|
3147
3147
|
const { DappComponent, name, scrollable = true, version } = decomposeDappSet(dappSet);
|
|
3148
3148
|
const { active, minimized } = dappState ?? {};
|
|
3149
3149
|
const TypedDappComponent = useMemo12(() => DappComponent, []);
|
|
3150
|
-
const errors = useManageDappBasedOffRoute(intent, name, context);
|
|
3151
3150
|
useSyncOsRegisteredAccessInterfaces(context);
|
|
3152
3151
|
const { activePath, error: menuError, menuConfig, menuItemsVisible, onPathChange } = useDappMenu(context, name);
|
|
3153
|
-
const
|
|
3152
|
+
const resolvedErrors = [
|
|
3153
|
+
nodeCreateError,
|
|
3154
|
+
menuError,
|
|
3155
|
+
...errors ?? []
|
|
3156
|
+
].filter(Boolean);
|
|
3157
|
+
const hasErrors = resolvedErrors.length > 0;
|
|
3154
3158
|
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, active ? /* @__PURE__ */ React25.createElement(Helmet, null, /* @__PURE__ */ React25.createElement("title", null, activePath ? `${new NameTransforms4(activePath).deSlug()} | ` : "", " ", name, " ", "dApp")) : null, /* @__PURE__ */ React25.createElement(ErrorBoundary, null, /* @__PURE__ */ React25.createElement(DappChrome, {
|
|
3155
3159
|
appBar: /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(DappBar, {
|
|
3156
3160
|
context,
|
|
@@ -3179,20 +3183,17 @@ var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWall
|
|
|
3179
3183
|
}
|
|
3180
3184
|
}),
|
|
3181
3185
|
/* Ensure that loading goes away when error occurs */
|
|
3182
|
-
splashScreen:
|
|
3186
|
+
splashScreen: hasErrors ? null : /* @__PURE__ */ React25.createElement(DappLoadingFlexbox, {
|
|
3183
3187
|
minimize: !!minimized,
|
|
3184
3188
|
name,
|
|
3185
3189
|
open: !!active
|
|
3186
3190
|
})
|
|
3187
|
-
},
|
|
3191
|
+
}, hasErrors ? /* @__PURE__ */ React25.createElement(FlexCol10, {
|
|
3188
3192
|
padding: 2
|
|
3189
|
-
},
|
|
3190
|
-
error: resolvedError,
|
|
3191
|
-
scope: "DappWindow"
|
|
3192
|
-
}) : null, errors.map((error, index) => /* @__PURE__ */ React25.createElement(ErrorRender3, {
|
|
3193
|
+
}, resolvedErrors?.map((error, index) => /* @__PURE__ */ React25.createElement(ErrorRender3, {
|
|
3193
3194
|
key: index,
|
|
3194
3195
|
error,
|
|
3195
|
-
scope: "
|
|
3196
|
+
scope: "DappWindow"
|
|
3196
3197
|
}))) : null, /* @__PURE__ */ React25.createElement(WalletProvider, {
|
|
3197
3198
|
rootWallet: dappWallet
|
|
3198
3199
|
}, context === null ? null : /* @__PURE__ */ React25.createElement(XyOsUiContextProvider, {
|
|
@@ -4921,6 +4922,7 @@ export {
|
|
|
4921
4922
|
useDappIntentListener2,
|
|
4922
4923
|
useDappMenu,
|
|
4923
4924
|
useDappMenuCaller,
|
|
4925
|
+
useDappMenuDependencies,
|
|
4924
4926
|
useDappRegistrationResults,
|
|
4925
4927
|
useDappRegistry,
|
|
4926
4928
|
useDappSeedPhraseRepository,
|