tailwind_merge 0.10.0 → 0.10.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/tailwind_merge/validators.rb +5 -1
- data/lib/tailwind_merge/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb9ce33e9e3b1376a95325263d7e3091edbc8ee077f0d3fb023b8e9494345f99
|
4
|
+
data.tar.gz: c1548d94345b50b51074dc54534357d5415ce8feebd2666162840a06a7f6c29b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3af858c685680c51fb0b53eed278b12f42005be6d776aa9795a0757cee0dad204523fc7524f95958843588150356c8e9066f577ccf30a47ea31640b3c0f3d40e
|
7
|
+
data.tar.gz: 12dba99eb0c963292e860378faf0bb57d60a8ad9f4231e7965b26dc3c60ed32f7704554d0b616548108450418c69c18b526f7d69000bcdcf3768b44413f067d0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [v0.10.0] - 23-12-2023
|
2
|
+
## What's Changed
|
3
|
+
* Support Tailwind 3.4 by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/23
|
4
|
+
|
5
|
+
|
6
|
+
**Full Changelog**: https://github.com/gjtorikian/tailwind_merge/compare/v0.9.1...v0.10.0
|
1
7
|
## [v0.9.1] - 20-11-2023
|
2
8
|
## What's Changed
|
3
9
|
* Fix display removal when preceding line-clamp by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/22
|
@@ -31,6 +31,7 @@ module TailwindMerge
|
|
31
31
|
FRACTION_REGEX = %r{^\d+/\d+$}
|
32
32
|
LENGTH_UNIT_REGEX = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/
|
33
33
|
TSHIRT_UNIT_REGEX = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/
|
34
|
+
COLOR_FUNCTION_REGEX = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/
|
34
35
|
# Shadow always begins with x and y offset separated by underscore
|
35
36
|
SHADOW_REGEX = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/
|
36
37
|
IMAGE_REGEX = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/
|
@@ -39,7 +40,10 @@ module TailwindMerge
|
|
39
40
|
IMAGE_LABELS = Set.new(["image", "url"]).freeze
|
40
41
|
|
41
42
|
is_length_only = ->(value) {
|
42
|
-
|
43
|
+
# `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
|
44
|
+
# For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
45
|
+
# I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
46
|
+
LENGTH_UNIT_REGEX.match?(value) && !COLOR_FUNCTION_REGEX.match?(value)
|
43
47
|
}
|
44
48
|
|
45
49
|
is_never = ->(_) { false }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tailwind_merge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen J. Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lru_redux
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
|
-
rubygems_version: 3.5.
|
102
|
+
rubygems_version: 3.5.5
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: Utility function to efficiently merge Tailwind CSS classes without style
|