@webmate-studio/builder 0.2.86 → 0.2.88

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.86",
3
+ "version": "0.2.88",
4
4
  "type": "module",
5
5
  "description": "Webmate Studio Component Builder",
6
6
  "keywords": [
@@ -7,7 +7,7 @@ function generateSemanticColorUtilities(tokens) {
7
7
  if (!tokens.colors) return '';
8
8
 
9
9
  let utilities = '\n/* Color Utilities */';
10
- utilities += '\n@layer components {';
10
+ utilities += '\n@layer utilities {';
11
11
 
12
12
  // Map of all colors: token name -> utility class base name
13
13
  const colorMap = {
@@ -401,7 +401,7 @@ ${themeCSS}
401
401
  let result = await compiler.build(classArray);
402
402
 
403
403
  console.log(`[Tailwind Generator] includeBaseLayers = ${includeBaseLayers}`);
404
- console.log(`[Tailwind Generator] Generated CSS length BEFORE stripping: ${result.length}`);
404
+ console.log(`[Tailwind Generator] Generated CSS length BEFORE processing: ${result.length}`);
405
405
  console.log(`[Tailwind Generator] CSS contains @layer base: ${result.includes('@layer base')}`);
406
406
  console.log(`[Tailwind Generator] CSS contains @layer theme: ${result.includes('@layer theme')}`);
407
407
 
@@ -413,6 +413,12 @@ ${themeCSS}
413
413
  console.log(`[Tailwind Generator] CSS contains @layer base: ${result.includes('@layer base')}`);
414
414
  }
415
415
 
416
+ // ALWAYS wrap component CSS in @layer components
417
+ // This ensures utilities from design tokens (@layer utilities) can override them
418
+ // Even if base layers are included, component-specific CSS should be in @layer components
419
+ console.log('[Tailwind Generator] Wrapping in @layer components...');
420
+ result = `@layer components {\n${result}\n}`;
421
+
416
422
  return result;
417
423
 
418
424
  } catch (error) {