expo_turbo-rails 0.1.5 → 0.1.6
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 +4 -4
- data/README.md +10 -4
- data/lib/expo_turbo/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb4fd4c1b7fceb63b0692da829272a1797823fb9670f8f58f349826efce4ad3d
|
|
4
|
+
data.tar.gz: cf76144bc5449ed6f89cd65d5907af98eb6cae1503c451a27485d0a88d0d67de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bffd867d2a666b87fbe1a7f860223ce89456ddac0f3a4a253bcd38e2df502004bd842b0ed45e9cbeb0a5f7eea1ce2759850df641edff877c264435abccd8fafb
|
|
7
|
+
data.tar.gz: e458ed58f94910046557ad34f6876bd850e40ff5aebd36243a3fefe006bb57c23bf81151004aa145b56bf6e8f5f5a6c4efee58a60361ab5dd22d80df941b58ee
|
data/README.md
CHANGED
|
@@ -5,10 +5,10 @@ The Rails package for Expo Turbo. It registers the distinct `application/vnd.exp
|
|
|
5
5
|
The package validates rendered Expo Turbo documents structurally and rejects blank or duplicate literal IDs across the complete response, including Frame IDs. A controller must declare the components and style tokens it is allowed to render documents; when it does, the same policy also applies to its Frame, Stream, and raw controller-broadcast output. Its optional protected Cable boundary delegates all credentials and resource policy to the host.
|
|
6
6
|
|
|
7
7
|
> [!IMPORTANT]
|
|
8
|
-
> Version [`0.1.
|
|
8
|
+
> Version [`0.1.6`](https://rubygems.org/gems/expo_turbo-rails) is the stable
|
|
9
9
|
> release published on 2026-07-31. Manual VoiceOver, TalkBack, and browser
|
|
10
10
|
> screen-reader evidence remains an explicit follow-up and is not claimed by
|
|
11
|
-
> the `0.1.
|
|
11
|
+
> the `0.1.6` compatibility surface.
|
|
12
12
|
|
|
13
13
|
```ruby
|
|
14
14
|
gem "expo_turbo-rails"
|
|
@@ -64,7 +64,13 @@ Do not put multiline values in XML attributes with ordinary ERB interpolation. T
|
|
|
64
64
|
|
|
65
65
|
The helper first HTML-escapes the value. It then writes tabs, carriage returns, and line feeds as `	`, ` `, and ` `. The character references preserve the original value through XML parsing. Use `xml:space="preserve"` instead for multiline element text.
|
|
66
66
|
|
|
67
|
-
The client registry can replace the hand-written component map.
|
|
67
|
+
The client registry can replace the hand-written component map. Keep
|
|
68
|
+
`defineComponentDefinition` and `defineCapabilityModule` declarations in a
|
|
69
|
+
module that does not import native renderers, then write
|
|
70
|
+
`capabilityManifestJSON(capabilityModule)` to a checked-in or generated file
|
|
71
|
+
from plain Node or Bun. Bind each definition to its React Native renderer with
|
|
72
|
+
`bindComponent` only in the runtime module. Configure the controller with
|
|
73
|
+
`manifest:` instead of `components:`:
|
|
68
74
|
|
|
69
75
|
```ruby
|
|
70
76
|
expo_turbo_template_capabilities(
|
|
@@ -77,7 +83,7 @@ expo_turbo_template_capabilities(
|
|
|
77
83
|
)
|
|
78
84
|
```
|
|
79
85
|
|
|
80
|
-
The versioned manifest contains the registry modules, component tags and aliases, and each component attribute's name and requiredness. Rails loads it when the controller is configured, rejects a malformed or protocol-incompatible file, derives `style-tokens` support from the declared attribute, and applies the same component and attribute validation in every environment. Name-only attributes from a 0.1.4 manifest remain readable and are treated as optional. Generate the file in CI and fail on a diff to detect a stale manifest before deployment.
|
|
86
|
+
The versioned manifest contains the registry modules, component tags and aliases, and each component attribute's name and requiredness. Component-free generation produces the same canonical JSON and hash as `registry.capabilityManifestJSON()` without loading the host component tree. Rails loads it when the controller is configured, rejects a malformed or protocol-incompatible file, derives `style-tokens` support from the declared attribute, and applies the same component and attribute validation in every environment. Name-only attributes from a 0.1.4 manifest remain readable and are treated as optional. Generate the file in CI and fail on a diff to detect a stale manifest before deployment.
|
|
81
87
|
|
|
82
88
|
For a native Frame GET, read the validated request header and emit an exact matching Frame from the host-owned XML template. `expo_turbo_frame_tag` accepts a nonblank UTF-8 literal ID without control characters, or a model class that it normalizes with Rails' `dom_id`, then delegates tag generation to `turbo-rails`. It deliberately does not install `Turbo::Frames::FrameRequest`, so it does not alter HTML layouts or adopt its raw-header behavior. Before returning, it parses the exact Frame output under a private synthetic root and applies the same configured component/style admission: markup must be valid UTF-8 XML without declarations, DTDs, or processing instructions, and any XML prefix must be declared by the Frame fragment itself. Validation does not serialize or alter the returned `SafeBuffer`, so inline `xml:space="preserve"` text keeps its authored bytes for the native parser.
|
|
83
89
|
|