vident 0.13.1 → 0.14.1

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: f9cc9ab1bcd4e801000879947dbace331a03606d6fc778069cf4aebf20f49e50
4
- data.tar.gz: 0465df3f823e1ac86ec011e1afc9595042c9c5e5131b63aa6b6aa265a5b577a0
3
+ metadata.gz: 3e6343a4c8fe0649f5a225af8c2e04286c62bf028eb08a2551ebea16277079e9
4
+ data.tar.gz: a34ac9f41c3e3d0170e0a61d9ce8bab70cba396aba733f34327fb38cfae878de
5
5
  SHA512:
6
- metadata.gz: 4efd1e00166a77864d8c2d9c5ece265fbe45f0201c8df4a90e9aa83ae5a93e539022ec83dd387ae6dbbe559a5f2fe365cbbb41a173e3eb7abbdca30b2842316d
7
- data.tar.gz: 88ed4a27a6d8056fa3bb329d82fb03c90b8d9538732f0967a1b430561d101275d90c39a4ae64d851d74baebc9ed5bbd4e788fdff56efe9396e6a7fa548653cab
6
+ metadata.gz: d42bfa75ffb48fea91ac3932b0a55907747586172d37a1848c4018ed4477c1091a1eef2fd0abe2b111d95c79a10accb7738d560115b9b8f801c47918a2d77719
7
+ data.tar.gz: 6e19345c2a9702d02c3a62fbc627a2829ccc06beee98c9a79afff4a300fd048eefe1a2cd1bc857a5846da06fd5bf9d11c8d517a613cabe1f3e70098d2980b62a
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ 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
+ ## [0.14.0] - 2025-09-17
9
+
10
+ ## Breaking
11
+
12
+ Drop support for `better_html`
8
13
 
9
14
  ## [0.13.0] - 2024-04-07
10
15
 
data/README.md CHANGED
@@ -19,7 +19,6 @@ And then optional extra features:
19
19
  - `vident-typed-minitest`: Minitest integration for typed Vident components
20
20
  - `vident-typed-phlex`: Phlex integration for typed Vident components
21
21
  - `vident-typed-view_component`: ViewComponent integration for typed Vident
22
- - `vident-better_html`: Better HTML integration for Vident
23
22
 
24
23
  ## Directory Structure
25
24
 
@@ -30,12 +29,6 @@ vident/
30
29
  ├── lib/ # All gem code
31
30
  │ ├── vident.rb # Core entry point
32
31
  │ ├── vident-phlex.rb # Gem entry points
33
- │ ├── vident-better_html.rb
34
- │ ├── vident/ # Shared code
35
- │ ├── base.rb
36
- │ ├── phlex/ # Phlex integration
37
- │ ├── better_html/ # Better HTML integration
38
- │ └── ...
39
32
  ├── test/ # All tests
40
33
  │ ├── vident/ # Core tests
41
34
  │ ├── vident-phlex/ # Tests for each gem
@@ -652,52 +645,6 @@ Or install it yourself as:
652
645
  $ gem install vident-view_component
653
646
  ```
654
647
 
655
- ---
656
-
657
- ## gem: vident-better_html
658
-
659
- # Vident::BetterHtml
660
- Short description and motivation.
661
-
662
- ### Usage
663
- How to use my plugin.
664
-
665
- ```ruby
666
- BetterHtml.config = BetterHtml::Config.new(YAML.load(File.read(".better-html.yml")))
667
-
668
- BetterHtml.configure do |config|
669
- config.template_exclusion_filter = proc { |filename| !filename.start_with?(Rails.root.to_s) }
670
- end
671
- # ViewComponent needs to do this hack to work in certain cases
672
- # see https://github.com/Shopify/better-html/pull/98
673
- class BetterHtml::HtmlAttributes
674
- alias_method :to_s_without_html_safe, :to_s
675
-
676
- def to_s
677
- to_s_without_html_safe.html_safe
678
- end
679
- end
680
- ```
681
-
682
- ### Installation
683
- Add this line to your application's Gemfile:
684
-
685
- ```ruby
686
- gem "vident-better_html"
687
- ```
688
-
689
- And then execute:
690
- ```bash
691
- $ bundle
692
- ```
693
-
694
- Or install it yourself as:
695
- ```bash
696
- $ gem install vident-better_html
697
- ```
698
-
699
- ---
700
-
701
648
  ## gem: vident-phlex
702
649
 
703
650
  # Vident::Phlex
@@ -34,6 +34,19 @@ module Vident
34
34
 
35
35
  # The view component's helpers for setting stimulus data-* attributes on this component.
36
36
 
37
+ def controller_attribute(*controllers_to_set)
38
+ {"data-controller" => controller_list(controllers_to_set)&.html_safe}
39
+ end
40
+
41
+ def target_attributes(*targets)
42
+ attrs = build_target_data_attributes(parse_targets(targets))
43
+ attrs.transform_keys { |dt| "data-#{dt}" }
44
+ end
45
+
46
+ def action_attribute(*actions_to_set)
47
+ {"data-action" => parse_actions(actions_to_set).join(" ").html_safe}
48
+ end
49
+
37
50
  # TODO: rename
38
51
  # Create a Stimulus action string, and returns it
39
52
  # examples:
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vident
4
- VERSION = "0.13.1"
4
+ VERSION = "0.14.1"
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: 0.13.1
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Ierodiaconou
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-06-26 00:00:00.000000000 Z
10
+ date: 2025-09-17 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: railties