heartml 1.0.0.beta19 → 1.0.0.beta20

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: 957ffa951b074234c8310ab8991e450c476ebdf1344bca8d5fcecd3a259767c1
4
- data.tar.gz: ce760c7746585d3cb5cf998afff77f22d2712cace268072a0d248032a5768a9d
3
+ metadata.gz: 1382ac06f758628fe3f74bc301cfb29c92b04e084057a9ea7e1c99d7d0b08e96
4
+ data.tar.gz: 7c893b047aa792b84775ed7aece74444baf542a6aa4d0191c6ce6244f04d2e1d
5
5
  SHA512:
6
- metadata.gz: 95fa3aaeff0ae1c429900993c87e198b6cf3b0257f226e8dc74d2dbbefc92c846d4a54ad5346f7bb8d623936d5bcb5b4213479a3bd8f17b5ad10b6fcb10c8328
7
- data.tar.gz: 80c2f33c224e0e840a1911b6ec21c7c72f7d6a24ab27ab36dc27d63906ebf1913469b9ca82b54b370ccc3b815852db600ea1b29c19c975ae665f93735380fbfd
6
+ metadata.gz: 28613cbfa73f9b5c05b8d689b91306512f51a05f81d643fe3deac7066238a3d9375f18f7341553fd617fb482fede618d1425a0b084ab29816b869107f546d9b6
7
+ data.tar.gz: 95aef6e1924bc7c453331e65bf1cbe31c81543cbd071ebe5dbaa90c6b487d7a238089e5d8a2698567d46efdc06637358cabd8560202a0ab9f0b39935e2d17317
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [1.0.0.beta20] - 2025-08-23
6
+
7
+ - Remove support for Rails / ViewComponent
8
+ (due to my personal no-support-for-37signals policy because DHH is a fascist)
9
+
5
10
  ## [1.0.0.beta19] — 2025-03-16
6
11
 
7
12
  - Update to minimum support for ViewComponent 3.21.0 API
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- heartml (1.0.0.beta19)
4
+ heartml (1.0.0.beta20)
5
5
  concurrent-ruby (~> 1.2)
6
6
  nokolexbor (>= 0.4.2)
7
7
 
@@ -50,8 +50,6 @@ GEM
50
50
  racc (~> 1.4)
51
51
  nokogiri (1.16.2-x86_64-linux)
52
52
  racc (~> 1.4)
53
- nokolexbor (0.6.0)
54
- nokolexbor (0.6.0-arm64-darwin)
55
53
  nokolexbor (0.6.0-x86_64-linux)
56
54
  parallel (1.24.0)
57
55
  parser (3.3.0.5)
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Heartml: Ruby Web Components (WIP)
2
2
 
3
- Server-rendered custom elements in Ruby using a SFC (Single-File Component) format loosely based on [HTML Modules](https://github.com/WICG/webcomponents/blob/gh-pages/proposals/html-modules-explainer.md). Logic on the server-side is analogous to client-side logic provided by the [Heartml JavaScript library](https://github.com/heartml/heartml).
3
+ Server-rendered custom elements in Ruby using a SFC (Single-File Component) format loosely based on [HTML Modules](https://github.com/WICG/webcomponents/blob/gh-pages/proposals/html-modules-explainer.md). Logic on the server-side is analogous to client-side logic provided by the [Heartml JavaScript library](https://codeberg.org/heartml/heartml).
4
4
 
5
- Great for pairing with [esbuild-plugin-html-modules](https://github.com/whitefusionhq/esbuild-plugin-html-modules) for a full-stack component rendering pipeline.
5
+ Great for pairing with [esbuild-plugin-html-modules](https://codeberg.org/jaredwhite/esbuild-plugin-html-modules) for a full-stack component rendering pipeline.
6
6
 
7
7
  ## Installation
8
8
 
@@ -26,12 +26,8 @@ To install this gem onto your local machine, run `bin/rake install`. To release
26
26
 
27
27
  ## Contributing
28
28
 
29
- Bug reports and pull requests are welcome on GitHub at https://github.com/heartml/heartml-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/heartml/heartml-ruby/blob/main/CODE_OF_CONDUCT.md).
29
+ Bug reports and pull requests are welcome on Codeberg at https://codeberg.org/heartml/heartml-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://codeberg.org/heartml/heartml-ruby/src/branch/main/CODE_OF_CONDUCT.md).
30
30
 
31
31
  ## License
32
32
 
33
33
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
34
-
35
- ## Code of Conduct
36
-
37
- Everyone interacting in the Heartml project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/heartml/heartml-ruby/blob/main/CODE_OF_CONDUCT.md).
data/heartml.gemspec CHANGED
@@ -9,13 +9,13 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["jared@whitefusion.studio"]
10
10
 
11
11
  spec.summary = "Server-rendered web components"
12
- spec.homepage = "https://github.com/heartml/heartml-ruby#readme"
12
+ spec.homepage = "https://codeberg.org/heartml/heartml-ruby#readme"
13
13
  spec.license = "MIT"
14
14
  spec.required_ruby_version = ">= 3.1"
15
15
 
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
- spec.metadata["source_code_uri"] = "https://github.com/heartml/heartml-ruby"
18
- spec.metadata["changelog_uri"] = "https://github.com/heartml/heartml-ruby/blob/main/CHANGELOG.md"
17
+ spec.metadata["source_code_uri"] = "https://codeberg.org/heartml/heartml-ruby"
18
+ spec.metadata["changelog_uri"] = "https://codeberg.org/heartml/heartml-ruby/src/branch/main/CHANGELOG.md"
19
19
  spec.metadata["rubygems_mfa_required"] = "true"
20
20
 
21
21
  # Specify which files should be added to the gem when it is released.
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Heartml
4
4
  # @return [String]
5
- VERSION = "1.0.0.beta19"
5
+ VERSION = "1.0.0.beta20"
6
6
  end
data/lib/heartml.rb CHANGED
@@ -370,4 +370,3 @@ end
370
370
 
371
371
  require_relative "heartml/template_renderer"
372
372
  require_relative "heartml/bridgetown_renderer" if defined?(Bridgetown)
373
- require_relative "heartml/rails/railtie" if defined?(Rails::Railtie)
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.beta19
4
+ version: 1.0.0.beta20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared White
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-17 00:00:00.000000000 Z
11
+ date: 2025-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -59,19 +59,16 @@ files:
59
59
  - lib/heartml/bridgetown_renderer.rb
60
60
  - lib/heartml/fragment.rb
61
61
  - lib/heartml/query_selection.rb
62
- - lib/heartml/rails/helpers.rb
63
- - lib/heartml/rails/railtie.rb
64
- - lib/heartml/rails/view_component_base.rb
65
62
  - lib/heartml/server_effects.rb
66
63
  - lib/heartml/template_renderer.rb
67
64
  - lib/heartml/version.rb
68
- homepage: https://github.com/heartml/heartml-ruby#readme
65
+ homepage: https://codeberg.org/heartml/heartml-ruby#readme
69
66
  licenses:
70
67
  - MIT
71
68
  metadata:
72
- homepage_uri: https://github.com/heartml/heartml-ruby#readme
73
- source_code_uri: https://github.com/heartml/heartml-ruby
74
- changelog_uri: https://github.com/heartml/heartml-ruby/blob/main/CHANGELOG.md
69
+ homepage_uri: https://codeberg.org/heartml/heartml-ruby#readme
70
+ source_code_uri: https://codeberg.org/heartml/heartml-ruby
71
+ changelog_uri: https://codeberg.org/heartml/heartml-ruby/src/branch/main/CHANGELOG.md
75
72
  rubygems_mfa_required: 'true'
76
73
  post_install_message:
77
74
  rdoc_options: []
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Heartml
4
- module Rails
5
- module Helpers
6
- def render_heartml(&) = Heartml::TemplateRenderer.new(body: capture(&), context: self).().to_html
7
- end
8
- end
9
- end
@@ -1,52 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Heartml
4
- module Rails
5
- class Railtie < ::Rails::Railtie
6
- module ReloadDocsInDevelopment
7
- extend ActiveSupport::Concern
8
-
9
- included do
10
- before_action :reload_docs
11
- end
12
-
13
- def reload_docs
14
- Heartml.registered_elements.each { _1.instance_variable_set(:@doc, nil) }
15
- end
16
- end
17
-
18
- require "heartml/rails/helpers"
19
- ActionView::Helpers.include Heartml::Rails::Helpers
20
-
21
- initializer "heartml.monkypatch_view_component" do |_app|
22
- require "view_component/base"
23
- require "heartml/rails/view_component_base"
24
- ViewComponent::Base.class_eval do
25
- def self.heartml = include Heartml::Rails::ViewComponentBase
26
- end
27
- rescue LoadError
28
- # no ViewComponent to patch
29
- end
30
-
31
- initializer "heartml.reload_docs_in_development" do |_app|
32
- unless ::Rails.env.production?
33
- ActiveSupport.on_load(:action_controller_base) do
34
- include ReloadDocsInDevelopment
35
- end
36
- end
37
- end
38
-
39
- config.to_prepare do
40
- next if ::Rails.env.production?
41
-
42
- components_folder = ::Rails.root.join("app", "components")
43
- unless File.directory?(components_folder)
44
- ::Rails.logger.error "Heartml: missing `app/components' folder, cannot load elements"
45
- next
46
- end
47
-
48
- ::Rails.autoloaders.main.eager_load_dir components_folder
49
- end
50
- end
51
- end
52
- end
@@ -1,43 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Heartml
4
- module Rails
5
- module ViewComponentBase
6
- def self.included(klass)
7
- klass.remove_method :render_template_for
8
- klass.extend ClassMethods
9
- klass.include Heartml
10
- end
11
-
12
- def render_in(view_context, rendering_mode: :string, &block)
13
- self.rendering_mode = rendering_mode
14
- super(view_context, &block)
15
- end
16
-
17
- def render_template_for(*) = call
18
-
19
- # No escaping required for the rendered HTML
20
- def maybe_escape_html(input) = input
21
-
22
- module ClassMethods
23
- def compile(*)
24
- # no-op
25
- end
26
-
27
- def compiled? = true
28
-
29
- def inherited(klass)
30
- super(klass)
31
- klass.identifier = caller_locations(1, 10).reject { |l| l.label == "inherited" }[0].path
32
- klass.virtual_path = klass.identifier.gsub(
33
- %r{(.*#{Regexp.quote(ViewComponent::Base.config.view_component_path)})|(\.rb)}, ""
34
- )
35
- Heartml::ServerEffects.included_extras(klass)
36
- klass.directives.merge! directives
37
- end
38
-
39
- def source_location = identifier
40
- end
41
- end
42
- end
43
- end