heartml 1.0.0.beta15 → 1.0.0.beta16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfdbab85b95fcabeed28ad97e9c66dfd4c5b7e03985d2dfdfc698f2cefab63b5
4
- data.tar.gz: 5fd6e1c77155f8c85627e286ccdc1a51051d5eb20649052e1347d0149a2afe82
3
+ metadata.gz: 33b3883d286639fd0120ce59444d69f5a69a77fff208d5fcc057338210bcde4d
4
+ data.tar.gz: a385e62cf6d4232ba5ede351c4a0c6e885bd7260ea35afff78ee35eaf7449fee
5
5
  SHA512:
6
- metadata.gz: 43758f1af356507a355f11c86e922435aa6dba79cb4c66a31d9c859078341db66453d2b8fde12e596ddf094c705f741c49628cfa96f5d96b98cb53da7420003e
7
- data.tar.gz: 2e6c7abd7bba65f0aac17f248eee93cbd2ca7ac3a41f25440e638dc603f043cd6f4ae99e5d01a6e5eb7442b2289b8b92495619b4d4253cbc17efa9054a0cd706
6
+ metadata.gz: 4da9a2ac04771a7f7024caf8f2db678f6459a54f7090513a2a00402e6ec65626ed61a90abdf314219ace4a310d6d87eaafb65f97a6c1994b0fdf5861897bb051
7
+ data.tar.gz: d19f2e2285950719c5456087e6eff9f27577da175257ec8ec58cecd0188ee57690934d0e3f06c2156f1dc5e4828857284d0fdf0b0ab051c2af9441c89cbc6de0
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.0.0.beta16] — 2024-10-26
6
+
7
+ - Fix rendering logic in Bridgetown 2.0 beta
8
+
5
9
  ## [1.0.0.beta15] — 2024-04-11
6
10
 
7
11
  - Fix Fast Refresh crash in Bridgetown 2.0 alpha
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- heartml (1.0.0.beta15)
4
+ heartml (1.0.0.beta16)
5
5
  concurrent-ruby (~> 1.2)
6
6
  nokolexbor (>= 0.4.2)
7
7
 
@@ -2,6 +2,12 @@
2
2
 
3
3
  module Heartml
4
4
  class BridgetownRenderer < Bridgetown::Builder
5
+ # Called when a `Bridgetown::Component` includes `Heartml`, so we can bypass Bridgetown's
6
+ # normal component template handling
7
+ def self.component_overrides(klass)
8
+ klass.define_method(:template) { call }
9
+ end
10
+
5
11
  def build
6
12
  render_heart_modules
7
13
  end
@@ -18,9 +24,6 @@ module Heartml
18
24
  end
19
25
 
20
26
  Bridgetown.initializer :heartml do |config|
21
- # TODO: maybe we can ditch this once we're off ActiveSupport in Bridgetown
22
- Bridgetown::Component.extend ActiveSupport::DescendantsTracker
23
-
24
27
  Heartml.module_eval do
25
28
  def render_in(view_context, rendering_mode: :string, &block)
26
29
  self.rendering_mode = rendering_mode
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Heartml
4
4
  # @return [String]
5
- VERSION = "1.0.0.beta15"
5
+ VERSION = "1.0.0.beta16"
6
6
  end
data/lib/heartml.rb CHANGED
@@ -66,6 +66,10 @@ module Heartml
66
66
  klass.include ContentMethod unless has_content_method
67
67
 
68
68
  ServerEffects.included_extras(klass)
69
+
70
+ return unless defined?(Bridgetown) && klass < Bridgetown::Component
71
+
72
+ BridgetownRenderer.component_overrides(klass)
69
73
  end
70
74
 
71
75
  # Extends the component class
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heartml
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta15
4
+ version: 1.0.0.beta16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared White
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-12 00:00:00.000000000 Z
11
+ date: 2024-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby