tailwind-to-style 2.10.4 → 2.10.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.
- package/README.md +31 -35
- package/dist/index.browser.js +31 -31
- package/dist/index.cjs +31 -31
- package/dist/index.esm.js +31 -31
- package/dist/index.min.js.map +1 -1
- package/dist/react.cjs.js +21 -21
- package/dist/react.esm.js +21 -21
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,46 +15,42 @@ The library exposes two main functions and a CLI tool:
|
|
|
15
15
|
2. **`twsx`**: A more advanced function that allows you to define nested and complex styles similar to SCSS, including support for responsive design, state variants, grouping, and enhanced CSS capabilities.
|
|
16
16
|
3. **`twsx-cli`**: A command-line tool for generating CSS files from `twsx.*.js` files with watch mode support.
|
|
17
17
|
|
|
18
|
-
## ✨ What's New in v2.10.
|
|
18
|
+
## ✨ What's New in v2.10.5
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
20
|
+
- **🎬 Complete Animation System**: Full support for Tailwind animations and transitions
|
|
21
|
+
- Built-in animations: `animate-spin`, `animate-ping`, `animate-pulse`, `animate-bounce`
|
|
22
|
+
- Complete transition utilities with duration, delay, and easing controls
|
|
23
|
+
- Custom animations via theme configuration
|
|
24
|
+
- Keyframes system with built-in and custom support
|
|
25
|
+
|
|
26
|
+
- **🎨 Theme Customization**: Extend default theme with custom colors, spacing, and more!
|
|
27
|
+
- Deep merge support for nested theme values
|
|
28
|
+
- Works seamlessly with existing Tailwind utilities
|
|
29
|
+
- Brand-specific design systems
|
|
30
|
+
|
|
31
|
+
- **🔌 Plugin API**: Create custom utilities with `createPlugin()` and `createUtilityPlugin()`
|
|
32
|
+
- Simple utility plugins for custom styles
|
|
33
|
+
- Dynamic utilities with multiple values
|
|
34
|
+
- Unlimited custom utility classes
|
|
35
|
+
|
|
36
|
+
- **⚙️ Configuration System**: Use `configure()` to set up theme and plugins
|
|
37
|
+
- Support for `tailwind-to-style.config.js`
|
|
38
|
+
- Prefix support and core plugin control
|
|
39
|
+
- Easy configuration management
|
|
40
|
+
|
|
41
|
+
- **🚀 Infrastructure Improvements**:
|
|
42
|
+
- Updated dependencies (ESLint 9, Jest 30, Rollup 4)
|
|
43
|
+
- LRU Cache for better memory management
|
|
44
|
+
- Configurable logger system (production-safe)
|
|
45
|
+
- Event-based error handling
|
|
46
|
+
- Complete TypeScript definitions
|
|
47
|
+
- Node.js 18.x, 20.x, 22.x LTS support
|
|
39
48
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
- 📝 **Logger System**: Configurable logging with production-safe defaults (no more console spam!)
|
|
43
|
-
- ⚠️ **Error Handling**: Event-based error system with `onError()` subscription pattern
|
|
44
|
-
- 🔒 **Singleton Pattern**: Refactored global state to testable singleton
|
|
45
|
-
- 📘 **Complete TypeScript**: Added full type definitions for all exports
|
|
46
|
-
- 🚀 **Node.js Support**: Now supports Node 18.x, 20.x, 22.x LTS (dropped EOL versions)
|
|
47
|
-
- 🔧 **ESLint 9**: Migrated to modern flat config format
|
|
49
|
+
- **📱 Responsive Selector Syntax**: Intuitive `'md:.title': 'text-lg'` format
|
|
50
|
+
- **🐛 Enhanced @css Directive**: Perfect CSS variables and functions preservation
|
|
48
51
|
|
|
49
52
|
All changes are **backward compatible** - your existing code continues to work!
|
|
50
53
|
|
|
51
|
-
## ✨ What's New in v2.9.0
|
|
52
|
-
|
|
53
|
-
- 🆕 **Responsive Selector Syntax**: Intuitive `'md:.title': 'text-lg'` format for responsive styling
|
|
54
|
-
- 🐛 **Critical @css Bug Fix**: Perfect preservation of CSS variables, functions, and complex expressions
|
|
55
|
-
- ⚡ **Enhanced Performance**: Improved processing for large datasets and concurrent operations
|
|
56
|
-
- 🔧 **Better Error Handling**: 100% error recovery rate for malformed inputs
|
|
57
|
-
|
|
58
54
|
## Installation
|
|
59
55
|
|
|
60
56
|
```bash
|
package/dist/index.browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tailwind-to-style v2.10.
|
|
2
|
+
* tailwind-to-style v2.10.5
|
|
3
3
|
* Convert tailwind classes to inline style
|
|
4
4
|
*
|
|
5
5
|
* @author Bigetion
|
|
@@ -8455,10 +8455,10 @@ var tailwindToStyle = (function (exports) {
|
|
|
8455
8455
|
return null;
|
|
8456
8456
|
}
|
|
8457
8457
|
|
|
8458
|
-
/**
|
|
8459
|
-
* Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
|
|
8460
|
-
* @param {string} cssString
|
|
8461
|
-
* @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
|
|
8458
|
+
/**
|
|
8459
|
+
* Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
|
|
8460
|
+
* @param {string} cssString
|
|
8461
|
+
* @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
|
|
8462
8462
|
*/
|
|
8463
8463
|
function resolveCssToClearCss(cssString) {
|
|
8464
8464
|
const customVars = {};
|
|
@@ -8752,11 +8752,11 @@ var tailwindToStyle = (function (exports) {
|
|
|
8752
8752
|
}
|
|
8753
8753
|
}
|
|
8754
8754
|
|
|
8755
|
-
/**
|
|
8756
|
-
* Process opacity modifier from class name (e.g., text-red-500/50 -> 50% opacity)
|
|
8757
|
-
* @param {string} className - Class name with potential opacity modifier
|
|
8758
|
-
* @param {string} cssDeclaration - CSS declaration to modify
|
|
8759
|
-
* @returns {string} Modified CSS declaration with opacity applied
|
|
8755
|
+
/**
|
|
8756
|
+
* Process opacity modifier from class name (e.g., text-red-500/50 -> 50% opacity)
|
|
8757
|
+
* @param {string} className - Class name with potential opacity modifier
|
|
8758
|
+
* @param {string} cssDeclaration - CSS declaration to modify
|
|
8759
|
+
* @returns {string} Modified CSS declaration with opacity applied
|
|
8760
8760
|
*/
|
|
8761
8761
|
function processOpacityModifier(className, cssDeclaration) {
|
|
8762
8762
|
const opacityMatch = className.match(/\/(\d+)$/);
|
|
@@ -8817,11 +8817,11 @@ var tailwindToStyle = (function (exports) {
|
|
|
8817
8817
|
return modifiedDeclaration;
|
|
8818
8818
|
}
|
|
8819
8819
|
|
|
8820
|
-
/**
|
|
8821
|
-
* Convert Tailwind class string to inline CSS styles or JSON object
|
|
8822
|
-
* @param {string} classNames - String containing Tailwind classes to convert
|
|
8823
|
-
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
8824
|
-
* @returns {string|Object} Inline CSS string or style JSON object
|
|
8820
|
+
/**
|
|
8821
|
+
* Convert Tailwind class string to inline CSS styles or JSON object
|
|
8822
|
+
* @param {string} classNames - String containing Tailwind classes to convert
|
|
8823
|
+
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
8824
|
+
* @returns {string|Object} Inline CSS string or style JSON object
|
|
8825
8825
|
*/
|
|
8826
8826
|
function tws(classNames, convertToJson) {
|
|
8827
8827
|
const totalMarker = performanceMonitor.start("tws:total");
|
|
@@ -9265,12 +9265,12 @@ var tailwindToStyle = (function (exports) {
|
|
|
9265
9265
|
return cssString.trim();
|
|
9266
9266
|
}
|
|
9267
9267
|
|
|
9268
|
-
/**
|
|
9269
|
-
* Generate CSS string from style object with SCSS-like syntax
|
|
9270
|
-
* Supports nested selectors, state variants, responsive variants, and @css directives
|
|
9271
|
-
* @param {Object} obj - Object with SCSS-like style format
|
|
9272
|
-
* @param {Object} [options] - Additional options, e.g. { inject: true/false }
|
|
9273
|
-
* @returns {string} Generated CSS string
|
|
9268
|
+
/**
|
|
9269
|
+
* Generate CSS string from style object with SCSS-like syntax
|
|
9270
|
+
* Supports nested selectors, state variants, responsive variants, and @css directives
|
|
9271
|
+
* @param {Object} obj - Object with SCSS-like style format
|
|
9272
|
+
* @param {Object} [options] - Additional options, e.g. { inject: true/false }
|
|
9273
|
+
* @returns {string} Generated CSS string
|
|
9274
9274
|
*/
|
|
9275
9275
|
function twsx(obj) {
|
|
9276
9276
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -9452,19 +9452,19 @@ var tailwindToStyle = (function (exports) {
|
|
|
9452
9452
|
}
|
|
9453
9453
|
|
|
9454
9454
|
// Enhanced debounced functions with performance monitoring configuration
|
|
9455
|
-
/**
|
|
9456
|
-
* Debounced version of tws function with performance monitoring
|
|
9457
|
-
* @param {string} classNames - String containing Tailwind classes to convert
|
|
9458
|
-
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
9459
|
-
* @returns {string|Object} Inline CSS string or style JSON object
|
|
9455
|
+
/**
|
|
9456
|
+
* Debounced version of tws function with performance monitoring
|
|
9457
|
+
* @param {string} classNames - String containing Tailwind classes to convert
|
|
9458
|
+
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
9459
|
+
* @returns {string|Object} Inline CSS string or style JSON object
|
|
9460
9460
|
*/
|
|
9461
9461
|
const debouncedTws = debounce(tws, 50); // Faster debounce for tws
|
|
9462
9462
|
|
|
9463
|
-
/**
|
|
9464
|
-
* Debounced version of twsx function with performance monitoring
|
|
9465
|
-
* @param {Object} obj - Object with SCSS-like style format
|
|
9466
|
-
* @param {Object} [options] - Additional options
|
|
9467
|
-
* @returns {string} Generated CSS string
|
|
9463
|
+
/**
|
|
9464
|
+
* Debounced version of twsx function with performance monitoring
|
|
9465
|
+
* @param {Object} obj - Object with SCSS-like style format
|
|
9466
|
+
* @param {Object} [options] - Additional options
|
|
9467
|
+
* @returns {string} Generated CSS string
|
|
9468
9468
|
*/
|
|
9469
9469
|
const debouncedTwsx = debounce(twsx, 100); // Standard debounce for twsx
|
|
9470
9470
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tailwind-to-style v2.10.
|
|
2
|
+
* tailwind-to-style v2.10.5
|
|
3
3
|
* Convert tailwind classes to inline style
|
|
4
4
|
*
|
|
5
5
|
* @author Bigetion
|
|
@@ -8456,10 +8456,10 @@ function parseCustomClassWithPatterns(className) {
|
|
|
8456
8456
|
return null;
|
|
8457
8457
|
}
|
|
8458
8458
|
|
|
8459
|
-
/**
|
|
8460
|
-
* Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
|
|
8461
|
-
* @param {string} cssString
|
|
8462
|
-
* @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
|
|
8459
|
+
/**
|
|
8460
|
+
* Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
|
|
8461
|
+
* @param {string} cssString
|
|
8462
|
+
* @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
|
|
8463
8463
|
*/
|
|
8464
8464
|
function resolveCssToClearCss(cssString) {
|
|
8465
8465
|
const customVars = {};
|
|
@@ -8753,11 +8753,11 @@ function separateAndResolveCSS(arr) {
|
|
|
8753
8753
|
}
|
|
8754
8754
|
}
|
|
8755
8755
|
|
|
8756
|
-
/**
|
|
8757
|
-
* Process opacity modifier from class name (e.g., text-red-500/50 -> 50% opacity)
|
|
8758
|
-
* @param {string} className - Class name with potential opacity modifier
|
|
8759
|
-
* @param {string} cssDeclaration - CSS declaration to modify
|
|
8760
|
-
* @returns {string} Modified CSS declaration with opacity applied
|
|
8756
|
+
/**
|
|
8757
|
+
* Process opacity modifier from class name (e.g., text-red-500/50 -> 50% opacity)
|
|
8758
|
+
* @param {string} className - Class name with potential opacity modifier
|
|
8759
|
+
* @param {string} cssDeclaration - CSS declaration to modify
|
|
8760
|
+
* @returns {string} Modified CSS declaration with opacity applied
|
|
8761
8761
|
*/
|
|
8762
8762
|
function processOpacityModifier(className, cssDeclaration) {
|
|
8763
8763
|
const opacityMatch = className.match(/\/(\d+)$/);
|
|
@@ -8818,11 +8818,11 @@ function processOpacityModifier(className, cssDeclaration) {
|
|
|
8818
8818
|
return modifiedDeclaration;
|
|
8819
8819
|
}
|
|
8820
8820
|
|
|
8821
|
-
/**
|
|
8822
|
-
* Convert Tailwind class string to inline CSS styles or JSON object
|
|
8823
|
-
* @param {string} classNames - String containing Tailwind classes to convert
|
|
8824
|
-
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
8825
|
-
* @returns {string|Object} Inline CSS string or style JSON object
|
|
8821
|
+
/**
|
|
8822
|
+
* Convert Tailwind class string to inline CSS styles or JSON object
|
|
8823
|
+
* @param {string} classNames - String containing Tailwind classes to convert
|
|
8824
|
+
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
8825
|
+
* @returns {string|Object} Inline CSS string or style JSON object
|
|
8826
8826
|
*/
|
|
8827
8827
|
function tws(classNames, convertToJson) {
|
|
8828
8828
|
const totalMarker = performanceMonitor.start("tws:total");
|
|
@@ -9266,12 +9266,12 @@ function generateCssString(styles) {
|
|
|
9266
9266
|
return cssString.trim();
|
|
9267
9267
|
}
|
|
9268
9268
|
|
|
9269
|
-
/**
|
|
9270
|
-
* Generate CSS string from style object with SCSS-like syntax
|
|
9271
|
-
* Supports nested selectors, state variants, responsive variants, and @css directives
|
|
9272
|
-
* @param {Object} obj - Object with SCSS-like style format
|
|
9273
|
-
* @param {Object} [options] - Additional options, e.g. { inject: true/false }
|
|
9274
|
-
* @returns {string} Generated CSS string
|
|
9269
|
+
/**
|
|
9270
|
+
* Generate CSS string from style object with SCSS-like syntax
|
|
9271
|
+
* Supports nested selectors, state variants, responsive variants, and @css directives
|
|
9272
|
+
* @param {Object} obj - Object with SCSS-like style format
|
|
9273
|
+
* @param {Object} [options] - Additional options, e.g. { inject: true/false }
|
|
9274
|
+
* @returns {string} Generated CSS string
|
|
9275
9275
|
*/
|
|
9276
9276
|
function twsx(obj) {
|
|
9277
9277
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -9453,19 +9453,19 @@ function autoInjectCss(cssString) {
|
|
|
9453
9453
|
}
|
|
9454
9454
|
|
|
9455
9455
|
// Enhanced debounced functions with performance monitoring configuration
|
|
9456
|
-
/**
|
|
9457
|
-
* Debounced version of tws function with performance monitoring
|
|
9458
|
-
* @param {string} classNames - String containing Tailwind classes to convert
|
|
9459
|
-
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
9460
|
-
* @returns {string|Object} Inline CSS string or style JSON object
|
|
9456
|
+
/**
|
|
9457
|
+
* Debounced version of tws function with performance monitoring
|
|
9458
|
+
* @param {string} classNames - String containing Tailwind classes to convert
|
|
9459
|
+
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
9460
|
+
* @returns {string|Object} Inline CSS string or style JSON object
|
|
9461
9461
|
*/
|
|
9462
9462
|
const debouncedTws = debounce(tws, 50); // Faster debounce for tws
|
|
9463
9463
|
|
|
9464
|
-
/**
|
|
9465
|
-
* Debounced version of twsx function with performance monitoring
|
|
9466
|
-
* @param {Object} obj - Object with SCSS-like style format
|
|
9467
|
-
* @param {Object} [options] - Additional options
|
|
9468
|
-
* @returns {string} Generated CSS string
|
|
9464
|
+
/**
|
|
9465
|
+
* Debounced version of twsx function with performance monitoring
|
|
9466
|
+
* @param {Object} obj - Object with SCSS-like style format
|
|
9467
|
+
* @param {Object} [options] - Additional options
|
|
9468
|
+
* @returns {string} Generated CSS string
|
|
9469
9469
|
*/
|
|
9470
9470
|
const debouncedTwsx = debounce(twsx, 100); // Standard debounce for twsx
|
|
9471
9471
|
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tailwind-to-style v2.10.
|
|
2
|
+
* tailwind-to-style v2.10.5
|
|
3
3
|
* Convert tailwind classes to inline style
|
|
4
4
|
*
|
|
5
5
|
* @author Bigetion
|
|
@@ -8452,10 +8452,10 @@ function parseCustomClassWithPatterns(className) {
|
|
|
8452
8452
|
return null;
|
|
8453
8453
|
}
|
|
8454
8454
|
|
|
8455
|
-
/**
|
|
8456
|
-
* Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
|
|
8457
|
-
* @param {string} cssString
|
|
8458
|
-
* @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
|
|
8455
|
+
/**
|
|
8456
|
+
* Resolve all CSS custom properties (var) in a CSS string and output only clear CSS (no custom property)
|
|
8457
|
+
* @param {string} cssString
|
|
8458
|
+
* @returns {string} e.g. 'color: rgba(255,255,255,1); background: #fff;'
|
|
8459
8459
|
*/
|
|
8460
8460
|
function resolveCssToClearCss(cssString) {
|
|
8461
8461
|
const customVars = {};
|
|
@@ -8749,11 +8749,11 @@ function separateAndResolveCSS(arr) {
|
|
|
8749
8749
|
}
|
|
8750
8750
|
}
|
|
8751
8751
|
|
|
8752
|
-
/**
|
|
8753
|
-
* Process opacity modifier from class name (e.g., text-red-500/50 -> 50% opacity)
|
|
8754
|
-
* @param {string} className - Class name with potential opacity modifier
|
|
8755
|
-
* @param {string} cssDeclaration - CSS declaration to modify
|
|
8756
|
-
* @returns {string} Modified CSS declaration with opacity applied
|
|
8752
|
+
/**
|
|
8753
|
+
* Process opacity modifier from class name (e.g., text-red-500/50 -> 50% opacity)
|
|
8754
|
+
* @param {string} className - Class name with potential opacity modifier
|
|
8755
|
+
* @param {string} cssDeclaration - CSS declaration to modify
|
|
8756
|
+
* @returns {string} Modified CSS declaration with opacity applied
|
|
8757
8757
|
*/
|
|
8758
8758
|
function processOpacityModifier(className, cssDeclaration) {
|
|
8759
8759
|
const opacityMatch = className.match(/\/(\d+)$/);
|
|
@@ -8814,11 +8814,11 @@ function processOpacityModifier(className, cssDeclaration) {
|
|
|
8814
8814
|
return modifiedDeclaration;
|
|
8815
8815
|
}
|
|
8816
8816
|
|
|
8817
|
-
/**
|
|
8818
|
-
* Convert Tailwind class string to inline CSS styles or JSON object
|
|
8819
|
-
* @param {string} classNames - String containing Tailwind classes to convert
|
|
8820
|
-
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
8821
|
-
* @returns {string|Object} Inline CSS string or style JSON object
|
|
8817
|
+
/**
|
|
8818
|
+
* Convert Tailwind class string to inline CSS styles or JSON object
|
|
8819
|
+
* @param {string} classNames - String containing Tailwind classes to convert
|
|
8820
|
+
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
8821
|
+
* @returns {string|Object} Inline CSS string or style JSON object
|
|
8822
8822
|
*/
|
|
8823
8823
|
function tws(classNames, convertToJson) {
|
|
8824
8824
|
const totalMarker = performanceMonitor.start("tws:total");
|
|
@@ -9262,12 +9262,12 @@ function generateCssString(styles) {
|
|
|
9262
9262
|
return cssString.trim();
|
|
9263
9263
|
}
|
|
9264
9264
|
|
|
9265
|
-
/**
|
|
9266
|
-
* Generate CSS string from style object with SCSS-like syntax
|
|
9267
|
-
* Supports nested selectors, state variants, responsive variants, and @css directives
|
|
9268
|
-
* @param {Object} obj - Object with SCSS-like style format
|
|
9269
|
-
* @param {Object} [options] - Additional options, e.g. { inject: true/false }
|
|
9270
|
-
* @returns {string} Generated CSS string
|
|
9265
|
+
/**
|
|
9266
|
+
* Generate CSS string from style object with SCSS-like syntax
|
|
9267
|
+
* Supports nested selectors, state variants, responsive variants, and @css directives
|
|
9268
|
+
* @param {Object} obj - Object with SCSS-like style format
|
|
9269
|
+
* @param {Object} [options] - Additional options, e.g. { inject: true/false }
|
|
9270
|
+
* @returns {string} Generated CSS string
|
|
9271
9271
|
*/
|
|
9272
9272
|
function twsx(obj) {
|
|
9273
9273
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -9449,19 +9449,19 @@ function autoInjectCss(cssString) {
|
|
|
9449
9449
|
}
|
|
9450
9450
|
|
|
9451
9451
|
// Enhanced debounced functions with performance monitoring configuration
|
|
9452
|
-
/**
|
|
9453
|
-
* Debounced version of tws function with performance monitoring
|
|
9454
|
-
* @param {string} classNames - String containing Tailwind classes to convert
|
|
9455
|
-
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
9456
|
-
* @returns {string|Object} Inline CSS string or style JSON object
|
|
9452
|
+
/**
|
|
9453
|
+
* Debounced version of tws function with performance monitoring
|
|
9454
|
+
* @param {string} classNames - String containing Tailwind classes to convert
|
|
9455
|
+
* @param {boolean} convertToJson - If true, result will be JSON object, if false becomes CSS string
|
|
9456
|
+
* @returns {string|Object} Inline CSS string or style JSON object
|
|
9457
9457
|
*/
|
|
9458
9458
|
const debouncedTws = debounce(tws, 50); // Faster debounce for tws
|
|
9459
9459
|
|
|
9460
|
-
/**
|
|
9461
|
-
* Debounced version of twsx function with performance monitoring
|
|
9462
|
-
* @param {Object} obj - Object with SCSS-like style format
|
|
9463
|
-
* @param {Object} [options] - Additional options
|
|
9464
|
-
* @returns {string} Generated CSS string
|
|
9460
|
+
/**
|
|
9461
|
+
* Debounced version of twsx function with performance monitoring
|
|
9462
|
+
* @param {Object} obj - Object with SCSS-like style format
|
|
9463
|
+
* @param {Object} [options] - Additional options
|
|
9464
|
+
* @returns {string} Generated CSS string
|
|
9465
9465
|
*/
|
|
9466
9466
|
const debouncedTwsx = debounce(twsx, 100); // Standard debounce for twsx
|
|
9467
9467
|
|