@makeswift/runtime 0.3.0 → 0.3.1

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.es.js CHANGED
@@ -962,7 +962,7 @@ class Document$1 extends NextDocument {
962
962
  });
963
963
  }
964
964
  }
965
- const version = "0.3.0";
965
+ const version = "0.3.1";
966
966
  function isErrorWithMessage(error) {
967
967
  return typeof error === "object" && error !== null && "message" in error && typeof error.message === "string";
968
968
  }
@@ -2884,6 +2884,18 @@ function responsiveTextStyle(value) {
2884
2884
  return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, fontFamily == null ? {} : { fontFamily }), fontWeight == null ? {} : { fontWeight }), letterSpacing == null ? {} : { letterSpacing }), fontSize == null ? {} : { fontSize: `${fontSize.value}${fontSize.unit}` }), textTransform.includes("uppercase") ? { textTransform: "uppercase" } : {}), fontStyle.includes("italic") ? { fontStyle: "italic" } : {});
2885
2885
  });
2886
2886
  }
2887
+ const defaultMargin = {
2888
+ marginTop: 0,
2889
+ marginRight: "auto",
2890
+ marginBottom: 0,
2891
+ marginLeft: "auto"
2892
+ };
2893
+ const defaultPadding = {
2894
+ paddingTop: 0,
2895
+ paddingRight: 0,
2896
+ paddingBottom: 0,
2897
+ paddingLeft: 0
2898
+ };
2887
2899
  function useStyleControlCssObject(style, controlDefinition) {
2888
2900
  const { properties } = controlDefinition.config;
2889
2901
  return __spreadValues(__spreadValues({}, properties.includes(StyleControlProperty.Width) && {
@@ -2899,17 +2911,7 @@ function useStyleControlCssObject(style, controlDefinition) {
2899
2911
  var _a, _b, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
2900
2912
  return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(StyleControlProperty.Width) && {
2901
2913
  width: (_a = widthToString(width)) != null ? _a : "100%"
2902
- }), properties.includes(StyleControlProperty.Margin) && margin != null && marginPropertyDataToStyle(margin, {
2903
- marginTop: 0,
2904
- marginRight: "auto",
2905
- marginBottom: 0,
2906
- marginLeft: "auto"
2907
- })), properties.includes(StyleControlProperty.Padding) && padding != null && paddingPropertyDataToStyle(padding, {
2908
- paddingTop: 0,
2909
- paddingRight: 0,
2910
- paddingBottom: 0,
2911
- paddingLeft: 0
2912
- })), properties.includes(StyleControlProperty.Border) && {
2914
+ }), properties.includes(StyleControlProperty.Margin) && marginPropertyDataToStyle(margin != null ? margin : defaultMargin, defaultMargin)), properties.includes(StyleControlProperty.Padding) && paddingPropertyDataToStyle(padding != null ? padding : defaultPadding, defaultPadding)), properties.includes(StyleControlProperty.Border) && {
2913
2915
  borderTop: (_b = borderSideToString2(border == null ? void 0 : border.borderTop)) != null ? _b : "0 solid black",
2914
2916
  borderRight: (_c2 = borderSideToString2(border == null ? void 0 : border.borderRight)) != null ? _c2 : "0 solid black",
2915
2917
  borderBottom: (_d = borderSideToString2(border == null ? void 0 : border.borderBottom)) != null ? _d : "0 solid black",