sassc-embedded 1.80.2 → 1.80.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0e7b2482c18b9bbea2af1e42f87862cff2e9cc0d9e4a61f99c65f8458b797f8
4
- data.tar.gz: 8cfde4eb9be815f5bfbc10f355161e27715ae7984a72e17dfc9273473a8f7aa9
3
+ metadata.gz: 5f741c19a9ca2fcad66b3676ff3a896416156d71dbe63bd0b3dd79d3cae95958
4
+ data.tar.gz: c99c349e440e3dc31a11b2bdff13d3b625b6427d63f2c5d6723d7f4070a69e48
5
5
  SHA512:
6
- metadata.gz: 2e6cfb2011d7f364f560aaa2642b5bf841a8bfe75d492c9a84f949e0777a75636111605992f85b1740449b090af6e2c5fbdcf86660c9a542d2e249be0f7c3c47
7
- data.tar.gz: 4eaca6abeff9935ae2f0ccd1d82761bc9ebafcbd8849c8963c8e5c3c367c72085caa758f356fd3071ce50c460805f113fda886dd95ac953a00e12166ef9c9854
6
+ metadata.gz: 4c91a95b1b283ad54e7d5bbf31b11b669567665a3be86c03584a9da88ce3e2001dbd128dc877418e6ff1c27eb5f4eb48a0e6be05e3c0f04cc1eabea434e6312c
7
+ data.tar.gz: 77b06e407927c31ac8a35b80b33a96dd2c6469ede73ddb928893cc2671738813a73a3b14817ecc0207db8a7390b1e9ea7253f4787d03b18010ef6810d767005f
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SassC
4
4
  module Embedded
5
- VERSION = '1.80.2'
5
+ VERSION = '1.80.4'
6
6
  end
7
7
  end
@@ -41,17 +41,17 @@ module SassC
41
41
  @loaded_urls = result.loaded_urls
42
42
  @source_map = result.source_map
43
43
 
44
- css = result.css
45
- css += "\n" unless css.empty?
44
+ css = result.css.encode(@template.encoding)
45
+ css << "\n" unless css.empty?
46
46
  unless @source_map.nil? || omit_source_map_url?
47
47
  source_mapping_url = if source_map_embed?
48
48
  "data:application/json;base64,#{[@source_map].pack('m0')}"
49
49
  else
50
50
  Uri.file_urls_to_relative_url(source_map_file_url, file_url)
51
51
  end
52
- css += "\n/*# sourceMappingURL=#{source_mapping_url} */"
52
+ css << "\n/*# sourceMappingURL=#{source_mapping_url} */"
53
53
  end
54
- css.encode(@template.encoding)
54
+ css
55
55
  rescue ::Sass::CompileError => e
56
56
  @loaded_urls = e.loaded_urls
57
57
 
@@ -87,7 +87,7 @@ module SassC
87
87
  end
88
88
  end
89
89
 
90
- JSON.generate(data)
90
+ JSON.fast_generate(data).encode!(@template.encoding)
91
91
  end
92
92
 
93
93
  private
@@ -106,23 +106,19 @@ module SassC
106
106
  remove_method(:output_style) if private_method_defined?(:output_style, false)
107
107
 
108
108
  def output_style
109
- @output_style ||= begin
110
- style = @options.fetch(:style, :sass_style_nested).to_s.delete_prefix('sass_style_').to_sym
111
-
112
- case style
113
- when :nested, :compact, :expanded
114
- :expanded
115
- when :compressed
116
- :compressed
117
- else
118
- raise InvalidStyleError
119
- end
120
- end
109
+ @output_style ||= case @options.fetch(:style, :nested).to_sym
110
+ when :nested, :expanded, :compact, :sass_style_nested, :sass_style_expanded, :sass_style_compact
111
+ :expanded
112
+ when :compressed, :sass_style_compressed
113
+ :compressed
114
+ else
115
+ raise InvalidStyleError
116
+ end
121
117
  end
122
118
 
123
119
  def syntax
124
- syntax = @options.fetch(:syntax, :scss)
125
- syntax = :indented if syntax.to_sym == :sass
120
+ syntax = @options.fetch(:syntax, :scss).to_sym
121
+ syntax = :indented if syntax == :sass
126
122
  syntax
127
123
  end
128
124
 
@@ -171,6 +167,12 @@ module SassC
171
167
  Script::ValueConversion.from_native(native_value, @options)
172
168
  end
173
169
  end
170
+
171
+ remove_method(:to_native_value) if private_method_defined?(:to_native_value, false)
172
+
173
+ def to_native_value(sass_value)
174
+ Script::ValueConversion.to_native(sass_value)
175
+ end
174
176
  end
175
177
 
176
178
  module NoopImporter
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sassc-embedded
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.80.2
4
+ version: 1.80.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-20 00:00:00.000000000 Z
10
+ date: 2025-02-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: sass-embedded
@@ -78,7 +78,7 @@ licenses:
78
78
  metadata:
79
79
  bug_tracker_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/issues
80
80
  documentation_uri: https://rubydoc.info/gems/sassc
81
- source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.80.2
81
+ source_code_uri: https://github.com/sass-contrib/sassc-embedded-shim-ruby/tree/v1.80.4
82
82
  funding_uri: https://github.com/sponsors/ntkme
83
83
  rubygems_mfa_required: 'true'
84
84
  rdoc_options: []
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  requirements: []
99
- rubygems_version: 3.6.2
99
+ rubygems_version: 3.6.5
100
100
  specification_version: 4
101
101
  summary: Use dart-sass with SassC!
102
102
  test_files: []