state.mjs 594 B

12345678910111213141516171819
  1. /**
  2. * This should only ever be modified on the client otherwise it'll
  3. * persist through server requests. If we need instanced states we
  4. * could lazy-init via root.
  5. */
  6. const globalProjectionState = {
  7. /**
  8. * Global flag as to whether the tree has animated since the last time
  9. * we resized the window
  10. */
  11. hasAnimatedSinceResize: true,
  12. /**
  13. * We set this to true once, on the first update. Any nodes added to the tree beyond that
  14. * update will be given a `data-projection-id` attribute.
  15. */
  16. hasEverUpdated: false,
  17. };
  18. export { globalProjectionState };