sass-embedded 1.79.3-x86-mswin32 → 1.79.4-x86-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/exe/sass +1 -9
  3. data/ext/sass/dart-sass/src/sass.snapshot +0 -0
  4. data/lib/sass/compiler/connection.rb +1 -9
  5. data/lib/sass/compiler/host/protofier.rb +16 -55
  6. data/lib/sass/elf.rb +4 -4
  7. data/lib/sass/embedded/version.rb +1 -1
  8. data/lib/sass/value/color/channel.rb +79 -0
  9. data/lib/sass/value/color/conversions.rb +464 -0
  10. data/lib/sass/value/color/gamut_map_method/clip.rb +45 -0
  11. data/lib/sass/value/color/gamut_map_method/local_minde.rb +94 -0
  12. data/lib/sass/value/color/gamut_map_method.rb +45 -0
  13. data/lib/sass/value/color/interpolation_method.rb +51 -0
  14. data/lib/sass/value/color/space/a98_rgb.rb +57 -0
  15. data/lib/sass/value/color/space/display_p3.rb +57 -0
  16. data/lib/sass/value/color/space/hsl.rb +65 -0
  17. data/lib/sass/value/color/space/hwb.rb +70 -0
  18. data/lib/sass/value/color/space/lab.rb +77 -0
  19. data/lib/sass/value/color/space/lch.rb +53 -0
  20. data/lib/sass/value/color/space/lms.rb +129 -0
  21. data/lib/sass/value/color/space/oklab.rb +66 -0
  22. data/lib/sass/value/color/space/oklch.rb +54 -0
  23. data/lib/sass/value/color/space/prophoto_rgb.rb +59 -0
  24. data/lib/sass/value/color/space/rec2020.rb +69 -0
  25. data/lib/sass/value/color/space/rgb.rb +52 -0
  26. data/lib/sass/value/color/space/srgb.rb +141 -0
  27. data/lib/sass/value/color/space/srgb_linear.rb +72 -0
  28. data/lib/sass/value/color/space/utils.rb +86 -0
  29. data/lib/sass/value/color/space/xyz_d50.rb +100 -0
  30. data/lib/sass/value/color/space/xyz_d65.rb +57 -0
  31. data/lib/sass/value/color/space.rb +198 -0
  32. data/lib/sass/value/color.rb +537 -162
  33. data/lib/sass/value/fuzzy_math.rb +30 -3
  34. data/lib/sass/value/string.rb +1 -1
  35. metadata +29 -5
@@ -6,14 +6,27 @@ module Sass
6
6
  module FuzzyMath
7
7
  PRECISION = 10
8
8
 
9
- EPSILON = 10.pow(-PRECISION - 1)
9
+ EPSILON = 10**(-PRECISION - 1)
10
10
 
11
- INVERSE_EPSILON = 1 / EPSILON
11
+ INVERSE_EPSILON = 10**(PRECISION + 1)
12
12
 
13
13
  module_function
14
14
 
15
15
  def equals(number1, number2)
16
- (number1 - number2).abs < EPSILON
16
+ return true if number1 == number2
17
+
18
+ (number1 - number2).abs <= EPSILON &&
19
+ (number1 * INVERSE_EPSILON).round ==
20
+ (number2 * INVERSE_EPSILON).round
21
+ end
22
+
23
+ def equals_nilable(number1, number2)
24
+ return true if number1 == number2
25
+ return false if number1.nil? || number2.nil?
26
+
27
+ (number1 - number2).abs <= EPSILON &&
28
+ (number1 * INVERSE_EPSILON).round ==
29
+ (number2 * INVERSE_EPSILON).round
17
30
  end
18
31
 
19
32
  def less_than(number1, number2)
@@ -51,6 +64,16 @@ module Sass
51
64
  end
52
65
  end
53
66
 
67
+ def sign(number)
68
+ if number.positive?
69
+ 1
70
+ elsif number.negative?
71
+ -1
72
+ else
73
+ 0
74
+ end
75
+ end
76
+
54
77
  def between(number, min, max)
55
78
  return min if equals(number, min)
56
79
  return max if equals(number, max)
@@ -66,6 +89,10 @@ module Sass
66
89
  raise Sass::ScriptError.new("#{number} must be between #{min} and #{max}.", name)
67
90
  end
68
91
 
92
+ def clamp_like_css(number, lower_bound, upper_bound)
93
+ number.to_f.nan? ? lower_bound : number.clamp(lower_bound, upper_bound)
94
+ end
95
+
69
96
  def hash(number)
70
97
  if number.finite?
71
98
  (number * INVERSE_EPSILON).round.hash
@@ -52,7 +52,7 @@ module Sass
52
52
  index.negative? ? text.length + index : index - 1
53
53
  end
54
54
 
55
- # @return [String]
55
+ # @return [::String]
56
56
  def to_s
57
57
  @quoted ? Serializer.serialize_quoted_string(@text) : Serializer.serialize_unquoted_string(@text)
58
58
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sass-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.79.3
4
+ version: 1.79.4
5
5
  platform: x86-mswin32
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-20 00:00:00.000000000 Z
11
+ date: 2024-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -74,6 +74,30 @@ files:
74
74
  - lib/sass/value/boolean.rb
75
75
  - lib/sass/value/calculation.rb
76
76
  - lib/sass/value/color.rb
77
+ - lib/sass/value/color/channel.rb
78
+ - lib/sass/value/color/conversions.rb
79
+ - lib/sass/value/color/gamut_map_method.rb
80
+ - lib/sass/value/color/gamut_map_method/clip.rb
81
+ - lib/sass/value/color/gamut_map_method/local_minde.rb
82
+ - lib/sass/value/color/interpolation_method.rb
83
+ - lib/sass/value/color/space.rb
84
+ - lib/sass/value/color/space/a98_rgb.rb
85
+ - lib/sass/value/color/space/display_p3.rb
86
+ - lib/sass/value/color/space/hsl.rb
87
+ - lib/sass/value/color/space/hwb.rb
88
+ - lib/sass/value/color/space/lab.rb
89
+ - lib/sass/value/color/space/lch.rb
90
+ - lib/sass/value/color/space/lms.rb
91
+ - lib/sass/value/color/space/oklab.rb
92
+ - lib/sass/value/color/space/oklch.rb
93
+ - lib/sass/value/color/space/prophoto_rgb.rb
94
+ - lib/sass/value/color/space/rec2020.rb
95
+ - lib/sass/value/color/space/rgb.rb
96
+ - lib/sass/value/color/space/srgb.rb
97
+ - lib/sass/value/color/space/srgb_linear.rb
98
+ - lib/sass/value/color/space/utils.rb
99
+ - lib/sass/value/color/space/xyz_d50.rb
100
+ - lib/sass/value/color/space/xyz_d65.rb
77
101
  - lib/sass/value/function.rb
78
102
  - lib/sass/value/fuzzy_math.rb
79
103
  - lib/sass/value/list.rb
@@ -88,8 +112,8 @@ licenses:
88
112
  - MIT
89
113
  metadata:
90
114
  bug_tracker_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/issues
91
- documentation_uri: https://rubydoc.info/gems/sass-embedded/1.79.3
92
- source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.79.3
115
+ documentation_uri: https://rubydoc.info/gems/sass-embedded/1.79.4
116
+ source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.79.4
93
117
  funding_uri: https://github.com/sponsors/ntkme
94
118
  rubygems_mfa_required: 'true'
95
119
  post_install_message:
@@ -107,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
131
  - !ruby/object:Gem::Version
108
132
  version: '0'
109
133
  requirements: []
110
- rubygems_version: 3.5.19
134
+ rubygems_version: 3.5.20
111
135
  signing_key:
112
136
  specification_version: 4
113
137
  summary: Use dart-sass with Ruby!