sass-embedded 1.79.3-x86_64-linux-gnu → 1.79.5-x86_64-linux-gnu
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/sass +1 -9
- data/ext/sass/cli.rb +7 -0
- data/ext/sass/dart-sass/src/sass.snapshot +0 -0
- data/ext/sass/embedded_sass_pb.rb +1 -1
- data/lib/sass/compiler/connection.rb +1 -9
- data/lib/sass/compiler/host/protofier.rb +17 -55
- data/lib/sass/elf.rb +4 -4
- data/lib/sass/embedded/version.rb +1 -1
- data/lib/sass/value/color/channel.rb +79 -0
- data/lib/sass/value/color/conversions.rb +473 -0
- data/lib/sass/value/color/gamut_map_method/clip.rb +45 -0
- data/lib/sass/value/color/gamut_map_method/local_minde.rb +94 -0
- data/lib/sass/value/color/gamut_map_method.rb +45 -0
- data/lib/sass/value/color/interpolation_method.rb +51 -0
- data/lib/sass/value/color/space/a98_rgb.rb +57 -0
- data/lib/sass/value/color/space/display_p3.rb +57 -0
- data/lib/sass/value/color/space/hsl.rb +65 -0
- data/lib/sass/value/color/space/hwb.rb +70 -0
- data/lib/sass/value/color/space/lab.rb +77 -0
- data/lib/sass/value/color/space/lch.rb +53 -0
- data/lib/sass/value/color/space/lms.rb +129 -0
- data/lib/sass/value/color/space/oklab.rb +66 -0
- data/lib/sass/value/color/space/oklch.rb +54 -0
- data/lib/sass/value/color/space/prophoto_rgb.rb +59 -0
- data/lib/sass/value/color/space/rec2020.rb +69 -0
- data/lib/sass/value/color/space/rgb.rb +52 -0
- data/lib/sass/value/color/space/srgb.rb +140 -0
- data/lib/sass/value/color/space/srgb_linear.rb +72 -0
- data/lib/sass/value/color/space/utils.rb +86 -0
- data/lib/sass/value/color/space/xyz_d50.rb +100 -0
- data/lib/sass/value/color/space/xyz_d65.rb +57 -0
- data/lib/sass/value/color/space.rb +198 -0
- data/lib/sass/value/color.rb +537 -162
- data/lib/sass/value/fuzzy_math.rb +23 -19
- data/lib/sass/value/number.rb +1 -1
- data/lib/sass/value/string.rb +1 -1
- metadata +29 -5
@@ -6,14 +6,27 @@ module Sass
|
|
6
6
|
module FuzzyMath
|
7
7
|
PRECISION = 10
|
8
8
|
|
9
|
-
EPSILON = 10
|
9
|
+
EPSILON = 10**(-PRECISION - 1)
|
10
10
|
|
11
|
-
INVERSE_EPSILON =
|
11
|
+
INVERSE_EPSILON = 10**(PRECISION + 1)
|
12
12
|
|
13
13
|
module_function
|
14
14
|
|
15
15
|
def equals(number1, number2)
|
16
|
-
|
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(
|
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
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
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
|
|
data/lib/sass/value/number.rb
CHANGED
data/lib/sass/value/string.rb
CHANGED
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.
|
4
|
+
version: 1.79.5
|
5
5
|
platform: x86_64-linux-gnu
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
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.
|
92
|
-
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.79.
|
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.
|
134
|
+
rubygems_version: 3.5.21
|
111
135
|
signing_key:
|
112
136
|
specification_version: 4
|
113
137
|
summary: Use dart-sass with Ruby!
|