@xyo-network/os-react-runtime 4.2.0-rc.1 → 4.2.0-rc.11

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 (43) hide show
  1. package/dist/browser/DappPathSwitcher.d.ts.map +1 -1
  2. package/dist/browser/hooks/os/useDappContextCreator.d.ts.map +1 -1
  3. package/dist/browser/index.mjs +87 -90
  4. package/dist/browser/index.mjs.map +1 -1
  5. package/dist/browser/modules/Dapp/Container.d.ts +1 -0
  6. package/dist/browser/modules/Dapp/Container.d.ts.map +1 -1
  7. package/dist/browser/modules/Dapp/Page/Row.d.ts +2 -1
  8. package/dist/browser/modules/Dapp/Page/Row.d.ts.map +1 -1
  9. package/dist/browser/modules/Dapp/modules/Window/DappWindow.d.ts +4 -3
  10. package/dist/browser/modules/Dapp/modules/Window/DappWindow.d.ts.map +1 -1
  11. package/dist/browser/modules/Dapp/modules/Window/hooks/index.d.ts +1 -0
  12. package/dist/browser/modules/Dapp/modules/Window/hooks/index.d.ts.map +1 -1
  13. package/dist/browser/modules/Dapp/modules/Window/hooks/lib/deriveDappState.d.ts +3 -3
  14. package/dist/browser/modules/Dapp/modules/Window/hooks/lib/deriveDappState.d.ts.map +1 -1
  15. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/index.d.ts +4 -4
  16. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/index.d.ts.map +1 -1
  17. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.d.ts +1 -1
  18. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.d.ts.map +1 -1
  19. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappPathFromRoute.d.ts +2 -0
  20. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappPathFromRoute.d.ts.map +1 -1
  21. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappStateFromRoute.d.ts +2 -2
  22. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappStateFromRoute.d.ts.map +1 -1
  23. package/dist/browser/modules/Dapp/modules/Window/hooks/route/index.d.ts +0 -1
  24. package/dist/browser/modules/Dapp/modules/Window/hooks/route/index.d.ts.map +1 -1
  25. package/package.json +9 -9
  26. package/src/DappPathSwitcher.tsx +11 -9
  27. package/src/hooks/os/useDappContextCreator.tsx +20 -15
  28. package/src/hooks/os/useWidgetDapps.tsx +1 -1
  29. package/src/modules/Dapp/Container.tsx +10 -4
  30. package/src/modules/Dapp/Page/Row.tsx +8 -10
  31. package/src/modules/Dapp/modules/Window/DappWindow.tsx +16 -21
  32. package/src/modules/Dapp/modules/Window/hooks/index.ts +1 -0
  33. package/src/modules/Dapp/modules/Window/hooks/lib/deriveDappState.ts +6 -6
  34. package/src/modules/Dapp/modules/Window/hooks/menu/useDappMenu.tsx +1 -1
  35. package/src/modules/Dapp/modules/Window/hooks/route/helpers/RoutingNodes.md +7 -0
  36. package/src/modules/Dapp/modules/Window/hooks/route/helpers/index.ts +4 -4
  37. package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.tsx +1 -1
  38. package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappPathFromRoute.tsx +2 -0
  39. package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappStateFromRoute.tsx +26 -20
  40. package/src/modules/Dapp/modules/Window/hooks/route/index.ts +0 -1
  41. package/dist/browser/modules/Dapp/modules/Window/hooks/route/useManageDappBasedOffRoute.d.ts +0 -19
  42. package/dist/browser/modules/Dapp/modules/Window/hooks/route/useManageDappBasedOffRoute.d.ts.map +0 -1
  43. package/src/modules/Dapp/modules/Window/hooks/route/useManageDappBasedOffRoute.tsx +0 -33
@@ -1 +1 @@
1
- {"version":3,"file":"DappPathSwitcher.d.ts","sourceRoot":"","sources":["../../src/DappPathSwitcher.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,eAAe,CAAC,SAAS,SAAS,MAAM,GAAG,MAAM;IAChE,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE,SAAS,CAAA;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,eAAe,EAAE,CAAA;CACpC;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAyC5D,CAAA"}
1
+ {"version":3,"file":"DappPathSwitcher.d.ts","sourceRoot":"","sources":["../../src/DappPathSwitcher.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,eAAe,CAAC,SAAS,SAAS,MAAM,GAAG,MAAM;IAChE,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE,SAAS,CAAA;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,eAAe,EAAE,CAAA;CACpC;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA2C5D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDappContextCreator.d.ts","sourceRoot":"","sources":["../../../../src/hooks/os/useDappContextCreator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EAAE,cAAc,EAAE,iBAAiB,EAC9C,MAAM,uBAAuB,CAAA;AAS9B;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,eACpB,MAAM,GAAG,SAAS,cAClB,MAAM,GAAG,SAAS,SACvB,cAAc,kBACL,UAAU,iBACX,MAAM,EAAE,8BAEtB,iBAAiB,GAAG;IACrB,eAAe,CAAC,EAAE,KAAK,CAAA;CA2DxB,CAAA"}
1
+ {"version":3,"file":"useDappContextCreator.d.ts","sourceRoot":"","sources":["../../../../src/hooks/os/useDappContextCreator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EAAE,cAAc,EAAE,iBAAiB,EAC9C,MAAM,uBAAuB,CAAA;AAS9B;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,eACpB,MAAM,GAAG,SAAS,cAClB,MAAM,GAAG,SAAS,SACvB,cAAc,kBACL,UAAU,iBACX,MAAM,EAAE,8BAEtB,iBAAiB,GAAG;IACrB,eAAe,CAAC,EAAE,KAAK,CAAA;CAgExB,CAAA"}
@@ -167,7 +167,7 @@ import { FlexCol as FlexCol13 } from "@xylabs/react-flexbox";
167
167
  import React33 from "react";
168
168
 
169
169
  // src/modules/Dapp/Container.tsx
170
- import React26, { useMemo as useMemo13 } from "react";
170
+ import React26, { memo, useMemo as useMemo13 } from "react";
171
171
 
172
172
  // src/hooks/access-requests/useBuildDappAccessRequestResource.ts
173
173
  import { usePromise } from "@xylabs/react-promise";
@@ -639,6 +639,7 @@ var useDappContextCreator = /* @__PURE__ */ __name((xnsNodeUrl, xnsNetwork, dapp
639
639
  dappWallet: void 0
640
640
  });
641
641
  const [dappWindowNodeError, setDappWindowNodeError] = useState3();
642
+ const targetedDapp = !!(dapp && context && currentIntent?.targetDappId === dapp?.config.name);
642
643
  const windowDappNodeSetRef = useRef(windowDappNodeSet);
643
644
  useEffect7(() => {
644
645
  windowDappNodeSetRef.current = windowDappNodeSet;
@@ -646,7 +647,7 @@ var useDappContextCreator = /* @__PURE__ */ __name((xnsNodeUrl, xnsNetwork, dapp
646
647
  windowDappNodeSet
647
648
  ]);
648
649
  const createNode = useCallback3(async () => {
649
- if (dapp && context) {
650
+ if (targetedDapp) {
650
651
  try {
651
652
  const windowDappNodeSet2 = await RunningDappCache.findOrCreate(dapp, context, allowedNames ?? [], xnsNodeUrl, xnsNetwork);
652
653
  setWindowDappNodeSet(windowDappNodeSet2);
@@ -656,6 +657,7 @@ var useDappContextCreator = /* @__PURE__ */ __name((xnsNodeUrl, xnsNetwork, dapp
656
657
  }
657
658
  }, [
658
659
  dapp,
660
+ currentIntent,
659
661
  context,
660
662
  allowedNames
661
663
  ]);
@@ -670,22 +672,24 @@ var useDappContextCreator = /* @__PURE__ */ __name((xnsNodeUrl, xnsNetwork, dapp
670
672
  createNode
671
673
  ]);
672
674
  useAsyncEffect2(async () => {
673
- switch (currentIntent?.intent) {
674
- case DappIntentTypes4.Launch: {
675
- await createNode();
676
- break;
677
- }
678
- case DappIntentTypes4.Close: {
679
- if (windowDappNodeSetRef.current.context) {
680
- await DappContextCreator.resetDappArchivist(windowDappNodeSetRef.current.context);
681
- setWindowDappNodeSet({
682
- context: null,
683
- dappWallet: void 0
684
- });
675
+ if (targetedDapp) {
676
+ switch (currentIntent?.intent) {
677
+ case DappIntentTypes4.Launch: {
678
+ await createNode();
679
+ break;
685
680
  }
686
- break;
681
+ case DappIntentTypes4.Close: {
682
+ if (windowDappNodeSetRef.current.context) {
683
+ await DappContextCreator.resetDappArchivist(windowDappNodeSetRef.current.context);
684
+ setWindowDappNodeSet({
685
+ context: null,
686
+ dappWallet: void 0
687
+ });
688
+ }
689
+ break;
690
+ }
691
+ case DappIntentTypes4.Minimize:
687
692
  }
688
- case DappIntentTypes4.Minimize:
689
693
  }
690
694
  }, [
691
695
  createNode,
@@ -1017,7 +1021,7 @@ var WidgetCaller = class extends OsCallerBase {
1017
1021
  var useWidgetDapps = /* @__PURE__ */ __name((registeredDapps, widgetTrayLayout) => {
1018
1022
  const context = useXyOsUiContext();
1019
1023
  return usePromise8(async () => {
1020
- if (registeredDapps && context && widgetTrayLayout) {
1024
+ if (registeredDapps && registeredDapps.length > 0 && context && widgetTrayLayout) {
1021
1025
  const caller = new WidgetCaller(context, registeredDapps, widgetTrayLayout);
1022
1026
  return await caller.buildWidgetComponents();
1023
1027
  }
@@ -2152,14 +2156,14 @@ var DappPathHelpers = {
2152
2156
 
2153
2157
  // src/modules/Dapp/modules/Window/hooks/lib/deriveDappState.ts
2154
2158
  import { DappIntentTypes as DappIntentTypes7 } from "@xyo-network/os-model";
2155
- var deriveDappState = /* @__PURE__ */ __name((intent, context) => {
2159
+ var deriveDappState = /* @__PURE__ */ __name((intent) => {
2156
2160
  const minimized = intent?.intent === DappIntentTypes7.Minimize;
2157
- const open = intent?.intent === DappIntentTypes7.Launch;
2158
- const active = !!(context && open);
2161
+ const active = intent?.intent === DappIntentTypes7.Launch;
2162
+ const closed = intent?.intent === DappIntentTypes7.Close;
2159
2163
  return {
2160
2164
  active,
2161
- minimized,
2162
- open
2165
+ closed,
2166
+ minimized
2163
2167
  };
2164
2168
  }, "deriveDappState");
2165
2169
 
@@ -2405,62 +2409,47 @@ var useManageDappPathFromRoute = /* @__PURE__ */ __name((context, dappName) => {
2405
2409
  import { usePromise as usePromise14 } from "@xylabs/react-promise";
2406
2410
  import { DappIntentTypes as DappIntentTypes9 } from "@xyo-network/os-model";
2407
2411
  import { DappIntentCaller as DappIntentCaller5, NameTransforms as NameTransforms3 } from "@xyo-network/os-runtime";
2408
- import { useNavigationType, useParams as useParams5 } from "react-router-dom";
2409
- var useManageDappStateFromRoute = /* @__PURE__ */ __name((intentPayload, dappName) => {
2412
+ import { useRef as useRef6 } from "react";
2413
+ import { useParams as useParams5 } from "react-router-dom";
2414
+ var useManageDappStateFromRoute = /* @__PURE__ */ __name((intentPayload) => {
2410
2415
  const params = useParams5();
2411
2416
  const { dappName: dappNameParam } = params;
2412
2417
  const sendIntent = useSendDappIntent();
2413
- const navigationType = useNavigationType();
2414
2418
  const intentCaller = useDappIntentCaller();
2419
+ const dappNameParamRef = useRef6();
2420
+ const intentRef = useRef6();
2415
2421
  usePromise14(async () => {
2416
2422
  const launched = intentPayload?.intent === DappIntentTypes9.Launch;
2417
- if (launched && dappNameParam === void 0 && sendIntent && navigationType === "POP") {
2418
- const closeIntent = DappIntentCaller5.buildIntent(DappIntentCaller5.OsDappName, DappIntentTypes9.Close, dappName);
2423
+ const dappNameParamRemoved = !!dappNameParamRef.current && dappNameParam === void 0;
2424
+ if (launched && dappNameParamRemoved && sendIntent) {
2425
+ const closeIntent = DappIntentCaller5.buildIntent(DappIntentCaller5.OsDappName, DappIntentTypes9.Close);
2419
2426
  await sendIntent(closeIntent);
2420
2427
  }
2428
+ dappNameParamRef.current = dappNameParam;
2421
2429
  }, [
2422
- dappName,
2423
2430
  dappNameParam,
2424
2431
  intentPayload,
2425
- navigationType,
2426
2432
  sendIntent
2427
2433
  ]);
2428
2434
  usePromise14(async () => {
2429
- if (dappNameParam && dappName && sendIntent && intentCaller) {
2435
+ if (dappNameParam && sendIntent && intentCaller) {
2430
2436
  const dappNameParamDeSlugged = new NameTransforms3(dappNameParam).deSlug();
2431
- const notLaunched = intentPayload?.intent !== DappIntentTypes9.Launch;
2432
- const paramMatchesDappName = dappNameParamDeSlugged === dappName;
2433
- if (notLaunched && paramMatchesDappName) {
2434
- const latestIntent = await intentCaller.latestIntent();
2435
- const existing = latestIntent && latestIntent.targetDappId === dappNameParamDeSlugged;
2436
- if (!existing) {
2437
- const launchIntent = DappIntentCaller5.buildIntent(DappIntentCaller5.OsDappName, DappIntentTypes9.Launch, dappNameParamDeSlugged);
2438
- await sendIntent(launchIntent);
2439
- return;
2440
- }
2437
+ const autoLaunchNeeded = intentRef.current === void 0 && dappNameParam;
2438
+ if (autoLaunchNeeded) {
2439
+ const launchIntent = DappIntentCaller5.buildIntent(DappIntentCaller5.OsDappName, DappIntentTypes9.Launch, dappNameParamDeSlugged);
2440
+ await sendIntent(launchIntent);
2441
+ intentRef.current = launchIntent;
2442
+ return;
2441
2443
  }
2442
2444
  }
2443
2445
  }, [
2444
2446
  dappNameParam,
2445
- dappName,
2446
2447
  sendIntent,
2447
2448
  intentCaller,
2448
2449
  intentPayload?.intent
2449
2450
  ]);
2450
2451
  }, "useManageDappStateFromRoute");
2451
2452
 
2452
- // src/modules/Dapp/modules/Window/hooks/route/useManageDappBasedOffRoute.tsx
2453
- var useManageDappBasedOffRoute = /* @__PURE__ */ __name((intentPayload, dappName, context) => {
2454
- const handleIntentError = useManageDappIntentRequest(context, dappName);
2455
- useManageDappStateFromRoute(intentPayload, dappName);
2456
- useManageDappPathFromRoute(context, dappName);
2457
- const injectableErrors = useManageDappInjectableParamsFromRoute(context);
2458
- return [
2459
- ...injectableErrors,
2460
- handleIntentError
2461
- ];
2462
- }, "useManageDappBasedOffRoute");
2463
-
2464
2453
  // src/modules/Dapp/modules/Window/NodeManifest.tsx
2465
2454
  import { usePromise as usePromise15 } from "@xylabs/react-promise";
2466
2455
  import { useProvidedNode } from "@xyo-network/react-node";
@@ -3139,14 +3128,20 @@ var DappMenuDrawer = /* @__PURE__ */ __name(({ activePath, context, iconSvg, nam
3139
3128
  }, "DappMenuDrawer");
3140
3129
 
3141
3130
  // src/modules/Dapp/modules/Window/DappWindow.tsx
3142
- var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWallet, intent, nodeCreateError }) => {
3131
+ var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWallet, errors, nodeCreateError }) => {
3143
3132
  const { DappComponent, name, scrollable = true, version } = decomposeDappSet(dappSet);
3144
- const { active, minimized, open } = dappState ?? {};
3133
+ const { active, minimized } = dappState ?? {};
3145
3134
  const TypedDappComponent = useMemo12(() => DappComponent, []);
3146
- const errors = useManageDappBasedOffRoute(intent, name, context);
3147
3135
  useSyncOsRegisteredAccessInterfaces(context);
3136
+ const routingErrors = useManageDappInjectableParamsFromRoute(context);
3148
3137
  const { activePath, error: menuError, menuConfig, menuItemsVisible, onPathChange } = useDappMenu(context, name);
3149
- const resolvedError = nodeCreateError || menuError;
3138
+ const resolvedErrors = [
3139
+ ...routingErrors,
3140
+ nodeCreateError,
3141
+ menuError,
3142
+ ...errors ?? []
3143
+ ].filter(Boolean);
3144
+ const hasErrors = resolvedErrors.length > 0;
3150
3145
  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, {
3151
3146
  appBar: /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(DappBar, {
3152
3147
  context,
@@ -3156,7 +3151,7 @@ var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWall
3156
3151
  })),
3157
3152
  height: "100dvh",
3158
3153
  width: "100dvw",
3159
- largeScreenMenu: /* @__PURE__ */ React25.createElement(DappMenuDrawer, {
3154
+ largeScreenMenu: active && /* @__PURE__ */ React25.createElement(DappMenuDrawer, {
3160
3155
  context,
3161
3156
  name,
3162
3157
  version,
@@ -3165,7 +3160,7 @@ var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWall
3165
3160
  menuConfig,
3166
3161
  menuItems: menuItemsVisible
3167
3162
  }),
3168
- smallScreenMenu: /* @__PURE__ */ React25.createElement(DappBottomNavigation, {
3163
+ smallScreenMenu: active && /* @__PURE__ */ React25.createElement(DappBottomNavigation, {
3169
3164
  activePath,
3170
3165
  onPathChange,
3171
3166
  menuConfig,
@@ -3175,20 +3170,17 @@ var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWall
3175
3170
  }
3176
3171
  }),
3177
3172
  /* Ensure that loading goes away when error occurs */
3178
- splashScreen: resolvedError ? null : /* @__PURE__ */ React25.createElement(DappLoadingFlexbox, {
3173
+ splashScreen: hasErrors ? null : /* @__PURE__ */ React25.createElement(DappLoadingFlexbox, {
3179
3174
  minimize: !!minimized,
3180
3175
  name,
3181
- open: !!open
3176
+ open: !!active
3182
3177
  })
3183
- }, resolvedError || errors?.length > 0 ? /* @__PURE__ */ React25.createElement(FlexCol10, {
3178
+ }, hasErrors ? /* @__PURE__ */ React25.createElement(FlexCol10, {
3184
3179
  padding: 2
3185
- }, resolvedError ? /* @__PURE__ */ React25.createElement(ErrorRender3, {
3186
- error: resolvedError,
3187
- scope: "DappWindow"
3188
- }) : null, errors.map((error, index) => /* @__PURE__ */ React25.createElement(ErrorRender3, {
3189
- key: index,
3180
+ }, resolvedErrors?.map((error) => /* @__PURE__ */ React25.createElement(ErrorRender3, {
3181
+ key: error?.message,
3190
3182
  error,
3191
- scope: "DappWindowErrors"
3183
+ scope: "DappWindow"
3192
3184
  }))) : null, /* @__PURE__ */ React25.createElement(WalletProvider, {
3193
3185
  rootWallet: dappWallet
3194
3186
  }, context === null ? null : /* @__PURE__ */ React25.createElement(XyOsUiContextProvider, {
@@ -3217,13 +3209,13 @@ var DappWindow = /* @__PURE__ */ __name(({ context, dappSet, dappState, dappWall
3217
3209
  var DappContainer = /* @__PURE__ */ __name(({ currentIntent, dappSet, xnsNodeUrl, xnsNetwork }) => {
3218
3210
  const { dapp, dappIcon } = dappSet;
3219
3211
  const { dappWallet, context, nodeCreateError } = useDappContextCreator(xnsNodeUrl, xnsNetwork, dapp, currentIntent);
3212
+ useManageDappPathFromRoute(context, dapp.config.name);
3220
3213
  const dappState = useMemo13(() => {
3221
3214
  if (currentIntent?.targetDappId === dapp.config.name) {
3222
- return deriveDappState(currentIntent, context);
3215
+ return deriveDappState(currentIntent);
3223
3216
  }
3224
3217
  }, [
3225
3218
  currentIntent,
3226
- context,
3227
3219
  dapp
3228
3220
  ]);
3229
3221
  return /* @__PURE__ */ React26.createElement(DappIconButton, {
@@ -3240,6 +3232,7 @@ var DappContainer = /* @__PURE__ */ __name(({ currentIntent, dappSet, xnsNodeUrl
3240
3232
  nodeCreateError
3241
3233
  }));
3242
3234
  }, "DappContainer");
3235
+ var DappContainerMemo = /* @__PURE__ */ memo(DappContainer);
3243
3236
 
3244
3237
  // src/modules/Dapp/ContainerFlexbox.tsx
3245
3238
  import { Container as Container2 } from "@mui/material";
@@ -3283,12 +3276,11 @@ var DividerChip = /* @__PURE__ */ __name(({ registeredDapps, ...props }) => {
3283
3276
  }, "DividerChip");
3284
3277
 
3285
3278
  // src/modules/Dapp/Page/Row.tsx
3286
- var DappsRow = /* @__PURE__ */ __name(({ chipLabel, installType, registeredDappsSet, xnsNetwork, xnsNodeUrl }) => {
3279
+ var DappsRow = /* @__PURE__ */ __name(({ chipLabel, currentIntent, installType, registeredDappsSet, xnsNetwork, xnsNodeUrl }) => {
3287
3280
  const filteredRegisteredDappSets = useMemo14(() => DappInstallTypeFilters[installType](registeredDappsSet), [
3288
3281
  installType,
3289
3282
  registeredDappsSet
3290
3283
  ]);
3291
- const { intentPayload } = useDappIntentListener(null);
3292
3284
  return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(Divider4, {
3293
3285
  variant: "middle",
3294
3286
  sx: {
@@ -3301,9 +3293,9 @@ var DappsRow = /* @__PURE__ */ __name(({ chipLabel, installType, registeredDapps
3301
3293
  })), filteredRegisteredDappSets?.length ? /* @__PURE__ */ React29.createElement(Fade2, {
3302
3294
  in: !!filteredRegisteredDappSets?.length,
3303
3295
  timeout: 1e3
3304
- }, /* @__PURE__ */ React29.createElement(StyledGridContainer, null, filteredRegisteredDappSets?.map((dappSet, index) => /* @__PURE__ */ React29.createElement(DappContainer, {
3305
- currentIntent: intentPayload,
3306
- key: index,
3296
+ }, /* @__PURE__ */ React29.createElement(StyledGridContainer, null, filteredRegisteredDappSets?.map((dappSet) => /* @__PURE__ */ React29.createElement(DappContainerMemo, {
3297
+ currentIntent,
3298
+ key: dappSet.dapp.config.name,
3307
3299
  dappSet,
3308
3300
  xnsNodeUrl,
3309
3301
  xnsNetwork
@@ -4013,7 +4005,7 @@ var WidgetCardExamples = /* @__PURE__ */ __name(() => {
4013
4005
  // src/DappPathSwitcher.tsx
4014
4006
  import { animated as animated3, useTransition } from "@react-spring/web";
4015
4007
  import { ErrorRender as ErrorRender4 } from "@xylabs/react-error";
4016
- import React42 from "react";
4008
+ import React42, { useMemo as useMemo18 } from "react";
4017
4009
  var DappPathSwitcher = /* @__PURE__ */ __name(({ activePath, pathToComponent }) => {
4018
4010
  const transitions = useTransition(activePath, {
4019
4011
  enter: {
@@ -4031,7 +4023,18 @@ var DappPathSwitcher = /* @__PURE__ */ __name(({ activePath, pathToComponent })
4031
4023
  });
4032
4024
  const possibleZIndex = pathToComponent?.findIndex((item) => item.path === activePath);
4033
4025
  const zIndex = possibleZIndex !== -1 && possibleZIndex !== void 0 ? possibleZIndex : 1;
4034
- return /* @__PURE__ */ React42.createElement(React42.Fragment, null, transitions((transitionProps, activePath2) => /* @__PURE__ */ React42.createElement(animated3.div, {
4026
+ const activeComponent = useMemo18(() => {
4027
+ const activeIndex = pathToComponent?.findIndex(({ path: componentPath }) => activePath === componentPath);
4028
+ const activeItem = pathToComponent && activeIndex !== -1 && activeIndex !== void 0 ? pathToComponent[activeIndex] : void 0;
4029
+ return activeItem ? activeItem.component : /* @__PURE__ */ React42.createElement(ErrorRender4, {
4030
+ error: new Error(`No component found for path: ${activePath}`),
4031
+ scope: "DappPathSwitcher"
4032
+ });
4033
+ }, [
4034
+ activePath,
4035
+ pathToComponent
4036
+ ]);
4037
+ return /* @__PURE__ */ React42.createElement(React42.Fragment, null, transitions((transitionProps) => /* @__PURE__ */ React42.createElement(animated3.div, {
4035
4038
  style: {
4036
4039
  ...transitionProps,
4037
4040
  alignItems: "stretch",
@@ -4047,14 +4050,7 @@ var DappPathSwitcher = /* @__PURE__ */ __name(({ activePath, pathToComponent })
4047
4050
  top: 0,
4048
4051
  zIndex
4049
4052
  }
4050
- }, (() => {
4051
- const activeIndex = pathToComponent?.findIndex(({ path: componentPath }) => activePath2 === componentPath);
4052
- const activeItem = pathToComponent && activeIndex !== -1 && activeIndex !== void 0 ? pathToComponent[activeIndex] : void 0;
4053
- return activeItem ? activeItem.component : /* @__PURE__ */ React42.createElement(ErrorRender4, {
4054
- error: new Error(`No component found for path: ${activePath2}`),
4055
- scope: "DappPathSwitcher"
4056
- });
4057
- })())));
4053
+ }, activeComponent)));
4058
4054
  }, "DappPathSwitcher");
4059
4055
 
4060
4056
  // src/dapps/shared/accounts/components/AnimatedComponents/GenericAnimations/ShiftAnimation.tsx
@@ -4424,10 +4420,10 @@ import React52 from "react";
4424
4420
 
4425
4421
  // src/dapps/shared/table/head/hooks/useVisibleColumns.tsx
4426
4422
  import { useMediaQuery as useMediaQuery2 } from "@mui/material";
4427
- import { useMemo as useMemo18 } from "react";
4423
+ import { useMemo as useMemo19 } from "react";
4428
4424
  var useVisibleColumns = /* @__PURE__ */ __name((tableHeadCells) => {
4429
4425
  const isMedium = useMediaQuery2((theme) => theme.breakpoints.down("lg"));
4430
- const VisibleTableCells = useMemo18(() => {
4426
+ const VisibleTableCells = useMemo19(() => {
4431
4427
  return isMedium ? tableHeadCells.filter((cell) => cell.showOnMobile) : tableHeadCells;
4432
4428
  }, [
4433
4429
  isMedium,
@@ -4506,7 +4502,7 @@ var NextIteratorFlexbox = /* @__PURE__ */ __name(({ next: changePage, loading, .
4506
4502
 
4507
4503
  // src/settings/Theme/ThemeProvider.tsx
4508
4504
  import { InvertibleMuiThemeProvider } from "@xylabs/react-invertible-theme";
4509
- import React54, { useMemo as useMemo19 } from "react";
4505
+ import React54, { useMemo as useMemo20 } from "react";
4510
4506
 
4511
4507
  // src/settings/Theme/ThemeCssVars.ts
4512
4508
  import { alpha as alpha9, createTheme, darken as darken2, lighten } from "@mui/material";
@@ -4801,7 +4797,7 @@ var ThemeCssVars = createTheme({
4801
4797
 
4802
4798
  // src/settings/Theme/ThemeProvider.tsx
4803
4799
  var AppOsThemeProvider = /* @__PURE__ */ __name(({ children }) => {
4804
- const initialValue = useMemo19(() => {
4800
+ const initialValue = useMemo20(() => {
4805
4801
  const validValues = [
4806
4802
  "light",
4807
4803
  "dark"
@@ -4844,6 +4840,7 @@ export {
4844
4840
  DappChrome,
4845
4841
  DappChromeLarge,
4846
4842
  DappContainer,
4843
+ DappContainerMemo,
4847
4844
  DappInstallTypeFilters,
4848
4845
  DappIntentResourceHooks,
4849
4846
  DappMenuDrawer,
@@ -4916,6 +4913,7 @@ export {
4916
4913
  useDappIntentListener2,
4917
4914
  useDappMenu,
4918
4915
  useDappMenuCaller,
4916
+ useDappMenuDependencies,
4919
4917
  useDappRegistrationResults,
4920
4918
  useDappRegistry,
4921
4919
  useDappSeedPhraseRepository,
@@ -4924,7 +4922,6 @@ export {
4924
4922
  useExposedNode,
4925
4923
  useIntentResourceViews,
4926
4924
  useKernel,
4927
- useManageDappBasedOffRoute,
4928
4925
  useManageDappInjectableParamsFromRoute,
4929
4926
  useManageDappIntentRequest,
4930
4927
  useManageDappPathFromRoute,