tailwind-to-style 2.9.0 → 2.9.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/README.md +18 -0
- package/dist/index.browser.js +10 -2
- package/dist/index.cjs +10 -2
- package/dist/index.esm.js +10 -2
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -851,6 +851,24 @@ This script is suitable for CI/CD workflows, pre-build steps, or manually genera
|
|
|
851
851
|
|
|
852
852
|
## License
|
|
853
853
|
|
|
854
|
+
## Support
|
|
855
|
+
|
|
856
|
+
If you find this library helpful and want to support its development, consider buying me a coffee:
|
|
857
|
+
|
|
858
|
+
[](https://buymeacoffee.com/bigetion)
|
|
859
|
+
|
|
860
|
+
Your support helps maintain and improve this library! ❤️
|
|
861
|
+
|
|
862
|
+
### Why Support?
|
|
863
|
+
|
|
864
|
+
- 🔧 **Active Maintenance**: Regular updates and bug fixes
|
|
865
|
+
- ⚡ **New Features**: Continuous improvement based on community feedback
|
|
866
|
+
- 📚 **Documentation**: Better examples and tutorials
|
|
867
|
+
- 🚀 **Performance**: Optimization and new capabilities
|
|
868
|
+
- 💬 **Support**: Responsive community support
|
|
869
|
+
|
|
870
|
+
Every contribution, no matter how small, is greatly appreciated and helps keep this project alive and growing!
|
|
871
|
+
|
|
854
872
|
## Contributing
|
|
855
873
|
|
|
856
874
|
Contributions are welcome! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.
|
package/dist/index.browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tailwind-to-style v2.9.
|
|
2
|
+
* tailwind-to-style v2.9.1
|
|
3
3
|
* Convert tailwind classes to inline style
|
|
4
4
|
*
|
|
5
5
|
* @author Bigetion
|
|
@@ -6488,7 +6488,8 @@ var tailwindToStyle = (function (exports) {
|
|
|
6488
6488
|
const pseudoVariants = new Set(["hover", "focus", "focus-within", "active", "visited", "disabled", "first", "last", "checked", "invalid", "required"]);
|
|
6489
6489
|
const specialVariants = {
|
|
6490
6490
|
group: (state, sel) => `.group:${state} ${sel}`,
|
|
6491
|
-
peer: (state, sel) => `.peer:${state} ~ ${sel}
|
|
6491
|
+
peer: (state, sel) => `.peer:${state} ~ ${sel}`,
|
|
6492
|
+
dark: (state, sel) => `.dark ${sel}`
|
|
6492
6493
|
};
|
|
6493
6494
|
const selectorVariants = {
|
|
6494
6495
|
first: () => `> :first-child`,
|
|
@@ -6538,6 +6539,9 @@ var tailwindToStyle = (function (exports) {
|
|
|
6538
6539
|
media = breakpoints[v];
|
|
6539
6540
|
} else if (pseudoVariants.has(v)) {
|
|
6540
6541
|
finalSelector += `:${v}`;
|
|
6542
|
+
} else if (v === 'dark') {
|
|
6543
|
+
// Special handling for dark variant
|
|
6544
|
+
finalSelector = `.dark ${finalSelector}`;
|
|
6541
6545
|
} else {
|
|
6542
6546
|
for (const key in specialVariants) {
|
|
6543
6547
|
if (v.startsWith(`${key}-`)) {
|
|
@@ -6877,6 +6881,10 @@ var tailwindToStyle = (function (exports) {
|
|
|
6877
6881
|
// Utility functions for class expansion
|
|
6878
6882
|
function expandDirectiveGroups(str) {
|
|
6879
6883
|
return str.replace(/(\w+)\(([^()]+)\)/g, (_, directive, content) => {
|
|
6884
|
+
// Special handling for dark mode syntax: dark:(classes)
|
|
6885
|
+
if (directive === 'dark') {
|
|
6886
|
+
return content.trim().split(/\s+/).map(cls => `dark:${cls}`).join(" ");
|
|
6887
|
+
}
|
|
6880
6888
|
return content.trim().split(/\s+/).map(val => {
|
|
6881
6889
|
if (val.includes(":")) {
|
|
6882
6890
|
const [variant, v] = val.split(":");
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tailwind-to-style v2.9.
|
|
2
|
+
* tailwind-to-style v2.9.1
|
|
3
3
|
* Convert tailwind classes to inline style
|
|
4
4
|
*
|
|
5
5
|
* @author Bigetion
|
|
@@ -6489,7 +6489,8 @@ const breakpoints = {
|
|
|
6489
6489
|
const pseudoVariants = new Set(["hover", "focus", "focus-within", "active", "visited", "disabled", "first", "last", "checked", "invalid", "required"]);
|
|
6490
6490
|
const specialVariants = {
|
|
6491
6491
|
group: (state, sel) => `.group:${state} ${sel}`,
|
|
6492
|
-
peer: (state, sel) => `.peer:${state} ~ ${sel}
|
|
6492
|
+
peer: (state, sel) => `.peer:${state} ~ ${sel}`,
|
|
6493
|
+
dark: (state, sel) => `.dark ${sel}`
|
|
6493
6494
|
};
|
|
6494
6495
|
const selectorVariants = {
|
|
6495
6496
|
first: () => `> :first-child`,
|
|
@@ -6539,6 +6540,9 @@ function resolveVariants(selector, variants) {
|
|
|
6539
6540
|
media = breakpoints[v];
|
|
6540
6541
|
} else if (pseudoVariants.has(v)) {
|
|
6541
6542
|
finalSelector += `:${v}`;
|
|
6543
|
+
} else if (v === 'dark') {
|
|
6544
|
+
// Special handling for dark variant
|
|
6545
|
+
finalSelector = `.dark ${finalSelector}`;
|
|
6542
6546
|
} else {
|
|
6543
6547
|
for (const key in specialVariants) {
|
|
6544
6548
|
if (v.startsWith(`${key}-`)) {
|
|
@@ -6878,6 +6882,10 @@ const performanceMonitor = {
|
|
|
6878
6882
|
// Utility functions for class expansion
|
|
6879
6883
|
function expandDirectiveGroups(str) {
|
|
6880
6884
|
return str.replace(/(\w+)\(([^()]+)\)/g, (_, directive, content) => {
|
|
6885
|
+
// Special handling for dark mode syntax: dark:(classes)
|
|
6886
|
+
if (directive === 'dark') {
|
|
6887
|
+
return content.trim().split(/\s+/).map(cls => `dark:${cls}`).join(" ");
|
|
6888
|
+
}
|
|
6881
6889
|
return content.trim().split(/\s+/).map(val => {
|
|
6882
6890
|
if (val.includes(":")) {
|
|
6883
6891
|
const [variant, v] = val.split(":");
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tailwind-to-style v2.9.
|
|
2
|
+
* tailwind-to-style v2.9.1
|
|
3
3
|
* Convert tailwind classes to inline style
|
|
4
4
|
*
|
|
5
5
|
* @author Bigetion
|
|
@@ -6485,7 +6485,8 @@ const breakpoints = {
|
|
|
6485
6485
|
const pseudoVariants = new Set(["hover", "focus", "focus-within", "active", "visited", "disabled", "first", "last", "checked", "invalid", "required"]);
|
|
6486
6486
|
const specialVariants = {
|
|
6487
6487
|
group: (state, sel) => `.group:${state} ${sel}`,
|
|
6488
|
-
peer: (state, sel) => `.peer:${state} ~ ${sel}
|
|
6488
|
+
peer: (state, sel) => `.peer:${state} ~ ${sel}`,
|
|
6489
|
+
dark: (state, sel) => `.dark ${sel}`
|
|
6489
6490
|
};
|
|
6490
6491
|
const selectorVariants = {
|
|
6491
6492
|
first: () => `> :first-child`,
|
|
@@ -6535,6 +6536,9 @@ function resolveVariants(selector, variants) {
|
|
|
6535
6536
|
media = breakpoints[v];
|
|
6536
6537
|
} else if (pseudoVariants.has(v)) {
|
|
6537
6538
|
finalSelector += `:${v}`;
|
|
6539
|
+
} else if (v === 'dark') {
|
|
6540
|
+
// Special handling for dark variant
|
|
6541
|
+
finalSelector = `.dark ${finalSelector}`;
|
|
6538
6542
|
} else {
|
|
6539
6543
|
for (const key in specialVariants) {
|
|
6540
6544
|
if (v.startsWith(`${key}-`)) {
|
|
@@ -6874,6 +6878,10 @@ const performanceMonitor = {
|
|
|
6874
6878
|
// Utility functions for class expansion
|
|
6875
6879
|
function expandDirectiveGroups(str) {
|
|
6876
6880
|
return str.replace(/(\w+)\(([^()]+)\)/g, (_, directive, content) => {
|
|
6881
|
+
// Special handling for dark mode syntax: dark:(classes)
|
|
6882
|
+
if (directive === 'dark') {
|
|
6883
|
+
return content.trim().split(/\s+/).map(cls => `dark:${cls}`).join(" ");
|
|
6884
|
+
}
|
|
6877
6885
|
return content.trim().split(/\s+/).map(val => {
|
|
6878
6886
|
if (val.includes(":")) {
|
|
6879
6887
|
const [variant, v] = val.split(":");
|