tailwind_merge 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/tailwind_merge/validators.rb +2 -2
- 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: 5aa6b6ffac6e2a45168871d6c032809d11c70f16106a15160d3f1072f71d8ccd
|
4
|
+
data.tar.gz: b09166dde7931054f168514e503ebdef87067902177721bb5377dec8f89aa7fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f62b3a8857549d506d836ef12a60530ae7f243beb80996b820b2f35009cada16c8e5ba0aaec2579aa4e6a9060f6cc314e78e03204e3e01825725eee4f0b7951
|
7
|
+
data.tar.gz: 0b0bdafecbda35a3b1d453101a56a9e388c77836216f7c3db2105f32a3956105b80ad52f6c151ddce75fc5d6db05d3f77220518c431b11efeba6d900ddac38b8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## [v0.10.1] - 30-01-2024
|
2
|
+
## What's Changed
|
3
|
+
* Fix stroke-color being incorrectly detected as stroke-width by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/24
|
4
|
+
|
5
|
+
|
6
|
+
**Full Changelog**: https://github.com/gjtorikian/tailwind_merge/compare/v0.10.0...v0.10.1
|
1
7
|
## [v0.10.0] - 23-12-2023
|
2
8
|
## What's Changed
|
3
9
|
* Support Tailwind 3.4 by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/23
|
data/README.md
CHANGED
@@ -315,7 +315,7 @@ Here's a brief summary for each validator:
|
|
315
315
|
- `IS_ARBITRARY_POSITION` checks whether class part is an arbitrary value which starts with `position:` (`[position:200px_100px]`) which is necessary for background-position classNames.
|
316
316
|
- `IS_ARBITRARY_IMAGE` checks whether class part is an arbitrary value which is an iamge, e.g. by starting with `image:`, `url:`, `linear-gradient(` or `url(` (`[url('/path-to-image.png')]`, `image:var(--maybe-an-image-at-runtime)]`) which is necessary for background-image classNames.
|
317
317
|
- `IS_ARBITRARY_NUMBER` checks whether class part is an arbitrary value which starts with `number:` or is a number (`[number:var(--value)]`, `[450]`) which is necessary for font-weight classNames.
|
318
|
-
- `IS_ARBITRARY_SHADOW` checks whether class part is an arbitrary value which starts with the same pattern as a shadow value (`[0_35px_60px_-15px_rgba(0,0,0,0.3)]`), namely with two lengths separated by a underscore
|
318
|
+
- `IS_ARBITRARY_SHADOW` checks whether class part is an arbitrary value which starts with the same pattern as a shadow value (`[0_35px_60px_-15px_rgba(0,0,0,0.3)]`), namely with two lengths separated by a underscore, optionally prepended by `inset`.
|
319
319
|
- `IS_ANY` always returns true. Be careful with this validator as it might match unwanted classes. I use it primarily to match colors or when it's certain there are no other class groups in a namespace.
|
320
320
|
|
321
321
|
## Performance
|
@@ -32,8 +32,8 @@ module TailwindMerge
|
|
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
34
|
COLOR_FUNCTION_REGEX = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/
|
35
|
-
# Shadow always begins with x and y offset separated by underscore
|
36
|
-
SHADOW_REGEX =
|
35
|
+
# Shadow always begins with x and y offset separated by underscore optionally prepended by inset
|
36
|
+
SHADOW_REGEX = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/
|
37
37
|
IMAGE_REGEX = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/
|
38
38
|
|
39
39
|
SIZE_LABELS = Set.new(["length", "size", "percentage"]).freeze
|
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.2
|
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: 2024-
|
11
|
+
date: 2024-03-18 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.
|
102
|
+
rubygems_version: 3.4.6
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: Utility function to efficiently merge Tailwind CSS classes without style
|