sassc-embedded 1.79.0 → 1.80.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/sassc/embedded/version.rb +1 -1
- data/lib/sassc/embedded.rb +20 -44
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bcb2ad67ca13ea4108da3411010d0ba6174be0c81344ba4e872c72a975de4e8
|
4
|
+
data.tar.gz: 7c4fb6fb6f586c1a1df518969919621684f7db14ee714565d09a7ba84aa944a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 995360f534fdb95387ea7265bab5648d36ad1d87581c48343985b43552182c39b037f9636c6d46e0796f1c2fdf69c54e377b2a1618b696d3505a3766339240e4
|
7
|
+
data.tar.gz: 2bbb05391583018d90900043363bd97fec65626488c22d992518fc8b8c6fe23fde4f653cb7ec0fadb8ae48a67526bcbd7b4ff53236cce269eab8ee3bdf1fe407
|
data/README.md
CHANGED
@@ -21,7 +21,7 @@ This library shims [`sassc`](https://github.com/sass/sassc-ruby) with the [`sass
|
|
21
21
|
- [`sassc-rails`](https://github.com/sass/sassc-rails)
|
22
22
|
- [`sprockets`](https://github.com/rails/sprockets)
|
23
23
|
- [`sprockets-rails`](https://github.com/rails/sprockets-rails)
|
24
|
-
- [`sassc`](https://github.com/sass/sassc-ruby) [
|
24
|
+
- [`sassc`](https://github.com/sass/sassc-ruby) [has reached end-of-life](https://github.com/sass/sassc-ruby/blob/HEAD/README.md#sassc-has-reached-end-of-life).
|
25
25
|
- [`sass`](https://github.com/sass/ruby-sass) [has reached end-of-life](https://sass-lang.com/blog/ruby-sass-is-unsupported/).
|
26
26
|
|
27
27
|
## Install
|
data/lib/sassc/embedded.rb
CHANGED
@@ -139,8 +139,6 @@ module SassC
|
|
139
139
|
remove_method(:setup) if public_method_defined?(:setup, false)
|
140
140
|
|
141
141
|
def setup(_native_options, functions: Script::Functions)
|
142
|
-
@callbacks = {}
|
143
|
-
|
144
142
|
functions_wrapper = Class.new do
|
145
143
|
attr_accessor :options
|
146
144
|
|
@@ -148,7 +146,7 @@ module SassC
|
|
148
146
|
end.new
|
149
147
|
functions_wrapper.options = @options
|
150
148
|
|
151
|
-
Script.custom_functions(functions:).
|
149
|
+
Script.custom_functions(functions:).each_with_object({}) do |custom_function, callbacks|
|
152
150
|
callback = lambda do |native_argument_list|
|
153
151
|
function_arguments = arguments_from_native_list(native_argument_list)
|
154
152
|
begin
|
@@ -162,10 +160,8 @@ module SassC
|
|
162
160
|
raise e
|
163
161
|
end
|
164
162
|
|
165
|
-
|
163
|
+
callbacks[Script.formatted_function_name(custom_function, functions:)] = callback
|
166
164
|
end
|
167
|
-
|
168
|
-
@callbacks
|
169
165
|
end
|
170
166
|
|
171
167
|
private
|
@@ -456,10 +452,6 @@ module SassC
|
|
456
452
|
end
|
457
453
|
|
458
454
|
module ValueConversion
|
459
|
-
COLOR4 = Sass::Value::Color.method_defined?(:space)
|
460
|
-
|
461
|
-
private_constant :COLOR4
|
462
|
-
|
463
455
|
class << self
|
464
456
|
remove_method(:from_native) if public_method_defined?(:from_native, false)
|
465
457
|
end
|
@@ -471,37 +463,21 @@ module SassC
|
|
471
463
|
when ::Sass::Value::Boolean
|
472
464
|
::SassC::Script::Value::Bool.new(value.to_bool)
|
473
465
|
when ::Sass::Value::Color
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
value = value.to_space('hsl')
|
478
|
-
::SassC::Script::Value::Color.new(
|
479
|
-
hue: value.channel('hue'),
|
480
|
-
saturation: value.channel('saturation'),
|
481
|
-
lightness: value.channel('lightness'),
|
482
|
-
alpha: value.alpha
|
483
|
-
)
|
484
|
-
else
|
485
|
-
value = value.to_space('rgb')
|
486
|
-
::SassC::Script::Value::Color.new(
|
487
|
-
red: value.channel('red'),
|
488
|
-
green: value.channel('green'),
|
489
|
-
blue: value.channel('blue'),
|
490
|
-
alpha: value.alpha
|
491
|
-
)
|
492
|
-
end
|
493
|
-
elsif value.instance_eval { defined? @hue }
|
466
|
+
case value.space
|
467
|
+
when 'hsl', 'hwb'
|
468
|
+
value = value.to_space('hsl')
|
494
469
|
::SassC::Script::Value::Color.new(
|
495
|
-
hue: value.hue,
|
496
|
-
saturation: value.saturation,
|
497
|
-
lightness: value.lightness,
|
470
|
+
hue: value.channel('hue'),
|
471
|
+
saturation: value.channel('saturation'),
|
472
|
+
lightness: value.channel('lightness'),
|
498
473
|
alpha: value.alpha
|
499
474
|
)
|
500
475
|
else
|
476
|
+
value = value.to_space('rgb')
|
501
477
|
::SassC::Script::Value::Color.new(
|
502
|
-
red: value.red,
|
503
|
-
green: value.green,
|
504
|
-
blue: value.blue,
|
478
|
+
red: value.channel('red'),
|
479
|
+
green: value.channel('green'),
|
480
|
+
blue: value.channel('blue'),
|
505
481
|
alpha: value.alpha
|
506
482
|
)
|
507
483
|
end
|
@@ -520,7 +496,7 @@ module SassC
|
|
520
496
|
)
|
521
497
|
when ::Sass::Value::Map
|
522
498
|
::SassC::Script::Value::Map.new(
|
523
|
-
value.contents.
|
499
|
+
value.contents.each_with_object({}) { |(k, v), h| h[from_native(k, options)] = from_native(v, options) }
|
524
500
|
)
|
525
501
|
when ::Sass::Value::Number
|
526
502
|
::SassC::Script::Value::Number.new(
|
@@ -551,19 +527,19 @@ module SassC
|
|
551
527
|
when ::SassC::Script::Value::Color
|
552
528
|
if value.rgba?
|
553
529
|
::Sass::Value::Color.new(
|
554
|
-
**(COLOR4 ? { space: 'rgb' } : {}),
|
555
530
|
red: value.red,
|
556
531
|
green: value.green,
|
557
532
|
blue: value.blue,
|
558
|
-
alpha: value.alpha
|
533
|
+
alpha: value.alpha,
|
534
|
+
space: 'rgb'
|
559
535
|
)
|
560
536
|
elsif value.hlsa?
|
561
537
|
::Sass::Value::Color.new(
|
562
|
-
**(COLOR4 ? { space: 'hsl' } : {}),
|
563
538
|
hue: value.hue,
|
564
539
|
saturation: value.saturation,
|
565
540
|
lightness: value.lightness,
|
566
|
-
alpha: value.alpha
|
541
|
+
alpha: value.alpha,
|
542
|
+
space: 'hsl'
|
567
543
|
)
|
568
544
|
else
|
569
545
|
raise UnsupportedValue, "Sass color mode #{value.instance_eval { @mode }} unsupported"
|
@@ -583,7 +559,7 @@ module SassC
|
|
583
559
|
)
|
584
560
|
when ::SassC::Script::Value::Map
|
585
561
|
::Sass::Value::Map.new(
|
586
|
-
value.value.
|
562
|
+
value.value.each_with_object({}) { |(k, v), h| h[to_native(k)] = to_native(v) }
|
587
563
|
)
|
588
564
|
when ::SassC::Script::Value::Number
|
589
565
|
::Sass::Value::Number.new(
|
@@ -649,8 +625,8 @@ module SassC
|
|
649
625
|
decode_uri_hash_with_preserve_escaped = if unescaped.nil? || unescaped.empty?
|
650
626
|
decode_uri_hash
|
651
627
|
else
|
652
|
-
decode_uri_hash.
|
653
|
-
[key
|
628
|
+
decode_uri_hash.each_with_object({}) do |(key, value), hash|
|
629
|
+
hash[key] = unescaped.include?(value) ? key : value
|
654
630
|
end.freeze
|
655
631
|
end
|
656
632
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sassc-embedded
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.80.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- なつき
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass-embedded
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.80'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.80'
|
27
27
|
description: An embedded sass shim for SassC.
|
28
28
|
email:
|
29
29
|
- i@ntk.me
|
@@ -79,7 +79,7 @@ licenses:
|
|
79
79
|
metadata:
|
80
80
|
bug_tracker_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/issues
|
81
81
|
documentation_uri: https://rubydoc.info/gems/sassc
|
82
|
-
source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.
|
82
|
+
source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.80.1
|
83
83
|
funding_uri: https://github.com/sponsors/ntkme
|
84
84
|
rubygems_mfa_required: 'true'
|
85
85
|
post_install_message:
|