@makeswift/runtime 0.4.0 → 0.4.2

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/index.cjs.js CHANGED
@@ -1085,7 +1085,7 @@ class Document$1 extends NextDocument__default["default"] {
1085
1085
  });
1086
1086
  }
1087
1087
  }
1088
- const version = "0.4.0";
1088
+ const version = "0.4.2";
1089
1089
  function isErrorWithMessage(error) {
1090
1090
  return typeof error === "object" && error !== null && "message" in error && typeof error.message === "string";
1091
1091
  }
@@ -2908,13 +2908,13 @@ function paddingPropertyDataToStyle(data, defaultValue = {}) {
2908
2908
  const paddingBottom = (_c2 = data.paddingBottom) != null ? _c2 : defaultValue.paddingBottom;
2909
2909
  const paddingLeft = (_d = data.paddingLeft) != null ? _d : defaultValue.paddingLeft;
2910
2910
  const style = {};
2911
- if (paddingTop)
2911
+ if (paddingTop != null)
2912
2912
  style.paddingTop = lengthDataToString(paddingTop);
2913
- if (paddingRight)
2913
+ if (paddingRight != null)
2914
2914
  style.paddingRight = lengthDataToString(paddingRight);
2915
- if (paddingBottom)
2915
+ if (paddingBottom != null)
2916
2916
  style.paddingBottom = lengthDataToString(paddingBottom);
2917
- if (paddingLeft)
2917
+ if (paddingLeft != null)
2918
2918
  style.paddingLeft = lengthDataToString(paddingLeft);
2919
2919
  return style;
2920
2920
  }
@@ -2925,13 +2925,13 @@ function marginPropertyDataToStyle(data, defaultValue = {}) {
2925
2925
  const marginBottom = (_c2 = data.marginBottom) != null ? _c2 : defaultValue.marginBottom;
2926
2926
  const marginLeft = (_d = data.marginLeft) != null ? _d : defaultValue.marginLeft;
2927
2927
  const style = {};
2928
- if (marginTop)
2928
+ if (marginTop != null)
2929
2929
  style.marginTop = lengthDataToString(marginTop);
2930
- if (marginRight)
2930
+ if (marginRight != null)
2931
2931
  style.marginRight = lengthDataToString(marginRight);
2932
- if (marginBottom)
2932
+ if (marginBottom != null)
2933
2933
  style.marginBottom = lengthDataToString(marginBottom);
2934
- if (marginLeft)
2934
+ if (marginLeft != null)
2935
2935
  style.marginLeft = lengthDataToString(marginLeft);
2936
2936
  return style;
2937
2937
  }
@@ -2949,16 +2949,16 @@ function borderRadiusPropertyDataToStyle(data, defaultValue = {}) {
2949
2949
  const borderBottomRightRadius = (_c2 = data.borderBottomRightRadius) != null ? _c2 : defaultValue.borderBottomRightRadius;
2950
2950
  const borderBottomLeftRadius = (_d = data.borderBottomLeftRadius) != null ? _d : defaultValue.borderBottomLeftRadius;
2951
2951
  const style = {};
2952
- if (borderTopLeftRadius) {
2952
+ if (borderTopLeftRadius != null) {
2953
2953
  style.borderTopLeftRadius = lengthPercentageDataToString(borderTopLeftRadius);
2954
2954
  }
2955
- if (borderTopRightRadius) {
2955
+ if (borderTopRightRadius != null) {
2956
2956
  style.borderTopRightRadius = lengthPercentageDataToString(borderTopRightRadius);
2957
2957
  }
2958
- if (borderBottomRightRadius) {
2958
+ if (borderBottomRightRadius != null) {
2959
2959
  style.borderBottomRightRadius = lengthPercentageDataToString(borderBottomRightRadius);
2960
2960
  }
2961
- if (borderBottomLeftRadius) {
2961
+ if (borderBottomLeftRadius != null) {
2962
2962
  style.borderBottomLeftRadius = lengthPercentageDataToString(borderBottomLeftRadius);
2963
2963
  }
2964
2964
  return style;
@@ -2973,13 +2973,13 @@ function borderPropertyDataToStyle(data, defaultValue = {}) {
2973
2973
  const borderBottom = (_c2 = data.borderBottom) != null ? _c2 : defaultValue.borderBottom;
2974
2974
  const borderLeft = (_d = data.borderLeft) != null ? _d : defaultValue.borderLeft;
2975
2975
  const style = {};
2976
- if (borderTop)
2976
+ if (borderTop != null)
2977
2977
  style.borderTop = borderSideToString(borderTop);
2978
- if (borderRight)
2978
+ if (borderRight != null)
2979
2979
  style.borderRight = borderSideToString(borderRight);
2980
- if (borderBottom)
2980
+ if (borderBottom != null)
2981
2981
  style.borderBottom = borderSideToString(borderBottom);
2982
- if (borderLeft)
2982
+ if (borderLeft != null)
2983
2983
  style.borderLeft = borderSideToString(borderLeft);
2984
2984
  return style;
2985
2985
  }
@@ -3905,14 +3905,16 @@ const ElementData = React.memo(React.forwardRef(function ElementData2({
3905
3905
  text: "Component not found"
3906
3906
  });
3907
3907
  }
3908
- return /* @__PURE__ */ jsxRuntime.jsx(FindDomNode, {
3909
- ref: setFoundDomNode,
3910
- children: /* @__PURE__ */ jsxRuntime.jsx(PropsValue, {
3911
- element: elementData,
3912
- children: (props) => /* @__PURE__ */ React.createElement(Component, __spreadProps(__spreadValues({}, props), {
3913
- key: elementData.key,
3914
- ref: setHandle
3915
- }))
3908
+ return /* @__PURE__ */ jsxRuntime.jsx(React.Suspense, {
3909
+ children: /* @__PURE__ */ jsxRuntime.jsx(FindDomNode, {
3910
+ ref: setFoundDomNode,
3911
+ children: /* @__PURE__ */ jsxRuntime.jsx(PropsValue, {
3912
+ element: elementData,
3913
+ children: (props) => /* @__PURE__ */ React.createElement(Component, __spreadProps(__spreadValues({}, props), {
3914
+ key: elementData.key,
3915
+ ref: setHandle
3916
+ }))
3917
+ })
3916
3918
  })
3917
3919
  });
3918
3920
  }));