stimulus_plumbers 0.4.13 → 0.4.14

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: bcaacf74a9d74b9643793766765001210ac63bec6bab991cd5f5bafc74d97961
4
- data.tar.gz: bf28400470cbdd7395dae9f7525654a6a8021e5c7bf46d12b068299156315729
3
+ metadata.gz: edc3d0887794f514d0961ed38f6c9b7728cacb5a23da472b5414a23a2e146fe6
4
+ data.tar.gz: e4c6c6fa5ffe8129bc54e9c671d57f6a9ac77ed2043594042c1ecf2f38291afa
5
5
  SHA512:
6
- metadata.gz: c0cf3b74cde9b848f515015a85abebf533038f47ba1379d37c781b70570367fb44e100bd61c093362372a1aef18eba00e7d4842afeb44cf5624723e8c55a7d70
7
- data.tar.gz: 4f26886745656d790ce0bf1484537ed2dba4340a0b20bb820d21247080707bbcd0eeac596afd78ac606bf240a7a4e567a5278ee8a37e946a35270dda61f724ba
6
+ metadata.gz: d68f9379c8acc7c91c2d5102065f3372923e6052348885ac3ced4b07c7d8700edf21e0ddc63847f0b752fe0335530ac7eb97b590393363998f2ed05857b00016
7
+ data.tar.gz: 690d8715f001e049b8a4cc1bacce7788ef0bc120da8120ec83ecd066acc33e01abaaafd5a92aba0f63f4250ddc42d8066e17d01d86dc73a42ab247ad01dc3e6c
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
4
4
 
5
+ ---
6
+ ## [0.4.13](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-rails/v0.4.12..stimulus-plumbers-rails/v0.4.13) - 2026-07-20
7
+
8
+ ### Bug Fixes
9
+
10
+ - input reveal + conceal ([#185](https://github.com/ryancyq/stimulus-plumbers/issues/185)) - ([3391853](https://github.com/ryancyq/stimulus-plumbers/commit/3391853ff5739a77ab5ab8207dc020aee6c6228a)) - Ryan Chang
11
+ - icon accept name as positional required arg ([#187](https://github.com/ryancyq/stimulus-plumbers/issues/187)) - ([5466dee](https://github.com/ryancyq/stimulus-plumbers/commit/5466dee603c534e992f12b823774e90dc4e3c3d7)) - Ryan Chang
12
+
13
+ ### Features
14
+
15
+ - input revealable ([#188](https://github.com/ryancyq/stimulus-plumbers/issues/188)) - ([7aab4f3](https://github.com/ryancyq/stimulus-plumbers/commit/7aab4f369e7e69eddb6b20a6b68327199f87c1e7)) - Ryan Chang
16
+
5
17
  ---
6
18
  ## [0.4.12](https://github.com/ryancyq/stimulus-plumbers/compare/stimulus-plumbers-rails/v0.4.11..stimulus-plumbers-rails/v0.4.12) - 2026-07-19
7
19
 
@@ -31,7 +31,7 @@ module StimulusPlumbers
31
31
 
32
32
  result = svg_defaults(key)
33
33
  root.attributes.each_attribute do |attr|
34
- result[SVG_RENAME.fetch(attr.name, attr.name.to_sym)] = attr.value
34
+ result[SVG_RENAME.fetch(attr.name, attr.name.tr("-", "_").to_sym)] = attr.value
35
35
  end
36
36
 
37
37
  elements = parse_elements(root)
@@ -57,10 +57,21 @@ module StimulusPlumbers
57
57
  private
58
58
 
59
59
  def resolve_svg_attrs(svg_data)
60
- SVG_ATTR_DEFAULTS
61
- .merge(svg_data.slice(*SVG_ATTR_DEFAULTS.keys))
62
- .transform_keys { |key| SVG_ATTR_NAMES.fetch(key, key.to_s) }
63
- .transform_values(&:to_s)
60
+ SVG_ATTR_DEFAULTS.merge(svg_data).filter_map do |key, value|
61
+ next unless svg_attr_allowed?(key)
62
+
63
+ [svg_attr_name(key), value.to_s]
64
+ end.to_h
65
+ end
66
+
67
+ def svg_attr_allowed?(key)
68
+ SVG_ATTR_DEFAULTS.key?(key) || data_or_aria_attr?(key)
69
+ end
70
+
71
+ def svg_attr_name(key)
72
+ return key.to_s.tr("_", "-") if data_or_aria_attr?(key)
73
+
74
+ SVG_ATTR_NAMES.fetch(key, key.to_s)
64
75
  end
65
76
 
66
77
  def resolve_element_attrs(element_data)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StimulusPlumbers
4
- VERSION = "0.4.13"
4
+ VERSION = "0.4.14"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimulus_plumbers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.13
4
+ version: 0.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Chang