@yahoo/uds-create-config 5.95.3 → 5.96.0
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.
|
@@ -56,6 +56,11 @@ function convertLinkedTokenValue({ path, value, sourcePlatform, destinationPlatf
|
|
|
56
56
|
if (LENGTH_GROUPS.has(group)) {
|
|
57
57
|
if (typeof value === "number") return value;
|
|
58
58
|
if (group === "size" && typeof value === "string" && (value === "auto" || /^-?(?:\d+(?:\.\d+)?|\.\d+)%$/.test(value))) return value;
|
|
59
|
+
if (group === "size" && typeof value === "string" && [
|
|
60
|
+
"min-content",
|
|
61
|
+
"max-content",
|
|
62
|
+
"fit-content"
|
|
63
|
+
].includes(value)) throw new Error(`[uds] Linked native size token "${path}" has unsupported CSS intrinsic sizing value ${JSON.stringify(value)}. Use an explicit native layout: replacing it with auto alone can stretch a component in a column parent. Account for parent direction, label shrink, and caller width/minWidth/maxWidth.`);
|
|
59
64
|
const match = typeof value === "string" ? LENGTH.exec(value) : null;
|
|
60
65
|
if (!match) throw unsupported("native", path, value, "a px or rem length");
|
|
61
66
|
if (match[2] === "rem" && remBase === void 0) throw new Error(`[uds] Linked native token "${path}" has value ${JSON.stringify(value)}, but its source has no fixed root font size for rem conversion.`);
|