@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.cjs.js
CHANGED
|
@@ -996,7 +996,7 @@ class Document$1 extends NextDocument__default["default"] {
|
|
|
996
996
|
});
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
|
-
const version = "0.3.
|
|
999
|
+
const version = "0.3.1";
|
|
1000
1000
|
function isErrorWithMessage(error) {
|
|
1001
1001
|
return typeof error === "object" && error !== null && "message" in error && typeof error.message === "string";
|
|
1002
1002
|
}
|
|
@@ -2944,6 +2944,18 @@ function responsiveTextStyle(value) {
|
|
|
2944
2944
|
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" } : {});
|
|
2945
2945
|
});
|
|
2946
2946
|
}
|
|
2947
|
+
const defaultMargin = {
|
|
2948
|
+
marginTop: 0,
|
|
2949
|
+
marginRight: "auto",
|
|
2950
|
+
marginBottom: 0,
|
|
2951
|
+
marginLeft: "auto"
|
|
2952
|
+
};
|
|
2953
|
+
const defaultPadding = {
|
|
2954
|
+
paddingTop: 0,
|
|
2955
|
+
paddingRight: 0,
|
|
2956
|
+
paddingBottom: 0,
|
|
2957
|
+
paddingLeft: 0
|
|
2958
|
+
};
|
|
2947
2959
|
function useStyleControlCssObject(style, controlDefinition) {
|
|
2948
2960
|
const { properties } = controlDefinition.config;
|
|
2949
2961
|
return __spreadValues(__spreadValues({}, properties.includes(slot.StyleControlProperty.Width) && {
|
|
@@ -2959,17 +2971,7 @@ function useStyleControlCssObject(style, controlDefinition) {
|
|
|
2959
2971
|
var _a, _b, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
2960
2972
|
return __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, properties.includes(slot.StyleControlProperty.Width) && {
|
|
2961
2973
|
width: (_a = widthToString(width)) != null ? _a : "100%"
|
|
2962
|
-
}), properties.includes(slot.StyleControlProperty.Margin) && margin != null &&
|
|
2963
|
-
marginTop: 0,
|
|
2964
|
-
marginRight: "auto",
|
|
2965
|
-
marginBottom: 0,
|
|
2966
|
-
marginLeft: "auto"
|
|
2967
|
-
})), properties.includes(slot.StyleControlProperty.Padding) && padding != null && paddingPropertyDataToStyle(padding, {
|
|
2968
|
-
paddingTop: 0,
|
|
2969
|
-
paddingRight: 0,
|
|
2970
|
-
paddingBottom: 0,
|
|
2971
|
-
paddingLeft: 0
|
|
2972
|
-
})), properties.includes(slot.StyleControlProperty.Border) && {
|
|
2974
|
+
}), properties.includes(slot.StyleControlProperty.Margin) && marginPropertyDataToStyle(margin != null ? margin : defaultMargin, defaultMargin)), properties.includes(slot.StyleControlProperty.Padding) && paddingPropertyDataToStyle(padding != null ? padding : defaultPadding, defaultPadding)), properties.includes(slot.StyleControlProperty.Border) && {
|
|
2973
2975
|
borderTop: (_b = borderSideToString2(border == null ? void 0 : border.borderTop)) != null ? _b : "0 solid black",
|
|
2974
2976
|
borderRight: (_c2 = borderSideToString2(border == null ? void 0 : border.borderRight)) != null ? _c2 : "0 solid black",
|
|
2975
2977
|
borderBottom: (_d = borderSideToString2(border == null ? void 0 : border.borderBottom)) != null ? _d : "0 solid black",
|