vident 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: 1ae2c093011a8047255f21fff2b284520d9be75660af61afc511c85bfdcc9f76
4
- data.tar.gz: 47bbde103e62632fca8a11bb1ddd6321dd8c6c8711d21790a51a3e657e3d6f66
3
+ metadata.gz: afda27d62ee5246fc8fdd81ab6f53720ec58ebbd8ca42099b120f7c388788688
4
+ data.tar.gz: c2ddd4762e650cd0ce63ff01662bb691cb76943c3f538eb490348dd211c98a1a
5
5
  SHA512:
6
- metadata.gz: df35e4be8597d580ad4f50b63f99c1e0a8032fd52c9c06676b6d4db9ee15a781f80d00c5112c87047238361560b5a131e60f11800e07c03f904d1e781fed3312
7
- data.tar.gz: 5794832b1bb4a4abbc532beabdbe9133c3a45b7ef42eca8d11660051466a7b64298af3bcb8c7c90c55381a25bfec0680afe389f319c2b8ffc1602f1fb3f47d16
6
+ metadata.gz: 00fb4a976875313eed41e49f235417a6dd6d5d42a7d0aeed572d62eb3bca61636cbd6cf14c4483f34e95744772375cdcdbc1c9ad889e9c18e8a0dcf9d061b0f8
7
+ data.tar.gz: 995ba08626a953e7212b16d4bea31a18277bf764e327b02498ac0893599a050fcbe9be5c88c71bbff264b5822d9b59d41781dc7f940fa039ffcd9b176bea2159
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
@@ -46,7 +46,8 @@ module Vident
46
46
  self
47
47
  end
48
48
 
49
- def outlets(**outlet_mappings)
49
+ def outlets(positional = nil, **outlet_mappings)
50
+ @outlets.merge!(positional) if positional.is_a?(Hash)
50
51
  @outlets.merge!(outlet_mappings) unless outlet_mappings.empty?
51
52
  self
52
53
  end
@@ -49,7 +49,7 @@ module Vident
49
49
  end
50
50
  end
51
51
  prop :stimulus_actions, _Array(_Union(String, Symbol, Array, Hash, StimulusAction, StimulusActionCollection)), default: -> { [] }
52
- prop :stimulus_targets, _Array(_Union(String, Symbol, Hash, StimulusTarget, StimulusTargetCollection)), default: -> { [] }
52
+ prop :stimulus_targets, _Array(_Union(String, Symbol, Array, Hash, StimulusTarget, StimulusTargetCollection)), default: -> { [] }
53
53
  prop :stimulus_outlets, _Array(_Union(String, Symbol, StimulusOutlet, StimulusOutletCollection)), default: -> { [] }
54
54
  prop :stimulus_outlet_host, _Nilable(Vident::Component) # A component that will host this component as an outlet
55
55
  prop :stimulus_values, _Union(_Hash(Symbol, _Any), StimulusValue, StimulusValueCollection), default: -> { {} } # TODO: instead of _Any, is it _Interface(:to_s)?
@@ -54,7 +54,8 @@ module Vident
54
54
  end
55
55
 
56
56
  def tag_wrap_single_stimulus_attribute(plural, singular)
57
- plural || (singular ? Array.wrap(singular) : nil)
57
+ return plural if plural
58
+ singular.nil? ? nil : [singular]
58
59
  end
59
60
 
60
61
  def generate_tag(tag_name, stimulus_data_attributes, options, &block)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vident
4
- VERSION = "1.0.0.alpha3"
4
+ VERSION = "1.0.0.beta1"
5
5
 
6
6
  # Shared version for all vident gems
7
7
  def self.version
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vident
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
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  - !ruby/object:Gem::Version
134
134
  version: '0'
135
135
  requirements: []
136
- rubygems_version: 3.6.2
136
+ rubygems_version: 4.0.3
137
137
  specification_version: 4
138
138
  summary: Vident is the base of your design system implementation, which provides helpers
139
139
  for working with Stimulus. For component libraries with ViewComponent or Phlex.