vident-view_component 1.0.0.alpha4 → 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 +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/vident/view_component/base.rb +7 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: caea762919f63b3d6c4ccd5b87ad7d1028879cf35ddc58acd4df21abd123325a
|
|
4
|
+
data.tar.gz: f2c5b9681d8541b8839c89a4c3a3dcc8f9245e1edc5fb4e80e914bc3cd2ac393
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 920132a691a7299f5afc4d921ece1921a26831dcfad6d3a0b6dd89d44e8e47dc5b94395e2078ea01ef010835f21011fa3055adba1a27ce4b96d3408c5e11fa4d
|
|
7
|
+
data.tar.gz: 840bdfb10c3a1c3720b2ae08ac822c8c397b859cd7b69027d55109a918ce018cccb8b929128cb54fac63d35b99fed120b20a61036677b1e534acb06921d97210
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,16 @@ 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
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
|
+
|
|
9
19
|
## [1.0.0.alpha4] - 2025-12-12
|
|
10
20
|
|
|
11
21
|
- Update to `view_component` 4
|
|
@@ -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
|
-
|
|
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.
|
|
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:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: railties
|
|
@@ -55,14 +55,14 @@ dependencies:
|
|
|
55
55
|
requirements:
|
|
56
56
|
- - "~>"
|
|
57
57
|
- !ruby/object:Gem::Version
|
|
58
|
-
version: 1.0.0.
|
|
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.
|
|
65
|
+
version: 1.0.0.beta1
|
|
66
66
|
- !ruby/object:Gem::Dependency
|
|
67
67
|
name: view_component
|
|
68
68
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
118
118
|
- !ruby/object:Gem::Version
|
|
119
119
|
version: '0'
|
|
120
120
|
requirements: []
|
|
121
|
-
rubygems_version:
|
|
121
|
+
rubygems_version: 4.0.3
|
|
122
122
|
specification_version: 4
|
|
123
123
|
summary: Vident with ViewComponent
|
|
124
124
|
test_files: []
|