@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.
@@ -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;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export interface FadeInProperties {
3
+ }
4
+ declare const FadeIn: React.FC<FadeInProperties>;
5
+ export default FadeIn;
@@ -0,0 +1,3 @@
1
+ export interface IStyledFadeIn {
2
+ }
3
+ export declare const StyledFadeIn: import("styled-components").StyledComponent<"div", any, IStyledFadeIn, never>;
@@ -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: "100%",
2069
- height: typeof window !== "undefined" ? window.innerHeight + "px" : "821px",
2070
- transform: spaceTransformMatrix,
2071
- transition: spaceAnimatedTransform ? `transform ${spaceTransformTime}ms ease-in-out` : "initial"
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