@wavemaker-ai/react-codegen 1.0.0-rc.309 → 1.0.0-rc.312
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/transpiler/index.mjs +13 -13
- package/dist/transpiler/index.mjs.map +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/src/transpile/widget-inline-style-processor.js +19 -19
- package/src/transpile/widget-inline-style-processor.js.map +1 -1
- package/templates/project/package.json +4 -4
|
@@ -41221,7 +41221,16 @@ var isBind = (v) => !!(v && (v.startsWith("bind:") || v.startsWith("{")));
|
|
|
41221
41221
|
var hasValidDir = (v) => v === "row" || v === "column";
|
|
41222
41222
|
var isAuto = (v) => v === "auto";
|
|
41223
41223
|
var normalizeGap = (v) => v != null && v !== "" && !isAuto(v) ? v : null;
|
|
41224
|
-
|
|
41224
|
+
function parseDimensionValue(value, element) {
|
|
41225
|
+
if (value === "auto") return "auto";
|
|
41226
|
+
if (value === "hug") return "fit-content";
|
|
41227
|
+
if (value === "fill") return "100%";
|
|
41228
|
+
if (/(%|vw|vh|em|rem|px|pt|pc|in|cm|mm)$/.test(value)) return value;
|
|
41229
|
+
const n = Number(value);
|
|
41230
|
+
if (!Number.isNaN(n)) return `${n}px`;
|
|
41231
|
+
return value;
|
|
41232
|
+
}
|
|
41233
|
+
var toCssLength = (v) => v == null || v === "auto" ? void 0 : parseDimensionValue(String(v));
|
|
41225
41234
|
function getBaseAlignment(key) {
|
|
41226
41235
|
return ALIGNMENT_MATRIX[key] || { justifyContent: "flex-start", alignItems: "flex-start" };
|
|
41227
41236
|
}
|
|
@@ -41395,7 +41404,7 @@ function computeLayoutCssProperties(props) {
|
|
|
41395
41404
|
css["justify-content"] = justifyContent;
|
|
41396
41405
|
css["align-items"] = alignItems;
|
|
41397
41406
|
}
|
|
41398
|
-
if (normGap != null) css["gap"] =
|
|
41407
|
+
if (normGap != null) css["gap"] = toCssLength(normGap);
|
|
41399
41408
|
}
|
|
41400
41409
|
} else {
|
|
41401
41410
|
const gapIsAuto = isAuto(props.gap);
|
|
@@ -41413,8 +41422,8 @@ function computeLayoutCssProperties(props) {
|
|
|
41413
41422
|
} else {
|
|
41414
41423
|
if (hasAlignment) css["align-content"] = alignItems;
|
|
41415
41424
|
}
|
|
41416
|
-
if (normGap != null) css["row-gap"] =
|
|
41417
|
-
if (normCgap != null) css["column-gap"] =
|
|
41425
|
+
if (normGap != null) css["row-gap"] = toCssLength(normGap);
|
|
41426
|
+
if (normCgap != null) css["column-gap"] = toCssLength(normCgap);
|
|
41418
41427
|
}
|
|
41419
41428
|
}
|
|
41420
41429
|
if (props.clipcontent) {
|
|
@@ -41480,15 +41489,6 @@ function getStaticLayoutPropsFromElement(element, dynamicGroups) {
|
|
|
41480
41489
|
}
|
|
41481
41490
|
return hasAny ? props : null;
|
|
41482
41491
|
}
|
|
41483
|
-
function parseDimensionValue(value, element) {
|
|
41484
|
-
if (value === "auto") return "auto";
|
|
41485
|
-
if (value === "hug") return "fit-content";
|
|
41486
|
-
if (value === "fill") return "100%";
|
|
41487
|
-
if (/(%|vw|vh|em|rem|px|pt|pc|in|cm|mm)$/.test(value)) return value;
|
|
41488
|
-
const n = Number(value);
|
|
41489
|
-
if (!Number.isNaN(n)) return `${n}px`;
|
|
41490
|
-
return value;
|
|
41491
|
-
}
|
|
41492
41492
|
function expandShorthand(value) {
|
|
41493
41493
|
const parts = splitCssShorthandOnSpaces(value).map(
|
|
41494
41494
|
(v) => v !== "unset" ? parseDimensionValue(v) : "unset"
|