@webmate-studio/builder 0.2.161 → 0.2.163
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/package.json +1 -1
- package/src/design-tokens-v2-css.js +24 -3
package/package.json
CHANGED
|
@@ -118,15 +118,18 @@ function generateColorVariables(t, lines) {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
// on-{welt} Kontrastfarben
|
|
121
|
+
// on-{welt} Kontrastfarben (überschreibbar via semanticMappings.textOn)
|
|
122
122
|
const neutralScale = t.colors.neutral?.scale;
|
|
123
123
|
if (neutralScale) {
|
|
124
|
-
lines.push(' /* on-colors
|
|
124
|
+
lines.push(' /* on-colors */');
|
|
125
125
|
for (const world of SEMANTIC_COLOR_WORLDS) {
|
|
126
126
|
const color = t.colors[world];
|
|
127
127
|
if (!color?.scale?.[9]) continue;
|
|
128
128
|
|
|
129
|
-
const
|
|
129
|
+
const textOnOverride = t.semanticMappings?.[world]?.textOn;
|
|
130
|
+
const onColor = textOnOverride
|
|
131
|
+
? (neutralScale[textOnOverride] || calculateOnColor(color.scale[9], neutralScale))
|
|
132
|
+
: calculateOnColor(color.scale[9], neutralScale);
|
|
130
133
|
lines.push(` --color-on-${world}: ${onColor};`);
|
|
131
134
|
}
|
|
132
135
|
}
|
|
@@ -1025,6 +1028,24 @@ function generateLayoutVariables(t, lines) {
|
|
|
1025
1028
|
if (t.borderWidth) lines.push(` --border-width: ${t.borderWidth};`);
|
|
1026
1029
|
if (t.borderRadius) lines.push(` --radius: ${t.borderRadius};`);
|
|
1027
1030
|
|
|
1031
|
+
// Tailwind v4 base spacing (used by px-*, py-*, gap-*, m-*, p-*, etc.)
|
|
1032
|
+
lines.push(` --spacing: 0.25rem;`);
|
|
1033
|
+
|
|
1034
|
+
// Tailwind v4 container widths (used by max-w-sm, max-w-md, max-w-lg, etc.)
|
|
1035
|
+
lines.push(` --container-3xs: 16rem;`);
|
|
1036
|
+
lines.push(` --container-2xs: 18rem;`);
|
|
1037
|
+
lines.push(` --container-xs: 20rem;`);
|
|
1038
|
+
lines.push(` --container-sm: 24rem;`);
|
|
1039
|
+
lines.push(` --container-md: 28rem;`);
|
|
1040
|
+
lines.push(` --container-lg: 32rem;`);
|
|
1041
|
+
lines.push(` --container-xl: 36rem;`);
|
|
1042
|
+
lines.push(` --container-2xl: 42rem;`);
|
|
1043
|
+
lines.push(` --container-3xl: 48rem;`);
|
|
1044
|
+
lines.push(` --container-4xl: 56rem;`);
|
|
1045
|
+
lines.push(` --container-5xl: 64rem;`);
|
|
1046
|
+
lines.push(` --container-6xl: 72rem;`);
|
|
1047
|
+
lines.push(` --container-7xl: 80rem;`);
|
|
1048
|
+
|
|
1028
1049
|
if (t.spacing?.component) {
|
|
1029
1050
|
lines.push(` /* component spacing */`);
|
|
1030
1051
|
lines.push(` --spacing-component: ${t.spacing.component.base || '3rem'};`);
|