sassc-embedded 1.77.8 → 1.80.2
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/README.md +1 -1
- data/lib/sassc/embedded/version.rb +1 -1
- data/lib/sassc/embedded.rb +21 -22
- metadata +6 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a0e7b2482c18b9bbea2af1e42f87862cff2e9cc0d9e4a61f99c65f8458b797f8
|
|
4
|
+
data.tar.gz: 8cfde4eb9be815f5bfbc10f355161e27715ae7984a72e17dfc9273473a8f7aa9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e6cfb2011d7f364f560aaa2642b5bf841a8bfe75d492c9a84f949e0777a75636111605992f85b1740449b090af6e2c5fbdcf86660c9a542d2e249be0f7c3c47
|
|
7
|
+
data.tar.gz: 4eaca6abeff9935ae2f0ccd1d82761bc9ebafcbd8849c8963c8e5c3c367c72085caa758f356fd3071ce50c460805f113fda886dd95ac953a00e12166ef9c9854
|
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
|
@@ -13,8 +13,6 @@ module SassC
|
|
|
13
13
|
remove_method(:render) if public_method_defined?(:render, false)
|
|
14
14
|
|
|
15
15
|
def render
|
|
16
|
-
return @template.dup if @template.empty?
|
|
17
|
-
|
|
18
16
|
result = ::Sass.compile_string(
|
|
19
17
|
@template,
|
|
20
18
|
importer: (NoopImporter unless @options[:importer].nil?),
|
|
@@ -53,7 +51,7 @@ module SassC
|
|
|
53
51
|
end
|
|
54
52
|
css += "\n/*# sourceMappingURL=#{source_mapping_url} */"
|
|
55
53
|
end
|
|
56
|
-
css
|
|
54
|
+
css.encode(@template.encoding)
|
|
57
55
|
rescue ::Sass::CompileError => e
|
|
58
56
|
@loaded_urls = e.loaded_urls
|
|
59
57
|
|
|
@@ -139,8 +137,6 @@ module SassC
|
|
|
139
137
|
remove_method(:setup) if public_method_defined?(:setup, false)
|
|
140
138
|
|
|
141
139
|
def setup(_native_options, functions: Script::Functions)
|
|
142
|
-
@callbacks = {}
|
|
143
|
-
|
|
144
140
|
functions_wrapper = Class.new do
|
|
145
141
|
attr_accessor :options
|
|
146
142
|
|
|
@@ -148,7 +144,7 @@ module SassC
|
|
|
148
144
|
end.new
|
|
149
145
|
functions_wrapper.options = @options
|
|
150
146
|
|
|
151
|
-
Script.custom_functions(functions:).
|
|
147
|
+
Script.custom_functions(functions:).each_with_object({}) do |custom_function, callbacks|
|
|
152
148
|
callback = lambda do |native_argument_list|
|
|
153
149
|
function_arguments = arguments_from_native_list(native_argument_list)
|
|
154
150
|
begin
|
|
@@ -162,10 +158,8 @@ module SassC
|
|
|
162
158
|
raise e
|
|
163
159
|
end
|
|
164
160
|
|
|
165
|
-
|
|
161
|
+
callbacks[Script.formatted_function_name(custom_function, functions:)] = callback
|
|
166
162
|
end
|
|
167
|
-
|
|
168
|
-
@callbacks
|
|
169
163
|
end
|
|
170
164
|
|
|
171
165
|
private
|
|
@@ -467,18 +461,21 @@ module SassC
|
|
|
467
461
|
when ::Sass::Value::Boolean
|
|
468
462
|
::SassC::Script::Value::Bool.new(value.to_bool)
|
|
469
463
|
when ::Sass::Value::Color
|
|
470
|
-
|
|
464
|
+
case value.space
|
|
465
|
+
when 'hsl', 'hwb'
|
|
466
|
+
value = value.to_space('hsl')
|
|
471
467
|
::SassC::Script::Value::Color.new(
|
|
472
|
-
hue: value.hue,
|
|
473
|
-
saturation: value.saturation,
|
|
474
|
-
lightness: value.lightness,
|
|
468
|
+
hue: value.channel('hue'),
|
|
469
|
+
saturation: value.channel('saturation'),
|
|
470
|
+
lightness: value.channel('lightness'),
|
|
475
471
|
alpha: value.alpha
|
|
476
472
|
)
|
|
477
473
|
else
|
|
474
|
+
value = value.to_space('rgb')
|
|
478
475
|
::SassC::Script::Value::Color.new(
|
|
479
|
-
red: value.red,
|
|
480
|
-
green: value.green,
|
|
481
|
-
blue: value.blue,
|
|
476
|
+
red: value.channel('red'),
|
|
477
|
+
green: value.channel('green'),
|
|
478
|
+
blue: value.channel('blue'),
|
|
482
479
|
alpha: value.alpha
|
|
483
480
|
)
|
|
484
481
|
end
|
|
@@ -497,7 +494,7 @@ module SassC
|
|
|
497
494
|
)
|
|
498
495
|
when ::Sass::Value::Map
|
|
499
496
|
::SassC::Script::Value::Map.new(
|
|
500
|
-
value.contents.
|
|
497
|
+
value.contents.each_with_object({}) { |(k, v), h| h[from_native(k, options)] = from_native(v, options) }
|
|
501
498
|
)
|
|
502
499
|
when ::Sass::Value::Number
|
|
503
500
|
::SassC::Script::Value::Number.new(
|
|
@@ -531,14 +528,16 @@ module SassC
|
|
|
531
528
|
red: value.red,
|
|
532
529
|
green: value.green,
|
|
533
530
|
blue: value.blue,
|
|
534
|
-
alpha: value.alpha
|
|
531
|
+
alpha: value.alpha,
|
|
532
|
+
space: 'rgb'
|
|
535
533
|
)
|
|
536
534
|
elsif value.hlsa?
|
|
537
535
|
::Sass::Value::Color.new(
|
|
538
536
|
hue: value.hue,
|
|
539
537
|
saturation: value.saturation,
|
|
540
538
|
lightness: value.lightness,
|
|
541
|
-
alpha: value.alpha
|
|
539
|
+
alpha: value.alpha,
|
|
540
|
+
space: 'hsl'
|
|
542
541
|
)
|
|
543
542
|
else
|
|
544
543
|
raise UnsupportedValue, "Sass color mode #{value.instance_eval { @mode }} unsupported"
|
|
@@ -558,7 +557,7 @@ module SassC
|
|
|
558
557
|
)
|
|
559
558
|
when ::SassC::Script::Value::Map
|
|
560
559
|
::Sass::Value::Map.new(
|
|
561
|
-
value.value.
|
|
560
|
+
value.value.each_with_object({}) { |(k, v), h| h[to_native(k)] = to_native(v) }
|
|
562
561
|
)
|
|
563
562
|
when ::SassC::Script::Value::Number
|
|
564
563
|
::Sass::Value::Number.new(
|
|
@@ -624,8 +623,8 @@ module SassC
|
|
|
624
623
|
decode_uri_hash_with_preserve_escaped = if unescaped.nil? || unescaped.empty?
|
|
625
624
|
decode_uri_hash
|
|
626
625
|
else
|
|
627
|
-
decode_uri_hash.
|
|
628
|
-
[key
|
|
626
|
+
decode_uri_hash.each_with_object({}) do |(key, value), hash|
|
|
627
|
+
hash[key] = unescaped.include?(value) ? key : value
|
|
629
628
|
end.freeze
|
|
630
629
|
end
|
|
631
630
|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
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.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- なつき
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 2025-01-20 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: sass-embedded
|
|
@@ -16,14 +15,14 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1.
|
|
18
|
+
version: '1.80'
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - "~>"
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '1.
|
|
25
|
+
version: '1.80'
|
|
27
26
|
description: An embedded sass shim for SassC.
|
|
28
27
|
email:
|
|
29
28
|
- i@ntk.me
|
|
@@ -79,10 +78,9 @@ licenses:
|
|
|
79
78
|
metadata:
|
|
80
79
|
bug_tracker_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/issues
|
|
81
80
|
documentation_uri: https://rubydoc.info/gems/sassc
|
|
82
|
-
source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.
|
|
81
|
+
source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.80.2
|
|
83
82
|
funding_uri: https://github.com/sponsors/ntkme
|
|
84
83
|
rubygems_mfa_required: 'true'
|
|
85
|
-
post_install_message:
|
|
86
84
|
rdoc_options: []
|
|
87
85
|
require_paths:
|
|
88
86
|
- lib
|
|
@@ -98,8 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
98
96
|
- !ruby/object:Gem::Version
|
|
99
97
|
version: '0'
|
|
100
98
|
requirements: []
|
|
101
|
-
rubygems_version: 3.
|
|
102
|
-
signing_key:
|
|
99
|
+
rubygems_version: 3.6.2
|
|
103
100
|
specification_version: 4
|
|
104
101
|
summary: Use dart-sass with SassC!
|
|
105
102
|
test_files: []
|