@seed-ship/mcp-ui-solid 4.2.0 → 4.2.2

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/CHANGELOG.md CHANGED
@@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.2.2] - 2026-04-11
9
+
10
+ ### Added — Prefilled Forms with Source Indicators
11
+
12
+ #### Form field prefill (`prefill`, `source`, `displayHint`, `muted`)
13
+ - **`prefill`** — pre-populated value on form fields (string or string[] for multi-select)
14
+ - **`source`** — how the value was obtained: `detected`, `inferred`, `default`, `user`
15
+ - **`displayHint`** — human-readable caption below the field (e.g. "Rhône — déduit de Lyon")
16
+ - **`muted`** — reduced opacity styling, clears on focus/click for seamless editing
17
+ - Source badges: checkmark for detected, link for inferred, pencil for user-provided
18
+ - Backward-compatible — fields without prefill render exactly as before
19
+
20
+ #### Auto-submit countdown (`autoSubmitDelay`)
21
+ - When all required fields are prefilled, shows "Submit in Ns..." with cancel button
22
+ - Any user interaction cancels the countdown
23
+ - Server controls via `autoSubmitDelay` (1000–30000ms) on form params
24
+
25
+ #### EmbeddedFormSection (scratchpad forms)
26
+ - Initializes `formData` with `field.prefill` values (was always `{}`)
27
+ - Re-applies prefill on streaming SSE updates without overwriting user edits
28
+ - Full auto-submit countdown support
29
+
30
+ ### Changed
31
+ - `@seed-ship/mcp-ui-spec` bumped to 3.1.0 (new schema fields)
32
+ - `FormFieldSchema` adds `prefill`, `displayHint`, `source`, `muted`
33
+ - `FormComponentParamsSchema` adds `autoSubmitDelay`
34
+ - `PrefillSourceSchema` and `PrefillSource` type exported
35
+
8
36
  ## [4.0.0] - 2026-04-07
9
37
 
10
38
  ### Added — Data Verification Layer (anti-hallucination)
package/README.md CHANGED
@@ -5,6 +5,44 @@ SolidJS components + chat toolkit for MCP-generated UI. Part of the [MCP UI ecos
5
5
  [![npm version](https://img.shields.io/npm/v/@seed-ship/mcp-ui-solid.svg)](https://www.npmjs.com/package/@seed-ship/mcp-ui-solid)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
 
8
+ ## What's New in v4.2
9
+
10
+ - **Prefilled Forms** — Fields render with pre-populated values + source indicators (detected/inferred/default/user)
11
+ - **Source badges** — Visual cues showing how each value was obtained (checkmark, link, pencil icons)
12
+ - **Muted fields** — High-confidence prefills display with reduced opacity, activate on focus/click
13
+ - **Display hints** — Caption below prefilled fields (e.g. "Rhône — déduit de Lyon")
14
+ - **Auto-submit countdown** — When all required fields are prefilled, optional countdown with cancel
15
+
16
+ ### Prefilled Form Example
17
+
18
+ ```tsx
19
+ // SSE payload — server sends prefill + source on each field
20
+ {
21
+ fields: [
22
+ {
23
+ name: 'departement', type: 'select',
24
+ options: [{ value: '69', label: 'Rhône' }, ...],
25
+ prefill: '69',
26
+ displayHint: 'Rhône — déduit de Lyon',
27
+ source: 'inferred',
28
+ muted: true,
29
+ },
30
+ {
31
+ name: 'commune', type: 'text',
32
+ prefill: 'Lyon',
33
+ source: 'detected',
34
+ muted: true,
35
+ },
36
+ {
37
+ name: 'type_bien', type: 'select',
38
+ options: [{ value: '', label: 'Tous' }, ...],
39
+ // No prefill — user must choose
40
+ },
41
+ ],
42
+ autoSubmitDelay: 3000, // optional countdown
43
+ }
44
+ ```
45
+
8
46
  ## What's New in v4.0.0
9
47
 
10
48
  - **Data Verification Layer** - Anti-hallucination: `validateAgainstSource()` detects ~90% of numerical hallucinations, zero LLM cost, <1ms