@xyo-network/os-react-runtime 4.2.6 → 4.2.7
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 +24 -20
- package/dist/browser/index.mjs.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/DappWindow.d.ts.map +1 -1
- package/dist/browser/modules/Dapp/modules/Window/menu/StyledListItems.d.ts +2 -2
- package/package.json +9 -9
- package/src/modules/Dapp/modules/Window/DappWindow.tsx +2 -2
- package/src/modules/Dapp/modules/Window/menu/StyledListItems.tsx +1 -1
package/dist/browser/index.mjs
CHANGED
|
@@ -167,7 +167,7 @@ import { FlexCol as FlexCol13 } from "@xylabs/react-flexbox";
|
|
|
167
167
|
import React35 from "react";
|
|
168
168
|
|
|
169
169
|
// src/modules/Dapp/Container.tsx
|
|
170
|
-
import React28, { memo, useMemo as
|
|
170
|
+
import React28, { memo, useMemo as useMemo14 } from "react";
|
|
171
171
|
|
|
172
172
|
// src/hooks/access-requests/useBuildDappAccessRequestResource.ts
|
|
173
173
|
import { usePromise } from "@xylabs/react-promise";
|
|
@@ -2069,7 +2069,7 @@ var DefaultComingSoon = /* @__PURE__ */ __name(({ children, desc = defaultDescri
|
|
|
2069
2069
|
// src/modules/Dapp/modules/Window/DappWindow.tsx
|
|
2070
2070
|
import { Snackbar } from "@mui/material";
|
|
2071
2071
|
import { ErrorBoundary, ErrorRender as ErrorRender3 } from "@xylabs/react-error";
|
|
2072
|
-
import React19 from "react";
|
|
2072
|
+
import React19, { useMemo as useMemo13 } from "react";
|
|
2073
2073
|
|
|
2074
2074
|
// src/modules/Dapp/modules/Window/hooks/lib/DappPathHelpers.ts
|
|
2075
2075
|
import { NameTransforms as NameTransforms2 } from "@xyo-network/os-runtime";
|
|
@@ -2488,10 +2488,13 @@ var DappWindow = /* @__PURE__ */ __name(({ children, context, dapp, dappMenuProp
|
|
|
2488
2488
|
useSyncOsRegisteredAccessInterfaces(context);
|
|
2489
2489
|
const routingError = useManageDappPathFromRoute(context, name);
|
|
2490
2490
|
const injectableErrors = useManageDappInjectableParamsFromRoute(context);
|
|
2491
|
-
const resolvedErrors = [
|
|
2491
|
+
const resolvedErrors = useMemo13(() => [
|
|
2492
2492
|
...injectableErrors,
|
|
2493
2493
|
routingError
|
|
2494
|
-
]
|
|
2494
|
+
].filter(Boolean), [
|
|
2495
|
+
injectableErrors,
|
|
2496
|
+
routingError
|
|
2497
|
+
]);
|
|
2495
2498
|
return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(ErrorBoundary, null, /* @__PURE__ */ React19.createElement(DappMetaTags, {
|
|
2496
2499
|
active,
|
|
2497
2500
|
activePath: dappMenuProperties?.activePath,
|
|
@@ -2786,7 +2789,8 @@ var StyledMenuIconWrapSpan = styled3("span", {
|
|
|
2786
2789
|
flexDirection: "column"
|
|
2787
2790
|
}));
|
|
2788
2791
|
var StyledListItemButton = styled3(ListItemButton, {
|
|
2789
|
-
name: "StyledListItemButton"
|
|
2792
|
+
name: "StyledListItemButton",
|
|
2793
|
+
shouldForwardProp: /* @__PURE__ */ __name((prop) => prop !== "active", "shouldForwardProp")
|
|
2790
2794
|
})(({ theme, active }) => {
|
|
2791
2795
|
const activeOrHoverColor = theme.palette.primary.main;
|
|
2792
2796
|
return {
|
|
@@ -3232,7 +3236,7 @@ var DappRendered = /* @__PURE__ */ __name(({ context, dapp, dappMenuProperties,
|
|
|
3232
3236
|
var DappContainer = /* @__PURE__ */ __name(({ currentIntent, dappSet, xnsNodeUrl, xnsNetwork }) => {
|
|
3233
3237
|
const { dapp, dappIcon } = dappSet;
|
|
3234
3238
|
const { dappWallet, context, nodeCreateError } = useDappContextCreator(xnsNodeUrl, xnsNetwork, dapp, currentIntent);
|
|
3235
|
-
const dappState =
|
|
3239
|
+
const dappState = useMemo14(() => {
|
|
3236
3240
|
if (currentIntent?.targetDappId === dapp.config.name) {
|
|
3237
3241
|
return deriveDappState(currentIntent);
|
|
3238
3242
|
}
|
|
@@ -3241,13 +3245,13 @@ var DappContainer = /* @__PURE__ */ __name(({ currentIntent, dappSet, xnsNodeUrl
|
|
|
3241
3245
|
dapp
|
|
3242
3246
|
]);
|
|
3243
3247
|
const { error: menuError, ...dappMenuProperties } = useDappMenu(context, dapp?.config.name);
|
|
3244
|
-
const errors =
|
|
3248
|
+
const errors = useMemo14(() => [
|
|
3245
3249
|
nodeCreateError,
|
|
3246
3250
|
menuError
|
|
3247
3251
|
].filter(Boolean), [
|
|
3248
3252
|
nodeCreateError
|
|
3249
3253
|
]);
|
|
3250
|
-
const dappWindowProps =
|
|
3254
|
+
const dappWindowProps = useMemo14(() => ({
|
|
3251
3255
|
context,
|
|
3252
3256
|
dapp,
|
|
3253
3257
|
dappMenuProperties,
|
|
@@ -3290,7 +3294,7 @@ var ContainerFlexbox = /* @__PURE__ */ __name(({ children, containerProps, scrol
|
|
|
3290
3294
|
|
|
3291
3295
|
// src/modules/Dapp/Page/Row.tsx
|
|
3292
3296
|
import { Divider as Divider4, Fade as Fade2, styled as styled5 } from "@mui/material";
|
|
3293
|
-
import React31, { useMemo as
|
|
3297
|
+
import React31, { useMemo as useMemo15 } from "react";
|
|
3294
3298
|
|
|
3295
3299
|
// src/modules/Dapp/Page/DividerChip.tsx
|
|
3296
3300
|
import { Chip as Chip2, CircularProgress } from "@mui/material";
|
|
@@ -3314,7 +3318,7 @@ var DividerChip = /* @__PURE__ */ __name(({ registeredDapps, ...props }) => {
|
|
|
3314
3318
|
|
|
3315
3319
|
// src/modules/Dapp/Page/Row.tsx
|
|
3316
3320
|
var DappsRow = /* @__PURE__ */ __name(({ chipLabel, currentIntent, installType, registeredDappsSet, xnsNetwork, xnsNodeUrl }) => {
|
|
3317
|
-
const filteredRegisteredDappSets =
|
|
3321
|
+
const filteredRegisteredDappSets = useMemo15(() => DappInstallTypeFilters[installType](registeredDappsSet), [
|
|
3318
3322
|
installType,
|
|
3319
3323
|
registeredDappsSet
|
|
3320
3324
|
]);
|
|
@@ -3354,11 +3358,11 @@ var StyledGridContainer = styled5("div", {
|
|
|
3354
3358
|
import { SignalCellularAltOutlined } from "@mui/icons-material";
|
|
3355
3359
|
import { Tooltip as Tooltip5, useTheme as useTheme8 } from "@mui/material";
|
|
3356
3360
|
import { useColorSchemeEx as useColorSchemeEx3 } from "@xylabs/react-invertible-theme";
|
|
3357
|
-
import React32, { useMemo as
|
|
3361
|
+
import React32, { useMemo as useMemo18 } from "react";
|
|
3358
3362
|
|
|
3359
3363
|
// src/modules/network/hooks/useOsNetwork.tsx
|
|
3360
3364
|
import { OsPubSubNetworkReadyEvent } from "@xyo-network/os-runtime";
|
|
3361
|
-
import { useMemo as
|
|
3365
|
+
import { useMemo as useMemo16 } from "react";
|
|
3362
3366
|
|
|
3363
3367
|
// src/modules/network/hooks/lib/createNetworkState.ts
|
|
3364
3368
|
import { assertEx as assertEx8 } from "@xylabs/assert";
|
|
@@ -3386,7 +3390,7 @@ var createNetworkState = /* @__PURE__ */ __name((stackReady) => {
|
|
|
3386
3390
|
var useOsNetwork = /* @__PURE__ */ __name(() => {
|
|
3387
3391
|
const context = useXyOsUiContext();
|
|
3388
3392
|
const stackReady = useStackReady(OsPubSubNetworkReadyEvent, "osPubSubNetworkStack", context);
|
|
3389
|
-
const networkState =
|
|
3393
|
+
const networkState = useMemo16(() => {
|
|
3390
3394
|
return createNetworkState(stackReady);
|
|
3391
3395
|
}, [
|
|
3392
3396
|
context,
|
|
@@ -3397,11 +3401,11 @@ var useOsNetwork = /* @__PURE__ */ __name(() => {
|
|
|
3397
3401
|
|
|
3398
3402
|
// src/modules/network/hooks/useXyoPublicNetwork.tsx
|
|
3399
3403
|
import { OsXyoPublicNetworkReadyEvent } from "@xyo-network/os-runtime";
|
|
3400
|
-
import { useMemo as
|
|
3404
|
+
import { useMemo as useMemo17 } from "react";
|
|
3401
3405
|
var useXyoPublicNetwork = /* @__PURE__ */ __name(() => {
|
|
3402
3406
|
const context = useXyOsUiContext();
|
|
3403
3407
|
const stackReady = useStackReady(OsXyoPublicNetworkReadyEvent, "xyoPublicNetworkStack", context);
|
|
3404
|
-
const networkState =
|
|
3408
|
+
const networkState = useMemo17(() => {
|
|
3405
3409
|
return createNetworkState(stackReady);
|
|
3406
3410
|
}, [
|
|
3407
3411
|
context,
|
|
@@ -3481,7 +3485,7 @@ var NetworkLoadingIndicator = /* @__PURE__ */ __name(({ highContrast }) => {
|
|
|
3481
3485
|
const successColor = highContrast ? highContrastSuccessColor : theme.palette.success.main;
|
|
3482
3486
|
const highContrastErrorColor = darkMode ? theme.palette.success.dark : theme.palette.error.main;
|
|
3483
3487
|
const errorColor = highContrast ? highContrastErrorColor : theme.palette.error.main;
|
|
3484
|
-
const NetworkComponent =
|
|
3488
|
+
const NetworkComponent = useMemo18(() => {
|
|
3485
3489
|
if (networkReady) {
|
|
3486
3490
|
const connectionReady = true;
|
|
3487
3491
|
return connectionReady ? () => /* @__PURE__ */ React32.createElement(Tooltip5, {
|
|
@@ -4453,10 +4457,10 @@ import React54 from "react";
|
|
|
4453
4457
|
|
|
4454
4458
|
// src/dapps/shared/table/head/hooks/useVisibleColumns.tsx
|
|
4455
4459
|
import { useMediaQuery as useMediaQuery2 } from "@mui/material";
|
|
4456
|
-
import { useMemo as
|
|
4460
|
+
import { useMemo as useMemo19 } from "react";
|
|
4457
4461
|
var useVisibleColumns = /* @__PURE__ */ __name((tableHeadCells) => {
|
|
4458
4462
|
const isMedium = useMediaQuery2((theme) => theme.breakpoints.down("lg"));
|
|
4459
|
-
const VisibleTableCells =
|
|
4463
|
+
const VisibleTableCells = useMemo19(() => {
|
|
4460
4464
|
return isMedium ? tableHeadCells.filter((cell) => cell.showOnMobile) : tableHeadCells;
|
|
4461
4465
|
}, [
|
|
4462
4466
|
isMedium,
|
|
@@ -4535,7 +4539,7 @@ var NextIteratorFlexbox = /* @__PURE__ */ __name(({ next: changePage, loading, .
|
|
|
4535
4539
|
|
|
4536
4540
|
// src/settings/Theme/ThemeProvider.tsx
|
|
4537
4541
|
import { InvertibleMuiThemeProvider } from "@xylabs/react-invertible-theme";
|
|
4538
|
-
import React56, { useMemo as
|
|
4542
|
+
import React56, { useMemo as useMemo20 } from "react";
|
|
4539
4543
|
|
|
4540
4544
|
// src/settings/Theme/ThemeCssVars.ts
|
|
4541
4545
|
import { alpha as alpha9, createTheme, darken as darken2, lighten } from "@mui/material";
|
|
@@ -4830,7 +4834,7 @@ var ThemeCssVars = createTheme({
|
|
|
4830
4834
|
|
|
4831
4835
|
// src/settings/Theme/ThemeProvider.tsx
|
|
4832
4836
|
var AppOsThemeProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
4833
|
-
const initialValue =
|
|
4837
|
+
const initialValue = useMemo20(() => {
|
|
4834
4838
|
const validValues = [
|
|
4835
4839
|
"light",
|
|
4836
4840
|
"dark"
|