tailwind-to-style 2.12.0 → 2.12.1

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/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * tailwind-to-style v2.12.0
2
+ * tailwind-to-style v2.12.1
3
3
  * Convert tailwind classes to inline style
4
4
  *
5
5
  * @author Bigetion
@@ -8395,9 +8395,9 @@ function createVariants(configs) {
8395
8395
  return result;
8396
8396
  }
8397
8397
 
8398
- /**
8399
- * Bundle Analyzer - Analyzes bundle size and provides optimization recommendations
8400
- * @module optimization/bundleAnalyzer
8398
+ /**
8399
+ * Bundle Analyzer - Analyzes bundle size and provides optimization recommendations
8400
+ * @module optimization/bundleAnalyzer
8401
8401
  */
8402
8402
 
8403
8403
  class BundleAnalyzer {
@@ -8419,8 +8419,8 @@ class BundleAnalyzer {
8419
8419
  };
8420
8420
  }
8421
8421
 
8422
- /**
8423
- * Analyze the current bundle
8422
+ /**
8423
+ * Analyze the current bundle
8424
8424
  */
8425
8425
  analyze() {
8426
8426
  const cache = getTailwindCache();
@@ -8446,8 +8446,8 @@ class BundleAnalyzer {
8446
8446
  return this.stats;
8447
8447
  }
8448
8448
 
8449
- /**
8450
- * Analyze CSS object by categories
8449
+ /**
8450
+ * Analyze CSS object by categories
8451
8451
  */
8452
8452
  analyzeCSSObject(cssObject) {
8453
8453
  const categories = {};
@@ -8473,8 +8473,8 @@ class BundleAnalyzer {
8473
8473
  this.stats.categories = categories;
8474
8474
  }
8475
8475
 
8476
- /**
8477
- * Categorize CSS class
8476
+ /**
8477
+ * Categorize CSS class
8478
8478
  */
8479
8479
  categorizeClass(className) {
8480
8480
  const categories = {
@@ -8498,8 +8498,8 @@ class BundleAnalyzer {
8498
8498
  return "other";
8499
8499
  }
8500
8500
 
8501
- /**
8502
- * Estimate gzip size
8501
+ /**
8502
+ * Estimate gzip size
8503
8503
  */
8504
8504
  estimateGzipSize(content) {
8505
8505
  // Rough estimation: typically 70-80% compression ratio
@@ -8508,8 +8508,8 @@ class BundleAnalyzer {
8508
8508
  return Math.round(this.stats.totalSize * compressionRatio);
8509
8509
  }
8510
8510
 
8511
- /**
8512
- * Generate optimization recommendations
8511
+ /**
8512
+ * Generate optimization recommendations
8513
8513
  */
8514
8514
  generateRecommendations() {
8515
8515
  const recommendations = [];
@@ -8572,8 +8572,8 @@ class BundleAnalyzer {
8572
8572
  this.stats.recommendations = recommendations;
8573
8573
  }
8574
8574
 
8575
- /**
8576
- * Print analysis report
8575
+ /**
8576
+ * Print analysis report
8577
8577
  */
8578
8578
  printReport() {
8579
8579
  console.log("\nšŸ“Š Bundle Analysis Report");
@@ -8598,8 +8598,8 @@ class BundleAnalyzer {
8598
8598
  console.log("\n" + "=".repeat(60) + "\n");
8599
8599
  }
8600
8600
 
8601
- /**
8602
- * Format bytes to human readable
8601
+ /**
8602
+ * Format bytes to human readable
8603
8603
  */
8604
8604
  formatBytes(bytes) {
8605
8605
  if (bytes === 0) return "0 Bytes";
@@ -8609,8 +8609,8 @@ class BundleAnalyzer {
8609
8609
  return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
8610
8610
  }
8611
8611
 
8612
- /**
8613
- * Export analysis to JSON
8612
+ /**
8613
+ * Export analysis to JSON
8614
8614
  */
8615
8615
  toJSON() {
8616
8616
  return JSON.stringify(this.stats, null, 2);
@@ -8622,9 +8622,9 @@ var bundleAnalyzer = /*#__PURE__*/Object.freeze({
8622
8622
  BundleAnalyzer: BundleAnalyzer
8623
8623
  });
8624
8624
 
8625
- /**
8626
- * Build-time CSS Extractor - Extracts CSS at build time for static generation
8627
- * @module optimization/buildTimeExtractor
8625
+ /**
8626
+ * Build-time CSS Extractor - Extracts CSS at build time for static generation
8627
+ * @module optimization/buildTimeExtractor
8628
8628
  */
8629
8629
 
8630
8630
  class BuildTimeExtractor {
@@ -8650,8 +8650,8 @@ class BuildTimeExtractor {
8650
8650
  };
8651
8651
  }
8652
8652
 
8653
- /**
8654
- * Extract CSS from source files
8653
+ /**
8654
+ * Extract CSS from source files
8655
8655
  */
8656
8656
  async extract() {
8657
8657
  try {
@@ -8673,8 +8673,8 @@ class BuildTimeExtractor {
8673
8673
  }
8674
8674
  }
8675
8675
 
8676
- /**
8677
- * Resolve source files from input patterns
8676
+ /**
8677
+ * Resolve source files from input patterns
8678
8678
  */
8679
8679
  async resolveSourceFiles() {
8680
8680
  var _process$versions;
@@ -8696,8 +8696,8 @@ class BuildTimeExtractor {
8696
8696
  return this.options.input;
8697
8697
  }
8698
8698
 
8699
- /**
8700
- * Process a single file
8699
+ /**
8700
+ * Process a single file
8701
8701
  */
8702
8702
  async processFile(filePath) {
8703
8703
  try {
@@ -8715,8 +8715,8 @@ class BuildTimeExtractor {
8715
8715
  }
8716
8716
  }
8717
8717
 
8718
- /**
8719
- * Read file content
8718
+ /**
8719
+ * Read file content
8720
8720
  */
8721
8721
  async readFile(filePath) {
8722
8722
  var _process$versions2;
@@ -8731,8 +8731,8 @@ class BuildTimeExtractor {
8731
8731
  return await response.text();
8732
8732
  }
8733
8733
 
8734
- /**
8735
- * Extract Tailwind classes from file content
8734
+ /**
8735
+ * Extract Tailwind classes from file content
8736
8736
  */
8737
8737
  extractClasses(content) {
8738
8738
  const classes = new Set();
@@ -8760,8 +8760,8 @@ class BuildTimeExtractor {
8760
8760
  return Array.from(classes);
8761
8761
  }
8762
8762
 
8763
- /**
8764
- * Generate CSS for extracted classes
8763
+ /**
8764
+ * Generate CSS for extracted classes
8765
8765
  */
8766
8766
  async generateCSSForClasses(classes) {
8767
8767
  // Import tws dynamically to generate CSS
@@ -8782,8 +8782,8 @@ class BuildTimeExtractor {
8782
8782
  }
8783
8783
  }
8784
8784
 
8785
- /**
8786
- * Format output based on options
8785
+ /**
8786
+ * Format output based on options
8787
8787
  */
8788
8788
  formatOutput() {
8789
8789
  let output = this.extractedCSS;
@@ -8812,8 +8812,8 @@ class BuildTimeExtractor {
8812
8812
  }
8813
8813
  }
8814
8814
 
8815
- /**
8816
- * Minify CSS
8815
+ /**
8816
+ * Minify CSS
8817
8817
  */
8818
8818
  minifyCSS(css) {
8819
8819
  return css.replace(/\s+/g, " ") // Multiple spaces to single
@@ -8823,8 +8823,8 @@ class BuildTimeExtractor {
8823
8823
  .trim();
8824
8824
  }
8825
8825
 
8826
- /**
8827
- * Format bytes to human readable
8826
+ /**
8827
+ * Format bytes to human readable
8828
8828
  */
8829
8829
  formatBytes(bytes) {
8830
8830
  if (bytes === 0) return "0 Bytes";
@@ -8834,8 +8834,8 @@ class BuildTimeExtractor {
8834
8834
  return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
8835
8835
  }
8836
8836
 
8837
- /**
8838
- * Write output to file (Node.js only)
8837
+ /**
8838
+ * Write output to file (Node.js only)
8839
8839
  */
8840
8840
  async writeToFile(content) {
8841
8841
  var _process$versions3;
@@ -8856,9 +8856,9 @@ var buildTimeExtractor = /*#__PURE__*/Object.freeze({
8856
8856
  BuildTimeExtractor: BuildTimeExtractor
8857
8857
  });
8858
8858
 
8859
- /**
8860
- * Critical CSS Extractor - Extracts above-the-fold CSS for faster initial page load
8861
- * @module optimization/criticalCSS
8859
+ /**
8860
+ * Critical CSS Extractor - Extracts above-the-fold CSS for faster initial page load
8861
+ * @module optimization/criticalCSS
8862
8862
  */
8863
8863
 
8864
8864
  class CriticalCSSExtractor {
@@ -8903,8 +8903,8 @@ class CriticalCSSExtractor {
8903
8903
  };
8904
8904
  }
8905
8905
 
8906
- /**
8907
- * Extract critical CSS
8906
+ /**
8907
+ * Extract critical CSS
8908
8908
  */
8909
8909
  async extract() {
8910
8910
  try {
@@ -8933,8 +8933,8 @@ class CriticalCSSExtractor {
8933
8933
  }
8934
8934
  }
8935
8935
 
8936
- /**
8937
- * Get HTML content
8936
+ /**
8937
+ * Get HTML content
8938
8938
  */
8939
8939
  async getHTML() {
8940
8940
  if (this.options.html) {
@@ -8961,8 +8961,8 @@ class CriticalCSSExtractor {
8961
8961
  throw new Error("No HTML source provided");
8962
8962
  }
8963
8963
 
8964
- /**
8965
- * Get all CSS from document
8964
+ /**
8965
+ * Get all CSS from document
8966
8966
  */
8967
8967
  async getAllCSS() {
8968
8968
  let allCSS = "";
@@ -8989,8 +8989,8 @@ class CriticalCSSExtractor {
8989
8989
  return allCSS;
8990
8990
  }
8991
8991
 
8992
- /**
8993
- * Get selectors for visible elements
8992
+ /**
8993
+ * Get selectors for visible elements
8994
8994
  */
8995
8995
  async getVisibleSelectors(html) {
8996
8996
 
@@ -9003,8 +9003,8 @@ class CriticalCSSExtractor {
9003
9003
  return this.getVisibleSelectorsFromHTML(html);
9004
9004
  }
9005
9005
 
9006
- /**
9007
- * Get visible selectors using DOM
9006
+ /**
9007
+ * Get visible selectors using DOM
9008
9008
  */
9009
9009
  getVisibleSelectorsDOM() {
9010
9010
  const visibleSelectors = new Set();
@@ -9036,8 +9036,8 @@ class CriticalCSSExtractor {
9036
9036
  return visibleSelectors;
9037
9037
  }
9038
9038
 
9039
- /**
9040
- * Get visible selectors from HTML string
9039
+ /**
9040
+ * Get visible selectors from HTML string
9041
9041
  */
9042
9042
  getVisibleSelectorsFromHTML(html) {
9043
9043
  const visibleSelectors = new Set();
@@ -9074,8 +9074,8 @@ class CriticalCSSExtractor {
9074
9074
  return visibleSelectors;
9075
9075
  }
9076
9076
 
9077
- /**
9078
- * Filter CSS to only include critical selectors
9077
+ /**
9078
+ * Filter CSS to only include critical selectors
9079
9079
  */
9080
9080
  filterCriticalCSS(css, visibleSelectors) {
9081
9081
  const criticalRules = [];
@@ -9106,29 +9106,29 @@ class CriticalCSSExtractor {
9106
9106
  return criticalCSS;
9107
9107
  }
9108
9108
 
9109
- /**
9110
- * Count CSS rules
9109
+ /**
9110
+ * Count CSS rules
9111
9111
  */
9112
9112
  countCSSRules(css) {
9113
9113
  return (css.match(/{/g) || []).length;
9114
9114
  }
9115
9115
 
9116
- /**
9117
- * Minify CSS
9116
+ /**
9117
+ * Minify CSS
9118
9118
  */
9119
9119
  minifyCSS(css) {
9120
9120
  return css.replace(/\s+/g, " ").replace(/\s*([{}:;,])\s*/g, "$1").replace(/;}/g, "}").replace(/\/\*[\s\S]*?\*\//g, "").trim();
9121
9121
  }
9122
9122
 
9123
- /**
9124
- * Generate inline critical CSS tag
9123
+ /**
9124
+ * Generate inline critical CSS tag
9125
9125
  */
9126
9126
  generateInlineTag() {
9127
9127
  return `<style id="critical-css">${this.criticalCSS}</style>`;
9128
9128
  }
9129
9129
 
9130
- /**
9131
- * Generate preload link for full CSS
9130
+ /**
9131
+ * Generate preload link for full CSS
9132
9132
  */
9133
9133
  generatePreloadLink(href) {
9134
9134
  return `<link rel="preload" href="${href}" as="style" onload="this.onload=null;this.rel='stylesheet'">`;
@@ -9140,9 +9140,9 @@ var criticalCSS = /*#__PURE__*/Object.freeze({
9140
9140
  CriticalCSSExtractor: CriticalCSSExtractor
9141
9141
  });
9142
9142
 
9143
- /**
9144
- * CSS Purger - Removes unused CSS from the bundle
9145
- * @module optimization/cssPurger
9143
+ /**
9144
+ * CSS Purger - Removes unused CSS from the bundle
9145
+ * @module optimization/cssPurger
9146
9146
  */
9147
9147
 
9148
9148
  class CSSPurger {
@@ -9178,8 +9178,8 @@ class CSSPurger {
9178
9178
  };
9179
9179
  }
9180
9180
 
9181
- /**
9182
- * Purge unused CSS
9181
+ /**
9182
+ * Purge unused CSS
9183
9183
  */
9184
9184
  async purge() {
9185
9185
  try {
@@ -9207,8 +9207,8 @@ class CSSPurger {
9207
9207
  }
9208
9208
  }
9209
9209
 
9210
- /**
9211
- * Get all CSS from document
9210
+ /**
9211
+ * Get all CSS from document
9212
9212
  */
9213
9213
  async getAllCSS() {
9214
9214
  let allCSS = "";
@@ -9230,8 +9230,8 @@ class CSSPurger {
9230
9230
  return allCSS;
9231
9231
  }
9232
9232
 
9233
- /**
9234
- * Scan content files for used classes
9233
+ /**
9234
+ * Scan content files for used classes
9235
9235
  */
9236
9236
  async scanContent() {
9237
9237
  const files = await this.resolveContentFiles();
@@ -9247,8 +9247,8 @@ class CSSPurger {
9247
9247
  logger.info(`Found ${this.usedClasses.size} used classes`);
9248
9248
  }
9249
9249
 
9250
- /**
9251
- * Resolve content files
9250
+ /**
9251
+ * Resolve content files
9252
9252
  */
9253
9253
  async resolveContentFiles() {
9254
9254
  var _process$versions;
@@ -9269,8 +9269,8 @@ class CSSPurger {
9269
9269
  return this.options.content;
9270
9270
  }
9271
9271
 
9272
- /**
9273
- * Scan a single file
9272
+ /**
9273
+ * Scan a single file
9274
9274
  */
9275
9275
  async scanFile(filePath) {
9276
9276
  try {
@@ -9281,8 +9281,8 @@ class CSSPurger {
9281
9281
  }
9282
9282
  }
9283
9283
 
9284
- /**
9285
- * Read file content
9284
+ /**
9285
+ * Read file content
9286
9286
  */
9287
9287
  async readFile(filePath) {
9288
9288
  var _process$versions2;
@@ -9294,8 +9294,8 @@ class CSSPurger {
9294
9294
  return await response.text();
9295
9295
  }
9296
9296
 
9297
- /**
9298
- * Extract classes from content
9297
+ /**
9298
+ * Extract classes from content
9299
9299
  */
9300
9300
  extractClasses(content) {
9301
9301
  // Extract from className/class attributes
@@ -9330,8 +9330,8 @@ class CSSPurger {
9330
9330
  }
9331
9331
  }
9332
9332
 
9333
- /**
9334
- * Purge CSS
9333
+ /**
9334
+ * Purge CSS
9335
9335
  */
9336
9336
  purgeCSS(css) {
9337
9337
  let purgedCSS = css;
@@ -9361,8 +9361,8 @@ class CSSPurger {
9361
9361
  return purgedCSS;
9362
9362
  }
9363
9363
 
9364
- /**
9365
- * Remove unused CSS rules
9364
+ /**
9365
+ * Remove unused CSS rules
9366
9366
  */
9367
9367
  removeUnusedRules(css) {
9368
9368
  const rules = css.split("}").map(rule => rule.trim() + "}").filter(Boolean);
@@ -9395,8 +9395,8 @@ class CSSPurger {
9395
9395
  return keptRules.join("\n");
9396
9396
  }
9397
9397
 
9398
- /**
9399
- * Remove unused keyframes
9398
+ /**
9399
+ * Remove unused keyframes
9400
9400
  */
9401
9401
  removeUnusedKeyframes(css) {
9402
9402
  const keyframeRegex = /@keyframes\s+([a-zA-Z0-9_-]+)\s*{[^}]*(?:{[^}]*}[^}]*)*}/g;
@@ -9405,8 +9405,8 @@ class CSSPurger {
9405
9405
  });
9406
9406
  }
9407
9407
 
9408
- /**
9409
- * Remove unused CSS variables
9408
+ /**
9409
+ * Remove unused CSS variables
9410
9410
  */
9411
9411
  removeUnusedVariables(css) {
9412
9412
  const varRegex = /(--[a-zA-Z0-9_-]+)\s*:\s*[^;]+;/g;
@@ -9416,8 +9416,8 @@ class CSSPurger {
9416
9416
  });
9417
9417
  }
9418
9418
 
9419
- /**
9420
- * Remove unused font-face
9419
+ /**
9420
+ * Remove unused font-face
9421
9421
  */
9422
9422
  removeUnusedFontFace(css) {
9423
9423
  // Simple approach: keep all font-face for now
@@ -9425,8 +9425,8 @@ class CSSPurger {
9425
9425
  return css;
9426
9426
  }
9427
9427
 
9428
- /**
9429
- * Remove blocklisted classes
9428
+ /**
9429
+ * Remove blocklisted classes
9430
9430
  */
9431
9431
  removeBlocklisted(css) {
9432
9432
  if (this.options.blocklist.length === 0) return css;
@@ -9443,15 +9443,15 @@ class CSSPurger {
9443
9443
  return keptRules.join("\n");
9444
9444
  }
9445
9445
 
9446
- /**
9447
- * Count CSS rules
9446
+ /**
9447
+ * Count CSS rules
9448
9448
  */
9449
9449
  countCSSRules(css) {
9450
9450
  return (css.match(/{/g) || []).length;
9451
9451
  }
9452
9452
 
9453
- /**
9454
- * Format bytes to human readable
9453
+ /**
9454
+ * Format bytes to human readable
9455
9455
  */
9456
9456
  formatBytes(bytes) {
9457
9457
  if (bytes === 0) return "0 Bytes";
@@ -9467,9 +9467,9 @@ var cssPurger = /*#__PURE__*/Object.freeze({
9467
9467
  CSSPurger: CSSPurger
9468
9468
  });
9469
9469
 
9470
- /**
9471
- * Persistent Cache - Advanced caching with compression and persistence
9472
- * @module optimization/persistentCache
9470
+ /**
9471
+ * Persistent Cache - Advanced caching with compression and persistence
9472
+ * @module optimization/persistentCache
9473
9473
  */
9474
9474
 
9475
9475
  class PersistentCache {
@@ -9497,8 +9497,8 @@ class PersistentCache {
9497
9497
  };
9498
9498
  }
9499
9499
 
9500
- /**
9501
- * Get value from cache
9500
+ /**
9501
+ * Get value from cache
9502
9502
  */
9503
9503
  async get(key) {
9504
9504
  // Try memory cache first
@@ -9522,8 +9522,8 @@ class PersistentCache {
9522
9522
  return null;
9523
9523
  }
9524
9524
 
9525
- /**
9526
- * Set value in cache
9525
+ /**
9526
+ * Set value in cache
9527
9527
  */
9528
9528
  async set(key, value) {
9529
9529
  const cacheEntry = {
@@ -9542,16 +9542,16 @@ class PersistentCache {
9542
9542
  this.stats.writes++;
9543
9543
  }
9544
9544
 
9545
- /**
9546
- * Check if cache entry is expired
9545
+ /**
9546
+ * Check if cache entry is expired
9547
9547
  */
9548
9548
  isExpired(entry) {
9549
9549
  if (!entry || !entry.timestamp) return true;
9550
9550
  return Date.now() - entry.timestamp > this.options.maxAge;
9551
9551
  }
9552
9552
 
9553
- /**
9554
- * Get from persistent storage
9553
+ /**
9554
+ * Get from persistent storage
9555
9555
  */
9556
9556
  async getFromStorage(key) {
9557
9557
  const storageKey = this.getStorageKey(key);
@@ -9572,8 +9572,8 @@ class PersistentCache {
9572
9572
  }
9573
9573
  }
9574
9574
 
9575
- /**
9576
- * Set in persistent storage
9575
+ /**
9576
+ * Set in persistent storage
9577
9577
  */
9578
9578
  async setInStorage(key, value) {
9579
9579
  const storageKey = this.getStorageKey(key);
@@ -9594,15 +9594,15 @@ class PersistentCache {
9594
9594
  }
9595
9595
  }
9596
9596
 
9597
- /**
9598
- * Get storage key with namespace
9597
+ /**
9598
+ * Get storage key with namespace
9599
9599
  */
9600
9600
  getStorageKey(key) {
9601
9601
  return `${this.options.name}:${this.options.version}:${key}`;
9602
9602
  }
9603
9603
 
9604
- /**
9605
- * LocalStorage operations
9604
+ /**
9605
+ * LocalStorage operations
9606
9606
  */
9607
9607
  getFromLocalStorage(key) {
9608
9608
  if (typeof localStorage === "undefined") return null;
@@ -9616,8 +9616,8 @@ class PersistentCache {
9616
9616
  localStorage.setItem(key, compressed);
9617
9617
  }
9618
9618
 
9619
- /**
9620
- * SessionStorage operations
9619
+ /**
9620
+ * SessionStorage operations
9621
9621
  */
9622
9622
  getFromSessionStorage(key) {
9623
9623
  if (typeof sessionStorage === "undefined") return null;
@@ -9631,8 +9631,8 @@ class PersistentCache {
9631
9631
  sessionStorage.setItem(key, compressed);
9632
9632
  }
9633
9633
 
9634
- /**
9635
- * IndexedDB operations
9634
+ /**
9635
+ * IndexedDB operations
9636
9636
  */
9637
9637
  async getFromIndexedDB(key) {
9638
9638
  if (typeof indexedDB === "undefined") return null;
@@ -9664,8 +9664,8 @@ class PersistentCache {
9664
9664
  });
9665
9665
  }
9666
9666
 
9667
- /**
9668
- * Open IndexedDB
9667
+ /**
9668
+ * Open IndexedDB
9669
9669
  */
9670
9670
  async openDB() {
9671
9671
  if (this._db) return this._db;
@@ -9687,8 +9687,8 @@ class PersistentCache {
9687
9687
  });
9688
9688
  }
9689
9689
 
9690
- /**
9691
- * Compress data
9690
+ /**
9691
+ * Compress data
9692
9692
  */
9693
9693
  compress(data) {
9694
9694
  if (!this.options.compress) {
@@ -9701,8 +9701,8 @@ class PersistentCache {
9701
9701
  return this.lzCompress(jsonString);
9702
9702
  }
9703
9703
 
9704
- /**
9705
- * Decompress data
9704
+ /**
9705
+ * Decompress data
9706
9706
  */
9707
9707
  decompress(data) {
9708
9708
  if (!this.options.compress) {
@@ -9712,8 +9712,8 @@ class PersistentCache {
9712
9712
  return JSON.parse(decompressed);
9713
9713
  }
9714
9714
 
9715
- /**
9716
- * Simple LZ compression
9715
+ /**
9716
+ * Simple LZ compression
9717
9717
  */
9718
9718
  lzCompress(str) {
9719
9719
  // Simple run-length encoding for demonstration
@@ -9741,8 +9741,8 @@ class PersistentCache {
9741
9741
  return out.map(n => n.toString(16).padStart(4, "0")).join("");
9742
9742
  }
9743
9743
 
9744
- /**
9745
- * Simple LZ decompression
9744
+ /**
9745
+ * Simple LZ decompression
9746
9746
  */
9747
9747
  lzDecompress(str) {
9748
9748
  try {
@@ -9778,8 +9778,8 @@ class PersistentCache {
9778
9778
  }
9779
9779
  }
9780
9780
 
9781
- /**
9782
- * Clear cache
9781
+ /**
9782
+ * Clear cache
9783
9783
  */
9784
9784
  async clear() {
9785
9785
  this.memoryCache.clear();
@@ -9817,8 +9817,8 @@ class PersistentCache {
9817
9817
  }
9818
9818
  }
9819
9819
 
9820
- /**
9821
- * Get cache statistics
9820
+ /**
9821
+ * Get cache statistics
9822
9822
  */
9823
9823
  getStats() {
9824
9824
  const hitRate = this.stats.hits + this.stats.misses > 0 ? (this.stats.hits / (this.stats.hits + this.stats.misses) * 100).toFixed(2) : 0;
@@ -9831,9 +9831,9 @@ class PersistentCache {
9831
9831
  }
9832
9832
  }
9833
9833
 
9834
- /**
9835
- * Optimization Manager - Unified interface for all optimization features
9836
- * @module optimization/optimizationManager
9834
+ /**
9835
+ * Optimization Manager - Unified interface for all optimization features
9836
+ * @module optimization/optimizationManager
9837
9837
  */
9838
9838
 
9839
9839
  class OptimizationManager {
@@ -9851,8 +9851,8 @@ class OptimizationManager {
9851
9851
  this.stats = {};
9852
9852
  }
9853
9853
 
9854
- /**
9855
- * Initialize optimization manager
9854
+ /**
9855
+ * Initialize optimization manager
9856
9856
  */
9857
9857
  async initialize() {
9858
9858
  logger.info("Initializing optimization manager...");
@@ -9864,8 +9864,8 @@ class OptimizationManager {
9864
9864
  logger.info("āœ… Optimization manager ready");
9865
9865
  }
9866
9866
 
9867
- /**
9868
- * Run full optimization pipeline
9867
+ /**
9868
+ * Run full optimization pipeline
9869
9869
  */
9870
9870
  async optimize(css) {
9871
9871
  let sourceFiles = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
@@ -9919,8 +9919,8 @@ class OptimizationManager {
9919
9919
  }
9920
9920
  }
9921
9921
 
9922
- /**
9923
- * Build-time extraction
9922
+ /**
9923
+ * Build-time extraction
9924
9924
  */
9925
9925
  async extractBuildTime(sourceFiles) {
9926
9926
  const extractor = new BuildTimeExtractor({
@@ -9930,8 +9930,8 @@ class OptimizationManager {
9930
9930
  return await extractor.extract();
9931
9931
  }
9932
9932
 
9933
- /**
9934
- * Calculate savings percentage
9933
+ /**
9934
+ * Calculate savings percentage
9935
9935
  */
9936
9936
  calculateSavings(original, optimized) {
9937
9937
  const originalSize = new Blob([original]).size;
@@ -9940,15 +9940,15 @@ class OptimizationManager {
9940
9940
  return ((1 - optimizedSize / originalSize) * 100).toFixed(2);
9941
9941
  }
9942
9942
 
9943
- /**
9944
- * Get cache instance
9943
+ /**
9944
+ * Get cache instance
9945
9945
  */
9946
9946
  getCache() {
9947
9947
  return this.cache;
9948
9948
  }
9949
9949
 
9950
- /**
9951
- * Get optimization stats
9950
+ /**
9951
+ * Get optimization stats
9952
9952
  */
9953
9953
  getStats() {
9954
9954
  const stats = {
@@ -9960,8 +9960,8 @@ class OptimizationManager {
9960
9960
  return stats;
9961
9961
  }
9962
9962
 
9963
- /**
9964
- * Clear all caches
9963
+ /**
9964
+ * Clear all caches
9965
9965
  */
9966
9966
  async clearCaches() {
9967
9967
  if (this.cache) {
@@ -9970,8 +9970,8 @@ class OptimizationManager {
9970
9970
  logger.info("āœ… All caches cleared");
9971
9971
  }
9972
9972
 
9973
- /**
9974
- * Generate optimization report
9973
+ /**
9974
+ * Generate optimization report
9975
9975
  */
9976
9976
  generateReport() {
9977
9977
  const stats = this.getStats();
@@ -10010,8 +10010,8 @@ class OptimizationManager {
10010
10010
  console.log("\n" + "=".repeat(60) + "\n");
10011
10011
  }
10012
10012
 
10013
- /**
10014
- * Format bytes to human readable
10013
+ /**
10014
+ * Format bytes to human readable
10015
10015
  */
10016
10016
  formatBytes(bytes) {
10017
10017
  if (bytes === 0) return "0 Bytes";
@@ -10022,8 +10022,8 @@ class OptimizationManager {
10022
10022
  }
10023
10023
  }
10024
10024
 
10025
- /**
10026
- * Create a preconfigured optimization manager
10025
+ /**
10026
+ * Create a preconfigured optimization manager
10027
10027
  */
10028
10028
  function createOptimizationManager() {
10029
10029
  let preset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "balanced";
@@ -10058,19 +10058,19 @@ function createOptimizationManager() {
10058
10058
  return new OptimizationManager(options);
10059
10059
  }
10060
10060
 
10061
- /**
10062
- * Optimization module for tailwind-to-style
10063
- * Provides bundle size optimization, build-time extraction, critical CSS, and CSS purging
10064
- * @module optimization
10061
+ /**
10062
+ * Optimization module for tailwind-to-style
10063
+ * Provides bundle size optimization, build-time extraction, critical CSS, and CSS purging
10064
+ * @module optimization
10065
10065
  */
10066
10066
 
10067
10067
 
10068
- /**
10069
- * Quick access API for common optimization tasks
10068
+ /**
10069
+ * Quick access API for common optimization tasks
10070
10070
  */
10071
10071
  const optimize = {
10072
- /**
10073
- * Analyze bundle size and get recommendations
10072
+ /**
10073
+ * Analyze bundle size and get recommendations
10074
10074
  */
10075
10075
  analyzeBundle: async function () {
10076
10076
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -10079,8 +10079,8 @@ const optimize = {
10079
10079
  } = await Promise.resolve().then(function () { return bundleAnalyzer; });
10080
10080
  return new BundleAnalyzer(options).analyze();
10081
10081
  },
10082
- /**
10083
- * Extract CSS at build time
10082
+ /**
10083
+ * Extract CSS at build time
10084
10084
  */
10085
10085
  extractCSS: async function () {
10086
10086
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -10089,8 +10089,8 @@ const optimize = {
10089
10089
  } = await Promise.resolve().then(function () { return buildTimeExtractor; });
10090
10090
  return new BuildTimeExtractor(options).extract();
10091
10091
  },
10092
- /**
10093
- * Generate critical CSS
10092
+ /**
10093
+ * Generate critical CSS
10094
10094
  */
10095
10095
  extractCritical: async function () {
10096
10096
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -10099,8 +10099,8 @@ const optimize = {
10099
10099
  } = await Promise.resolve().then(function () { return criticalCSS; });
10100
10100
  return new CriticalCSSExtractor(options).extract();
10101
10101
  },
10102
- /**
10103
- * Purge unused CSS
10102
+ /**
10103
+ * Purge unused CSS
10104
10104
  */
10105
10105
  purgeCSS: async function () {
10106
10106
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -10307,10 +10307,10 @@ function parseCustomClassWithPatterns(className) {
10307
10307
  return null;
10308
10308
  }
10309
10309
 
10310
- /**
10311
- * Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
10312
- * @param {string} cssString
10313
- * @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
10310
+ /**
10311
+ * Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
10312
+ * @param {string} cssString
10313
+ * @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
10314
10314
  */
10315
10315
  function resolveCssToClearCss(cssString) {
10316
10316
  const customVars = {};
@@ -10707,11 +10707,11 @@ function separateAndResolveCSS(arr) {
10707
10707
  }
10708
10708
  }
10709
10709
 
10710
- /**
10711
- * Process opacity modifier from class name (e.g., text-red-500/50 -> 50% opacity)
10712
- * @param {string} className - Class name with potential opacity modifier
10713
- * @param {string} cssDeclaration - CSS declaration to modify
10714
- * @returns {string} Modified CSS declaration with opacity applied
10710
+ /**
10711
+ * Process opacity modifier from class name (e.g., text-red-500/50 -> 50% opacity)
10712
+ * @param {string} className - Class name with potential opacity modifier
10713
+ * @param {string} cssDeclaration - CSS declaration to modify
10714
+ * @returns {string} Modified CSS declaration with opacity applied
10715
10715
  */
10716
10716
  function processOpacityModifier(className, cssDeclaration) {
10717
10717
  const opacityMatch = className.match(/\/(\d+)$/);
@@ -10772,11 +10772,11 @@ function processOpacityModifier(className, cssDeclaration) {
10772
10772
  return modifiedDeclaration;
10773
10773
  }
10774
10774
 
10775
- /**
10776
- * Convert Tailwind class string to inline CSS styles or JSON object
10777
- * @param {string} classNames - String containing Tailwind classes to convert
10778
- * @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
10779
- * @returns {string|Object} Inline CSS string or style JSON object
10775
+ /**
10776
+ * Convert Tailwind class string to inline CSS styles or JSON object
10777
+ * @param {string} classNames - String containing Tailwind classes to convert
10778
+ * @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
10779
+ * @returns {string|Object} Inline CSS string or style JSON object
10780
10780
  */
10781
10781
  function tws(classNames, convertToJson) {
10782
10782
  const totalMarker = performanceMonitor.start("tws:total");
@@ -11220,12 +11220,12 @@ function generateCssString(styles) {
11220
11220
  return cssString.trim();
11221
11221
  }
11222
11222
 
11223
- /**
11224
- * Generate CSS string from style object with SCSS-like syntax
11225
- * Supports nested selectors, state variants, responsive variants, and @css directives
11226
- * @param {Object} obj - Object with SCSS-like style format
11227
- * @param {Object} [options] - Additional options, e.g. { inject: true/false }
11228
- * @returns {string} Generated CSS string
11223
+ /**
11224
+ * Generate CSS string from style object with SCSS-like syntax
11225
+ * Supports nested selectors, state variants, responsive variants, and @css directives
11226
+ * @param {Object} obj - Object with SCSS-like style format
11227
+ * @param {Object} [options] - Additional options, e.g. { inject: true/false }
11228
+ * @returns {string} Generated CSS string
11229
11229
  */
11230
11230
  function twsx(obj) {
11231
11231
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -11407,19 +11407,19 @@ function autoInjectCss(cssString) {
11407
11407
  }
11408
11408
 
11409
11409
  // Enhanced debounced functions with performance monitoring configuration
11410
- /**
11411
- * Debounced version of tws function with performance monitoring
11412
- * @param {string} classNames - String containing Tailwind classes to convert
11413
- * @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
11414
- * @returns {string|Object} Inline CSS string or style JSON object
11410
+ /**
11411
+ * Debounced version of tws function with performance monitoring
11412
+ * @param {string} classNames - String containing Tailwind classes to convert
11413
+ * @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
11414
+ * @returns {string|Object} Inline CSS string or style JSON object
11415
11415
  */
11416
11416
  const debouncedTws = debounce(tws, 50); // Faster debounce for tws
11417
11417
 
11418
- /**
11419
- * Debounced version of twsx function with performance monitoring
11420
- * @param {Object} obj - Object with SCSS-like style format
11421
- * @param {Object} [options] - Additional options
11422
- * @returns {string} Generated CSS string
11418
+ /**
11419
+ * Debounced version of twsx function with performance monitoring
11420
+ * @param {Object} obj - Object with SCSS-like style format
11421
+ * @param {Object} [options] - Additional options
11422
+ * @returns {string} Generated CSS string
11423
11423
  */
11424
11424
  const debouncedTwsx = debounce(twsx, 100); // Standard debounce for twsx
11425
11425