jasmincss 1.0.2 → 1.0.5

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Complete reference of all available utility classes and components**
4
4
  >
5
- > Generated automatically from JasminCSS v1.0.2
5
+ > Generated automatically from JasminCSS v1.0.5
6
6
 
7
7
  ## Table of Contents
8
8
 
package/dist/index.js CHANGED
@@ -401,7 +401,8 @@ function generateCssVariables(config) {
401
401
  }
402
402
  if (spacing) {
403
403
  Object.entries(spacing).forEach(([key, value]) => {
404
- vars[`--j-space-${key}`] = value;
404
+ const safeKey = String(key).replace(/\./g, "_");
405
+ vars[`--j-space-${safeKey}`] = value;
405
406
  });
406
407
  }
407
408
  if (branding.typography) {
@@ -3538,7 +3539,8 @@ function generateResponsiveUtilities(config, selectedUtilities, usedClasses, inc
3538
3539
  continue;
3539
3540
  const { classes } = generator(config);
3540
3541
  for (const cls of classes) {
3541
- const responsiveClassName = `${bp}\\:${cls.name}`;
3542
+ const escapedBp = escapeCssSelector(bp);
3543
+ const responsiveClassName = `${escapedBp}\\:${cls.name}`;
3542
3544
  const shouldInclude = includeAll || !usedClasses || usedClasses.has(`${bp}:${cls.name}`);
3543
3545
  if (shouldInclude) {
3544
3546
  bpClasses.push(cls.css.replace(
@@ -3650,6 +3652,13 @@ function generateStateUtilities(config, selectedUtilities, usedClasses, includeA
3650
3652
  function escapeRegex(string) {
3651
3653
  return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3652
3654
  }
3655
+ function escapeCssSelector(name) {
3656
+ if (/^\d/.test(name)) {
3657
+ const firstChar = name.charCodeAt(0).toString(16);
3658
+ return `\\${firstChar} ${name.slice(1)}`;
3659
+ }
3660
+ return name;
3661
+ }
3653
3662
 
3654
3663
  // src/components/buttons.js
3655
3664
  function generateButtonStyles(config) {
package/dist/index.mjs CHANGED
@@ -358,7 +358,8 @@ function generateCssVariables(config) {
358
358
  }
359
359
  if (spacing) {
360
360
  Object.entries(spacing).forEach(([key, value]) => {
361
- vars[`--j-space-${key}`] = value;
361
+ const safeKey = String(key).replace(/\./g, "_");
362
+ vars[`--j-space-${safeKey}`] = value;
362
363
  });
363
364
  }
364
365
  if (branding.typography) {
@@ -3495,7 +3496,8 @@ function generateResponsiveUtilities(config, selectedUtilities, usedClasses, inc
3495
3496
  continue;
3496
3497
  const { classes } = generator(config);
3497
3498
  for (const cls of classes) {
3498
- const responsiveClassName = `${bp}\\:${cls.name}`;
3499
+ const escapedBp = escapeCssSelector(bp);
3500
+ const responsiveClassName = `${escapedBp}\\:${cls.name}`;
3499
3501
  const shouldInclude = includeAll || !usedClasses || usedClasses.has(`${bp}:${cls.name}`);
3500
3502
  if (shouldInclude) {
3501
3503
  bpClasses.push(cls.css.replace(
@@ -3607,6 +3609,13 @@ function generateStateUtilities(config, selectedUtilities, usedClasses, includeA
3607
3609
  function escapeRegex(string) {
3608
3610
  return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3609
3611
  }
3612
+ function escapeCssSelector(name) {
3613
+ if (/^\d/.test(name)) {
3614
+ const firstChar = name.charCodeAt(0).toString(16);
3615
+ return `\\${firstChar} ${name.slice(1)}`;
3616
+ }
3617
+ return name;
3618
+ }
3610
3619
 
3611
3620
  // src/components/buttons.js
3612
3621
  function generateButtonStyles(config) {