hot_module 1.0.0.alpha13 → 1.0.0.alpha14
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/Gemfile.lock +1 -1
- data/lib/hot_module/version.rb +1 -1
- data/lib/hot_module.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c807341a2b68711682e37e62045bae062a490402b33da6d52dfe38ec2472b85
|
4
|
+
data.tar.gz: 06e4b4cafe75ea650c4d57a5b39df40cad4596901294a8853f7a5ff40944b776
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df99852ada0457075b72bd89e8291abe21a94ae2043ea469cca16eeeecf771c46b2d02c16b1fb1d9c6940e1edcdd5590e46fc7849297087222d7e3d44aceb5f3
|
7
|
+
data.tar.gz: ff133ae7e218263f64803c367177583b303091ebc31661e628dca3ffde0bdfa5d83f50e023f36b2a4385e4a69937d980f4ade41d015f57eaee794f9d475efbe1
|
data/Gemfile.lock
CHANGED
data/lib/hot_module/version.rb
CHANGED
data/lib/hot_module.rb
CHANGED
@@ -145,6 +145,10 @@ module HoTModuLe
|
|
145
145
|
def content = @_content
|
146
146
|
end
|
147
147
|
|
148
|
+
def replaced_content=(new_content)
|
149
|
+
@_replaced_content = new_content
|
150
|
+
end
|
151
|
+
|
148
152
|
# Override in component
|
149
153
|
#
|
150
154
|
# @return [Hash]
|
@@ -243,7 +247,7 @@ module HoTModuLe
|
|
243
247
|
style_tag.content = output_styles
|
244
248
|
end
|
245
249
|
|
246
|
-
child_content = @
|
250
|
+
child_content = @_replaced_content || content
|
247
251
|
if self.class.shadow_root
|
248
252
|
# Guess what? We can reuse the same template tag! =)
|
249
253
|
tmpl_el["shadowrootmode"] = "open"
|
@@ -360,7 +364,7 @@ module HoTModuLe
|
|
360
364
|
end
|
361
365
|
|
362
366
|
def _hmod_children_binding(attribute:, node:) # rubocop:disable Lint/UnusedMethodArgument
|
363
|
-
|
367
|
+
self.replaced_content = node.children[0]
|
364
368
|
node.remove
|
365
369
|
end
|
366
370
|
|
@@ -404,6 +408,7 @@ if defined?(Bridgetown)
|
|
404
408
|
end
|
405
409
|
end
|
406
410
|
|
411
|
+
config.html_inspector_parser "nokolexbor"
|
407
412
|
require_relative "hot_module/component_renderer"
|
408
413
|
config.builder HoTModuLe::ComponentRenderer
|
409
414
|
end
|