@plurid/plurid-react 0.0.0-28 → 0.0.0-29
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/distribution/components/structural/Roots/index.d.ts +2 -1
- package/distribution/containers/RouterBrowser/FadeIn/index.d.ts +5 -0
- package/distribution/containers/RouterBrowser/FadeIn/styled.d.ts +3 -0
- package/distribution/index.es.js +35 -7
- package/distribution/index.es.js.map +1 -1
- package/distribution/index.js +35 -7
- package/distribution/index.js.map +1 -1
- package/distribution/index.min.js +24 -15
- package/distribution/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,11 +8,12 @@ export interface PluridRootsStateProperties {
|
|
|
8
8
|
stateConfiguration: PluridConfiguration;
|
|
9
9
|
spaceTransformMatrix: string;
|
|
10
10
|
spaceAnimatedTransform: boolean;
|
|
11
|
+
stateResolvedLayout: boolean;
|
|
11
12
|
spaceTransformTime: number;
|
|
12
13
|
stateTree: TreePlane[];
|
|
13
14
|
}
|
|
14
15
|
export interface PluridRootsDispatchProperties {
|
|
15
16
|
}
|
|
16
17
|
export declare type PluridRootsProperties = PluridRootsOwnProperties & PluridRootsStateProperties & PluridRootsDispatchProperties;
|
|
17
|
-
declare const ConnectedPluridRoots: import("react-redux").ConnectedComponent<React.FC<PluridRootsProperties>, Omit<PluridRootsProperties, "stateConfiguration" | "stateTree" | "spaceTransformMatrix" | "spaceAnimatedTransform" | "spaceTransformTime"> & import("react-redux").ConnectProps>;
|
|
18
|
+
declare const ConnectedPluridRoots: import("react-redux").ConnectedComponent<React.FC<PluridRootsProperties>, Omit<PluridRootsProperties, "stateConfiguration" | "stateTree" | "spaceTransformMatrix" | "spaceAnimatedTransform" | "stateResolvedLayout" | "spaceTransformTime"> & import("react-redux").ConnectProps>;
|
|
18
19
|
export default ConnectedPluridRoots;
|
package/distribution/index.es.js
CHANGED
|
@@ -2062,13 +2062,16 @@ const StyledPluridRoots = styled.div`
|
|
|
2062
2062
|
`;
|
|
2063
2063
|
|
|
2064
2064
|
const PluridRoots = properties => {
|
|
2065
|
-
const {spaceTransformMatrix: spaceTransformMatrix, spaceAnimatedTransform: spaceAnimatedTransform, spaceTransformTime: spaceTransformTime, stateTree: stateTree} = properties;
|
|
2065
|
+
const {spaceTransformMatrix: spaceTransformMatrix, spaceAnimatedTransform: spaceAnimatedTransform, spaceTransformTime: spaceTransformTime, stateTree: stateTree, stateResolvedLayout: stateResolvedLayout} = properties;
|
|
2066
|
+
const width = "100%";
|
|
2067
|
+
const height = stateResolvedLayout ? window.innerHeight + "px" : 0;
|
|
2068
|
+
const transition = spaceAnimatedTransform ? `transform ${spaceTransformTime}ms ease-in-out` : "initial";
|
|
2066
2069
|
return React.createElement(StyledPluridRoots, {
|
|
2067
2070
|
style: {
|
|
2068
|
-
width:
|
|
2069
|
-
height:
|
|
2070
|
-
|
|
2071
|
-
|
|
2071
|
+
width: width,
|
|
2072
|
+
height: height,
|
|
2073
|
+
transition: transition,
|
|
2074
|
+
transform: spaceTransformMatrix
|
|
2072
2075
|
},
|
|
2073
2076
|
"data-plurid-entity": PLURID_ENTITY_ROOTS
|
|
2074
2077
|
}, stateTree.map((plane => React.createElement(ConnectedPluridRoot, {
|
|
@@ -2082,7 +2085,8 @@ const mapStateToProperties$g = state => ({
|
|
|
2082
2085
|
spaceTransformMatrix: selectors.space.getTransformMatrix(state),
|
|
2083
2086
|
spaceAnimatedTransform: selectors.space.getAnimatedTransform(state),
|
|
2084
2087
|
spaceTransformTime: selectors.space.getTransformTime(state),
|
|
2085
|
-
stateTree: selectors.space.getTree(state)
|
|
2088
|
+
stateTree: selectors.space.getTree(state),
|
|
2089
|
+
stateResolvedLayout: selectors.space.getResolvedLayout(state)
|
|
2086
2090
|
});
|
|
2087
2091
|
|
|
2088
2092
|
const mapDispatchToProperties$g = dispatch => ({});
|
|
@@ -5414,6 +5418,30 @@ const PluridScrollTop = styled.div`
|
|
|
5414
5418
|
width: 0;
|
|
5415
5419
|
`;
|
|
5416
5420
|
|
|
5421
|
+
const StyledFadeIn = styled.div`
|
|
5422
|
+
position: absolute;
|
|
5423
|
+
top: 0;
|
|
5424
|
+
left: 0;
|
|
5425
|
+
right: 0;
|
|
5426
|
+
bottom: 0;
|
|
5427
|
+
background-color: black;
|
|
5428
|
+
pointer-events: none;
|
|
5429
|
+
z-index: 999999;
|
|
5430
|
+
`;
|
|
5431
|
+
|
|
5432
|
+
const FadeIn = properties => {
|
|
5433
|
+
const [fadedIn, setFadedIn] = useState(false);
|
|
5434
|
+
useEffect((() => {
|
|
5435
|
+
setTimeout((() => {
|
|
5436
|
+
setFadedIn(true);
|
|
5437
|
+
}), 10);
|
|
5438
|
+
}), []);
|
|
5439
|
+
if (fadedIn) {
|
|
5440
|
+
return React.createElement(React.Fragment, null);
|
|
5441
|
+
}
|
|
5442
|
+
return React.createElement(StyledFadeIn, null);
|
|
5443
|
+
};
|
|
5444
|
+
|
|
5417
5445
|
const PluridRouterBrowser = properties => {
|
|
5418
5446
|
const {routes: routes, planes: planes, exterior: exterior, shell: shell, hostname: hostname, scrollToTop: scrollToTop, static: staticContext, view: cleanNavigationView, cleanNavigation: cleanNavigation, notFoundPath: notFoundPathProperty} = properties;
|
|
5419
5447
|
const notFoundPath = notFoundPathProperty || "/not-found";
|
|
@@ -5512,7 +5540,7 @@ const PluridRouterBrowser = properties => {
|
|
|
5512
5540
|
PluridRouterShell.displayName = "PluridRouterShell";
|
|
5513
5541
|
}
|
|
5514
5542
|
}
|
|
5515
|
-
return React.createElement(React.Fragment, null, React.createElement(PluridScrollTop, {
|
|
5543
|
+
return React.createElement(React.Fragment, null, React.createElement(FadeIn, null), React.createElement(PluridScrollTop, {
|
|
5516
5544
|
ref: topContainer
|
|
5517
5545
|
}), PluridRouterExterior && React.createElement(PluridRouterExterior, {
|
|
5518
5546
|
matchedRoute: matchedRoute
|