@makeswift/runtime 0.0.0-d8554fe → 0.0.0-e77889f

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/react.es2.js CHANGED
@@ -31,7 +31,7 @@ var __objRest = (source, exclude) => {
31
31
  };
32
32
  import * as React from "react";
33
33
  import React__default, { useContext, useState, useRef, useEffect, useMemo, createContext, useLayoutEffect, useCallback, forwardRef, createElement, useImperativeHandle, Children, Fragment as Fragment$1, memo } from "react";
34
- import { A as ActionTypes$1, r as registerComponentHandleEffect, d as mountComponentEffect, e as registerComponentEffect, f as registerReactComponentEffect } from "./actions.es.js";
34
+ import { A as ActionTypes$1, r as registerComponentHandleEffect, e as mountComponentEffect, f as registerComponentEffect, g as registerReactComponentEffect } from "./actions.es.js";
35
35
  import { T as Types, E as ElementID, B as Backgrounds$1, W as Width, R as ResponsiveIconRadioGroup, M as Margin, P as Padding, a as Border, b as BorderRadius, S as Shadows, G as GapY, c as GapX, e as ResponsiveSelect, f as ResponsiveNumber, C as Checkbox, g as Grid$2, h as TextInput, L as Link$1, i as ResponsiveColor, j as TextStyle, I as Image$1, k as ResponsiveOpacity, l as Images, N as Number$1, D as Date$1, F as Font, m as ResponsiveLength, n as TextArea, o as NavigationLinks, p as SocialLinks$1, q as RichText } from "./descriptors.es.js";
36
36
  import styled, { css, keyframes as keyframes$2, createGlobalStyle } from "styled-components";
37
37
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
@@ -33657,27 +33657,14 @@ function RuntimeProvider({
33657
33657
  }, [store, registerComponents]);
33658
33658
  useEffect(() => {
33659
33659
  const isInBuilder = window.parent !== window;
33660
- if (!isInBuilder)
33661
- return;
33662
- const initializePromise = initializeReactBuilderPreview();
33663
- return () => {
33664
- initializePromise.then((cleanUp) => {
33665
- cleanUp();
33666
- });
33667
- };
33668
- async function initializeReactBuilderPreview() {
33660
+ if (isInBuilder)
33661
+ setReactBuilderPreviewStore();
33662
+ async function setReactBuilderPreviewStore() {
33669
33663
  const ReactBuilderPreview = await import("./react-builder-preview.es.js");
33670
- const store2 = await new Promise((resolve) => {
33671
- setStore((store3) => {
33672
- const nextStore = ReactBuilderPreview.configureStore({
33673
- preloadedState: store3.getState(),
33674
- client
33675
- });
33676
- resolve(nextStore);
33677
- return nextStore;
33678
- });
33679
- });
33680
- return store2.dispatch(ReactBuilderPreview.initialize());
33664
+ setStore((store2) => ReactBuilderPreview.configureStore({
33665
+ preloadedState: store2.getState(),
33666
+ client
33667
+ }));
33681
33668
  }
33682
33669
  }, [client]);
33683
33670
  useEffect(() => {