@webmate-studio/builder 0.2.38 → 0.2.40

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.38",
3
+ "version": "0.2.40",
4
4
  "type": "module",
5
5
  "description": "Webmate Studio Component Builder",
6
6
  "keywords": [
package/src/build.js CHANGED
@@ -369,11 +369,13 @@ export async function build(options = {}) {
369
369
 
370
370
  // Generate Tailwind CSS for this component
371
371
  logger.info(`Generating Tailwind CSS for ${component.name}...`);
372
- const { css, classes } = await generateComponentCSS(allHTML, {
372
+ const tailwindOptions = {
373
373
  minify: minify,
374
374
  designTokens: options.designTokens, // Pass design tokens to Tailwind generator
375
375
  includeBaseLayers: false // Only generate utilities, not base/theme/properties layers
376
- });
376
+ };
377
+ console.log('[Build.js] CALLING generateComponentCSS with options:', JSON.stringify(tailwindOptions, null, 2));
378
+ const { css, classes } = await generateComponentCSS(allHTML, tailwindOptions);
377
379
 
378
380
  // Write CSS file
379
381
  const cssFile = file.replace(/\.html$/, '.tailwind.css');
@@ -146,6 +146,8 @@ function generateThemeCSS(colors, designTokens = null) {
146
146
  * @returns {Promise<string>} Generated CSS
147
147
  */
148
148
  export async function generateTailwindCSS(classes, options = {}) {
149
+ console.log('[Tailwind Generator] RECEIVED options:', JSON.stringify(options, null, 2));
150
+
149
151
  const {
150
152
  designTokens = null,
151
153
  minify = true,
@@ -321,9 +323,17 @@ ${themeCSS}
321
323
  // Build CSS for the specific classes
322
324
  let result = await compiler.build(classArray);
323
325
 
326
+ console.log(`[Tailwind Generator] includeBaseLayers = ${includeBaseLayers}`);
327
+ console.log(`[Tailwind Generator] Generated CSS length BEFORE stripping: ${result.length}`);
328
+ console.log(`[Tailwind Generator] CSS contains @layer base: ${result.includes('@layer base')}`);
329
+ console.log(`[Tailwind Generator] CSS contains @layer theme: ${result.includes('@layer theme')}`);
330
+
324
331
  // If includeBaseLayers is false, strip out base/theme/properties layers
325
332
  if (!includeBaseLayers) {
333
+ console.log('[Tailwind Generator] Stripping non-utility layers...');
326
334
  result = stripNonUtilityLayers(result);
335
+ console.log(`[Tailwind Generator] Generated CSS length AFTER stripping: ${result.length}`);
336
+ console.log(`[Tailwind Generator] CSS contains @layer base: ${result.includes('@layer base')}`);
327
337
  }
328
338
 
329
339
  return result;
@@ -341,6 +351,8 @@ ${themeCSS}
341
351
  * @returns {Promise<{css: string, classes: string[]}>} Generated CSS and extracted classes
342
352
  */
343
353
  export async function generateComponentCSS(html, options = {}) {
354
+ console.log('[Component CSS] RECEIVED options:', JSON.stringify(options, null, 2));
355
+
344
356
  // Extract classes from HTML
345
357
  const classes = extractTailwindClasses(html);
346
358
 
@@ -351,6 +363,8 @@ export async function generateComponentCSS(html, options = {}) {
351
363
  };
352
364
  }
353
365
 
366
+ console.log('[Component CSS] PASSING options to generateTailwindCSS:', JSON.stringify(options, null, 2));
367
+
354
368
  // Generate CSS
355
369
  const css = await generateTailwindCSS(classes, options);
356
370