@webmate-studio/builder 0.2.67 → 0.2.68

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.67",
3
+ "version": "0.2.68",
4
4
  "type": "module",
5
5
  "description": "Webmate Studio Component Builder",
6
6
  "keywords": [
@@ -12,7 +12,21 @@ function generateSemanticColorUtilities(tokens) {
12
12
  const colorMap = {
13
13
  // Brand colors
14
14
  'primary': 'primary',
15
+ 'primaryDark': 'primary-dark',
16
+ 'primaryLight': 'primary-light',
15
17
  'secondary': 'secondary',
18
+ 'secondaryDark': 'secondary-dark',
19
+ 'secondaryLight': 'secondary-light',
20
+
21
+ // Semantic state colors
22
+ 'success': 'success',
23
+ 'successDark': 'success-dark',
24
+ 'warning': 'warning',
25
+ 'warningDark': 'warning-dark',
26
+ 'error': 'error',
27
+ 'errorDark': 'error-dark',
28
+ 'info': 'info',
29
+ 'infoDark': 'info-dark',
16
30
 
17
31
  // Base semantic colors
18
32
  'bgBase': 'default',
@@ -198,6 +212,33 @@ export const defaultDesignTokens = {
198
212
  textTransform: 'none',
199
213
  textColor: 'textBase'
200
214
  },
215
+ heading4: {
216
+ fontFamily: 'heading',
217
+ fontSize: '1.5rem', // 24px
218
+ fontWeight: 600,
219
+ lineHeight: '1.3',
220
+ letterSpacing: '0em',
221
+ textTransform: 'none',
222
+ textColor: 'textBase'
223
+ },
224
+ heading5: {
225
+ fontFamily: 'heading',
226
+ fontSize: '1.25rem', // 20px
227
+ fontWeight: 600,
228
+ lineHeight: '1.3',
229
+ letterSpacing: '0em',
230
+ textTransform: 'none',
231
+ textColor: 'textBase'
232
+ },
233
+ heading6: {
234
+ fontFamily: 'heading',
235
+ fontSize: '1.125rem', // 18px
236
+ fontWeight: 600,
237
+ lineHeight: '1.3',
238
+ letterSpacing: '0em',
239
+ textTransform: 'none',
240
+ textColor: 'textBase'
241
+ },
201
242
  overlineDisplay: {
202
243
  fontFamily: 'body',
203
244
  fontSize: '1rem', // 16px
@@ -234,6 +275,33 @@ export const defaultDesignTokens = {
234
275
  textTransform: 'uppercase',
235
276
  textColor: 'textAccentSubtle'
236
277
  },
278
+ overlineHeading4: {
279
+ fontFamily: 'body',
280
+ fontSize: '0.75rem', // 12px
281
+ fontWeight: 500,
282
+ lineHeight: '1.5',
283
+ letterSpacing: '0.08em',
284
+ textTransform: 'uppercase',
285
+ textColor: 'textAccentSubtle'
286
+ },
287
+ overlineHeading5: {
288
+ fontFamily: 'body',
289
+ fontSize: '0.6875rem', // 11px
290
+ fontWeight: 500,
291
+ lineHeight: '1.5',
292
+ letterSpacing: '0.08em',
293
+ textTransform: 'uppercase',
294
+ textColor: 'textAccentMuted'
295
+ },
296
+ overlineHeading6: {
297
+ fontFamily: 'body',
298
+ fontSize: '0.625rem', // 10px
299
+ fontWeight: 500,
300
+ lineHeight: '1.5',
301
+ letterSpacing: '0.08em',
302
+ textTransform: 'uppercase',
303
+ textColor: 'textAccentMuted'
304
+ },
237
305
  lead: {
238
306
  fontFamily: 'body',
239
307
  fontSize: '1.25rem', // 20px
@@ -514,7 +582,13 @@ export function generateTailwindV4Theme(tokens) {
514
582
  // Text Styles - Generate CSS variables for each style (with responsive support)
515
583
  if (tokens.textStyles) {
516
584
  for (const [styleName, style] of Object.entries(tokens.textStyles)) {
517
- const kebabName = styleName.replace(/([A-Z0-9])/g, '-$1').toLowerCase();
585
+ // Convert camelCase to kebab-case with numbers separated
586
+ // heading1 -> heading-1, overlineHeading2 -> overline-heading-2
587
+ const kebabName = styleName
588
+ .replace(/([A-Z])/g, '-$1') // Insert hyphen before capitals
589
+ .replace(/(\d+)/g, '-$1') // Insert hyphen before numbers
590
+ .toLowerCase()
591
+ .replace(/^-/, ''); // Remove leading hyphen
518
592
 
519
593
  // Font family (not responsive)
520
594
  if (style.fontFamily) {
@@ -654,7 +728,11 @@ body {
654
728
  if (tokens.textStyles) {
655
729
  globalStyles += '\n\n/* Text Style Utilities */';
656
730
  for (const [styleName, style] of Object.entries(tokens.textStyles)) {
657
- const kebabName = styleName.replace(/([A-Z0-9])/g, '-$1').toLowerCase();
731
+ const kebabName = styleName
732
+ .replace(/([A-Z])/g, '-$1')
733
+ .replace(/(\d+)/g, '-$1')
734
+ .toLowerCase()
735
+ .replace(/^-/, '');
658
736
  const className = `text-${kebabName}`;
659
737
 
660
738
  globalStyles += `\n.${className} {`;
@@ -744,7 +822,11 @@ body {
744
822
  const mediaQueryLines = [];
745
823
 
746
824
  for (const [styleName, style] of Object.entries(tokens.textStyles)) {
747
- const kebabName = styleName.replace(/([A-Z0-9])/g, '-$1').toLowerCase();
825
+ const kebabName = styleName
826
+ .replace(/([A-Z])/g, '-$1')
827
+ .replace(/(\d+)/g, '-$1')
828
+ .toLowerCase()
829
+ .replace(/^-/, '');
748
830
 
749
831
  // Font size
750
832
  if (style.fontSize && typeof style.fontSize === 'object' && style.fontSize[bp]) {
@@ -947,7 +1029,11 @@ export function generateCSSFromTokens(tokens) {
947
1029
  lines.push('');
948
1030
  lines.push('/* Text Style Utilities */');
949
1031
  for (const [styleName, style] of Object.entries(tokens.textStyles)) {
950
- const kebabName = styleName.replace(/([A-Z0-9])/g, '-$1').toLowerCase();
1032
+ const kebabName = styleName
1033
+ .replace(/([A-Z])/g, '-$1')
1034
+ .replace(/(\d+)/g, '-$1')
1035
+ .toLowerCase()
1036
+ .replace(/^-/, '');
951
1037
  const className = `text-${kebabName}`;
952
1038
 
953
1039
  lines.push(`.${className} {`);
@@ -993,7 +1079,11 @@ export function generateCSSFromTokens(tokens) {
993
1079
  const mediaQueryLines = [];
994
1080
 
995
1081
  for (const [styleName, style] of Object.entries(tokens.textStyles)) {
996
- const kebabName = styleName.replace(/([A-Z0-9])/g, '-$1').toLowerCase();
1082
+ const kebabName = styleName
1083
+ .replace(/([A-Z])/g, '-$1')
1084
+ .replace(/(\d+)/g, '-$1')
1085
+ .toLowerCase()
1086
+ .replace(/^-/, '');
997
1087
  const className = `text-${kebabName}`;
998
1088
  const hasResponsive = (
999
1089
  (style.fontSize && typeof style.fontSize === 'object' && style.fontSize[bp]) ||