sass-embedded 1.105.0 → 1.105.1
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 +4 -4
- data/ext/sass/package.json +1 -1
- data/ext/sass/sass-1.105.1.tgz +0 -0
- data/lib/sass/compiler/session/protofier.rb +5 -5
- data/lib/sass/embedded/version.rb +1 -1
- data/lib/sass/value/boolean.rb +7 -0
- data/lib/sass/value/color.rb +3 -3
- data/lib/sass/value/function.rb +14 -0
- data/lib/sass/value/list.rb +10 -0
- data/lib/sass/value/map.rb +6 -0
- data/lib/sass/value/mixin.rb +10 -0
- data/lib/sass/value/module.rb +10 -0
- data/lib/sass/value/null.rb +10 -0
- data/lib/sass/value/number.rb +7 -7
- data/lib/sass/value/string.rb +22 -5
- data/lib/sass/value.rb +40 -9
- metadata +4 -4
- data/ext/sass/sass-1.105.0.tgz +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 97faa2ce792bcc737ded3a7ba1c27cf5f9eb9fae01658c6a07b9dd5ad4abdcf1
|
|
4
|
+
data.tar.gz: 0aef0c7269199e19170b7c3dd12ebe6d6b9bea26ec3c52572be987ca3bd525b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 84d5e4ff326edbf5337e1ecefbbf16092e3408d425c248f2471f7538a4a0919f0b41b8e99df692b7ae30f44045255a2924fe43d3e1134c129ce3479d3fc4f52f
|
|
7
|
+
data.tar.gz: 6e3b0f9deebb23caddd25ea363bcc7f0523b47e4b5609401570367486a8aadf88e9d2ce10bdf77f1dd9dd86526e9879b5f65b6126ffabcd116b440d207b97307
|
data/ext/sass/package.json
CHANGED
|
Binary file
|
|
@@ -109,7 +109,7 @@ module Sass
|
|
|
109
109
|
singleton: :NULL
|
|
110
110
|
)
|
|
111
111
|
else
|
|
112
|
-
raise Sass::ScriptError, "Unknown Sass::Value #{obj}"
|
|
112
|
+
raise Sass::ScriptError, "Unknown Sass::Value #{obj.inspect}"
|
|
113
113
|
end
|
|
114
114
|
end
|
|
115
115
|
|
|
@@ -190,7 +190,7 @@ module Sass
|
|
|
190
190
|
|
|
191
191
|
def assert_compiler_value(value)
|
|
192
192
|
unless value.instance_variable_get(:@compile_context) == @function_registry.compile_context
|
|
193
|
-
raise Sass::ScriptError, "Value #{value} does not belong to this compilation"
|
|
193
|
+
raise Sass::ScriptError, "Value #{value.inspect} does not belong to this compilation"
|
|
194
194
|
end
|
|
195
195
|
|
|
196
196
|
value
|
|
@@ -275,7 +275,7 @@ module Sass
|
|
|
275
275
|
)
|
|
276
276
|
)
|
|
277
277
|
else
|
|
278
|
-
raise Sass::ScriptError, "Unknown CalculationValue #{value}"
|
|
278
|
+
raise Sass::ScriptError, "Unknown CalculationValue #{value.inspect}"
|
|
279
279
|
end
|
|
280
280
|
end
|
|
281
281
|
|
|
@@ -318,7 +318,7 @@ module Sass
|
|
|
318
318
|
when '/'
|
|
319
319
|
:DIVIDE
|
|
320
320
|
else
|
|
321
|
-
raise Sass::ScriptError, "Unknown CalculationOperator #{separator}"
|
|
321
|
+
raise Sass::ScriptError, "Unknown CalculationOperator #{separator.inspect}"
|
|
322
322
|
end
|
|
323
323
|
end
|
|
324
324
|
|
|
@@ -355,7 +355,7 @@ module Sass
|
|
|
355
355
|
when nil
|
|
356
356
|
:UNDECIDED
|
|
357
357
|
else
|
|
358
|
-
raise Sass::ScriptError, "Unknown ListSeparator #{separator}"
|
|
358
|
+
raise Sass::ScriptError, "Unknown ListSeparator #{separator.inspect}"
|
|
359
359
|
end
|
|
360
360
|
end
|
|
361
361
|
|
data/lib/sass/value/boolean.rb
CHANGED
data/lib/sass/value/color.rb
CHANGED
|
@@ -124,7 +124,7 @@ module Sass
|
|
|
124
124
|
return channel2 if channel == channels[2].name
|
|
125
125
|
return alpha if channel == 'alpha'
|
|
126
126
|
|
|
127
|
-
raise Sass::ScriptError.new("Color #{
|
|
127
|
+
raise Sass::ScriptError.new("Color #{inspect} doesn't have a channel named \"#{channel}\".", channel)
|
|
128
128
|
end
|
|
129
129
|
|
|
130
130
|
# @param channel [::String]
|
|
@@ -136,7 +136,7 @@ module Sass
|
|
|
136
136
|
return channel2_missing? if channel == channels[2].name
|
|
137
137
|
return alpha_missing? if channel == 'alpha'
|
|
138
138
|
|
|
139
|
-
raise Sass::ScriptError.new("Color #{
|
|
139
|
+
raise Sass::ScriptError.new("Color #{inspect} doesn't have a channel named \"#{channel}\".", channel)
|
|
140
140
|
end
|
|
141
141
|
|
|
142
142
|
# @param channel [::String]
|
|
@@ -151,7 +151,7 @@ module Sass
|
|
|
151
151
|
return channel2_powerless? if channel == channels[2].name
|
|
152
152
|
return false if channel == 'alpha'
|
|
153
153
|
|
|
154
|
-
raise Sass::ScriptError.new("Color #{
|
|
154
|
+
raise Sass::ScriptError.new("Color #{inspect} doesn't have a channel named \"#{channel}\".", channel)
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
# @param other [Color]
|
data/lib/sass/value/function.rb
CHANGED
|
@@ -43,6 +43,20 @@ module Sass
|
|
|
43
43
|
@hash ||= defined?(@id) ? [compile_context, id].hash : [signature, callback].hash
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
+
# @raise [ScriptError]
|
|
47
|
+
def to_s
|
|
48
|
+
return super unless defined?(@id)
|
|
49
|
+
|
|
50
|
+
raise Sass::ScriptError, "#{inspect} isn't a valid CSS value."
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# @return [::String]
|
|
54
|
+
def inspect
|
|
55
|
+
return super unless defined?(@id)
|
|
56
|
+
|
|
57
|
+
'get-function(<anonymous>)'
|
|
58
|
+
end
|
|
59
|
+
|
|
46
60
|
# @return [Function]
|
|
47
61
|
def assert_function(_name = nil)
|
|
48
62
|
self
|
data/lib/sass/value/list.rb
CHANGED
|
@@ -58,6 +58,16 @@ module Sass
|
|
|
58
58
|
@contents
|
|
59
59
|
end
|
|
60
60
|
|
|
61
|
+
# @return [Hash<Value, Value>]
|
|
62
|
+
# @raise [ScriptError, ArgumentError, TypeError]
|
|
63
|
+
def to_h(...)
|
|
64
|
+
return super if block_given?
|
|
65
|
+
|
|
66
|
+
super do |element|
|
|
67
|
+
element.is_a?(Sass::Value::List) ? element.to_a : element
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
61
71
|
# @return [Map, nil]
|
|
62
72
|
def to_map
|
|
63
73
|
to_a.empty? ? Sass::Value::Map.new({}) : nil
|
data/lib/sass/value/map.rb
CHANGED
|
@@ -51,6 +51,12 @@ module Sass
|
|
|
51
51
|
contents.map { |key, value| Sass::Value::List.new([key, value], separator: ' ') }
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
# @return [Hash<Value, Value>]
|
|
55
|
+
# @raise [ScriptError, ArgumentError, TypeError]
|
|
56
|
+
def to_h(...)
|
|
57
|
+
contents.to_h(...)
|
|
58
|
+
end
|
|
59
|
+
|
|
54
60
|
# @return [Map]
|
|
55
61
|
def to_map
|
|
56
62
|
self
|
data/lib/sass/value/mixin.rb
CHANGED
|
@@ -28,6 +28,16 @@ module Sass
|
|
|
28
28
|
@hash ||= [compile_context, id].hash
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
# @raise [ScriptError]
|
|
32
|
+
def to_s
|
|
33
|
+
raise Sass::ScriptError, "#{inspect} isn't a valid CSS value."
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @return [::String]
|
|
37
|
+
def inspect
|
|
38
|
+
'get-mixin(<anonymous>)'
|
|
39
|
+
end
|
|
40
|
+
|
|
31
41
|
# @return [Mixin]
|
|
32
42
|
def assert_mixin(_name = nil)
|
|
33
43
|
self
|
data/lib/sass/value/module.rb
CHANGED
|
@@ -28,6 +28,16 @@ module Sass
|
|
|
28
28
|
@hash ||= [compile_context, id].hash
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
# @raise [ScriptError]
|
|
32
|
+
def to_s
|
|
33
|
+
raise Sass::ScriptError, "#{inspect} isn't a valid CSS value."
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# @return [::String]
|
|
37
|
+
def inspect
|
|
38
|
+
'get-module(<anonymous>)'
|
|
39
|
+
end
|
|
40
|
+
|
|
31
41
|
# @return [Module]
|
|
32
42
|
def assert_module(_name = nil)
|
|
33
43
|
self
|
data/lib/sass/value/null.rb
CHANGED
|
@@ -30,6 +30,16 @@ module Sass
|
|
|
30
30
|
@hash ||= value.hash
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
+
# @return [::String]
|
|
34
|
+
def to_s
|
|
35
|
+
''
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# @return [::String]
|
|
39
|
+
def inspect
|
|
40
|
+
'null'
|
|
41
|
+
end
|
|
42
|
+
|
|
33
43
|
# @return [::Boolean]
|
|
34
44
|
def to_bool # rubocop:disable Naming/PredicateMethod
|
|
35
45
|
false
|
data/lib/sass/value/number.rb
CHANGED
|
@@ -110,7 +110,7 @@ module Sass
|
|
|
110
110
|
# @return [Number]
|
|
111
111
|
# @raise [ScriptError]
|
|
112
112
|
def assert_unitless(name = nil)
|
|
113
|
-
raise Sass::ScriptError.new("Expected #{
|
|
113
|
+
raise Sass::ScriptError.new("Expected #{inspect} to have no units", name) unless unitless?
|
|
114
114
|
|
|
115
115
|
self
|
|
116
116
|
end
|
|
@@ -130,7 +130,7 @@ module Sass
|
|
|
130
130
|
# @return [Number]
|
|
131
131
|
# @raise [ScriptError]
|
|
132
132
|
def assert_unit(unit, name = nil)
|
|
133
|
-
raise Sass::ScriptError.new("Expected #{
|
|
133
|
+
raise Sass::ScriptError.new("Expected #{inspect} to have unit #{unit.inspect}", name) unless unit?(unit)
|
|
134
134
|
|
|
135
135
|
self
|
|
136
136
|
end
|
|
@@ -143,7 +143,7 @@ module Sass
|
|
|
143
143
|
# @return [Integer]
|
|
144
144
|
# @raise [ScriptError]
|
|
145
145
|
def assert_integer(name = nil)
|
|
146
|
-
raise Sass::ScriptError.new("#{
|
|
146
|
+
raise Sass::ScriptError.new("#{inspect} is not an integer", name) unless integer?
|
|
147
147
|
|
|
148
148
|
to_i
|
|
149
149
|
end
|
|
@@ -288,25 +288,25 @@ module Sass
|
|
|
288
288
|
|
|
289
289
|
compatibility_error = lambda {
|
|
290
290
|
unless other.nil?
|
|
291
|
-
message = "#{
|
|
291
|
+
message = "#{inspect} and"
|
|
292
292
|
message << " $#{other_name}:" unless other_name.nil?
|
|
293
293
|
message << " #{other} have incompatible units"
|
|
294
294
|
message << " (one has units and the other doesn't)" if unitless? || other_unitless
|
|
295
295
|
return Sass::ScriptError.new(message, name)
|
|
296
296
|
end
|
|
297
297
|
|
|
298
|
-
return Sass::ScriptError.new("Expected #{
|
|
298
|
+
return Sass::ScriptError.new("Expected #{inspect} to have no units", name) unless other_unitless
|
|
299
299
|
|
|
300
300
|
if new_numerator_units.length == 1 && new_denominator_units.empty?
|
|
301
301
|
type = Unit::TYPES_BY_UNIT[new_numerator_units.first]
|
|
302
302
|
return Sass::ScriptError.new(
|
|
303
|
-
"Expected #{
|
|
303
|
+
"Expected #{inspect} to have a #{type} unit (#{Unit::UNITS_BY_TYPE[type].join(', ')})", name
|
|
304
304
|
)
|
|
305
305
|
end
|
|
306
306
|
|
|
307
307
|
unit_length = new_numerator_units.length + new_denominator_units.length
|
|
308
308
|
units = unit_string(new_numerator_units, new_denominator_units)
|
|
309
|
-
Sass::ScriptError.new("Expected #{
|
|
309
|
+
Sass::ScriptError.new("Expected #{inspect} to have unit#{'s' if unit_length > 1} #{units}", name)
|
|
310
310
|
}
|
|
311
311
|
|
|
312
312
|
result = value
|
data/lib/sass/value/string.rb
CHANGED
|
@@ -24,6 +24,16 @@ module Sass
|
|
|
24
24
|
@quoted
|
|
25
25
|
end
|
|
26
26
|
|
|
27
|
+
# @return [String]
|
|
28
|
+
# @raise [TypeError]
|
|
29
|
+
def +(other)
|
|
30
|
+
unless other.respond_to?(:to_str)
|
|
31
|
+
raise TypeError, "no implicit conversion of #{other&.class.inspect} into String"
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
Sass::Value::String.new(to_str + other.to_str, quoted: quoted?)
|
|
35
|
+
end
|
|
36
|
+
|
|
27
37
|
# @return [::Boolean]
|
|
28
38
|
def ==(other)
|
|
29
39
|
other.is_a?(Sass::Value::String) && other.text == text
|
|
@@ -34,6 +44,18 @@ module Sass
|
|
|
34
44
|
@hash ||= text.hash
|
|
35
45
|
end
|
|
36
46
|
|
|
47
|
+
# @return [::String]
|
|
48
|
+
def to_s
|
|
49
|
+
@quoted ? Serializer.serialize_quoted_string(@text) : Serializer.serialize_unquoted_string(@text)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
alias inspect to_s
|
|
53
|
+
|
|
54
|
+
# @return [::String]
|
|
55
|
+
def to_str
|
|
56
|
+
text.to_str
|
|
57
|
+
end
|
|
58
|
+
|
|
37
59
|
# @return [String]
|
|
38
60
|
def assert_string(_name = nil)
|
|
39
61
|
self
|
|
@@ -51,11 +73,6 @@ module Sass
|
|
|
51
73
|
|
|
52
74
|
index.negative? ? text.length + index : index - 1
|
|
53
75
|
end
|
|
54
|
-
|
|
55
|
-
# @return [::String]
|
|
56
|
-
def to_s
|
|
57
|
-
@quoted ? Serializer.serialize_quoted_string(@text) : Serializer.serialize_unquoted_string(@text)
|
|
58
|
-
end
|
|
59
76
|
end
|
|
60
77
|
end
|
|
61
78
|
end
|
data/lib/sass/value.rb
CHANGED
|
@@ -37,6 +37,37 @@ module Sass
|
|
|
37
37
|
[self]
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
# @return [Hash<Value, Value>]
|
|
41
|
+
# @raise [ScriptError, ArgumentError, TypeError]
|
|
42
|
+
def to_h(...)
|
|
43
|
+
to_a.to_h(...)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# @return [::String]
|
|
47
|
+
# @raise [ScriptError]
|
|
48
|
+
def to_s
|
|
49
|
+
s = nil
|
|
50
|
+
Sass.compile_string('$_:o(#{i()});', functions: { # rubocop:disable Lint/InterpolationCheck
|
|
51
|
+
'i()' => ->(_) { self },
|
|
52
|
+
'o($s)' => ->(args) { s = args[0].assert_string }
|
|
53
|
+
})
|
|
54
|
+
s.text
|
|
55
|
+
rescue Sass::CompileError => e
|
|
56
|
+
raise Sass::ScriptError.new(e.message), cause: nil
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# @return [::String]
|
|
60
|
+
def inspect
|
|
61
|
+
s = nil
|
|
62
|
+
Sass.compile_string('@use "sass:meta";$_:o(meta.inspect(i()));', functions: {
|
|
63
|
+
'i()' => ->(_) { self },
|
|
64
|
+
'o($s)' => ->(args) { s = args[0].assert_string }
|
|
65
|
+
})
|
|
66
|
+
s.text
|
|
67
|
+
rescue StandardError
|
|
68
|
+
super
|
|
69
|
+
end
|
|
70
|
+
|
|
40
71
|
# @return [::Boolean]
|
|
41
72
|
def to_bool # rubocop:disable Naming/PredicateMethod
|
|
42
73
|
true
|
|
@@ -55,55 +86,55 @@ module Sass
|
|
|
55
86
|
# @return [Boolean]
|
|
56
87
|
# @raise [ScriptError]
|
|
57
88
|
def assert_boolean(name = nil)
|
|
58
|
-
raise Sass::ScriptError.new("#{
|
|
89
|
+
raise Sass::ScriptError.new("#{inspect} is not a boolean", name)
|
|
59
90
|
end
|
|
60
91
|
|
|
61
92
|
# @return [Calculation]
|
|
62
93
|
# @raise [ScriptError]
|
|
63
94
|
def assert_calculation(name = nil)
|
|
64
|
-
raise Sass::ScriptError.new("#{
|
|
95
|
+
raise Sass::ScriptError.new("#{inspect} is not a calculation", name)
|
|
65
96
|
end
|
|
66
97
|
|
|
67
98
|
# @return [Color]
|
|
68
99
|
# @raise [ScriptError]
|
|
69
100
|
def assert_color(name = nil)
|
|
70
|
-
raise Sass::ScriptError.new("#{
|
|
101
|
+
raise Sass::ScriptError.new("#{inspect} is not a color", name)
|
|
71
102
|
end
|
|
72
103
|
|
|
73
104
|
# @return [Function]
|
|
74
105
|
# @raise [ScriptError]
|
|
75
106
|
def assert_function(name = nil)
|
|
76
|
-
raise Sass::ScriptError.new("#{
|
|
107
|
+
raise Sass::ScriptError.new("#{inspect} is not a function", name)
|
|
77
108
|
end
|
|
78
109
|
|
|
79
110
|
# @return [Map]
|
|
80
111
|
# @raise [ScriptError]
|
|
81
112
|
def assert_map(name = nil)
|
|
82
|
-
raise Sass::ScriptError.new("#{
|
|
113
|
+
raise Sass::ScriptError.new("#{inspect} is not a map", name)
|
|
83
114
|
end
|
|
84
115
|
|
|
85
116
|
# @return [Mixin]
|
|
86
117
|
# @raise [ScriptError]
|
|
87
118
|
def assert_mixin(name = nil)
|
|
88
|
-
raise Sass::ScriptError.new("#{
|
|
119
|
+
raise Sass::ScriptError.new("#{inspect} is not a mixin", name)
|
|
89
120
|
end
|
|
90
121
|
|
|
91
122
|
# @return [Module]
|
|
92
123
|
# @raise [ScriptError]
|
|
93
124
|
def assert_module(name = nil)
|
|
94
|
-
raise Sass::ScriptError.new("#{
|
|
125
|
+
raise Sass::ScriptError.new("#{inspect} is not a module", name)
|
|
95
126
|
end
|
|
96
127
|
|
|
97
128
|
# @return [Number]
|
|
98
129
|
# @raise [ScriptError]
|
|
99
130
|
def assert_number(name = nil)
|
|
100
|
-
raise Sass::ScriptError.new("#{
|
|
131
|
+
raise Sass::ScriptError.new("#{inspect} is not a number", name)
|
|
101
132
|
end
|
|
102
133
|
|
|
103
134
|
# @return [String]
|
|
104
135
|
# @raise [ScriptError]
|
|
105
136
|
def assert_string(name = nil)
|
|
106
|
-
raise Sass::ScriptError.new("#{
|
|
137
|
+
raise Sass::ScriptError.new("#{inspect} is not a string", name)
|
|
107
138
|
end
|
|
108
139
|
|
|
109
140
|
# @param sass_index [Number]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sass-embedded
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.105.
|
|
4
|
+
version: 1.105.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- なつき
|
|
@@ -54,7 +54,7 @@ files:
|
|
|
54
54
|
- ext/sass/file_utils.rb
|
|
55
55
|
- ext/sass/package.json
|
|
56
56
|
- ext/sass/platform.rb
|
|
57
|
-
- ext/sass/sass-1.105.
|
|
57
|
+
- ext/sass/sass-1.105.1.tgz
|
|
58
58
|
- ext/sass/sass_config.rb
|
|
59
59
|
- ext/sass/utils.rb
|
|
60
60
|
- lib/sass-embedded.rb
|
|
@@ -133,8 +133,8 @@ licenses:
|
|
|
133
133
|
- MIT
|
|
134
134
|
metadata:
|
|
135
135
|
bug_tracker_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/issues
|
|
136
|
-
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.105.
|
|
137
|
-
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.105.
|
|
136
|
+
documentation_uri: https://rubydoc.info/gems/sass-embedded/1.105.1
|
|
137
|
+
source_code_uri: https://github.com/sass-contrib/sass-embedded-host-ruby/tree/v1.105.1
|
|
138
138
|
funding_uri: https://github.com/sponsors/ntkme
|
|
139
139
|
rubygems_mfa_required: 'true'
|
|
140
140
|
rdoc_options: []
|
data/ext/sass/sass-1.105.0.tgz
DELETED
|
Binary file
|