vident-view_component 1.0.0.alpha3 → 1.0.0.beta1

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: 6008f5d78b7230589329a8b2a634767a2f54defd2fc9e3358548b3b641ef99b7
4
- data.tar.gz: 7456a6c1f34c58cfce0477b623a12025e12665739f8f338687643cf5bea2b578
3
+ metadata.gz: caea762919f63b3d6c4ccd5b87ad7d1028879cf35ddc58acd4df21abd123325a
4
+ data.tar.gz: f2c5b9681d8541b8839c89a4c3a3dcc8f9245e1edc5fb4e80e914bc3cd2ac393
5
5
  SHA512:
6
- metadata.gz: c289ba2437da177d898f6bce6f7275495153aca16b8ada22c57ea046a32f8341b858f0099224b698c6e4607a2ed735991c5992ee3cab75c1ed173eb4cbc89752
7
- data.tar.gz: fa6d53c82825e7a9be5f000265310521b803543b974a5784082438d3bd44b6b3162e512ff12147ab1646859f99759b9c6a0c4038d7c8f859f575d41546b7810a
6
+ metadata.gz: 920132a691a7299f5afc4d921ece1921a26831dcfad6d3a0b6dd89d44e8e47dc5b94395e2078ea01ef010835f21011fa3055adba1a27ce4b96d3408c5e11fa4d
7
+ data.tar.gz: 840bdfb10c3a1c3720b2ae08ac822c8c397b859cd7b69027d55109a918ce018cccb8b929128cb54fac63d35b99fed120b20a61036677b1e534acb06921d97210
data/CHANGELOG.md CHANGED
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
+
9
+ ## [1.0.0.beta1] - 2026-04-16
10
+
11
+ ### Fixed
12
+
13
+ - `tag(...)` singular stimulus kwargs (e.g. `stimulus_action: [:click, :foo]`) no longer splat `[event, handler]` tuples into two bare handlers (#19).
14
+ - `vident-view_component`'s `tag(...)` now emits void elements (`:input`, `:img`, `:br`, etc.) without a closing tag (#19).
15
+ - `vident-view_component`'s `tag(...)` without a block no longer renders the options hash as element content (#19).
16
+ - `stimulus_targets:` prop now accepts `Array` entries (e.g. `[[controller_path, :name]]`), matching `stimulus_actions:` (#20).
17
+ - `stimulus do ... outlets(...)` DSL now accepts a positional `Hash`, allowing string keys (e.g. stimulus identifiers containing `--`) that cannot be Ruby kwarg keys (#21).
18
+
19
+ ## [1.0.0.alpha4] - 2025-12-12
20
+
21
+ - Update to `view_component` 4
22
+
8
23
  ## [1.0.0.alpha3] - 2025-07-21
9
24
 
10
25
  ### Breaking
data/README.md CHANGED
@@ -71,7 +71,7 @@ class ButtonComponent < Vident::ViewComponent::Base
71
71
  # Define typed properties
72
72
  prop :text, String, default: "Click me"
73
73
  prop :url, _Nilable(String)
74
- prop :style, Symbol, in: [:primary, :secondary], default: :primary
74
+ prop :style, _Union(:primary, :secondary), default: :primary
75
75
  prop :clicked_count, Integer, default: 0
76
76
 
77
77
  # Configure Stimulus integration
@@ -105,7 +105,13 @@ module Vident
105
105
  def generate_tag(tag_name, stimulus_data_attributes, options, &block)
106
106
  options[:data] ||= {}
107
107
  options[:data].merge!(stimulus_data_attributes)
108
- view_context.content_tag(tag_name, options, &block)
108
+ if SELF_CLOSING_TAGS.include?(tag_name.to_sym)
109
+ view_context.tag(tag_name, options)
110
+ elsif block
111
+ view_context.content_tag(tag_name, view_context.capture(&block), options)
112
+ else
113
+ view_context.content_tag(tag_name, nil, options)
114
+ end
109
115
  end
110
116
 
111
117
  def escape_attribute_name_for_html(name)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vident-view_component
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha3
4
+ version: 1.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Ierodiaconou
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-07-21 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: railties
@@ -55,28 +55,34 @@ dependencies:
55
55
  requirements:
56
56
  - - "~>"
57
57
  - !ruby/object:Gem::Version
58
- version: 1.0.0.alpha3
58
+ version: 1.0.0.beta1
59
59
  type: :runtime
60
60
  prerelease: false
61
61
  version_requirements: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - "~>"
64
64
  - !ruby/object:Gem::Version
65
- version: 1.0.0.alpha3
65
+ version: 1.0.0.beta1
66
66
  - !ruby/object:Gem::Dependency
67
67
  name: view_component
68
68
  requirement: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - '='
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '4.0'
73
+ - - "<"
71
74
  - !ruby/object:Gem::Version
72
- version: 4.0.0.rc2
75
+ version: '5'
73
76
  type: :runtime
74
77
  prerelease: false
75
78
  version_requirements: !ruby/object:Gem::Requirement
76
79
  requirements:
77
- - - '='
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '4.0'
83
+ - - "<"
78
84
  - !ruby/object:Gem::Version
79
- version: 4.0.0.rc2
85
+ version: '5'
80
86
  description: Vident with ViewComponent
81
87
  email:
82
88
  - stevegeek@gmail.com
@@ -112,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
118
  - !ruby/object:Gem::Version
113
119
  version: '0'
114
120
  requirements: []
115
- rubygems_version: 3.6.2
121
+ rubygems_version: 4.0.3
116
122
  specification_version: 4
117
123
  summary: Vident with ViewComponent
118
124
  test_files: []