sass-embedded 0.15.0 → 0.16.0

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: 8b1ad905f18295ab48835d21b1e6a9c644a860154b37531eeaae2f50f16f70e9
4
- data.tar.gz: 229fe63046318d8ce512683d11e3868e8c70d6b28897badeb74be7757ff63e7e
3
+ metadata.gz: 74339d550d532d1edc9ecb2cb8894a514c5519c71af3eb4a6e3066f09c3d02e4
4
+ data.tar.gz: b93e64c9e33a7a684a4cb4767e2bdd62b2a81f0dd636483d31b174ba16c0a088
5
5
  SHA512:
6
- metadata.gz: 20bc3d260f0ac7bd9473351b7f59a08ccd1de7720afc56c027c83025924b7c986335994a4b257344e8c8435c11b5248de2d1dd512cf5e499d85eeddd1166f260
7
- data.tar.gz: 5cd706afea71314dc85b47d58f3d4cb9f7ecc82a0a1ed72fc8afc5f772bd98022a8026b62eb490b7c2d9c74c1045d7edb945736078e5195f8c93f858d3f6cc7f
6
+ metadata.gz: a0aaddbc0bf954095bfa061e270eaa86e37409935ae180d1c13e97e3034eb89a913cce63f57c3d0dff2076ba17d03bd4516b058b809c702f31fc08fd40d6780c
7
+ data.tar.gz: 8a2317cbc80f5f6040e8d341e1f0eee67448547d2dd47b32e94caa5d869cfafc0a0b903e52b63a44f3bbec84178e072424a8a938dc0f568c42d3bffb1ee107ad
@@ -1,9 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'logger/source_span'
4
-
5
3
  module Sass
6
- # The {CompileError} raised by {Embedded#compile} or {Embedded#compile_string}.
4
+ # An exception thrown because a Sass compilation failed.
7
5
  class CompileError < StandardError
8
6
  attr_accessor :sass_message, :sass_stack, :span
9
7
 
@@ -13,12 +11,5 @@ module Sass
13
11
  @sass_stack = sass_stack
14
12
  @span = span
15
13
  end
16
-
17
- def self.from_proto(compile_failure)
18
- CompileError.new(compile_failure.formatted,
19
- compile_failure.message,
20
- compile_failure.stack_trace,
21
- Logger::SourceSpan.from_proto(compile_failure.span))
22
- end
23
14
  end
24
15
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sass
4
- # The {CompileResult} of {Embedded#compile} or {Embedded#compile_string}.
4
+ # The result of compiling Sass to CSS. Returned by {Sass.compile} and {Sass.compile_string}.
5
5
  class CompileResult
6
6
  attr_reader :css, :source_map, :loaded_urls
7
7
 
@@ -10,9 +10,5 @@ module Sass
10
10
  @source_map = source_map == '' ? nil : source_map
11
11
  @loaded_urls = loaded_urls
12
12
  end
13
-
14
- def self.from_proto(compile_success)
15
- CompileResult.new(compile_success.css, compile_success.source_map, compile_success.loaded_urls)
16
- end
17
13
  end
18
14
  end
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'compiler'
4
-
5
3
  module Sass
6
4
  class Embedded
7
5
  # The {Channel} for {Compiler} calls. Each instance creates its own
@@ -58,5 +56,7 @@ module Sass
58
56
 
59
57
  private_constant :Subscription
60
58
  end
59
+
60
+ private_constant :Channel
61
61
  end
62
62
  end
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sass
4
+ class Embedded
5
+ class CompileContext
6
+ # The {FunctionRegistry} for {CompileContext}.
7
+ class FunctionRegistry
8
+ attr_reader :global_functions
9
+
10
+ def initialize(functions)
11
+ @global_functions = functions.keys
12
+ @functions_by_name = functions.transform_keys do |signature|
13
+ signature = signature.chomp
14
+ index = signature.index('(')
15
+ if index
16
+ signature.slice(0, index)
17
+ else
18
+ signature
19
+ end
20
+ end
21
+ @functions_by_id = {}
22
+ @ids_by_function = {}
23
+ @id = 0
24
+ end
25
+
26
+ def register(function)
27
+ return if @ids_by_function.key?(function)
28
+
29
+ id = @id
30
+ @id = @id.next
31
+
32
+ @ids_by_function[function] = id
33
+ @functions_by_id[id] = function
34
+
35
+ id
36
+ end
37
+
38
+ def function_call(function_call_request)
39
+ arguments = function_call_request.arguments.map do |argument|
40
+ protofier.from_proto_value(argument)
41
+ end
42
+
43
+ success = protofier.to_proto_value(get(function_call_request).call(arguments))
44
+ accessed_argument_lists = arguments
45
+ .filter do |argument|
46
+ argument.is_a?(Sass::Value::ArgumentList) && argument.instance_eval do
47
+ @keywords_accessed
48
+ end
49
+ end
50
+ .map { |argument| argument.instance_eval { @id } }
51
+
52
+ EmbeddedProtocol::InboundMessage::FunctionCallResponse.new(
53
+ id: function_call_request.id,
54
+ success: success,
55
+ accessed_argument_lists: accessed_argument_lists
56
+ )
57
+ rescue StandardError => e
58
+ EmbeddedProtocol::InboundMessage::FunctionCallResponse.new(
59
+ id: function_call_request.id,
60
+ error: e.message
61
+ )
62
+ end
63
+
64
+ private
65
+
66
+ def get(function_call_request)
67
+ case function_call_request.identifier
68
+ when :name
69
+ @functions_by_name[function_call_request.name]
70
+ when :function_id
71
+ @functions_by_id[function_call_request.function_id]
72
+ end
73
+ end
74
+
75
+ def protofier
76
+ @protofier ||= Protofier.new(self)
77
+ end
78
+ end
79
+
80
+ private_constant :FunctionRegistry
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,97 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sass
4
+ class Embedded
5
+ class CompileContext
6
+ # The {ImporterRegistry} for {CompileContext}.
7
+ class ImporterRegistry
8
+ attr_reader :importers
9
+
10
+ def initialize(importers, load_paths)
11
+ @id = 0
12
+ @importers_by_id = {}
13
+ @importers = importers
14
+ .map { |importer| register(importer) }
15
+ .concat(load_paths.map do |load_path|
16
+ EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
17
+ path: File.absolute_path(load_path)
18
+ )
19
+ end)
20
+ end
21
+
22
+ def register(importer)
23
+ is_importer = importer.respond_to?(:canonicalize) && importer.respond_to?(:load)
24
+ is_file_importer = importer.respond_to?(:find_file_url)
25
+
26
+ raise ArgumentError, 'importer must be an Importer or a FileImporter' if is_importer == is_file_importer
27
+
28
+ proto = if is_importer
29
+ EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
30
+ importer_id: @id
31
+ )
32
+ else
33
+ EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
34
+ file_importer_id: @id
35
+ )
36
+ end
37
+ @importers_by_id[@id] = importer
38
+ @id = @id.next
39
+ proto
40
+ end
41
+
42
+ def canonicalize(canonicalize_request)
43
+ importer = @importers_by_id[canonicalize_request.importer_id]
44
+ url = importer.canonicalize(canonicalize_request.url, from_import: canonicalize_request.from_import)&.to_s
45
+
46
+ EmbeddedProtocol::InboundMessage::CanonicalizeResponse.new(
47
+ id: canonicalize_request.id,
48
+ url: url
49
+ )
50
+ rescue StandardError => e
51
+ EmbeddedProtocol::InboundMessage::CanonicalizeResponse.new(
52
+ id: canonicalize_request.id,
53
+ error: e.message
54
+ )
55
+ end
56
+
57
+ def import(import_request)
58
+ importer = @importers_by_id[import_request.importer_id]
59
+ importer_result = Protofier.to_struct importer.load(import_request.url)
60
+
61
+ EmbeddedProtocol::InboundMessage::ImportResponse.new(
62
+ id: import_request.id,
63
+ success: EmbeddedProtocol::InboundMessage::ImportResponse::ImportSuccess.new(
64
+ contents: importer_result.contents,
65
+ syntax: Protofier.to_proto_syntax(importer_result.syntax),
66
+ source_map_url: importer_result.respond_to?(:source_map_url) ? importer_result.source_map_url&.to_s : nil
67
+ )
68
+ )
69
+ rescue StandardError => e
70
+ EmbeddedProtocol::InboundMessage::ImportResponse.new(
71
+ id: import_request.id,
72
+ error: e.message
73
+ )
74
+ end
75
+
76
+ def file_import(file_import_request)
77
+ importer = @importers_by_id[file_import_request.importer_id]
78
+ file_url = importer.find_file_url(file_import_request.url, from_import: file_import_request.from_import)&.to_s
79
+
80
+ raise "file_url must be a file: URL, was \"#{file_url}\"" if !file_url.nil? && !file_url.start_with?('file:')
81
+
82
+ EmbeddedProtocol::InboundMessage::FileImportResponse.new(
83
+ id: file_import_request.id,
84
+ file_url: file_url
85
+ )
86
+ rescue StandardError => e
87
+ EmbeddedProtocol::InboundMessage::FileImportResponse.new(
88
+ id: file_import_request.id,
89
+ error: e.message
90
+ )
91
+ end
92
+ end
93
+
94
+ private_constant :ImporterRegistry
95
+ end
96
+ end
97
+ end
@@ -1,9 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../embedded_protocol'
4
- require_relative '../logger/source_span'
5
- require_relative 'observer'
6
-
7
3
  module Sass
8
4
  class Embedded
9
5
  # The {Observer} for {Embedded#compile}.
@@ -34,7 +30,6 @@ module Sass
34
30
  @path = path
35
31
  @source = source
36
32
 
37
- @importer = to_struct(importer)
38
33
  @load_paths = load_paths
39
34
  @syntax = syntax
40
35
  @url = url
@@ -43,19 +38,16 @@ module Sass
43
38
  @source_map_include_sources = source_map_include_sources
44
39
  @style = style
45
40
 
46
- @global_functions = functions.keys.map(&:to_s)
47
-
48
- @functions = functions.transform_keys do |key|
49
- key.to_s.split('(')[0].chomp
50
- end
51
- @importers = importers.map do |obj|
52
- to_struct(obj)
53
- end
41
+ @function_registery = FunctionRegistry.new(functions.transform_keys(&:to_s))
42
+ @importer_registery = ImporterRegistry.new(importers.map do |obj|
43
+ Protofier.to_struct(obj)
44
+ end, load_paths)
45
+ @importer = importer.nil? ? nil : @importer_registery.register(Protofier.to_struct(importer))
54
46
 
55
47
  @alert_ascii = alert_ascii
56
48
  @alert_color = alert_color
57
49
 
58
- @logger = to_struct(logger)
50
+ @logger = Protofier.to_struct(logger)
59
51
 
60
52
  @quiet_deps = quiet_deps
61
53
  @verbose = verbose
@@ -83,25 +75,25 @@ module Sass
83
75
  return unless message.compilation_id == id
84
76
 
85
77
  Thread.new do
86
- send_message canonicalize_response message
78
+ send_message @importer_registery.canonicalize message
87
79
  end
88
80
  when EmbeddedProtocol::OutboundMessage::ImportRequest
89
81
  return unless message.compilation_id == id
90
82
 
91
83
  Thread.new do
92
- send_message import_response message
84
+ send_message @importer_registery.import message
93
85
  end
94
86
  when EmbeddedProtocol::OutboundMessage::FileImportRequest
95
87
  return unless message.compilation_id == id
96
88
 
97
89
  Thread.new do
98
- send_message file_import_response message
90
+ send_message @importer_registery.file_import message
99
91
  end
100
92
  when EmbeddedProtocol::OutboundMessage::FunctionCallRequest
101
93
  return unless message.compilation_id == id
102
94
 
103
95
  Thread.new do
104
- send_message function_call_response message
96
+ send_message @function_registery.function_call message
105
97
  end
106
98
  end
107
99
  rescue StandardError => e
@@ -116,14 +108,14 @@ module Sass
116
108
  case event.type
117
109
  when :DEBUG
118
110
  if @logger.respond_to? :debug
119
- @logger.debug(event.message, span: Logger::SourceSpan.from_proto(event.span))
111
+ @logger.debug(event.message, span: Protofier.from_proto_source_span(event.span))
120
112
  else
121
113
  Kernel.warn(event.formatted)
122
114
  end
123
115
  when :DEPRECATION_WARNING
124
116
  if @logger.respond_to? :warn
125
117
  @logger.warn(event.message, deprecation: true,
126
- span: Logger::SourceSpan.from_proto(event.span),
118
+ span: Protofier.from_proto_source_span(event.span),
127
119
  stack: event.stack_trace)
128
120
  else
129
121
  Kernel.warn(event.formatted)
@@ -131,7 +123,7 @@ module Sass
131
123
  when :WARNING
132
124
  if @logger.respond_to? :warn
133
125
  @logger.warn(event.message, deprecation: false,
134
- span: Logger::SourceSpan.from_proto(event.span),
126
+ span: Protofier.from_proto_source_span(event.span),
135
127
  stack: event.stack_trace)
136
128
  else
137
129
  Kernel.warn(event.formatted)
@@ -146,167 +138,22 @@ module Sass
146
138
  EmbeddedProtocol::InboundMessage::CompileRequest::StringInput.new(
147
139
  source: @source,
148
140
  url: @url&.to_s,
149
- syntax: to_proto_syntax(@syntax),
150
- importer: @importer.nil? ? nil : to_proto_importer(@importer, @importers.length)
141
+ syntax: Protofier.to_proto_syntax(@syntax),
142
+ importer: @importer
151
143
  )
152
144
  end,
153
145
  path: @path,
154
- style: to_proto_output_style(@style),
146
+ style: Protofier.to_proto_output_style(@style),
155
147
  source_map: @source_map,
156
148
  source_map_include_sources: @source_map_include_sources,
157
- importers: to_proto_importers(@importers, @load_paths),
158
- global_functions: @global_functions,
149
+ importers: @importer_registery.importers,
150
+ global_functions: @function_registery.global_functions,
159
151
  alert_ascii: @alert_ascii,
160
152
  alert_color: @alert_color
161
153
  )
162
154
  end
163
-
164
- def canonicalize_response(canonicalize_request)
165
- importer = importer_of_id canonicalize_request.importer_id
166
- url = importer.canonicalize(canonicalize_request.url, from_import: canonicalize_request.from_import)&.to_s
167
-
168
- EmbeddedProtocol::InboundMessage::CanonicalizeResponse.new(
169
- id: canonicalize_request.id,
170
- url: url
171
- )
172
- rescue StandardError => e
173
- EmbeddedProtocol::InboundMessage::CanonicalizeResponse.new(
174
- id: canonicalize_request.id,
175
- error: e.message
176
- )
177
- end
178
-
179
- def import_response(import_request)
180
- importer = importer_of_id import_request.importer_id
181
- importer_result = to_struct importer.load(import_request.url)
182
-
183
- EmbeddedProtocol::InboundMessage::ImportResponse.new(
184
- id: import_request.id,
185
- success: EmbeddedProtocol::InboundMessage::ImportResponse::ImportSuccess.new(
186
- contents: importer_result.contents,
187
- syntax: to_proto_syntax(importer_result.syntax),
188
- source_map_url: importer_result.respond_to?(:source_map_url) ? importer_result.source_map_url&.to_s : nil
189
- )
190
- )
191
- rescue StandardError => e
192
- EmbeddedProtocol::InboundMessage::ImportResponse.new(
193
- id: import_request.id,
194
- error: e.message
195
- )
196
- end
197
-
198
- def file_import_response(file_import_request)
199
- importer = importer_of_id file_import_request.importer_id
200
- file_url = importer.find_file_url(file_import_request.url, from_import: file_import_request.from_import)&.to_s
201
-
202
- raise "file_url must be a file: URL, was \"#{file_url}\"" if !file_url.nil? && !file_url.start_with?('file:')
203
-
204
- EmbeddedProtocol::InboundMessage::FileImportResponse.new(
205
- id: file_import_request.id,
206
- file_url: file_url
207
- )
208
- rescue StandardError => e
209
- EmbeddedProtocol::InboundMessage::FileImportResponse.new(
210
- id: file_import_request.id,
211
- error: e.message
212
- )
213
- end
214
-
215
- def function_call_response(function_call_request)
216
- EmbeddedProtocol::InboundMessage::FunctionCallResponse.new(
217
- id: function_call_request.id,
218
- success: @functions[function_call_request.name].call(*function_call_request.arguments),
219
- accessed_argument_lists: function_call_request.arguments
220
- .filter { |argument| argument.value == :argument_list }
221
- .map { |argument| argument.argument_list.id }
222
- )
223
- rescue StandardError => e
224
- EmbeddedProtocol::InboundMessage::FunctionCallResponse.new(
225
- id: function_call_request.id,
226
- error: e.message
227
- )
228
- end
229
-
230
- def to_proto_syntax(syntax)
231
- case syntax&.to_sym
232
- when :scss
233
- EmbeddedProtocol::Syntax::SCSS
234
- when :indented
235
- EmbeddedProtocol::Syntax::INDENTED
236
- when :css
237
- EmbeddedProtocol::Syntax::CSS
238
- else
239
- raise ArgumentError, 'syntax must be one of :scss, :indented, :css'
240
- end
241
- end
242
-
243
- def to_proto_output_style(style)
244
- case style&.to_sym
245
- when :expanded
246
- EmbeddedProtocol::OutputStyle::EXPANDED
247
- when :compressed
248
- EmbeddedProtocol::OutputStyle::COMPRESSED
249
- else
250
- raise ArgumentError, 'style must be one of :expanded, :compressed'
251
- end
252
- end
253
-
254
- def to_proto_importer(importer, id)
255
- is_importer = importer.respond_to?(:canonicalize) && importer.respond_to?(:load)
256
- is_file_importer = importer.respond_to?(:find_file_url)
257
-
258
- if is_importer && !is_file_importer
259
- EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
260
- importer_id: id
261
- )
262
- elsif is_file_importer && !is_importer
263
- EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
264
- file_importer_id: id
265
- )
266
- else
267
- raise ArgumentError, 'importer must be an Importer or a FileImporter'
268
- end
269
- end
270
-
271
- def to_proto_importers(importers, load_paths)
272
- proto_importers = importers.map.with_index do |importer, id|
273
- to_proto_importer(importer, id)
274
- end
275
-
276
- load_paths.each do |load_path|
277
- proto_importers << EmbeddedProtocol::InboundMessage::CompileRequest::Importer.new(
278
- path: File.absolute_path(load_path)
279
- )
280
- end
281
-
282
- proto_importers
283
- end
284
-
285
- def importer_of_id(id)
286
- if id == @importers.length
287
- @importer
288
- else
289
- @importers[id]
290
- end
291
- end
292
-
293
- def to_struct(obj)
294
- return obj unless obj.is_a? Hash
295
-
296
- struct = Object.new
297
- obj.each do |key, value|
298
- if value.respond_to? :call
299
- struct.define_singleton_method key.to_sym do |*args, **kwargs|
300
- value.call(*args, **kwargs)
301
- end
302
- else
303
- struct.define_singleton_method key.to_sym do
304
- value
305
- end
306
- end
307
- end
308
- struct
309
- end
310
155
  end
156
+
157
+ private_constant :CompileContext
311
158
  end
312
159
  end
@@ -3,7 +3,7 @@
3
3
  module Sass
4
4
  class Embedded
5
5
  class Compiler
6
- REQUIREMENTS = '~> 1.49.7'
6
+ REQUIREMENTS = '~> 1.49.8'
7
7
  end
8
8
  end
9
9
  end
@@ -2,9 +2,6 @@
2
2
 
3
3
  require 'observer'
4
4
  require 'open3'
5
- require_relative '../embedded_protocol'
6
- require_relative 'compiler/path'
7
- require_relative 'protocol_error'
8
5
 
9
6
  module Sass
10
7
  class Embedded
@@ -14,14 +11,7 @@ module Sass
14
11
  class Compiler
15
12
  include Observable
16
13
 
17
- ONEOF_MESSAGE = EmbeddedProtocol::InboundMessage
18
- .descriptor
19
- .lookup_oneof('message')
20
- .to_h do |field_descriptor|
21
- [field_descriptor.subtype, field_descriptor.name]
22
- end
23
-
24
- private_constant :ONEOF_MESSAGE
14
+ PROTOCOL_ERROR_ID = 4_294_967_295
25
15
 
26
16
  def initialize
27
17
  @observerable_mutex = Mutex.new
@@ -35,7 +25,7 @@ module Sass
35
25
  warn(@stderr.readline, uplevel: 1)
36
26
  end
37
27
  poll do
38
- receive_proto read
28
+ receive_message Protofier.from_proto_message read
39
29
  end
40
30
  end
41
31
 
@@ -60,9 +50,7 @@ module Sass
60
50
  end
61
51
 
62
52
  def send_message(message)
63
- write EmbeddedProtocol::InboundMessage.new(
64
- ONEOF_MESSAGE[message.class.descriptor] => message
65
- ).to_proto
53
+ write Protofier.to_proto_message message
66
54
  end
67
55
 
68
56
  def close
@@ -86,7 +74,7 @@ module Sass
86
74
  private
87
75
 
88
76
  def half_closed?
89
- @id == EmbeddedProtocol::PROTOCOL_ERROR_ID
77
+ @id == PROTOCOL_ERROR_ID
90
78
  end
91
79
 
92
80
  def poll
@@ -108,9 +96,7 @@ module Sass
108
96
  end
109
97
  end
110
98
 
111
- def receive_proto(proto)
112
- payload = EmbeddedProtocol::OutboundMessage.decode(proto)
113
- message = payload[payload.message.to_s]
99
+ def receive_message(message)
114
100
  case message
115
101
  when EmbeddedProtocol::ProtocolError
116
102
  raise ProtocolError, message.message
@@ -152,5 +138,7 @@ module Sass
152
138
  writeable.write bytes.pack('C*')
153
139
  end
154
140
  end
141
+
142
+ private_constant :Compiler
155
143
  end
156
144
  end
@@ -5,7 +5,48 @@ require 'json'
5
5
  require 'pathname'
6
6
  require 'uri'
7
7
 
8
+ # The Sass module.
9
+ #
10
+ # This communicates with Embedded Dart Sass using the Embedded Sass protocol.
8
11
  module Sass
12
+ class << self
13
+ # @deprecated
14
+ # The global {.include_paths} for Sass files. This is meant for plugins and
15
+ # libraries to register the paths to their Sass stylesheets to that they may
16
+ # be included via `@import` or `@use`. This include path is used by every
17
+ # instance of {Sass::Embedded}. They are lower-precedence than any include
18
+ # paths passed in via the `include_paths` option.
19
+ #
20
+ # If the `SASS_PATH` environment variable is set,
21
+ # the initial value of `include_paths` will be initialized based on that.
22
+ # The variable should be a colon-separated list of path names
23
+ # (semicolon-separated on Windows).
24
+ #
25
+ # @example
26
+ # Sass.include_paths << File.dirname(__FILE__) + '/sass'
27
+ # @return [Array]
28
+ def include_paths
29
+ Embedded.include_paths
30
+ end
31
+
32
+ # @deprecated
33
+ # The global {.render} method. This instantiates a global {Embedded} instance
34
+ # and calls {Embedded#render}.
35
+ #
36
+ # See {Embedded#render} for supported options.
37
+ #
38
+ # @example
39
+ # Sass.render(data: 'h1 { font-size: 40px; }')
40
+ # @example
41
+ # Sass.render(file: 'style.css')
42
+ # @return [Result]
43
+ # @raise [ProtocolError]
44
+ # @raise [RenderError]
45
+ def render(**kwargs)
46
+ instance.render(**kwargs)
47
+ end
48
+ end
49
+
9
50
  # The {Embedded} host for using dart-sass-embedded. Each instance creates
10
51
  # its own {Channel}.
11
52
  #
@@ -43,5 +43,7 @@ module Sass
43
43
  @subscription.send_message(*args)
44
44
  end
45
45
  end
46
+
47
+ private_constant :Observer
46
48
  end
47
49
  end