tailwind-to-style 2.12.2 → 2.12.3
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.browser.js +19 -19
- package/dist/index.cjs +26 -29
- package/dist/index.esm.js +26 -29
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/react.cjs.js +19 -19
- package/dist/react.esm.js +19 -19
- package/package.json +3 -2
package/dist/index.browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tailwind-to-style v2.12.
|
|
2
|
+
* tailwind-to-style v2.12.3
|
|
3
3
|
* Convert tailwind classes to inline style
|
|
4
4
|
*
|
|
5
5
|
* @author Bigetion
|
|
@@ -1724,9 +1724,9 @@ const theme = {
|
|
|
1724
1724
|
};
|
|
1725
1725
|
|
|
1726
1726
|
const vars = {
|
|
1727
|
-
transform:
|
|
1728
|
-
filter:
|
|
1729
|
-
backdropFilter:
|
|
1727
|
+
transform: "transform: translateX(var(--transform-translate-x, 0)) translateY(var(--transform-translate-y, 0)) rotate(var(--transform-rotate, 0)) skewX(var(--transform-skew-x, 0)) skewY(var(--transform-skew-y, 0)) scaleX(var(--transform-scale-x, 1)) scaleY(var(--transform-scale-y, 1));",
|
|
1728
|
+
filter: "filter: blur(var(--blur, 0)) brightness(var(--brightness, 1)) contrast(var(--contrast, 1)) grayscale(var(--grayscale, 0)) hue-rotate(var(--hue-rotate, 0deg)) invert(var(--invert, 0)) saturate(var(--saturate, 1)) sepia(var(--sepia, 0)) drop-shadow(var(--drop-shadow, 0 0 #0000));",
|
|
1729
|
+
backdropFilter: "-webkit-backdrop-filter: blur(var(--backdrop-blur, 0)) brightness(var(--backdrop-brightness, 1)) contrast(var(--backdrop-contrast, 1)) grayscale(var(--backdrop-grayscale, 0)) hue-rotate(var(--backdrop-hue-rotate, 0deg)) invert(var(--backdrop-invert, 0)) opacity(var(--backdrop-opacity, 1)) saturate(var(--backdrop-saturate, 1)) sepia(var(--backdrop-sepia, 0)); backdrop-filter: blur(var(--backdrop-blur, 0)) brightness(var(--backdrop-brightness, 1)) contrast(var(--backdrop-contrast, 1)) grayscale(var(--backdrop-grayscale, 0)) hue-rotate(var(--backdrop-hue-rotate, 0deg)) invert(var(--backdrop-invert, 0)) opacity(var(--backdrop-opacity, 1)) saturate(var(--backdrop-saturate, 1)) sepia(var(--backdrop-sepia, 0));"
|
|
1730
1730
|
};
|
|
1731
1731
|
|
|
1732
1732
|
const configOptions = {
|
|
@@ -2155,7 +2155,7 @@ function getConfigOptions() {
|
|
|
2155
2155
|
}
|
|
2156
2156
|
function generateCssString$1() {
|
|
2157
2157
|
let getCssString = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : () => {};
|
|
2158
|
-
|
|
2158
|
+
const orientationPrefix = "";
|
|
2159
2159
|
const hexToRgb = hex => {
|
|
2160
2160
|
const rgba = hex.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function () {
|
|
2161
2161
|
return "#" + (arguments.length <= 1 ? undefined : arguments[1]) + (arguments.length <= 1 ? undefined : arguments[1]) + (arguments.length <= 2 ? undefined : arguments[2]) + (arguments.length <= 2 ? undefined : arguments[2]) + (arguments.length <= 3 ? undefined : arguments[3]) + (arguments.length <= 3 ? undefined : arguments[3]);
|
|
@@ -2175,7 +2175,7 @@ function generateCssString$1() {
|
|
|
2175
2175
|
let str = "";
|
|
2176
2176
|
Object.entries(nOptions).forEach(_ref => {
|
|
2177
2177
|
let [key, value] = _ref;
|
|
2178
|
-
str += getStr(key.replace("/",
|
|
2178
|
+
str += getStr(key.replace("/", "\\/").replace(".", "\\."), value);
|
|
2179
2179
|
});
|
|
2180
2180
|
return str;
|
|
2181
2181
|
};
|
|
@@ -4337,7 +4337,7 @@ function generator$1N() {
|
|
|
4337
4337
|
let {
|
|
4338
4338
|
getCssByOptions
|
|
4339
4339
|
} = _ref;
|
|
4340
|
-
|
|
4340
|
+
const cssString = getCssByOptions(propertyOptions, (key, value) => `
|
|
4341
4341
|
${prefix}-${key} {
|
|
4342
4342
|
float: ${value};
|
|
4343
4343
|
}
|
|
@@ -4623,7 +4623,7 @@ function generator$1D() {
|
|
|
4623
4623
|
prefix: globalPrefix,
|
|
4624
4624
|
theme = {}
|
|
4625
4625
|
} = configOptions;
|
|
4626
|
-
|
|
4626
|
+
const prefix = `${globalPrefix}auto-cols`;
|
|
4627
4627
|
const {
|
|
4628
4628
|
gridAutoColumns = {}
|
|
4629
4629
|
} = theme;
|
|
@@ -4673,7 +4673,7 @@ function generator$1B() {
|
|
|
4673
4673
|
prefix: globalPrefix,
|
|
4674
4674
|
theme = {}
|
|
4675
4675
|
} = configOptions;
|
|
4676
|
-
|
|
4676
|
+
const prefix = `${globalPrefix}auto-rows`;
|
|
4677
4677
|
const {
|
|
4678
4678
|
gridAutoRows = {}
|
|
4679
4679
|
} = theme;
|
|
@@ -4697,7 +4697,7 @@ function generator$1A() {
|
|
|
4697
4697
|
prefix: globalPrefix,
|
|
4698
4698
|
theme = {}
|
|
4699
4699
|
} = configOptions;
|
|
4700
|
-
|
|
4700
|
+
const prefix = `${globalPrefix}col`;
|
|
4701
4701
|
const {
|
|
4702
4702
|
gridColumn = {}
|
|
4703
4703
|
} = theme;
|
|
@@ -4721,7 +4721,7 @@ function generator$1z() {
|
|
|
4721
4721
|
prefix: globalPrefix,
|
|
4722
4722
|
theme = {}
|
|
4723
4723
|
} = configOptions;
|
|
4724
|
-
|
|
4724
|
+
const prefix = `${globalPrefix}col-end`;
|
|
4725
4725
|
const {
|
|
4726
4726
|
gridColumnEnd = {}
|
|
4727
4727
|
} = theme;
|
|
@@ -4745,7 +4745,7 @@ function generator$1y() {
|
|
|
4745
4745
|
prefix: globalPrefix,
|
|
4746
4746
|
theme = {}
|
|
4747
4747
|
} = configOptions;
|
|
4748
|
-
|
|
4748
|
+
const prefix = `${globalPrefix}col-start`;
|
|
4749
4749
|
const {
|
|
4750
4750
|
gridColumnStart = {}
|
|
4751
4751
|
} = theme;
|
|
@@ -4769,7 +4769,7 @@ function generator$1x() {
|
|
|
4769
4769
|
prefix: globalPrefix,
|
|
4770
4770
|
theme = {}
|
|
4771
4771
|
} = configOptions;
|
|
4772
|
-
|
|
4772
|
+
const prefix = `${globalPrefix}row`;
|
|
4773
4773
|
const {
|
|
4774
4774
|
gridRow = {}
|
|
4775
4775
|
} = theme;
|
|
@@ -4793,7 +4793,7 @@ function generator$1w() {
|
|
|
4793
4793
|
prefix: globalPrefix,
|
|
4794
4794
|
theme = {}
|
|
4795
4795
|
} = configOptions;
|
|
4796
|
-
|
|
4796
|
+
const prefix = `${globalPrefix}row-end`;
|
|
4797
4797
|
const {
|
|
4798
4798
|
gridRowEnd = {}
|
|
4799
4799
|
} = theme;
|
|
@@ -4817,7 +4817,7 @@ function generator$1v() {
|
|
|
4817
4817
|
prefix: globalPrefix,
|
|
4818
4818
|
theme = {}
|
|
4819
4819
|
} = configOptions;
|
|
4820
|
-
|
|
4820
|
+
const prefix = `${globalPrefix}row-start`;
|
|
4821
4821
|
const {
|
|
4822
4822
|
gridRowStart = {}
|
|
4823
4823
|
} = theme;
|
|
@@ -4841,7 +4841,7 @@ function generator$1u() {
|
|
|
4841
4841
|
prefix: globalPrefix,
|
|
4842
4842
|
theme = {}
|
|
4843
4843
|
} = configOptions;
|
|
4844
|
-
|
|
4844
|
+
const prefix = `${globalPrefix}grid-cols`;
|
|
4845
4845
|
const {
|
|
4846
4846
|
gridTemplateColumns = {}
|
|
4847
4847
|
} = theme;
|
|
@@ -4849,7 +4849,7 @@ function generator$1u() {
|
|
|
4849
4849
|
let {
|
|
4850
4850
|
getCssByOptions
|
|
4851
4851
|
} = _ref;
|
|
4852
|
-
|
|
4852
|
+
const cssString = getCssByOptions(gridTemplateColumns, (key, value) => `
|
|
4853
4853
|
${prefix}-${key} {
|
|
4854
4854
|
grid-template-columns: ${isNaN(value) ? value : `repeat(${value}, minmax(0, 1fr))`};
|
|
4855
4855
|
}
|
|
@@ -4865,7 +4865,7 @@ function generator$1t() {
|
|
|
4865
4865
|
prefix: globalPrefix,
|
|
4866
4866
|
theme = {}
|
|
4867
4867
|
} = configOptions;
|
|
4868
|
-
|
|
4868
|
+
const prefix = `${globalPrefix}grid-rows`;
|
|
4869
4869
|
const {
|
|
4870
4870
|
gridTemplateRows = {}
|
|
4871
4871
|
} = theme;
|
|
@@ -4873,7 +4873,7 @@ function generator$1t() {
|
|
|
4873
4873
|
let {
|
|
4874
4874
|
getCssByOptions
|
|
4875
4875
|
} = _ref;
|
|
4876
|
-
|
|
4876
|
+
const cssString = getCssByOptions(gridTemplateRows, (key, value) => `
|
|
4877
4877
|
${prefix}-${key} {
|
|
4878
4878
|
grid-template-rows: ${isNaN(value) ? value : `repeat(${value}, minmax(0, 1fr));`};
|
|
4879
4879
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tailwind-to-style v2.12.
|
|
2
|
+
* tailwind-to-style v2.12.3
|
|
3
3
|
* Convert tailwind classes to inline style
|
|
4
4
|
*
|
|
5
5
|
* @author Bigetion
|
|
@@ -1636,9 +1636,9 @@ const theme = {
|
|
|
1636
1636
|
};
|
|
1637
1637
|
|
|
1638
1638
|
const vars = {
|
|
1639
|
-
transform:
|
|
1640
|
-
filter:
|
|
1641
|
-
backdropFilter:
|
|
1639
|
+
transform: "transform: translateX(var(--transform-translate-x, 0)) translateY(var(--transform-translate-y, 0)) rotate(var(--transform-rotate, 0)) skewX(var(--transform-skew-x, 0)) skewY(var(--transform-skew-y, 0)) scaleX(var(--transform-scale-x, 1)) scaleY(var(--transform-scale-y, 1));",
|
|
1640
|
+
filter: "filter: blur(var(--blur, 0)) brightness(var(--brightness, 1)) contrast(var(--contrast, 1)) grayscale(var(--grayscale, 0)) hue-rotate(var(--hue-rotate, 0deg)) invert(var(--invert, 0)) saturate(var(--saturate, 1)) sepia(var(--sepia, 0)) drop-shadow(var(--drop-shadow, 0 0 #0000));",
|
|
1641
|
+
backdropFilter: "-webkit-backdrop-filter: blur(var(--backdrop-blur, 0)) brightness(var(--backdrop-brightness, 1)) contrast(var(--backdrop-contrast, 1)) grayscale(var(--backdrop-grayscale, 0)) hue-rotate(var(--backdrop-hue-rotate, 0deg)) invert(var(--backdrop-invert, 0)) opacity(var(--backdrop-opacity, 1)) saturate(var(--backdrop-saturate, 1)) sepia(var(--backdrop-sepia, 0)); backdrop-filter: blur(var(--backdrop-blur, 0)) brightness(var(--backdrop-brightness, 1)) contrast(var(--backdrop-contrast, 1)) grayscale(var(--backdrop-grayscale, 0)) hue-rotate(var(--backdrop-hue-rotate, 0deg)) invert(var(--backdrop-invert, 0)) opacity(var(--backdrop-opacity, 1)) saturate(var(--backdrop-saturate, 1)) sepia(var(--backdrop-sepia, 0));"
|
|
1642
1642
|
};
|
|
1643
1643
|
|
|
1644
1644
|
const configOptions = {
|
|
@@ -2084,7 +2084,7 @@ function getConfigOptions() {
|
|
|
2084
2084
|
}
|
|
2085
2085
|
function generateCssString$1() {
|
|
2086
2086
|
let getCssString = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : () => {};
|
|
2087
|
-
|
|
2087
|
+
const orientationPrefix = "";
|
|
2088
2088
|
const hexToRgb = hex => {
|
|
2089
2089
|
const rgba = hex.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function () {
|
|
2090
2090
|
return "#" + (arguments.length <= 1 ? undefined : arguments[1]) + (arguments.length <= 1 ? undefined : arguments[1]) + (arguments.length <= 2 ? undefined : arguments[2]) + (arguments.length <= 2 ? undefined : arguments[2]) + (arguments.length <= 3 ? undefined : arguments[3]) + (arguments.length <= 3 ? undefined : arguments[3]);
|
|
@@ -2104,7 +2104,7 @@ function generateCssString$1() {
|
|
|
2104
2104
|
let str = "";
|
|
2105
2105
|
Object.entries(nOptions).forEach(_ref => {
|
|
2106
2106
|
let [key, value] = _ref;
|
|
2107
|
-
str += getStr(key.replace("/",
|
|
2107
|
+
str += getStr(key.replace("/", "\\/").replace(".", "\\."), value);
|
|
2108
2108
|
});
|
|
2109
2109
|
return str;
|
|
2110
2110
|
};
|
|
@@ -4380,7 +4380,7 @@ function generator$1N() {
|
|
|
4380
4380
|
let {
|
|
4381
4381
|
getCssByOptions
|
|
4382
4382
|
} = _ref;
|
|
4383
|
-
|
|
4383
|
+
const cssString = getCssByOptions(propertyOptions, (key, value) => `
|
|
4384
4384
|
${prefix}-${key} {
|
|
4385
4385
|
float: ${value};
|
|
4386
4386
|
}
|
|
@@ -4666,7 +4666,7 @@ function generator$1D() {
|
|
|
4666
4666
|
prefix: globalPrefix,
|
|
4667
4667
|
theme = {}
|
|
4668
4668
|
} = configOptions;
|
|
4669
|
-
|
|
4669
|
+
const prefix = `${globalPrefix}auto-cols`;
|
|
4670
4670
|
const {
|
|
4671
4671
|
gridAutoColumns = {}
|
|
4672
4672
|
} = theme;
|
|
@@ -4716,7 +4716,7 @@ function generator$1B() {
|
|
|
4716
4716
|
prefix: globalPrefix,
|
|
4717
4717
|
theme = {}
|
|
4718
4718
|
} = configOptions;
|
|
4719
|
-
|
|
4719
|
+
const prefix = `${globalPrefix}auto-rows`;
|
|
4720
4720
|
const {
|
|
4721
4721
|
gridAutoRows = {}
|
|
4722
4722
|
} = theme;
|
|
@@ -4740,7 +4740,7 @@ function generator$1A() {
|
|
|
4740
4740
|
prefix: globalPrefix,
|
|
4741
4741
|
theme = {}
|
|
4742
4742
|
} = configOptions;
|
|
4743
|
-
|
|
4743
|
+
const prefix = `${globalPrefix}col`;
|
|
4744
4744
|
const {
|
|
4745
4745
|
gridColumn = {}
|
|
4746
4746
|
} = theme;
|
|
@@ -4764,7 +4764,7 @@ function generator$1z() {
|
|
|
4764
4764
|
prefix: globalPrefix,
|
|
4765
4765
|
theme = {}
|
|
4766
4766
|
} = configOptions;
|
|
4767
|
-
|
|
4767
|
+
const prefix = `${globalPrefix}col-end`;
|
|
4768
4768
|
const {
|
|
4769
4769
|
gridColumnEnd = {}
|
|
4770
4770
|
} = theme;
|
|
@@ -4788,7 +4788,7 @@ function generator$1y() {
|
|
|
4788
4788
|
prefix: globalPrefix,
|
|
4789
4789
|
theme = {}
|
|
4790
4790
|
} = configOptions;
|
|
4791
|
-
|
|
4791
|
+
const prefix = `${globalPrefix}col-start`;
|
|
4792
4792
|
const {
|
|
4793
4793
|
gridColumnStart = {}
|
|
4794
4794
|
} = theme;
|
|
@@ -4812,7 +4812,7 @@ function generator$1x() {
|
|
|
4812
4812
|
prefix: globalPrefix,
|
|
4813
4813
|
theme = {}
|
|
4814
4814
|
} = configOptions;
|
|
4815
|
-
|
|
4815
|
+
const prefix = `${globalPrefix}row`;
|
|
4816
4816
|
const {
|
|
4817
4817
|
gridRow = {}
|
|
4818
4818
|
} = theme;
|
|
@@ -4836,7 +4836,7 @@ function generator$1w() {
|
|
|
4836
4836
|
prefix: globalPrefix,
|
|
4837
4837
|
theme = {}
|
|
4838
4838
|
} = configOptions;
|
|
4839
|
-
|
|
4839
|
+
const prefix = `${globalPrefix}row-end`;
|
|
4840
4840
|
const {
|
|
4841
4841
|
gridRowEnd = {}
|
|
4842
4842
|
} = theme;
|
|
@@ -4860,7 +4860,7 @@ function generator$1v() {
|
|
|
4860
4860
|
prefix: globalPrefix,
|
|
4861
4861
|
theme = {}
|
|
4862
4862
|
} = configOptions;
|
|
4863
|
-
|
|
4863
|
+
const prefix = `${globalPrefix}row-start`;
|
|
4864
4864
|
const {
|
|
4865
4865
|
gridRowStart = {}
|
|
4866
4866
|
} = theme;
|
|
@@ -4884,7 +4884,7 @@ function generator$1u() {
|
|
|
4884
4884
|
prefix: globalPrefix,
|
|
4885
4885
|
theme = {}
|
|
4886
4886
|
} = configOptions;
|
|
4887
|
-
|
|
4887
|
+
const prefix = `${globalPrefix}grid-cols`;
|
|
4888
4888
|
const {
|
|
4889
4889
|
gridTemplateColumns = {}
|
|
4890
4890
|
} = theme;
|
|
@@ -4892,7 +4892,7 @@ function generator$1u() {
|
|
|
4892
4892
|
let {
|
|
4893
4893
|
getCssByOptions
|
|
4894
4894
|
} = _ref;
|
|
4895
|
-
|
|
4895
|
+
const cssString = getCssByOptions(gridTemplateColumns, (key, value) => `
|
|
4896
4896
|
${prefix}-${key} {
|
|
4897
4897
|
grid-template-columns: ${isNaN(value) ? value : `repeat(${value}, minmax(0, 1fr))`};
|
|
4898
4898
|
}
|
|
@@ -4908,7 +4908,7 @@ function generator$1t() {
|
|
|
4908
4908
|
prefix: globalPrefix,
|
|
4909
4909
|
theme = {}
|
|
4910
4910
|
} = configOptions;
|
|
4911
|
-
|
|
4911
|
+
const prefix = `${globalPrefix}grid-rows`;
|
|
4912
4912
|
const {
|
|
4913
4913
|
gridTemplateRows = {}
|
|
4914
4914
|
} = theme;
|
|
@@ -4916,7 +4916,7 @@ function generator$1t() {
|
|
|
4916
4916
|
let {
|
|
4917
4917
|
getCssByOptions
|
|
4918
4918
|
} = _ref;
|
|
4919
|
-
|
|
4919
|
+
const cssString = getCssByOptions(gridTemplateRows, (key, value) => `
|
|
4920
4920
|
${prefix}-${key} {
|
|
4921
4921
|
grid-template-rows: ${isNaN(value) ? value : `repeat(${value}, minmax(0, 1fr));`};
|
|
4922
4922
|
}
|
|
@@ -8153,8 +8153,6 @@ function initWebAnimations() {
|
|
|
8153
8153
|
* Uses CSS variables for dynamic keyframe generation
|
|
8154
8154
|
*/
|
|
8155
8155
|
|
|
8156
|
-
/* eslint-disable no-undef */
|
|
8157
|
-
|
|
8158
8156
|
let animationStyleElement = null;
|
|
8159
8157
|
let animationCounter = 0;
|
|
8160
8158
|
|
|
@@ -8529,7 +8527,7 @@ class BundleAnalyzer {
|
|
|
8529
8527
|
/**
|
|
8530
8528
|
* Estimate gzip size
|
|
8531
8529
|
*/
|
|
8532
|
-
estimateGzipSize(
|
|
8530
|
+
estimateGzipSize(_content) {
|
|
8533
8531
|
// Rough estimation: typically 70-80% compression ratio
|
|
8534
8532
|
// For more accurate results, would need actual gzip compression
|
|
8535
8533
|
const compressionRatio = 0.25; // Assume 25% of original size
|
|
@@ -8716,7 +8714,7 @@ class BuildTimeExtractor {
|
|
|
8716
8714
|
files.push(...matches);
|
|
8717
8715
|
}
|
|
8718
8716
|
return [...new Set(files)]; // Remove duplicates
|
|
8719
|
-
} catch (
|
|
8717
|
+
} catch (_error) {
|
|
8720
8718
|
logger.warn("Glob not available, using direct file paths");
|
|
8721
8719
|
return this.options.input;
|
|
8722
8720
|
}
|
|
@@ -8804,7 +8802,7 @@ class BuildTimeExtractor {
|
|
|
8804
8802
|
if (css && !this.extractedCSS.includes(css)) {
|
|
8805
8803
|
this.extractedCSS += css + "\n";
|
|
8806
8804
|
}
|
|
8807
|
-
} catch (
|
|
8805
|
+
} catch (_error) {
|
|
8808
8806
|
// Skip invalid classes
|
|
8809
8807
|
}
|
|
8810
8808
|
}
|
|
@@ -9009,7 +9007,7 @@ class CriticalCSSExtractor {
|
|
|
9009
9007
|
try {
|
|
9010
9008
|
const response = await fetch(link.href);
|
|
9011
9009
|
allCSS += (await response.text()) + "\n";
|
|
9012
|
-
} catch (
|
|
9010
|
+
} catch (_error) {
|
|
9013
9011
|
logger.warn(`Failed to fetch stylesheet: ${link.href}`);
|
|
9014
9012
|
}
|
|
9015
9013
|
}
|
|
@@ -9021,7 +9019,6 @@ class CriticalCSSExtractor {
|
|
|
9021
9019
|
* Get selectors for visible elements
|
|
9022
9020
|
*/
|
|
9023
9021
|
async getVisibleSelectors(html) {
|
|
9024
|
-
|
|
9025
9022
|
// Browser environment with DOM access
|
|
9026
9023
|
if (typeof document !== "undefined") {
|
|
9027
9024
|
return this.getVisibleSelectorsDOM();
|
|
@@ -9250,7 +9247,7 @@ class CSSPurger {
|
|
|
9250
9247
|
try {
|
|
9251
9248
|
const response = await fetch(link.href);
|
|
9252
9249
|
allCSS += (await response.text()) + "\n";
|
|
9253
|
-
} catch (
|
|
9250
|
+
} catch (_error) {
|
|
9254
9251
|
logger.warn(`Failed to fetch stylesheet: ${link.href}`);
|
|
9255
9252
|
}
|
|
9256
9253
|
}
|
|
@@ -9289,7 +9286,7 @@ class CSSPurger {
|
|
|
9289
9286
|
files.push(...matches);
|
|
9290
9287
|
}
|
|
9291
9288
|
return [...new Set(files)];
|
|
9292
|
-
} catch (
|
|
9289
|
+
} catch (_error) {
|
|
9293
9290
|
logger.warn("Glob not available, using direct file paths");
|
|
9294
9291
|
return this.options.content;
|
|
9295
9292
|
}
|
|
@@ -9363,7 +9360,7 @@ class CSSPurger {
|
|
|
9363
9360
|
*/
|
|
9364
9361
|
purgeCSS(css) {
|
|
9365
9362
|
let purgedCSS = css;
|
|
9366
|
-
|
|
9363
|
+
const originalRuleCount = this.countCSSRules(css);
|
|
9367
9364
|
|
|
9368
9365
|
// Remove unused rules
|
|
9369
9366
|
purgedCSS = this.removeUnusedRules(purgedCSS);
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tailwind-to-style v2.12.
|
|
2
|
+
* tailwind-to-style v2.12.3
|
|
3
3
|
* Convert tailwind classes to inline style
|
|
4
4
|
*
|
|
5
5
|
* @author Bigetion
|
|
@@ -1634,9 +1634,9 @@ const theme = {
|
|
|
1634
1634
|
};
|
|
1635
1635
|
|
|
1636
1636
|
const vars = {
|
|
1637
|
-
transform:
|
|
1638
|
-
filter:
|
|
1639
|
-
backdropFilter:
|
|
1637
|
+
transform: "transform: translateX(var(--transform-translate-x, 0)) translateY(var(--transform-translate-y, 0)) rotate(var(--transform-rotate, 0)) skewX(var(--transform-skew-x, 0)) skewY(var(--transform-skew-y, 0)) scaleX(var(--transform-scale-x, 1)) scaleY(var(--transform-scale-y, 1));",
|
|
1638
|
+
filter: "filter: blur(var(--blur, 0)) brightness(var(--brightness, 1)) contrast(var(--contrast, 1)) grayscale(var(--grayscale, 0)) hue-rotate(var(--hue-rotate, 0deg)) invert(var(--invert, 0)) saturate(var(--saturate, 1)) sepia(var(--sepia, 0)) drop-shadow(var(--drop-shadow, 0 0 #0000));",
|
|
1639
|
+
backdropFilter: "-webkit-backdrop-filter: blur(var(--backdrop-blur, 0)) brightness(var(--backdrop-brightness, 1)) contrast(var(--backdrop-contrast, 1)) grayscale(var(--backdrop-grayscale, 0)) hue-rotate(var(--backdrop-hue-rotate, 0deg)) invert(var(--backdrop-invert, 0)) opacity(var(--backdrop-opacity, 1)) saturate(var(--backdrop-saturate, 1)) sepia(var(--backdrop-sepia, 0)); backdrop-filter: blur(var(--backdrop-blur, 0)) brightness(var(--backdrop-brightness, 1)) contrast(var(--backdrop-contrast, 1)) grayscale(var(--backdrop-grayscale, 0)) hue-rotate(var(--backdrop-hue-rotate, 0deg)) invert(var(--backdrop-invert, 0)) opacity(var(--backdrop-opacity, 1)) saturate(var(--backdrop-saturate, 1)) sepia(var(--backdrop-sepia, 0));"
|
|
1640
1640
|
};
|
|
1641
1641
|
|
|
1642
1642
|
const configOptions = {
|
|
@@ -2082,7 +2082,7 @@ function getConfigOptions() {
|
|
|
2082
2082
|
}
|
|
2083
2083
|
function generateCssString$1() {
|
|
2084
2084
|
let getCssString = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : () => {};
|
|
2085
|
-
|
|
2085
|
+
const orientationPrefix = "";
|
|
2086
2086
|
const hexToRgb = hex => {
|
|
2087
2087
|
const rgba = hex.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function () {
|
|
2088
2088
|
return "#" + (arguments.length <= 1 ? undefined : arguments[1]) + (arguments.length <= 1 ? undefined : arguments[1]) + (arguments.length <= 2 ? undefined : arguments[2]) + (arguments.length <= 2 ? undefined : arguments[2]) + (arguments.length <= 3 ? undefined : arguments[3]) + (arguments.length <= 3 ? undefined : arguments[3]);
|
|
@@ -2102,7 +2102,7 @@ function generateCssString$1() {
|
|
|
2102
2102
|
let str = "";
|
|
2103
2103
|
Object.entries(nOptions).forEach(_ref => {
|
|
2104
2104
|
let [key, value] = _ref;
|
|
2105
|
-
str += getStr(key.replace("/",
|
|
2105
|
+
str += getStr(key.replace("/", "\\/").replace(".", "\\."), value);
|
|
2106
2106
|
});
|
|
2107
2107
|
return str;
|
|
2108
2108
|
};
|
|
@@ -4378,7 +4378,7 @@ function generator$1N() {
|
|
|
4378
4378
|
let {
|
|
4379
4379
|
getCssByOptions
|
|
4380
4380
|
} = _ref;
|
|
4381
|
-
|
|
4381
|
+
const cssString = getCssByOptions(propertyOptions, (key, value) => `
|
|
4382
4382
|
${prefix}-${key} {
|
|
4383
4383
|
float: ${value};
|
|
4384
4384
|
}
|
|
@@ -4664,7 +4664,7 @@ function generator$1D() {
|
|
|
4664
4664
|
prefix: globalPrefix,
|
|
4665
4665
|
theme = {}
|
|
4666
4666
|
} = configOptions;
|
|
4667
|
-
|
|
4667
|
+
const prefix = `${globalPrefix}auto-cols`;
|
|
4668
4668
|
const {
|
|
4669
4669
|
gridAutoColumns = {}
|
|
4670
4670
|
} = theme;
|
|
@@ -4714,7 +4714,7 @@ function generator$1B() {
|
|
|
4714
4714
|
prefix: globalPrefix,
|
|
4715
4715
|
theme = {}
|
|
4716
4716
|
} = configOptions;
|
|
4717
|
-
|
|
4717
|
+
const prefix = `${globalPrefix}auto-rows`;
|
|
4718
4718
|
const {
|
|
4719
4719
|
gridAutoRows = {}
|
|
4720
4720
|
} = theme;
|
|
@@ -4738,7 +4738,7 @@ function generator$1A() {
|
|
|
4738
4738
|
prefix: globalPrefix,
|
|
4739
4739
|
theme = {}
|
|
4740
4740
|
} = configOptions;
|
|
4741
|
-
|
|
4741
|
+
const prefix = `${globalPrefix}col`;
|
|
4742
4742
|
const {
|
|
4743
4743
|
gridColumn = {}
|
|
4744
4744
|
} = theme;
|
|
@@ -4762,7 +4762,7 @@ function generator$1z() {
|
|
|
4762
4762
|
prefix: globalPrefix,
|
|
4763
4763
|
theme = {}
|
|
4764
4764
|
} = configOptions;
|
|
4765
|
-
|
|
4765
|
+
const prefix = `${globalPrefix}col-end`;
|
|
4766
4766
|
const {
|
|
4767
4767
|
gridColumnEnd = {}
|
|
4768
4768
|
} = theme;
|
|
@@ -4786,7 +4786,7 @@ function generator$1y() {
|
|
|
4786
4786
|
prefix: globalPrefix,
|
|
4787
4787
|
theme = {}
|
|
4788
4788
|
} = configOptions;
|
|
4789
|
-
|
|
4789
|
+
const prefix = `${globalPrefix}col-start`;
|
|
4790
4790
|
const {
|
|
4791
4791
|
gridColumnStart = {}
|
|
4792
4792
|
} = theme;
|
|
@@ -4810,7 +4810,7 @@ function generator$1x() {
|
|
|
4810
4810
|
prefix: globalPrefix,
|
|
4811
4811
|
theme = {}
|
|
4812
4812
|
} = configOptions;
|
|
4813
|
-
|
|
4813
|
+
const prefix = `${globalPrefix}row`;
|
|
4814
4814
|
const {
|
|
4815
4815
|
gridRow = {}
|
|
4816
4816
|
} = theme;
|
|
@@ -4834,7 +4834,7 @@ function generator$1w() {
|
|
|
4834
4834
|
prefix: globalPrefix,
|
|
4835
4835
|
theme = {}
|
|
4836
4836
|
} = configOptions;
|
|
4837
|
-
|
|
4837
|
+
const prefix = `${globalPrefix}row-end`;
|
|
4838
4838
|
const {
|
|
4839
4839
|
gridRowEnd = {}
|
|
4840
4840
|
} = theme;
|
|
@@ -4858,7 +4858,7 @@ function generator$1v() {
|
|
|
4858
4858
|
prefix: globalPrefix,
|
|
4859
4859
|
theme = {}
|
|
4860
4860
|
} = configOptions;
|
|
4861
|
-
|
|
4861
|
+
const prefix = `${globalPrefix}row-start`;
|
|
4862
4862
|
const {
|
|
4863
4863
|
gridRowStart = {}
|
|
4864
4864
|
} = theme;
|
|
@@ -4882,7 +4882,7 @@ function generator$1u() {
|
|
|
4882
4882
|
prefix: globalPrefix,
|
|
4883
4883
|
theme = {}
|
|
4884
4884
|
} = configOptions;
|
|
4885
|
-
|
|
4885
|
+
const prefix = `${globalPrefix}grid-cols`;
|
|
4886
4886
|
const {
|
|
4887
4887
|
gridTemplateColumns = {}
|
|
4888
4888
|
} = theme;
|
|
@@ -4890,7 +4890,7 @@ function generator$1u() {
|
|
|
4890
4890
|
let {
|
|
4891
4891
|
getCssByOptions
|
|
4892
4892
|
} = _ref;
|
|
4893
|
-
|
|
4893
|
+
const cssString = getCssByOptions(gridTemplateColumns, (key, value) => `
|
|
4894
4894
|
${prefix}-${key} {
|
|
4895
4895
|
grid-template-columns: ${isNaN(value) ? value : `repeat(${value}, minmax(0, 1fr))`};
|
|
4896
4896
|
}
|
|
@@ -4906,7 +4906,7 @@ function generator$1t() {
|
|
|
4906
4906
|
prefix: globalPrefix,
|
|
4907
4907
|
theme = {}
|
|
4908
4908
|
} = configOptions;
|
|
4909
|
-
|
|
4909
|
+
const prefix = `${globalPrefix}grid-rows`;
|
|
4910
4910
|
const {
|
|
4911
4911
|
gridTemplateRows = {}
|
|
4912
4912
|
} = theme;
|
|
@@ -4914,7 +4914,7 @@ function generator$1t() {
|
|
|
4914
4914
|
let {
|
|
4915
4915
|
getCssByOptions
|
|
4916
4916
|
} = _ref;
|
|
4917
|
-
|
|
4917
|
+
const cssString = getCssByOptions(gridTemplateRows, (key, value) => `
|
|
4918
4918
|
${prefix}-${key} {
|
|
4919
4919
|
grid-template-rows: ${isNaN(value) ? value : `repeat(${value}, minmax(0, 1fr));`};
|
|
4920
4920
|
}
|
|
@@ -8151,8 +8151,6 @@ function initWebAnimations() {
|
|
|
8151
8151
|
* Uses CSS variables for dynamic keyframe generation
|
|
8152
8152
|
*/
|
|
8153
8153
|
|
|
8154
|
-
/* eslint-disable no-undef */
|
|
8155
|
-
|
|
8156
8154
|
let animationStyleElement = null;
|
|
8157
8155
|
let animationCounter = 0;
|
|
8158
8156
|
|
|
@@ -8527,7 +8525,7 @@ class BundleAnalyzer {
|
|
|
8527
8525
|
/**
|
|
8528
8526
|
* Estimate gzip size
|
|
8529
8527
|
*/
|
|
8530
|
-
estimateGzipSize(
|
|
8528
|
+
estimateGzipSize(_content) {
|
|
8531
8529
|
// Rough estimation: typically 70-80% compression ratio
|
|
8532
8530
|
// For more accurate results, would need actual gzip compression
|
|
8533
8531
|
const compressionRatio = 0.25; // Assume 25% of original size
|
|
@@ -8714,7 +8712,7 @@ class BuildTimeExtractor {
|
|
|
8714
8712
|
files.push(...matches);
|
|
8715
8713
|
}
|
|
8716
8714
|
return [...new Set(files)]; // Remove duplicates
|
|
8717
|
-
} catch (
|
|
8715
|
+
} catch (_error) {
|
|
8718
8716
|
logger.warn("Glob not available, using direct file paths");
|
|
8719
8717
|
return this.options.input;
|
|
8720
8718
|
}
|
|
@@ -8802,7 +8800,7 @@ class BuildTimeExtractor {
|
|
|
8802
8800
|
if (css && !this.extractedCSS.includes(css)) {
|
|
8803
8801
|
this.extractedCSS += css + "\n";
|
|
8804
8802
|
}
|
|
8805
|
-
} catch (
|
|
8803
|
+
} catch (_error) {
|
|
8806
8804
|
// Skip invalid classes
|
|
8807
8805
|
}
|
|
8808
8806
|
}
|
|
@@ -9007,7 +9005,7 @@ class CriticalCSSExtractor {
|
|
|
9007
9005
|
try {
|
|
9008
9006
|
const response = await fetch(link.href);
|
|
9009
9007
|
allCSS += (await response.text()) + "\n";
|
|
9010
|
-
} catch (
|
|
9008
|
+
} catch (_error) {
|
|
9011
9009
|
logger.warn(`Failed to fetch stylesheet: ${link.href}`);
|
|
9012
9010
|
}
|
|
9013
9011
|
}
|
|
@@ -9019,7 +9017,6 @@ class CriticalCSSExtractor {
|
|
|
9019
9017
|
* Get selectors for visible elements
|
|
9020
9018
|
*/
|
|
9021
9019
|
async getVisibleSelectors(html) {
|
|
9022
|
-
|
|
9023
9020
|
// Browser environment with DOM access
|
|
9024
9021
|
if (typeof document !== "undefined") {
|
|
9025
9022
|
return this.getVisibleSelectorsDOM();
|
|
@@ -9248,7 +9245,7 @@ class CSSPurger {
|
|
|
9248
9245
|
try {
|
|
9249
9246
|
const response = await fetch(link.href);
|
|
9250
9247
|
allCSS += (await response.text()) + "\n";
|
|
9251
|
-
} catch (
|
|
9248
|
+
} catch (_error) {
|
|
9252
9249
|
logger.warn(`Failed to fetch stylesheet: ${link.href}`);
|
|
9253
9250
|
}
|
|
9254
9251
|
}
|
|
@@ -9287,7 +9284,7 @@ class CSSPurger {
|
|
|
9287
9284
|
files.push(...matches);
|
|
9288
9285
|
}
|
|
9289
9286
|
return [...new Set(files)];
|
|
9290
|
-
} catch (
|
|
9287
|
+
} catch (_error) {
|
|
9291
9288
|
logger.warn("Glob not available, using direct file paths");
|
|
9292
9289
|
return this.options.content;
|
|
9293
9290
|
}
|
|
@@ -9361,7 +9358,7 @@ class CSSPurger {
|
|
|
9361
9358
|
*/
|
|
9362
9359
|
purgeCSS(css) {
|
|
9363
9360
|
let purgedCSS = css;
|
|
9364
|
-
|
|
9361
|
+
const originalRuleCount = this.countCSSRules(css);
|
|
9365
9362
|
|
|
9366
9363
|
// Remove unused rules
|
|
9367
9364
|
purgedCSS = this.removeUnusedRules(purgedCSS);
|