view_primitives 0.1.2 → 0.1.3

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: 8c238e3e54f7adcde5c4deac58db808e62b8602534c8f72921c2a266347dd0d9
4
- data.tar.gz: a2d11d3988be3ebbe6926f673ea8dc6deef422409ff83fd0b2857afb2c14a47e
3
+ metadata.gz: c95b5b096babd8416b53c83c883124d89f992814d19ef7d262c731abc9ac5ffa
4
+ data.tar.gz: 16744aa30b37e6bad9995dc8e792b5fdbe28300555577aab8361db78f4cc4e6f
5
5
  SHA512:
6
- metadata.gz: a6c5cc252992ae249a0679881fa8d9eb4ddd87ebd71e9c7de7686f4e0ae56ccaf0354c53b5d9f38c7a6958e8a2cbbd35ca2ce68e69a2dff4c8f8f2a79577c107
7
- data.tar.gz: 0d325f0d79a32e0d015e263c0cd44c8d3d32abee0744c8f5d6afeab49855018c68087ad89c3dc800216edee71438bd4dacf8ba096f78ce8d386c421f1a980dab
6
+ metadata.gz: 5b588f79626af5d772a3616518198def45d7e918ff703fb937ce32ff17cc78edc135452b22243c2b14e878f6076149ea647cb93f65113deb88ca70dc96e99417
7
+ data.tar.gz: 18f9fca991217855a0c169ca9b8d8c44cbca7f31e5e642f851b366e71b43ddc5960afcc4145e197dd1e50e7885001dc351cfe4cc96134a08c22fcde6f8e5df8c
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.3] - 2026-06-04
11
+
12
+ ### Fixed
13
+
14
+ - `AddGenerator` template files for `form_field`, `input_otp`, and `qr_code` contained unescaped ERB tags (`<%= %>` / `<% %>`) inside Ruby comments; the stricter ERB parser in Ruby 4.0 raised `SyntaxError` when processing these `.tt` files, making those three components impossible to generate; fixed by escaping the comment-only tags as `<%%=` / `<%%`
15
+
10
16
  ## [0.1.2] - 2026-06-04
11
17
 
12
18
  ### Fixed
@@ -4,9 +4,9 @@ module UI
4
4
  # Wraps a label + input + optional hint and error message into a consistent field layout.
5
5
  #
6
6
  # Usage:
7
- # <%= ui :form_field, label: "Email", error: @user.errors[:email].first do %>
8
- # <%= ui :input, type: "email", name: "user[email]", id: "user_email" %>
9
- # <% end %>
7
+ # <%%= ui :form_field, label: "Email", error: @user.errors[:email].first do %>
8
+ # <%%= ui :input, type: "email", name: "user[email]", id: "user_email" %>
9
+ # <%% end %>
10
10
  class FormFieldComponent < ApplicationComponent
11
11
  def initialize(label: nil, hint: nil, error: nil, required: false, **html_attrs)
12
12
  @label = label
@@ -6,7 +6,7 @@ module UI
6
6
  # Renders N individual single-character inputs that auto-advance on entry.
7
7
  #
8
8
  # Usage:
9
- # <%= ui :input_otp, length: 6, name: "otp" %>
9
+ # <%%= ui :input_otp, length: 6, name: "otp" %>
10
10
 
11
11
  CELL_CLS = "h-12 w-10 rounded-md border border-input bg-transparent text-center text-lg font-medium " \
12
12
  "shadow-xs transition-[color,box-shadow] outline-none " \
@@ -8,9 +8,9 @@ module UI
8
8
  # 1. src: — pass a pre-rendered image URL (e.g. from an API or Rails asset)
9
9
  # 2. Block — pass raw SVG or HTML generated by a gem such as rqrcode:
10
10
  #
11
- # <%= ui :qr_code, size: 200 do %>
12
- # <%= RQRCode::QRCode.new("https://example.com").as_svg(viewbox: true).html_safe %>
13
- # <% end %>
11
+ # <%%= ui :qr_code, size: 200 do %>
12
+ # <%%= RQRCode::QRCode.new("https://example.com").as_svg(viewbox: true).html_safe %>
13
+ # <%% end %>
14
14
 
15
15
  WRAPPER_CLS = "inline-flex items-center justify-center overflow-hidden rounded-lg bg-white p-3"
16
16
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ViewPrimitives
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: view_primitives
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Poimtsev