@archipelago-js/react 0.10.0 → 0.11.0
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.
- package/README.md +9 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -144,7 +144,7 @@ Render-prop children get access to the full form object:
|
|
|
144
144
|
</IslandForm>
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
**Rails-style nested params** are supported. Input names with brackets are parsed into nested objects:
|
|
147
|
+
**Rails-style nested params** are supported for common bracket patterns. Input names with brackets are parsed into nested objects:
|
|
148
148
|
|
|
149
149
|
```tsx
|
|
150
150
|
<IslandForm operation="update_profile" method="patch">
|
|
@@ -157,6 +157,8 @@ Render-prop children get access to the full form object:
|
|
|
157
157
|
// submits: { user: { email: "...", name: "..." }, tags: ["react", "rails"] }
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
+
Supported patterns: `field[key]` (nested object), `field[]` (array append), and `field[key][nested]` (deep nesting). This covers the most common Rails form conventions. Exotic Rack edge cases (e.g. mixing numeric indices with array append on the same key) may not match Rack's behavior exactly.
|
|
161
|
+
|
|
160
162
|
**Props:**
|
|
161
163
|
|
|
162
164
|
| Prop | Type | Default |
|
|
@@ -272,3 +274,9 @@ Each island is wrapped in an `ErrorBoundary`. If an island crashes, the error is
|
|
|
272
274
|
| `FORM_ERROR` | client | `"_base"` constant for base errors |
|
|
273
275
|
| `ArchipelagoTransportError` | client | Typed transport error class |
|
|
274
276
|
| `parseIslandResponse` | client | Parse raw JSON into typed response |
|
|
277
|
+
|
|
278
|
+
## Stability
|
|
279
|
+
|
|
280
|
+
This library follows [Semantic Versioning](https://semver.org/). The public API — `bootArchipelagoIslands`, `useIslandProps`, `useIslandForm`, `IslandForm`, `defineIslandLoader`, `ErrorBoundary`, and `useIslandContext` — is considered stable. The discriminated response types (`ok` / `error` / `redirect` / `forbidden`), `FORM_ERROR = "_base"`, and stream terminology are part of the public contract.
|
|
281
|
+
|
|
282
|
+
`IslandForm` bracket param parsing supports common Rails conventions (`field[key]`, `field[]`, `field[key][nested]`). Exotic Rack edge cases are not guaranteed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@archipelago-js/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "React bindings for Archipelago islands",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@archipelago-js/client": "^0.
|
|
27
|
+
"@archipelago-js/client": "^0.11.0",
|
|
28
28
|
"react": "^18.0.0 || ^19.0.0",
|
|
29
29
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
30
30
|
},
|