@xyo-network/os-react-runtime 4.2.0-rc.3 → 4.2.0-rc.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.
- package/dist/browser/index.mjs +16 -13
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/modules/Dapp/Page/Row.d.ts +2 -1
- package/dist/browser/modules/Dapp/Page/Row.d.ts.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/Page/Row.tsx +4 -5
- package/src/modules/Dapp/modules/Window/DappWindow.tsx +11 -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,20 @@ 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);
|
|
3151
|
+
useManageDappPathFromRoute(context, name);
|
|
3152
|
+
useManageDappInjectableParamsFromRoute(context);
|
|
3152
3153
|
const { activePath, error: menuError, menuConfig, menuItemsVisible, onPathChange } = useDappMenu(context, name);
|
|
3153
|
-
const
|
|
3154
|
+
const resolvedErrors = [
|
|
3155
|
+
nodeCreateError,
|
|
3156
|
+
menuError,
|
|
3157
|
+
...errors ?? []
|
|
3158
|
+
].filter(Boolean);
|
|
3159
|
+
const hasErrors = resolvedErrors.length > 0;
|
|
3154
3160
|
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
3161
|
appBar: /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(DappBar, {
|
|
3156
3162
|
context,
|
|
@@ -3179,20 +3185,17 @@ var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWall
|
|
|
3179
3185
|
}
|
|
3180
3186
|
}),
|
|
3181
3187
|
/* Ensure that loading goes away when error occurs */
|
|
3182
|
-
splashScreen:
|
|
3188
|
+
splashScreen: hasErrors ? null : /* @__PURE__ */ React25.createElement(DappLoadingFlexbox, {
|
|
3183
3189
|
minimize: !!minimized,
|
|
3184
3190
|
name,
|
|
3185
3191
|
open: !!active
|
|
3186
3192
|
})
|
|
3187
|
-
},
|
|
3193
|
+
}, hasErrors ? /* @__PURE__ */ React25.createElement(FlexCol10, {
|
|
3188
3194
|
padding: 2
|
|
3189
|
-
},
|
|
3190
|
-
error: resolvedError,
|
|
3191
|
-
scope: "DappWindow"
|
|
3192
|
-
}) : null, errors.map((error, index) => /* @__PURE__ */ React25.createElement(ErrorRender3, {
|
|
3195
|
+
}, resolvedErrors?.map((error, index) => /* @__PURE__ */ React25.createElement(ErrorRender3, {
|
|
3193
3196
|
key: index,
|
|
3194
3197
|
error,
|
|
3195
|
-
scope: "
|
|
3198
|
+
scope: "DappWindow"
|
|
3196
3199
|
}))) : null, /* @__PURE__ */ React25.createElement(WalletProvider, {
|
|
3197
3200
|
rootWallet: dappWallet
|
|
3198
3201
|
}, context === null ? null : /* @__PURE__ */ React25.createElement(XyOsUiContextProvider, {
|
|
@@ -3287,12 +3290,11 @@ var DividerChip = /* @__PURE__ */ __name(({ registeredDapps, ...props }) => {
|
|
|
3287
3290
|
}, "DividerChip");
|
|
3288
3291
|
|
|
3289
3292
|
// src/modules/Dapp/Page/Row.tsx
|
|
3290
|
-
var DappsRow = /* @__PURE__ */ __name(({ chipLabel, installType, registeredDappsSet, xnsNetwork, xnsNodeUrl }) => {
|
|
3293
|
+
var DappsRow = /* @__PURE__ */ __name(({ chipLabel, currentIntent, installType, registeredDappsSet, xnsNetwork, xnsNodeUrl }) => {
|
|
3291
3294
|
const filteredRegisteredDappSets = useMemo14(() => DappInstallTypeFilters[installType](registeredDappsSet), [
|
|
3292
3295
|
installType,
|
|
3293
3296
|
registeredDappsSet
|
|
3294
3297
|
]);
|
|
3295
|
-
const { intentPayload } = useDappIntentListener(null);
|
|
3296
3298
|
return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(Divider4, {
|
|
3297
3299
|
variant: "middle",
|
|
3298
3300
|
sx: {
|
|
@@ -3306,7 +3308,7 @@ var DappsRow = /* @__PURE__ */ __name(({ chipLabel, installType, registeredDapps
|
|
|
3306
3308
|
in: !!filteredRegisteredDappSets?.length,
|
|
3307
3309
|
timeout: 1e3
|
|
3308
3310
|
}, /* @__PURE__ */ React29.createElement(StyledGridContainer, null, filteredRegisteredDappSets?.map((dappSet) => /* @__PURE__ */ React29.createElement(DappContainerMemo, {
|
|
3309
|
-
currentIntent
|
|
3311
|
+
currentIntent,
|
|
3310
3312
|
key: dappSet.dapp.config.name,
|
|
3311
3313
|
dappSet,
|
|
3312
3314
|
xnsNodeUrl,
|
|
@@ -4921,6 +4923,7 @@ export {
|
|
|
4921
4923
|
useDappIntentListener2,
|
|
4922
4924
|
useDappMenu,
|
|
4923
4925
|
useDappMenuCaller,
|
|
4926
|
+
useDappMenuDependencies,
|
|
4924
4927
|
useDappRegistrationResults,
|
|
4925
4928
|
useDappRegistry,
|
|
4926
4929
|
useDappSeedPhraseRepository,
|