sass-embedded 1.79.3-arm-linux-gnueabihf → 1.79.5-arm-linux-gnueabihf

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/exe/sass +1 -9
  3. data/ext/sass/cli.rb +7 -0
  4. data/ext/sass/dart-sass/src/sass.snapshot +0 -0
  5. data/ext/sass/embedded_sass_pb.rb +1 -1
  6. data/lib/sass/compiler/connection.rb +1 -9
  7. data/lib/sass/compiler/host/protofier.rb +17 -55
  8. data/lib/sass/elf.rb +4 -4
  9. data/lib/sass/embedded/version.rb +1 -1
  10. data/lib/sass/value/color/channel.rb +79 -0
  11. data/lib/sass/value/color/conversions.rb +473 -0
  12. data/lib/sass/value/color/gamut_map_method/clip.rb +45 -0
  13. data/lib/sass/value/color/gamut_map_method/local_minde.rb +94 -0
  14. data/lib/sass/value/color/gamut_map_method.rb +45 -0
  15. data/lib/sass/value/color/interpolation_method.rb +51 -0
  16. data/lib/sass/value/color/space/a98_rgb.rb +57 -0
  17. data/lib/sass/value/color/space/display_p3.rb +57 -0
  18. data/lib/sass/value/color/space/hsl.rb +65 -0
  19. data/lib/sass/value/color/space/hwb.rb +70 -0
  20. data/lib/sass/value/color/space/lab.rb +77 -0
  21. data/lib/sass/value/color/space/lch.rb +53 -0
  22. data/lib/sass/value/color/space/lms.rb +129 -0
  23. data/lib/sass/value/color/space/oklab.rb +66 -0
  24. data/lib/sass/value/color/space/oklch.rb +54 -0
  25. data/lib/sass/value/color/space/prophoto_rgb.rb +59 -0
  26. data/lib/sass/value/color/space/rec2020.rb +69 -0
  27. data/lib/sass/value/color/space/rgb.rb +52 -0
  28. data/lib/sass/value/color/space/srgb.rb +140 -0
  29. data/lib/sass/value/color/space/srgb_linear.rb +72 -0
  30. data/lib/sass/value/color/space/utils.rb +86 -0
  31. data/lib/sass/value/color/space/xyz_d50.rb +100 -0
  32. data/lib/sass/value/color/space/xyz_d65.rb +57 -0
  33. data/lib/sass/value/color/space.rb +198 -0
  34. data/lib/sass/value/color.rb +537 -162
  35. data/lib/sass/value/fuzzy_math.rb +23 -19
  36. data/lib/sass/value/number.rb +1 -1
  37. data/lib/sass/value/string.rb +1 -1
  38. 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)
@@ -34,23 +47,14 @@ module Sass
34
47
 
35
48
  def integer?(number)
36
49
  return false unless number.finite?
37
- return true if number.integer?
38
50
 
39
- equals((number - 0.5).abs % 1, 0.5)
51
+ equals(number, number.round)
40
52
  end
41
53
 
42
54
  def to_i(number)
43
55
  integer?(number) ? number.round : nil
44
56
  end
45
57
 
46
- def round(number)
47
- if number.positive?
48
- less_than(number % 1, 0.5) ? number.floor : number.ceil
49
- else
50
- less_than_or_equals(number % 1, 0.5) ? number.floor : number.ceil
51
- end
52
- end
53
-
54
58
  def between(number, min, max)
55
59
  return min if equals(number, min)
56
60
  return max if equals(number, max)
@@ -66,12 +70,12 @@ module Sass
66
70
  raise Sass::ScriptError.new("#{number} must be between #{min} and #{max}.", name)
67
71
  end
68
72
 
69
- def hash(number)
70
- if number.finite?
71
- (number * INVERSE_EPSILON).round.hash
72
- else
73
- number.hash
74
- end
73
+ def _clamp_like_css(number, lower_bound, upper_bound)
74
+ number.to_f.nan? ? lower_bound : number.clamp(lower_bound, upper_bound)
75
+ end
76
+
77
+ def _hash(number)
78
+ number&.finite? ? (number * INVERSE_EPSILON).round : number
75
79
  end
76
80
  end
77
81
 
@@ -99,7 +99,7 @@ module Sass
99
99
 
100
100
  # @return [Integer]
101
101
  def hash
102
- @hash ||= FuzzyMath.hash(canonical_units_value)
102
+ @hash ||= FuzzyMath._hash(canonical_units_value).hash
103
103
  end
104
104
 
105
105
  # @return [::Boolean]
@@ -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.5
5
5
  platform: arm-linux-gnueabihf
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-10-12 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.5
116
+ source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.79.5
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.21
111
135
  signing_key:
112
136
  specification_version: 4
113
137
  summary: Use dart-sass with Ruby!