vident-phlex 0.13.0 → 0.13.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: 7d2eb7fd9d6cba8eb697bc9130549cad5d556319d4a6508028acd427cc201e00
4
- data.tar.gz: 579a7b1f85faa6b7b454250597af08c94c98bd4bee60d175cd519da73fe341cd
3
+ metadata.gz: 4dc779e8e9af309227688c4b2d575c316105d1aa20f1b42fdf2eb2ee475fda53
4
+ data.tar.gz: 1efba9e7cb073dd4524e4af42e18a59017fd9b798287ce23d8e7f6a0c17906fb
5
5
  SHA512:
6
- metadata.gz: cc7d27b86eb3aa73eb473de3a8c3e3f1f71320decf095e1d32db52e94bbbe07b5116e9a7db56b2a658e15408d8398e01d5c30fe9a5516eb0c891bccfdebde5b6
7
- data.tar.gz: cc9ec485603603263de00081bccddf52f1770e200dc7434b7ed4eabb70cbf1383bf10e5a2fd2b732b6fd109755a17112e9272788a0442f73bc2d6e72c75d1c46
6
+ metadata.gz: c168c00d8b8e82e74bfabdae026641059a11bc7e92b3726388cca6bcf0356f24a5426e1f095e5d71941e89f1a794a81732e91aa321bf0298593a73a9bbd0dedf
7
+ data.tar.gz: d8adcea13c91ba2d185515df917ce10a2833a1fb1ab32237e073eb01aabc52732ad496ae31015637ff0fb2a18fc6bdf1a7fb4d4330572fe906b1ca4d7bb4fd33
data/CHANGELOG.md CHANGED
@@ -6,7 +6,13 @@ 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
- ## [Unreleased]
9
+ ## [0.13.0] - 2024-04-07
10
+
11
+ ### Breaking
12
+
13
+ - `data_maps` has been renamed to `values` and support has been added for the Stimulus 2+ Values API.
14
+ - `root`/`parent_element` no longer takes options, to define attributes for it, you can use `root_element_attributes` or the view component helper `root_component_attributes`. This change means
15
+ that root elements can be instantiated outside of `render` which is useful if you refer to the instance in the components body block
10
16
 
11
17
  ### Added
12
18
 
data/README.md CHANGED
@@ -4,16 +4,22 @@ Vident is a collection of gems that provide a set of tools for building web appl
4
4
 
5
5
  ## Included Gems
6
6
 
7
+ The core gems:
8
+
7
9
  - `vident`: The core Vident library
8
- - `vident-better_html`: Better HTML integration for Vident
9
10
  - `vident-phlex`: Phlex integration for Vident
11
+ - `vident-view_component`: ViewComponent integration for Vident
12
+
13
+ Note that you can use both `Phlex` and `ViewComponent` in the same application if desired.
14
+
15
+ And then optional extra features:
16
+
10
17
  - `vident-tailwind`: Tailwind CSS integration for Vident
11
18
  - `vident-typed`: Type system for Vident components
12
19
  - `vident-typed-minitest`: Minitest integration for typed Vident components
13
20
  - `vident-typed-phlex`: Phlex integration for typed Vident components
14
21
  - `vident-typed-view_component`: ViewComponent integration for typed Vident
15
- - `vident-view_component`: ViewComponent integration for Vident
16
- - `vident-view_component-caching`: Caching support for Vident ViewComponents
22
+ - `vident-better_html`: Better HTML integration for Vident
17
23
 
18
24
  ## Directory Structure
19
25
 
@@ -98,172 +104,6 @@ The gems are available as open source under the terms of the [MIT License](LICEN
98
104
 
99
105
  # Component Documentation
100
106
 
101
- ## gem: vident-better_html
102
-
103
- # Vident::BetterHtml
104
- Short description and motivation.
105
-
106
- ### Usage
107
- How to use my plugin.
108
-
109
- ```ruby
110
- BetterHtml.config = BetterHtml::Config.new(YAML.load(File.read(".better-html.yml")))
111
-
112
- BetterHtml.configure do |config|
113
- config.template_exclusion_filter = proc { |filename| !filename.start_with?(Rails.root.to_s) }
114
- end
115
- # ViewComponent needs to do this hack to work in certain cases
116
- # see https://github.com/Shopify/better-html/pull/98
117
- class BetterHtml::HtmlAttributes
118
- alias_method :to_s_without_html_safe, :to_s
119
-
120
- def to_s
121
- to_s_without_html_safe.html_safe
122
- end
123
- end
124
- ```
125
-
126
- ### Installation
127
- Add this line to your application's Gemfile:
128
-
129
- ```ruby
130
- gem "vident-better_html"
131
- ```
132
-
133
- And then execute:
134
- ```bash
135
- $ bundle
136
- ```
137
-
138
- Or install it yourself as:
139
- ```bash
140
- $ gem install vident-better_html
141
- ```
142
-
143
- ---
144
-
145
- ## gem: vident-phlex
146
-
147
- # Vident::Phlex
148
-
149
- [Phlex](https://phlex.fun/) powered [Vident](https://github.com/stevegeek/vident) components.
150
-
151
- ```ruby
152
- class ApplicationComponent < ::Vident::Phlex::HTML
153
- end
154
- ```
155
-
156
- For more details see [vident](https://github.com/stevegeek/vident).
157
-
158
- ### Usage
159
- How to use my plugin.
160
-
161
- ### Installation
162
- Add this line to your application's Gemfile:
163
-
164
- ```ruby
165
- gem "vident-phlex"
166
- ```
167
-
168
- And then execute:
169
- ```bash
170
- $ bundle
171
- ```
172
-
173
- Or install it yourself as:
174
- ```bash
175
- $ gem install vident-phlex
176
- ```
177
-
178
- ---
179
-
180
- ## gem: vident-tailwind
181
-
182
- # Vident::Tailwind
183
- Short description and motivation.
184
-
185
- ### Usage
186
- How to use my plugin.
187
-
188
- ### Installation
189
- Add this line to your application's Gemfile:
190
-
191
- ```ruby
192
- gem "vident-tailwind"
193
- ```
194
-
195
- And then execute:
196
- ```bash
197
- $ bundle
198
- ```
199
-
200
- Or install it yourself as:
201
- ```bash
202
- $ gem install vident-tailwind
203
- ```
204
-
205
- ---
206
-
207
- ## gem: vident-typed-minitest
208
-
209
- # Vident::Typed::Minitest
210
- Short description and motivation.
211
-
212
- ### Usage
213
- How to use my plugin.
214
-
215
- ### Installation
216
- Add this line to your application's Gemfile:
217
-
218
- ```ruby
219
- gem "vident-typed-minitest"
220
- ```
221
-
222
- And then execute:
223
- ```bash
224
- $ bundle
225
- ```
226
-
227
- Or install it yourself as:
228
- ```bash
229
- $ gem install vident-typed-minitest
230
- ```
231
-
232
- ---
233
-
234
- ## gem: vident-typed-phlex
235
-
236
- # Vident::Typed::Phlex
237
-
238
- Adds typed attributes to Vident Phlex based components.
239
-
240
- ```ruby
241
- class ApplicationComponent < ::Vident::Typed::Phlex::HTML
242
- end
243
- ```
244
-
245
- For more details see [vident](https://github.com/stevegeek/vident).
246
-
247
- ### Usage
248
- How to use my plugin.
249
-
250
- ### Installation
251
- Add this line to your application's Gemfile:
252
-
253
- ```ruby
254
- gem "vident-typed-phlex"
255
- ```
256
-
257
- And then execute:
258
- ```bash
259
- $ bundle
260
- ```
261
-
262
- Or install it yourself as:
263
- ```bash
264
- $ gem install vident-typed-phlex
265
- ```
266
-
267
107
  ---
268
108
 
269
109
  ## gem: vident-typed-view_component
@@ -643,59 +483,6 @@ $ gem install vident-typed-view_component
643
483
 
644
484
  ---
645
485
 
646
- ## gem: vident-typed
647
-
648
- # Vident::Typed
649
- Short description and motivation.
650
-
651
- ### Usage
652
- How to use my plugin.
653
-
654
- ### Installation
655
- Add this line to your application's Gemfile:
656
-
657
- ```ruby
658
- gem "vident-typed"
659
- ```
660
-
661
- And then execute:
662
- ```bash
663
- $ bundle
664
- ```
665
-
666
- Or install it yourself as:
667
- ```bash
668
- $ gem install vident-typed
669
- ```
670
-
671
- ---
672
-
673
- ## gem: vident-view_component-caching
674
-
675
- # Vident::ViewComponent::Caching
676
- Short description and motivation.
677
-
678
- ### Usage
679
- How to use my plugin.
680
-
681
- ### Installation
682
- Add this line to your application's Gemfile:
683
-
684
- ```ruby
685
- gem "vident-view_component-caching"
686
- ```
687
-
688
- And then execute:
689
- ```bash
690
- $ bundle
691
- ```
692
-
693
- Or install it yourself as:
694
- ```bash
695
- $ gem install vident-view_component-caching
696
- ```
697
-
698
- ---
699
486
 
700
487
  ## gem: vident-view_component
701
488
 
@@ -863,4 +650,202 @@ $ bundle
863
650
  Or install it yourself as:
864
651
  ```bash
865
652
  $ gem install vident-view_component
866
- ```
653
+ ```
654
+
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
+ ## gem: vident-phlex
702
+
703
+ # Vident::Phlex
704
+
705
+ [Phlex](https://phlex.fun/) powered [Vident](https://github.com/stevegeek/vident) components.
706
+
707
+ ```ruby
708
+ class ApplicationComponent < ::Vident::Phlex::HTML
709
+ end
710
+ ```
711
+
712
+ For more details see [vident](https://github.com/stevegeek/vident).
713
+
714
+ ### Usage
715
+ How to use my plugin.
716
+
717
+ ### Installation
718
+ Add this line to your application's Gemfile:
719
+
720
+ ```ruby
721
+ gem "vident-phlex"
722
+ ```
723
+
724
+ And then execute:
725
+ ```bash
726
+ $ bundle
727
+ ```
728
+
729
+ Or install it yourself as:
730
+ ```bash
731
+ $ gem install vident-phlex
732
+ ```
733
+
734
+ ---
735
+
736
+ ## gem: vident-tailwind
737
+
738
+ # Vident::Tailwind
739
+ Short description and motivation.
740
+
741
+ ### Usage
742
+ How to use my plugin.
743
+
744
+ ### Installation
745
+ Add this line to your application's Gemfile:
746
+
747
+ ```ruby
748
+ gem "vident-tailwind"
749
+ ```
750
+
751
+ And then execute:
752
+ ```bash
753
+ $ bundle
754
+ ```
755
+
756
+ Or install it yourself as:
757
+ ```bash
758
+ $ gem install vident-tailwind
759
+ ```
760
+
761
+ ---
762
+
763
+ ## gem: vident-typed-minitest
764
+
765
+ # Vident::Typed::Minitest
766
+ Short description and motivation.
767
+
768
+ ### Usage
769
+ How to use my plugin.
770
+
771
+ ### Installation
772
+ Add this line to your application's Gemfile:
773
+
774
+ ```ruby
775
+ gem "vident-typed-minitest"
776
+ ```
777
+
778
+ And then execute:
779
+ ```bash
780
+ $ bundle
781
+ ```
782
+
783
+ Or install it yourself as:
784
+ ```bash
785
+ $ gem install vident-typed-minitest
786
+ ```
787
+
788
+ ---
789
+
790
+ ## gem: vident-typed-phlex
791
+
792
+ # Vident::Typed::Phlex
793
+
794
+ Adds typed attributes to Vident Phlex based components.
795
+
796
+ ```ruby
797
+ class ApplicationComponent < ::Vident::Typed::Phlex::HTML
798
+ end
799
+ ```
800
+
801
+ For more details see [vident](https://github.com/stevegeek/vident).
802
+
803
+ ### Usage
804
+ How to use my plugin.
805
+
806
+ ### Installation
807
+ Add this line to your application's Gemfile:
808
+
809
+ ```ruby
810
+ gem "vident-typed-phlex"
811
+ ```
812
+
813
+ And then execute:
814
+ ```bash
815
+ $ bundle
816
+ ```
817
+
818
+ Or install it yourself as:
819
+ ```bash
820
+ $ gem install vident-typed-phlex
821
+ ```
822
+
823
+ ---
824
+
825
+
826
+ ## gem: vident-typed
827
+
828
+ # Vident::Typed
829
+ Short description and motivation.
830
+
831
+ ### Usage
832
+ How to use my plugin.
833
+
834
+ ### Installation
835
+ Add this line to your application's Gemfile:
836
+
837
+ ```ruby
838
+ gem "vident-typed"
839
+ ```
840
+
841
+ And then execute:
842
+ ```bash
843
+ $ bundle
844
+ ```
845
+
846
+ Or install it yourself as:
847
+ ```bash
848
+ $ gem install vident-typed
849
+ ```
850
+
851
+ ---
@@ -47,7 +47,7 @@ module Vident
47
47
  def generate_tag(tag_type, content, **options, &block)
48
48
  # FIXME: Content was generated by the block, we assume its safe but that might not be true!
49
49
  method_name = (tag_type == :template) ? :template_tag : tag_type
50
- block = proc { unsafe_raw content } if !block && content
50
+ block = proc { raw content.html_safe } if !block && content
51
51
  send(method_name, **options, &block)
52
52
  end
53
53
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vident-phlex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Ierodiaconou
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-07 00:00:00.000000000 Z
10
+ date: 2025-06-26 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: 0.13.0
58
+ version: 0.13.1
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: 0.13.0
65
+ version: 0.13.1
66
66
  - !ruby/object:Gem::Dependency
67
67
  name: phlex
68
68
  requirement: !ruby/object:Gem::Requirement
@@ -72,7 +72,7 @@ dependencies:
72
72
  version: 1.5.0
73
73
  - - "<"
74
74
  - !ruby/object:Gem::Version
75
- version: '2'
75
+ version: '3'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
@@ -82,7 +82,7 @@ dependencies:
82
82
  version: 1.5.0
83
83
  - - "<"
84
84
  - !ruby/object:Gem::Version
85
- version: '2'
85
+ version: '3'
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: phlex-rails
88
88
  requirement: !ruby/object:Gem::Requirement
@@ -92,7 +92,7 @@ dependencies:
92
92
  version: 0.8.1
93
93
  - - "<"
94
94
  - !ruby/object:Gem::Version
95
- version: '2'
95
+ version: '3'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
@@ -102,7 +102,7 @@ dependencies:
102
102
  version: 0.8.1
103
103
  - - "<"
104
104
  - !ruby/object:Gem::Version
105
- version: '2'
105
+ version: '3'
106
106
  description: Vident with Phlex
107
107
  email:
108
108
  - stevegeek@gmail.com