jasmincss 1.0.7 → 1.0.8

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.7
5
+ > Generated automatically from JasminCSS v1.0.8
6
6
 
7
7
  ## Table of Contents
8
8
 
@@ -1017,6 +1017,8 @@
1017
1017
  | `rounded-xl` | `border-radius: 1rem;` |
1018
1018
  | `rounded-2xl` | `border-radius: 1.5rem;` |
1019
1019
  | `rounded-full` | `border-radius: 9999px;` |
1020
+ | `rounded-buttons` | `border-radius: 0.5rem;` |
1021
+ | `rounded-inputs` | `border-radius: 0.5rem;` |
1020
1022
  | `rounded-t-none` | `border-top-left-radius: 0; border-top-right-radius: 0;` |
1021
1023
  | `rounded-r-none` | `border-top-right-radius: 0; border-bottom-right-radius: 0;` |
1022
1024
  | `rounded-b-none` | `border-bottom-left-radius: 0; border-bottom-right-radius: 0;` |
@@ -1129,6 +1131,34 @@
1129
1131
  | `rounded-se-full` | `border-start-end-radius: 9999px;` |
1130
1132
  | `rounded-ee-full` | `border-end-end-radius: 9999px;` |
1131
1133
  | `rounded-es-full` | `border-end-start-radius: 9999px;` |
1134
+ | `rounded-t-buttons` | `border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem;` |
1135
+ | `rounded-r-buttons` | `border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem;` |
1136
+ | `rounded-b-buttons` | `border-bottom-left-radius: 0.5rem; border-bottom-right-radius: 0.5rem;` |
1137
+ | `rounded-l-buttons` | `border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem;` |
1138
+ | `rounded-tl-buttons` | `border-top-left-radius: 0.5rem;` |
1139
+ | `rounded-tr-buttons` | `border-top-right-radius: 0.5rem;` |
1140
+ | `rounded-br-buttons` | `border-bottom-right-radius: 0.5rem;` |
1141
+ | `rounded-bl-buttons` | `border-bottom-left-radius: 0.5rem;` |
1142
+ | `rounded-s-buttons` | `border-start-start-radius: 0.5rem; border-end-start-radius: 0.5rem;` |
1143
+ | `rounded-e-buttons` | `border-start-end-radius: 0.5rem; border-end-end-radius: 0.5rem;` |
1144
+ | `rounded-ss-buttons` | `border-start-start-radius: 0.5rem;` |
1145
+ | `rounded-se-buttons` | `border-start-end-radius: 0.5rem;` |
1146
+ | `rounded-ee-buttons` | `border-end-end-radius: 0.5rem;` |
1147
+ | `rounded-es-buttons` | `border-end-start-radius: 0.5rem;` |
1148
+ | `rounded-t-inputs` | `border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem;` |
1149
+ | `rounded-r-inputs` | `border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem;` |
1150
+ | `rounded-b-inputs` | `border-bottom-left-radius: 0.5rem; border-bottom-right-radius: 0.5rem;` |
1151
+ | `rounded-l-inputs` | `border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem;` |
1152
+ | `rounded-tl-inputs` | `border-top-left-radius: 0.5rem;` |
1153
+ | `rounded-tr-inputs` | `border-top-right-radius: 0.5rem;` |
1154
+ | `rounded-br-inputs` | `border-bottom-right-radius: 0.5rem;` |
1155
+ | `rounded-bl-inputs` | `border-bottom-left-radius: 0.5rem;` |
1156
+ | `rounded-s-inputs` | `border-start-start-radius: 0.5rem; border-end-start-radius: 0.5rem;` |
1157
+ | `rounded-e-inputs` | `border-start-end-radius: 0.5rem; border-end-end-radius: 0.5rem;` |
1158
+ | `rounded-ss-inputs` | `border-start-start-radius: 0.5rem;` |
1159
+ | `rounded-se-inputs` | `border-start-end-radius: 0.5rem;` |
1160
+ | `rounded-ee-inputs` | `border-end-end-radius: 0.5rem;` |
1161
+ | `rounded-es-inputs` | `border-end-start-radius: 0.5rem;` |
1132
1162
  | `border-0` | `border-width: 0px;` |
1133
1163
  | `border` | `border-width: 1px;` |
1134
1164
  | `border-2` | `border-width: 2px;` |
@@ -2393,6 +2423,6 @@ export default withJasminCSS({});
2393
2423
 
2394
2424
  ---
2395
2425
 
2396
- **Total utility classes: 5,926**
2426
+ **Total utility classes: 5,956**
2397
2427
 
2398
2428
  Generated on 2026-01-16
package/bin/jasmin.js CHANGED
File without changes
package/dist/index.js CHANGED
@@ -46,6 +46,7 @@ var import_fs2 = __toESM(require("fs"), 1);
46
46
  var import_fast_glob = __toESM(require("fast-glob"), 1);
47
47
  var import_postcss = __toESM(require("postcss"), 1);
48
48
  var import_cssnano = __toESM(require("cssnano"), 1);
49
+ var import_picocolors = __toESM(require("picocolors"), 1);
49
50
 
50
51
  // src/config/loader.js
51
52
  var import_fs = __toESM(require("fs"), 1);
@@ -94,7 +95,12 @@ var defaultConfig = {
94
95
  lg: "0.75rem",
95
96
  xl: "1rem",
96
97
  "2xl": "1.5rem",
97
- full: "9999px"
98
+ full: "9999px",
99
+ // Component-specific border radius
100
+ buttons: "0.5rem",
101
+ // Separate radius for buttons
102
+ inputs: "0.5rem"
103
+ // Separate radius for form inputs, cards, etc.
98
104
  },
99
105
  shadows: {
100
106
  sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
@@ -3674,7 +3680,7 @@ function generateButtonStyles(config) {
3674
3680
  font-size: 0.875rem;
3675
3681
  font-weight: 500;
3676
3682
  line-height: 1.25rem;
3677
- border-radius: var(--j-radius-default, 0.5rem);
3683
+ border-radius: var(--j-radius-buttons, var(--j-radius-default, 0.5rem));
3678
3684
  border: 1px solid transparent;
3679
3685
  cursor: pointer;
3680
3686
  transition: all 150ms ease-in-out;
@@ -4432,7 +4438,7 @@ function generateFormStyles(config) {
4432
4438
  color: var(--j-text);
4433
4439
  background-color: var(--j-bg);
4434
4440
  border: 1px solid var(--j-border);
4435
- border-radius: var(--j-radius-default, 0.5rem);
4441
+ border-radius: var(--j-radius-inputs, var(--j-radius-default, 0.5rem));
4436
4442
  transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
4437
4443
  appearance: none;
4438
4444
  }
@@ -4816,7 +4822,7 @@ input[type="range"].form-control::-webkit-slider-thumb:hover {
4816
4822
 
4817
4823
  /* Square Switch */
4818
4824
  .form-switch-square .form-switch-input {
4819
- border-radius: var(--j-radius-default, 0.375rem);
4825
+ border-radius: var(--j-radius-inputs, var(--j-radius-default, 0.375rem));
4820
4826
  }
4821
4827
 
4822
4828
  .form-switch-square .form-switch-input::before {
@@ -4862,12 +4868,12 @@ input[type="range"].form-control::-webkit-slider-thumb:hover {
4862
4868
 
4863
4869
  .input-group-text:first-child {
4864
4870
  border-right: none;
4865
- border-radius: var(--j-radius-default, 0.5rem) 0 0 var(--j-radius-default, 0.5rem);
4871
+ border-radius: var(--j-radius-inputs, 0.5rem) 0 0 var(--j-radius-inputs, 0.5rem);
4866
4872
  }
4867
4873
 
4868
4874
  .input-group-text:last-child {
4869
4875
  border-left: none;
4870
- border-radius: 0 var(--j-radius-default, 0.5rem) var(--j-radius-default, 0.5rem) 0;
4876
+ border-radius: 0 var(--j-radius-inputs, 0.5rem) var(--j-radius-inputs, 0.5rem) 0;
4871
4877
  }
4872
4878
 
4873
4879
  .input-group > .btn:first-child {
@@ -4904,7 +4910,7 @@ input[type="range"].form-control::-webkit-slider-thumb:hover {
4904
4910
 
4905
4911
  .form-floating > .form-control:focus ~ .form-label,
4906
4912
  .form-floating > .form-control:not(:placeholder-shown) ~ .form-label {
4907
- transform: scale(0.85) translateY(-0.5rem);
4913
+ transform: scale(0.85) translateY(-0.5rem));
4908
4914
  color: var(--j-primary);
4909
4915
  }
4910
4916
 
@@ -4918,7 +4924,7 @@ input[type="range"].form-control::-webkit-slider-thumb:hover {
4918
4924
  /* Fieldset */
4919
4925
  fieldset {
4920
4926
  border: 1px solid var(--j-border);
4921
- border-radius: var(--j-radius-default, 0.5rem);
4927
+ border-radius: var(--j-radius-inputs, var(--j-radius-default, 0.5rem));
4922
4928
  padding: 1.5rem;
4923
4929
  margin-bottom: 1.5rem;
4924
4930
  }
@@ -14739,9 +14745,81 @@ code, kbd, samp, pre {
14739
14745
  }
14740
14746
 
14741
14747
  // src/core/compiler.js
14748
+ var COMPONENT_CLASS_PREFIXES = {
14749
+ "accordion": "accordion",
14750
+ "alert": "alerts",
14751
+ "avatar": "avatars",
14752
+ "badge": "badges",
14753
+ "btn": "buttons",
14754
+ "card": "cards",
14755
+ "carousel": "carousel",
14756
+ "chip": "chips",
14757
+ "command-palette": "command-palette",
14758
+ "datepicker": "datepicker",
14759
+ "calendar": "datepicker",
14760
+ "dropdown": "dropdown",
14761
+ "form-": "forms",
14762
+ "input-group": "forms",
14763
+ "modal": "modals",
14764
+ "navbar": "navigation",
14765
+ "nav-": "navigation",
14766
+ "breadcrumb": "navigation",
14767
+ "pagination": "navigation",
14768
+ "tabs": "navigation",
14769
+ "tab": "navigation",
14770
+ "offcanvas": "offcanvas",
14771
+ "popover": "popover",
14772
+ "progress": "progress",
14773
+ "rating": "rating",
14774
+ "skeleton": "skeleton",
14775
+ "spinner": "spinner",
14776
+ "stepper": "stepper",
14777
+ "table": "tables",
14778
+ "timeline": "timeline",
14779
+ "timepicker": "timepicker",
14780
+ "tooltip": "tooltips",
14781
+ "upload": "upload"
14782
+ };
14783
+ function detectUsedComponents(usedClasses) {
14784
+ const detectedComponents = /* @__PURE__ */ new Set();
14785
+ if (!usedClasses)
14786
+ return detectedComponents;
14787
+ for (const className of usedClasses) {
14788
+ for (const [prefix, component] of Object.entries(COMPONENT_CLASS_PREFIXES)) {
14789
+ if (className.startsWith(prefix) || className === prefix.replace(/-$/, "")) {
14790
+ detectedComponents.add(component);
14791
+ }
14792
+ }
14793
+ }
14794
+ return detectedComponents;
14795
+ }
14796
+ function getMissingComponents(configComponents, detectedComponents) {
14797
+ const missing = [];
14798
+ for (const comp of detectedComponents) {
14799
+ if (!configComponents || !configComponents.includes(comp)) {
14800
+ missing.push(comp);
14801
+ }
14802
+ }
14803
+ return missing;
14804
+ }
14742
14805
  async function compileCSS(config, options = {}) {
14743
- const { usedClasses, minify = false, includeAll = false } = options;
14806
+ const { usedClasses, minify = false, includeAll = false, autoDetectComponents = true } = options;
14744
14807
  const resolvedConfig = resolveConfig(config);
14808
+ let selectedComponents = config.components || [];
14809
+ let detectedComponents = /* @__PURE__ */ new Set();
14810
+ let missingComponents = [];
14811
+ if (usedClasses && autoDetectComponents) {
14812
+ detectedComponents = detectUsedComponents(usedClasses);
14813
+ missingComponents = getMissingComponents(selectedComponents, detectedComponents);
14814
+ if (missingComponents.length > 0) {
14815
+ console.log(import_picocolors.default.yellow(`
14816
+ \u26A0\uFE0F Auto-detected ${missingComponents.length} additional component(s):`));
14817
+ console.log(import_picocolors.default.dim(` ${missingComponents.join(", ")}`));
14818
+ console.log(import_picocolors.default.dim(` Adding them to this build automatically.
14819
+ `));
14820
+ selectedComponents = [.../* @__PURE__ */ new Set([...selectedComponents, ...missingComponents])];
14821
+ }
14822
+ }
14745
14823
  const parts = [];
14746
14824
  parts.push(generateBase(resolvedConfig));
14747
14825
  const utilities = generateUtilities(resolvedConfig, {
@@ -14750,7 +14828,7 @@ async function compileCSS(config, options = {}) {
14750
14828
  });
14751
14829
  parts.push(utilities.css);
14752
14830
  const components2 = generateComponents(resolvedConfig, {
14753
- selected: config.components,
14831
+ selected: selectedComponents,
14754
14832
  usedClasses,
14755
14833
  includeAll
14756
14834
  });
@@ -14773,7 +14851,9 @@ async function compileCSS(config, options = {}) {
14773
14851
  minified,
14774
14852
  stats: {
14775
14853
  utilities: utilities.count,
14776
- components: components2.count
14854
+ components: components2.count,
14855
+ autoDetected: missingComponents,
14856
+ totalComponents: selectedComponents.length
14777
14857
  }
14778
14858
  };
14779
14859
  }
package/dist/index.mjs CHANGED
@@ -3,6 +3,7 @@ import fs2 from "fs";
3
3
  import fg from "fast-glob";
4
4
  import postcss from "postcss";
5
5
  import cssnano from "cssnano";
6
+ import pc from "picocolors";
6
7
 
7
8
  // src/config/loader.js
8
9
  import fs from "fs";
@@ -51,7 +52,12 @@ var defaultConfig = {
51
52
  lg: "0.75rem",
52
53
  xl: "1rem",
53
54
  "2xl": "1.5rem",
54
- full: "9999px"
55
+ full: "9999px",
56
+ // Component-specific border radius
57
+ buttons: "0.5rem",
58
+ // Separate radius for buttons
59
+ inputs: "0.5rem"
60
+ // Separate radius for form inputs, cards, etc.
55
61
  },
56
62
  shadows: {
57
63
  sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
@@ -3631,7 +3637,7 @@ function generateButtonStyles(config) {
3631
3637
  font-size: 0.875rem;
3632
3638
  font-weight: 500;
3633
3639
  line-height: 1.25rem;
3634
- border-radius: var(--j-radius-default, 0.5rem);
3640
+ border-radius: var(--j-radius-buttons, var(--j-radius-default, 0.5rem));
3635
3641
  border: 1px solid transparent;
3636
3642
  cursor: pointer;
3637
3643
  transition: all 150ms ease-in-out;
@@ -4389,7 +4395,7 @@ function generateFormStyles(config) {
4389
4395
  color: var(--j-text);
4390
4396
  background-color: var(--j-bg);
4391
4397
  border: 1px solid var(--j-border);
4392
- border-radius: var(--j-radius-default, 0.5rem);
4398
+ border-radius: var(--j-radius-inputs, var(--j-radius-default, 0.5rem));
4393
4399
  transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
4394
4400
  appearance: none;
4395
4401
  }
@@ -4773,7 +4779,7 @@ input[type="range"].form-control::-webkit-slider-thumb:hover {
4773
4779
 
4774
4780
  /* Square Switch */
4775
4781
  .form-switch-square .form-switch-input {
4776
- border-radius: var(--j-radius-default, 0.375rem);
4782
+ border-radius: var(--j-radius-inputs, var(--j-radius-default, 0.375rem));
4777
4783
  }
4778
4784
 
4779
4785
  .form-switch-square .form-switch-input::before {
@@ -4819,12 +4825,12 @@ input[type="range"].form-control::-webkit-slider-thumb:hover {
4819
4825
 
4820
4826
  .input-group-text:first-child {
4821
4827
  border-right: none;
4822
- border-radius: var(--j-radius-default, 0.5rem) 0 0 var(--j-radius-default, 0.5rem);
4828
+ border-radius: var(--j-radius-inputs, 0.5rem) 0 0 var(--j-radius-inputs, 0.5rem);
4823
4829
  }
4824
4830
 
4825
4831
  .input-group-text:last-child {
4826
4832
  border-left: none;
4827
- border-radius: 0 var(--j-radius-default, 0.5rem) var(--j-radius-default, 0.5rem) 0;
4833
+ border-radius: 0 var(--j-radius-inputs, 0.5rem) var(--j-radius-inputs, 0.5rem) 0;
4828
4834
  }
4829
4835
 
4830
4836
  .input-group > .btn:first-child {
@@ -4861,7 +4867,7 @@ input[type="range"].form-control::-webkit-slider-thumb:hover {
4861
4867
 
4862
4868
  .form-floating > .form-control:focus ~ .form-label,
4863
4869
  .form-floating > .form-control:not(:placeholder-shown) ~ .form-label {
4864
- transform: scale(0.85) translateY(-0.5rem);
4870
+ transform: scale(0.85) translateY(-0.5rem));
4865
4871
  color: var(--j-primary);
4866
4872
  }
4867
4873
 
@@ -4875,7 +4881,7 @@ input[type="range"].form-control::-webkit-slider-thumb:hover {
4875
4881
  /* Fieldset */
4876
4882
  fieldset {
4877
4883
  border: 1px solid var(--j-border);
4878
- border-radius: var(--j-radius-default, 0.5rem);
4884
+ border-radius: var(--j-radius-inputs, var(--j-radius-default, 0.5rem));
4879
4885
  padding: 1.5rem;
4880
4886
  margin-bottom: 1.5rem;
4881
4887
  }
@@ -14696,9 +14702,81 @@ code, kbd, samp, pre {
14696
14702
  }
14697
14703
 
14698
14704
  // src/core/compiler.js
14705
+ var COMPONENT_CLASS_PREFIXES = {
14706
+ "accordion": "accordion",
14707
+ "alert": "alerts",
14708
+ "avatar": "avatars",
14709
+ "badge": "badges",
14710
+ "btn": "buttons",
14711
+ "card": "cards",
14712
+ "carousel": "carousel",
14713
+ "chip": "chips",
14714
+ "command-palette": "command-palette",
14715
+ "datepicker": "datepicker",
14716
+ "calendar": "datepicker",
14717
+ "dropdown": "dropdown",
14718
+ "form-": "forms",
14719
+ "input-group": "forms",
14720
+ "modal": "modals",
14721
+ "navbar": "navigation",
14722
+ "nav-": "navigation",
14723
+ "breadcrumb": "navigation",
14724
+ "pagination": "navigation",
14725
+ "tabs": "navigation",
14726
+ "tab": "navigation",
14727
+ "offcanvas": "offcanvas",
14728
+ "popover": "popover",
14729
+ "progress": "progress",
14730
+ "rating": "rating",
14731
+ "skeleton": "skeleton",
14732
+ "spinner": "spinner",
14733
+ "stepper": "stepper",
14734
+ "table": "tables",
14735
+ "timeline": "timeline",
14736
+ "timepicker": "timepicker",
14737
+ "tooltip": "tooltips",
14738
+ "upload": "upload"
14739
+ };
14740
+ function detectUsedComponents(usedClasses) {
14741
+ const detectedComponents = /* @__PURE__ */ new Set();
14742
+ if (!usedClasses)
14743
+ return detectedComponents;
14744
+ for (const className of usedClasses) {
14745
+ for (const [prefix, component] of Object.entries(COMPONENT_CLASS_PREFIXES)) {
14746
+ if (className.startsWith(prefix) || className === prefix.replace(/-$/, "")) {
14747
+ detectedComponents.add(component);
14748
+ }
14749
+ }
14750
+ }
14751
+ return detectedComponents;
14752
+ }
14753
+ function getMissingComponents(configComponents, detectedComponents) {
14754
+ const missing = [];
14755
+ for (const comp of detectedComponents) {
14756
+ if (!configComponents || !configComponents.includes(comp)) {
14757
+ missing.push(comp);
14758
+ }
14759
+ }
14760
+ return missing;
14761
+ }
14699
14762
  async function compileCSS(config, options = {}) {
14700
- const { usedClasses, minify = false, includeAll = false } = options;
14763
+ const { usedClasses, minify = false, includeAll = false, autoDetectComponents = true } = options;
14701
14764
  const resolvedConfig = resolveConfig(config);
14765
+ let selectedComponents = config.components || [];
14766
+ let detectedComponents = /* @__PURE__ */ new Set();
14767
+ let missingComponents = [];
14768
+ if (usedClasses && autoDetectComponents) {
14769
+ detectedComponents = detectUsedComponents(usedClasses);
14770
+ missingComponents = getMissingComponents(selectedComponents, detectedComponents);
14771
+ if (missingComponents.length > 0) {
14772
+ console.log(pc.yellow(`
14773
+ \u26A0\uFE0F Auto-detected ${missingComponents.length} additional component(s):`));
14774
+ console.log(pc.dim(` ${missingComponents.join(", ")}`));
14775
+ console.log(pc.dim(` Adding them to this build automatically.
14776
+ `));
14777
+ selectedComponents = [.../* @__PURE__ */ new Set([...selectedComponents, ...missingComponents])];
14778
+ }
14779
+ }
14702
14780
  const parts = [];
14703
14781
  parts.push(generateBase(resolvedConfig));
14704
14782
  const utilities = generateUtilities(resolvedConfig, {
@@ -14707,7 +14785,7 @@ async function compileCSS(config, options = {}) {
14707
14785
  });
14708
14786
  parts.push(utilities.css);
14709
14787
  const components2 = generateComponents(resolvedConfig, {
14710
- selected: config.components,
14788
+ selected: selectedComponents,
14711
14789
  usedClasses,
14712
14790
  includeAll
14713
14791
  });
@@ -14730,7 +14808,9 @@ async function compileCSS(config, options = {}) {
14730
14808
  minified,
14731
14809
  stats: {
14732
14810
  utilities: utilities.count,
14733
- components: components2.count
14811
+ components: components2.count,
14812
+ autoDetected: missingComponents,
14813
+ totalComponents: selectedComponents.length
14734
14814
  }
14735
14815
  };
14736
14816
  }