@xyo-network/os-react-runtime 4.2.0-rc.12 → 4.2.0-rc.13
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.
|
@@ -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,
|
|
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"}
|
package/dist/browser/index.mjs
CHANGED
|
@@ -4005,7 +4005,7 @@ var WidgetCardExamples = /* @__PURE__ */ __name(() => {
|
|
|
4005
4005
|
// src/DappPathSwitcher.tsx
|
|
4006
4006
|
import { animated as animated3, useTransition } from "@react-spring/web";
|
|
4007
4007
|
import { ErrorRender as ErrorRender4 } from "@xylabs/react-error";
|
|
4008
|
-
import React42
|
|
4008
|
+
import React42 from "react";
|
|
4009
4009
|
var DappPathSwitcher = /* @__PURE__ */ __name(({ activePath, pathToComponent }) => {
|
|
4010
4010
|
const transitions = useTransition(activePath, {
|
|
4011
4011
|
enter: {
|
|
@@ -4023,18 +4023,7 @@ var DappPathSwitcher = /* @__PURE__ */ __name(({ activePath, pathToComponent })
|
|
|
4023
4023
|
});
|
|
4024
4024
|
const possibleZIndex = pathToComponent?.findIndex((item) => item.path === activePath);
|
|
4025
4025
|
const zIndex = possibleZIndex !== -1 && possibleZIndex !== void 0 ? possibleZIndex : 1;
|
|
4026
|
-
|
|
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, {
|
|
4026
|
+
return /* @__PURE__ */ React42.createElement(React42.Fragment, null, transitions((transitionProps, activePathRef) => /* @__PURE__ */ React42.createElement(animated3.div, {
|
|
4038
4027
|
style: {
|
|
4039
4028
|
...transitionProps,
|
|
4040
4029
|
alignItems: "stretch",
|
|
@@ -4050,7 +4039,14 @@ var DappPathSwitcher = /* @__PURE__ */ __name(({ activePath, pathToComponent })
|
|
|
4050
4039
|
top: 0,
|
|
4051
4040
|
zIndex
|
|
4052
4041
|
}
|
|
4053
|
-
},
|
|
4042
|
+
}, (() => {
|
|
4043
|
+
const activeIndex = pathToComponent?.findIndex(({ path: componentPath }) => activePathRef === componentPath);
|
|
4044
|
+
const activeItem = pathToComponent && activeIndex !== -1 && activeIndex !== void 0 ? pathToComponent[activeIndex] : void 0;
|
|
4045
|
+
return activeItem ? activeItem.component : /* @__PURE__ */ React42.createElement(ErrorRender4, {
|
|
4046
|
+
error: new Error(`No component found for path: ${activePathRef}`),
|
|
4047
|
+
scope: "DappPathSwitcher"
|
|
4048
|
+
});
|
|
4049
|
+
})())));
|
|
4054
4050
|
}, "DappPathSwitcher");
|
|
4055
4051
|
|
|
4056
4052
|
// src/dapps/shared/accounts/components/AnimatedComponents/GenericAnimations/ShiftAnimation.tsx
|
|
@@ -4420,10 +4416,10 @@ import React52 from "react";
|
|
|
4420
4416
|
|
|
4421
4417
|
// src/dapps/shared/table/head/hooks/useVisibleColumns.tsx
|
|
4422
4418
|
import { useMediaQuery as useMediaQuery2 } from "@mui/material";
|
|
4423
|
-
import { useMemo as
|
|
4419
|
+
import { useMemo as useMemo18 } from "react";
|
|
4424
4420
|
var useVisibleColumns = /* @__PURE__ */ __name((tableHeadCells) => {
|
|
4425
4421
|
const isMedium = useMediaQuery2((theme) => theme.breakpoints.down("lg"));
|
|
4426
|
-
const VisibleTableCells =
|
|
4422
|
+
const VisibleTableCells = useMemo18(() => {
|
|
4427
4423
|
return isMedium ? tableHeadCells.filter((cell) => cell.showOnMobile) : tableHeadCells;
|
|
4428
4424
|
}, [
|
|
4429
4425
|
isMedium,
|
|
@@ -4502,7 +4498,7 @@ var NextIteratorFlexbox = /* @__PURE__ */ __name(({ next: changePage, loading, .
|
|
|
4502
4498
|
|
|
4503
4499
|
// src/settings/Theme/ThemeProvider.tsx
|
|
4504
4500
|
import { InvertibleMuiThemeProvider } from "@xylabs/react-invertible-theme";
|
|
4505
|
-
import React54, { useMemo as
|
|
4501
|
+
import React54, { useMemo as useMemo19 } from "react";
|
|
4506
4502
|
|
|
4507
4503
|
// src/settings/Theme/ThemeCssVars.ts
|
|
4508
4504
|
import { alpha as alpha9, createTheme, darken as darken2, lighten } from "@mui/material";
|
|
@@ -4797,7 +4793,7 @@ var ThemeCssVars = createTheme({
|
|
|
4797
4793
|
|
|
4798
4794
|
// src/settings/Theme/ThemeProvider.tsx
|
|
4799
4795
|
var AppOsThemeProvider = /* @__PURE__ */ __name(({ children }) => {
|
|
4800
|
-
const initialValue =
|
|
4796
|
+
const initialValue = useMemo19(() => {
|
|
4801
4797
|
const validValues = [
|
|
4802
4798
|
"light",
|
|
4803
4799
|
"dark"
|