tailwind_merge 1.3.1 → 1.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f07a508b699ebc4c587bbc4eec6beba9ccab467556c3aeca42c50afb63830a0b
4
- data.tar.gz: e758e188351382559cfba8719bcd87d34b229117d56d870e0fac6bada0b178f9
3
+ metadata.gz: 783e008ab85c57a6d835bcd2c2aeb0bf1c3ee97706a42673dc89a798534295a1
4
+ data.tar.gz: 48641de285e39bee44cde99ecc9977edea9da0541358d308cf6d28e53bb5ab48
5
5
  SHA512:
6
- metadata.gz: 88200c305a5ffe30452b0664cd502dab4c16e48b582a0cf3bc6f7c1f288b900ac3b56292f98100ae2b9d59cce93126ec36dd8437d15f758e8e115d4cc68bd731
7
- data.tar.gz: 89c074376a553d93420c0b0a92f5f1e43315d75bb998f055e0b2c4723b6e83eba33261bfb6e00c0d713feb9c35445298b5fcdf05bcdd0a9bc0f20a5b926abeeb
6
+ metadata.gz: e1b4bbf12cc96c9480ebe0313569a1938ef210b8df82e42253e7edba1c9657923bc03eb874152dac5a910b2f3f7d8ca5731cc01826ab3373097b54652a89d5e9
7
+ data.tar.gz: 27d39e9beaad0731d1a64cdcc0d0831c9f29b5dd36c949e0a667fc6de4ca3759ff0202875a94c1be5ae1955c1da714f2c2ee1dab2f62c961ddb142ad02ae1b4e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ # [v1.3.3] - 31-01-2026
2
+ ## What's Changed
3
+ * Update minitest requirement from ~> 5.6 to ~> 6.0 in the bundler-dependencies group by @dependabot[bot] in https://github.com/gjtorikian/tailwind_merge/pull/70
4
+ * prevent arbitrary font-family and font-weight from merging by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/71
5
+
6
+
7
+ **Full Changelog**: https://github.com/gjtorikian/tailwind_merge/compare/v1.3.2...v1.3.3
8
+ # [v1.3.2] - 26-12-2025
9
+ ## What's Changed
10
+ * Bump actions/checkout from 4 to 5 by @dependabot[bot] in https://github.com/gjtorikian/tailwind_merge/pull/64
11
+ * Bump actions/checkout from 5 to 6 by @dependabot[bot] in https://github.com/gjtorikian/tailwind_merge/pull/65
12
+ * Support any Ruby version by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/68
13
+
14
+
15
+ **Full Changelog**: https://github.com/gjtorikian/tailwind_merge/compare/v1.3.1...v1.3.2
1
16
  # [v1.3.1] - 10-06-2025
2
17
  ## What's Changed
3
18
  * Fix arbitrary color mix by @gjtorikian in https://github.com/gjtorikian/tailwind_merge/pull/62
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gemspec
7
7
 
8
8
  gem "rake", "~> 13.0"
9
9
 
10
- gem "minitest", "~> 5.0"
10
+ gem "minitest", "~> 6.0"
11
11
 
12
12
  gem "rubocop", "~> 1.21"
13
13
 
data/README.md CHANGED
@@ -37,7 +37,7 @@ TailwindMerge::Merger.new.merge(["px-2 py-1", "bg-red hover:bg-dark-red", "p-3 b
37
37
 
38
38
  ## What's it for?
39
39
 
40
- If you use Tailwind with a component-based UI renderer (like [ViewComponent](https://viewcomponent.org) or [Ariadne](https://github.com/yettoapp/ariadne)), you're probably familiar with the situation that you want to change some styles of an existing component:
40
+ If you use Tailwind with a component-based UI renderer (like [ViewComponent](https://viewcomponent.org)), you're probably familiar with the situation that you want to change some styles of an existing component:
41
41
 
42
42
  ```html
43
43
  <!-- app/components/confirm_email_component.html.erb -->
@@ -769,8 +769,8 @@ module TailwindMerge
769
769
  {
770
770
  "font" => [
771
771
  THEME_FONT_WEIGHT,
772
- IS_ARBITRARY_VARIABLE,
773
- IS_ARBITRARY_NUMBER,
772
+ IS_ARBITRARY_VARIABLE_WEIGHT,
773
+ IS_ARBITRARY_WEIGHT,
774
774
  ],
775
775
  },
776
776
  ],
@@ -799,7 +799,7 @@ module TailwindMerge
799
799
  # Font Family
800
800
  # @see https://tailwindcss.com/docs/font-family
801
801
  ##
802
- "font-family" => [{ "font" => [IS_ARBITRARY_VARIABLE_FAMILY_NAME, IS_ARBITRARY_VALUE, THEME_FONT] }],
802
+ "font-family" => [{ "font" => [IS_ARBITRARY_VARIABLE_FAMILY_NAME, IS_ARBITRARY_FAMILY_NAME, THEME_FONT] }],
803
803
  ##
804
804
  # Font Variant Numeric
805
805
  # @see https://tailwindcss.com/docs/font-variant-numeric
@@ -102,6 +102,14 @@ module TailwindMerge
102
102
  arbitrary_value?(value, IS_LABEL_NUMBER, IS_NUMBER)
103
103
  }
104
104
 
105
+ IS_ARBITRARY_WEIGHT = ->(value) {
106
+ arbitrary_value?(value, IS_LABEL_WEIGHT, IS_ANY)
107
+ }
108
+
109
+ IS_ARBITRARY_FAMILY_NAME = ->(value) {
110
+ arbitrary_value?(value, IS_LABEL_FAMILY_NAME, IS_NEVER)
111
+ }
112
+
105
113
  IS_ARBITRARY_POSITION = ->(value) {
106
114
  arbitrary_value?(value, IS_LABEL_POSITION, IS_NEVER)
107
115
  }
@@ -142,6 +150,10 @@ module TailwindMerge
142
150
  arbitrary_variable?(value, IS_LABEL_SHADOW, should_match_no_label: true)
143
151
  }
144
152
 
153
+ IS_ARBITRARY_VARIABLE_WEIGHT = ->(value) {
154
+ arbitrary_variable?(value, IS_LABEL_WEIGHT, should_match_no_label: true)
155
+ }
156
+
145
157
  ############
146
158
  # Labels
147
159
  ############
@@ -170,6 +182,10 @@ module TailwindMerge
170
182
  label == "family-name"
171
183
  }
172
184
 
185
+ IS_LABEL_WEIGHT = ->(label) {
186
+ label == "number" || label == "weight"
187
+ }
188
+
173
189
  IS_LABEL_SHADOW = ->(label) {
174
190
  label == "shadow"
175
191
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TailwindMerge
4
- VERSION = "1.3.1"
4
+ VERSION = "1.3.3"
5
5
  end
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  "rubygems_mfa_required" => "true",
23
23
  }
24
24
 
25
- spec.required_ruby_version = [">= 3.1", "< 4.0"]
25
+ spec.required_ruby_version = [">= 3.2"]
26
26
 
27
27
  # Specify which files should be added to the gem when it is released.
28
28
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -37,6 +37,6 @@ Gem::Specification.new do |spec|
37
37
 
38
38
  spec.add_dependency("sin_lru_redux", "~> 2.5")
39
39
 
40
- spec.add_development_dependency("minitest", "~> 5.6")
40
+ spec.add_development_dependency("minitest", "~> 6.0")
41
41
  spec.add_development_dependency("minitest-focus", "~> 1.1")
42
42
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwind_merge
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-06-10 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: sin_lru_redux
@@ -24,21 +23,20 @@ dependencies:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
25
  version: '2.5'
27
- force_ruby_platform: false
28
26
  - !ruby/object:Gem::Dependency
29
27
  name: minitest
30
28
  requirement: !ruby/object:Gem::Requirement
31
29
  requirements:
32
30
  - - "~>"
33
31
  - !ruby/object:Gem::Version
34
- version: '5.6'
32
+ version: '6.0'
35
33
  type: :development
36
34
  prerelease: false
37
35
  version_requirements: !ruby/object:Gem::Requirement
38
36
  requirements:
39
37
  - - "~>"
40
38
  - !ruby/object:Gem::Version
41
- version: '5.6'
39
+ version: '6.0'
42
40
  - !ruby/object:Gem::Dependency
43
41
  name: minitest-focus
44
42
  requirement: !ruby/object:Gem::Requirement
@@ -53,7 +51,6 @@ dependencies:
53
51
  - - "~>"
54
52
  - !ruby/object:Gem::Version
55
53
  version: '1.1'
56
- description:
57
54
  email:
58
55
  - gjtorikian@gmail.com
59
56
  executables: []
@@ -76,18 +73,17 @@ files:
76
73
  - lib/tailwind_merge/version.rb
77
74
  - script/test
78
75
  - tailwind_merge.gemspec
79
- homepage: https://github.com/gjtorikian/tailwind_merge/tree/v1.3.1
76
+ homepage: https://github.com/gjtorikian/tailwind_merge/tree/v1.3.3
80
77
  licenses:
81
78
  - MIT
82
79
  metadata:
83
- homepage_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.3.1
84
- source_code_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.3.1
85
- changelog_uri: https://github.com/gjtorikian/tailwind_merge/blob/v1.3.1/CHANGELOG.md
80
+ homepage_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.3.3
81
+ source_code_uri: https://github.com/gjtorikian/tailwind_merge/tree/v1.3.3
82
+ changelog_uri: https://github.com/gjtorikian/tailwind_merge/blob/v1.3.3/CHANGELOG.md
86
83
  bug_tracker_uri: https://github.com/gjtorikian/tailwind_merge/issues
87
- documentation_uri: https://rubydoc.info/gems/tailwind_merge/1.3.1
84
+ documentation_uri: https://rubydoc.info/gems/tailwind_merge/1.3.3
88
85
  funding_uri: https://github.com/sponsors/gjtorikian
89
86
  rubygems_mfa_required: 'true'
90
- post_install_message:
91
87
  rdoc_options: []
92
88
  require_paths:
93
89
  - lib
@@ -95,18 +91,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
91
  requirements:
96
92
  - - ">="
97
93
  - !ruby/object:Gem::Version
98
- version: '3.1'
99
- - - "<"
100
- - !ruby/object:Gem::Version
101
- version: '4.0'
94
+ version: '3.2'
102
95
  required_rubygems_version: !ruby/object:Gem::Requirement
103
96
  requirements:
104
97
  - - ">="
105
98
  - !ruby/object:Gem::Version
106
99
  version: '0'
107
100
  requirements: []
108
- rubygems_version: 3.4.6
109
- signing_key:
101
+ rubygems_version: 4.0.3
110
102
  specification_version: 4
111
103
  summary: Utility function to efficiently merge Tailwind CSS classes without style
112
104
  conflicts.