@webmate-studio/builder 0.2.101 → 0.2.102

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.101",
3
+ "version": "0.2.102",
4
4
  "type": "module",
5
5
  "description": "Webmate Studio Component Builder",
6
6
  "keywords": [
@@ -1228,6 +1228,37 @@ export function generateCSSFromTokens(tokens) {
1228
1228
  lines.push(` color: var(${colorVar});`);
1229
1229
  }
1230
1230
  lines.push(` }`);
1231
+
1232
+ // Add intrinsic responsive values (if the style itself has responsive values)
1233
+ const intrinsicBreakpoints = ['sm', 'md', 'lg', 'xl', '2xl'];
1234
+ for (const bp of intrinsicBreakpoints) {
1235
+ const hasIntrinsicResponsive = (
1236
+ (style.fontSize && typeof style.fontSize === 'object' && style.fontSize[bp]) ||
1237
+ (style.lineHeight && typeof style.lineHeight === 'object' && style.lineHeight[bp]) ||
1238
+ (style.letterSpacing && typeof style.letterSpacing === 'object' && style.letterSpacing[bp])
1239
+ );
1240
+
1241
+ if (hasIntrinsicResponsive) {
1242
+ const bpValue = intrinsicBreakpoints.indexOf(bp) === 0 ? '640px' :
1243
+ intrinsicBreakpoints.indexOf(bp) === 1 ? '768px' :
1244
+ intrinsicBreakpoints.indexOf(bp) === 2 ? '1024px' :
1245
+ intrinsicBreakpoints.indexOf(bp) === 3 ? '1280px' : '1536px';
1246
+
1247
+ lines.push(` @media (min-width: ${bpValue}) {`);
1248
+ lines.push(` .${className} {`);
1249
+ if (style.fontSize && typeof style.fontSize === 'object' && style.fontSize[bp]) {
1250
+ lines.push(` font-size: ${style.fontSize[bp]};`);
1251
+ }
1252
+ if (style.lineHeight && typeof style.lineHeight === 'object' && style.lineHeight[bp]) {
1253
+ lines.push(` line-height: ${style.lineHeight[bp]};`);
1254
+ }
1255
+ if (style.letterSpacing && typeof style.letterSpacing === 'object' && style.letterSpacing[bp]) {
1256
+ lines.push(` letter-spacing: ${style.letterSpacing[bp]};`);
1257
+ }
1258
+ lines.push(` }`);
1259
+ lines.push(` }`);
1260
+ }
1261
+ }
1231
1262
  }
1232
1263
  // Generate responsive variants (md:, lg:, xl:, 2xl:) for Tailwind compatibility
1233
1264
  const breakpointKeys = ['sm', 'md', 'lg', 'xl', '2xl'];