@webmate-studio/builder 0.2.177 → 0.2.179

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webmate-studio/builder",
3
- "version": "0.2.177",
3
+ "version": "0.2.179",
4
4
  "type": "module",
5
5
  "description": "Webmate Studio Component Builder",
6
6
  "keywords": [
@@ -187,9 +187,9 @@ function generateColorUtilities(t) {
187
187
 
188
188
  for (let step = 1; step <= 12; step++) {
189
189
  const varRef = `--color-${world}-${step}`;
190
- addColorUtility(css = css, processed, `bg-${world}-${step}`, 'background-color', varRef);
191
- addColorUtility(css = css, processed, `text-${world}-${step}`, 'color', varRef);
192
- addColorUtility(css = css, processed, `border-${world}-${step}`, 'border-color', varRef);
190
+ css = addColorUtility(css, processed, `bg-${world}-${step}`, 'background-color', varRef);
191
+ css = addColorUtility(css, processed, `text-${world}-${step}`, 'color', varRef);
192
+ css = addColorUtility(css, processed, `border-${world}-${step}`, 'border-color', varRef);
193
193
 
194
194
  // Opacity-Varianten
195
195
  for (const step2 of opacitySteps) {
@@ -1164,10 +1164,28 @@ function generateSpacingStyles(t) {
1164
1164
  css += '\n margin-top: var(--spacing-component);';
1165
1165
  css += '\n}';
1166
1166
 
1167
- // Spacing-Modi
1168
- css += '\n[data-spacing="none"] { margin-top: 0 !important; }';
1169
- css += '\n[data-spacing="half"] { margin-top: calc(var(--spacing-component) / 2) !important; }';
1170
- css += '\n[data-spacing="double"] { margin-top: calc(var(--spacing-component) * 2) !important; }';
1167
+ // Spacing presets (factor × design-system spacing)
1168
+ const factors = [
1169
+ { attr: 'none', factor: '0' },
1170
+ { attr: '0.25', factor: '0.25' },
1171
+ { attr: '0.5', factor: '0.5' },
1172
+ { attr: '0.75', factor: '0.75' },
1173
+ // 'standard' = no attribute, uses default margin-top
1174
+ { attr: '1.25', factor: '1.25' },
1175
+ { attr: '1.5', factor: '1.5' },
1176
+ { attr: '1.75', factor: '1.75' },
1177
+ { attr: '2', factor: '2' },
1178
+ // Legacy aliases
1179
+ { attr: 'half', factor: '0.5' },
1180
+ { attr: 'double', factor: '2' }
1181
+ ];
1182
+ for (const { attr, factor } of factors) {
1183
+ if (factor === '0') {
1184
+ css += `\n[data-spacing="${attr}"] { margin-top: 0 !important; }`;
1185
+ } else {
1186
+ css += `\n[data-spacing="${attr}"] { margin-top: calc(var(--spacing-component) * ${factor}) !important; }`;
1187
+ }
1188
+ }
1171
1189
 
1172
1190
  // Responsive Overrides
1173
1191
  for (const [bp, minWidth] of Object.entries(breakpoints)) {