rafters 0.0.30 → 0.0.31
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.js +8 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -57654,11 +57654,13 @@ function generateRadiusTokens(config3, radiusDefs) {
|
|
|
57654
57654
|
} else if (def.step === "full") {
|
|
57655
57655
|
value2 = "9999px";
|
|
57656
57656
|
mathRelationship = "infinite (9999px)";
|
|
57657
|
+
} else if (def.step === 0) {
|
|
57658
|
+
value2 = "var(--rafters-radius-base)";
|
|
57659
|
+
mathRelationship = `${baseRadiusRem}rem (base)`;
|
|
57657
57660
|
} else {
|
|
57658
|
-
const
|
|
57659
|
-
|
|
57660
|
-
|
|
57661
|
-
mathRelationship = def.step === 0 ? `${baseRadiusRem}rem (base)` : `${baseRadiusRem} \xD7 ${progression.ratio}^${def.step}`;
|
|
57661
|
+
const multiplier = Math.round(progression.ratio ** def.step * 1e3) / 1e3;
|
|
57662
|
+
value2 = `calc(var(--rafters-radius-base) * ${multiplier})`;
|
|
57663
|
+
mathRelationship = `base \xD7 ${progression.ratio}^${def.step} (\xD7${multiplier})`;
|
|
57662
57664
|
}
|
|
57663
57665
|
tokens.push({
|
|
57664
57666
|
name: scale3 === "DEFAULT" ? "radius" : `radius-${scale3}`,
|
|
@@ -57910,9 +57912,10 @@ function generateSpacingTokens(config3, spacingMultipliers) {
|
|
|
57910
57912
|
usageContext = ["hero-spacing", "page-margins", "major-sections"];
|
|
57911
57913
|
}
|
|
57912
57914
|
const remValue = value2 / 16;
|
|
57915
|
+
const cssValue = multiplier === 0 ? "0" : multiplier === 1 ? "var(--rafters-spacing-base)" : `calc(var(--rafters-spacing-base) * ${multiplier})`;
|
|
57913
57916
|
tokens.push({
|
|
57914
57917
|
name: `spacing-${scale3}`,
|
|
57915
|
-
value:
|
|
57918
|
+
value: cssValue,
|
|
57916
57919
|
category: "spacing",
|
|
57917
57920
|
namespace: "spacing",
|
|
57918
57921
|
semanticMeaning: meaning,
|