@xyo-network/os-react-runtime 4.2.0-rc.2 → 4.2.0-rc.3
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 +10 -11
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/modules/Dapp/Page/Row.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/DappWindow.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/hooks/lib/deriveDappState.d.ts +3 -3
- package/dist/browser/modules/Dapp/modules/Window/hooks/lib/deriveDappState.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/modules/Dapp/Container.tsx +2 -2
- package/src/modules/Dapp/Page/Row.tsx +2 -3
- package/src/modules/Dapp/modules/Window/DappWindow.tsx +2 -4
- package/src/modules/Dapp/modules/Window/hooks/lib/deriveDappState.ts +6 -6
package/dist/browser/index.mjs
CHANGED
|
@@ -2156,14 +2156,14 @@ var DappPathHelpers = {
|
|
|
2156
2156
|
|
|
2157
2157
|
// src/modules/Dapp/modules/Window/hooks/lib/deriveDappState.ts
|
|
2158
2158
|
import { DappIntentTypes as DappIntentTypes7 } from "@xyo-network/os-model";
|
|
2159
|
-
var deriveDappState = /* @__PURE__ */ __name((intent
|
|
2159
|
+
var deriveDappState = /* @__PURE__ */ __name((intent) => {
|
|
2160
2160
|
const minimized = intent?.intent === DappIntentTypes7.Minimize;
|
|
2161
|
-
const
|
|
2162
|
-
const
|
|
2161
|
+
const active = intent?.intent === DappIntentTypes7.Launch;
|
|
2162
|
+
const closed = intent?.intent === DappIntentTypes7.Close;
|
|
2163
2163
|
return {
|
|
2164
2164
|
active,
|
|
2165
|
-
|
|
2166
|
-
|
|
2165
|
+
closed,
|
|
2166
|
+
minimized
|
|
2167
2167
|
};
|
|
2168
2168
|
}, "deriveDappState");
|
|
2169
2169
|
|
|
@@ -3145,7 +3145,7 @@ var DappMenuDrawer = /* @__PURE__ */ __name(({ activePath, context, iconSvg, nam
|
|
|
3145
3145
|
// src/modules/Dapp/modules/Window/DappWindow.tsx
|
|
3146
3146
|
var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWallet, intent, nodeCreateError }) => {
|
|
3147
3147
|
const { DappComponent, name, scrollable = true, version } = decomposeDappSet(dappSet);
|
|
3148
|
-
const { active, minimized
|
|
3148
|
+
const { active, minimized } = dappState ?? {};
|
|
3149
3149
|
const TypedDappComponent = useMemo12(() => DappComponent, []);
|
|
3150
3150
|
const errors = useManageDappBasedOffRoute(intent, name, context);
|
|
3151
3151
|
useSyncOsRegisteredAccessInterfaces(context);
|
|
@@ -3182,7 +3182,7 @@ var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWall
|
|
|
3182
3182
|
splashScreen: resolvedError ? null : /* @__PURE__ */ React25.createElement(DappLoadingFlexbox, {
|
|
3183
3183
|
minimize: !!minimized,
|
|
3184
3184
|
name,
|
|
3185
|
-
open: !!
|
|
3185
|
+
open: !!active
|
|
3186
3186
|
})
|
|
3187
3187
|
}, resolvedError || errors?.length > 0 ? /* @__PURE__ */ React25.createElement(FlexCol10, {
|
|
3188
3188
|
padding: 2
|
|
@@ -3223,11 +3223,10 @@ var DappContainer = /* @__PURE__ */ __name(({ currentIntent, dappSet, xnsNodeUrl
|
|
|
3223
3223
|
const { dappWallet, context, nodeCreateError } = useDappContextCreator(xnsNodeUrl, xnsNetwork, dapp, currentIntent);
|
|
3224
3224
|
const dappState = useMemo13(() => {
|
|
3225
3225
|
if (currentIntent?.targetDappId === dapp.config.name) {
|
|
3226
|
-
return deriveDappState(currentIntent
|
|
3226
|
+
return deriveDappState(currentIntent);
|
|
3227
3227
|
}
|
|
3228
3228
|
}, [
|
|
3229
3229
|
currentIntent,
|
|
3230
|
-
context,
|
|
3231
3230
|
dapp
|
|
3232
3231
|
]);
|
|
3233
3232
|
return /* @__PURE__ */ React26.createElement(DappIconButton, {
|
|
@@ -3306,9 +3305,9 @@ var DappsRow = /* @__PURE__ */ __name(({ chipLabel, installType, registeredDapps
|
|
|
3306
3305
|
})), filteredRegisteredDappSets?.length ? /* @__PURE__ */ React29.createElement(Fade2, {
|
|
3307
3306
|
in: !!filteredRegisteredDappSets?.length,
|
|
3308
3307
|
timeout: 1e3
|
|
3309
|
-
}, /* @__PURE__ */ React29.createElement(StyledGridContainer, null, filteredRegisteredDappSets?.map((dappSet
|
|
3308
|
+
}, /* @__PURE__ */ React29.createElement(StyledGridContainer, null, filteredRegisteredDappSets?.map((dappSet) => /* @__PURE__ */ React29.createElement(DappContainerMemo, {
|
|
3310
3309
|
currentIntent: intentPayload,
|
|
3311
|
-
key:
|
|
3310
|
+
key: dappSet.dapp.config.name,
|
|
3312
3311
|
dappSet,
|
|
3313
3312
|
xnsNodeUrl,
|
|
3314
3313
|
xnsNetwork
|